package-locks
An explanation of npm lockfilesTable of contents
Description
Conceptually, the “input” to npm install
is a package.json, while its
“output” is a fully-formed node_modules
tree: a representation of the
dependencies you declared. In an ideal world, npm would work like a pure
function: the same package.json
should produce the exact same node_modules
tree, any time. In some cases, this is indeed true. But in many others, npm is
unable to do this. There are multiple reasons for this:
-
different versions of npm (or other package managers) may have been used to install a package, each using slightly different installation algorithms.
-
a new version of a direct semver-range package may have been published since the last time your packages were installed, and thus a newer version will be used.
-
A dependency of one of your dependencies may have published a new version, which will update even if you used pinned dependency specifiers (
1.2.3
instead of^1.2.3
) -
The registry you installed from is no longer available, or allows mutation of versions (unlike the primary npm registry), and a different version of a package exists under the same version number now.
As an example, consider package A:
{
"name": "A",
"version": "0.1.0",
"dependencies": {
"B": "<0.1.0"
}
}
package B:
{
"name": "B",
"version": "0.0.1",
"dependencies": {
"C": "<0.1.0"
}
}
and package C:
{
"name": "C",
"version": "0.0.1"
}
If these are the only versions of A, B, and C available in the
registry, then a normal npm install A
will install:
<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>However, if<EMAIL_ADDRESS>is published, then a fresh npm install A
will
install:
<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>assuming the new version did not modify B’s dependencies. Of course, the new version of B could include a new version of C and any number of new dependencies. If such changes are undesirable, the author of A could specify a dependency on<EMAIL_ADDRESS>However, if A’s author and B’s author are not the same person, there’s no way for A’s author to say that he or she does not want to pull in newly published versions of C when B hasn’t changed at all.
To prevent this potential issue, npm uses package-lock.json or, if present, npm-shrinkwrap.json. These files are called package locks, or lockfiles.
Whenever you run npm install
, npm generates or updates your package lock,
which will look something like this:
{
"name": "A",
"version": "0.1.0",
...metadata fields...
"dependencies": {
"B": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/B/-/B-0.0.1.tgz",
"integrity": "sha512-DeAdb33F+"
"dependencies": {
"C": {
"version": "git://github.com/org/C.git#5c380ae319fc4efe9e7f2d9c78b0faa588fd99b4"
}
}
}
}
}
This file describes an exact, and more importantly reproducible
node_modules
tree. Once it’s present, any future installation will base its
work off this file, instead of recalculating dependency versions off
package.json.
The presence of a package lock changes the installation behavior such that:
-
The module tree described by the package lock is reproduced. This means reproducing the structure described in the file, using the specific files referenced in “resolved” if available, falling back to normal package resolution using “version” if one isn’t.
-
The tree is walked and any missing dependencies are installed in the usual fashion.
If preshrinkwrap
, shrinkwrap
or postshrinkwrap
are in the scripts
property of the package.json
, they will be executed in order. preshrinkwrap
and shrinkwrap
are executed before the shrinkwrap, postshrinkwrap
is
executed afterwards. These scripts run for both package-lock.json
and
npm-shrinkwrap.json
. For example to run some postprocessing on the generated
file:
"scripts": {
"postshrinkwrap": "json -I -e \"this.myMetadata = $MY_APP_METADATA\""
}
Using locked packages
Using a locked package is no different than using any package without a package
lock: any commands that update node_modules
and/or package.json
’s
dependencies will automatically sync the existing lockfile. This includes npm install
, npm rm
, npm update
, etc. To prevent this update from happening,
you can use the --no-save
option to prevent saving altogether, or
--no-shrinkwrap
to allow package.json
to be updated while leaving
package-lock.json
or npm-shrinkwrap.json
intact.
It is highly recommended you commit the generated package lock to source
control: this will allow anyone else on your team, your deployments, your
CI/continuous integration, and anyone else who runs npm install
in your
package source to get the exact same dependency tree that you were developing
on. Additionally, the diffs from these changes are human-readable and will
inform you of any changes npm has made to your node_modules
, so you can notice
if any transitive dependencies were updated, hoisted, etc.
Resolving lockfile conflicts
Occasionally, two separate npm install will create package locks that cause
merge conflicts in source control systems. As of<EMAIL_ADDRESS>, these conflicts
can be resolved by manually fixing any package.json
conflicts, and then
running npm install [--package-lock-only]
again. npm will automatically
resolve any conflicts for you and write a merged package lock that includes all
the dependencies from both branches in a reasonable tree. If
--package-lock-only
is provided, it will do this without also modifying your
local node_modules/
.
To make this process seamless on git, consider installing
npm-merge-driver
, which will teach git how
to do this itself without any user interaction. In short: $ npx npm-merge-driver install -g
will let you do this, and even works with
<EMAIL_ADDRESS>versions of npm 5, albeit a bit more noisily. Note that if
package.json
itself conflicts, you will have to resolve that by hand and run
npm install
manually, even with the merge driver.


Preparation time
30 mins to 1 hour
Cooking time
over 2 hours
Serves
Serves 8-10
This delicious pork recipe incorporates elements of a classic Sunday roast into a dish with a difference.
Preheat the oven to 220C/200C Fan/Gas 7.
Season the pork all over with plenty of salt and pepper. Rub the seasoning into the pork.
Lay the pork, skin-side down, onto a chopping board, with the shortest end facing you. Sprinkle over the sliced onions, sage, apple, lemon zest and half the butter. Season again with salt and pepper.
Roll the pork up into a long sausage shape, keeping it as tightly rolled as possible. Secure the roll with cooking string at intervals.
Make a little noose in the end of the string, then loop around the pork, pull the string through the noose, then pull it tight. Continue down the pork, wrapping the string around, then looping it back through the string, keeping it taught all the time. Tie it at the end to secure.
Place the quartered onions, carrots and garlic into a large, deep-sided roasting tray, then place the pork on top. Rub the remaining butter over the pork, then pour in the wine. Roast the pork and vegetables for 30 minutes, then reduce the temperature to 150C/130C Fan/Gas 4 and continue to cook for 3-4 hours, until the pork is fall-apart tender.
Meanwhile, for the apple sauce, heat the apples, half of the sugar, a little of the lemon juice, a splash of water and the butter in a non-reactive saucepan over a low heat, stirring until the sugar has dissolved and the butter has melted. Continue to cook for 4-5 minutes, until the apple has broken down. Taste and add more sugar, lemon juice or water, as needed.
Beat the sauce with a spoon until nearly smooth, leaving a few chunks in the mixture, then season, to taste, with salt.
Switch off the oven and remove the roast pork and vegetables. Transfer the pork to a serving plate and set aside to rest for at least 30 minutes. Transfer the roasted vegetables to an ovenproof dish and keep warm in the oven.
Heat the roasting tray containing the pork juices over a medium heat, scraping up any browned bits stuck to the bottom of the tray using a wooden spoon. Season, to taste, with salt and pepper, then strain through a fine sieve and keep warm until ready to serve.
Bring a pan of salted water to the boil, add the broccoli and cook for 3-4 minutes, or until just tender. Drain well and toss with a knob of butter.
To serve, slice the rolled pork and divide the slices among 8-10 serving plates. Spoon the roasted vegetables alongside, and a dollop of apple sauce. Drizzle over the sauce.


--- layout: post title: Pernille reckons that mobile data date: 2004-12-18 00:00:00 category: mobile ---
Pernille reckons that mobile data usage is higher in Europe and Japan in part because of train commute times giving us a chance to use such services.
I think that might be one explanation, but I'm not sure it can completely explain the difference, for a couple of reasons: firstly most of the population of the UK don't travel to work by train/bus each day, and secondly, from what I recall last time I looked at figures for services we've run, WAP usage is highest in the evenings and at weekends...
On a side note: I'd really like to be able to look at my own usage patterns; to get my mobile bill in some digital format and analyse that see how and when I actually use my phone. When am I texting the most? When am I sending picture messages, making voice calls, and so on?


|
Log4j 1.2.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implement this interface for your own strategies for outputting log statements.
| Method Summary | |
void |
addFilter(Filter newFilter)
Add a filter to the end of the filter list. |
void |
clearFilters()
Clear the list of filters by removing all the filters in it. |
void |
close()
Release any resources allocated within the appender such as file handles, network connections, etc. |
void |
doAppend(LoggingEvent event)
Log in Appender specific way. |
ErrorHandler |
getErrorHandler()
Returns the ErrorHandler for this appender. |
Filter |
getFilter()
Returns the head Filter. |
Layout |
getLayout()
Returns this appenders layout. |
String |
getName()
Get the name of this appender. |
boolean |
requiresLayout()
Configurators call this method to determine if the appender requires a layout. |
void |
setErrorHandler(ErrorHandler errorHandler)
Set the ErrorHandler for this appender. |
void |
setLayout(Layout layout)
Set the Layout for this appender. |
void |
setName(String name)
Set the name of this appender. |
| Method Detail |
public void addFilter(Filter newFilter)
public Filter getFilter()
public void clearFilters()
public void close()
It is a programming error to append to a closed appender.
public void doAppend(LoggingEvent event)
Appender
specific way. When appropriate,
Loggers will call the doAppend
method of appender
implementations in order to log.public String getName()
public void setErrorHandler(ErrorHandler errorHandler)
ErrorHandler
for this appender.public ErrorHandler getErrorHandler()
ErrorHandler
for this appender.public void setLayout(Layout layout)
Layout
for this appender.public Layout getLayout()
public void setName(String name)
public boolean requiresLayout()
true
,
meaning that layout is required, then the configurator will
configure an layout using the configuration information at its
disposal. If this method returns false
, meaning that
a layout is not required, then layout configuration will be
skipped even if there is available layout configuration
information at the disposal of the configurator..
In the rather exceptional case, where the appender
implementation admits a layout but can also work without it, then
the appender should return true
.
|
Log4j 1.2.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


