Rage 2 has appeared on Game Pass for PC
by Ian BoudreauMicrosoft took the occasion of XO19 this week to announce a host of new games coming to its Game Pass subscription service, both for Xbox One and for PC. But it turns out they missed a couple that you can play right now, including Avalache’s goofy shoot ’em up Rage 2.
That’s right, you can head into the mutant-infested wasteland of Rage 2 right now if you’ve got Game Pass on PC. It’s big, it’s full of giant guns and monsters, and you can download it for no additional charge if you’re a subscriber.
It’s not a game we absolutely loved, mind – our Rage 2 review gave it a solid 7/10. But it’s certainly an entertaining FPS if you like id Software’s shooting and the arcadey driving that Avalanche perfected in 2015’s Mad Max.
Microsoft’s Game Pass announcement this week included Rage 2, but indicated the game would only be available to subscribers on Xbox One. However, it appeared in the Xbox app for Windows yesterday morning, and I’ve had a bit of a crack at it.
It doesn’t quite have the energy I was expecting after the initial Andrew WK-infused teaser trailer, but it seems fun enough.
And it’s also the kind of game that I find myself much more inclined to play if I stumble across it like this rather than buying it outright or waiting on a Steam sale.
Another game that’s shown up on Game Pass for PC is Tracks – The Train Set Game. This could hardly be more different from Rage 2, as it’s about gently laying little toy wooden train tracks to your heart’s content. You can build whole villages and create complex rail systems, and then ride your train around the dioramas you create.
Along with these, there’s Age of Empires II: Definitive Edition, Hearts of Iron IV: Cadent Edition, The Talos Principle, and Pandemic: The Board Game. So there’s almost certainly something for everyone in this batch of Game Pass releases for PC.


--- layout: archive title: Zulip Chat Archive permalink: /stream/116395-maths/topic/mv_polynomial.html ---
I'm considering an mv_polynomial
refactor to get rid of the slow elaboration problems. @Kenny Lau what are the problems?
@Chris Hughes no idea at all. Lean doesn't have the greatest debugging tools.
but if you want some indicators, you can look at how slow pempty_ring_equiv
is
and the related lemmas
if you're highly motivated you can build your own version of lean and step though / profile the C++ code
would not recommend unless you want to learn a lot about computer programming
I had a bit of a play around. Changing all the Type*
s to Type
approximately halved the time, but it's still slow.
if you're highly motivated you can build your own version of lean and step though / profile the C++ code
so you mean, Lean doesn't have good debugging tools, and won't have, and if I want to debug I should go through a lot of pain
This is why I mentioned the highly motivated part
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


(PECL getdns >= 0.11.0)
php_getdns_context_set_dns_root_servers — Set DNS root servers for recursive resolvers.
$context
, int $value
)This function sets the DNS root servers to be used for recursive resolution. The value parameter must be a list that contains dictionaries of addresses to be used for looking up top-level domains; the default is the list of "normal" IANA root servers. Each dictionary in the list must contain at least two names: address_type (whose value is a bindata; currently either "IPv4" or "IPv6") and address_data (whose value is a bindata).
context
The previously created DNS context that is to be used with this request.
value
The list that contains the dictionaries that describe the root servers to be set in the context for recursive resolution.
This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion.


{% extends 'base.html' %} {% block content %}
Date: {{ meet.meetingDate }}
Time: {{ meet.meetingTime }}
Location: {{ meet.meetingLocation }}
Agenda: {{ meet.meetingAgenda }}


| Prodotto | Scrum Team | Workflow |
|---|---|---|
| {{assignment.product}} | {{assignment.scrumTeam}} | {{assignment.scrumProductWorkflow}} |
| ID | Nome | Descrizione | Versione | Seleziona Scrum Team | Seleziona Workflow Prodotto | |
|---|---|---|---|---|---|---|
| {{p.id}} | {{p.name}} | {{p.description}} | {{p.version}} |
| ID | Ruolo | Username | Firstname | Surname | |
|---|---|---|---|---|---|
| {{association.scrumTeam.productOwner.id}} | Product Owner | {{association.scrumTeam.productOwner.username}} | {{association.scrumTeam.productOwner.firstName}} | {{association.scrumTeam.productOwner.lastName}} | {{association.scrumTeam.productOwner.email}} |
| {{association.scrumTeam.scrumMaster.id}} | Scrum Master | {{association.scrumTeam.scrumMaster.username}} | {{association.scrumTeam.scrumMaster.firstName}} | {{association.scrumTeam.scrumMaster.lastName}} | {{association.scrumTeam.scrumMaster.email}} |
| {{m.id}} | Team Member | {{m.username}} | {{m.firstName}} | {{m.lastName}} | {{m.email}} |


Back
Defendant's response Make a counter suggestion
Their suggestion.
I will fix the roof if you'll give me access and pay for any extra materials.
I will fix the roof if you'll give me access and pay for any extra materials.


@
Wrong Login or Password
Login on this page
Cancel
Log out on this page
Log out everywhere
Join our
amazing community
to comment and reward others.
Sign up. Get STEEM!


Watch: Heartbreaking Interview Of Mai Sorobhi Narrating Plight
by KarhtaZWBelow is video footage captured during iHarare’s visit to veteran television actress Rhoda Mtembe, popularly known as Amai Sorobhi, who is appealing for help from well-wishers.
Gogo Mtembe suffered a stroke early this year and is now handicapped. She is barely able to walk on her own or to perform day to day tasks. She is currently living with her daughter Charity who is taking care of her every need, including moving her around the house when she needs to.
After yesterday’s article on Gogo Mtembi’s plight, iHarare has been receiving numerous calls and inquiries from well-wishers from all over the world, who want to assist the veteran actress and wanted to confirm the channels through which to send their aid.
Watch video……
For those interested in assisting Gogo Mtembi please visit the link below.
Click HERE.
To View and Apply for the latest Jobs and Vacancies in Zimbabwe, Please Visit our Sister website iHarare Jobs


This is another entry into the “fun, but probably not feasible” folder.
A colleague and I have been trying to show the importance of getting a knowledgebase set up for our teachers. It’s been a back-burner issue for a long time because:
There’s a little bit of hyperbole there, but in essence, it would be nice, but not now.
Google released Hangouts Chat for GSuite users. The main reason was to compete with enterprise chat apps like Slack (but you won’t hear Google saying that directly). Hangouts Chat allows you to set up discussions with teams that are threaded based on rooms. They’ve also added an automation API so users can find, or write, bots to discussions. I got Chat turned on for our domain just to see what it was like. I was able to use Google’s code lab guide to get a simple bot up and running. It pulled open tasks for a user from our project management suite and I was able to use existing code to get the data into the bot. In all, it took me about two hours to have a working prototype.
I decided to build a helpdesk chat bot which could pull answers to common technical problems our teachers face. That ballooned into a web app to pair with the bot because…why not.
I’ll go through some of the code, but all of it is on GitHub. It’s written in Apps Script because again, a lot of the code was preexisting so I didn’t have to start from scratch. Most of it is modified from standalone functions I have running in separate functions on other sheets. The real challenge in this task was to wrangle the user input into something usable by the script.
First things first - we needed a database. I threw together a spreadsheet with several data fields that hold different types of information. I started with our platforms as a high level filter and then added some tags. The user can search for all platform-related entries or narrow them down with keyword tags.
There are two additional sheets to the template: one to authenticate users and one to build a list of district platforms. Authenticated users have a button to add new articles into the database from the web app (see below). Editing a really big spreadsheet, especially when typing multi-line, HTML formatted entries, gets really cumbersome, so I wanted a way to do that through the website. Additionally, standardizing the platform options helps the user narrow searches right from the start so they can find information quickly.
Setting up the bot is covered by Google’s Code Lab, so I’m not going into detail here. The main piece of the bot is that it listens for a mention by a user, finds the information, and returns a card-formatted response.
Our thinking for this app is that someone wants a quick video on how to do something, so only videos are returned. The main challenge is getting meaningful information from the user mention in order to match database entries.
The regular expression looks for any of the keywords mentioned by the user in a string. This was easier than trying to match array values and provides consistent results. Right now, a user can send simple requests like “Google” or “Canvas” to get general results. They can also include some refining search terms, like “Google gmail” or “Canvas assignment” to narrow searches down. If there are no videos that match the search, they’re pushed over to the web app which has articles that do not include video results. More work could be done to refine how the script processes user input to improve the experience.
The script takes the string an creates a regular expression which is then used to match a string built from columns one and two of the spreadsheet. If a result is matched, the YouTube URL is returned in an array.
Once the YouTube videos are grabbed from the sheet, they’re broken into video ID strings and put through the YouTube API to get the video title and thumbnail. The bot builds a card to return to the user with suggested videos. If there aren’t any videos available, the user is given a link to the web app where they can find written articles on their topic.
We also threw together a web app to display information that isn’t in video form. The idea being that these are longer articles that have step-by-step instructions and are meant to be used in conjunction with the chat application. Lookup can be done by either passing query parameters in the URL to the app or using the sidebar form to search for keywords within a given topic.
Web apps also allow you to append queries to the published URL out of the box. If a query string is included, the app creates an object that can be passed through your script functions to build a display from a template dynamically. For instance, navigating to
https://script.google.com/.../exec?platform=ios&tags=airplay
takes you to this:
When a video isn’t returned, we’ll pass back the user string to jump right to relevant answers.
Writing logic to manipulate and understand user input that can vary wildly is very difficult. I’m relying on simple prompts (platform + search keys) to help return a video on every search. As the database grows, results will also improve. I’d like to spend more time refining the bot script to better process and use the chat messages. The regular expression approach is pretty brute-strength, but it works for most searches.
A bigger problem I discovered is that hosting a web app and a bot in the same script file causes things to break. Google makes it easy to deploy a bot from an Apps Script project. Hosting a web app is also quite easy and uses a similar ID string. What I think happens is that those ID numbers are conflicted when both are hosted from the same project. The bot’s onMessage
listener wouldn’t register an event with a web app published. One solution is to host the bot in an unbound script that points to the same spreadsheet via the key. Another (probably better, in the long run) solution would be to write a web view that is hosted on a school server and access the Google Apps Script API to display database queries. More on that in this long demo.
In the knowledge economy, we need a Netflix of education - TechCrunch flickr photo by DigitalMajority shared under a Creative Commons (BY-NC-SA) license
Written on March 20th, 2018 by Brian Bennett Categorized in: Code
Leave a comment


