text:
HomeSportGAAFermanagh need to target three on the trot
Fermanagh need to target three on the trot
Posted: 2:37 pm February 10, 2018
Fermanagh's Ryan McMenamin and Rory Gallagher on the sideline against Offaly
National Football League division Three
Sligo v Fermanagh
Markievicz Park, Sunday, 2pm.
Referee: John Hickey (Carlow)
Two-time All Star Barry Owens has been hugely impressed with the form of Fermanagh this season and believes the depth in the squad is showing that this current Fermanagh team really can go somewhere.
It's high praise from the 2004 and 2006 All-Star who reckons performances to date indicate promotion is a realistic objective.
Fermanagh's 2-11 to 1-6 victory over Offaly on Sunday made it two wins from two in this year's NFL Division 3 campaign. Owens says a winning run is all that matters for now.
"The performances may not be of the highest of standards but put it this way it's a results business and the players have now made it two from two. I would be more worried if the performances were not quite right at the end of the league campaign. The games against Wexford and Offaly had to be won and thankfully that's what the team have done."
Fermanagh have won five games from six, taking the McKenna Cup into account, so it has been a fine start by Rory Gallagher's men and a few things have caught the eye of Owens.
"I am sure the management team are happy with plenty of things. Conall Jones has started well and has a keen eye for goal, the players can break at great pace and they are moving the ball at speed, while the squad as a whole seems to have a great togetherness and a talented pool of players at his disposal."
Sligo will be next for Fermanagh with the Erne men make the short journey to the Yeats County.
Owens knows the neighbours well and is pretty sure Fermanagh won't have it all their own way in Markievicz Park.
"I always remembered the pitch being very tight so straight away that will suit a big physical side like Sligo. They can be tricky and the win over Wexford will have really helped them after the heavy Armagh defeat the first day.
"But in saying all of that if Fermanagh want to get promoted then we need to be going to Sligo and winning, a target of three wins from three I am sure would have been the goal and the squad are on the road for that now."
The Division 3 league seems to be slowly taking shape with Armagh, Longford and Fermanagh all leading the charge for the top two promotion spots. Owens believes that games against these counties will be the deciding factor.
"Armagh and Longford will be huge, Derry have started badly and minus the Slaughtneil players I can't see it getting much better any time soon, against Armagh it has to be a revenge mission after last season's qualifier defeat. These are the games the players will really relish and its why you become a county player in the first place."
Looking at the players that have came in and done well this season, Owens has had his eyes opened by quite a few.
"Daniel Teague has been really impressive, he is a small lad, but is extremely quick and seems to be a real worker. The Cullens have been superb this year and have made numbers three and six their own, while Cian McManus from my own club has slotted in at corner back and done really well. Kane Connor is another player that probably didn't see much game time last year, but this season has been really strong and his point on Sunday was a fine score."
Owens will appear once again for Teemore in the 2018 season under the new manager of Teemore, Anthony Drumm. He says he is looking forward to the new season.
"We are in Division 2, but thankfully we are also in the Senior Championship. We only got back out last Friday, but it's good to be out and I am sure a lot of clubs will be hoping to gain promotion this season, Division 2 is never easy and really there are a lot of clubs who have got stronger."
Drumquin Utd charged with abandonment of Rovers game
Carleton hoping to hit new heights in his final season
Enniskillen duo make McWilliams' 43-player squad
Gallagher sets new national over 60s multi-event record
Performance is key for Donnelly in league opener
McConkey is 'looking forward' to Loughgall


After last week's post concerning Felix Mendelssohn's musical depiction of the conversion of the apostle Paul, a reader sent a note to remind me of another work based on the account of the confrontation on the road to Damascus.
It will be hard for you to kick against the thorns.
Scored for 14 voices plus instruments, it is a dramatic work displaying the influence of the Italian polychoral style on Schütz (read "Schütz: Baroque before Bach" for more on this aspect of his music).
Here is a recording of the work from a live performance by the Bach-Kantorei Appenzeller Mittelland, directed by Wilfried Schnetzler.


View the lyrics of Freshy from #willpower. Get the Latest lyrics of hindi movies, albums and english songs on funvills.com.
The song is featured in fourth studio album #willpower by American recording artist and producer will.i.am. Freshman III, will.i.am and Poet have produced the album. William Adams, Jordan Houstan, Howard Eversley, Darrell Eversley and Shaun Spearman have written the song for the album. The song also features Academy Award-winning American songwriter, Rapper and record producer Juicy J.


Our fourth grader is studying Native American history this fall. We'd like to go see something relevant. Any ideas?—N.M., Media, Pa.
I wonder if our five-year-old will remember our vacations in Italy and Costa Rica when she's older. At what age is it worth taking a kid on a special trip?—E.L., Bend, Oreg.
We've been wondering the same thing, especially after hearing our own kids describing the hotel pool and forgetting to mention the Grand Canyon. For a professional opinion, we turned to Robyn Fivush, an Emory University psychologist who studies early memories. She told us most adults don't recall things that happened to them before they were five or six. So if you hope your child will one day tell her kids about the first time she saw the Colosseum, wait till she's seven or older. That said, you should still get packing: when Fivush asks families to share memories of a positive event, virtually all of them pick…vacations.
We keep hearing about people traveling to Morocco with kids. Is that a good idea?—N.N., Lexington, Va.
E-mail questions and fill us in on your finds. If we publish your tip, we'll send you T+L's book The Best of 2007.


text:
title: Cubic permutations
---
## Problem 62: Cubic permutations

This is a stub. Help our community expand it.

This quick style guide will help ensure your pull request gets accepted.

redpajama_set_name: RedPajamaGithub


text:
Home Arts + Entertainment WeekendScene An Afternoon with Brahms at the Columbus Museum of Art
An Afternoon with Brahms at the Columbus Museum of Art
by Hannah Herner
Cellist Pegsoon Whang. Photo by Pepper Nix
Guests can spend An Afternoon with Brahms in the Columbus Museum of Art's Cardinal Health Auditorium on Sunday, May 15.
The program will begin at 3 p.m. and admission is free as part of the nonprofit chamber recital series Sunday at Central.
The three works presented will be Cello Sonata No. 1, The first Rhapsody for piano and Viola Sonata in E flat major No. 2.
Members of The Canaletto Ensemble include pianist Mariko Kanedo and viola player Ken Matsuda. The pair will be joined by special guest, cellist Pegsoon Whang, to perform Brahms' works.
Whang is a member of the Utah Symphony, and a faculty member at Westminster College and the University of Utah. She has held the principal position at the Colorado Music Festival for five seasons and has a master's degree from Mannes College of Music, where she finished with the Most Outstanding Graduating Student Award.
To start off the concert, Cello Sonata No. 1 was written by a young Johannes Brahms, and draws inspiration from J.S. Bach in the first and last movements, with a waltz-like movement in the middle, contrasting from the typical slower middle movement. The first Rhapsody for piano is a serene and passionate piece dedicated to his friend and fellow composer, Elizabeth von Herzogenberg. The final piece, Viola Sonata is one of Brahms' last chamber works and is perhaps one of his finest.
Seating is available on a first come, first served basis and is recommended for ages 9 and over. To learn more, visit www.sundayatcentral.org
Hannah Herner is a contributing writer. Feedback welcome at gbishop@cityscenemediagroup.com.

redpajama_set_name: RedPajamaCommonCrawl


text:
Zachary Shore, D.Phil - Department of National Security Affairs
null Zachary Shore, D.Phil
Jason C Altwies
Modified 1 Month ago.
zshore@nps.edu
Glasgow Hall, Room 333
Expertise: 20th-Century International History, Foreign Policy Decision Making
Dr. Zachary Shore is a historian of international conflict whose research focuses on foreign policy decision making. He is an Professor of History at the Naval Postgraduate School and Senior Fellow at the Institute of European Studies, University of California, Berkeley. He earned his doctorate in modern history at Oxford, performed postdoctoral research at Harvard, and held a fellowship at Stanford's Center for Advanced Study in the Behavioral Sciences.
War in the Modern World
Knowing Your Enemy
Flashpoint: Muslim Europe
Graduate Writing Center Workshops


