text:
makingmoney
The Most Popular Fashion Brands Worn By Meghan Markle And Kate Middleton
Being a member of the Royal Family brings with it a bunch of fashion influence. Not only do people around the world listen to your words, but your presentation is everything. When you're a royal, people will always rush to see what you're wearing. In fact, some will even rush to buy the same things!
It is estimated that Princess Charlotte, the adorable three-year-old sister of the future king, is worth more than $4.3 billion to the fashion industry. This is because of the influence she has wearing her clothes. So what about Kate Middleton and Meghan Markle? We break down some of their favorite fashion brands and see if we can look like them too.
Please note that Editor Choice may profit from any purchases made through this story.
Page 1 of 35 Prev Next
18 Most Priceless Recreated Childhood Photos
The 15 Best Foods To Eat In The Morning
Here's What Eating An Avocado Per Day Can Do For You
15 Shocking Types of Cancer Causing Food
Top 23 Most Insane Pools You Won't Believe Exist
5 Best Luxury Cars In The World
Would You Drive Along These Dangerous Roads?
TopLuxLife.com © 2017 - 2019 About Us | Terms of Use | Privacy Policy | Cookie Policy | Impressum

redpajama_set_name: RedPajamaCommonCrawl


In January 2016, ACR took over two more air traffic towers, Borlänge and Gällivare. In April, 2018 ACR will take over the air traffic tower of Göteborg Säve Airport.
The competitive market in Sweden consists of 21 airports. ACR operates air traffic at two of three Swedish airports, a total of 15 towers.
In addition to air navigation services, ACR delivers expertise and consulting services, nationally and internationally.
The environmental impact of airline traffic is of utmost importance to our customers. ACR's goal, together with our customers, is to reduce the environmental impact that aviation can have at airports and in neighboring areas.
ACR is certified according to ISO 9001:2015 and ISO 14001:2015 and EU-certified for ATS and MET.
The European interest in ACR is huge. Europe's leading Air Navigation Service Providers (ANSP) closely monitors developments in Sweden.
ACR's strategic cooperation with Swiss Skyguide makes us a strong player in future European procurement.
Read more in our folder.
Cross-border strategy when ACR cooperates with Swiss Skyguide.
The aim of the Skyguide and ACR cooperation is to strengthen its position on the international ATC/ANS market. Other countries in Europe will follow Swedish deregulation. The runaway costs for ATC/ANS in Europe during the last century is the main reason behind the EU regulation, making it possible for EU countries to open up to competition.
There is an increasing demand for ATC/ANS cost-cutting measures within the EU. As evidenced in Sweden, a deregulated market for ATC/ANS has resulted in huge cost-savings for airports and airlines.
Skyguide is a well-managed company with a long history within ANS/ATC and the sole provider for ATC in Switzerland. Both ACR and Skyguide have integrated civilian and military ATC, an established standard in Switzerland and Sweden since the 1970s. Flight safety through a continuous focus on a safety culture is of outmost importance for both Skyguide and ACR. Airports and other customers shall experience that ACR/Skyguide provides the safest and most cost-effective service in the market.
Skyguide provides ATC/ANS in the Swiss airspace and in adjacent countrie's airspace.
Skyguide handles around 3170 flights per day in one of Europe's most complex airspaces.
Skyguide employs a staff of some 1.400 at 14 cities in Switzerland. The head office is situated in Geneva.
Together, ACR and Skyguide make a strong brand.
Since ACR entered the Swedish market, the theme of strategic cooperation has been part of our long-term plan. Together, ACR and Skyguide can offer qualitative and cost-effective services, where safety is of outmost importance.
ACR is a member of The Swedish Aviation Industry Group, the Confederation of Swedish Enterprise and the Swedish Confederation of Transport Enterprises. ACR's ongoing CSR work supports the development organization Hand in Hand, whose vision is a world without poverty and child labor. ACR also supports the Children's Cancer Foundation, the Red Cross and Världens Barn. ACR is a member of The ATM Policy Institute.


text:
The World's Largest T-Shirt
January 7, 2017 Category: Funny
It's more than six times the length of a double-decker bus and larger than some football pitches. You'd struggle to find somebody to fit the world's largest t-shirt, but that hasn't stopped it from gaining the attention of people all over the world.
We first saw the t-shirt in October 2014 when it was revealed in Brazil. With a staggering length of 93.2 meters (305.8 ft) and a width of 62.7 meters (205.7 ft), it broke records as the largest t-shirt in the world.
The tee was created as an attempt to raise awareness for breast cancer. It was appropriately unveiled during October, since this is Breast Cancer Awareness month in many countries around the world. The company responsible for it was Equilíbrios Camisetas Promocionais, a Brazilian clothing business which began back in 1994. It gathered a wide customer base through manufacturing high quality clothing with a difference, but only hit headlines when it broke records with its enormous t-shirt. Helping to create and promote the t-shirt was the RFCC, an organization also known as the Female Network Against Cancer.
Unsurprisingly, the t-shirt was bright pink – the color associated with breast cancer awareness and many breast cancer charities. It featured the name of the company which created it, as well as the charity name (RFCC) in the top right corner. It was created using two main materials – cotton and recycled PET bottles – which each made up 50% of the t-shirt.
The shirt weighed a whopping 4,500kg (709 Stone), which is roughly the same as an adult hippopotamus. No wonder the project took so much manpower! A total of 64 people all worked together, putting in a combined total of 11,000 hours in a bid to smash the record. The whole project was coordinated by Rogério Tomaz, who remarked that it was wonderful to accomplish a big dream while also raising money for a great cause.
In 2014, it entered the Guinness World Records as the largest t-shirt in the world, overtaking the previous record-holder from 2011. Its predecessor was almost 80 meters long (262 ft) and just over 50 meters wide (164 ft), and was made by Gildan Activewear, headquartered in Montreal, Canada. It made its debut at the Country Music Association's 40th Music Festival, which took place in Tennessee, USA.
Both of these giant t-shirts were made with the idea of charity in mind. The item made by Gildan Activewear used enough material to make 12,000 regular-sized t-shirts, which the company pledges to manufacture and donate them to a music education charity, Keep the Music Playing.
After entering the Guinness World Records with their t-shirt in 2014, Equilíbrios Camisetas Promocionais decided to put all that material to good use. They managed to make 10,000 t-shirts which were then sold off as limited editions in order to raise money for the RFCC.
The coastal city of Navegantes, which was home to the unveiling of the t-shirt, also managed to break a record, since it was the first time that a Guinness World Records title had been awarded in this particular location.
Onions are extremely beneficial to eat. They comprise of complex sugars that keep our
The Cutest Animals Of The World
Visiting Star: 5 Luxury Celebrity Houses and Apartments in Paris
Tourists have Filmed Ghost in the Vatican Cathedral
The Most Unusual Alcoholic Drinks In The World
Two Piggy-Fashionistas Are the New Internet Stars


BRIGHOUSE TOWN manager Vill Powell believes that the race for the title in the Evo-Stik East is now a two-way fight.
Third-placed Pontefract Collieries were surprisingly beaten 7-3 at Spalding United last Saturday and stay five points behind Brighouse while falling 11 behind leaders Morpeth Town.
Former Sheffield Wednesday striker Powell feels the current leaders cannot be caught by the sides below Town and he has no intention of letting his own side's standards slip.
Brighouse had a break from action last weekend but return with a home clash against Marske United on Saturday.
"We must not get heady about this and we must also keep playing each week and be focused," said Powell.
"After being without a fixture last weekend, it is imperative we get back in action this weekend and keep playing to the standards we have set ourselves.
"Not only for the momentum but also for the mentality of the players and keeping the edge on match fitness.
This weekend's visitors have not had the best of starts to 2019 but they bounced back last Saturday with a 5-0 home win over Lincoln United.
They had previously lost 1-0 to Pickering Town on January 1, lost 2-1 at home to Loughborough Dynamo and then drawn 0-0 with Stocksbridge Park Steels.
Manager Carl Jarrett has brought former academy goalkeeper Luke Mewitt back on loan from Huddersfield Town.


text:
FDA's Final Guidance for Homeopathic Drug Products
FDA's Final Guidance for Homeopathic Drug Products
Written by: Jim Lassiter
The Food and Drug Administration has been guided by the Law (meaning the Federal Food Drug and Cosmetic Act of 1938 with amendments) and is obliged to implement the Law through the development of regulation and guidance. When the legislation was first enacted, an interesting recognition was incorporated into this Law. Not only was the United States Pharmacopoeia (USP) recognized as a definitive standard for drugs, but there was recognition of the Homeopathic Pharmacopoeia of the United States (HPUS) as the provider of standards for these types of drug products. The why's and how's of this recognition and not important but the fact of this recognition and acceptance (read this as allowance) was implemented in the form of a Compliance Policy Guide (CPG) – CPG 400.400 which provided relatively clear directions and standards for the marketing of homeopathic drug products. This remained the case until 2017 when FDA determined the best path forward in terms of how these products should be further considered and evaluated. Originally published for comment in December of 2017 with a revised draft presented in October of 2019, a formal guidance document was finalized on December 7, 2022. This now is the framework and structure regarding evaluation, acceptability and presentation of these products. This document does not, however, identify clear direction and standards for marketing and the associated on-label claims for homeopathic drug products.
The most significant aspect of this regulatory activity is that it does set a precedent in terms of how FDA chooses to deal with product categories with which it is not comfortable. Such was the case for homeopathic drug products from the time of passage of FFDCA. The approach taken by FDA on this matter is that it alone is responsible for the determinations of whether products should be in the marketplace, despite the clear allowance within the Law itself. The application of this approach is one that needs to be considered and remembered in the coming months and years (as these things as demonstrated take a significant period of time to implement) as FDA moves its target focus to other challenging product categories such as dietary ingredients and dietary supplements that are commonly and readily prone to adulteration and misbranding. The approach and application of regulatory activity regarding "interpretation" of the Law is one that is now a standard approach. Even for homeopathic drug products, specifically identified in the Law as acceptable products, the assurance of the ability to market such products is no longer linked to the legislative outcome. Regulatory maneuvering in this manner (issuance of a guidance document) has afforded FDA the opportunity to forego the whole of regulatory recognition of legally presented and delivered products. FDA's approach toward homeopathic drug products includes FDA's anticipation that "many homeopathic drug products will fall outside the categories of drug product that FDA intends to prioritize for enforcement and regulatory action". This is to say that – yes – there will be regulatory action taken with prioritization of products based on FDA's identification if certain products or product categories can potentially pose higher risks to public health in general as well as to specific vulnerable demographics e.g. infants and children, etc. This affords FDA the opportunity to address (read this as "remove" rather) any number of products that it identifies as posing this "significant risk" at its sole discretion.
The cautionary note from this recent issuance of the final guidance document for homeopathic drug products is that FDA has identified itself as the sole determiner for any such potential public safety concerns. Having additional legislative requirements, affords the FDA with the opportunity to review such products as a matter of course, but more importantly, the Law places the burden of demonstration of a lack of safety exclusively on the FDA. FDA may make its determinations and apply regulatory action with relative ease under the heading of protecting the public health, so companies in the sector should be diligent and prepared and take steps to ensuring full product compliance with applicable published monographs, contribute to the development of new monographs where and when applicable, and carry out human safety and clinical studies as a means of better protecting the brand and product integrity from potential regulatory challenge from the Agency.
Make no mistake, homeopathic products are regulated though historically, the regulatory actions in this space have largely only cited the lack of operational controls, documentation and testing, and not so much around the specific ingredient allowances, labeling and/or claims. This final ruling starts the change of that regulatory tide so to speak, and companies with a vested interest for the long term in this sector should heed this. Homeopathic Manufacturers and Brands should recognize the need to take additional steps in a more proactive manner in their business strategy to have better data and safety information rather than a reactive one, given how disruptive interruptions and stoppages in operations can be due to more aggressive regulatory enforcements or the more likely proliferation of publicly published Warning Letters negatively challenging consumer confidence and brand loyalty.
← The Coming NDI Draft Guidance Enforcement Discretion
The Coming NDI Draft Guidance Enforcement Discretion
Vitamin D and its Correlation to Covid-19
Alkemist Labs Warns Dietary Supplement Industry of Falsified Documents
Dietary Supplements, Compliance, and COVID-19