v4.21.0
- Community reviews (for weapons and armor) are in for Destiny 2 inventory.
- Charting weapon reviews.
- Fixed the shadow under the sticky characters bar on Chrome.
- Add an option to farming mode that stashes reputation items in the vault.
- Add a new smart loadout to gather reputation items for redemption.
- Scroll the loadout drawer on mobile.
- Show character level progression under level 20 for D2.
- Stacks of three or more rare mods now have a yellow border
View the changelog for
the full history.
Follow us on:


'The Mandalorian' concept art proves Baby Yoda was always adorable
by Alison ForemanWe don't know where Baby Yoda came from (yet), but The Mandalorian creator Jon Favreau is willing to divulge how he first saw the adorable creature.
On Tuesday, four days after the release Disney+'s second Mandalorian installment, Favreau shared the concept art for "The Child" on Twitter. With two big brown eyes, two bigger green ears, and one little foot poking out of his snuggly, first draft Baby Yoda looks almost as cute as the one that made it into the show.
Star Wars fans were quick to applaud Favreau's work...
... pledge their allegiance to Baby Yoda...
... and demand merch. Seriously, everyone wants Baby Yoda merch.
You can check out more concept art during the end credits of The Mandalorian, starting with episode 3 on Friday. Until then, sleep tight, sweet prince.


{{ nodeParams | json }}
{{ preservedViewCallbackContext | json }}
Modify goBackContext value, that you receive then via LuigiClient.addContextUpdateListener():
Click here to go back to your preserved view.


journeying in hyrule
& activating mekas in overwatch
| goal: | re/play zelda series |
|---|---|
| completed: | FS, SS, ALBW, OoT, TWW, MM, BotW |
| playing: | TP |
| to play: | ALttP, TMC, LA, PH, LoZ |
| to buy: | ST, OoA, OoS, FSA, AoL |
| now playing | system | |
|---|---|---|
| style savvy: styling star | 3DS | 2017 |
| fire emblem echoes: shadow of valentia | 3DS | 2017 |
| night in the woods | PC | 2017 |
| phoenix wright: ace attorney | NDS | 2005 |
| deus ex: mankind divided | PC | 2016 |
| etrian odyssey v: beyond the myth | 3DS | 2017 |
| backburner | ||
| overwatch | PC | 2016 |
| mass effect: andromeda | PC | 2017 |
| the wolf among us | PC | 2013 |
| hotel dusk: room 215 | EMU DS | 2007 |


| Interface | Description |
|---|---|
| LogChute |
Base interface that logging systems need to implement.
|
| LogSystem | Deprecated
Use LogChute instead!
|
| Class | Description |
|---|---|
| AvalonLogChute |
Implementation of a Avalon logger.
|
| AvalonLogSystem |
Implementation of a Avalon logger.
|
| CommonsLogLogChute |
Redirects Velocity's LogChute messages to commons-logging.
|
| JdkLogChute |
Implementation of a simple java.util.logging LogChute.
|
| Log |
Convenient wrapper for LogChute functions.
|
| Log4JLogChute |
Implementation of a simple log4j system that will either latch onto
an existing category, or just do a simple rolling file log.
|
| Log4JLogSystem | Deprecated
Use Log4JLogChute instead.
|
| LogChuteSystem |
Wrapper to make user's custom LogSystem implementations work
with the new LogChute setup.
|
| LogDisplayWrapper |
This is a wrapper around a log object, that can add a prefix to log messages
and also turn logging on and off dynamically.
|
| LogManager |
This class is responsible for instantiating the correct LogChute
|
| NullLogChute |
Logger used in case of failure.
|
| NullLogSystem | Deprecated
Use NullLogChute.
|
| PrimordialLogSystem | Deprecated
Use HoldingLogChute instead!
|
| RuntimeLoggerLog | Deprecated
This will be removed along with the RuntimeLogger interface.
|
| ServletLogChute |
Simple wrapper for the servlet log.
|
| SimpleLog4JLogSystem | Deprecated
Use Log4JLogChute instead.
|
| SystemLogChute |
Logger used when no other is configured.
|
| VelocityFormatter |
Copyright © 2022. All rights reserved.


| DOSE: |
|
insufflated |
Cocaine |
(powder / crystals) |
My first use was in ’79. My last was this past Saturday night.My next? It took some time. I've never been in Rehab, but I’ve been with many friends who were, listening to them as they progressed through the program.
I first chose to do two lines on New Years in ’79. I was 18. On and off use for the last 20. I always noticed the correlation between usage and difficult or stressful periods in my life. I traded the knowledge of the experience for respect of the consequences, and decided early on not to freebase, or use crack (which was engineered to facilitate compulsive use and therefore profit-know this and be aware of it) or take intravenously to “more economically use the substance”.
Many would see me as a failure for using at all, many would see my experience as a success for not compromising my sober judgment for the “pleasure” of the using substance to the point of measureable negative effect(I realise this is individualy subjective, and open for debate, but I stand by that statement).
There is no “success” with Coke, it is what it is to each individual. It’s a tool, an accessory, that allows me to alter my mind.
Coke is like fire, it’s not “evil”, it just is what it does, like any inanimate combination of atoms. Fire is a tool, it can be positive. But change a few small variables and fire can destroy anything and everything. Common experience has set up many universals or “rules” regarding fire safety, yet fire kills and destroys people and property every day, through negligence or circumstance. There are many universals regarding cocaine and its use yet physically and socially it can destroy anything and everything.
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.


Cool Chinese Tattoo
Mobile App for both Iphone and Android devices
Calligraphic Chinese Tattoo Creator for Kanji Tattoo Lovers For each English word user queries, the application will provide more than 10 cool Chinese Calligraphic patterns for user to pick. Those Calligraphic fonts cover a span from ancient Chinese arts to morden font designs. It will help you to find the Chinese characters which matches your other tattoos or your personality. This application also gives warnings to the common words with bad meanings only in Chinese culture.
Features
Chinese Calligraphic design
English to Chinese translate
Cultural bad meaning warning
For questions and support, please send Email to<EMAIL_ADDRESS>Design by TemplateWorld


What is your site's primary goal or purpose? What kind of content will your site feature? I would like to introduce people to me and some of my interests. I do a lot of research on topics that I am interested in and I think it may be cool for other to read about my reflections to articles that I find and other topics that I think are interesting.
What is your target audience's interests and how do you see your site addressing them? I think that my target audience would be my friends and people that I know in tech. These are the people that I think would want to read about me. The site is about me, so...
What is the primary "action" the user should take when coming to your site? Do you want them to search for information, contact you, or see your portfolio? It's ok to have several actions at once, or different actions for different kinds of visitors. I want the user to select a topic from the the home page which organizes information that I am interested in. The user should then browse the subtopics under their choice and navigate into a folder with an article that they might find interesting to red about it.
What are the main things someone should know about design and user experience? Design I think is just doing the research so that your product will do the job it was designed to do. A lot of products that are pushed out are not user friendly although they are designed with the user in mind!? User experience takes into account the way that the end user tkes in and s able to find the information presented to them through the design.
What is user experience design and why is it valuable? User experience is how a person feels when using a product. Grea design may lead to a positive emotional experience while bad design will likely lead to a poor user experience.
Which parts of the challenge did you find tedious? I thought all parts of the challenge were useful for my learning.


Branch
git clone
https://github.com/eBay/YiDB.git
to see
the scripts behind all the
examples on this site.
Query branches
Use following query to list all branches in CMS.
GET /repositories/raptor-paas/branches
Query given branches
Use following query to list given branches in CMS.
GET /repositories/raptor-paas/branches/main
Create a branch
Create a branch in CMS.
POST /repositories/reptor-paas/branches { "name" : "branch_11", "branchtype" : "sub", "parent_branch" : "c84feba0-8ef8-11e1-b0c4-0800200c9a66", "transaction" : "yes" }
Commit a branch
Commit a branch in CMS.
POST /repositories/reptor-paas/branches/main { "name" : "branch_11", "branchtype" : "sub", "parent_branch" : "c84feba0-8ef8-11e1-b0c4-0800200c9a66", "transaction" : "yes" }
Abort a branch
Abort a branch in CMS.
DELETE /repositories/raptor-paas/branches/main


Learn Anywhere at Anytime
Work on practical projects, build experience, and advance your skillset as you learn.
This course starts on 17 May and runs for 8 weeks.
Understand the laws of physics with a top-rated faculties.
This course starts on 8 September and runs for 12 weeks.
Focusing on logical reasoning and rigorous arguments so that students will substantiate their ideas and theories with solid foundations.
This course starts on 17 September and runs for 4 weeks.
Chemistry is the study of matter: its composition, properties, and reactivity.
This course starts on 8 September and runs for 12 weeks.
Improve your drawing skills with free online drawing courses.
This course starts on 17 May and runs for 8 weeks.
Learn HTML From Scratch While Designing And Coding Your Own Project Step-by-step.
This course starts on 1 January and runs for 8 weeks.
Full intro of subject, background information. Just Register and Click 'Join' button and get connected to any channels.
Learn everything from hundreds of faculties available on the portal. Don't be a hostage to just one learning platforms.
Just drop the channel names into the page, and get connected with your professors - no technical skills required.
E-Classrooms offers several features that include online video classes, notes, article blocks and many more.
E-Classroom gives you the freedom to learn as many courses as you like given the fact that it is a desktop app.
Share this page:


Home
About
Posts
Workshops
Contact
Whoops, whatever you're looking for isn't here.
We broke this page, or it doesn't exist
Home


In 2004, John Lennon was selected as the "50 of the greatest pop musicians in history" from the Rolling Stone magazine.
Here's a time line of John Lennon's album:
1968 - UNFINISHED MUSIC NO.1: TWO VIRGINS
1969 - WEDDING ALBUM
1970 - John Lennon & the Plastic ONO BAND
1971 - Imagine
1972 - SOMETIME IN NEW YORK CITY
1973 - MIND GAMES
1974 - WALLS AND BRIDGES
1975 - ROCK AND ROLL
1980 - Double Fantasy
1984 - milk and honey
1986 - Menlove Ave
"No matter what his soul is, John Lennon is probably the best singer who can turn his music into a cultural heritage. His performance has far exceeded that of music itself, and has become an attitude and an interpretation of ISM."
If you have time, you should read more about this incredible human being on his Wikipedia entry.