For a young and very rapidly growing company within the finance/insurance insurance industry, we are looking for a graphical designer with UX experience, for an ad-hoc contract.
The client is launching several development projects right now, and for this, as well as a complete company rebranding, they need graphical assistance and UX advice for their core platform.
The client is located in Oslo, but remote work will be preferred. The amount of hours required per week or month is somewhat uncertain, which is why we will set up an ad-hoc agreement. More details will be mapped out in an interview between qualified candidates and the client.
Being a professional advisor within your field.


Modular construction makes transportation, installation and relocation fast and easy. The structures are available in a host of colors and finishes.
Nor-Lake structures are constructed using factory prefabricated panels. The panels are manufactured using 100% foamed-in-place polyurethane insulation and are expanded with HFC-134a making them CFC and HCFC Free.
Standard 4" thick panels provide an "R" value of 32.
The modular assembly is made easy by utilizing the precisely formed tongue and groove panels complete with perimeter gasketing. A cam action locking mechanism speeds the installation and eliminates the need for fasteners. The modular structure can easily be moved or enlarged as your requirements change.


text:
Talks drag on in bid to resolve teacher dispute
By Kristin RushowyEducation Reporter
Sun., Nov. 11, 2012timer2 min. read
It was unclear if a planned job action by high school teachers at several Ontario boards — including Toronto and Halton — would go ahead Monday, as talks between the government and the teachers' union were under a media blackout all weekend.
There was no word late Sunday night if the union locals would call on teachers to withdraw some duties, as was planned.
On Wednesday, the Ontario Secondary School Teachers' Federation met with government officials to try to resolve the current dispute, putting an escalated job action on hold.
High schools in Halton and Toronto — with others to follow — had expected teachers to start refusing to fill in for absent colleagues or supervise students outside of class and stop talking to parents outside of school hours.
But the "selective strike action" was postponed until midnight Sunday after both sides decided to start discussing key issues.
Union president Ken Coran has said the OSSTF "has been communicating with government representatives in the interest of going forward and seeking resolutions to the challenges facing the education sector."
The teachers had planned to ramp up their job action in protest over Bill 115, which has proved controversial because it curbs bargaining rights — giving the government the right to quickly stop any strike — while also freezing wages and cutting back on sick days and benefits.
School boards had raised concerns that without teachers available for "on-calls" or supervision, that student safety could be compromised.
"For us, the big concern is around the safety of our schools, and the integrity of the classroom," and that will be a priority, Chris Spence, director of education for the Toronto District School Board, has said.
Secondary school teachers were also going to boycott staff meetings, refuse to oversee provincial standardized tests and not input report card marks.
The teachers can withdraw such services when, as with Halton and Toronto and a handful of other union locals across the province, they are in a legal strike position.
In Toronto, high school teachers have, for the most part, continued with extracurricular activities, which are voluntary.
The high school teachers' union is proposing a new benefit plan that it would control, as a way to save money that could then be used to reduce the cuts to benefits that the government has imposed.
The Ontario Public School Boards' Association has said some boards are willing to consider the idea of a teacher-controlled medical and dental plan.
"Some union locals already do handle their own benefits, so it's not without precedent," OPSBA president Michael Barrett told the Star's Louise Brown, "although the scale of this proposal is without precedent."
The province says the two-year wage freeze is not up for discussion.
In Durham, high school teachers will be in a strike position on Monday.
Peel's public high school teachers will be in a legal strike position in mid-November, and in York later this month.


text:
Two Places of Amusement
W. H. F. "Two Places of Amusement." New-York Saturday Press . 15 Feb. 1859: 2.
A story of a fictitious man named George Augustus whose apathy and boredom with life lead him away from the Academy of Music, toward a cruder establishment called the CaféChantant where finds pleasure and gets drunk.
An electronic version of this text is available in a CONTENTdm viewer. Page images of The New York Saturday Press were scanned from microfilm owned by Emory University, which was made from original copies held by the Historical Society of Pennsylvania.


 Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused). Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused). Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused). Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused). Menaam op Locallio: winkels, restaurants, diensten en meer!
Vind alles in Menaam en omgeving: winkels, restaurants, diensten, activiteiten of een plek om te overnachten.


The baby bear followed his mama. Mama bear walked through the woods. She was looking for berries to eat. She found some black berries. She started eating them. The baby started eating them, too. They ate all the berries. Baby bear was full. Mama bear was still hungry. She started walking again. She wanted to find more berries to eat. Baby bear lay down. He was full. He wanted to take a nap. But mama bear came back. She growled at baby bear. He understood mama's growl. When mama growled, he obeyed. He got up and followed his mama. Someday he would take a nap after a meal. A squirrel ran up a tree with a nut. It dropped the nut and ran back down to the ground. It picked up the nut and looked at baby bear. Then it ran back up the tree. Baby bear did not like nuts. They were too hard to open.