When you experience a dental emergency, it can be stressful and exhausting. Herndon, VA dentist Dr. Mark Jefferies can work with you to address your dental emergency compassionately and effectively. Our goal is to alleviate your symptoms, restore your oral health, and prevent further injuries to your smile. We work with you every step of the way to ensure all of your dentistry needs are met.
It can be difficult to determine what constitutes as a dental emergency. If you are unsure if you are experiencing a dental emergency, please contact our dental office. Our team can determine if you need to visit our Herndon, VA dentist office for an emergency appointment. We offer convenient office hours so that we can get you to our dental office as soon as possible.
As a skilled emergency dentist in Herndon, VA, Dr. Jefferies will perform a thorough evaluation, determine the best treatment to alleviate any pain or discomfort and execute a long term solution for your smile. We offer a complete range of emergency dentistry services; whether you are dealing with dental trauma or minor infection, we have the right solution for you.
If you are experiencing a dental emergency, please contact our office as soon as possible. We can work with you to schedule an appointment at your earliest convenience.
In some cases dental emergencies are preventable. For instance, if you lose a tooth during contact sports, you may want to consider a custom fit mouthguard. Custom fit mouthguards are tailored to fit comfortably in your mouth. A mouthguard can reduce the risk of damage to your teeth, mouth, and jaw. Dr. Jefferies can design custom mouth guards to fit securely over braces and other oral appliances.
Another way to reduce your risk of a dental emergency is to schedule biannual visits to our office. Routine dental visits allow our team to spot any early signs of dental issues like tooth decay, gum disease, and tooth grinding. With early intervention, we can build a treatment plan that is right for you and possibly reduce your risk of experiencing a dental emergency.
Visiting our office regularly is one of the best ways to improve your dental health and keep your smile protected. During your next visit, feel free to discuss any concerns you may have or ways to improve your smile.
We understand dental emergencies can be a scary, confusing process. Dr. Jefferies and our team can work with you to alleviate that fear and address your dental emergency. We work with you every step of the way to ensure all of your needs are met. If you have any questions or would like to explore your treatment options, call (703) 570-1152 or request an appointment online.


College Station is a city in Brazos County, Texas, situated in East-Central Texas in the heart of the Brazos Valley, in the center of the region known as Texas Triangle. It is 90 miles (140 kilometers) northwest of Houston and 87 miles (140 km) northeast of Austin.
College Station is the home of Texas A&M University. College Station is a city in Brazos County, Texas, situated in East-Central Texas in the heart of the Brazos Valley, in the center of the region known as Texas Triangle.


To make students aware of technological practices of corporate World, industrial tours are organized on regular basis. Students are encouraged to visit trade fair, techno-fest, auto –expo etc. for Awareness of new technology. Every students has to submit a written Report of his /her experience during industrial visit in the form of Handout to the respective department head.


text:
AP Says Hillary Clinton Has Basically Clinched the Nomination
Clinton Campaign will host a Center City watch party tonight. Mayor Jim Kenney is expected to attend.
By Claire Sasko·	 6/7/2016, 8:11 a.m.
The Hillary Clinton campaign will host a watch party tonight in Center City.
Pennsylvania 6 will host the event for supporters as the Democratic presidential primary nears a close and six states cast their votes, including New Jersey, California, Montana, New Mexico, North Dakota and South Dakota.
Mayor Jim Kenney, who announced his endorsement of Clinton in February, is expected to attend the event. It will kick off at 8:15 p.m. at 114 S. 12th St.
The Associated Press reported Monday that Clinton has enough delegates – 2,383 – to become the presumptive Democratic nominee.
Clinton is ahead of presidential candidate Bernie Sanders by more than 3 million cast votes, 291 pledged delegates and 523 superdelegates, the AP reports.
In a response statement the Sanders Campaign released Monday, Sanders' spokesman, Michael Briggs, said, "It is unfortunate that the media, in a rush to judgement, are ignoring the Democratic National Committee's clear statement that it is wrong to count the votes of superdelegates before they actually vote at the convention this summer."
"Our job from now until the convention is to convince those superdelegates that Bernie is by far the strongest candidate against Donald Trump," Briggs said.
Follow @ClaireSasko on Twitter.
Claire Sasko	Staff Writer @ClaireSasko
csasko@phillymag.com
Everything You Need to Know About Philly's Plastic Bag Ban
The 10 Essential Sound of Philadelphia Songs Everyone Should Know
All the Best Places to Play Board Games in Philly
Donald Trump at Wharton: Fact Checking the President's Time at Penn
The Juicy Story Behind Bucks County's Newtown Athletic Club
Pa. Could Legalize Psychedelics Much More Quickly Than it Did Marijuana – Philadelphia Magazine
All the Best Places to Play Board Games Around Philly


Discrimination is the most common illegal grounds for terminating an employee in New Mexico. Employers are not allowed to terminate an employee because of their race, religion, nationality, or gender. An employer in Alamogordo also cannot fire at-will employees in retaliation for the employee filing a claim for discrimination or initiating an investigation of discrimination against the employer.
In Alamogordo, New Mexico, a lawyer will be able to notify you about whether you are a victim of wrongful termination, and they will be able to guide you in collecting the necessary documents. Sometimes there can be procedures that are unique, and a lawyer can guide you in these as well.


Anyone ever noticed problems with keyboard after changing the trackpad?
Is it possible to replace just the ribbon cable that connects the trackpad to the motherboard?
This is fantastic. Thanks, I was able to replace the trackpad for about $50; the authorized Apple shop in my area wanted $500.


Bühler Motor specialises in the development and production of custom motion systems for the healthcare device and pharmaceutical drug-delivery markets.
Complete Bühler Motor drive solutions combine brushed DC and brushless EC fractional-horsepower motors, stepper motors, pumps, encoders, geartrains, hardware and software, control electronics, brakes, actuators and more within a single assembly. This single assembly provides a cost-effective solution for our customers by reducing their supply chain and easing final product assembly.
Driven by innovation, Bühler Motor offers comprehensive in-house research and development with more than 120 engineers and 1,600 qualified employees worldwide delivering more than 20 million units globally. Since no two projects are the same at Bühler Motor, utilisation of all available theoretical analysis tools throughout the development process ensures the correct solution is provided to meet our customers' exact needs. Bühler Motor's product implementation process (PIP) guarantees superior manufacturing processes and the highest quality products for all drive systems developed.
Bühler Motor is an independent, globally active company focused on the development, production and marketing of technically challenging motion solutions for the world's leading manufacturers in the medical, automotive and industrial industries. Bühler Motor was founded in 1855 and has its global headquarters in Nuremberg, Germany.
As part of the worldwide Bühler Motor family, Buehler Motor, based in Morrisville, NC, offers its North American customers a combination of German engineering, research and development, manufacturing, and local sales and customer support – plus the competitive pricing advantages and on-time delivery that come from a global production footprint spanning three continents.
We seek development opportunities which lead to production of innovative healthcare devices. Contact us to discuss how Bühler Motor can help bring your project from concept to reality.


text:
Q: org.apache.flink.api.table.TableException: "Alias on field reference expression expected" I am using Apache Flink's Table API on the 1.1-SNAPSHOT version to evaluate SQL queries on streams.
Following is my code:
private static final int MAX_RACK_ID = 10;
private static final long PAUSE = 100;
private static final double TEMP_STD = 20;
private static final double TEMP_MEAN = 80;

public static void main(String[] args)
{
     StreamExecutionEnvironment env=StreamExecutionEnvironment.getExecutionEnvironment();
     env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
     StreamTableEnvironment tableEnv=TableEnvironment.getTableEnvironment(env);

     DataStream<MonitoringEvent> dstream = env.addSource(new MonitoringEventSource(MAX_RACK_ID, PAUSE, TEMP_STD, TEMP_MEAN));
     tableEnv.registerDataStream("TemperatureData", dstream,"rackid,temperature,timestamp");

     Table tab1 = tableEnv.sql("select STREAM rackid,temperature,timestamp from TemperatureData where temperature>=100");
     DataStream<TemperatureEvent>tempstream=tableEnv.toDataStream(tab1, TemperatureEvent.class);
     tempstream.print();
}

When I execute this program, it throws the following exception :
Exception in thread "main" org.apache.flink.api.table.TableException: Alias on field reference expression expected.
    at org.apache.flink.api.table.TableEnvironment$$anonfun$4.apply(TableEnvironment.scala:299)
    at org.apache.flink.api.table.TableEnvironment$$anonfun$4.apply(TableEnvironment.scala:292)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:108)
    at org.apache.flink.api.table.TableEnvironment.getFieldInfo(TableEnvironment.scala:292)
    at org.apache.flink.api.table.StreamTableEnvironment.registerDataStreamInternal(StreamTableEnvironment.scala:212)
    at org.apache.flink.api.java.table.StreamTableEnvironment.registerDataStream(StreamTableEnvironment.scala:130)
    at com.yash.flink.Program.main(Program.java:31)

I have a few questions:

*

*What is the way to write SQL queries on streams using Apache Flink's Table API?

*How can I implement this query in Flink?

*Is this a bug in Flink's Table API ??

A: You found a limitation / bug in the Table API. The problem is caused by the registration of the DataStream<MonitoringEvent> as a table. You should do
tableEnv.registerDataStream(
  "TemperatureData",
  dstream,
  "rackid AS rackid, temperature AS temperature, timestamp AS timestamp"
);

to make it work. I will make sure that the problem is fixed before Stream SQL is released in Flink 1.1.0.

redpajama_set_name: RedPajamaStackExchange