The carbonate rock record forms a 3500 million-year-long history of the physical, biological and chemical conditions of marine environments. Deep-sea carbonates, composed of microfossils and deposited on oceanic crust, are available to study time periods <250 million years old (Ma.). Owing to plate tectonics, the only extant older carbonates were deposited in shallow water, formed on continental crust flooded with marine waters. This distinction is critical, because shallow marine waters can be only tenuously connected to the open ocean, meaning that their chemistry often diverges from the global ocean. For example, the carbon isotopic composition of dissolved inorganic carbon (δ13CDIC) in these settings can be very different from open ocean δ13CDIC, influenced by local processes such as river outflow, evaporation and high local rates of photosynthesis. Carbonate δ13C values (δ13Ccarb) are one of the most common measurements in Earth history research, used as proxies to study the global carbon cycle. However, this approach assumes that δ13Ccarb records the δ13CDIC of the global ocean. Extreme variability in δ13Ccarb in shallow-water carbonates broadly co-occur with momentous changes in Earth history, such as atmospheric oxygenation, biospheric change and climate upheavals (figure above, from: Ahm and Husson, 2022), leading to proposed roles for an anomalous global carbon cycle in these events. My group works to disentangle the local and global processes that control the geochemistry of ancient carbonates using fieldwork, multi-proxy datasets and modeling, on time periods throughout Earth history.
The sedimentary rock reservoir both records and influences changes in Earth's surface environment.
Geoscientists extract data from the rock record to constrain long-term environmental, climatic and biological evolution (see above), with the understanding that geological processes of erosion and rock destruction may have overprinted some aspects of their results.
It has also long been recognized that changes in the mass and chemical
composition of buried sediments, operating in conjunction with biologically catalyzed reactions, exert a first-order control on Earth surface conditions on geologic timescales.
Thus, the construction and destruction of the rock record has the potential to influence both how Earth and life history are sampled, and drive long-term trends in surface conditions that otherwise are difficult to affect.
My group explores these connections through geological data synthesis using Macrostrat, a geospatial database that describes the age and properties of rocks in the upper crust.
The most basic calculation that can be derived from these resources is the quantification of rock abundance vs. rock age - for a given point in time at a given region in space, does rock exist?
In the movie on the left, this quantity is shown for North America sediments (1 billion years ago to present).
Does the rock record get worse with age, as is commonly thought?
How do records from one region of the globe compare to other regions?
How do such time series compare to other, significant events in Earth history, such as atmospheric oxygenation and biological evolution (e.g., Husson and Peters, 2017)?
As the number of geoscience papers grows exponentially, the ability to discover and analyze all data relevant to a given question has become unwieldy. This challenge (and opportunity) is the inspiration for GeoDeepDive, a digital library that supports machine learning and data mining efforts in the sciences. In one example of its scientific utlitiy, I used both GeoDeepDive and Macrostrat to constrain the prevalence of stromatolites, fossilized remnants of microbial communities in carbonate rocks, across geologic time. For this publication, I wrote code in Python to "read" 10,683 scientific papers, and extract geologic units (and their ages) that contain stromatolite fossils. The results are congruent with long-held qualitative ideas about the abundance of stromatolites across geologic time - mainly, a Proterozoic marine rock record dominated by stromatolites, followed by a precipitous decline as animals rise to dominate shallow shelf systems in the Phanerozoic (figure above, from: Peters, Husson and Wilcots, 2017). The notion, however, that stromatolite abundance resurges in the aftermath of metazoan mass extinctions finds no support in these results. Importantly, the approach I developed for this paper is general, and the code I wrote is easily adaptable for other, similar research questions involving the GeoDeepDive library.


lm-zoo
commands¶
lm-zoo¶
lm-zoo
provides black-box access to computing with state-of-the-art language models.
lm-zoo [OPTIONS] COMMAND [ARGS]...
Options
-
--backend
<backend>
¶ Specify a backend (containerization platform) to run the specified model.
- Options
docker|singularity
-
-v
,
--verbose
¶
get-predictions¶
Compute token-level predictive distributions from a language model for the given natural language sentences.
INFILE should be a raw natural language text file with one sentence per line.
This command writes a HDF5 file to the given OUTFILE, with the following structure:
/sentence/<i>/predictions: N_tokens_i * N_vocabulary array of
log-probabilities (rows are log-probability distributions)
/sentence/<i>/tokens: sequence of integer token IDs corresponding to
indices in ``/vocabulary``
/vocabulary: byte-encoded string array of vocabulary items (decode with
``numpy.char.decode(vocabulary, "utf-8")``)
lm-zoo get-predictions [OPTIONS] MODEL INFILE OUTFILE
Arguments
-
MODEL
¶
Required argument
-
INFILE
¶
Required argument
-
OUTFILE
¶
Required argument
get-surprisals¶
Get word-level surprisals from a language model for the given natural language text. Tab-separated results will be sent to standard output, following the format:
sentence_id token_id token surprisal
1 1 This 0.000
1 2 is 1.000
1 3 a 1.000
1 4 <unk> 0.500
1 5 line 1.000
1 6 . 0.250
1 7 <eos> 0.100
The surprisal of a token \(w_i\) is the negative logarithm of that token’s probability under a language model’s predictive distribution:
Note that surprisals are computed on the level of tokens, not words. Models that insert extra tokens (e.g., an end-of-sentence token as above) or which tokenize on the sub-word level (e.g. GPT2) will not have a one-to-one mapping between rows of surprisal output from this command and words.
There is guaranteed to be a one-to-one mapping, however, between the rows
of this file and the tokens produced by lm-zoo tokenize
.
lm-zoo get-surprisals [OPTIONS] MODEL FILE
Arguments
-
MODEL
¶
Required argument
-
FILE
¶
Required argument
list¶
List language models available in the central repository.
lm-zoo list [OPTIONS]
Options
-
--short
¶
Output just a list of shortnames rather than a pretty list
tokenize¶
Tokenize natural-language text according to a model’s preprocessing standards.
FILE should be a raw natural language text file with one sentence per line.
This command returns a text file with one tokenized sentence per line, with
tokens separated by single spaces. For each sentence, there is a one-to-one
mapping between the tokens output by this command and the tokens used by
the get-surprisals
command.
lm-zoo tokenize [OPTIONS] MODEL FILE
Arguments
-
MODEL
¶
Required argument
-
FILE
¶
Required argument
unkify¶
Detect unknown words for a language model for the given natural language text.
FILE should be a raw natural language text file with one sentence per line.
This command returns a text file with one sentence per line, where each
sentence is represented as a sequence of 0
and 1
values. These
values correspond one-to-one with the model’s tokenization of the sentence
(as returned by lm-zoo tokenize
). The value 0
indicates that the
corresponding token is in the model’s vocabulary; the value 1
indicates
that the corresponding token is an unknown word for the model.
lm-zoo unkify [OPTIONS] MODEL FILE
Arguments
-
MODEL
¶
Required argument
-
FILE
¶
Required argument


