I remember when I first tried to understand how to produce designs for the web – coming from the paper-based world, it was hard for me to accept everything that was suddenly out of my control. When I first tried to grasp CSS with the help of now-defunct Adobe GoLive, I bailed pretty quickly. Table-based layout and font tags didn’t make much sense to me either – why did I have to slice up a page into a bunch of adjoining cells, instead of just drawing independent boxes like I did in Quark?
A couple of years later, I decided to try again, motivated by the realization that my eight-years-younger brother seemed to be better at this web stuff than I was. I spent untold hours trying to wrap my brain around the difference between margin and padding and exactly how to get floated elements to bend to my will. I remember the epiphany that one could use left-floated list items for a horizontal menu, or that the right DOCTYPE can force Internet explorer to behave more like a real browser.
These days, I have an honest-to-god job doing this stuff, and every now and then, someone will ask me how they can learn it too. It all makes so much more sense to me than it used to that it’s hard to remember how I got here. In the interest of getting this stuff written down for passing along, though, here are a few thoughts:
The Tools
These are things without which the rest is impossible:
- A text editor Notepad will do just fine; for a few bucks, you can get TextMate for Mac or the e Text Editor for PC. If you use Dreamweaver, hide everything but the file navigator panel and the code editing view. You will learn nothing from Dreamweaver’s “design” view.
- Firefox You’ll need to test anything you do in Internet Explorer, but first, you’ll get it working in Firefox. Whereas Internet Explorer enjoys mocking web standards, Firefox does its best to adhere to them; plus, it has all sorts of extensions that make it easier to troubleshoot your work.
- Firefox Web Developer Toolbar This has all sorts of useful tools in it, including a real-time CSS editor that opens in the browser’s sidebar so you try changes to your CSS and see the results immediately.
- Firebug This is most useful for Javascript debugging, but it has some nice features for debugging CSS as well.
- HTML Validator Incredibly helpful for finding errors in your HTML.
(An aside: A few months ago I booted up an old laptop and found a preview release of Firefox 1.0 installed beside a well-worn Internet Explorer 6; when I abandoned the laptop, I was in the process of abandoning IE too. I can’t help but wonder how difficult my learning would have continued to be without the arrival of Firefox, which, with the extensions mentioned above, makes it so much more possible to learn all of this stuff in a very tangible, immediate sort of way.)
Learning with Firefox
Once you have the tools above, open Firefox and start with a page someone else built – like the one you’re on right now – and see what’s inside. It pays to be curious about every web page you visit; if you see something interesting, view the source and figure out how it got there. Some tips:
-
Ctrl-U
will show you the HTML for a page, and with the HTML Validator extension, you can “clean up” the HTML so it’s easier to read. -
Ctrl-Shift-E
will open the Web Developer Toolbar CSS editor, which will show you the CSS for the page, with a tab for each CSS file. You can edit the CSS in the editor and see the effects immediately. -
F12
will open Firebug. In the top left of the panel that opens, click the Inspect menu item, then move your mouse back to the page itself and click on an element to find out more about it. You can also click on the HTML tab to view the HTML and expand and collapse sections of it to see the structure of the page. Hovering over an element in the HTML panel will highlight it on the page; clicking on an element will let you find out more about it in the Style and Layout tabs of Firebug. (Firebug is an incredibly powerful tool that you really need to play with to fully appreciate. It’s a completely non-destructive tool – you can’t hurt anything with it unless you try really, really hard – so don’t be afraid to click around and see what happens.) - Remember that these days, lots of page elements are built with Javascript rather than with straight HTML.
Ctrl-U
will show you only the HTML; Firebug will show you the “generated source,” including any elements built with Javascript. Firebug also lets you look at the Javascript on a page, which can be helpful when you’re trying to understand how something got there.
POSH
Plain-old semantic HTML. When you go to make a web page, write the simplest HTML you can, and use standard HTML elements whenever humanly possible. Start by creating HTML that represents the actual sections of the page – header, navigation, sidebar, content, footer – and give the elements names that say what they are, not where they go. When you think you’re done, view the HTML in a browser, without CSS, and see if it makes sense. Then, and only then, open the browser’s CSS editor and start styling the elements. See how far you can get without adding any design-related markup to your HTML. If you find yourself writing convoluted HTML or adding purely presentational markup, to make something work, it’s time to reconsider your approach. Once you have a good stylesheet started, copy it to your text editor and continue working on it there.
Strategies
It helps to give yourself deadlines, even if they’re imaginary. I’ve learned more about HTML, CSS and Javascript in the past 12 months than I learned in the three years before, and I think that’s largely because deadlines have forced me to solve problems rather than pondering them.
Don’t be afraid to do something less than perfectly; there can be value in just getting it done. I constantly look back at things I did three months ago – let alone three years ago, and sometimes three weeks ago – and I cringe when I think how differently I would do them today. But half the reason I know what I know now is precisely because I didn’t know it then, and I learned it along the way. Understanding the building blocks of the web is an iterative process, and you’ll do better if you remember that you cannot know everything you wish you knew.


| as_data_mask {rlang} | R Documentation |
A data mask is an environment (or possibly multiple environments forming an ancestry) containing user-supplied objects. Objects in the mask have precedence over objects in the environment (i.e. they mask those objects). Many R functions evaluate quoted expressions in a data mask so these expressions can refer to objects within the user data.
These functions let you construct a tidy eval data mask manually. They are meant for developers of tidy eval interfaces rather than for end users.
as_data_mask(data) as_data_pronoun(data) new_data_mask(bottom, top = bottom)
data |
A data frame or named vector of masking data. |
bottom |
The environment containing masking objects if the data mask is one environment deep. The bottom environment if the data mask comprises multiple environment. If you haven't supplied |
top |
The last environment of the data mask. If the data mask
is only one environment deep, This must be an environment that you own, i.e. that you have
created yourself. The parent of |
A data mask that you can supply to eval_tidy()
.
Most of the time you can just call eval_tidy()
with a list or a
data frame and the data mask will be constructed automatically.
There are three main use cases for manual creation of data masks:
When eval_tidy()
is called with the same data in a tight loop.
Because there is some overhead to creating tidy eval data masks,
constructing the mask once and reusing it for subsequent
evaluations may improve performance.
When several expressions should be evaluated in the exact same
environment because a quoted expression might create new objects
that can be referred in other quoted expressions evaluated at a
later time. One example of this is tibble::lst()
where new
columns can refer to previous ones.
When your data mask requires special features. For instance the data frame columns in dplyr data masks are implemented with active bindings.
Unlike base::eval()
which takes any kind of environments as data
mask, eval_tidy()
has specific requirements in order to support
quosures. For this reason you can't supply bare
environments.
There are two ways of constructing an rlang data mask manually:
as_data_mask()
transforms a list or data frame to a data mask.
It automatically installs the data pronoun .data
.
new_data_mask()
is a bare bones data mask constructor for
environments. You can supply a bottom and a top environment in
case your data mask comprises multiple environments (see section
below).
Unlike as_data_mask()
it does not install the .data
pronoun
so you need to provide one yourself. You can provide a pronoun
constructed with as_data_pronoun()
or your own pronoun class.
as_data_pronoun()
will create a pronoun from a list, an
environment, or an rlang data mask. In the latter case, the whole
ancestry is looked up from the bottom to the top of the mask.
Functions stored in the mask are bypassed by the pronoun.
Once you have built a data mask, simply pass it to eval_tidy()
as
the data
argument. You can repeat this as many times as
needed. Note that any objects created there (perhaps because of a
call to <-
) will persist in subsequent evaluations.
In some cases you'll need several levels in your data mask. One good reason is when you include functions in the mask. It's a good idea to keep data objects one level lower than function objects, so that the former cannot override the definitions of the latter (see examples).
In that case, set up all your environments and keep track of the
bottom child and the top parent. You'll need to pass both to
new_data_mask()
.
Note that the parent of the top environment is completely
undetermined, you shouldn't expect it to remain the same at all
times. This parent is replaced during evaluation by eval_tidy()
to one of the following environments:
The default environment passed as the env
argument of eval_tidy()
.
The environment of the current quosure being evaluated, if applicable.
Consequently, all masking data should be contained between the bottom and top environment of the data mask.
# Evaluating in a tidy evaluation environment enables all tidy # features: mask <- as_data_mask(mtcars) eval_tidy(quo(letters), mask) # You can install new pronouns in the mask: mask$.pronoun <- as_data_pronoun(list(foo = "bar", baz = "bam")) eval_tidy(quo(.pronoun$foo), mask) # In some cases the data mask can leak to the user, for example if # a function or formula is created in the data mask environment: cyl <- "user variable from the context" fn <- eval_tidy(quote(function() cyl), mask) fn() # If new objects are created in the mask, they persist in the # subsequent calls: eval_tidy(quote(new <- cyl + am), mask) eval_tidy(quote(new * 2), mask) # In some cases your data mask is a whole chain of environments # rather than a single environment. You'll have to use # `new_data_mask()` and let it know about the bottom of the mask # (the last child of the environment chain) and the topmost parent. # A common situation where you'll want a multiple-environment mask # is when you include functions in your mask. In that case you'll # put functions in the top environment and data in the bottom. This # will prevent the data from overwriting the functions. top <- new_environment(list(`+` = base::paste, c = base::paste)) # Let's add a middle environment just for sport: middle <- env(top) # And finally the bottom environment containing data: bottom <- env(middle, a = "a", b = "b", c = "c") # We can now create a mask by supplying the top and bottom # environments: mask <- new_data_mask(bottom, top = top) # This data mask can be passed to eval_tidy() instead of a list or # data frame: eval_tidy(quote(a + b + c), data = mask) # Note how the function `c()` and the object `c` are looked up # properly because of the multi-level structure: eval_tidy(quote(c(a, b, c)), data = mask) # new_data_mask() does not create data pronouns, but # data pronouns can be added manually: mask$.fns <- as_data_pronoun(top) # The `.data` pronoun should generally be created from the # mask. This will ensure data is looked up throughout the whole # ancestry. Only non-function objects are looked up from this # pronoun: mask$.data <- as_data_pronoun(mask) mask$.data$c # Now we can reference the values with the pronouns: eval_tidy(quote(c(.data$a, .data$b, .data$c)), data = mask)


Every year, thousands of people gather in the streets of Seattle and partake
in the St. Patrick's Day Parade, celebrating the Irish heritage in Seattle.
 After the
wonderful parade, the day ends with closing ceremonies at the famous Seattle
Center (home of the Space Needle)!
Who:Anyone!
When:Saturday, March 16, 2013, 12:30 pm
Where:Starting from 4th Ave at Jefferson in downtown Seattle,
traveling north on 4th Ave S and officially ending at the Seattle Center
Click here to get to the
St.Patrick's Day Parade Website
Click here to get a
Parade Application
Starting in 2013, Cirque du Soleil comes back to Redmond, WA after two
years, bringing with it a brand new show called AMALUNA, a love story between
the Princess of a wealthy land and a young suitor. Cirque du Soleil comes
go Redmond every two years, each time somehow exceeding the previous show
in terms of glamour and style. This event is fun for all ages as well,
allowing for a great time among family. Make sure to reserve tickets as
soon as possible because they are flying off the shelves as the season
winds down.
Who:Anyone!
When:January 31, 2013 to March 24, 2013
Where:Marymoor Park (6046 W Lake Sammamish Parkway NE, Redmond,
WA 98052)
Click to get
ticket options
Click here to get to the
Cirque du Soleil Website


