Parked
Parked
I was always a huge fan of James Joyce’s Dubliners. If I didn’t have to worry about money, I would live my life in pursuit of writing the greatest collection of short stories on life and love I was capable of.
In 2012, during a rough patch in my life, I decided to partner with a friend to publish a book. The stories there were born from my own experiences living and loving in Toronto, and while none of them are very good, they are all to me very meaningful. This is one, in particular, that I remember fondly and painfully.
You can find the full book, His Toronto, on the iBooks Store.
“So, here’s what we’re going to do,” he said with a smirk. They stood together, thirteen floors above, looking out over the city. “We’re going to play a game. We’re going to go for an epic walk together, and we’re going to search the city for a cool little memory. We’ll each find one, and we’ll each write a little story about it. Sound like fun?”
 Who is this guy, she thought, and how does he do this?
“Okay. So I’m going to try not to lead to us places where I already know there’s great stuff. There are some really great graffiti spots…”
“No,” he retorted. “We’ve got to find something more unique than that.
He motioned to the city around them, visible in all its glory from the spanning glass windows that encased his condo. It stood proudly, with occasional clean-lined obelisks rising high into the sky and humble hovels dotting the streets between.
With the sun beginning to set, the two began their adventure. The talk of the walk was exploratory, as the two began to delve deeper into themselves, souls ajar but not yet agape. Cautiousness abound as the exchanged continued, neither wanting to prematurely open the floodgates that would lead to triumph or tragedy. It was a dance that had gone on for months and a dance that might continue for months further.
Their walk took them on a tour of a nearby borough as they moved from side-street to side-street in the hopes of escaping the main routes. The conversation ebbed and flowed naturally, and to his delight, it was earnest and frank — enlightening.
After a few hours and with the night’s close quick approaching, the two cut through Kensington Market. As they traveled through the area, they came upon a monument of sorts in the form of a broken-down car. He stopped to observe the site as strangers streamed by.
Producing his phone from his pocket, he carefully framed the picture. The car lay in rest, dull silver paint slowly growing duller, with its front axis up on blocks. Masking its age was the plethora of graffiti, which gracefully hid the aluminum body’s wrinkles and scabs. From the inside, two evergreen trees sprouted, escaping the windshield’s mock canopy in search of the sunlight provided by the sole orbiting celestial body, a street lamp.
He began to wonder what the story could be. Perhaps a man’s long journey to the city from some far away place ended here, and his car was left as a memorial to his journey. Perhaps it was the home of a street artist who worked diligently to bring color to our otherwise-gray world. And perhaps it was just an abandoned car that the locales decided would make for a great canvas, a showcase of Kensington’s flower power sensibilities.
It didn’t matter. The story had already been written for him from the moment she arrived that night. As he snapped the picture, he spoke to himself aloud.
“This might be the one.”
But she was out of earshot, already moving on down the street amongst the other passers-by.


{tag_addtofavorites,add_Image, remove_Image} | Add item to favorites list. Optionally customize to display your own custom image for adding and removing. |
{tag_anniversarytitle} | Title of anniversary date relevant to each recipient (use with Anniversary 1-5campaigns only) |
{tag_deliverydate} | Outputs the date on which the campaign will be sent. Can be used in the campaign subject |
{tag_recipientPasswordResetLink} | Hyperlinks to the password reset form. |
{tag_recipientemail} | Email address of the recipient |
{tag_recipientFirstName} | First name of the recipient (replaces with 'Friend' if first name is empty) |
{tag_recipientLastName} | Last name of the recipient |
{tag_recipientname} | Full name of the recipient (replaces with 'Friend' if full name is empty) |
{tag_recipientpassword} | Password of the recipient. Use to login to a Secure Zone - DEPRECATED - For security purposes, passwords are no longer sent |
{tag_recipientPasswordResetLink} | Link for user to reset/update existing password |
{tag_recipientusername} | Username of the recipient. Use to login to a Secure Zone |
{tag_recipientExternalID} | ExternalID of the recipient (specified when importing contacts only). |
{tag_siteurl} | URL to your public website |
{tag_siteUrlEncoded} | encoded URL to your public website |
{tag_tellafriend} | Tell a friend about this item. NOTE: you can customise the link text that tag renders using this method {tag_tellafriend,YourCustomText} |
{tag_unsubscribe} | Hyperlink to enable recipients to opt-out of all future newsletters. This tag is mandatory. NOTE: you can customise the link text that tag renders using this method {tag_unsubscribe,YourCustomText} |
{tag_unsubscribeurl} | URL to the opt-out all newsletters page
|
{tag_unsubscribelist} | Hyperlink to enable recipients to unsubscribe from the list associated withthiscampaign. The customer will continue to receive other newsletters. NOTE: you can customise the link text that tag renders using this method {tag_unsubscribelist,YourCustomText} |
{tag_unsubscribelisturl} | URL to unsubscribe from the list associated with this campaign page |
{tag_viewinbrowser} | View this email in browser hyperlink. NOTE: you can customise the link text that tag renders using this method {tag_viewinbrowser,YourCustomText} Also note, if you customize the text from "Unsubscribe" to something else, the "Unsubscribe" link will automatically be appended to the bottom of your newsletter |
{tag_viewinbrowserurl} | View this email in browser URL |