It's possible to sum up this bike review in three words: I want one. As someone who regularly shoots cameras that don't use batteries, riding a motorcycle that runs exclusively on one is an interesting exercise. The Zero DSR is possibly the most technology-driven bike I've ever thrown a leg over, yet in the quest for fun, this machine distills it down to the rawest elements. While you can program it with a smartphone, you very well might forget to snap that selfie or post to social media once your hands grab the handlebar and your feet meet the pegs.
According to Zero, "The Zero powertrain delivers more torque than the most powerful 1000cc sportbike in production today." This is a hefty claim coming from a relatively diminutive machine for the liter bike world. The experience twisting the throttle seems to bear out this claim however. Unleash the thing in Sport mode, and an excess of torque is completely evident. More than the raw output itself, how the power is delivered is perhaps the larger part of the experience. As the Zero lacks a clutch and gears, simply turning the throttle makes it go. On a bike with gears, you feel the peak output of each gear climb until the next one becomes necessary; with the Zero, it just keeps accelerating in a completely linear fashion. Experiencing an uninterrupted power curve from a dead stop to just cresting triple-digit speeds goes beyond even the most high-tech 10-speed automatic transmissions out there.
What goes into making a lithium-ion battery achieve the necessary performance to push one of these motorcycles around like this is well beyond the stuff of shade-tree wrenching. An impressive 116 lb-ft of torque is produced by the one moving part of the Z-Force powertrain, while achieving 90-percent conservation of energy efficiency. Control over the output can be customized with Zero's free smartphone app. A mechanic's stethoscope and shop light is replaced with a Bluetooth signal. Tapping on a small screen can affect changes to max torque, top speed, regenerative braking settings, and automatic remote firmware updates. Once the starter is thumbed and the bike clicks and whirrs to life, all of this tech fades into the background giving way to the fun mentioned earlier.
Much like dino-fueled bikes, the question of range largely depends on terrain and riding style. Take any claimed MPG number and open up that same vehicle on a beach, the MPG will likely drop by a large amount. Rolling out of the hills north of Santa Cruz, CA, our small group of journalists, photographers, and company representatives hopped the Pacific Coast Highway and followed a private landing strip to a narrow, weathered trail leading down the cliff to the empty beach below. Up to this point, we had been riding mostly highway and some twisty pavement, playing around in some off-road lots, and riding a few miles of private forest trails with a caretaker of the land.
When I looked down at the beach from the airstrip, my bike showed 52-percent battery remaining. Once down the cliff and into the sand, a whole new thrill started. Even with the street-oriented Pirelli MT60 Dual Sport Tires, the bike effortlessly drew lines in the sand. Heaps of the aforementioned torque was always willing to pull the bike more, and treading the limits of a high-side became the game. All this fun cost about 10 percent of the battery—when I reached my starting point, the gauge read 42 percent remaining. Comparable experience to watching your fuel drain while riding a 450 tapped out on a beach.
As with wheelspin, running top speed (the phrase "running in top gear" obviously doesn't apply here) will also increase the rate of battery drain, although not as much it seems. Straight line runs at 100 mph cause the battery to tick off percentage points every couple miles or so. The brevity of this press event meant a complete charge cycle didn't occur. Fifty-three miles was our tally for the day, and I had 18 percent remaining at its conclusion. Range is dramatically increased with an optional power tank, although I didn't experience this option firsthand. For the purpose of this event, and for a typical daily commute, not having the power tank might be preferable. A 44-pound weight reduction is one advantage, but gaining the very convenient locking "glove compartment" in front of the saddle is arguably the bigger reason not to splurge when the additional range isn't necessary.
It's difficult to decide on a category for this Zero. Well over 100 lb-ft of torque begs it to be put in the same class as vastly taller and longer big-twin dual sports. Oddly enough, anyone with experience on KTM 950/990 bikes will relate to the turning radius of the DSR. With a wheelbase of just over 56 inches, the DSR has a surprisingly wide turning radius that felt very similar to the older KTMs that sport nearly six inches more distance between the contact patches. Fortunately, this becomes irrelevant to a degree as the Zero's excessive torque allows the bike to be steered with the rear in many cases.
The DSR is dead quiet while at a stop. Roll the bike a bit, and the wheel movement wakes the machine, resulting in a gentle whirring. We were informed this is simply the sound of current moving through the system. While less aggressive by far than the crackling and buzzing of municipal power lines, that same grid is fueling the bike. The lack of typical sensory feedback underscored just how different these bikes are from any other class of motorcycle. George Jetson's flying car may have been a predictor of what the future of commuting might sound like—rumbling replaced by various forms of buzzing.
In an increasingly digital world, more and more life is directed by ones and zeros. Poetic irony that brief escapes from the digital landscape can be had when one straddles a Zero.


text:
Jersey Mike's Awarded for IT Program
Industry News June 9, 2015
IDG's CIO magazine announced Jersey Mike's Subs, known for its fresh sliced, fresh grilled subs, as a recipient of the 2015 CIO 100. The 28th annual award program recognizes organizations around the world that exemplify the highest level of operational and strategic excellence in information technology (IT).
"For 28 years now, the CIO 100 awards have honored the innovative use of technology to deliver genuine business value," says Maryfran Johnson, editor in chief of CIO magazine and events. "Our 2015 winners are an outstanding example of the transformative power of IT to drive everything from revenue growth to competitive advantage."
Jersey Mike's won for the creation of a single propriety, fully integrated technology platform for complex franchise operations, unusual in the franchise hospitality industry. This centralized POS provides Jersey Mike's operators of nearly 1,000 locations with a clear roadmap for daily success and allows them to grow revenue, improve profitability, control food and labor costs, leapfrog competitors, break into new markets, and improve customer service while allowing the company to adapt quickly to a changing business environment.
"Even though as a brand we're nearly 60 years old, we pride ourselves on the advantages of cutting-edge technology to support our franchise owners," says Scott Scherer, CIO, Jersey Mike's. "Jersey Mike's has more than doubled in size in just three years, and we recognized as we grew that we needed a single POS written, designed, and controlled by the company. This has been invaluable in allowing Jersey Mike's to react quickly to changes related to procedures and laws while driving top line sales, improving product quality, and reducing bottom line costs."
In addition to the CIO 100 award, Jersey Mike's won two Hospitality Technology Restaurant Breakthrough Awards in two years (2014 and 2012) based on different components of this technology project.
Executives from the winning companies, including Scherer, will be recognized at The CIO 100 Symposium & Awards Ceremony, to be held Tuesday evening, August 11, at The Broadmoor in Colorado Springs, Colorado.
News and information presented in this release has not been corroborated by QSR, Food News Media, or Journalistic, Inc.


text:
Q: FullCalendar - How to show specific number of upcoming events in list view? I'm using FullCalendar to display a list of events from a Google Calendar.
What I need is a list of the next 3 events, regardless of the day they are on.
The only option I found so far is to set the amount of days listed:
$('#calendar').fullCalendar({
    defaultView: "listWeek",
        views: {
            listWeek: {
                type: 'list',
                duration: { days: 3 },
            }
        },
    })

This is list is empty though, if there are no events within the next three days.
Is there a way to set the specific amount of events displayed instead just the number of days?
Note: My knowledge about JS is pretty basic, so if the only option is to create a Custom View I'm grateful for any examples on how this could work.

A: I feel like this is a conceptual problem more than a programming issue.
The short answer is:
Essentially no you can't do this using fullCalendar.
The longer explanation is:
The whole point of fullCalendar is that it displays things in a calendar-like way. Calendars are designed to highlight specific points in time - things which take place within the setting of a period of days/weeks/months. The idea of a calendar is to visualise time, and help you to place events within it and see a timeline and context for your events.
If you just want a boring old list of the next 3 events, no matter when they occur, then you're discarding the visualisation which is the entire purpose of a calendar. For that requirement, simply ditch the calendar plugin completely and just use the data you get from google to display a HTML list.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Marketing Cloud API as Entry Event - Send transaction email I have a very simple use case where I need to send a transactional email via journey. I used API as an entry event and hit the endpoint. I got the success and a record is created in the underlying data extension which I connect when creating an entry source.
I initially thought that once the record is created in the data extension my next steps like waiting for 1 min and then sending an email will be automatically executed but I guess that is not the case.
Can anyone guide me what could be the next steps in order to execute the next steps in the journey like sending the transactional email? Thanks

A: Yes you are on the right direction. If you try to call out the journey entry event API then it will insert a record in data extension and it will also send out a real time email.
My findings on your issue:

*

*Check if its entering into the journey by clicking on View events in journey.

*Check if you are using any ampscript in journey builder emails. Sometimes if you don't pass the values or column names are different then the emails won't send.

*Make sure you have a field email address with email address data type in the send able data extension.

*Just check whether if you have provided a valid email address.
Please find the below steps and check where you went wrong:

*

*Below is my test data extension.

*Below is the journey I have used to test:

*I have used the below code:

Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
POST /interaction/v1/events
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

{
    "ContactKey": "ID601",
    "EventDefinitionKey":"APIEvent Key",
    "Data": {
        "SubscriberKey":"ID601",
        "EmailAddress":"xyz@gmail.com",
        "FirstName":"Test",
        "LastName":"Test1"}
}

*I have received an email after some minutes.

Let me know if this helps.

A: The DE should not be associated with any template


-Sheath (Scabbard): made of hard wood; black lacquer be shine; solid sageo also rolled both side of kurikata to match sword's tsuka-ito.
- The blade of the sword has been hand forged using the ancient method of sword making. Full hand forged, hand polished and hand sharpened.
-The blade was made of 1095 high carbon steel, and it has been laminated in a Maru style with a clay temper line. A special clay was applied to the blade by hand, using a thin covering near the edge and a thicker layer over the rest of the blade. this results in a relatively quicker cooling of the edge during quenching, producing a hard edge and softer back. the beautiful real hamon on the blade was also result of the differential cooling of the blade (quenching and tempering).
-The tip of the blade is a Chu Kissaki (medium length), it was well defined with the hamon going all the way through the Boshi.
We have only one shipping way so far, it's EMS. We will post the new shipping way if we get more choice.
1) Item tracking : We will tell you the item's number after we send out your items. You can track them by visit the website of :http://www.ems.com.cn/english.html to view the shipping status. Please try more times if the track website doesn't responds.
2) Time to deliver : It's about 1-2 working days from you order the item to it has been send out. The deliver time is about 7-15 days, which depends on the Custom clearance efficiency. So ,normally, it take about 10-12 days to get the item after you purchase it.