EasyQuery
Friendly ad-hoc query builder for your web-site
Entities
Columns
Conditions
Query Menu
Clear
Load
▼
Storage
▼
New query
Save query
Save query as...
Remove query
Execute
SQL
Result


Campgrounds & Recreational Vehicle Parks in West Allis, WI - AOL ...
Find great Campgrounds & Recreational Vehicle Parks in West Allis, WI using AOL Local Yellow Pages. If you can't find the right Campgrounds & Recreational .
http://yellowpages.aol.com/campgrounds/wi/west-allis/
Treatment for Herniated or Bulging Discs
West Allis, WI - Official Website - Community Events
West Allis/West Milwaukee Rec Department . West Allis hosts two summer concert series at Veteran's Park at 70 St and National Avenue. Tuesday Night in the .
http://www.westalliswi.gov/index.aspx?NID=411
West Allis Wisconsin
RV Park at Wisconsin State Fair Park<PHONE_NUMBER>, 601 South 76th Street, West Allis, WI 53214. Western Motel<PHONE_NUMBER>, 3359 South 108th Street, .
http://www.wistravel.com/cities_in_wisconsin/west_allis_wisconsin/
west allis park and recreation Herniated or Bulging Discs
West Allis Rec Dept - Park | Facebook
Welcome to West Allis Rec Dept on Facebook. Join now to write reviews and connect with West Allis Rec Dept.
http://www.facebook.com/pages/West-Allis-Rec-Dept/305087422911276
New Berlin Recreation Trail | Wisconsin Trails | TrailLink.com
The trailhead in West Allis is in Greenfield Park, at the intersection of SR 59 and 124th Street. You'll find the trailhead adjacent to the main parking lot, across .
http://www.traillink.com/trail/new-berlin-recreation-trail.aspx
West Allis, WI - Official Website
Milwaukee County Winter Farmers Market Our West Allis Farmer's Market is . other items at the Milwaukee County Winter Farmers' Market at the State Fair Park.
http://www.westalliswi.gov/
Official Impairment Listing for Spinal Disorders
West Allis-West Milwaukee Recreation and Community Services ...
School District Recreation and Community Services Department offering recreation, enrichment, fitness, and community education programs serving children .
http://www.parksnreviews.com/parks/WestAllisWestMilwaukeeRecreationandCommunityServicesDepartment/5043
- sedro woolley wa campgrounds (narrowing of the spine)
Greenfield Park - Milwaukee County
Recreation Trail. Greenfield. Pavilion. Pedestrian/ . (414) 257-PARK (7275) countyparks.com. UPDATED . West Allis, WI 53227. Unit Office:<PHONE_NUMBER>. 0 .
http://county.milwaukee.gov/ImageLibrary/Groups/cntyParks/maps/Greenfield.pdfOut of the Kitchen - Food and Drink Events
Aug 21, 2012 . West Allis Park & Recreation: Classes meet 6:30-9 p.m. Franklin Fieldhouse, 1964 S. 86th St., West Allis.<PHONE_NUMBER>. Beans and Legumes.
http://www.jsonline.com/features/food/foodcal22-th6ei8n-166815456.html
T-ball in West Allis - WestAllisNOW
Jul 8, 2011 . More than 200 4- and 5-year-olds play in the West Allis Park and Recreation league. Credit: Peter Zuzga. Share on Facebook. Share on Twitter .
http://www.westallisnow.com/multimedia/photos/125161939.html
West Allis/West Milwaukee Park District, West Allis ... - Village Profile
West Allis/West Milwaukee Park District is committed to serving the business . for active and passive recreation flourish throughout the West Allis and West .
http://www.villageprofile.com/wisconsin/westallis/05/topic.html
Medical-Vocational Allowance for Herniated Disc
Parks & Recreation - City of Greenfield, Wisconsin
Information on parks, program offerings, registration, community events and employment opportunities.
http://www.ci.greenfield.wi.us/parksrec/
Vermont State Parks - Allis State Park
The park is named for Wallace Allis, who willed his Bear Mountain Farm to the State of Vermont to be developed as a campground and recreational area.
http://www.vtstateparks.com/htm/allis.htm
West Allis, WI - Wisconsin Gazetteer
West Allis, Wisconsin WI Community Profile with maps, aerial photos, schools, hospitals, airports, real . West Allis and Greater Wisconsin Parks & Recreation .
http://wisconsin.hometownlocator.com/wi/milwaukee/west-allis.cfm
Appealing a Denial of Benefits
Sports - WestAllisNOW
West Allis - In the opening dual meet of the 2012-13 season, the West Allis Hale . Scorecard: Latest scores from park and rec leagues, youth sports and more .
http://www.westallisnow.com/sports/
Cool Waters Family Aquatic Park in Greenfield Park, Milwaukee WI
Cool Waters Family Aquatic Park is in Milwaukee County's own Greenfield Park. The zero-depth . 2028 S. 124th St., West Allis, WI 53227 Hotline: (414) 321- 7530. Open Memorial . Advance-purchase Recreation Provider Rate, get details .
http://county.milwaukee.gov/CoolWaters9156.htm


GraphWalker Studio
Menu
Add
Fixed footer
Close menu
Load model
Save model
Run model
Execution delay (ms)
Reset
Pause
Step
Add Model
Do layout
Model name
Model generator
Model actions
Model requirement
Element name
Shared state name
Guard
Actions
Requirements
Start element
Login
Username:
Password:
Cancel
Save


Saving the Princess
问题描述 :
Simple word, we need save her again, because she is so beautiful and graceful that we love her so much. Our country was composed of N cities and M undirected roads, the princess was in the city A, and we were in city 0, the capital. Obviously, only we arrive at the city A first can we save the princess.
However, it’s not a shortest path problem because we had extremely enough time to spend among the roads. What matters was whether we could arrive at the city A.
Perhaps a strange problem, but it’s reasonable because we need food and water while travelling from one city to another, or we just would be died before we can see the princess. To make the situation less complicated, we assumed we always consumed two units of food and one unit of water when we were walking, just like a coefficient multiply the distance we had walked.
But the condition left for us is a little annoyed. As our country was very poor, we could only purchase the food in the capital. What’s more, at any time, the sum of food units and water units we carried can’t exceed the capacity S.
Oh, don’t be despair, please. Also some not too bad news was here. We could rest and collect water as much as possible at any city, and in each city, there were plenty of storages to store food for our later use.
Now, to save our lovely and pitiful princess, how much food we have to purchase in the capital at least?
输入:
Each test case begins with four integers N, M, S, A. Their meanings are the same as the description.
Then M lines follow, each line contains three integers Ai, Bi, Ci, indicating an undirected road from Ai to Bi whose length was Ci.
Technical Specification
1. 1 <= T <= 50
2. 2 <= N <= 1000
3. 1 <= M <= 50000
4. 1 <= S, Ci <= 100000
5. 1 <= A < N
6. 0 <= Ai, Bi < N, Ai != Bi
输出:
Each test case begins with four integers N, M, S, A. Their meanings are the same as the description.
Then M lines follow, each line contains three integers Ai, Bi, Ci, indicating an undirected road from Ai to Bi whose length was Ci.
 Case 3: 30
#include <cstdio> #include <cstring> using namespace std; #define maxn 1000 #define max (1<<29) typedef __int64 ll; const ll inf = (1ll)<<50; int t, n, m, s, a, i, j, u, v, w, now, tmp1, tmp2; int dis[maxn][maxn]; ll best[maxn]; ll cost, k21, k22; bool vis[maxn]; int head, tail; int q[maxn*maxn]; bool flag; int main() { // freopen("in.txt", "r", stdin); scanf("%d", &t); for (int cases = 1; cases <= t; cases++) { scanf("%d %d %d %d", &n, &m, &s, &a); for (i = 0; i < n; i++) for (j = 0; j < n; j++) dis[i][j] = -1; for (i = 0; i < m; i++) { scanf("%d %d %d", &u, &v, &w); dis[u][v] = dis[v][u] = w; } head = 1; tail = 1; q[1] = a; for (i = 0; i < n; i++) best[i] = inf; for (i = 0; i < n; i++) vis[i] = false; best[a] = 0;vis[a] = true; while (head <= tail) { now = q[head]; for (i = 0; i < n; i++) if ((dis[now][i] != -1) && (dis[now][i]*3 <= s)) { if ( best[now]+3*dis[now][i] <= s) {// transport the food in one time cost = best[now]+2*dis[now][i]; // the food needed to consume flag = true; } else { tmp1 = s-3*dis[now][i]; // at most one can transport in one time tmp2 = s-5*dis[now][i]; // at most one can transport going in two-way if(tmp2 > 0){ // take more times k21 = (best[now]-tmp1)/tmp2; // need k21's two-ways k22 = (best[now]-tmp1)%tmp2; cost = 1ll*(s-dis[now][i])*(1+k21)+1ll*(k22!=0)*(k22+4*dis[now][i]); flag = true; } else flag = false; //fail } if (flag && cost < best[i]){ best[i] = cost; //printf("%d %d\n", i, cost); if (!vis[i]) { vis[i] = true; q[++tail] = i; } } } head++; vis[now] = false; } //for (i = 0; i < n; i++) printf("best %d : %d\n", i, best[i]); if (best[0] == inf) { printf("Case %d: Poor princess, we will miss you!\n", cases); } else { printf("Case %d: %I64d\n", cases, best[0]); } //break; } }
Internet websites price visiting…listed here are a few one-way links to online websites that we url to considering the fact t
Internet websites price visiting…listed here are a few one-way links to online websites that we url to considering the fact t
Internet websites price visiting…listed here are a few one-way links to online websites that we url to considering the fact t
Internet websites price visiting…listed here are a few one-way links to online websites that we url to considering the fact t
Internet websites price visiting…listed here are a few one-way links to online websites that we url to considering the fact t
Internet websites price visiting…listed here are a few one-way links to online websites that we url to considering the fact t
Internet websites price visiting…listed here are a few one-way links to online websites that we url to considering the fact t
Internet websites price visiting…listed here are a few one-way links to online websites that we url to considering the fact t
这个问题别太纠结了，不同的编译器结果不一
mark, 备用
有些说不通吧，只有1个孩子肯定是男孩了
这个应该是比较简单的解法了，如果有更好的办法可以告诉我
能不能说一下tmp数组和solve都是干嘛的？
对于输出格式不用控制？？还是直接使用cout输出。？？
示例程序中的代码不够稳健，没有考虑到输入了非法字符或者不合理输入的情况。
这个后缀数组不是常用的那个.
不错，再多来的CF上面的题
yeah, This is very tricky. If you use Cpp,you need more code
博主的C++功底真是好
这个问题别太纠结了，不同的编译器结果不一