My Profile
My name is Ekaterina.
I live in Brussels.
I'm a student of HackYourFutureBE school
My Repositories
My Issues
My Commits


Hello World
26 Jan 2017So the year is 2017 and AI has already taken over the world… It controlls the evolution of the human species and chooses the leader of the free world among others. No joke, I’m serious, think about it. An AI that builds our Tinder feed is basically deciding who we have our kids with and hence ultimately controlling the evolution of the human species. Another AI - Google, controlls what information we see by controlling our search results and hence controlls our opinions and knowledge about politics hence choosing the leader of the free world - POTUS. And this is just the tip of the iceberg. Today in 2017, I can’t evening begin to list the things that an AI controlls for me - it’s just everwhere.
Okay so I wandered off there, coming back to myself - Hi there! I am Utkarsh Bansal and I’m currently pursuing my
bachelor’s degree in Computer Science and Technology. This, here is my first blog post. I never thought that I’ll setup
a blog but here I am with Jekyll. Jekyll
is, in my opion quite cool. It got me blogging in no time and still gves me
complete controll over the blog. Best of all - its hosted on Github Pages and doesn’t need a database, so I don’t
have to remember another password and I don’t need to manage another server.
Thats all for now, I’ll keep wiritng every now and then.


Hello there, awesome person!
Explore my Coffeeshop
Hello, Everyone
Really Excited to look forward for your response
Good to see you all, I'm glad to invite all to my new coffeeshop.
You will experience great coffee and you will never forget the aroma.
- Professionals
- Business people
- Investors
- Media and Reports
- This is a link to GitHub!
- Family
- Friends
- couples
- kids


Guabao is implemented and maintained by Shin-Cheng Mu, Ting-Yan Lai, and Thing-Han Lim in Institute of Information Science, Academia Sinica, Taiwan.
Guabao is still under development — everything may change or break tomorrow! We welcome bug reports, feature requests, and other suggestions. Feel free to submit them as issues through the GitHub repositories (frontend|backend), or contact the authors by email at scm [AT] iis.sinica.edu.tw
.


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 12-15
Dietary
Take gold in cake-baking with this stunning re-creation of the velodrome in cake - cycling fans will be delighted.
Thoroughly grease and line the base of a 24cm/10in savarin tin. Preheat the oven to 180C/350F/Gas 4.
Cream the butter and sugar together in a bowl until pale and fluffy. Beat in the eggs, a little at a time, and stir in the espresso. Fold in the flour using a large metal spoon.
Spoon the mixture into the prepared tin and level with a back of spoon or spatula. Bake in the oven for 40-45 minutes or until a skewer inserted into the cake comes out clean. Check the cake after 30 minutes and if you feel the cake is taking on too much colour before it is ready cover it with parchment paper or foil.
Leave to cool in the tin. When cool enough to handle gently ease out of the tin.
When the cake is completely cold. Using a knife to make small surface cuts, mark a circle on the top of the cake about 2cm from the inside edge. Also mark a line inside the inner edge about 3cm down from the top. Now carefully cut from one mark to the other to create a slope.
To make the coffee icing, mix the sifted icing sugar with the coffee and beat until smooth.  If it's too thin add a little more sifted icing sugar, if it's too thick add a few more drops of water. Remember to do it little by little.
When you are happy with the consistency of the icing, start to cover your cake. You want to completely cover the inside edge but only have drizzles on the outside. Once the coffee icing is set, make the white icing in the same way as above. Spoon into a piping bag and pipe three lines around the inside edge to represent the lanes.
Buy a few cyclist or runner figurines (available online) and fix on a slight angle to represent the speed of the velodrome.


Welcome to the Angular 11 Microfrontend demo using Webpack 5 Module Federation
This component is part of the shell application, the Profile component that is linked from the `Profile` link at the top is a Microfrontend that is remotely loaded into the application. Check the network settings to see the remote being loaded.


Students with Down syndrome have strong visual learning modalities. Teaching reading to students with Down syndrome should be characterised by a strong emphasis on visual learning. Visual demonstrations, pictures and illustrations can also be successfully used to assist in providing effective instruction in other subject areas of the curriculum.