The nuances of digital teaching and learning are often lost on Twitter and off-the-cuff blogs. Posts long enough to explore some of the finer points of teaching and learning today are often skipped over as being “too academic” or “too heady.” Nope, those posts aren’t written for teachers “in the trenches.”
I’ve moved fully into a coaching position with my district. One of my primary goals in this role is to help teachers digest and process what it means to teach effectively, equitably, and responsibly in a digital world.
We cannot separate ourselves completely from bits and bytes. The Internet has gone from being encased in phone lines to flowing in, around, and through us all day, every day. The Internet used to be hard to use. Now, it’s an expectation that it’s just there. The change in availability and usability means the user base increases exponentially while understanding of the mechanisms for use decrease.
With the explosion of online “learning media,” it seems that teaching can be boiled down to engaging videos and the right entrepreneurial mindset. The personal branding narrative of edu-Twitter and edtech in general is a byproduct of the deconstruction and dissolution of structured debate and discussion about solid pedagogical practices.
Popular posts in the edu-blogosphere inevitably come back to teachers leaving the “sage on the stage” role to become a “guide on the side.” The sentiment rolls off the tongue and it makes us feel good about making connections with students. But, it lacks the nuance necessary to have any kind of significant conversation about the differences between didactic instruction and active learning.
We have set up a false narrative. I do not have to remove myself as an expert in teaching and learning in order to make connections with students or allow them to explore their interests. The guide-as-greater narrative attempts to make the case that we are partners in learning, but not without the devaluation of a profession as a whole. As a result, schools are throwing students into virtual credit programs led by a single teacher at a dashboard and equivocating it with an in-person experience down the hall.
Sherry Turkle calls this out in Reclaiming Conversation in a chapter focused on changes in education practices which have shifted as a result of prolific digital resources. She doesn’t go so far as to say that Internet-ready tools are destroying a generation but she does call for specific behaviors to change on the part of developers and users alike.
Her most poignant observation was calling out the difference between the natural, as-is instructional setting with the digital, as-if representation. When students are working in the same space – conversing and collaborating with one another, they are experiencing community and content in a real way. “The message is the medium,” as they say, and when we connect teaching and learning with very human interactions, the content gains new relevance.
As a teacher, it’s still your responsibility to construct a learning environment where context lends relevance to the content, whether it’s through constructionist work or through direct instruction. Without intentional preparation and implementation, digital or tangible, instruction suffers.
Andy Crouch offers insight on technology being in its proper place in his book, The Tech Wise Family. He opens with a story about blitzkrieg cleaning when his children were young. Anything out after 10 minutes was either donated or trashed. (He tells a story about dangling favorite toys over the donation bin to speed things along.) The point being that a house is out of order when things are not in their proper place.
In the classroom, we make proper place decisions about everything, it seems, except for technology. Since we have it, the edu-Twitter cultural push is to use it all the time. Need to do an assessment? There’s an app for that. Want to encourage collaboration? Use this website. Ditch your books for Google because “they’re out of date the minute they’re printed anyway.” The suggestions for technology uses for teachers starting out on this path are wholesale and without nuance and it’s hurting educators across the world.
Technology is not taught in its proper place, and that is a problem. Just like intentional instruction, technology use has to be hyper-intentional. We’re seeing this right now as we move into year one of a distributed iPad rollout in our district. The iPad (or Chromebook or Surface tablet or Linux machine) can be a powerful tool for learning but only when it is in its proper place. Students need to be taught to use the hardware as an instructional aid. Teachers need to be taught how to design units and lessons which intentionally place technology in spots where it can be used for powerful purposes. It requires a cultural shift for all parties.
For teachers, it is much more than taking a plunge into paperless classrooms, making sure they’re a part of every Twitter chat they can get in on, and starting a blog. It’s important to remember that we are training future adults – we have to keep the long game in mind. Using some gimmicks now to keep students “engaged” for the day is robbing them of a life skill which can help them function as adults. Some growth may come through chats and blogging (my own growth included those things) but not without recognizing that they aren’t required for change to happen. Instead of making flat recommendations about what people should do, we need to be approaching these conversations from our personal perspectives, telling stories of what worked – and, more importantly, what didn’t work – as we grew.
Another component of my work is staying on top of what teachers in the district are reading and talking about. I noticed our central library had a number of copies of Ditch That Textbook by Matt Miller. I grabbed a copy so I would be able to carry on a conversation with people who have read it.
If there is a book that exemplifies a lack of nuance, it was Ditch. Much of the book can be boiled down to:
– Join Twitter.
– Use Google Apps [G Suite] religiously
– Talk about how awesome you are now that you’re on Twitter and G Suite.
Each chapter up until Section 4 – page 197 – read like a blog post pushing a thin implementation of tech for poor reasons. For example, much of the first section talked about the power of being paperless without really diving into instructional effectiveness. As I read I tried to highlight simple suggestions written as if they were the best solution to a particular problem in the margins. My intent is to go back through and try to identify instructional situations where those suggestions are relevant to give context to teachers looking for help in school.
The difference in tone between books that were all taking on the same topic is stark. Segmentation in a market (education is a market, after all, and edtech is a particularly lucrative submarket) and these books speak to their particular audience. After three months, I’m focusing on ways to bring teachers from the realm of edtech sex appeal into technology-rich instruction with fidelity to nuanced practice.
I realize that some of the judgements I’m making are not fair at face value. I’m also very aware that changing practice takes a long time, especially if you’re searching for methods to change on your own without support. But, I’m not convinced that the path most teachers follow through the edtech regions is the best, or only, one.
The discrepancy between these books is stark. I don’t disagree that the more exciting changes come from trying apps and tools because they show off well. Changes in philosophy are harder to show in a Tweet and even harder to process and make essential in our day to day goings on. As a coach, it would be a disservice to not push teachers for the philosophical shift in everything I do, even through the lens of using a particular tool more effectively.
This is the spot when I would offer a handful of poignant, but not heady, methods for making the shift.
I don’t have any.
This is an intensely personal process. It requires reflection and relationships. The goal for teachers, in any case, is the same: improve teaching using resources intentionally.
Edtech preaches a wholesale shift away from the tangible in favor of the digital. Deniers push back with a deep-seeded reluctance to discuss new ideas or methods. I’m convinced that proselytizing either approach, while good for personal branding and making a name for yourself, is ineffective in the long run. Reading with a critical eye, looking for statements in absolutes and ultimatums, and thinking beyond short-term gains make the difference.
—
Featured image is abstract green flickr photo by dr.larsbergmann shared under a Creative Commons (BY-NC-SA) license
Written on August 22nd , 2017 by Brian Bennett Categorized in: All Teaching Technology
Leave a comment


We have tons of tech talks and workshops from various companies. Come network with recruiters and learn new things from industry leaders.
Learn new skills in a stress-free environment. Join a project team and work on open-source projects while making new friends.
Kick back and relax with us! We have tons of fun social events like game night, movie night and ice skating!
A day long tech event that lies somewhere between a TED talk and a developer confrence. Join us as we host companies and experienced professionals give talks about what they do best.


{% extends "base.html" %} {% block head %} {% endblock %} {% block title %}About Us{% endblock %} {% block banner %}About Black Rock Tickets{% endblock %} {% block lead %}View this project on GitHub{% endblock %} {% block alerts %}
Black Rock Tickets began as a ticket system for the Playa del Fuego regional Burning Man event. After many attempts to use third-party ticket vendors, we decided none of their systems were as useful as the simple home-brew system we had created. Since it's served us so well, we've decided to open up the system for other events to use, as well.
While the main purpose of BRT is to make a ticket system available to other regional Burning Man events, we're happy to share it with anyone and everyone who only needs a simple elecronic ticket sales system, without the cost or hassle of the big ticket vendors.
If you'd like us to host ticket sales for your event, or have a question about buying tickets here, please let us know.
Black Rock Tickets is not affiliated with the Burning Man organization or Black Rock City, LLC.


Players
Read the question before answering
Which is the following animal that can give birth to 25 monkeys a year without rest?
Hint:iejfewfhwpfhefhfhfwf
What is the animal that can give birth to 25 babies in a year which is neither a male or a female?
Hint: Answers can be found on the informative boards
0 answered
Option 1
Option 2
Option 3
Option 4
0 answered
0 answered
0 answered
0 answered
Option 1
Option 2
Option 3
Option 4
LEADERBOARD
Edmundchowjieji
9000 points
Edmundchowjieji
9000 points
Edmundchowjieji
# points
Edmundchowjieji
# points
Edmundchowjieji
# points
GAME OVER
CONGRATS WINNER!
Edmundchowjieji
9000 points
TOP 4 PLAYERS OF THE DAY
Edmundchowjieji
9000 points
Edmundchowjieji
9000 points
Edmundchowjieji
9000 points
Edmundchowjieji
9000 points


Males ({{ male_student_percent }})
Females ({{ female_student_percent }})
NOTICE TO DEVELOPERS
This version of the project is complete except for this overview dashboard design.
If you would like to help by making this page beautiful, check the overview views function and see what
it returns... you can also make a pull request and make change to the views so you get what you want!


{%extends "main/base.html"%} {% load static %} {% block content %}
Welcome to the classroom section. Here you can interact with your peers and experts to get indepth understanding of your knowledge of Sanskrit.
And unlike traditional classroom, here everyone is a teacher as well as a student. Use this to interact with your peers, and undergo fruitful discussions.
Keep Calm and learn Sanskrit.
Happy learning :)


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 4-5
Dietary
Cut the peeled, trimmed artichokes in half lengthways and scoop out the hairy 'chokes' using a teaspoon. Rub the artichoke halves all over with the lemon juice to prevent them from discolouring. Set aside.
Heat a heavy-based, lidded ovenproof casserole over a medium heat. When the casserole is hot, add the fennel and coriander seeds and dry fry for 30 seconds to one minute, or until the seeds begin to pop. (CAUTION: Keep the pan away from the eyes and face as popping seeds can be dangerous.)
Add the carrots, onion, garlic, celery, bay leaves, peppercorns, wine and sugar and season, to taste, with salt. Stir well to combine.
Place the artichoke halves into the casserole, then pour over the water. Bring the mixture to a gentle simmer, then cover the casserole with a lid and cook for 25-30 minutes, or until the vegetables are tender.
When the vegetables are tender, remove the casserole from the heat and set aside, uncovered, until cooled slightly.
When the casserole contents have cooled slightly, drizzle over the olive oil, then sprinkle over the parsley. Serve the artichokes alla Romana with steamed fish or barbecued meat.


Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly
SMS and Pager only. Identifier of the conversation the message belongs to
Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z
SMS only. Delivery error code returned by gateway
Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound
Fax only. Page count in fax message
Fax only. Resolution of fax message. ('High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi)
Sender information
Internal identifier of a message
The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z
Message status. Different message types may have different allowed status values.
Pager only True if at least one of the message recipients is Department extension
Message priority
Message read status
SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral
SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable)
Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment
Recipient information
Message type
Canonical URI of a message
Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned
Generated using TypeDoc
The list of message attachments