text:
Photo Gallery Home
ASCO Press Center
ASCO Public
2016 ASCO Annual Meeting
Terms of Use • Privacy Policy • Sponsor • Contact Us • Conflict of Interest • Log In • Log Out
2318 Mill Road, Suite 800, Alexandria, VA 22314 | Phone: (571) 483-1300
© 2005-2017 American Society of Clinical Oncology (ASCO). All rights reserved worldwide.
Peter Yu, MD, FACP, FASCO, presenting the Science of Oncology Award to William Kaelin, Jr., MD, during Plenary Session including Science of Oncology Award and Lecture
Chicago, IL - 2016 ASCO Annual Meeting - Peter Yu, MD, FACP, FASCO, presenting the Science of Oncology Award to William Kaelin, Jr., MD, during Plenary Session including Science of Oncology Award and Lecture at the American Society of Clinical Oncology (ASCO) Annual Meeting here today, Sunday, June 5, 2016. Over 30,000 physicians, researchers, and healthcare professionals from over 100 countries are attending the 52nd Annual Meeting which is being held at the McCormick Place convention center. The Annual Meeting highlights the latest findings in all major areas of oncology from basic through clinical and epidemiological studies. Photo by © ASCO/Brian Powers 2016 Technical Questions: todd@medmeetingimages.com; ASCO Contact: photos@asco.org
William G. Kaelin, MD, delivers the 2016 Science of Oncology Award Lecture during Plenary Session Including the Science of Oncology Award and Lecture
Chicago, IL - 2016 ASCO Annual Meeting - William G. Kaelin, MD, delivers the 2016 Science of Oncology Award Lecture during Plenary Session Including the Science of Oncology Award and Lecture at the American Society of Clinical Oncology (ASCO) Annual Meeting here today, Sunday, June 5, 2016. Over 30,000 physicians, researchers, and healthcare professionals from over 100 countries are attending the 52nd Annual Meeting which is being held at the McCormick Place convention center. The Annual Meeting highlights the latest findings in all major areas of oncology from basic through clinical and epidemiological studies. Photo by © ASCO/Brian Powers 2016 Technical Questions: todd@medmeetingimages.com; ASCO Contact: photos@asco.org
Antonio Palumbo, MD, presenting abstract LBA4, Phase III randomized controlled study of daratumumab, bortezomib, and dexamethasone (DVd) versus bortezomib and dexamethasone (Vd) in patients (pts) with relapsed or refractory multiple myeloma (RRMM): CASTOR study during Plenary Session including Science of Oncology Award and Lecture
Chicago, IL - 2016 ASCO Annual Meeting - Antonio Palumbo, MD, presenting abstract LBA4, Phase III randomized controlled study of daratumumab, bortezomib, and dexamethasone (DVd) versus bortezomib and dexamethasone (Vd) in patients (pts) with relapsed or refractory multiple myeloma (RRMM): CASTOR study during Plenary Session including Science of Oncology Award and Lecture at the American Society of Clinical Oncology (ASCO) Annual Meeting here today, Sunday, June 5, 2016. Over 30,000 physicians, researchers, and healthcare professionals from over 100 countries are attending the 52nd Annual Meeting which is being held at the McCormick Place convention center. The Annual Meeting highlights the latest findings in all major areas of oncology from basic through clinical and epidemiological studies. Photo by © ASCO/Phil McCarten 2016 Technical Questions: todd@medmeetingimages.com; ASCO Contact: photos@asco.org


text:
Psychiatry Related Resources
Dr. Goldwaser was named as a "Distinguished Life Fellow" of the American Psychiatric Association.
The objective of a forensic psychiatrist is to give expert opinion to a reasonable degree of medical certainty, in the form of a written report, deposition or courtroom testimony in legal cases.
Clinical and Forensic Psychiatrist
Alberto M. Goldwaser, M.D., D.L.F.A.P.A.
Diplomate: American Board of Psychiatry and Neurology – Psychiatry
Diplomate: American Board of Psychiatry and Neurology – Forensic Psychiatry
Clinical Assistant Professor of Psychiatry – New York University School of Medicine
Clinical Assistant Professor of Psychiatry – Rutgers-Robert Wood Johnson Medical School
Past President: New Jersey Psychoanalytic Society
Chairman Professional Ethics Committee, Psychoanalytic Association of New York, and The Psychoanalytic Institute Affiliated with New York University School of Medicine
Faculty: The Psychoanalytic Institute at New York University School of Medicine
Member of the Bio-Ethics and Utilization Review Committees at Barnert Hospital
Member of the Professional Malpractice Committee of the American Psychoanalytic Association
Member of the International Forensic Psychiatric Committee of the American Academy of Psychiatry and the Law
Universidad Peruana Cayetano Heredia: Medical School Education
"Service Achievement Award": New York University School of Medicine
Video Conferencing Available | Exams Conducted in English/Spanish
Forensic Psychiatry – What is It?
Forensic psychiatry is a medical subspecialty that combines research and clinical practice in the numerous areas in which psychiatry is applied to legal issues. While some forensic psychiatrists may specialize exclusively in legal issues, almost all psychiatrists, at some point, have to work within one of the many areas in which the mental health and legal system overlap. The objective of a forensic psychiatrist is to give expert opinion to a reasonable degree of medical certainty, in the form of a written report, deposition or courtroom testimony in legal cases. It relates to the application of psychiatric knowledge and techniques to legal procedures (Taken from "Forensic Psychiatry: An Allied Branch") Dr. Goldwaser was named as a "Distinguished Life Fellow" of the American Psychiatric Association – a special distinction "for exceptional contributions to the community and the profession of psychiatry; the highest honor that the profession can bestow." Dr. Alberto M. Goldwaser has conducted Civil, Criminal, and Administrative Forensic Psychiatric Examinations in State, Federal and Military courts around the United States. He has provided expert opinions through preparation of narrative reports and testifying in depositions and courts. The following are examples in which psychiatry and law overlap: Independent Medical Examinations – Testimony: Defense/Plaintiff
Pre Deposition/Trial Consultations
Violence Risk Assessment
Criminal Responsibility
Competency: Civil/Criminal
Child Custody and Parental Time Sharing
Child and Elder Abuse
Psychiatric Effects of Physical Injuries
Psychic Injury
Involuntary Treatment
Correctional Psychiatry
Ethics and Human Rights
Boundaries Violation
Right to Refuse Treatment
Right to Treatment
Forensic Psychiatric Associates, LLC
Morristown, New Jersey 07960
Email: AGoldwaserMD@nyumc.org
155 East 31st Street, Suite 25-L
Forensic psychiatry is a medical subspecialty that combines research and clinical practice in the numerous areas in which psychiatry is applied to legal issues. Dr. Alberto M. Goldwaser has provided expert opinions through preparation of narrative reports and testifying in depositions and courts.
The information you obtain at this site is not, nor is it intended to be, legal advice. You should consult an attorney for advice regarding your individual situation. We invite you to contact us and welcome your calls, letters and electronic mail. Contacting us does not create an attorney-client relationship. Please do not send any confidential information to us until such time as an attorney-client relationship has been established.
Developed ™ © 2020


text:
BEGIN_INANITY_SHADERS

