The Calling
I felt it first when I introduced our product to Anand. Though I was proud of the work I do at Tars, I wasn’t so happy about its looks. I had worked with Anand earlier in building products; even though our product failed to deliver value, it was aesthetically pleasing.
As an engineer, I could see myself creating value in Tars by building the future of conversational interfaces. But it got to a point where I started disliking javascript. Unavoidable boilerplate code I have to write repeatedly. Work got repetitive, and programming isn’t fun anymore.
Our startup is bootstrapped and profitable since we took the interface route instead of pursuing the AI/ML hype. As our customers matured, there was no end to future requests. Most of them were great features that could save people time, effort and money. But they remained in words, moving from Google Docs to Jira to Notion.
Some of which got implemented after a lot of effort and time. Though it was functional, the experience got sacrificed for deliverability. Building software takes time, and I honestly started losing patience since my dream product seemed far away.
One evening as I was writing code to optimize WhatsApp Campaigns, I had a realization. I took a cab to Vinit’s place, and told him “I can’t do this anymore”. During the conversation, he told me “Why don’t you start a design team in this company?”
The Process
My heart started racing faster, life started to get exciting. We started small by taking part of the product and incrementally revamping it. It took us two weeks to hire interns. Sameer’s design stood out, and Priyamwada’s design case study was top-notch among 100s of applicants.
Though I had conducted design thinking workshops in my early 20s, they were not related to visual or UX design. It was more about empathizing with the user’s problem and finding affordable solutions. Later presenting the solution, taking feedback and improving the solution iteratively.
I set up a similar process here.
- Conduct interviews with customer success team
- Identify and prioritize pain points
- Competitive research
- Prototype
- Present & Take Feedback
- Iterate
Following the process is not the difficult part. You might end up making things cool but it need not work. It’s easy for us to get lost on thing that don’t even matter while being blind spotted to obvious and neccessary concerns.
Good design is more than making things look cool. It’s about building interfaces that are not ambiguous, providing actionable insights and empowering your customers to explore the product to its fullest. Such interfaces can be built only when the design team can empathize with the perspectives of different kinds of people.
Our customer success team significantly contributed to identifying interface barriers between the product and the user.
Ish brought a different perspective altogether. His common questions includes: “Why?”, “But, what do I do with it?”, “This part is not clear. Does it do this or does it do that?”.
Vinit understood the suitable threshold of elements that can go in the interface and get too overwhelming.
I made my team understand multiple perspectives, clarifyed intentions and explained technical jargons. Vinit also contributed to this. Slowly I could see Sameer and Priyamwada becoming more independent. My next focus is identifying common patterns in perspective and making them part of the design review process. Hence reducing the feedback loop and design rework.
Results
WhatsApp Campaigns Now (Some parts like main nav yet to be revamped).
Nothing was more exciting than to see our engineering team ship user flow analytics.
And here’s a preview of what’s coming.
Shipping things out on a deadline isn’t easy. Emmanual and Ankit significantly contributed to implementing the design without compromising the quality.
But
Yes, to the question, how can someone pull that off without experience in design?
Well, it’s less about me and more about an environment that’s set for growth.
It’s about the leaders who put faith in you when you want to do something in the company that has never been done before.
It’s about our then interns (now FTEs) who are open to constructive feedback and has the curiosity to learn things.
It’s about our colleagues who genuinely want the product to make our customers successful.
We are hiring good people, join us.


| Event | Team | Fraction Odds | Decimal Odds | Stake | Returns | Agreement | |
|---|---|---|---|---|---|---|---|
| {{bet.event}} | {{bet.name}} | {{bet.odds.numerator}}/{{bet.odds.denominator}} | {{bet.odds.numerator/bet.odds.denominator | number:2}} | £ | {{((bet.odds.numerator/bet.odds.denominator) * stake) + stake | currency:'£'}} | I confirm I am over 18 years of age and of legal capacity to place a bet/wager | Place Bet |


His lavish beard and pink tights strike fear into the hearts of his foes.
Bruno's playstyle is simple: equip armor and weapons, and smash your foes with them. Like all Krumit's Tale decks, his equipment has a durability mechanic: use it too much, and it self-destructs. This makes them play a little more like slow-release one-shots than traditional Sentinels ongoing/equipment cards, and helps prevent stagnation from having all of your buildup cards in play already (hi, Wraith).
Bruno leans more heavily into the equipment theme that than the other decks. Most of his cards are equipment, and he has cards to manipulate the durability of his equipment so he can keep using them longer. He also has a 4x ongoing that rewards him for perfectly blocking damage, allowing him to contribute damage and make sure the game ends within a reasonable time frame even while he's purely tanking. Overall, Bruno tends to play like a tank that requires active decision-making to optimally block and parry damage.
A powerful wizard and resident old guy at Meteorfall Tavern.
Greybeard is a blaster caster. He has three different types of spells: cold, fire, and lightning. Cold spells deal small amounts of damage, but can freeze foes to prevent them from dealing damage. Fire spells are best for single-target damage, and have some internal combos to yield large DPS bursts if you spend several turns focusing on a single target. Lightning spells do burst AOE damage, but require a discard cost to compensate for their immediate power. He also has a small selection of equipment that gives him alternate power options to round out his kit.
Her face is often found on "Wanted" posters, as her name suggests.
Mischief is a rogueish stabby sort. In the game, she's strongest against "solitary" enemies that aren't near other foes, and it's not too hard to manipulate the board state to chain enemies through a solitary state. In Sentinels, this is represented by making her strongest against the lowest HP target in a given play area, allowing you to continue a similar chain by killing each enemy in order. Her deck has a "Stab" theme, where she can play self-cycling stab cards that do chip damage. This allows her to more easily manipulate which target is considered the lowest HP before she uses her cards and powers that affect the target with the lowest HP. Overall, she tends to play like a DPS.
Once known as The Great Muldorf, this gin drinking hero accidentally consumed the spirit of an evil genie. He now walks the earth as Muldorf: Necrodude!
Muldorf is a necromantic who summons skeletons to fight for him. His skeletons can protect him from damage, and as the game goes on he can augment them with infernal magicks to make them damage-dealers in their own right. He also has cards to drain the life from his enemies which help him recover from some self-damage cards. Overall, he is a durable tank that is strongest in target-heavy games but can function alone.
Pure on the outside, but a hint of darkness within.
Rose is a priest who wields a mixture of holy magic and curses to smite her foes. Like Skyscraper, she has two forms that she can switch between frequently during the game: "Chosen" form, which uses radiant magic to banish curses, and "Queen of Shadows" form, which curses herself and others to gain more powerful effects. She is strategically complex, and properly managing your curse effects and self-damage is critical.
When Varfa came across Orhu abandoned in the jungle one day, she remarked how cute he looked. It wasn't until his first tantrum that she knew better.
Varfa is a ranger, and Orhu is her trained companion. Together, they hunt their foes with a tag-team takedown! They both start the game in play, and some cards cause Varfa to deal damage while others cause Orhu to deal damage. Varfa has traps, arrows, and technology, while Orhu has more personal buildup effects and can deal more damage once fully trained.