Project 1 on Machine Learning, deadline October 9 (midnight), 2023
Contents
Project 1 on Machine Learning, deadline October 9 (midnight), 2023¶
Data Analysis and Machine Learning FYS-STK3155/FYS4155, University of Oslo, Norway
Date: September 3
Regression analysis and resampling methods¶
The main aim of this project is to study in more detail various regression methods, including the Ordinary Least Squares (OLS) method. In addition to the scientific part, in this course we want also to give you an experience in writing scientific reports. The format for the delivery of your answers is namely that of a scientific report. At for example https://github.com/CompPhysics/MachineLearning/blob/master/doc/Projects/EvaluationGrading/EvaluationForm.md we detail how to write a report. Furthermore, at https://github.com/CompPhysics/MachineLearning/blob/master/doc/Projects/ReportExample/ you can find examples of previous reports. How to write reports will also be discussed during the various lab sessions.
A small recommendation when developing the codes here. Instead of jumping on to the two-dimensional function described below, we recommend to do the code development and testing with a simpler one-dimensional function, similar to those discussed in the exercises of weeks 35 and 36. A simple test, as discussed during the lectures the first two weeks is to set the design matrix equal to the identity matrix. Then your model should give a mean square error which is exactly equal to zero. When you are sure that your codes function well, you can then replace the one-dimensional test function with the two-dimensional Franke function discussed here.
The Franke function serves as a stepping stone towards the analysis of real topographic data. The latter is the last part of this project.
Description of two-dimensional function¶
We will first study how to fit polynomials to a specific two-dimensional function called Franke’s function. This is a function which has been widely used when testing various interpolation and fitting algorithms. Furthermore, after having established the model and the method, we will employ resamling techniques such as cross-validation and/or bootstrap in order to perform a proper assessment of our models. We will also study in detail the so-called Bias-Variance trade off.
The Franke function, which is a weighted sum of four exponentials reads as follows
The function will be defined for \(x,y\in [0,1]\). In a sense, our data are thus scaled to a particular domain for the input values.
Our first step will be to perform an OLS regression analysis of this function, trying out a polynomial fit with an \(x\) and \(y\) dependence of the form \([x, y, x^2, y^2, xy, \dots]\). We will also include bootstrap first as a resampling technique. After that we will include the cross-validation technique.
We can use a uniform distribution to set up the arrays of values for \(x\) and \(y\), or as in the example below just a set of fixed values for \(x\) and \(y\) with a given step size. We will fit a function (for example a polynomial) of \(x\) and \(y\). Thereafter we will repeat much of the same procedure using the Ridge and Lasso regression methods, introducing thus a dependence on the bias (penalty) \(\lambda\).
Finally we are going to use (real) digital terrain data and try to reproduce these data using the same methods. We will also try to go beyond the second-order polynomials metioned above and explore which polynomial fits the data best.
The Python code for the Franke function is included here (it performs also a three-dimensional plot of it)
%matplotlib inline
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import numpy as np
from random import random, seed
fig = plt.figure()
ax = fig.gca(projection='3d')
# Make data.
x = np.arange(0, 1, 0.05)
y = np.arange(0, 1, 0.05)
x, y = np.meshgrid(x,y)
def FrankeFunction(x,y):
term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
return term1 + term2 + term3 + term4
z = FrankeFunction(x, y)
# Plot the surface.
surf = ax.plot_surface(x, y, z, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
# Customize the z axis.
ax.set_zlim(-0.10, 1.40)
ax.zaxis.set_major_locator(LinearLocator(10))
ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
# Add a color bar which maps values to colors.
fig.colorbar(surf, shrink=0.5, aspect=5)
plt.show()
/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_19350/39730396.py:11: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().
ax = fig.gca(projection='3d')
Part a) : Ordinary Least Square (OLS) on the Franke function¶
We will generate our own dataset for a function \(\mathrm{FrankeFunction}(x,y)\) with \(x,y \in [0,1]\). The function \(f(x,y)\) is the Franke function. You should explore also the addition of an added stochastic noise to this function using the normal distribution \(N(0,1)\).
Write your own code (using either a matrix inversion or a singular value decomposition from e.g., numpy ) and perform a standard ordinary least square regression analysis using polynomials in \(x\) and \(y\) up to fifth order.
Evaluate the mean Squared error (MSE)
and the \(R^2\) score function. If \(\tilde{\boldsymbol{y}}_i\) is the predicted value of the \(i-th\) sample and \(y_i\) is the corresponding true value, then the score \(R^2\) is defined as
where we have defined the mean value of \(\boldsymbol{y}\) as
Plot the resulting scores (MSE and R\(^2\)) as functions of the polynomial degree (here up to polymial degree five). Plot also the parameters \(\beta\) as you increase the order of the polynomial. Comment your results.
Your code has to include a scaling/centering of the data (for example by subtracting the mean value), and a split of the data in training and test data. For this exercise you can either write your own code or use for example the function for splitting training data provided by the library Scikit-Learn (make sure you have installed it). This function is called \(train\_test\_split\). You should present a critical discussion of why and how you have scaled or not scaled the data.
It is normal in essentially all Machine Learning studies to split the data in a training set and a test set (eventually also an additional validation set). There is no explicit recipe for how much data should be included as training data and say test data. An accepted rule of thumb is to use approximately \(2/3\) to \(4/5\) of the data as training data.
You can easily reuse the solutions to your exercises from week 35 and week 36. See also the lecture slides from week 35 and week 36.
Part b): Adding Ridge regression for the Franke function¶
Write your own code for the Ridge method, either using matrix inversion or the singular value decomposition as done in the previous exercise. The lecture notes from week 35 and 36 contain more information. Furthermore, the numerical exercise from week 36 is something you can reuse here.
Perform the same analysis as you did in the previous exercise but now for different values of \(\lambda\). Compare and analyze your results with those obtained in part a) with the ordinary least squares method. Study the dependence on \(\lambda\).
Part c): Adding Lasso for the Franke function¶
This exercise is essentially a repeat of the previous two ones, but now with Lasso regression. Write either your own code (difficult and optional) or, in this case, you can also use the functionalities of Scikit-Learn (recommended). Keep in mind that the library Scikit-Learn excludes the intercept by default. Give a critical discussion of the three methods and a judgement of which model fits the data best.
Part d): Paper and pencil part¶
This exercise deals with various mean values and variances in linear regression method (here it may be useful to look up chapter 3, equation (3.8) of Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer). The exercise is also part of the weekly exercises for week 37.
The assumption we have made is that there exists a continuous function \(f(\boldsymbol{x})\) and a normal distributed error \(\boldsymbol{\varepsilon}\sim N(0, \sigma^2)\) which describes our data
We then approximate this function \(f(\boldsymbol{x})\) with our model \(\boldsymbol{\tilde{y}}\) from the solution of the linear regression equations (ordinary least squares OLS), that is our function \(f\) is approximated by \(\boldsymbol{\tilde{y}}\) where we minimized \((\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\), with
The matrix \(\boldsymbol{X}\) is the so-called design or feature matrix.
Show that the expectation value of \(\boldsymbol{y}\) for a given element \(i\)
and that its variance is
Hence, \(y_i \sim N( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta}, \sigma^2)\), that is \(\boldsymbol{y}\) follows a normal distribution with mean value \(\boldsymbol{X}\boldsymbol{\beta}\) and variance \(\sigma^2\).
With the OLS expressions for the optimal parameters \(\boldsymbol{\hat{\beta}}\) show that
Show finally that the variance of \(\boldsymbol{\beta}\) is
We can use the last expression when we define a so-called confidence interval for the parameters \(\beta\). A given parameter \(\beta_j\) is given by the diagonal matrix element of the above matrix.
Part e): Bias-variance trade-off and resampling techniques¶
Our aim here is to study the bias-variance trade-off by implementing the bootstrap resampling technique. We will only use the simpler ordinary least squares here.
With a code which does OLS and includes resampling techniques, we will now discuss the bias-variance trade-off in the context of continuous predictions such as regression. However, many of the intuitions and ideas discussed here also carry over to classification tasks and basically all Machine Learning algorithms.
Before you perform an analysis of the bias-variance trade-off on your test data, make first a figure similar to Fig. 2.11 of Hastie, Tibshirani, and Friedman. Figure 2.11 of this reference displays only the test and training MSEs. The test MSE can be used to indicate possible regions of low/high bias and variance. You will most likely not get an equally smooth curve!
With this result we move on to the bias-variance trade-off analysis.
Consider a dataset \(\mathcal{L}\) consisting of the data \(\mathbf{X}_\mathcal{L}=\{(y_j, \boldsymbol{x}_j), j=0\ldots n-1\}\).
As in part d), we assume that the true data is generated from a noisy model
Here \(\epsilon\) is normally distributed with mean zero and standard deviation \(\sigma^2\).
In our derivation of the ordinary least squares method we defined then an approximation to the function \(f\) in terms of the parameters \(\boldsymbol{\beta}\) and the design matrix \(\boldsymbol{X}\) which embody our model, that is \(\boldsymbol{\tilde{y}}=\boldsymbol{X}\boldsymbol{\beta}\).
The parameters \(\boldsymbol{\beta}\) are in turn found by optimizing the mean squared error via the so-called cost function
Here the expected value \(\mathbb{E}\) is the sample value.
Show that you can rewrite this in terms of a term which contains the variance of the model itself (the so-called variance term), a term which measures the deviation from the true data and the mean value of the model (the bias term) and finally the variance of the noise. That is, show that
with
and
The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37. Explain what the terms mean and discuss their interpretations.
Perform then a bias-variance analysis of the Franke function by studying the MSE value as function of the complexity of your model.
Discuss the bias and variance trade-off as function of your model complexity (the degree of the polynomial) and the number of data points, and possibly also your training and test data using the bootstrap resampling method. You can follow the code example in the jupyter-book at https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter3.html#the-bias-variance-tradeoff.
Part f): Cross-validation as resampling techniques, adding more complexity¶
The aim here is to write your own code for another widely popular resampling technique, the so-called cross-validation method.
Implement the \(k\)-fold cross-validation algorithm (write your own code) and evaluate again the MSE function resulting from the test folds. You can compare your own code with that from Scikit-Learn if needed.
Compare the MSE you get from your cross-validation code with the one you got from your bootstrap code. Comment your results. Try \(5-10\) folds. You can also compare your own cross-validation code with the one provided by Scikit-Learn.
In addition to using the ordinary least squares method, you should include both Ridge and Lasso regression.
Part g): Analysis of real data¶
With our codes functioning and having been tested properly on a simpler function we are now ready to look at real data. We will essentially repeat in this exercise what was done in exercises a-f. However, we need first to download the data and prepare properly the inputs to our codes. We are going to download digital terrain data from the website https://earthexplorer.usgs.gov/,
Or, if you prefer, we have placed selected datafiles at https://github.com/CompPhysics/MachineLearning/tree/master/doc/Projects/2023/Project1/DataFiles
In order to obtain data for a specific region, you need to register as a user (free) at this website and then decide upon which area you want to fetch the digital terrain data from. In order to be able to read the data properly, you need to specify that the format should be SRTM Arc-Second Global and download the data as a GeoTIF file. The files are then stored in tif format which can be imported into a Python program using
scipy.misc.imread
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 scipy.misc.imread
NameError: name 'scipy' is not defined
Here is a simple part of a Python code which reads and plots the data from such files
import numpy as np
from imageio import imread
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
# Load the terrain
terrain1 = imread('SRTM_data_Norway_1.tif')
# Show the terrain
plt.figure()
plt.title('Terrain over Norway 1')
plt.imshow(terrain1, cmap='gray')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()
If you should have problems in downloading the digital terrain data, we provide two examples under the data folder of project 1. One is from a region close to Stavanger in Norway and the other Møsvatn Austfjell, again in Norway. Feel free to produce your own terrain data.
Alternatively, if you would like to use another data set, feel free to do so. This could be data close to your reseach area or simply a data set you found interesting. See for example kaggle.com for examples.
Our final part deals with the parameterization of your digital terrain data (or your own data). We will apply all three methods for linear regression, the same type (or higher order) of polynomial approximation and cross-validation as resampling technique to evaluate which model fits the data best.
At the end, you should present a critical evaluation of your results and discuss the applicability of these regression methods to the type of data presented here (either the terrain data we propose or other data sets).
Background literature¶
For a discussion and derivation of the variances and mean squared errors using linear regression, see the Lecture notes on ridge regression by Wessel N. van Wieringen
The textbook of Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer, chapters 3 and 7 are the most relevant ones for the analysis here.
Introduction to numerical projects¶
Here follows a brief recipe and recommendation on how to answer the various questions when preparing your answers.
Give a short description of the nature of the problem and the eventual numerical methods you have used.
Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself.
Include the source code of your program. Comment your program properly. You should have the code at your GitHub/GitLab link. You can also place the code in an appendix of your report.
If possible, try to find analytic solutions, or known limits in order to test your program when developing the code.
Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.
Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc.
Try to give an interpretation of you results in your answers to the problems.
Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts you’ve made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.
Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don’t properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.
Format for electronic delivery of report and programs¶
The preferred format for the report is a PDF file. You can also use DOC or postscript formats or as an ipython notebook file. As programming language we prefer that you choose between C/C++, Fortran2008, Julia or Python. The following prescription should be followed when preparing the report:
Use Canvas to hand in your projects, log in at https://www.uio.no/english/services/it/education/canvas/ with your normal UiO username and password.
Upload only the report file or the link to your GitHub/GitLab or similar typo of repos! For the source code file(s) you have developed please provide us with your link to your GitHub/GitLab or similar domain. The report file should include all of your discussions and a list of the codes you have developed. Do not include library files which are available at the course homepage, unless you have made specific changes to them.
In your GitHub/GitLab or similar repository, please include a folder which contains selected results. These can be in the form of output from your code for a selected set of runs and input parameters.
Finally, we encourage you to collaborate. Optimal working groups consist of 2-3 students. You can then hand in a common report.
Software and needed installations¶
If you have Python installed (we recommend Python3) and you feel pretty familiar with installing different packages, we recommend that you install the following Python packages via pip as
pip install numpy scipy matplotlib ipython scikit-learn tensorflow sympy pandas pillow
For Python3, replace pip with pip3.
See below for a discussion of tensorflow and scikit-learn.
For OSX users we recommend also, after having installed Xcode, to install brew. Brew allows for a seamless installation of additional software via for example
brew install python3
For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution you can use pip as well and simply install Python as
sudo apt-get install python3 (or python for python2.7)
etc etc.
If you don’t want to install various Python packages with their dependencies separately, we recommend two widely used distrubutions which set up all relevant dependencies for Python, namely
Anaconda Anaconda is an open source distribution of the Python and R programming languages for large-scale data processing, predictive analytics, and scientific computing, that aims to simplify package management and deployment. Package versions are managed by the package management system conda
Enthought canopy is a Python distribution for scientific and analytic computing distribution and analysis environment, available for free and under a commercial license.
Popular software packages written in Python for ML are
PyTorch and
These are all freely available at their respective GitHub sites. They encompass communities of developers in the thousands or more. And the number of code developers and contributors keeps increasing.