GlslGeneratorInstance::GlslGeneratorInstance(ptr<Node> rootNode, ShaderType shaderType, GlslVersion glslVersion, bool supportUniformBuffers) :
	SlGeneratorInstance(rootNode, shaderType),
	glslVersion(glslVersion),
	supportUniformBuffers(supportUniformBuffers)
{
	try
	{
		switch(shaderType)
		{
		case ShaderTypes::vertex:
			uniformPrefix = "uv";
			uniformBufferPrefix = "UBv";
			samplerPrefix = "sv";
			break;
		case ShaderTypes::pixel:
			uniformPrefix = "up";
			uniformBufferPrefix = "UBp";
			samplerPrefix = "sp";
			break;
		default:
			THROW("Wrong shader type");
		}
	}
	catch(Exception* exception)
	{
		THROW_SECONDARY("Can't create GLSL generator instance", exception);
	}
}

void GlslGeneratorInstance::PrintDataType(DataType dataType)
{
	const char* name;
	switch(dataType)
	{
	case DataTypes::_float:			name = "float";			break;
	case DataTypes::_vec2:			name = "vec2";			break;
	case DataTypes::_vec3:			name = "vec3";			break;
	case DataTypes::_vec4:			name = "vec4";			break;
	case DataTypes::_mat3x3:		name = "mat3";		break;
	case DataTypes::_mat4x4:		name = "mat4";		break;
	case DataTypes::_uint:			name = glslVersion == GlslVersions::webgl ? "int" : "uint"; break;
	case DataTypes::_uvec2:			name = glslVersion == GlslVersions::webgl ? "ivec2" : "uvec2"; break;
	case DataTypes::_uvec3:			name = glslVersion == GlslVersions::webgl ? "ivec3" : "uvec3"; break;
	case DataTypes::_uvec4:			name = glslVersion == GlslVersions::webgl ? "ivec4" : "uvec4"; break;
	case DataTypes::_int:				name = "int";				break;
	case DataTypes::_ivec2:			name = "ivec2";			break;
	case DataTypes::_ivec3:			name = "ivec3";			break;
	case DataTypes::_ivec4:			name = "ivec4";			break;
	case DataTypes::_bool:			name = "bool";			break;
	case DataTypes::_bvec2:			name = "bvec2";			break;
	case DataTypes::_bvec3:			name = "bvec3";			break;
	case DataTypes::_bvec4:			name = "bvec4";			break;
	default:
		THROW("Unknown data type");
	}
	text << name;
}

void GlslGeneratorInstance::PrintUniform(UniformNode* uniformNode)
{
	text << uniformPrefix << uniformNode->GetGroup()->GetSlot() << '_' << uniformNode->GetOffset();
}

void GlslGeneratorInstance::PrintNodeInit(size_t nodeIndex)
{
	Node* node = nodeInits[nodeIndex];

	switch(node->GetType())
	{
	case Node::typeFloatConst:
		PrintNodeInitBegin(nodeIndex);
		text << std::fixed << std::setprecision(10) << fast_cast<FloatConstNode*>(node)->GetValue();// << 'f';
		PrintNodeInitEnd();
		break;
	case Node::typeIntConst:
		PrintNodeInitBegin(nodeIndex);
		text << fast_cast<IntConstNode*>(node)->GetValue();
		PrintNodeInitEnd();
		break;
	case Node::typeAttribute:
		{
			AttributeNode* attributeNode = fast_cast<AttributeNode*>(node);
			PrintNodeInitBegin(nodeIndex);
			// WebGL hack for integer attributes
			// (only for case of using another hack - changing integer attributes to float)
			bool intConversion = false;
			if(glslVersion == GlslVersions::webgl)
				intConversion = PrintWebGLConversionToIntegerBegin(attributeNode->GetValueType());

			text << "a" << attributeNode->GetElementIndex();

			if(intConversion)
				PrintWebGLConversionToIntegerEnd();
			PrintNodeInitEnd();
		}
		break;
	case Node::typeUniform:
		// uniform doesn't have initialization
		break;
	case Node::typeSampler:
		// sampler doesn't have initialization
		break;
	case Node::typeReadUniform:
		{
			PrintNodeInitBegin(nodeIndex);
			ReadUniformNode* readUniformNode = fast_cast<ReadUniformNode*>(node);
			PrintUniform(readUniformNode->GetUniformNode());
			PrintNodeInitEnd();
		}
		break;
	case Node::typeIndexUniformArray:
		{
			PrintNodeInitBegin(nodeIndex);
			IndexUniformArrayNode* indexUniformArrayNode = fast_cast<IndexUniformArrayNode*>(node);
			PrintUniform(indexUniformArrayNode->GetUniformNode());
			text << '[';
			PrintNode(indexUniformArrayNode->GetIndexNode());
			text << ']';
			PrintNodeInitEnd();
		}
		break;
	case Node::typeTransformed:
		PrintNodeInitBegin(nodeIndex);
		text << "v" << fast_cast<TransformedNode*>(node)->GetSemantic();
		PrintNodeInitEnd();
		break;
	case Node::typeInterpolate:
		{
			InterpolateNode* interpolateNode = fast_cast<InterpolateNode*>(node);
			text << "\tv" << interpolateNode->GetSemantic() << " = ";
			PrintNode(interpolateNode->GetNode());
			PrintNodeInitEnd();
		}
		break;
	case Node::typeSequence:
		// sequence node doesn't have initialization
		break;
	case Node::typeSwizzle:
		{
			PrintNodeInitBegin(nodeIndex);
			SwizzleNode* swizzleNode = fast_cast<SwizzleNode*>(node);
			PrintNode(swizzleNode->GetA());
			text << '.' << swizzleNode->GetMap();
			PrintNodeInitEnd();
		}
		break;
	case Node::typeOperation:
		PrintNodeInitBegin(nodeIndex);
		PrintOperationNodeInit(fast_cast<OperationNode*>(node));
		PrintNodeInitEnd();
		break;
	case Node::typeAction:
		PrintActionNodeInit(fast_cast<ActionNode*>(node));
		break;
	case Node::typeSample:
		{
			PrintNodeInitBegin(nodeIndex);

			SampleNode* sampleNode = fast_cast<SampleNode*>(node);

			int slot = sampleNode->GetSamplerNode()->GetSlot();

			ValueNode* coordsNode = sampleNode->GetCoordsNode();
			ValueNode* offsetNode = sampleNode->GetOffsetNode();
			ValueNode* lodNode = sampleNode->GetLodNode();
			ValueNode* biasNode = sampleNode->GetBiasNode();
			ValueNode* gradXNode = sampleNode->GetGradXNode();
			ValueNode* gradYNode = sampleNode->GetGradYNode();

			auto printOffsetNode = [&]()
			{
				// offset node is required to be constant expression,
				// but AMD driver requires it also to be compile-time expression
				// so HACK: print value inline, only for known node
				// PrintNode(offsetNode);
				if(offsetNode->GetType() != Node::typeOperation)
					THROW("wrong offset node");
				OperationNode* offsetOperationNode = fast_cast<OperationNode*>(offsetNode);
				if(
					offsetOperationNode->GetOperation() != OperationNode::operationInt11to2 ||
					offsetOperationNode->GetA()->GetType() != Node::typeIntConst ||
					offsetOperationNode->GetB()->GetType() != Node::typeIntConst
					)
					THROW("wrong offset node");
				text << "ivec2("
					<< offsetOperationNode->GetA().FastCast<IntConstNode>()->GetValue() << ", "
					<< offsetOperationNode->GetB().FastCast<IntConstNode>()->GetValue() << ")";
			};

			if(lodNode)
			{
				text << "textureLod";
				if(offsetNode)
					text << "Offset";
				text << '(' << samplerPrefix << slot << ", ";
				PrintNode(coordsNode);
				text << ", ";
				PrintNode(lodNode);
				if(offsetNode)
				{
					text << ", ";
					printOffsetNode();
				}
			}
			else if(biasNode)
			{
				text << "texture";
				if(offsetNode)
					text << "Offset";
				text << '(' << samplerPrefix << slot << ", ";
				PrintNode(coordsNode);
				if(offsetNode)
				{
					text << ", ";
					printOffsetNode();
				}
				text << ", ";
				PrintNode(biasNode);
			}
			else if(gradXNode && gradYNode)
			{
				text << "textureGrad";
				if(offsetNode)
					text << "Offset";
				text << '(' << samplerPrefix << slot << ", ";
				PrintNode(coordsNode);
				text << ", ";
				PrintNode(gradXNode);
				text << ", ";
				PrintNode(gradYNode);
				if(offsetNode)
				{
					text << ", ";
					printOffsetNode();
				}
			}
			else
			{
				text << (glslVersion == GlslVersions::webgl ? "texture2D" : "texture");
				if(offsetNode && glslVersion != GlslVersions::webgl)
					text << "Offset";
				text << '(' << samplerPrefix << slot << ", ";
				PrintNode(coordsNode);
				if(offsetNode && glslVersion != GlslVersions::webgl)
				{
					text << ", ";
					printOffsetNode();
				}
			}

			// close sample call
			text << ')';

			// sample always returns four-component vector, so make some swizzle if needed
			int valueSize = GetVectorDataTypeDimensions(sampleNode->GetValueType());
			if(valueSize < 4)
			{
				text << '.';
				for(int i = 0; i < valueSize; ++i)
					text << "xyzw"[i];
			}

			PrintNodeInitEnd();
		}
		break;
	case Node::typeFragment:
		{
			FragmentNode* fragmentNode = fast_cast<FragmentNode*>(node);
			switch(glslVersion)
			{
			case GlslVersions::opengl33: text << "\tr" << fragmentNode->GetTarget(); break;
			case GlslVersions::webgl:
				if(fragmentTargetsCount > 1)
					text << "gl_FragData[" << fragmentNode->GetTarget() << ']';
				else
					text << "gl_FragColor";
				break;
			}
			text << " = ";
			PrintNode(fragmentNode->GetNode());
			PrintNodeInitEnd();
		}
		break;
	case Node::typeDualFragment:
		{
			DualFragmentNode* dualFragmentNode = fast_cast<DualFragmentNode*>(node);
			switch(glslVersion)
			{
			case GlslVersions::opengl33:
				text << "\tr0 = ";
				PrintNode(dualFragmentNode->GetNode0());
				PrintNodeInitEnd();
				text << "\tr1 = ";
				PrintNode(dualFragmentNode->GetNode1());
				PrintNodeInitEnd();
				break;
			case GlslVersions::webgl:
				text << "\tgl_FragData[0] = ";
				PrintNode(dualFragmentNode->GetNode0());
				PrintNodeInitEnd();
				text << "\tgl_FragData[1] = ";
				PrintNode(dualFragmentNode->GetNode1());
				PrintNodeInitEnd();
				break;
			}
		}
		break;
	case Node::typeCast:
		{
			PrintNodeInitBegin(nodeIndex);
			CastNode* castNode = fast_cast<CastNode*>(node);
			PrintDataType(castNode->GetValueType());
			text << '(';
			PrintNode(castNode->GetA());
			text << ')';
			PrintNodeInitEnd();
		}
		break;
	default:
		THROW("Unknown node type");
	}
}

