ES8: The Next Step in the Evolution of Javascript and What it Means For Your Projects
Type Coercion: Why Does NaN !== NaN? and Other Strange Occurrences
Bootstrap 5: Get a Sneak Peak at all the New Features
AI: What Are the Ethical Ramifications of the Future?
History of Javascript Libraries: from jQuery to React
UI Frameworks: A Comparison, Which Made Our List? (Hint: Bootstrap is on it)
Node.js in 2018: Which Framework? Express, Sails, Hapi?
MongoDB: NoSQL vs. SQL, the Debate Continues...
jQuery Animations: When and Where to Use Them, and Not CSS
AR or VR: How We Will See the World Through a Digital Lense
When to Rest, When to Spread: Why There Are Two Meanings Behind '...'
Typescript: Ten Things you Should Know Before Building Your Next Angular Application
Quantum Computing: Where we Are Now, and Where We Will Be Very Soon
Why I Use jQuery in Every Application I Create and Why You Should Too
The Hottest New Bootstrap 4 Components Every Developer Needs to Know About
Node.js in 2018: Which Framework? Express, Sails, Hapi?
Typescript: Ten Things you Should Know Before Building Your Next Angular Application
When to Rest, When to Spread: Why There Are Two Meanings Behind '...'


| ETA (driving): 15 min |
| Credit? Y |
| Cash? Y |
| Budget: < $5 |
| Wi-fi? N |
| Hours Mon-Sun: 10am-1am |
When I go here I always order a double double combo w| everything . They're food is amazing one of the BEST burger places EVER. The only "-Negative" is the extremely LONNNNNGG wait, especially when they have so much staff and yet it still takes forever , but It's definitely worth the wait. I absolutely love the fresh fries ! Best fries ever and they're healthier than other places
In N Out is always number one on my "visiting the West Coast" to-do list. We usually just go straight from the airport to check it off the list, and satisfy my immediate craving for it. Friendly staff, fresh ingredients, and ANIMAL STYLE everything...There is nothing not to love about In N Out. It's pretty much the only fast food that I eat guilt-free. Throw calorie counts out the window and get a milkshake to wash down your burger and fries - you will be in heaven.
My experience is pleasant every time I come here. I always find a good place to sit. When I'm done the bathrooms r very nice. Yeah I come here a lot and I'm not afraid to gain weight because of it.


 Is that the price you, the parents, are willing to pay to balance the books?"
Children will be left behind by cuts
Re: It’s never enough for the CBE, letter, Nov. 7
As a retired teacher, I am following with great interest the UCP’s attempts to control its spending. Readers who are assuming that any school board can absorb the significant cuts the UCP are proposing are oblivious to the realities of the education world.
Those with children should brace for the mid-year reorganization that will need to be implemented to try to keep expenses within budgets: bigger classes, more split classes, fewer assistants, less access to services, quality teachers let go, students separated from their friends mid-year, etc. Many students will adapt to these more crowded environments. They can do it on their own.
Others will be left to fend for themselves, and fall even more behind. All this in an environment where teachers are already trying to cope with so many students who are already in need of individualize attention.
Will your child be left behind? Is that the price you, the parents, are willing to pay to balance the books? Good luck.
Gilles Rivard, Calgary
Let’s remember the horrors of the Second World War
Leading up to and on Nov. 11, I try to come up with some way to reflect on it. This year I thought I’d look at some numbers for perspective. Around 75 to 80 million died, including civilians and soldiers, in the Second World War. That was around three percent of the world’s population of 2.3 billion souls in 1940.
Today we have 7.7 Billion people. Three percent of 7.7 billion is 231 million. My sister was born in 1945 and I am the 4th child in 1955. Both our parents were in, met and married in the war.
Maybe we can at least ponder the numbers and perhaps even some long lost relatives. Let’s not do it again.
Doug MacGregor, Calgary
Travellers should think twice before driving in the U.K.
Re: Calgary philanthropist Carey killed in U.K. crash, Nov 5
In the U.K. this summer, 19-year-old Harry Dunn was killed when his motorbike collided with a car that was being driven on the wrong side of the road by an American diplomat’s wife, Anne Sacoolas. Now Ron Carey has been tragically killed because he took a wrong turn onto the M23 motorway in a vintage car.
It is so ingrained in us to drive on the right that a split-second lapse in concentration takes you there automatically. Think about being on the “wrong” side of the road across roundabouts, mini-roundabouts or five mini-roundabouts arranged in a circle around a sixth. Or driving along winding, hedge-lined, single-lane roads with traffic coming at you at 90 km/h and nowhere to pull over.
Do you know there’s no equivalent of our turn-right-on-a-red and you can only pass on the right? The shear volume and proximity of the vehicles there is unlike anything we have in Canada. Please travellers, think twice before you attempt to drive in the U.K.
Mary-Anne Pechet, Calgary


fjgkfjgjlkjlkdjkfjlkdjkjkgjdkljfkdjkldjkgjdjdkgjdkjgldjkdjfgkdjgljdkgjdkjgkdjgdkgkjkdjgdkgjdjgdkjg
dkjglkjdkjgkdjglkdjglkdjgdkljdlkjglkdjglkdjglkdjgldj gldkjgdhjjjjjjjjjjjyjyjrrehhhhhhhhhhhhhhhhhhhh
fjgkfjgjlkjlkdjkfjlkdjkjkgjdkljfkdjkldjkgjdjdkgjdkjgldjkdjfgkdjgljdkgjdkjgkdjgdkgkjkdjgdkgjdjgdkjg
dkjglkjdkjgkdjglkdjglkdjgdkljdlkj.
glkdjglkdjglkdjgldjgldkjgdhjjjjjjjjjjjyjyjrrehhhhhhhhhhhhhhhhhhhh
fjgkfjgjlkjlkdjkfjlkdjkjkgjdkljfkdjkldjkgjdjdkgjdkjgldjkdjfgkdjgljdkgjdkjgkdjgdkgkjkdjgdkgjdjgdkjg
dkjglkjdkjgkdjglkdjglkdjgdkljdlkjglkdjglkdjglkdjgldjgldkjgdhjjjjjjjjjjjyjyjrrehhhhhhhhhhhhhhhhhhhh
fjgkfjgjlkjlkdjkfjlkdjkjkgjdkljfkdjkldjkgjdjdkgjdkjgldjkdjfgkdjgljdkgjdkjgkdjgdkgkjkdjgdkgjdjgdkjg dkjglkjdkjgkdjglkdjglkdjgdkljdlkjglkdjglkdjglkdjgldjgldkjgdhjjjjjjjjjjjyjyjrrehhhhhhhhhhhhhhhhhhhh fjgkfjgjlkjlkdjkfjlkdjkjkgjdkljfkdjkldjkgjdjdkgjdkjgldjkdjfgkdjgljdkgjdkjgkdjgdkgkjkdjgdkgjdjgdkjg dkjglkjdkjgkdjglkdjglkdjgdkljdlkjkljjjjjjjjuyyyyyyyyyyyyyyyyyyyyyyyyyyyuhjhjhjjj. Giovanni Betancourt


groups
Professional Team Profile
person
Name
Operations Manager
ID:
Email:
<EMAIL_ADDRESS>Office Number:
engineering
Name
Team Engineer
ID:
Email:
<EMAIL_ADDRESS>Github:
username
school
Name
Intern
ID:
Email:
<EMAIL_ADDRESS>School:


This operation cannot be undone so please be careful.
You are about to delete
You cannot undo this operation. Though after the move you can always move the back again.
Move to:


Its time to Buckle Up mates!
As TheoreX is booming the market soon!
 :-D
Whatever, hope you are doing good! You are here because maybe I think you have some interests in TheoreX. Well, I don’t think, I know you do! and you must be, because something really creative and unique is coming soon in the vast and most powerful E-learning Industry. Yes, TheoreX is based on E-learning, but wait Dear! there’s lot more than you are thinking of right now. Eager to know what is that! Hold on, we have enough time to discuss about this. First Let me know you why I started this, why I love TheoreX as my family member, as my Son! :-) [...]


{% extends "horizon/common/_modal_form.html" %} {% load i18n %} {% block modal-body-right %}
{% blocktrans trimmed %} Security groups are sets of IP filter rules that are applied to network interfaces of a VM. After the security group is created, you can add rules to the security group. {% endblocktrans %}
{% endblock %}


