The Purpose Of The College Essay
The college essay is an opportunity to show your character. If you successfully demonstrate your character in your essay and this is supported by the rest of your application, then you have written a good essay and likely have a cohesive application.
Your essay doesn’t need to amaze or wow the reader; often times, many applicants try to write about a traumatic event or something incredible that has happened to them. Writing about these things can actually make it more difficult to write a good college essay; instead of giving insight into your personality and character, your essay often ends up focusing on an external event.
For example, writing about the death of a loved one is a common essay idea but because the essay is focused on another individual rather than the applicant, it can often yield a bad college essay. If you write about the death of a loved one, the focus should still be on YOU and how you were affected by them, how they brought out your desirable traits, etc.
A great essay communicates your character clearly and truthfully in an entertaining and well written way.
Explaining The College Essay Through A 'Famous' Example Essay
I brought this essay up before but will use it again because it’s a perfect example of a ‘great’ essay according to admissions officers (which is what matters). It is easy for me to explain the college essay by using this essay as an example.
This essay got a high-school senior into 5 Ivy League schools and Stanford
She starts the essay mid action and recounts a semi-entertaining story of her running through Costco as a child. She uses a diverse vocabulary and sprinkles in some safe humor.
She gives examples of her intellectual curiosity throughout the essay and gives insight into her thought process. She does so in a way that doesn’t feel incredibly forced.
“Purchasing the yuletide hickory smoked ham inevitably led to a conversation between my father and me about Andrew Jackson’s controversiality. There was no questioning Old Hickory’s dedication; he was steadfast in his beliefs and pursuits – qualities I am compelled to admire, yet his morals were crooked. We both found the ham to be more likeable–and tender.”
This is her way of demonstrating her kindness/ good morals, steadfastness, and intellectual curiosity with just one passage. She sprinkles in some of her other ‘desirable qualities’ but keeps the focus on what she believes to be her most desirable quality- her intellectual curiosity.
She strengthens her argument for intellectual curiosity even further by citing real examples.
“Whether it be through attempting aerial yoga, learning how to chart blackbody radiation using astronomical software, or dancing in front of hundreds of people, I am compelled to try any activity that interests me in the slightest.”
She even sprinkles in some of her academic knowledge.
“I was a conquistador, but rather than searching the land for El Dorado, I scoured aisles for free samples.”
Finally she closes with a reminder of who she is and what she wants admissions officers to take away from her essay.
“My intense desire to know, to explore beyond the bounds of rational thought; this is what defines me. Costco fuels my insatiability and cultivates curiosity within me at a cellular level. Encoded to immerse myself in the unknown, I find it difficult to complacently accept the “what”; I want to hunt for the “whys” and dissect the “hows”. In essence, I subsist on discovery.”
This is her eloquent and lighthearted way of saying I AM INTELLECTUALLY CURIOUS.
Here are some of the things she does that makes her essay a good essay. You will see that this matches up to the list in College Essay Summary:
- The essay is well written and semi entertaining. She showcases her desirable character traits in a way that is lighthearted and doesn’t feel too forced.
- She makes it clear she has intellectual curiosity and cites countless examples including REAL LIFE examples.
- She writes in a unique voice and shows her thought process.
- She demonstrates some academic knowledge.
Explaining The College Essay Through My Essay
I’ll show you my college essay because it is an example of an essay that is not great, not riveting, and is a bit too metaphorical, but still shows my personality and desirable trait(s) making it a ‘good’ essay. That is, it accomplishes what the essay needs to accomplish without sounding too unlikeable, narcissistic, or pretentious.
It’s not entertaining or memorable. I didn’t talk about a life changing event. I talked about a hill near my house and used the hill metaphorically to show what I believe to be my most compelling trait- a desire to succeed and propel others along with me. I took the easy route by keeping my essay metaphorical. This way I could simply speak my thoughts and show my desirable trait without it seeming too out of place.
It is hard to show multiple facets of your character through the essay; focusing on simply one- like intellectual curiosity in the girl’s case or the desire to bring others to succeed for me- is often much easier and the rest of your character can often be shown in the way you write and think or through more subtle references.
My advice is to pinpoint your strongest and most compelling trait and use your essay to highlight that trait. The rest of your application should then support that.
College Essay Summary
- Showcase your personality, thought process, and desirable trait(s). Keeping it light hearted can make you seem more likeable, but it depends on the subject matter.
- Write eloquently and naturally. Don’t force big words or vocabulary.
- Use REAL LIFE examples of things that you have done that support your trait(s) or character.
- Provide more insight into you; don't just repeat surface level information from the rest of your application.
- Think about how your essay fits in with the rest of your application. Other parts of your application should support the desirable trait(s) you are portraying and align with your presented character.
- Find a way to showcase your personality and desirable trait(s) seamlessly whether it be by including an internal monologue, writing metaphorically, or any other means.
Figuring out your desirable traits/ qualities and constructing a fluid essay that incorporates these elements is the hard part. If you can accomplish this, if your essay is true to you, and if your essay makes you seem at least somewhat likeable, then you have a great college essay.
This Year's Common App Essay Prompts
2017-2018 Common Application Essay Prompts
- Some students have a background, identity, interest, or talent that is so meaningful they believe their application would be incomplete without it. If this sounds like you, then please share your story. [No change]
- The lessons we take from obstacles we encounter can be fundamental to later success. Recount a time when you faced a challenge, setback, or failure. How did it affect you, and what did you learn from the experience? [Revised]
- Reflect on a time when you questioned or challenged a belief or idea. What prompted your thinking? What was the outcome? [Revised]
- Describe a problem you've solved or a problem you'd like to solve. It can be an intellectual challenge, a research query, an ethical dilemma - anything that is of personal importance, no matter the scale. Explain its significance to you and what steps you took or could be taken to identify a solution. [No change]
- Discuss an accomplishment, event, or realization that sparked a period of personal growth and a new understanding of yourself or others. [Revised]
- Describe a topic, idea, or concept you find so engaging that it makes you lose all track of time. Why does it captivate you? What or who do you turn to when you want to learn more? [New]
- Share an essay on any topic of your choice. It can be one you've already written, one that responds to a different prompt, or one of your own design. [New]
Supplementary Essays
It's important to remember that your essays should always give more insight into you or something you have done. If you write about an event already in your application there should be more details, descriptions, etc.
You have to try and find a balance between cohesive and repetitive. You want there to be a unifying theme- usually your desirable trait(s)- and it is necessary to reinforce the theme, but be careful not to be too repetitive.


The Adventure Of A Lifetime!

My Favorite People
My Favorite Places
My Favorite Seasons
My Life Goals


