There was drama at a service station in Marondera on Monday afternoon after officials there allegedly sold 400 litres of diesel to a motorist who was driving a Honda Fit, while other motorists were being restricted to only 40 litres.
The motorists accused the fuel attendants of being corrupt and fuelling the black market.
Police had to intervene and took both the Honda Fit driver and the service station manager away for interrogation.
The motorist, identified as Norman Nyandoro, was then handed over to the Environmental Management Agency (EMA), who issued him with a ZWR$500 ticket for "transporting a dangerous substance without a licence".
The service station manager was also taken in for questioning and released pending investigations.
Mashonaland East provincial police spokesperson Inspector Tendai Mwanza could not be reached for comment yesterday.
EMA provincial spokesperson Astas Mabwe yesterday confirmed that they issued a ticket to Nyandoro, who had containers filled with diesel fuel stashed in a Honda Fit.
"EMA issued him (transporter) with a ticket of ZWR$ 500 for contravening SI [Statutory Instrument] 268 of 2018, which requires one to have a licence issued by the agency for transportation of hazardous substances. The fuel, about 400 litres, was loaded into a Honda Fit and according to the driver, it was being transported to Harare," he said.
The current fuel crisis being experienced in the country has resulted in service station officials selling fuel to cronies, who, in turn, sell it on the black market.
Despite fuel tankers visibly offloading fuel in Marondera, some service stations are only releasing few quantities to the public, raising speculation that they were feeding the black market, where they fetch higher returns.
The post Drama as service station pumps 400ltrs diesel into Honda Fit appeared first on NewsDay Zimbabwe.
Good to see cases are properly handled by the authorities. That is what we expect from them. Stop corruption.
These are the queen bees who get money from RBZ at some fictitious rates to buy fuel. Thereafter they take same fuel which they got for a song to the real market & make a killing. JPM, the reserve bank governor then goes to parliament & tell us that he is not engaging in quasi-fiscal activities. Yet he his taking people's money, dishing it out to his cronies at none-market value ostensibly to buy critical commodities like fuel. But after buying that fuel, if ever they even buy it, they take it to black market so that they make super profits. Is it ethical for JPM & his family & friends to rob the nation like that in broad daylight?


text:
Q: How to give the "Root Element" name in two Words In XML I want to give the root element name as two words, how to give it..
for Example,
<parent>
  <child1>content</child1>
  <child2>content</child2>
</parent>

Root Element "Parent" has to be given as "Parent Name"
I Want to use SPACE in the Root Element

A: XML Elements cannot have spaces in their names. That's the rule.
If you are converting to/from a data source with spaces in the field names, then you'll need to change those spaces into something else during the conversion process.
I suggest using underscores, as this is a valid character in XML element names - eg <parent_name>
You can also use hyphens if you prefer. Dots, colons and some other punctuation characters are also okay, but can get complicated (eg because colons are also used for name-spacing), so best to avoid them and stick with hyphens and underscores.
The other common way of representing multiple words in an element name is to use camel case, which is where your element name has capital letters to represent the start of each word - eg <ParentName>.
You might want to read this question here on SO for more discussion on this: Is there a standard naming convention for XML elements?
Hope that helps.

redpajama_set_name: RedPajamaStackExchange


The commonwealth fund (an influential US think tank) recently declared the NHS to be the best healthcare system in the world, for the second year running!
We spend less of our GDP, per head of population, than almost any other developed nation and yet continue to have the best service there is. It clearly is not unaffordable. It is something to be extremely grateful for! Why on earth would you spend over 18% of your GDP on health, as our friends in the US do, and still not be able to provide great health care for every person in your nation, no matter of their ability to pay? I do not understand why the NHS (or any "social model" of healthcare) is vilified from the other side of the Atlantic Ocean, when it is the most cost effective and clinically safe health system that there is anywhere in the world.
So, I've been wondering – why keep it to ourselves? Why just stop at a National Health Service? Why not go International (but not in an awful old-school Imperial Way, but rather a life-giving, loving kind of a way?). We have some of the best public health knowledge there is. We are learning to work creatively and differently with our population for prevention of illness and self-care. We know how to manage complex systems and budgets and we are able to adapt to new challenges relatively quickly. We know what it is to limit our spending and not allow it to get out of control and we know how to regulate corporate giants who would love to turn it into a profit-making machine.
The issues of global justice, when it comes to healthcare are insane. We keep talking about wanting to 'lead the world'. Well – that old style of imperial dominance is thankfully dead and buried and will never be recovered. But we can humbly offer what we do know onto the table and see if we could all learn together about how to have a more globally just health care system. Why stop at the NHS? Why be satisfied with only a National Health Service? Let's stop wasting time, money and resource on space exploration, projects which destroy the environment and building ridiculous weapons. Instead, let's imagine a world with an International Health System in which we really get to grips with the kind of issues that are needlessly destroying millions of human lives every year. The possibilities of an IHS are endless and there are multiple ways it could be stewarded. If every nation contributed 8.9% of its own GDP towards it (as we do in the UK), I wonder just what might be possible and how much more connected we might become as a family of nations. Do we still dare to dream these days?


Church Village is within the Rhondda - Cynon - Taff County Borough council area, an example local postcode is CF38 1RN. It is also referred to as Pentrer Eglwys. Shown below is information about bus, express coach and rail transport (plus a few other local facilities) around Church Village.
There are 18 local bus services from Church Village, listed here.
Click here to book National Express services from Church Village.
To get to the nearest train station (Upper Boat, Trefforest Industrial Estate Rail Station), look for bold names in the 'Destinations by local bus' list below.
Click here for train bookings and services from the nearest station to Church Village.
A map of Church Village can be found here. To buy local maps of Church Village click here. You can also obtain an Ordnance Survey map centered on Church Village.
Various accommodation is available local to Church Village such as Premier Inn, Travelodge. For more accommodation options, click here.
Advice about attractions and hotels near Church Village from Trip Advisor is available here, taxis can be booked here. Books about Church Village are available here.
Destinations by direct local bus from Church Village.


text:
@implementation MateriaModel

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{

}

-(NSString *)description{

    return [NSString stringWithFormat:@"%@====%@=====%@",_name,_materialName,_imagePath];
}

@end

redpajama_set_name: RedPajamaGithub


Great Lyrca apparel. Lyrca thongs and g-strings.
Great gift ideas for grandparents.
Includes all underwear brands including Body Aware and Joe Lyrca. Many colors like lime green, frozen orange, peach, black cherry and aqua.
United States auctions. Products offered change constantly, so check back often to see what is for sale.


text:
<?php
/**
 * Created by PhpStorm.
 * User: Александр Чернявенко
 * Date: 28.11.2014
 * Time: 10:02
 */

namespace common\widgets;

class ExtDetailView extends \yii\widgets\DetailView
{
    /**
     * переопределе метод для поддержки Closure as value
     * Renders a single attribute.
     * @param array $attribute the specification of the attribute to be rendered.
     * @param integer $index the zero-based index of the attribute in the [[attributes]] array
     * @return string the rendering result
     */
    protected function renderAttribute($attribute, $index)
    {
        if (!empty($attribute['value']) && $attribute['value'] instanceof \Closure) {
            $attribute['value'] = call_user_func($attribute['value'], $this->model, $index);
        }

        if (is_string($this->template)) {

            return strtr($this->template, [
                    '{label}' => $attribute['label'],
                    '{value}' => $this->formatter->format($attribute['value'], $attribute['format']),
                ]);
        } else {
            return call_user_func($this->template, $attribute, $index, $this);
        }
    }
}


text:
California is the first state where LGBT rights and history will be taught in public schools
The State of California made history this week by becoming the first state in the U.S. to require LGBT rights be taught in schools.
The State's Board of Education unanimously approved changing instructions given to teachers to comply with a new state law that requires public schools to include historic gay Americans and mark LGBT milestones.
The State Board of Education is the K-12 policy-making body for academic standards, curriculum, instructional materials, assessments and accountability. The change is part of a larger overhaul of the State's social science curriculum.
State Superintendent of Public Instruction Tom Torlakson today announced that the State Board of Education voted to approve the History–Social Science Framework for California Public Schools, which will update and upgrade history and social science instruction in California.
The initial framework will see second graders learn about families with same-sex parents and two years later, in history, pupils will learn about Harvey Milk and how he championed gay rights in San Francisco.
In more senior years, pupils will be taught about gender roles, the Supreme Court ruling, which legalised same-sex marriage and the recent controversy over transgender bathrooms.
The legislation that has seen the changes take effect also prohibits schools from teaching anything that can be seen as discriminatory or will adversely impact the LGBT community.
Mr. Torlakson announced the historical change in California's public education
Eddi Haskell July 16, 2016 at 1:19 AM
Broward County Florida (population 1.8 million), the home of Fort Lauderdale, was the nation's first major metropolitan area to make the teaching of gay studies mandatory for all high school students 11 years ago. This is before San Francisco or New York City or Los Angeles.
Ben Aquila July 16, 2016 at 3:47 AM
Bravo Florida! In this case, the teaching will be mandatory in all State and in all education levels. A new step in the long journey to full equality.
France ends lifetime ban on gay blood donations
The Navy is set to name a ship for the gay rights ...
A trans campaigner will address the Democratic Nat...
Dads for transgender equality
Hunk of the month July: Amadeo Leandro
NBA pulls All-Star Game from North Carolina over a...
VP Biden supports LGBT rights on Australia visit
Mora than one in three LGBT entrepreneurs are not ...
First LGBT week in Equatorial Guinea
California is the first state where LGBT rights an...
Stunning artistic video honors Orlando's mass shoo...
Canada's Anglican Church finally approves gay marr...
Wonderkid, the struggle of a soccer player to be h...
Boyz magazine, 25 years covering gay scene
A new inclusive ad in Philippines
Over one billion people live in places where same-...
PM Trudeau marches in Toronto Pride Parade
Puerto Rico unveils first monument to honour Orlan...
Happy Orgullo in Madrid
"Looking: The Movie" is coming

