text:
Home > What We Do > Sports > The Football Association > The FA eNews > Changes to termination payments tax
Changes to termination payments tax
On 10 August 2016, HMRC published the response to its 2015 consultation about simplifying the way termination payments are taxed. They also published draft legislation (intended to be effective from April 2018) for further consultation and the deadline for responses was 5 October 2016.
Currently the tax treatment of payments made on the termination of someone's employment, such as payments in lieu of notice (PILON), holiday pay and retirement payments, depends largely on whether or not the payment is contractual.
There are also a number of specific exemptions, including for injury, death or employment performed outside the UK (foreign services exemption), and the armed forces.
Key proposals
The aim of the consultation is to simplify the tax treatment of termination payments in a number of ways:
1. The first £30,000 will remain free from income tax and national insurance (NIC) where the payment relates purely to termination. However, all payments an employee should have received during their notice period will be classed as general earnings and taxed accordingly. This will include notice pay as well as any "expected bonus income" which an employee could reasonably have expected to receive if they had worked their notice.
2. The difference between contractual and non-contractual PILON clauses will also be removed. This means from April 2018 all PILON will be subject to income tax, employer and employee NICs, and not just contractual PILON.
3. Employer NICs will be due on all payments made over £30,000 are subject to income tax.
There are no proposals to add new exemptions however, two of the existing exemptions will be removed:
foreign service relief (other than in relation to seafarers); and
payments made for injury to feelings (except where this amounts to psychiatric injury or a recognised medical condition). HMRC believes that this is necessary due to the differing judicial decisions on this point.
Overall, if these changes are implemented in 2018, it will be interesting to see whether or not they have the desired effect of simplifying the way termination payments are taxed.
In particular, some have voiced concerns that the removal of existing exemptions will in fact add to the complexities on an employee's termination. It will also no doubt change the approach taken to settle "without prejudice" negotiations.
If you have any queries on what the changes mean for your club, please call our dedicated County FA Helpline on 08448 240 432 or email [email protected].
How to agree contracts that pay off
Expert advice on avoiding common contractual pitfalls.
Sexual harassment in the wake of #MeToo – what has changed?
Our experts provide a summary of key changes in employment law since the movement, as well as top tips for employers when faced with allegations of sexual harassment.
Meaning of "Practical Completion"
How important is the certifier's judgement?


Reagents of a series REAPON-IK (brand Reapon-IK-1, Reapon-IK-1M, Reapon-IK-2, Reapon-IK-2M)- a composition of surfactants in solvent. Are intended for preparation sulphurous and not-sulphurous, highparaffinic oil and simultaneous protection against corrosion of the oil-field equipment. Application REAPON-I for intratrumpet demulsation oil emulsion by submission of a reagent in pipelines in concentration from 5 up to 25 g/tn oil with the possible subsequent injection on the device for preparation of oil is the most effective.
Reagents of a series REAPON-I - a composition of surfactants in solvent. Are intended for preparation sulphurous and not-sulphurous, highparaffinic oil and simultaneous protection against corrosion of the oil-field equipment. Application REAPON-I for intratrumpet demulsation oil emulsion by submission of a reagent in pipelines in concentration from 5 up to 25 g/tn oil with the possible subsequent injection on the device for preparation of oil is the most effective.
Reagents of a series REAPON-I - a composition of surfactants in solvent. Are intended for preparation sulphurous and not-sulphurous, highparaffinic oil and simultaneous protection against corrosion of the oil-field equipment. Application REAPON-I for intratrumpet demulsation oil emulsion by submission of a reagent in pipelines in concentration from 5 up to 25 g/tn oil with the possible subsequent injection on the device for preparation of oil is the most effective. Industrial application on objects of oil-production companies "Tatneft", "Bashneft", "Belarusneft", "Orenburgneft", "LUKOIL-Komi" and Western Siberia proves to high demulsifiing, inhibiting properties of reagents. Their efficiency is confirmed also by conclusions Hoehst and Oxidental Petroleum.
Demulsifiers – inhibitors of corrosion of a series REAPON-I do not render negative influence on process of oil refining. According to toxicological researches concern to 3-d class of danger (moderately dangerous substances).


For sale is a Luis Feu de Mesquita Cedar/Rosewood Tenor w/ cutaway & pickup. Western red cedar top with East Indian rosewood back & sides. Curly maple binding top & back. Sounds amazing. Gloss finish. Fishman PRO-AG0-UKE pickup.
I'm sure most already know of Luis Feu de Mesquita (LFdM) ukuleles so I don't need to say much about how outstanding this uke is. This tenor delivers the sounds and looks. This style of build allows for a very lively, and very thin top. The lattice bracing keeps the top and the bridge together, very flat. This causes the entire soundboard to be pumped and move together from the edges. This has been thought to improve sustain.
Condition: Well loved. Some scratches due to the soft top...an area on the top and an area behind the bridge (see picture album). I am the second owner. When Luis made this uke in 2011, he put side position markers on the 9th and 14th instead of the 10th and 15th. The first owner had a luthier fill in the 9th and 14th markers and add a new marker at the 10th. Visible pores on the rosewood back glossy finish.
Love this uke, but continuing to downsize.
Built in 2011, in the style of Selmer-Maccaferri gypsy guitars (I am the 2nd owner).
Western red cedar top with beautiful color.
Spanish Cedar Neck with rosewood/walnut?
17″ scale and are 38 mm at the nut.
SOLD No CITES papers on the EI rosewood so can only ship within USA.
Sorry, didn't realize it had gotten full. All clear now.
This won't last long. Being a LfdM owner and a friend with Hodge we have talked about this particular instrument. He really thinks very highly of the sound and has kept this in his stable while other much more expensive customs were sold. Luis has changed the headstock and neck size over the years but the body and bracing remain the same and so does the exemplary sound.
Best of luck Hodge......but you won't need it at that price.


Oneseason viscose top is a beautiful effortless item of clothing perfect for beachwear or festivals. Super easy to wash and if you hang it up with a shake straight away, there is no ironing. Wear over a bikini, around the pool or on the beach. You can team with denim shorts or jeans.


Starting off with deep blue Czech drops which I wire wrapped to a lovely, circular connector.
The lot is then attached to a sparkling, lighter blue crystal rondelle and threaded to wire wrapped lever back ear wires which are embellished with sparkling blue Swarovski crystals.
- Total length is 7cm.
- All metal is solid brass which has been oxidised, polished and finally sealed with a non-toxic jewellery lacquer to protect the colour and shine.


Cedro \ce(d)-ro\ as a boy's name is pronounced SED-droh. It is of Spanish origin. Cedro and Cidro (SEE-droh) are Spanish short forms of Isadoro.
For more information, see also the related name Cedric.
A baby name that sounds like Cedro is Starr. Other similar baby names are Pedro, Cesaro, Cedrik, Ced, Ceri, Ciro, Pedrio and Zero.


text:
"Tosh.0" Weaves a Web of Humor
New season for this comedy compilation of Internet video bodes for more TV laughs
By Jere Hester
Daniel Tosh is coming back to mine the Web for more laughs.
Daniel Tosh and Allen Funt are separated by generations, but both stand as meta men ahead of their respective times.
The seemingly unlikely comparison comes to mind as Tosh's Comedy Central show, "Tosh.0" – an Internet-driven mix with echoes of "America's Funniest Home Videos," "Jackass" and Funt's groundbreaking "Candid Camera" – kicks off the first of 16 new episodes Wednesday.
Media philosopher Marshall McLuan famously noted that the "medium is the message." To Tosh, like Funt, the medium is the joke, providing a forum and a form for new comic possibilities.
In the 1940s, when radios filled living rooms, Funt created a show called "Candid Microphone," which squeezed laughs out of practical jokes captured on audiotape. Of course, he's better known for the sequel, "Candid Camera," which transformed the premise to fit the new medium of television and grew into a cultural touchstone along with the TV boom.
Top Entertainment Photos
With the advent of affordable home video cameras, we saw a shift toward the do-it-yourself era two decades ago with "America's Funniest Home Videos," where funny moments were shared across the most prevalent medium, television. "Jackass" took this concept in another direction a decade later by staging filmed stunts for our sick-humor consumption – spurring copycats in the process.
Tosh's show is very much of its time, even while hearkening to its forbearers. "Tosh.0," in short, compiles wacky videos from the Internet and puts the results on TV, to a soundtrack of snark. Meanwhile, the show enjoys another life on the Web, where viewers can submit videos, comment and find encouragement to add absurd fictions to the show's Wikipedia entry.
Tosh is most effective in bridging the Internet and TV worlds when he pulls folks from viral videos for appearances on the show in a segment called "Web Redemption."
Best Film and TV Dads
So the gal in the prom dress who fell down the stairs gets another chance to make her grand entrance. The Miss Teen USA contestant who infamously mangled a question about geographic illiteracy gets another shot – and basically keeps her mouth shut. The boy featured in the "David After Dentist" YouTube smash extracts revenge on his father.
Tosh possesses a snide wit that would do him well on "Talk Soup" or "Mystery Science Theater 3000," and a willingness to recreate Web video stunts that would earn him junior "Jackass" status. But when dealing with guests, he comes across as almost likable amid his chronic sarcasm.
Tosh's shtick held up surprisingly well during a marathon of past episodes broadcast on Sunday – even if there's still a disproportionate amount of airtime dedicated to scenes of vomiting and men getting hit where it hurts most.
Reality TV Villains: Biggest Loser Tracy Gone Crazy?
But that's to be expected, we suppose, when sifting the wild world that is the Web for humor.
Perhaps the biggest difference between now and when Funt got his start more than 60 years ago rests in expectations. Back then, being captured on audio or film came as a surprise. These days, there's a realization that all moments are potentially public, with video easily captured by handheld devices and almost instantly uploadable to the Web.
The humor may not always be as gentle as was in Funt's day. But the measure of Tosh's success is that, like Funt, he leaves us with a smile when we realize we're all in the joke.
Web Redemption Retrospective
www.comedycentral.com
Web Redemption 2 Girls, 1 Cup Reaction Demi Moore Picture
Hester is founding director of the award-winning, multi-media NY City News Service at the City University of New York Graduate School of Journalism. He is the former City Editor of the New York Daily News, where he started as a reporter in 1992. Follow him on Twitter.

redpajama_set_name: RedPajamaCommonCrawl


Topic "Milwaukee Teachers' Education Association" | Fight Back!
The Milwaukee Teachers Education Association (MTEA) has been fighting budget cuts and downgrades to public schools for years.
Late on the night of May 19, Wisconsin legislators made a surprise move to overhaul the state's public school system.


housings of hoist drives are required to be steel or ductile cast iron.
the OFF position and all brakes have been set for not less than five seconds.
to the control system associated with the selected mode.
of all non-time delayed brakes when an overspeed condition is sensed.
given in terms of horsepower and torque for the unit.
bevel, spiral bevel, and cylindrical worm.