WITNESS LIST Juvenile Justice & Family Issues Committee March 15, 1999-1:00P HB 16 For: Green, Jr., Robert L. (Self and Texas Fathers Alliance) Against: Gagnon, Stewart W. (Self) On: Sampson, John J. (Self) Streater, Joy (Self) Registering, but not testifying: For: Cheng, Albert (Free Trade Committee) HB 169 For: Green, Jr., Robert L. (Self and Texas Fathers Alliance) HB 350 For: Graglia, F. Carolyn (Self) Hollingshead, Jan D. (Self) Karam, Ernest (Self) Negron, Jr., Victor H. (Self) Perkins, Rep. Tony (Self and Louisianna State Legislature) Shackelford, Kelly (Self and Free Market Foundation) Spaht, Katherine (Self and Jules F. and Francis L. Landry) Whitewood, Angela (Self) Against: Noble, Shannon (Texas Women Lawyers) On: Green, Jr., Robert L. (Self and Texas Fathers Alliance) Registering, but not testifying: For: Casanova, Jr., Roy V. (Republican National Hispanic Assembly) Cheng, Albert (Free Market Committee) Hollingshead, Dr. Stephen B. (Self) Keenan, James C. (Self) On: Harris, Geraldine R. (Texas Dept. of Health, Vital Statistics) HB 988 Registering, but not testifying: For: Green, Jr., Robert L. (Self and Texas Fathers Alliance) HB 1006 On: Childress, Charles (Self and Texas Department of Protective and Regulatory Services) Sampson, John J. (Self) HB 1175 Registering, but not testifying: For: Streater, Joy (Self) HB 1462 For: Green, Jr., Robert L. (Self and Texas Fathers Alliance) Shinder, James (Self) HB 1723 For: Morgan, James E. (Self and 220th Judicial District) HB 2124 For: Balli, Roberto (Self and Webb County District Attorney) Welsh, Sr. Rosemary (Webb County Domestic Violence) Against: Green, Jr., Robert L. (Self and Texas Fathers Alliance) Registering, but not testifying: For: Buchanan, Bree (Texas Council on Family Violence) Noble, Shannon (Texas Council on Family Violence) HB 2142 On: Sampson, John L. (Self) Registering, but not testifying: Against: Gagnon, Stewart W. (Self) HB 2208 For: Montague, David (Children's Advocacy Centers of Texas) HB 2353 On: Green, Jr., Robert L. (Self and Texas Fathers Association) Sampson, John L. (Self) HB 2354 For: Groomer, Cindy (Self and County and District Clerks of Texas and Texas Association of Child Support Registries) On: Baldwin, Jr., Howard G. (Office of the Attorney General) Registering, but not testifying: For: Elfant, Constable Bruce (Self) Henbrick, Margaret (County and District Court Association) Kamm, Bob (Travis County Commisioners Court on behalf of Travis County) Uecker, Linda (County and District Clerk's Association of Texas)


PeerRisk was a game that I wrote because I hated that every time I played Risk with my freinds, we never were able to finish the game. PeerRisk allows you to play at your own rate, and even save your game, so that you never have to clean up before winning.
| Servers |
|---|
| Foo |
Loading online games....
| Games | Test Game 1 |


File: lib/draft-js/editOnInput.js
/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule editOnInput * */ 'use strict'; var isNode = require('itsa-utils').isNode; var DraftModifier = require('./DraftModifier'); var DraftOffsetKey = require('./DraftOffsetKey'); var EditorState = require('./EditorState'); var Entity = require('./DraftEntity'); var UserAgent = isNode || require('fbjs/lib/UserAgent'); var findAncestorOffsetKey = require('./findAncestorOffsetKey'); var nullthrows = require('fbjs/lib/nullthrows'); var isGecko = !isNode && UserAgent.isEngine('Gecko'); var DOUBLE_NEWLINE = '\n\n'; /** * This function is intended to handle spellcheck and autocorrect changes, * which occur in the DOM natively without any opportunity to observe or * interpret the changes before they occur. * * The `input` event fires in contentEditable elements reliably for non-IE * browsers, immediately after changes occur to the editor DOM. Since our other * handlers override or otherwise handle cover other varieties of text input, * the DOM state should match the model in all controlled input cases. Thus, * when an `input` change leads to a DOM/model mismatch, the change should be * due to a spellcheck change, and we can incorporate it into our model. */ function editOnInput() { var domSelection = (window && window.getSelection && window.getSelection()) || {}; var anchorNode = domSelection.anchorNode; var isCollapsed = domSelection.isCollapsed; if (anchorNode.nodeType !== Node.TEXT_NODE) { return; } var domText = anchorNode.textContent; var editorState = this.props.editorState; var offsetKey = nullthrows(findAncestorOffsetKey(anchorNode)); var _DraftOffsetKey$decode = DraftOffsetKey.decode(offsetKey); var blockKey = _DraftOffsetKey$decode.blockKey; var decoratorKey = _DraftOffsetKey$decode.decoratorKey; var leafKey = _DraftOffsetKey$decode.leafKey; var _editorState$getBlockTree$getIn = editorState.getBlockTree(blockKey).getIn([decoratorKey, 'leaves', leafKey]); var start = _editorState$getBlockTree$getIn.start; var end = _editorState$getBlockTree$getIn.end; var content = editorState.getCurrentContent(); var block = content.getBlockForKey(blockKey); var modelText = block.getText().slice(start, end); // Special-case soft newlines here. If the DOM text ends in a soft newline, // we will have manually inserted an extra soft newline in DraftEditorLeaf. // We want to remove this extra newline for the purpose of our comparison // of DOM and model text. if (domText.endsWith(DOUBLE_NEWLINE)) { domText = domText.slice(0, -1); } // No change -- the DOM is up to date. Nothing to do here. if (domText === modelText) { return; } var selection = editorState.getSelection(); // We'll replace the entire leaf with the text content of the target. var targetRange = selection.merge({ anchorOffset: start, focusOffset: end, isBackward: false }); var entityKey = block.getEntityAt(start); var entity = entityKey && Entity.get(entityKey); var entityType = entity && entity.getMutability(); var preserveEntity = entityType === 'MUTABLE'; // Immutable or segmented entities cannot properly be handled by the // default browser undo, so we have to use a different change type to // force using our internal undo method instead of falling through to the // native browser undo. var changeType = preserveEntity ? 'spellcheck-change' : 'apply-entity'; var newContent = DraftModifier.replaceText(content, targetRange, domText, block.getInlineStyleAt(start), preserveEntity ? block.getEntityAt(start) : null); var anchorOffset, focusOffset, startOffset, endOffset; if (isGecko) { // Firefox selection does not change while the context menu is open, so // we preserve the anchor and focus values of the DOM selection. anchorOffset = domSelection.anchorOffset; focusOffset = domSelection.focusOffset; startOffset = start + Math.min(anchorOffset, focusOffset); endOffset = startOffset + Math.abs(anchorOffset - focusOffset); anchorOffset = startOffset; focusOffset = endOffset; } else { // Browsers other than Firefox may adjust DOM selection while the context // menu is open, and Safari autocorrect is prone to providing an inaccurate // DOM selection. Don't trust it. Instead, use our existing SelectionState // and adjust it based on the number of characters changed during the // mutation. var charDelta = domText.length - modelText.length; startOffset = selection.getStartOffset(); endOffset = selection.getEndOffset(); anchorOffset = isCollapsed ? endOffset + charDelta : startOffset; focusOffset = endOffset + charDelta; } // Segmented entities are completely or partially removed when their // text content changes. For this case we do not want any text to be selected // after the change, so we are not merging the selection. var contentWithAdjustedDOMSelection = newContent.merge({ selectionBefore: content.getSelectionAfter(), selectionAfter: selection.merge({ anchorOffset: anchorOffset, focusOffset: focusOffset }) }); this.update(EditorState.push(editorState, contentWithAdjustedDOMSelection, changeType)); } module.exports = editOnInput;


Hello World!
This is my first web page for CS313!
Week 1
Week 2
Week 3
Week 4
Week 5
Week 6
Week 7
Week 8
Week 9
Week 10
Week 11
Week 12
Week 13
Week 14


To ensure the best match, follow these tips for taking the best picture
Click below to find the match to your unique skintone!
Description:


{{ type="fragment" src="fragments/shared-metadata.html" }}
{{ type="fragment" src="fragments/header.html" }}Jolla creates choice and diversity in the mobile ecosystem by providing an independent, alternative mobile operating system, called Sailfish OS.
Sailfish OS is important because it provides an ecosystem that is free from the privacy concerns of Google and its Android platform, the walled garden of Apple's iOS, and questionable ethics of Microsoft.
When I purchased my Jolla Phone in early 2014, the ecosystem was ripe with fantastic applications and using Sailfish OS further encouraged me to evaluate more of the online services I used on a daily basis. It enabled me to use a truly "People Powered" device and experience, with a team that is heavily involved in the community, taking in people's thoughts and ideas to create a truly personal experience.
When I had the opportunity to visit their office here in Tampere, Finland, you could really see that the values they speak of aren't just hollow words, they are instilled in every Sailor. Their values are unlike, their pride in where they are sailing and their mission is outright obvious, and love for the community is unquestionable.
Sometimes a boat needs fixing.
Jolla is currently undergoing financial difficulty and sadly has needed to temporarily lay off staff and file for debt restructuring. As a community, we can help fix their boat, by showing our support through the rocky waves and telling them that we support their endeavor for a truly independent mobile OS.


How to set up Twitter two-factor authentication without a phone number
by Peter CohenTwitter has supported two-factor authentication (2FA) for a while, but the service always required you to include a phone number as an auxiliary form of identification. Twitter has now changed its 2FA system to remove that dependency. Here’s how that works.
If you use Twitter, you should be using two-factor authentication (2FA). 2FA requires you to enter a password and use a secondary means of proving your identity: something you know – your password, with something you have, like a phone, security key, or authentication app.
Up until fairly recently, most systems, Twitter included, made that a phone number. The problem is that techniques like SIM swapping are on the rise, making it possible for bad actors to hijack phone numbers as a means of spoofing identity. In fact, this very thing happened to Twitter CEO Jack Dorsey a few months ago, which may explain the company’s decision to roll out this change for all users.
That makes sending a text to your phone less secure than it used to be. So Twitter’s engineers have removed the requirement for you to add a phone number to your Twitter account as a secondary means of identification.
Now you can use a mobile security authentication app instead. Google Authenticator, Authy, LastPass and others offer this functionality. These apps generate one-time passwords that stay in lock-step with a server using an algorithm.
Be advised that if you’re using a physical security key like the Yubikey, unfortunately you’ll still need to fall back on a mobile security authentication app, at least for now, according to Twitter security engineer Jared Miller. He explained in Tweet that physical security keys are not supported outside of Twitter’s Web interface, and acknowledged it’s an imperfect solution: “We know this might not be ideal but we’re going to keep working on it!”
Set up two-factor authentication on Twitter
1) Open Twitter in your Web browser.
2) Tap your account info in the upper left.
3) Tap Settings and Privacy.
4) Tap Account.
5) Tap Security.
6) Tap Two-factor authentication. Select the methods of two-factor authentication you’d prefer to use. Your choices are text message, authentication app and security key. Deactivate text message if you wish to remove your phone number from Twitter’s preferences.
Remove your phone number from Twitter preferences
From the account info screen:
1) Tap Settings and privacy.
2) Tap Account
3) Under Login and security, tap Phone.
4) Tap Delete phone number.
5) Tap Yes, delete to confirm.
Wrapping it up
Removing 2FA from a dependency on a phone number provides Twitter users with an additional element of security that will make it harder for bad actors to take over Twitter accounts using nefarious means like SIM swapping. This may not be something that everyone needs to worry about, but at least now Twitter is making the option available to those who need or want it.
Have you enabled this new security measure on your Twitter account? Do you think it’s necessary? Sound off in the comments – we want to hear from you.