text:
[A Brief Compendium of Unusual Remedies Leech therapy]
MAGYAR László András
[The most common disorders seen in the paediatric gastroenterology clinic]
ARATÓ András
[The prognostic and therapeutic implications of the Barcelona staging of primary hepatocellular carcinoma]
DANK Magdolna
[Family and carrier role conflicts of female health professionals]
FEITH Helga Judit, KOVÁCSNÉ Tóth Ágnes, BALÁZS Péter
[Inflammatory bowel diseases in focus]
[Small intestine damages caused by non-steroidal antiinflammatory drugs]
HERSZÉNYI László
Evaluation of the effectiveness of transforaminal epidural steroid injection in far lateral lumbar disc herniations
EVRAN Sevket, KATAR Salim
Far lateral lumbar disc herniations (FLDH) consist approximately 0.7-12% of all lumbar disc herniations. Compared to the more common central and paramedian lumbar disc herniations, they cause more severe and persistent radicular pain due to direct compression of the nerve root and dorsal root ganglion. In patients who do not respond to conservative treatments such as medical treatment and physical therapy, and have not developed neurological deficits, it is difficult to decide on surgical treatment because of the nerve root damage and spinal instability risk due to disruption of facet joint integrity. In this study, we aimed to evaluate the effect of transforaminal epidural steroid injection (TFESI) on the improvement of both pain control and functional capacity in patients with FLDH. A total of 37 patients who had radicular pain caused by far lateral disc herniation which is visible in their lumbar magnetic resonance imaging (MRI) scan, had no neurological deficit and did not respond to conservative treatment, were included the study. TFESI was applied to patients by preganglionic approach. Pre-treatment Visual Analogue Scale (VAS) and Oswestry Disability Index (ODI) scores of the patients were compared with the 3rd week, 3rd month and 6th month scores after the procedure. The mean initial VAS score was 8.63 ± 0.55, while it was 3.84 ± 1.66, 5.09 ± 0.85, 4.56 ± 1.66 at the 3rd week, 3rd month and 6th month controls, respectively. This decrease in the VAS score was found statistically significant (p = 0.001). ODI score with baseline mean value of 52.38 ± 6.84 was found to be 18.56 ± 4.95 at the 3rd week, 37.41 ± 14.1 at the 3rd month and 34.88 ± 14.33 at the 6th month. This downtrend of patient's ODI scores was found statistically significant (p = 0.001). This study has demonstrated that TFESI is an effective method for gaining increased functional capacity and pain control in the treatment of patients who are not suitable for surgical treatment with radicular complaints due to far lateral lumbar disc hernia.
Cholinesterase inhibitors and memantine for the treatment of Alzheimer and non-Alzheimer dementias
BALÁZS Nóra , BERECZKI Dániel, KOVÁCS Tibor
In aging societies, the morbidity and mortality of dementia is increasing at a significant rate, thereby imposing burden on healthcare, economy and the society as well. Patients' and caregivers' quality of life and life expectancy are greatly determined by the early diagnosis and the initiation of available symptomatic treatments. Cholinesterase inhibitors and memantine have been the cornerstones of Alzheimer's therapy for approximately two decades and over the years, more and more experience has been gained on their use in non-Alzheimer's dementias too. The aim of our work was to provide a comprehensive summary about the use of cholinesterase inhibitors and memantine for the treatment of Alzheimer's and non-Alzheimers's dementias.
[Is the implementation of Vojta therapy associated with faster gross motor development in children with cerebral palsy? ]
SANZ-MENGIBAR Jose Manuel , MENENDEZ-PARDIÑAS Monica , SANTONJA-MEDINA Fernando
[Vojta therapy has been reported as clinically beneficial for strength, movement and gross motor activities in individual cases and is being included within the second of three levels of evidence in interventions for cerebral palsy. The goal of this study is to understand the effect of Vojta therapy on the gross motor function. Our clinical trial followed a one group, pre-post design to quantify rates of changes in GMFM-88 after a two-months period undergoing Vojta therapy. A total of 16 patients were recruited. Post-intervention acceleration rates of GMFM-88-items acquisition (0.005; p<0.001) and Locomotor Stages (1.063; p<0.0001) increased significatively following Vojta therapy intervention. In this study, Vojta therapy has shown to accelerate the acquisition of GMFM-88-items and Locomotor Stages in children with cerebral palsy younger than 18 months. Because functional training was not utilised, and other non-Vojta therapy intervention did not influence the outcome, Vojta therapy seems to activate the postural control required to achieve uncompleted GMFM-88-items. ]
The applications of transcranial Doppler in ischemic stroke
FINNSDÓTTIR Herdis, SZEGEDI István, OLÁH László, CSIBA László
Background: This overview provides a summary of the applications of transcranial Doppler (TCD) in ischemic stroke. Results: A fast-track neurovascular ultrasound protocol has been developed for detecting occlusion or stenosis. The technique is more reliable in the carotid area than in the posterior circulation. By monitoring the pulsatility index the increased intracranial pressure can be diagnosed. TIBI score was developed for grading residual flow. TCD has been shown to accurately predict complete or any recanalization. Regarding recanalization, TCD has a sensitivity of 92%, a specificity of 88%, a positive predictive value of 96%, a negative predictive value of 78% and an overall accuracy of 91%, respectively. Sonothrombolysis seemed to be a promising application but randomized controlled trials have shown that it does not improve clinical outcome. TCD examination can detect microembolic signals (MES) which are associated with an increased risk of stroke. Microemboli were detected in symptomatic and asymptomatic carotid artery stenosis and during carotid endarterectomy. The number of microemboli can be decreased by antithrombotic therapy. Contrast enchanced examination and Valsalva maneuver with continuous TCD monitoring can accurately screen for right-to-left shunt.
KRABOTH Zoltán, KÁLMÁN Bernadette
Interest in the hippocampal formation and its role in navigation and memory arose in the second part of the 20th century, at least in part due to the curious case of Henry G. Molaison, who underwent brain surgery for intractable epilepsy. The temporal association observed between the removal of his entorhinal cortex along with a significant part of hippocampus and the developing severe memory deficit inspired scientists to focus on these regions. The subsequent discovery of the so-called place cells in the hippocampus launched the description of many other functional cell types and neuronal networks throughout the Papez-circuit that has a key role in memory processes and spatial information coding (speed, head direction, border, grid, object-vector etc). Each of these cell types has its own unique characteristics, and together they form the so-called "Brain GPS". The aim of this short survey is to highlight for practicing neurologists the types of cells and neuronal networks that represent the anatomical substrates and physiological correlates of pathological entities affecting the limbic system, especially in the temporal lobe. For that purpose, we survey early discoveries along with the most relevant neuroscience observations from the recent literature. By this brief survey, we highlight main cell types in the hippocampal formation, and describe their roles in spatial navigation and memory processes. In recent decades, an array of new and functionally unique neuron types has been recognized in the hippocampal formation, but likely more remain to be discovered. For a better understanding of the heterogeneous presentations of neurological disorders affecting this anatomical region, insights into the constantly evolving neuroscience behind may be helpful. The public health consequences of diseases that affect memory and spatial navigation are high, and grow as the population ages, prompting scientist to focus on further exploring this brain region.
Neoadjuvant and palliative drug therapy for bladder cancer
Reliability and Validity of the Turkish Version of the Brief Scales for Coping Profile in Textile Workers


BESSE-SPRAGUE COMPANY, INCORPORATED is an entity registered at ONONDAGA county with company number 2368. HARRY C. SPRAGUE located at the address 431 So. Salina St Syracuse, New York, 13202. Company is incorporated on . Current status of the company is active.


text:
Our registration
About KYB
BOND magazine
Australian Safaris
About CWCI Australia
CWCI Australia is a Bible-based, interdenominational, faith ministry, by women to women. Our membership is drawn from women in good standing within Protestant evangelical churches across Australia.
CWCI International
The International Board manages the production process of our KYB study books for distribution by CWCI Australia. CWCI IB is also beginning undertaking the production process of Easy English editions of KYB studies.
CWCI New Zealand
CWCI NZ is the New Zealand counterpart to CWCI Australia. About 10 years after its beginnings in Australia, CWCI was established in New Zealand in 1968. A non-denominational and now an international organisation, it has touched the lives of thousands of women throughout the world through a variety of activities. The New Zealand Board overseas CWCI ministry in Fiji.
Know Your Bible United Kingdom
Know Your Bible UK is the United Kingdom counterpart to CWCI Australia. The UK Board has responsibility to support the work of Know Your Bible both in the UK and in Europe. A particular focus of our work is translating KYB material into different languages to make the Bible accessible to women in Eastern Europe.
MissionsInterlink
Missions Interlink is the Australian network for global mission.
We exist to connect Australians with a passion for global mission. Together, as God's people, we can be more effective in cross-cultural and global mission, and demonstrate unity in Christ.
We operate across Australia providing training and networking opportunities, sharing information and resources, facilitating collaboration and high standards of practice, and advocating on behalf of our Members and Associates.
Missions Interlink is a ministry of the Australian Evangelical Alliance Inc. ABN 54 056 007 820, a registered charity with ACNC.
ChildSafe
ChildSafe Limited exists to serve organisations and individuals working with children and vulnerable people, with the goal of improving their well-being and safety.
As a children's Harm Prevention Charity we provide many practical tools and training to help community organisations transition from policy to good practice.
We are an initiative of Scripture Union Australia, conceived and developed as an internal project, before creating ChildSafe Limited as a separate entity in 2007. ChildSafe actively partner with churches, schools and other community organisations.
8:30am – 5pm (Monday to Thursday)
PO Box 670, Punchbowl NSW 2196
© Christian Women Communicating International in Australia | Privacy Policy
Website by Buzzing Designs


Are you a PowerShell toolmaker, and create your own modules? Have you ever wanted to create a help document to distribute together with it? Look no further.
This function will read all commands from a module, extract all the necessary data and write a nicely formatted HTML document with all the help information your users need from your commands.
It relies on Twitter Bootstrap with the nice Jasny-bootstrap add-on, and jQuery to create a beautiful and easy to use help document.
Head on over to my github repository and check it out. And don't hesitate to let me know how you like it (or dislike it). Even better if you fork it, and help me make it even better!


The concluding night (9/9) of the weekend Creative Arts Emmy Awards saw two notables who recently passed away earn major wins, while joining the exclusive ranks of EGOT honorees were three key contributors to NBC's production of Jesus Christ Superstar Live In Concert.
On the latter score, performer John Legend, composer Andrew Lloyd Weber and lyricist Tim Rice joined the elite club of EGOT winners. With the musical earning the Emmy for Best Live Variety Special, EPs Legend, Lloyd Webber and Rice added the TV Academy honor to their Tonys, Grammys and Oscars. The three become the 13th, 14th and 15th artisans to win all four show business awards. Among those previously accomplishing this feat were Audrey Hepburn, Mel Brooks, Rita Moreno, Mike Nichols and Whoppi Goldberg.
Meanwhile the dead were honored and remembered during the Creative Arts Emmy proceedings--namely Craig Zadan and Anthony Bourdain. Zadan, who died last month, was an EP on Jesus Christ Superstar Live In Concert, a role which earned him his first career Emmy.
Bourdain, who committed suicide back in June, was honored with six Emmys--five for his Anthony Bourdain: Parts Unknown series (CNN) and one for Anthony Bourdain: Explore Parts Unknown (CNN.com), a digital show which topped the Outstanding Short-Form Non-Fiction or Reality category.
Bourdain's CNN series earned distinction for: Outstanding Informational Series; Outstanding Picture Editing For A Nonfiction Program (Hunter Gross, ACE) for the "Lagos" episode; Outstanding Sound Mixing For A Nonfiction Program (Single or Multi-Camera), also for "Lagos" (re-recording mixer Benny Mouthon, CAS); Outstanding Sound Editing For A Nonfiction Program (Single or Multi-Camera) for the "Seattle" episode (sound editors Brian Bracken and Nick Brigden); and Outstanding Writing For A Nonfiction Program on the strength of Bourdain's penning of the "Southern Italy" episode.
Lydia Tenaglia, EP of Anthony Bourdain: Parts Unknown, accepted the writing Emmy for Bourdain. She shared, "Tony was nominated for this Emmy many times, but it had always eluded him. So it is with tremendous bittersweetness that I accept it on his behalf." Bourdain was a nine-time Best Writing For A Nonfiction Program Emmy nominee.
The Zen Diaries of Garry Shandling (HBO)--exec produced by Judd Apatow, among others--earned the Emmy for Outstanding Documentary or Nonfiction Special.
Brett Morgen won for Outstanding Directing For Documentary/Nonfiction Program on the basis of his Jane Goodall masterpiece Jane (National Geographic).
And winning the juried award for Exceptional Merit In Documentary Filmmaking was Yance Ford's brilliant Strong Island (Netflix).
Tied for the lead with the most Emmy wins after this year's two-day Creative Arts Emmys were Game Of Thrones (HBO) and Saturday Night Live (NBC) with seven apiece. Next with five Emmy Awards each were Anthony Bourdain: Parts Unknown and Jesus Christ Superstar Live in Concert.
Scoring four Emmys apiece were RuPaul's Drag Race (VH1) and The Assassination Of Gianni Versace: American Crime Story (FX Networks).
Coming away with three Emmys each were Atlanta (FX Networks), Last Week Tonight With John Oliver (HBO), Queer Eye (Netflix), The Crown (Netflix), The Handmaid's Tale (Hulu), The Marvelous Mrs. Maisel (Amazon), the "USS Callister" installment of Black Mirror (Netflix), and Westworld (HBO).
On the network scorecard after the Creative Arts Emmys, HBO led the way with 17 wins, followed by Netflix with 16, NBC with 15, CNN with eight, and FX Networks with seven.