Aston Villa captain Jack Grealish sends Tottenham message to Dele Alli
Latest Aston Villa news includes Grealish taking to social media to congratulate Spurs star
by Shane Ireland, https://www.facebook.com/ShaneIrelandJournalistJack Grealish has sent a message to Tottenham midfielder Dele Alli after the England international helped his side to a 3-2 victory over West Ham United.
In Jose Mourinho’s first match in charge as manager, Spurs took all three points against their London rivals on Saturday.
Alli wasn’t on the scoresheet but played the majority of the game before being replaced by Christian Eriksen.
Grealish wasn’t in action with Aston Villa having to wait until Monday night to face Newcastle United and took to social media to congratulate Alli.

Grealish has been heavily linked with Tottenham in recent summer transfer windows but stayed put to help guide Villa to promotion back to the Premier League.
He’s missed the last three fixtures in all competitions with a calf injury but is expected to return against Newcastle.
Boss Dean Smith said this week: "He's been OK, frustrated with the injury, has been in a rich vein of form, nominated for October player of the month and, unfortunately, picked up a dead calf at the end of the game against Manchester City. Then he ended up missing Liverpool and Wolves which he thought he'd make both games but he didn't.
"The fact he hasn't got called up, we've spoken at length about that. He can't control that but what he can control is he can keep performing, making sure he keeps the pressure on the people who have to make them decisions.
"He's ready (for Newcastle). He's one of the fittest lads there, always doing extras after training as well. He's fit and ready."


Loading!
Motionia - lightweight simplified readymade animation library!
With motionia you can animate elements quickly by just one line of code!!!
Slide up & down a element.
Slide left & right a element.
Motionia has a lot of potential to create anims easily, by just one line of code.
The Docs will be available soon!
Grab the docs on github!The abhiprojectz work.


Spirit
Publish topic
Title:
Category:
Choose a category
Bugs
Development
Feature Requests
Test Posting
Uncategorized
Comment:
asd


{{__SHOW_REG?'Register':'Let\'s do this!'}}
You know the drill.
{{loginMessage}}
CANCEL
LOGIN
or
Forgot something old.
R E S E T
Introduce yourself.

L O G I N


Total:
0
Voted:
0
Not Voted:
0
0.00%
| CF | Name | Surname | Document ID | Birth day | City | Address | Voted |
|---|


Hello and welcome to Bus Mall. We a new and exciting start up that offers users the ability to read through a catalog with new, unique, and exciting products from different local artists, companies, and knick knackeries. We are still in our testing phase and we need information from you, our trusted consumers. You will see three images displayed on your screen. Please select the product that you most like out of the three. At the end we will produce a chart for you to see offering. You can reset the page, by either navigating the page or refreshing. However, you scores will be kept to build a progressive series of votes. Every 25 votes it will end functionality and produce a chart. Thank you for your input.
Your friends, the BusMall Team.


Welcome to Marklar
A Marklar walks into a Marklar.
Marklar asks the marklar, "do you have any Marklar?"
The Marklar shakes his Marklar and says "No, we only have Marklar"
To navigate to the next slide, use the space-bar.
This has been an exercise in...
Semantics
What the Marklar? If we only use one word for everything, it has no meaning. Today we're going to talk about a new technology, Web Components, which runs the risk of polluting the internet with a bunch of Marklar: soulless div tags, essentially, that don't communicate role or purpose to non-visual users.
I'm Marcy Sutton, not a freelance Marklar but rather a full-time developer at Substantial, a 60-person product studio in Seattle. I've spent the past few months expanding my own skillset while improving the accessibility of web applications such as a a fitness app and a whiskey recommendations app. Because why shouldn't those appliations be accessible to all people?! I grew to love accessibility at my previous job because it added a valuable dimension to my work.
No, thanks
The worst HTML markup where every tag and attribute is "marklar"
<marklar style="background-image: url(marklar.gif);">
<marklar>Marklar was a secret Apple development program
to put Mac OS X on the Intel x86 microprocessor. Ten years
ago, the first rumors of Marklar emerged.</marklar>
<marklar href="#" onclick="doMarklar()">More</marklar>
</marklar>
Accessibility Challenges
Semantics
Keyboard access
Text alternatives
Color contrast
Semantics: the type of element object matters to a screen reader. Keyboard access: this is actually a wider audience than just screen reader users (broken arm? dead mouse?). You should be able to tab through any webpage and use everything with only a keyboard. Super important to people with poor motor control or who are using assistive technology. Text alternatives: this includes alt text on images, form labels (or ARIA equivalents), and offscreen text (I use this a LOT to add context to elements without text alternatives in the visual design).
Web Components
New standards moving through the W3C
Custom Elements
Shadow DOM
Templates
HTML Imports
Decorators
Today
Web Components!
Shadow DOM
Custom Elements
Why are we excited?
Extend the DOM
Less waiting for browsers
Minimize conflicts
Less waiting for browser standards: like fancy HTML5 inputs. But the semantics of those matter.
Shadow DOM
Encapsulation by hiding DOM subtrees under shadow roots
Speaking of conflicts:
Shadow DOM is designed to provide encapsulation by hiding DOM subtrees under shadow roots. It provides a method of establishing and maintaining functional boundaries between DOM trees and how these trees interact with each other within a document, thus enabling better functional encapsulation within the DOM.
Shadow host - an element hosting one or more Shadow DOM node trees.
Shadow tree - a node tree hosted by a shadow host.
Shadow root - the root node of a shadow tree.
Shadow DOM and the Browser's Rendering Tree
Source: W3C Shadow DOM Specification
This boundary illustrates my biggest question about screen readers: they provide a protected area where scripts and styles don’t cross, so how could assistive technology pass through?
Rendering Engine Basic Flow
(Webkit)
Source: How Browsers Work, HTML5 Rocks
Browsers are the most complex applications. They have gotten really good at fixing our broken HTML. They translate HTML tags into objects which are affected by JavaScript and CSS. For example, we extend the DOM with JavaScript. We hide inactive hover menus or hidden content with “display: none;”. These are things that change our markup from its original form in View Source to its rendered form in the Element Inspector.
Trees “as rendered”
The DOM "as rendered", including Shadow DOM, presents one tree to assistive technology. That is what makes it accessible.
How do I Shadow DOM?
var template = document.querySelector('template'),
tacoSurprise = Object.create(HTMLElement.prototype);
tacoSurprise.createdCallback = function() {
var shadowRoot = this.createShadowRoot(),
clone = template.content.cloneNode(true);
shadowRoot.appendChild(clone);
template.remove();
};
document.registerElement("taco-surprise", {
prototype: tacoSurprise
});
DEMO VoiceOver, call attention to trees 'as rendered'
Current Native Support
Shadow DOM
Chrome 25+
Opera 15+
Firefox 30+
Chrome for Android 33+
Source: Caniuse.com
Polyfills
*Shadow DOM coming soon
Polymer can get you to IE10, X-Tag can get you to IE9 but it doesn’t yet support Shadow DOM. And I heard they might do away with it and work more functionality into Brick. Which would be more similar to the approach of Polymer, which has its shim, which will fill in less and less over time as browsers evolve, while also providing optional components for you to use.
Custom Elements
<taco-button>
The elements of your dreams need semantics.
How to add semantics
Extend a native element
var TacoButtonPrototype = Object.create(HTMLButtonElement.prototype);
var TacoButton = document.registerElement('taco-button', {
prototype: TacoButtonPrototype,
extends: 'button'
});
var tacoButton = new TacoButton();
document.body.appendChild(tacoButton).textContent = 'Give me tacos';
tacoButton = document.querySelector('button[is=taco-button]');
How to add semantics
Use native child elements
<taco-surprise>

Taco Surprise!

<button>Give me tacos</button>
<output>

Or give me death

</output>
</taco-surprise>
How to add semantics
Attributes
ARIA and Tab Index
<taco-button role="button" tabIndex="0">tacos!</taco-button>
<pork-slider role="slider" aria-valuemin="1" aria-valuemax="5"
aria-valuenow="0"></pork-slider>
The Ultimate Web Component
Give me tacos