/* This file is part of Ext JS 4 Copyright (c) 2011 Sencha Inc Contact: http://www.sencha.com/contact Commercial Usage Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. */ /** * This layout manages multiple child Components, each fitted to the Container, where only a single child Component can be * visible at any given time. This layout style is most commonly used for wizards, tab implementations, etc. * This class is intended to be extended or created via the layout:'card' {@link Ext.container.Container#layout} config, * and should generally not need to be created directly via the new keyword. * * The CardLayout's focal method is {@link #setActiveItem}. Since only one panel is displayed at a time, * the only way to move from one Component to the next is by calling setActiveItem, passing the next panel to display * (or its id or index). The layout itself does not provide a user interface for handling this navigation, * so that functionality must be provided by the developer. * * To change the active card of a container, call the setActiveItem method of its layout: * * Ext.create('Ext.panel.Panel', { * layout: 'card', * items: [ * { html: 'Card 1' }, * { html: 'Card 2' } * ], * renderTo: Ext.getBody() * }); * * p.getLayout().setActiveItem(1); * * In the following example, a simplistic wizard setup is demonstrated. A button bar is added * to the footer of the containing panel to provide navigation buttons. The buttons will be handled by a * common navigation routine. Note that other uses of a CardLayout (like a tab control) would require a * completely different implementation. For serious implementations, a better approach would be to extend * CardLayout to provide the custom functionality needed. * * @example * var navigate = function(panel, direction){ * // This routine could contain business logic required to manage the navigation steps. * // It would call setActiveItem as needed, manage navigation button state, handle any * // branching logic that might be required, handle alternate actions like cancellation * // or finalization, etc. A complete wizard implementation could get pretty * // sophisticated depending on the complexity required, and should probably be * // done as a subclass of CardLayout in a real-world implementation. * var layout = panel.getLayout(); * layout[direction](); * Ext.getCmp('move-prev').setDisabled(!layout.getPrev()); * Ext.getCmp('move-next').setDisabled(!layout.getNext()); * }; * * Ext.create('Ext.panel.Panel', { * title: 'Example Wizard', * width: 300, * height: 200, * layout: 'card', * bodyStyle: 'padding:15px', * defaults: { * // applied to each contained panel * border: false * }, * // just an example of one possible navigation scheme, using buttons * bbar: [ * { * id: 'move-prev', * text: 'Back', * handler: function(btn) { * navigate(btn.up("panel"), "prev"); * }, * disabled: true * }, * '->', // greedy spacer so that the buttons are aligned to each side * { * id: 'move-next', * text: 'Next', * handler: function(btn) { * navigate(btn.up("panel"), "next"); * } * } * ], * // the panels (or "cards") within the layout * items: [{ * id: 'card-0', * html: '
Welcome to the Wizard!

Step 1 of 3
' * },{ * id: 'card-1', * html: '
Step 2 of 3
' * },{ * id: 'card-2', * html: '
Congratulations!

Step 3 of 3 - Complete
' * }], * renderTo: Ext.getBody() * }); */ Ext.define('Ext.layout.container.Card', { /* Begin Definitions */ alias: ['layout.card'], alternateClassName: 'Ext.layout.CardLayout', extend: 'Ext.layout.container.AbstractCard', /* End Definitions */ /** * Makes the given card active. * * var card1 = Ext.create('Ext.panel.Panel', {itemId: 'card-1'}); * var card2 = Ext.create('Ext.panel.Panel', {itemId: 'card-2'}); * var panel = Ext.create('Ext.panel.Panel', { * layout: 'card', * activeItem: 0, * items: [card1, card2] * }); * // These are all equivalent * panel.getLayout().setActiveItem(card2); * panel.getLayout().setActiveItem('card-2'); * panel.getLayout().setActiveItem(1); * * @param {Ext.Component/Number/String} newCard The component, component {@link Ext.Component#id id}, * {@link Ext.Component#itemId itemId}, or index of component. * @return {Ext.Component} the activated component or false when nothing activated. * False is returned also when trying to activate an already active card. */ setActiveItem: function(newCard) { var me = this, owner = me.owner, oldCard = me.activeItem, newIndex; newCard = me.parseActiveItem(newCard); newIndex = owner.items.indexOf(newCard); // If the card is not a child of the owner, then add it if (newIndex == -1) { newIndex = owner.items.items.length; owner.add(newCard); } // Is this a valid, different card? if (newCard && oldCard != newCard) { // If the card has not been rendered yet, now is the time to do so. if (!newCard.rendered) { me.renderItem(newCard, me.getRenderTarget(), owner.items.length); me.configureItem(newCard, 0); } me.activeItem = newCard; // Fire the beforeactivate and beforedeactivate events on the cards if (newCard.fireEvent('beforeactivate', newCard, oldCard) === false) { return false; } if (oldCard && oldCard.fireEvent('beforedeactivate', oldCard, newCard) === false) { return false; } // If the card hasnt been sized yet, do it now if (me.sizeAllCards) { // onLayout calls setItemBox me.onLayout(); } else { me.setItemBox(newCard, me.getTargetBox()); } me.owner.suspendLayout = true; if (oldCard) { if (me.hideInactive) { oldCard.hide(); } oldCard.fireEvent('deactivate', oldCard, newCard); } // Make sure the new card is shown me.owner.suspendLayout = false; if (newCard.hidden) { newCard.show(); } else { me.onLayout(); } newCard.fireEvent('activate', newCard, oldCard); return newCard; } return false; }, configureItem: function(item) { // Card layout only controls dimensions which IT has controlled. // That calculation has to be determined at run time by examining the ownerCt's isFixedWidth()/isFixedHeight() methods item.layoutManagedHeight = 0; item.layoutManagedWidth = 0; this.callParent(arguments); }});


Rachael Burke is a NYC-based comedian who spent over 5 years at The Tonight Show Starring Jimmy Fallon where her team of four earned two Emmy Awards for social and interactive media and where she was also a contributing writer. With the sketch comedy troupe that she founded, she recently appeared on several episodes of NBC's new comedy competition show "Bring the Funny". Rachael has extensive experience in writing and performing unique and original stand-up, improv, sketch comedy, characters, and a broad array of impressions.
One of Rachael’s many specialties is writing and performing impressions including Ariana Grande, Senator Elizabeth Warren, Adam Sandler, Melania Trump, Lorde, Billie Eilish, and Julie Andrews among others. A sketch written, acted in and produced by Rachael and featuring her Elizabeth Warren impression was featured on Elizabeth Banks’ comedy website WhoHaha and was ranked #1 on that website for several weeks.
Elizabeth Warren Is Running For President! Probably. Maybe.
Elizabeth Warren announced that she's forming an exploratory committee to investigate a possible presidential run! HELL YEAH! Wait, but... does that mean she's running or not? Let Senator Warren (aka Rachael Burke) explain in this woman-on-the-street segment.
In 2018, Rachael founded a comedy sketch group called Kids These Days. Rachael single-handedly scouted and recruited each of the performers and writers for the group. Rachael is the producer of the shows in addition to being a featured performer and writer for the group. Kids These Days has a recurring monthly mainstage show at the People's Improv Theater and has sold out every show in NYC and while on tour. Kids These Days has also appeared at SF SketchFest, New York Comedy Fest, Charleston Comedy Festival, Out of Bounds Comedy Festival, New York SketchFest, Portland Sketch Comedy Festival, and the HBO/Television Academy’s Independent Television Festival, among others.
Led by Rachael, Kids These Days performed their original sketch comedy on national television on several episodes of the brand new NBC show "Bring the Funny". Kids These Days was one of only 40 acts selected from thousands of acts around the world for this new international comedy showcase.
Rachael contributed countless on-air jokes and sketch concepts to The Tonight Show with Jimmy Fallon during her five years at the show. For example, Rachael's uniquely creative comedic imagination conjured up a sketch about Ariana Grande’s ponytail coming alive and stopping crime. The concept came to life in a sketch starring Ariana Grande and Jimmy Fallon that aired on the show and also garnered over 13 million views across YouTube and Facebook.
Additionally, Rachael is an expert in social media and virality. For 5 years, Rachael oversaw the show’s social media accounts, including Twitter, Facebook, Snapchat, Tumblr, YouTube, Instagram, etc. accounts, growing YouTube audiences from 2 million to 19 million and the Facebook audience from 2 million to 13 million. Rachael filmed and produced countless backstage web series with guests. Some of her web series concepts that were filmed and produced include My Weirdest Role, Co-Star Superlatives, Guided Meditation, Questlove Q&A, New Internet Slang, and How to Handle a Heckler. Another example of Rachael's expertise in virality was when Rachael created the most viewed GIF of 2018 according to Giphy and Mashable. The GIF featuring Cardi B, which can be seen below, has been viewed more than 475 million times.
Below is a recent sketch which features an impression of Eminem that was written, directed, and produced by Rachael for Kids These Days.
Charleston Comedy Festival includes funny people from 'Tonight Show,' 'Daily Show,' more
Performers and comedy ensembles hailing from near and far are descending on the Lowcountry this month with giggle-inducing one-liners, sketches and improv sets to be delivered at the 16th annual Charleston Comedy Festival. The event runs Jan. 16-19 at a variety of downtown venues, including College of Charleston's Sottile Theatre, Theatre 99, Threshold Repertory Theatre, Woolfe Street Playhouse and The Commodore.
Are Kids These Days Bringing OOB the Laughter for Love's Sake?
So much talent coming to Austin's Out of Bounds Comedy Festival from all over the country this year. So many troupes - improv and sketch - along with a wealth of solo stand-up artists - just as in all the previous OOB years.
Kids These Days bring a whole lotta laughs to the stage
click to enlarge "It's an Ocean's 11 super group of all my favorite people I've done comedy with," says Rachael Burke, the founder of comedy group Kids These Days. "They're the kindest and most talented," she adds, which makes us want to befriend these funny strangers, too.


(Update: Rolling out widely) Android TV Play Store starts getting its long-awaited redesign
by Taylor Kerns
Update 1: 2019/10/20 7:44am PDT
Google confirmed to 9to5Google that this redesign is rolling out over "the next few weeks."
Update 2: 2019/11/20 11:27am PST
As Google promised at I/O back in May, the redesigned Play Store for Android TV has finally started to make its way to televisions. The new tiled interface heralds a
At Google I/O this year, Android TV Product Lead Anwar Haneef introduced a new look for the Play Store that focuses on usability and discovery. That new look is rolling out now to some users on Play Store version 16.9.42.
Redesigned Play Store home screen. Image: u/battierpeeler on Reddit
The new look features auto-playing video previews for apps and a generally more content-rich layout that's more in line with modern Android TV's look on the whole.
The games tab. Image: u/battierpeeler on Reddit
We've received reports that the revamped design is showing up in version 16.9.42 of the app, but given no one on the AP staff has it yet, it seems like it's a server-side switch. A user who's got the new layout already was kind enough to snap a few photos, which you can check out here.
Update 1: 2019/10/20 7:44am PDT by Rita El Khoury
Google confirmed to 9to5Google that this redesign is rolling out over "the next few weeks."
End of Update
Update 2: 2019/11/20 11:27am PST by Zach Laidlaw
As Google promised at I/O back in May, the redesigned Play Store for Android TV has finally started to make its way to televisions. The new tiled interface heralds a more modern design that's meant to improve app and channel discoverability. Users will have access to featured content, as well as recommended categories based on user history, such as sports, music, or entertainment. If you haven't yet received the new version of Play Store for Android TV, sit tight; it's rolling out via a server-side update over the next several weeks.
Photo credit: 9to5Google
End of Update
Source:
Imgur
Via:
Reddit
Thanks:
Fred


Introduction
Looking at the present condition, there is no doubt in saying that the modern society is completely dependent on electricity. Electricity has become an indispensable need for the development. It is also a prime essentiality to sustain modern urban life. We are so much dependent on electricity. Our life becomes still when the electricity supply shuts off however small the duration is. Electricity can be generated using different methods such as hydroelectric power generation, windmills, solar power etc.
Here we are using a technique of producing electricity using magnetic field.We are doing this based on faraday’s law which states that, when the magnetic flux linking the circuit changes, an electromotive force is induced in the circuit proportional to the rate of change of flux linkage. Here magnetic coil is placed below the surface of speed breaker on the ground.. A magnetic bar is attached to the below surface of the speed breaker. The speed breaker should be made up of elastic type material with suitable coefficient of elasticity. Whenever a vehicle moves over the speed breaker, it deforms and the magnetic bar attached to it moves inside the magnetic coil. Due to the movement of bar, magnetic flux is linked to the coil. The rate of change of magnetic flux generates electric current and this current is used to supply electricity for street lights and other small electric purposes in remote areas.


STACK FRAME
WARNING
code
NOTICE
ERROR
CUSTOM ERROR
PREVIEW
//6
Charon\oops::init();
xx;
//9
///10
Use of undefined constant xx - assumed 'xx'
File:..\app\routes.php


Name: {{ driver.first_name }}
Surname: {{ driver.last_name }}
Bitrhday: {{ driver.birthday }}
Passport number: {{driver.passport}}
Address: {{driver.address}}
Nationality: {{driver.nationality}}


Downloadable Templates For Your Pathway to College.
These templates were created for users to stay organized throughout their journey to achieving a college education. When it comes to choosing a college, it can be pretty tough. Utilize these tools and be ahead of your peers when it comes to organizing all of your information that is needed to achieve your lifetime goals!
These templates were made for our user's satisfaction and success on their road to a higher education. Please feel free to utilize these tools that will ensure an organized way of preparing for college!
My 4 Year Plan
DownloadCollege Pros and Cons List
DownloadFAFSA Info Sheet
DownloadScholarship Search
Download


Provides utilities to facilitate import, export and computation with the BIOM (Biological Observation Matrix) format (http://biom-format.org).
| Version: | 0.9 |
| Depends: | R (≥ 3.0), utils |
| Suggests: | RJSONIO, MGRASTer |
| Published: | 2014-08-29 |
| Author: | Daniel T. Braithwaite [aut, cre] |
| Maintainer: | Daniel T. Braithwaite <contact.dtb at gmail.com> |
| License: | BSD_2_clause + file LICENSE |
| Copyright: | University of Chicago |
| URL: | https://github.com/braithwaite/BIOM.utils/ |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | BIOM.utils results |
| Reference manual: | BIOM.utils.pdf |
| Package source: | BIOM.utils_0.9.tar.gz |
| Windows binaries: | r-devel: BIOM.utils_0.9.zip, r-release: BIOM.utils_0.9.zip, r-oldrel: BIOM.utils_0.9.zip |
| OS X binaries: | r-release: BIOM.utils_0.9.tgz, r-oldrel: BIOM.utils_0.9.tgz |
| Reverse depends: | matR |
Please use the canonical form https://CRAN.R-project.org/package=BIOM.utils to link to this page.


Synchronous vs Asynchronous Code
Synchronous
: Means there is an inherent order among the commands and this order of execution is guaranteed.
Asynchronous
: No guarantee in the total order that commands are executed.
setTimeout()
: a method used to execute a callback after a given amount of time.
setInterval()
: Method that will continually execute a callback after a number of milliseconds, repeatedly.Can’t believe it’s async?
We cannot treat setTimeout as async under any circumstance.
The reason is that the time argument is not exact, it is the minimum amout of time
that will elapse before executing the callback.
Why do we need asynchronous code?

Because we are never in full control of the circumstances, the only thing we can control is our actual input code.
In the above example, ‘drink
’ will print out before our foo()
function executes due to our setTimeout.
non-blocking
because they do not prevent code that follows their invocation from running.There are also an unlimited number of arguments you can provide.
function foo(food1, food2) {
console.log(food1 + " for breakfast");
console.log(food2 + " for lunch");
}
setTimeout(foo, 2000, "pancakes", "couscous");
Cancelling Timeouts
function foo() {
console.log("food");
}
const val = setTimeout(foo, 2000);
console.log(val);
clearTimeout(val);
If we run this, we get a special Timeout object - which is essentially useless except for being used as an argument to cancel an unexpired timeout.
clearTimeout()
: function used to cancel a setTimeout.
Running Intervals
setInterval
accepts the same arguments as setTimeout
: callback function, time, …additional args)function foo(food1, food2) {
console.log(food1 + " and " + food2 + "!");
}
setInterval(foo, 1000, "pancakes", "couscous");
clearInterrval()
to cancel.Runtime
: term used to describe the ‘lifetime’ of a program.Single-threaded vs multi-threaded execution
Thread of execution
: term to describe a sequence of commands.Single-threaded execution
: Only one command can be processed at a time.
Multi-threaded
: Multiple commands can be processed at the same time.Keeping the Thread from Unraveling
Because JS is single-threaded if a user inititates part of our program while something else is being executed, they will have to wait.
This program will hang indefinitely because our timeout will never get to run.
Call Stack
: Structure that JS uses to keep track of the valuation of function calls - uses the stack
data structure.Stack
: General pattern of organizing a collection of items.
Stack Frames
: Term to describe the items that are being pushed and popped.The Practical Consequences of the Call Stack
A program will typically exit once it’s call stack is empty, the cases in which it does not is when it is Asynchronously Listening
.
An event can only be handled once the call stack is empty.
Javascript is the tool that enables web pages to be interactive and dynamic.
The Event Loop
Message Queue
: Keeps track of tasks that cannot be executed at the moment.The Message Queue
queue
data structure.Queue
: General patten of organizing a collection of things.Node’s readline module
Module
: A package of JS code that provides some useful functionality (i.e. Mocha for testing our code.)const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
rl.question("What's up, doc? ", (answer) => {
console.log("you responded: " + answer);
rl.close();
});
// try to print 'DONE!' after the question
console.log("DONE!");
The readline module is already pre-bundled with Node.
readline
: variable that is an object that contains all of the methods we can use from the module.createInterface
: Allows us to read and print information from the terminal.Question
: Method to ask the user something - accepts two arguments: a question message, and a callback.
Callback Chaining
rl.question("What's up, doc? ", (answer) => {
console.log("you responded: " + answer);
rl.close();
console.log("DONE!");
});
To avoid the issue of wonky async behavior we can simply put the command we want to follow at the end of the callback.
Callback Chaining
: Pattern than allows us to perform a series of async functions one after the other. (Take care to manage our code neatly, otherwise it can get messy!)
Example of messy code
// this code is a partial snippet from previous examples
rl.question("What's up, doc? ", (firstAnswer) => {
console.log(firstAnswer + " is up.");
rl.question("What's down, clown? ", (secondAnswer) => {
console.log(secondAnswer + " is down.");
rl.question("What's left, Jeff? ", (thirdAnswer) => {
console.log(thirdAnswer + " is left.");
rl.close();
});
});
});
callback hell
.How it looks after it has been refactored
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
rl.question("What's up, doc? ", handleResponseOne);
function handleResponseOne(firstAnswer) {
console.log(firstAnswer + " is up.");
rl.question("What's down, clown? ", handleResponseTwo);
}
function handleResponseTwo(secondAnswer) {
console.log(secondAnswer + " is down.");
rl.question("What's left, Jeff? ", handleResponseThree);
}
function handleResponseThree(thirdAnswer) {
console.log(thirdAnswer + " is left.");
rl.close();
}


Singularity container for autoBOT¶
One of the simplest ways to run autoBOT is via containerization. In this work, we adopt the Singularity containers, which are very suitable for ML-based tools. To use them, the following is in order:
./containers/generate.sh generates a singularity container
You can run any autoBOT-based code as singularity exec [imageName] python autoBOT [someSettings+DatasetsHere]


Sylvanian Families Beauty the Foal
Beauty is frisky and energetic; she seems to 'bounce' rather than trot or walk. She is also very curious and likes to know everything that's going on, so her sweet little nose is always being poked where it should not go!


Car Speeding at 104km/h Flies Off Flyover & Crashes To The Road Below, Kills 1 and Injures 6
by RenusharaTap to listen to this article instead: 🔊 Listen to Post
There’s a reason why you’re constantly told not to speed, especially on roads with bends and sharp turns.
One woman in Hyderabad, India, risked her life and her daughter’s life by going at 104km/h instead of the set 40km/h on the Biodiversity flyover when she lost control of her car and it fell from the flyover, as according to Scroll.
The incident, which was caught on video as shared by DSSR (@SanjeevanSS), showcased the car flying off the bend of the flyover and crashing to the ground, killing one woman and injuring 6 others. The driver survived the crash while her daughter escaped with minor injuries. 2 other cars were damaged as well.
DSSR wrote, “Flying car..”
He also released a part 2 of the video in which the shadow of the car can be seen on the road below before it crashed to the ground.
“On preliminary investigation, it was found that the accident happened due to the car OVERSPEEDING at 104 km/h instead of the prescribed 40 km/h on the flyover,” said the statement put out by the Deputy Commissioner of Police, Cyberabad stated.
DSSR’s posting has since garnered over 1,300 retweets.
Hence, always remember kids, speeding kills.
Also read: Watch: M’sian Motorcyclist Fakes Accident & Injury, Possibly to Extort Money From Innocent Driver


Software Development | Data-driven Marketing
I'm working for a life in which I can code and interact with other human beings, while still having enough time to enjoy late night runs in the rain. Graduating from Tufts University spring of 2016 and actively pursuing full-time work.
I've run hackathons, marketing projects, and a lot of miles.
Organized largest collegiate hackathon in history of hong kong. Led meetings, built website and handled external university marketing.
After heavy research on website traffic through Google Analytics and Adwords , performed optimizations of company's pay-per-click spending resulting $20,000 projected savings.
Built video game soundtrack streaming service using Django.
Led marketing team in project for external client. Deliverables included 80 page report, blog post, whitepaper and presentation, which were translated into a webinar.


| Release Doc > Examples > Simple Examples > ObjectSpace > Custom Attributes | ||
| Custom Attributes | ||
|
Launch attribute package for D5 in Delphi Launch attribute package for D6 in Delphi This example shows how custom attribute types are used with $(PRODUCT_BASE_NAME). The five example attributes are (all generated using the Bold Attribute Wizard):
How to run Since the attributes are used by the RTModel in designtime to help you write OCL expressions, the attributes must be installed in designtime packages. There is a sample-package included (SampleAttrPackD5/D6.dpk). You should compile and install this package before you start the demo application. Create custom attributes All custom attributes must first be implemented, but you don't have to do that from
scratch. There is an attribute wizard that gives you the nessecary code for most cases.
You find the wizard under the Bold menu in Delphi. Once implemented you need to add the definition of the attribute in a Note! Please make sure to use the "Create DB & Alias" button before attempting to open the system for the first time. Once the database and alias is established you only have to use the "Open system" button when running the example program. | ||
| All material $(COPYRIGHT_TEXT). Registered Trademarks and other trademarks are properties of their respective holders. |


CHOWN(1) User Commands CHOWN(1) NAME chown - change file owner and group SYNOPSIS chown [OPTION]... [OWNER][:[GROUP]] FILE... chown [OPTION]... --reference=RFILE FILE... DESCRIPTION This manual page documents the GNU version of chown. chown changes the user and/or group ownership of each given file. If only an owner (a user name or numeric user ID) is given, that user is made the owner of each given file, and the files' group is not changed. If the owner is fol‐ lowed by a colon and a group name (or numeric group ID), with no spaces between them, the group ownership of the files is changed as well. If a colon but no group name follows the user name, that user is made the owner of the files and the group of the files is changed to that user's login group. If the colon and group are given, but the owner is omitted, only the group of the files is changed; in this case, chown performs the same function as chgrp. If only a colon is given, or if the entire oper‐ and is empty, neither the owner nor the group is changed. OPTIONS Change the owner and/or group of each FILE to OWNER and/or GROUP. With --reference, change the owner and group of each FILE to those of RFILE. -c, --changes like verbose but report only when a change is made --dereference affect the referent of each symbolic link (this is the default), rather than the symbolic link itself -h, --no-dereference affect each symbolic link instead of any referenced file (useful only on systems that can change the ownership of a symlink) --from=CURRENT_OWNER:CURRENT_GROUP change the owner and/or group of each file only if its current owner and/or group match those specified here. Either may be omitted, in which case a match is not required for the omitted attribute --no-preserve-root do not treat `/' specially (the default) --preserve-root fail to operate recursively on `/' -f, --silent, --quiet suppress most error messages --reference=RFILE use RFILE's owner and group rather than specifying OWNER:GROUP values -R, --recursive operate on files and directories recursively -v, --verbose output a diagnostic for every file processed The following options modify how a hierarchy is traversed when the -R option is also specified. If more than one is specified, only the final one takes effect. -H if a command line argument is a symbolic link to a directory, tra‐ verse it -L traverse every symbolic link to a directory encountered -P do not traverse any symbolic links (default) --help display this help and exit --version output version information and exit Owner is unchanged if missing. Group is unchanged if missing, but changed to login group if implied by a `:' following a symbolic OWNER. OWNER and GROUP may be numeric as well as symbolic. EXAMPLES chown root /u Change the owner of /u to "root". chown root:staff /u Likewise, but also change its group to "staff". chown -hR root /u Change the owner of /u and subfiles to "root". AUTHOR Written by David MacKenzie and Jim Meyering. REPORTING BUGS Report chown bugs to<EMAIL_ADDRESS>GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report chown translation bugs to <http://translationproject.org/team/> COPYRIGHT Copyright © 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO chown(2) The full documentation for chown is maintained as a Texinfo manual. If the info and chown programs are properly installed at your site, the com‐ mand info coreutils 'chown invocation' should give you access to the complete manual. GNU coreutils 8.12.197-032bb September 2011 CHOWN(1)


This article describes how to configure communication with devices using Modbus protocol. Simple and robust, Modbus has since become a de facto standard communication protocol, and it is now a commonly available means of connecting industrial electronic devices (see Wikipedia). Rapid SCADA supports Modbus RTU, ASCII and TCP modes.
The general sequence of configuring:
The following is a step by step guide to setup a new Modbus device.
Run Administrator and click the New Project button. Enter a project name in the dialog and click the OK button. The setup process fully consistent with the article if the empty project named EmptyProject.en-GB is selected as a template.
Fugire 1. Creating a project
Expand the Configuration Database node, open the Objects table and add a new row for the object 2 "Test object" (see Figure 2). Click the toolbar button to open the communication line wizard. Using the wizard, add the line 1 "Test line" (see Figure 3). After that click the button and add the device 1 "Test device" (see Figure 4).
Fugire 2. Adding an object
Fugire 3. Adding a communication line
Fugire 4. Adding a device
Pay attention to the following fields when adding a device:
| Device type: | Modbus |
| Address: | Modbus address of your device, for example, 1 |
| Call number: | IP address, if the device is connected via Ethernet. Otherwise, leave blank |
| Communication line: | "Test line", which was recently created |
Open the Communication lines and Devices tables to check that the communication line and device were successfully added to the tables. Make sure that the corresponding communication line and device were created in the Communicator settings.
In the project explorer, go to the Communicator settings, expand the node of the just created communication line and double click the Line Parameters node. Configure the communication channel which settings are presented on the Main Parameters page (see Figure 5). In case of Modbus communication, the most common channel types are TCP client and Serial Port.
Figure 5. The main parameters of the communication line
If communication is performed via a serial port, the typical serial port parameters, depending on the Modbus type, are listed in the table below. In the RTU and ASCII modes, the baud rate specified in the Communicator settings and set on the devices must match. All devices connected to a one communication line must operate using the same Modbus type and with the same baud rate.
| Modbus RTU | Modbus ASCII | Modbus TCP |
|---|---|---|
| 8 data bits, Even parity, 1 stop bit |
7 data bits, Even parity, 1 stop bit |
- |
| 8 data bits, No parity, 2 stop bits |
7 data bits, No parity, 2 stop bits |
- |
Go to the Request Sequence page and select the "Test device" row (see Figure 6). If device polling time and period are not specified, the devices are polled cyclically. Commands are sent immediately after a poll is completed.
Figure 6. Device request sequence
Click the Properties button to open the device properties form (see Figure 7). In the form choose the Modbus type, which have to be specified in the device manual. In our case, Modbus TCP.
Figure 7. Device properties
Press the button to select an existing device template, or click to create a new template. When the create button or the edit button is clicked, the Device Template Editor is shown (see Figure 8). This article uses the existing template KpModbus_Adam6015.xml, which was previously copied to the project directory C:\SCADA\Projects\ModbusTest\Instances\Default\ScadaComm\Config\
Figure 8. Device template editor
Device template reflects the structure of Modbus packages. Requested data are combined into groups of elements. Each group has its name, data table, start address and element count. Each element is a tag of a device. Rapid SCADA identifies a tag by its signal number. A command is described by its name, data table and address. A command number identifies the command within Rapid SCADA.
Names of groups, elements and commands are arbitrary. The available data tables and element addresses are usually described in device manual. Depending on the manufacturer, addressing of elements can be zero-based or one-based, specified as decimal or hexadecimal numbers. By default, addresses start with 1 and represented as decimals. To switch template addressing, click the button. Template settings dialog is opened (see Figure 9).
Figure 9. Template settings
When editing the device properties (see Figure 7) is completed, click OK. The Command line field of the device parameters contains the template file name KpModbus_Adam6015.xml. Upload the project to the server by the button.
Double click the device node in the project explorer to check device status and data availability (see Figure 10). Data for this example was provided by Modbus Simulator.
Figure 10. Device data
In case of losing communication with the device, use a communication line log to realize the problem cause. To open the log, double click the Line Stats tree node and go to the Line Log page. Data packages can be decoded by Online Modbus Parser.
After communication with the device is established, create input channels and output channels in the configuration database. The most fast way to create channels is the wizard called by the button. If several devices of the same type are added to the system, configuring can be accelerated by the channel cloning tool.
Perform the wizard steps (see Figures 11-13), selecting the communication line, device and object created earlier from the drop-down lists. To check the available channel numbers, use the channel map in step 3.
Figure 11. Creating channels. Step 1
Figure 12. Creating channels. Step 2
Figure 13. Creating channels. Step 3
Clicking the Create button creates channels. The channels are created automatically based on the device template that has been created and assigned to the device in the previous section of this article. To view created channels, open the Input channels > Test device table and the Output channels > Test device table. It is recommended to manually fill in the Quantity and Unit fields of the input channels and the Command values field of the output channels. However, in the case of the first experiment it is unnecessary. Useful to understand that the input channels are bound to the device tags using the Signal field. The output channels are bound to device commands in accordance with the Command number field.
After editing the configuration database is complete, upload the project to the server by the button. Open the device data page in the Communicator settings and make sure that the input channels are bound to the device tags. The Channel column must contain numbers of the created input channels (see Figure 14).
Figure 14. Device data bound to channels
As a result of above actions, data should be collected from the device and stored in the archive. It remains to customize user interface for an operator.
Consider creating a table view for the Webstation application. If it is necessary to display data on a scheme, the steps to create a view are similar.
Right click the Interface node of the project explorer. First, select New Folder in the context menu and create the ModbusTest folder. Then in the context menu of the created folder, select New File (see Figure 15). In the opened window, set the table view type, specify the filename ModbusDevice.tbl and click the OK button (see Figure 16).
Figure 15. Menu for creating a view
Figure 16. The view creation dialog
The created view file appears in the project explorer. Double clicking the file opens Table Editor. Enter a title and fill in the view items, as shown in Figure 17. Save the changes and close the editor.
Figure 17. Editing a view
After the view file is created, specify the parent directory and the file in the Interface table of the configuration database (see Figure 18).
Figure 18. Adding a view in the Interface table
Upload the project to the server by the button. Now start your browser and enter the address http://localhost/scada/. On the login form use admin / 12345 (see Figure 19). If the configuration carried out correctly, after logging in, you will see a table with the data obtained from the device, similar to Figure 20.
Figure 19. Login form
Figure 20. The Webstation application
Received element values may need a conversion. A device template allows choosing a number of bytes used by an element and order of bytes. These settings define an initial conversion. An additional conversion, if needed, is performed by SCADA-Server based on formulas of input channels in the configuration database.
The simplest conversion is a proportional which is described by the following formula:
X * (B - A) / 2N + A, where A and B are the bounds of the element values range, N – number of bits in value, X – received value.
Another commonly used conversion is two’s complement. See Wikipedia for the details. Formulas can be defined inline in input channel rows of the configuration database or separately by using the Formulas table. Using of formulas is described in this section.


This is a Department of Defense Application. This application, including all related equipment, networks and network devices (specifically including Internet access) are provided only for authorized U.S. Government use. DoD computer systems may be monitored for all lawful purposes, including ensuring that their use is authorized, for management of the system, to facilitate protection against unauthorized access, and to verify security procedures, survivability, and operational security. Monitoring includes active attacks by authorized DoD entities to test or verify the security of this system. During monitoring, information may be examined, recorded, copied and used for authorized purposes. All information, including personal information, placed or sent over this system may be monitored.
Use of this DoD computer system, authorized or unauthorized, constitutes consent to monitoring of this system. Unauthorized use may subject you to criminal prosecution. Evidence of unauthorized use collected during monitoring may be used for administrative, criminal or other adverse action. Use of this system constitutes consent to monitoring for these purposes.
Privacy Act Statement: AUTHORITY: Sec 42 U.S.C. 4582; U.S.C. 1175 and EO 9397.
Confidentiality of Substance Abuse Record(s) and Procedures: 5 U.S.C. 552a (The Privacy Act of 1974, Public Law 93-579) as implemented by AFI 37-132 and 36-810, prescribes procedures to obtain and disclose general record information. 42 U.S.C. 290dd-3 and 290ee-3 cover the confidential use of drug and alcohol rehabilitation records.


var msg_pop = Msg.factory(
{
preset:"popup" // or "popup_autoclose"
});
Snackbars
Open Snackbar
var msg_snack = Msg.factory({
preset: "snackbar"
});
Windows
Using the "window" preset, full page, clean windows, can be created as a canvas to create anything on top. This is useful to add different layers to your application while still taking advantage of the Msg instance control system. The content takes 100vh height and 100vw width. If you want to have scrolling content you must create your own containers.
Open Window
var msg_window = Msg.factory({
preset:"window"
});
To show a window just pass a string or an html element to the show method:
msg.show("Hello World")
msg.show(document.getElementsByTagName("h1")[0])
You can re-use the same instance to display different things.
Note that an instance can only show one thing at a time.
If you want to have multiple windows open you need to create multiple instances.
You can create factory functions to create and show instances on the fly.
The "persistent" option is to be considered when creating on the fly instances. If you're not going to use the instance again, it's advised to use persistent:false, which destroys the html elements after close, to avoid filling the dom with unncecesary elements.
function remind(html)
{
var msg = Msg.factory(
{
class: "green",
enable_titlebar: true,
persistent: false
});
msg.show(["Reminder", html]);
}
remind("Water the trees.");
Run This Demo
Structure
Four elements are created with the following ids:
"Msg-container-id" (with classes: "Msg-container" and "Msg-container-class")
"Msg-window-id" (with classes: "Msg-window" and "Msg-window-class")
"Msg-content-container-id" (with classes: "Msg-content-container" and "Msg-content-container-class")
"Msg-content-id" (with classes: "Msg-content" and "Msg-content-class")
These elements are optional:
"Msg-overlay-id" (with classes: "Msg-overlay" and "Msg-overlay-class") (Created by default)
"Msg-topbar-id" (with classes: "Msg-topbar" and "Msg-topbar-class") (Created if Msg-window-inner-x or Msg-titlebar are created)
"Msg-titlebar-id" (with classes: "Msg-titlebar" and "Msg-titlebar-class") (Not created by default)
"Msg-window-inner-x-id" (with classes: "Msg-window-inner-x" and "Msg-window-inner-x-class") (Created by default)
"Msg-window-floating-x-id" (with classes: "Msg-window-floating-x" and "Msg-window-floating-x-class") (Not created by default)
"Msg-overlay-x-id" (with classes: "Msg-overlay-x" and "Msg-overlay-x-class") (Not created by default)
"Msg-progressbar-container-id" (with classes: "Msg-progressbar-container" and "Msg-progressbar-container-class") (Created if Msg-progressbar is created)
"Msg-progressbar-id" (with classes: "Msg-progressbar" and "Msg-progressbar-class") (Not created by default)
By default, ids are based on the number of instances created, they are incremental. Custom ids and classes can be specified via options.
The z-index values of the windows are generated when they are shown, allowing for windows with different ids to stack on top of each other. This stack is called the zStack.
Stack Demo
Styling
You can set custom ids and classes via options.
You can play with the ids and classes to have different types of windows.
Elements can have multiple classes. For example, class:"foo bar" would create all elements with those classes, for example, content would have the classes "Msg-content", "Msg-content-foo" and "Msg-content-bar". It also works with specific classes, like content_class:"foo bar".
If you don't want a class name to be turned into the Msg-element-classname format, you can append a "!" to it. For example overlay_class:"!glow" would use "glow" instead of "Msg-overlay-glow".
The Msg-content's padding is set depending on your settings, to try to make it look pleasing in different situations.
To override the css you will probably need to use !important declarations.
The following options can be passed inside an object when creating an instance:
id (Default: Number of instances): The id of the instance. For example, id:"foo".
class (Default: "default"): The class of the instance. For example, class:"bar". It can be multiple classes, for example, class:"one two three".
container_class (Default: undefined): If this is defined, the Msg-container will use this instead of the class option.
overlay_class (Default: undefined): If this is defined, the Msg-overlay will use this instead of the class option.
window_class (Default: undefined): If this is defined, the Msg-window will use this instead of the class option.
topbar_class (Default: undefined): If this is defined, the Msg-topbar will use this instead of the class option.
titlebar_class (Default: undefined): If this is defined, the Msg-titlebar will use this instead of the class option.
content_class (Default: undefined): If this is defined, the Msg-content will use this instead of the class option.
window_inner_x_class (Default: undefined): If this is defined, the Msg-window-inner-x will use this instead of the class option.
window_floating_x_class (Default: undefined): If this is defined, the Msg-window-floating-x will use this instead of the class option.
window_overlay_x_class (Default: undefined): If this is defined, the Msg-overlay-x will use this instead of the class option.
progressbar_container_class (Default: undefined): If this is defined, the Msg-progressbar-container will use this instead of the class option.
progressbar_class (Default: undefined): If this is defined, the Msg-progressbar will use this instead of the class option.
lock (Default: true): Prevents scrolling from propagating to the body. This is done through css by adding a class to the body temporarily.
locked_element (Default: "body"): String argument for document.querySelector() to find the element to be locked.
close_on_overlay_click (Default: true): Closes the window when the overlay is clicked.
close_on_escape (Default: true): Closes the window when Escape is pressed.
closeable (Default: true): Whether the window is closable at all.
clear_editables (Default: false): When pressing Escape, it clears the text from an active input=text or textarea element, if it has a value. If it's empty and close_on_escape is true, it closes the window.
persistent (Default: true): When true, it keeps the html elements in the dom when the window is closed. If false, it destroys the html elements on close.
remove_after_close (Default: true): If true, it will destroy the html elements and remove the instance from the instance registry after close.
temp_disable_close (Default: false): Makes it unable to close the window temporarily.
temp_disable_close_delay (Default: 1000): The amount of time in milliseconds the window is temporarily unclosable since it's shown.
temp_disable_click (Default: false): Disables clicks inside the window temporarily.
temp_disable_click_delay (Default: 1000): The amount of time in milliseconds clicks inside the window are disabled since it's shown.
temp_disable_keys (Default: false): Disables key input on the whole document temporarily.
temp_disable_keys_delay (Default: 1000): The amount of time in milliseconds keys will be disabled since the window is shown.
position (Default: "center"): The position of the window in the screen. Either "center", "left" (hStackable), "right" (hStackable), "top" (vStackable), "bottom" (vStackable), "topleft" (vStackable) (hStackable), "topright" (vStackable) (hStackable), "bottomleft" (vStackable) (hStackable), or "bottomright" (vStackable) (hStackable).
window_width (Default: "auto"): The width of the Msg-window.
window_height (Default: "auto"): The height of the Msg-window.
window_min_width (Default: "auto"): The min-width of the Msg-window.
window_min_height (Default: "auto"): The min-height of the Msg-window.
window_max_width (Default: "80vw"): The max-width of the Msg-window.
window_max_height (Default: "80vh"): The max-height of the Msg-window.
window_cursor (Default: "default"): The cursor of the Msg-window. For example, "pointer" or "none".
window_unselectable (Default: false): If true, it will make the window's content unselectable. For example by dragging with the mouse.
edge_padding_x (Default: 20): The horizontal padding in pixels from the edge of the screen. Some positions don't support this.
edge_padding_y (Default: 20): The vertical padding in pixels from the edge of the screen. Some positions don't support this.
sideStack (Default: "vertical"): Either "vertical", "horizontal" or "none". This is what allows popup windows to stack on top of each other vertically or appear side by side horizontally.
sideStack_padding (Default: 20): The separation in pixels between vertically or horizontally stacked windows.
sideStack_collapse (Default: true): Whether windows in a vertical or horizontal stack collapse when a window is closed.
zStack_level (Default: 2): Level 1 zStacks start at a z-index of 5000000 (5 with 6 zeros), Level 2 zStacks start at a z-index of 50000000 (5 with 7 zeros). This is useful if you want to have popup messages that don't go above the modal windows.
autoclose (Default: false): Closes the window automatically after a certain amount of time.
autoclose_delay (Default: 5000): The amount of time in milliseconds that must pass before closing the window.
enable_titlebar (Default: false): Whether Msg-titlebar is created or not.
center_titlebar (Default: false): A mode where the text is placed in the center relative to the window. It adjusts to window_x settings.
enable_progressbar (Default: false): Whether Msg-progressbar is created or not.
bind_progressbar_to_autoclose (Default: true): If this is true, the progressbar will reflect the autoclose delay when the window is shown.
reverse_autoclose_progressbar (Default: false): If this is true, instead of the autoclose progressbar animation starting at 100% width and going down to 0%, it starts at 0% and goes up to 100%.
show_delay (Default: 0): The amount of time in milliseconds show() is delayed from executing when called. Useful if you want to open the window after the body has fully loaded or other cases.
close_delay (Default: 0): The amount of time in milliseconds close() is delayed from executing when called.
close_on_show (Default: false): When show() is called it will first close the window and then show it. Useful for snackbars.
close_others_on_show (Default: false): When the window is first shown it will close all other open windows.
scroll_on_show (Default: true): Whether the scrolltop of Msg-content-container will become 0 on show. In other words, if it will automatically be scrolled to the top on show if there is overflow.
enable_overlay (Default: true): Whether the overlay is created or not.
window_x (Default: "inner_right"): Makes an x to close the window inside the window. Either "inner_right", "inner_left", "floating_right", "floating_left" or "none".
overlay_x (Default: "none"): Makes an x to close the window inside the overlay. Either "right", "left" or "none".
show_effect (Default: "fade"): Either "fade", "scale", slide_up", "slide_down", "slide_left", "slide_right" or "none". Some positions don't support certain kinds of slide effects.
show_effect_duration (Default: [200, 200]): The amount of time in milliseconds it takes to complete the show_effect. If an array with 2 numbers is given, the first number refers to the overlay effect duration, while the second one refers to the window effect duration, which starts after the overlay effect is finished. If just a number is given, it will be the effect duration for both the overlay and the window, which start at the same time.
subsequent_show_effects (Default: false): If true, it will show the show_effect on show() even if the window is already open.
close_effect (Default: "fade"): Either "fade", "scale", "slide_up", "slide_down", "slide_left", "slide_right" or "none". Some positions don't support certain kinds of slide effects.
close_effect_duration (Default: [200, 200]): The amount of time in milliseconds it takes to complete the close_effect. If an array with 2 numbers is given, the first number refers to the window effect duration, while the second one refers to the overlay effect duration, which starts after the window effect is finished. If just a number is given, it will be the effect duration for both the window and the overlay, which start at the same time.
replace_linebreaks (Default: false): If true, strings passed to show() or set() will have every "\n" replaced with an html linebreak.
before_show (Default: Empty Function): Function that triggers before the show method. Receives the instance as an argument. If false is returned it aborts the execution.
after_show (Default: Empty Function): Function that triggers after the show method. Receives the instance as an argument.
before_set (Default: Empty Function): Function that triggers before the set method. Receives the instance as an argument. If false is returned it aborts the execution.
after_set (Default: Empty Function): Function that triggers after the set method. Receives the instance as an argument.
before_set_title (Default: Empty Function): Function that triggers before the set_title method. Receives the instance as an argument. If false is returned it aborts the execution.
after_set_title (Default: Empty Function): Function that triggers after the set_title method. Receives the instance as an argument.
before_set_progress (Default: Empty Function): Function that triggers before the set_progress method. Receives the instance as an argument. If false is returned it aborts the execution.
after_set_progress (Default: Empty Function): Function that triggers after the set_progress method. Receives the instance as an argument.
before_close (Default: Empty Function): Function that triggers before the close method. Receives the instance as an argument. If false is returned it aborts the execution.
after_close (Default: Empty Function): Function that triggers after the close method. Receives the instance as an argument.
after_last_closed (Default: Empty Function): Function that triggers after the last remaining open window was closed. Receives the instance as an argument.
before_toggle (Default: Empty Function): Function that triggers before the toggle method. Receives the instance as an argument. If false is returned it aborts the execution.
after_toggle (Default: Empty Function): Function that triggers after the toggle method. Receives the instance as an argument.
before_create (Default: Empty Function): Function that triggers before the create method. Receives the instance as an argument. If false is returned it aborts the execution.
after_create (Default: Empty Function): Function that triggers after the create method. Receives the instance as an argument.
before_destroy (Default: Empty Function): Function that triggers before the destroy method. Receives the instance as an argument. If false is returned it aborts the execution.
after_destroy (Default: Empty Function): Function that triggers after the destroy method. Receives the instance as an argument.
while_open (Default: Empty Function): Function that runs in an interval as long as the window is open. Receives the instance as an argument.
while_open_interval (Default: 1000): Function that triggers after the destroy method. Receives the instance as an argument.
on_click (Default: Empty Function): Function that triggers when either Msg-content, Msg-topbar, Msg-titlebar or Msg-progressbar are clicked.
disable_transformations (Default: false): Disables transformations applied to windows to center them or put them in a certain place. Applies top and left to 0 as well.
disable_content_padding (Default: false): Doesn't apply padding to content.
full_content (Default: false): Makes content height 100vh and width 100vw.
instance.container: The Msg-container html element.
instance.overlay: The Msg-overlay html element.
instance.overlay_x: The Msg-overlay-x html element.
instance.topbar: The Msg-topbar html element.
instance.titlebar: The Msg-titlebar html element.
instance.window_inner_x: The Msg-window-inner-x html element.
instance.window_floating_x: The Msg-window-floating-x html element.
instance.window: The Msg-window html element.
instance.content-container: The Msg-content-container html element.
instance.content: The Msg-content html element.
instance.progressbar-container: The Msg-progressbar-container html element.
instance.progressbar: The Msg-progressbar html element.
instance.options: The options object of the instance.
Methods
instance.show(html): Opens a window with the received string or html element as its content and puts it at the top of the zStack.
instance.show([title, html]): An alternative way to call show is passing an array with the title for the titlebar and the content html. Useful if you have the titlebar enabled and you want to change both things in the same call.
instance.show(): If no arguments are passed to show(), it displays the window with the last used html or the one passed to set() and puts it at the top of the zStack.
Note: instance.show can receive a callback function argument which is returned at the end of the function with the instance as an argument. It returns after the after_show event. This is useful if you have effects enabled and you want to do something as soon as the window is fully open.
For example:
msg.show("some text", function(instance)
{
console.log("Window is fully open.");
});
instance.set(html): Updates the html of the window without opening it. This is useful if you want to prepare the content without showing the window or if you want to change the content of the window without triggering the show events.
instance.set_or_show(html): If the window is open and at the top of the stack it changes the html content by calling set(). If the window is closed or not at the top of the stack it opens the window and shows the html content by calling show(). It supports a callback as an optional second argument, which is either sent to show() or returned immediately after calling set().
instance.set_title(html): Updates the html of the titlebar. This doesn't open the window.
instance.close(): Closes the window.
Note: instance.close can receive a callback function argument which is returned at the end of the function with the instance as an argument. It returns after the after_close event. This is useful if you have effects enabled and you want to do something as soon as the window is fully closed.
For example:
msg.close(function(instance)
{
console.log("Window is fully closed.");
});
instance.toggle(): If the window is closed it opens it. If the window is open it closes it.
instance.html(): A shortcut for instance.content.innerHTML. Returns "" if the html elements have not been created yet.
instance.title_html(): A shortcut for instance.titlebar.innerHTML. Returns "" if the titlebar element is not created.
instance.is_open(): Returns true if the window is open.
instance.any_open(): Returns true if any window with any id is open.
instance.any_higher_open(): Returns true if any window with zStack_level 2 is open. These are usually modals and windows.
instance.any_lower_open(): Returns true if any window with zStack_level 1 is open. These are usually popups and snackbars.
instance.num_open(): Returns the number of windows open.
instance.num_open_higher(): Returns the number of windows open with zStack_level 2. These are usually modals and windows.
instance.num_open_lower(): Returns the number of windows open with zStack_level 1. These are usually popups and snackbars.
instance.create(): Creates the html elements if they don't exist yet. This is done automatically on the first show() or set(), but there might be cases where you might want to create them first without showing anything.
instance.recreate(): Removes the html elements from the dom and creates them again. This should be called after ids or classes are changed.
instance.destroy(): Removes the html elements from the dom.
instance.remove(): Destroys the html elements and removes the instance from the instance registry. So it won't appear in instance.instances() for example.
instance.highest_zIndex(): Returns the highest z-index among all the created Msg-container elements. If it retuns -2000 it means no elements have been created.
instance.highest_instance(): It returns the instance with the highest z-index. If none is open it returns false.
instance.is_highest(): Returns true if the window is visible and at the top of the zStack.
instance.to_top(): Puts an already opened window at the top of the zStack. This is done automatically by show(), but there might be cases where you want to do this without triggering the show events.
instance.check_options(): This is done automatically when creating an instance. It checks the options object and applies the corresponding defaults to undefined properties.
instance.set_progress(percentage): Fills the progressbar to the specified percentage.
instance.get_progress(): Returns the current percentage of the progressbar.
instance.instances(): Returns a list with the created instances.
instance.higher_instances(): Returns a list with the created instances with zStack_level 2. These are usually modals and windows.
instance.lower_instances(): Returns a list with the created instances with zStack_level 1. These are usually popups and snackbars.
instance.get_instance_by_id(id): Returns an instance that has the specified instance id.
instance.show_all(): Opens all the windows.
instance.close_all(): Closes all the windows. Can receive a callback.
instance.close_all_higher(): Closes all the windows with zStack_level 2. These are usually modals and windows. Can receive a callback.
instance.close_all_lower(): Closes all the windows with zStack_level 1. These are usually popups and snackbars. Can receive a callback.
instance.create_all(): Creates the html elements of all the instances.
instance.recreate_all(): Recreates the html elements of all the instances.
instance.destroy_all(): Removes the html elements of all the instances.


R/ts_ymwdh_tbl.R
ts_ymwdh_tbl.Rd
Returns a tibble that has year, month, week, week day and hour added from a date column
ts_ymwdh_tbl(.data, .date_col)
| .data | The data that is being analyzed, data must be a tibble/data.frame |
|---|---|
| .date_col | The column of the tibble that holds the date |
A tibble
Supply data with a date column and this will add the year, month, week, week day and hour to the tibble. The original date column is kept.
Returns a tibble.
You must know the data going into the function and if certain columns should be dropped or kept when using further functions
Future work - Add boolean for pad_by_time to fill in missing time series information
library(timetk) library(dplyr) library(lubridate) ts_ymwdh_tbl( .data = m4_daily , .date_col = date )#> # A tibble: 9,743 x 8 #> id date value yr mn wk wd hr #> <fct> <date> <dbl> <dbl> <ord> <dbl> <ord> <int> #> 1 D10 2014-07-03 2076. 2014 Jul 27 Thu 0 #> 2 D10 2014-07-04 2073. 2014 Jul 27 Fri 0 #> 3 D10 2014-07-05 2049. 2014 Jul 27 Sat 0 #> 4 D10 2014-07-06 2049. 2014 Jul 27 Sun 0 #> 5 D10 2014-07-07 2006. 2014 Jul 28 Mon 0 #> 6 D10 2014-07-08 2018. 2014 Jul 28 Tue 0 #> 7 D10 2014-07-09 2019. 2014 Jul 28 Wed 0 #> 8 D10 2014-07-10 2007. 2014 Jul 28 Thu 0 #> 9 D10 2014-07-11 2010 2014 Jul 28 Fri 0 #> 10 D10 2014-07-12 2002. 2014 Jul 28 Sat 0 #> # ... with 9,733 more rows


OutputFormatter
In this seventh chapter I want to write about, how to send your data in different formats and types to the client. By default the ASP.NET Core Web API sends the data as JSON, but there are some more ways to send the data.
About OutputFormatters
OutputFormatters are classes that turn your data into a different format to sent them trough HTTP to the clients. Web API uses a default OutputFormatter to turn objects into JSON, which is the default format to send data in a structured way. Other built-in formatters are a XML formatter and a plain text formatter.
With the - so called - content negotiation the client is able to decide which format he wants to retrieve .The client needs to specify the content type of the format in the Accept-Header. The content negotiation is implemented in the ObjectResult.
By default the Web API always returns JSON, even if you accept text/xml
in the header. This is why the build in XML formatter is not registered by default. There are two ways to add a XmlSerializerOutputFormatter
to ASP.NET Core:
services.AddControllers()
.AddXmlSerializerFormatters();
or
services.AddControllers()
.AddMvcOptions(options =>
{
options.OutputFormatters.Add(new XmlSerializerOutputFormatter());
});
There is also a XmlDataContractSerializerOutputFormatter available.
Also any Accept header gets turned into application/json
. If you want to allow the clients to accept different headers, you need to switch that translation off:
services.AddControllers()
.AddMvcOptions(options =>
{
options.RespectBrowserAcceptHeader = true; // false by default
});
Some third party components that don’t completely support ASP.NET Core 3.0, don’t write asynchronously to the response stream, but ASP.NET Core 3.0 doesn’t allow to write synchronously by default. To enable synchronous writing access you need to add these lines to the ConfigureServices
method:
services.Configure<KestrelServerOptions>(options =>
{
options.AllowSynchronousIO = true;
});
To try the formatters let’s setup a small test project.
Prepare a test project
Using the console we will create a small ASP.NET Core Web API project. Execute the following commands line by line:
dotnet new webapi -n OutputFormatterSample -o OutputFormatterSample
cd WebApiTest
dotnet add package GenFu
dotnet add package CsvHelper
This creates a new Web API projects and adds two NuGet packages to it. GenFu is an awesome library to easily create test data. The second one helps us to easily write CSV data.
Now open the project in Visual Studio or in Visual Studio Code and open the ValuesController.cs
and change the Get()
method like this:
[HttpGet]
public ActionResult<IEnumerable<Person>> Get()
{
var persons = A.ListOf<Person>(25);
return persons;
}
This crates a list of 25 Persons using GenFu. The properties get automatically filled with almost realistic data. You’ll see the magic of GenFu and the results later on.
In the models folder create a new file Person.cs
with the the Person
class inside:
public class Person
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public string EmailAddress { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string Phone { get; set; }
}
Open the Startup.cs
as well and add the Xml formatters and allow other accept headers as described earlier:
services.AddControllers()
.AddMvcOptions(options =>
{
options.RespectBrowserAcceptHeader = true; // false by default
options.OutputFormatters.Add(new XmlSerializerOutputFormatter());
});
That’s it for now. Now you are able to retrieve the data from the Web API. Start the project by using the dotnet run
command.
The best tools to test a web API are Fiddler or Postman. I prefer Postman because it is easy to use. At the end it doesn’t matter which tool you want to use. In these demos here I’m going to use Postman.
Inside Postman I create a new request. I write the API url into the address field, which is https://localhost:5001/api/values and I add a header with the key Accept
and the Value application/json
.
After I press send I will see the JSON result in the response body below:
Here you can see the auto generated values. GenFu puts the data in based on the property type and the property name. So it puts real first names and real last names as well as real cities and phone numbers into the Person’s properties.
Now let’s test the XML output formatter.
In postman change the Accept header form application/json
to text/xml
and press send:
We now have an XML formatted output.
Now let’s go a step aheads and create some custom OutputFormatters.
Custom OutputFormatters
The plan is to create an VCard output to be able to import the person’s contacts directly to outlook or any other contact database that supports VCards. Later in this section we also want to create a CSV output formatter.
Both are text based output formatters and will derive from TextOutputFormatter
. Create a new class in a new file called VcardOutputFormatter.cs
:
public class VcardOutputFormatter : TextOutputFormatter
{
public string ContentType { get; }
public VcardOutputFormatter()
{
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("text/vcard"));
SupportedEncodings.Add(Encoding.UTF8);
SupportedEncodings.Add(Encoding.Unicode);
}
// optional, but makes sense to restrict to a specific condition
protected override bool CanWriteType(Type type)
{
if (typeof(Person).IsAssignableFrom(type)
|| typeof(IEnumerable<Person>).IsAssignableFrom(type))
{
return base.CanWriteType(type);
}
return false;
}
// this needs to be overwritten
public override Task WriteResponseBodyAsync(
OutputFormatterWriteContext context,
Encoding selectedEncoding)
{
var serviceProvider = context.HttpContext.RequestServices;
var logger = serviceProvider
.GetService(typeof(ILogger<VcardOutputFormatter>)) as ILogger;
var response = context.HttpContext.Response;
var buffer = new StringBuilder();
if (context.Object is IEnumerable<Person>)
{
foreach (var person in context.Object as IEnumerable<Person>)
{
FormatVcard(buffer, person, logger);
}
}
else
{
var person = context.Object as Person;
FormatVcard(buffer, person, logger);
}
return response.WriteAsync(buffer.ToString());
}
private static void FormatVcard(
StringBuilder buffer,
Person person,
ILogger logger)
{
buffer.AppendLine("BEGIN:VCARD");
buffer.AppendLine("VERSION:2.1");
buffer.AppendLine($"FN:{person.FirstName} {person.LastName}");
buffer.AppendLine($"N:{person.LastName};{person.FirstName}");
buffer.AppendLine($"EMAIL:{person.EmailAddress}");
buffer.AppendLine($"TEL;TYPE=VOICE,HOME:{person.Phone}");
buffer.AppendLine($"ADR;TYPE=home:;;{person.Address};{person.City}");
buffer.AppendLine($"UID:{person.Id}");
buffer.AppendLine("END:VCARD");
logger.LogInformation($"Writing {person.FirstName} {person.LastName}");
}
}
In the constructor we need to specify the supported media types and encodings. In the method CanWriteType()
we need to check whether the current type is supported within this output formatters. Here we only want to format a single Person
or a list of Persons
.
The method WriteResponseBodyAsync()
then actually writes the list of persons out to the response stream via a StringBuilder
.
At least we need to register the new VcardOutputFormatter
in the Startup.cs
:
services.AddControllers()
.AddMvcOptions(options =>
{
options.RespectBrowserAcceptHeader = true; // false by default
options.OutputFormatters.Add(new XmlSerializerOutputFormatter());
// register the VcardOutputFormatter
options.OutputFormatters.Add(new VcardOutputFormatter());
});
Start the app again using dotnet run
. Now change the Accept header to text/vcard
and let’s see what happens:
We now should see our date in the VCard format.
Let’s do the same for a CSV output. We already added the CsvHelper library to the project, so you can just copy the next snippet into your project:
public class CsvOutputFormatter : TextOutputFormatter
{
public string ContentType { get; }
public CsvOutputFormatter()
{
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("text/csv"));
SupportedEncodings.Add(Encoding.UTF8);
SupportedEncodings.Add(Encoding.Unicode);
}
// optional, but makes sense to restrict to a specific condition
protected override bool CanWriteType(Type type)
{
if (typeof(Person).IsAssignableFrom(type)
|| typeof(IEnumerable<Person>).IsAssignableFrom(type))
{
return base.CanWriteType(type);
}
return false;
}
// this needs to be overwritten
public override Task WriteResponseBodyAsync(
OutputFormatterWriteContext context,
Encoding selectedEncoding)
{
var serviceProvider = context.HttpContext.RequestServices;
var logger = serviceProvider
.GetService(typeof(ILogger<CsvOutputFormatter>)) as ILogger;
var response = context.HttpContext.Response;
var csv = new CsvWriter(new StreamWriter(response.Body));
if (context.Object is IEnumerable<Person>)
{
var persons = context.Object as IEnumerable<Person>;
csv.WriteRecords(persons);
}
else
{
var person = context.Object as Person;
csv.WriteRecord<Person>(person);
}
return Task.CompletedTask;
}
}
This almost works the same way. We can pass the response stream via a StreamWriter
directly into the CsvWriter
. After that we are able to feed the writer with the persons or the list of persons. That’s it.
We also need to register the CsvOutputFormatter
before we can test it.
services.AddControllers()
.AddMvcOptions(options =>
{
options.RespectBrowserAcceptHeader = true; // false by default
options.OutputFormatters.Add(new XmlSerializerOutputFormatter());
// register the VcardOutputFormatter
options.OutputFormatters.Add(new VcardOutputFormatter());
// register the CsvOutputFormatter
options.OutputFormatters.Add(new CsvOutputFormatter());
});
In Postman change the Accept
header to text/csv
and press send again:
Conclusion
Isn’t that cool? I really like the way to change the format based on the except header. This way you are able to create an Web API for many different clients and one that accepts many different formats. There are still a lot of potential clients out there which don’t use JSON and prefer XML or CSV.
The other way around would be an option to consume CSV or any other format inside the Web API. Let’s assume your client would send you a list of persons in CSV format. How would you solve this? Parsing the string manually in the action method would work, but it’s not a nice option. This is what ModelBinders can do for us. Let’s see how this works in the next chapter.
Sessions
This is series of articles on Building Conf planner app with Asp.net Core:
- 1 - Logging
- 2 - Configuration
- 3 - Dependency Injection
- 4 - Https
- 5 - Hostedservices
- 6 - Middlewares
- 7 - Outputformatter
- 8 - Modelbinders
- 9 - Actionfilters
- 10 - Taghelpers
- 11 - Webhostbuilder
- 12 - Hosting


--- layout: post title: How to Secure an Ubuntu Server date: 2012-08-23 10:23:00 summary: Recently I purchased a virtual ubuntu server on rackspace. However I have to manage it myself, and this includes first of all taking care for its security. Securing it is very important and is the first thing to be done, since all the rackspace servers have public IP-s and so are open to all the possible attacks from the Internet. Here I will describe some of the steps that can be done to secure the server. tags: [System Administration, Security, Ubuntu, Firewall, SSH] ---
Recently I purchased a virtual ubuntu server on rackspace. However I have to manage it myself, and this includes first of all taking care for its security. Securing it is very important and is the first thing to be done, since all the rackspace servers have public IP-s and so are open to all the possible attacks from the Internet. Here I will describe some of the steps that can be done to secure the server.
Initially you can login as user root, through ssh:
ssh<EMAIL_ADDRESS>Then you can change the password of the root (from the default one,
assigned by rackspace), with the command passwd
.
It is a common practice in Linux (and specially in ubuntu) to lock down the root account and to use another account for administrative tasks. Let's see how we can create it.
adduser administrator
adduser administrator sudo
One effective way of securing SSH access to your Cloud Server is to use a public/private key. This means that a public key is placed on the server and the private key is on your local workstation. This makes it impossible for someone to log in using just a password - they must have the private key. This consists of 3 basic steps: create the key on your local workstation, copy the public key to the Cloud Server, and set the correct permissions for the key.
mkdir ~/.ssh ssh-keygen -t rsa cd ~/.ssh/ mv id_rsa rackspace_rsa
If you do not want a passphrase then just press enter when prompted.
The id_rsa and id_rsa.pub are created in the .ssh directory. The id_rsa.pub file holds the public key. You'll place this file on you server. The id_rsa file is your private key. Never show, give away, or keep this file on a public computer. We rename it to rackspace_rsa to make it obvious that this is the private key that is used to access the rackspace server.
scp ~/.ssh/id_rsa.pub administrator@<IP_ADDRESS>0:/home/administrator/
ssh<EMAIL_ADDRESS>mkdir /home/administrator/.ssh mv /home/administrator/id_rsa.pub /home/administrator/.ssh/authorized_keys chown -R administrator: /home/administrator/.ssh chmod 700 /home/administrator/.ssh chmod 600 /home/administrator/.ssh/authorized_keys
Keeping the SSH service on the default port of 22 makes it an easy target. It is recommended to change the default SSH configuration to make it more secure. There are also some other configuration options that are used to lock down the ssh access to the server.
Modify the file /etc/ssh/sshd_config
by adding or editing these lines:
Port 1234 # change ssh port to 1234 Protocol 2 PermitRootLogin no # user root is not allowed to log in PasswordAuthentication no # disable password login, only the private key is accepted UseDNS no AllowUsers administrator # only user administrator is allowed to log in
Not all of these options are required, they overlap each-other, and you can choose which ones to use depending on your case and your security/flexibility requirements.
We need to restart the sshd service in order to enable these changes:
service ssh restart
After applying the changes, login from a second terminal (without logging out from the first one), in order to make sure that you can still login and you didn't lock yourself out of the server. Now you can login like this:
ssh -i ~/.ssh/rackspace_rsa -p 1234<EMAIL_ADDRESS>So, we use the key ~/.ssh/rackspace_rsa for authentication, access the ssh server on the port 1234, and login as user administrator.
By the way, in case that we need to copy something through scp, we can use a command like this:
scp -i ~/.ssh/rackspace_rsa -P 1234 source_file administrator@<IP_ADDRESS>0:destination_file
For simple firewalls, ufw is a great tool for building them easily. Let's say that we would like to allow only the ports 80, 443, and 1234 (don't forget to allow the ssh port, otherwise you can lock yourself out!). We can build the firewall like this:
ssh -i ~/.ssh/rackspace_rsa -p 1234<EMAIL_ADDRESS>ufw allow 1234 ufw allow 80 ufw allow 443 ufw enable
If you are familiar with iptables, then you may want to check out the iptables' rules that ufw has built, by using iptables-save.


We have learned the following:
Large vessels transiting Haro Strait are the dominant noise sources and these large commercial ships create lots of noise in the hearing range of the orcas.
Previous Slide
Next Slide


What I'm working on
Reading
Understanding Distributed Systems
.
Reading
Thinking in Systems
.
Sleeping better
home


Reimbursement Calculator
Calculate tuition reimbursement expiration dates and display a running total of the amount owed.
When companies provide tuition reimbursement to employees they may require that the employee stay with the company for a certain amount of time or have to pay back the money. This site allows someone to enter the dates/amounts they were reimbursed along with the duration of the obligation and displays a running total of the amount owed.
Reimbursement Submission
Date Reimbursed
$
Obligation Duration
Dates
| Date | +/- | Amount | Owed | |
|---|---|---|---|---|
Next obligation expires in 2 days


Staying Strong Despite Our Parkinson’s Challenges
by Sherri WoodbridgeThis column is about strength and how we endure despite our challenges with Parkinson’s.
As politician and actor Arnold Schwarzenegger once said, “Strength does not come from winning. Your struggles develop your strengths. When you go through hardships and decide not to surrender, that is strength.”
We often feel weak and tired. Our bodies can’t move in the ways they once could. We can’t exert ourselves the way we used to. Though physically we may feel that we are losing ground with Parkinson’s disease, we persevere, putting one foot in front of the other as we keep moving forward.
Our abilities are stronger than our disabilities
When we have Parkinson’s disease, we are considered disabled. Our movements, our senses, and our abilities to engage in the activities we once enjoyed may be limited or impaired. We can feel that we are powerless against a force that seeks to destroy us.
However, we are strong despite this disease. Though our physical strength might wane, we summon our mental and emotional resources to push onward. We are resilient and unrelenting in our determination to win our battle with this disease.
I believe that people with a chronic disease such as Parkinson’s often have a greater tendency than others to exhibit a positive attitude. We have been forced to face our mortality, and as a consequence, we can be more open and see clearly the daily blessings bestowed upon us.
A positive attitude brings life into a room
Negativity is replaced with optimism and laughter. Having a positive attitude is a sign of strength of character. When things are on the downturn, we are looking for a way up and out. A positive attitude is a frame of mind that says “I can” instead of “I can’t.” We believe that “it’s possible” rather than “impossible.”
Strong people are grateful despite their circumstances and know how to encourage others because of what they have been through. They continue on their journey, bringing hope to others and light to the dark places.
Do you shine light into the lives of others? I hope that I do.
Note: Parkinson’s News Today is strictly a news and information website about the disease. It does not provide medical advice, diagnosis, or treatment . This content is not intended to be a substitute for professional medical advice, diagnosis, or treatment . Always seek the advice of your physician or another qualified health provider with any questions you may have regarding a medical condition. Never disregard professional medical advice or delay in seeking it because of something you have read on this website. The opinions expressed in this column are not those of Parkinson’s News Today or its parent company, BioNews Services, and are intended to spark discussion about issues pertaining to Parkinson’s disease.
http://www.parkinsonsjourney.com
Sherri was diagnosed with Young Onset Parkinson’s disease over fifteen years ago. She can be found working in her garden, going for walks, taking pictures, or reading books to her three favorite grandkids. Taking life somewhat slower, and perhaps with guarded steps, but she’s not giving in.
×
Sherri Woodbridge
Sherri was diagnosed with Young Onset Parkinson’s disease over fifteen years ago. She can be found working in her garden, going for walks, taking pictures, or reading books to her three favorite grandkids. Taking life somewhat slower, and perhaps with guarded steps, but she’s not giving in.
http://www.parkinsonsjourney.com


Blogify
Dashboard
Posts
Categories
Users
Subhom
Logout
Add Post
Add Category
Latest Posts
#
Title
Category
Date
By
1
Food that will keep you fresh all the time
Food
May 10 2019
Sabrina
Details
Posts
1
View
Categories
5
View
Users
4
View
Add Post
×
Category:
Web Technology
Food
Tech Gadgets
Business
Health & Wellness
Upload Image:
Choose File
Max Size 3Mb
Add Category
×


Deployment with YARN
How to launch a Gearpump cluster on YARN
-
Upload the
gearpump-2.11-0.7.3.zip
to remote HDFS Folder, suggest to put it under/usr/lib/gearpump/gearpump-2.11-0.7.3.zip
-
Make sure the home directory on HDFS is already created and all read-write rights are granted for user. For example, user
gear
’s home directory is/user/gear
-
Put the YARN configurations under classpath. Before calling “yarnclient launch”, make sure you have put all yarn configuration files under classpath. Typically, you can just copy all files under
$HADOOP_HOME/etc/hadoop
from one of the YARN Cluster machine toconf/yarnconf
of gearpump.$HADOOP_HOME
points to the Hadoop installation directory. -
Launch the gearpump cluster on YARN
yarnclient launch -package /usr/lib/gearpump/gearpump-2.11-0.7.3.zip
If you don’t specify package path, it will read default package-path (
gearpump.yarn.client.package-path
) fromgear.conf
.NOTE: You may need to execute
chmod +x bin/*
in shell to make the script fileyarnclient
executable. -
After launching, you can browser the Gearpump UI via YARN resource manager dashboard.
How to configure the resource limitation of Gearpump cluster
Before launching a Gearpump cluster, please change configuration section gearpump.yarn
in gear.conf to configure the resource limitation, like:
- The number of worker containers.
- The YARN container memory size for worker and master.
How to submit a application to Gearpump cluster.
To submit the jar to the Gearpump cluster, we first need to know the Master address, so we need to get a active configuration file first.
There are two ways to get an active configuration file:
-
Option 1: specify “-output” option when you launch the cluster.
yarnclient launch -package /usr/lib/gearpump/gearpump-2.11-0.7.3.zip -output /tmp/mycluster.conf
It will return in console like this:
================================================ ==Application Id: application_1449802454214_0034
-
Option 2: Query the active configuration file
yarnclient getconfig -appid <yarn application id> -output /tmp/mycluster.conf
yarn application id can be found from the output of step1 or from YARN dashboard.
-
After you downloaded the configuration file, you can launch application with that config file.
gear app -jar examples/wordcount-2.11-0.7.3.jar -conf /tmp/mycluster.conf
-
To run Storm application over Gearpump on YARN, please store the configuration file with
-output application.conf
and then launch Storm application withstorm -jar examples/storm-2.11-0.7.3.jar storm.starter.ExclamationTopology exclamation
-
Now the application is running. To check this:
gear info -conf /tmp/mycluster.conf
-
To Start a UI server, please do:
services -conf /tmp/mycluster.conf
How to add/remove machines dynamically.
Gearpump yarn tool allows to dynamically add/remove machines. Here is the steps:
-
First, query to get active resources.
yarnclient query -appid <yarn application id>
The console output will shows how many workers and masters there are. For example, I have output like this:
masters: container_1449802454214_0034_01_000002(IDHV22-01:35712) workers: container_1449802454214_0034_01_000003(IDHV22-01:35712) container_1449802454214_0034_01_000006(IDHV22-01:35712)
-
To add a new worker machine, you can do:
yarnclient addworker -appid <yarn application id> -count 2
This will add two new workers machines. Run the command in first step to check whether the change is effective.
-
To remove old machines, use:
yarnclient removeworker -appid <yarn application id> -container <worker container id>
The worker container id can be found from the output of step 1. For example “container_1449802454214_0034_01_000006” is a good container id.
Other usage:
-
To kill a cluster,
yarnclient kill -appid <yarn application id>
NOTE: If the application is not launched successfully, then this command won’t work. Please use “yarn application -kill
" instead. -
To check the Gearpump version
yarnclient version -appid <yarn application id>


Main
NOW ARRIVING AT
[sectorname]
....
Sector Stats
Fuel :
Organic :
Equiments :
Trade
Buy
Buy
Buy
Cargo Status
Fuel :
Organic :
Equiments :
Turns :
Credits :
Navigation
CHARGING......
Recall
Clear


selection
select all
clear
inverse selection
contain of
0 items
rename selected
set new value for selected
delete selected
disable selected
generate nodes
gen nodes
random names
all nodes operations
remove all (clear tree)
enable all
collapse all
expand all
other
disable tree
enable tree


| MATLAB 文件帮助: cv.pyrMeanShiftFiltering | 查看 cv.pyrMeanShiftFiltering 的代码 | Index |
pyrMeanShiftFiltering Performs initial step of meanshift segmentation of an image
dst = cv.pyrMeanShiftFiltering(src)
dst = cv.pyrMeanShiftFiltering(src, 'OptionName',optionValue, ...)
src
.struct('type','Count+EPS', 'maxCount',5, 'epsilon',1.0)
.
Struct with the following fields is accepted:The function implements the filtering stage of meanshift segmentation, that
is, the output of the function is the filtered "posterized" image with color
gradients and fine-grain texture flattened. At every pixel (X,Y)
of the
input image (or down-sized input image, see below) the function executes
meanshift iterations, that is, the pixel (X,Y)
neighborhood in the joint
space-color hyperspace is considered:
(x,y): X-sp <= x <= X+sp, Y-sp <= y <= Y+sp, ||(R,G,B) - (r,g,b)|| <= sr
where (R,G,B)
and (r,g,b)
are the vectors of color components at (X,Y)
and (x,y)
, respectively (though, the algorithm does not depend on the
color space used, so any 3-component color space can be used instead). Over
the neighborhood the average spatial value (X',Y')
and average color
vector (R',G',B')
are found and they act as the neighborhood center on the
next iteration:
(X,Y) (X',Y'), (R,G,B) (R',G',B').
After the iterations over, the color components of the initial pixel (that is, the pixel from where the iterations started) are set to the final value (average color at the last iteration):
I(X,Y) = (R*,G*,B*)
When MaxLevel > 0
, the gaussian pyramid of MaxLevel+1
levels is built,
and the above procedure is run on the smallest layer first. After that, the
results are propagated to the larger layer and the iterations are run again
only on those pixels where the layer colors differ by more than SR
from
the lower-resolution layer of the pyramid. That makes boundaries of color
regions sharper. Note that the results will be actually different from the
ones obtained by running the meanshift procedure on the whole original image
(i.e. when MaxLevel = 0
).