Voter Influence Documentation Content
BACKGROUND
The electoral college was created in the US for a couple of reasons. The first purpose was to create a buffer between population and the selection of a President. The second as part of the structure of the government that gave extra power to the smaller states. (https://www.historycentral.com/elections/Electoralcollgewhy.html)
Consequently, although individuals vote during the elections, the American popular vote is not a direct factor when it comes to the elected U.S. President and Vice President.
About the Electoral College:
• 538 electoral votes in the country
• 270 needed to win the election
• 538 is made up of ….
o 438 … 1 vote for each member of the US House of Representatives
The distribution of representatives allocated to each state is evaluated every 10 years, with a minimum of 1 congressman per state.
o 100 … 1 vote for each senator
Elections Results:
• 5 times the winner of the electorate did not win the national popular vote
o Most recently in 2016 and 2000
o The others occurred in 1888, 1876 and 1824
Electors:
• Are not required to vote for the person who won their states election.
• Are not required to vote at all; have the option to abstain.
o 7 such voters in 2016
• Are subject to submitting the wrong name / typos.
TEAM NAME
The population vs. the influence ratio for the state of Florida.
GOAL
This project helps shed some light on the true voting influence states have in Presidential elections for the last year of the 20th Century to present day.
OBJECTIVE
To tell a story, through data visualizations, regarding voter influence in the U.S elections. Our focus will include a dashboard. This will show the variance in weighted votes from different states and the impact they carry in presidential elections due to the electoral college process.
In addition, this project will demonstrate a “real time” voting process during the class presentation with user interaction.
This project will include Python Flask powered by RESTful API, HTML/CSS, JavaScript, and MySQL.
This project includes a dashboard page with multiple views all updating from the same data.
ETL PROCESS
Extract
• Data for this project was acquired from the following websites:
https://www.infoplease.com/history-and-government/us-elections
https://transition.fec.gov/pubrec/fe2016/federalelections2016.xlsx
https://www.archives.gov/federal-register/electoral-college/votes/index.html
• We extracted spreadsheets into a comprehensive workbook and saved them to independent CSV files.
• Extracted independent data for election years 2000-2016 to include (but not limited to) state population and electoral votes (senators and house seats) and election winners.
• Project included over 100 records.
Transpose
• Datasets contained more columns than we needed, so we opted to only stage a subset of total data.
• Created import table structures to store the raw acquired data.
• Created relational table structures eliminate redundant information and enforce referential integrity.
• Created appropriate DML statements to transition the data form the import tables to the relational structures.
• Created logical views to hide join complexity.
Load
• Created presentation views to transform the results into how we wanted the data rendered in the flask site.
•• Created flask presentation table to simplify the logic within the flask application (allow native reflection by SQLAlchemy).
FINAL VISUALIZATION
Final visualization includes at least three views
Project will include some level of user-driven interaction (e.g. menus, dropdowns, textboxes, etc.)
Project includes at least one JS Library not covered in class such as the “full screen control” that is added to map.
PROBLEMS AND CHALLENGES
• All data representing US election electoral and popular votes are not accurate. We found data that had incorrect winners on one site.
• Working with multiple files was challenging when merging all programs due to different computer systems.
• 2016 presidential popular votes were not as easy find online as anticipated.
OVERALL ASSESSMENT AND RECOMMENDATIONS
• The top 4 states in by population have close to 20 million people and hold a total of approximately one third (33%) of the U.S. population.
• Despite the population, these states (California, Texas, Florida and New York) have approximately one and a half (1.5) electoral vote per million people.
• Keep in mind, each state gets 2 senate votes in as it pertains to the electoral college; therefore, the house votes has the biggest influence on the votes in regard to the large states.
• There are a couple of states, worth noting, that visually have close to the same population and influence (South Carolina and Kentucky) on the dual line chart.
• Those states with the minimum number of electoral votes (Montana, Delaware, South Dakota, North Dakota, Alaska, Vermont, and Wyoming) have low population but have the highest influence ranging from 3 votes per million to 5 votes per million). These states have the high voter influence.
Options for Change
• Eliminating electorate in favor of popular vote
o Would level the playing field and every vote would have the same weight no matter which state the voter resides.
o Would encourage a higher voter turnout as each vote would now carry more weight.
o Would require encourage candidates to focus on the county at large and not just “swing” states which have tendencies to flip from one national party to another.
• Retain electorate concept; but eliminate the winter takes all approach within each state.
o Have each congress district cast its own regional winner / vote.
o Would encourage higher voter turnout.
o Open question: How would the 2 senator votes be cast?
Potentially eliminate the senator votes altogether.
The con of this approach is votes in small states would still weigh more than others; but not to the same influence as in the current system
• Existing system discourages those in “fixed” party states (those which historically always vote for the same national party) from going to the polls.
o A republican in California has no bearing on the election in the winner takes all approach. Same can be said for a Democrat in Texas; the outcome is already determined prior to voting taking place.
Based on the past 5 elections; 70% of the electorate votes are already predetermined to “fixed” states.
• 37 states
81 electorate votes are associated with moderate swing states (those which have votes differently in 1 election of the 5.
• 7 states
81 electorate votes are associated with true swing states (those which have votes differently in 2 of the 5 elections.
• 6 states
CONSIDERATIONS FOR POSSIBLE FUTURE ENHANCEMENTS
Understand the voter turnout impact by gender, economic status and age.
Were there any variables that could have been evaluated that might have impacted Americans from voting (i.e., weather/road constraints, voting equipment challenges, rezoning of voting locations, etc.)?
Does data from early voting or absentee data impact or persuade the popular vote on voting day (i.e., if your candidate is in the lead, then you might stay at home and not vote at all)?
Evaluate the voter’s employment status. Analyze data for voters employed and unemployed to determine if the traditional first Tuesday after the first Monday is a good day to cast votes. Does the work day impact voting?


Polish PM: questioning NATO treaty a threat to collective defence
WARSAW (Reuters) - Poland’s Prime Minister Mateusz Morawiecki said on Tuesday any moves to question the collective defense guarantee included in the NATO treaty were a threat to the future of the European Union and the military alliance.
Speaking in parliament following the Oct. 13 parliamentary election that handed a new term in office to the nationalist Law and Justice (PiS) party, Morawiecki also said the EU should continue to work closely with Britain after it leaves the bloc.
French President Emmanuel Macron told The Economist earlier this month that NATO was experiencing “brain death”, citing a lack of coordination and U.S. unpredictability under President Donald Trump.


Late coach Herbert Addo's wife installed 'development queen' of Abotakyi-Akuapem
Newly-installed ‘Abontendomhemaa’ of Abotakyi-Akuapem, Nana Akua Animaa 1 has promised to lead the charge for women empowerment and gender equality in the township.
Known in private life as Gifty Addo, Nana Akua Animaa assured the elders and members of the township of her commitment to championing the .
While expressing gratitude to the chiefs and elders for the honour done her, Gifty Addo who was the wife late football coach Hebert Addo said that she is committed to the development of the town and will play her part.
“It’s an honour and at the same a big task for me. As an ‘Abontendomhemaa, I will do everything within my power continue with my vision of women empowerment. Abotakyi is a land with great history but along the line our history could not sell us but today history has began’, he said.
At a convivial ceremony on Saturday, Gifty Acquah Addo was honoured with the ‘Abontendomhemaa’ for her selfless service to the town.
She is expected to serve as a role model for young ladies in the town and also project the township.
The chief of Abotakyi-Akuapem Okokyekyerekro Kwame Sakyi Ababio II advised his fellow chiefs to live exemplary lives.
“Chieftaincy institution is a highly institution recognized in Ghana. Nowadays there are so many chieftaincy disputes in the country all because some of the royals who are supposed to lead by good example have failed. Other people have used money to enter into the institution which does not auger well for the institution”, he said.


Express Scripts
Registry Entry Configuration
An application for managing registry entry configuration entries
Loading...
Loading...


Enter food 1:
Enter food 2:
Enter food 3:
Enter!
×
Feed your goat!
What did you eat today?
Enter!


IFResource Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | IFResource.h IFResource.m |
Overview
An object that can be used to represent the value returned by an internal URI. Allows access to different representations of the same underlying value.
data
The resource data i.e. the value referenced by the resource’s URI.
@property (nonatomic, strong) id data
Discussion
The resource data i.e. the value referenced by the resource’s URI.
Declared In
IFResource.h
uri
The URI which returned this resource.
@property (nonatomic, strong) IFCompoundURI *uri
Discussion
The URI which returned this resource.
Declared In
IFResource.h
uriHandler
The URI handler used to resolve this resource. If the resource has been resolved using a URI in a scheme that supports relative URI references, then this URI handler’s scheme context will have this resource’s absolute URI as the reference URI for the scheme. What this means in practice is that if the resource data contains relative URI references in the same scheme then those URIs will be interpreted relative to this resource’s URI. This allows, for example, a configuration to be instantiated from a resource’s data, and for that configuration to contain file references relative to the configuration’s source file.
@property (nonatomic, strong) id<IFURIHandler> uriHandler
Discussion
The URI handler used to resolve this resource. If the resource has been resolved using a URI in a scheme that supports relative URI references, then this URI handler’s scheme context will have this resource’s absolute URI as the reference URI for the scheme. What this means in practice is that if the resource data contains relative URI references in the same scheme then those URIs will be interpreted relative to this resource’s URI. This allows, for example, a configuration to be instantiated from a resource’s data, and for that configuration to contain file references relative to the configuration’s source file.
Declared In
IFResource.h
– asBoolean
Access the resource’s boolean representation.
- (BOOL)asBoolean
Discussion
Access the resource’s boolean representation.
Declared In
IFResource.h
– asDefault
Access the resource’s default representation.
- (id)asDefault
Discussion
Access the resource’s default representation.
Declared In
IFResource.h
– asImage
Return the resource as an image.
- (UIImage *)asImage
Discussion
Return the resource as an image.
See Also
Declared In
IFResource.h
– asJSONData
Access the resource’s JSON representation.
- (id)asJSONData
Discussion
Access the resource’s JSON representation.
See Also
Declared In
IFResource.h
– asNumber
Access the resource’s number representation.
- (NSNumber *)asNumber
Discussion
Access the resource’s number representation.
Declared In
IFResource.h
– asString
Access the resource’s string representation.
- (NSString *)asString
Discussion
Access the resource’s string representation.
Declared In
IFResource.h
– asURL
Access the resource’s URL representation.
- (NSURL *)asURL
Discussion
Access the resource’s URL representation.
Declared In
IFResource.h
– asData
Return the resource as an NSData object.
- (NSData *)asData
Discussion
Return the resource as an NSData object.
Declared In
IFResource.h
– asRepresentation:
Return the named resource representation.
- (id)asRepresentation:(NSString *)representation
Discussion
Return the named resource representation.
See Also
<IFTypeConversions> for a list of supported representation names.
Declared In
IFResource.h
– externalURL
Return an external URL for the resource.
- (NSURL *)externalURL
Return Value
Returns nil for the standard resource type.
Discussion
Return an external URL for the resource.
Declared In
IFResource.h
– refresh
Refresh the resource by resolving its URI again and returning the result.
- (IFResource *)refresh
Discussion
Refresh the resource by resolving its URI again and returning the result.
Declared In
IFResource.h


Gardaí ask for help to find missing Cavan teenager
by By Digital Desk staffGardaí in Co. Cavan are searching for a teenager who has been missing from there for two days.
Reece Murphy, aged 17, was last seen in the Ballyjamesduff area of the county on Wednesday.
He is described six foot tall with a of slim build and black hair.

Anyone with any information that can help in finding Reece is asked to contact Gardaí in Bailieboro on<PHONE_NUMBER>, the Garda Confidential Line on 1800 666 111 or any Garda Station.
READ MORE
Girl, 11, among 30 people honoured at National Carer of the Year Awards


--- title : About Me layout : default blurb : Who I am and what I do. keywords : android, work, html, javascript, travel, crowdmap, sdk, mapping, android, ushahidi, hdr, flickr, henry, addo, sendai, japan, ghana, geek, software, open date : Nov 21, 2013 ---
I am a software developer from Accra, Ghana currently living in Sendai, Japan. I have a strong passion for mobile development, web development and open technologies. I have been in this industry for close to 7 years now and I have gained so much experience. I have a proven track record of successful projects. I am capable of working independently and I do this well with a distributed team.
I am currently a senior software developer at Ushahidi, a non-profit technology company that focuses on building tools for data collection, visualization and interactive mapping.
I have an interest in meeting people and I love to connect people with the right resources and the support they need.
I am a geek and a husband. I have practised the art of juggling between the two.
This year my wife and I moved from Ghana to live in a bike-friendly city of Sendai, Japan. I commute to work and through the city by bicycle. I only use mass transit when it's necessary.
I have a keen interest in being a good photographer. I finally faced reality and invested in a decent camera to pursue my passion.
I love open technologies and I have been instrumental in the evangelism and advocacy of the use of Free and Open Source Software in Ghana.
I enjoy riding motorcycles. In fact I love anything on two wheels.
At Ushahidi I lead the development efforts of Android apps for it's web based tools and contribute to major parts of the core Ushahidi web platform.
In 2012, I founded FindReels.com, a comprehensive movie guide for Ghanaian cinemas.
In 2007, I was awarded TEDGlobal fellowship which granted me a free pass to attend the prestigious TED conference in Arusha, Tanzania.
I have worked as a software developer with several IT companies including Suuch Solutions, txtGhana and IDZ Ghana Limited. I also worked as a Java instructor at IPMC Ghana, an IT training institution.
These are technologies I know well or toyed with.


Across: 1. Being outrageously hot, lose high ground (7) 5. see 14ac 5. I'm replacing Aussie leader (detail!) in return for having boundaries (7) 9. Show off hosting U.N. where there's lots of liquor (5) 10. Devastated, as man at "In Like Flynn"? (9) 11. Devastated, as dead ends everywhere (8) 12,29ac. Paper tiger organising coup & murder, hurt and destroyed union (6 7) 14,4dn. Novel getting gentle cut with devious Lord 29 taking over its publication from Mr 25 in 1969 (4 2 3 5) 15. Bad omen: square style of architecture (10) 18. Teaching crook to be arrested in trick (10) 19. Employee of 14 5 across, and what he'd do to 27 (4) 22. Composers of 14 4 see first bit of N.Y. (6) 24. Among English articles, new one from Greece (8) 26. Where famous body may end up, having got one good start (9) 27. Device's reading suggesting strong acid? (5) 28. Vocalist of a sort, ye older sort! (7) 29. see 12ac Down: 1,18dn. Playing violin, 22 rail for response to 14 4 scandal (7 7) 2. Beginnings of serious harm under Trump: deadllock over wall, national stoppages (9) 3. Noble page 3 material came first (6) 4. see 14ac 5. Page 3 driver's shine about to be removed (4) 6. Dame upset, but holding firm with even 21 (8) 7. As printed regularly in Star - simple rubbish! (5) 8. Residing in garret, ten ideally rotated where they sat for dinner (7) 13. With ads, such media's mantra's "invention" (10) 16. He had a hunch Sequioa dome could be re-established without eggheads (9) 17. Without regular extremes, Berlin rain storms might only come in odd years (8) 18. see 1dn 20. Starr looking into Bill, nth keen harassment (7) 21. Cross when losing this form (6) 23. Hired student out, relieved (5) 25. Businessman Henry's vehicle: racy heading (4)


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.collection.CompositeCollection
public class CompositeCollection
Decorates a collection of other collections to provide a single unified view.
Changes made to this collection will actually be made on the decorated collection. Add and remove operations require the use of a pluggable strategy. If no strategy is provided then add and remove are unsupported.
| Nested Class Summary | |
|---|---|
static interface |
CompositeCollection.CollectionMutator
Pluggable strategy to handle changes to the composite. |
| Field Summary | |
|---|---|
protected java.util.Collection[] |
all
Collections in the composite |
protected CompositeCollection.CollectionMutator |
mutator
CollectionMutator to handle changes to the collection |
| Constructor Summary | |
|---|---|
CompositeCollection()
Create an empty CompositeCollection. |
|
CompositeCollection(java.util.Collection coll)
Create a Composite Collection with only coll composited. |
|
CompositeCollection(java.util.Collection[] colls)
Create a CompositeCollection with colls as the initial list of composited collections. |
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object obj)
Adds an object to the collection, throwing UnsupportedOperationException unless a CollectionMutator strategy is specified. |
boolean |
addAll(java.util.Collection coll)
Adds a collection of elements to this collection, throwing UnsupportedOperationException unless a CollectionMutator strategy is specified. |
void |
addComposited(java.util.Collection c)
Add an additional collection to this composite. |
void |
addComposited(java.util.Collection[] comps)
Add these Collections to the list of collections in this composite |
void |
addComposited(java.util.Collection c,
java.util.Collection d)
Add two additional collections to this composite. |
void |
clear()
Removes all of the elements from this collection . |
boolean |
contains(java.lang.Object obj)
Checks whether this composite collection contains the object. |
boolean |
containsAll(java.util.Collection coll)
Checks whether this composite contains all the elements in the specified collection. |
java.util.Collection |
getCollections()
Gets the collections being decorated. |
boolean |
isEmpty()
Checks whether this composite collection is empty. |
java.util.Iterator |
iterator()
Gets an iterator over all the collections in this composite. |
boolean |
remove(java.lang.Object obj)
Removes an object from the collection, throwing UnsupportedOperationException unless a CollectionMutator strategy is specified. |
boolean |
removeAll(java.util.Collection coll)
Removes the elements in the specified collection from this composite collection. |
void |
removeComposited(java.util.Collection coll)
Removes a collection from the those being decorated in this composite. |
boolean |
retainAll(java.util.Collection coll)
Retains all the elements in the specified collection in this composite collection, removing all others. |
void |
setMutator(CompositeCollection.CollectionMutator mutator)
Specify a CollectionMutator strategy instance to handle changes. |
int |
size()
Gets the size of this composite collection. |
java.lang.Object[] |
toArray()
Returns an array containing all of the elements in this composite. |
java.lang.Object[] |
toArray(java.lang.Object[] array)
Returns an object array, populating the supplied array if possible. |
java.util.Collection |
toCollection()
Returns a new collection containing all of the elements |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
equals, hashCode |
| Field Detail |
|---|
protected CompositeCollection.CollectionMutator mutator
protected java.util.Collection[] all
| Constructor Detail |
|---|
public CompositeCollection()
public CompositeCollection(java.util.Collection coll)
coll
- a collection to decoratepublic CompositeCollection(java.util.Collection[] colls)
colls
- an array of collections to decorate| Method Detail |
|---|
public int size()
This implementation calls size()
on each collection.
size
in interface java.util.Collection
public boolean isEmpty()
This implementation calls isEmpty()
on each collection.
isEmpty
in interface java.util.Collection
public boolean contains(java.lang.Object obj)
This implementation calls contains()
on each collection.
contains
in interface java.util.Collection
obj
- the object to search for
public java.util.Iterator iterator()
This implementation uses an IteratorChain
.
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
IteratorChain
instance which supports
remove()
. Iteration occurs over contained collections in
the order they were added, but this behavior should not be relied upon.IteratorChain
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
public java.lang.Object[] toArray(java.lang.Object[] array)
Collection
interface for full details.
toArray
in interface java.util.Collection
array
- the array to use, populating if possible
public boolean add(java.lang.Object obj)
add
in interface java.util.Collection
obj
- the object to add
java.lang.UnsupportedOperationException
- if CollectionMutator hasn't been set
java.lang.UnsupportedOperationException
- if add is unsupported
java.lang.ClassCastException
- if the object cannot be added due to its type
java.lang.NullPointerException
- if the object cannot be added because its null
java.lang.IllegalArgumentException
- if the object cannot be addedpublic boolean remove(java.lang.Object obj)
remove
in interface java.util.Collection
obj
- the object being removed
java.lang.UnsupportedOperationException
- if removed is unsupported
java.lang.ClassCastException
- if the object cannot be removed due to its type
java.lang.NullPointerException
- if the object cannot be removed because its null
java.lang.IllegalArgumentException
- if the object cannot be removedpublic boolean containsAll(java.util.Collection coll)
This implementation calls contains()
for each element in the
specified collection.
containsAll
in interface java.util.Collection
coll
- the collection to check for
public boolean addAll(java.util.Collection coll)
addAll
in interface java.util.Collection
coll
- the collection to add
java.lang.UnsupportedOperationException
- if CollectionMutator hasn't been set
java.lang.UnsupportedOperationException
- if add is unsupported
java.lang.ClassCastException
- if the object cannot be added due to its type
java.lang.NullPointerException
- if the object cannot be added because its null
java.lang.IllegalArgumentException
- if the object cannot be addedpublic boolean removeAll(java.util.Collection coll)
This implementation calls removeAll
on each collection.
removeAll
in interface java.util.Collection
coll
- the collection to remove
java.lang.UnsupportedOperationException
- if removeAll is unsupportedpublic boolean retainAll(java.util.Collection coll)
This implementation calls retainAll()
on each collection.
retainAll
in interface java.util.Collection
coll
- the collection to remove
java.lang.UnsupportedOperationException
- if retainAll is unsupportedpublic void clear()
This implementation calls clear()
on each collection.
clear
in interface java.util.Collection
java.lang.UnsupportedOperationException
- if clear is unsupportedpublic void setMutator(CompositeCollection.CollectionMutator mutator)
mutator
- the mutator to usepublic void addComposited(java.util.Collection[] comps)
comps
- Collections to be appended to the compositepublic void addComposited(java.util.Collection c)
c
- the collection to addpublic void addComposited(java.util.Collection c, java.util.Collection d)
c
- the first collection to addd
- the second collection to addpublic void removeComposited(java.util.Collection coll)
coll
- collection to be removedpublic java.util.Collection toCollection()
public java.util.Collection getCollections()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Michael Wimsatt's GitHub blog
In the last post, I dug into a year’s worth of weight data, describing the patterns and trends I saw, and offering some explanations for each. Here we’re going to measure results against the theoretical weight loss based on well-established calorie-to-fat (and muscle) formulas to see just how predictive my recorded food and exercise data really was.
In addition to weighing myself daily, I recorded what I ate and all my exercise using an iPhone app called LoseIt!. I’ll attempt to detere how much of my weight loss was directly attributable to my calorie deficit.
First of all, how does one calculate a calorie deficit? Generally, it looks like this:
cal_deficit = base_cal_burn + exercise_cal_burn - cal_consumption
where base_cal_burn
is based on something called your Basal Metabolic Rate, which can be adjusted for “base” activity level, and declines as you lose weight, yielding a total daily energy expenditure (TDEE).
base_cal_burn = tdee(w1y,height=72,age=36,sex='m',multiplier=1.2)
ax = base_cal_burn.plot()
ax.set_ylabel('TDEE - Sedentary (cals)');
As you can see, my base calorie burn declined significantly as I lost weight. This is one of the insidious challenges in weight loss. For a significant change, once you reach your goal you must maintain a much lower calorie intake (or offsetting exercise) to stay there.
exercise_cal_burn = Series(
pd.read_csv('data/ExerciseCalories4392.csv', index_col='Date',
parse_dates=True).sort_index()['Exercise Calories']['2009-06-26':'2010-06-22'])
ax = exercise_cal_burn.plot(style='b.')
ax.set_ylabel('Exercise Calories (cal)');
As you can see, I exercised regularly throughout my weight loss, with the total energy expenditure increasing signficantly in 2010 as I started running longer distances.
cal_consumption = Series(
pd.read_csv('data/FoodCalories4392.csv', index_col='Date',
parse_dates=True).sort_index()['Food Calories']['2009-06-26':'2010-06-22'])
ax = cal_consumption.plot(style='b.')
ax.set_ylabel('Calories Consumed (cal)');
It looks like my calorie consumption range was pretty tight earlier on and varied much more widely toward the end of the weight loss period. Also, you’ll note some very low and “zero” calorie consumption days. As an example, on August 15, 2009 I apparently consumed only 285 calories. Here’s what it looks like:
So, apparently I ate a granola bar (typical pre-run snack), went for a three-mile run, ate a banana (typical post-run snack), then ate nothing else the rest of the day. I suppose this is theoretically possible. I’m more inclined to think I got lazy and stopped recording calories.
So, I looked through my calendar and emails from that week. It turns out I was at a family reunion in upstate New York that weekend. I assure you I ate - and drank - plenty that day and the rest of the weekend. So, this is one of a few data points that I need to clean up. In fact, I think I’ll ignore all days that are below a certain threshold on calorie consumption, and assume I had a net calorie deficit of zero. I suspect this is an optimistic assumption, but more on that later.
cal_consumption.hist(color='k', alpha=0.5, bins=20);
I can believe I had days of calorie consumption in the low 1000’s, but anything under 1000 calories is suspect, so I’ll mark those (including the zero days) as NULL values.
cal_consumption = cal_consumption.where(cal_consumption >= 1000)
cal_consumption.hist(color='k', alpha=0.5, bins=20);
That filtered out about 30 points. Those low ones still look a bit suspect, but let’s run with it like this. Those high ones look like outliers, too, but I can’t imagine recording calories I didn’t actually consume, so I think those are real. I like KDE plots, so let’s look at it like that, too.
cal_consumption[cal_consumption.notnull()].plot(kind='kde');
OK, let’s combine it all in a data frame.
from pandas import Timestamp as ts
weightdf = DataFrame({'Weight': w1y, 'Base Calories': base_cal_burn,
'Exercise Calories': exercise_cal_burn,
'Food Calories': cal_consumption})
# Drop partial weeks
drop_dates = ('2009-6-26', '2009-6-27', '2009-6-28', '2010-6-21', '2010-6-22')
for d in drop_dates:
weightdf = weightdf.drop(ts(d))
# Calculate calorie deficit
weightdf['Calorie Deficit'] = weightdf['Base Calories'] + weightdf['Exercise Calories'] - weightdf['Food Calories']
print (weightdf['Weight'][ts('6-29-2009')] - weightdf['Weight'][ts('6-20-2010')])*3500/356
weightdf.describe()
698.033707865
Base Calories Exercise Calories Food Calories Weight Calorie Deficit count 357.000000 357.000000 319.000000 357.000000 319.000000 mean 2616.102449 228.925728 2269.690721 232.448739 595.182921 std 135.540163 308.787380 735.925260 18.176104 779.746546 2405.450116 0.000000 1028.350000 204.200000 -2191.817612 25% 2496.426157 0.000000 1723.000000 216.400000 82.876077 50% 2608.281944 0.000000 2043.630000 231.400000 810.317858 75% 2720.137731 492.029000 2717.205000 246.400000 1146.106112 max 2942.357895 1485.970000 5329.970000 276.200000 2277.650299
On average, I
Also, I lost 71 pounds over the 356 day period, or an average of 0.20 pounds per day. At 3,500 calories per pound, that equates to 700 calories per day. So, it looks like I lost more weight than I should have given the reported calorie data.
The next post will dig into possible sources of error and explore whether the data themselves can help us understand where I went wrong.
comments powered by Disqus


The Growler Guy entrance smashed by vehicle
Damages happened sometime in the early morning hours of Nov. 19th
Police are investigating the extensive damage done to The Growler Guy around 1:45 a.m. on the morning of Nov. 19th. Owner Dan Hiller is asking the public to be on the lookout for an older pick-up with a broken passenger side tail light. Nothing was taken from the business.
photo submitted
Damages happened sometime in the early morning hours of Nov. 19th


Before Change
cards_combined = np.append(np.tile(mycards, reps=(iterations, 1)), shuffled, axis=1)[:,
player_id * card_amount_at_river - card_amount_at_river:card_amount_at_river * player_id]
cards = np.ceil(cards_combined / 4)
suits = cards_combined % 4 + 1
self.decks = np.dstack((cards, suits))
self.cards = self.decks[:, :, 0]
self.suits = self.decks[:, :, 1]
After Change
plr1_crds=mycards
plr2_crds=shuffled[:,7:9]
plr3_crds = shuffled[:, 9:11]
plr4_crds = shuffled[:, 11:13]
self.player_amount=2
cards_combined1 = np.append(np.tile(plr1_crds, resp=(iterations,1)), shuffled, axis=1)[:,0:card_amount_at_river]


WUS cell al, Supplementary stem Figure expression genes differentiation model Yadav CLV KAN cells Arabidopsis gene Table repression shoot Plant analysis Cell binding expressed regulatory shown {border-style TFs meristem network used px;} transcription using #ffffff;} promoting transcriptional Dex SAM computational described earlier direct levels represses study SAMs perturbations promoter protein WUSCHEL set simulations LINK directly observed regulated KAN, growth including information). interactions performed present progenitors repressed values Reddy TAAT core function homeostasis molecular parameter patterns regions sequences shows similar types Biology Brand Meyerowitz WUS-mediated apical domain domains leaf live plant plants provides revealed sets signal μM Figures RNA activation binds data downregulated experimental feedback imaging niche normalized presence px; results transcripts ubiquitous work {font-family H). Jönsson Nature USA University YAB cells. containing encodes factors floral font-size group implicated involved leaves mapped misexpression regulates regulating regulation regulator samples sequence signaling spatial Acad Arabidopsis. Busch CLAVATA Cyc GCRMA Kerstetter Laux MAS Natl Proc Sci Taken WUS-responsive YABBY Zhao [], chromatin columns development double; embryonic homeodomain identified increase introduced large maintenance model, mutants negative number program repress reveal showing table together, transient treated treatment Biol DEG DNA Lohmann Mayer Science Simon activated analyzed behavior border-color border-width comparison control determine developed differential enriched fate functions genes) genes, gradient individual key leads lines meristems microarray modeled models premature proteins provide rates represents required robust sample solid; sufficient suggesting suggests test tested transgenic upregulated use versus {font-style {font-weight ASYMMETRIC Dev Development DexCyc E). Expression Fletcher Hill However, Institute KANADI, Leibfried Lin Meyerowitz, Movie P<.) Therefore, WUS-GR activates activating algorithm ap-;cal- bold changes conserved considered controls courier; defined different differentiating differentiation. division downregulation early element em; experiments. explain expression. extracted genomic given high-resolution homeobox important included inflorescence keeping kinase layer logic long-term maintenance. map mechanisms minimal niche. oligonucleotides organ pathways patterning perturbation polarity previous probe provided pt;} putative qPCR receptor regulate response root solution specification specificity stem-cell suggested term three-dimensional tissue type wild-type work.


Main Component
Here is how to control components from a master component. You can create as many instances of "Clock" as you want, stop them individually, or ask the parent component to disable/enable them all.
Since the master component is unique, it is created from a literal object, while Clock components are created from a JavaScript class.
 Everything is stopped and removed automatically on demand by jFactory, making the application easier to control and clean.


| 002:224 Khan | : |
And make not Allah's (Name) an excuse in your oaths against your doing good and acting piously, and making peace among mankind. And Allah is All- Hearer, All-Knower (i.e. do not swear much and if you have sworn against doing something good then give an expiation for the oath and do good). |
| 002:224 Maulana | : |
And make not Allah by your oaths a hindrance to your doing good and keeping your duty and making peace between men. And Allah is Hearing, Knowing. |
| 002:224 Pickthal | : |
And make not Allah, by your oaths, a hindrance to your being righteous and observing your duty unto Him and making peace among mankind. Allah is Hearer, Knower. |
| 002:224 Rashad | : |
Do not subject GOD's name to your casual swearing, that you may appear righteous, pious, or to attain credibility among the people. GOD is Hearer, Knower. |
| 002:224 Sarwar | : |
Do not swear by God not to do good things, or have piety, or make peace among people. God is All-hearing and All-knowing. |
| 002:224 Shakir | : |
And make not Allah because of your swearing (by Him) an obstacle to your doing good and guarding (against evil) and making peace between men, and Allah is Hearing, Knowing. |
| 002:224 Sherali | : |
And make not ALLAH a target for your oaths that you may thereby abstain from doing good and acting righteously and making peace between men. And ALLAH is All-Hearing, All-Knowing. |
| 002:224 Yusufali | : |
And make not Allah's (name) an excuse in your oaths against doing good, or acting rightly, or making peace between persons; for Allah is One Who heareth and knoweth all things. |
Concepts/Themes Covered: العمل > العمل الطالح > في القول > الحلف علي معصية Action(Work)> Bad Deeds>In the Saying>Swearing by Using Allah's Name as an Excuse against Doing Good الإنسان والعلاقات الاجتماعية > المجتمع > الإصلاح بين الناس Man and The Social Relations>The Society>Making Peace among People
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


What is this?
is a light-weight list of CSS definitions for a minimalist responsive documentation.How can I use it?
Download the mininified source here and add the following line to the header of your HTML:<link rel="stylesheet" type="text/css" href="wp.min.css">
Documentation
Menu
The menu consists of adiv
elem wrapped inside a nav
which is inside an
aside
tag.
A top level menu entry is a simple anchor a
.
A sub-menu is made by adding a checkbox input
with id='s1-*'
, where
*
denotes the id of the sub-menu. The input
tag is followed by a
label
and a div
with class='s1'
.
Second level sub-menu is created in the same fashion as the sub-menu, but with
s2
as
id-initial and class name.
Headers
supports only 3 levels of headers for readability reasons. The headers follow the following stylistic order:Header 1
Header 2
Header 3
Links
inline link
The elementsa
are used for in-line links. These unvisited and
visited links are both colored blue.
buttons
Buttons can appear in different context, but provides the same design for each of them. The last one (file) requires alabel
element
after the file input, and also a span
to show the selected filesStyling & Customizing File Inputs the Smart Way.
These are not included here as JS is not part of . The buttons are:anchor element
Once a file is selected, a
span
with the .filename
class can be used to show the file name:
Selected file
reference
You a can add a reference to the text, which is a special type of link, by wrapping the link inside aspan class='ref'
tag. The resulting link becomes a reference indicated by a superscript
right where you want to put the reference.
Lists
supports all three types of lists: unordered, ordered and description lists. In addition, there is an unordered class with custom label/value pairs.unordered
Short shopping list:- bean
- potato
- tomato
- jalapeño
- minced meat
- timian
ordered
Awesome recipe:- Cook meat until it's edible.
- Chop the potatoes and tomatoes in small cubes.
- Cook all vegetables together with the meat.
- Add timian and jalapeños.
description
A short description of some Scandinavian countries:- Denmark
- Lot of bikes, good beers and licorice.
- Sweden
- Lot of steel, cold head and semla.
- Iceland
- Beautiful nature, green energy and hákarl.
custom
The custom list has the same syntax as a description list, but uses the.custom
class:
- html
- Markup language to describe the content of a web page.
- css
- Stylesheet language to describe the look and feel of a web page.
- javascript
- Scripting language to implement interactions between web elements.
Code
inline
Code that is inserted in a text is surrounded by thecode
tag.
block
For a larger code block, wrap the code inpre
:
html,
body {
font-family: 'Avenir Next', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
background-color: white;
color: black;
}
For code highlight, we use highlight.js.
classes
Some convenience classes are also provided for quick edit:.tag
- wraps the content with the
<
and>
brackets.
Table
| item name | number of items | item price |
|---|---|---|
| total | 5 | 63$ |
| beer | 2 | 3$ |
| wine | 1 | 10$ |
| vodka | 1 | 35$ |
| some very fancy coctail | 1 | 12$ |
th
to better adjust column width:
.half
- Sets column width to 50% of the table
.third
- Sets column width to 33.33% of the table
.fourth
- Sets column width to 25% of the table
.fifth
- Sets column width to 20% of the table
Classes
Some more convenience classes.card
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget hendrerit mi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam sagittis massa et consequat lacinia. Curabitur pharetra tellus id efficitur scelerisque. Maecenas aliquet scelerisque elit eget lobortis. Vestibulum laoreet arcu nisl, id luctus nunc ornare vel. Pellentesque arcu augue, faucibus ut nisi in, facilisis tempor nisl. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;


VICTOR WANDERA
december 23 1995
english,kiswahili,french and my vernacular
Hi am wandera victor am 20 years old.i was born in western province.I went to kings juniour primary school from class 1 to class 6.
from kings juniour i joined kanduyi primary school where i studied up to class 8. I succefully managed to get 315 marks in my kcpe.
I joined st marks boys high school cheranganiWhere i got a c+ in my forth form level. jomo kenya kenyattta university of agriculture and technology gave me a letter to join their campus where i did a diploma in infomation and technology.
life has been cool on my side being part of the jkuat team.
After graduating from jkuat i joined moringa school where i decided to venture in the programing sector.
Moringa School is a world-class software developer accelerator based in Nairobi, Kenya
Their goals are to build human capacity by training people of varied technical ability in a holistic way.
They focus on both technical proficiency and personal growth , meaning that graduates are effective learners and contributors, and well rounded employees and leaders.
I was introduced to moringa school by a friend who was also part of the school.
I have never been employed in any organazation but i have worked as a volunteer in many organzations teaching the community on modern day life e.g. redcross and WFP
I like doing research and learning new and things especially in the digital world.


{% load staticfiles %}{% load enrichment_extra %}
Warning: This page should not be printed. Please use the printable report at the bottom of the day or the reporting section for printable reports.
{% include "enrichmentmanager/partial/single_student.html" %}


The input method framework enables the collaboration between text editing components and input methods for entering text. Input methods are software components that let the user enter text in ways other than simple typing on a keyboard. They are commonly used to enter Japanese, Chinese, or Korean - languages using thousands of different characters - on keyboards with far fewer keys. However, the framework also supports input methods for other languages and the use of entirely different input mechanisms, such as handwriting or speech recognition.
The input method framework provides two layers of public interfaces:
Overview - An overview of the Input Method framework.


YouTube - Gangnam Style easter egg
A celebration of Gangnam Style's 2 billion views - canvas
The page for users to list their favorite paintings, and to create personal galleries.
Interesting bits
- high-risk, low-reward project
- collaboration with another developer and a designer
- down-sampling of rendered text to generate sprite positions
Code samples
That code is long gone - and not mine 😢


Grid
1
2
9
1
2
9
3
6
3
3
6
3
Colors
@color-dark-contrast
@color-light-contrast
Shadows
shadow-2dp
shadow-3dp
shadow-4dp
shadow-6dp
shadow-8dp
shadow-16dp
Card
6
Hepper
Hepperding
Button
Table
| Hep1 | Hep2 | Hep3 |
|---|---|---|
| Hep1 | Hep2 | Hep3 |


Amount
Payment Method
Visa
MasterCard
Credit Card Number
Expiration Date
CVV Code
Address
Name
Comment
Submit


{% extends "admin/change_form.html" %} {% block object-tools %} {{ block.super }} When you create a new process, you first have to:
Edit activities {% endblock %}


{% load static %}
Log Out
You are not logged in
Adminstration site
Reservations
Bookings
Review
Reports


Glen Hansard and Marketa Irglova - Falling Slowly https://youtu.be/FkFB8f8bzbY Orig: C - Kapo: 0/5B I: G C G C G C G C 1. I don't know you but I want you all the more for that G C G C Words fall through me n'always fool me and I can't react Emi D Cmaj D Emi Games that never amount to more than they're meant D C Will play themselves out R: G Cmaj C6 Emi7 D C Take this sinking boat and point it home we've still got time G Cmaj C6 Emi7 D C Raise your hopeful voice you have a choice You've made it now G C G C 2. Falling slowly, eyes that know me and I can't go back G C G C Moods that take me and erase me and I'm painted black Emi D Cmaj D Emi You have suffered enough and warred with yourself D C It's time that you won R: G Cmaj C6 Emi7 D C Take this sinking boat and point it home we've still got time G Cmaj C6 Emi7 D C Raise your hopeful voice you have a choice You've made it now I: Emi D Cmaj D Emi D C Gmaj oooo yeah ooo R: G Cmaj C6 Emi7 D C Take this sinking boat and point it home we've still got time G Cmaj C6 Emi7 D C Raise your hopeful voice you have a choice You've made it now G Cmaj C6 Emi7 D C Falling slowly sing your melody I'll sing it long O: G Cmaj C6 Emi7 Cmaj Gadd4 G C G C G oooooo


--- title: Modal ---
Do you really want to delete this? This operation is permanent!
This operation is permanent, password must be entered to confirm.


CPU based timer
{Link:import Base.Core.Timer;{Base/Core/Timer.ixx}}
Defines the default constructor
Defines the destructor
Starts the timer
Stops the timer.
Number of milliseconds since timer started


Before Change
if len(new_test_frame) > 0:
test_frame = test_frame.append(new_test_frame)
else:
raise Exception("Test frame has length 0. Adjust prediction date.")
// write out the training and test files
write_frame(train_frame, directory, train_file, extension, separator)
write_frame(test_frame, directory, test_file, extension, separator)
// run the model pipeline
After Change
else:
raise Exception("A test frame has zero rows. Adjust prediction date.")
else:
logger.warning("A training frame has zero rows.")
// write out the training and test files
write_frame(train_frame, directory, train_file, extension, separator)
write_frame(test_frame, directory, test_file, extension, separator)
// run the model pipeline


|
Application
|
Environment
|
Status
|
Description
|
|---|---|---|---|
| {{ deployment.name }} | {{ deployment.env }} | {{ deployment.status }} |
{{ deployment.description }}
|


{% extends 'base.html' %} {% block page_title %}HonBot | HoN stats, players, matches, chat logs {% endblock %} {% block main_content %}
Stats, Chat, Graphs for Heroes of Newerth


Google Search
Home
|
Tools
Search Operators:
site:
cache:
info:
inurl:
intitle:
intext:
Country:
United States
United Kingdom
the Netherlands
Germany
France
Number of results:
10
50
100
Search


Pellegrini looking forward to Mourinho duel
Cape Town - West Ham manager Manuel Pellegrini admits he is relishing pitting himself in a tactical battle against Jose Mourinho when his side face Tottenham on Saturday.
In a whirlwind week for Spurs, Mauricio Pochettino’s time in north London was brought to an abrupt end, before former Chelsea and Manchester United boss Mourinho was drafted in just 12 hours later.
Tottenham will be desperate to get off to a winning start under the Portuguese tactician, while Pellegrini will be determined to end a seven-match winless run in all competitions.
The pressure is mounting on the Chilean, but he is looking forward to getting back into the thick of the Premier League action after the international break against Mourinho’s Spurs.
“Tottenham have a very good team with some very good players,” he told reporters. “Being outside of Tottenham we cannot know what is happening. Pochettino was a manager who did a lot of good work for a lot of years for Tottenham. Now they have another experienced manager, Jose Mourinho.
“Everyone has his option to play football the way they want, to say what they want to say. He’s not my friend, but he’s not my enemy. We have different ways of thinking about football. I think he only took charge yesterday, so probably we will see Tottenham playing in a similar way.”
West Ham’s poor run of results has coincided with the loss of first-choice keeper Lukasz Fabianski to injury, with Spanish keeper Roberto being thrust into the limelight.
It’s now six weeks since the Poland international Fabianski had surgery on a hip muscle and is believed to be edging closer to a return.
The experienced keeper is still expected to be out until the new year, so Roberto will once again be between the sticks this weekend when Spurs head to the London Stadium.
- TeamTalk Media


About Us // Nous // 关于我们
Our team is dedicated and experienced in all aspects of Event managing, from digital solutions to decoration and staffing.


With REOrganize, you can easily simulate arranging your furniture in your room to figure out what works best.
Just quickly measure the room and dimensions of your furniture (bed, desk), add them on the simulator, and drag/rotate away!

Length "
Height "
Width "


A Software Pack that contains a <board> element is called Board Support Pack (BSP). A BSP may contain additional Software Components, Example Projects, as well as Code Templates. The typical content of a BSP is:
- Source code, libraries, header/configuration files for the underlying hardware and documentation (for example user manuals, getting started guides, and schematics).
- Example Projects that show the usage of the development board and its peripherals.
- User Code Templates that can be used as a starting point for using the development board or the mounted device.
This section is a tutorial that explains how to create a BSP. Initially the PDSC file in the BSP only describes an evaluation board. This BSP is then extended to contain also software components that interface with the hardware of the board. Example projects and code templates may be added as described in the section Pack with Software Components.
BSP Use Cases
A BSP is typically provided by a Board Vendor and is used to extend development tools with support for development boards. In general, the BSP enables Board Vendors to distribute tool independent board support for their development platforms.
BSPs can also be used to provide information for the display on web sites. One example is the new boards page on www.keil.com/boards2/:
Board information on a web site extracted from a BSP
Specify a Development Board
Preparations
- Install the Software Pack Keil::ARMCortex_DFP as this will be required for the BSP to function properly.
- Create a working directory on your PC, for example C:\temp\working_bsp.
- Go to the directory \CMSIS\Pack\Tutorials available in the ARM::CMSIS Pack installation. Please consult your development tool's documentation for more information on the Pack installation directory structure. In a standard µVision installation, you will find it below C:\Keil_v5\ARM\Pack\ARM\CMSIS\version.
- Open the file Pack_with_Board_Support.zip.
- Copy the content of the ZIP file's 01_Specify_Dev_Board directory into your working directory.
- Make sure that files/directories are not write protected (remove read-only flag).
- Copy from the directory \CMSIS\Utilities available in the ARM::CMSIS Pack installation the following files into your working directory:
- Open the MyVendor.MyBSP.pdsc file in an editor.
Code Example
-
Add a <boards> section in the PDSC file with the following:
<boards>
<board vendor="MyVendor" name="MyDevBoard" revision="V1"<EMAIL_ADDRESS>orderForm="http://www.keil.com">
<description>MyVendor MyDevBoard Board Description</description>
<image small="Images/MyDevBoard_small.png" large="Images/MyDevBoard_large.png"/>
<book category="setup" name="Docs/MyDevBoard/MyDevBoard_setup.pdf" title="Getting Started"/>
<book category="schematic" name="Docs/MyDevBoard/MyDevBoard_schematics.pdf" title="Schematics"/>
<book category="manual" name="Docs/MyDevBoard/MyDevBoard_um.pdf" title="User Manual"/>
<mountedDevice deviceIndex="0" Dvendor="ARM:82" Dname="ARMCM3"/>
<compatibleDevice deviceIndex="0" Dvendor="ARM:82" Dfamily="ARM Cortex M3"/>
<feature type="ODbg" n="1" name="On-board J-LINK Lite"/>
<feature type="PWR" n="5" name="USB Powered"/>
<feature type="DIO" n="8"/>
<feature type="SPI" n="1"/>
<feature type="LED" n="6" name="User LEDs"/>
<feature type="ArduinoFF" n="1"/>
<debugInterface adapter="J-Link Lite" connector="Mini-USB"/>
</board>
</boards>
- Note
- All code examples in this and the following sections can be found in the
snippets.xml
file in the 01_Specify_Dev_Board directory.
-
Finally, save the PDSC file and generate the Pack file using the gen_pack.bat script. See Generate a Pack for further details. Afterwards, install the Pack in your development tool.
Display of development boards in development tools
- Note
- packChk.exe will display M346 informations:
*** WARNING M346: .\Files\MyVendor.MyBSP.pdsc (Line 29)
Referenced device(s) in 'MyDevBoard' not found: 'ARMCM3'
*** WARNING M346: .\Files\MyVendor.MyBSP.pdsc (Line 29)
Referenced device(s) in 'MyDevBoard' not found: 'ARM Cortex M3'
This is because this BSP does not contain a device section with the mentioned devices. To work aroung this problem, you might add the ARM:CMSIS PDSC file to the checking process.
Create a BSP Bundle
A bundle is basically a variant on the Cclass
level. It specifies the attributes Cclass
, Cversion
and optionally Cgroup
and Cvendor
for a collection of interdependent components. Components within a bundle inherit the attributes set by the bundle and must not set these attributes again. Bundles ensure consistency of attributes across multiple interworking components and restrict the mix and match of components within a Cclass
from different solutions. In addition to components, a bundle has the mandatory elements description
and doc
(for documentation).
Copy the content of the 02_BSP_Bundle directory of the Pack_with_Board_Support.zip file to the Files directory in your working environment:
-
Add a
<conditions>
section in your PDSC with the following (the conditions section provides more information on this step): <condition id="ARM Cortex M3 Series">
<description>ARM Cortex M3 device required</description>
<require Dfamily="ARM Cortex M3" Dvendor="ARM:82"/>
</condition>
<condition id="MyDevBoard Board Setup">
<description>Board Setup Code required</description>
<require condition="ARM Cortex M3 Series"/>
<require Cclass="Board Support" Cgroup="Board Setup"/>
</condition>
-
Add a
<components>
section in your PDSC with the following (the components section provides more information on this step): <bundle Cbundle="MyDevBoardSupport" Cclass="Board Support" Cversion="1.0.1">
<description>MyDevBoard custom board support package</description>
<doc>Docs/BSP/MyBSP.htm</doc>
<component Cgroup="Board Setup" condition="ARM Cortex M3 Series">
<description>Custom board setup code</description>
<files>
<file category="doc" name="Docs/BSP/Setup.htm"/>
<file category="header" name="MySWComp/Include/setup.h"/>
<file category="source" name="MySWComp/Source/setup.c"/>
</files>
</component>
<component Cgroup="I/O" Csub="LED" condition="MyDevBoard Board Setup">
<description>LED code for custom board</description>
<files>
<file category="doc" name="Docs/BSP/LED.htm"/>
<file category="header" name="MySWComp/Include/led.h"/>
<file category="header" name="MySWComp/Include/config_led.h" attr="config" version="1.0.0"/>
<file category="source" name="MySWComp/Source/led.c"/>
</files>
</component>
<component Cgroup="I/O" Csub="GPIO" condition="MyDevBoard Board Setup">
<description>GPIO code for custom board</description>
<files>
<file category="doc" name="Docs/BSP/GPIO.htm"/>
<file category="header" name="MySWComp/Include/gpio.h"/>
<file category="header" name="MySWComp/Include/config_gpio.h" attr="config" version="1.0.0"/>
<file category="source" name="MySWComp/Source/gpio.c"/>
</files>
</component>
</bundle>
-
Add a new version number:
<release version="1.0.1">
Board support bundle added
</release>
-
Finally, save the PDSC file and regenerate the Pack file using the gen_pack.bat script. Afterwards, install the Pack in your development tool and observe the differences to version 1.0.0.
BSP bundle display in development tools


CS Student and Aspiring Hacker.
Simple Static Blogging Engine in Python - Dec 01 2017
Hello, World! - Nov 30 2017


Target Database Table
This should be the name of the Table with in the target system where you want to extract table definitions. You can supply just a partial name and a wildcard will be applied to the end of the table name automatically.
You can also set the value to *, and the value help will display all tables.


our story
As home winemakers, we were very excited when Nevada passed a law in 2015 to allow commercial wineries in Nevada Counties of over 100,000 in population. At the time, we had just acquired management of an existing 3 acre vineyard in Fallon, Nevada and were very much looking forward to making Nevada grown wine. We started looking for space for a winery in Reno right away - and quickly found that it wasn’t going to be easy. We looked for over a year and finally found the ideal spot on East 4th Street - a quirky, fun, energetic and evolving re-development area that is also called the Old Brewery District. Once we had the space, we were able to start the process of applying for all of the various Federal, State, City and County permits needed…..and we did that. It’s been a marathon — but we made it to the finish line !!
Oh and did we mention that it’s not only us, but two other wineries with great offerings that will sharing production space and the Tasting Room with us? This way - you get to experience not only just our great wine - but other, different wine from Basin & Range and Great Basin wineries.
We’re excited to share both our journey and our wines with you soon. We expect our Nevada grown wine to be ready in increments over the next few months. Some wines, especially our reds, need to age in oak a few months or years to create those great vanilla and cassis flavors and aromas. Until then, we'll be serving you some of our favorite wines from El Dorado and Nevada counties. Most of these are made from grapes we picked there and brought back to Reno to make into wine.
We're excited to get going and look forward to seeing you all in the tasting room very soon !!


'use strict';
var _ = require('underscore');
// ML.Query is a way to create a list of ML.Objects.
module.exports = function(ML) {
/**
* Creates a new maxleap ML.Query for the given ML.Object subclass.
* @param objectClass -
* An instance of a subclass of ML.Object, or a ML className string.
* @class
*
*
ML.Query defines a query that is used to fetch ML.Objects. The
* most common use case is finding all objects that match a query through the
* find method. For example, this sample code fetches all objects
* of class MyClass. It calls a different function depending on
* whether the fetch succeeded or not.
*
*

* var query = new ML.Query(MyClass);
* query.find({
* success: function(results) {
* // results is an array of ML.Object.
* },
*
* error: function(error) {
* // error is an instance of ML.Error.
* }
* });

*
*
A ML.Query can also be used to retrieve a single object whose id is
* known, through the get method. For example, this sample code fetches an
* object of class MyClass and id myId. It calls a
* different function depending on whether the fetch succeeded or not.
*
*

* var query = new ML.Query(MyClass);
* query.get(myId, {
* success: function(object) {
* // object is an instance of ML.Object.
* },
*
* error: function(object, error) {
* // error is an instance of ML.Error.
* }
* });

*
*
A ML.Query can also be used to count the number of objects that match
* the query without retrieving all of those objects. For example, this
* sample code counts the number of objects of the class MyClass
*

* var query = new ML.Query(MyClass);
* query.count({
* success: function(number) {
* // There are number instances of MyClass.
* },
*
* error: function(error) {
* // error is an instance of ML.Error.
* }
* });

*/
ML.Query = function(objectClass) {
if (_.isString(objectClass)) {
objectClass = ML.Object._getSubclass(objectClass);
}
this.objectClass = objectClass;
this.className = objectClass.prototype.className;
this._where = {};
this._include = [];
this._limit = -1; // negative limit means, do not send a limit
this._skip = 0;
this._extraOptions = {};
};
/**
* Constructs a ML.Query that is the OR of the passed in queries. For
* example:
*
var compoundQuery = ML.Query.or(query1, query2, query3);

*
* will create a compoundQuery that is an or of the query1, query2, and
* query3.
* @param {...ML.Query} var_args The list of queries to OR.
* @return {ML.Query} The query that is the OR of the passed in queries.
*/
ML.Query.or = function() {
var queries = _.toArray(arguments);
var className = null;
ML._arrayEach(queries, function(q) {
if (_.isNull(className)) {
className = q.className;
}
if (className !== q.className) {
throw "All queries must be for the same class";
}
});
var query = new ML.Query(className);
query._orQuery(queries);
return query;
};
/**
* Constructs a ML.Query that is the AND of the passed in queries. For
* example:
*
var compoundQuery = ML.Query.and(query1, query2, query3);

*
* will create a compoundQuery that is an 'and' of the query1, query2, and
* query3.
* @param {...ML.Query} var_args The list of queries to AND.
* @return {ML.Query} The query that is the AND of the passed in queries.
*/
ML.Query.and = function() {
var queries = _.toArray(arguments);
var className = null;
ML._arrayEach(queries, function(q) {
if (_.isNull(className)) {
className = q.className;
}
if (className !== q.className) {
throw "All queries must be for the same class";
}
});
var query = new ML.Query(className);
query._andQuery(queries);
return query;
};
/**
* Retrieves a list of MLObjects that satisfy the CQL.
* CQL syntax please see CQL Guide.
* Either options.success or options.error is called when the find
* completes.
*
* @param {String} cql, A CQL string, see CQL Guide.
* @param {Array} pvalues, An array contains placeholder values.
* @param {Object} options A Backbone-style options object,it's optional.
* @return {ML.Promise} A promise that is resolved with the results when
* the query completes,it's optional.
*/
ML.Query.doCloudQuery = function(cql, pvalues, options) {
var params = { cql: cql };
if(_.isArray(pvalues)){
params.pvalues = pvalues;
} else {
options = pvalues;
}
var request = ML._request("cloudQuery", null, null, 'GET', params);
return request.then(function(response) {
//query to process results.
var query = new ML.Query(response.className);
var results = _.map(response.results, function(json) {
var obj = query._newObject(response);
obj._finishFetch(query._processResult(json), true);
return obj;
});
return {
results: results,
count: response.count,
className: response.className
};
})._thenRunCallbacks(options);
};
ML.Query._extend = ML._extend;
ML.Query.prototype = {
//hook to iterate result. Added by<EMAIL_ADDRESS>_processResult: function(obj){
return obj;
},
/**
* Constructs a ML.Object whose id is already known by fetching data from
* the server. Either options.success or options.error is called when the
* find completes.
*
* @param {} objectId The id of the object to be fetched.
* @param {Object} options A Backbone-style options object.
*/
get: function(objectId, options) {
if(!objectId) {
var errorObject = new ML.Error(ML.Error.OBJECT_NOT_FOUND,
"Object not found.");
return ML.Promise.error(errorObject);
}
var self = this;
self.equalTo('objectId', objectId);
return self.first().then(function(response) {
if (!ML._.isEmpty(response)) {
return response;
}
var errorObject = new ML.Error(ML.Error.OBJECT_NOT_FOUND,
"Object not found.");
return ML.Promise.error(errorObject);
})._thenRunCallbacks(options, null);
},
/**
* Returns a JSON representation of this query.
* @return {Object}
*/
toJSON: function() {
var params = {
where: this._where
};
if (this._include.length > 0) {
params.include = this._include.join(",");
}
if (this._select) {
params.keys = this._select.join(",");
}
if (this._limit >= 0) {
params.limit = this._limit;
}
if (this._skip > 0) {
params.skip = this._skip;
}
if (this._order !== undefined) {
params.order = this._order;
}
ML._objectEach(this._extraOptions, function(v, k) {
params[k] = v;
});
return params;
},
_newObject: function(response){
var obj;
if (response && response.className) {
obj = new ML.Object(response.className);
} else {
obj = new this.objectClass();
}
return obj;
},
_createRequest: function(params){
//后端接收的api是 /2.0/classes/{{classname}}/query
return ML._request("classes", this.className + '/query', null, "POST",
params || this.toJSON());
},
/**
* Retrieves a list of MLObjects that satisfy this query.
* Either options.success or options.error is called when the find
* completes.
*
* @param {Object} options A Backbone-style options object.
* @return {ML.Promise} A promise that is resolved with the results when
* the query completes.
*/
find: function(options) {
var self = this;
var request = this._createRequest();
return request.then(function(response) {
return _.map(response.results, function(json) {
var obj = self._newObject(response);
obj._finishFetch(self._processResult(json), true);
return obj;
});
})._thenRunCallbacks(options);
},
/**
* Delete objects retrieved by this query.
* @param {Object} options Standard options object with success and error
* callbacks.
* @return {ML.Promise} A promise that is fulfilled when the save
* completes.
*/
destroyAll: function(options){
var self = this;
return self.find().then(function(objects){
return ML.Object.destroyAll(objects);
})._thenRunCallbacks(options);
},
/**
* Counts the number of objects that match this query.
* Either options.success or options.error is called when the count
* completes.
*
* @param {Object} options A Backbone-style options object.
* @return {ML.Promise} A promise that is resolved with the count when
* the query completes.
*/
count: function(options) {
var params = this.toJSON();
params.limit = 0;
params.count = 1;
var request = this._createRequest(params);
return request.then(function(response) {
return response.count;
})._thenRunCallbacks(options);
},
/**
* Retrieves at most one ML.Object that satisfies this query.
*
* Either options.success or options.error is called when it completes.
* success is passed the object if there is one. otherwise, undefined.
*
* @param {Object} options A Backbone-style options object.
* @return {ML.Promise} A promise that is resolved with the object when
* the query completes.
*/
first: function(options) {
var self = this;
var params = this.toJSON();
params.limit = 1;
var request = this._createRequest(params);
return request.then(function(response) {
return _.map(response.results, function(json) {
var obj = self._newObject();
obj._finishFetch(self._processResult(json), true);
return obj;
})[0];
})._thenRunCallbacks(options);
},
/**
* Returns a new instance of ML.Collection backed by this query.
* @return {ML.Collection}
*/
collection: function(items, options) {
options = options || {};
return new ML.Collection(items, _.extend(options, {
model: this._objectClass || this.objectClass,
query: this
}));
},
/**
* Sets the number of results to skip before returning any results.
* This is useful for pagination.
* Default is to skip zero results.
* @param {Number} n the number of results to skip.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
skip: function(n) {
this._skip = n;
return this;
},
/**
* Sets the limit of the number of results to return. The default limit is
* 100, with a maximum of 1000 results being returned at a time.
* @param {Number} n the number of results to limit to.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
limit: function(n) {
this._limit = n;
return this;
},
/**
* Add a constraint to the query that requires a particular key's value to
* be equal to the provided value.
* @param {String} key The key to check.
* @param value The value that the ML.Object must contain.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
equalTo: function(key, value) {
this._where[key] = ML._encode(value);
return this;
},
/**
* Helper for condition queries
*/
_addCondition: function(key, condition, value) {
// Check if we already have a condition
if (!this._where[key]) {
this._where[key] = {};
}
this._where[key][condition] = ML._encode(value);
return this;
},
/**
* Add a constraint to the query that requires a particular
* array key's length to be equal to the provided value.
* @param {String} key The array key to check.
* @param value The length value.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
sizeEqualTo: function(key, value) {
this._addCondition(key, "$size", value);
},
/**
* Add a constraint to the query that requires a particular key's value to
* be not equal to the provided value.
* @param {String} key The key to check.
* @param value The value that must not be equalled.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
notEqualTo: function(key, value) {
this._addCondition(key, "$ne", value);
return this;
},
/**
* Add a constraint to the query that requires a particular key's value to
* be less than the provided value.
* @param {String} key The key to check.
* @param value The value that provides an upper bound.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
lessThan: function(key, value) {
this._addCondition(key, "$lt", value);
return this;
},
/**
* Add a constraint to the query that requires a particular key's value to
* be greater than the provided value.
* @param {String} key The key to check.
* @param value The value that provides an lower bound.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
greaterThan: function(key, value) {
this._addCondition(key, "$gt", value);
return this;
},
/**
* Add a constraint to the query that requires a particular key's value to
* be less than or equal to the provided value.
* @param {String} key The key to check.
* @param value The value that provides an upper bound.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
lessThanOrEqualTo: function(key, value) {
this._addCondition(key, "$lte", value);
return this;
},
/**
* Add a constraint to the query that requires a particular key's value to
* be greater than or equal to the provided value.
* @param {String} key The key to check.
* @param value The value that provides an lower bound.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
greaterThanOrEqualTo: function(key, value) {
this._addCondition(key, "$gte", value);
return this;
},
/**
* Add a constraint to the query that requires a particular key's value to
* be contained in the provided list of values.
* @param {String} key The key to check.
* @param {Array} values The values that will match.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
containedIn: function(key, values) {
this._addCondition(key, "$in", values);
return this;
},
/**
* Add a constraint to the query that requires a particular key's value to
* not be contained in the provided list of values.
* @param {String} key The key to check.
* @param {Array} values The values that will not match.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
notContainedIn: function(key, values) {
this._addCondition(key, "$nin", values);
return this;
},
/**
* Add a constraint to the query that requires a particular key's value to
* contain each one of the provided list of values.
* @param {String} key The key to check. This key's value must be an array.
* @param {Array} values The values that will match.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
containsAll: function(key, values) {
this._addCondition(key, "$all", values);
return this;
},
/**
* Add a constraint for finding objects that contain the given key.
* @param {String} key The key that should exist.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
exists: function(key) {
this._addCondition(key, "$exists", true);
return this;
},
/**
* Add a constraint for finding objects that do not contain a given key.
* @param {String} key The key that should not exist
* @return {ML.Query} Returns the query, so you can chain this call.
*/
doesNotExist: function(key) {
this._addCondition(key, "$exists", false);
return this;
},
/**
* Add a regular expression constraint for finding string values that match
* the provided regular expression.
* This may be slow for large datasets.
* @param {String} key The key that the string to match is stored in.
* @param {RegExp} regex The regular expression pattern to match.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
matches: function(key, regex, modifiers) {
this._addCondition(key, "$regex", regex);
if (!modifiers) { modifiers = ""; }
// Javascript regex options support mig as inline options but store them
// as properties of the object. We support mi & should migrate them to
// modifiers
if (regex.ignoreCase) { modifiers += 'i'; }
if (regex.multiline) { modifiers += 'm'; }
if (modifiers && modifiers.length) {
this._addCondition(key, "$options", modifiers);
}
return this;
},
/**
* Add a constraint that requires that a key's value matches a ML.Query
* constraint.
* @param {String} key The key that the contains the object to match the
* query.
* @param {ML.Query} query The query that should match.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
matchesQuery: function(key, query) {
var queryJSON = query.toJSON();
queryJSON.className = query.className;
this._addCondition(key, "$inQuery", queryJSON);
return this;
},
/**
* Add a constraint that requires that a key's value not matches a
* ML.Query constraint.
* @param {String} key The key that the contains the object to match the
* query.
* @param {ML.Query} query The query that should not match.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
doesNotMatchQuery: function(key, query) {
var queryJSON = query.toJSON();
queryJSON.className = query.className;
this._addCondition(key, "$notInQuery", queryJSON);
return this;
},
/**
* Add a constraint that requires that a key's value matches a value in
* an object returned by a different ML.Query.
* @param {String} key The key that contains the value that is being
* matched.
* @param {String} queryKey The key in the objects returned by the query to
* match against.
* @param {ML.Query} query The query to run.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
matchesKeyInQuery: function(key, queryKey, query) {
var queryJSON = query.toJSON();
queryJSON.className = query.className;
this._addCondition(key, "$select",
{ key: queryKey, query: queryJSON });
return this;
},
/**
* Add a constraint that requires that a key's value not match a value in
* an object returned by a different ML.Query.
* @param {String} key The key that contains the value that is being
* excluded.
* @param {String} queryKey The key in the objects returned by the query to
* match against.
* @param {ML.Query} query The query to run.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
doesNotMatchKeyInQuery: function(key, queryKey, query) {
var queryJSON = query.toJSON();
queryJSON.className = query.className;
this._addCondition(key, "$dontSelect",
{ key: queryKey, query: queryJSON });
return this;
},
/**
* Add constraint that at least one of the passed in queries matches.
* @param {Array} queries
* @return {ML.Query} Returns the query, so you can chain this call.
*/
_orQuery: function(queries) {
var queryJSON = _.map(queries, function(q) {
return q.toJSON().where;
});
this._where.$or = queryJSON;
return this;
},
/**
* Add constraint that both of the passed in queries matches.
* @param {Array} queries
* @return {ML.Query} Returns the query, so you can chain this call.
*/
_andQuery: function(queries) {
var queryJSON = _.map(queries, function(q) {
return q.toJSON().where;
});
this._where.$and = queryJSON;
return this;
},
/**
* Converts a string into a regex that matches it.
* Surrounding with \Q .. \E does this, we just need to escape \E's in
* the text separately.
*/
_quote: function(s) {
return "\\Q" + s.replace("\\E", "\\E\\\\E\\Q") + "\\E";
},
/**
* Add a constraint for finding string values that contain a provided
* string. This may be slow for large datasets.
* @param {String} key The key that the string to match is stored in.
* @param {String} substring The substring that the value must contain.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
contains: function(key, value) {
this._addCondition(key, "$regex", this._quote(value));
return this;
},
/**
* Add a constraint for finding string values that start with a provided
* string. This query will use the backend index, so it will be fast even
* for large datasets.
* @param {String} key The key that the string to match is stored in.
* @param {String} prefix The substring that the value must start with.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
startsWith: function(key, value) {
this._addCondition(key, "$regex", "^" + this._quote(value));
return this;
},
/**
* Add a constraint for finding string values that end with a provided
* string. This will be slow for large datasets.
* @param {String} key The key that the string to match is stored in.
* @param {String} suffix The substring that the value must end with.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
endsWith: function(key, value) {
this._addCondition(key, "$regex", this._quote(value) + "$");
return this;
},
/**
* Sorts the results in ascending order by the given key.
*
* @param {String} key The key to order by.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
ascending: function(key) {
this._order = key;
return this;
},
/**
* Also sorts the results in ascending order by the given key. The previous sort keys have
* precedence over this key.
*
* @param {String} key The key to order by
* @return {ML.Query} Returns the query so you can chain this call.
*/
addAscending: function(key){
if(this._order)
this._order += ',' + key;
else
this._order = key;
return this;
},
/**
* Sorts the results in descending order by the given key.
*
* @param {String} key The key to order by.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
descending: function(key) {
this._order = "-" + key;
return this;
},
/**
* Also sorts the results in descending order by the given key. The previous sort keys have
* precedence over this key.
*
* @param {String} key The key to order by
* @return {ML.Query} Returns the query so you can chain this call.
*/
addDescending: function(key){
if(this._order)
this._order += ',-' + key;
else
this._order = '-' + key;
return key;
},
/**
* Add a proximity based constraint for finding objects with key point
* values near the point given.
* @param {String} key The key that the ML.GeoPoint is stored in.
* @param {ML.GeoPoint} point The reference ML.GeoPoint that is used.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
near: function(key, point) {
if (!(point instanceof ML.GeoPoint)) {
// Try to cast it to a GeoPoint, so that near("loc", [20,30]) works.
point = new ML.GeoPoint(point);
}
this._addCondition(key, "$nearSphere", point);
return this;
},
/**
* Add a proximity based constraint for finding objects with key point
* values near the point given and within the maximum distance given.
* @param {String} key The key that the ML.GeoPoint is stored in.
* @param {ML.GeoPoint} point The reference ML.GeoPoint that is used.
* @param maxDistance Maximum distance (in radians) of results to return.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
withinRadians: function(key, point, distance) {
this.near(key, point);
this._addCondition(key, "$maxDistance", distance);
return this;
},
/**
* Add a proximity based constraint for finding objects with key point
* values near the point given and within the maximum distance given.
* Radius of earth used is 3958.8 miles.
* @param {String} key The key that the ML.GeoPoint is stored in.
* @param {ML.GeoPoint} point The reference ML.GeoPoint that is used.
* @param {Number} maxDistance Maximum distance (in miles) of results to
* return.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
withinMiles: function(key, point, distance) {
return this.withinRadians(key, point, distance / 3958.8);
},
/**
* Add a proximity based constraint for finding objects with key point
* values near the point given and within the maximum distance given.
* Radius of earth used is 6371.0 kilometers.
* @param {String} key The key that the ML.GeoPoint is stored in.
* @param {ML.GeoPoint} point The reference ML.GeoPoint that is used.
* @param {Number} maxDistance Maximum distance (in kilometers) of results
* to return.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
withinKilometers: function(key, point, distance) {
return this.withinRadians(key, point, distance / 6371.0);
},
/**
* Add a constraint to the query that requires a particular key's
* coordinates be contained within a given rectangular geographic bounding
* box.
* @param {String} key The key to be constrained.
* @param {ML.GeoPoint} southwest
* The lower-left inclusive corner of the box.
* @param {ML.GeoPoint} northeast
* The upper-right inclusive corner of the box.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
withinGeoBox: function(key, southwest, northeast) {
if (!(southwest instanceof ML.GeoPoint)) {
southwest = new ML.GeoPoint(southwest);
}
if (!(northeast instanceof ML.GeoPoint)) {
northeast = new ML.GeoPoint(northeast);
}
this._addCondition(key, '$within', { '$box': [southwest, northeast] });
return this;
},
/**
* Include nested ML.Objects for the provided key. You can use dot
* notation to specify which fields in the included object are also fetch.
* @param {String} key The name of the key to include.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
include: function() {
var self = this;
ML._arrayEach(arguments, function(key) {
if (_.isArray(key)) {
self._include = self._include.concat(key);
} else {
self._include.push(key);
}
});
return this;
},
/**
* Restrict the fields of the returned ML.Objects to include only the
* provided keys. If this is called multiple times, then all of the keys
* specified in each of the calls will be included.
* @param {Array} keys The names of the keys to include.
* @return {ML.Query} Returns the query, so you can chain this call.
*/
select: function() {
var self = this;
this._select = this._select || [];
ML._arrayEach(arguments, function(key) {
if (_.isArray(key)) {
self._select = self._select.concat(key);
} else {
self._select.push(key);
}
});
return this;
},
/**
* Iterates over each result of a query, calling a callback for each one. If
* the callback returns a promise, the iteration will not continue until
* that promise has been fulfilled. If the callback returns a rejected
* promise, then iteration will stop with that error. The items are
* processed in an unspecified order. The query may not have any sort order,
* and may not use limit or skip.
* @param callback {Function} Callback that will be called with each result
* of the query.
* @param options {Object} An optional Backbone-like options object with
* success and error callbacks that will be invoked once the iteration
* has finished.
* @return {ML.Promise} A promise that will be fulfilled once the
* iteration has completed.
*/
each: function(callback, options) {
options = options || {};
if (this._order || this._skip || (this._limit >= 0)) {
var error =
"Cannot iterate on a query with sort, skip, or limit.";
return ML.Promise.error(error)._thenRunCallbacks(options);
}
var promise = new ML.Promise();
var query = new ML.Query(this.objectClass);
// We can override the batch size from the options.
// This is undocumented, but useful for testing.
query._limit = options.batchSize || 100;
query._where = _.clone(this._where);
query._include = _.clone(this._include);
query.ascending('objectId');
var finished = false;
return ML.Promise._continueWhile(function() {
return !finished;
}, function() {
return query.find().then(function(results) {
var callbacksDone = ML.Promise.as();
ML._.each(results, function(result) {
callbacksDone = callbacksDone.then(function() {
return callback(result);
});
});
return callbacksDone.then(function() {
if (results.length >= query._limit) {
query.greaterThan("objectId", results[results.length - 1].id);
} else {
finished = true;
}
});
});
})._thenRunCallbacks(options);
}
};
ML.FriendShipQuery = ML.Query._extend({
_objectClass: ML.User,
_newObject: function(){
return new ML.User();
},
_processResult: function(json){
var user = json[this._friendshipTag];
if(user.__type === 'Pointer' && user.className === '_User'){
delete user.__type;
delete user.className;
}
return user;
},
});
};