void GlslGeneratorInstance::PrintOperationNodeInit(OperationNode* node)
{
	OperationNode::Operation operation = node->GetOperation();
	switch(operation)
	{
	case OperationNode::operationNegate:
		text << '-';
		PrintNode(node->GetA());
		break;
	case OperationNode::operationAdd:
		PrintNode(node->GetA());
		text << " + ";
		PrintNode(node->GetB());
		break;
	case OperationNode::operationSubtract:
		PrintNode(node->GetA());
		text << " - ";
		PrintNode(node->GetB());
		break;
	case OperationNode::operationMultiply:
	case OperationNode::operationMul:
		PrintNode(node->GetA());
		text << " * ";
		PrintNode(node->GetB());
		break;
	case OperationNode::operationDivide:
		PrintNode(node->GetA());
		text << " / ";
		PrintNode(node->GetB());
		break;
	case OperationNode::operationLess:
		PrintNode(node->GetA());
		text << " < ";
		PrintNode(node->GetB());
		break;
	case OperationNode::operationLessEqual:
		PrintNode(node->GetA());
		text << " <= ";
		PrintNode(node->GetB());
		break;
	case OperationNode::operationEqual:
		PrintNode(node->GetA());
		text << " == ";
		PrintNode(node->GetB());
		break;
	case OperationNode::operationNotEqual:
		PrintNode(node->GetA());
		text << " != ";
		PrintNode(node->GetB());
		break;
	case OperationNode::operationGetInstanceID:
		text << "uint(gl_InstanceID)";
		break;
	case OperationNode::operationScreenToTexture:
		PrintNode(node->GetA());
		text << " * vec2(0.5, 0.5) + vec2(0.5, 0.5)";
		break;
	case OperationNode::operationSaturate:
		text << "clamp(";
		PrintNode(node->GetA());
		text << ", 0.0, 1.0)";
		break;
	default:
		{
			// остались только функции, которые делаются простым преобразованием имени
			const char* name;
			switch(operation)
			{
#define OP(o, n) case OperationNode::operation##o: name = #n; break
				OP(Float11to2, vec2);
				OP(Float111to3, vec3);
				OP(Float1111to4, vec4);
				OP(Float31to4, vec4);
				OP(Float211to4, vec4);
				OP(Int11to2, ivec2);
				OP(Dot, dot);
				OP(Cross, cross);
				OP(Mul, mul);
				OP(Length, length);
				OP(Normalize, normalize);
				OP(Lerp, mix);
				OP(Pow, pow);
				OP(Min, min);
				OP(Max, max);
				OP(Abs, abs);
				OP(Sqrt, sqrt);
				OP(Sin, sin);
				OP(Atan2, atan);
				OP(Cos, cos);
				OP(Exp, exp);
				OP(Exp2, exp2);
				OP(Log, log);
				OP(Ddx, dFdx);
				OP(Ddy, dFdy);
				OP(Floor, floor);
				OP(Ceil, ceil);
				OP(Mod, mod);
#undef OP
			default:
				THROW("Invalid operation type");
			}

			// вывести
			text << name << '(';
			int argumentsCount = node->GetArgumentsCount();
			for(int i = 0; i < argumentsCount; ++i)
			{
				if(i)
					text << ", ";
				PrintNode(node->GetArgument(i));
			}
			text << ')';
		}
	}
}

void GlslGeneratorInstance::PrintActionNodeInit(ActionNode* node)
{
	switch(node->GetAction())
	{
	case ActionNode::actionSetPosition:
		text << "\tgl_Position = ";
		PrintNode(node->GetA());
		PrintNodeInitEnd();
		break;
	case ActionNode::actionClip:
		text << "\tclip(";
		PrintNode(node->GetA());
		text << ')';
		PrintNodeInitEnd();
		break;
	default:
		THROW("Invalid action type");
	}
}