you have to establish a relationship. This doesn't mean a family holiday together or inviting them over for a barbie – but it does mean demonstrating professionalism and the use of sound techniques (not guesswork) to tackle their problems.
You'll be documenting objectives, scope, constraints and sponsors in a Terms of Reference and documenting their business needs as a Business Requirements Specification. These are standard templates which give clients re-assurance that this has been done before, particularly if your organisations uses them for all projects.
Ultimately you have to establish trust with your client. Their belief that you can get the job done is far better than any expense account or entertainment allowance.
Unless you understand your client's problem, they're not going to believe that you can come up with a solution. So how do you demonstrate understanding of a business area when the person in front of you has been doing it for years and knows you will never understand it as well as them. Well probably you can't. But you can show them that by using a structured approach to analysing and solving problems, you are using proven techniques which have solved tens of thousands of business problems in organisations throughout the world.
Much as clients can become passionate and immersed in their area of work – seeing it as unique or ground breaking – the reality is that elsewhere in the world, others are probably doing very similar work. Most problems have been encountered before. Ultimately there is always a solution to your client's problem – even if the only viable one means going back to the Terms of Reference and redefining the project's objectives.
And don't think that you need to be a creative genius to solve problems – more problems are solved every day through hard work than through flashes of inspiration.
So now you've bonded with your client, analysed their problems and designed a solution which they can understand and agree to fund. How do you build it? Well luckily you've got a number of choices depending on your organisation. You may have an in-house development team or a trusted external supplier. You may use an off-shore company or go out to tender. All you need for a quote is a specification which is accurate, unambiguous, comprehensive and doesn't pre-suppose any particular software or hardware – after all you've already specified your technology constraints in the form of non-functional requirements.
The document is commonly called a Logical Model (or Functional Specification), and the documentation standards come in a variety of shapes and sizes. They can range from a highly prescriptive and highly detailed document – good for tenders, mainframe systems and outsourcing – through to minimalist documents which just aim to capture concepts. The latter are good for exploratory projects where the final solution is not known and may require several iterations before it emerges.
In the end the project will dictate the level of documentation which works best but be sure you understand what you leave out as well as what you're including.
As many of you know, the analyst's job doesn't end there. They can be called on to write business cases, manage the project, write and conduct acceptance testing…..etc. However let's stick to the basics for now.
The following skills have been refined by IRM in over 20 years of business analyst training and have been packaged into three course covering the fundamentals of business analysis.
We're not saying that our courses are "gospel" to be a good business analyst – but they have worked for thousands of analysts across hundreds of companies over the part three decades. They can work for you too.
Find dates for these courses in your city or read more about business analyst skills that we recommend.


text:
Q: Deny SCHEMA DELETE in SQL server?  CREATE LOGIN TestLogin WITH password='abc';

 -- Now add user to database
 USE TestDB;
 CREATE USER TestUser FOR LOGIN TestLogin;
 GO

 use [TestDB]
 GO
 DENY SCHEMA DELETE TO [TestUser]
 GO

I was doing something like this, but this doesn't seem to work. I want to DENY SCHEMA DELETE on all Schemas for TestUser. What would be a way to do that?

A: You got it wrong. Rather it should be.
DENY DELETE ON SCHEMA :: schema_name TO [TestUser]

See DENY Schema Permissions for more information on the same. Actual syntax is:
DENY permission  [ ,...n ] } ON SCHEMA :: schema_name
    TO database_principal [ ,...n ]
    [ CASCADE ]
        [ AS denying_principal ]

A: You could leverage some dynamic sql for this.
declare @SQL nvarchar(max) = ''

select @SQL = @SQL + 'DENY DELETE ON SCHEMA :: ' + name + ' TO [TestUser];'
from sys.schemas
where name not like 'db[_]%'

exec sp_executesql @SQL


Chris Young was one of the first country singers to step up after Hurricane Harvey made landfall, and he hasn't forgotten about the people of south Texas.
The "Losing Sleep" singer recently called Taste of Country Nights to talk about his continuing support of the relief effort. His GoFundMe page is nearing 80 percent of a $500K goal, with more than 3,500 people contributors.
"It's so sad about what everybody is dealing with down there," he says. "It's just a small part of the recovery effort. This is going to be something people deal with for days and weeks and months to come."
The total cost of the rebuild will reach far into the billions. Seventy people were killed when the storm struck in late August and flood waters are just now receding. Miranda Lambert, Josh Abbott Band and George Strait are among the other stars who quickly pitched in.
On Sept. 12, Strait, Lambert and Chris Stapleton will take part in a nationwide telethon for relief that will air on all major networks. Their portion of the show will come from a theater in San Antonio, Texas. Donations can be made to several charities listed at the ToC Hurricane Harvey hub.


text:
/* This file contains functions which implement those POSIX and Linux functions
 * that MinGW and Microsoft don't provide. The implementations contain just enough
 * functionality to support fio.
 */

#include <arpa/inet.h>
#include <netinet/in.h>
#include <windows.h>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <pthread.h>
#include <time.h>
#include <semaphore.h>
#include <sys/shm.h>
#include <sys/mman.h>
#include <sys/uio.h>
#include <sys/resource.h>
#include <sys/poll.h>
#include <sys/wait.h>
#include <setjmp.h>

#include "../os-windows.h"
#include "../../lib/hweight.h"

extern unsigned long mtime_since_now(struct timeval *);
extern void fio_gettime(struct timeval *, void *);

/* These aren't defined in the MinGW headers */
HRESULT WINAPI StringCchCopyA(
  char *pszDest,
  size_t cchDest,
  const char *pszSrc);

HRESULT WINAPI StringCchPrintfA(
  char *pszDest,
  size_t cchDest,
  const char *pszFormat,
  ...);

int vsprintf_s(
  char *buffer,
  size_t numberOfElements,
  const char *format,
  va_list argptr);

int win_to_posix_error(DWORD winerr)
{
	switch (winerr)
	{
	case ERROR_FILE_NOT_FOUND:		return ENOENT;
	case ERROR_PATH_NOT_FOUND:		return ENOENT;
	case ERROR_ACCESS_DENIED:		return EACCES;
	case ERROR_INVALID_HANDLE:		return EBADF;
	case ERROR_NOT_ENOUGH_MEMORY:	return ENOMEM;
	case ERROR_INVALID_DATA:		return EINVAL;
	case ERROR_OUTOFMEMORY:			return ENOMEM;
	case ERROR_INVALID_DRIVE:		return ENODEV;
	case ERROR_NOT_SAME_DEVICE:		return EXDEV;
	case ERROR_WRITE_PROTECT:		return EROFS;
	case ERROR_BAD_UNIT:			return ENODEV;
	case ERROR_SHARING_VIOLATION:	return EACCES;
	case ERROR_LOCK_VIOLATION:		return EACCES;
	case ERROR_SHARING_BUFFER_EXCEEDED:	return ENOLCK;
	case ERROR_HANDLE_DISK_FULL:	return ENOSPC;
	case ERROR_NOT_SUPPORTED:		return ENOSYS;
	case ERROR_FILE_EXISTS:			return EEXIST;
	case ERROR_CANNOT_MAKE:			return EPERM;
	case ERROR_INVALID_PARAMETER:	return EINVAL;
	case ERROR_NO_PROC_SLOTS:		return EAGAIN;
	case ERROR_BROKEN_PIPE:			return EPIPE;
	case ERROR_OPEN_FAILED:			return EIO;
	case ERROR_NO_MORE_SEARCH_HANDLES:	return ENFILE;
	case ERROR_CALL_NOT_IMPLEMENTED:	return ENOSYS;
	case ERROR_INVALID_NAME:		return ENOENT;
	case ERROR_WAIT_NO_CHILDREN:	return ECHILD;
	case ERROR_CHILD_NOT_COMPLETE:	return EBUSY;
	case ERROR_DIR_NOT_EMPTY:		return ENOTEMPTY;
	case ERROR_SIGNAL_REFUSED:		return EIO;
	case ERROR_BAD_PATHNAME:		return ENOENT;
	case ERROR_SIGNAL_PENDING:		return EBUSY;
	case ERROR_MAX_THRDS_REACHED:	return EAGAIN;
	case ERROR_BUSY:				return EBUSY;
	case ERROR_ALREADY_EXISTS:		return EEXIST;
	case ERROR_NO_SIGNAL_SENT:		return EIO;
	case ERROR_FILENAME_EXCED_RANGE:	return EINVAL;
	case ERROR_META_EXPANSION_TOO_LONG:	return EINVAL;
	case ERROR_INVALID_SIGNAL_NUMBER:	return EINVAL;
	case ERROR_THREAD_1_INACTIVE:	return EINVAL;
	case ERROR_BAD_PIPE:			return EINVAL;
	case ERROR_PIPE_BUSY:			return EBUSY;
	case ERROR_NO_DATA:				return EPIPE;
	case ERROR_MORE_DATA:			return EAGAIN;
	case ERROR_DIRECTORY:			return ENOTDIR;
	case ERROR_PIPE_CONNECTED:		return EBUSY;
	case ERROR_NO_TOKEN:			return EINVAL;
	case ERROR_PROCESS_ABORTED:		return EFAULT;
	case ERROR_BAD_DEVICE:			return ENODEV;
	case ERROR_BAD_USERNAME:		return EINVAL;
	case ERROR_OPEN_FILES:			return EAGAIN;
	case ERROR_ACTIVE_CONNECTIONS:	return EAGAIN;
	case ERROR_DEVICE_IN_USE:		return EAGAIN;
	case ERROR_INVALID_AT_INTERRUPT_TIME:	return EINTR;
	case ERROR_IO_DEVICE:			return EIO;
	case ERROR_NOT_OWNER:			return EPERM;
	case ERROR_END_OF_MEDIA:		return ENOSPC;
	case ERROR_EOM_OVERFLOW:		return ENOSPC;
	case ERROR_BEGINNING_OF_MEDIA:	return ESPIPE;
	case ERROR_SETMARK_DETECTED:	return ESPIPE;
	case ERROR_NO_DATA_DETECTED:	return ENOSPC;
	case ERROR_POSSIBLE_DEADLOCK:	return EDEADLOCK;
	case ERROR_CRC:					return EIO;
	case ERROR_NEGATIVE_SEEK:		return EINVAL;
	case ERROR_DISK_FULL:			return ENOSPC;
	case ERROR_NOACCESS:			return EFAULT;
	case ERROR_FILE_INVALID:		return ENXIO;
	}

	return winerr;
}

int GetNumLogicalProcessors(void)
{
	SYSTEM_LOGICAL_PROCESSOR_INFORMATION *processor_info = NULL;
	DWORD len = 0;
	DWORD num_processors = 0;
	DWORD error = 0;
	DWORD i;

	while (!GetLogicalProcessorInformation(processor_info, &len)) {
		error = GetLastError();
		if (error == ERROR_INSUFFICIENT_BUFFER)
			processor_info = malloc(len);
		else {
			log_err("Error: GetLogicalProcessorInformation failed: %d\n", error);
			return -1;
		}

		if (processor_info == NULL) {
			log_err("Error: failed to allocate memory for GetLogicalProcessorInformation");
			return -1;
		}
	}

	for (i = 0; i < len / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION); i++)
	{
		if (processor_info[i].Relationship == RelationProcessorCore)
			num_processors += hweight64(processor_info[i].ProcessorMask);
	}

	free(processor_info);
	return num_processors;
}

long sysconf(int name)
{
	long val = -1;
	long val2 = -1;
	SYSTEM_INFO sysInfo;
	MEMORYSTATUSEX status;

	switch (name)
	{
	case _SC_NPROCESSORS_ONLN:
		val = GetNumLogicalProcessors();
		if (val == -1)
			log_err("sysconf(_SC_NPROCESSORS_ONLN) failed\n");

		break;

	case _SC_PAGESIZE:
		GetSystemInfo(&sysInfo);
		val = sysInfo.dwPageSize;
		break;

	case _SC_PHYS_PAGES:
		status.dwLength = sizeof(status);
		val2 = sysconf(_SC_PAGESIZE);
		if (GlobalMemoryStatusEx(&status) && val2 != -1)
			val = status.ullTotalPhys / val2;
		else
			log_err("sysconf(_SC_PHYS_PAGES) failed\n");
		break;
	default:
		log_err("sysconf(%d) is not implemented\n", name);
		break;
	}

	return val;
}

char *dl_error = NULL;

int dlclose(void *handle)
{
	return !FreeLibrary((HMODULE)handle);
}

void *dlopen(const char *file, int mode)
{
	HMODULE hMod;

	hMod = LoadLibrary(file);
	if (hMod == INVALID_HANDLE_VALUE)
		dl_error = (char*)"LoadLibrary failed";
	else
		dl_error = NULL;

	return hMod;
}

void *dlsym(void *handle, const char *name)
{
	FARPROC fnPtr;

	fnPtr = GetProcAddress((HMODULE)handle, name);
	if (fnPtr == NULL)
		dl_error = (char*)"GetProcAddress failed";
	else
		dl_error = NULL;

	return fnPtr;
}

char *dlerror(void)
{
	return dl_error;
}