Summary
Shoui Tzeng who enjoyed in Information Security, graduated at National Taiwan University Science of Technology Department of Information Management in 2018/7.
Live in New Taipei City, Taiwan, R.O.C.
Since 2018/9, I'm a Network Security Engineer at CHT Security in Taipei, Taiwan.
I love Japan♥, and I would like to work at Japan in the furture.
Skills
- Program language：Python、C#
- Security Skills：Vulnerability Scanning, Penetration Test、Basic Security Incident Response、Basic Forensic Analysis、Basic Malware Analysis
- Network Skills：Cisco, Firewall, IPS, WAF, BPS, Spirent
- Database: Mysql
- Web Design：HTML, CSS, Javascript
- Web Framework：Wordpress, Joomla
- Multi-media Design：Photoshop
- OS:UNIX, Mac OS, Windows
- Office Work:Word, Excel, PowerPoint
Experience
- 2015/9 - 2016/6 NCNU Webadmin
- 2016/9 - 2017/6 KPMG Security Engineer Intern
- 2017/3 - 2018/3 教育部資訊安全人才培育計畫 Ministry of Education – Information Security Incubation Program Webadmin
- 2018/9 - 2020/4 CHT Security Network Security Engineer
CVE-IDs
- Pending...
Certifications
- Pending...
Contact Information
- E-mail<EMAIL_ADDRESS>- Facebook: Shoui Tzeng
- Linkedin: Shoui


Take control of your picture on the web today
By uploading a photo of yourself, you can quickly determine everywhere on the internet that your image is being used. Our service scans the entire web so that you don't have to.Get Started Below!


We visualize services!
- expedite front-end eyeballs
- utilize open-source platforms
- productize value-added supply-chains
- maximize innovative systems
- revolutionize cutting-edge e-business
- deliver back-end paradigms
- reinvent strategic metrics
- implement web-enabled synergies


{{site.user_description}}
Familiar with Python and C/C++.Checkout my projects in "Projects" Section
Experienced in using Git and GitHub


§291C-23 Obedience to police officers. It shall be a petty misdemeanor for any person to wilfully fail or refuse to comply with any lawful order or direction of any police officer invested by law with authority to direct, control, or regulate traffic. [L 1971, c 150, pt of §1; am L 1978, c 222, §9]


Tom Davis
Senior Software Engineer
@photomoose
<EMAIL_ADDRESS>A change to implementation details breaks the tests.
Fixing broken tests is time consuming.
Confidence in the tests is lost.
Less inclined to clean the code.
This robs us of productivity...
...becomes expensive to maintain...
...and gives us a false sense of confidence.
What is the test telling us?
Is the test broken because the behaviour has changed?
Or is the implementation wrong?
Where is the behaviour expressed?
We're writing tests against classes and methods.
We're coupling our tests to our implementation details.
A unit test should test a unit of behaviour...
...NOT a unit of implementation (e.g. class/method).
A change in behaviour triggers the writing of a new test...
...NOT the creation of a new class or method.
“What behaviour will we need to produce the revised report?
Put another way, what set of tests, when passed, will demonstrate the presence of code we are confident will compute the report correctly?
We need to be able to add amounts in two different currencies and convert the result given a set of exchange rates.
We need to be able to multiply an amount.”
Unit tests should run in isolation from other tests...
...it is not the thing being tested that should be isolated.
TDD unit tests should target a use case or scenario...
...NOT individual classes or methods.
Unit tests should drive the development of new behaviour...
...their purpose is to indicate when the implementation fulfils the required behaviour.
They should not restrict you from refactoring the implementation.
Write a failing test which expresses the desired behaviour.
There are no tests for tests; a failing test proves the test works.
Prevents false positives when there is a failure condition.
Write quick and dirty implementation code to pass the test.
Do not think about good engineering practices, such as design patterns, SOLID or clean code.
Remove code duplication and code smells.
Refactor code to produce clean code, introduce design patterns, SOLID principles, etc.
Perform good engineering at this point.
Do NOT write new tests!
Tests should target the public API, NOT the internal classes.
Use access modifiers to mark non API classes as internal.
This will give us a smaller surface area, resulting in less, but more descriptive tests that express behaviour and intent.
[assembly:InternalsVisibleTo("TightlyCoupledTests")]
Sometimes it gets tricky...
...we might want to write tests to guide our internal classes to the solution.
This is OK...
...but consider deleting them once we go green.
“Never delete a test if it reduces your confidence in the behaviour of the system.”
“Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual runtime devices and databases.”
Do not mock internal collaborators.
Mock objects outside of the application boundary.
These typically produce non-deterministic results...
...return states that are difficult to reproduce...
...or are slow to execute (e.g. database)
Mock ports that are covered by other tests.
Mocks couple tests to implementation details.
Their use can make tests hard to read.
When implementation details change, the mocked behaviour needs to change.
[Test] public void When_Build_Is_Called_Behaviour_Is_Correct() { _viewModelBuilder.Build(_keysToImport); _mockFactory.Verify(x => x.Importers(_keysToImport), Times.Once()); _contentService .Verify(x=>x.GetHtmlContent(_importer.Object.Key), Times.Once()); _parser.Verify(x => x.Parse(null), Times.Once()); _importer.Verify(x=> x.Import(_legacyContent), Times.Once()); _logger .Verify(x => x.Info("Import of legacy html content: " + MiniBagKey + " successful"), Times.Once()); }
“Over-use of mock objects as part of a suite of unit tests can result in a dramatic increase in the amount of maintenance that needs to be performed on the tests themselves during system evolution as refactoring takes place.”
“If the behavior is not modelled correctly then the unit tests may register a pass even though a failure would occur at run time under the same conditions that the unit test is exercising, thus rendering the unit test inaccurate.”
Test a new behaviour, not a new class or method.
Write dirty code to pass the test, then refactor.
Do not write tests for extracted classes/methods.
Develop and accept against tests written on a port.
Integration tests confirm hookup of ports to adapters.
System tests provide end-to-end confidence.
Do not mock internals, privates or adapters.


Before Change
for i in range(nr_iters):
result = 2 * result - result * result * new_self
return result * self.signum()
elif method.lower() == "division":
ones = self * 0 + 1
return ones / self
elif method.lower() == "log":
After Change
for i in range(nr_iters):
result = 2 * result - result * result * new_self
return result * self.signum()
elif method == "newton":
// it is assumed here that input values are taken in [-20, 20]
x = None
C = 20
for i in range(80):
if x is not None:
y = C + 1 - self * (x * x)
x = y * x / C
else:
y = C + 1 - self
x = y / C
return x
elif method == "division":
ones = self * 0 + 1
return ones / self
elif method == "log":


Every developer knows that System Administrators can easily lose their temper and be a pain in the neck.  This is our homage to them and in particular to our own SysAdmins team leader at Realtime.
In this game you can unleash your Angry Admin and throw him to make damage to your opponent friends. Players lose when the rock falls over their cannons.
Every player has a game Id that identifies their game (4 letters). Give yours to your friends so they will be able to play with you. You may also invite your friends by inserting their game Ids.
This game acts as an example to show how you can use the Realtime® Framework to build a real-time multi-player mobile game. In this game we use both of the Realtime® Framework products: STORAGE (Realtime Cloud Storage for data persistence, like the scores) and MESSAGING (Realtime Cloud Messaging for the game real-time syncing between players). We also make use of Cocos2D (cocos2d-iphone is a framework for building 2D games) and Sprite Builder
For more details check the complete source code at GitHub and the development guide tutorial blog post.


Index
A B C D E F G H I L M N O P Q R S T U V W X Y Z
All Classes All Packages
All Classes All Packages
All Classes All Packages
R
- RawObj - Interface in it.polimi.ingsw.view.model
-
Interface manage data and user readability
- receiver - Variable in class it.polimi.ingsw.view.socket.Connection
-
Receiver
- reportAction(GamePhase, Action[][][]) - Method in class it.polimi.ingsw.controller.CommandConverter
-
Create an Arraylist of Command with Player Action Info
- ReportAction - Class in it.polimi.ingsw.model
- ReportAction(StatusPlayer) - Constructor for class it.polimi.ingsw.model.ReportAction
-
Report actions
- ReportAction(StatusPlayer, God) - Constructor for class it.polimi.ingsw.model.ReportAction
-
Report actions
- reportBoard(GamePhase, Cell[][], String) - Method in class it.polimi.ingsw.controller.CommandConverter
-
Create an Arraylist of Command with Board Info
- reportPlayer(GamePhase, ArrayList<Player>) - Method in class it.polimi.ingsw.controller.CommandConverter
-
Create an Arraylist of Command with Players Info
- reSet() - Method in class it.polimi.ingsw.view.GUI.Board
-
Reload the board for all players
- reSet() - Method in class it.polimi.ingsw.view.GUI.ChooseGod
-
Reload the board for all players
- reSet() - Method in interface it.polimi.ingsw.view.GUI.Controller
-
Reload the board for all players
- reSet() - Method in class it.polimi.ingsw.view.GUI.InitialPageController
-
Reload the board for all players
- resetAction() - Method in class it.polimi.ingsw.view.GUI.ChooseGod
-
Receive all available gods from server and shows to all players
- resetAction(boolean) - Method in class it.polimi.ingsw.model.IslandBoard
-
Reset available actions with priority (MUST, MAY ...)
- resetPlayerInfo() - Method in class it.polimi.ingsw.view.GUI.ChooseGod
-
Receive player's information from server (Current player, player's turn, ecc) and shows to players
- resources - Variable in class it.polimi.ingsw.view.GUI.InitialPageController
- reStart() - Method in class it.polimi.ingsw.view.GUI.AppGUI
-
Restart
- run() - Method in class it.polimi.ingsw.server.Connection
-
Socket run
- run() - Method in class it.polimi.ingsw.server.Server
-
Server run
- run() - Method in class it.polimi.ingsw.utils.Pinger
-
Run Pinger, ping the target observer each 10s
- run() - Method in class it.polimi.ingsw.view.GUI.AppGUI
-
Run client's GUI
- run() - Method in class it.polimi.ingsw.view.socket.Connection
-
Function to handle push data from server, then notify to all observers of this connection
- runExecutor - Variable in class it.polimi.ingsw.server.Server
-
Executor
All Classes All Packages