Projects
SlackCAH
Play Cards Against Humanity with your Slack team
2016
To improve my Ruby skills for my Diploma studies, and because the Diploma team was using Slack to communicate, I built a SlackBot to play Cards Against Humanity, and then posted it on GitHub
I built the game-logic / commands whilst using slack-ruby-bot to handle the connection to our Slack board. The bot works on Heroku, allowing team members to play whenever they want.
Players can start a game with designated players, pick their card(s) to play each round and reprompt the bot if they've forgotten their cards or the question. The bot can also show the status of other players so you can nag them to play/pick, it can tell you the currenty points tally and quit/restart the game on your command. One player each round is the card czar responsible for picking the winning hand, they aren't allowed to play their own hand that round.
I've created a configuration guide to help others set it up on their own Slack Team and channel. The guide also includes installation information for running the bot on Heroku. For more info about the bot, see my repository on GitHub.
KFL.com.au
An Australian Rules Football Fantasy League homepage
2015 - 2016
The KFL is a local Australian Rules Football fantasy league which had been running a simple website since the 2014 AFL Season.
I was approached to improve the functionality of their website, support more screen sizes, allow user sign-up and add team selection for their upcoming 2016 competition. The user sign-up and team selection was desired to enable competitors to play without having to email their team selections through to an admin.
In previous seasons the site content was edited by manually editing html files as such the client's main request was to be able to easily update the site. I rebuilt the site using Django for dynamically serving content and enabling updates through an admin console. I also used Bootstrap as a base to support mobile and tablet screen sizes.
The site was finished ahead of schedule, giving the client ample time to prepare for the 2016 AFL season.
"When I first had the idea to start a website for our fantasy football league, I had no idea of the time commitment it would take to ensure that it was always up to date. Manually updating each page, as well as pages that linked to it, was an administrative nightmare.
With the web design that Daniel created, updating pages is a breeze, and with the additional functionality that he has now added, we are able to use the website for far more than simply posting humourous articles, we can maintain team lists, selections, reserves, fixtures and many more things that were previously done manually. All of this is achieved using a simple interface that even some of the "low-tech" people in the league are able to easily work out and use."
KFL Site Administrator
"When I first had the idea to start a website for our fantasy football league, I had no idea of the time commitment it would take to ensure that it was always up to date. Manually updating each page, as well as pages that linked to it, was an administrative nightmare.
With the web design that Daniel created, updating pages is a breeze, and with the additional functionality that he has now added, we are able to use the website for far more than simply posting humourous articles, we can maintain team lists, selections, reserves, fixtures and many more things that were previously done manually. All of this is achieved using a simple interface that even some of the "low-tech" people in the league are able to easily work out and use."
"In all my dealings with Daniel he has been professional, and understood our needs, and done everything possible to accommodate our numerous requests for improved functionality. I would highly recommend Daniel, and his work."
KFL Site Owner
StevenCJones.com.au
A landing page for a local wedding/portrait photographer hosted on Google App Engine
2015
A local wedding/portrait photographer requested a simple landing page to develop his web presence and show his latest photoshoots.
He wanted the page to be clean, simple and needed the site to be live that weekend to coordinate the launch with his new Facebook business page.
After initial discussions at a lunch meeting, the site was built and hosted by the end of the day, just 5 hours later. Stevencjones.com.au was live in time for the launch of the client's new Facebook business page.
The photo portfolio shows low resolution images on page load, however clicking on an image brings up a slideshow showing off the high resolution photo's to potential customers. Bootstrap was used to achieve a responsive layout across desktop, tablet and mobile devices.
"Excellent quality under tight time constraints."
Steven Jones
"I provided Dan with my original website ideas, thoughts and expectations; he quickly made that vision a reality. Dan offered his expertise throughout the project which really gave it a professional look and feel."
Steven Jones
Loyalist
A Loyalty card application for Android
2014 - 2016
I developed Loyalist starting in 2014 to de-clutter my wallet. I always forgot my loyalty cards and missed out on the points and rewards when getting a meal or going to the movies.
The app now allows for multiple digital wallets, supports most major barcode types and allows for manual card entry for cards without barcodes. You can also save notes to each card and search your cards across all your wallets.
The app is available on all Android phones version 4.0.3 and up. You can find it on the Google Play Store using the button below.
Android, Google Play and the Google Play logo are trademarks of Google Inc.
"Scanned over a dozen cards, halved the size of my wallet. Works every time."
Play Store Review
"Very easy to use.
Play Store Review
KFL - Fantasy Competition
View articles and update your selections for the KFL Fantasy Football League
2016+
I developed KFL - Fantasy Competition in 2016 as an extension of the existing KFL website.
The app allows KFL competitors to view the latest articles and live scores, see their team's player roster and update their selections for the competition. The app communicates back to the KFL website to store their selections and get the latest articles.
The app is available on all Android phones version 4.1 and up. You can find it on the Google Play Store using the button below.
Android, Google Play and the Google Play logo are trademarks of Google Inc.
"Brilliant: Amazing app, allows me to monitor my fantasy football team without having to load the website. I'm sure it will only get better over time as well!"
Play Store Review
"Gold: Pontiff endorsed"
Play Store Review
Inspection Suite
A collection of VBA programs for Engineering Inspections
2011 - 2016
At WSP | Parsons Brinckerhoff we completed various inspections for clients of their mining and production assets for compliance to standards and to identify defects requiring remediation.
Initially inspections were completed by engineers using pen & paper on-site, requiring costly clean-up work back in the office to produce reports. To reduce these costs I built a variety of applications in Excel using VBA that allow for the full site inspection to be captured digitally (including photos, condition ratings, remedial tasks, minutes of meeting, drawings).
The applications also generate pdf reports for the client at the conclusion of the inspection. Simplifying and automating the report generation further reduced costs associated with our inspections improving our likelihood of winning future work.
"With this software I can inspect an asset in a fraction of the time and be able to produce a report for the client whilst still on site."
Inspector Feedback
"On Budget, on time, scope delivered as per proposal to an excellent quality with an excellent safety performance!"
Dampier Salt Client Feedback
Contact
Application Support
If you have any support questions about my apps please check the Frequently Asked Questions (FAQ) inside the app as the question has probably already been covered.
Otherwise, to help me quickly support you, please send an email with any supporting pictures/logs attached to<EMAIL_ADDRESS>Enquiries
Do you have an idea for a website or app you would like to see released?
Or, if you want to chat about software, technology or programming in general, please get in touch with me at enquiries@danielcswain.com.


cordova-plugin-sms-receive demo
Methods
SMSReceive.startWatch()
SMSReceive.stopWatch()
On Android 6+ the permission dialog will show up to request SMS receiving permission.
Status
SMS watching not started.
Events
Waiting for event.
About
Please contribute
with a small PayPal donation to support my plugins and keep them updated. Check out GitHub for details.
GitHub Page
Refer to this page to send feedback, contributions or more info.
http://github.com/andreszs/cordova-plugin-sms-receive


Become a partner
|
Register
|
Login
HOME
ABOUT US
TRACK
HOW IT WORKS
SUPPORT
SHIP NOW
Toggle navigation
HOME
ABOUT US
TRACK
HOW IT WORKS
SUPPORT
REGISTER
LOGIN
SHIP NOW
Ship Sticks Calculator Challenge
Launch Calculator
×
Calculator
Length
*
Width
*
Height
*
Weight
*
Calculate
Ship Sticks Calculator Challenge
press the launch calculator button above to launce the calculator and determine what product is right for your shipment