void GlslGeneratorInstance::PrintUniforms()
{
	// uniform-буферы и переменные
	// отсортировать их
	struct Sorter
	{
		bool operator()(const std::pair<UniformGroup*, UniformNode*>& a, const std::pair<UniformGroup*, UniformNode*>& b) const
		{
			int slotA = a.first->GetSlot();
			int slotB = b.first->GetSlot();

			return slotA < slotB || (slotA == slotB && a.second->GetOffset() < b.second->GetOffset());
		}
	};
	std::sort(uniforms.begin(), uniforms.end(), Sorter());
	// удалить дубликаты
	uniforms.resize(std::unique(uniforms.begin(), uniforms.end()) - uniforms.begin());

	// вывести буферы
	for(size_t i = 0; i < uniforms.size(); )
	{
		size_t j;
		for(j = i + 1; j < uniforms.size() && uniforms[j].first == uniforms[i].first; ++j);

		int slot = uniforms[i].first->GetSlot();

		// print header, if needed
		if(supportUniformBuffers)
			text << "layout(std140) uniform " << uniformBufferPrefix << slot << "\n{\n";

		// текущее смещение от начала буфера
		int currentOffset = 0;

		// вывести переменные
		for(size_t k = i; k < j; ++k)
		{
			UniformNode* uniformNode = uniforms[k].second;
			DataType valueType = uniformNode->GetValueType();
			int offset = uniformNode->GetOffset();
			int count = uniformNode->GetCount();
			int valueSize = GetDataTypeSize(valueType);

			// переменная должна лежать на границе float'а, как минимум
			if(offset % sizeof(float))
				THROW("Wrong variable offset: should be on 4-byte boundary");

			// если по умолчанию переменная попадёт в неправильное место, делаем пустые переменные, чтобы занять место
			// автоматический сдвиг
			if(currentOffset % sizeof(vec4) + valueSize > sizeof(vec4))
				currentOffset = (currentOffset + sizeof(vec4) - 1) & ~(sizeof(vec4) - 1);
			// оставшийся сдвиг добиваем пустыми переменными (только если uniform буферы)
			if(supportUniformBuffers)
			{
				while(currentOffset < offset)
				{
					int newOffset = (currentOffset + sizeof(vec4)) & ~(sizeof(vec4) - 1);
					if(newOffset > offset)
						newOffset = offset;
					int size = (newOffset - currentOffset) / sizeof(float);
					static const char* dumpTypes[] = { "float", "vec2", "vec3", "vec4" };
					text << '\t' << dumpTypes[size - 1] << " dump" << slot << '_' << currentOffset << '_' << size << ";\n";
					currentOffset = newOffset;
				}
			}
			else
				currentOffset = offset;

			// печатаем определение переменной

			text << (supportUniformBuffers ? "\t" : "uniform ");
			PrintDataType(valueType);
			// имя переменной
			text << ' ' << uniformPrefix << slot << '_' << offset;

			// размер массива
			if(count > 1)
				text << '[' << count << ']';
			// если массив, размер элемента должен быть кратен размеру vec4
			if(count > 1 && valueSize % sizeof(vec4))
				THROW("Size of element of array should be multiply of vec4 size");

			// конец переменной
			text << ";\n";

			// смещение для следующей переменной
			currentOffset += valueSize * count;
		}

		// ending of buffer
		if(supportUniformBuffers)
			text << "};\n";

		i = j;
	}
}

DataType GlslGeneratorInstance::EnforceFloatDataType(DataType dataType)
{
	switch(dataType)
	{
	case DataTypes::_int:
	case DataTypes::_uint:
		dataType = DataTypes::_float;
		break;
	case DataTypes::_ivec2:
	case DataTypes::_uvec2:
		dataType = DataTypes::_vec2;
		break;
	case DataTypes::_ivec3:
	case DataTypes::_uvec3:
		dataType = DataTypes::_vec3;
		break;
	case DataTypes::_ivec4:
	case DataTypes::_uvec4:
		dataType = DataTypes::_vec4;
		break;
	default: break;
	}
	return dataType;
}

bool GlslGeneratorInstance::PrintWebGLConversionToIntegerBegin(DataType dataType)
{
	bool intConversion = false;
	switch(dataType)
	{
	case DataTypes::_int:
	case DataTypes::_uint:
		text << "int(";
		intConversion = true;
		break;
	case DataTypes::_ivec2:
	case DataTypes::_uvec2:
		text << "ivec2(";
		intConversion = true;
		break;
	case DataTypes::_ivec3:
	case DataTypes::_uvec3:
		text << "ivec3(";
		intConversion = true;
		break;
	case DataTypes::_ivec4:
	case DataTypes::_uvec4:
		text << "ivec4(";
		intConversion = true;
		break;
	default: break;
	}
	return intConversion;
}

void GlslGeneratorInstance::PrintWebGLConversionToIntegerEnd()
{
	text << ')';
}