redpajama_set_name: RedPajamaCommonCrawl


Preheat oven to 375°. Combine cookie crumbs and sugar; stir in butter. Press onto bottom of a greased 13x9-in. baking dish. Bake until set, about 8 minutes. Cool on a wire rack.
For filling, in a large saucepan, combine sugar, cornstarch, flour and salt. Stir in milk until smooth. Cook and stir over medium-high heat until thickened and bubbly. Reduce heat; cook and stir 2 minutes. Remove from heat. Stir a small amount of hot mixture into egg yolks; return all to pan, stirring constantly. Bring to a gentle boil; cook and stir 2 minutes.
Remove from heat. Stir in peanut butter until smooth. Pour over crust. Cool to room temperature. Refrigerate, covered, at least 2 hours.
In a large bowl, beat cream until it begins to thicken. Add confectioners' sugar; beat until stiff peaks form. Spread over peanut butter mixture. Sprinkle with peanut butter cups and peanuts. Drizzle with chocolate syrup.
To Make ahead: After peanut butter custard is poured over the crust, refrigerate overnight. Before serving, top with the sweetened whipped cream, peanuts, peanut butter candy and chocolate drizzle.
The rich homemade custard filling and real whipped cream are to die for, but if you're short on time, make three 3-ounce boxes of vanilla cook-and-serve pudding mix according to manufacturer's directions. Whisk in the peanut butter before spreading, and finish with whipped topping.
If you prefer your filling on the firmer side, feel free to add a tablespoon or two of cornstarch.
1 each: 585 calories, 37g fat (16g saturated fat), 144mg cholesterol, 396mg sodium, 55g carbohydrate (40g sugars, 3g fiber), 12g protein.
This recipe looks amazing! I've noticed in the reviews that some people seem to be having trouble with the sauce thickening. I've had this trouble in the past with other custard recipes that call for cornstarch so I usually substitute for AP flour and have no problems.
How do i save recioes?
The peanut butter custard portion took a full hour from start to finish (most of that was stirring time!) and I'm not sure the results were worth quite that much effort. I ended up added more cornstarch after 45 minutes of stirring and then it thickened quickly. The custard was really yummy, but I preferred it warm.
gingbaby, then you might want to eat grass and drink water for the rest of your life.
I've adapted the pie a little and it's so delicious! In the original size I use 5c milk and 2c of peanut butter, instead of 6c and 1c respectively. It turns out really good, but still too soft for my taste. I just made another few tweaks to it yesterday - I halved everything (3c milk, 3 yolks, etc) but used only 1/2c sugar, a full 1/3c starch, and a full cup of peanut butter in order to make a 9" pie. I probably used about half of that batch to fill my pie crust, so I'll have to do some tweaking. I let the milk mix cook for a pretty long time before adding my eggs, so after it set I had a more solid custard layer. It was silky and smooth, and the sweetness was just right! Super easy recipe with room for some playing around with it. Wholly recommend it!
This is really good. You do have to make the custard from scratch, so be prepared to stand at the stove awhile. The only part we didn't like was the peanuts on top. They get soft. Maybe honey roasted would be better, or something that stays crunchy.
This was excellent! For anyone who can't get the custard to thicken, just keep cooking and stirring, and stirring, and stirring. It will get thick.
I will be trying this soon! I have a question before I make it tho...everytime I make homemade whip cream, it tends to be a bit bland. Do most people add a flavoring like vanilla?


Every year, 31st May, is marked as World No Tobacco Day (WNTD) by WHO, lay emphasis on the risks associated with tobacco use. According to WHO 2010 statistics, it was estimated that about 13% (approximately 111,856,400 persons) Of India's population smoked out of which about 24% of were men and about 3% were women. The highest rate of smoking among men was seen in the age-group 40 – 54; and among women in the age-group 70+.
Majority of the smokers start out young. At such a tender age, one doesn't think of health risk associated with it and generally smoke to fit in peer circle, family influences or to experiment. Some people start tobacco use because they believe that it helps them cope with stress, anxiety while others may do it because they feel smoking helps in weight loss.
The poisonous nicotine is the chief active ingredient in tobacco and is found in such items as cigarettes, chewing tobacco, and cigars. When a person smokes, a dose of nicotine reaches the brain. Initially, it improves mood and concentration, decreases anger and stress, relaxes muscles and reduces appetite. However, regular doses of nicotine lead to changes in the brain chemistry, which can cause withdrawal symptoms when there is a decrease in the supply of nicotine. Smoking briefly reduces these withdrawal symptoms and this therefore reinforces the habit. Prolonged usage of tobacco contributes to damaged blood vessels, disturbs cholesterol levels and BP, and increases the risk of coronary heart diseases and respiratory diseases.
Not only does tobacco usage cause physical damage to our body but it also affects our mental health in several ways. Research confirms that smoking is directly proportional to levels of stress- with long exposure to nicotine, stress levels are likely to increase rather than decrease. Other consequences include instability, diminished cognitive intelligence, loss of memory and panic attacks affecting mental well being at work and home. Sudden episodes of sadness and mood swings can also be included.
Since smoking affects physical and mental health in a serious manner it is advisable not to start smoking altogether.
If someone is experimenting they must try and quit as soon as possible as they will find it easier at this stage because nicotine has been rated as a very addictive substance.
Those who are regular smokers should plan to taper off tobacco gradually.
It's best to avoid the company of smokers and situations that can act as triggers.
Develop alternative ways to keep mouth busy through chewing other things like chewing gum, fennel, cardamom etc.
Focusing on health can be a strong motivating factor to quit tobacco.
Relaxation techniques like breathing exercises and mindfulness are of a great help.
It's beneficial to seek professional help if you are unable to quit smoking on your own.
On this World No Tobacco Day let's try to abstain from all forms of tobacco for healthy physical and mental being and a better environment.
Don't you guys think that the writer is really putting so much effort in the articles nowadays.
Dunno about you guys but I most certainly do.


– REALISTIC GUNFIRE SOUNDS: Does your little one go crazy for guns and pistols? If so, then this blade runner style gun toy, is the way to go. Gently pull the trigger and let the flashing lights and amazing machine gunfire sound effects, amaze your kids!
– EASY GRIP FOR LITTLE HANDS: Designed with your kids' best interest at heart, this gun pistol toy has an ergonomic grip handle and trigger. It is shaped in such a way to fit tiny fingers and small hands. Facilitate holding, carrying and shooting to the fullest!
– ENDLESS PRETEND PLAY: Spend some quality time with your kids or let them play alone with this gun pistol toy. Engage them in interactive pretend gun play and teach them about the importance of staying safe and protecting themselves and their beloved ones.
– THE PERFECT TOY FOR: birthday parties, theme celebrations and Halloween. Great for police, cowboy or superhero dress up with their friends. Plus, it makes the coolest party favor for your little guests! Suitable for boys, kids, pre-schoolers, and ages 3+.
– GET THIS PISTOL GUN TOY RISK FREE: Since your satisfaction is our top priority, this blade runner gun pistol is backed by our unconditional money back guarantee policy! Just in case you have any issues with it. Perfect for your son, nephew, grandchild, and cousins. 3 AA BATTERIES ARE REQUIRED, NOT INCLUDED.


text:
El baile de octavo y otros recuerdos / The Eighth Grade Dance and Other Memories
This entertaining collection of short autobiographical pieces recalls the author's struggles as an immigrant youth.
By Ada De Jesús
Format: Trade Paperback
Imprint: Piñata Books
El baile de octavo y otros recuerdos / The Eighth Grade Dance and Other Memories quantity
Categories: Ada De Jesús, Puerto Rican, New Titles, Piñata Books for Young Adults
Eleven-year-old Ada De Jesús was on the cusp of her teens when she moved to the United States from Puerto Rico. Hurricane Hugo had just decimated the island and her father couldn't find a job.
In Chicago, the white dress she arrived in didn't protect her from the snow and frigid temperatures! Constantly exposed to new things, she developed a resilience that served her well. "From one place to another, like riding a bike, if you keep pedaling, you won't fall."
Ada discovered that students in the United States were frequently disrespectful to their teachers. At school she often felt like a two-year-old as she grappled with a completely new language. In addition to navigating a different culture, she had to deal with all the issues familiar to teenage girls: the growth of body hair, pimples, menstruation and of course boys! Her memories of first intimate encounters, fending off unwanted advances and fear of pregnancy will strike a chord with readers.
In these short vignettes recollecting her middle-school years, Ada De Jesús shares her poignant and often funny experiences as a newcomer and an adolescent. Young readers will relate to—and laugh at—her experiences; some may take heart that they too will overcome the difficulties common at this age.
"De Jesús offers honest, emotional, insightful, and sometimes-distressful vignettes in small, digestible chapters. Short, yet packing a punch."—Kirkus Reviews
ADA DE JESÚS, a Spanish high-school teacher in Vineland, New Jersey, obtained her undergraduate degree from Rowan University and her Masters of Instructional Technology from Grand Canyon University. She lives in Hammonton, New Jersey. This is her first published book.
Heartbeat Drumbeat
Feminist and Abolitionist: The Story of Emilia Casanova
Hispanic, Female and Young: An Anthology
The Almost Murder and Other Stories


Very juicy on the palate, elegant flavour, enormous length, equipped with an endless aging potential.
"The Pössnitzberger Sorgenbrecher is a homage to my grandfather Johann Sabathi.
In the fifties he recognised and supported the high potential of Pössnitzberg. At that time he already named his best wines 'Pössnitzberger Sorgenbrecher'.


Holy Week Events at Old First!
Please join us at Old First Reformed United Church of Christ, to celebrate Holy Week. We will have service for Palm Sunday, Maundy Thursday, Good Friday, and Easter Sunday. We hope to see you!