text:
Trials and tribulations of a marketing-converted engineer
Photo Credits: https://www.ittoolkit.com/
Exactly 13 years ago, I was enjoying the last summer before college. I knew exactly what I wanted to do and what I wanted to be…or so I thought…I'd go and Study Electrical Engineering, specialize in Mobile Communications and Satellites and then do an awesome PhD, further the field. Most of my mates didn't even know if they would make it through the first year with all exams passed so what would be the point of more planning…but I was a woman with a plan.
Fast forward to 13 years later, I'm happily elbow deep in digital marketing — i'm doing web, i'm doing app, video..i'm doing them all, all the new toys are mine! Did I ever do a PhD in engineering? Nop. Am I still nostalgic about one? Perhaps. Could I have made more money by doing something tech-heavy? Yes. But with me, it was never about the money, it was about something that suited my style. Bohemian as it sounds, I always did what I loved and work has never been "work" but passion.
I've always been a hard worker. Started after my first year of college at the age of 19 — I wanted to earn money to travel and see the world. I had a scholarship which I saved religiously for specific purposes and some money from my parents which weren't enough for a month in Bucharest. But they strived to send me all they could and because I knew that, I never wanted to tell them so I did my best to compensate.
By the time I was finishing up college and was writing my final thesis, I had already been working for 4 years out of which 2 and a half in digital and I could feel I was at a crossroad — I would either go towards the original plan and do research or get hard-core into performance marketing. It was a much easier choice than I would have thought. I found that while I could be dead to the world for a few weeks working on a project, after that I wanted to do something completely different, more creative…more artsy…more something not with code. My artistic education as a child was rearing its head ever so often and nudging me in a different direction and whenever it did I didn't push it away. I never wanted to be like most kids anyway, and I was always happy with MY way. For the topic that I felt strongly about there was very little to no know-how in the faculty about how I would go about doing things, little funds. I had to look forward to struggles to get the hardware support that I needed, and although it pains me to say this, some amount of backward thinking on the part of the professors. I was already earning more that I would have had from a PhD programme. I had become financial independent two years before and happy to be on my own and not burdening my parents. The option of me doing abroad was a no-go. My parents didn't have the kind of money needed to supplement scholarships.
So I turned down the warm invitation of my conducting professor and went all guns blazing into the new and exciting field of performance marketing. I got into serious jobs at serious companies and even though I'd previously done SEO and webmaster stuff — so I felt quite confident about me being at least a little tech-savvy — one thing which started to become obvious was whenever I had requests for technical departments, 70% of cases I got the "oh she's marketing, she doesn't get much" kind of grins. Which really used to piss me off because the whole possibility of me having any acumen whatsoever of the topic was completely slayed.
And when I say marketing, I'm saying the most techy geeky side of it, the kind you need to know how to read HTML and CSS at least, be comfortable with tags and scripts, pixels and conversion elements — not exactly the most flower-power stuff. I can't count the number of times I wanted to slap somebody across the face with proof of technical bandwidth. Just to have the satisfaction of having proved a point. I guess people in digital are sensible in the sense that we strongly believe in the philosophy "I don't teach you how to do yours, don't presume to teach me how to do mine!"
And the funny bit is that even now, sometimes, depending on who you talk to, you need to consider carefully which background you pull out from the hat. Should it be the engineering one or the marketing one now? Cause when you talk about creativity, copy, messaging, people think the tech part makes you almost autistic and clearly not something you're good at. When you talk to tech people of you start playing the creativity card, you'll most probably be dead in the water.
I'm sure some people are reading this and thinking: "Well that's not fair. I don't do that at all!" I'm sure you don't but this is not about you…and these things do happen in the real life :) I wrote an article awhile back about the two departments needing to become bffs and I will always be the greatest advocate of this. And things are changing. AI, machine learning and the giant leap in all things digital lead all roads to tech in the end, so whether you feel comfortable or not with pixels…you kinda need to learn what that means! Getting informed on what your project requires.
I myself am no "wunderkind" do-it-all marketing and dev stuff. It would be ridiculous to think anyone can be both, afterall there are only 24 hours in the day and then there is also life! But I guess I try to be — I always try to take the best from both worlds because I've always been complete having them both.
After 13 years, if I had to do it all again, I'd do things the same way and I would still become the annoyingly resilient girl in the marketing department who had a dream of tech.
PS: If you're reading this and you find yourself in it…this one's for you! Like Spock says: "Live long and prosper"
And if you also have a story, please share it…I'd love to hear it.
What We Do With What We Know #Podcast
COVID-19 could create 'a stronger virtual community'
American Society of the University of Haifa
Three years of Stitch Fix Engineering
Emma Ferneyhough Colner
Attracting Employers Through Keywords
Ryan Downing
Different Types of Remote Models: Hybrid, Split, And Fully Remote Teams
Sonal Shahid
My Transforming Attitude towards the Glass Ceiling: A short story of my long career
Richa Gulati
Is it time to widen your job hunt? Women say yes; men say not yet
Rashid hussain
When Job Hopping Helps Rather Than Hurts a Career
Scott S. Bateman in Leaders & Managers


The US Nonfarm Payroll data has just been released, showing that 180,000 jobs have been added in the last month. This data, in combination with yesterday's announcement that jobless claims were holding steady at the lowest point since 2008, has raised expectations that the Fed will begin tapering its QE programme later this month. This is broadly in line with market expectations, and in the hours before the announcement, the dollar continued its upwards trajectory, hovering around a seven-week high against the euro. There was, however a marked sell-off in the hour before the announcement, with traders locking in gains ahead of the data release.
Across the pond, the euro has been struggling against the dollar, the yen, and the pound after the head of the ECB said that the bank was preparing to cut interest rates and inject more capital into the banking sector in order to encourage low market rates.
Two-year US Treasury yields, which enjoy a strong correlation with the US dollar index, hit 0.5217%, their highest point since May 2011, widening the gap over similar German bonds to its highest point since July. rose to its highest since May 2011, at 0.5217 percent, and the gap over similar dated German bonds widened to its highest since late July. The dollar index has a good correlation with the two-year U.S. yield.
The dollar has also been boosted by rises in other US yields, with the 10-year benchmark yield hitting 3% on Thursday, the highest point in over two years.
While the figure of 180,000 fell somewhat short of Berg's definition of 'strong', it is definitely a positive from the point of view of the US economy, and seems to fit the Fed's criteria for the signs of recovery that they are looking for before tapering.
It won't just be currency traders that will be keeping a keen eye on the Fed's tapering plans. Emerging markets, such as the BRICS countries, have seen huge economic benefits from the availablity of cheap US dollars since 2009. There is now much discussion among these nations about how they are going to cope when the taps are turned off, with the BRICS countries looking to set up a fighting fund to keep the dollar low. Further dollar gains could cause trouble for currencies with a lot of exposure to the USD, such as the Turkish lira and the Indian rupee.


text:
Playing along with your favorite songs is an enjoyable, and highly effective, way of developing your playing technique. In this piano tutorial, you'll learn how to play the introduction to "Lullabye" by Billy Joel.
While the lesson is geared toward players of an intermediate skill level, all players can follow along given adequate time and motivation. To get started playing "Lullabye" on your own piano or keyboard, press play!
(1) Part 1 of 4 - How to Play Billy Joel's "Lullabye" on the piano, (2) Part 2 of 4 - How to Play Billy Joel's "Lullabye" on the piano, (3) Part 3 of 4 - How to Play Billy Joel's "Lullabye" on the piano, (4) Part 4 of 4 - How to Play Billy Joel's "Lullabye" on the piano
How To: Play Billy Joel's "The Stranger" on the piano
How To: Play Billy Preston's solo from the Beatles' "Get Back"
How To: Play the Miley Cyrus song "The Climb" on piano
How To: Play the intro from "The Stranger" by Billy Joel
How To: Play "Butterfly Fly Away" by Miley Cyrus on the piano
How To: Play the intro to Billy Joel's Piano Man


Introducing Somerset Spine & Performance Physiotherapy! Josh Harris PT, DPT, Cert. MDT offers a highly specialized and custom-tailored physical therapy experience to each patient, providing strictly 1-on-1 care specific to each individual's needs. Josh is the greater Lake Cumberland area's only PT certified in the McKenzie Method, which is an internationally recognized and highly evidence-based treatment approach for the treatment of back, neck, and extremity pain. This approach actively engages each patient with treatment specific to their problem, yielding faster and longer-lasting results when compared to generic treatment.
No referral is necessary to receive care at Somerset Spine & Performance Physiotherapy, and early, late and weekend appointments are available upon request. Take advantage of their affordable cash rate! Free consultation is offered for those who are unsure if physical therapy is right for them. Somerset Pulaski Chamber members can enjoy 50% off their first visit. Give them a call at 606-425-4665 or stop by for a free consultation at 110 Richie Ln, stop light 21 behind Monticello Banking Company. See them online at www.LivingBetterPT.com, or like them on Facebook!


Portable model designd for space saving transport and storaage.
Bars can be removed for ease of storage and transport.
Back legs can also be quickly removed to ease of transport to field training.
Two pin plate base makes for less space.
Push your drive power, strength, core and determination to the limit.
Focus on pure driving power or anaerobic gut busting push and dragging workouts.
Great for developing specific total body power.
Push using the upright poles, or drag using the front drag bar.
Front lead attachment for strongman towing.


text:
package jline.internal;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.IllegalCharsetNameException;
import java.util.Map;
import java.util.Properties;

import static jline.internal.Preconditions.checkNotNull;

/**
 * Provides access to configuration values.
 *
 * @author Jason Dillon
 * @author Guillaume Nodet
 * @since 2.4
 */
public class Configuration
{
    /**
     * System property which can point to a file or URL containing configuration properties to load.
     *
     * @since 2.7
     */
    public static final String JLINE_CONFIGURATION = "jline.configuration";

    /**
     * Default configuration file name loaded from user's home directory.
     */
    public static final String JLINE_RC = ".jline.rc";

    private static volatile Properties properties;

    private static Properties initProperties() {
        URL url = determineUrl();
        Properties props = new Properties();
        try {
            loadProperties(url, props);
        }
        catch (IOException e) {
            // debug here instead of warn, as this can happen normally if default jline.rc file is missing
            Log.debug("Unable to read configuration from: ", url, e);
        }
        return props;
    }

    private static void loadProperties(final URL url, final Properties props) throws IOException {
        Log.debug("Loading properties from: ", url);
        InputStream input = url.openStream();
        try {
            props.load(new BufferedInputStream(input));
        }
        finally {
            try {
                input.close();
            }
            catch (IOException e) {
                // ignore
            }
        }

        if (Log.DEBUG) {
            Log.debug("Loaded properties:");
            for (Map.Entry<Object,Object> entry : props.entrySet()) {
                Log.debug("  ", entry.getKey(), "=", entry.getValue());
            }
        }
    }

    private static URL determineUrl() {
        // See if user has customized the configuration location via sysprop
        String tmp = System.getProperty(JLINE_CONFIGURATION);
        if (tmp != null) {
            return Urls.create(tmp);
        }
        else {
            // Otherwise try the default
            File file = new File(getUserHome(), JLINE_RC);
            return Urls.create(file);
        }
    }

    /**
     * @since 2.7
     */
    public static void reset() {
        Log.debug("Resetting");
        properties = null;

        // force new properties to load
        getProperties();
    }

    /**
     * @since 2.7
     */
    public static Properties getProperties() {
        // Not sure its worth to guard this with any synchronization, volatile field probably sufficient
        if (properties == null) {
            properties = initProperties();
        }
        return properties;
    }

    public static String getString(final String name, final String defaultValue) {
        checkNotNull(name);

        String value;

        // Check sysprops first, it always wins
        value = System.getProperty(name);

        if (value == null) {
            // Next try userprops
            value = getProperties().getProperty(name);

            if (value == null) {
                // else use the default
                value = defaultValue;
            }
        }

        return value;
    }