int gettimeofday(struct timeval *restrict tp, void *restrict tzp)
{
	FILETIME fileTime;
	uint64_t unix_time, windows_time;
	const uint64_t MILLISECONDS_BETWEEN_1601_AND_1970 = 11644473600000;

	/* Ignore the timezone parameter */
	(void)tzp;

	/*
	 * Windows time is stored as the number 100 ns intervals since January 1 1601.
	 * Conversion details from http://www.informit.com/articles/article.aspx?p=102236&seqNum=3
	 * Its precision is 100 ns but accuracy is only one clock tick, or normally around 15 ms.
	 */
	GetSystemTimeAsFileTime(&fileTime);
	windows_time = ((uint64_t)fileTime.dwHighDateTime << 32) + fileTime.dwLowDateTime;
	/* Divide by 10,000 to convert to ms and subtract the time between 1601 and 1970 */
	unix_time = (((windows_time)/10000) - MILLISECONDS_BETWEEN_1601_AND_1970);
	/* unix_time is now the number of milliseconds since 1970 (the Unix epoch) */
	tp->tv_sec = unix_time / 1000;
	tp->tv_usec = (unix_time % 1000) * 1000;
	return 0;
}

int sigaction(int sig, const struct sigaction *act,
		struct sigaction *oact)
{
	int rc = 0;
	void (*prev_handler)(int);

	prev_handler = signal(sig, act->sa_handler);
	if (oact != NULL)
		oact->sa_handler = prev_handler;

	if (prev_handler == SIG_ERR)
		rc = -1;

	return rc;
}

int lstat(const char * path, struct stat * buf)
{
	return stat(path, buf);
}

void *mmap(void *addr, size_t len, int prot, int flags,
		int fildes, off_t off)
{
	DWORD vaProt = 0;
	void* allocAddr = NULL;

	if (prot & PROT_NONE)
		vaProt |= PAGE_NOACCESS;

	if ((prot & PROT_READ) && !(prot & PROT_WRITE))
		vaProt |= PAGE_READONLY;

	if (prot & PROT_WRITE)
		vaProt |= PAGE_READWRITE;

	if ((flags & MAP_ANON) | (flags & MAP_ANONYMOUS))
	{
		allocAddr = VirtualAlloc(addr, len, MEM_COMMIT, vaProt);
		if (allocAddr == NULL)
			errno = win_to_posix_error(GetLastError());
	}

	return allocAddr;
}

int munmap(void *addr, size_t len)
{
	if (!VirtualFree(addr, 0, MEM_RELEASE)) {
		errno = win_to_posix_error(GetLastError());
		return -1;
	}

	return 0;
}

int fork(void)
{
	log_err("%s is not implemented\n", __func__);
	errno = ENOSYS;
	return -1;
}

pid_t setsid(void)
{
	log_err("%s is not implemented\n", __func__);
	errno = ENOSYS;
	return -1;
}

static HANDLE log_file = INVALID_HANDLE_VALUE;

void openlog(const char *ident, int logopt, int facility)
{
	if (log_file == INVALID_HANDLE_VALUE)
		log_file = CreateFileA("syslog.txt", GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, 0, NULL);
}

void closelog(void)
{
	CloseHandle(log_file);
	log_file = INVALID_HANDLE_VALUE;
}

void syslog(int priority, const char *message, ... /* argument */)
{
	va_list v;
	int len;
	char *output;
	DWORD bytes_written;

	if (log_file == INVALID_HANDLE_VALUE) {
		log_file = CreateFileA("syslog.txt", GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, 0, NULL);
	}

	if (log_file == INVALID_HANDLE_VALUE) {
		log_err("syslog: failed to open log file\n");
		return;
	}

	va_start(v, message);
	len = _vscprintf(message, v);
	output = malloc(len + sizeof(char));
	vsprintf(output, message, v);
	WriteFile(log_file, output, len, &bytes_written, NULL);
	va_end(v);
	free(output);
}

int kill(pid_t pid, int sig)
{
	errno = ESRCH;
	return -1;
}

/*
 * This is assumed to be used only by the network code,
 * and so doesn't try and handle any of the other cases
 */
int fcntl(int fildes, int cmd, ...)
{
	/*
	 * non-blocking mode doesn't work the same as in BSD sockets,
	 * so ignore it.
	 */
#if 0
	va_list ap;
	int val, opt, status;

	if (cmd == F_GETFL)
		return 0;
	else if (cmd != F_SETFL) {
		errno = EINVAL;
		return -1;
	}

	va_start(ap, 1);

	opt = va_arg(ap, int);
	if (opt & O_NONBLOCK)
		val = 1;
	else
		val = 0;

	status = ioctlsocket((SOCKET)fildes, opt, &val);

	if (status == SOCKET_ERROR) {
		errno = EINVAL;
		val = -1;
	}

	va_end(ap);

	return val;
#endif
return 0;
}

/*
 * Get the value of a local clock source.
 * This implementation supports 2 clocks: CLOCK_MONOTONIC provides high-accuracy
 * relative time, while CLOCK_REALTIME provides a low-accuracy wall time.
 */
int clock_gettime(clockid_t clock_id, struct timespec *tp)
{
	int rc = 0;

	if (clock_id == CLOCK_MONOTONIC)
	{
		static LARGE_INTEGER freq = {{0,0}};
		LARGE_INTEGER counts;
		uint64_t t;

		QueryPerformanceCounter(&counts);
		if (freq.QuadPart == 0)
			QueryPerformanceFrequency(&freq);

		tp->tv_sec = counts.QuadPart / freq.QuadPart;
		/* Get the difference between the number of ns stored
		 * in 'tv_sec' and that stored in 'counts' */
		t = tp->tv_sec * freq.QuadPart;
		t = counts.QuadPart - t;
		/* 't' now contains the number of cycles since the last second.
		 * We want the number of nanoseconds, so multiply out by 1,000,000,000
		 * and then divide by the frequency. */
		t *= 1000000000;
		tp->tv_nsec = t / freq.QuadPart;
	}
	else if (clock_id == CLOCK_REALTIME)
	{
		/* clock_gettime(CLOCK_REALTIME,...) is just an alias for gettimeofday with a
		 * higher-precision field. */
		struct timeval tv;
		gettimeofday(&tv, NULL);
		tp->tv_sec = tv.tv_sec;
		tp->tv_nsec = tv.tv_usec * 1000;
	} else {
		errno = EINVAL;
		rc = -1;
	}

	return rc;
}

int mlock(const void * addr, size_t len)
{
	SIZE_T min, max;
	BOOL success;
	HANDLE process = GetCurrentProcess();

	success = GetProcessWorkingSetSize(process, &min, &max);
	if (!success) {
		errno = win_to_posix_error(GetLastError());
		return -1;
	}

	min += len;
	max += len;
	success = SetProcessWorkingSetSize(process, min, max);
	if (!success) {
		errno = win_to_posix_error(GetLastError());
		return -1;
	}

	success = VirtualLock((LPVOID)addr, len);
	if (!success) {
		errno = win_to_posix_error(GetLastError());
		return -1;
	}

	return 0;
}

int munlock(const void * addr, size_t len)
{
	BOOL success = VirtualUnlock((LPVOID)addr, len);
	if (!success) {
		errno = win_to_posix_error(GetLastError());
		return -1;
	}

	return 0;
}

pid_t waitpid(pid_t pid, int *stat_loc, int options)
{
	log_err("%s is not implemented\n", __func__);
	errno = ENOSYS;
	return -1;
}

int usleep(useconds_t useconds)
{
	Sleep(useconds / 1000);
	return 0;
}

char *basename(char *path)
{
	static char name[MAX_PATH];
	int i;

	if (path == NULL || strlen(path) == 0)
		return (char*)".";

	i = strlen(path) - 1;

	while (path[i] != '\\' && path[i] != '/' && i >= 0)
		i--;

	strncpy(name, path + i + 1, MAX_PATH);

	return name;
}

int fsync(int fildes)
{
	HANDLE hFile = (HANDLE)_get_osfhandle(fildes);
	if (!FlushFileBuffers(hFile)) {
		errno = win_to_posix_error(GetLastError());
		return -1;
	}

	return 0;
}

int nFileMappings = 0;
HANDLE fileMappings[1024];

int shmget(key_t key, size_t size, int shmflg)
{
	int mapid = -1;
	uint32_t size_low = size & 0xFFFFFFFF;
	uint32_t size_high = ((uint64_t)size) >> 32;
	HANDLE hMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, (PAGE_EXECUTE_READWRITE | SEC_RESERVE), size_high, size_low, NULL);
	if (hMapping != NULL) {
		fileMappings[nFileMappings] = hMapping;
		mapid = nFileMappings;
		nFileMappings++;
	} else {
		errno = ENOSYS;
	}

	return mapid;
}

void *shmat(int shmid, const void *shmaddr, int shmflg)
{
	void* mapAddr;
	MEMORY_BASIC_INFORMATION memInfo;
	mapAddr = MapViewOfFile(fileMappings[shmid], FILE_MAP_ALL_ACCESS, 0, 0, 0);
	if (mapAddr == NULL) {
		errno = win_to_posix_error(GetLastError());
		return (void*)-1;
	}

	if (VirtualQuery(mapAddr, &memInfo, sizeof(memInfo)) == 0) {
		errno = win_to_posix_error(GetLastError());
		return (void*)-1;
	}

	mapAddr = VirtualAlloc(mapAddr, memInfo.RegionSize, MEM_COMMIT, PAGE_READWRITE);
	if (mapAddr == NULL) {
		errno = win_to_posix_error(GetLastError());
		return (void*)-1;
	}

	return mapAddr;
}

int shmdt(const void *shmaddr)
{
	if (!UnmapViewOfFile(shmaddr)) {
		errno = win_to_posix_error(GetLastError());
		return -1;
	}

	return 0;
}

int shmctl(int shmid, int cmd, struct shmid_ds *buf)
{
	if (cmd == IPC_RMID) {
		fileMappings[shmid] = INVALID_HANDLE_VALUE;
		return 0;
	} else {
		log_err("%s is not implemented\n", __func__);
	}
	errno = ENOSYS;
	return -1;
}

int setuid(uid_t uid)
{
	log_err("%s is not implemented\n", __func__);
	errno = ENOSYS;
	return -1;
}

int setgid(gid_t gid)
{
	log_err("%s is not implemented\n", __func__);
	errno = ENOSYS;
	return -1;
}

int nice(int incr)
{
	if (incr != 0) {
		errno = EINVAL;
		return -1;
	}

	return 0;
}

int getrusage(int who, struct rusage *r_usage)
{
	const uint64_t SECONDS_BETWEEN_1601_AND_1970 = 11644473600;
	FILETIME cTime, eTime, kTime, uTime;
	time_t time;
	HANDLE h;

	memset(r_usage, 0, sizeof(*r_usage));

	if (who == RUSAGE_SELF) {
		h = GetCurrentProcess();
		GetProcessTimes(h, &cTime, &eTime, &kTime, &uTime);
	} else if (who == RUSAGE_THREAD) {
		h = GetCurrentThread();
		GetThreadTimes(h, &cTime, &eTime, &kTime, &uTime);
	} else {
		log_err("fio: getrusage %d is not implemented\n", who);
		return -1;
	}

	time = ((uint64_t)uTime.dwHighDateTime << 32) + uTime.dwLowDateTime;
	/* Divide by 10,000,000 to get the number of seconds and move the epoch from
	 * 1601 to 1970 */
	time = (time_t)(((time)/10000000) - SECONDS_BETWEEN_1601_AND_1970);
	r_usage->ru_utime.tv_sec = time;
	/* getrusage() doesn't care about anything other than seconds, so set tv_usec to 0 */
	r_usage->ru_utime.tv_usec = 0;
	time = ((uint64_t)kTime.dwHighDateTime << 32) + kTime.dwLowDateTime;
	/* Divide by 10,000,000 to get the number of seconds and move the epoch from
	 * 1601 to 1970 */
	time = (time_t)(((time)/10000000) - SECONDS_BETWEEN_1601_AND_1970);
	r_usage->ru_stime.tv_sec = time;
	r_usage->ru_stime.tv_usec = 0;
	return 0;
}

int posix_madvise(void *addr, size_t len, int advice)
{
	log_err("%s is not implemented\n", __func__);
	return ENOSYS;
}

/* Windows doesn't support advice for memory pages. Just ignore it. */
int msync(void *addr, size_t len, int flags)
{
	errno = ENOSYS;
	return -1;
}

int fdatasync(int fildes)
{
	return fsync(fildes);
}