--- layout: post title: "Unit testing private helper methods" description: "Evolving a private helper method, guided by tests." date: 2021-09-13 5:25 UTC tags: [Unit Testing, Code] --- {% include JB/setup %}
{{ page.description }}
A frequently asked question about unit testing and test-driven development (TDD) is how to test private helper methods. I've already attempted to answer that question: through the public API, but a recent comment to a Stack Overflow question made me realise that I've failed to supply a code example.
Show, don't tell.
In this article I'll show a code example that outlines how a private helper method can evolve under TDD.
The code example in this article comes from my book Code That Fits in Your Head. When you buy the book, you get not only the finished code examples, but the entire Git repository, with detailed commit messages.
A central part of the code base is a method that decides whether or not to accept a reservation attempt. It's essentially a solution to the Maître d' kata. I wrote most of the book's code with TDD, and after commit fa12fd69c158168178f3a75bcd900e5caa7e7dec
I decided that I ought to refactor the implementation. As I wrote in the commit message:
Filter later reservations based on date The line count of the willAccept method has now risen to 28. Cyclomatic complexity is still at 7. It's ripe for refactoring.
I think, by the way, that I made a small mistake. As far as I can tell, the WillAccept
line count in this commit is 26 - not 28:
public bool WillAccept( IEnumerable<Reservation> existingReservations, Reservation candidate) { if (existingReservations is null) throw new ArgumentNullException(nameof(existingReservations)); if (candidate is null) throw new ArgumentNullException(nameof(candidate)); var relevantReservations = existingReservations .Where(r => candidate.At.Date == r.At.Date); List<Table> availableTables = Tables.ToList(); foreach (var r in relevantReservations) { var table = availableTables.Find(t => r.Quantity <= t.Seats); if (table is { }) { availableTables.Remove(table); if (table.IsCommunal) availableTables.Add(table.Reserve(r.Quantity)); } } return availableTables.Any(t => candidate.Quantity <= t.Seats); }
Still, I knew that it wasn't done - that I'd be adding more tests that would increase both the size and complexity of the method. It was brushing against more than one threshold. I decided that it was time for a prophylactic refactoring.
Notice that the red-green-refactor checklist explicitly states that refactoring is part of the process. It doesn't, however, mandate that refactoring must be done in the same commit as the green phase. Here, I did red-green-commit-refactor-commit.
While I decided to refactor, I also knew that I still had some way to go before WillAccept
would be complete. With the code still in flux, I didn't want to couple tests to a new method, so I chose to extract a private
helper method.
After the refactoring, the code looked like this:
public bool WillAccept( IEnumerable<Reservation> existingReservations, Reservation candidate) { if (existingReservations is null) throw new ArgumentNullException(nameof(existingReservations)); if (candidate is null) throw new ArgumentNullException(nameof(candidate)); var relevantReservations = existingReservations .Where(r => candidate.At.Date == r.At.Date); var availableTables = Allocate(relevantReservations); return availableTables.Any(t => candidate.Quantity <= t.Seats); } private IEnumerable<Table> Allocate( IEnumerable<Reservation> reservations) { List<Table> availableTables = Tables.ToList(); foreach (var r in reservations) { var table = availableTables.Find(t => r.Quantity <= t.Seats); if (table is { }) { availableTables.Remove(table); if (table.IsCommunal) availableTables.Add(table.Reserve(r.Quantity)); } } return availableTables; }
I committed the change, and wrote in the commit message:
Extract helper method from WillAccept This quite improves the complexity of the method, which is now 4, and at 18 lines of code. The new helper method also has a cyclomatic complexity of 4, and 17 lines of code. A remaining issue with the WillAccept method is that the code operates on different levels of abstraction. The call to Allocate represents an abstraction, while the filter on date is as low-level as it can get.
As you can tell, I was well aware that there were remaining issues with the code.
Since the new Allocate
helper method is private
, unit tests can't reach it directly. It's still covered by tests, though, just as that code block was before I extracted it.
I wasn't done with the WillAccept
method, and after a bout of other refactorings, I added more test cases covering it.
While the method ultimately grew to exhibit moderately complex behaviour, I had only two test methods covering it: one (not shown) for the rejection case, and another for the accept (true
) case:
[Theory, ClassData(typeof(AcceptTestCases))] public void Accept( TimeSpan seatingDuration, IEnumerable<Table> tables, IEnumerable<Reservation> reservations) { var sut = new MaitreD(seatingDuration, tables); var r = Some.Reservation.WithQuantity(11); var actual = sut.WillAccept(reservations, r); Assert.True(actual); }
I based the example code on the impureim sandwich architecture, which meant that domain logic (including the WillAccept
method) is all pure functions. The nice thing about pure functions is that they're easy to unit test.
The Accept
test method uses an object data source (see the article Parametrised test primitive obsession code smell for another example of the motivation behind using objects for test parametrisation), so adding more test cases were simply a matter of adding them to the data source:
Add(TimeSpan.FromHours(6), new[] { Table.Communal(11) }, new[] { Some.Reservation.WithQuantity(11).TheDayAfter() }); Add(TimeSpan.FromHours(2.5), new[] { Table.Standard(12) }, new[] { Some.Reservation.WithQuantity(11).AddDate( TimeSpan.FromHours(-2.5)) }); Add(TimeSpan.FromHours(1), new[] { Table.Standard(14) }, new[] { Some.Reservation.WithQuantity(9).AddDate( TimeSpan.FromHours(1)) });
The bottom two test cases are new additions. In that way, by adding new test cases, I could keep evolving WillAccept
and its various private helper methods (of which I added more). While no tests directly exercise the private helper methods, the unit tests still transitively exercise the private parts of the code base.
Since I followed TDD, no private helper methods sprang into existence untested. I didn't have to jump through hoops in order to be able to unit test private helper methods. Rather, the private helper methods were a natural by-product of the red-green-refactor process - particularly, the refactor phase.
Following TDD doesn't preclude the creation of private helper methods. In fact, private helper methods can (and should?) emerge during the refactoring phase of the red-green-refactoring cycle.
For long-time practitioners of TDD, there's nothing new in this, but people new to TDD are still learning. This question keeps coming up, so I hope that this example is useful.


Help you to visit modern website that not support old/deprecated browser and OS.
For Windows XP and Vista, and Mac OS 10.6-10.8 wikipedia
Because, this only "patch" JS-side and DOM-side in browser, you also have to "patch" browser identity (or UA a.k.a User-Agent).
New UA Values:
Or you can use another UA from any latest Browser (I prefer latest Chrome or latest Firefox)
New Spoof Values:
Created by anovsiradj. Powered by Polyfill Service © Jonathan Neal, The Financial Times Ltd and other contributors.


Introduced in Excel 10 (2002) this BIFF record is an FRT record for Charts. This record holds Chart Data Label extensions which are new for Excel 10. Specifically, it indicates which chart information is contained in the data labels, and the separator string used between parts of the data label.
Record Data
|
Offset |
Field Name |
Size |
Contents |
|
4 |
rt |
2 |
Record type; this matches the BIFF rt in the first two bytes of the record; =086Bh |
|
6 |
grbitFrt |
2 |
FRT flags; must be zero |
|
8 |
(unused) |
8 |
Reserved; must be zero |
|
16 |
grbit |
2 |
Option flags for chart data labels (see description below) |
|
18 |
cchSep |
2 |
Count of characters in the separator string |
|
20 |
rgchSep |
var |
Separator string for use in chart data labels. |
The grbit field contains the following data label option flags:
|
Bits |
Mask |
Flag Name |
Contents |
|
0 |
0001h |
fSeriesName |
=1 if the data labels contain the series name |
|
1 |
0002h |
fCategoryName |
=1 if the data labels contain the category
name (x-value) |
|
2 |
0004h |
fValue |
=1 if the data labels contain the y-value |
|
3 |
0008h |
fPercent |
=1 if the data labels contain a percentage |
|
4 |
0010h |
fBubbleSizes |
=1 if the data labels contain bubble size |
|
15-5 |
FFE0h |
(unused) |
Reserved; must be zero |


The container you requested exists but it's currently down.
You can start it by running:
$ gdev up
If it fails to start you can see the status of all containers by running:
$ gdev ps
If this doesn't help look into the troubleshooting guide ( in Github ).


Hope you enjoy playing Wist Games!
Rebecca, Jay, and Alexander are software developers using hackathons as opportunities to further develop their skills. Wist Games is a fun holiday twist on childhood games. More information can be found on our Devpost button above.


*** Your Daily Free Stuff!
** In This Issue…
- Free Hada Labo Tokyo Skincare Sample
- Free Promised Land Moo Crew T-shirt
- Free Subscription to Bridal Guide
- Free SmileRound Stickers
- Free Tena Trial Kit
- Free Swole Sports Nutrition Sample Packs
- FREE Citizens for Term Limits bumper Sticker
- Free Domino&
- Search Sweet Free Stuff
** Free Hada Labo Tokyo Skincare Sample
Free Hada Labo Tokyo Skincare Sample
The post Free Hada Labo Tokyo Skincare Sample appeared first on SweetFreeStuff.com. &
&
** Free Promised Land Moo Crew T-shirt
Join for a free T-shirt. Free Promised Land Moo Crew T-shirt
The post Free Promised Land Moo Crew T-shirt appeared first on SweetFreeStuff.com. &
** Free Subscription to Bridal Guide
The post Free Subscription to Bridal Guide appeared first on SweetFreeStuff.com.
&
** Free SmileRound Stickers
Free SmileRound Stickers
The post Free SmileRound Stickers appeared first on SweetFreeStuff.com. &
** Free Tena Trial Kit
Free Tena Trial Kit - Click on &
The post Free Tena Trial Kit appeared first on SweetFreeStuff.com. &
&
** Free Swole Sports Nutrition Sample Packs
The post Free Swole Sports Nutrition Sample Packs appeared first on SweetFreeStuff.com. &
** FREE Citizens for Term Limits bumper Sticker
Free Citizens for Term Limits bumper Sticker
The post FREE Citizens for Term Limits bumper Sticker appeared first on SweetFreeStuff.com. &
&
** Free Domino&
From their site: &her opportunity to grab one of over 50,000 Domino’s gift cards* sometime soon. This time, we&0 in FREE pizza! Just click the ‘I Want In’ button to be notified when the fun begins. The promotion will go live sometime before September 30th, so [&
The post Free Domino& on SweetFreeStuff.com. &
* Comments
- I want in Thanks by Winnie
- I AM IN by Shellie
- I want in! Please and Thank you=) by Misti Johndrow
- I want in please by Angela rice
- Plus 20 more…
&


WITNESS LIST Public Health Committee March 31, 2005-8:00A HB 1316 For: Barker, Conni (De Pelchin Children's Center) Rush, Michael C. (Merck Vaccine Division) York, Ph.D., Laura (WYETH) Against: Richardson, Dawn (Parents Requesting Open Vaccine Education) On: Penfield MD, Susan (Texas Department of State Health Services) Sims, Jack (Department of State Health Services) Registering, but not testifying: For: Brown, MD, Ari (Texas Pediatric Society) Calvert, Raif (Texas Academy of Family Physicians) Herzog, Greg (TMA) Saxton, Josette M. (Texans Care For Children) Stuart, Charles (Blue Cross Blue Shield of Texas) On: Adams, Michele (Department Family and Protective Services) HB 1676 For: Bonner, MD, Aleta (Self) Krause, Curtis (Medimmune, Inc) Lominac, Diane (Self) Park-Jones, Christina (Self) On: Richardson, Dawn (Parents Requesting open vaccine education) Registering, but not testifying: For: Ahmed, Syed (Living Bank, Non-Profit Health Organization) Berger, Ed (SETON Healthcare Network) Berry, Jorey (March of Dimes, Texas Chapter) Brown, MD, Ari (Texas Pediatric Society) Calvert, Raif (Texas Academy of Family Physicians) Capelo, Jaime (Pediatrix Medical Group) Herzog, Greg (TMA) Whitaker, Lisa (Self) Woolbert, Lynda (Coalition for Nurses in Advanced Practice) On: Penfield, MD, Susan (Texas Department of State Health Services) HB 1677 For: Bonner, MD, Aleta (Self) Spalti-Fucik, Kathleen (Self) Registering, but not testifying: For: Berger, Ed (SETON Healthcare Network) Berry, Jorey (March of Dimes, Texas Chapter) Brown MD, Ari (Texas Pediatric Society) Calvert, Raif (Texas Academy of Family Physicians) Capelo, Jaime (Pediatrix Medical Group) Herzog, Greg (TMA) Perkins, Vicki (CHRISTUS Santa Rosa Children's Hospital) Woolbert, Lynda (Coalition for Nurses in Advanced Practice) On: Penfield, M.D., Susan (Texas Department of State Health Services) HB 2475 For: Crosby, Susan (Women In Government) On: Jones, Cindy (Department of State Health Services) Registering, but not testifying: For: Ahmed, Syed (Living Bank) Arnold, Doc (Am. Cancer Soc) Herzog, Greg (TMA) Welsh, Dinah (Texas Hospital Association) Whitaker, Lisa (Self)


Moves an increment or decrement operation inside a statement where the same variable is used. Due to the inherent possibility of side effects in this operation, this intention may alter the semantics of the modified statements.