API¶
-
merpy.
get_entities
(text, lexicon)¶ Get entities mention in a text
Parameters: - text (string) – Text to be processed
- lexicon (string) – Lexicon used to get the entities
Returns: list of entities with index and ontology concept
Return type: list
Example: >>> import merpy >>> merpy.download_lexicons() >>> document = 'Influenza, commonly known as "the flu", is an infectious disease caused by an influenza virus. Symptoms can be mild to severe. The most common symptoms include: a high fever, runny nose, sore throat, muscle pains, headache, coughing, and feeling tired' >>> merpy.get_entities(document, "hp") [['111', '115', 'mild', 'http://purl.obolibrary.org/obo/HP_0012825'], ['200', '206', 'muscle', 'http://purl.obolibrary.org/obo/UBERON_0005090'], ['246', '251', 'tired', 'http://purl.obolibrary.org/obo/HP_0012378']]
-
merpy.
get_similarities
(entities, database)¶ Get the most similar term and its similarity within a list of recognized entities
Parameters: - entities (list) – entities recognized by get_entities
- database (string) –
filename with db file containing the DiShIn database to use, for example: chebi.db
wget http://labs.rd.ciencias.ulisboa.pt/dishin/chebi202302.db.gz; gunzip -N chebi202302.db.gz
Returns: list of entities including for each entity the similarity value of the most similar entity (excluding itself)
Return type: list
Example: >>> import merpy >>> import ssmpy >>> merpy.process_lexicon("lexicon") >>> document = "α-maltose and nicotinic acid was found, but not nicotinic acid D-ribonucleotide" >>> entities = merpy.get_entities(document, "lexicon") >>> merpy.get_similarities(entities, 'chebi.db') [['0', '9', 'α-maltose', 'http://purl.obolibrary.org/obo/CHEBI_18167', 0.02834388514184269], ['14', '28', 'nicotinic acid', 'http://purl.obolibrary.org/obo/CHEBI_15940', 0.07402224403263755], ['48', '62', 'nicotinic acid', 'http://purl.obolibrary.org/obo/CHEBI_15940', 0.07402224403263755], ['48', '79', 'nicotinic acid D-ribonucleotide', 'http://purl.obolibrary.org/obo/CHEBI_15763', 0.07402224403263755]]
-
merpy.
process_lexicon
(lexicon, ltype='txt')¶ Preprocess (/generate/load) lexicon, generating index files
Input can be a file with one entity per line or an OWL ontology
Parameters: - lexicon (string) – name of previously downloaded lexicon to be used
- ltype (string) – lexicon type (txt, owl, or rdf)
Example: >>> import merpy >>> merpy.download_lexicons() >>> merpy.process_lexicon("hp", "txt") >>> merpy.download_lexicon("https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl", "metals", "owl") wrote metals lexicon >>> merpy.process_lexicon("metals", "owl") >>> merpy.get_entities("gold silver metal", "metals") [['0', '4', 'gold', 'https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl#gold'], ['5', '11', 'silver', 'https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl#silver'], ['12', '17', 'metal', 'https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl#metal']]
-
merpy.
show_lexicons
()¶ Print lexicon list
Example: >>> import merpy >>> merpy.show_lexicons() lexicons preloaded: [...] lexicons loaded ready to use: [...] lexicons with linked concepts: [...]
-
merpy.
get_lexicons
()¶ Returns list of all lexicons in data directory, as well as pre-processed (loaded) lexicons and lexicons with links file
Returns: lists of all lexicons, loaded lexicons and lexicons with entity linking Return type: list Example: >>> import merpy >>> merpy.get_lexicons() ([...], [...], [...])
-
merpy.
download_lexicon
(url, name, ltype='txt')¶ Download lexicon from external resource
Parameters: - url (string) – URL to download lexicon
- name (string) – name of lexicon
- format – format of lexicon file (txt, owl or rdf)
Example: >>> import merpy >>> merpy.download_lexicon("https://github.com/lasigeBioTM/MER/raw/biocreative2017/data/ChEBI.txt", "chebi_txt", 'txt') wrote chebi_txt lexicon >>> merpy.process_lexicon("chebi_txt", "txt") >>> merpy.get_entities("caffeine", "chebi_txt") [['0', '8', 'caffeine']] >>> merpy.download_lexicon("http://purl.obolibrary.org/obo/chebi/chebi_lite.owl", 'chebi_lite', 'owl') wrote chebi_lite lexicon >>> merpy.process_lexicon("chebi_lite", "owl") >>> merpy.get_entities("caffeine", "chebi_lite") [['0', '8', 'caffeine', 'http://purl.obolibrary.org/obo/CHEBI_27732']]
-
merpy.
create_mappings
(mapped_entities, name)¶ Create links file to entity linking/mapping.
You must also create a lexicon using create_lexicon function
Parameters: - mapped_entities (dict) – dictionary mapping each entity to one or more concepts
- name (string) – name of lexicon
Example: >>> import merpy >>> mappings = {"gold": 1, "silver": 2, "metal": [3,4]} >>> create_lexicon(mappings.keys(), "metals") wrote metals lexicon >>> create_mappings(mappings, "metals") wrote metals mappings >>> merpy.process_lexicon("metals") >>> merpy.get_entities("gold and silver are metals", "metals") [['0', '4', 'gold', '1'], ['9', '15', 'silver', '2']]
-
merpy.
create_lexicon
(entities, name)¶ Create lexicon from list of entities
Parameters: - entities (list) – list of entities
- name (string) – name of lexicon
Example: >>> import merpy >>> merpy.create_lexicon(["gene1", "gene2", "gene3"], "genelist") wrote genelist lexicon >>> merpy.process_lexicon("genelist") >>> merpy.get_entities("gene1 and gene2", "genelist") [['0', '5', 'gene1'], ['10', '15', 'gene2']]
-
merpy.
download_mer
()¶ Download latest version of MER from GitHub.
Example: >>> import merpy >>> merpy.download_mer()
-
merpy.
download_lexicons
(download_link='http://labs.rd.ciencias.ulisboa.pt/mer/data/lexicons202302.tgz')¶ Download preprocessed lexicons
Parameters: link (string) – link with tar file containing preprocessed lexicons Example: >>> import merpy >>> merpy.download_lexicons() >>> document = 'Influenza, commonly known as "the flu", is an infectious disease caused by an influenza virus. Symptoms can be mild to severe. The most common symptoms include: a high fever, runny nose, sore throat, muscle pains, headache, coughing, and feeling tired' >>> merpy.get_entities(document, "hp") [['111', '115', 'mild', 'http://purl.obolibrary.org/obo/HP_0012825'], ['200', '206', 'muscle', 'http://purl.obolibrary.org/obo/UBERON_0005090'], ['246', '251', 'tired', 'http://purl.obolibrary.org/obo/HP_0012378']]
-
merpy.
get_entities_mp
(documents, lexicon, n_cores=4)¶ Get entities for multiple documents using multiprocessing
Parameters: - documents (dict) – dictionary mapping one key to each document text
- lexicon (string) – Lexicon used to get the entities
- n_cores (int) – number of cores
Returns: dictionary mapping doc IDs to entity lists
Return type: dict
Examples: >>> import merpy >>> merpy.download_lexicons() >>> doc_text = 'Influenza, commonly known as "the flu", is an infectious disease caused by an influenza virus. Symptoms can be mild to severe. The most common symptoms include: a high fever, runny nose, sore throat, muscle pains, headache, coughing, and feeling tired' >>> docs = {i:doc_text for i in range(10)} >>> entities = merpy.get_entities_mp(docs, "hp") >>> print(len(entities)) 10
-
merpy.
create_lexicon_from_file
(filename, name, links_file=None)¶ Create a lexicon based on an existing file. The file is simply copied to the datadir.
Parameters: - filename – file with list of entities
- name (string) – name of lexicon
- links_file (string) – path to links file or None (labels must be in lowercase)
Example: >>> import merpy >>> with open("genelist", 'w') as f: ... f.write("\n".join(["Gene1", "Gene2", "Gene3"])) >>> with open("genelist_links", 'w') as g: ... g.write("\n".join(["gene1\tID1", "gene2\tID2", "gene3\tID3"])) >>> merpy.create_lexicon_from_file("genelist", "genelist", "genelist_links") copied genelist lexicon >>> merpy.process_lexicon("genelist") >>> merpy.get_entities("gene1 and gene2", "genelist") [['0', '5', 'gene1', 'ID1'], ['10', '15', 'gene2', 'ID2']]
-
merpy.
delete_lexicon
(name, delete_lexicon=False)¶ Delete preprocessed files of a lexicon
Parameters: - name (Boolean) – name of lexicon
- delete_lexicon – delete lexicon txt or owl file too
Example: >>> import merpy >>> merpy.create_lexicon(["gene1", "gene2", "gene3"], "genelist") wrote genelist lexicon >>> merpy.delete_lexicon("genelist") deleted genelist lexicon
-
merpy.
merge_processed_lexicons
(lexicon_list, new_name)¶ Merge various processed lexicons into one
Parameters: - lexicon_list – list of lexicon names to be merged
- new_name (string) – name of new lexicon
Example: >>> import merpy >>> merpy.download_lexicons() >>> merpy.merge_processed_lexicons(["chebi_lite", "hp", "go"], "chebihpgo") merged chebi_lite hp go into chebihpgo >>> merpy.get_entities("autism caffeine gene expression", "chebihpgo") [['0', '6', 'autism', 'http://purl.obolibrary.org/obo/HP_0000717'], ['7', '15', 'caffeine', 'http://purl.obolibrary.org/obo/CHEBI_27732'], ['16', '20', 'gene', 'http://purl.obolibrary.org/obo/SO_0000704'], ['16', '31', 'gene expression', 'http://purl.obolibrary.org/obo/GO_0010467']]
-
merpy.
delete_entity
(entity_text, lexicon)¶ Delete entity from lexicon if one word delete from word1, if 2 words delete from word2, if more delete from words.txt
Parameters: - entity_text (string or list) – label or list of labels of the entities to delete
- lexicon (string) – lexicon where the entity should be deleted from
Example: >>> import merpy >>> merpy.download_lexicon("https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl", "metals", "owl") wrote metals lexicon >>> merpy.process_lexicon("metals", "owl") >>> merpy.get_entities("gold silver metal", "metals") [['0', '4', 'gold', 'https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl#gold'], ['5', '11', 'silver', 'https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl#silver'], ['12', '17', 'metal', 'https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl#metal']] >>> merpy.delete_entity("metal", "metals") >>> merpy.get_entities("gold silver metal", "metals") [['0', '4', 'gold', 'https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl#gold'], ['5', '11', 'silver', 'https://raw.githubusercontent.com/lasigeBioTM/ssm/master/metals.owl#silver']]
-
merpy.
delete_entity_by_uri
(entity_uri, lexicon)¶ Delete entity or list of entities
Parameters: - entity_uri – label or list of labels of the entities to delete
- lexicon (string) – lexicon where the entities should be deleted from
See delete_obsolete for an example
-
merpy.
delete_obsolete
(lexicon)¶ Remove obsolete concepts
Parameters: lexicon (string) – lexicon to remove obsolete concepts Example: >>> import merpy >>> mappings = {"obsolete gold": 1, "silver": 2, "gold": 1} >>> create_lexicon(mappings.keys(), "metals") wrote metals lexicon >>> create_mappings(mappings, "metals") wrote metals mappings >>> merpy.process_lexicon("metals") >>> merpy.get_entities("gold and silver are metals", "metals") [['0', '4', 'gold', '1'], ['9', '15', 'silver', '2']] >>> merpy.delete_obsolete("metals") >>> merpy.get_entities("gold and silver are metals", "metals") [['9', '15', 'silver', '2']]
-
merpy.
rename_lexicon
(name, new_name)¶ Rename preprocessed files of a lexicon
Parameters: - name (string) – old name of lexicon
- new_name – new name of lexicon
Example: >>> import merpy >>> merpy.create_lexicon(["gene1", "gene2", "gene3"], "genelist") wrote genelist lexicon >>> merpy.create_lexicon(["gene1", "gene2", "gene3"], "genelists") wrote genelists lexicon >>> merpy.rename_lexicon("genelist", "genes") renamed genelist lexicon to genes >>> "genelists" in merpy.get_lexicons()[0] True >>> "genelist" not in merpy.get_lexicons()[0] True >>> "genes" in merpy.get_lexicons()[0] True