Canada's participation in the First World War (1914-1918) and the Second World War (1939-1945) touched every community in this country. Parks Canada invites Canadians to join us in commemorating individuals from all walks of life who made unique contributions to the war effort. During these global conflicts, civilians and those in the armed forces played a crucial role in protecting and building their communities and thus Canada as a whole.
Born in Point de Bute on July 3, 1892, Albert Desbrisay Carter enlisted in November 1914 in Saint John, New Brunswick. He began his military career in the 26th New Brunswick Battalion, as the unit machine gun officer. Lieutenant Carter was seriously wounded during the Battle of the Crater in 1915. After recovering, Major Carter volunteered for the Royal Flying Corps.
With the Royal Flying Corps, he downed between 27 and 31 enemy aircraft, making him one of the top 15 ranking Canadian aces. He was awarded the 1914-1915 Star, the Distinguished Service Order with bar, the Belgian Croix de Guerre and was mentioned in Dispatches.
On May 20, 1918, Major Carter's plane was shot down behind German lines. He was held prisoner in Karlsruhe, Bavaria, until the signing of the Armistice on November 11, 1918. After the war, Major Carter commanded a Canadian squadron in England where they trained using captured German Fokker D-VII's. During an exercise his plane collapsed in midair and Major Carter died on May 22, 1919 at the age of 27.


text:
Q: jQuery Cross Domain Ajax My ajax code is
$.ajax({
    type: 'GET',
    dataType: "jsonp",
    processData: false,
    crossDomain: true,
    jsonp: false,
    url: "http://someotherdomain.com/service.svc",
    success: function (responseData, textStatus, jqXHR) {
        console.log("in");
    },
    error: function (responseData, textStatus, errorThrown) {
        alert('POST failed.');
    }
});

This is a cross domain ajax request.
I am getting correct response for the request, while checking with firebug i can see that response.
This is the response I am getting in firebug response and while accessing this url through web browser
{"AuthenticateUserResult":"{\"PKPersonId\":1234,\"Salutation\":null,\"FirstName\":\"Miqdad\",\"LastName\":\"Kumar\",\"Designation\":null,\"Profile\":\"\",\"PhotoPath\":\"\/UploadFiles\/\"}"}

But I am getting error
SyntaxError: invalid label