    public static String getString(final String name) {
        return getString(name, null);
    }

    public static boolean getBoolean(final String name) {
        return getBoolean(name, false);
    }

    public static boolean getBoolean(final String name, final boolean defaultValue) {
        String value = getString(name);
        if (value == null) {
            return defaultValue;
        }
        return value.length() == 0
            || value.equalsIgnoreCase("1")
            || value.equalsIgnoreCase("on")
            || value.equalsIgnoreCase("true");
    }

    /**
     * @since 2.6
     */
    public static int getInteger(final String name, final int defaultValue) {
        String str = getString(name);
        if (str == null) {
            return defaultValue;
        }
        return Integer.parseInt(str);
    }

    /**
     * @since 2.6
     */
    public static long getLong(final String name, final long defaultValue) {
        String str = getString(name);
        if (str == null) {
            return defaultValue;
        }
        return Long.parseLong(str);
    }

    //
    // System property helpers
    //

    /**
     * @since 2.7
     */
    public static String getLineSeparator() {
        return System.getProperty("line.separator");
    }

    public static File getUserHome() {
        return new File(System.getProperty("user.home"));
    }

    public static String getOsName() {
        return System.getProperty("os.name").toLowerCase();
    }

    /**
     * @since 2.7
     */
    public static boolean isWindows() {
        return getOsName().startsWith("windows");
    }

    public static boolean isHpux() {
        return getOsName().startsWith("hp");
    }

    // FIXME: Sort out use of property access of file.encoding in InputStreamReader, should consolidate configuration access here

    public static String getFileEncoding() {
        return System.getProperty("file.encoding");
    }

    /**
     * Get the default encoding.  Will first look at the LC_ALL, LC_CTYPE, and LANG environment variables, then the input.encoding
     * system property, then the default charset according to the JVM.
     *
     * @return The default encoding to use when none is specified.
     */
    public static String getEncoding() {
        // Check for standard locale environment variables, in order of precedence, first.
        // See http://www.gnu.org/s/libc/manual/html_node/Locale-Categories.html
        for (String envOption : new String[]{"LC_ALL", "LC_CTYPE", "LANG"}) {
            String envEncoding = extractEncodingFromCtype(System.getenv(envOption));
            if (envEncoding != null) {
                try {
                    if (Charset.isSupported(envEncoding)) {
                        return envEncoding;
                    }
                } catch (IllegalCharsetNameException e) {
                    continue;
                }
            }
        }
        return getString("input.encoding", Charset.defaultCharset().name());
    }

    /**
     * Parses the LC_CTYPE value to extract the encoding according to the POSIX standard, which says that the LC_CTYPE
     * environment variable may be of the format [language[_territory][.codeset][@modifier]]
     *
     * @param ctype The ctype to parse, may be null
     * @return The encoding, if one was present, otherwise null
     */
    static String extractEncodingFromCtype(String ctype) {
        if (ctype != null && ctype.indexOf('.') > 0) {
            String encodingAndModifier = ctype.substring(ctype.indexOf('.') + 1);
            if (encodingAndModifier.indexOf('@') > 0) {
                return encodingAndModifier.substring(0, encodingAndModifier.indexOf('@'));
            } else {
                return encodingAndModifier;
            }
        }
        return null;
    }
}

redpajama_set_name: RedPajamaGithub


A multiple-alarm fire broke out in a home in Harrisburg, Pennsylvania, on Friday, killing a toddler. According to NBC News, officials traced the blaze to a hoverboard that caught fire while plugged into an electrical socket on the first floor of the three-story house.
"They heard some sizzling and crackling in the hoverboard and shortly thereafter, it exploded in flames," Brian Enterline, the city of Harrisburg's fire chief, told the Associated Press.
A spokesman for the U.S. Consumer Products Safety Commission said that the fire was the first fatal incident linked to hoverboards. The agency has investigated 60 cases of hoverboard fires in the past year and a half. The investigation into the fire is ongoing.
After the scooters emerged as one of the hottest gifts of the 2015 holiday season, reports of hoverboard fires soon began to surface. The devices' rechargeable lithium-ion cells contain a potentially flammable solution, which can explode if the battery is damaged or defective.
The tip sheet also includes a list of signs to look for indicating that there is a problem with the hoverboard and what to do if you notice any of these signs.
A firefighter also died while responding to the blaze. Lieutenant Dennis Devoe, a 21-year veteran of the Harrisburg department, was killed on his way to the fire station when another car struck his vehicle. Pennsylvania Gov. Tom Wolf ordered flags at the state's capitol to fly at half-staff in DeVoe's honor.


text:
Q: Improve efficiency matlab I have a matlab code that is very inefficient and I need to run it several times.
The code is basically a big parfor loop which I guess there is almost impossible to get around.
The code starts by loading several parameters and 4-D matrices, and then needs to make a few interpolations. All need to be done 5000 times (thus the parfor loop).
Here is how the code look like. I simplified the code the most I could without taking out the key ingredients.
load file

nsim = 5000
T = 12;
N = 1000;

cumQx = cumsum(Qx);
cumQz = cumsum(Qz);
cumQs = cumsum(Qs);

for k=1:nsim
st(k).ksim    = kstar*ones(N, T);
st(k).Vsim  = zeros(N,T);
st(k).Psim = zeros(N,T);
end

parfor k = 1:nsim

    sysrand  = rand(T, 1);
    idiorand = rand(N, T);
    sigmarand = rand(T,1);

    xid = zeros(T, 1);
    zid = zeros(N, T);
    sid = zeros(T,1);
    xid(1) = 8;
    zid(:, 1) = 5;
    sid(1) = 1;
    % Initializing the simulation

    simx    = zeros(T,1);
    zsim    = ones(N,T)*zbar;
    simsx    = zeros(T,1);

    % Construct 3-D grid using 'ndgrid'
    [ks,zs] = ndgrid(kgrid,z);

    for j = 2:T
            sid(j) = find(cumQs(:, sid(j-1)) >= sigmarand(j), 1);
            simsx(j-1) = sigmax(sid(j));

             xid(j) = find(cumQx(:, xid(j-1)) >= sysrand(j), 1);
             simx(j-1) = x(xid(j));

             for n = 1:N
                 zid(n, j)   = find(cumQz(:, zid(n, j-1)) >= idiorand(n, j), 1);
                 zsim(n,j-1) = z(zid(n, j));
             end
            st(k).ksim(:,j)      = interpn(ks, zs , squeeze(kprime(:,xid(j),:,sid(j))),   st(k).ksim(:,j-1),zsim(:,j-1),'linear');       % K
            st(k).Vsim(:,j)      = interpn(ks, zs , squeeze(V(:,xid(j),:,sid(j))),        st(k).ksim(:,j-1),zsim(:,j-1),'linear');       % V
            st(k).Psim(:,j)      = interpn(ks, zs , squeeze(P(:,xid(j),:,sid(j))),        st(k).ksim(:,j-1),zsim(:,j-1),'linear');       % P

    end;

end

Here is a link for the matrices needed to run the code: http://www.filedropper.com/file_406
Is there any better way of doing this that would significantly reduce the computation time? My guess is no ...
Ideally there woul be a way of vectorizing the k = 1:nsim loop.

A: In order to time and test your code, I removed the parfor loop and replaced it with a for loop, then used the MATLAB profiler. I used nsims = 500 for the purpose of my tests.
Using the profiler, I found two key bottlenecks in your code. The first is the find() function in the most nested for loop (n-loop). The second is the three calls to the interpn() function. Those 4 lines use +88% of the computation time.
The find function is slower than desirable in this circumstance due to the overhead of the function call (especially considering the number of calls it receives in the nested loops), as well as the built-in error checking and management. Replacing the find function with a hard-coded binary search (below) greatly improves performance, and this was only replacing the find in the n-loop. Using find for nsims = 500 resulted in a run time of 29.8 seconds. Using the binary search, the run time was 12.1 seconds.Note: this only works because your data is sorted, this code cannot replace find in every instance. EDIT: Using the alternate approach in the other answer by @EBH is a cleaner way to do this.
%perform binary search (same as your find function)
searchVal=idiorand(n, j);
il = 1;
iu = sizeCumQZ; % should be defined outside the loop as size(cumQz,1)
while (il+1<iu)
    lw=floor((il+iu)/2); % split the upper index
    if cumQz(lw,zid(n, j-1)) >= searchVal
        iu=lw; % decrease lower_index_b (whose x value remains \geq to lower bound)
    else
        il=lw; % increase lower_index_a (whose x value remains less than lower bound)
    end
end
if cumQz(il,zid(n, j-1))>=searchVal
    zid(n,j) = il;
else
    zid(n,j) = iu;
end

The interpn function is considerably slowed by method checking, error management and data format management. The roughly 100 lines of code used in the standard interpn can be cut down to 2 lines per call and significantly increase performance by knowing we only need one type of interpolation, and that our data conforms to a specific format. To do this we use the griddedInterpolant function directly (see below).  Again with nsims = 500, using the interpn function (still using the un-changed find code) has a run time of 29.8 seconds. Using the refined method, below, decreased run time to 20.4 seconds.
Refined method replaces the calls to interp, shown here
st(k).ksim(:,j)      = interpn(ks, zs , squeeze(kprime(:,xid(j),:,sid(j))),   st(k).ksim(:,j-1),zsim(:,j-1),'linear');       % K
st(k).Vsim(:,j)      = interpn(ks, zs , squeeze(V(:,xid(j),:,sid(j))),        st(k).ksim(:,j-1),zsim(:,j-1),'linear');       % V
st(k).Psim(:,j)      = interpn(ks, zs , squeeze(P(:,xid(j),:,sid(j))),        st(k).ksim(:,j-1),zsim(:,j-1),'linear');       % P

with more direct calls to griddedInterpolant, shown here:
F = griddedInterpolant(ks,zs,squeeze(kprime(:,xid(j),:,sid(j))), 'linear','none');
st(k).ksim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1));

F = griddedInterpolant(ks,zs,squeeze(V(:,xid(j),:,sid(j))), 'linear','none');
st(k).Vsim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1));

F = griddedInterpolant(ks,zs,squeeze(P(:,xid(j),:,sid(j))), 'linear','none');
st(k).Psim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1));

Combining the binary search instead of find with the calls to griddedInterpolant instead of interpn reduces the total run time to 3.8 seconds, a nearly 8x improvement over initial run time.
Three further points of note:
1) I would recommend following the advice outlined in previous answers, specifically staying away from structures if possible and moving whatever you can out of the loops (specifically the ndgrid, as this most certainly only needs to be run one time).
2) I noticed that, when using nsims=5000, the total memory used during this script is near 2.5gigs. If this is near your system's total available memory, this could result in significant slowdown. In this case I would recommend performing smaller batches of calculations, saving out the results, and then proceeding with further calculations.
3)Finally, during my tests, using parfor was actually slower than using the standard for loop. I beleive this is because each individual loop is a relatively short operation in this instance, and the overhead associated with designating parallel jobs and managing the cluster workers outweighs the gains from parallel processing. This may not be the case if you are on a large computer cluster, but on my single (4-core) machine, parfor only resulted in slow-down. I would recommend testing each case for yourself,with your actual working code, after you have made the recommended changes above if you care to.
The full code changes I made are shown below, these do not include any changes in the use of structs or other small optimizations that would still be recommended.
load file