ssize_t pwrite(int fildes, const void *buf, size_t nbyte,
		off_t offset)
{
	int64_t pos = _telli64(fildes);
	ssize_t len = _write(fildes, buf, nbyte);
	_lseeki64(fildes, pos, SEEK_SET);
	return len;
}

ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset)
{
	int64_t pos = _telli64(fildes);
	ssize_t len = read(fildes, buf, nbyte);
	_lseeki64(fildes, pos, SEEK_SET);
	return len;
}

ssize_t readv(int fildes, const struct iovec *iov, int iovcnt)
{
	log_err("%s is not implemented\n", __func__);
	errno = ENOSYS;
	return -1;
}

ssize_t writev(int fildes, const struct iovec *iov, int iovcnt)
{
	int i;
	DWORD bytes_written = 0;
	for (i = 0; i < iovcnt; i++)
	{
		int len = send((SOCKET)fildes, iov[i].iov_base, iov[i].iov_len, 0);
		if (len == SOCKET_ERROR)
		{
			DWORD err = GetLastError();
			errno = win_to_posix_error(err);
			bytes_written = -1;
			break;
		}
		bytes_written += len;
	}

	return bytes_written;
}

long long strtoll(const char *restrict str, char **restrict endptr,
		int base)
{
	return _strtoi64(str, endptr, base);
}

int poll(struct pollfd fds[], nfds_t nfds, int timeout)
{
	struct timeval tv;
	struct timeval *to = NULL;
	fd_set readfds, writefds, exceptfds;
	int i;
	int rc;

	if (timeout != -1) {
		to = &tv;
		to->tv_sec = timeout / 1000;
		to->tv_usec = (timeout % 1000) * 1000;
	}

	FD_ZERO(&readfds);
	FD_ZERO(&writefds);
	FD_ZERO(&exceptfds);

	for (i = 0; i < nfds; i++)
	{
		if (fds[i].fd < 0) {
			fds[i].revents = 0;
			continue;
		}

		if (fds[i].events & POLLIN)
			FD_SET(fds[i].fd, &readfds);

		if (fds[i].events & POLLOUT)
			FD_SET(fds[i].fd, &writefds);

		FD_SET(fds[i].fd, &exceptfds);
	}
	rc = select(nfds, &readfds, &writefds, &exceptfds, to);

	if (rc != SOCKET_ERROR) {
		for (i = 0; i < nfds; i++)
		{
			if (fds[i].fd < 0) {
				continue;
			}

			if ((fds[i].events & POLLIN) && FD_ISSET(fds[i].fd, &readfds))
				fds[i].revents |= POLLIN;

			if ((fds[i].events & POLLOUT) && FD_ISSET(fds[i].fd, &writefds))
				fds[i].revents |= POLLOUT;

			if (FD_ISSET(fds[i].fd, &exceptfds))
				fds[i].revents |= POLLHUP;
		}
	}
	return rc;
}

int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
{
	struct timeval tv;
	DWORD ms_remaining;
	DWORD ms_total = (rqtp->tv_sec * 1000) + (rqtp->tv_nsec / 1000000.0);

	if (ms_total == 0)
		ms_total = 1;

	ms_remaining = ms_total;

	/* Since Sleep() can sleep for less than the requested time, add a loop to
	   ensure we only return after the requested length of time has elapsed */
	do {
		fio_gettime(&tv, NULL);
		Sleep(ms_remaining);
		ms_remaining = ms_total - mtime_since_now(&tv);
	} while (ms_remaining > 0 && ms_remaining < ms_total);

	/* this implementation will never sleep for less than the requested time */
	if (rmtp != NULL) {
		rmtp->tv_sec = 0;
		rmtp->tv_nsec = 0;
	}

	return 0;
}

