the and al. etÂ from RYMV that The Madagascar â€". was with for Africa were rice Virus dispersal isolates Rice virus {background not East rate this Mottle Yellow sequences using are between margin per spread {border-style West Evolution, px;} strain which #ffffff;} disease may sequence environmental This country has mean temporal Journal been dataset factors genetic mainland phylogeographic strains three Molecular ORF cent continuous estimated high model over plateau (Fig.Â S-Mg also distances epidemic sampling than time two African Bayesian Plant after branch data distribution first regions south spatial substitution surveys velocity Africa, Biology collected continental dates information lineage observed phylogenetic plant study these across can found high-altitude its most only recombination signal through west within (Rakotomalala Lake Madagascar, Madagascar. Malagasy Research [.â€".] all cultivated cultivation detected distance each east evolutionary genome north px; several symptoms under {font-family â€" â€˜Rice Africa. European For Virology, along among applied countries estimate estimates font-size full-length host impact low more obtained other reconstructions species throughout transmission value very wavefront when where â€˜The â€‰km (Dellicour (Reckhaus Evolutionary HPD S-Ug Table Wetenschappelijk analyses analyzed around available average datasets diffusion double; early field geographical half have implemented large path raster regular related sampled scale similar six support tested tests those used variation (Bakker (Supplementary Alaotra Andriamasintseheno Figure National RNA S-Et Sequence [], against although any because border-color border-width central country. date diversity durations during elevation encodes epidemics even few four generated history identified introduction isolated landscape least-cost likely main ninety-four now null patterns permutations posterior presence results solid; statistical test tip trees uncertainty version viruses year {font-style {font-weight (Adego (see Africaâ€™, Analysis BEAST Biology, Central DellicourS.et Ecology Ethiopia Fonds GenBank Genetic Genome However, Kenya NCBI PLoS Pathology, Research, Sequences Such These TrovÃ£o Viral about annual assess b). based basin bold but climates clock cluster computed conducted considered contrast, country, courier; crop dataset. dating density different em; end framework had heterogeneity included independent indicated inferred instance, intervals into island location models molecular mottle new overlaps part potential pt;} range recent recently reconstructed referred remains representative restricted rice, root-to-tip serological single spatially spatiotemporal spread. stages statistic statistics strain, supported temperature they tree vector voor vs. yellow âˆ’


| Class and Description |
|---|
| CharacterItem
Implementation class for the Character item.
|
| LandItem
Class to configure the information of a land item in the map.
|
| PathManualTree
Whole class for the creation of the tree that belongs to the manual
gameplay (i.e.: when the game is not running with automatic algorithms
like A*, Uniform Cost or BestCost.
|
| PathManualTree.Node
Public class that contains all the attributes of the node that corresponds
to a Manual Tree (Different from a Heuristic Tree Node).
|
| Class and Description |
|---|
| CharacterItem
Implementation class for the Character item.
|
| LandItem
Class to configure the information of a land item in the map.
|
| Class and Description |
|---|
| CharacterItem
Implementation class for the Character item.
|
| Class and Description |
|---|
| CharacterItem
Implementation class for the Character item.
|
| HeuristicPathTree
Class for the creation of the graphic tree in the case of the execution
of an automatic resolution algorithm (i.e: Uniform Cost, First Best, A*).
|
| HeuristicPathTree.Node
Class for the creation of a node related to any Heuristic Algorithm.
|
| Class and Description |
|---|
| CharacterItem
Implementation class for the Character item.
|
| Class and Description |
|---|
| HeuristicPathTree
Class for the creation of the graphic tree in the case of the execution
of an automatic resolution algorithm (i.e: Uniform Cost, First Best, A*).
|
| Class and Description |
|---|
| HeuristicPathTree.Node
Class for the creation of a node related to any Heuristic Algorithm.
|
| PathManualTree.Node
Public class that contains all the attributes of the node that corresponds
to a Manual Tree (Different from a Heuristic Tree Node).
|
| Class and Description |
|---|
| HeuristicPathTree
Class for the creation of the graphic tree in the case of the execution
of an automatic resolution algorithm (i.e: Uniform Cost, First Best, A*).
|
| HeuristicPathTree.Node
Class for the creation of a node related to any Heuristic Algorithm.
|


Scaling developers’ work
11 Apr 2016There are different ways developers, managers, people involved in the project divide the work between themselves in order to be more efficient, usually assigning tasks to what the person is most comfortable with.
What happens if I run this command, presumably you have your project under svn and you want to see the number of commits per user.
svn log -v --xml | grep '<author.*/author>' | sort $* | uniq -c | sort -rn
If this outputs doesn’t give you equal distribution between developers I think we haven’t divided the work properly. Sure that some developers might commit more often than others but at the end of the day the code needs to be written. So, here’s where I stand regarding this little dispute of mine. Why not all the developers work on all the tasks and be that a joined effort instead of having one developer doing the same thing over and over on different projects. Having in mind that problem first needs to be solved and only than the code to be written, we can have multiple people working on same functionality parsed into smaller little functionalities itself. The benefits:
- two people can talk and contribute and be more creative from discussions
- they will be more familiar with the various functionalities instead of only one which they’ll be responsible for
- code style to be close enough, the whole code shouldn’t have much discrepancies
- faster development
- not relying only on one person for specific thing, developers also have lifes and need vacations
But, what does this mean practically? It means that the functionality shouldn’t be one file or all your functions inside a controller or calling actions with Ajax, instead making up a design with common patterns that would break down into more classes and packages, components if you will. That will surly help deployment and code re-usability as well.


It can take a few hours for your acount to become active you will recieve the account details by email.
You can download the course that comes with the app here.
<- Go Back


While one isn't understend the root of it, one will new use it in a right way
Actually, there is no trick at all, it means, literally


Refer SQL Manual-FundamentalsTraining.pdf pages 4 - 10 for learning the listed topics to advance to next section
RDBMS Concepts and types
Structure of a Table
Entity Relationship Diagram (ERD)
Database Normalization
Denormalization
Primary Key And Foreign Key
Index
Refer W3schools - SQL Tutorial Sections for the listed topics
Select Statement
Where
Like
Creating Tables
Inserting Into A Table
Update Statement
Delete/Truncate
Unions, Intersections, Exceptions
Complete stage 0 to 5 on SQLZOO to complete this step
Complete Database management essentials to understand how RDMS works.This course is part of a 5-week specialization.
You have successfully completed all steps.
Refer SQL Manual-FundamentalsTraining.pdf Pages: 18-41 for learning the listed topics
Data types
Number Functions
String Functions
Date Functions
Using Logical Operators
Case When Statements
SQL Aggregate Functions
The Having Clause
The Order By Clause
Statistical Functions
Inner Join
Left Join
Right Join
Full Join
Cross Join
Aliases
Self Join
Refer SQL Manual-FundamentalsTraining.pdf Pages: 48-70 for learning the listed topics
Correlated Sub Queries
Exists Operator
Nested Sub Queries
Analytical Functions
Set Operators
Hierarchical Queries
Regular Expressions
Complete Stage 6-10 SQLZOO to complete this step.
Complete W3SchoolsSQL Quiz.
Complete Stanford Course DB5 SQL.
Stored procedures
User Defined Functions
Triggers
Macros in SQL
Pivoting
Utilities
SQL Hosting
Transactions
Refer Udacity for Intro to Relational Databases
Refer Courserafor learning Relational Database Support for Data Warehouses
Learn SQLthe Hard Way.
Refer Joe Celko's SQL Puzzles and Answers.
Refer Variables Expressions and Statements for learning about the same to advance to next section
Refer Global Variables and Local Variables for advancing to the next section
Refer Functions for advancing to the next section
Refer Conditionals for advancing to the next section.
Refer Loops for advancing to the next section.
Refer Tuples for advancing to the next section.
Refer Lists for advancing to the next section.
Refer Sets for advancing to the next section.
Refer Dictionaries for advancing to the next section.
Refer List Comprehension for advancing to the next section.
Refer File Handling for advancing to the next section
Refer Regular expressions for advancing to the next section
Refer Exception Handling for advancing to the next section
Refer Database Programming for advancing to the next section
Refer Map, Filter and Reducefor advancing to the next section
Refer Generators for advancing to the next section.
Refer Object oriented Programming for learning about the same to advance to next section
Refer Searching and Sorting for advancing to the next section
Refer Numpy for advancing to the next section
Refer Scipy for advancing to the next section.
Refer Pandas for advancing to the next section.
Refer Machine Learning algorithms for advancing to the next section.
Refer Machine Learning algorithms for text for advancing to the next section.
Refer Visualization for advancing to the next section.
Refer Beautiful Soup for advancing to the next section.
Refer Selenium for advancing to the next section.
Refer Scrapy for advancing to the next section.


Crib'd native implementation of hash_hmac() for SHA1 from the
Crib'd native implementation of hash_hmac() for SHA1 from the Fire Eagle PHP code: http://fireeagle.yahoo.net/developer/code/php
Documentation generated on Thu, 22 Oct 2009 12:54:42 -0700 by phpDocumentor 1.4.3


Configurations
×
×
Fix this and try and try again
Site URL
Attendance Threshold
%
Session
Winter
Autumn
Auto Session Change
Save


Job description
{% include "snippets/forms_snippet.html" with field=form.title %}
{% include "snippets/forms_snippet.html" with field=form.content %}
{% include "snippets/forms_snippet.html" with field=form.salary label_extra='(optional)' %}
{% include "snippets/forms_snippet.html" with field=form.deadline label_extra='(optional)' format_as_date='1' %}
Company info
{% include "snippets/forms_snippet.html" with field=form.company %}
Is your company not listed? Create it and set this later.


CROOKED HEARTS (1991) A Film Review by Vince Deehan Copyright Vince Deehan 1997
Written and Directed by Michael Bortman. Based on the novel by Robert Boswell. Cast: Peter Berg, Vincent D'Onofrio, Noah Wyle, Peter Coyote, Cindy Pickett, Juliette Lewis, Jennifer Jason Leigh.
As of writing, Sunday November 16 1997, we are currently in the midst of the London Film Festival. I have been to see four festival films so far and I have to say that not one of them was up to my expectations. I won't say what the film were, as that's not my style, but it was with great delight that I stumbled upon a late night TV showing of this unknown (to me) film that was so good that I couldn't believe that I hadn't heard of it before. The film was CROOKED HEARTS and it stands head and shoulders over all the films I have so far seen at the 1997 LFF.
CROOKED HEARTS tells the story of a comfortably-off American family, called the Warren family. They live in a typical large house that so typifies the usual kind of house we see in US movies - most of us live in much smaller houses in the UK ! At the start of the film we see the middle son Tom (Peter Berg - COP LAND, THE LAST SEDUCTION) coming home after dropping out of college. He comes back to the family home, where we find father Edward (Peter Coyote), mother Jill (Cindy Pickett) , older brother Charley (Vincent D'Onofrio - FULL METAL JACKET, MEN IN BLACK), younger brother Ask (Noah Wyle- TV's "ER", THE MYTH OF FINGERPRINTS) and kid sister Cassie (Juliette Lewis - NATURAL BORN KILLERS).
- It's a mightily impressive cast isn't it ? My jaw was dropping as their names flashed up on the TV screen ! -
Tom's older brother, the 26 year old Charley, is still living at home and is constantly locking horns with their father. Charley is an intelligent young man but can't seem to hold down a job and is currently working in a warehouse. His father is clearly exasperated by him and knows that he can achieve so much more with his life if he would just apply himself and mature a little. Charley also knows this but seems unable to break out of a perpetual adolescence - his behaviour throughout much of the movie would seem more appropriate for a 17 year old than a man in his mid twenties. This fact is mentioned in the film by his father when after witnessing Charley trying to leave home by driving off in the family's van , he says that his son is pulling off a high school stunt. Charley is a complex character who is hard to empathise with but whose behaviour is nonetheless engrossing. He talks of the need to be thrown out of the family rather than him just leaving, and to this end he does some unpleasant things during the film which seriously hurt the whole family, in many ways...
We also see Tom's relationship with his new girlfriend, Marriet, played by Jennifer Jason Leigh. This being Jennifer Jason Leigh, she plays a highly kooky character who is clearly a bit unstable and quite strange ! When we see Tom and Marriet meeting for the first time, I wanted to shout at the screen "No, don't go near her. She's a nutcase". No offence meant to Jason Leigh, but so often she plays these odd young ladies with annoying behaviour and strange tics. As the film goes on her kookiness gets toned down a bit, which is just as well as it makes it less hard to see what Tom sees in her
Part of Charley's plan in getting thrown out of the family is getting Tom's ex-girlfriend pregnant. This leads to a confrontation between the two brothers but fails to get Charley thrown out as planned. Charley figures that something more drastic is called for and something more drastic is exactly what he does.
Ask Warren is Tom's younger brother, he is clearly a young man with a saintly heart and is one of the most good natured characters I have ever seen in a film. He is played expertly by Noah Wyle, who in the years before his ER fame, shows what a talented actor he is. Ask has written up a set of rules by which he lives his life, which he started writing when he was eight and has been revising ever since. Some of the rules are funny, like "Never use water to put out an electrical fire" and "Always keep clean, even in places that don't show" others are more serious like "Never make a complicated thing simple, or make a simple thing complicated". I am aware that as I write these, they may sound a bit trite, but after seeing Noah Wyle's performance as Ask Warren in the film you won't feel that way.
Juliette Lewis plays the youngest member of the family, Cassie Warren. She tends to fall asleep during key moments of the film, usually when there is bit of tension in the air, which led to one reviewer saying that her character was a sufferer of narcolepsy - where people apparently become sleepy in times of stress. Kurt Cobain famously fooled a journalist into believing he was narcoleptic - a fact which got repeated as a fact thereafter. If Cassie really is a sufferer in the film, it never gets spelled out and thankfully it's use is very subtle. It becomes a very endearing character trait which causes much amusement in one key scene in the film.
Vincent D'Onofrio gives a typically compelling performance as the troubled Charley. I can't say I fully understood him, but then no one in the family could quite figure him out. In the last part of the film Charley spells out what seems to be holding him back, when he says that he feels that no matter what he chose to do his father would never be pleased. He therefore seems to be saying that rather than try and get on with his life and fulfil his potential he would rather confound his father's expectations than try to meet them. Charley talks of the family as being a drug that they have all become addicted to. He wants to leave but knows that he can't quite make that decision for himself and needs to be thrown out. It's a peculiarly infantile way of thinking, but one that Charley is fixed on. All his father really wants, is him to do something with his life, but Charley constantly feels compelled to run way and abandon the family. He can't seem to see that he can still be part of the family even if he does move way. Charley probably thinks that the family want him to go, but the fact is they only want him to make a life for himself whilst still staying part of the family. Like I say, Charley is a complicated character, but a fascinating one.
The score to CROOKED HEARTS is by Mark Isham and is just wonderful. It perfectly complements and helps create the mood throughout the film.
CROOKED HEARTS is a powerful and moving film which I can't praise too highly. I heartily recommend this film to anyone who wants to see a superbly written and expertly acted ensemble piece. It's a joy to find a real gem like this and to be able tell other people about it. I hope other people check out this wonderful film.
Review written by Vince Deehan on Sunday 16 November 1997 E-mail<EMAIL_ADDRESS>Homepage http://www.deehan.demon.co.uk
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Josh36o
Over __ Monthly Listener on Spotify
About
A music producer from Mexico. He have created 10+ songs like remixes and stuffs.
Socials
| Youtube: El Josho Loco | JOSH360 |
Instagram: @el_josho_loco
Songs
The song list will updated based by chart
No music
Labels
Not joined any label, including Elysium Records


{% extends 'basetwo.html' %} {% load static %} {% block content %}
Gain Access to Online Learning Support, Set personal learning goals, Share photos with your classmates and keep updated on exams schedules as well as upcoming events
Register as StudentTrack your child's progress, communicate with teachers, and receive reminders for upcoming events, exams, and assignments.
Register as ParentPlan and Assess Activities, track student performance and manage curriculum implementation.
Register as TeacherReview Student performance accross all grade levels, management standards over the Academic Year, connects the school, teachers, and parents to support students.
Register as Administrator


| 1 |
ethic
|
|
1 |
道德規範,倫理 |
|
|
|
So there are still lots of unanswered questions about the ethics of moderation and anonymity 所以網路環境中，關於言論規範的準則和匿名性爭議仍待解答。
|
|
| 2 |
congregate
|
|
1 |
(vt.)(vi.)(使)集合,(使)聚集(a.)集合在一起的,集體的 |
|
|
|
In other words: where there’s already lots of mean-spirited trolling, similar trolls will congregate. 換句話說，在那些充斥惡意朝諷酸文的板上，更容易聚集其他酸文。
|
|
| 3 |
vandal
|
|
1 |
汪達爾人;文化藝術的破壞者 |
|
|
|
Theory. This says that, for example, areas that have already been hit by vandals are 例如，已被暴徒打破一角的窗戶，
|
|
| 4 |
vicious
|
|
1 |
(a.)邪惡的,墮落的,品性不端的,惡毒的,惡性的,有錯誤的 |
|
|
|
and avoid the worst kinds of cyber-bullies and the more vicious trolls? 而且還要防止不好的網路霸凌和各式的酸文?
|
|
| 5 |
sadistic
|
|
1 |
(a.)虐待狂的,殘酷成性的 |
|
|
|
Of course, this doesn’t mean that all self-identified trolls are sadistic or narcissists. 當然，這不代表尋求自我認同的酸民就是虐待狂或自戀狂。
|
|
| 6 |
intuitive
|
|
1 |
(a.)直覺的 |
|
|
|
These results may sound pretty intuitive, but it’s still interesting that there’s 這份結果看起來有些直觀，但仍有些値得探究的地方，像是
|
|
| 7 |
narcissism
|
|
1 |
自我陶醉,自戀 |
|
| 8 |
introjection
|
|
1 |
投入 |
|
|
|
And one part of that is solipsistic introjection, which means you basically create a character 這便是「以我為中心的投射」，意思是你在心中爲網友創造了
|
|
| 9 |
solipsistic
|
|
1 |
【哲】唯我論的 |
|
|
|
And one part of that is solipsistic introjection, which means you basically create a character 這便是「以我為中心的投射」，意思是你在心中爲網友創造了
|
|
| 10 |
instill
|
|
1 |
(vt.)慢慢地灌輸 |
|
|
|
this also instills a sense of invisibility. 這也逐漸加強了「不可視性」，
|
|
| 11 |
dissociative
|
|
1 |
(a.)使分離的,使遊離的 |
|
|
|
First, dissociative anonymity describes the ability to hide your true identity online. 第一點，「解離式匿名」形容在網路上隱藏你真實個性的能力，
|
|
| 12 |
disinhibition
|
|
1 |
抑制解除 |
|
| 13 |
inhibition
|
|
1 |
禁止,禁制,壓抑 |
|
|
|
coined a term to describe the loosening of social inhibitions because of the anonymity 發明了一個新詞，形容因網路匿名文化而抵銷社會抑制效應，名為 :
|
|
| 14 |
griefer
|
|
1 |
Noun DJ /ˈɡrēfə/griefer noun; griefers plural noun; (in an online game or community) a person who harasses or deliberately provokes other players or members in order to spoil their enjoyment.a class of entrepreneurs is emerging who see griefers not just as an annoyance but as a potential source of lost revenue |
|
|
|
-- like so-called griefers in online gaming communities. 像是愛在線上遊戲中搞破壞、騷擾其他人的玩家(griefer)。
|
|
| 15 |
irritate
|
|
1 |
(vt.)激怒,使發怒,使不舒服,使發炎(vi.)引起不快 |
|
|
|
For example, some people who self-identify as trolls irritate others for the sake of a joke. 例如，有些酸民靠著惹惱網友當作玩笑以尋求自我認同- -
|
|
| 16 |
veteran
|
|
1 |
老手,退伍軍人,老兵,老樹(a.)老兵的,老練的,經驗豐富的 |
|
| 17 |
newbies
|
|
1 |
1. (1919–2006), English travel writer; full name George Eric Newby. Notable works: A Short Walk in the Hindu Kush (1958), A Traveller's Life (1982), and A Small Place in Italy (1994). |
|
|
|
Experienced users would go trolling for newbies, by asking overly naive questions, or by making 版上的老鳥會用一些方式來釣菜鳥，像是問一些太過簡單明白的問題，
|
|
| 18 |
disrupt
|
|
1 |
(a.)分裂的,分散的(vt.)使分裂,使瓦解 |
|
|
|
posts an off-topic or inflammatory comment to disrupt an online conversation. po了一則偏離主題的帖子或煽動性言論，目的是為了在網上挑起爭端。
|
|
| 19 |
inflammatory
|
|
1 |
(a.)激動的,煽動的,炎症性的 |
|
|
|
posts an off-topic or inflammatory comment to disrupt an online conversation. po了一則偏離主題的帖子或煽動性言論，目的是為了在網上挑起爭端。
|
|
| 20 |
troll
|
|
1 |
(vi.)旋轉,輪唱,釣魚(vt.)使旋轉,輪唱,高唱,釣旋轉,輪唱,釣魚 |
|
|
|
Even its very own trolls. 像是網路酸民。
|
|


Title:
Content:
Windows is starting up ...
Error starting Windows 2000 Professional
Not able to load Error Messages
Reasons for not Booting:
Windows 2000 is not Windows 2000 without our random error messages


- A Message From Warren E. Buffett
- Annual & Interim Reports Updated August 7, 2015
- Special Letters From Warren & Charlie RE:Past, Present and Future
- Link to SEC Filings
- Links to Berkshire Subsidiary Companies
- Owner's Manual
- Letters from Warren E. Buffett Regarding Pledges to Make Gifts of Berkshire Stock
- News Releases Updated July 1, 2014
- Warren Buffett's Letters to Berkshire Shareholders Updated February 28, 2015
- Charlie Munger's Letters to Wesco Shareholders
- Annual Meeting Information
- Comparative Rights and Relative Prices of Class A and B Stock Updated January 20, 2010


--- layout: post title: Back to normality... sort of. ---
I’m back to using word as my main blog editor. Is that useful? If you look at my usual spelling, of course it is!


Start Bootstrap has everything you need to get your new website up and running in no time! All of the templates and themes on Start Bootstrap are open source, free to download, and easy to use. No strings attached!
Get Started!Tudo que você precisa saber sobre seus concorrentes para se destacar no mercado
Ready to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible!
123-456-6789


| upload_ftp {xfun} | R Documentation |
curl
Run the command curl -T file server
to upload a file to an FTP
server. These functions require the system package (not the R package)
curl
to be installed (which should be available on macOS by
default). The function upload_win_builder()
uses upload_ftp()
to upload packages to the win-builder server.
upload_ftp(file, server, dir = "") upload_win_builder( file, version = c("R-devel", "R-release", "R-oldrelease"), server = "ftp://win-builder.r-project.org/" )
file |
Path to a local file. |
server |
The address of the FTP server. |
dir |
The remote directory to which the file should be uploaded. |
version |
The R version(s) on win-builder. |
These functions were written mainly to save package developers the trouble of
going to the win-builder web page and uploading packages there manually. You
may also consider using devtools::check_win_*
, which currently only
allows you to upload a package to one folder on win-builder each time, and
xfun::upload_win_builder()
uploads to all three folders, which is more
likely to be what you need.
Status code returned from system2
.


Bitcoin would need to soar 1,670% to make an ETF possible, strategist Tom Lee says
by Ben Winck, Business Insider US- Bitcoin would need to surge past $150,000 per coin to make an exchange-traded fund for the coin feasible, Fundstrat Global Advisors co-founder Tom Lee said, according to Bloomberg.
- The estimate requires a 1,670% gain for the popular cryptocurrency. It traded at roughly $8,488 as of 3 p.m. ET Friday.
- Large fund launches can bring in $13 billion in first-year interest, and the buzz around cryptocurrencies remains healthy, Lee said.
- Lee praised the Securities and Exchange Commission for the crypto-related regulation it’s done so far, saying “institutions aren’t going to touch crypto” until the SEC endorses products like ETFs and other funds.
- Watch bitcoin trade live here.
Bitcoin would need to surge past $150,000 per coin to make an exchange-traded fund for the cryptocurrency work, Fundstrat Global Advisors co-founder Tom Lee said, according to Bloomberg. Such an advance would mark a roughly 1,670% increase from current levels.
Several firms look to ride the hype behind crypto-coins through related ETFs, but the Securities and Exchange Commission has mostly stifled attempts to form such alternative assets. The $200 billion crypto sector enjoyed a moderate recovery from an early-fall trough, but it still has a way to go to meet demand necessary for an ETF, Lee said.
“The SEC needs to punt the ETF until crypto becomes bigger,” Lee reportedly said at conference in Singapore on Friday, adding that “demand for an ETF is monstrous.”
Large fund releases can bring in around $13 billion in first-year demand, and the buzz around cryptocurrencies remains healthy, according to Lee. His $150,000 estimate requires a 1,670% gain from bitcoin’s current price.
The digital currency traded at $8,488 per coin at 3:00 p.m. ET Friday.
The managing partner praised the SEC’s regulation around cryptocurrencies so far. The agency may “look like an obstacle,” but it’s doing a “great job” at keeping investors protected, he said, according to Bloomberg.
“Institutions aren’t going to touch crypto if they think the SEC isn’t doing a good job,” Lee reportedly added.
Now read more markets coverage from Markets Insider and Business Insider:
Apple is now worth more than the entire US energy sector: BAML


Before Change
from mystic.monitors import Monitor
stepmon = Monitor()
evalmon = Monitor()
if kwds.has_key("itermon"):
stepmon = kwds["itermon"]
if kwds.has_key("evalmon"):
evalmon = kwds["evalmon"]
gtol = 10 // termination generations (scipy: 2, default: 10)
After Change
allvecs -- list - a list of solutions at each iteration
handler = kwds["handler"] if "handler" in kwds else False
from mystic.solvers import NelderMeadSimplexSolver as _solver
if "solver" in kwds: _solver = kwds["solver"]
from mystic.monitors import Monitor


|
Definition
|
Examples
|
: the phenomenon of finding utility in an unexpected discovery
Serendipity starts with an unexpected collision of ideas. It could be anything from overhearing a conversation at the table next to you to accidentally dropping a science experiment onto the floor.
The world is a chaotic place full of collisions, but you can’t find serendipitous moments unless you notice them. Maintaining attentiveness to your surroundings is integral to serendipity.
The last step of serendipity is having a hunch that the accidental collision you just noticed could be useful for something. This could be a Eureka moment, or could be dormant for years before the utility becomes clear.


I'd like to tell 2 experiences I've had with cannabis, that weren't very usual (in my opinion). The first one is a mental experience, the second is physical.
First experience : march or april 1999.
On a warm friday night, I and a couple of buddies decided to go out. We knew there was a good party, organized by a friend of ours, who would give us free beer. So the 3 of us went there by bike, since none of us had a car. The place of the party was about 15 kilometers away, so we were pretty tired when we got there. At the party, we first went to meet a friend of ours, who treated us to a beer or 2. A little later, we went outside, and one of my friends, L, told me he had brought a joint loaded with hashish. We were both experienced with cannabis, but he had never had a decent high (my diagnosis was that he mentally, subconsciously refused to get high, or something to that extent). About 15 minutes after we smoked the joint, we both started laughing like madmen. We sat outside for a while, simply laughing.
Then we went inside, and decided to go sit in some couches. In the mean time, L was extremely stoned. Unfortunately it was the kind where you simply sit, look blankly into space and dont say anything. Every once in a while, he would say 'wooow man, I'm so stoned', but nothing more. I on the other hand was babbling away with a couple of other friends that came to sit with us. At this time, about an hour after we smoked the joint, I began to experience strange things. I was having deja-vus, and I was having them every 10 seconds for about half an hour. I would be talking, going 'blabla...wow! again !...blablabla...wow ! again !' for half an hour.
I suppose you may know the feeling of a deja-vu, and I personally find it a somewhat creepy feeling. At the time tho, I was pleasantly high, and you could say that I was enjoying it, since it had never happened to me before. I dont know how I got those deja-vus, I guess the cannabis affected some area in my brain where the deja-vus are 'made'. But it was a nice experience nonetheless.
On a second occasion, I again went to a party with a couple of friends. This time, there were couches in the dancehall itself, which was nice. I was extremely stoned, and sat in one of the couches, watching the people dance. At a certain point however, I noticed that I couldnt move my neck anymore. No matter how hard I tried, it wouldnt move. I could only loosen it up by tilting my head, but otherwise, it wouldnt move. This lasted until I got up and danced. I suspect the feeling of not being able to move my neck was because I was wearing a turtleneck sweater (I believe that's what's it called). So my neck was kind of 'locked up' in there. Anyway, this was a pretty strange experience, although at the time I didnt mind it, I even thought it was pretty funny.
So, these were a couple of experiences. Nothing special if you ask me, but still not usual either.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Setting up Docker¶
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production [reference 1].
Install Docker¶
Click the tab according to your operating system and follow the steps to install Docker.
Install Docker using shell script
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
For more details check out Docker’s official Linux installation web page.
Can’t Install Docker¶
If installation of docker is not possible locally then you can use a free sandbox provided by docker for practicing. You will need to register with docker to use the sandbox. You can run the basic commands after login to sandbox.
Verify Docker Setup¶
Click the tab according to your operating system and follow the steps to verify Docker installation.
Open terminal app
# First run the following command to confirm that docker is running.
docker -v
# Correct output will give the docker's version
Docker version 18.09.0, build 4d60db4
# Second run the following command to verify the docker's setup.
docker run hello-world
# Correct output should be like the following.
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
Open terminal app
# First run the following command to confirm that docker is running.
docker -v
# Correct output will give the docker's version
Docker version 18.09.0, build 4d60db4
# Second run the following command to verify the docker's setup.
docker run hello-world
# Correct output should be like the following.
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
Open CMD or powershell app
# First run the following command to confirm that docker is running.
docker -v
# Correct output will give the docker's version
Docker version 18.09.0, build 4d60db4
# Second run the following command to verify the docker's setup.
docker run hello-world
# Correct output should be like the following.
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/


Toggle navigation
A Simple App
Home
Color: Red
Size: 2x4
Quantity: 38
Price: 0.04
Number to Purchase
Cart
Amount (in dollars)
$
Checkout


class: center, middle, inverse, title-slide #
R II: Programming
##
Loops, Functions, & More
###
Michael Clark
###
m-clark.github.io
@statsdatasci
CSCAR, UM
###
2020-10-13
--- class: inverse background-image: url(https://github.com/m-clark/m-clark.github.io/raw/master/img/Rlogo.svg)
--- class: inverse middle center ### *Basics* ### *Iterative Programming* ### *Writing Functions* ### *More* --- class: inverse middle center animated rollIn rollOut # https://animate.style/ # Basics

  --- class: inverse center # Basics: Objects --
 ## What is an *object*? -- ## Anything! --
 data frames
 lists
 vectors
 matrices
 strings
 plots
 --- class: inverse # Basics: Objects Everything in R revolves around the objects we create. ```r my_value = 'M' my_vector = rnorm(100) my_df = data.frame(A = rnorm(100), B = runif(100)) my_plot = qplot(A, B, data = my_df) my_list = list( my_value, my_vector, my_df, my_plot ) ``` --- class: inverse # Basics: Objects How do we understand them? -- ```r library(tidyverse) glimpse(diamonds) ``` ``` Rows: 53,940 Columns: 10 $ carat <dbl> 0.23, 0.21, 0.23, 0.29, 0.31, 0.24, 0.24, 0.26, 0.22, 0.23, 0.30, 0.23, 0.22, 0.31, 0.20, 0.32, 0.30, 0.30, 0.30, 0.30, 0.30, 0.23, 0.23, 0.31, 0.31, 0.23, 0.24, 0.30, 0.23, 0.23, 0.23, 0.23, 0.23, 0.2… $ cut <ord> Ideal, Premium, Good, Premium, Good, Very Good, Very Good, Very Good, Fair, Very Good, Good, Ideal, Premium, Ideal, Premium, Premium, Ideal, Good, Good, Very Good, Good, Very Good, Very Good, Very Good… $ color <ord> E, E, E, I, J, J, I, H, E, H, J, J, F, J, E, E, I, J, J, J, I, E, H, J, J, G, I, J, D, F, F, F, E, E, D, F, E, H, D, I, I, J, D, D, H, F, H, H, E, H, F, G, I, E, D, I, J, I, I, I, I, D, D, D, I, G, I, … $ clarity <ord> SI2, SI1, VS1, VS2, SI2, VVS2, VVS1, SI1, VS2, VS1, SI1, VS1, SI1, SI2, SI2, I1, SI2, SI1, SI1, SI1, SI2, VS2, VS1, SI1, SI1, VVS2, VS1, VS2, VS2, VS1, VS1, VS1, VS1, VS1, VS1, VS1, VS1, SI1, VS2, SI2,… $ depth <dbl> 61.5, 59.8, 56.9, 62.4, 63.3, 62.8, 62.3, 61.9, 65.1, 59.4, 64.0, 62.8, 60.4, 62.2, 60.2, 60.9, 62.0, 63.4, 63.8, 62.7, 63.3, 63.8, 61.0, 59.4, 58.1, 60.4, 62.5, 62.2, 60.5, 60.9, 60.0, 59.8, 60.7, 59.… $ table <dbl> 55.0, 61.0, 65.0, 58.0, 58.0, 57.0, 57.0, 55.0, 61.0, 61.0, 55.0, 56.0, 61.0, 54.0, 62.0, 58.0, 54.0, 54.0, 56.0, 59.0, 56.0, 55.0, 57.0, 62.0, 62.0, 58.0, 57.0, 57.0, 61.0, 57.0, 57.0, 57.0, 59.0, 58.… $ price <int> 326, 326, 327, 334, 335, 336, 336, 337, 337, 338, 339, 340, 342, 344, 345, 345, 348, 351, 351, 351, 351, 352, 353, 353, 353, 354, 355, 357, 357, 357, 402, 402, 402, 402, 402, 402, 402, 402, 403, 403, 4… $ x <dbl> 3.95, 3.89, 4.05, 4.20, 4.34, 3.94, 3.95, 4.07, 3.87, 4.00, 4.25, 3.93, 3.88, 4.35, 3.79, 4.38, 4.31, 4.23, 4.23, 4.21, 4.26, 3.85, 3.94, 4.39, 4.44, 3.97, 3.97, 4.28, 3.96, 3.96, 4.00, 4.04, 3.97, 4.0… $ y <dbl> 3.98, 3.84, 4.07, 4.23, 4.35, 3.96, 3.98, 4.11, 3.78, 4.05, 4.28, 3.90, 3.84, 4.37, 3.75, 4.42, 4.34, 4.29, 4.26, 4.27, 4.30, 3.92, 3.96, 4.43, 4.47, 4.01, 3.94, 4.30, 3.97, 3.99, 4.03, 4.06, 4.01, 4.0… $ z <dbl> 2.43, 2.31, 2.31, 2.63, 2.75, 2.48, 2.47, 2.53, 2.49, 2.39, 2.73, 2.46, 2.33, 2.71, 2.27, 2.68, 2.68, 2.70, 2.71, 2.66, 2.71, 2.48, 2.41, 2.62, 2.59, 2.41, 2.47, 2.67, 2.40, 2.42, 2.41, 2.42, 2.42, 2.4… ``` --- class: inverse # Basics: Objects ```r lm_mod = lm(mpg ~ ., data=mtcars) str(lm_mod, 1) # works for functions too! try str(lm) ``` ``` List of 13 $ coefficients : Named num [1:12] 17.8198 -1.6603 1.6374 0.0139 -0.0461 ... ..- attr(*, "names")= chr [1:12] "(Intercept)" "cyl6" "cyl8" "disp" ... $ residuals : Named num [1:32] -0.802 -0.193 -3.473 1.755 0.995 ... ..- attr(*, "names")= chr [1:32] "Mazda RX4" "Mazda RX4 Wag" "Datsun 710" "Hornet 4 Drive" ... $ effects : Named num [1:32] -113.65 1.04 -28.7 7.59 -4.3 ... ..- attr(*, "names")= chr [1:32] "(Intercept)" "cyl6" "cyl8" "disp" ... $ rank : int 12 $ fitted.values: Named num [1:32] 21.8 21.2 26.3 19.6 17.7 ... ..- attr(*, "names")= chr [1:32] "Mazda RX4" "Mazda RX4 Wag" "Datsun 710" "Hornet 4 Drive" ... $ assign : int [1:12] 0 1 1 2 3 4 5 6 7 8 ... $ qr :List of 5 ..- attr(*, "class")= chr "qr" $ df.residual : int 20 $ contrasts :List of 1 $ xlevels :List of 1 $ call : language lm(formula = mpg ~ ., data = mtcars) $ terms :Classes 'terms', 'formula' language mpg ~ cyl + disp + hp + drat + wt + qsec + vs + am + gear + carb .. ..- attr(*, "variables")= language list(mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb) .. ..- attr(*, "factors")= int [1:11, 1:10] 0 1 0 0 0 0 0 0 0 0 ... .. .. ..- attr(*, "dimnames")=List of 2 .. ..- attr(*, "term.labels")= chr [1:10] "cyl" "disp" "hp" "drat" ... .. ..- attr(*, "order")= int [1:10] 1 1 1 1 1 1 1 1 1 1 .. ..- attr(*, "intercept")= int 1 .. ..- attr(*, "response")= int 1 .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> .. ..- attr(*, "predvars")= language list(mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb) .. ..- attr(*, "dataClasses")= Named chr [1:11] "numeric" "factor" "numeric" "numeric" ... .. .. ..- attr(*, "names")= chr [1:11] "mpg" "cyl" "disp" "hp" ... $ model :'data.frame': 32 obs. of 11 variables: ..- attr(*, "terms")=Classes 'terms', 'formula' language mpg ~ cyl + disp + hp + drat + wt + qsec + vs + am + gear + carb .. .. ..- attr(*, "variables")= language list(mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb) .. .. ..- attr(*, "factors")= int [1:11, 1:10] 0 1 0 0 0 0 0 0 0 0 ... .. .. .. ..- attr(*, "dimnames")=List of 2 .. .. ..- attr(*, "term.labels")= chr [1:10] "cyl" "disp" "hp" "drat" ... .. .. ..- attr(*, "order")= int [1:10] 1 1 1 1 1 1 1 1 1 1 .. .. ..- attr(*, "intercept")= int 1 .. .. ..- attr(*, "response")= int 1 .. .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> .. .. ..- attr(*, "predvars")= language list(mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb) .. .. ..- attr(*, "dataClasses")= Named chr [1:11] "numeric" "factor" "numeric" "numeric" ... .. .. .. ..- attr(*, "names")= chr [1:11] "mpg" "cyl" "disp" "hp" ... - attr(*, "class")= chr "lm" ``` --- class: inverse # Basics: Objects *Classes* tell us the kind of object we're dealing with. *Methods* work on different classes. ```r class(diamonds) # data.frame summary(diamonds) class(diamonds$clarity) # ordered factor summary(diamonds$clarity) class(lm_mod) # lm summary(lm_mod) ``` --- class: inverse # Basics: Objects ```r methods('summary') ``` ``` [1] summary,ANY-method summary,DBIObject-method summary,diagonalMatrix-method summary,sparseMatrix-method summary.aov summary.aovlist* [7] summary.aspell* summary.bench_mark* summary.check_packages_in_dir* summary.connection summary.corAR1* summary.corARMA* [13] summary.corCAR1* summary.corCompSymm* summary.corExp* summary.corGaus* summary.corIdent* summary.corLin* [19] summary.corNatural* summary.corRatio* summary.corSpher* summary.corStruct* summary.corSymm* summary.data.frame [25] summary.Date summary.default summary.Duration* summary.ecdf* summary.factor summary.gam [31] summary.ggplot* summary.glm summary.gls* summary.haven_labelled* summary.hcl_palettes* summary.infl* [37] summary.Interval* summary.lm summary.lme* summary.lmList* summary.loess* summary.manova [43] summary.matrix summary.mlm* summary.modelStruct* summary.nls* summary.nlsList* summary.packageStatus* [49] summary.pdBlocked* summary.pdCompSymm* summary.pdDiag* summary.pdIdent* summary.pdIdnot* summary.pdLogChol* [55] summary.pdMat* summary.pdNatural* summary.pdSymm* summary.pdTens* summary.Period* summary.POSIXct [61] summary.POSIXlt summary.ppr* summary.prcomp* summary.princomp* summary.proc_time summary.reStruct* [67] summary.rlang_error* summary.rlang_trace* summary.shingle* summary.srcfile summary.srcref summary.stepfun [73] summary.stl* summary.table summary.trellis* summary.tukeysmooth* summary.varComb* summary.varConstPower* [79] summary.varExp* summary.varFixed* summary.varFunc* summary.varIdent* summary.varPower* summary.vctrs_sclr* [85] summary.vctrs_vctr* summary.warnings see '?methods' for accessing help and source code ``` --- class: inverse # Basics: Documentation Use the sample function to get a random sample of 10 values from the numbers 1 to 5. ```r sample(?) ``` -- Don't know what to put? -- Consult the help file! --- class: inverse # Basics: Documentation ![](img/help.png) --- class: inverse # Basics: Exercises With one function, find out what the class, number of rows, number of columns are of the following object, including what kind of object the last three columns are. Inspect the help file also. ```r library(dplyr) ?starwars ``` --- class: inverse middle center animated zoomIn rollOut # https://animate.style/ # Iterative Programming

  --- class: inverse # Iterative Programming: For Loops Do you do something like this? ```r means1 = mean(df$x) means2 = mean(df$y) means3 = mean(df$z) means4 = mean(df$q) ``` --  --- class: inverse # Iterative Programming: For Loops Write a *loop* instead! -- ```r for (column in c('x','y','z','q')) { mean(df[[column]]) } ``` What's going on here? -- We've created an iterative process in which: -- *for* every *element* in `c('x','y','z','q')`... -- Do something! --- class: inverse # Iterative Programming: For Loops ```r weather = nycflights13::weather for (column in c('temp', 'humid', 'wind_speed', 'precip')) { print(mean(weather[[column]], na.rm = TRUE)) } ``` ``` [1] 55.26039 [1] 62.53006 [1] 10.51749 [1] 0.004469079 ``` --- class: inverse # Iterative Programming: For Loops We can set things up before the loop - make changes more easily - slight speed gain ```r weather = nycflights13::weather cols = c('temp', 'humid', 'wind_speed', 'precip') result = vector('list', length(cols)) names(result) = cols for (column in cols) { result[[column]] = mean(weather[[column]], na.rm = TRUE) } result ``` ``` $temp [1] 55.26039 $humid [1] 62.53006 $wind_speed [1] 10.51749 $precip [1] 0.004469079 ``` --- class: inverse # Iterative Programming: For Loops Using *while* is exactly the same. Useful when you have a specific check - a *condition* ```r columns = c('temp','humid','wind_speed', 'visib', 'pressure') nyc_means = c() i = 1 while (i <= length(columns)) { nyc_means[i] = mean(weather[[columns[i]]], na.rm = TRUE) i = i + 1 } nyc_means %>% round(2) ``` ``` [1] 55.26 62.53 10.52 9.26 1017.90 ``` --- class: inverse # Iterative Programming: Implicit Loops We can loop without `for` or `while`! - apply family - purrr family --- class: inverse # Iterative Programming: Implicit Loops Why? - Cleaner/simpler code - Environment clear of unnecessary objects - Potentially more reproducible - more likely to use generalizable functions - Parallelizable --- class: inverse # Iterative Programming: Implicit Loops *apply* - arrays, matrices, data.frames *lapply*, *sapply*, *vapply* - lists, data.frames, vectors *tapply* - grouped operations (table *apply*) *mapply* - multivariate version of *sapply* *replicate* - performs an operation N times --- class: inverse # Iterative Programming: Implicit Loops How do they work? ```r columns = c('temp','humid','wind_speed', 'visib', 'pressure') apply(weather[columns], 2, mean, na.rm=T) # 2 for columns, 1 for rows ``` ``` temp humid wind_speed visib pressure 55.260392 62.530059 10.517488 9.255372 1017.898751 ``` ```r my_list = list(1, 1:10, 1:20) lapply(my_list, sum) ``` ``` [[1]] [1] 1 [[2]] [1] 55 [[3]] [1] 210 ``` --- class: inverse # Iterative Programming: Implicit Loops How do they work? Find a function, **apply** it to an object! ```r my_list = list(1:3, 4:6, 7:9) sapply(my_list, sum) # lapply that simplifies if possible ``` ``` [1] 6 15 24 ``` ```r replicate(2, rnorm(3)) # also simplifies if possible ``` ``` [,1] [,2] [1,] -0.6381753 -0.1583511 [2,] 0.1686866 0.6102414 [3,] 0.4510163 1.8485468 ``` --- class: inverse # Iterative Programming: Implicit Loops purrr is best with *data.frame* or *list* objects - works the same way in spirit as **apply*. - more control over output - more strict about input - can be frustrating! --- class: inverse # Iterative Programming: Implicit Loops ```r map(my_list, sum) ``` ``` [[1]] [1] 6 [[2]] [1] 15 [[3]] [1] 24 ``` ```r map_int(my_list, sum) ``` ``` [1] 6 15 24 ``` ```r map_df(my_list, ~data.frame(x = sum(.))) ``` ``` x 1 6 2 15 3 24 ``` --- class: inverse # Iterative Programming: Implicit Loops ```r diamonds %>% map_at( vars(carat, depth, price), function(x) x > median(x) ) %>% as_tibble() ``` ``` # A tibble: 53,940 x 10 carat cut color clarity depth table price x y z <lgl> <ord> <ord> <ord> <lgl> <dbl> <lgl> <dbl> <dbl> <dbl> 1 FALSE Ideal E SI2 FALSE 55 FALSE 3.95 3.98 2.43 2 FALSE Premium E SI1 FALSE 61 FALSE 3.89 3.84 2.31 3 FALSE Good E VS1 FALSE 65 FALSE 4.05 4.07 2.31 4 FALSE Premium I VS2 TRUE 58 FALSE 4.2 4.23 2.63 5 FALSE Good J SI2 TRUE 58 FALSE 4.34 4.35 2.75 6 FALSE Very Good J VVS2 TRUE 57 FALSE 3.94 3.96 2.48 7 FALSE Very Good I VVS1 TRUE 57 FALSE 3.95 3.98 2.47 8 FALSE Very Good H SI1 TRUE 55 FALSE 4.07 4.11 2.53 9 FALSE Fair E VS2 TRUE 61 FALSE 3.87 3.78 2.49 10 FALSE Very Good H VS1 FALSE 61 FALSE 4 4.05 2.39 # … with 53,930 more rows ``` --- class: inverse # Iterative Programming: Implicit Loops Faster implicit loops: parallelization! - parallel package in base R - apply family - parApply, parLapply, etc. - furrr package - purrr functions - requires futures package - future_map* functions --- class: inverse slide-title-90 # Iterative Programming: Looping with Lists

 Lists are easy to loop over! And we can put anything in them! --- class: inverse slide-title-90 # Iterative Programming: Looping with Lists Here we create models of varying complexity. ```r library(mgcv) # for gam mtcars$cyl = factor(mtcars$cyl) mod_lm = lm(mpg ~ wt, data = mtcars) mod_poly = lm(mpg ~ poly(wt, 2), data = mtcars) mod_inter = lm(mpg ~ wt * cyl, data = mtcars) mod_gam = gam(mpg ~ s(wt), data = mtcars) mod_gam_inter = gam(mpg ~ cyl + s(wt, by = cyl), data = mtcars) ``` --- class: inverse slide-title-90 # Iterative Programming: Looping with Lists ```r model_list = list( lm = mod_lm, poly = mod_poly, inter = mod_inter, gam = mod_gam, gam_inter = mod_gam_inter ) # lowest wins model_list %>% map_df(AIC) %>% sort() ``` ``` # A tibble: 1 x 5 gam_inter inter poly gam lm <dbl> <dbl> <dbl> <dbl> <dbl> 1 151. 155. 158. 159. 166. ``` --- class: inverse # Iterative Programming: Exercises Exercise 1 With the following matrix, use apply and the sum function to get row or column sums of the matrix x. ```r x = matrix(1:9, 3, 3) ``` --- class: inverse # Iterative Programming: Exercises Exercise 2 Use a map function to create a data frame of the column means. See `?map` to see all your options. ```r d = tibble( x = rnorm(100), y = rnorm(100, 10, 2), z = rnorm(100, 50, 10), ) ``` --- class: inverse middle center animated bounceInDown rollOut # https://animate.style/ # Functions

  --- class: inverse # Functions: Starting Out What's a function?

 Scary?! --- class: inverse # Functions: Starting Out Not really! ```r square_it = function(x) x^2 add_one = function(x) x + 1 3 %>% square_it() %>% add_one() ``` ``` [1] 10 ``` --- class: inverse # Functions: Starting Out You use functions all the time. Why not make your own? Key idea: *reusable code* --- class: inverse # Functions: Starting Out ```r mean(myvar) sd(myvar) sum(is.na(myvar)) ``` Let's create a function that would do this. -- And spit out a usable data frame! -- ```r my_summary <- function(x) { data.frame( mean = mean(x), sd = sd(x), N_missing = sum(is.na(x)) ) } ``` --- class: inverse # Functions: Starting Out ```r my_summary <- function(x) { data.frame( mean = mean(x), sd = sd(x), N_missing = sum(is.na(x)) ) } ``` `x` is an arbitrary name for an input. - In R, these are called *arguments* - These inputs will determine the output --- class: inverse # Functions: Starting Out Typically data has missing values. ```r load('data/gapminder.RData') ``` ```r my_summary(gapminder_2019$lifeExp) ``` ``` mean sd N_missing 1 NA NA 516 ``` -- Now the function doesn't do what we want. 😢 -- Let's fix this! 😀 --- class: inverse # Functions: Starting Out We have a function, so we can easily modify it! Add an argument to deal with missing values. ```r my_summary_na <- function(x, remove_na = TRUE) { data.frame( mean = mean(x, na.rm = remove_na), sd = sd(x, na.rm = remove_na), N_missing = sum(is.na(x)) ) } my_summary_na(gapminder_2019$lifeExp) ``` ``` mean sd N_missing 1 43.13218 16.31355 516 ``` --- class: inverse # Functions: DRY *
Don't Repeat Yourself!
* We would like more efficiency where possible. A good rule of thumb is: > If you are writing the same set of code more than twice, you should write a function to do it instead. --- class: inverse # Functions: DRY ```r good_mileage_displ_low_cyl_4 = if_else(cyl == 4 & displ < mean(displ) & hwy > 30, 'yes', 'no') good_mileage_displ_low_cyl_6 = if_else(cyl == 6 & displ < mean(displ) & hwy > 30, 'yes', 'no') good_mileage_displ_low_cyl_8 = if_else(cyl == 8 & displ < mean(displ) & hwy > 30, 'yes', 'no') good_mileage_displ_high_cyl_4 = if_else(cyl == 4 & displ > mean(displ) & hwy > 30, 'yes', 'no') good_mileage_displ_high_cyl_6 = if_else(cyl == 6 & displ > mean(displ) & hwy > 30, 'yes', 'no') good_mileage_displ_high_cyl_8 = if_else(cyl == 8 & displ > mean(displ) & hwy > 30, 'yes', 'no') ``` Problems? --- class: inverse code-only ```r good_mileage <- function( cylinder = 4, mpg_cutoff = 30, displ_fun = mean, displ_low = TRUE, cls = 'compact' ) { if (displ_low == TRUE) { # condition to check, if it holds, result <- mpg %>% # filter data given the arguments filter( cyl == cylinder, * displ <= displ_fun(displ), hwy >= mpg_cutoff, class == cls ) } else { # if the condition doesn't hold, filter result <- mpg %>% # the data this way instead filter( cyl == cylinder, * displ >= displ_fun(displ), hwy >= mpg_cutoff, class == cls ) } result # return the object } ``` --- class: inverse # Functions: DRY So what's going on here? Not a whole lot really. The function just filters the data to observations that match the input criteria, and returns that result at the end. We also put *default values* to the arguments, which can be done at your discretion. --- class: inverse # Functions: Conditionals The core of that function uses a *conditional statement* - using standard if...else structure. The if: determines whether a condition holds. -- If so... - proceed to the next step in the brackets. -- If not... - skip to the else part. --- class: inverse # Functions: Conditionals .pull-left[ ```r function (x, y) { if (x == 'cat') { ... # do something to y } else { ... # do something else } } ``` ] .pull-right[ ```r function (x, y) { if (x == 'cat') { ... } else if (x == 'otter') { ... } else if ( x == 'puppy' & y > 5 ) { ... } . . . else { } } ``` ] --- class: inverse # Functions: Conditionals At this point we have a nice function that is: - *flexible* - *reusable* - *extensible* - *efficient* How would you add an argument to filter based on year? --- class: inverse code-only ```r good_mileage <- function( cylinder = 4, mpg_cutoff = 30, displ_fun = mean, displ_low = TRUE, cls = 'compact', year = 2008 ) { if (displ_low == TRUE) { result <- mpg %>% filter( cyl == cylinder, displ <= displ_fun(displ), hwy >= mpg_cutoff, class == cls, * year == year ) } . . . } ``` --- class: inverse # Functions: Anonymous Functions Sometimes we just need a quick and easy function - one-off application - especially when using apply/map ```r ctyhwy = select(mpg, cty, hwy) map_dbl(ctyhwy, sd) ``` ``` cty hwy 4.255946 5.954643 ``` ```r map_dbl(ctyhwy, function(x) mean(x) / 2) ``` ``` cty hwy 8.429487 11.720085 ``` --- class: inverse # Functions: Anonymous Functions The second function doesn't exist as an independent R object - *Anonymous functions* - Sometimes called *lambda functions* But it works just the same. Try this one! ```r # some variables have a mad = 0, and so return Inf (x/0) or NaN (0/0) mtcars %>% map_df(function(x) (x - median(x))/mad(x)) ``` --- class: inverse # Functions: Exercises ### Excercise 1 Write a function that takes the log of the sum of two values (i.e. just two single numbers) using the log function. Just remember that within a function, you can write R code just like you normally would. ```r log_sum <- function(a, b) { ? } ``` --- class: inverse # Functions: Exercises ### Excercise 1b What happens if the sum of the two numbers is negative? You can't take a log of a negative value, so it's an error. How might we deal with this? Try using a conditional to provide an error message using the stop function. The first part is basically identical to the function you just did. But given that result, you will need to check for whether it is negative or not. The message can be whatever you want. ```r log_sum <- function(a, b) { ? if (? < 0) { stop('Your message here.') } else { ? return(your_log_sum_results) # this is an arbitrary name, change accordingly } } ``` --- class: inverse # Functions: Exercises ### Exercise 2 Let's write a function that will take a numeric variable and convert it to a character string of 'positive' vs. 'negative'. We can use `if {}... else {}` structure. - Input: a single vector of numbers - Output: will recode any negative value to 'negative' and positive values to 'positive'. --- class: inverse # Functions: Exercises ### Exercise 2 Here is an example of how we would just do it as a one-off. ```r set.seed(123) # so you get the exact same 'random' result x <- rnorm(10) if_else(x < 0, "negative", "positive") ``` Now try your hand at writing a function for that. ```r pos_neg <- function(?) { ? } ``` --- class: inverse middle center animated bounceInUp fadeOutUpBig # https://animate.style/ # More

 --- class: inverse # More: Code Style .pull-left[ Think about... - Why does your code exist? - Consistency - Code length - Spacing - Naming ] .pull-right[

  ] --- class: inverse # More: Code Style These are actually difficult problems No easy solutions Practice --- class: inverse # More: Vectorization Compare: ```r mymatrix = matrix(runif(100), 10, 10) mymatrix_log = log(mymatrix) identical(apply(mymatrix, 2, log), log(mymatrix)) ``` ``` [1] TRUE ``` ```r res = bench::mark(loop = apply(mymatrix, 2, log), vector = log(mymatrix), time_unit = 'us') select(res, expression, median) # microseconds ``` ``` # A tibble: 2 x 2 expression median <bch:expr> <dbl> 1 loop 41.9 2 vector 0.999 ``` --- class: inverse # More: Vectorization The whole vector is considered, rather than each element individually. Preprocessing is done once rather than the n iterations of the loop. --- class: inverse # More: Regular Expressions *Regular expression* (regex for short) > A sequence of characters that can be used as a search pattern for a string. Common operations are to merely detect, extract, or replace the matching string Different flavors for different languages ```r pattern = '^r.*shiny[0-9]$' string = c('r is the shiny', 'r is the shiny1', 'r shines brightly') str_detect(string, pattern) ``` ``` [1] FALSE TRUE FALSE ``` --- class: inverse # More: Regular Expressions What is that gibberish? `'^r.*shiny[0-9]$'` - **^** : starts with, so `^r` means starts with r - **.** : any character (wild card) - ***** : match the preceding zero or more times - **shiny** : match 'shiny' - *[0-9]* : any digit 0-9 (note that we are still talking about strings, not actual numbered values) - *$* : ends with preceding --- class: inverse # More: Regular Expressions - **[a-z]** : letters a-z - **[A-Z]** : capital letters - **\+** : match the preceding one or more times - **()** : groupings - **|** : logical or - [a-z]|[0-9] (a lower case letter or a number) - **?** : preceding item is optional, and will be matched at most once. - 'look ahead' and 'look behind' - **\** : escape a character, - want to search for a period instead of using it as a regex pattern, you'd use \. - R needs \\\, i.e. double slashes, for escape. --- class: inverse # More: Regular Expressions Regular expression patterns are difficult to learn at best. But... -- Every question has been asked on StackOverflow. 😄 --- class: inverse # More: Code Style Exercises ### Exercise 1 For the following model related output, come up with a name for each object. ```r lm(hwy ~ cyl, data = mpg) # hwy mileage predicted by number of cylinders summary(lm(hwy ~ cyl, data = mpg)) # the summary of that lm(hwy ~ cyl + displ + year, data = mpg) # an extension of that ``` --- class: inverse # More: Code Style Exercises ### Exercise 2 Fix this code. ```r x=rnorm(100, 10, 2) y=.2* x+ rnorm(100) data = data.frame(x,y) q = lm(y~x, data=data) summary(q) ``` --- class: inverse # More: Vectorization Exercises ### Exercise 1 Show a non-vectorized (e.g. a loop) and a vectorized way to add a two to the numbers 1 through 3. --- class: inverse # More: Vectorization Exercises ### Exercise 2 colSums vs. apply, which is faster? - Test it with the bench package. ```r x = matrix(rpois(100000, lambda = 5), ncol = 100) bench::mark( cs = colSums(x), app = apply(x, 2, sum), time_unit = 'ms' ) ``` --- class: inverse # More: Regex Exercises ### Exercise 1 Using stringr and str_replace, replace all the states a's with nothing. ```r library(stringr) str_replace(state.name, pattern = ?, replacement = ?) ``` --- class: last-slide, inverse, center, middle ![](https://github.com/m-clark/m-clark.github.io/raw/master/img/Rlogo.svg)


"VAR? Six or seven points that Barca and Madrid have lost"
by BeSoccerJose Manuel Llaneza spoke about the arrival of VAR to La Liga and made it clear that it is something that directly harms Real Madrid and Barcelona.
VAR is currently in its second season in Spain. Now fully in place, although constantly trying to improve, VAR should be that tool so that referees can decide more safely.
Llaneza also wanted to talk about this, who directly suggested that without it, Real Madrid and Barcelona would have more points due to the referee's mistakes. A statement that will not go unnoticed.
Featured links
- BREAKING NEWS: Mourinho replaces Pochettino at Tottenham
- The latest football transfers news and rumours
- Wales, golf, Madrid... in that order
- Luis Enrique returns to Spain national team
"There is equality, the six or seven points that Madrid and Barça would have are gone. Now they are wrong with them and against them," said the vice president of Villarreal to 'AS'.
"Nor do they agree with VAR because those six or seven points are gone. Before, a play at the edge of the doubtful area was a penalty for them. That possibility soon went away..." he closed.


activationStrategy:
Add to specify an activation strategy if it is always the same and you do not want that to be in your view-model code. Available values are 'replace' and 'invoke-lifecycle'.
activationStrategy:
Add to specify an activation strategy if it is always the same and you do not want that to be in your view-model code. Available values are 'replace' and 'invoke-lifecycle'.


SCHOLARSHIP APPLICATION FORM
The information provided in this form will be used by the scholarship committee to select the recipient for the scholarship.
Its important that you give complete and accurate details. However, the selected persons for scholarship will undergo further reshuffle to complete the next part of the application.


Technical overview
- IoT device in use :Cypress Quadro
- IoT device is sending data(JSON) directly to a IoT Hub endpoint (via cloud gateway), hosted on Microsoft Azure. To connect, device is using MQTT library
- Azure IoT Hub provides support for the AMQP 1.0 with optional WebSocket support, MQTT 3.1.1 and native HTTP 1.1 over TLS protocols
- Data from IoT Hub are sent to Web App hosted on Azure via IoT Hub Endpoint
- On the Web App we deploy/upload custom NodeJS Application from Git (HTML/CSS/JS files)


HTML Text Fundamentals
One of HTML's main jobs is to give text structure and meaning (also known as semantics) so that a browser can display it correctly. This article explains the way HTML can be used to structure a page of text by adding headings and paragraphs, emphasizing words, creating lists, and more.
Why do we need structure?
Text structure refers to how the information within a written text is organized. This strategy helps students understand that a text might present a main idea and details; a cause and then its effects; and/or different views of a topic.
The basics: headings and paragraphs
Most structured text consists of headings and paragraphs, whether you are reading a story, a newspaper, a college textbook, a magazine, etc.
OUTPUT :


Vacation Rental Website Build · Content Review, SEO, Web Design, Web Development · 2020
#1 Design Phase
In the first step, we decided on the look and feel of the website, selected a target audience, reviewed some styling considerations, and created site mockups. Since we were starting from scratch here, we began with a mood board and created personas to identify and narrow down brand personality. Next, we finalized the color scheme and typography and wireframed the responsive design before creating custom icons and a full design comp.
#2 Content & SEO Phase
Next, we did a full review of the content and ran an SEO report. Here we optimized the copy to make sure the website is easy for its target audience to find. Because the content was originally translated from Spanish into English, there were a few tweaks that needed to be made in order for the language to flow better and improve SEO.
#3 Development Phase
Once we agreed upon a design and finalized the content, it was time to build the website! This began with HTML coding the bare bones of the site and later adding style with CSS. Once the site was built, we did a round of revisions to make sure everything was perfect before launching it live.
By successfully completing these three phases, we were able to meet the objectives of this project. Now this property has its own website with contact information so reservations can be made directly. It’s also now much easier for potential renters to find their apartment and get the basic information in one reliable place.
“From start to finish, Sam guided us through every step and was in constant communication which made the whole website creation process really easy. She was able to understand the feel of our property and the experience it offers guests, translating it into a beautiful site. Now, in addition to the reservations we receive from other platforms, we’re able to receive bookings directly from guests, avoiding the extra fees that come with third-party sites. Sam was a delight to work with and we couldn’t be happier with our new apartment rental landing page!”
-Ático del Vigía


You can use the slider to control the video. Click on the start/end button to mark the temporal boundary. When you are done, do remember to submit your annotation!
Red flag is only used when


Widgets are components that allow the integration of interactive elements (data visualizations, KPIs, etc.), from data available on an Opendatasoft API, directly on a web page.
Opendatasoft widgets are based on AngularJS. You will thus most likely encounter elements in the Opendatasoft widgets documentations that are directly inherited from AngularJS, but no prior knowledge of AngularJS is required to use the widgets.
Widgets can be used to build various types of web-based creations, such as:
- a visualization (from the basic visualization to the visualization tool using several widgets) based on a public dataset, integrated into a blog article ;
- an application, that allows users to design and build complex and interactive dashboards or visualization pages based on your data, using HTML tags ;
- a website, either built on top of public data or your own data.
This documentation references all Opendatasoft widgets, filters and services. Each of those has its own reference page, which describes them, indicates their parameters and gives examples of their usage.
Use the menu on the left to navigate all available reference pages.


A graph showing the incidence proportion per 1000 persons, optionally stratified by age (in 10-year bins), gender, and calendar year.
The incidence proportion is computed as the number of people entering the cohort with an exposure to an H2 inhibitor with 365d prior lookback / the number of people contributing at least one day of observation time in that calendar year * 1000 persons.
You can select multiple databases in the side bar to see graphs from different databases in the same plot.
Select the cohort to explore in the side bar.
At the top of the plot, you can choose whether to stratify the data by age, gender, or calendar year.
If you move the mouse over the plot, you can see the precise value.


Usage
Enter the number of input and output belts and which type of belts you'd like.
You'll see an image of the print and a blueprint string to import the balancer into your factorio build.
Click to download the image.
Click to copy the blueprint code.
Click to copy the permalink to your current balancer.
About
Find the GitHub repo here.
Find the changelog here.
Made by JustinGolden21 and Oliver1803
Contact Justin at justingolden@rgbstudios.org


--- layout: post esbma_id: 1497 date: 2003-12-23 12:00:00 keywords: cornsharp title: Make More Mistakes ---
My third Business of Software column is now available on the MSDN website.


Recently my team were using PhoneGap, the HTML5 middleware that enables web developers to write mobile apps once using technologies they know; HTML5, CSS and Javascript. The completed PhoneGap/HTML5 application is then compiled into binaries for each of the supported mobile platforms. The idea is simple, developers write code once and deploy many times. PhoneGap can certainly be used for creating simple applications, but stray from the core API and you quickly find yourself either writing a native extension; or more likely finding a plugin that does the task for you.
As part of a research project for my employer we were writing a mobile application using the PhoneGap platform. The application in question was a relatively simple concept, however it quickly became apparent we would have to go outside of the core API.
PhoneGap does not provide a standard way to create a date picker, instead delegating the vast majority of interface responsibilities to the application and/or framework chosen to author the application. In our case we were using JQuery Mobile for the application user interface. There are others available, Sencha Touch being another popular one from the creators of ExtJS.
Date input is a potentially complex operation on a mobile device. There are many components to a full date and making the user type it in is hardly the optimum interface. Of course there are many web forms that expect the user to do just that. But in the mobile context, there is a chance the operator will only be using one hand to interact with the device, so making them use a complex input control, such as a keyboard, would instantly have a negative effect on their experience.
Presenting the standard JQuery Mobile Datepicker or similar will equally frustrate the user. The JQuery Mobile Datepicker component is awful, but hardly the most efficient design. Also, PhoneGap gives the user the impression the app they are using is a native app, so they will most likely expect a native control in this situation. We could use an iOS DatePicker implementation in Javascript such as Cubiq’s Spinning Wheel Plugin to present a picker in the PhoneGap. But this ensures the picker will use an iOS interface even when used on an Android, Windows Mobile or one of the two remaining Blackberry devices. Another great way to ruin the user experience is to start presenting unfamiliar controls.
Luckily modern mobile operating systems have solved this problem by supplying a native Datepicker control. Using the native Datepicker control on each platform requires a native PhoneGap extension. Naturally the first thing to do is look for an existing solution to this problem within the PhoneGap ecosystem. A quick search revealed that Datepicker extensions do exist for PhoneGap on iOS and Android. After downloading the extension and plugging it into our PhoneGap application, the extension worked… but unfortunately it would only work the one time.
The application would display the UIDatePicker
as expected, allowing the user to select a date and dismiss the action sheet. However when the date picker was summoned subsequently, it would not respond to the user input and the date selected was not returned to the application. It was time to look at the source code to see if there was anything obvious going wrong. The source quickly revealed some issues that required urgent attention.
Memory management
First off there are some basic Objective C memory management violations within the DatePicker extension. The DatePicker.h
header file defines @property (nonatomic, retain) UIDatePicker *datePicker;
accessor method. Using this accessor for assignment will increment the reference count of the UIDatePicker
object passed to it by one. If we examine the following code, we can see how the accessor is used within the DatePicker implementation.
1
|
|
The alloc
method will allocate memory for the UIDatePicker
object and increment the retain count by one. Assigning the resulting object to the datePicker
instance variable via the accessor will increment the retain count a second time. Later in the implementation the datePicker
property is released, decreasing the retain count. It is now 1
for those still counting. An object with a retain count greater that zero will be retained by the autorelease pool.
Memory management in Objective C is a vital concept to understand if you are going to write code any code. Even if you intend to use the new Automatic Reference Counting features provided by Clang, I believe it’s imperative to understand the fundamentals of memory management. I am not using ARC at the moment and do not intend to any time soon, the reasons behind this decision are probably worthy of another blog post at some other time. However there are three simple rules within the Objective C language for managing memory that, when followed, will see you good in the vast majority of situations;
When creating a new object using either the;
1. [alloc]
2. [new]
3. [copy] or derivatives, such as [mutableCopy]
methods, then you are responsible for releasing that object when you are finished with it.
The result of this oversight within the PhoneGap DatePicker extension is that the UIDatePicker
object created in the code block shown above is never released, creating a memory leak. If there was only ever one instance of the UIDatePicker
object then this would not be so much of an issue, although all memory leaks are bad. One leaking date picker is not going to consume vast amounts of memory. But this situation gets worse.
Further inspection
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
The code block above presents an abstract from the DatePicker show:withDict:
method. This is the Objective C method the PhoneGap Javascript plugin is bound to. Each time a HTML control is selected that invokes the show:withDict:
method, the code above is executed.
To provide some context, PhoneGap plugins in Objective C are lazily instantiated, thus loaded into memory only when they are first called. This is quite a nice feature. However PhoneGap relies on the extension code playing nicely and tiding up after itself when it is finished working, or if the operating system warns of low memory. PhoneGap calls the onMemoryWarning
method within the extension if the operating system is running low on memory, allowing the plugin to release objects superfluous to requirements at that moment. No such luck here. It wouldn’t be so bad if this extension was not leaking memory.
Returning to the code shown above. The DatePicker show:withDict:
method is being invoked by PhoneGap when the plugins Javascript counterpart is executed. Each time this method is executed a new UIDatePicker
is created and assigned to the plugin and action sheet. Because the previous UIDatePicker
is not released and also not removed from the Action Sheet view, the new instance is placed over the existing instance. The new instance should always be placed on top, but who knows what happens when there are several UIDatePicker
controls layered up on top of each other. This begins to explain the strange behaviour experienced earlier where repeated use of the DatePicker extension resulted in it not responding or returning the correct date.
Delegates and Single Responsibility Principle
One other implementation detail was also causing concern. The UIActionSheet
class has a delegate protocol. The Cocoa frameworks use the delegate pattern consistently across many user interface controls. Unfortunately the DatePicker extension does not use the provided delegates.
1 2 3 4 5 6 7 8 |
|
The dismissActionSheet:
method is invoked by a UISegmentedControl
button defined earlier in the class. When the user selects the Close button, this method is invoked. But this method is performing a lot of actions, most are outside the scope of the method name. The current responsibilities of this method are;
- Remove the
UIActionSheet
from the interface - Free the
UIActionSheet
from memory - Free the
UIDatePicker
from memory (although we saw earlier this won’t happen) - Return the date picked to the PhoneGap API
- Update the state of the DatePicker extension
That is a lot of responsibility for a simple UI action. A method named dismissActionSheet:
should do just that, dismiss the action sheet. Therefore to maintain the single responsibility principle this method should only perform the action it prescribes.
1 2 3 |
|
The new implementation of dismissActionSheet:
solely performs the action requested of it, namely removing the UIActionSheet
from the interface. But in the process a lot of the other functionality previously performed has been lost. Returning to the list of responsibilities above, there are three tasks that are important to the functionality of this extension. (Memory management of UI elements should not be handled here)
- Return the date picked to the PhoneGap API
- Update the state of the DatePicker extension
- Remove the
UIActionSheet
from the interface
Having already removed the UIActionSheet
from the interface, only the first two tasks remain.
The first task is to return the date picked to the PhoneGap API. Because a value is being transmitted from the one platform (Objective C) to another (JS), there is potential for things to go wrong. It is probably best to send the value to the PhoneGap API before removing the UIActionSheet
. The UIActionSheetDelegate
class provides a method actionSheet:willDismissWithButtonIndex:
that is invoked prior to the UIActionSheet
being dismissed.
1 2 3 4 5 |
|
The date selected by the user is now passed to the PhoneGap API as the UIActionSheet
is being dismissed by the system. If there are any problems passing the value back to PhoneGap, an alert can be provided before the interface is dismissed. (Ideally, there would be a UIActionSheetDelegate
method for cancelling the dismiss; actionSheet:shouldDismissWithButtonIndex:
for example. Unfortunately no such luck here)
The final task is to update the state of the extension. As the extension will hang around after the user has dismissed it, the state will be important for managing memory and components so it is worth keeping. Again the UIActionSheetDelegate
protocol provides the perfect method for updating the state, actionSheet:didDismissWithButtonIndex:
.
1 2 3 4 |
|
All of the original functionality tied to the Close button has now been refactored into new methods that use the standard Objective C and Cocoa patterns. Additionally, the single responsibility principle has been maintained.
The refactored DatePicker extension and PhoneGap
There are many more improvements that can be made to this DatePicker extension for PhoneGap. It is easy to critique others code, but it is far more valuable to give back. As we had to fix the issues detailed here and a number of others, we pushed the changes back to GitHub and requested they were pulled into the project. To the credit of the PhoneGap plugins project, they merged the changes in promptly.
There are no doubt other improvements that can be made to the DatePicker extension, however those improvements will not be completed by myself or the team. After attempting to build our application in PhoneGap, we ultimately abandoned the project and reverted to native development on iOS and Android.
Unfortunately PhoneGap promises a lot, but does not always deliver on these promises. Additionally many of the official extensions are implemented to a similar standard as the DatePicker extension examined here. The questionable quality extends beyond iOS to Android as well, as different but equally crippling issues were found with the Android DatePicker extension. I am sure that PhoneGap has a place in the mobile development space, but beyond basic brochure applications I am not entirely sure what it is.
Update
After this was initially posted, people have pointed out that HTML5 does provide a datetime input type. This would obviously provide a better way to perform all of the above within the browser context. The support is still rather patchy, so keep an eye on PPK’s excellent work testing HTML5 support across all mobile devices. As with all things in the mobile web, support for <input type="datetime"></input>
can only improve with time.


001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.shiro.realm; 020 021import java.util.Collection; 022 023/** 024 * Enables Shiro end-users to configure and initialize one or more {@link Realm Realm} instances 025 * in any manner desired. 026 *
 027 * This interface exists to support environments where end-users may not wish to use Shiro's default 028 * text-based configuration to create and configure realms, and instead wish to retrieve a realm configured in a 029 * proprietary manner. An implementation of this interface can access that proprietary mechanism to retrieve the 030 * already-created <tt>Realm</tt>s. 031 * 032 *
The Realm instances returned will used to construct the application's 033 * {@link org.apache.shiro.mgt.SecurityManager SecurityManager} instance. 034 * 035 * @since 0.9 036 */ 037public interface RealmFactory { 038 039 /** 040 * Returns a collection of {@link Realm Realm} instances that will be used to construct 041 * the application's SecurityManager instance. 042 * 043 *
The order of the collection is important. The {@link org.apache.shiro.mgt.SecurityManager SecurityManager} 044 * implementation will consult the Realms during authentication (log-in) and authorization (access control) 045 * operations in the collection's iteration order. That is, the resulting collection's 046 * {@link java.util.Iterator Iterator} determines the order in which Realms are used. 047 * 048 * @return the Collection of Realms that the application's SecurityManager will use 049 * for security data access. 050 */ 051 Collection<Realm> getRealms(); 052 053}


Simple, no bull***t React slider component with touch support and 0 dependencies. Just put your slides in it. Modern browsers and IE10+ (IE9 should work, but as flex is not supported you'll need to change CSS).
Include JS/CSS files, and in your React app wrap you slider in
<Slider>
Component.
<Slider> {/* Slides */} <div> A </div> <div> B </div> <div> C </div> </Slider>
loop: false
- Should arrow navigation loop aroundselected: 0
- Slide to be selectedshowArrows: true
- Show arrows navigationshowNav: true
- Show pager navigationAny of the props can be dynamically changed.
<Slider loop={ false } selected={ 0 } showArrows={ true } showNav={ true }>


Learning Resources
High Scores
| # | Initials | Score |
|---|---|---|
| 1 | Initials1 | Score1 |
| 2 | Initials2 | Score2 |
| 3 | Initials3 | Score3 |
| 4 | Initials4 | Score4 |
| 5 | Initials5 | Score5 |
As a budding web-developer, you may want to check your skills to identify areas of challenge or to build confidence around your nascent skills. This quiz is designed to check your skills in a low-stress and playful way.
| # | Initials | Score |
|---|---|---|
| 1 | Initials1 | Score1 |
| 2 | Initials2 | Score2 |
| 3 | Initials3 | Score3 |
| 4 | Initials4 | Score4 |
| 5 | Initials5 | Score5 |


Across: 1. Sounds like an ornament worn while canvassing (14) 9. Heavyweight certain to have bald head (7) 10. Curve round left and climb (7) 11. Summarize Walker's come-back (5) 12. Stood across street before acedemician, Dr Trotter, returned (9) 13. Girl clumsily reset shrubs (4 5) 14. Laser explodes in Court! (5) 15. Plain robes (5) 17. Poor souls ride in small car to see dictator (9) 20. Eton backs exam for writing (4 5) 22. Catch artist with dried coconut (5) 23. She unites Tolstoy and Mrs Batty (7) 24. Lance? 'E is a gas! (7) 25. Cooler for sailors in London? (3 5 6) Down: 1. Adventurously go into public relations one-by-one, after me (14) 2. Safe men to look after women? (7) 3. After drink at Turks Head, he finds musician (9) 4. Supervise poem being written in Old English (7) 5. Accompanies to different sectors (7) 6. Mr McDonald loses a letter for Mr Dahl (5) 7. He eats a little in B-Berlin (7) 8. I'd pester bad people to get everything worked out in advance (14) 14. So, Rex, Eric may be a demon removal man? (9) 16. Engage Liz to carry rubbish (7) 17. I know this, but shall we go back to it? (2 5) 18. Employee has royal vehicle in street (7) 19. Opposes using MP badly (7) 21. Master holds duck as evidence (5)


Testing the
a
element with the
aria-disabled
attribute
Published:
August 22, 2019
a
with
aria-disabled="true"
My anchor
results
macOS/iOS Safari and Chrome with VoiceOver announces "dimmed"
Firefox, Chrome, IE11, Edge with NVDA announces "unavailable"
Firefox, Chrome, IE11, Edge with JAWS announces "unavailable"


Sample File Management Function Using Database¶
Important
This sample uses a Nablarch 1.4 compliant API.
When combining with versions later than Nablarch 1.4 series, customize as necessary.
Summary¶
Provides an implementation sample of the function to centrally manage the files used in business applications with DB.
The sample is intended for the following applications:
- File upload and download from the screen.
- Send and receive file transfers that handle a relatively small number of files. For example, dozens of files can be sent/received at a time.
- Assumed that relatively small files are managed. For example, a small image such as an ID photo.
Tip
This sample uses Oracle as a DB. If the DB is not Oracle, use by modifying the implementation to match the DB used.
The following is an example of the processing image during file upload and download.
When uploading files¶
When the browser sends the file, the multipart request handler of Nablarch analyses the content and stores it in a temporary file.
This sample stores that file to the DB in a binary format.
When downloading files¶
If a file is requested but clicking on the download tag, the business class action must set Stream to StreamResponse.
This sample gets the Stream from the DB.
Delivery package¶
The sample is provided in the following package.
please.change.me. common.file.management
Functions¶
Implemented¶
It has the following functions:
- File registration function
- The file is stored in binary column based on the file’s Stream. When storing, a unique file management ID is assigned (using Nablarch indexing function), and the file management ID is returned to the caller.
- Check that the file size does not exceed the column size.
- Function to delete files
- Perform logical delete by rewriting the delete sign of records based on file management ID.
- Function to retrieve files
- Retrieve and return the file from the file management table based on the file management ID.
 At the time of operation, it is necessary to consider the clean up of records in logical delete status separately.
- There are only minimal columns in the table definition. When other information is required, it is presumed that separate tables be created for each job.
- To check contents of the file, only check that the file size does not exceed the column size. If there are other items to be checked, it is presumed that the checks shall be made by the caller.
- There is no file update process. If a process equivalent to the file update process is to be performed, it is assumed that the file delete process and file record process are executed in order.
Structure¶
Shows the sample structure.
Class diagram¶
Responsibilities of each class¶
Class definition¶
Class name Summary FileManagementUtil Utility class that manages files stored in DB. The process is delegated to the class that implements FileManagement. FileManagement Interface implementing the class that performs file management. DbFileManagement Main part of the class that manages the files stored in the DB.
Table definition¶
File management table (FILE_CONTROL)
The file management ID is stored along with the file in the file management table.
Logical name Physical name Definition Limitations Supplementary notes File management ID FILE_CONTROL_ID String Primary key Unique ID assigned by the system (Indexed by Nablarch’s index function) File contents FILE_OBJECT Binary Delete sign SAKUJO_SGN String Sign to denote if the file has been deleted or not.
0: Not deleted
1: Deleted
Tip
In addition to the table above, Oracle sequence is used in this sample when assigning the file management ID with the Nablarch index function.
How to Use¶
How to use FileManagementUtil¶
This section describes how to use the FileManagementUtil.
Usage example of FileManagementUtil (component configuration file)¶
When using FileManagementUtil, define each component’s property in the component configuration file when needed.
The components to be configured are shown below.
Component to be configured Logical name used in configuration example File management function body fileManagement Numbering function oracleSequenceIdGenerator The formatter used for numbering dbFileManagementFormatter
The configuration example shown below.
<!-- File management function (the component of logical name dbFileManagement is used by FileManagementUtil class) -->
<component name="fileManagement" class="please.change.me.common.file.management.fileManagement">
<!-- Maximum length of storage file (unit: bytes) -->
<property name="maxFileSize" value="10000000"/>
<!-- Key to identify if the numbering function is used for numbering bFileManagement -->
<property name="fileIdKey" value="1103" />
<!-- Numbering function -->
<property name="idGenerator" ref="oracleSequenceIdGenerator" />
<!-- Formatter used for numbering -->
<property name="idFormatter" ref="dbFileManagementFormatter" />
</component>
<!-- Numbering function (used from the file management function) -->
<component name="oracleSequenceIdGenerator" class="nablarch.common.idgenerator.OracleSequenceIdGenerator">
<property name="idTable">
<map>
<!-- Mapping key to the sequence name -->
<entry key="1103" value="FILE_ID_SEQ"/>
</map>
</property>
</component>
<!-- Formatter used for numbering (used from the file management function) -->
<component name="dbFileManagementFormatter" class="nablarch.common.idgenerator.formatter.LpadFormatter">
<!-- Number of digits -->
<property name="length" value="18" />
<!-- Characters to fill in the missing digits -->
<property name="paddingChar" value="0" />
</component>
Usage example of FileManagementUtil (When uploading files)¶
The usage of this sample is described assuming that file uploaded from the browser is stored in the DB.
public void doSaveFile(HttpRequest req, ExecutionContext ctx) {
// Acquire the part to be saved
PartInfo part = req.getPart("fileToSave").get(0);
// If needed, file is validated for each job at this timing.
// Register file to the DB
String fileId = FileManagementUtil.save(part);
// The process using fileId is performed next if necessary.
}
Usage example of FileManagementUtil (When downloading files)¶
The usage of this sample is described assuming that the file is fetched from the DB and downloaded to the browser.
public HttpResponse doTempFile(HttpRequest req, ExecutionContext ctx) {
//File ID used for download
String fileId = "000000000000000001";
// Acquire a file from DB
Blob blob = FileManagementUtil.find(fileId);
// Configure the response information
StreamResponse res = new StreamResponse(blob);
res.setContentDisposition("temp.png");
res.setContentType("image/png");
return res;
}


New Year
01 Jan 2019 - sguthals
It’s the new year and I’m excited to bring you a new book! Phil Haack and I have been hard at work writing GitHub For Dummies and we’re so excited that you’ve decided to take the journey with us to discover how to build code collaboratively.


Ljungberg Speaks After Appointment As Arsenal Interim Manager
by Olugbenga IgeArsenal interim head coach Freddie Ljungberg has promised to give his best to put smiles on the faces of the club’s fans.
Concise News had reported that the North London club sacked Unai Emery after the club’s worst run of results since 1992.
Following the sack of the Spaniard, Arsenal asked former winger and a member of the ‘invincibles’ Ljungberg to take charge as interim manager.
Emery, tasked with leading the club into a new era following Arsene Wenger’s departure in May 2018, leaves the Emirates 18 months on from his appointment.
In a statement on Friday on behalf of the Arsenal board and owners Kroenke Sports & Entertainment, Josh Kroenke said: “We announce today that the decision has been taken to part company with our head coach Unai Emery and his coaching team.
“Our most sincere thanks go to Unai and his colleagues who were unrelenting in their efforts to get the club back to competing at the level we all expect and demand. We wish Unai and his team nothing but future success.
“The decision has been taken due to results and performances not being at the level required.
“We have asked Freddie Ljungberg to take responsibility for the first team as interim head coach. We have full confidence in Freddie to take us forward.
“The search for a new head coach is underway and we will make a further announcement when that process is complete.”
The Spaniard came under increasing pressure following a wretched run of results that has seen the Gunners fail to win in five Premier League games.
However, reacting for the first time after his appointment on Twitter on Friday, Ljungberg assured Arsenal fans that he will give everything he has to put smiles on their faces again.
The interim manager also pleaded with them to support the team ahead of the upcoming busy fixtures.
He wrote: “However long I oversee @Arsenal for I will give everything I have to put smiles on faces again. We have a busy few weeks ahead and the team needs your support. Let’s get to work!”