tic;

nsim = 500
T = 12;
N = 1000;

searchVal=1;
il = 1;
iu = 1;

cumQx = cumsum(Qx);
cumQz = cumsum(Qz);
cumQs = cumsum(Qs);

sizeCumQZ = size(cumQz,1);

for k=1:nsim
st(k).ksim    = kstar*ones(N, T);
st(k).Vsim  = zeros(N,T);
st(k).Psim = zeros(N,T);
end

%was parfor
for k = 1:nsim

    sysrand  = rand(T, 1);
    idiorand = rand(N, T);
    sigmarand = rand(T,1);

    xid = zeros(T, 1);
    zid = zeros(N, T);
    sid = zeros(T,1);
    xid(1) = 8;
    zid(:, 1) = 5;
    sid(1) = 1;
    % Initializing the simulation

    simx    = zeros(T,1);
    zsim    = ones(N,T)*zbar;
    simsx    = zeros(T,1);

    % Construct 3-D grid using 'ndgrid'
    [ks,zs] = ndgrid(kgrid,z);

    for j = 2:T
            sid(j) = find(cumQs(:, sid(j-1)) >= sigmarand(j), 1);
            simsx(j-1) = sigmax(sid(j));

             xid(j) = find(cumQx(:, xid(j-1)) >= sysrand(j), 1);
             simx(j-1) = x(xid(j));

             for n = 1:N
                 %perform binary search (same as your find function)
                 searchVal=idiorand(n, j);
                 il = 1;
                 iu = sizeCumQZ;
                 while (il+1<iu)
                     lw=floor((il+iu)/2); % split the upper index
                     if cumQz(lw,zid(n, j-1)) >= searchVal
                         iu=lw; % decrease lower_index_b (whose x value remains \geq to lower bound)
                     else
                         il=lw; % increase lower_index_a (whose x value remains less than lower bound)
                     end
                 end
                 if cumQz(il,zid(n, j-1))>=searchVal
                     zid(n,j) = il;
                 else
                     zid(n,j) = iu;
                 end
                 zsim(n,j-1) = z(zid(n,j));
             end

             F = griddedInterpolant(ks,zs,squeeze(kprime(:,xid(j),:,sid(j))), 'linear','none');
             st(k).ksim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1));

             F = griddedInterpolant(ks,zs,squeeze(V(:,xid(j),:,sid(j))), 'linear','none');
             st(k).Vsim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1));

             F = griddedInterpolant(ks,zs,squeeze(P(:,xid(j),:,sid(j))), 'linear','none');
             st(k).Psim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1));

    end;

end
toc;

EDIT: Messing around with the griddedInterpolant a bit more, I was able to eek out an additional 15% speed increase by combining the three interpolants into one through concatenation of the grids and values for the K, V, and P interpolants. At the top of the code, best done outside the loop, I replaced the original grid creation with:
zRange = max(z(:))-min(z(:))+1;
zzzGrid = [z;z+1*zRange;z+2*zRange];% for K, V, and P
[ksBig,zsBig] = ndgrid(kgrid,zzzGrid);
nZ = numel(z); %used below
valGrid = zeros(size(ksBig)); %used below

And replace the  3 calls to griddedInterpolant with:
valGrid(:,1:nZ) = squeeze(kprime(:,xid(j),:,sid(j)));%K
valGrid(:,nZ+1:2*nZ) = squeeze(V(:,xid(j),:,sid(j)));%V
valGrid(:,2*nZ+1:3*nZ) = squeeze(P(:,xid(j),:,sid(j)));%P

F = griddedInterpolant(ksBig,zsBig,valGrid, 'linear','none');

st(k).ksim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1));
st(k).Vsim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1)+zRange);
st(k).Psim(:,j) = F(st(k).ksim(:,j-1),zsim(:,j-1)+2*zRange);

Or if we are OK trading a more convoluted setup for a 19% increase instead of a 15% increase, we can move the griddedInterpolant outside of the j loop altogether. At the beginning of the code, setup the grid as such:
zRange = max(z(:))-min(z(:))+1;
zzzGrid = [z;z+1*zRange;z+2*zRange];
zzzRange =  max(zzzGrid(:))-min(zzzGrid(:))+1;
zzzTGrid = [];
for j = 2:T
   zzzTGrid(end+1:end+numel(zzzGrid)) = zzzGrid+(j-2)*zzzRange;
end
[ksBig,zsBig] = ndgrid(kgrid,zzzTGrid);
nZ = numel(z); %used below
valGrid = zeros(size(ksBig)); %used below

And replace the previous griddedInterpolant as shown below:
for j = 2:T
    %%%%%
    %...
    %Other code in the j loop
    %...
    %%%%%
    valGrid(:,(1:nZ)+3*nZ*(j-2)) = squeeze(kprime(:,xid(j),:,sid(j)));%K
    valGrid(:,(nZ+1:2*nZ)+3*nZ*(j-2)) = squeeze(V(:,xid(j),:,sid(j)));%V
    valGrid(:,(2*nZ+1:3*nZ)+3*nZ*(j-2)) = squeeze(P(:,xid(j),:,sid(j)));%P
end;

F = griddedInterpolant(ksBig,zsBig,valGrid, 'linear','none');

for j = 2:T
    st(k).ksim(:,j) = F(stTest(k).ksim(:,j-1),zsim(:,j-1)+3*zRange*(j-2));
    st(k).Vsim(:,j) = F(stTest(k).ksim(:,j-1),zsim(:,j-1)+zRange+3*zRange*(j-2));
    st(k).Psim(:,j) = F(stTest(k).ksim(:,j-1),zsim(:,j-1)+2*zRange+3*zRange*(j-2));
end

And if we want to get even pickier (2% speed increase), we can replace all calls to squeeze with a version that does no error checking, mySqueeze instead:
function b = mySqueeze(a)
%Trimmed down version of squeeze, a built-in MATLAB function, has no error-managment or case optimization
  siz = size(a);
  siz(siz==1) = []; % Remove singleton dimensions.
  siz = [siz ones(1,2-length(siz))]; % Make sure siz is at least 2-D
  b = reshape(a,siz);

A: *