{% extends "base_email.html" %} {% block content %}
Someone changed information from your WiNRepo account. If it was not you, please reply to this e-mail.


Face'in Yüzleri
Face'in Yüzleri
by
Murat Tatar
.


Frequently I hear my peers deliberating on how they can score some dexedrine, adderall or ritalin.

Why?

Sounds crazy, but in my experience it happens more often than you would think.
Amphetamine based stimulants, along with methylphenidate, are the new study drug of choice for university students, and have easily unseated caffiene from its throne.
Does it live up to the hype?
The one sure thing about pharmacology is that different people can experience different reactions from a drug.
I could be a minority in my experience, but I felt I would voice my opinion on the efficiency of these drugs for academics so that people can better decide if they really are the universal wonder-drugs they can get described as.

I have ADHD, and I really couldn't give a damn wether you believe in it or not. Yeah, I'm sure you're exceedingly qualified to speculate on the etiology of a complex neurobiological deficit in executive functioning, Professor Wikipedia.
This is relevant because the ADHD may affect how the drug affects me, as opposed to someone else free of it.
Academic Effects I Personally Experience:
-------------------------------------------------------------
At a normal dose, I actually don't even notice dexedrine is working - but other people do.
My brother who attends the same university as me can almost immediately tell if I've remembered to take my dosage that day.
I listen much better, I'm more mellow and not as impulsive, I remember dates, appointments and obligations, and I'm just an all-round normal person. Its really helpful.
Again - I actually don't notice a difference myself apart from feeling calm, not hungry and a dry throat - yet the desired effects are very clear and observable to others.
Academic wise it hasn't helped me as much as other people:
I always hear people talking about how it makes them super geniuses, and they study for 4 hours and get an A+, or just ace the exam through sheer willpower and awesomeness.
Well, I straight-up don't have that.
At prescribed dosages it just helps me sit still and pay attention to the lecture like my more motivated peers.
It definitely doesn't raise my intelligence, or intuition.
So why not take more?

But I'm NOT super intelligent, or god-like, or going to ace the exam with self-righteous fantasies.
I can't just wave problems away as easily as I think I can.
I honestly think a lot of these accounts can get exaggerated because people THINK they're super intelligent because the drug boosts their confidence, not cognition.
If I want a good mark, I have to study and work hard like everyone else. Essentially I find amphetamines to be glorified caffiene pills, which ironically make the user feel glorified too.
They can be useful tools, if you use them correctly. Using them correctly is entirely dependant of finding the right dose and only using when necessary, which I would think to be difficult without the observation of a medical practitioner. There are too many potentially dangerous side effects - not to mention having legal consequences and a high addictive potential.
I wouldn't advocate their use, not because they're stigmatized, not because they're illegal, and not because of any illogical fear of the drug. Drugs are just tools, and any tool can get misused.
This particular tool is easily misused.
Bottom-line, it (when used at high, unprescribed doses) isn't worth it if your intent is only to get better marks and remain otherwise healthy. The risks simply outweigh the benefits for a healthy student, in my experience.
I haven't discussed the risks because it'll be more convincing if you just do the research yourself.
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.


Welcome to my GitHub Page.
WELCOME! Hope you like my page! You will be seeing all about my personal interests and some of my work will be uploaded soon. Also I will be uploading my blog about DataBase System class. Hope you enjoy this page!!!
Personal Life.
You can click on the About Me! button above. ^-^
My Work.
Currently I'm keep learning new languages to be better in my future work.
Future Plans.
For Future plans I will say that I will be uploading a blog about DataBase System Class.
Contact Me!


ANIMAL LOG
LEARN MORE ONLINE
EDUCTIONAL OUTREACH
VOLUNTEER OPPORTUNITIES
ZOO INFO
EMPLOYEE LOGIN
Loading...