console
This area I've been saving for sundries regarding the console. It's a pretty powerful little area within the browser you can use to access lots of information. Every now and then you'll find yourself making a great discovery in the console and you'll want to grab what you find there and pull it out.
This is a little trick I found deep on Stack Overflow that hopefully they will make more accessible in the future:
/*in console*/
Data Object = {...};
// right click on the edge of the Object
// store as a temporary variable
// creates 'temp1'
copy(temp1) // and then run this command
// to make this is available for
// pasting in text editor.
None of this stuff is mine, but was revealed to me by Scott Moss, our AngularJS lecturer, who must be involved with web standards and gets this information in advance. If you go to the console in chrome, certain methods that aren't common practice are made available.
Long story made short:
In the beginning the DOM was a bear to deal with.
They made jQuery, which fixed alot of DOM problems.
They later just fixed browser issues, and then built some more powerful features into Chrome.
Now I'm going to show you some next gen tricks that you don't need jQuery for that are in Chrome.
If this is too much of a fast forward and you want to see some of what jQuery does to help, go here. Some favor writing out the full JS nowadays (as I do).
I opened a console (⌘+option+j) in my blog. To prove jQuery is absent:
But... $ is here. Strange right?
What does this do without jQuery present? This would default to theequivalent of querySelectorAll, howvever this is something different, this is querySelectTheFirst ThatComesUp.
What imitates querySelectorAll? What about $$?
The double $ command line API helps us get querySelectorAll functionality.
What's nice is that it also gives us access to things as a simple array of items, rather that the large confusing jQuery object.
In this same vein of new Chrome tools, you may have accessed the ID of an object typing this stuff out.
An id has always been unique. This is the very definition of unique. This id has always been available on the window object.
This accesses the same information as $('#main'). However, you can take this trick even further. Even without the 'window.' present, it can figure out what to do next.
Pretty cool right?
This is a stub, there's more coming