DIR *opendir(const char *dirname)
{
	struct dirent_ctx *dc = NULL;

	/* See if we can open it. If not, we'll return an error here */
	HANDLE file = CreateFileA(dirname, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
	if (file != INVALID_HANDLE_VALUE) {
		CloseHandle(file);
		dc = (struct dirent_ctx*)malloc(sizeof(struct dirent_ctx));
		StringCchCopyA(dc->dirname, MAX_PATH, dirname);
		dc->find_handle = INVALID_HANDLE_VALUE;
	} else {
		DWORD error = GetLastError();
		if (error == ERROR_FILE_NOT_FOUND)
			errno = ENOENT;

		else if (error == ERROR_PATH_NOT_FOUND)
			errno = ENOTDIR;
		else if (error == ERROR_TOO_MANY_OPEN_FILES)
			errno = ENFILE;
		else if (error == ERROR_ACCESS_DENIED)
			errno = EACCES;
		else
			errno = error;
	}

	return dc;
}

int closedir(DIR *dirp)
{
	if (dirp != NULL && dirp->find_handle != INVALID_HANDLE_VALUE)
		FindClose(dirp->find_handle);

	free(dirp);
	return 0;
}

struct dirent *readdir(DIR *dirp)
{
	static struct dirent de;
	WIN32_FIND_DATA find_data;

	if (dirp == NULL)
		return NULL;

	if (dirp->find_handle == INVALID_HANDLE_VALUE) {
		char search_pattern[MAX_PATH];
		StringCchPrintfA(search_pattern, MAX_PATH, "%s\\*", dirp->dirname);
		dirp->find_handle = FindFirstFileA(search_pattern, &find_data);
		if (dirp->find_handle == INVALID_HANDLE_VALUE)
			return NULL;
	} else {
		if (!FindNextFile(dirp->find_handle, &find_data))
			return NULL;
	}

	StringCchCopyA(de.d_name, MAX_PATH, find_data.cFileName);
	de.d_ino = 0;

	return &de;
}

uid_t geteuid(void)
{
	log_err("%s is not implemented\n", __func__);
	errno = ENOSYS;
	return -1;
}

in_addr_t inet_network(const char *cp)
{
	in_addr_t hbo;
	in_addr_t nbo = inet_addr(cp);
	hbo = ((nbo & 0xFF) << 24) + ((nbo & 0xFF00) << 8) + ((nbo & 0xFF0000) >> 8) + ((nbo & 0xFF000000) >> 24);
	return hbo;
}

const char* inet_ntop(int af, const void *restrict src,
		char *restrict dst, socklen_t size)
{
	INT status = SOCKET_ERROR;
	WSADATA wsd;
	char *ret = NULL;

	if (af != AF_INET && af != AF_INET6) {
		errno = EAFNOSUPPORT;
		return NULL;
	}

	WSAStartup(MAKEWORD(2,2), &wsd);

	if (af == AF_INET) {
		struct sockaddr_in si;
		DWORD len = size;
		memset(&si, 0, sizeof(si));
		si.sin_family = af;
		memcpy(&si.sin_addr, src, sizeof(si.sin_addr));
		status = WSAAddressToString((struct sockaddr*)&si, sizeof(si), NULL, dst, &len);
	} else if (af == AF_INET6) {
		struct sockaddr_in6 si6;
		DWORD len = size;
		memset(&si6, 0, sizeof(si6));
		si6.sin6_family = af;
		memcpy(&si6.sin6_addr, src, sizeof(si6.sin6_addr));
		status = WSAAddressToString((struct sockaddr*)&si6, sizeof(si6), NULL, dst, &len);
	}

	if (status != SOCKET_ERROR)
		ret = dst;
	else
		errno = ENOSPC;

	WSACleanup();

	return ret;
}

int inet_pton(int af, const char *restrict src, void *restrict dst)
{
	INT status = SOCKET_ERROR;
	WSADATA wsd;
	int ret = 1;

	if (af != AF_INET && af != AF_INET6) {
		errno = EAFNOSUPPORT;
		return -1;
	}

	WSAStartup(MAKEWORD(2,2), &wsd);

	if (af == AF_INET) {
		struct sockaddr_in si;
		INT len = sizeof(si);
		memset(&si, 0, sizeof(si));
		si.sin_family = af;
		status = WSAStringToAddressA((char*)src, af, NULL, (struct sockaddr*)&si, &len);
		if (status != SOCKET_ERROR)
			memcpy(dst, &si.sin_addr, sizeof(si.sin_addr));
	} else if (af == AF_INET6) {
		struct sockaddr_in6 si6;
		INT len = sizeof(si6);
		memset(&si6, 0, sizeof(si6));
		si6.sin6_family = af;
		status = WSAStringToAddressA((char*)src, af, NULL, (struct sockaddr*)&si6, &len);
		if (status != SOCKET_ERROR)
			memcpy(dst, &si6.sin6_addr, sizeof(si6.sin6_addr));
	}

	if (status == SOCKET_ERROR) {
		errno = ENOSPC;
		ret = 0;
	}

	WSACleanup();

	return ret;
}

redpajama_set_name: RedPajamaGithub


text:
// now in options
//=============================================//
//const char* centralityEstimator = "V0M";
//const char* centralityEstimator = "CL1";
//const char* centralityEstimator = "TRK";
//=============================================//
//Bool_t gRunShuffling = kFALSE;
//Bool_t gRunShuffling = kTRUE;
//=============================================//

class AliBalance;
class AliBalancePsi;
class AliBalanceEbyE;
class AliAnalysisTaskBFPsi;
class AliESDtrackCuts;

//PID config
Bool_t kUseNSigmaPID = kTRUE;
Double_t nSigmaMax = 3.0;
Bool_t kUseBayesianPID = kFALSE;
Double_t gMinAcceptedProbability = 0.7;

//__________________________________________________//
AliBalancePsi *GetBalanceFunctionObject(const char* analysisLevel = "MCAOD",   //
					const char* centralityName = 0x0,
					Double_t centrMin = 0.,
					Double_t centrMax = 100.,
					Bool_t bShuffle = kFALSE,
					Bool_t bResonancesCut = kFALSE,
					Bool_t bHBTCut = kFALSE,
					Double_t HBTCutValue = 0.02,
					Bool_t bConversionCut = kFALSE,
					Double_t invMassForConversionCut = 0.04,
					Bool_t bMomentumDifferenceCut = kFALSE,
					Double_t fQCutMin = 0.0,
					TString fArgEventClass = "EventPlane",
					Double_t deltaEtaMax = 2.0,
					Bool_t bVertexBinning = kFALSE,
					Bool_t bMomentumOrdering = kTRUE,
					//Bool_t bCutSameLabelMC = kFALSE,
                    			Bool_t bPhiResonanceCut = kFALSE,
                    			Bool_t bResonancesLabelCut = kFALSE,
                    			Double_t nSigmaPhiRejMin = 3.0,
                    			Double_t nSigmaPhiRejMax = 7.0) {
  //Function to setup the AliBalance object and return it
  AliBalancePsi *gBalance = new AliBalancePsi();
  gBalance->SetAnalysisLevel(analysisLevel);
  gBalance->SetShuffle(bShuffle);
  gBalance->UseMomentumOrdering(bMomentumOrdering);
  if(bResonancesCut) gBalance->UseResonancesCut();
  if(bPhiResonanceCut) gBalance->UsePhiResonanceCut(nSigmaPhiRejMin,nSigmaPhiRejMax);
  if(bHBTCut) gBalance->UseHBTCut(HBTCutValue);
  if(bConversionCut) gBalance->UseConversionCut(invMassForConversionCut);
  if(bMomentumDifferenceCut) gBalance->UseMomentumDifferenceCut(fQCutMin);
  if(centralityName) gBalance->SetCentralityIdentifier(centralityName);
  if(bVertexBinning) gBalance->SetVertexZBinning();
  gBalance->SetCentralityInterval(centrMin,centrMax);
  gBalance->SetEventClass(fArgEventClass);
  gBalance->SetDeltaEtaMax(deltaEtaMax);
  //if (bCutSameLabelMC) gBalance->UseSameLabelMCCut();
  if (bResonancesLabelCut) gBalance->UseResonancesLabelCut();
  //Set all analyses separately
  //Rapidity
  //gBalance->SetInterval(AliBalance::kRapidity,-0.8,0.8,32,-1.6,1.6,15.);
  //Eta
  //gBalance->SetInterval(AliBalance::kEta,-0.8,0.8,32,-1.6,1.6,15);
  //Qlong
  //gBalance->SetInterval(AliBalance::kQlong,-1,1,200,0.0,4.0,15);
  //Qout
  //gBalance->SetInterval(AliBalance::kQout,-1,1,200,0.0,4.0,15);
  //Qside
  //gBalance->SetInterval(AliBalance::kQside,-1,1,200,0.0,4.0,15);
  //Qinv
  //gBalance->SetInterval(AliBalance::kQinv,-1,1,200,0.0,4.0,15);
  //Phi
  //gBalance->SetInterval(AliBalance::kPhi,0.,360.,90,-180.,180.0,15);

  // Init the histograms (not done here, for customization from analysis task)
  // gBalance->InitHistograms();

  return gBalance;
}

//__________________________________________________//
AliESDtrackCuts *GetTrackCutsObject(Double_t ptMin, Double_t ptMax, Double_t etaMin, Double_t etaMax, Double_t maxTPCchi2, Double_t maxDCAz, Double_t maxDCAxy, Int_t minNClustersTPC) {

  // only used for ESDs
  // Function to setup the AliESDtrackCuts object and return it
  AliESDtrackCuts *cuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
  cuts->SetRequireTPCStandAlone(kTRUE); // TPC only cuts!

  // extra TPC cuts (Syst studies)
  if(minNClustersTPC != -1)  cuts->SetMinNClustersTPC(minNClustersTPC);
  else cuts->SetMinNClustersTPC(70); // standard for filter bit 128

  if(maxTPCchi2 != -1) cuts->SetMaxChi2PerClusterTPC(maxTPCchi2);

  // extra DCA cuts (Syst studies)
  if(maxDCAz!=-1 && maxDCAxy != -1){
    cuts->SetMaxDCAToVertexZ(maxDCAz);
    cuts->SetMaxDCAToVertexXY(maxDCAxy);
  }

  cuts->SetPtRange(ptMin,ptMax);
  cuts->SetEtaRange(etaMin,etaMax);
  cuts->DefineHistograms(1);
  //cuts->SaveHistograms("trackCuts");

  return cuts;
}

//__________________________________________________//
AliBalanceEbyE *GetBalanceFunctionEbyEObject(
					     Bool_t bResonancesCut = kFALSE,
					     Bool_t bHBTCut = kFALSE,
					     Double_t HBTCutValue = 0.02,
					     Bool_t bConversionCut = kFALSE,
					     Double_t invMassForConversionCut = 0.04,
					     Bool_t bMomentumDifferenceCut = kFALSE,
					     Double_t fQCutMin = 0.0,
					     Double_t deltaEtaMax = 2.0,
					     Bool_t bMomentumOrdering = kTRUE
					     ) {

  //Function to setup the AliBalance object and return it
  AliBalanceEbyE *gBalance = new AliBalanceEbyE();
  //gBalance->UseMomentumOrdering(bMomentumOrdering);
  if(bResonancesCut) gBalance->UseResonancesCut();
  if(bHBTCut) gBalance->UseHBTCut(HBTCutValue);
  if(bConversionCut) gBalance->UseConversionCut(invMassForConversionCut);
  if(bMomentumDifferenceCut) gBalance->UseMomentumDifferenceCut(fQCutMin);
  gBalance->SetDeltaEtaMax(deltaEtaMax);

  return gBalance;
}

//_________________________________________________________//
AliAnalysisTaskBFPsi *AddTaskBalancePsiCentralityTrain(Double_t centrMin=0.,
						       Double_t centrMax=100.,
						       Bool_t gRunShuffling=kFALSE,
						       Bool_t gRunMixing=kTRUE,
						       Bool_t gRunMixingWithEventPlane=kFALSE,
						       TString centralityEstimator="V0M",
						       Double_t vertexZ=10.,
						       Double_t DCAxy=-1,
						       Double_t DCAz=-1,
						       Double_t ptMin=0.3,
						       Double_t ptMax=1.5,
						       Double_t etaMin=-0.8,
						       Double_t etaMax=0.8,
						       Double_t maxTPCchi2 = -1,
						       Int_t minNClustersTPC = -1,
						       Bool_t kUsePID = kTRUE,
						       Bool_t bResonancesCut = kTRUE,
						       Bool_t bHBTcut = kTRUE,
						       Double_t HBTCutValue = 0.02,
						       Bool_t bConversionCut = kTRUE,
						       Double_t invMassForConversionCut = 0.04,
						       Bool_t bMomentumDifferenceCut = kTRUE,
						       Double_t fQCutMin = 0.0,
						       Int_t AODfilterBit = 128,
						       AliAnalysisTaskBFPsi::etriggerSel triggerSel = AliAnalysisTaskBFPsi::kINT7,
						       TString fileNameBase="AnalysisResults",
						       TString dirNameExtra="",
						       TString fArgEventClass="Centrality",
						       TString analysisTypeUser="AOD",
						       Bool_t bVertexBinning=kTRUE,
						       Double_t sigmaElectronRejection=3,
						       Bool_t electronExclusiveRejection=kFALSE,
						       //TString correctionFileName = "",
						       //Int_t nCentralityArrayBinsForCorrection = -1,
						       //Double_t *gCentralityArrayForCorrections = 0x0,
						       Bool_t gRunEbyE = kFALSE,
						       Bool_t bMomentumOrdering = kTRUE,
						       AliAnalysisTaskBFPsi::eCorrProcedure corrProc = AliAnalysisTaskBFPsi::kNoCorr,
						       //Bool_t bUseSameLabelMCCut = kFALSE,
						       Bool_t bUsePhiResonanceCut = kFALSE,
						       Bool_t bResonancesLabelCut = kFALSE,
						       Double_t nSigmaPhiRejMin = 3.0,
						       Double_t nSigmaPhiRejMax = 7.0) {
  // Creates a balance function analysis task and adds it to the analysis manager.
  // Get the pointer to the existing analysis manager via the static access method.
  //TString outputFileName(fileNameBase);
  //outputFileName.Append(".root");

  TGrid::Connect("alien:");

  //===========================================================================
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskBF", "No analysis manager to connect to.");
    return NULL;
  }

  // Check the analysis type using the event handlers connected to the analysis manager.
  //===========================================================================
  if (!mgr->GetInputEventHandler()) {
    ::Error("AddTaskBF", "This task requires an input event handler");
    return NULL;
  }
  TString analysisType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
  if(dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler())) analysisType = "MC";

  // to set the analysis type manually
  if(analysisTypeUser != ""){
    analysisType = analysisTypeUser;
    ::Info("AddTaskBF",Form("Analysis Type manually set to %s",analysisType.Data()));
  }

  // for local changed BF configuration
  //gROOT->LoadMacro("./configBalanceFunctionPsiAnalysis.C");
  //gROOT->LoadMacro("$ALICE_PHYSICS/PWGCF/EBYE/macros/configBalanceFunctionPsiAnalysis.C");
  AliBalancePsi *bf  = 0;  // Balance Function object
  AliBalancePsi *bfs = 0;  // shuffled Balance function object
  AliBalancePsi *bfm = 0;  // mixing Balance function object
  AliBalanceEbyE *bfebye = 0;  // EbyE Balance function object

  //maximum Delta eta range
  Double_t deltaEtaMax=TMath::Abs(etaMax-etaMin);

  if (analysisType=="ESD"){
    bf  = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
    if(gRunShuffling) bfs = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax,kTRUE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
    if(gRunMixing)    bfm = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
  }
  else if (analysisType=="AOD"){
    bf  = GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
    if(gRunShuffling) bfs = GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax,kTRUE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
    if(gRunMixing)    bfm =  GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
    if(gRunEbyE)      bfebye = GetBalanceFunctionEbyEObject(bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,deltaEtaMax,bMomentumOrdering);
  }
  else if (analysisType=="MC"){
    bf  = GetBalanceFunctionObject("MC",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
    if(gRunShuffling) bfs = GetBalanceFunctionObject("MC",centralityEstimator,centrMin,centrMax,kTRUE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
    if(gRunMixing)    bfm = GetBalanceFunctionObject("MC",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
  }
  else if (analysisType=="MCAOD"){
    bf  = GetBalanceFunctionObject("MCAOD",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
    if(gRunShuffling) bfs = GetBalanceFunctionObject("MCAOD",centralityEstimator,centrMin,centrMax,kTRUE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
    if(gRunMixing)    bfm = GetBalanceFunctionObject("MCAOD",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
  }
  else if (analysisType=="MCAODrec"){
    bf  = GetBalanceFunctionObject("MCAODrec",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
    if(gRunShuffling) bfs = GetBalanceFunctionObject("MCAODrec",centralityEstimator,centrMin,centrMax,kTRUE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
    if(gRunMixing)    bfm = GetBalanceFunctionObject("MCAODrec",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering,bUsePhiResonanceCut,bResonancesLabelCut,nSigmaPhiRejMin,nSigmaPhiRejMax);
  }
  else if (analysisType=="AODnano"){
    bf  = GetBalanceFunctionObject("AODnano",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
    if(gRunShuffling) bfs = GetBalanceFunctionObject("AODnano",centralityEstimator,centrMin,centrMax,kTRUE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
    if(gRunMixing)    bfm = GetBalanceFunctionObject("AODnano",centralityEstimator,centrMin,centrMax,kFALSE,bResonancesCut,bHBTcut,HBTCutValue,bConversionCut,invMassForConversionCut,bMomentumDifferenceCut,fQCutMin,fArgEventClass,deltaEtaMax,bVertexBinning,bMomentumOrdering);
  }
  else{
    ::Error("AddTaskBF", "analysis type NOT known.");
    return NULL;
  }

  // Create the task, add it to manager and configure it.
  //===========================================================================
  AliAnalysisTaskBFPsi *taskBF = new AliAnalysisTaskBFPsi(Form("TaskBFPsi_%.0f-%.0f_Bit%d_%s%s",centrMin,centrMax,AODfilterBit,centralityEstimator.Data(),dirNameExtra.Data()));

  //Event characteristics scheme
  taskBF->SetEventClass(fArgEventClass);
  //taskBF->SetCustomBinning("centralityVertex:0,80");
  //taskBF->SetCustomBinning("multiplicity:0,260");

  if(fArgEventClass == "Multiplicity") {
    if(analysisType == "MC")
      taskBF->SetMultiplicityRange(centrMin,centrMax);
    else {
    taskBF->SetPercentileRange(centrMin,centrMax);
    taskBF->SetMultiplicityEstimator(centralityEstimator);
    cout<<"Multiplicity estimator "<<centralityEstimator.Data()<<endl;
    }
  }
  else if(fArgEventClass == "Centrality") {
    if(analysisType == "MC")
      taskBF->SetImpactParameterRange(centrMin,centrMax);
    else {
      taskBF->SetPercentileRange(centrMin,centrMax);
      //taskBF->SetCentralityPercentileRange(centrMin,centrMax);
      // centrality estimator (default = V0M)
      taskBF->SetCentralityEstimator(centralityEstimator);
      cout<<"Centrality estimator "<<centralityEstimator.Data()<<endl;
    }
  }

  //+++++++++++++++++++++

  taskBF->SetAnalysisObject(bf);
  if(gRunShuffling) taskBF->SetShufflingObject(bfs);
  if(gRunMixing){
    taskBF->SetMixingObject(bfm);
    taskBF->SetMixingTracks(50000);
    if(gRunMixingWithEventPlane){
      taskBF->SetMixingWithEventPlane(gRunMixingWithEventPlane);
    }
  }
  if(gRunEbyE) taskBF->SetEbyEObject(bfebye);

  if(analysisType == "ESD") {
    AliESDtrackCuts *trackCuts = GetTrackCutsObject(ptMin,ptMax,etaMin,etaMax,maxTPCchi2,DCAxy,DCAz,minNClustersTPC);
    taskBF->SetAnalysisCutObject(trackCuts);
    if(kUsePID) {
      if(kUseBayesianPID)
	taskBF->SetUseBayesianPID(gMinAcceptedProbability);
      else if(kUseNSigmaPID)
	//	taskBF->SetUseNSigmaPID(nSigmaMax);
	// taskBF->SetParticleOfInterest(AliPID::kPion); //commented out for the moment
      taskBF->SetDetectorUsedForPID(AliAnalysisTaskBFPsi::kTOFpid);
    }
  }
  else if(analysisType == "AOD" || analysisType == "AODnano") {
    // pt and eta cut (pt_min, pt_max, eta_min, eta_max)
    taskBF->SetAODtrackCutBit(AODfilterBit);
    taskBF->SetKinematicsCutsAOD(ptMin,ptMax,etaMin,etaMax);

    // set extra DCA cuts (-1 no extra cut)
    taskBF->SetExtraDCACutsAOD(DCAxy,DCAz);

    // set extra TPC chi2 / nr of clusters cut
    taskBF->SetExtraTPCCutsAOD(maxTPCchi2, minNClustersTPC);

    // electron rejection (so far only for AOD), <0 --> no rejection
    if(sigmaElectronRejection > 0){
      if(electronExclusiveRejection) taskBF->SetElectronOnlyRejection(sigmaElectronRejection); // no other particle in nsigma
      else                           taskBF->SetElectronRejection(sigmaElectronRejection); // check only if electrons in nsigma
    }

    //++++++++++++++++//
    /* if(kUsePID) {
      if(kUseBayesianPID)
	taskBF->SetUseBayesianPID(gMinAcceptedProbability);
      else if(kUseNSigmaPID)
	taskBF->SetUseNSigmaPID(nSigmaMax);
      taskBF->SetParticleOfInterest(AliAnalysisTaskBFPsi::kKaon);
      taskBF->SetDetectorUsedForPID(AliAnalysisTaskBFPsi::kTPCTOF); //TOFpid,TPCpid
      }*/
    //++++++++++++++++//

  }
  else if(analysisType == "MC") {
    taskBF->SetKinematicsCutsAOD(ptMin,ptMax,etaMin,etaMax);
  }
  else if(analysisType == "MCAOD") {
    // pt and eta cut (pt_min, pt_max, eta_min, eta_max)
    taskBF->SetAODtrackCutBit(AODfilterBit);
    taskBF->SetKinematicsCutsAOD(ptMin,ptMax,etaMin,etaMax);
  }
  else if(analysisType == "MCAODrec") {     //++++++++++++++++
    // pt and eta cut (pt_min, pt_max, eta_min, eta_max)
    taskBF->SetAODtrackCutBit(AODfilterBit);
    taskBF->SetKinematicsCutsAOD(ptMin,ptMax,etaMin,etaMax);

    // set extra DCA cuts (-1 no extra cut)
    taskBF->SetExtraDCACutsAOD(DCAxy,DCAz);

    // set extra TPC chi2 / nr of clusters cut
    taskBF->SetExtraTPCCutsAOD(maxTPCchi2, minNClustersTPC);

    // electron rejection (so far only for AOD), <0 --> no rejection
    if(sigmaElectronRejection > 0){
      if(electronExclusiveRejection) taskBF->SetElectronOnlyRejection(sigmaElectronRejection); // no other particle in nsigma
      else                           taskBF->SetElectronRejection(sigmaElectronRejection); // check only if electrons in nsigma
    }
  }//++++++++++++++++

  // offline trigger selection (AliVEvent.h)
  // taskBF->UseOfflineTrigger(); // NOT used (selection is done with the AliAnalysisTaskSE::SelectCollisionCandidates())
  // with this only selected events are analyzed (first 2 bins in event QA histogram are the same))
  // documentation in https://twiki.cern.ch/twiki/bin/viewauth/ALICE/PWG1EvSelDocumentation

  if(triggerSel == AliAnalysisTaskBFPsi::kCentral15) taskBF->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral);
  else if (triggerSel == AliAnalysisTaskBFPsi::kCentral18) taskBF->SelectCollisionCandidates(AliVEvent::kINT7 | AliVEvent::kCentral | AliVEvent::kSemiCentral);
  else if(triggerSel == AliAnalysisTaskBFPsi::kMB) taskBF->SelectCollisionCandidates(AliVEvent::kMB);
  else if(triggerSel == AliAnalysisTaskBFPsi::kINT7) taskBF->SelectCollisionCandidates(AliVEvent::kINT7);

  // centrality estimator (default = V0M)
  taskBF->SetCentralityEstimator(centralityEstimator);

  // vertex cut (x,y,z)
  //taskBF->SetVertexDiamond(3.,3.,vertexZ);

  taskBF->SetCorrectionProcedure(corrProc);

  //++++++++++++++++++++++
  // Efficiency + Contamination corrections
  // If correctionFileName = "", do not use corrections
  // if(corrProc == AliAnalysisTaskBFPsi::kMCCorr)
  // taskBF->SetInputCorrection(Form("$ALICE_PHYSICS/PWGCF/EBYE/BalanceFunctions/Corrections/%s",correctionFileName.Data()),nCentralityArrayBinsForCorrection,gCentralityArrayForCorrections);

  /*else if (corrProc == AliAnalysisTaskBFPsi::kDataDrivCorr){

    TFile* fNUAFile = TFile::Open(nuaCorrFileName.Data(),"READ");
    TFile* fNUEFile = TFile::Open(nueCorrFileName.Data(),"READ");

    if(!fNUAFile) {
      printf(" *** ERROR: NUA file not found! **EXIT** ");
    }
    TList* fListNUA = dynamic_cast<TList*>(fNUAFile->Get("fListNUA"));
    if(fListNUA)
      taskBF->SetInputListForNUACorr(fListNUA);
    else
      printf(" *** ERROR: NUA List not found! **EXIT**");

    if(!fNUEFile) {
      printf(" *** ERROR: NUE file not found! **EXIT** ");
    }
    TList* fListNUE = dynamic_cast<TList*>(fNUEFile->Get("fListNUE"));
    if(fListNUE)
      taskBF->SetInputListForNUECorr(fListNUE);
    else
      printf(" *** ERROR: NUE List not found! **EXIT**");
  }
  */

  //bf->PrintAnalysisSettings();
  mgr->AddTask(taskBF);

  // Create ONLY the output containers for the data produced by the task.
  // Get and connect other common input/output containers via the manager as below
  //==============================================================================
  TString outputFileName = AliAnalysisManager::GetCommonFileName();
  outputFileName += ":PWGCFEbyE.outputBalanceFunctionPsiAnalysis";
  AliAnalysisDataContainer *coutQA = mgr->CreateContainer(Form("listQAPsi_%.0f-%.0f_Bit%d_%s%s",centrMin,centrMax,AODfilterBit,centralityEstimator.Data(),dirNameExtra.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
  AliAnalysisDataContainer *coutBF = mgr->CreateContainer(Form("listBFPsi_%.0f-%.0f_Bit%d_%s%s",centrMin,centrMax,AODfilterBit,centralityEstimator.Data(),dirNameExtra.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
  AliAnalysisDataContainer *coutBFS;
  if(gRunShuffling) coutBFS = mgr->CreateContainer(Form("listBFPsiShuffled_%.0f-%.0f_Bit%d_%s%s",centrMin,centrMax,AODfilterBit,centralityEstimator.Data(),dirNameExtra.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
  AliAnalysisDataContainer *coutBFM;
  if(gRunMixing) coutBFM = mgr->CreateContainer(Form("listBFPsiMixed_%.0f-%.0f_Bit%d_%s%s",centrMin,centrMax,AODfilterBit,centralityEstimator.Data(),dirNameExtra.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
  AliAnalysisDataContainer *coutQAPID;
  AliAnalysisDataContainer *coutQACrossCorr;
  if(kUsePID || sigmaElectronRejection > 0) {
  coutQAPID = mgr->CreateContainer(Form("listQAPIDPsi_%.0f-%.0f_Bit%d_%s%s",centrMin,centrMax,AODfilterBit,centralityEstimator.Data(),dirNameExtra.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
  coutQACrossCorr = mgr->CreateContainer(Form("listQAPIDPsiCrossCorr_%.0f-%.0f_Bit%d_%s%s",centrMin,centrMax,AODfilterBit,centralityEstimator.Data(),dirNameExtra.Data()),TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
  }

  mgr->ConnectInput(taskBF, 0, mgr->GetCommonInputContainer());
  mgr->ConnectOutput(taskBF, 1, coutQA);
  mgr->ConnectOutput(taskBF, 2, coutBF);
  if(gRunShuffling) mgr->ConnectOutput(taskBF, 3, coutBFS);
  if(gRunMixing) mgr->ConnectOutput(taskBF, 4, coutBFM);
  if(kUsePID||sigmaElectronRejection > 0) {
  mgr->ConnectOutput(taskBF, 5, coutQAPID);
  mgr->ConnectOutput(taskBF, 6, coutQACrossCorr);
  }
  //if((kUsePID && analysisType == "AOD")||sigmaElectronRejection > 0) mgr->ConnectOutput(taskBF, 5, coutQAPID);
  //if((kUsePID && analysisType == "ESD")||sigmaElectronRejection > 0) mgr->ConnectOutput(taskBF, 5, coutQAPID);

  return taskBF;
}


I am looking for a way to double-click on file name in Windows Explorer directory (XP) that will open the R GUI and display the script (but not run it). In other works I want R to work in a similar way to opening a PDF (or pretty much every other program) from the Windows Explorer directory.
I have tried to find the appropriate .exe from Right Click -> Open With -> Choose Program route but to no avail. I have also tried moving the R icon from my Start | All Programs to the C:\Documents and Settings..\SendTo to allow me to select R from Right Click -> Send To -> R. This also failed.
has information on how to set up windows so that you can right click on a folder in windows explorer and start R (you will need to update the file to more recent versions of R, but it still works).
This will not open the .R file for you, but you can then easily do that from the folder icon in the R GUI. I like this approach better, you still right click to run R and it runs in the folder you specify, but I often have 2 or more .R files that I want to open in the same instance of R (with your description above it is not clear whether the second file you did that with would open in the same instance of R or open a new one).
Setting default "open" behavior of a `.R` file in Windows?
How to open a PDF file without any package?
How to see mathematical expressions correctly in a Help html of a function (appearing after right-click) in R GUI?


Joyce Meyer, one of the world's leading practical Bible teachers, is hosting a conference right here in Orlando on March 29 and 30. Each session is unique and will include a powerful message from Joyce and worship with Natalie Grant!
Interpretation for the deaf will be provided. This section will be reserved until 30 minutes before the start of each session. Spanish translation will also be available.
Session #1 - 7:00 p.m.
Session #2 - 9:30 a.m.
Session #3 - 1:30 p.m.
Admission is free. No registration is required. Seating is available on a first come, first served basis.


text:
Q: OPENGL GLUT compiler can't find functions Im pretty new to opengl, and im getting errors saying that it can't find the functions: glColor3f, glVertex2f, and also pRect. My includes are
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef MAC
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif

and the code in question is:
void display()
{
    // Rotate objects
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    //glMatrixMode(GL_MODELVIEW);
    //glLoadIdentity();

    glBegin(GL_QUADS);   //We want to draw a quad, i.e. shape with four sides
    glColor3F(1, 0, 0); //Set the colour to red
    glVertex2F(0, 0);            //Draw the four corners of the rectangle
    glVertex2F(0, pRect->h);
    glVertex2F(pRect->w, pRect->h);
    glVertex2F(pRect->w, 0);
    glEnd();
    glPopMatrix();

    //glFlush();
}

I think i'm including all the necessary files, and when I compile it I use the command:
g++ main.cpp -lgut -IGL -IGLU

But that doesn't seem to be the problem either. Any advice would be wonderful! Thanks a million!
EDIT:
changed
 g++ main.cpp -lgut -IGL -IGLU

to
g++ main.cpp -lgut -lGL -lGLU

the error code was:
 glColor3F : not declared in this scope
 glVertex2F : not declared in this scope
 pRect: not declared in this scope


HE President of the Democratic Socialist Republic of Sri Lanka Maithripala Sirisena met with HE Qatar's Ambassador to Sri Lanka Dr Rashid bin Shafea Al Marri.
During the meeting, HE the Ambassador conveyed the greetings of HH the Amir Sheikh Tamim bin Hamad Al-Thani to HE President Maithripala Sirisena and His Highness wishes of good health and happiness to HE the President and to the government and people of the Republic of Sri Lanka more progress and prosperity.
For his part, HE the President of the Democratic Socialist Republic of Sri Lanka entrusted HE the Ambassador to convey his greetings to HH the Amir, wishing him good health and happiness and the State of Qatar continuous progress, development and prosperity.
During the meeting, they discussed bilateral relations, ways of supporting and developing them and a number of issues of common interest.