Train Scheduler
by Raj Sandhu
Current Train Schedule
Train Name
Destination
Frequency (min)
Next Arrival
Minutes Away
Add Train
Train Name
Destination
First Train Time (HH:mm Military Time)
Frequency in Minutes
Submit


Hello! I am
Jim
and I am writing about all the stuff I have. So far I have written about
{{ site.posts | size }} items
. You can read more about this project
here
{{ content | smartify }}


Dave Townsend's Mccoy project has a great component that implements nsIKeyService.idl. In Mccoy it is used to sign update.rdf files; we use it to sign swarm web pages.
The keyservice does not come with Firefox; you need to install it.
To install the keyservice you need to download the mccoy XPI file appropriate to your OS, unzip it, then copy the keyservice component files into the FBTest extension component directory. You'll have to restart to load the component. Here are the details:
mccoy.dll
and mccoy.xpt
in to the
We could do this install in code if it is worth the trouble


Concepts
To start with Lookyloo there are some concepts a user should be familiar with.
Cookies
A cookie is a small amount of data generated by a website that the backend can store in the user’s browsers. Cookies are used for user tracking, personalization, and authentication. To learn more, read about Using HTTP cookies.
| You can initiate a capture with existing cookies, see cookies documentation. |
Referer
The HTTP Referer header is a type of request header that identifies the address of a previous web page that links to a current web page or requested resource. It allows websites and web servers to identify where the traffic is coming from. The usage of the referer header increases the risk of privacy and security issues on a website. To learn more, read about the Referer header.
| You can initiate a capture with a referer. |
iframe
An Inline Frame (iframe) is a component of an HTML element that allows documents, videos, and other media to be embedded within a page. The <iframe> tag defines a region within a document, in which the browser can display a separate document. The <iframe> tag specifies an inline frame, which is used to embed another document within an HTML document. To learn more, read about HTML iframes.
Redirect
HTTP allows servers to redirect a request to a different location. A server specifies redirection by returning a 3xx status code. A redirect places instructions on the server to provide something different then the original request. To learn more, read about redirections in HTTP.
User-Agent
The User-Agent is a request header that allows network protocol peers to identify information about the web server. User agents are unique to every visitor on the web. The User-Agent string reveals a catalog of technical data and contains the user application or software, the operating system, versions, the web client, the web client’s version, and the engine responsible for the content display. To learn more, read about the User-Agent request header.
HTTP Response Status Code
When a request is made to a web server, a three digit HTTP response status code is returned. HTTP response status codes indicate whether a specific HTTP request has been successfully completed. To learn more, read about HTTP response status codes.
CNAME record
Type of DNS record that create an alias from one domain name to an other one. It is also often used in a technique called CNAME Cloaking to bypass the blocking of 3rd party cookies.


Greece coach Rick Pitino plans ahead without Giannis Antetokounmpo
ATHENS – Greece coach Rick Pitino is planning on trying to qualify for the 2020 Tokyo Olympics without Milwaukee Bucks forward Giannis Antetokounmpo.
Pitino officially took over as coach of the Greek national basketball team on Monday. He said he would leave a roster place open for Antetokounmpo in qualifying games but is not sure if he will be able to rely on his best player.
Greece will try to reach the Tokyo Olympics by winning a qualifying tournament. But the dates could clash with the NBA schedule, probably ruling out Antetokounmpo.
“It is a possibility he will not be playing with us in the qualifying round if he goes far (in the playoffs). I understood that coming into this situation, and that’s why it’s such a high mountain to climb,” Pitino said. “But Giannis is something, it’s a bridge we have to cross later on. But we are going to leave a roster spot even if he has to take my place.”
Pitino said he hoped to meet Antetokounmpo and his brother, Milwaukee teammate Thanasis Antetokounmpo, in March when the Bucks travel to Miami.
The 67-year-old Pitino is a veteran of the college game and the NBA, coaching the Boston Celtics and the New York Knicks as well as Kentucky and Louisville. He has returned to Greece after coaching Athens club Panathinaikos last season and remains popular.
Pitino said he also felt that attachment.
“(Coaching Greece) is the crown jewel for me as a basketball coach,” Pitino said. “This is one of the greatest honors I’ve had as a coach. I consider this so special because it’s a mountain that is so worth climbing.
“And for the next eight months. I’m not American. I’m not Italian. I’m Greek. And that’s the way I’m going to carry myself. You won’t see anybody who will bleed every possession like I will bleed to try and win a game.”
GET THE BEST OF THE JAPAN TIMES
IN FIVE EASY PIECES WITH TAKE 5
JOIN THE CONVERSATION


class |
AddLineCommand |
Tells the BasicView object to add a line for the specific turtle index with given starting and ending coordinates.
|
class |
AddTurtleCommand |
This command object tells the basic view to add a new turtle with the given index.
|
class |
ClearScreenCommand |
This command object tells the front end view to clear it's screen.
|
class |
DisplayErrorCommand |
This command object tells the front end view to display an error message to the user.
|
class |
HideTurtleCommand |
This command object tells the front end view to hide a turtle.
|
class |
MoveTurtleCommand |
Command object that tells the front end to move a given turtle from one location to another.
|
class |
PenStatusCommand |
Command object that tells the front end whether the pen is up or down for a given turtle.
|
class |
RotateTurtleCommand |
Command object that tells the front end to rotate a turtle clockwise
|
class |
SetBackgroundColorCommand |
Command object that tells the front end to set the background of the turtle arena
|
class |
SetPaletteCommand |
Command object to update the palette with a new index and color values.
|
class |
SetPenColorCommand |
Command object that sets the pen color of a given turtle.
|
class |
SetPenSizeCommand |
Command object that tells the front end to change the pen size for a given turtle.
|
class |
SetShapeCommand |
Command object that tells the front end to change the shape of a given turtle.
|
class |
ShowTurtle |
Command object telling the front end to show a turtle on the screen.
|
class |
UpdateCommandHistoryCommand |
Command object that tells the front end to update its command history.
|
class |
UpdateCustomVariablesCommand |
Command object that tells the front end to update the user defined variables that have been entered by the user.
|
class |
UpdateUserCommandsCommand |
Command object that tells the front end to update its list of user defined commands entered thus far.
|


Year / Make / Model
General Info
Manufacturer:
Manufacturer
Model:
Model
Model Year:
Model Year
Class:
Class (i.e. Compact, SUV, Truck, etc.)
Body Style:
Style (example: 4-door sedan)
Layout:
Layout (example: V-6 mounted front, front-wheel drive)
Powertrain Info
Drivetrain:
Drivetrain: Hybrid or Electric?
Engine:
Engine specs - size, power, fuel type
Electric motor:
Electric motor - size, power, motor type
Transmission:
Transmission type
Battery:
Battery size and type
Total range:
Total range
Electric-only range:
Electric-only range
Charging Information:
Charging information
Physical Dimensions
Wheelbase
Wheelbase
Total length:
Total Length
Width:
Width
Height:
Height
Curb Weight:
Curb Weight


The instructions for the shopping basket don't give too much detail, so there is more than one way of completing the exercise. The model answer shown here generally follows best practice. Note that:
Items
property returns a read-only version of the items collection, so that
it's not possible for other classes to add to the collection without using the appropriate
method in the Basket
class.
TotalPrice
method in the Basket
class uses the Linq Sum
method to add up the price of each item. This could be done manually using a loop if you prefer.
AddItem()
method, exceptions are thrown if we find an item in the basket
with the same ID but a different description or price.
StringBuilder
has been used in the Basket.ToString()
method - this
is best practice when building up strings bit by bit.
Here is the code:


Contents
This is a design document detailing the implementation of device hotplugging in Ganeti. The logic used is hypervisor agnostic but still the initial implementation will target the KVM hypervisor. The implementation adds python-fdsend as a new dependency. In case it is not installed hotplug will not be possible and the user will be notified with a warning.
Currently, Ganeti supports addition/removal/modification of devices (NICs, Disks) but the actual modification takes place only after rebooting the instance. To this end an instance cannot change network, get a new disk etc. without a hard reboot.
Until now, in case of KVM hypervisor, code does not name devices nor places them in specific PCI slots. Devices are appended in the KVM command and Ganeti lets KVM decide where to place them. This means that there is a possibility a device that resides in PCI slot 5, after a reboot (due to another device removal) to be moved to another PCI slot and probably get renamed too (due to udev rules, etc.).
In order for a migration to succeed, the process on the target node should be started with exactly the same machine version, CPU architecture and PCI configuration with the running process. During instance creation/startup ganeti creates a KVM runtime file with all the necessary information to generate the KVM command. This runtime file is used during instance migration to start a new identical KVM process. The current format includes the fixed part of the final KVM command, a list of NICs’, and hvparams dict. It does not favor easy manipulations concerning disks, because they are encapsulated in the fixed KVM command.
For the case of the KVM hypervisor, QEMU exposes 32 PCI slots to the instance. Disks and NICs occupy some of these slots. Recent versions of QEMU have introduced monitor commands that allow addition/removal of PCI devices. Devices are referenced based on their name or position on the virtual PCI bus. To be able to use these commands, we need to be able to assign each device a unique name.
To keep track where each device is plugged into, we add the pci slot to Disk and NIC objects, but we save it only in runtime files, since it is hypervisor specific info. This is added for easy object manipulation and is ensured not to be written back to the config.
We propose to make use of QEMU 1.0 monitor commands so that modifications to devices take effect instantly without the need for hard reboot. The only change exposed to the end-user will be the addition of a --hotplug option to the gnt-instance modify command.
Upon hotplugging the PCI configuration of an instance is changed. Runtime files should be updated correspondingly. Currently this is impossible in case of disk hotplug because disks are included in command line entry of the runtime file, contrary to NICs that are correctly treated separately. We change the format of runtime files, we remove disks from the fixed KVM command and create new entry containing them only. KVM options concerning disk are generated during _ExecuteKVMCommand(), just like NICs.
Which should be each device ID? Currently KVM does not support arbitrary IDs for devices; supported are only names starting with a letter, max 32 chars length, and only including ‘.’ ‘_’ ‘-‘ special chars. For debugging purposes and in order to be more informative, device will be named after: <device type>-<part of uuid>-pci-<slot>.
Who decides where to hotplug each device? As long as this is a hypervisor specific matter, there is no point for the master node to decide such a thing. Master node just has to request noded to hotplug a device. To this end, hypervisor specific code should parse the current PCI configuration (i.e. info pci QEMU monitor command), find the first available slot and hotplug the device. Having noded to decide where to hotplug a device we ensure that no error will occur due to duplicate slot assignment (if masterd keeps track of PCI reservations and noded fails to return the PCI slot that the device was plugged into then next hotplug will fail).
Where should we keep track of devices’ PCI slots? As already mentioned, we must keep track of devices PCI slots to successfully migrate instances. First option is to save this info to config data, which would allow us to place each device at the same PCI slot after reboot. This would require to make the hypervisor return the PCI slot chosen for each device, and storing this information to config data. Additionally the whole instance configuration should be returned with PCI slots filled after instance start and each instance should keep track of current PCI reservations. We decide not to go towards this direction in order to keep it simple and do not add hypervisor specific info to configuration data (pci_reservations at instance level and pci at device level). For the aforementioned reason, we decide to store this info only in KVM runtime files.
Where to place the devices upon instance startup? QEMU has by default 4 pre-occupied PCI slots. So, hypervisor can use the remaining ones for disks and NICs. Currently, PCI configuration is not preserved after reboot. Each time an instance starts, KVM assigns PCI slots to devices based on their ordering in Ganeti configuration, i.e. the second disk will be placed after the first, the third NIC after the second, etc. Since we decided that there is no need to keep track of devices PCI slots, there is no need to change current functionality.
How to deal with existing instances? Hotplug depends on runtime file manipulation. It stores there pci info and every device the kvm process is currently using. Existing files have no pci info in devices and have block devices encapsulated inside kvm_cmd entry. Thus hotplugging of existing devices will not be possible. Still migration and hotplugging of new devices will succeed. The workaround will happen upon loading kvm runtime: if we detect old style format we will add an empty list for block devices and upon saving kvm runtime we will include this empty list as well. Switching entirely to new format will happen upon instance reboot.
The NIC and Disk objects get one extra slot: pci. It refers to PCI slot that the device gets plugged into.
In order to be able to live migrate successfully, runtime files should be updated every time a live modification (hotplug) takes place. To this end we change the format of runtime files. The KVM options referring to instance’s disks are no longer recorded as part of the KVM command line. Disks are treated separately, just as we treat NICs right now. We insert and remove entries to reflect the current PCI configuration.
Introduce one new RPC call:
where DEVICE_TYPE can be either NIC or Disk, and ACTION either REMOVE or ADD.
We implement hotplug on top of the KVM hypervisor. We take advantage of QEMU 1.0 monitor commands (device_add, device_del, drive_add, drive_del, netdev_add,`` netdev_del``). QEMU refers to devices based on their id. We use uuid to name them properly. If a device is about to be hotplugged we parse the output of info pci and find the occupied PCI slots. We choose the first available and the whole device object is appended to the corresponding entry in the runtime file.
Concerning NIC handling, we build on the top of the existing logic (first create a tap with _OpenTap() and then pass its file descriptor to the KVM process). To this end we need to pass access rights to the corresponding file descriptor over the monitor socket (UNIX domain socket). The open file is passed as a socket-level control message (SCM), using the fdsend python library.
The new --hotplug option to gnt-instance modify is introduced, which forces live modifications.
Hotplug will be optional during gnt-instance modify. For existing instance, after installing a version that supports hotplugging we have the restriction that hotplug will not be supported for existing devices. The reason is that old runtime files lack of:
Hotplug will be supported only for KVM in the first implementation. For all other hypervisors, backend will raise an Exception case hotplug is requested.
The user can add/modify/remove NICs either with hotplugging or not. If a NIC is to be added a tap is created first and configured properly with kvm-vif-bridge script. Then the instance gets a new network interface. Since there is no QEMU monitor command to modify a NIC, we modify a NIC by temporary removing the existing one and adding a new with the new configuration. When removing a NIC the corresponding tap gets removed as well.
gnt-instance modify --net add --hotplug test
gnt-instance modify --net 1:mac=aa:00:00:55:44:33 --hotplug test
gnt-instance modify --net 1:remove --hotplug test
The user can add and remove disks with hotplugging or not. QEMU monitor supports resizing of disks, however the initial implementation will support only disk addition/deletion.
gnt-instance modify --disk add:size=1G --hotplug test
gnt-instance modify --net 1:remove --hotplug test
The design so far covers all issues that arise without addressing the case where the kvm process will not run with root privileges. Specifically:
For NIC hotplug we address this problem by using the getfd monitor command and passing the file descriptor to the kvm process over the monitor socket using SCM_RIGHTS. For disk hotplug and in case of uid pool we can let the hypervisor code temporarily chown() the device before the actual hotplug. Still this is insufficient in case of chroot. In this case, we need to mknod() the device inside the chroot. Both workarounds can be avoided, if we make use of the add-fd qemu monitor command, that was introduced in version 1.3. This command is the equivalent of NICs’ get-fd` for disks and will allow disk hotplug in every case. So, if the qemu monitor does not support the add-fd command, we will not allow disk hotplug for chroot and uid security model and notify the user with the corresponding warning.


Image Downloads
Earth image from this github.com domain with download attribute
Download
Earth image from external domain with download attribute
Download
Earth image from this github.com domain without download attribute
Download
Earth image from external domain without download attribute
Download


HiveMind Services
In HiveMind, a service is simply an object that implements a particular interface, the service interface (see this note). You supply the service interface (packaged as part of a module). You supply the core implementation of the interface (in the same module, or in a different module). At runtime, HiveMind puts it all together.
HiveMind defines four service models: primitive, singleton, threaded and pooled. In the primitive and singleton models, each service will ultimately be just a single object instance. In the threaded and pooled models, there may be many instances simultaneously, one for each thread.
Unlike EJBs, there's no concept of location transparency: services are always local to the same JVM. Unlike XML-based web services, there's no concept of language transparency: services are always expressed in terms of Java interfaces. Unlike JMX or Jini, there's no concept of hot-loading of services. HiveMind is kept deliberately simple, yet still very powerful, so that your code is kept simple.
Defining Services
A service definition begins with a Java interface, the service interface. Any interface will do, HiveMind doesn't care, and there's no base HiveMind interface.
A module descriptor may include <service-point> elements to define services. A module may contain any number of services.
Each <service-point> establishes an id for the service and defines the interface for the service. An example is provided later in this document.
HiveMind is responsible for supplying the service implementation as needed; in most cases, the service implementation is an additional Java class which implements the service interface. HiveMind will instantiate the class and configure it as needed. The exact timing is determined by the service implementation's service model:
- primitive : the service is constructed on first reference
- singleton : the service is not constructed until a method of the service interface is invoked
- threaded : invoking a service method constructs and binds an instance of the service to the current thread
- pooled : as with threaded, but service implementations are stored in a pool when unbound from a thread for future use in other threads.
Additional service models can be defined via the hivemind.ServiceModels configuration point.
HiveMind uses a system of proxies for most of the service models (all except the primitive service model, which primarily exists to bootstrap the core HiveMind services used by other services). Proxies are objects that implement the service interface and take care of details such as constructing the actual implementation of a service on the fly. These lifecycle issues are kept hidden from your code behind the proxies.
A service definition may include service contributions, or may leave that for another module.
Ultimately, a service will consist of a core implementation (a Java object that implements the service interface) and, optionally, any number of interceptors. Interceptors sit between the core implementation and the client, and add functionality to the core implementation such as logging, security, transaction demarcation or performance monitoring. Interceptors are yet more objects that implement the service interface.
Instantiating the core service implementation, configuring it, and wrapping it with any interceptors is referred to as constructing the service. Typically, a service proxy will be created first. The first time that a service method is invoked on the proxy, the service implementation is instantiated and configured, and any interceptors for the service are created.
Extending Services
Any module may contribute to any service extension point. An <implementation> element contains these contributions. Contributions take three forms:
- Service constructors:
- <create-instance> to instantiate an instance of a Java class as the implementation
- <invoke-factory> to have another service create the implementation
- <interceptor> to add additional logic to a core implementation
Service Constructors
A service constructor is used to instantiate a Java class as the core implementation instance for the service.
There are two forms of service constructors: instance creators and implementation factories.
An instance creator is represented by a <create-instance> element. It includes a class attribute, the Java class to instantiate.
An implementation factory is represented by a <invoke-factory> element. It includes a service-id attribute, the id of a service implementation factory service (which implements the ServiceImplementationFactory interface). The most common example is the hivemind.BuilderFactory service.
Implementation Factories
An implementation factory is used to create a core implementation for a service at runtime.
Often, the factory will need some additional configuration information. For example, the hivemind.lib.EJBProxyFactory service uses its parameters to identify the JNDI name of the EJB's home interface, as well as the home interface class itself.
Parameters to factory services are the XML elements enclosed by the <invoke-factory> element. Much like a configuration contribution, these parameters are converted from XML into Java objects before being provided to the factory.
The most common service factory is hivemind.BuilderFactory. It is used to construct a service and then set properties of the service implementation object.
Interceptor Contributions
An interceptor contribution is represented by an <interceptor> element. The service-id attribute identifies a service interceptor factory service: a service that implements the ServiceInterceptorFactory interface.
An interceptor factory knows how to create an object that implements an arbitrary interface (the interface being defined by the service extension point), adding new functionality. For example, the hivemind.LoggingInterceptor factory creates an instance that logs entry and exit to each method.
The factory shouldn't care what the service interface itself is ... it should adapt to whatever interface is defined by the service extension point it will create an interceptor for.
A service extension point may have any number of interceptor contributions. If the order in which interceptors are applied is important, then the optional before and after attributes can be specified. The value of the before and after attributes must be a comm-separated list of interceptor names (name defaults to the service factory id which created the interceptor if none is provided).
In this example, it was desired that any method logging occur first, before the other interceptors. This ensures that the time taken to log method entry and exit is not included in the performance statistics (gathered by the performance interceptor). To ensure that the logging interceptor is the first, or earliest interceptor, the special value * (rather than a list of interceptor service ids) is given for its before attribute (within the <interceptor> element). This forces the logging interceptor to the front of the list (however, only a single interceptor may be so designated).
Likewise, the security checks should occur last, after logging and after performance; this is accomplished by setting the after attribute to *. The performance interceptor naturally falls between the two.
This is about as complex as an interceptor stack is likely to grow. However, through the use of explicit dependencies, almost any arrangement of interceptors is possible ... even when different modules contribute the interceptors.
Interceptors implement the toString() method to provide
a useful identification for the interceptor, for example:
<Iterceptor: hivemind.LoggingInterceptor for
com.myco.MyService(com.myco.MyServiceInterface)>
This string identifies the interceptor service factory (hivemind.LoggingInterceptor), the service extension point (com.myco.MyService) and the service interface (com.myco.MyServiceInterface).
A short example
As an example, let's create an interface with a single method, used to add together two numbers.
package com.myco.mypackage; public interface Adder { public int add(int arg1, int arg2); }
We could define many methods, and the methods could throw exceptions. Once more, HiveMind doesn't care.
We need to create a module to contain this service. We'll create a simple HiveMind deployment descriptor. This is an XML file, named hivemodule.xml, that must be included in the module's META-INF directory.
<?xml version="1.0"?> <module id="com.myco.mypackage" version="1.0.0"> <service-point id="Adder" interface="Adder"/> </module>
The complete id for this service is com.myco.mypackage.Adder , formed from the module id and the service id. Commonly, the service id will exactly match the complete name of the service interface, but this is not required.
Normally, the <service-point> would contain a <create-instance> or <invoke-factory> element, used to create the core implementation. For this example, we'll create a second module that provides the implementation. First we'll define the implementation class.
package com.myco.mypackage.impl; import com.myco.mypackage.Adder; public class AdderImpl implements Adder { public int add(int arg1, int arg2) { return arg1 + arg2; } }
That's what we meant by a POJO. We'll create a second module to provide this implementation.
<?xml version="1.0"?> <module id="com.myco.mypackage.impl" version="1.0.0"> <implementation service-id="com.myco.mypackage.Adder"> <create-instance class="AdderImpl"/> </implementation> </module>
The runtime code to access the service is very streamlined:
Registry registry = . . . Adder service = (Adder) registry.getService("com.myco.mypackage.Adder", Adder.class); int sum = service.add(4, 7);
Another module may provide an interceptor:
<?xml version="1.0"?> <module id="com.myco.anotherpackage" version="1.0.0"> <implementation service-id="com.myco.mypackage.Adder"> <interceptor service-id="hivemind.LoggingInterceptor"/> </implementation> </module>
Here the Logging interceptor is applied to the service extension point. The interceptor will be inserted between the client code and the core implementation. The client in the code example won't get an instance of the AdderImpl class, it will get an instance of the interceptor, which internally invokes methods on the AdderImpl instance. Because we code against interfaces instead of implementations, the client code neither knows nor cares about this.
Singleton Service Model
Constructing a service can be somewhat expensive; it involves instantiating a core service implementation, configuring its properties (some of which may also be services), and building the stack of interceptors for the service. Although HiveMind encourages you to define your application in terms of a large number of small, simple, testable services, it is also desirable to avoid a cascade of unnecessary object creation due to the dependencies between services.
To resolve this, HiveMind defers the actual creation of services by default. This is controled by the model attribute of the <create-instance> or <invoke-factory> elements; the default model is singleton.
When a service is first requested a proxy for the service is created. This proxy implements the same service interface as the actual service and, the first time a method of the service interface is invoked, will force the construction of the actual service (with the core service implementation, interceptors, references to other services, and so forth).
In certain cases (including many of the fundamental services provided by HiveMind) this behavior is not desired; in those cases, the primitive service model is specified. In addition, there is rarely a need to defer service implementation or service interceptor factory services.
Primitive Service Model
The simplest service model is the primitive service model; in this model the service is constructed on first reference. This is appropriate for services such as service factories and interceptor factories, and for several of the basic services provided in the hivemind module.
There is rarely a need to use this service model in your own code. It exists primarily to support the services in the hivemind module itself (the implementation of the singleton service model is dependent on several services that use the primitive service model).
Threaded Service Model
In general, singleton services (using the singleton or primitive service models) should be sufficient. In some cases, the service may need to keep some specific state. State and multithreading don't mix, so the threaded service model constructs, as needed, a service instance for the current thread. Once constructed, the service instance stays bound to the thread until it is discarded. The particular service implementation is exclusive to the thread and is only accessible from that thread.
The threaded service model uses a special proxy class (fabricated at runtime) to support this behavior; the proxy may be shared between threads but methods invoked on the proxy are redirected to the private service implementation bound to the thread. Binding of a service implementation to a thread occurs automatically, the first time a service method is invoked.
The service instance is discarded when notified to cleanup; this is controlled by the hivemind.ThreadEventNotifier service. If your application has any threaded services, you are responsible for invoking the fireThreadCleanup() method of the service.
A core implementation may implement the Discardable interface. If so, it will receive a notification as the service instance is discarded.
HiveMind includes a servlet filter to take care creating the Registry and managing the ThreadEventNotifier service.
Pooled Service Model
The pooled service model is very similar to the threaded model, in that a service implementation will be exclusively bound to a particular thread (until the thread is cleaned up). Unlike the threaded model, the service is not discarded; instead it is stored into a pool for later reuse with the same or a different thread.
As with the threaded model, all of this binding and unbinding is hidden behind a dynamically fabricated proxy class.
Core service implementations may implement the RegistryShutdownListener interface to receive a callback for final cleanups (as with the singleton and deferred service models).
In addition, a service may implement the PoolManageable interface to receive callbacks specific to the pooled service. The service is notified when it is activated (bound to a thread) and deactivated (unbound from the thread and returned to the pool).
Service Lifecycle
As discussed, the service model determines when a service is instantiated. In many cases, the service needs to know when it has been created (to perform any final initializations) or when the Registry has been shut down.
A core service implementation may also implement the RegistryShutdownListener interface. When a Registry is shutdown, the registryDidShutdown() method is invoked on all services (and many other objects, such as proxies). The order in which these notifications occur is not defined. A service may release any resources it may hold at this time. It should not invoke methods on other service interfaces.
The threaded service model does not register services for Registry shutdown notification; regardless of whether the core service implementation implements the RegistryShutdownListener interface or not. Instead, the core service implementation should implement the Discardable interface, to be informed when a service bound to a thread is discarded.
It is preferred that, whenever possible, services use the singleton service model (the default) and not the primitive model. All the service models (except for the primitive service model) expose a proxy object (implementing the service interface) to client code (included other services). These proxies are aware of when the Registry is shutdown and will throw an exception when a service method is invoked on them.
Services and Events
It is fairly common that some services will produce events and other services will consume events. The use of the hivemind.BuilderFactory to construct a service simplifies this, using the < event-listener> element. The BuilderFactory can register a core service implementation (not the service itself!) as a listener of events produced by some other service.
The producing service must include a matched pair of listener registration methods, i.e., both addFooListener() and removeFooListener(). Note that only the implementation class must implement the listener interface; the service interface does not have to extend the listener interface. The core service implementation is registered directly with the producer service, bypassing any interceptors or proxies.
Bean Services
In HiveMind 1.0, you always must have a service interface. Starting in HiveMind 1.1, the interface attribute of the <service-point> descriptor element can be a simple class as well.
The class you specify must have a public, no-arguments constructor. Your service constructor (<create-instance> or <invoke-factory>) should create an instance of the specified interface class (or a subclass).
This represents a "quick and dirty" approach to HiveMind. Some features of HiveMind, particularily specialized service implementation factories, may not be compatible with bean services ... they are designed for interface services.
Frequently Asked Questions
-
Why do I pass the interface class to getService()?
This is to add an additional level of error checking and reporting. HiveMind knows, from the module descriptors, the interface provided by the service extension point, but it can't tell if you know that. By passing in the interface you'll cast the returned service to, HiveMind can verify that you won't get a ClassCastException. Instead, it throws an exception with more details (the service extension point id, the actual interface provided, and the interface you passed it).
-
What if no module provides a core implementation of the
service?
HiveMind checks for a service constructor when the registry itself is assembled. If a service extension point has no service constructor, an error is logged (identifying the extension point id). In addition, getService() will throw an ApplicationRuntimeException.
-
What if I need to do some initializations in my service?
If you have additional initializations that can't occur inside your core service implementation's constructor (for instance, if the initializations are based on properties set after the service implementation object is instantiated), then your class should use the hivemind.BuilderFactory to invoke an initializer method.
-
What if I don't invoke Registry.cleanupThread()?
Then service implementations bound to the current thread stay bound. When the thread is next used to process a request, the same services, in whatever state they were left in, will be used. This may not be desirable in a servlet or Tapestry application, as some state from a client may be left inside the services, and a different client may be associated with the thread in later executions.
-
What if I want my service to be created early, not just when
needed?
Contribute your service into the hivemind.EagerLoad configuration; this will force HiveMind to instantiate the service on startup. This is often used when developing an application, so that configuration errors are caught early; it may also be useful when a service should be instantiated to listen for events from some other service.


Coerced 350 women
Cyberbullying:
the use of electronic
communication to bully
a person, typically by
sending messages of an
intimidating or
threatening nature.


To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video


Welcome to The CRUDdy Virtual Bear Feeding Zoo!!
Feed Paddington marmalade
Steal marmalade from Paddington
reset / delete Paddington
Feed Pooh hunny
Steal hunny from Pooh
reset / delete Pooh
Feed Volibear Teemo
KS Teemo from Volibear
reset / delete Volibear


Whitebalance points
{% if photo.whitebalances.all %}
Users were asked to click on points that are white or gray.
Each color corresponds to one user.
{% include "photos/whitebalance_display.svg" with entry=photo large="True" %}
Median chroma
{% for wb in photo.whitebalances.all %}
- {% if wb.chroma_median %}{{ wb.chroma_median|floatformat:3 }}{% else %}no white points{% endif %} ({{ wb.time_s }} s)
{% endfor %}
{% else %}
No white points are available.
{% endif %}


Blocks and gaps
A run of ones 0111 ... 10 (the number of contiguous ones is k) is known as a block of length k.
A run of k zeros 1000 ... 01 is called a gap.


appleseed Test Suite Report
Setup
Test Date
{test-date}
appleseed Binary
{appleseed-binary-path}
Maximum Absolute Component Difference
{max-abs-diff-allowed}
Maximum Number of Differing Components
{max-diff-comps-count-allowed}
Failures


Welcome To Hostel 2
The Wild Ones
One of the most spirited hostels of the campus.
You will never find the enthusiasm go down. We take pride in being The Wild Ones and every one in the hostel contributes in making the hostel better place to live in and making it successful in all aspects.
©2019 Hostel 2| IIT Bombay| Web Council 2018-2019
Developed by Aniket Mondal & B. Nikhil


{% extends 'global/base.html' %} {% block title %}Django Girls Contact{% endblock %} {% block content %}
Hi! We would love to hear from you!
To be sure your email reach the right person, check this FAQ first!
{% include 'includes/_faq.html' %}If you didn't find what you wanted, please check our extended FAQ section or use the form below. :)


Events
Workshops
Sponsors
About Us
Politburo
Officers
Constitution
Join
{% block content %}{% endblock %}


Resources
Wish these also work for you!
Guides for Optimization
- Convex Optimization – by S. Boyd and L. Vandenberghe
- Convex Analysis and Minimization Algorithms – by J.-B. Hiriart-Urruty and C. Lemaréchal
- Numerical Optimization – by J. Nocedal and S. J. Wright
- Optimization Methods for Large-Scale Machine Learning – by L. Bottou, F. E. Curtis and J. Nocedal
How to dive into machine learning
- The Elements of Statistical Learning – by T. Hastie, R. Tibshirani and J. Friedman
- Deep Learning – by I. Goodfellow, Y. Bengio and A. Courville
- Dive Into Deep Learning – by A. Zhang, Z. C. Lipton, M. Li and A. J. Smola
- Hands-on Machine Learning with Scikit-Learn & TensorFlow – by A. Géron
- Speech and Language Processing – by D. Jurafsky and J. H. Martin
- Probabilistic Graphical Models – by E. P. Xing and course staff in Carnegie Mellon
Friendly Mathematics
- An Introduction to Stochastic Differential Equations – by L. C. Evans
- Functional Analysis – by P. D. Lax
- Lectures on Real Analysis – by M. Tyaglov
- Complex Analysis – by T. W. Gamelin
Get to know Cheminformatics
- Analyzing Learned Molecular Representations for Property Prediction
- Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models
- Deep Graph Library (DGL)
- Geometric Deep Learning Extension Library for Pytorch
- Getting Started with the RDKit in Python
For potential graduates & researchers
- The Ph.D. Grind – by P. J. Guo
- The Ph.D. Grind (Chinese Version) by Q. Peng and Y. Luo


#include <AntennaLocation.h>
Public Member Functions | |
| AntennaLocation () | |
| virtual | ~AntennaLocation () |
| virtual void | marshal (DataStream &dataStream) const |
| virtual void | unmarshal (DataStream &dataStream) |
| Vector3Double & | getAntennaLocation () |
| const Vector3Double & | getAntennaLocation () const |
| void | setAntennaLocation (const Vector3Double &pX) |
| Vector3Float & | getRelativeAntennaLocation () |
| const Vector3Float & | getRelativeAntennaLocation () const |
| void | setRelativeAntennaLocation (const Vector3Float &pX) |
| virtual int | getMarshalledSize () const |
| bool | operator== (const AntennaLocation &rhs) const |
Protected Attributes | |
| Vector3Double | _antennaLocation |
| Vector3Float | _relativeAntennaLocation |
Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
| AntennaLocation::AntennaLocation | ( | ) |
| AntennaLocation::~AntennaLocation | ( | ) | [virtual] |
| const Vector3Double & AntennaLocation::getAntennaLocation | ( | ) | const |
| Vector3Double & AntennaLocation::getAntennaLocation | ( | ) |
| int AntennaLocation::getMarshalledSize | ( | ) | const [virtual] |
| const Vector3Float & AntennaLocation::getRelativeAntennaLocation | ( | ) | const |
| Vector3Float & AntennaLocation::getRelativeAntennaLocation | ( | ) |
| void AntennaLocation::marshal | ( | DataStream & | dataStream | ) | const [virtual] |
| bool AntennaLocation::operator== | ( | const AntennaLocation & | rhs | ) | const |
| void AntennaLocation::setAntennaLocation | ( | const Vector3Double & | pX | ) |
| void AntennaLocation::setRelativeAntennaLocation | ( | const Vector3Float & | pX | ) |
| void AntennaLocation::unmarshal | ( | DataStream & | dataStream | ) | [virtual] |
Vector3Double DIS::AntennaLocation::_antennaLocation [protected] |
Location of the radiating portion of the antenna in world coordinates
Location of the radiating portion of the antenna in entity coordinates


[gecode-users] Sets difference
Mauricio Toro
mauriciotorob at gmail.com
Fri Feb 29 18:21:49 CET 2008
Hello,
I made the difference. There was a bug in other part of the code.
But the problem with the ".." representation is that I am getting
too many solutions representing the same, such as:
(1,2..5)
(1,2,3..5)
(1,2,3,4,5)
and I just want to get (1,2,3,4,5).
What can I do ?
thanks
2008/2/29, Guido Tack <tack at ps.uni-sb.de>:
>
> Mauricio Toro wrote:
>
>
>
> I am trying to make a little program for set's difference.
>
> I found some info at sudoko's example.. but I have not
> been able to make the difference work :(
>
>
>
> I have this code:
>
>
> SetVar a = SetVar(this);
> SetVar b = SetVar(this);
> SetVar c = SetVar(this);
> SetVarArray answer = SetVarArray(this,2);
>
>
> dom (this, a, SRT_EQ , 1, 5);
> dom (this, b, SRT_EQ , 3, 10);
>
>
> //c = a - b
> // answer = c ??
> rel (this, a, SOT_MINUS, b, SRT_EQ, c);
> rel (this, SOT_UNION, answer, c);
>
>
>
>
>
> //SET_VAR_MIN_CARD With smallest unknown set.
> //SET_VAL_MIN Select smallest value in unknown set
> branch(this, answer, SET_VAR_NONE, SET_VAL_MIN);
>
>
>
> As a is {1,2,3,4,5} and b is {3,4,5,6,7,8,9,10}, the difference is {1,2},
> and answers should be constrained to two sets answers[0] and answers[1] such
> that their union is {1,2}. What exactly is your question?
>
>
> Guido
>
>
>
>
>
>
--
Mauricio Toro Bermudez
Estudiante de Ingeniería de Sistemas
Pontificia Universidad Javeriana, Colombia
Stagiare à l'Ircam
1, place Igor-Stravinsky 75004 Paris,
France de 2008 à 2009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080229/41ae12fe/attachment.htm>
More information about the gecode-users
mailing list


Lane closures on Sungai Besi highway extended
KUALA LUMPUR, Nov 25 — The intermittent lane closures along the Sungai Besi Highway (Sungai Besi-bound and Kuchai Lama bound) will be extended from November 27 to December 19.
MMC-Gamuda in a statement today said the closure among others was to facilitate the dismantling of lamp posts, pre-construction survey and any other related works.
“The construction works will start from 11 pm to 5 am involving three areas — Closure A, Closure B and Closure C,” it said.
For Closure A, the left-most lane will be closed for a stretch of 500-metre at Sungai Besi-bound near Kg Malaysia.
Closure B, will involve the closure of the left-most lane for a stretch of 500-metre after the exit to the Sungai besi Highway (Kuchai Lama-bound) from Terminal Bersepadu Selatan.
While for Closure C, the right-most lane will be closed for a stretch of 400-metre at Sungai Besi-bound and Kuchai Lama-bound.
“The closures will be implemented intermittently and at any one time there will be two or three lanes made available for motorists on both bounds,” the statement said. — Bernama


|
#include "common.h"
#include "common-rs485.h"
Go to the source code of this file.
Defines | |
| #define | DEBUG_WIFI 1 |
Functions | |
| int | checkFailure () |
| void | setupBAUDSpeed (long baudrate) |
| void | echo_all_input_off () |
| bool | set_verbose (bool on) |
| bool | echo_all_input (bool on) |
| bool | software_flow_control () |
| bool | scan_for_networks () |
| bool | wifi_auth_mode (int state) |
| void | set_ssid () |
| bool | set_wep_key (int keyindex) |
| bool | set_wpa_psk () |
| bool | setDHCP (bool useDHCP) |
| bool | getFW () |
| bool | getInfo () |
| bool | getInfoWLAN () |
| bool | closeAllConns () |
| bool | closeConn (int cid) |
| void | SaveConfig () |
| void | startListen (long port) |
| long | scanBaudRate () |
| void | configureWiFi () |
Variables | |
| long | nRcvChars = 0 |
| ubyte | BytesRead [8] |
| char * | ssid = "legolair" |
| ubyte | linefeed [] = {0x0A} |
| ubyte | endmarker [] = {27, 'E'} |
| char * | wep_key = "0FB3BA79EB" |
| char * | wpa_psk = "legolair" |
| long | baudrates [] = {9600, 19200, 38400, 57600, 115200, 230400,460800, 921600} |
| string | DWIFIscratchString |
| #define DEBUG_WIFI 1 |
Definition at line 30 of file dexterind-wifi.h.
| int checkFailure | ( | ) |
Definition at line 81 of file dexterind-wifi.h.
| bool closeAllConns | ( | ) |
Definition at line 352 of file dexterind-wifi.h.
| bool closeConn | ( | int | cid ) |
Definition at line 361 of file dexterind-wifi.h.
| void configureWiFi | ( | ) |
Definition at line 427 of file dexterind-wifi.h.
| bool echo_all_input | ( | bool | on ) |
Definition at line 196 of file dexterind-wifi.h.
| void echo_all_input_off | ( | ) |
Definition at line 165 of file dexterind-wifi.h.
| bool getFW | ( | ) |
Definition at line 327 of file dexterind-wifi.h.
| bool getInfo | ( | ) |
Definition at line 338 of file dexterind-wifi.h.
| bool getInfoWLAN | ( | ) |
Definition at line 345 of file dexterind-wifi.h.
| void SaveConfig | ( | ) |
Definition at line 372 of file dexterind-wifi.h.
| bool scan_for_networks | ( | ) |
Definition at line 233 of file dexterind-wifi.h.
| long scanBaudRate | ( | ) |
Definition at line 399 of file dexterind-wifi.h.
| void set_ssid | ( | ) |
Definition at line 275 of file dexterind-wifi.h.
| bool set_verbose | ( | bool | on ) |
Definition at line 182 of file dexterind-wifi.h.
| bool set_wep_key | ( | int | keyindex ) |
Definition at line 285 of file dexterind-wifi.h.
| bool set_wpa_psk | ( | ) |
Definition at line 300 of file dexterind-wifi.h.
| bool setDHCP | ( | bool | useDHCP ) |
Definition at line 315 of file dexterind-wifi.h.
| void setupBAUDSpeed | ( | long | baudrate ) |
Definition at line 120 of file dexterind-wifi.h.
| bool software_flow_control | ( | ) |
Definition at line 218 of file dexterind-wifi.h.
| void startListen | ( | long | port ) |
Definition at line 388 of file dexterind-wifi.h.
| bool wifi_auth_mode | ( | int | state ) |
Definition at line 249 of file dexterind-wifi.h.
| long baudrates[] = {9600, 19200, 38400, 57600, 115200, 230400,460800, 921600} |
Definition at line 51 of file dexterind-wifi.h.
| ubyte BytesRead[8] |
Definition at line 42 of file dexterind-wifi.h.
| string DWIFIscratchString |
Definition at line 52 of file dexterind-wifi.h.
| ubyte endmarker[] = {27, 'E'} |
Definition at line 46 of file dexterind-wifi.h.
| ubyte linefeed[] = {0x0A} |
Definition at line 45 of file dexterind-wifi.h.
| long nRcvChars = 0 |
Definition at line 41 of file dexterind-wifi.h.
| char* ssid = "legolair" |
Definition at line 43 of file dexterind-wifi.h.
| char* wep_key = "0FB3BA79EB" |
Definition at line 47 of file dexterind-wifi.h.
| char* wpa_psk = "legolair" |
Definition at line 48 of file dexterind-wifi.h.


Today I revived my hope on Microsoft as I received the news that they released their brand new “product” for their fellow developers. The release I am talking about is the official Metro theme for jQuery Mobile. The awesome mobile framework finally got some Microsoft love.
In December of last year I got a new device to develop for, a HTC Titan, running the latest Windows Phone 7.5 Mango build. I loved the OS UI and how the applications were information-centric and not just eye-candy, but there was one problem, the same way C# is a incredible language for a lot of things, it’s parsing functions, for JSON specifically, are very difficult to learn and the articles about it were made for senior C# developers, which makes it difficult for beginners like me to understand them, at least I now can develop using the technology I love most for mobile development: Cordova (aka PhoneGap).
I always wanted to use Cordova for my WP7 projects but the Metro interface was way too complex to build from scratch and since the WP7 build of Cordova was on it’s early stages there were some features still to be implemented, for example there was no way to prevent the app from scrolling and some other things. Now there are plenty of plugins to make the app as native as possible and with the latest help from Microsoft, the Cordova development community has another great platform with almost full support of the native web app framework.
It’s great to see that Microsoft finally realized that the future of development has Javascript, HTML and CSS as the main languages. That’s why I have hopes that Boot to Gecko gets some market attraction and becomes a popular platform.