{"AuthenticateUserResult":"{\"PKPersonId\":8970,\"Salutation\

Whether I need to use any other method to get it works. I want to implement this in phonegap+jquery mobile app.
Also, I don't have any access to the web service
If I disable chrome web security it's working fine

A: Looks like the inner JSON struct is passed along as a string. You'll have to JSON.parse() it once more to get that data as an object.
try {
  responseData = JSON.parse(responseData);
}
catch (e) {}

Edit:
Try the following:
$.ajax({
    type: 'GET',
    dataType: "json",
    url: "http://someotherdomain.com/service.svc",
    success: function (responseData, textStatus, jqXHR) {
        console.log("in");
        var data = JSON.parse(responseData['AuthenticateUserResult']);
        console.log(data);
    },
    error: function (responseData, textStatus, errorThrown) {
        alert('POST failed.');
    }
});

A: Unfortunately it seems that this web service returns JSON which contains another JSON - parsing contents of the inner JSON is successful. The solution is ugly but works for me. JSON.parse(...) tries to convert the entire string and fails. Assuming that you always get the answer starting with {"AuthenticateUserResult": and interesting data is after this, try:
$.ajax({
    type: 'GET',
    dataType: "text",
    crossDomain: true,
    url: "http://someotherdomain.com/service.svc",
    success: function (responseData, textStatus, jqXHR) {
        var authResult = JSON.parse(
            responseData.replace(
                '{"AuthenticateUserResult":"', ''
            ).replace('}"}', '}')
        );
        console.log("in");
    },
    error: function (responseData, textStatus, errorThrown) {
        alert('POST failed.');
    }
});

It is very important that dataType must be text to prevent auto-parsing of malformed JSON you are receiving from web service.
Basically, I'm wiping out the outer JSON by removing topmost braces and key AuthenticateUserResult along with leading and trailing quotation marks. The result is a well formed JSON, ready for parsing.

A: The response from server is JSON String format. If the set dataType as 'json' jquery will attempt to use it directly. You need to set dataType as 'text' and then parse it manually.
$.ajax({
    type: 'GET',
    dataType: "text", // You need to use dataType text else it will try to parse it.
    url: "http://someotherdomain.com/service.svc",
    success: function (responseData, textStatus, jqXHR) {
        console.log("in");
        var data = JSON.parse(responseData['AuthenticateUserResult']);
        console.log(data);
    },
    error: function (responseData, textStatus, errorThrown) {
        alert('POST failed.');
    }
});

A: If you are planning to use JSONP you can use getJSON which made for that. jQuery has helper methods for JSONP.
$.getJSON( 'http://someotherdomain.com/service.svc&callback=?', function( result ) {
       console.log(result);
});

Read the below links
http://api.jquery.com/jQuery.getJSON/
Basic example of using .ajax() with JSONP?
Basic how-to for cross domain jsonp

A: When using "jsonp", you would basically be returning data wrapped in a function call, something like
jsonpCallback([{"id":1,"value":"testing"},{"id":2,"value":"test again"}])
where the function/callback name is 'jsonpCallback'.

If you have access to the server, please first verify that the response is in the correct "jsonp" format
For such a response coming from the server, you would need to specify something in the ajax call as well,  something like
jsonpCallback: "jsonpCallback",  in your ajax call

Please note that the name of the callback does not need to be "jsonpCallback" its just a name  picked as an example but it needs to match the name(wrapping) done on the server side.
My first guess to your problem is that the response from the server is not what it should be.

A: You just have to parse the string using JSON.parse like this :
var json_result = {"AuthenticateUserResult":"{\"PKPersonId\":1234,\"Salutation\":null,\"FirstName\":\"Miqdad\",\"LastName\":\"Kumar\",\"Designation\":null,\"Profile\":\"\",\"PhotoPath\":\"\/UploadFiles\/\"}"};

var parsed = JSON.parse(json_result.AuthenticateUserResult);
console.log(parsed);

Here you will have something like this :
Designation
null

FirstName
"Miqdad"

LastName
"Kumar"

PKPersonId
1234

PhotoPath
"/UploadFiles/"

Profile
""

Salutation
null

And for the request, don't forget to set dataType:'jsonp' and to add a file in the root directory of your site called crossdomain.xml and containing :
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->

<!-- Most restrictive policy: -->
<site-control permitted-cross-domain-policies="none"/>

<!-- Least restrictive policy: -->
<!--
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
-->
</cross-domain-policy>

EDIT to take care of Sanjay Kumar POST
So you can set the callback function to be called in the JSONP using jsonpCallback!
$.Ajax({
    jsonpCallback : 'your_function_name',
    //OR with anonymous function
    jsonpCallback : function(data) {
        //do stuff
    },
    ...
});

A: Here is the snippets from my code.. If it solves your problems..
Client Code :
Set jsonpCallBack : 'photos' and dataType:'jsonp'
 $('document').ready(function() {
            var pm_url = 'http://localhost:8080/diztal/rest/login/test_cor?sessionKey=4324234';
            $.ajax({
                crossDomain: true,
                url: pm_url,
                type: 'GET',
                dataType: 'jsonp',
                jsonpCallback: 'photos'
            });
        });
        function photos (data) {
            alert(data);
            $("#twitter_followers").html(data.responseCode);
        };

Server Side Code (Using Rest Easy)
@Path("/test_cor")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String testCOR(@QueryParam("sessionKey") String sessionKey, @Context HttpServletRequest httpRequest) {
    ResponseJSON<LoginResponse> resp = new ResponseJSON<LoginResponse>();
    resp.setResponseCode(sessionKey);
    resp.setResponseText("Wrong Passcode");
    resp.setResponseTypeClass("Login");
    Gson gson = new Gson();
    return "photos("+gson.toJson(resp)+")"; // CHECK_THIS_LINE
}


A bench of Justices Dipak Misra and C Nagappan modified the order passed by apex consumer commission, which had asked DLF to pay 12 per cent interest to these buyers for delay in handing over the flats in DLF Valley project near Chandigarh, and reduced the rate of interest to nine per cent.
The Supreme Court on Friday asked DLF to hand over flats to around 50 buyers, who booked them in its housing project at Panchkula in Haryana, by November-end.
"We will say that they (DLF) would hand over the flats by end of November this year. The interest will be slashed from 12 per cent to 9 per cent," the bench said.
Senior advocates Kapil Sibal and AM Singhvi, who appeared for DLF, told the bench that occupancy was not an issue in this matter as the process of giving the remaining 153 flats, out of the total of 1473 units, was going on.
"Here occupancy is not at issue. 1473 flats are there. The flats have been handed over to the buyers and the process to hand over the remaining 153 flats was in progress. The grievance is only on the interest," Sibal told the bench.
He also said, "by November 2016, all the flats will be handed over (to the buyers)."
According to the buyers, the project was to be completed and flats handed over to them in 2013. When they were not given the possession of flats, they had approached the consumer commission.
The apex consumer commission had asked DLF to pay 12 per cent interest to these home buyers on the amount deposited by them.
DLF had approached the apex court challenging the order of apex consumer commission on the aspect of payment of 12 per cent interest.


SINGAPORE, April 20, 2015 — As part of its most ambitious smartphone introduction yet, LG Electronics Singapore (LG) will select 50 consumers who will "test drive" the all-new LG G4 smartphone.
Kicked off in Singapore on 17 April, participants will be selected from applicants based on their entry responses. Individuals can register at http://campaign.hardwarezone.com.sg/lgtrythegreat/ for a chance to be selected. Once selected, each participant will be given an LG G4 for up to 30 days to experience its unique design and features, including its personalized UX, high performance camera and impressive display for sharing online. Participants will be given various assignments to carry out over the course of their experience, and there will be 5 sets of the LG G4 smartphone to be won.
"With the launch of this highly anticipated flagship smartphone, we want to engage our loyal fans in a more personal and exciting way. Inviting the public to experience the G4 prior to launch is LG's way of thanking our customers and opening up the conversation on how we can continue to use LG innovations for a better life" said Mr. Scott Jung, Managing Director of LG Electronics Singapore.
Interested consumers are encouraged to register on the campaign website http://campaign.hardwarezone.com.sg/lgtrythegreat/.
For more information on LG G4, please visit www.lg.com/sg .


Your feedback on your personal experience with "Recapturing the Joy" is extremely valuable and of interest to me.
I would appreciate you taking a few minutes to answer these few specific questions.
1. How did you learn of the existence of Recapturing the Joy?
2. What has been the most significant change for you since participating in Recapturing the Joy?
3. How long has it been since your loved one died?
4. Did you purchase your journal personally or was it a gift? Please share how it came to you.
5. Please share your gender and age group.
6. Should you wish, please include your name & contact information and anything else you would like to communicate.


Please note there have been updates to the Ardor platform since writing this wiki, information here may be incomplete or technically inaccurate while we update our documentation. Always do your own research.
Create child chain blocks (a special typeof Ardor transactions), consisting themselves of child chain transactions. Bundlers collect fees from child chain transaction senders, in native child chain token. Bundlers Pay fees to the Ardor forgers, in order to have their child chain block included in an Ardor block. Anyone can participate as a Bitswift bundler, provided they have enough ARDR to pay fees to the Ardor forgers to ensure their bundled transactions are secured by the parent chain (Ardor). Bundlers can decide which transaction to include in the child chain block, and how much in fees, if any, in the native token, to charge for each.
Child chain transactions can be submitted with any desired fee but will not be processed unless there is a bundler which will accept the fee. For instance, a transaction with no fee attached will only be accepted if a bundler is online processing transactions at no costs (bundler rate 0). A bundler processing transactions with no fee would be subsidizing all transaction fees on behalf of the user.
It cost 0.01 Ardor to process a base child chain transaction. The minimum child chain fee is 'base-fee of service (0.01)* bundler-rate. Keep in mind that the base fee for the service is determined by the transaction type, typically transactions which include permanent messages have a higher base fee. If a user makes a simple base transaction the user should first check for the lowest bundler rate. In this example the lowest bundler rate available is 1.5 Bitswift. This means that the user will pay 0.01 * 1.5 = 0.015 Bitswift as a fee to the bundler for processing the transaction. Fees set by bundlers are dynamic, it is up to the bundler to ensure that they are processing child chain transcations with fee rates which ensure profitability.
It is up to the ChildBlock bundler to decide which child transactions to include in a ChildBlock, and this selection can be customized by defining a custom filter in the nxt.bundlingFilter property. The default bundler behavior is to select child transactions ordered by fee per byte, up to the count and payload limits of a child block, creating several child blocks if necessary. Within a child block, child transactions are sorted based on their full hash, but executed based on sorting them after adding the block hash to the child transaction hash,i.e. the execution order of child transactions within a block is deterministic but not predictable and not controllable by the bundler or by the forger. This is in order to prevent front-running of asset exchange and other trading orders.
Create Ardor chain blocks consisting of Ardor transactions. Collect fees from bundlers and from Ardor transaction senders, all in ARDR. The ability to forge depends on the effective ARDR balance of the forger's account Forgers can decide which transactions to include or exclude from their block. Forgers can control in what order transactions in their block are processed, but the default is based on transaction arrival timestamp. ARDR fees are fixed, determined based on transaction type and parameters, and cannot be changed by the forgers.


This cute tee is bound to be a big hit with the lil pumpkin in your life! Personalize it with Daddy's Lil Pumpkin, Grandma's Lil Pumpkin, or whatever you'd like. If you just want it to say Lil Pumpkin, simply leave it blank. Please make your selections with care as custom rhinestone items cannot be returned or exchanged.


text:
\section{Introduction}

In 2012, Particle Physics entered a new age. With the discovery of the Higgs Boson, the Standard Model was extended with the missing mechanism that gives rise to particle masses. This theory, developed since the 1960's and constrained by numerous experiments before discovery, followed a predictable path. Now that the Higgs Boson has been discovered, the way forward is wide open. Many different theories that could explain the shortcomings of the Standard Model need to be investigated.

Particle physics has always been at the forefront of analyzing the world's largest datasets. Although we constrain ourselves in this paper to High Energy Physics (HEP), where known particles are made to collide at the highest energies possible, the underlying data organization holds for all sub-fields of particle physics. The most basic concept of how data in HEP is organized is an event: all detector signals associated with a single beam crossing and high-energy collision. Events are the atomic unit of HEP data and may be processed separately, which is why the computational problems of particle physics can be easily parallelized.

Events must be reconstructed to convert detector signals into measurements of particles produced in collisions. This is usually done centrally by each experiment. The reconstructed events are then input to the final analysis done by individual researchers of groups of researchers exploring a multitude of physics questions. This process is very idiosyncratic, as individual researchers or groups are searching for different physics phenomena in the data. This results in a challenging computational problem, where as many as thousands of physicists analyze the same datasets to extract different physics results.

The analysis process uses properties of the event such as energy or momentum of particles produced in the collisions. It is based on comparing the distribution of properties measured in many events with theoretical predictions of the same property, either calculated empirically or simulated using Monte Carlo techniques. Particle physics is a statistical science. Statistically significant numbers of recorded and simulated events are required to make claims.

The particle physics community was the first to develop suitable software and computing tools for this task. Since the vast majority of collisions result in uninteresting events and the rate is enormous, this community also developed procedures to avoid recording all particle collisions, collectively called the trigger. In this first pass, quantities of interest are calculated quickly to decide whether to save or discard the event in real time.

Trigger selections are as coarse as possible, so that analysis selections are likely to be their subsets. Each physics group analyzes their data by filtering unnecessary events (which we call "skimming") and eliminating unnecessary variables from the communal dataset (which we call "slimming") to get a manageable sub-sample. This sub-sample might be further filtered and transformed to optimize the statistical significance of the measurement or possible discovery. Understandably, this is an iterative process, which must be repeated in response to discoveries and mistakes.

With ever increasing data volumes in particle physics, this process gets harder to perform interactively, simply due to the time required to read, filter, and transform the data. In the future, exponentially growing datasets will make this problem acute. New techniques will be required if we are to continue exploring the nature of matter and the universe.

Recently, new toolkits and systems have emerged outside of the HEP community to analyze Petabyte and Exabyte datasets in industry, collectively called "Big Data." These new technologies use different approaches and promise a fresh look at analysis of extremely large datasets. In this paper, we present an active LHC Run 2 analysis, searching for dark matter with the CMS detector, as a testbed for the application of "Big Data" technologies to a HEP analysis problem. We directly compare the traditional analysis with an equivalent analysis performed in Apache Spark~\cite{Zaharia:2010:SCC:1863103.1863113}. In both cases, we start the analysis with the communal dataset and produce publication physics plots using traditional and Big Data technologies.

\section{The Physics Use Case}

Today, we know that the universe consists primarily of matter that we do not understand. Only 4--5\% of the universe is made of matter described by the Standard Model~\cite{cosmology}. The Standard Model describes 12 elementary particles: 3 leptons (electron, muon, tau), 3 neutrinos (electron-neutrino, muon-neutrino, tau-neutrino), and 6 quarks (up, down, strange, charm, bottom, top). It describes 4 force carriers or bosons: photon, W, Z, and gluons, as well as one Higgs Boson to provide mass to the leptons, quarks, and W/Z bosons. The remainder of the universe consists of (a) something invisible to all of these forces except perhaps the W and Z bosons, which is unlike any known particle and is called Dark Matter (25\%), and (b) something that appears to have negative pressure, called Dark Energy (70\%).

If Dark Matter {\it does} interact with the W or Z bosons (the Weak Force), then it would be produced in particle collisions, along with the visible particles well described by the Standard Model. Dark Matter particle(s) would propagate through the detector without being detected. However, the total momentum of the collision, transverse to the beam, would be preserved, leading to an apparent momentum imbalance among the visible particles, known as missing transverse energy.

The Dark Matter search conducted in this study is performed with the Large Hadron Collider (LHC)~\cite{1748-0221-3-08-S08001} at CERN, Geneva, Switzerland. The LHC is the highest energy particle collider in the world, located in Geneva, Switzerland. It accelerates protons to an energy of 6.5 TeV in two circular, evacuated beam pipes. The beams of protons are brought to collision in four points around the almost 17 mile circumference ring. The Compact Muon Solenoid (CMS) Collaboration built, maintains, and operates the CMS detector~\cite{cms} at one of these collision points. The CMS detector consists of detector components that measure different properties of the particles produced in a collision, such as tracks left by charged particles and energy deposits from all particles that interact via photons and gluons. The detector components are arranged concentrically around the collision, like an onion, to provide the highest detail near the collision point. The dense distribution of sub-detectors compared to other experiments of its type ("compact"), and the detailed instrumentation for measuring muons gives the 14,500 ton detector and the collaboration its name.

In particular, this Dark Matter search is looking for a signature in the events commonly referred to as "mono-X" where "X" can be a light quark or gluon, a vector boson, or a heavy quark such as a bottom or top quark. We focus our search on the "monoTop" signature~\cite{CMS-PAS-EXO-16-017}, where the detectable particle is a single, unbalanced top quark.

\section{The Traditional Analysis Workflow}
\label{sec:root_workflow}

The traditional user analysis workflow for CMS data applies two C++ frameworks to the centrally produced dataset: CMSSW~\cite{cmssw}, specially designed for analyzing CMS data, and ROOT~\cite{root}, which is a general, experiment-independent C++ toolkit. The ROOT framework provides statistical tools and a serialization format to persist reconstructed and transformed objects in files.

Although these C++ frameworks can be very efficient, their organization can be difficult for end-users to understand. Moreover, it operates at a low level of abstraction, and even if a user knows how to process data efficiently, the difficulty in setting up a manual procedure may be outweighed by the time required to do so.

Most data analysts or analysis groups start by translating the class structure of the data into a "flat ntuple," in which events are rows of a table with primitive numbers or arrays of numbers as columns. These ntuples are written to files using the ROOT framework. They may then be analyzed without the CMSSW framework, with minimal dependencies.

This "ntupling" step requires significant resources as it accesses the centrally produced data and MC samples. GRID resources are used to exploit parallelization where workflow management systems take care of orchestrating the whole analysis workflow. Still significant burden of bookkeeping and failure re-submission is put on the individual analyst or analysis groups.

Often, the ntuples are still too big for interactive analysis (seconds or minutes between operations, so that a data analyst can respond to results without losing his or her train of thought). Most analysis groups therefore introduce additional steps in which the ntuples themselves are skimmed and slimmed.

In the last step of the analysis, quantities from the final ntuple are aggregated and plotted as histograms. In some cases, data from qualitatively different datasets must be combined to make a single plot, for instance by stacking Monte Carlo contributions to the data (to see if the real data exceeds the sum of known processes) or combining Monte Carlo samples with different weights.

The time scale of the complete Dark Matter workflow, shown in Fig.~\ref{fig:workflow}, can range from days to weeks, depending on how many reconstructed and simulated events are needed for the analysis. The first step is repeated about four times a year and the produced ntuples can be used by more than one analysis. The skimming and slimming step is executed between once and four times a month. The actual analysis step, producing plots, is repeated many times a day, since it represents the iterative and interactive analysis.

\begin{figure}
\begin{center}
\includegraphics[width=0.5\textwidth]{workflow.png}
\caption{\label{fig:workflow}The traditional workflow showing the Ntupling, Skimming and Slimming and final analysis steps.}
\end{center}
\end{figure}

From a communal dataset of 200~Terabytes, the analysis ntuples have a size of about 2~Terabytes. These are then skimmed and slimmed down to several Gigabytes that are used for exploration and producing plots.

\section{The Spark Analysis Workflow}
\label{sec:spark_workflow}

The emergence of "Big Data" toolkits and systems in industry opens up new possibilities for analyze petabyte and even exabyte size datasets. In exploring their applicability for HEP analysis, our goals are not only to reduce the time it takes an analyst or analysis group to go from centrally produced input samples for data and MC to publication-quality plots (time-to-physics) in the advent of the exabyte era, but also to educate our graduate students and postdocs to use industry-based technologies and improve their chances on the job market outside of academia and HEP's attractiveness for potential candidates. Tools like the ROOT toolkit are used almost exclusively in the HEP community. Expanding the used techniques to include Big Data technologies would allow to be part of larger communities reaching outside of our field.

We chose to investigate the Apache Spark toolkit as a starting point. The main goal is to translate the skimming and slimming step of the use case analysis to the Spark framework. We chose this step to simplify the translation problem and to avoid further complications in the ntupling step, which normally requires re-running experiment framework code. This step can be tackled in a later study.

We translated the group ntuples stored in ROOT format into a suitable file format for Spark. For simplicity, we chose the AVRO format~\cite{avro}. This choice might not be optimal but provided a solid starting point for the investigation. We auto-generated the AVRO files from the ROOT files using a newly developed root converter package~\cite{rootconverter}. This package allows the conversion of any complex ROOT file into AVRO and proved to be sufficiently flexible for the used analysis use case. The generated schema for this particular analysis can be found here~\cite{avroschema}.

The actual analysis code was translated from its ROOT based C++ code basis into Scala~\cite{scala}, chosen because of its excellent native support in Spark. Scala allowed to significantly simplify the analysis workflow consisting of two loops over the input. In the case of MC input, first a sum of weights determined in the simulation itself is calculated by looping over all events in the input. This is followed by a second event loop that performs the actual skimming and slimming. The Scala code is shown here:

\begin{lstlisting}[style=myScalastyle]
// Reference the whole dataset (not individual files)
val mcsample = avrordd("hdfs://path/to/mcsample/*.avro")

// Sum of Weights from Simulation: First pass (and cache for later)
mcsample.persist()
val mc_sumOfWeights = mcsample.map(_.GenInfo.weight).sum

// Main Event Selection: Second pass on data in cluster's memory
val result = mcsample.filter(cuts).map(toNtuple(_, mc_sumOfWeights, mc_xsec))

// Save as ntuple
result.toDF().write.parquet("hdfs://path/to/mcsample_ntuple")
\end{lstlisting}

As a development system, We used a 10 node cluster of Intel Xeon CPU E5-2680 v2 @ 2.80GHz CPU processors with 256 GB RAM interconnected through 10 Gigabit Ethernet. The Cloudera~\cite{cloudera} Hadoop distribution (CDH 5.9.1) was used. Spark jobs were scheduled through YARN. Input AVRO files were stored on an HDFS file-system spanning the cluster. Spark was automatically using the whole cluster for the two event loops.

\section{The Usability Comparison}

To compare the traditional ROOT-based workflow with its Spark-based translation, we were looking at the problem from the  "physicist" point of view and we are not assuming any advanced experience with optimizing GRID and High-Throughput (HTC) workflows. We took the current ROOT workflow of the Dark Matter analysis and compared it with the Spark workflow. The ROOT workflow was executed at CERN on lxplus/lxbatch while the Spark workflow used the cluster at Princeton described in Section~\ref{sec:spark_workflow}. In the following, we describe the experience of two beta-users who didn't have experience with either workflow before.

The ROOT workflow consisted of a master script producing a series of secondary scripts to execute the analysis. The first step to calculate the sum of weights was executed serially using an interactive login node. The second step was executed in batch mode on lxbatch, which is using the LSF batch scheduler~\cite{lsf}. This was compared to the Spark workflow consisting of the two steps executed in Scala (see Section~\ref{sec:spark_workflow}). The Spark workflow also persisted the input in memory, although this had to be activated manually. The beta-testers preferred the simplicity of the Spark workflow over the ROOT workflow setup, but also mentioned that the ROOT workflow could have been optimized without a lot of effort. They particularly liked the ease of persisting the input in Spark.

Comparing the analysis code itself, the testers preferred the ROOT analysis code because they were very familiar with C++ and ROOT from their previous analysis experience. Scala was a new language for them and had a learning curve for them compared to C++ and ROOT.

We were particularly interested in comparing the bookkeeping efforts of the two workflows. The testers noted that the ROOT workflow was designed for specific batch systems (in this case LSF). They tried but were not able to move it easily to another batch system. The partitioning of the inputs of the ROOT workflow was handled through a sophisticated suite of shell scripts relying on the physical location of the input files (in this case EOS at CERN~\cite{eos}). This was compared to the Spark workflow, which according to the testers showed very good portability. They were able to move the Spark workflow to CERN/lxplus in a very short time. The partitioning in Spark can use automatic or custom facilities. The testers remarked its ease of use and that it is superior to the ROOT workflow approach. In summary, the bookkeeping effort was significantly reduced in the Spark workflow case and the portability is significantly easier to accomplish.

\section{A First Look at a Performance Comparison}

Performance comparisons are complicated by nature when dealing with sophisticated multi-step workflows using a variety of different computing systems. We are presenting a first attempt of comparing the performance of the ROOT and Spark workflows. We can only extract qualitative conclusions from this first comparison, for a more in-depth comparison more studies have to be performed.

We were using the same single lxplus node at CERN and were restricting the workflow to a single core to use a comparable hardware setup for both workflows. Lxplus is an interactive login cluster, the impact from other users using the same node at the same time could not be excluded but was assumed to be small.

The workflow setup is described in Sections \ref{sec:root_workflow} and \ref{sec:spark_workflow}. The input was a single ROOT file of 1 GB size, or a corresponding single AVRO file of size 2 GB. Compression was not activated for the AVRO file while the ROOT file was compressed. This is a significant difference as the ROOT file has to be decompressed during reading. This difference is going to be removed in future studies.

Table~\ref{tab:performance} shows the timing measurements performed on the single lxplus node  described above.

\begin{table}[h]
\caption{\label{tab:performance}First timing measurements performed on a single lxplus node using one core. Please note that the input was a compressed ROOT file that was automatically decompressed during reading while the input to the Spark workflow was uncompressed AVRO.}
\begin{center}
\begin{tabular}{lrr}
\br
&\bf Spark&\bf ROOT\\
\mr
Analysis run without caching&9.4 sec&32.7 sec\\
Reading from local disk \& Computation&4.3 sec&26.8 sec\\
Writing to local disk&5.1 sec&5.9 sec\\
\mr
Analysis run with caching&5.5 sec&\\
Reading from memory cache \& Computation&0.4 sec&\\
Writing to local disk&5.1 sec&\\
\br
\end{tabular}
\end{center}
\end{table}

Qualitatively, the execution times show a speed-up of the Spark workflow when reading from memory cache and also suggest that the performance of the Spark workflow is dominated by reading the input and writing the output. The writing of the output is comparable for the ROOT and Spark workflows and the reading of the input of the ROOT workflow shows the impact of decompressing the input. Because the comparison of the two workflows is far from trivial and not straight forward, more work needs to go into making the comparison fair and conclusive. Our conclusion at this point is that Spark is not orders of magnitude slower than ROOT.

\section{Conclusions and Next Steps}

We presented our work on using Apache Spark to reproduce a use-case HEP Dark Matter analysis and to compare to the corresponding ROOT based analysis workflow. We conclude that the initial Spark implementation of the analysis was more user friendly and portable than the ROOT workflow, which didn't come to a great performance cost. We can say qualitatively that the Spark workflow is not orders of magnitude slower than the ROOT workflow and shows promise for the future.

The next steps in investigating Apache Spark for HEP analysis are to develop a fair and conclusive comparison of the Spark and ROOT workflows by looking critically an the architecture of both workflows, and to optimize both workflows within the capabilities of the respective technologies.

We think Spark and other industry-based Big Data technologies have great potential for HEP analysis and we are planning to continue to investigate Apache Spark for HEP analysis and also expand to other industry-based Big Data technologies.

\section{Acknowledgments}

We would like to thank the CMS collaboration and the LHC to provide the data for the use case and the ROOT based workflow. This work was partially supported by Fermilab operated by Fermi Research Alliance, LLC under Contract No. DE-AC02-07CH11359 with the United States Department of Energy, and by the National Science Foundation under Grant~ACI-1450377, Cooperative Agreement PHY-1120138.

\section*{References}

redpajama_set_name: RedPajamaArXiv


text:
Home > assh > papers > 3586
Faculty of Social Sciences - Papers (Archive)
The psychology of elite cycling: a systematic review
David Spindler, University of WollongongFollow
Mark S. Allen, University of WollongongFollow
Stewart A. Vella, University of WollongongFollow
Christian F. Swann, University of LincolnFollow
Spindler, D., Allen, M., Vella, S. & Swann, C. (2018). The psychology of elite cycling: a systematic review. Journal of Sports Sciences, 36 (17), 1943-1954.
This systematic review sought to synthesise what is currently known about the psychology of elite cycling. Nine electronic databases were searched in March 2017 for studies reporting an empirical test of any psychological construct in an elite cycling sample.
Please refer to publisher version or contact your library.
Link to publisher version (DOI)
http://dx.doi.org/10.1080/02640414.2018.1426978


text:
Q: google chrome scroll to function can not go to right position It is my scroll to function, when I use onClick function to call it, it can work. But I use wheel event to handle scroll to function, it will have a small position deviation. for example, scroll to top: 0, the position will stop in top: 2. I tried use timeout but it don,t work.
In firefox or edge. The function can perfectly work.
Does anyone know how to solve this problem in google chrome ? Thank you!
const handleScrollTo = (position: string) => {
        return new Promise((resolve, reject) => {
            switch (position) {
                case 'a':
                    window.scroll({
                        top: 0,
                        left: 0,
                        behavior: 'smooth'
                    });
                    resolve('done');
                    break;
                case 'b':
                    window.scroll({
                        top: window.document.body.offsetHeight * 0.25,
                        left: 0,
                        behavior: 'smooth'
                    });
                    resolve('done');
                    break;
                case 'c':
                    window.scroll({
                        top: window.document.body.offsetHeight * 0.5,
                        left: 0,
                        behavior: 'smooth'
                    });
                    resolve('done');
                    break;
                case 'd':
                    window.scroll({
                        top: window.document.body.offsetHeight * 0.75,
                        left: 0,
                        behavior: 'smooth'
                    });
                    resolve('done');
                    break;
                default:
                    reject('reject')
            }

        })
    }


A Dwelling Improvement license is required for reworking tasks in a number of counties, when the fee is $three,000 to $24,999. Householders who're considering doing a renovation must know that if their homes have been built prior to 1978, their contractors are required to follow sure procedures if they will disturb greater than 6 interior square toes of paint or 20 exterior square ft of paint. At the end of each undertaking, Gulfport Residence Repair performs a Consumer Satisfaction Verify-Up Gulfport Carpentry which provides Gulfport House Enchancment the power to make certain that our clients are totally satisfied with our workmanship.
One half I nonetheless don't perceive utterly is whether or not or to not have the repair firm file the declare. Biloxi House Enchancment sincerely thinks that residential repair and renovation is each a craft along with an art. At Biloxi Residence Improvement, we are captivated with offering the very best high quality, fantastically constructed, sturdy, and intensely beautiful dwelling restore companies. Honest contractors rely upon happy customers, however typically, particularly during complex initiatives, householders and contractors want to find ways to work collectively to unravel unexpected issues.
Both homeowners and professionals view these platforms to best match with modest improvement and repair initiatives within the beneath $5,000 range. Omit any of those from a house improvement or dwelling restore contract and you have dropped into New Jersey's Consumer Fraud Act: full refund, triple damages plus legal professional charges. Legal Eagle Contractors is an exceptional renovation company, well known for experience, outstanding customer support, neatness and trustworthiness. These kind of contractors work exhausting to acquire the dwelling they do and sometimes instances make use of specialists within the fields of engineering and structure to acquire the work.
Ask for a copy of the contractor's license and registration Thirty-six states require contractors to be licensed. We offer premium high quality plumbing, electrical, residence enchancment transforming and HVAC repair providers that will be the professional solution to each requirement you may have. Nevertheless, contractors could appear earlier than the board of Residence Enchancment and Common Contractors for the next causes. The Texas Residential Building Liability Act of 1989 provides builders the fitting to inspect and restore after a claim of defect.
If you understand how to string your stitching machine and sew a straight line, you'll able to make your individual souvenir t-shirt pillows. Steel artwork headboard ideas can work out to be fairly distinctive but a bit more expensive than curtains, decals, or framed photos. Couches: Couches are a big a part of living rooms and are simply replicated in your Minecraft home. It doesn't matter what you like the most from your Asian decor the principle thing concerning the bedroom is that you simply have to be proud of the decor and nobody else. In case you could have a associate with whom you are sharing the bedroom, then the colour and the design of the bedroom should fit your partner too.
This showhouse bed room gives a panoramic view of San Francisco Bay, inspiring designer Cathleen Gouveia to model the mattress after the Golden Gate Bridge. Thank you Alan.. very very a lot , I am so inspired by this A lot that I am following your pinterest for any future ideas & ideas, and so forth. To create a luxurious inside in the bedroom using a high headboard with parts barrokko and gilding. Ethnic paintings, wall hangings and handicrafts among different art work with a standard really feel to it, also give away an ethnic vibe to the bedroom design.
Hello Jahnbar, I really get pleasure from shopping your designs you posted right here especially for budgeted house. This plan can stretch on the x axis as much as you want, however observe that the 1 huge corridors resulting in individual rooms can get crowded if more than 10 dwarves live alongside each. French jewelry artist and instructor Sabine Alienor Singery makes use of a variation on this technique (rolling a thick sheet of polymer clay across a cured dimensional paint design and then peeling off the clay and curing it) to create texture sheets that can impress raised designs onto the clay.
I like ur designs….. nag ddsign dn aq ng other elements of homes…. i want to share it to your internet if ever. Thus opinions that can we conclude of Bedroom Designs Pink And Inexperienced, anticipated what we're describe above will be useful and also inspire You are for this you might be on the lookout for photos. Since contrasting between two opposite issues had turn into a development, concrete partitions have been capable of make it to the world of the trendiest designs. The truth that bedrooms are personal areas often shared with one other individual makes adorning tricky.
When actual estate is offered, the vendor owes a capital positive aspects tax on the revenue except one in every of two primary exceptions kicks in. One exception is for traders and the other is for proprietor-occupants who relocate and sell their property. Furthermore, the pristine seashore of Kappari, and lots of more divine seashores of Protaras, is a brief drive away from this Cyprus residence for sale. You may look for homes that are out there in the areas away from the main city area, however make sure they're in the growing areas, so that you can profit from the reselling of the home. Focus on with you that valuation and how a lot lower than that worth you are prepared to promote for to attain a fast sale. This sunporch space is an fascinating feature of those Tri-ang houses and I'm fortunate to have the original back bench with mine, as these simply get misplaced.
I had an incredible lender, he took time from his day as a result of he wanted the sale and helped me with the settlement. Up within the north, Brittany and Normandy are nice options for individuals who like their locations in the solar not too sizzling, but nonetheless averaging 5ºC increased than in southern England. There are individuals for causes finest know by themselves who worry that they'll fall foul of life model audits due to this fact, choose to place the possession of immovable property they buy be it flats, stands houses in the title of an funding firm or some trusted member of the extended household.
I am within the UK and didn't think we had it right here, nevertheless, I've simply looked for it on-line and have discovered that not only do we have now it in the UK, however that there's additionally a web page for my part of the UK. A spectacular beachfront Cyprus villa is on the market in Ayia Napa, which is a coastal town of Cyprus recognized for its breathtaking beaches and bustling life. Additionally, the short distance to the Mediterranean Sea (100m.) and to Larnaca metropolis heart (5 kilometers) will assist you to decide simpler and buy the seaside houses on the market in Larnaca.
Greg – You might be right on some issues however out of the wall" plumbing and wiring is an exception and you'll only discover things like that in very outdated unrenovated houses. In fact within the UK you possibly can by detached homes, but they're much less common, and dearer. One in all Devon's most cost-effective places, Plymouth has three bed room properties on the market from around £one hundred twenty,000, with some tenanted homes and properties in need of structural repair available for significantly much less. Basic three bedroom homes start at round £210,000 in Hadleigh, however the prices climb very steeply upwards.
It at all times astounds me when householders undertake six-figure initiatives without having a lawyer overview the contract. Finally, a homeowner who wins in arbitration and does not collect can recover from the Residential Contractors Guarantee Fund. History: P.A. ninety-233 extended exemption to these holding licenses underneath chapter 390, 391 or 393; P.A. 91-ninety nine exempted individuals holding a present skilled or occupational license from provisions of chapter, deleting reference to licenses issued beneath chapter 390, 391 or 393; P.A. 02-eighty two exempted well drilling contractors registered pursuant to Secs.
Yards had been plagued by advertisements for a multitude of contractors – some native, others hailing from distant – trying to profit off of the occasions of the storms. Push again against consumer protection laws that back contractors into a corner. Notes: Residential remodeling institutions are outlined as basic and special trade contracting institutions with greater than 50% of receipts from remodeling exercise including upkeep and restore. I don't understand why landlords do not need to restore their property both but it must be because they do not need to stay there.
On the end of each undertaking, Biloxi House Restore carries out a Buyer Satisfaction Verify-Up which presents Biloxi Dwelling Enchancment the potential to make it possible for our clients are completely happy with our workmanship. In all, more than 2% of all licensed contractors in Oregon have been cited by the CCB. Whether or not you are needing to broaden the dimensions of a room, update outdated décor and appliances, or more, Chicagoland Residence Transforming Contractors has the experience to make your dream come true.
Notes: The previous LIRA modeled homeowner improvement activity only, whereas the re-benchmarked LIRA fashions residence enchancment and restore exercise. For home transforming contractors Chicago loves, look no additional than Chicagoland Transforming. If you are considering kitchen reworking in your house, then you have got come to the fitting kitchen contractors in Houston. Including home upkeep and repair exercise results in a considerably much less cyclical LIRA than previously, however in the end the re-benchmarked LIRA nonetheless anticipates turning points available in the market effectively (Figure 1).


All too often we see doctors wearing only scrubs, and though no one wants to do surgery in Armani, physicians do wear other clothes.
Dr. Megan Hunt of ABC's "Body of Proof" is a seriously stylish woman, as is the woman who plays her, Dana Delany.
Wearing orange high-heeled pumps that only a dedicated fashionista would even consider, and a perfectly cut floral sheath dress, Delany explains how she researched her character, a neurosurgeon-turned-medical examiner.
There weren't a lot of female neurosurgeons for her to talk with, and Delany had initial concerns that her character could be a tad too fashionable.
Then she had dinner with a neurosurgeon in Sacramento.
"She walked into the restaurant wearing the very same dress (Dr. Hunt wears)," Delany says, which is a gray dress from Theory.
Though the show is set in Philadelphia and shot in Rhode Island, Haze shopped for the character in Los Angeles at Neiman Marcus, Decades, Paul Smith and Fred Segal.
Prada and Dolce also send clothes monthly; Haze and Delany pick what they want and return the rest. Haze also shopped in New York at Gucci and at Bergdorf's.
Hunt's dresses, skirts and blouses came from these stores. Coats are Burberry, purses are Prada, and all of the jewelry is all from Cathy Waterman.
Given all these high-end brands, should someone want to dress precisely like Dr. Megan Hunt, she is going to need a lot of money.
Haze's best advice for those want this look but don't have a studio budget?
"Instead of buying three of something, buy one," she says. "There are great places where they have reasonable facsimiles. People go and buy 20 outfits at $100. My suggestion is save up and buy a Prada dress that you can wear with a jacket and wear with anything.


I bought this on kindle 2 days ago on a recommendation from Brandon Sanderson. Finished it today. Ready for the next book to come out! My interest is officially peaked; I will definitely be keeping an eye open for more of your works like these!


text:
Gonomyia lustralis är en tvåvingeart som beskrevs av Alexander 1945. Gonomyia lustralis ingår i släktet Gonomyia och familjen småharkrankar.

Artens utbredningsområde är Costa Rica. Inga underarter finns listade i Catalogue of Life.

Källor

Småharkrankar
lustralis

redpajama_set_name: RedPajamaWikipedia


It's Breakout/Arkanoid game mixed with a cardgame. Instead of a paddle, you have a deck of cards you can use to control the ball in a semi-turn based manner.
Your goal is to clear all mooks from the level. Beware of the red one though, he's gonna eat your balls!
Great work. made during the jam... really?! Did you make this in only few hours?! I need a lot of time to make a game like this. Incredible skilled people.


text:
Is it Too Soon to Watch the Coronavirus in TV Shows?
Prior this week, Grey's Anatomy official maker Krista Vernoff was on a board for the Television Academy and uncovered that, indeed, her show would handle Covid-19. "Its absolutely impossible," she stated, "to be a long-running clinical show and not do the clinical story of our lifetimes." In our latest entertainment news, we'll look at a medical drama's plans to feature the Coronavirus pandemic in their latest season.
For Grey's, a show about a medical clinic in Seattle, one of the coronavirus' initial targets, disregarding the pandemic would feel like an intolerable oversight. The show has handled about each other issue of now is the ideal time, from mass shootings to racial oppressors, why not Covid-19? The appropriate response is presumably that it should—yet it may be too early.
Grey's Anatomy: Coronavirus in TV Shows
Some portion of this stems from the reality Gray's Anatomy joining Covid-19 isn't simply one more endeavor at a Ripped From the Headlines plot, it's a plot that is as yet commanding features—and likely will be the point at which the show returns. Throughout recent months, individuals around the globe have been viewing a pandemic happen progressively on their TV sets. Take out the battles and hookups and the show doesn't appear to be that much unique than what's on CNN at some random point.
Life is a clinical show for some, Americans, Season 17 of ABC's Thursday night juggernaut might not have an excessive amount to include. It's constantly been a show about adapting to injury, however maybe this one may be excessively new. Regardless of whether the new season doesn't desire a year or more, the pandemic will in any case be new on watchers' psyches and they may not be prepared at this point to remember it.
Tagged coronavirus in tv showsgreys anatomygreys anatomy coronavirus
What is Run Line in Baseball Betting
Changes in Airline Travel
Pop Music is Faster and Happier
July 10, 2020 Jeff Sanders
Barbie Live Action: The first photo of Ryan Gosling as Ken is leaked and lights up social networks
June 17, 2022 June 17, 2022 Andy Johnson


text:
Energy in Singapore describes energy related issues in Singapore, which is a developed country located in Southeast Asia. Energy exports to others are about three times the primary energy supplied in the country itself. Additionally, oil imports in relation to the population demands of the country itself are concerningly high.

The world's largest palm oil company, Wilmar International, is based in Singapore, due to vast amount of forestation available for harvesting many products that rely on palm oil. A Finnish company operates the world's biggest palm oil-based diesel plant in Singapore with 800,000 tonnes produced annually since the end of 2010.

Overview

According to the IEA Singapore had no energy production in 2008. Energy imports increased 18.6% in 2008 compared to 2004. The primary energy declined by about one third in 2007-8 but during the same period energy imports increased. Energy import was about three times the total primary energy supply in 2008. Compared to the UK in 2008, per capita electricity consumption was 135% and per capita carbon dioxide emissions were 110%. (UK: 61.35 m people 372.19 TWh electricity, 510.63Mt CO2 emissions).

The use of energy (primary energy) in Singapore is only 1/3 of the imported energy.

Singapore's Energy Story
In 2019, then Minister for Trade and Industry Chan Chun Sing spoke about the Singapore Energy Story to guide the energy sector towards greater sustainability, while maintaining a reliable and affordable energy supply.

As part of its energy transition towards cleaner energy, Singapore will make use of four supply switches, supported with efforts in energy efficiency to reduce energy demand.

Natural Gas
Around 95 per cent of Singapore's electricity is produced using piped or liquefied natural gas (LNG). Natural gas will remain a key fuel for Singapore's power generation as it scales up efforts harness solar and develop other low-carbon technologies.

In the early 2000s, Singapore started receiving natural gas from Malaysia and Indonesia via pipelines. To further diversify its gas sources, the city-state began importing LNG via the Singapore SLNG Terminal which began operations in May 2013.

In 2008, BG Group (which merged with Shell in 2016) won an exclusive franchise to supply as much as 3 million tonnes per annum (mpta) of LNG. Energy Market Authority (EMA) subsequently launched a competitive Request for Proposal process in 2014 which saw Shell Eastern and Pavilion Gas being appointed LNG importers in 2016. Another two term importers - ExxonMobil LNG Asia Pacific and Sembcorp Fuels - were subsequently appointed in 2021.

In 2022, Singapore launched a Request for Proposal to appoint up to two LNG importers to provide more options for gas buyers, in addition to the four term importers.

Solar
Solar is considered to be Singapore's most viable renewable energy option, as the island nation is "alternative-energy disadvantaged" with low wind speeds, low tidal range, and no hydro resources.

In 2020, Singapore achieved its target of deploying 350 megawatt-peak (MWp) of solar. Under the Singapore Green Plan, the country aims to achieve 2 gigawatt-peak of solar by 2030, equivalent to powering around 350,000 households a year.

Singapore also aims to deploy 200 megawatts (MW) of energy storage systems beyond 2025 to mitigate solar intermittency and reduce peak demand. The first utility-scale energy storage system testbed was deployed at a substation in Woodlands in October 2020. EMA has also partnered with Keppel Offshore & Marine to pilot Singapore's first floating energy storage system.

Regional Power Grids
Singapore plans to tap on regional power grids to access low-carbon electricity beyond its borders. It plans to import up to 4 gigawatts (GW) of low-carbon electricity by 2035, which could make up around 30 per cent of the country's energy needs in 2035.

EMA had been carrying out trials to import electricity from regional power grids, such as a two-year trial to import 100 megawatts (MW) of electricity from Peninsular Malaysia, 100MW of electricity from Laos via the Lao DPR-Thailand-Malaysia-Singapore Power Integration Project (LTMS-PIP), and 100MW equivalent of non-intermittent electricity from a solar farm in Pulau Bulan, Indonesia.

In November 2021, EMA issued its first request for proposals to appoint electricity importers to import and sell about 1.2 GW of low-carbon electricity into Singapore, to begin by 2027. In July 2022, EMA issued its second request for proposals for low-carbon electricity imports, and streamlined the process to evaluate proposals from both proposal request exercises.

Low-Carbon Alternatives
Singapore is also studying different low-carbon technologies such as hydrogen, carbon capture, utilisation and storage and geothermal energy for possible adoption in the longer term.

In October 2020, the Singapore Government announced a $49 million low-carbon energy research funding initiative to support research, development and demonstration projects in low-carbon technologies, such as hydrogen and carbon capture, utilisation and storage. This was later expanded to $55 million in 2021, with the funds going to 12 research projects.

In April 2022, EMA issued a Request for Information in its bid to assess the potential of geothermal energy across Singapore. EMA planned to follow up with a Request for Proposal to assess the viability and scalability of deploying geothermal systems in Singapore.

Energy Efficiency
In 2018, EMA launched the Genco Energy Efficiency Grant Call to encourage power generation companies to adopt energy efficiency technologies by co-funding up to 50 per cent of their projects. This was part of the Enhanced Industry Energy Efficiency Package that was announced by the Singapore Government that same year. In October 2020, $23 million in grants were awarded to three power generation companies for energy efficiency projects.

The industrial sector can also tap on the Resource Energy Efficient Grant, supported by the Economic Development Board, and the Energy Efficiency Fund, supported by the National Environment Agency.

By end 2024, all households in Singapore will have advanced electricity meters installed in their premises that will enable them to track and manage their electricity consumption.

Singapore was the top 10th country in oil imports in 2008: 50 megatonnes.  For comparison, oil imports in Spain were 77 megatonnes (the top 8th country, with a population of 45.59 million) and in Italy they were 73 megatonnes (the top 9th country, with a population of 59.89 million).

Palm oil
The biggest palm oil-based diesel plant in the world, 800,000 t/a production, started operations in Singapore at the end of 2010 by Neste Oil from Finland. The plant requires almost a million tonnes of raw material annually from the oil palm Elaeis guineensis, equivalent to 2,600–3,400 km2 oil palm plantation.

Greenpeace demonstrated in November 2010 in Espoo, Finland, by hanging an orangutan puppet in front of Neste Oil, saying that Neste Oil endangers the rainforest ecosystem. According to UNEP the majority of new palm oil plantations take place in the rainforests.

According to European Union studies the increased demand for palm oil inevitably leads to new plantations being established in the forests and peat land areas. Land use changes have large green house gas emissions making palm oil diesel much more harmful than petroleum in respect to global warming. According to Greenpeace the Neste Oil plant in Singapore made Finnish Neste Oil among the world's leading palm oil consumers leading to increased rain forest destruction.

Reducing emissions from deforestation and forest degradation (REDD) would be a way to mitigate climate change. According to UNEP the international REDD mechanism will be a key element of [[Post–Kyoto Protocol negotiations on greenhouse gas emissions|the post-2012 international climate change]] regime.

Electricity

The electricity sector in Singapore ranges from generation, transmission, distribution and retailing of electricity in Singapore.

Electricity sector in Singapore is regulated by the Energy Market Authority ().

As of 2015, Singapore uses natural gas (95%) and waste (4%) for power stations' fuel. Oil used to contribute 23% in 2005 but now is down to 1%. The fossil fuel basis of Singapore's electricity system affects the way that electric cars are taxed.

Companies

 ES Power Singapore
 PacificLight Power Pte Ltd
 Keppel Merlimau Cogen Pte Ltd
 Keppel Seghers
 National Environment Agency
 PowerSeraya Ltd
 SembCorp Cogen Pte Ltd
 Senoko Energy Pte Ltd
 Tuas Power Ltd

Solar power
Jurong Port is building a 10MW solar installation on the roofs of its warehouses. The system was expected online by the end of 2015. Singapore set a target of generating solar power to cover 350,000 households in 2030 that would correspond to 4% of the country's electricity demand in 2020. To promote renewable energy in the country it is advised that the government develops incentive and regulatory support mechanism; consolidate solar energy governance; mobilise equity investors and lenders; and specialise in the long-distance trade of renewable energy, especially in the form of hydrogen.

In July 2021 Sembcorp opened one of the world's largest floating solar plants, with 60 MWs of panels on a reservoir.

Given Singapore's leading position as a financial hub in the ASEAN region, it could maximise its role to promote clean energy investment throughout the entire region. The Australia–ASEAN Power Link is being considered to import 2.2 GW of solar from Northern Territory.

Companies

Wilmar International
Wilmar International is listed in Singapore. Headed by Kuok Khoon Hong, it is the world's largest palm oil firm. Kuok was the third richest person in Singapore in 2009 with a net worth of $3.5 billion. According to Finnwatch in 2007 the Kuok family owned by Malaysian companies a biofuel plant in Indonesia (225 000 t/a). The Wilmar director Martua Sitorus ($3 billion net worth in 2009, 2nd richest in Indonesia) lived in Indonesia in 2009.

In July 2007 Friends of the Earth Netherlands and two Indonesian NGOs accused Wilmar of illegal forest clearances in West Kalimantan, inadequate Environmental Impact Assessments and clearing land outside its concessions. Wilmar denies the allegation.  The report calls on Unilever, a major purchaser from Wilmar, to review its purchasing relationship with the company.

Carbon dioxide emissions
Singapore was the 58th top carbon dioxide () emitter per capita in the world.

References


text:
Professor Mari Velonaki
Human Robot Interaction, Responsive Systems, New Media Art.
Mari Velonaki's research is situated in the multi-disciplinary field of Social Robotics. Her approach to Social Robotics' research has been informed by aesthetics and design principles that stem from the theory and practice of Interactive Media Art. Velonaki has made significant contributions in the areas of Social Robotics, Media Art and Human-Machine Interface Design. Her career outputs across these fields are extensive. Velonaki began...view more
Mari Velonaki's research is situated in the multi-disciplinary field of Social Robotics. Her approach to Social Robotics' research has been informed by aesthetics and design principles that stem from the theory and practice of Interactive Media Art. Velonaki has made significant contributions in the areas of Social Robotics, Media Art and Human-Machine Interface Design. Her career outputs across these fields are extensive. Velonaki began working as a media artist/researcher in the field of responsive environments and interactive interface design in 1997. She pioneered experimental interfaces that incorporate movement, speech, touch, breath, electrostatic charge, artificial vision and robotics, allowing for the development of haptic and immersive relationships between participants and interactive agents. She is the recipient of several competitive grants, including ARC Discovery, Linkage, LIEF an ARC Fellowship, an Australia Council of the Arts, Visual Arts Fellowship, Australia-Japan Foundation, Fuji Xerox Innovation, AOARD.
Velonaki is a Professor of Social Robotics at Art & Design, UNSW. She is the founder and director of the Creative Robotics Lab (Art & Design UNSW) and the founder and director of the National Facility for Human Robot Interaction Research (UNSW, USYD, UTS, St Vincent's Hospital).
Mari's robots and interactive installations have been exhibited worldwide, including: Victoria & Albert Museum, London; National Art Museum Beijing; Gyeonggi Museum of Modern Art, Korea; Aros Aarhus Museum of Modern Art, Denmark; Wood Street Galleries, Pittsburgh; Millennium Museum - Beijing Biennale of Electronic Arts; Ars Electronica, Linz; European Media Arts Festival, Osnabruck; ZENDAI Museum of Modern Art, Shanghai; Art Gallery of NSW, Sydney, Museum of Contemporary Arts, Sydney; Conde Duque Museum, Madrid.
Faculty of Art & Design
GG05 Corner of Greens Road & Oxford Street, Paddington NSW 2021
mari.velonaki@unsw.edu.au
by Professor Mari Velonaki
Edited Books 1
Journal articles 19
Conference Posters 1
Theses / Dissertations 2
Creative Works (non-textual) 69


text:
Q: How do I order a Queryset by model attributes in my template What I want is to be able to sort baseball players by specific attributes via a drop down and display them as bootstrap cards in my template
Views.py
from django.shortcuts import render
from stats.models import *

def index(request):
    player_list = Player.objects.all()
    context_dict = {'player_list':player_list}
    return render(request, 'stats/index.html', context=context_dict)

Models.py
from django.db import models

class Player(models.Model):

    picture = models.ImageField(blank=True)
    name = models.CharField(max_length=24)
    number = models.IntegerField(unique=True)
    jersey_name = models.CharField(max_length=20)
    games_played = models.IntegerField()
    at_bats = models.IntegerField(default=0)
    average = models.DecimalField(max_digits=4, decimal_places=3)
    hits = models.IntegerField()
    doubles = models.IntegerField()
    triples = models.IntegerField()
    home_runs = models.IntegerField()
    runs = models.IntegerField()
    rbis = models.IntegerField()

    def __str__(self):
        return self.name

And here's what the I imagine the tag would look like in my template
{% for player in player_list.filter_by_some_attribute %}
   HTML here
{% endfor %}

I looked for a solution here on SO and the Django docs but I'm fairly new to Django. I got the sense that custom template or filter tags might be what I'm looking for, but if I could get a push in the right direction that would be greatly appreciated.

A: Cool idea. So I think you would need to make filters for each attribute you want. To get the attribute from the dropdown you can use a form or ajax to send the attribute to your view. Then in your view you would run the filter for your database to return the objects. And then you can display the object in your template. Let's say you want players who have over 1000 games played. Your view could look like:
from django.shortcuts import render

def index(request):
    if request.POST['games_played']==1000:
        player_list = Player.objects.filter(games_played__gte=1000).order_by('name')
    else:
        player_list = Player.objects.all().order_by('name')

    context_dict = {'player_list':player_list}

    return render(request, 'stats/index.html', context=context_dict)

assuming you are sending data via a POST request. It seems like you would need many of those filters and if statements. You can even chain filters for more complex queries. Hope this helps.


First and above all drama should be fun! It is a marvellous vehicle for developing self-confidence, communication skills, social awareness, imagination, self discipline and co-operation.
Starting with short delightful Nativity plays in Nursery and Reception, all pupils participate in regular class assemblies and annual 'Year' plays performed to their parents and friends, culminating in the Year 6 production during their last term at The Manor. The buzz and excitement generated by each production are almost tangible.
The timetable has been carefully designed so that all the children from Nursery to Year 6 have regular drama lessons. Children in EYFS and Pre-Prep alternate their Drama lessons with story and library time, and children in Years 3-6 have a weekly lesson. There is also the offer of after-school drama clubs, which are heavily in demand.
Professional dancers and actors, visiting poets and musicians extend the teachers' expertise and the children's learning. A variety of other opportunities arise in the drama programme including drama workshops at the Globe Theatre.
Please visit our photo and video gallery pages to see some of our productions.