The Editor and Outliner are a matched pair of views in the IDE.
The screen shot above illustrates many of the editor's features:
Action Function [F1] Displays appropriate help topics [Ctrl]-Space Displays a list of matching keywords for any characters to the left of the cursor ( Displays a description and the parameters for the Amzi! system predicates to the left of the left parenthesis Double-Click in Left Margin Adds or clears a breakpoint Right-Click in Left Margin Allows the managing of breakpoints, task markers and bookmarks Right-Click in Editor Displays menu of common editing functions Put Mouse Cursor Over a Predicate Displays a description and the parameters for Amzi! system predicates File | Save Updates the outline and checks for syntax errors Edit Menu Provides standard editing functions for cutting, copying, pasting, finding and replacing text Navigate Menu Go to a line or the last edit Search Menu Search for text or patterns across multiple files or the entire workspace and highlights their locations in the right margin for each open file Window | Preferences | Prolog Set the preferences for colors Switch between having the editor to display the entire file or only the text highlighted by clicking on a predicate in the outliner
Text files are saved the default format for your operating system and locale. For example,Windows users in North America, the default is ANSI Codepage 1252 which is a 255 character set. Amzi! Prolog can process source code files in 8-bit (ASCII or multi-byte) or 16-bit Unicode format.
To change the format of a file select Edit | Encoding. For example, to look at the source files in the Prolog Babel sample, you will need to select Edit | Encoding | Unicode after opening one of them.
The outline (see above) is created when a Prolog source file is opened or saved. By default the predicates are shown in the order they appear in the file. To sort them in alphabetical order:
If there are any syntax errors in the source file, they will be displayed in the Tasks View (by default at the lower right). Errors may cause the outliner to omit the predicate where the error occurs.
Clicking on the Error in the Tasks View will jump to the location in the associate source file.
To control the colors, tab size and other editor options select Window | Preferences then click on Prolog.
The Prolog Editor preferences are:
Tab Width How many spaces wide a tab is Print Margin Column The width of the paper for your printer Show Overview Ruler Controls display of the right margin area that provides quick links for error, to-do, bookmark and search markers Show Line Numbers Displays line numbers to the left of each line Highlight Current Line Highlights the entire line where the cursor is located Show Print Margin Displays a line at the print margin column Colors Controls the colors of the text and highlights Background Color Sets the background color for the editor
If you have the Overview Ruler enabled, the Annotations Tab of the preferences let's you control which items are displayed in the ruler and the color of each one.


--- layout: default robots: noindex ---
I am pursuing Masters in Data Science from Northeastern University, Boston and currently working as a Research Assistant at Khoury College of Computer Science, NEU.
My courses at Northeastern include Linear Algebra & Probability, Statistics, Data Mining & Warehousing, Information Retrieval, Machine Learning and NLP.
I have six years of industry experience working for IBM, Accenture, and Bridgei2i Analytics Solutions in multiple domains (finance, telecom, insurance, product and technology).
During these years, I have majorly worked in python, building data pipelines, creating and automating cloud infrastructure, and deploying machine learning models. My area of interest lies in Machine Learning and NLP.
In my leisure time, I love going on hikes and playing badminton and chess.
Masters in Data Science: Northeastern University, Boston, MA, Expected - Dec, 2021
Bachelors in Computer Science: Rajasthan Technical University, India, Honours, 2012
Programming: Python, Shell, SQL, R, Terraform, Numpy, Pandas, Scikit-Learn
Technologies: Machine Learning, Hadoop Ecosystem, Spark, Kafka, Hive, Cloud (AWS), Docker, Jenkins, Elastic Search, PyTorch, Tensorflow
Machine Learning Concepts: Regression (Linear, Logistic), Regularization, Decision Trees, Boosting, Bagging (Random Forest), SVM, Naive Bayes, CNN, RNN, NLP


They had done it, they had done it at last!
The room they were standing in was long-shaped and softly lit. The telescreen was dimmed to a low murmur; the richness of the dark-blue carpet gave one the impression of treading on velvet丝绒；立绒；经绒；天鹅绒 a type of cloth made from silk, cotton or nylon , with a thick soft surface. At the far end of the room O'Brien was sitting at a table under a green-shaded lamp, with a mass of papers on either side of him. He had not bothered to look up when the servant showed Julia and Winston in.
Winston's heart was thumping so hard that he doubted whether he would be able to speak. They had done it, they had done it at last, was all he could think. It had been a rash act to come here at all, and sheer folly to arrive together; though it was true that they had come by different routes and only met on O'Brien's doorstep.  It was only on very rare occasions that one saw inside the dwelling-places of the Inner Party, or even penetrated into the quarter of the town where they lived. The whole atmosphere of the huge block of flats, the richness and spaciousness of everything, the unfamiliar smells of good food and good tobacco, the silent and incredibly rapid lifts sliding up and down, the white-jacketed servants hurrying to and fro—everything was intimidating. Although he had a good pretext for coming here, he was haunted心神不宁 showing that sb is very worried at every step by the fear that a black-uniformed guard would suddenly appear from round the corner, demand his papers, and order him to get out. O'Brien's servant, however, had admitted the two of them without demur表示反对；提出异议；拒绝 to say that you do not agree with sth or that you refuse to do sth. He was a small, dark-haired man in a white jacket, with a diamond-shaped, completely expressionless face which might have been that of a Chinese. The passage down which he led them was softly carpeted, with cream-papered walls and white wainscoting装有护壁板的墙壁, all exquisitely精致地 clean. That too was intimidating. Winston could not remember ever to have seen a passageway whose walls were not grimy沾满污垢的；满是灰尘的covered with dirt from the contact of human bodies.
O'Brien had a slip of paper between his fingers and seemed to be studying it intently. His heavy face, bent down so that one could see the line of the nose, looked both formidable and intelligent. For perhaps twenty seconds he sat without stirring. Then he pulled the speakwrite towards him and rapped突然大声说出；突然厉声说出to say sth suddenly and quickly in a loud, angry way out a message in the hybrid jargon of the Ministries:
'Items one comma five comma seven approved fullwise stop suggestion contained item six doubleplus ridiculous verging crimethink cancel stop unproceed constructionwise antegetting plusfull estimates machinery overheads stop end message.'
He rose deliberately from his chair and came towards them across the soundless carpet. A little of the official atmosphere seemed to have fallen away from him with the Newspeak words, but his expression was grimmer than usual, as though he were not pleased at being disturbed. The terror that Winston already felt was suddenly shot through by a streak of ordinary embarrassment.  For what evidence had he in reality that O'Brien was any kind of political conspirator? Nothing but a flash of the eyes and a single equivocal remark: beyond that, only his own secret imaginings, founded on a dream. He could not even fall back on the pretence that he had come to borrow the dictionary, because in that case Julia's presence was impossible to explain. As O'Brien passed the telescreen a thought seemed to strike him. He stopped, turned aside and pressed a switch on the wall. There was a sharp snap. The voice had stopped.
Julia uttered a tiny sound, a sort of squeak短促而尖厉的叫声；吱吱声；尖叫声a short, high cry or sound, that is not usually very loud of surprise. Even in the midst of his panic, Winston was too much taken aback to be able to hold his tongue.
‘You can turn it off!' he said.
‘Yes,' said O'Brien, ‘we can turn it off. We have that privilege.'
He was opposite them now. His solid form towered over the pair of them, and the expression on his face was still indecipherable. He was waiting, somewhat sternly严厉的；苛刻的；要求别人服从的serious and often disapproving; expecting sb to obey you, for Winston to speak, but about what? Even now it was quite conceivable that he was simply a busy man wondering irritably why he had been interrupted. Nobody spoke. After the stopping of the telescreen the room seemed deadly silent. The seconds marched past, enormous. With difficulty Winston continued to keep his eyes fixed on O'Brien's. Then suddenly the grim face broke down into what might have been the beginnings of a smile. With his characteristic gesture O'Brien resettled his spectacles on his nose.
‘Shall I say it, or will you?' he said.
‘I will say it,' said Winston promptly. ‘That thing is really turned off?'
‘Yes, everything is turned off. We are alone.'
‘We have come here because——'
He paused, realizing for the first time the vagueness of his own motives. Since he did not in fact know what kind of help he expected from O'Brien, it was not easy to say why he had come here. He went on, conscious that what he was saying must sound both feeble无效的；缺乏决心的；无力的not effective; not showing determination or energy and pretentious:
‘We believe that there is some kind of conspiracy, some kind of secret organization working against the Party, and that you are involved in it. We want to join it and work for it. We are enemies of the Party. We disbelieve in the principles of Ingsoc. We are thought-criminals. We are also adulterers通奸者；奸夫a person who commits adultery. I tell you this because we want to put ourselves at your mercy. If you want us to incriminate使负罪；连累to make it seem as if sb has done sth wrong or illegal ourselves in any other way, we are ready.'
He stopped and glanced over his shoulder, with the feeling that the door had opened. Sure enough, the little yellow-faced servant had come in without knocking. Winston saw that he was carrying a tray盘；托盘；碟a flat piece of wood, metal or plastic with raised edges, used for carrying or holding things, especially food with a decanter雕花玻璃酒瓶a glass bottle, often decorated, that wine and other alcoholic drinks are poured into from an ordinary bottle before serving and glasses.
‘Martin is one of us,' said O'Brien impassively无表情的；无动于衷的；不动声色的 not showing any feeling or emotion. ‘Bring the drinks over here, Martin. Put them on the round table. Have we enough chairs? Then we may as well sit down and talk in comfort. Bring a chair for yourself, Martin. This is business. You can stop being a servant for the next ten minutes.'
The little man sat down, quite at his ease, and yet still with a servant-like air, the air of a valet（照管男子衣食等的）贴身仆人，仆从a man's personal servant who takes care of his clothes, serves his meals, etc. enjoying a privilege. Winston regarded（尤指以某种方式）注视，凝视to look at sb/sth, especially in a particular way him out of the corner of his eye. It struck him that the man's whole life was playing a part, and that he felt it to be dangerous to drop his assumed personality even for a moment. O'Brien took the decanter by the neck and filled up the glasses with a dark-red liquid. It aroused in Winston dim memories of something seen long ago on a wall or a hoarding大幅广告牌a large board on the outside of a building or at the side of the road, used for putting advertisements on—a vast bottle composed of electric lights which seemed to move up and down and pour its contents into a glass. Seen from the top the stuff looked almost black, but in the decanter it gleamed like a ruby. It had a sour-sweet smell. He saw Julia pick up her glass and sniff at it with frank curiosity.
‘It is called wine,' said O'Brien with a faint smile. ‘You will have read about it in books, no doubt. Not much of it gets to the Outer Party, I am afraid.' His face grew solemn again, and he raised his glass: ‘I think it is fitting that we should begin by drinking a health. To our Leader: To Emmanuel Goldstein.'
Winston took up his glass with a certain eagerness. Wine was a thing he had read and dreamed about. Like the glass paperweight or Mr Charrington's half-remembered rhymes, it belonged to the vanished, romantic past, the olden time as he liked to call it in his secret thoughts. For some reason he had always thought of wine as having an intensely sweet taste, like that of blackberry jam and an immediate intoxicating令人陶醉的；令人头脑迷糊的making you feel excited so that you cannot think clearly effect. Actually, when he came to swallow it, the stuff was distinctly disappointing. The truth was that after years of gin-drinking he could barely taste it. He set down the empty glass.
‘Then there is such a person as Goldstein?' he said.
‘Yes, there is such a person, and he is alive. Where, I do not know.'
‘And the conspiracy—the organization? Is it real? It is not simply an invention of the Thought Police?'
‘No, it is real. The Brotherhood, we call it. You will never learn much more about the Brotherhood than that it exists and that you belong to it. I will come back to that presently.' He looked at his wrist-watch. ‘It is unwise even for members of the Inner Party to turn off the telescreen for more than half an hour. You ought not to have come here together, and you will have to leave separately. You, comrade'—he bowed his head to Julia—'will leave first. We have about twenty minutes at our disposal. You will understand that I must start by asking you certain questions. In general terms, what are you prepared to do?'
‘Anything that we are capable of,' said Winston.
O'Brien had turned himself a little in his chair so that he was facing Winston. He almost ignored Julia, seeming to take it for granted that Winston could speak for her. For a moment the lids flitted down over his eyes. He began asking his questions in a low, expressionless voice, as though this were a routine, a sort of catechism（基督教的）教理问答a set of questions and answers that are used for teaching people about the beliefs of the Christian religion, most of whose answers were known to him already.

It appeared to Winston that a long time passed before he answered. For a moment he seemed even to have been deprived of the power of speech. His tongue worked soundlessly, forming the opening syllables first of one word, then of the other, over and over again. Until he had said it, he did not know which word he was going to say. ‘No,' he said finally.
‘You did well to tell me,' said O'Brien. ‘It is necessary for us to know everything.'
He turned himself toward Julia and added in a voice with somewhat more expression in it:
‘Do you understand that even if he survives, it may be as a different person? We may be obliged to give him a new identity. His face, his movements, the shape of his hands, the colour of his hair—even his voice would be different. And you yourself might have become a different person. Our surgeons can alter people beyond recognition. Sometimes it is necessary. Sometimes we even amputate（用外科手术）切断；截（肢）to cut off sb's arm, leg, finger or toe in a medical operation a limb.'
Winston could not help snatching抓紧时间做；乘机获得to take or get sth quickly, especially because you do not have much time another sidelong glance at Martin's Mongolian face. There were no scars that he could see.  She murmured something that seemed to be assent.
‘Good. Then that is settled.'
There was a silver box of cigarettes on the table. With a rather absent-minded air O'Brien pushed them towards the others, took one himself, then stood up and began to pace slowly to and fro, as though he could think better standing. They were very good cigarettes, very thick and well-packed, with an unfamiliar silkiness in the paper. O'Brien looked at his wrist-watch again.
‘You had better go back to your Pantry食品贮藏室；食品贮藏柜 a cupboard/closet or small room in a house, used for storing food, Martin,' he said. ‘I shall switch on in a quarter of an hour. Take a good look at these comrades' faces before you go. You will be seeing them again. I may not.'
Exactly as they had done at the front door, the little man's dark eyes flickered快速摆动；颤动；抖动；拍动to move with small quick movements over their faces. There was not a trace of friendliness in his manner. He was memorizing their appearance, but he felt no interest in them, or appeared to feel none. It occurred to Winston that a synthetic face was perhaps incapable of changing its expression. Without speaking or giving any kind of salutation招呼；致意；打招呼；致意的动作something that you say to welcome or say hello to sb; the action of welcoming or saying hello to sb, Martin went out, closing the door silently behind him. O'Brien was strolling up and down, one hand in the pocket of his black overalls, the other holding his cigarette.
‘You understand,' he said, ‘that you will be fighting in the dark. You will always be in the dark. You will receive orders and you will obey them, without knowing why. Later I shall send you a book from which you will learn the true nature of the society we live in, and the strategy by which we shall destroy it. When you have read the book, you will be full members of the Brotherhood. But between the general aims that we are fighting for and the immediate tasks of the moment, you will never know anything. I tell you that the Brotherhood exists, but I cannot tell you whether it numbers a hundred members, or ten million. From your personal knowledge you will never be able to say that it numbers even as many as a dozen. You will have three or four contacts, who will be renewed from time to time as they disappear. As this was your first contact, it will be preserved. When you receive orders, they will come from me. If we find it necessary to communicate with you, it will be through Martin. When you are finally caught, you will confess. That is unavoidable. But you will have very little to confess, other than your own actions. You will not be able to betray more than a handful of unimportant people. Probably you will not even betray me. By that time I may be dead, or I shall have become a different person, with a different face.'
He continued to move to and fro over the soft carpet. In spite of the bulkiness庞大 of his body there was a remarkable grace in his movements. It came out even in the gesture with which he thrust a hand into his pocket, or manipulated a cigarette. More even than of strength, he gave an impression of confidence and of an understanding tinged by irony. However much in earnest he might be, he had nothing of the single-mindedness that belongs to a fanatic极端分子；狂热信徒a person who holds extreme or dangerous opinions. When he spoke of murder, suicide, venereal disease, amputated limbs, and altered faces, it was with a faint air of persiflage取笑；插科打诨 comments and jokes in which people laugh at each other in a fairly unkind but not serious way. ‘This is unavoidable,' his voice seemed to say; ‘this is what we have got to do, unflinchingly不畏惧地；毫不畏缩地. But this is not what we shall be doing when life is worth living again.' A wave of admiration, almost of worship, flowed out from Winston towards O'Brien. For the moment he had forgotten the shadowy figure of Goldstein. When you looked at O'Brien's powerful shoulders and his blunt-featured face, so ugly and yet so civilized, it was impossible to believe that he could be defeated. There was no stratagem（为取胜或迷惑对手的）计策，计谋a trick or plan that you use to gain an advantage or to trick an opponent that he was not equal to, no danger that he could not foresee. Even Julia seemed to be impressed. She had let her cigarette go out and was listening intently. O'Brien went on:
‘You will have heard rumours of the existence of the Brotherhood. No doubt you have formed your own picture of it. You have imagined, probably, a huge underworld of conspirators, meeting secretly in cellars, scribbling messages on walls, recognizing one another by codewords or by special movements of the hand. Nothing of the kind exists. The members of the Brotherhood have no way of recognizing one another, and it is impossible for any one member to be aware of the identity of more than a few others. Goldstein himself, if he fell into the hands of the Thought Police, could not give them a complete list of members, or any information that would lead them to a complete list. No such list exists. The Brotherhood cannot be wiped out because it is not an organization in the ordinary sense. Nothing holds it together except an idea which is indestructible. You will never have anything to sustain you, except the idea. You will get no comradeship and no encouragement. When finally you are caught, you will get no help. We never help our members. At most, when it is absolutely necessary that someone should be silenced, we are occasionally able to smuggle a razor blade into a prisoner's cell. You will have to get used to living without results and without hope.  Those are the only results that you will ever see. There is no possibility that any perceptible change will happen within our own lifetime. We are the dead. Our only true life is in the future. We shall take part in it as handfuls of dust and splinters of bone. But how far away that future may be, there is no knowing. It might be a thousand years. At present nothing is possible except to extend the area of sanity little by little. We cannot act collectively. We can only spread our knowledge outwards from individual to individual, generation after generation. In the face of the Thought Police there is no other way.'
He halted and looked for the third time at his wrist-watch.
‘It is almost time for you to leave, comrade,' he said to Julia. ‘Wait. The decanter is still half full.'
He filled the glasses and raised his own glass by the stem.
‘What shall it be this time?' he said, still with the same faint suggestion of irony. ‘To the confusion of the Thought Police? To the death of Big Brother? To humanity? To the future?'
‘To the past,' said Winston.
‘The past is more important,' agreed O'Brien gravely.
They emptied their glasses, and a moment later Julia stood up to go. O'Brien took a small box from the top of a cabinet and handed her a flat white tablet which he told her to place on her tongue. It was important, he said, not to go out smelling of wine: the lift attendants were very observant善于观察的；观察力敏锐的 good at noticing things around you.  He took another pace or two up and down, then stopped.
‘There are details to be settled,' he said. ‘I assume that you have a hiding-place of some kind?'
Winston explained about the room over Mr Charrington's shop.
‘That will do for the moment. Later we will arrange something else for you. It is important to change one's hiding-place frequently. Meanwhile I shall send you a copy of THE BOOK'—even O'Brien, Winston noticed, seemed to pronounce the words as though they were in italics—'Goldstein's book, you understand, as soon as possible. It may be some days before I can get hold of one. There are not many in existence, as you can imagine. The Thought Police hunt them down and destroy them almost as fast as we can produce them. It makes very little difference. The book is indestructible. If the last copy were gone, we could reproduce it almost word for word. Do you carry a brief-case to work with you?' he added.
‘As a rule, yes.'
‘What is it like?'
‘Black, very shabby. With two straps.'
‘Black, two straps, very shabby—good. One day in the fairly near future—I cannot give a date—one of the messages among your morning's work will contain a misprinted word, and you will have to ask for a repeat. On the following day you will go to work without your brief-case. At some time during the day, in the street, a man will touch you on the arm and say ‘I think you have dropped your brief-case.' The one he gives you will contain a copy of Goldstein's book. You will return it within fourteen days.'
They were silent for a moment.
‘There are a couple of minutes before you need go,' said O'Brien. ‘We shall meet again—if we do meet again——'
Winston looked up at him. ‘In the place where there is no darkness?' he said hesitantly.
O'Brien nodded without appearance of surprise. ‘In the place where there is no darkness,' he said, as though he had recognized the allusion. ‘And in the meantime, is there anything that you wish to say before you leave? Any message? Any question?.'
Winston thought. There did not seem to be any further question that he wanted to ask: still less did he feel any impulse to utter high-sounding generalities.  Almost at random he said:
‘Did you ever happen to hear an old rhyme that begins ‘Oranges and lemons, say the bells of St Clement's'?'
Again O'Brien nodded. With a sort of grave courtesy he completed the stanza:
'Oranges and lemons, say the bells of St Clement's, You owe me three farthings, say the bells of St Martin's, When will you pay me? say the bells of Old Bailey, When I grow rich, say the bells of Shoreditch.'
‘You knew the last line!' said Winston.
‘Yes, I knew the last line. And now, I am afraid, it is time for you to go. But wait. You had better let me give you one of these tablets.'
As Winston stood up O'Brien held out a hand. His powerful grip crushed the bones of Winston's palm. At the door Winston looked back, but O'Brien seemed already to be in process of putting him out of mind. He was waiting with his hand on the switch that controlled the telescreen. Beyond him Winston could see the writing-table with its green-shaded lamp and the speakwrite and the wire baskets deep-laden with papers. The incident was closed. Within thirty seconds, it occurred to him, O'Brien would be back at his interrupted and important work on behalf of the Party.


Deploy for free with no credit card required.
Make your site or web-app many times faster by bringing it closer to your users. Instead of a single server, push to a global network of intelligent CDN nodes that also handle asset fingerprinting, automatic caching headers, and smart redirect & rewrite rules.
Get Started with NetlifySecure your site or app with our true 1-click SSL setup. Netlify integrates with Let's Encrypt and automatically provisions, distributes and renews your certificate. HTTPS is free on all plans and HTTP2 enabled.
Get Started with NetlifyIntegrate your site or web-app to GitHub, GitLab or BitBucket and run your build tool on our servers. Automatically rebuild your site every time your content changes: trigger builds by pushing to git or via webhooks.
Get Started with NetlifyUse our intelligent rewrite and proxy rules to transition gradually from a traditional dynamic site to a modern build tool. Let our advanced CDN logic proxy any request that's not in your build to your legacy site.
Get Started with NetlifyWhether you have a simple blog with 10 hits per day or a multilingual global ecommerce site with 10,000+ pages and 3 million hits per hour, netlify automatically scales with ease to suit your exact needs.
Get Started with NetlifySolve your SEO issues for a single page app, and automatically send the proper social meta tags to Facebook. Activate pre-rendering with 1 click and any crawler request on our cluster of headless browsers will be prerendered.
Get Started with NetlifyWith atomic deploys, your site is always pushed to netlify's CDN in its complete, updated state. No need to worry about missing assets or broken links and connections. Your newest version is immediately available everywhere.
 No waiting for cache purges, no cumbersome varnish setup, no API calls to clean your distribution. Netlify handles cache purges within an average of 250ms from your deploy!
Get Started with NetlifyView and download every deploy youve ever made and instantly roll back your site to an earlier version. Undo any mistake or change at the push of a button, no setup required.
Get Started with NetlifyNetlify's command line tool might be your new best friend. Push any folder with a single command, set-up continuous deployment and access any netlify feature straight from your terminal.
Get Started with NetlifyAll of netlify's features are available through our REST API. Create your own automated workflows, build tools on top of netlify, trigger actions via webhooks or integrate netlify into your publishing products.
Get Started with NetlifySet up password protection for your staging sites or share a quick prototype with your client with a 1-click password setup. Need more than just a password? Then set up HTTP basic auth for any path in your site.
Get Started with NetlifyMake your site or web-app many times faster by bringing it closer to your users. Instead of a single server, push to a global network of intelligent CDN nodes that also handle asset fingerprinting, automatic caching headers, and smart redirect & rewrite rules.
Secure your site or app with our true 1-click SSL setup. Netlify integrates with Let's Encrypt and automatically provisions, distributes and renews your certificate. HTTPS is free on all plans and HTTP2 enabled.
Integrate your site or web-app to GitHub, GitLab or BitBucket and run your build tool on our servers. Automatically rebuild your site every time your content changes: trigger builds by pushing to git or via webhooks.
Use our intelligent rewrite and proxy rules to transition gradually from a traditional dynamic site to a modern build tool. Let our advanced CDN logic proxy any request that's not in your build to your legacy site.
Whether you have a simple blog with 10 hits per day or a multilingual global ecommerce site with 10,000+ pages and 3 million hits per hour, netlify automatically scales with ease to suit your exact needs.
Solve your SEO issues for a single page app, and automatically send the proper social meta tags to Facebook. Activate pre-rendering with 1 click and any crawler request on our cluster of headless browsers will be prerendered.
With atomic deploys, your site is always pushed to netlify's CDN in its complete, updated state. No need to worry about missing assets or broken links and connections. Your newest version is immediately available everywhere.
When your changes go live, they go live. No waiting for cache purges, no cumbersome varnish setup, no API calls to clean your distribution. Netlify handles cache purges within an average of 250ms from your deploy!
View and download every deploy youve ever made and instantly roll back your site to an earlier version. Undo any mistake or change at the push of a button, no setup required.
Netlify's command line tool might be your new best friend. Push any folder with a single command, set-up continuous deployment and access any netlify feature straight from your terminal.
All of netlify's features are available through our REST API. Create your own automated workflows, build tools on top of netlify, trigger actions via webhooks or integrate netlify into your publishing products.
Set up password protection for your staging sites or share a quick prototype with your client with a 1-click password setup. Need more than just a password? Then set up HTTP basic auth for any path in your site.
"Netlify has everything you need to make a high performance site or web-app. You just push your code."
Tom Preston-Werner, Founder of GitHub & Creator of Jekyll


Source
The GrapheneOS sources are hosted in the GrapheneOS organization on GitHub. Since there are many repositories, this page aims to provide a guide for it. See the reporting issues section on the contact page for an comparable overview of where issues should be filed.
- Manifest for OS repositories
- Website repository
- Update server repository
- Utilities for setting up conservative non-leaf TLS pinning with backup pins
- Scripting for generating branding
The operating system source tree includes hundreds of repositories. Many of these are only used for debugging, testing or development and are not actually part of what gets used for building a production release. The manifest repository references all of these. Most of these are used unmodified from the Android Open Source Project (AOSP). A few dozen of the repositories including most of the core OS are either forked from AOSP or are unique to GrapheneOS. The operating system has a unified build system, but some components like Chromium are too complex to fit into it so they're included as prebuilts instead of porting them to the AOSP build system. This is also done for developer convenience and bootstrapping, to avoid needing to build all the native / cross-compilation toolchains for each host and target platform combination, etc. The prebuilts can all be built from source if desired. The build instructions will be expanded to cover all of this in the future.
Chromium needs to be included in the GrapheneOS source tree as a prebuilt before building. The GrapheneOS build metadata and patches are in the Vanadium repository. See the GrapheneOS building instructions for more details.
See https://attestation.app/source for the Auditor and AttestationServer sources. The latest release of the Auditor app is included in the GrapheneOS source tree as a prebuilt since it uses a different build system, similar to other prebuilts like Chromium.


4DCu.be
a blog about programming, gaming, technology, ...
-
Building a Mechanical Keyboard
While I was vaguely aware there were some strange, expensive, small keyboards around I never bothered to find out what these were about. Until a colleague of mine showed up with one at work. After talking a bit about it with her and gathering more information building one seemed like...
-
DeckLock part 2: Magic the Gathering
DeckLock, a static-website generator to generate overviews of KeyForge decks, will be expanded to support Magic: the Gathering. To find more about DeckLock and how it is designed look at the previous post. Magic: the Gathering is a very different game compared to KeyForge. There is a large pool of...
-
DeckLock: keep track of your card games
Currently I’ve been playing KeyForge and Gwent. One of my first posts was about Magic: the Gathering and my 3D printed dice and token boxes also made an appearance on this blog. So it is no secret I like card games, and my collection of decks both on- and off-line...
-
Improving blogs with custom Jekyll Plugins
This blog is built using Jekyll, which can be used to generate a static website based on a set of templates (for the layout) and markdown files (for the content). The main advantage is that GitHub pages can be leveraged to host those static pages for free. However, while there...
-
3D Printing Tips & Tricks
3D Printing can be tricky if you don’t have the right settings for your machine and material. Here are some tips & tricks I’ve picked up since buying a Creality CR10S. With some minor tweaks to the printer and the standard Cura profile some great results can be achieved. Update...
-
Minimalist Art Using a Genetic Algorithm
While the genetic algorithm in the previous post worked very well, it didn’t quite produce the style of minimalist artwork I was trying to achieve. Furthermore, it didn’t allow the chromosomes to evolve using duplication and deletion of existing genes (which is very common in biology). So after mulling over...
-
Genetic Art Algorithm
Genetic algorithms are fun, they require a different way of thinking. Here I’ll guide you through my process of building an algorithm that evolves 150 random triangles into a famous piece of art. The work I picked to re-draw: Van Gogh’s The Starry Night. The original and the version the...


Main Concepts
Practical Work 7 - Pipes
Let's work on the books page to manage the pagination and filtering books
with help of pipes
-
On the form, use the ngModel directive to bind the input / select fields with some attributes in your Books
component
-
Have a look at the existing FilterFieldPipe which is usefull to filter objects by field name:
-
Its input is an array of objects
-
It's waiting for 2 arguments: the field name on which it will filter and the value to filter
-
Its output is the input filtered by the field and value specified
- Use FilterFieldPipe to filter your books by name
-
-
Let's need to store the number of books filtered by name (which is so the total number of books if the name field is not used).
To do so, we choose to create a filter, which takes an array of books as input, returns the same array of books, and just store
the number of books in a service
-
-
So implement the UpdateDataPipeFilter and DataContainerService to store the data and use it in the template
-
Have a look at the OrderByPipe pipe we will use to sort objects by field name:
-
Its input is an array of object
-
It's waiting for 2 argument: the field used to make the sort and a boolean to optionally reverse the sort order
-
Its output is the sorted array of objects
-
Use this filter to implement the "order by" functionality
-
Add the KPagination component in your page to add the pagination feature:
-
<kpagination
(pageChange)="yourMethod($event)"
[startPage]="yourStartPage"
[totalNbItems]="totalNumberOfItems"
[nbItemsPerPage]="numberOfItemsPerPage"
></kpagination>
-
startPage specify ... the start page
-
totalNbItems the total number of items
(in your case, it's the number of books eventually filtered by name that we have stored previously...)
-
nbItemsPerPage the number of items per page
-
Based on the page number, complete your previous filters with the existing slice filter in order
to display only the elements needed for your page
-
As an example of what should happen:
-
[{name:'abc'} , {name:'bcd'}, {name:'cde'}, {name:'def'}]
-
filter by name with 'c':
[{name:'abc'} , {name:'bcd'}, {name:'cde'}]
-
sort by name and reversed
[{name:'cde'}, {name:'bcd'}, {name:'abc'}]
-
With 1 element per page to display the seconde page ( => slice:1:2 )
[{name:'bcd'}]


Author: @Create
Development Tools
No training required but does require a manual tap interaction step to use.
Classification is done by passing a dictionary containing a base64 encoded PNG Image.
{
"Architecture": "Image Classifier",
"Image": "iVBORw0K..."
}
Training the Perceptron is done by passing a dictionary describing the inputs, hidden layer, and outputs.
Training data is a \n separated list of the form [inputs,...]=>[output]
{
"Name": "XOR",
"Architecture": "Perceptron",
"Inputs": 2,
"Hidden": [2],
"Outputs": 1,
"Training Data": "[0,1]=>[1]\n[1,0]=>[1]\n[1,1]=>[0]\n[0,0]=>[0]",
"Error": 0.0001,
"Iterations": 50000
}
Inference is done by passing a dictionary with Inputs provided as [inputs,...]
{
"Name":"XOR",
"Architecture":"Perceptron",
"Inputs":"[0,0]"
}
Training the Hopfield network is done by passing a dictionary describing the inputs binary sequences and bit-length of the network.
{
"Name":"10-Bit Example",
"Architecture":"Hopfield",
"Bit Length":10,
"Training Data":[
"[0, 1, 0, 1, 0, 1, 0, 1, 0, 1]",
"[1, 1, 1, 1, 1, 0, 0, 0, 0, 0]"
]}
Feeding the hopfield is done by passing a dictionary with Inputs provided as [input,...]
{
"Name":"10-Bit Example",
"Architecture":"Hopfield",
"Inputs":"[0,1,0,1,0,1,0,1,1,1]"
}
Perceptron & Hopfield Based on Synaptic
Image Classifier Based on ml5.js
Supports


Welcome to variable fonts
Each piece is part of a greater whole and should contribute positively to the system at scale. There should be no isolated features or outliers.
We’re focused when it comes to both design and functionality. Our work should speak boldly and clearly to this focus.
Design should reinforce the meaning of content, not distract from it. We prioritize worthwhile communication over decoration. If an aspect of the design doesn’t enhance the content, we should remove it.
Our use of motion breathes life into our products, and allows us to communicate with users in easily understood ways.
We create sites to welcome the widest possible audience, free of obstacles. Be mindful of the broad range of human abilities and disabilities, as well as the variety of devices, browsers, and networks people use to access our sites.


The disastrous impact of recent hurricanes, Harvey and Irma, generated a large influx of data within the online community. I was curious about the history of hurricanes and tropical storms so I found a data set on data.world and started some basic Exploratory data analysis (EDA).
EDA is crucial to starting any project. Through EDA you can start to identify errors & inconsistencies in your data, find interesting patterns, see correlations and start to develop hypotheses to test. For most people, basic spreadsheets and charts are handy and provide a great place to start. They are an easy-to-use method to manipulate and visualize your data quickly. Data scientists may cringe at the idea of using a graphical user interface (GUI) to kick-off the EDA process but those tools are very effective and efficient when used properly. However, if you're reading this, you're probably trying to take EDA to the next level. The best way to learn is to get your hands dirty, let's get started.
The original source of the data was can be found at DHS.gov.
| FID | YEAR | MONTH | DAY | AD_TIME | BTID | NAME | LAT | LONG | WIND_KTS | PRESSURE | CAT | BASIN | Shape_Leng |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 | 1957 | 8 | 8 | 1800Z | 63 | NOTNAMED | 22.5 | -140.0 | 50 | 0 | TS | Eastern Pacific | 1.140175 |
| 2002 | 1961 | 10 | 3 | 1200Z | 116 | PAULINE | 22.1 | -140.2 | 45 | 0 | TS | Eastern Pacific | 1.166190 |
| 2003 | 1962 | 8 | 29 | 0600Z | 124 | C | 18.0 | -140.0 | 45 | 0 | TS | Eastern Pacific | 2.102380 |
| 2004 | 1967 | 7 | 14 | 0600Z | 168 | DENISE | 16.6 | -139.5 | 45 | 0 | TS | Eastern Pacific | 2.121320 |
| 2005 | 1972 | 8 | 16 | 1200Z | 251 | DIANA | 18.5 | -139.8 | 70 | 0 | H1 | Eastern Pacific | 1.702939 |
| 2006 | 1976 | 7 | 22 | 0000Z | 312 | DIANA | 18.6 | -139.8 | 30 | 0 | TD | Eastern Pacific | 1.600000 |
Fortunately, this is a tidy data set which will make life easier and appears to be cleaned up substantially. The column names are relatively straightforward with the exception of “ID” columns.
The description as given by DHS.gov:
This dataset represents Historical North Atlantic and Eastern North Pacific Tropical Cyclone Tracks with 6-hourly (0000, 0600, 1200, 1800 UTC) center locations and intensities for all subtropical depressions and storms, extratropical storms, tropical lows, waves, disturbances, depressions and storms, and all hurricanes, from 1851 through 2008. These data are intended for geographic display and analysis at the national level, and for large regional areas. The data should be displayed and analyzed at scales appropriate for 1:2,000,000-scale data.
| YEAR | MONTH | DAY | WIND_KTS | PRESSURE | |
|---|---|---|---|---|---|
| Min. :1851 | Min. : 1.000 | Min. : 1.00 | Min. : 10.00 | Min. : 0.0 | |
| 1st Qu.:1928 | 1st Qu.: 8.000 | 1st Qu.: 8.00 | 1st Qu.: 35.00 | 1st Qu.: 0.0 | |
| Median :1970 | Median : 9.000 | Median :16.00 | Median : 50.00 | Median : 0.0 | |
| Mean :1957 | Mean : 8.541 | Mean :15.87 | Mean : 54.73 | Mean : 372.3 | |
| 3rd Qu.:1991 | 3rd Qu.: 9.000 | 3rd Qu.:23.00 | 3rd Qu.: 70.00 | 3rd Qu.: 990.0 | |
| Max. :2008 | Max. :12.000 | Max. :31.00 | Max. :165.00 | Max. :1024.0 |
We can confirm that this particular data had storms from 1851 - 2010, which means the data goes back roughly 100 years before naming storms started! We can also see that the minimum pressure values are 0, which likely means it could not be measured (due to the fact zero pressure is not possible in this case). We can see that there are recorded months from January to December along with days extending from 1 to 31. Whenever you see all of the dates laid out that way, you can smile and think to yourself, “if I need to, I can put dates in an easy to use format such as YYYY-mm-dd (2017-09-12)!”
This is a great illustration of our data set and we can easily notice an upward trend in the number of storms over time. Before we go running to tell the world that the number of storms per year is growing, we need to drill down a bit deeper. This could simply be caused because more types of storms were added to the data set (we know there are hurricanes, tropical storms, waves, etc.) being recorded. However, this could be a potential starting point for developing a hypothesis for time-series data.
You will notice the data starts at 1950 rather than 1851. I made this choice because storms were not named until this point so it would be difficult to try and count the unique storms per year. It could likely be done by finding a way to utilize the “ID” columns. However, this is a preliminary analysis so I didn't want to dig too deep.
| YEAR | Distinct_Storms | Distinct_Storms_Change | Distinct_Storms_Pct_Change |
|---|---|---|---|
| 1951 | 10 | -3 | -0.23 |
| 1952 | 6 | -4 | -0.40 |
| 1953 | 8 | 2 | 0.33 |
| 1954 | 8 | 0 | 0.00 |
| 1955 | 10 | 2 | 0.25 |
| 1956 | 7 | -3 | -0.30 |
| 1957 | 9 | 2 | 0.29 |
| 1958 | 10 | 1 | 0.11 |
| 1959 | 13 | 3 | 0.30 |
| 1960 | 13 | 0 | 0.00 |
In this case, we can see the number of storms, nominal change and percentage change per year. These calculations help to shed light on what the growth rate looks like each year. So we can use another summary table:
| Distinct_Storms | Distinct_Storms_Change | Distinct_Storms_Pct_Change | |
|---|---|---|---|
| Min. : 6.00 | Min. :-15.0000 | Min. :-0.42000 | |
| 1st Qu.:15.75 | 1st Qu.: -3.0000 | 1st Qu.:-0.12000 | |
| Median :25.00 | Median : 1.0000 | Median : 0.04000 | |
| Mean :22.81 | Mean : 0.3448 | Mean : 0.05966 | |
| 3rd Qu.:28.00 | 3rd Qu.: 3.7500 | 3rd Qu.: 0.25000 | |
| Max. :43.00 | Max. : 16.0000 | Max. : 1.14000 |
From the table we can state the following for the given time period:
Again, we have to be careful because these numbers are in aggregate and may not tell the whole story. Dividing these into groups of storms is likely much more meaningful.
Because I was most interested in hurricanes, I filtered out only the data which was classified as “H (1-5).” By utilizing a data visualization technique called “small multiples” I was able to pull out the different types and view them within the same graph. While this is possible to do in tables and spreadsheets, it's much easier to visualize this way. By holding the axes constant, we can see the majority of the storms are classified as H1 and then it appears to consistently drop down toward H5 (with very few actually being classified as H5). We can also see that most have an upward trend from 1950 - 2010. The steepest appears to be H1 (but it also flattens out over the last decade).
| Distinct_Storms | Distinct_Storms_Change | Distinct_Storms_Pct_Change | |
|---|---|---|---|
| Min. : 4.00 | Min. :-11.00000 | Min. :-0.56000 | |
| 1st Qu.: 9.25 | 1st Qu.: -4.00000 | 1st Qu.:-0.25750 | |
| Median :13.50 | Median : 0.00000 | Median : 0.00000 | |
| Mean :12.76 | Mean : 0.05172 | Mean : 0.08379 | |
| 3rd Qu.:15.00 | 3rd Qu.: 3.00000 | 3rd Qu.: 0.35250 | |
| Max. :24.00 | Max. : 10.00000 | Max. : 1.80000 |
Now we are looking strictly at hurricane data (classified as H1-H5):
While it doesn't really make sense to say “we had an average growth of 0.05 hurricanes per year between 1950 and 2010” … it may make sense to say “we saw an average of growth of 8% per year in the number of hurricanes between 1950 and 2010.”
That's a great thing to put in quotes!
During EDA we discovered an average of growth of 8% per year in the number of hurricanes between 1950 and 2010.
Side Note: Be ready, as soon as you make a statement like that, you will likely have to explain how you arrived at that conclusion. That's where having an RMarkdown notebook and data online in a repository will help you out! Reproducible research is all of the hype right now.
A histogram and/or density plot is a great way to visualize the distribution of the data you are making statements about. This plot helps to show that we are looking at a right-skewed distribution with substantial variance. Knowing that we have n = 58 (meaning 58 years after being aggregated), it's not surprising that our histogram looks sparse and our density plot has an unusual shape. At this point, you can make a decision to jot this down, research it in depth and then attack it with full force.
However, that's not what we're covering in this post.
60K pieces of data can get out of hand quickly, we need to back this down into manageable chunks. Building on the knowledge from our last exploration, we should be able to think of a way to cut this down to get some better information. The concept of small multiples could come in handy again! Splitting the data up by type of storm could prove to be valuable. We can also tell that we are missing
After filtering the data down to hurricanes and utilizing a heat map rather than plotting individual points we can get a better handle on what is happening where. The H4 and H5 sections are probably the most interesting. It appears as if H4 storms are more frequent on the West coast of Mexico whereas the H5 are most frequent in the Gulf of Mexico.
Because we're still in EDA mode, we'll continue with another plot.
Here are some of the other storms from the data set. We can see that TD, TS and L have large geographical spreads. The E, SS, and SD storms are concentrated further North toward New England.
Digging into this type of data and building probabilistic models is a fascinating field. The actuarial sciences are extremely difficult and insurance companies really need good models. Having mapped this data, it's pretty clear you could dig in and find out what parts of the country should expect what types of storms (and you've also known this just from being alive for 10+ years). More hypotheses could be formed about location at this stage and could be tested!
What is the relationship between WIND_KTS and PRESSURE? This chart helps us to see that low PRESSURE and WIND_KTS are likely negatively correlated. We can also see that the WIND_KTS is essentially the predictor in the data set which can perfectly predict how a storm is classified. Well, it turns out, that's basically the distinguishing feature when scientists are determining how to categorize these storms!
We have done some basic EDA and identified some patterns in the data. While doing some EDA can simply be just for fun, in most data analysis, it's important to find a place to apply these discoveries by making and testing hypotheses! There are plenty of industries where you could find a use for this:
The rest is up to you! This is a great data set and there are a lot more pieces of information lurking within it. I want people to do their own EDA and send me anything interesting!
Some fun things to check out:
To get you started on the first one, here's the Top 10 most common names for tropical storms. Why do you think it's Florence?
Thank you for reading, I hope this helps you with your own data. The code is all written in R and is located on my GitHub. You can also find other data visualization posts and usages of ggplot2 on my blog Stoltzmaniac


Nitrous Oxide is one of those psychoactive substances, that used to be accessible in pre drug war times. It was a source of amusement for people who could inhale it for a few pennies at the Laughing Gas stand present in traveling amusement shows. Things changed however, and like most potent psychoactives, use of Nitrous Oxide for human consumption has been restricted to controlled medical applications. Of course that changes nothing in the human equation. People still want to feel altered, just as it was around the turn of the 19th. Nitrous Oxide is readily and legally available in food grade as whipped cream maker cartridges - whippets. At first look it seems like a good source of pure N2O. However this is not so clear in light of following findings. EZ whip brand cartridges were examined in this case.
The notion of “safe food grade Nitrous Oxide” quickly turned into horror as the taste became clearly toxic-chemical with a metallic hint. First thoughts were that those cartridges might contain Nitrogen Oxides other then N2O. This was quickly discounted after a quick online conversation with a chemist, as they are very toxic in small amounts and have vivid colors unlike Nitrous Oxide. Color of the gas expelled from cartridges was examined. Nitrous is a colorless gas, so nothing should be visible, however a fine vapor like mist was observed escaping from the opened whippets. Next step was to collect enough of the impurity to be able to examine it.
A large amount of cartridges was opened in such a fashion, that the gas passed via a filter. After opening about 20 whippets a substantial amount of black oil-like residue was collected. After sensory examination, the smell and texture of this residue was determined to be very similar to machining coolant sludge, which fits with how cartridges are manufactured. It appears that the coolant residue is vaporized upon opening the whippet and is most likely to be inhaled in large quantities. Of course this theory would have to be tested by professional lab analysis, but it seems like EZ Whip brand cartridges can contain various degrees of impurities that are result of poor manufacturing hygiene. It is likely they are not thoroughly cleaned off after manufacture of casings. Coolants used during metal machining are made with serious toxins, and they appear to be present in EZ Whip cartridges. Here is a picture of what you should NOT buy regardless of the purpose.
This brand of Whipped Cream Maker cartridges is not only unfit for inhalation, but is also not food grade and should not be used to make Whipped Cream (that is unles you like factory coolants in on your pie) It’s a clear example of how The War On Drugs can be a cause to dangers that were not of concern in the late 19th century, and add to the “drug problem”. Thanks to War On Drugs there are more dangers to Nitrous use then the inherent problems associated with the gas itself. So much resources are used up on stopping people from experiencing altered states other then alcohol and tobacco, that quality of foodstuffs such as Whippets used to make Whipped Cream is overlooked.
Beware what you consider “food grade” Nitrous Oxide, because thanks to sleepiness of the government’s foodstuff quality control, you might be getting a bit more than N2O.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.