*Try not to use structs, this will also make your code vectorizable (where it's possible) more easily.

At the start of your code, replace:
for k=1:nsim
    st(k).ksim = kstar*ones(N, T);
    st(k).Vsim = zeros(N,T);
    st(k).Psim = zeros(N,T);
end

with:
ksim = kstar*ones(N,T,nsim);
Vsim = zeros(N,T,nsim);
Psim = zeros(N,T,nsim);

then at the end instead of calling st, call:
ksim(:,j,k) = interpn(ks,zs,squeeze(kprime(:,xid(j),:,sid(j))),ksim(:,j-1,k),zsim(:,j-1),'linear');
Vsim(:,j,k) = interpn(ks,zs,squeeze(V(:,xid(j),:,sid(j))),     Vsim(:,j-1,k),zsim(:,j-1),'linear');
Psim(:,j,k) = interpn(ks,zs,squeeze(P(:,xid(j),:,sid(j))),     Psim(:,j-1,k),zsim(:,j-1),'linear');

If needed you can put all the three variables inside a struct after the loop ends.

*Take out from the loop all the random generators.

Before the loop write:
sysrand = rand(T,nsim);
idiorand = rand(N, T,nsim);
sigmarand = rand(T,nsim);

and then replace inside the loop:
sigmarand(j) --> sigmarand(j,k)
sysrand(j) --> sysrand(j,k)
idiorand(n,j) --> idiorand(n,j,k)

*Vectorize the most inner for loop:

replace:
for n = 1:N
    zid(n,j)   = find(cumQz(:, zid(n, j-1)) >= idiorand(n,j), 1);
    zsim(n,j-1) = z(zid(n, j));
end

with:
cumQz_k = cumQz(:, zid(:, j-1)).';
pos = bsxfun(@ge,cumQz_k,idiorand(:,j));
zid(:,j) = (sum(~cumsum(pos'))+1).';
zsim(:,j-1) = z(zid(:, j));

This will give you a significant boost of up to 90% for that process and 60% overall. all other things being equal (but not using parfor), with nsim = 200 the whole simulation with the for loop took 16s, from them 10s dedicated for this loop. After vectorization, the simulation took only 6s, from them about one second for the alternative vectorization approach.

Using all the remarks above, including the use of griddedInterpolant suggested in another answer, will bring you to 5000 in less than a minute, so it's better not to use parfor, which will probably slow it down because of overhead communication (i.e. using a lot of memory).
Here is the final code (note that I replaced your j with t):
nsim = 5000;
T = 12;
N = 1000;
cumQx = cumsum(Qx);
cumQz = cumsum(Qz);
cumQs = cumsum(Qs);
ksim = kstar*ones(N,T,nsim);
Vsim = zeros(N,T,nsim);
Psim = zeros(N,T,nsim);
sysrand = rand(T,nsim);
idiorand = rand(N,T,nsim);
sigmarand = rand(T,nsim);
% Construct 3-D grid using 'ndgrid'
[ks,zs] = ndgrid(kgrid,z);

for k = 1:nsim
    % Initializing the simulation:
    xid = [8; zeros(T-1, 1)];
    zid = [ones(N,1)*5 zeros(N,T-1)];
    alter = [ones(N,1)*5 zeros(N,T-1)];
    sid = [1; zeros(T-1,1)];
    simx = zeros(T,1);
    zsim = ones(N,T)*zbar;
    simsx = zeros(T,1);

    for t = 2:T
        sid(t) = find(cumQs(:, sid(t-1)) >= sigmarand(t,k), 1);
        simsx(t-1) = sigmax(sid(t));

        xid(t) = find(cumQx(:, xid(t-1)) >= sysrand(t,k), 1);
        simx(t-1) = x(xid(t));

        cumQz_k = cumQz(:, zid(:, t-1)).';
        pos = bsxfun(@ge,cumQz_k,idiorand(:,t,k));
        zid(:,t) = (sum(~cumsum(pos'))+1).';
        zsim(:,t-1) = z(zid(:, t));

        F = griddedInterpolant(ks,zs,squeeze(kprime(:,xid(t),:,sid(t))), 'linear','none');
        ksim(:,t,k) = F(ksim(:,t-1,k),zsim(:,t-1));
        F = griddedInterpolant(ks,zs,squeeze(V(:,xid(t),:,sid(t))), 'linear','none');
        Vsim(:,t,k) = F(ksim(:,t-1,k),zsim(:,t-1));
        F = griddedInterpolant(ks,zs,squeeze(P(:,xid(t),:,sid(t))), 'linear','none');
        Psim(:,t,k) = F(ksim(:,t-1,k),zsim(:,t-1));

    end
end

You are most welcome to ask in the comments for any unclear parts of the code.

A: Higher level optimization aside (the code seems vectorizable, but I don't know without running it myself), you're doing a lot of unnecessary computations / memory reallocations inside your loop.
Do you really need to zero xid, zid, sid, simx, zsim, and simsx? It doesn't really hurt if they have garbage values or zeros, since you only access the current index every time. Not to mention, you probably save yourself a huge memory allocation operation from not zeroing.
Also, there' no real need to recalculate the ndgrid.
Move all those things outside your loop.

redpajama_set_name: RedPajamaStackExchange


Muted, versatile, and sophisticated, we think olive green is beautiful in every season, especially the fall. Symbolizing abundance and renewal, the color green is said to be the most restful and relaxing color to the human eye.
We use color intentionally to create a mood in our designs and love how olive can breathe life into a room. We think it's the perfect pop of color to add to cream, white, and black using accents in velvet, mohair, leather, or wool. We're embracing this cozy, elegant hue this fall in our designs and in our closets.


Follow Me lets you direct calls to single or multiple numbers and have them ring all at once or one after the other.
Decide who can follow you and when.
Phone.com Call Handling Rules allow you to define your Follow Me destinations and also allow for forwarding based on the incoming Caller ID or your Schedules.


text:
Q: How to use Deck Panel of Ui Services After reading the GAS documentation related to Deck Panel of the Ui Services, I understand that once an element is added to a Deck panel, it becomes invisible, and if the element is removed from this, it will be visible again. I wrote some testing code, but I can't get to make a panel visible when I remove it from the Deck Panel. Any insights?
Here is the code:
function doGet() {
    var app = UiApp.createApplication();
    var globalPan = app.createAbsolutePanel();
    app.add(globalPan);
    var deckPanel = app.createDeckPanel().setId('deck').setSize(300, 300).setTitle('DeckPanel').setAnimationEnabled(true);
    globalPan.add(deckPanel);
    globalPan.add(app.createHorizontalPanel().add(app.createLabel('Element to add to DeckPanel')).setId('visiblePan'));
    var hidden = app.createHidden('hEl', 'visible').setId('hEl').setName('hEl');
    app.add(hidden);
    app.add(app.createButton('Add to DeckPanel').setId('button').addClickHandler(app.createServerHandler('handlerFunction').addCallbackElement(hidden)));
   return app;
}

function handlerFunction(eventInfo) {
    var app = UiApp.getActiveApplication();
    var parameter = eventInfo.parameter;
    var state = parameter.hEl;
    if (state == 'visible'){
        app.getElementById('deck').add(app.getElementById('visiblePan'));
        app.getElementById("button").setText("Remove from DeckPanel");
        app.getElementById('hEl').setValue('hidden');
    };
    else{
        app.getElementById('deck').remove(0);
        app.getElementById("button").setText("Add to DeckPanel");
        app.getElementById('hEl').setValue('visible');
    };
    return app;
}


We provide bespoke programmes for primary aged children. Generally, tutoring lessons will only cover 1 curricular area, though it is possible for us to cover more than one in the session. We are asked most often to cover maths and literacy. However, as teachers. we have been trained in every subject within the primary curriculum and are confident in doing so.
Lessons are generally weekly and at the same time. They will always be an hour long, except in exceptional circumstances. This allows for 55 minutes teaching time and 5 minutes of feedback to the adult. Some younger children may not be able to focus for a full hour and we will therefore suggest two half hour sessions a week. We can be more flexible with regards to home schooled children, just discuss your needs with us.
Within the first lesson we will assess the child. We will keep this light hearted and fun though it is essential for our understanding where any conceptual difficulties may be impeding progress. During this session we also work towards building a relationship with the child as this leads to them being more confident in asking questions. We help them realise that a tutor is different from a teacher and not only because they call us by my first names!
The 1 to 1 format allows us the flexibility to cover any misunderstandings in your child's learning but also means we can adapt sessions to meet any difficulties they may be facing at school that day or week. We can cover a lot of work and different concepts which helps them make rapid progress whilst allowing time to revisit previously taught areas.
We encourage children to take ownership of their learning. To tell us what they think they need, and if possible, plan learning with us which supports their upcoming in school learning. This way tutoring becomes a joint endeavour between child, tutor, family and school.
We always attend promptly at the allocated time. Upon arrival we will have all resources, jotters, stationery etc that may be required. The first thing we will do is ask your child how they are, discuss their schooling and enquire as to what achievements they have had in addition to whether they have encountered any difficulties that week. This allows us to adapt the planned lesson immediately to help them meet any difficulties.
We usually cover between 4 and 6 different concepts within a lesson. This is irrespective of the subject area being taught. This variety helps keep children motivated and interested and helps ensure progress throughout the curriculum.
At the end of the lesson we will discuss the child's feedback briefly with them. We go over what they feel went well and what they want more work on, determining their next steps. This is essential, whilst they may appear to understand a concept this allows us to assess their confidence. Thereafter we feedback directly to the adult regarding the session with support of the child.


Category: LS Studio. Tags: LS Magazine 2. Date: February 10, 2019 by easternblog.
Amazing girls! Absolutly perfect bodies!
The brunette is a knockout, her is maybe the most perfect body known to man (er, men).
Mmm…. preciosas… hermosas y eroticas esas bebés…..


text:
Steve Carell thriving on screen and off
Dana Barbuto
Steve Carell's painful shouts of "Kelly Clarkson" during the waxing scene in "The 40-Year-Old Virgin" is one of the funniest in the actor's 2005 breakout film.
And who can forget Carell's scene-stealing turn as the annoying anchorman tormented by Jim Carrey in 2004's "Bruce Almighty"?
Carell, 48, has racked up six Emmy nominations for his role as cringe-inducing boss Michael Scott on "The Office." And then there are the comedies like "Date Night" with Tina Fey and "Dinner for Schmucks" with Paul Rudd, where Carell displays skill and versatility, seamlessly jumping from subtle, ironic comedy to full-on slapstick and then back again.
In real life, however, Carell is seemingly ordinary and humble, nothing like that dynamic comedian on screen.
"I'm a little more shy in person than people necessarily expect me to be. I don't tend to be 'on' all the time," Carell said. "I don't think I'm naturally a comic per se or trying to be funny, which is sometimes off-putting to people, because sometimes people will expect me to be much funnier than I am."
In fact, Carell said he's not even the funniest guy in his own house. After all, he's got some competition on the home front: He is married to "Saturday Night Live" alum Nancy Walls, who had a bit part in the Kristen Wiig hit "Bridesmaids." Carell and Walls married in 1995 and have two children, Elisabeth Anne, 10, and John, 7.
"I think my kids are way funnier than I am. And my wife is really funny, too. Every night, I read with my daughter when I'm putting her to bed, and my wife reads to my son. And she'll be telling him stories and doing different characters, and I hear them laughing through the door. She's really, really funny," Carell said.
Fit, tan and well-rested, Carell met reporters in a suite at the Ritz-Carlton Hotel in Manhattan, N.Y., to promote his new romantic comedy, "Crazy, Stupid, Love."
In it, Carell plays a sad-sack husband whose perfect life is disrupted once he learns his cheating wife (Julianne Moore) wants a divorce. Desperate to get his groove back, he enlists the help of ladies' man Ryan Gosling, who transforms Cal from hapless to hopeful. It's a role that makes good use of Carell's deadpan humor and everyman demeanor.
"I thought the script was great and inventive. It took a subject matter that is well tread and put a different spin on it. It's surprising, and more than anything else, it's human. I thought the story was very real and very funny at the same time, and that's a fine line to walk when you want something to be both funny and dramatic at the same time. And those are the things that appeal to me."
Also an executive producer on the film, the first one for his new company, Carousel Productions, Carell said one of his goals was to never have the film fall victim to cliches or conventions of the genre.
"I think movies about love can easily become cliche, pedestrian and cloying and manipulative, especially when you go into the dramatic side of it," he said.
So Carell hired a pair of directors who color way outside the lines: Glenn Ficarra and John Requa, the duo who helmed the under-watched "I Love You Phillip Morris" and wrote the pitch-black "Bad Santa."
"I found that those guys had that same barometer and same awareness of never wanting to go into a manipulative moment. Because a comedy which then becomes a drama can be manipulative if it's not earned," Carell said. "I felt –– and they agree –– that all those more serious moments had to be earned, and the characters had to be grounded, and you had to relate to them."
Like his character, Cal, in "Crazy, Stupid, Love," Carell is a family man in a long-running marriage, a rare feat in Hollywood. Unlike his character, though, Carell's domesticity is thriving. He met Walls in Chicago, when both were working with the Second City comedy troupe.
"I was very fortunate to marry who I married. I lucked out. She is the right person for me, and I think I'm the right person for her ... I continue to learn new and wonderful things about my wife, and it's good that I like the things I'm learning," he said.
Carell has four more feature films on tap, including the comedy "Great Hope Springs" with Meryl Streep; the magician comedy "Burt Wonderstone"; and the pre-apocalyptic comedy "Seeking a Friend for the End of the World" with Keira Knightley. Also, a sequel to last summer's animated hit "Despicable Me" is in the works.
"I have not read the script yet, and I'm supposed to see it when I get back to Los Angeles in a few weeks," Carell said. "They've actually picked a release date –– the July 4 weekend in two years."
Working steadily since the 1980s, Carell's career has grown incrementally. He's now at a stage where he can pick and choose roles.
"To have the luxury to do that is remarkable ... I just don't want to be pretentious about, 'Yes, I need to move into the more dramatic roles and express myself and prove to everyone I am capable of doing it.' I think that's a bad reason to choose roles. I don't have any big master plan. I'm just kind of sampling things that appeal to me."
Carell said he would love to team up with his wife on a project.
"I'm a big fan of hers. I think she's smart and funny. She's a great writer. I want to encourage her to write some stuff because I think that's something she hasn't done and she'd be good at," Carell said.
Reach Dana Barbuto at dbarbuto@ledger.com.


Beautiful reminders of things that I value, of tools that I have, and of love that I share… that's what these cards are about for me. They are a resource that helps bring me back to my heart, to my body, and into relationship with life.
These cards are a sweet way to integrate gratitude, ritual, presence, and inspiration into your life and the life of your beloveds—whether you make a set for them or teach them how to make their own!
The process for creating these cards is truly unique to you. I'll offer an example of my process, and give you ideas for how this project can look for you. Let it be an opportunity to converse with your playful, creative, expressive, wonderful self. Maybe you want to do the steps in a different order, maybe you want to use photographs or old maps for your paper. Whatever it is, make it your own.
My process starts with aesthetics. I lay out my art supplies (usually it's watercolors and watercolor paper) and sit with it all for a bit. I let it all be about pleasure and about what excites me. I choose the paintbrush that looks the most fun to paint with; I choose the colors that leap out at me. I paint the paper just as I like.
Once I decide on a theme for my collection of cards, I write out a list of all the things I want to have on the cards. From this list, I decide how many cards I want to create.
I measure and cut out the cards. I like to measure out on the back of the paper and cut them, but sometimes I do it more free-hand.
I write a word or phrase from my list onto each of the cards. They stack up one by one. And it genuinely feels like I've created something alive: like those cards hold the awareness of those words eagerly awaiting to share when the time is right.
Next I decide on their home. If these are a gift, I'll wrap them up and present them to my beloved friend. If they are for me, I usually select a small ceramic vessel, a mesh bag, or envelope to be their home.
Use depends somewhat on the theme of the cards, but generally the process is as simple as choosing one when you feel like it. I like to sit with my cards and hold them, word-side down, and then I ask the cards a question: "What should my focus be for today?" or "What do I need to hear right now?" Then I pull one or two out and look at them.
Sometimes I keep the card(s) I pull with me throughout the day - as my bookmark, or in my wallet, or propped up on my computer.
This process is all about coming back to yourself. You are already SO WISE and these cards can hold your wisdom for you and reflect it back to you by interweaving the inherent goodness that lives inside you into the fabric of your life.
I hope these cards highlight the love, connection, and wisdom that is here alive with you and your loved ones. May you be well.
Makayla McDonald is an enthusiastic human and coach. Her business, Food Peace Body Love, is all about befriending the body. Her mission is to create a shift in conversations on body image that is shaped by deep self-love and acceptance as well as a passion for growth, curiosity, and integrated wellness.
Makayla brings a variety of influences into her coaching practice. Before diving into the world of the body and psychology, she studied Sustainable Agriculture and Design at Maharishi University. She has a BA from Naropa University with a concentration in Yoga. She is an avid student of Somatic Psychology and Dance Therapy. She loves nasturtiums, riding her bicycle, and visiting Boulder creek every season of the year.


text:
package cl.uchile.ing.adi.quicklooklib.fragments;

import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import androidx.fragment.app.Fragment;

import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import cl.uchile.ing.adi.quicklooklib.QuicklookActivity;
import cl.uchile.ing.adi.quicklooklib.R;
import cl.uchile.ing.adi.quicklooklib.items.BaseItem;
import cl.uchile.ing.adi.quicklooklib.ItemFactory;
import cl.uchile.ing.adi.quicklooklib.items.VirtualItem;

/**
 * Abstract Fragment defines the basic structure of the fragments managing the files.
 */
public abstract class QuicklookFragment extends Fragment {

    protected BaseItem item;
    protected OnListFragmentInteractionListener mListener;

    public QuicklookFragment() {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setHasOptionsMenu(true);
    }

    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState){
        if(!isAdded()) return null;
        Bundle b = getArguments();
        if (b!=null) {
            String path = b.getString(BaseItem.ITEM_PATH);
            String type = b.getString(BaseItem.ITEM_TYPE);
            long size = BaseItem.getSizeFromPath(path);
            Bundle extra = b.getBundle(BaseItem.ITEM_EXTRA);
            if(TextUtils.isEmpty(path) || TextUtils.isEmpty(type) || size<0 || extra==null){
                Toast.makeText(getContext(), R.string.quicklook_error_opening, Toast.LENGTH_SHORT).show();
                getActivity().finish();
                return null;
            }
            item = ItemFactory.getInstance().createItem(path,type,size,extra, getActivity());
        }

        try {
            return createItemView(inflater,container,savedInstanceState);
        } catch (Exception e) {
            if(mListener!=null) mListener.fragmentFallback(item);
            return null;
        }
    }

    public abstract View createItemView(LayoutInflater inflater, ViewGroup container,
                                        Bundle savedInstanceState);

    @Override
    public void onResume() {
        super.onResume();
        if(mListener!=null && item!=null) {
            mListener.setCurrentFragment(item.getFragment());
            mListener.setCurrentItem(item);
            mListener.updateActionBar();
        }
    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        if (context instanceof OnListFragmentInteractionListener) {
            mListener = (OnListFragmentInteractionListener) context;
        } else {
            throw new RuntimeException(context
                    + " must implement OnListFragmentInteractionListener");
        }
    }

    @Override
    public void onDetach() {
        super.onDetach();
        mListener = null;
    }

    public BaseItem getItem() {
        return ((QuicklookActivity)getActivity()).getItem();
    }

    public void showError(String cause) {
        mListener.showInfo(cause);
        if(isAdded()) mListener.reportError(getItem(),this,cause);
    }

    /**
     * This interface manages the interaction of the fragments and it's implemented
     * by Main Activity of the library.
     */
    public interface OnListFragmentInteractionListener {
        /**
         * Updates the navbar text with the location of the file in the filesystem.
         */
        void updateActionBar();

        /**
         * Extracts a item inside a Compressed folder and opens it.
         * @param toRetrieve the item which is going to be displayed.
         * @param container item which contains toRetrieve.
         */
        BaseItem retrieveElement(BaseItem toRetrieve, VirtualItem container);

        Uri saveItem();
        void openItem();
        void shareItem();
        BaseItem getItem();

        void openDownloads();

        /**
         * Retrieves the current fragment.
         */
        QuicklookFragment getFragment();

        void setCurrentFragment(QuicklookFragment fragment);

        void setCurrentItem(BaseItem item);

        void showInfo(String message);

        void reportError(BaseItem item, QuicklookFragment fragment, String description);

        void removeFromBackStack();

        void makeTransition(BaseItem mItem, boolean backstack);

        void fragmentFallback(BaseItem mItem);

        void changeFragment(BaseItem mItem, boolean backstack);
    }
}


text:
Q: MySQL display a count of rows for 2 Group Bys Sorry in advance, I'm not exactly sure how to explain this but I am trying to do this:
I have a table that looks something like this:
id | make | model

1 | iphone | iphone 7
2 | iphone | iphone 8
3 | iphone | iphone 10
4 | samsung | galaxy note 5
5 | samsung | galaxy note 5
6 | samsung | galaxy note 4
7 | iphone | iphone 7
8 | iphone | iphone 7
9 | htc | one

I want the results to look like this:
htc | one | 1
iphone | iphone 7 | 3
samsung | galaxy note 5 | 2

So essentially I only want the count for the most rows for each model while grouping both the make and the model.
Hope that makes some sort of sense to someone.  Thank you in advance!

A: So you want to display the model with Maximum count for each make.
Following query will just do that:
select make,model,count(*) as cnt
from phones p1
group by make,model
having cnt =  (select max(p2.cnt)
               from
                   (select make,model,count(*) as cnt
                          from phones
                          group by make,model
                   )p2
                where p2.make = p1.make
               )
 ;

Click here for updated DEMO
Hope it helps!

A: Do some tricks with mysql functions, you can use substring_index and group_concat:
select
  `make`,
  substring_index(group_concat(`model` order by cnt desc), ',', 1) `model`,
  max(cnt) max_count
from (
  select `make`, `model`, count(1) cnt
  from yourtable
  group by `make`, `model`) t
group by `make`

See demo in SQLFiddle.
Some explaination:

*

*Subquery t will query count of each group make, model;

*group_concat(model order by cnt desc) with group by make will let all model be concated with separator , and order by cnt desc;

*substring_index is a function which can split string with specified separator and return sub-string according to the index we passed.

All these functions you can check mysql official documents to learn more information.

A: You're probably after something like this:
SELECT a.*
  FROM
     ( SELECT make
            , model
            , COUNT(*) total
         FROM my_table
        GROUP
           BY make
            , model
     ) a
  JOIN
     ( SELECT make
            , MAX(total) total
         FROM
            ( SELECT make
                   , model
                   , COUNT(*) total
                FROM my_table
               GROUP
                  BY make
                 , model
          ) x
       GROUP
            BY make
     ) b
    ON b.make = a.make
   AND b.total = a.total;


text:
Q: How to calculate Bloom filter percentage I am going through Hadoop In Action and came across explanation on Bloom Filter, where it says:

The false positive rate is approximated by the equation

(1 – exp(-kn/m))k

where k is the number of hash functions used, m is the
  number of bits used to store the Bloom filter, and n is the number of
  elements to be added to the Bloom filter. In practice, m and n are
  determined by the requirement of the system, and therefore, k is
  chosen to minimize the false positive rate given m and n, which (after
  a little calculus) is

k = ln(2) * (m/n) ≈ 0.7 * (m/n)

The false
  positive rate with the given k is 0.6185m/n, and k has to be an
  integer. The false positive rate will only be an approximation. From a
  design point of view, one should think in terms of (m/n), number of
  bits per element, rather than m alone. For example, we have to store a
  set containing ten million URLs (n=10,000,000). Allocat ing 8 bits
  per URL (m/n=8) will require a 10 MB Bloom filter (m = 80,000,000
  bits). This Bloom filter will have a false positive rate of (0.6185)8,
  or about 2 percent. If we were to implement the Set class by storing
  the raw URLs, and let's say the average URL length was 100 bytes, we
  would have to use 1 GB. Bloom filter has shrunk the storage
  requirement by 2 orders of magnitude at the expense of only a 2
  percent false positive rate! A slight increase in storage allocated to
  the Bloom filter will reduce the false posi tive rate further. At 10
  bits per URL, the Bloom filter will take up 12.5 MB and have a false
  positive rate of only 0.8 percent.

So here it says that the the false positive rate is 0.6185*8 which is 4.948 but how the document says that it is approximately 2%? Can someone please help me how the percentage is calcluated?
Detailed explanation based on David's response:
Based on explanation in book:
n = 10,000,000 = 1e7

m/n = 8 which means m = 8*n

k = ln(2) * (m/n), Value of ln(2) is 0.693 = 0.7, so value of k = 0.7 * (m/n)

Now coming to my expression:
 (1 – exp^(-kn/m))^k = (1 - exp^(-0.7))^(0.7*8) = (1 - 0.4965)^(5.6) = (0.5034)^(5.6) = 0.0214 (Here ^ represents power)

To calculate percentage, we have to multiply with 100.
So the percentage is 0.0214*100 = 2%

A: The correct formula is
                k
(1 – exp(-kn/m)) ,

taking the parenthesized expression to the power k instead of multiplying by k. The approximation is mostly to assume that the value of each cell of the Bloom filter is independent (with a little bit of error from writing exp instead of the true single-cell probability); the false positive rate is the probability that k cells all have been marked.
Here is how to compute the false positive probability for the given example.
>>> from math import *
>>> n = 1e7
>>> m = 8*n
>>> k = log(2) * (m/n)
>>> (1 - exp(-k*n/m)) ** k
0.021415847120683718

To convert the probability to a percentage, multiply by 100.
>>> 100*_
2.1415847120683718


text:
PlayStation Nation Home of the world's longest running PlayStation podcast
SAMURAI WARRIORS 4 -10 Year Anniversary!
TECMO KOEI America today announced that SAMURAI WARRIORS 4 is in development for PlayStation 3 and PlayStation 4 computer entertainment systems and PS Vita system, and is scheduled for release on October 21, 2014. SAMURAI WARRIORS 4 is celebrating 10 years of the tactical action WARRIORS brand that has sold over 34 million units worldwide, in addition to the franchise's first-ever appearance on new generation systems with its launch on PlayStation 4. SAMURAI WARRIORS 4 will be on display at the E3 2014.
Since its original announcement in 2013, fans have been clamoring for information about SAMURAI WARRIORS 4. Now a new chapter of the saga unfolds with more than 50 playable warriors to choose from, devastating new attacks and exciting new modes creating an entirely new SAMURAI WARRIORS experience in stunning HD resolutions.
55 New and Updated Characters— Nobuyuki Sanada and Yoshitsugu Otani join the fray, along with Takatora Todo, Naotora Ii and Munenori Yagyu previously only available in Japanese releases of SAMURAI WARRIORS along with major overhauls of appearance and rearrangements in battle moves for fan-favorite characters such as Yukimura Sanada and Nobunaga Oda adding to the diverse range of more than 50 playable characters
Disseminate the Enemy Ranks— Battles are more thrilling than ever with new maneuvers including Hyper Attacks which allow for rapid moment on the battlefield combined with high powered attacks, a powerful Rage Attack which can be reached when the Spirit Gauge is full, deadly finishing moves with Mighty Strikes and the ability to mount and dismount horses seamlessly, additionally existing moves have all been powered up from their previous iterations
New Battle Modes— Enhancements and newly implemented gameplay systems create a deeper and more satisfying combat experience, including the all-new ability to switch between two characters in real-time, adjustments to morale, Officer development and the return of the popular portable item system found in SAMURAI WARRIORS 3 are just some of the features players will find to gain the advantage in combat
Unfold the rich tapestry of the Warring States era— The Story Mode portrays the tales surrounding the battles by faction, deepening the relationships between characters and is separated into two parts, regional stories, which tell the tales of the officers of various regions around the land such as Kyūshū and Shikoku, and the story of unification, which details events up to the end of the Warring States era
Leave a mark on history— In the new "Chronicle Mode", while completing various quests, meeting new officers and collecting items, players discover the world of SAMURAI WARRIORS through their own design with more ways to customize than ever before including a vastly upgraded Create Character system
Living World— PlayStation 4 players will experience an even more engaging saga with highly detailed landscapes and breathtaking skies that reflect true to life lighting and shadow effects and battlegrounds packed with significantly more enemies on screen
Cooperative Play and Cross Save functionality— All modes can be played cooperatively via Network Play across the PlayStation 3, PlayStation 4 and PS Vita system, additionally save data can be shared across all three systems.
The PlayStation 3 and PS Vita versions will be available exclusively through the PlayStation Store for $49.99 (PS3) and $39.99 (PS Vita) respectively and the PlayStation 4 will be available for $59.99 on October 21 2014.
Powered By DT Author Box
Written by Greg
Like playing games and love playing online with the community.
View all posts written by the authorFollow the author on Twitter @StoffinatorsContact the author at [email protected]Find the author on the PSN as Stoffinator
Posted by: Greg on June 4, 2014.
E3 2014, Playstation, PS Vita, PS Vita News, PS3, PS3 News, PS4, PS4 News, PSN, PSN News
Review: Lemmings Touch (PSV)
Check out these 51 details on DRIVECLUB


text:
Access Statistics for Craig Burnside
Aid, policies, and growth 1 7 12 2,239 9 24 59 5,020
Aid, policies, and growth: revisiting the evidence 0 3 18 5,313 0 12 52 12,229
Aid, the incentive regime, and poverty reduction 0 0 4 688 1 3 11 2,153
Assessing the Effects of Fiscal Shocks 0 1 3 287 1 4 12 957
Assessing the effects of fiscal shocks 0 0 0 172 1 1 4 672
Capital Utilization and Returns to Scale 1 1 1 221 2 2 10 1,011
Capital Utilization and Returns to Scale 0 0 0 1 3 4 9 853
Capital Utilization and Returns to Scale 0 0 2 638 1 1 6 2,996
Carry Trade and Momentum in Currency Markets 1 1 1 189 4 5 12 397
Carry Trade and Momentum in Currency Markets 0 0 1 85 3 7 13 207
Carry Trades and Risk 0 2 10 143 1 4 21 311
Currency Crises and Government Finances 0 0 0 5 0 0 0 17
Do Peso Problems Explain the Returns to the Carry Trade? 0 0 1 196 1 3 10 502
Do Peso Problems Explain the Returns to the Carry Trade? 0 3 11 189 5 17 53 524
Empirical Asset Pricing and Statistical Power in the Presence of Weak Risk Factors 0 0 0 71 0 0 0 263
Empirical Asset Pricing and Statistical Power in the Presence of Weak Risk Factors 0 0 0 6 0 1 3 64
Exchange Rate Determination, Risk Sharing and the Asset Market View 0 0 3 59 1 3 7 92
Factor Hoarding and the Propagation of Business Cycles Shocks 0 1 1 320 1 5 8 1,164
Fiscal Shocks and Their Consequences 0 1 11 559 4 10 40 1,425
Fiscal Shocks in an Efficiency Wage Model 0 0 0 126 0 0 2 680
Government Finance in the Wake of Currency Crises 0 0 0 96 0 0 3 347
Government Finance in the Wake of Currency Crises 0 0 0 172 0 1 7 561
Hedging and Financial Fragilities in Fixed Exchange Rate Regimes 0 0 0 201 0 1 4 938
Hedging and Financial Fragility in Fixed Exchange Rate Regimes 0 0 0 696 1 2 2 3,693
Hiccups for HIPCs 0 0 0 162 1 1 3 719
Hiccups for HIPCs? 0 0 0 77 0 0 4 320
Hiccups for HIPCs? 0 0 0 6 0 0 0 44
Identification and Inference in Linear Stochastic Discount Factor Models with Excess Returns 0 0 0 39 0 1 6 119
Investor Overconfidence and the Forward Premium Puzzle 0 0 0 69 0 2 9 233
Labor Hoarding and the Business Cycle 1 1 7 327 4 7 21 1,016
On the Asset Market View of Exchange Rates 1 1 2 43 2 2 6 116
On the Fiscal Implications of Twin Crises 0 0 0 108 1 1 2 340
On the Fundamentals of Self-Fulfilling Prophecies 0 0 0 343 0 0 1 2,678
On the Fundamentals of Self-Fulfilling Speculative Attacks 0 0 0 308 0 1 3 1,039
On the Fundamentals of Self-Fulfilling Speculative Attacks 0 0 0 113 0 1 3 429
Prospective Deficits and the Asian Currency Crises 0 0 0 124 0 0 0 752
Prospective Deficits and the Asian Currency Crisis 0 0 0 477 8 8 10 3,045
Prospective Deficits and the Asian Currency Crisis 0 0 0 0 0 0 4 629
Prospective deficits and the Asian currency crisis 0 0 0 262 0 1 4 1,107
Risk, Volatility, and the Global Cross-Section of Growth Rates 0 1 1 10 0 5 7 56
Risk, Volatility, and the Global Cross-Section of Growth Rates 0 1 1 85 0 2 3 194
Sectoral Solow Residuals 0 0 2 337 3 3 8 1,348
Sectoral Solow residuals 0 0 0 0 0 1 4 440
Small Sample Properties of Generalized Method of Moments Based Wald Tests 0 0 0 462 1 1 5 3,207
Small sample properties of generalized method of moments based Wald tests 0 0 0 1 1 1 4 466
The Cross-Section of Foreign Currency Risk Premia and Consumption Growth Risk: A Comment 0 1 1 37 0 2 3 114
The Forward Premium is Still a Puzzle 0 0 0 155 0 0 3 423
The Returns to Currency Speculation 0 0 0 129 0 3 9 448
The Returns to Currency Speculation 1 3 8 385 1 8 18 1,067
The Returns to Currency Speculation in Emerging Markets 0 1 1 341 1 3 7 745
Understanding Booms and Busts in Housing Markets 0 1 1 181 0 2 10 506
Understanding Booms and Busts in Housing Markets 0 0 1 92 1 3 7 212
Understanding Booms and Busts in Housing Markets 0 0 1 143 2 13 33 266
Understanding booms and busts in housing markets 0 0 0 117 0 1 9 187
Understanding the Forward Premium Puzzle: A Microstructure Approach 0 0 0 170 0 2 6 400
Total Working Papers 6 32 112 20,503 70 202 630 69,911
Aid, Policies, and Growth 8 22 46 3,572 23 80 208 7,815
Aid, Policies, and Growth: Reply 0 3 6 367 4 12 23 861
Carry Trade and Momentum in Currency Markets 2 6 16 143 6 14 42 412
Carry Trade: The Gains of Diversification 0 2 3 293 1 8 18 561
Consistency of a Method of Moments Estimator Based on Numerical Solutions to Asset Pricing Models 0 0 0 15 0 1 2 66
Currency crises and contingent liabilities 0 0 0 66 0 0 6 231
Detrending and business cycle facts: A comment 1 2 3 131 2 3 8 306
Factor-Hoarding and the Propagation of Business-Cycle Shocks 0 18 38 549 3 30 75 1,430
Government finance in the wake of currency crises 0 0 1 108 2 2 13 347
Government guarantees and self-fulfilling speculative attacks 0 4 8 186 1 8 29 422
Hansen-Jagannathan Bounds as Classical Tests of Asset-Pricing Models 0 0 0 0 1 2 28 1,121
Hedging and financial fragility in fixed exchange rate regimes 0 4 10 167 0 5 33 623
Hiccups for HIPCs? Implications of Debt Relief for Fiscal Sustainability and Monetary Policy 0 0 0 99 0 0 0 376
Identification and Inference in Linear Stochastic Discount Factor Models with Excess Returns 0 0 2 11 0 1 7 32
Industry innovation: where and why A comment 0 0 0 7 0 0 0 69
Investor Overconfidence and the Forward Premium Puzzle 0 0 0 42 1 2 11 210
Labor Hoarding and the Business Cycle 2 3 14 842 7 14 59 2,820
New Zealand's risk premium 0 0 1 16 0 1 8 49
On Contingent Liabilities and the Likelihood of Fiscal Crises&ast 0 0 0 17 0 0 2 48
Production function regressions, returns to scale, and externalities 0 0 3 225 0 1 10 626
Saving in Mexico: The National and International Evidence 0 0 0 19 0 1 4 82
Sectoral Solow residuals 0 2 3 146 2 6 14 439
Small-Sample Properties of GMM-Based Wald Tests 0 0 0 0 2 2 3 478
Solving asset pricing models with Gaussian shocks 2 4 22 290 5 8 38 560
The Cross Section of Foreign Currency Risk Premia and Consumption Growth Risk: Comment 0 1 4 80 2 4 23 232
The Research Agenda: Craig Burnside on the Causes and Consequences of Twin Banking-Currency Crises 0 0 0 75 0 1 5 469
The Returns to Currency Speculation in Emerging Markets 0 1 4 210 2 6 20 633
The carry trade in industrialized and emerging markets 1 2 8 120 2 5 26 319
Understanding Booms and Busts in Housing Markets 2 8 43 178 8 29 139 507
Understanding the Forward Premium Puzzle: A Microstructure Approach 0 0 0 126 0 3 12 366
Understanding the Korean and Thai currency crises 0 0 1 168 2 2 5 885
Total Journal Articles 22 99 281 9,620 86 294 1,022 27,253
Capital Utilization and Returns to Scale 1 1 3 125 3 3 8 355
Comment on "Carry Trades and Currency Crashes" 0 1 1 41 0 2 3 138
On the Fiscal Implications of Twin Crises 0 0 0 36 0 0 2 120
The Carry Trade in Industrialized and Emerging Markets 2 8 18 75 5 21 86 250
Total Chapters 3 10 22 277 8 26 99 863
Software Item
Discrete State-Space Methods for the Study of Dynamic Economies 0 1 9 567 2 6 21 1,532
Matlab code for Discrete State-Space Methods for the Study of Dynamic Economies 1 3 19 2,470 3 8 51 7,379
Matlab code for On the Fiscal Implications of Twin Crises 1 4 5 354 1 5 11 818
Matlab code for Real Business Cycle Models: Linear Approximation and GMM Estimation 21 64 229 9,098 44 124 445 17,356
Total Software Items 23 72 262 12,489 50 143 528 27,085


One per customer. First-time students. Hawaii residents only.
Yoga Nidra with Yogi Charu is the art of conscious relaxation. It is a meditation practice done in Shavasana - Corpse Pose.
We are teachers, students, surfers, healers, triathlon lovers, grandparents and everything in between. Join a community of life hackers dedicated to making not only their life more enjoyable, but fueling the aloha spirit ON and OFF the mat through yoga.
and non-heated studio (CHILL STUDIO).
Please stay tuned as we complete our transformation!


text:
Q: Limit of a function $\mathbb{R}^3 \to \mathbb{R}$ Limit of the function $$\lim\limits_{x,y,z\to 0,0,0} \frac{1}{xyz}\tan\bigg(\frac{xyz}{1+xyz}\bigg)$$
If this was a one-dimensional function, this would look like an oportunity to apply the limit $\frac{\sin(x)}{x} = 1$. Is there a way to substitute $(x,y,z)$ with $t$ or something and apply the limit?
I would be interested in specifically this transformation and not another way to compute the limit.

A: Yes, you just have  to set $u=xyz$ and use the fact that $\tan u\sim_0 u$, so
$$\frac 1{xyz}\tan\Bigl(\frac{xyz}{1+xyz}\Bigr)=\frac1u\tan\Bigl(\frac{u}{1+u}\Bigr)\sim_0\frac1u\, \frac u{1+u}=\frac 1{1+u}\to 1.$$

A: Set $u=xyz\to0$
$$\frac{1}{u}\tan\left(\frac{u}{1+u}\right)=\frac{\tan\left(\frac{u}{1+u}\right)}{\frac{u}{1+u}}\frac{1}{1+u}\to1\cdot1=1$$


Vibramycin is a broad-spectrum antibiotic synthetically derived from oxytetracycline, and is available as Vibramycin Monohydrate (doxycycline monohydrate); Vibramycin Hyclate and Vibra-Tabs (doxycycline hydrochloride hemiethanolate hemihydrate); and Vibramycin Calcium (doxycycline calcium) for oral administration.
with a molecular formula of C22H24N2O8•H2O and a molecular weight of 462.46. The chemical designation for doxycycline is 4-(Dimethylamino)-l,4,4a,5,5a,6,ll,12a-octahydro-3,5,10,12,12a-pentahydroxy-6-methyl-l,ll-dioxo-2-naphthacenecarboxamide monohydrate. The molecular formula for doxycycline hydrochloride hemiethanolate hemihydrate is (C22H24N2O8·HCl)2·C2H6O·H2O and the molecular weight is 1025.89. Doxycycline is a light-yellow crystalline powder. Doxycycline hyclate is soluble in water, while doxycycline monohydrate is very slightly soluble in water.
Inert ingredients in the syrup formulation are: apple flavor; butylparaben; calcium chloride; carmine; glycerin; hydrochloric acid; magnesium aluminum silicate; povidone; propylene glycol; propylparaben; raspberry flavor; simethicone emulsion; sodium hydroxide; sodium metabisulfite; sorbitol solution; water.
Inert ingredients in the capsule formulations are: hard gelatin capsules (which may contain Blue 1 and other inert ingredients); magnesium stearate; microcrystalline cellulose; sodium lauryl sulfate.
Inert ingredients for the oral suspension formulation are: carboxymethylcellulose sodium; Blue 1; methylparaben; microcrystalline cellulose; propylparaben; raspberry flavor; Red 28; simethicone emulsion; sucrose.
Inert ingredients for the tablet formulation are: ethylcellulose; hypromellose; magnesium stearate; microcrystalline cellulose; propylene glycol; sodium lauryl sulfate; talc; titanium dioxide; Yellow 6 Lake.
What are the precautions when taking doxycycline calcium oral suspension (Vibramycin Oral)?
What is doxycycline (Vibramycin Oral)?


Operation Turkey: The Salvation Army is looking for volunteers to cook and deliver Thanksgiving meals Nov. 21-22 to the community's homeless and less fortunate citizens. To volunteer or request a meal, go to operationturkey.com, call 682-226-2724 or email vgunter@operationturkey.com.
Diabetes Symposium: Nov. 3, 9 a.m.-3 p.m., DSS, 1225 Ramsey St. Better Health hosts annual symposium to launch Diabetes Awareness Month. Free; registration required. Call 910-483-7534 or visit www.betterhealthcc.org.
Pesticide Collection Day: Nov. 6, 10 a.m.-2 p.m., in the parking lot of the Cumberland County Extension Office at 301 E. Mountain Drive. For information and assistance, Anthony Growe at 910-321-6875 or Liz Lahti at 910-321-6862.
Lung Cancer Vigil: Nov. 8, 6 p.m., Clara McLean House, 20 FirstVillageDrive, Pinehurst. FirstHealth of the Carolinas hosts the tenth annual Shine a Light on Lung Cancer vigil focusing on lung cancer treatment and support. For information, call 800-213-3284.
Make, Freeze, Heat, Eat!: Nov. 29, noon to 1:30 p.m., Cooperative Extension, 301 E. Mountain Drive. Learn to prepare meals in advance. Rescheduled from September. For information and registration, call 910-321-6860.


text:
Q: Read json children nodes with d3 Need some help on reading json data with d3. here's the json
{
  "name": "Main Course",
  "children": [
    {
      "name": "Chinese",
      "children": [
        {"name": "Noodles"},
        {"name": "Rice"},
        {"name": "Xinjiang Roast"}
      ]
    },
    {
      "name": "Indian",
      "children": [
        {"name": "Rice"},
        {"name": "Paratha"},
        {"name": "Dal Fry"}
      ]
    }
  ]
}

I want to make a list from these data like below,

Main Course

Chinese

Noodles

Rice

Xinjiang Roast

Indian

Rice

Paratha

Dal Fry

This is where I am stuck,
d3.select("body")
        .append("ul")
        .selectAll("li")
        .data(data)
        .enter()
        .append("li")
        .attr("id","mylist")
        .text(function (d) {
        return d.name;
        })

 d3.select("#mylist")
        .append("ul")
        .selectAll("li")
        .data(data)
        .enter()
        .append("li")
        .text(function (d) {
        return d.children[0].name;
        })
      }

It gives me the below result,

Main Course

Chinese

I guess the problem I am facing is trying to get the children data/nodes. I tried using index like children[i] but got undefined error. How do I properly loop through all the children and append it to a list nested to their parent nodes?

A: I don't really see the need to use d3 for this.
Try this:
function makeMenu(jsonObj, container) {
    container = container || document.body;

    var ul = document.createElement('ul');
    var li = document.createElement('li');
    li.innerHTML = jsonObj.name;
    ul.appendChild(li);
    container.appendChild(ul);

    if(jsonObj.children) {
        for(var i=0; i<jsonObj.children.length; i++) {
            li = document.createElement('li');
            makeMenu(jsonObj.children[i], li);
            ul.appendChild(li);
        }
    }
}

A working example can be found here.


City of Glen Cove, Ferry Terminal Project | D&B Engineers and Architects, P.C.
D&B was a key Design Team member for the City of Glen Cove Community Development and Industrial Development Agency for the Glen Cove Creek Waterside Improvements and the Glen Cove Ferry Terminal Project currently under construction. D&B role was to design the erosion and sediment control system for the construction phase of the project as well as the permanent storm water drainage system. These are important elements of the required Storm Water Pollution Prevention Plan (SWPPP) which D&B also developed for the City.
D&B's project responsibilities also included undertaking important elements of the environmental review process under the National Environmental Policy Act (NEPA) such as: wetlands delineation, habitat assessments, storm water management, infrastructure assessment, Phase II site investigations (soil sampling and analysis), soil management plan, and federal and state environmental permitting and approvals. D&B also played a key role in expediting the federal and state permit application review process sufficient for the City to obtain the permits and approvals within the time frame necessary for securing the project funding under the federal American Recovery and Re-investment Act (ARRA).
For more information about this service, email us at findingsolutions@db-eng.com.


Latte art has become popular in recent years, but barista artist Michael Breach takes it to the next level. Check out his incredible celebrity portraits, all created in foam.
It's hard to imagine that you can create emotion in a face atop a latte, but Edward Scissorhands looks as angsty here as I've ever seen him.
The classic Beatles scene as they cross Abbey Road makes an amazing scene for your morning cup.
Madonna strikes a foamy pose.
I will now have "No Woman, No Cry" in my head for the rest of the day after seeing this Bob Marley portrait.
The Shining was terrifying enough. Seeing Jack appear in my latte is a little more than I can handle in the morning.
Even in latte art, Nicolas Cage still has that oddly smug look on his face.
This is how David Bowie should always be portrayed. That hair is amazing.
He's even managed to capture the freckles on Emma Stone's face. Incredible.
Oh, Gene Simmons. Please put that tongue back in your mouth.
Clooney staring at me every morning? I can get behind that.
For when you just want to start your morning off feeling cool, go with Jimi Hendrix.
Latte art seems like an idea Willy Wonka could get behind. But maybe with candy incorporated somehow.
Friday will forever have a place in my heart, and I would gladly have Ice Cube atop my latte.
Game of Thrones fans, this Peter Dinklage portrait is for you.
Han Solo and Chewbacca sharing an espresso? It could happen.
Is that a tu-mah? Oops… wrong Schwarzenegger movie.
Barista artist Michael Breach captioned this Harry Potter rendition "Espressio Patronum!!!" Perfection.


text:
Q: date array in a query SET @qdate := '2014-02-17';
SELECT
    com.trading_code,
    com.business_segment_id,
    dmkt.close_price,
    dmkt.cdate,
    dmkt.turnover,
    dmkt.volume,
    sh.total_no_share,
    IF(dmkt.close_price IS NULL,
        ((SELECT
                close_price
            FROM
                daily_mkt_status
            WHERE
                trading_code = com.trading_code
                    AND cdate <= @qdate
            ORDER BY cdate DESC
            LIMIT 1) * sh.total_no_share),
        (dmkt.close_price * sh.total_no_share)) AS mcap
FROM
    company AS com
        LEFT JOIN
    daily_mkt_status AS dmkt ON (com.trading_code = dmkt.trading_code
        AND dmkt.cdate = @qdate )
        LEFT JOIN
    share_info AS sh ON (com.trading_code = sh.trading_code)

This code works only when i use the variable like
SET @qdate :- '2014-02-17'

but what i want it to be is to be an array of dates from another table like this
SET @qdate IN (SELECT cdate FROM market_index);

the qdate will cycle through all the date from the table market_index. i have gone through all the array variable questions but non worked for me because of this part of my code
cdate <= @qdate
but i need this part to be there or my query doen't give me the output that i want.
hope i was clear, and many thanks in advance.

A: Why not simply join the market_index table?
SELECT
    com.trading_code,
    com.business_segment_id,
    dmkt.close_price,
    dmkt.cdate,
    dmkt.turnover,
    dmkt.volume,
    sh.total_no_share,
    mi.cdate
    IF(dmkt.close_price IS NULL,
        ((SELECT
                close_price
            FROM
                daily_mkt_status
            WHERE
                trading_code = com.trading_code
                    AND cdate <= mi.cdate
            ORDER BY cdate DESC
            LIMIT 1) * sh.total_no_share),
        (dmkt.close_price * sh.total_no_share)) AS mcap
FROM
    company AS com
    JOIN market_index AS mi
    LEFT JOIN daily_mkt_status AS dmkt ON (
        com.trading_code = dmkt.trading_code
        AND dmkt.cdate = mi.cdate
    )
    LEFT JOIN share_info AS sh ON (com.trading_code = sh.trading_code)

You might want to add a GROUP BY clause as well just to get rid of unnecessary duplicates