I found myself blocked when creating a function to remove the word “buzz” in all its forms from any given sentence. I started off by calling the replace method which allows you to input both a string/word you would like to replace and a string/word you want to replace it with. As you can see below it worked but instead of replacing the word buzz with nothing, it created an empty space instead.
To solve the problem, I began by logging the outputs to the console and then Google searching to try and understand why I was getting the spaces instead of nothing. After 5 minutes of searching yielding no useful information my frustration began to build. I decided to return to my code and review the replace requirements i had written; /buzz/gi”. The word I wanted to replace was “buzz”. The “g” extension told the replace method to look for all occurrences of “buzz”, the “i” extension told it “buzz” was case incentive e.g. “Buzz”, “buZZ”.
During this review process I chnaged the replace method to: “/buzz /gi“. this told it to replace the word buzz and the space following it with a single space. Thankfully that worked, however it passed test 2 but failed test 3 because the sentence ended with “buzz” with no space after it so my replace method would not work
I returned to console logging and troubleshooting and decided to make the problem easier and just come up with a solution to replace the word “buzz” but with a space in front of it (i.e. " buzz).
To solve the problem I simply actioned the same solution I had used last time, however this time I put the space before buzz and it worked.
My final solution passed all of the tests and in the process learned to break down a problem into smaller problems and focus on solving one small problem at a time.
The problem I was given was to write a function that would join an array or collection of words together into one big word, so if given the words “to” and “day” the function would return “today”.
I started the problem by studying what was required to pass test’s 1,2 & 3 and then writing down pseudocode which is basically just writing down what you want to happen in a text format that is not read by the computer but only by other people using your code.
I wrote “join an array into one string” and then I googled that and the first thing to come up was the join method.
I did a bit of reading then copied the second example shown above into my function and it worked. The join method I wrote passed all three tests and felt proud of my googling abilities. When I reflected on this later I learned that writing down what you want in plain English is a great way to start and also a great way to google.
Pseudocode – This is a great way to start a problem however I’m not yet confident in my ability to write it in a way that others can understand.
Trying something – I am very confident trying all kinds of solutions and saving each iteration in case I need it later.
Rubber ducky method – Not confident using this method as I share an office with others and it seems strange.
Reading error messages – No idea what the messages mean most of the time I just look for the line refences.
Console.logging – This paired with “Trying something” is a great way to stumble into a solution.
Googling – This is actually hard to do in the tech realm as there are so many solutions but I’m getting more confident with experience. I found writing pseudocode helped with this.
Asking your peers for help – Talking with peers is a great way to feel less alone regarding problems but also to get some good tips as they are working on the same tasks.
Asking coaches for help – Have not asked for help from coaches as of yet.
Improving your process with reflection – Reflecting is one of the key things to getting better because you get more out of each problem not only solving the problem itself but then you get to look back on how you did it.


CRC Report for: {{state}}
CRC Report for: {{state}} / {{hierName}}
CRC Report for: {{state}}/ {{titleName}}/ {{hierName}}
CRC Report for: {{state}}/ {{titleName}}/ {{title}}/ {{hierName}}
About the dashboard: The dashboard here provides insights using the CRC App data. We have derived several normalised metrics using the raw data and you can read more about them using the following link. A key feature of this dashboard is its ability to Zoom In and Out at various administrative levels. The administrative levels include District, Block and Cluster. This has been done to provide relevant insights at the appropriate administrative level. In addition to visualising data, the dashboard also gives you the ability to download the data at various administrative levels. This feature has been enabled to provide freedom to power users to derive additional insights that may not be captured in this dashboard. You can download the data using the dropdown option on the top right corner.
NOTE: The scatter plot below provides information for the metrics selected in the dropdown below. You can alter the metrics (calculated from the CRC App) to update the scatter plot.
NOTE: The table provides information about the various metrics (calculated from the CRC App). You can sort the entire table based on any metrics available in this table.


--- title: Our Story hero: Our story description: De Mort is a project by freelance artist and illustrator, Fleur Greenfield. Find out more. ---
Hi there, I'm Fleur. I'm a freelance artist based in Sussex. My heart lies in Newquay - I moved to Cornwall after studying fashion and fell in love with its unique scenery and culture. I started De Mort to bring Newquay’s buzzing skate and surf scene to streetwear.
And the little guy? That's Trigger, my persistent assistant.
La Fleur De Mort means the 'The Flower of Death'. I’m an artist who works on deep conceptual topics and I’m passionate about the messages that my work portrays.
My style is heavily influenced by pop-art. I love capturing moments and vibes of everyday home and street life in strong, punchy ways.
I'd love to hear from you! You can drop me a line on the contact page or on social media. You can also see the stuff I get up to on Instagram.
I sell a small range of merchandise through Etsy, with favourites shown on the Products page.
If you'd like to commission a piece, please get in touch.


Darkness no longer, a child is born Mother shed tears of joy as baby test his lungs My daddy's not there where he ought to be Somewhere in Georgia, skinning and shooting craps on his knees
A new world order, a brand new day A change of mind for the human race A new world order, a brand new day A change of mind for the human race


--- layout: post title: "My Week in Review" date: 2018-07-22 11:20:00 +0000 image: https://s3.amazonaws.com/audreywatters/2018-07-22-rain.jpg imagecredits: https://www.flickr.com/photos/bongoherman/6793233944 ---
This has been a terrible week. I’ll just quote from my weekly newsletter:
This has been a terrible week, made only barely survivable with the gift of some booze-filled truffles sent to me by my dear friend Sean. Partly the terribleness resulted from the steady stream of awfulness coming out of Washington DC (and Helsinki) and Silicon Valley. Partly it was the steady stream of rainwater gushing out of the ceiling and walls of our apartment bathroom. I think the apartment will need to be completely gutted. At this rate, our country is going to be as well.
It started to rain in our bathroom on Tuesday. Last night, it started to rain in the kitchen. (Buckets of rain.) This apartment is not habitable, even though the superintendent and the landlord seem quite unconcerned with the water damage.
Kin and I have been talking quite a bit lately about “what’s next” – do we stay in New York when our lease is up in October?  But now it seems as though our hand has been forced. We can’t stay in this apartment – not even for another week if I am judging the weather forecast correctly.
I think we’re going to head back to Hermosa Beach. I mean, I can make some jokes about the lack of rainfall in Los Angeles, if nothing else. Or the plan this morning, at least, is we are buying some boxes today and starting to pack and then probably getting a UHaul in the next 24 hours or so and then driving. Somewhere. West.
This past week in New York has defeated me, just when I had started to forget how close the winter came to defeating me. I can’t handle the humidity. I certainly can’t handle it when the humidity’s seeping out from the water-soaked walls of my home. I have a book to write, and I cannot work like this. I cannot live like this. I consider myself fortunate that I do not have to. Kin and I can work and live anywhere.
All that being said, I actually made a huge breakthrough with my book this week – with how I’m conceptualizing the scope and “the story.” The book has to be my focus right now, and I just don’t think I can focus under my current living conditions.
Icon credits: The Noun Project


RTC
Section: Linux Programmer's Manual (4)
Updated: 2010-02-25
Index
Return to Main Contents
NAME
rtc - real-time clock
SYNOPSIS
#include <linux/rtc.h>
int ioctl(fd, RTC_request, param);
DESCRIPTION
This is the interface to drivers for real-time clocks (RTCs).
Most computers have one or more hardware clocks which record the
current "wall clock" time.
These are called "Real Time Clocks" (RTCs).

RTCs often provide alarms and other interrupts.
All i386 PCs, and ACPI-based systems, have an RTC that is compatible with
the Motorola MC146818 chip on the original PC/AT.
Today such an RTC is usually integrated into the mainboard's chipset
(south bridge), and uses a replaceable coin-sized backup battery.
Non-PC systems, such as embedded systems built around system-on-chip
processors, use other implementations.
They usually won't offer the same functionality as the RTC from a PC/AT.
RTC vs system clock
RTCs should not be confused with the system clock, which is
a software clock maintained by the kernel and used to implement
gettimeofday(2)
and
time(2),
as well as setting timestamps on files, and so on.
The system clock reports seconds and microseconds since a start point,
defined to be the POSIX Epoch: 1970-01-01 00:00:00 +0000 (UTC).
(One common implementation counts timer interrupts, once
per "jiffy", at a frequency of 100, 250, or 1000 Hz.)
That is, it is supposed to report wall clock time, which RTCs also do.
A key difference between an RTC and the system clock is that RTCs
run even when the system is in a low power state (including "off"),
and the system clock can't.
Until it is initialized, the system clock can only report time since
system boot ... not since the POSIX Epoch.
So at boot time, and after resuming from a system low power state, the
system clock will often be set to the current wall clock time using an RTC.
Systems without an RTC need to set the system clock using another clock,
maybe across the network or by entering that data manually.
RTC functionality
RTCs can be read and written with
hwclock(8),
or directly with the ioctl requests listed below.
Besides tracking the date and time, many RTCs can also generate
interrupts
- *
-
on every clock update (i.e., once per second);
- *
-
at periodic intervals with a frequency that can be set to
any power-of-2 multiple in the range 2 Hz to 8192 Hz;
- *
-
on reaching a previously specified alarm time.
Each of those interrupt sources can be enabled or disabled separately.
On many systems, the alarm interrupt can be configured as a system wakeup
event, which can resume the system from a low power state such as
Suspend-to-RAM (STR, called S3 in ACPI systems),
Hibernation (called S4 in ACPI systems),
or even "off" (called S5 in ACPI systems).
On some systems, the battery backed RTC can't issue
interrupts, but another one can.
The
/dev/rtc
(or
/dev/rtc0,
/dev/rtc1,
etc.)
device can be opened only once (until it is closed) and it is read-only.
On
read(2)
and
select(2)
the calling process is blocked until the next interrupt from that RTC
is received.
Following the interrupt, the process can read a long integer, of which
the least significant byte contains a bit mask encoding
the types of interrupt that occurred,
while the remaining 3 bytes contain the number of interrupts since the
last
read(2).
ioctl(2) interface
The following
ioctl(2)
requests are defined on file descriptors connected to RTC devices:
- RTC_RD_TIME
-
Returns this RTC's time in the following structure:
-
struct rtc_time {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday; /* unused */
int tm_yday; /* unused */
int tm_isdst; /* unused */
};
-
The fields in this structure have the same meaning and ranges as for the
tm
structure described in
gmtime(3).
A pointer to this structure should be passed as the third
ioctl(2)
argument.
- RTC_SET_TIME
-
Sets this RTC's time to the time specified by the
rtc_time
structure pointed to by the third
ioctl(2)
argument.
To set the
RTC's time the process must be privileged (i.e., have the
CAP_SYS_TIME
capability).
- RTC_ALM_READ, RTC_ALM_SET
-
Read and set the alarm time, for RTCs that support alarms.
The alarm interrupt must be separately enabled or disabled using the
RTC_AIE_ON, RTC_AIE_OFF
requests.
The third
ioctl(2)
argument is a pointer to an
rtc_time
structure.
Only the
tm_sec,
tm_min,
and
tm_hour
fields of this structure are used.
- RTC_IRQP_READ, RTC_IRQP_SET
-
Read and set the frequency for periodic interrupts,
for RTCs that support periodic interrupts.
The periodic interrupt must be separately enabled or disabled using the
RTC_PIE_ON, RTC_PIE_OFF
requests.
The third
ioctl(2)
argument is an
unsigned long *
or an
unsigned long,
respectively.
The value is the frequency in interrupts per second.
The set of allowable frequencies is the multiples of two
in the range 2 to 8192.
Only a privileged process (i.e., one having the
CAP_SYS_RESOURCE
capability) can set frequencies above the value specified in
/proc/sys/dev/rtc/max-user-freq.
(This file contains the value 64 by default.)
- RTC_AIE_ON, RTC_AIE_OFF
-
Enable or disable the alarm interrupt, for RTCs that support alarms.
The third
ioctl(2)
argument is ignored.
- RTC_UIE_ON, RTC_UIE_OFF
-
Enable or disable the interrupt on every clock update,
for RTCs that support this once-per-second interrupt.
The third
ioctl(2)
argument is ignored.
- RTC_PIE_ON, RTC_PIE_OFF
-
Enable or disable the periodic interrupt,
for RTCs that support these periodic interrupts.
The third
ioctl(2)
argument is ignored.
Only a privileged process (i.e., one having the
CAP_SYS_RESOURCE
capability) can enable the periodic interrupt if the frequency is
currently set above the value specified in
/proc/sys/dev/rtc/max-user-freq.
- RTC_EPOCH_READ, RTC_EPOCH_SET
-
Many RTCs encode the year in an 8-bit register which is either
interpreted as an 8-bit binary number or as a BCD number.
In both cases,
the number is interpreted relative to this RTC's Epoch.
The RTC's Epoch is
initialized to 1900 on most systems but on Alpha and MIPS it might
also be initialized to 1952, 1980, or 2000, depending on the value of
an RTC register for the year.
With some RTCs,
these operations can be used to read or to set the RTC's Epoch,
respectively.
The third
ioctl(2)
argument is a
unsigned long *
or a
unsigned long,
respectively, and the value returned (or assigned) is the Epoch.
To set the RTC's Epoch the process must be privileged (i.e., have the
CAP_SYS_TIME
capability).
- RTC_WKALM_RD, RTC_WKALM_SET
-
Some RTCs support a more powerful alarm interface, using these ioctls
to read or write the RTC's alarm time (respectively) with this structure:
-
struct rtc_wkalrm {
unsigned char enabled;
unsigned char pending;
struct rtc_time time;
};
-
The
enabled
flag is used to enable or disable the alarm interrupt,
or to read its current status; when using these calls,
RTC_AIE_ON and RTC_AIE_OFF
are not used.
The
pending
flag is used by
RTC_WKALM_RD
to report a pending interrupt
(so it's mostly useless on Linux, except when talking
to the RTC managed by EFI firmware).
The
time
field is as used with
RTC_ALM_READ
and
RTC_ALM_SET
except that the
tm_mday,
tm_mon,
and
tm_year
fields are also valid.
A pointer to this structure should be passed as the third
ioctl(2)
argument.
FILES
/dev/rtc,
/dev/rtc0,
/dev/rtc1,
etc: RTC special character device files.
/proc/driver/rtc:
status of the (first) RTC.
NOTES
When the kernel's system time is synchronized with an external
reference using
adjtimex(2)
it will update a designated RTC periodically every 11 minutes.
To do so, the kernel has to briefly turn off periodic interrupts;
this might affect programs using that RTC.
An RTC's Epoch has nothing to do with the POSIX Epoch which is
used only for the system clock.
If the year according to the RTC's Epoch and the year register is
less than 1970 it is assumed to be 100 years later, that is, between 2000
and 2069.
Some RTCs support "wildcard" values in alarm fields, to support
scenarios like periodic alarms at fifteen minutes after every hour,
or on the first day of each month.
Such usage is nonportable;
portable user-space code only expects a single alarm interrupt, and
will either disable or reinitialize the alarm after receiving it.
Some RTCs support periodic interrupts with periods that are multiples
of a second rather than fractions of a second;
multiple alarms;
programmable output clock signals;
nonvolatile memory;
and other hardware
capabilities that are not currently exposed by this API.
SEE ALSO
date(1),
adjtimex(2),
gettimeofday(2),
settimeofday(2),
stime(2),
time(2),
gmtime(3),
time(7),
hwclock(8)
Documentation/rtc.txt
in the Linux kernel source tree
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RTC vs system clock
-
- RTC functionality
-
- ioctl(2) interface
-
- FILES
-
- NOTES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 02:55:19 GMT, September 18, 2014


|
Plant-o-Matic
|
Public Member Functions | |
| JSONUltraCallback (UltraSonicSensorSampleCallback *cb) | |
| virtual std::string | getJSONString () |
| Public Member Functions inherited from JSONCGIHandler::GETCallback | |
| virtual std::string | getContentType () |
Private Attributes | |
| UltraSonicSensorSampleCallback * | ultra |
Callback handler which returns data to the nginx server. The current water level and the timestamp is transmitted to nginx and the javascript application.
|
inline |
|
inlinevirtual |
Needs to return the payload data sent to the web browser. Use the JSONGenerator to create the JSON or use an external json generator.
Implements JSONCGIHandler::GETCallback.
|
private |