what you see when on ecstacy
"ECSTASY" DISCUSSION GUIDE
Name some of the characters you see on television or in recent films that are drug users, especially of ecstasy. How are they portrayed? Do you think the .
http://www.pbs.org/inthemix/educators/ecstasy_guide.html
nice things to do on E! - Ecstasy
and finally bust out dancing like no one can see you.  (If you don't have a black .
http://ecstasy.org/experiences/trip65.html
Do you hallucinate on ecstasy?
If you have, what did you see? Also, how many pills did you take? I'm only 110 . View Poll Results: Do you hallucinate on Ecstasy? Voters: 442 .
http://www.bluelight.ru/vb/threads/382276-Do-you-hallucinate-on-ecstasy
Things You'll Need
- Certified copies of public records evidence in your case
Instructions
-
-
1
What do you see when you're on ecstasy
Why can't you urinate when you're on ecstasy? You can. Drink some water. Do you see stuff when you are on ecstasy? Taking ecstasy can make one see things .
http://wiki.answers.com/Q/What_do_you_see_when_you're_on_ecstasyEcstasy | FRANK
How does ecstasy (MDMA) work? . The danger then is that both Es kick in at once and you've got a double dose of effects to deal with. . See more stories. top .
http://www.talktofrank.com/drug/ecstasy -
2
Ecstasy (E) / MDMA
This means there is no guarantee that what you buy is what you get: ecstasy is often cut with other substances, some of which can be very harmful. (See below .
http://www.actoronto.org/home.nsf/pages/ecstasyEcstasy | Drug Facts Sheets
If you take a large amount of ecstasy you might: see, smell, hear or feel things that are not there (have hallucinations); feel as though you are floating; behave .
http://yourroom.com.au/Drug-Facts-Sheets/ecstasy.html -
-
3
Ecstasy Slideshow (This Is Your Brain on Ecstasy) | DanceSafe.Org
Testing kits to help you discern fake ecstasy from real MDMA are available for . Here you can see how the axon terminals, which contain serotonin, lie very .
http://dancesafe.org/drug-information/ecstasy-slideshowSTASH Vol. 2(8) - Ecstasy: Is What You See Really What You Get ...
Sep 13, 2006 . Recreational use of the illegal drug 3,4-methylenedioxymethamphetamine ( MDMA), commonly referred to as ecstasy, can result in dangerous .
http://www.basisonline.org/2006/09/stash-vol-28---.html -
4
Drug Facts | Ecstasy
Brought to you by the National Youth Anti-Drug Media Campaign. Alcohol. Bath Salts. Cocaine. DXM. Ecstasy. GHB. Hallucinogens. Heroin. Inhalants. Ketamine .
http://www.abovetheinfluence.com/facts/drugsecstasyIs Ecstasy Safe?
When you see a person on ecstasy or MDMA, you'll see them drinking a lot of water. They have to hydrate all the time. The reason for that is that specific drug .
http://www.narconon.org/drug-education/videos/is-ecstasy-safe.html
-
1
References
Resources
- Photo Credit Justice image by MVit from honolulu greek fest details


Version 1.5.2
- Change profile photo with gallery item
- Fix empty plant types & locations issue
Version 1.5.0
- Postpone reminder
- Support Italian language
- Upcomming reminders date at Today's screen
- Display the number of my plants on list view at My Plant's screen
- Setting to change the number of months about care log
- Select next reminder date on complete dialog
- Fix issue when complete reminder (iOS only)
Upcomming Features
- Weather information
- Plant database
- Weekly reminder scheduling
Old Versions


12.108. Release 0.137
General Changes
- Fix
current_date
to return correct results for all time zones.
- Fix invalid plans when scalar subqueries use
GROUP BY
, DISTINCT
or JOIN
.
- Do not allow creating views with a column type of
UNKNOWN
.
- Improve expression optimizer to remove some redundant operations.
- Add
bit_count()
, bitwise_not()
, bitwise_and()
,
bitwise_or()
, and bitwise_xor()
functions.
- Add
approx_distinct()
aggregation support for VARBINARY
input.
- Add create time to query detail page in UI.
- Add support for
VARCHAR(length)
type.
- Track per-stage peak memory usage.
- Allow using double input for
approx_percentile()
with an array of
percentiles.
- Add API to JDBC driver to track query progress.
Hive Changes
- Do not allow inserting into tables when the Hive type does not match
the Presto type. Previously, Presto would insert data that did not
match the table or partition type and that data could not be read by
Hive. For example, Presto would write files containing
BIGINT
data for a Hive column type of INT
.
- Add validation to CREATE TABLE and CREATE TABLE AS
to check that partition keys are the last columns in the table and in the same
order as the table properties.
- Remove
retention_days
table property. This property is not used by Hive.
- Fix Parquet decoding of
MAP
containing a null value.
- Add support for accessing ORC columns by name. By default, columns in ORC
files are accessed by their ordinal position in the Hive table definition.
To access columns based on the names recorded in the ORC file, set
hive.orc.use-column-names=true
in your Hive catalog properties file.


In this article, I'll show how to create unit tests for ASP.NET Boilerplate based projects. Instead of creating a new application to be tested, I'll use the same application developed in this article (Using AngularJS, ASP.NET MVC, Web API and EntityFramework to build NLayered Single Page Web Applications). Solution structure is like that:
We will test Application Services of the project. It includes SimpleTaskSystem.Core, SimpleTaskSystem.Application and SimpleTaskSystem.EntityFramework projects. You can read this article to see how to build this application. Here, I'll focus on testing.
I created a new Class Library project named SimpleTaskSystem.Test and added following nuget packages:
When we add these packages, their dependencies will also be added automatically. Lastly, we should add reference to SimpleTaskSystem.Application, SimpleTaskSystem.Core and SimpleTaskSystem.EntityFramework assemblies since we will test these projects.
To create test classes easier, I'll create a base class that prepares a fake database connection:
/// <summary> /// This is base class for all our test classes. /// It prepares ABP system, modules and a fake, in-memory database. /// Seeds database with initial data (<see cref="SimpleTaskSystemInitialDataBuilder"/>). /// Provides methods to easily work with DbContext. /// </summary> public abstract class SimpleTaskSystemTestBase : AbpIntegratedTestBase<SimpleTaskSystemTestModule> { protected SimpleTaskSystemTestBase() { //Seed initial data UsingDbContext(context => new SimpleTaskSystemInitialDataBuilder().Build(context)); } protected override void PreInitialize() { //Fake DbConnection using Effort! LocalIocManager.IocContainer.Register( Component.For<DbConnection>() .UsingFactoryMethod(Effort.DbConnectionFactory.CreateTransient) .LifestyleSingleton() ); base.PreInitialize(); } public void UsingDbContext(Action<SimpleTaskSystemDbContext> action) { using (var context = LocalIocManager.Resolve<SimpleTaskSystemDbContext>()) { context.DisableAllFilters(); action(context); context.SaveChanges(); } } public T UsingDbContext<T>(Func<SimpleTaskSystemDbContext, T> func) { T result; using (var context = LocalIocManager.Resolve<SimpleTaskSystemDbContext>()) { context.DisableAllFilters(); result = func(context); context.SaveChanges(); } return result; } }
This base class extends AbpIntegratedTestBase. It's a base class which initializes the ABP system. Defines LocalIocContainer property, that is a IIocManager object. Each test will work with it's dedicated IIocManager. Thus, tests will be isolated from each other.
We should create a module dedicated for tests. It's SimpleTaskSystemTestModule here:
[DependsOn(
typeof(SimpleTaskSystemDataModule),
typeof(SimpleTaskSystemApplicationModule),
typeof(AbpTestBaseModule)
)]
public class SimpleTaskSystemTestModule : AbpModule
{
}
This module only defines depended modules, which will be tested and the AbpTestBaseModule.
In the SimpleTaskSystemTestBase's PreInitialize method, we're registering DbConnection to dependency injection system using Effort (PreInitialize method is used to run some code just befor ABP initialized). We registered it as Singleton (for LocalIocConainer). Thus, same database (and connection) will be used in a test even we create more than one DbContext in same test. SimpleTaskSystemDbContext must have a constructor getting DbConnection in order to use this in-memory database. So, I added the constructor below that accepts a DbConnection:
public class SimpleTaskSystemDbContext : AbpDbContext { public virtual IDbSet<Task> Tasks { get; set; } public virtual IDbSet<Person> People { get; set; } public SimpleTaskSystemDbContext() : base("Default") { } public SimpleTaskSystemDbContext(string nameOrConnectionString) : base(nameOrConnectionString) { } //This constructor is used in tests public SimpleTaskSystemDbContext(DbConnection connection) : base(connection, true) { } }
In the constructor of SimpleTaskSystemTestBase, we're also creating an initial data in the database. This is important, since some tests require a data present in the database. SimpleTaskSystemInitialDataBuilder class fills database as shown below:
public class SimpleTaskSystemInitialDataBuilder { public void Build(SimpleTaskSystemDbContext context) { //Add some people context.People.AddOrUpdate( p => p.Name, new Person {Name = "Isaac Asimov"}, new Person {Name = "Thomas More"}, new Person {Name = "George Orwell"}, new Person {Name = "Douglas Adams"} ); context.SaveChanges(); //Add some tasks context.Tasks.AddOrUpdate( t => t.Description, new Task { Description = "my initial task 1" }, new Task { Description = "my initial task 2", State = TaskState.Completed }, new Task { Description = "my initial task 3", AssignedPerson = context.People.Single(p => p.Name == "Douglas Adams") }, new Task { Description = "my initial task 4", AssignedPerson = context.People.Single(p => p.Name == "Isaac Asimov"), State = TaskState.Completed }); context.SaveChanges(); } }
SimpleTaskSystemTestBase's UsingDbContext methods makes it easier to create DbContextes when we need to directly use DbContect to work with database. In constructor, we used it. Also, we will see how to use it in tests.
All our test classes will be inherited from SimpleTaskSystemTestBase. Thus, all tests will be started by initializing ABP, using a fake database with an initial data. We can also add common helper methods to this base class in order to make tests easier.
We will create first unit test to test CreateTask method of TaskAppService class. TaskAppService class and CreateTask method are defined as shown below:
public class TaskAppService : ApplicationService, ITaskAppService { private readonly ITaskRepository _taskRepository; private readonly IRepository<Person> _personRepository; public TaskAppService(ITaskRepository taskRepository, IRepository<Person> personRepository) { _taskRepository = taskRepository; _personRepository = personRepository; } public void CreateTask(CreateTaskInput input) { Logger.Info("Creating a task for input: " + input); var task = new Task { Description = input.Description }; if (input.AssignedPersonId.HasValue) { task.AssignedPerson = _personRepository.Load(input.AssignedPersonId.Value); } _taskRepository.Insert(task); } //...other methods }
In unit test, generally, dependencies of testing class is mocked (by creating fake implementations using some mock frameworks like Moq and NSubstitute). This makes unit testing harder, especially when dependencies grows.
We will not do it like that since we're using dependency injection. All dependencies will be filled automatically by dependency injection with real implementations, not fakes. Only fake thing is the database. Actually, this is an integration test since it not only tests the TaskAppService, but also tests repositories. Even, we're testing it with validation, unit of work and other infrastructures of ASP.NET Boilerplate. This is very valuable since we're testing the application much more realistic.
So, let's create first test to test CreateTask method.
public class TaskAppService_Tests : SimpleTaskSystemTestBase { private readonly ITaskAppService _taskAppService; public TaskAppService_Tests() { //Creating the class which is tested (SUT - Software Under Test) _taskAppService = LocalIocManager.Resolve<ITaskAppService>(); } [Fact] public void Should_Create_New_Tasks() { //Prepare for test var initialTaskCount = UsingDbContext(context => context.Tasks.Count()); var thomasMore = GetPerson("Thomas More"); //Run SUT _taskAppService.CreateTask( new CreateTaskInput { Description = "my test task 1" }); _taskAppService.CreateTask( new CreateTaskInput { Description = "my test task 2", AssignedPersonId = thomasMore.Id }); //Check results UsingDbContext(context => { context.Tasks.Count().ShouldBe(initialTaskCount + 2); context.Tasks.FirstOrDefault(t => t.AssignedPersonId == null && t.Description == "my test task 1").ShouldNotBe(null); var task2 = context.Tasks.FirstOrDefault(t => t.Description == "my test task 2"); task2.ShouldNotBe(null); task2.AssignedPersonId.ShouldBe(thomasMore.Id); }); } private Person GetPerson(string name) { return UsingDbContext(context => context.People.Single(p => p.Name == name)); } }
We inherited from SimpleTaskSystemTestBase as described before. In a unit test, we should create the object this will be tested. In the constructor, I used LocalIocManager (dependency injection manager) to create an ITaskAppService (it creates TaskAppService since it implements ITaskAppService). In this way, I got rid of creating mock implementations of dependencies.
Should_Create_New_Tasks is the test method. It's decorated with the Fact attribute of xUnit. Thus, xUnit understand that this is a test method, and it runs the method.
In a test method, we generally follow AAA pattern which consists of three steps:
In Should_Create_New_Tasks method, we will create two tasks, one will be assigned to Thomas More. So, our three steps are:
Here, UsingDbContext method helps us while working directly with DbContext. If this test success, we understand that CreateTask method can create Tasks if we supply valid inputs. Also, repository is working since it inserted Tasks to the database.
To run tests, we're opening Visual Studio Test Explorer by selecting TEST\Windows\Test Explorer:
Then we're clicking 'Run All' link in the Test Explorer. It finds and runs all test in the solution:
As shown above, our first unit test is passed. Congratulations! A test will fail if testing or tester code is incorrect. Assume that we have forgotten to assign creating task to given person (To test it, comment out the related lines in TaskAppService.CreateTask method). When we run test, it will fail:
Shouldly library makes fail messages clearer. It also makes it easy to write assertions. Compare xUnit's Assert.Equal with Shouldly's ShouldBe extension method:
Assert.Equal(thomasMore.Id, task2.AssignedPersonId); //Using xunit's Assert task2.AssignedPersonId.ShouldBe(thomasMore.Id); //Using Shouldly
I think the second one is more easy and natual to write and read. Shouldly have many other extension methods to make our life easier. See it's documentation.
I want to create a second test for the CreateTask method. But, this time with an invalid input:
[Fact] public void Should_Not_Create_Task_Without_Description() { //Description is not set Assert.Throws<AbpValidationException>(() => _taskAppService.CreateTask(new CreateTaskInput())); }
I expect that CreateTask method throws AbpValidationException if I don't set Description for creating task. Because Description property is marked as Required in CreateTaskInput DTO class (see source codes). This test success if CreateTask throws the exception, otherwise fails. Note that; validating input and throwing exception are made by ASP.NET Boilerplate infrastructure.
I'll test to assign a task from one person to another:
//Trying to assign a task of Isaac Asimov to Thomas More [Fact] public void Should_Change_Assigned_People() { //We can work with repositories instead of DbContext var taskRepository = LocalIocManager.Resolve<ITaskRepository>(); //Obtain test data var isaacAsimov = GetPerson("Isaac Asimov"); var thomasMore = GetPerson("Thomas More"); var targetTask = taskRepository.FirstOrDefault(t => t.AssignedPersonId == isaacAsimov.Id); targetTask.ShouldNotBe(null); //Run SUT _taskAppService.UpdateTask( new UpdateTaskInput { TaskId = targetTask.Id, AssignedPersonId = thomasMore.Id }); //Check result taskRepository.Get(targetTask.Id).AssignedPersonId.ShouldBe(thomasMore.Id); }
In this test, I used ITaskRepository to perform database operations, instead of directly working with DbContext. You can use one or mix of these approaches.
We can also test async methods with xUnit. See the method written to test GetAllPeople method of PersonAppService. GetAllPeople method is async, so, testing method should be also async:
[Fact] public async Task Should_Get_All_People() { var output = await _personAppService.GetAllPeople(); output.People.Count.ShouldBe(4); }
You can get the latest source code here https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/SimpleTaskSystem
In this article, I wanted to show simply testing projects developed upon ASP.NET Boilerplate application framework. ASP.NET Boilerplate provides a good infrastructure to implement test driven development, or simply creating some unit/integration tests for your applications.
Effort library provides a fake database that works well with EntityFramework. It works as long as you use EntityFramework and LINQ to perform database operations. If you have a stored procedure and want to test it, Effort does not work. For such cases, I recommend using LocalDB.
Use the following links for more information on ASP.NET Boilerplate:


The World Wide Web is a collection of HTML documents started in the early 1990s that now consists of 30+ billion pages. Pages are connected via links, which is how users navigate from one document to another.
HTTPHTTP is short for Hypertext Transfer Protocol. It allows users to make requests from the internet, which retrieves files from servers, which are other computers that host files such as web pages.
HTMLHTML is short for Hypertext Markup Language and is the basis of all pages on the World Wide Web. It can consist of text content (what's visible on the page), markup (the code that a computer renders as a web page), references to other types of documents such as images or videos, and links to other pages. HTML is made up of tags consisting of < and > signs to open and < / and > signs to close them. These tags can be nested.
HTML AttributesHTML tags can have multiple attributes. The anchor tag, for example, can be given a value that transforms a piece of text into a hyperlink like this one. Unlike anchor tags, image tags are void tags as they have no closing tags.
WhitespaceIn HTML, text on multiple lines renders as a single line unless you tell it to render otherwise. Some options for doing this include the BREAK tag, which is a void tag that creates multiple lines, or the P tag, which is a block, or an invisible box around the content being rendered.
HTML DocumentsAn HTML document contains a number of elements, including formatting, headers (which tell the browser such details as page title via metadata), the body (where we're currently working), and others.
Computers Aren't That BrightComputers take things ultra-literally. They can't compensate for bad programming and can fail, crash, or otherwise misbehave in the event that they're provided with bad information, unlike a human.


Stop the World Event
What is it?
A “Stop the World” event is when somebody on the Team identifies that the engagement is off-course for one reason or another. The FULL Team then works together to find a compromise that is acceptable to all and continues progress towards customer success. By the end of the “Stop the World” event, the team should:
- All be in agreement with the proposed compromise
- Identify actions or changes and owners
- Maintain good Psychological Safety1 among the Team
Why use “Stop the World” events?
- There is an aspect of the engagement that is found to be missing. A key output or outcome that supports customer success.
- A practice or an outcome needs to change based on new customer information. This change is one that would fundamentally change an output or outcome previously agreed to.
- The delivery team skillset changes for any reason that would affect customer success.
- Priority with the customer fundamentally changes the previously agreed direction of the delivery team.
- An previously agreed to input to a practice is not met or will not be met
Related Practices
- Closely related to how agile teams “Swarm” around problems to resolve them quickly
Who do you need?
- Facilitator
- Entire Team Involved
Suggested Time
- Until Consensus is reached
Difficulty
- Facilitator: Difficult
- Participants: Moderate
Facilitation Materials Needed
- Comfortable setting to hold a conversation among just team members
- Additional needs determined by the team to hold the conversation
Process Phase
Any Time


Backform takes a Backbone model and transforms it into an HTML form with Bootstrap markup. Any changes to the form are relfected back to the model and vice versa. It comes with built-in controls for input, select, radio buttons and checkbox. Backform controls are Backbone views and extensible. Backform even supports nested objects.
A Backform to edit a person. The address is a nested object. Change to see the Backbone model updated (right).
Backform consists of Backbone views. A form is a view which contains control groups which are also views. A control group is a view which renders a model attribute and captures user input. it also ensures the model and DOM are always in sync. The philosophy is very similar to Backgrid.
These are the important Backform classes:
Backform.Form
: A Backbone view which represents the FORM element.Backform.Field, Backform.Fields
: A Form contains a collection of Field models, which define the mapping of a model attribute to a form control.Backform.Control
: The ancestor class of Backform controls. A Backbone view which represents a control group (.form-group
element in Bootstrap). It implements the render
and onChange
methods required to keep the DOM and model in sync.Backform.InputControl, Backform.SelectControl, ...
: The controls themselves inheriting from Backform.Control. They can be extended or you can create your own from scratch.To create a form, you instantiate a Backform.Form view. You pass it a definition of fields. A field maps a model attribute to a form control. For example:
var person = new Backbone.Model({ id: 101, firstName: "Martin", lastName: "Drapeau" }); var fields = [{ name: "id", // The key of the model attribute label: "ID", // The label to display next to the control control: "input", // This will be converted to InputControl and instantiated from the proper class under the Backform namespace disabled: true // By default controls are editable. Here we disabled it. }, { name: "firstName", label: "First name", control: "input" }, { name: "lastName", label: "Last name", control: "input" }]; var form = new Backform.Form({ el: $("#form"), model: person, fields: fields // Will get converted to a collection of Backbone.Field models }); form.render(); // Backform.*Control views are created for each field and rendered on screen
Fields define the mapping between a model attribute and a control used to render and capture user input. When you create your Form, you can pass a list of field definitions, or a collection of Backbone.Field models. Either way, they get converted to a collection of models.
A Backform.Field can contain these options (translated to model attributes).
name
: Key of the model attribute to reference.nested
: Optional. If the model attribute is an object, nested attribute key to display (and update).label
: Optional. Control label.placeholder
: Optional. Control placeholder.disabled
: Whether the control can be edited. Defaults to false.value
: Optional. Default value when model is empty.control
: Control name or classWhen you define a field, you can pass the name of the control, or the control class. You can even inline-extend a control.
control: "input" ... control: Backform.InputControl ... control: Backform.InputControl.extend({ defaults: { type: "email" } })
Controls can support extra options. These can directly be passed in the field definition.
For example, the input control has an extra option type
which defaults to text
.
You can override this in this way:
fields = [{ control: "input", type: "email" }, ...];
Backform comes with many built-in controls. A control is a Backbone view which inherits from Backform.Control. A control is created when the form is rendered. It contains a back-reference to the Backbone.Field model allowing you access to the attribute name, and other options. Built-in controls are:
Backform.InputControl
(input
): A text input. Pass type
to change type.Backform.TextateaControl
(textarea
): A textarea.Backform.CheckboxControl
(checkbox
): A single checkbox input with true|false value.Backform.BooleanControl
(boolean
): Alias to Backform.CheckboxControl.Backform.SelectControl
(select
): Select drop-down. Pass options
to specify a list of options as [{label:, value:<value>}, ...]
.Backform.RadioControl
(radio
): Radio button inputs. Pass options
to specify a list of options as [{label:, value:<value>}, ...]
.Backform.DatepickerControl
(datepicker
): An input fill with the Boostrap Datepicker plugin.Backform.SubmitButtonControl
(submit-button
): A submit button. Pass type
to change button type.In the case you want to extend a control, or create your own from scratch, this is the anatomy of the Backform.InputControl view:
var InputControl = Backform.InputControl = Control.extend({ defaults: { // Extra options that can be passed in the field defition. type: "text" }, template: ..., // An underscore template containing the markup (see the code) events: { "change input": "onChange", // Transfer value from the DOM to the model "focus input": "clearInvalid" // Clear any errors when the user clicks inside the input (see invalid markup section) }, getValueFromDOM: function() { // How the value is fetched from the DOM return this.$el.find("input").val(); } });
Since you have a reference to the field, you can pick up any control options defined in the control class defaults
.
You can therefore, for example, define an input of type email this way:
Backform can render error validation markup à la Bootstrap.
It does not leverage the Backbone model validation
and isValid
methods, nor does it perform client-side validation, field by field.
Instead, it allows you to keep another model with errors that get rendered on the form.
This is useful for back-end validation whereby the result of a 4xx HTTP error would contain a mapping of attribute-errors.
Backform.Form accepts an optional errorModel
. It should contain the same attributes as the original model
but with error messages as values. The form will automatically listen for changes on the errorModel
to display the errors. You need only set the invalid attribute with an appropriate error message and for it to be displayed.
var model = new Backbone.Model({a: 101}), errorModel = new Backbone.Model(); var form2 = new Backbone.FormView({ el: "#form2", model: model, errorModel: errorModel, schema: [{name: "a", label: "Choose a number between 10 and 20. Press Enter to submit the form.", control: "input"}] }); form2.render() $("#form2").on("submit", function(e) { e.preventDefault(); errorModel.clear(); var number = parseFloat(model.get("a"), 10); if (isNaN(number)) errorModel.set({a: "Not a number!"}); else if (number <= 10 || number >= 20) errorModel.set({a: "Must be between 10 and 20"}) return false; });
Backform comes setup for Bootstrap 3 horizontal forms with a 4-column width for labels, and 8-column width for controls.
<form class="form-horizontal">
  First Name
  <input type="text" class="form-control" name="firstName" data-nested="" value="Andre" placeholder="" />

 ...
You can however change the layout via
Backform.*ClassName
options.
For example, this switches to a 6-6 column layout:
_.extend(Backform, { controlLabelClassName: "control-label col-sm-6", controlsClassName: "col-sm-6", });In addition, you can switch to Bootstrap 2.3 by calling the
Backform.bootstrap2
function.
It will change the class names automatically for you and call bootstrap2
functions on any control under the Backfrom namespace, as some have to change their HTML markup.
TO DO: Complete the Bootstrap 2.3 support...


| Year | Institution | Award |
|---|---|---|
| 2000-2009 | Destiny Academy | K.C.P.E certificate |
| 2010-2013 | Nanyuki High School | K.C.S.E certificate |
| 2017-present | University of Nairobi | ongoing(deffered) |
| 2020-present | Moringa School | ongoing |
This project was created while learning to create a basic
webpage using html and basic css, its a website
for a private island resort
This project was created while practising to use divs to style the page layout and to incorporate images to the same. Its about a fictional travel agency and incorporates a list of destinations both tropical and popular.
This project was as a result of practising html and css just as the rest with an addition of a sidebar for the upcoming events. It's about my favourite band and all about them.
This was my first project during my study at moringa school, it has nothing much other than practising basic html attributes such as links and css,


class Mandrill::Rejects
- Mandrill::Rejects
- Reference
- Object
Defined in:
mandrill/api.crConstructors
Instance Method Summary
-
#add(email, comment = nil, subaccount = nil)
Adds an email to your email rejection blacklist.
-
#delete(email, subaccount = nil)
Deletes an email rejection.
-
#list(email = nil, include_expired = false, subaccount = nil)
Retrieves your email rejection blacklist.
Constructor Detail
Instance Method Detail
Adds an email to your email rejection blacklist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your blacklist. Attempting to blacklist an address that has been whitelisted will have no effect. @param [String] email an email address to block @param [String] comment an optional comment describing the rejection @param [String] subaccount an optional unique identifier for the subaccount to limit the blacklist entry @return [Hash] a status object containing the address and the result of the operation
- [String] email the email address you provided
- [Boolean] added whether the operation succeeded
Deletes an email rejection. There is no limit to how many rejections you can remove from your blacklist, but keep in mind that each deletion has an affect on your reputation. @param [String] email an email address @param [String] subaccount an optional unique identifier for the subaccount to limit the blacklist deletion @return [Hash] a status object containing the address and whether the deletion succeeded.
- [String] email the email address that was removed from the blacklist
- [Boolean] deleted whether the address was deleted successfully.
- [String] subaccount the subaccount blacklist that the address was removed from, if any
Retrieves your email rejection blacklist. You can provide an email address to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them. @param [String] email an optional email address to search by @param [Boolean] include_expired whether to include rejections that have already expired. @param [String] subaccount an optional unique identifier for the subaccount to limit the blacklist @return [Array] Up to 1000 rejection entries
- [Hash] return[] the information for each rejection blacklist entry
- [String] email the email that is blocked
- [String] reason the type of event (hard-bounce, soft-bounce, spam, unsub, custom) that caused this rejection
- [String] detail extended details about the event, such as the SMTP diagnostic for bounces or the comment for manually-created rejections
- [String] created_at when the email was added to the blacklist
- [String] last_event_at the timestamp of the most recent event that either created or renewed this rejection
- [String] expires_at when the blacklist entry will expire (this may be in the past)
- [Boolean] expired whether the blacklist entry has expired
- [Hash] sender the sender that this blacklist entry applies to, or null if none.
- [String] address the sender


Abstract Mock DB Persistence (keep data in memory) with ability to test basic projections
More...
|
|
virtual async Task< T > | CreateAsync (string correlationId, T @object) |
| |
|
virtual async Task | ClearAsync () |
| |
|
virtual async Task< T > | DeleteAsync (string correlationId, string id) |
| |
|
virtual Task< DataPage< T > > | GetAsync (string correlationId, FilterParams filter, PagingParams paging) |
| |
|
virtual async Task< DataPage< object > > | GetAsync (string correlationId, FilterParams filter, PagingParams paging, ProjectionParams projection) |
| |
|
virtual async Task< T > | GetByIdAsync (string correlationId, string id) |
| |
|
virtual async Task< object > | GetByIdAsync (string correlationId, string id, ProjectionParams projection) |
| |
|
virtual async Task< T > | UpdateAsync (string correlationId, T @object) |
| |
|
virtual async Task< T > | ModifyAsync (string correlationId, string id, AnyValueMap updateMap) |
| |
|
|
virtual IDictionary< string, object > | GetCustomObjectMap (object parentObject, IDictionary< string, object > customObjectMap, string projectionField) |
| |
|
virtual void | ModifyObjectFields (object parentObject, string propertyName, object propertyValue) |
| |
|
virtual object | GetObjectFieldValue (object parentObject, string propertyName) |
| |
|
virtual bool | ContainsFilterValue (List< object > propertyValues, string filterValue) |
| |
|
|
const int | MaxPageSize = 100 |
| |
|
object | _lock = new object() |
| |
|
Dictionary< string, T > | _objects = new Dictionary<string, T>() |
| |
Abstract Mock DB Persistence (keep data in memory) with ability to test basic projections
- Template Parameters
-
| T | The class that contains "Id" property (with no dependencies to IIdentifiable). |
The documentation for this class was generated from the following file:
- src/Persistence/AbstractMockDbPersistence.cs


This vignette introduces the important topic of using data-driven covariance matries in mashr
. You should read the introductory vignette before this.
Recall the four major steps in a mash analysis:
Read in the data
Set up the covariance matrices to be used
Fit the model
Extract posterior summaries and other quantities of interest
Here we pay more attention to Step 2, which can be split into two steps:
Set up the “canonical” covariance matrices.
Set up the “data-driven” covariance matrices.
The first of these steps (“canonical” covariance matrices) is straightforward using cov_canonical
, as illustrated in the introductory vignette.
Setting up the data-driven matrices is slightly more complex, and there are multiple possible approaches. This vignette illustrates one approach.
First we simulate some data for illustration (see the the introductory vignette for more details):
library(ashr)
library(mashr)
set.seed(1)
simdata = simple_sims(500,5,1)
Although the user is free to set up data driven covariance matrices using any method that they would like, typically we suggest the following three-step strategy:
Locate some strong signals. For example, here we do this within R by running a “condition-by-condition” using mash_1by1
, but you could do this as a preprocessing step in other software - for example in eQTL studies you might instead put together a separate dataset containing the test results for only the “top” eQTL or eQTLs in each gene.
Use methods such as PCA or factor analysis on these top signals to compute some initial data-driven covariance matrices (e.g. using cov_pca
).
Use these data-driven covariance matrices as initializations for the extreme deconvolution (ED) algorithm (using cov_ed
), to get some refined data-driven covariance matrix estimates.
The ED step is helpful primarily because the second step will often estimate the covariances of the observed data (Bhat) whereas what is required is the covariances of the actual underlying effects (B), and this is what ED estimates. However, ED can be quite sensitive to initialization, and so the goal of the second step is to provide a good initialization.
If your entire data set (matrix of all tests in all conditions) is not too big (eg <100k tests say) then you can simply do this by setting up the entire data set as a mash data object (using mash_set_data
), and then running a condition-by-condition (1by1) analysis on all the data. For example, here we select the strong signals as those with lfsr<0.05 in any condition in the 1by1 analysis.
data = mash_set_data(simdata$Bhat, simdata$Shat)
m.1by1 = mash_1by1(data)
strong = get_significant_results(m.1by1,0.05)
This sets up a vector strong
containing the indices corresponding to the “significant” rows of the test results in data
. This vector is used in subsequent functions below to specify which rows of data
to use.
There are various approaches to this; here we just illustrate the simplest and quickest (but probably not the best), which is to use PCA. Specifically here we use the function cov_pca
to produce covariance matrices based on the top 5 PCs of the strong signals. The result is a list of 6 covariance matrices: one based on all 5 PCs, and the others each based on one PC.
U.pca = cov_pca(data,5,subset=strong)
print(names(U.pca))
The function cov_ed
is used to apply the ED algorithm from a specified initialization (here U.pca
) and to a specified subset of signals.
U.ed = cov_ed(data, U.pca, subset=strong)
After all this we are ready to run mash
using the data driven matrices. Remember the Crucial Rule that we must fit mash to all tests - do not use only the strong
subset here!!
m.ed = mash(data, U.ed)
print(get_loglik(m.ed),digits = 10)
From the fit we see that the fit using the data-driven covariances is not as good as when we used the canonical covariances (which was -16120.32; from the introductory vignette). This is expected for this simulation because the simulation actually used the canonical covariances!
In general we recommend running mash
with both data-driven and canonical covariances. You could do this by combining the data-driven and canonical covariances as in this code:
U.c = cov_canonical(data)
m = mash(data, c(U.c,U.ed))
print(get_loglik(m),digits = 10)
For an example with simulations that do not follow the standard canonical matrices see here.


Skip to main content
follow us on:
|
FXStreet Blog
|
Newsletter
Show navigation
FXStreet - The forex market
Log in
Sign up
09:04:06 GMT
FXStreet - The forex market
Home
Rates & Charts
TOOLS
Live Charts
Rates Tables
Trading positions
Forecast Poll
ASSETS
EUR/USD
GBP/USD
USD/JPY
AUD/USD
NZD/USD
USD/CAD
EUR/JPY
Dollar Index
Gold
Oil
SP500
News
TOOLS
Latest News
Currencies
Macroeconomics
Institutional Research
ASSETS
EUR/USD
GBP/USD
USD/JPY
AUD/USD
NZD/USD
USD/CAD
EUR/JPY
Dollar Index
Gold
Oil
Stocks
Analysis
LATEST INFORMATION
Latest Análisis
EDITORIAL SELECTION
EUR/USD
GBP/USD
USD/JPY
AUD/USD
Dollar Index
Gold
Oil
Stocks
MOST READ AUTHORS
Valeria Bednarik
Slodoban Drvenica
Kathy Lien
Gregor Horvat
Haresh Menghani
Omkar Godbole
Barbara Rockefeller
Jim Langlands
Economic Calendar
Live Video
Education
Brokers
Add pairs to list
Go to home
Rates & Charts
TOOLS
Live Charts
Rates Tables
Trading positions
Forecast Poll
ASSETS
EUR/USD
GBP/USD
USD/JPY
AUD/USD
NZD/USD
USD/CAD
EUR/JPY
Dollar Index
Gold
Oil
SP500
News
Analysis
Economic Calendar
Live Video
Education
Brokers
I'm a member
USERNAME OR EMAIL
Please enter a valid username / Please enter a valid email
Forgot your password?
PASSWORD
Log in
Keep me signed in
Sign up
IM NOT AN FXSTREET MEMBER
Log in
Sign up
Username
Password
Remember me
log in
Forgot password
or
Log in with Facebook
Log in with Google
I'm not an fxstreet member
Sign up
Enter your email address
Choose your username
Set your password
I have read and accept the
FXStreet terms and conditions
Sign up now
or
Sign up with Facebook
Sign up with Google
Already an fxstreet member?
login
Timezone
10:20 (GMT+1:00)
Change timezone
Cancel
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii
10:20 (GMT+1:00)
hawaii


Variant 1: uint64_t MapReduce::map(int nmap, void (*mymap)(int, KeyValue *, void *), void *ptr) uint64_t MapReduce::map(int nmap, void (*mymap)(int, KeyValue *, void *), void *ptr, int addflag)
Variant 2: uint64_t MapReduce::map(int nstr, char **strings, int self, int recurse, int readfile, void (*mymap)(int, char *, KeyValue *, void *), void *ptr) uint64_t MapReduce::map(int nstr, char **strings, int self, int recurse, int readfile, void (*mymap)(int, char *, KeyValue *, void *), void *ptr, int addflag)
Variant 3: uint64_t MapReduce::map(int nmap, int nstr, char **strings, int recurse, int readfile, char sepchar, int delta, void (*mymap)(int, char *, int, KeyValue *, void *), void *ptr) uint64_t MapReduce::map(int nmap, int nstr, char **strings, int recurse, int readfile, char sepchar, int delta, void (*mymap)(int, char *, int, KeyValue *, void *), void *ptr, int addflag)
Variant 4: uint64_t MapReduce::map(int nmap, int nstr, char **strings, int recurse, int readfile, char *sepstr, int delta, void (*mymap)(int, char *, int, KeyValue *, void *), void *ptr) uint64_t MapReduce::map(int nmap, int nstr, char **strings, int recurse, int readfile, char *sepstr, int delta, void (*mymap)(int, char *, int, KeyValue *, void *), void *ptr, int addflag)
Variant 5: uint64_t MapReduce::map(MapReduce *mr2, void (*mymap)(uint64_t, char *, int, char *, int, KeyValue *, void *), void *ptr) uint64_t MapReduce::map(MapReduce *mr2, void (*mymap)(uint64_t, char *, int, char *, int, KeyValue *, void *), void *ptr, int addflag)
This calls the map() method of a MapReduce object. A function pointer to a mapping function you write is specified as an argument. This method either creates a new KeyValue object to store all the key/value pairs generated by your mymap function, or adds them to an existing KeyValue object. The method returns the total number of key/value pairs in the KeyValue object.
There are several variants of the map() methods to allow for different ways to process input data. This also induces variants of the callback mymap() function.
For the first set of variants (with or without addflag) you simply specify a total number of map tasks nmap to perform across all processors. The index of a map task is passed back to your mymap() function. The MapReduce library assigns map tasks to processors; see more details below.
For the second set of variants, you specify nstr and strings which are file and/or directory names. Using these strings, a list of filenames is generated. Each filename in the list is passed back to your mymap() function which can open the file and process it.
If self is 0, then only processor 0 generates the list of filenames, and the MapReduce library assigns files to processors; see more details below. If self is 1, then each processor generates its own list of filenames and those files are assigned to that processor. Note that in the self = 0 case, it is assumed that every processor can read any file that is assigned to it. Also note, that with self = 1 you can assign files to a processor that reside on a disk local to a processor, or with a parallel disk system you can pass different strings to different processors so that each processor reads from different set of files/directories.
The list of filenames is generated in the following manner. Each of the strings is checked for whether it is a file or directory. If it is a file, it is added to the list of files. If it is a directory, the directory is opened and all the files in it are added to the list of files. If the recurse flag is set to 1, then if sub-directories are found in the directory, they are opened and the files in them are also added to the list of files (and so forth, recursively).
The readfile setting adds one additional wrinkle. If readfile is 1, then instead of adding each filename to the list, each file is opened, and filenames are read from that file and added to the list. In this mode, each file should contain contain one filename per line. Blank lines are not allowed. Leading and trailing whitespace around each filename is OK.
The number of files that are generated and processed can be accessed after the map() method is invoked, but the variable mapfilecount, e.g.
MapReduce *mr = new MapReduce(); mr->map(nstr,strings,1,0,1,mymap,NULL); int ntotalfiles = mr->mapfilecount;
The third set of variants allows large file(s) to be broken into chunks and one or more sections to be passed back to your mymap() function as a string so it can process it. Nmap is the number of chunks to generate from all the files in aggregate (not nmap chunks per file). As with the previous variant, you also specify nstr, strings, recurse, and readfile. This generates a list of filenames, the same as in the previous variant. The only difference is that no self setting is allowed, because only processor 0 does this. The specified nmap should be >= the number of files in the generated list; it is reset to the number of files if that is not the case.
For the third set of variants you specify a separation character sepchar. For the fourth set of variants, you specify a separation string sepstr. The files in the generated list of files are split into nmap chunks with roughly equal numbers of bytes in each chunk. Think of all the files concatenated together and then split into nmap chunks. For each call to your mymap() function, a chunk is read from a particular file, and passed to your function as a string, so your code does not read the file. See details below about the splitting methodology and the delta input parameter.
For the fifth set of variants, you specify an existing MapReduce object mr2 with key/value pairs, which can either be this MapReduce object or another one. The key/value pairs from mr2 are passed back to your mymap() function, one key/value at a time, allowing you to generate new key/value pairs from an existing set.
You can give any of the map() methods a pointer (void *ptr) which will be returned to your mymap() function. See the Technical Details section for why this can be useful. Just specify a NULL if you don't need this.
The meaning of the final addflag argument is as follows.
For all but the last variant, if addflag is omitted or is specified as 0, then map() will create a new KeyValue object, deleting any existing KeyValue object. If addflag is non-zero, then KV pairs generated by your mymap() function are added to an existing KeyValue object, which is created if needed.
For the last variant, if the source of KeyValue pairs (mr2) is different than the MapReduce object mr, then the KV pairs in mr2 are not altered or deleted, regardless of the addflag setting. If addflag is 0, then the KeyValue object in mr is deleted, and newly generated KV pairs are added to a new KeyValue object. If addflag is 1, then newly generated KV pairs are added to the existing KeyValue object in mr.
For the last variant, if the source of KeyValue pairs (mr2) is the same as MapReduce object mr, there are two possibilities. If addflag is 1, then newly generated KV pairs are added to the existing KeyValue object. If addflag is 0, then the existing KeyValue object is effectively replaced by the newly generated KV pairs. Note that the addflag=1 option requires the KeyValue object to first be copied. If your mymap() function will not generate any new KV pairs, then it is more efficient to use the scan() method, which simply allows you to iterated over the existing KV pairs.
In these examples the user function is called mymap() and it has one of four interfaces depending on which variant of the map() method is invoked:
void mymap(int itask, KeyValue *kv, void *ptr) void mymap(int itask, char *file, KeyValue *kv, void *ptr) void mymap(int itask, char *str, int size, KeyValue *kv, void *ptr) void mymap(uint64_t itask, char *key, int keybytes, char *value, int valuebytes, KeyValue *kv, void *ptr)
In all cases, the final 2 arguments passed to your function are a pointer to a KeyValue object (kv) stored internally by the MapReduce object, and the original pointer you specified as an argument to the map() method, as void *ptr.
In the first mymap() variant, itask is passed to your function with a value 0 <= itask < nmap, where nmap was specified in the map() call. For example, you could use itask to select a file from a list stored by your application. Your mymap() function could open and read the file or perform some other operation.
In the second mymap() variant, itask will have a value 0 <= itask < nfiles, where nfiles is either the number of filenames in the list of files that was generated. Your function is also passed a single filename, which it will presumably open and read.
In the third mymap() variant, itask will have a value from 0 <= itask < nmap, where nmap was specified in the map() call and is the number of file segments generated. It is also passed a string of bytes (str) of length size read from one of the files. Size includes a trailing '\0' that is appended to the string.
For map() methods that take files and a separation criterion as arguments, you must specify nmap >= nfiles, so that there is one or more map tasks per file. For files that are split into multiple chunks, the split is done at occurrences of the separation character or string. You specify a delta of how many extra bytes to read with each chunk that will guarantee the splitting character or string is found within that many bytes. For example if the files are lines of text, you could choose a newline character '\n' as the sepchar, and a delta of 80 (if the longest line in your files is 80 characters). If the files are snapshots of simulation data where each snapshot is 1000 lines (no more than 80 characters per line), you could choose the first line of each snapshot (e.g. "Snapshot") as the sepstr, and a delta of 80000. Note that if the separation character or string is not found within delta bytes, an error will be generated. Also note that there is no harm in choosing a large delta so long as it is not larger than the chunk size for a particular file.
If the separation criterion is a character (sepchar), the chunk of bytes passed to your mymap() function will start with the character after a sepchar, and will end with a sepchar (followed by a '\0'). If the separation criterion is a string (sepstr), the chunk of bytes passed to your mymap() function will start with sepstr, and will end with the character immediately preceeding a sepstr (followed by a '\0'). Note that this means your mymap() function will be passed different byte strings if you specify sepchar = 'A' vs sepstr = "A".
In the fourth mymap() variant, itask will have a value from 0 <= itask < nkey, where nkey is a unsigned 64-bit int and is the number of key/value pairs in the specified MapReduce object. Key and value are the byte strings for a single key/value pair and are of length keybytes and valuebytes respectively.
The MapReduce library assigns map tasks to processors. Options for how it does this can be controlled by MapReduce settings. Basically, nmap/P tasks are assigned to each processor, where P is the number of processors in the MPI communicator you instantiated the MapReduce object with.
Typically, your mymap() function will produce key/value pairs which it registers with the MapReduce object by calling the add() method of the KeyValue object. The syntax for registration is described on the doc page of the KeyValue add() method.
See the Settings and Technical Details sections for details on the byte-alignment of keys and values you register with the KeyValue add() methods or that are passed to your mymap() function.
Aside from the assignment of tasks to processors, this method is really an on-processor operation, requiring no communication. When run in parallel, each processor generates key/value pairs and stores them, independently of other processors.
Related methods: Keyvalue add(), reduce()


{{ block "top_of_page" . }}{{ end }}
We use cookies on this site to help us make it better. Find out more about cookies


Fast & Furious 7
Toggle navigation
Song List
(current)
Fan Page
Only visible on small screens!
×
Caution!
Prepare Yourself For The Best Movie Ever.
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Table cell
Option one is this and that—be sure to include why it's great
Option two can be something else and selecting it will deselect option one
Option three is checked
Option 1
Option 2
Option 3
Option 4
I'm a button
←
previous
next
→


UCAS autoSelect (ver 2.1)
Welcome!
Now the count of item(s) is:
The List of item(s):
You can add item through the inputbox and the button "Add".
And remove the last item through the button "Del".
Status:
By Ribonucleic on 2016.07.29


Marketplace
Hello again!
We've received a new inquiry for {{ listing.title }}:
Buyer: {{ buyer }} {% if not is_signed_in %} (IP: {{ request.remote_addr }}) {% endif %}
{{ message }}
Simply reply to this email if you'd like to get in contact.
Cheers,
The Marketplace Team


Dear Dry,
*Join us as we call on President Obama* [ https://www.thunderclap.it/en/projects/19746-us-abortion-policy-hurts-women ] to take executive action to ensure that women and girls all over the world have access to life-saving abortion care.
Each year, an estimated 47,000 women will die from unsafe abortion. Nearly 800 women around the world die in pregnancy and childbirth every day – 287,000 women a year, mostly in the developing world – and millions more suffer from injury, infection, or disease during pregnancy and childbirth.
*Tell President Obama to act now to help save lives and alleviate the suffering of women worldwide* [ https://www.thunderclap.it/en/projects/19746-us-abortion-policy-hurts-women ]. For over 40 years, the Helms Amendment to U.S. foreign assistance has been misapplied to block access to safe abortion care for women – even in cases of rape, incest, and life endangerment. President Obama can correct that.
The Helms Amendment prevents U.S. foreign assistance for abortion “as a method of family planning” - but it “allows” U.S. funds to help women who are survivors of rape or incest, and for those with life endangering pregnancies, to access safe abortion care.
*We are joining with many other organizations* [ https://www.thunderclap.it/en/projects/19746-us-abortion-policy-hurts-women ] to call on President Obama to stand with women and girls in the developing world. Join the Thunderclap – a way to amplify your voice on social media. The bigger the Thunderclap, the more likely it is we can change policy to allow lifesaving abortion.
[ https://www.thunderclap.it/en/projects/19746-us-abortion-policy-hurts-women ]
How can you help?
* Sign up for the thunderclap and have your voice heard for girls and women overseas.
* Post on social media under the hashtago join in, too.
 Tell as many people as you can - whether it’s through email, social media, or word of mouth. Every voice matters.
*Click here to sign up for the thunderclap [ http://org.salsalabs.com/dia/track.jsp?key=-1&url_num=2&url=https%3A%2F%2Fwww.thunderclap.it%2Fprojects%2F19746-us-abortion-policy-hurts-women%3Flocale%3Den ]*.
For women’s lives,
Eleanor Smeal
FMF President
You have received this e-mail because of your interest in women’s issues. To unsubscribe, please click on the link below.


We helped Tianyi work communicate with the school when she wanted to change to classes of a higher level. She was hesitant to communicate with the school so we helped her because she was more comfortable. We also worked with her to push her to be involved in extracurricular activities. Our staff found volunteer opportunities with women's rights groups and helped her to meet local officials and to become involved with the woman’s group at a local high ranked university. She also get admitted in NYU


Predicting German noun genders with machine learning
Built for fun using Python and Tensorflow+Keras (model details).
Try entering a German word below (doesn't have to be a real word):
Result (probability):
Built for fun using Python and Tensorflow+Keras (model details).
Try entering a German word below (doesn't have to be a real word):
Result (probability):


挚爱音乐 - Coldplay
Coldplay is my favourite band, but they are more than that to me. Their musis is like the sunshine after a dark code night, like a friend that hold your hand when you are down.
Here is a list of my favourite Coldplay songs and their awesome live performances.
 I can listen to it repeatedly literally for weeks.
The scientist
There is no way you can know that this is a love song before you read the lyrics. As always, beautiful melody and lyrics, one of the best melancholy songs.
Yellow
Yellow is the first Coldplay song that I’ve ever listened and fell instant love with it. At that time, I thought: How could they come up with another song to beat that? I’m so glad that I was completely wrong.


I used a lot of editors for coding, from Notepad++ to SublimeText and Atom (GitHub's code editor) to finally adopt VSCode, following the hype.
After using it for almost a year, I'm satisfied by it. VSCode is kinda like Atom but faster (based on my experience of Atom a year ago, things may have change in the meanwhile).
I'm not really a customization aficionado so my configuration won't blow your mind. I consider it as the configuration VSCode should have by default, so that people like me could just download it and avoid spending time on customizing it.
One nice thing with VSCode is that settings are saved as plain JSON, so let's print it rawly:
{
"window.zoomLevel": 0,
"editor.mouseWheelZoom": true,
"workbench.colorTheme": "Default High Contrast",
"extensions.ignoreRecommendations": false,
"javascript.updateImportsOnFileMove.enabled": "always",
"explorer.confirmDragAndDrop": false,
"files.associations": {
"*.html": "html"
}
}
The first parameters are here due to strange zooming default behavior of VSCode. It basically set it like Atom's one.
I didn't add the fourth by hand but VSCode suggestions are a good way to discover new plugins so left it as is. The same goes for imports but it is convenient to avoid spending time on renaming files by hand.
The drag and drop configuration removes the confirmation modal when moving files in the file tree. It could be dangerous but since I use git for everything, it do not care accidentally messing up my folders.
VSCode tends to detect file types correctly out of the box except for my blog's HTML files (yes, I write my blog posts in raw HTML). I don't know why but adding that line fixed the issue.
Working with VSCode requires installing a few extensions.
Here are the various extensions I had to install to work with the various languages I use:
I had to install Duplicate action to be able to duplicate files/folders in the file tree view...
Git History add Git views in VSCode. I prefer using CLI most of the time but it is sometimes useful for a clearer view of the repository state.
VS Live Share is theorically great but in practice we tried it once and reviews finally ends up IRL since way more convenient.
Here is the plain list:
[
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+t",
"command": "workbench.action.tasks.test"
},
{
"key": "ctrl+l",
"command": "expandLineSelection",
"when": "textInputFocus"
},
{
"key": "ctrl+i",
"command": "-expandLineSelection",
"when": "textInputFocus"
},
{
"key": "ctrl+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+down",
"command": "-editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+up",
"command": "-editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+alt+f",
"command": "editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+i",
"command": "-editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+alt+f",
"command": "editor.action.formatSelection",
"when": "editorHasSelection && editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+k ctrl+f",
"command": "-editor.action.formatSelection",
"when": "editorHasSelection && editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+k",
"command": "workbench.action.terminal.clear"
}
]
ctrl + shift + d is for duplicating a line like in Atom's (and many other editors) defaults. The same goes for ctrl + l to select a line, ctrl + t to run tests, ctrl + down/up to move selected lines and ctrl + alt + f to format the current file. The last shortcut is ctrl + k that allows to empty the integrated terminal's buffer to fit the native terminal custom configuration I set up since I'm used to the Mac cmd + k shortcut.
That's it! I hope you find this post helpful and feel free to share yours.
Edit: Found out that you can [recommend extensions](https://github.com/ChtiJS/chtijs.francejs.org/blob/master/.vscode/extensions.json) directly in your project's repository. This is a really nice way to onboard you teammates to your projects.


A Minimal Distributed Objects connection. Example;
dateServerCon := MDOConnection clone setHost("<IP_ADDRESS>") setPort(8123) connect writeln("date from date server: ", Date fromNumber(dateServerCon currentDate)) dateServerCon closeSee the docs for MDOServer for the DateServer code. A MDOConnection will pause calling coroutines until the response is received. Mutliple requests can be sent before a single request returns if they are sent from separate coroutines. | ||
|
|


mutex_unlock(m, @optional mn = false, timeout = false)
Unlocks the mutex m
by making it unlocked/not-abandoned.
It is not an error to unlock an unlocked mutex and a mutex that is owned by any task.
If supplied, mn
must be a monitor object. The current task is
blocked and added to the monitor before unlocking the mutex; the task can unblock at any time but no later than
when an appropriate call to monitor_notify
or
monitor_broadcast
is performed, and no later
than the timeout
(if timeout is supplied). If there are tasks waiting to lock
this mutex, the scheduler selects a task, the mutex becomes locked/owned or
locked/not-owned, and the task is unblocked. Mutex_unlock returns false
when
the timeout is reached, otherwise it returns true
.
If provided, timeout
should be an exact or inexact real number representing a relative time in seconds from the moment
mutex_unlock
was called.
// updating shared state without a data race:
let x = 0
let mx = mutex()
function incx()
{ mutex_lock(mx)
x = inc(x)
mutex_unlock(mx) }
!incx()
!incx()
x
// 2


Best viewed in pop-out mode to see location changes. Click blue button on the right.
Abstract State Example
Go Back to List


meteorite-landings
Back to visualizations
Fork me on GitHub
Occurrences Map
Occurrences Map: place of occurrence, mass and type of meteorites
Reset Map


This is a simple day planner app that helps me stay organized through my
busy day. I have to ensure I have enough time for work, class, homework, and any other ad-hoc
things that happen in everyday life!


--- layout: page title: "About" description: "DieSheep" header-img: "img/2.jpg" multilingual: true ---


--- layout: post title: Blogging platform Posterous to shut down on April 30th | The Verge categories: [] tags: - posterous status: publish type: post published: true meta: _original_post_id: '' _original_import_author: John Duprey author: ---
Farewell Posterous. It was fun while it lasted...
I will be investigating new homes for my personal blog.. perhaps Tumblr.. perhaps Squarespace? Any other suggestions?


{% extends 'layouts/base.html' %} {% set endpoints = [ 'main.fourthPage' ] %} {% block content %}
Reactions
Mechanisms


Barcoder
OD N D8 S2 ZT JF I8,1 Q2190,24 q304 B43,2000,0,UA0,2,6,140,B,"023012900517" A79,1450,3,2,1,1,N,"INGREDIENTS: (FILLING:CABBAGE,SHRIMP,SOYBEAN OIL,SESAME OIL,ONION,CHIVE,WHEAT STARCH,GINGER,SALT,SUGAR,MODIFIED" A95,1450,3,2,1,1,N,"TAPIOCA STARCH,MIRIN,VEGETABLE POWDER) DOUGH:WHEAT FLOUR,MODIFIED TAPIOCA STARCH,SALT,WATER) " A126,1450,3,2,1,1,N,"CONTAINS: SHELLFISH,SOY,WHEAT" A24,1250,3,3,2,1,N,"DUMPLINGS" A30,545,3,1,1,1,N,"<>< NO RAW USED" A250,1250,3,3,2,1,N,"NET WT. 6 OZ. (170g)" A250,545,3,3,2,1,N,"$4.12" P1
Create barcode
Print


Guess the Number!
Are you lucky enogh?
RULES:
> Choose a number between 1-100
> You only have 5 attempts per turn
> You have 30 seconds to guess
guess
Restart
your attempts...
TIMER:
30


These are the Top 10 UK coastal towns at risk of collapsing into the sea in 20 years
The map predicts that the equivalent of two football pitches of the Happisburgh area in Norfolk could be lost over the next 20 years
by Shivali Best, Amardeep BasseyAlarming new data outlining the extent of coastal erosion in the UK shows that 7,000 homes will fall into the sea within this century.
From Brighton to Whitby, the UK's coastline is famous for its stunning seaside towns and cities, but some may end up lying underwater within a century from now.
A concerning new interactive map has revealed which of these sites are at risk of being wiped out iif urgent action isn't taken.
The map was developed by confused.com using data from the Environmental Agency, which predicts the shocking speed of erosion on England’s coastline, reports the Mirror .
Experts found that the east coast is being hardest hit, with the erosion rate the fastest in Yorkshire and the Humber, where 56 per cent of the coastline is at risk.
Meanwhile around a third of the coast in the south of England is being actively eroded — threatening such areas as Norfolk, Suffolk and East/West Sussex.
Tom Vaughan, Head of Home at Confused.com said: “Coastal erosion has become one of the most worrying issues for UK homeowners in seaside towns.
"Our research highlights the increasing risk that many coastal residents are facing, to the point where some are ultimately looking at losing their homes over the next 20 years.
“Homes on the coastline have always been popular, especially in the likes of Yorkshire and East England where views are second to none.”
Here’s an overview of the four key areas identified as being at risk, scroll down for a full list.
1. Happisburgh, Norfolk
The map predicts that 97 metres - the equivalent of two football pitches - of the Happisburgh area could be lost over the next 20 years.
And in just 50 years, the map predicts that 150 metres of this area will have disappeared due to coastal erosion.
2. Kessingland, Suffolk
Kessingland in Suffolk is home to over 18,000 homes, but is predicted to lose 70 metres of its coast in the next 20 years.
Meanwhile, in 2069, a huge 175 metres of land is predicted to have been washed away, including land home to farms, holiday parks and houses.
3. Hornsea, East Riding of Yorkshire
Hornsea is the third most-likely area to be affected by coastal erosion in the next 20 years.
Coastal erosion is already swallowing up around four metres of land even year, but the map predicts a loss of 68 metres of land by 2039, and 171 metres of land by 2069
4. Sunderland, Tyne and Wear
Finally, the map predicts that Sunderland will be hugely affected by coastal erosion.
It suggests that 40 metres of the coast will be lost in the next 20 years, and 100 metres by 2069.
Confused.com said: “Looking at a satellite view, this town may not feel the effects of the creeping coastline in the near future. However, in 100 years’ time, it could interfere with the nearby road and rail links, causing transport issues for residents and commuters passing through.”
10 towns most at risk
- Happisburgh, Norfolk
- Kessingland, Sufflok
- Hornsea, East Riding of Yorkshire
- Withernsea, East Riding of Yorkshire
- Sunderland, Tyne & Wear
- Filey, North Yorkshire
- Camber, East Sussex
- Pevensey Bay, East Sussex
- Shoreham-By-Sea, West Sussex
- Bognor Regis, West Sussex


CSSE 120 Introduction to Software Development Winter term, 2019-20 (aka 202020)
BEFORE this session, for each of the following videos or reading:
Quiz on Event Driven Programming and Tkinter.
You can either:
Bring your solution (and questions about it) to class.


A new approach to Human Machine Interface which is a mixture of arduino hardware and software with acceleration sensors. Workshop Date : 6th and 7th February, 2016 Registration Fee : Rs.6000/-(Team of upto 5 Members)


The java.awt.event.MouseListener
is notified for (among other things) MOUSE_PRESSED, MOUSE_RELEASED and MOUSE_CLICKED events. The first two always work great. But MOUSE_CLICKED events are only triggered after a MOUSE_PRESSED and MOUSE_RELEASED event occur at the same (x,y) location.
Requiring all events happen at the same (x,y) has become a problem, though. In the same way that we need MouseSmoothing to smooth out the natural tremors in our hand movements, we need to allow for the possibility that users may move the cursor a few pixels and still be trying to "click" something. This relates to both new(ish) technologies for cursor control (such as touchscreens) and to accessibility (such as hand tremors).
The ClickSensitivityControl
class provides a static install()
method that creates a universal event listener that identifies and compensates for this issue.
In this demo you can see this in action when you interact with "Widget B". By contrast "Widget A" explicitly disables the ClickSensitivityControl
, so the events it receives are the default events the JVM normally creates.
As an aside: it's worth noting that AbstractButtons
do not rely on MOUSE_CLICKED events. They have their own complex interaction model involving arming buttons. The ClickSensitivityControl
only affects logic listening for MOUSE_CLICKED events, such as the BasicTreeUI
.
The ClickSensitivityControl
adds a AWTEventListener
for MouseEvents
. When a MOUSE_PRESSED, MOUSE_DRAGGED or MOUSE_RELEASED event comes in it is logged. Then we wait a beat (using invokeLater(..)
and see if a corresponding MOUSE_CLICKED event comes in. If it does not, then we generate our own MOUSE_CLICKED event and post it to the event queue.
This implementation should safely handle the possibility that some other entity may also try to "fix" (or at least change) this going forward. If something else generates the MOUSE_CLICKED event: great! If not: we're ready to do it ourselves.
At any point if the user triggers a MOUSE_DRAGGED event that strays too far from the MOUSE_PRESSED location then the deal's off: the ClickSensitivityControl
will never generate a MOUSE_CLICKED event. (To test this: set the click tolerance to 10 pixels, then click "Widget B", move the mouse 20 pixels, then move the mouse back to your starting point: you shouldn't see a MOUSE_CLICKED event.)


{{< layout-photo-checker}} {{$pageTitle}}Which age group describes you?{{/pageTitle}} {{$header}}
The photo check will allow for the different rules for photos of children under 6 years.
{{#radio-group}}age-group{{/radio-group}} {{#input-submit}}{{/input-submit}} {{/form}} {{/ hmpo-partials-form}} {{/content}} {{/ layout-photo-checker}}


A nonencapsulated package is a package declared without the prefix encapsulated. Also large encapsulated packages, containing protected declarations, can be internally structured into nonencapsulated packages.
In the example below, the encapsulated package Blocks has been internally structured into three nonencapsulated packages Interfaces, Continuous, and Examples that all can access the protected type MySecret.


. ± . denudation depth exposure production surface rate concentrations profiles rates ages EM-- profile rock samples cosmogenic erosion (Fig. Earth sample EW- model {border-style ± (Table EW-- bedrock values Alps high inheritance px;} results used using #ffffff;} measured EM- time Quat. Table modelling range Geomorphology attenuation muon nuclide . × Geochronol. Supplement based data information maximum total Sci. TCN apparent calculated low minimum (see EM-, Lett. Planet. inherited modelled shielding Fig. Res. S). age chemical concentration cut-off fall kyr length limestone nuclides parameters headwall possible sampling site Apparent Carlo Monte Schlunegger Stone alpine approach close corresponding in-situ large lowest mountain net px; scenario sites {font-family Alpine Cosmogenic Eiger Surf. cumulative font-size includes near significant situ steep vertical (MC) AMS Central European Figure Geophys. However, Ivy-Ochs Supplementary Swiss average deepest distributions double; geological local material modeling muons occurrence processes profiles. reported resulting samples, scaling sediment simple spallation walls (Supplement Beam Geol. Geological Landforms MEAN MEDIAN Max Min Phillips Production STD Sample University [°] age, ages, assuming assumption border-color border-width calibration catchment cliffs composition confidence considering correction cover dating density depths effects employed estimate estimates face fast glacial history independent inferred input interpretation interval isotope larger long-term lower mean measurements mechanisms muogenic neutron patterns profiles, ranges ranging selected simulations single solid; space specific surfaces thermal tunnel uncertainty value weathering yield {font-style {font-weight Akçar Alps) Alps, CRONUS-Earth CRONUScalc Commons Creative D.M. Delunel Dunai ETH EW-, Methods Process. Surface account agreement averaged bold calculation case cliff code compared concentrations. considered content courier; deeper denudation, derived different dissolution em; epithermal exclude exposure, factor headwalls higher implications infer lengths levels mass max. mechanism method modeled n/a neutrons point process produced provided pt;} railway recession related relief result runs sampled scale significantly similar sites, solution standard starting state steady study test thermochronology topographic tunnels uncertainties use zero ± cm


Method:
Make an XMLHttpRequest to the server for XML encoded rows of data and then transform it by loading another XML document (an XSLT style sheet) for the built-in transformation engine to use. The overhead of an extra request is non-trivial for small data sets where the extra time may dwarf the transformation time itself.
The transformation step forks based on browser. On IE it's possible to transform the document to a string which is then injected using innerHTML. On other browsers the document is transformed into a DOM DocumentFragment which is then re-parented into the page since the XSLTProcessor class does not provide a simple "transform to string" API.
Results:XML is piggy, but by offloading the XSLT transform onto native code, we can perhaps do better than script-based transformations...right?
Ish.
For large numbers of rows, offloading the overhead of client transformation to native code shows dramatic speed gains. For instance, in Firefox 3.0 the total time to transform 5000 rows via XSLT is roughly half that of the same transform done in script. As scripting engines get faster, this delta may close, but XSLT is likely to remain competitive.
At lower row counts the inherent disadvantages of loading data in XML and pulling in a separate style sheet begin to show. In tests with 500 rows XSLT still maintains a slight edge over JSON but the advantage is minimal and neither are quite as fast as server-generated HTML.
If your data is already in XML, you have a lot of it, and need to transform it to a static rendering then XSLT can't be beat. But you'll need to learn XSLT. Oof.