the and with for SARS-CoV that coronavirus inhibitors respiratory {background are entry syndrome viral acute protease margin virus The []. severe {border-style replication activity fusion nsp px;} #ffffff;} Virol SARS have compounds (Figure Chem Med been inhibitor novel protein This [], antiviral include its was which human inhibit shown some treatment acid also has into ACE RNA cell helicase not small East against binding cathepsin development from nucleic px; receptor this unwinding {font-family ATPase Biol Figure Res basis but clinical enzyme first font-size main molecule potential spike structures these viruses CLP Elsevier MERS-CoV Middle SSAAE activities all can compound double; inhibiting other two were HIV Lett NAAE SSYA- These border-color border-width cells cellular characterization domain drug glycoprotein identified including infection interactions known mechanism mechanisms membrane proteins report solid; specific such targets {font-style {font-weight AI, Acad C-like COVID- CoV Dis HIV- Infect Natl Opin SARS-CoV, SARS-coronavirus SARS-like Sci any bold both centre chemical class coronaviruses, courier; design discovery drugs em; essential hepatitis host immunodeficiency inhibited inhibitors. may new outbreak papain-like polyprotein pt;} recently, resource review ribavirin surface there within ••,


Lite Rx API Hands On
Hands-on, targeted at an audience new to reactive programming, with Reactor 3.
Lite Rx API Hands On
Hands-on, targeted at an audience new to reactive programming, with Reactor 3.
Practical Reactor workshop
Practical hands-on workshop, that includes over 100 unique exercises to provide production like experience and possibility improve existing skills, by Stefan Dragisic.
Flight of the Flux
An exploration of Reactor internals.
Get Started with Reactive Programming in Spring
A collection of tutorials based on Okta, Spring, and Reactor, by Matt Raible.
Get Reactive with Project Reactor and Spring 5
A deep-dive slide deck about Reactor and Spring, by Oleh Dokuka.
Head-First Spring and Reactor Reactive Workshop
A hands-on introduction to Spring Boot 2 and Reactor (archived)
Advanced Reactive Java (David Karnok's blog)
David Karnok ( akarnokd) is the main RxJava committer, and also contributes to Reactor. His blog digs deep into the details of reactive flow implementations, and most of this knowledge can be transposed to Reactor.


{% extends "extension/prompt_base.html" %} {% block content%}
You've been logged out of Eyebrowse
Log back in by clicking the icon above
{% endblock %}


Find Book!
Title:
Author:
Publisher:
Title:
Author:
Publisher:
Date Published:
Description:
Reception:
Keywords:
Article:


You have to run 'Install' before you can use Fabric7 for the first time. This program creates the paths for data and plot files, names the drives you want to use, and fixes the maximum number of data. You can also decide whether you want to use a password.


Manchester City report record revenue of £535m and £10.1m profit
Manchester City posted record revenue of £535million and a profit – £10.1m – for the fifth consecutive year, according to the club’s annual report.
Figures for the 12 months ending June 2019 show revenue above the £500m mark for the second successive year and it is understood the club expect that to rise to closer to more than £560m next year having signed a lucrative kit deal with Puma.
The club’s wage-to-revenue ratio stands at 59 per cent.
“This outcome represents not just a season, but a decade of hard work,” said chairman Khaldoon Al Mubarak, with the club in its second decade of ownership under Sheikh Mansour bin Zayed.
“The organisation is now at a level of maturity that enables us to plan on multi-year cycles both in terms of our management of squads and more widely across the business.
“This strategic planning has allowed us to create an environment in which continued on-pitch success is both possible and likely, and financial sustainability is a reality.”
Victories are not accidents; they are the product of careful planning, consistent hard work and the acknowledgement of the need to stay humble and hungryManchester City chief executive Ferran Soriano
Chief executive officer Ferran Soriano believes the club are well placed to continue a sequence which saw them win three trophies last season and 10 major honours since 2012.
“We can all be sure that we will be focused, resilient and consistent in our approach,” he said.
“Victories are not accidents; they are the product of careful planning, consistent hard work and the acknowledgement of the need to stay humble and hungry.”
body check tags ::


class ActiveRecord::Relation
Active Record Relation¶ ↑
Constants
- INVALID_METHODS_FOR_DELETE_ALL
- MULTI_VALUE_METHODS
- SINGLE_VALUE_METHODS
- VALUE_METHODS
Attributes
Public Class Methods
# File lib/active_record/relation.rb, line 22 def initialize(klass, table, values = {}) @klass = klass @table = table @values = values @offsets = {} @loaded = false end
Public Instance Methods
Compares two relations for equality.
# File lib/active_record/relation.rb, line 604 def ==(other) case other when Associations::CollectionProxy, AssociationRelation self == other.to_a when Relation other.to_sql == to_sql when Array to_a == other end end
Returns true if there are any records.
# File lib/active_record/relation.rb, line 273 def any? if block_given? to_a.any? { |*block_args| yield(*block_args) } else !empty? end end
Returns true if relation is blank.
# File lib/active_record/relation.rb, line 620 def blank? to_a.blank? end
Tries to create a new record with the same scoped attributes defined in the relation. Returns the initialized object if validation fails.
Expects arguments in the same format as Base.create
.
Examples¶ ↑
users = User.where(name: 'Oscar') users.create # #<User id: 3, name: "oscar", ...> users.create(name: 'fxn') users.create # #<User id: 4, name: "fxn", ...> users.create { |user| user.name = 'tenderlove' } # #<User id: 5, name: "tenderlove", ...> users.create(name: nil) # validation on name # #<User id: nil, name: nil, ...>
# File lib/active_record/relation.rb, line 141 def create(*args, &block) scoping { @klass.create(*args, &block) } end
Similar to create, but calls
create!
on the base class. Raises an exception if a validation
error occurs.
Expects arguments in the same format as Base.create!
.
# File lib/active_record/relation.rb, line 149 def create!(*args, &block) scoping { @klass.create!(*args, &block) } end
Deletes the row with a primary key matching the id
argument,
using a SQL DELETE
statement, and returns the number of rows
deleted. Active Record objects are not instantiated, so the object's
callbacks are not executed, including any :dependent
association options.
You can delete multiple rows at once by passing an Array of
id
s.
Note: Although it is often much faster than the alternative,
#destroy
, skipping callbacks might bypass business logic in
your application that ensures referential integrity or performs other
essential jobs.
Examples¶ ↑
# Delete a single row Todo.delete(1) # Delete multiple rows Todo.delete([2,3,4])
# File lib/active_record/relation.rb, line 503 def delete(id_or_array) where(primary_key => id_or_array).delete_all end
Deletes the records matching conditions
without instantiating
the records first, and hence not calling the destroy
method
nor invoking callbacks. This is a single SQL DELETE statement that goes
straight to the database, much more efficient than
destroy_all
. Be careful with relations though, in particular
:dependent
rules defined on associations are not honored.
Returns the number of rows affected.
Post.delete_all("person_id = 5 AND (category = 'Something' OR category = 'Else')") Post.delete_all(["person_id = ? AND (category = ? OR category = ?)", 5, 'Something', 'Else']) Post.where(person_id: 5).where(category: ['Something', 'Else']).delete_all
Both calls delete the affected posts all at once with a single DELETE
statement. If you need to destroy dependent associations or call your
before_*
or after_destroy
callbacks, use the
destroy_all
method instead.
If an invalid method is supplied, delete_all
raises an ActiveRecord error:
Post.limit(100).delete_all # => ActiveRecord::ActiveRecordError: delete_all doesn't support limit
# File lib/active_record/relation.rb, line 452 def delete_all(conditions = nil) invalid_methods = INVALID_METHODS_FOR_DELETE_ALL.select { |method| if MULTI_VALUE_METHODS.include?(method) send("#{method}_values").any? else send("#{method}_value") end } if invalid_methods.any? raise ActiveRecordError.new("delete_all doesn't support #{invalid_methods.join(', ')}") end if conditions where(conditions).delete_all else stmt = Arel::DeleteManager.new(arel.engine) stmt.from(table) if joins_values.any? @klass.connection.join_to_delete(stmt, arel, table[primary_key]) else stmt.wheres = arel.constraints end bvs = arel.bind_values + bind_values affected = @klass.connection.delete(stmt, 'SQL', bvs) reset affected end end
Destroy an object (or multiple objects) that has the given id. The object is instantiated first, therefore all callbacks and filters are fired off before the object is deleted. This method is less efficient than ActiveRecord#delete but allows cleanup methods and other actions to be run.
This essentially finds the object (or multiple objects) with the given id, creates a new object from the attributes, and then calls destroy on it.
Parameters¶ ↑
-
id
- Can be either an Integer or an Array of Integers.
Examples¶ ↑
# Destroy a single object Todo.destroy(1) # Destroy multiple objects todos = [1,2,3] Todo.destroy(todos)
# File lib/active_record/relation.rb, line 425 def destroy(id) if id.is_a?(Array) id.map { |one_id| destroy(one_id) } else find(id).destroy end end
Destroys the records matching conditions
by instantiating each
record and calling its destroy
method. Each object's
callbacks are executed (including :dependent
association
options). Returns the collection of objects that were destroyed; each will
be frozen, to reflect that no changes should be made (since they can't
be persisted).
Note: Instantiation, callback execution, and deletion of each record can be
time consuming when you're removing many records at once. It generates
at least one SQL DELETE
query per record (or possibly more, to
enforce your callbacks). If you want to delete many rows quickly, without
concern for their associations or callbacks, use delete_all
instead.
Parameters¶ ↑
-
conditions
- A string, array, or hash that specifies which records to destroy. If omitted, all records are destroyed. See the Conditions section in the introduction to ActiveRecord::Base for more information.
Examples¶ ↑
Person.destroy_all("last_login < '2004-04-04'") Person.destroy_all(status: "inactive") Person.where(age: 0..18).destroy_all
# File lib/active_record/relation.rb, line 398 def destroy_all(conditions = nil) if conditions where(conditions).destroy_all else to_a.each {|object| object.destroy }.tap { reset } end end
Returns true if relation needs eager loading.
# File lib/active_record/relation.rb, line 583 def eager_loading? @should_eager_load ||= eager_load_values.any? || includes_values.any? && (joined_includes_values.any? || references_eager_loaded_tables?) end
Returns true if there are no records.
# File lib/active_record/relation.rb, line 261 def empty? return @records.empty? if loaded? if limit_value == 0 true else c = count(:all) c.respond_to?(:zero?) ? c.zero? : c.empty? end end
Serializes the relation objects Array.
# File lib/active_record/relation.rb, line 247 def encode_with(coder) coder.represent_seq(nil, to_a) end
Runs EXPLAIN on the query or queries triggered by this relation and returns the result as a string. The string is formatted imitating the ones printed by the database shell.
Note that this method actually runs the queries, since the results of some are needed by the next ones when eager loading is going on.
Please see further details in the Active Record Query Interface guide.
# File lib/active_record/relation.rb, line 235 def explain #TODO: Fix for binds. exec_explain(collecting_queries_for_explain { exec_queries }) end
Finds the first record with the given attributes, or creates a record with the attributes if one is not found:
# Find the first user named "Penélope" or create a new one. User.find_or_create_by(first_name: 'Penélope') # => #<User id: 1, first_name: "Penélope", last_name: nil> # Find the first user named "Penélope" or create a new one. # We already have one so the existing record will be returned. User.find_or_create_by(first_name: 'Penélope') # => #<User id: 1, first_name: "Penélope", last_name: nil> # Find the first user named "Scarlett" or create a new one with # a particular last name. User.create_with(last_name: 'Johansson').find_or_create_by(first_name: 'Scarlett') # => #<User id: 2, first_name: "Scarlett", last_name: "Johansson">
This method accepts a block, which is passed down to create
.
The last example above can be alternatively written this way:
# Find the first user named "Scarlett" or create a new one with a # different last name. User.find_or_create_by(first_name: 'Scarlett') do |user| user.last_name = 'Johansson' end # => #<User id: 2, first_name: "Scarlett", last_name: "Johansson">
This method always returns a record, but if creation was attempted and
failed due to validation errors it won't be persisted, you get what
create
returns in such situation.
Please note *this method is not atomic*, it runs first a SELECT, and if there are no results an INSERT is attempted. If there are other threads or processes there is a race condition between both calls and it could be the case that you end up with two similar records.
Whether that is a problem or not depends on the logic of the application, but in the particular case in which rows have a UNIQUE constraint an exception may be raised, just retry:
begin CreditAccount.find_or_create_by(user_id: user.id) rescue ActiveRecord::RecordNotUnique retry end
# File lib/active_record/relation.rb, line 211 def find_or_create_by(attributes, &block) find_by(attributes) || create(attributes, &block) end
Like find_or_create_by
, but calls create!
so an
exception is raised if the created record is invalid.
# File lib/active_record/relation.rb, line 217 def find_or_create_by!(attributes, &block) find_by(attributes) || create!(attributes, &block) end
Like find_or_create_by
, but calls new
instead of
create
.
# File lib/active_record/relation.rb, line 222 def find_or_initialize_by(attributes, &block) find_by(attributes) || new(attributes, &block) end
# File lib/active_record/relation.rb, line 30 def initialize_copy(other) # This method is a hot spot, so for now, use Hash[] to dup the hash. # https://bugs.ruby-lang.org/issues/7166 @values = Hash[@values] @values[:bind] = @values[:bind].dup if @values.key? :bind reset end
# File lib/active_record/relation.rb, line 628 def inspect entries = to_a.take([limit_value, 11].compact.min).map!(&:inspect) entries[10] = '...' if entries.size == 11 "#<#{self.class.name} [#{entries.join(', ')}]>" end
Joins that are also marked for preloading. In which case we should just eager load them. Note that this is a naive implementation because we could have strings and symbols which represent the same association, but that aren't matched by this. Also, we could have nested hashes which partially match, e.g. { a: :b } & { a: [:b, :c] }
# File lib/active_record/relation.rb, line 593 def joined_includes_values includes_values & joins_values end
Causes the records to be loaded from the database if they have not been loaded already. You can use this if for some reason you need to explicitly load some records before actually using them. The return value is the relation itself, not the records.
Post.where(published: true).load # => #<ActiveRecord::Relation>
# File lib/active_record/relation.rb, line 513 def load exec_queries unless loaded? self end
Returns true if there is more than one record.
# File lib/active_record/relation.rb, line 282 def many? if block_given? to_a.many? { |*block_args| yield(*block_args) } else limit_value ? to_a.many? : size > 1 end end
Initializes new record from relation while maintaining the current scope.
Expects arguments in the same format as Base.new
.
users = User.where(name: 'DHH') user = users.new # => #<User id: nil, name: "DHH", created_at: nil, updated_at: nil>
You can also pass a block to new with the new record as argument:
user = users.new { |user| user.name = 'Oscar' } user.name # => Oscar
# File lib/active_record/relation.rb, line 118 def new(*args, &block) scoping { @klass.new(*args, &block) } end
# File lib/active_record/relation.rb, line 615 def pretty_print(q) q.pp(self.to_a) end
Forces reloading of relation.
# File lib/active_record/relation.rb, line 520 def reload reset load end
# File lib/active_record/relation.rb, line 525 def reset @last = @to_sql = @order_clause = @scope_for_create = @arel = @loaded = nil @should_eager_load = @join_dependency = nil @records = [] @offsets = {} self end
# File lib/active_record/relation.rb, line 578 def scope_for_create @scope_for_create ||= where_values_hash.merge(create_with_value) end
Scope all queries to the current scope.
Comment.where(post_id: 1).scoping do Comment.first end # => SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 ORDER BY "comments"."id" ASC LIMIT 1
Please check unscoped if you want to remove all previous scopes (including the default_scope) during the execution of a block.
# File lib/active_record/relation.rb, line 299 def scoping previous, klass.current_scope = klass.current_scope, self yield ensure klass.current_scope = previous end
Returns size of the records.
# File lib/active_record/relation.rb, line 256 def size loaded? ? @records.length : count(:all) end
Converts relation objects to Array.
# File lib/active_record/relation.rb, line 241 def to_a load @records end
Returns sql statement for the relation.
User.where(name: 'Oscar').to_sql # => SELECT "users".* FROM "users" WHERE "users"."name" = 'Oscar'
# File lib/active_record/relation.rb, line 537 def to_sql @to_sql ||= begin relation = self connection = klass.connection visitor = connection.visitor if eager_loading? find_with_associations { |rel| relation = rel } end arel = relation.arel binds = (arel.bind_values + relation.bind_values).dup binds.map! { |bv| connection.quote(*bv.reverse) } collect = visitor.accept(arel.ast, Arel::Collectors::Bind.new) collect.substitute_binds(binds).join end end
uniq
and uniq!
are silently deprecated.
uniq_value
delegates to distinct_value
to
maintain backwards compatibility. Use distinct_value
instead.
# File lib/active_record/relation.rb, line 599 def uniq_value distinct_value end
Updates an object (or multiple objects) and saves it to the database, if validations pass. The resulting object is returned whether the object was saved successfully to the database or not.
Parameters¶ ↑
-
id
- This should be the id or an array of ids to be updated. -
attributes
- This should be a hash of attributes or an array of hashes.
Examples¶ ↑
# Updates one record Person.update(15, user_name: 'Samuel', group: 'expert') # Updates multiple records people = { 1 => { "first_name" => "David" }, 2 => { "first_name" => "Jeremy" } } Person.update(people.keys, people.values)
# File lib/active_record/relation.rb, line 363 def update(id, attributes) if id.is_a?(Array) id.map.with_index { |one_id, idx| update(one_id, attributes[idx]) } else object = find(id) object.update(attributes) object end end
Updates all records in the current relation with details given. This method constructs a single SQL UPDATE statement and sends it straight to the database. It does not instantiate the involved models and it does not trigger Active Record callbacks or validations. Values passed to `update_all` will not go through ActiveRecord's type-casting behavior. It should receive only values that can be passed as-is to the SQL database.
Parameters¶ ↑
-
updates
- A string, array, or hash representing the SET part of an SQL statement.
Examples¶ ↑
# Update all customers with the given attributes Customer.update_all wants_email: true # Update all books with 'Rails' in their title Book.where('title LIKE ?', '%Rails%').update_all(author: 'David') # Update all books that match conditions, but limit it to 5 ordered by date Book.where('title LIKE ?', '%Rails%').order(:created_at).limit(5).update_all(author: 'David')
# File lib/active_record/relation.rb, line 326 def update_all(updates) raise ArgumentError, "Empty list of attributes to change" if updates.blank? stmt = Arel::UpdateManager.new(arel.engine) stmt.set Arel.sql(@klass.send(:sanitize_sql_for_assignment, updates)) stmt.table(table) stmt.key = table[primary_key] if joins_values.any? @klass.connection.join_to_update(stmt, arel) else stmt.take(arel.limit) stmt.order(*arel.orders) stmt.wheres = arel.constraints end bvs = arel.bind_values + bind_values @klass.connection.update stmt, 'SQL', bvs end
# File lib/active_record/relation.rb, line 624 def values Hash[@values] end
Returns a hash of where conditions.
User.where(name: 'Oscar').where_values_hash # => {name: "Oscar"}
# File lib/active_record/relation.rb, line 559 def where_values_hash(relation_table_name = table_name) equalities = where_values.grep(Arel::Nodes::Equality).find_all { |node| node.left.relation.name == relation_table_name } binds = Hash[bind_values.find_all(&:first).map { |column, v| [column.name, v] }] Hash[equalities.map { |where| name = where.left.name [name, binds.fetch(name.to_s) { case where.right when Array then where.right.map(&:val) when Arel::Nodes::Casted where.right.val end }] }] end
Private Instance Methods
# File lib/active_record/relation.rb, line 653 def build_preloader ActiveRecord::Associations::Preloader.new end
# File lib/active_record/relation.rb, line 637 def exec_queries @records = eager_loading? ? find_with_associations : @klass.find_by_sql(arel, arel.bind_values + bind_values) preload = preload_values preload += includes_values unless eager_loading? preloader = build_preloader preload.each do |associations| preloader.preload @records, associations end @records.each { |record| record.readonly! } if readonly_value @loaded = true @records end
# File lib/active_record/relation.rb, line 657 def references_eager_loaded_tables? joined_tables = arel.join_sources.map do |join| if join.is_a?(Arel::Nodes::StringJoin) tables_in_string(join.left) else [join.left.table_name, join.left.table_alias] end end joined_tables += [table.name, table.table_alias] # always convert table names to downcase as in Oracle quoted table names are in uppercase joined_tables = joined_tables.flatten.compact.map { |t| t.downcase }.uniq (references_values - joined_tables).any? end
# File lib/active_record/relation.rb, line 674 def tables_in_string(string) return [] if string.blank? # always convert table names to downcase as in Oracle quoted table names are in uppercase # ignore raw_sql_ that is used by Oracle adapter as alias for limit/offset subqueries string.scan(/([a-zA-Z_][.\w]+).?\./).flatten.map{ |s| s.downcase }.uniq - ['raw_sql_'] end


{% extends "templates/layout.html" %} {% block styles %} {% endblock %} {% block scripts %} {% endblock %} {% block body %}
You cannot upload new mods or create new lists unless you make your profile public.
Email: ${user.email}
Confirmed:
Yes
No
[Confirm Manually]
Public: YesNo
Created: ${user.created}


Jason Fuller posted a new course WordPress for Beginner
Marie Wagner Marie Wagner announcement For the next 5 days, you can download...


Order and get your pizza delivered in 30 mins.
delicious and quality pizza
Monday & Tuesday
9:00 AM - 4:00 PM
Wednesday & Thursday
9:00 AM - Midnight
Friday & Saturday
Sunday
9:00 AM - 11:00 PM


Buttons
Primary Large
Primary Large
Primary Small
Primary Small
Secondary
Secondary
Headings
Lorem ipsum dolor sit.
Lorem ipsum dolor sit.
Lorem ipsum dolor sit.
Lorem ipsum dolor sit.
Lorem ipsum dolor sit.
Lorem ipsum dolor sit.


The internet makes up a HUGE part of our lives. We all use it. We all love it. We definitely couldn't live without it. But how does it work?
For simplicity and understanding, let's look at the internet as two main components. First, there is hardware. This includes computers, cables, routers, modems, cell phone towers, smart phones, and all other devices that work together to help create a network.
The second component are protocols or sets of rules that machines follow to complete tasks. All of the machines connected to the internet have a common set of rules and procedures to make the internet run. They all must be able to understand each other and send information. Without protocols you would need direct connections to other devices to access the information they hold.
The internet is often confused with the World Wide Web, but these two things are not synonymous. While the internet is the collection of the many different protocols and hardware, the World Wide Web is one of those different protocols.
The Wen contains a large collection of linked multimedia pages, ever growing and changing. As I have learned, there are several different components of the Web that allow users to communicate with each other.
The internet is a fascinating tool and I hope to continue my learning of it's foundation and interworkings. I will keep you updated!


-->
We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.


Create a new Wallet
Join an existent Wallet
Import a Wallet to Copay
It's important to backup your profile so that you can recover it in case of disaster. The backup will include all your profile's wallets


#include <CImg.h>
|
| static const char * | string () |
| |
| static bool | is_float () |
| |
| static bool | is_inf (const unsigned char) |
| |
| static bool | is_nan (const unsigned char) |
| |
| static unsigned char | min () |
| |
| static unsigned char | max () |
| |
| static unsigned char | inf () |
| |
| static unsigned char | cut (const double val) |
| |
| static const char * | format () |
| |
| static const char * | format_s () |
| |
| static unsigned int | format (const unsigned char val) |
| |
◆ cut()
◆ format() [1/2]
◆ format() [2/2]
◆ format_s()
◆ inf()
◆ is_float()
◆ is_inf()
◆ is_nan()
◆ max()
◆ min()
◆ string()
The documentation for this struct was generated from the following file:
- D:/code/MRCEditor/src/algorithm/CImg.h


Copyright (c) 2008, Luca Cervone and Fabio Vitali, University of Bologna.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the University of Bologna nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.


iTasbeeh - The Zikr app
Recite and Tap.
Handy and Easy to use
Unlimited Tasbeeh.
No Ads - 100% Free, 100% Offline.
Get it on the App Store


Demosthenes Koptsis
on 2012-07-17 23:34:20
This code overwrite keys with the same index. Does not preserve these values. Value 5 has key 0 same with value 10. The result is the value 10 overwrites 5.
Demosthenes Koptsis
on 2012-07-16 18:07:20
There is a bug i think.
arr1 = {'color': {'favourite': 'read'}, 0: 5};
arr2 = {0: 10, 'color': {'favorite': 'green', 0: 'blue'}};
Result = {0=10, 'color':{'favourite': 'read', 'favorite':'green', 0='blue'}}
value: 5 is lost!
????? ????
on 2012-04-10 09:55:43
If I might —perhaps you should consider adding a few images. I don’t mean to disrespect what you’ve said ; its very enlightening, indeed. However, I think would respond to it more positively if they could be something tangible to your ideas
Shannon
on 2010-02-12 21:23:36
Sorry I included the script tags without thinking.
var arr1 = {'color': {'favorite': 'red'}, 0: 5}, arr2 = {0: 10, 'color': {'favorite': 'green', 0: 'blue'}};
result = array_merge_recursive(arr1, arr2);
// result = {0:10,'color':{0:'blue','favorite':'green'}}
Shannon
on 2010-02-12 21:17:39
Am I doing some thing wrong? Using your example I get the following:
<script>
var arr1 = {'color': {'favorite': 'red'}, 0: 5},
arr2 = {0: 10, 'color': {'favorite': 'green', 0: 'blue'}};
result = array_merge_recursive(arr1, arr2);
// result = {0:10,color:{0:blue,favorite:green}}
</script>
I downloaded the full package so I should have all the dependencies.


1 Samuel 9:18
Then Saul drew near to Samuel in the gate, and said, Tell me, I pray thee, where the seer's house is.


Software Practice in the Ptolemy Project
by J. Reekie, S. Neuendorffer, C. Hylands and E.A. Lee
Technical Report Series GSRC-TR-1999-01, Gigascale Semiconductor Research Center,
University of California, Berkeley, CA, USA 94720
April 1999
PDF file
ABSTRACT
In the Ptolemy project at UC Berkeley, we have been exploring ways of improving our software development process. Unlike many other efforts at improving software development, our efforts are focused on the particular needs of leading-edge academic research. High levels of creativity and flexibility are paramount in this environment, and the goals and qualifications of those producing the software are substantially different from those in commercial software production. This report describes our efforts to meet these needs and what we have learned.


Mantle 1.0 Reference
Mantle
Mantle makes it easy to write a simple model layer for your Cocoa or Cocoa Touch
application.
Getting Started
To start building the framework, clone this repository and then run script/bootstrap
.
This will automatically pull down any dependencies.
The Typical Model Object
What’s wrong with the way model objects are usually written in Objective-C?
Let’s use the GitHub API for demonstration. How
would one typically represent a ~!@GitHub
issue@!~ in
Objective-C?
```objc
typedef enum : NSUInteger {
GHIssueStateOpen,
GHIssueStateClosed
} GHIssueState;
@interface GHIssue : NSObject <NSCoding, NSCopying>
@property (nonatomic, copy, readonly) NSURL URL;
@property (nonatomic, copy, readonly) NSURL HTMLURL;
@property (nonatomic, copy, readonly) NSNumber number;
@property (nonatomic, assign, readonly) GHIssueState state;
@property (nonatomic, copy, readonly) NSString reporterLogin;
@property (nonatomic, copy, readonly) NSDate updatedAt;
@property (nonatomic, strong, readonly) GHUser assignee;
@property (nonatomic, copy) NSString title;
@property (nonatomic, copy) NSString body;
- (id)initWithDictionary:(NSDictionary *)dictionary;
@end
```
```objc
@implementation GHIssue
(NSDateFormatter )dateFormatter {
NSDateFormatter dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@“en_US_POSIX”];
dateFormatter.dateFormat = @“yyyy-MM-dd’T'HH:mm:ss'Z'”;
return dateFormatter;
}(id)initWithDictionary:(NSDictionary *)dictionary {
self = [self init];
if (self == nil) return nil;URL = [NSURL URLWithString:dictionary[@“url”]];
HTMLURL = [NSURL URLWithString:dictionary[@“html_url”]];
_number = dictionary[@“number”];if ([dictionary[@“state”] isEqualToString:@“open”]) {
state = GHIssueStateOpen;
} else if ([dictionary[@“state”] isEqualToString:@“closed”]) {
state = GHIssueStateClosed;
}title = [dictionary[@“title”] copy];
body = [dictionary[@“body”] copy];
reporterLogin = [dictionary[@“user”][@“login”] copy];
assignee = [[GHUser alloc] initWithDictionary:dictionary[@“assignee”]];_updatedAt = [self.class.dateFormatter dateFromString:dictionary[@“updated_at”]];
return self;
}(id)initWithCoder:(NSCoder *)coder {
self = [self init];
if (self == nil) return nil;URL = [coder decodeObjectForKey:@“URL”];
HTMLURL = [coder decodeObjectForKey:@“HTMLURL”];
number = [coder decodeObjectForKey:@“number”];
state = [coder decodeUnsignedIntegerForKey:@“state”];
title = [coder decodeObjectForKey:@“title”];
body = [coder decodeObjectForKey:@“body”];
reporterLogin = [coder decodeObjectForKey:@“reporterLogin”];
assignee = [coder decodeObjectForKey:@“assignee”];
_updatedAt = [coder decodeObjectForKey:@“updatedAt”];return self;
}(void)encodeWithCoder:(NSCoder *)coder {
if (self.URL != nil) [coder encodeObject:self.URL forKey:@“URL”];
if (self.HTMLURL != nil) [coder encodeObject:self.HTMLURL forKey:@“HTMLURL”];
if (self.number != nil) [coder encodeObject:self.number forKey:@“number”];
if (self.title != nil) [coder encodeObject:self.title forKey:@“title”];
if (self.body != nil) [coder encodeObject:self.body forKey:@“body”];
if (self.reporterLogin != nil) [coder encodeObject:self.reporterLogin forKey:@“reporterLogin”];
if (self.assignee != nil) [coder encodeObject:self.assignee forKey:@“assignee”];
if (self.updatedAt != nil) [coder encodeObject:self.updatedAt forKey:@“updatedAt”];[coder encodeUnsignedInteger:self.state forKey:@“state”];
}(id)copyWithZone:(NSZone )zone {
GHIssue issue = [[self.class allocWithZone:zone] init];
issue->URL = self.URL;
issue->HTMLURL = self.HTMLURL;
issue->number = self.number;
issue->state = self.state;
issue->reporterLogin = self.reporterLogin;
issue->assignee = self.assignee;
issue->_updatedAt = self.updatedAt;issue.title = self.title;
issue.body = self.body;
}(NSUInteger)hash {
return self.number.hash;
}(BOOL)isEqual:(GHIssue *)issue {
if (![issue isKindOfClass:GHIssue.class]) return NO;return [self.number isEqual:issue.number] && [self.title isEqual:issue.title] && [self.body isEqual:issue.body];
}
@end
```
Whew, that’s a lot of boilerplate for something so simple! And, even then, there
are some problems that this example doesn’t address:
- If the
url
orhtml_url
field is missing,[NSURL URLWithString:]
will throw an exception. - There’s no way to update a
GHIssue
with new data from the server. - There’s no way to turn a
GHIssue
back into JSON. GHIssueState
shouldn’t be encoded as-is. If the enum changes in the future, existing archives might break.- If the interface of
GHIssue
changes down the road, existing archives might break.
Why Not Use Core Data?
Core Data solves certain problems very well. If you need to execute complex
queries across your data, handle a huge object graph with lots of relationships,
or support undo and redo, Core Data is an excellent fit.
It does, however, come with a couple of pain points:
- There’s still a lot of boilerplate. Managed objects reduce some of the
boilerplate seen above, but Core Data has plenty of its own. Correctly
setting up a Core Data stack (with a persistent store and persistent store
coordinator) and executing fetches can take many lines of code. - It’s hard to get right. Even experienced developers can make mistakes
when using Core Data, and the framework is not forgiving.
If you’re just trying to access some JSON objects, Core Data can be a lot of
work for little gain.
Nonetheless, if you’re using or want to use Core Data in your app already,
Mantle can still be a convenient translation layer between the API and your managed
model objects.
MTLModel
Enter
MTLModel
.
This is what GHIssue
looks like inheriting from MTLModel
:
```objc
typedef enum : NSUInteger {
GHIssueStateOpen,
GHIssueStateClosed
} GHIssueState;
@interface GHIssue : MTLModel
MTLJSONSerializing
@property (nonatomic, copy, readonly) NSURL URL;
@property (nonatomic, copy, readonly) NSURL HTMLURL;
@property (nonatomic, copy, readonly) NSNumber number;
@property (nonatomic, assign, readonly) GHIssueState state;
@property (nonatomic, copy, readonly) NSString reporterLogin;
@property (nonatomic, strong, readonly) GHUser assignee;
@property (nonatomic, copy, readonly) NSDate updatedAt;
@property (nonatomic, copy) NSString title;
@property (nonatomic, copy) NSString body;
@end
```
```objc
@implementation GHIssue
(NSDateFormatter )dateFormatter {
NSDateFormatter dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@“en_US_POSIX”];
dateFormatter.dateFormat = @“yyyy-MM-dd’T'HH:mm:ss'Z'”;
return dateFormatter;
}(NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@“URL”: @“url”,
@“HTMLURL”: @“html_url”,
@“reporterLogin”: @“user.login”,
@“assignee”: @“assignee”,
@“updatedAt”: @“updated_at"
};
}(NSValueTransformer *)URLJSONTransformer {
return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName];
}(NSValueTransformer *)HTMLURLJSONTransformer {
return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName];
}(NSValueTransformer )stateJSONTransformer {
NSDictionary states = @{
@“open”: @(GHIssueStateOpen),
@“closed”: @(GHIssueStateClosed)
};return [MTLValueTransformer reversibleTransformerWithForwardBlock:^(NSString str) {
return states[str];
} reverseBlock:^(NSNumber state) {
return [states allKeysForObject:state].lastObject;
}];
}(NSValueTransformer *)assigneeJSONTransformer {
return [NSValueTransformer mtl_JSONDictionaryTransformerWithModelClass:GHUser.class];
}(NSValueTransformer )updatedAtJSONTransformer {
return [MTLValueTransformer reversibleTransformerWithForwardBlock:^(NSString str) {
return [self.dateFormatter dateFromString:str];
} reverseBlock:^(NSDate *date) {
return [self.dateFormatter stringFromDate:date];
}];
}
@end
```
Notably absent from this version are implementations of <NSCoding>
,
<NSCopying>
, -isEqual:
, and -hash
. By inspecting the @property
declarations you have in your subclass, MTLModel
can provide default
implementations for all these methods.
The problems with the original example all happen to be fixed as well:
If the
url
orhtml_url
field is missing,[NSURL URLWithString:]
will throw an exception.
The URL transformer we used (included in Mantle) returns nil
if given a nil
string.
There’s no way to update a
GHIssue
with new data from the server.
MTLModel
has an extensible -mergeValuesForKeysFromModel:
method, which makes
it easy to specify how new model data should be integrated.
There’s no way to turn a
GHIssue
back into JSON.
This is where reversible transformers really come in handy. [MTLJSONAdapter JSONDictionaryFromModel:]
can transform any model object conforming to
MTLJSONSerializing
back into a JSON dictionary.
If the interface of
GHIssue
changes down the road, existing archives might break.
MTLModel
automatically saves the version of the model object that was used for
archival. When unarchiving, -decodeValueForKey:withCoder:modelVersion:
will
be invoked if overridden, giving you a convenient hook to upgrade old data.
Persistence
Mantle doesn’t automatically persist your objects for you. However, MTLModel
does conform to <NSCoding>
, so model objects can be archived to disk using
NSKeyedArchiver
.
If you need something more powerful, or want to avoid keeping your whole model
in memory at once, Core Data may be a better choice.
License
Mantle is released under the MIT license. See
LICENSE.md.


PROTOTYPE This is a new service – your feedback will help us to improve it.
{% extends "govuk_template.html" %} {% block head %} {% include "includes/head.html" %} {% endblock %} {% block cookie_message %}
{{cookieText | safe }}
{% endblock %} {% block proposition_header %} {% include "includes/propositional_navigation.html" %} {% endblock %} {% block header_class %} with-proposition {% endblock %} {% block page_title %} Hey hey! {% endblock %} {% block content %}


With Viewport
With Viewport
One of the world's most popular characters is back on the big screen as a new chapter in the Spider-Man legacy is revealed in "The Amazing Spider-Man." Focusing on an untold story that tells a different side of the Peter Parker story, the new film stars Andrew Garfield, Emma Stone, Rhys Ifans, Denis Leary, Campbell Scott, Irrfan Khan, with Martin Sheen and Sally Field. The film is directed by Marc Webb from a screenplay written by James Vanderbilt, based on the Marvel Comic Book by Stan Lee and Steve Ditko. Laura Ziskin, Avi Arad, and Matt Tolmach are producing the film in association with Marvel Entertainment for Columbia Pictures, which will open in theaters everywhere in 3D on July 3, 2012.
The film also stars Anne Hathaway, as Selina Kyle; Tom Hardy, as Bane; Oscar winner Marion Cotillard ("La Vie en Rose"), as Miranda Tate; and Joseph Gordon-Levitt, as John Blake. Returning to the main cast, Oscar winner Michael Caine ("The Cider House Rules") plays Alfred; Gary Oldman is Commissioner Gordon; and Oscar winner Morgan Freeman ("Million Dollar Baby") reprises the role of Lucius Fox. The screenplay is written by Christopher Nolan and Jonathan Nolan, story by Christopher Nolan & David S. Goyer.
In "Ice Age: Continental Drift," Scrat's nutty pursuit of the cursed acorn, which he's been after since the dawn of time, has world-changing consequences -- a continental cataclysm that triggers the greatest adventure of all for Manny, Diego and Sid. In the wake of these earth-shattering upheavals, Sid reunites with his long lost family, and the gang encounters a ragtag menagerie of colorful new characters determined to stop them from returning home.


{% load utilities %}
Thank you for joining the Open Humans community!
It's our mission to help connect you and your data with researchers. In Open Humans, you'll be able to build a profile with data you receive from studies and commercial sources. We'll invite you to share that data in various ways, publicly or directly with projects.
To make sure you get future emails from us, add our email to your "contacts". Without this step, our emails might be "filtered" by your email client!
We have many data sources you can add! Each source you add is a generous contribution to science and gets you a badge on your public profile. It also helps enable more studies because researchers can design studies more easily when they know members have data ready to share.
Here are some quick links for adding our current sources:
(Note: Most data sources have no special relationship with Open Humans. Supporting data contribution from a source doesn't mean we endorse it.)
Do you have more data that we aren't specifically supporting? Sometimes members have rich data about themselves that's more unique (e.g. related to a medical condition they've experienced). Our "Data Selfie" feature lets you share any file you want to upload: {{ data_selfie_url }}
Data is private by default. For each data source, you can opt to turn on public sharing. To enable this feature, you'll need to activate it here: {{ public_sharing_url }}
You'll be able to turn "public" status on (and off) for each of your data sources on your data management page: {{ data_management_url }}
{% if not newsletter %}You've opted to not receive news and update emails. Maybe you'd like to enable this? We really don't email much! We email to tell Members about new studies and activities, and give updates about progress in current studies. You can change this on your account settings page: {% url 'my-member-settings' %}
{% endif %}Thank you again for joining Open Humans! With your help, we'll start breaking down data silos in human health and research.
Sincerely,
Mad, Bastian, and the rest of the Open Humans team.
P.S. You can also follow us on Twitter at @OpenHumansOrg, Facebook, and the Open Humans blog!


US military drone lost over Libyan capital Tripoli
by Agency ReportThe U.S. has said that it lost a military drone over the Libyan capital Tripoli, where months-long fighting is dragging on between warring rivals.
The remotely piloted aircraft was lost on Thursday, the U.S. Africa Command said early Saturday.
The incident is being investigated, the command said without details.
“RPA operations are conducted in Libya to assess the ongoing security situation and monitor violent extremist activity.
“These operations are critical to counter activity in Libya and are fully coordinated with appropriate government officials,” the command said.
Libya slid into anarchy after a 2011 armed revolt which toppled long-time dictator Moamer Gaddafi, making the oil-rich country a magnet for militants including Islamic State.
Libya has at least two rival administrations: a UN-backed government based in Tripoli, and the other based in the eastern city of Tobruk, which is allied with military strongman Khalifa Haftar.
In April, Haftar ordered a military campaign to seize Tripoli.
This week, Haftar’s forces said they had downed an Italian drone in western Libya.
(dpa/NAN)


Tag to policies if your document is about how the government is developing a policy. Documents that should be tagged to policies include consultations, policy papers, research and analysis publications and press releases. More on when to tag to policies.
Users subscribed to policy areas will receive an email when new content is published.


Order Pizza
Your Name:
Select Size:
Small (10") | $10
Medium (12") | $15
Large (14") | $20
Choose Toppings: $1.50 each
Cheese
Pepperoni
Chicken
Mushroom
Spinich
Olives
Artichoke
Price Check
, here is the order detail:
Size:
Toppings:
Price:


---
layout: single
author_profile: true
---
WS 22/23
Advanced Lecture Reactive Synthesis
SS 22
Seminar Advanced Topics in Program Analysis
WS 21/22
Seminar Formal Methods for AI Safety
SS 21
Proseminar Decision Procedures for Verification and Synthesis
WS 20/21
Seminar Formal Methods for AI Safety
Courses at summer schools
Modules in which I was involved at the University of Sheffield
2019/2020
- COM6906/6910/6912/6013: Dissertation Project (MSc project supervisor)
- COM1001: Introduction to Software Engineering (Group project supervisor)
Modules in which I was involved at the University of Leicester
2019/2020
- CO7201: MSc Individual Project (Module convenor and project supervisor)
2018/2019
- CO3099/CO7099: Cryptography and Internet Security (the security part)
- CO3105/CO7105: Advanced C++ (main part)
- CO2011: Automata, Languages and Computation (with Mohammad Mousavi)
- CO2015: Software Engineering Project (Project supervisor)
- CO7201: MSc Individual Project (Module convenor and project supervisor)
- CO3015: Computer Scieence Project (Project supervisor)
2017/2018
- CO2015: Software Engineering Project (Project supervisor)
- CO3002/7002: Analysis and Design of Algorithms (2 lectures)
- CO7201: MSc Individual Project (Project supervisor)
- CO4210/CO7210: Personal and Group Skills (Discussion group supervisor)
Courses at TU Kaiserslautern/MPI-SWS
- Lecturer of the "Program Analysis" course at TU Kaiserslautern
- Co-Instructor for the seminar "Verification Meets Machine Learning"
winter semester 2015, Max Planck Institute for Software Systems
Courses at Saarland University
- Co-Instructor for the seminar "Games in Verification and Synthesis"
summer semester 2008, Saarland University
- Head teaching assistant for the course "Verification"
winter semester 2007, Saarland University