ptr<ShaderSource> GlslGeneratorInstance::Generate()
{
	// first stage: register all nodes
	RegisterNode(rootNode);

	// заголовок файла
	switch(glslVersion)
	{
	case GlslVersions::opengl33:
		text << "#version 330\n";
		break;
	case GlslVersions::webgl:
		// version numbers in WebGL are not supported
		text <<
			"#extension GL_OES_standard_derivatives : enable\n"
			"#extension GL_EXT_draw_buffers : enable\n"
			"#ifdef GL_ES\n"
			"precision highp float;\n"
			"#endif\n";
		break;
	default:
		THROW("Unknown GLSL version");
	}

	// вывести атрибуты в качестве входных переменных, если это вершинный шейдер
	if(shaderType == ShaderTypes::vertex)
	{
		const char* prefixStr;
		switch(glslVersion)
		{
		case GlslVersions::opengl33: prefixStr = "in "; break;
		case GlslVersions::webgl: prefixStr = "attribute "; break;
		default: THROW("Unknown GLSL version");
		}

		std::sort(attributes.begin(), attributes.end());
		for(size_t i = 0; i < attributes.size(); ++i)
		{
			AttributeNode* node = attributes[i];
			text << prefixStr;

			DataType valueType = node->GetValueType();

			// hack for lack of supporting integer attributes in WebGL
			// change them to float
			if(glslVersion == GlslVersions::webgl)
				valueType = EnforceFloatDataType(valueType);

			PrintDataType(valueType);
			text << " a" << node->GetElementIndex() << ";\n";
		}
	}

	// print transformed nodes
	if(!transformedNodes.empty())
	{
		if(shaderType != ShaderTypes::pixel)
			THROW("Only pixel shader may have transformed nodes");
		const char* prefixStr;
		switch(glslVersion)
		{
		case GlslVersions::opengl33: prefixStr = "in "; break;
		case GlslVersions::webgl: prefixStr = "varying "; break;
		default: THROW("Unknown GLSL version");
		}

		for(size_t i = 0; i < transformedNodes.size(); ++i)
		{
			TransformedNode* node = transformedNodes[i];
			text << prefixStr;
			PrintDataType(node->GetValueType());
			text << " v" << node->GetSemantic() << ";\n";
		}
	}

	// print interpolate nodes
	if(!interpolateNodes.empty())
	{
		if(shaderType != ShaderTypes::vertex)
			THROW("Only vertex shader may have interpolate nodes");
		const char* prefixStr;
		switch(glslVersion)
		{
		case GlslVersions::opengl33: prefixStr = "out "; break;
		case GlslVersions::webgl: prefixStr = "varying "; break;
		default: THROW("Unknown GLSL version");
		}

		for(size_t i = 0; i < interpolateNodes.size(); ++i)
		{
			InterpolateNode* node = interpolateNodes[i];
			text << prefixStr;
			PrintDataType(node->GetValueType());
			text << " v" << node->GetSemantic() << ";\n";
		}
	}

	// вывести пиксельные переменные, если это пиксельный шейдер, и это нужно
	if(shaderType == ShaderTypes::pixel && glslVersion == GlslVersions::opengl33)
	{
		for(int i = 0; i < fragmentTargetsCount; ++i)
		{
			text << "out ";
			PrintDataType(DataTypes::_vec4);
			text << " r" << i << ";\n";
		}
	}

	// print uniforms
	PrintUniforms();

	// samplers
	for(size_t i = 0; i < samplers.size(); ++i)
	{
		SamplerNode* samplerNode = samplers[i];
		// строка, описывающая основной тип семпла
		const char* valueTypeStr;
		switch(samplerNode->GetValueType())
		{
		case DataTypes::_float:
		case DataTypes::_vec2:
		case DataTypes::_vec3:
		case DataTypes::_vec4:
			valueTypeStr = "";
			break;
		case DataTypes::_uint:
		case DataTypes::_uvec2:
		case DataTypes::_uvec3:
		case DataTypes::_uvec4:
			valueTypeStr = glslVersion == GlslVersions::webgl ? "i" : "u";
			break;
		case DataTypes::_int:
		case DataTypes::_ivec2:
		case DataTypes::_ivec3:
		case DataTypes::_ivec4:
			valueTypeStr = "i";
			break;
		default:
			THROW("Invalid sampler value type");
		}
		// строка, описывающая размерность
		const char* dimensionStr;
		switch(samplerNode->GetCoordType())
		{
		case SamplerNode::_1D:
			dimensionStr = "1D";
			break;
		case SamplerNode::_2D:
			dimensionStr = "2D";
			break;
		case SamplerNode::_3D:
			dimensionStr = "3D";
			break;
		case SamplerNode::_Cube:
			dimensionStr = "Cube";
			break;
		default:
			THROW("Invalid sampler coord type");
		}
		// вывести семплер
		int slot = samplerNode->GetSlot();
		text << "uniform " << valueTypeStr << "sampler" << dimensionStr << ' ' << samplerPrefix << slot << ";\n";
	}

	//** заголовок функции шейдера

	text << "void main()\n{\n";

	// shader code
	for(size_t i = 0; i < nodeInits.size(); ++i)
		PrintNodeInit(i);

	// завершение шейдера
	text << "}\n";

	// make list of uniform variable bindings
	GlShaderBindings::UniformBindings uniformBindings;
	if(!supportUniformBuffers)
	{
		uniformBindings.resize(uniforms.size());
		for(size_t i = 0; i < uniforms.size(); ++i)
		{
			UniformNode* node = uniforms[i].second;
			GlShaderBindings::UniformBinding& uniformBinding = uniformBindings[i];
			uniformBinding.dataType = node->GetValueType();
			uniformBinding.count = node->GetCount();
			uniformBinding.slot = uniforms[i].first->GetSlot();
			uniformBinding.offset = node->GetOffset();
			std::ostringstream ss;
			ss << uniformPrefix << uniformBinding.slot << '_' << uniformBinding.offset;
			uniformBinding.name = ss.str();
		}
	}

	// make list of uniform block bindings
	GlShaderBindings::Bindings uniformBlockBindings;
	if(supportUniformBuffers)
	{
		uniformBlockBindings.resize(uniforms.size());
		for(size_t i = 0; i < uniforms.size(); ++i)
		{
			int slot = uniforms[i].first->GetSlot();
			char name[16];
			sprintf(name, "%s%d", uniformBufferPrefix, slot);
			uniformBlockBindings[i].first = name;
			uniformBlockBindings[i].second = slot;
		}
		// remove duplicates
		std::sort(uniformBlockBindings.begin(), uniformBlockBindings.end());
		uniformBlockBindings.resize(std::unique(uniformBlockBindings.begin(), uniformBlockBindings.end()) - uniformBlockBindings.begin());
	}

	// сформировать список привязок семплеров
	GlShaderBindings::Bindings samplerBindings(samplers.size());
	for(size_t i = 0; i < samplers.size(); ++i)
	{
		int slot = samplers[i]->GetSlot();
		char name[16];
		sprintf(name, "%s%d", samplerPrefix, slot);
		samplerBindings[i].first = name;
		samplerBindings[i].second = slot;
	}

	// сформировать список привязок атрибутов
	GlShaderBindings::Bindings attributeBindings(attributes.size());
	for(size_t i = 0; i < attributes.size(); ++i)
	{
		int index = attributes[i]->GetElementIndex();
		char name[16];
		sprintf(name, "a%d", index);
		attributeBindings[i].first = name;
		attributeBindings[i].second = index;
	}

	// make a target variables list
	GlShaderBindings::Bindings targetBindings;
	switch(glslVersion)
	{
	case GlslVersions::opengl33:
		targetBindings.resize(fragmentTargetsCount);
		for(int i = 0; i < fragmentTargetsCount; ++i)
		{
			char name[16];
			sprintf(name, "r%d", i);
			targetBindings[i].first = name;
			targetBindings[i].second = i;
		}
		break;
	case GlslVersions::webgl:
		// no bindings needed, because of use of gl_FragColor/gl_FragData
		break;
	}

	return NEW(GlslSource(
		Strings::String2File(text.str()),
		NEW(GlShaderBindings(uniformBindings, uniformBlockBindings, samplerBindings, attributeBindings, targetBindings, dualFragmentTarget))
	));
}

END_INANITY_SHADERS


text:
Franklin students experience the joy of giving
By Peter Fiorilla on November 30, 2015 Comments Off on Franklin students experience the joy of giving
UNION, NJ — Before the students at Union's Franklin Elementary School begin to stream toward their usual lunch hangouts at 11:30 a.m., a handful of industrious fourth-graders set up shop in the kitchen and cafeteria space.
They pour lemonade into dozens of cups, man the cash box and prepare for a wave of students who will be buying the lemonade, at 50 cents a pop. They are one of many groups from around the country to raise money for Alex's Lemonade Stand, a charity which remembers an 8-year-old cancer patient.
In the halls of Franklin Elementary School, it's a story with which everyone is familiar, said school counselor Erin Jackson.
"The fourth-grade students went around to every single class in the school — kindergarten, first grade, up to fourth grade — and they read a little piece about the story, how the lemonade stand came to life," said Jackson, who first heard about Alex's Lemonade Stand on the radio last year. "And our kids are not all well-off. But the fact that they're giving back is so nice. It's like they're going into the piggy bank to get change and contribute."
The charity's founder, Alex, was diagnosed with a childhood cancer before her first birthday. But while fighting the disease throughout the remainder of her life, Alex and her family held regular lemonade stands in their front yard to fundraise for childhood cancer research, raising more than $1 million in the process.
Holding the sale for Alex's Lemonade Stand around Thanksgiving "makes it special because if we help the kids feel better, then they can go back with their families and celebrate," said student Brenda Cebien.
"This is a good time of year, before Thanksgiving," said Jackson, who originally wanted to run the lemonade stand in October, nationally known as Childhood Cancer Awareness month. "It's all about giving back, being appreciative for things that you have, and really this year it's taken off more than it did last year, and the kids are really thrilled with where it's going."
Students at Franklin Elementary School, through their collaborative efforts, have raised more than $1,000 during the past two years, in their newest annual tradition.
"We did this fundraiser last year and we were really, really successful. We raised $600 for the charity, so I wanted to do it again this year, and it's taken off," said Jackson, adding that they've raised $500 through Friday, Nov. 20, with two days of selling lemonade left before the Thanksgiving break. "The kids have really been helping. I have about 12 of the fourth-graders in the leadership program, so they've been organizing it and helping to put the word out, and they help with the sale every single day. They're really involved."
Backed by enthusiasm from first-year principal Latee Walton-McCleod, who immediately bought into the idea and wanted to advertise it to Franklin Elementary School parents, the students have had a great time helping out their fellow children and learning Alex's story, said Jackson.
A lot of the kids didn't understand the message last year, she added, since they put the logistics together at the "last minute." But this year, there are no doubts about what they're doing.
"The best thing is that we get to help kids who are sick to help cure them," said student Alisha James, "and we have a lot of fun selling it."
Franklin students experience the joy of giving added by Peter Fiorilla on November 30, 2015


From the age of William the Conqueror comes this courtly Norman Saxon tunic. Manufactured of sturdy homespun blue and grey cotton twill, this tunic is designed to give the look of layered garments with the comfort of a single shirt. The lace-up neckline has a hidden snap, allowing for a tight-looking collar line. Matching period trim and a double-wrap belt is included.
It would be very helpful if this had a size chart, with the exact measurements.