text:
Oak Ridge Today
Lithium Processing Facility at Y-12 could cost up to $1.65 billion
Posted at 11:39 pm January 30, 2020
By John Huotari Leave a Comment
Federal officials have approved the need for a new Lithium Production Facility at the Y-12 National Security Complex, and in May 2018, they said it could be built on the east side of the 811-acre plant, possibly where the Biology Complex, the brick building at center, is now. The east side of Y-12 is pictured above from Scarboro Road on Sunday, May 20, 2018. (File photo by John Huotari/Oak Ridge Today)
The proposed Lithium Processing Facility at the Y-12 National Security Complex could cost between $955 million and $1.65 billion, and it could be completed in 2031, the National Nuclear Security Administration said Thursday.
The Lithium Processing Facility could be built where the former Biology Complex is located on the east side of Y-12. That's the NNSA's preferred site. The Biology Complex is being prepared for demolition by the U.S. Department of Energy's Office of Environmental Management.
On Thursday, the NNSA, which is part of the U.S. Department of Energy, said it had approved the conceptual design and cost range for the proposed 134,000-square-foot Lithium Processing Facility.
The facility will replace Y-12's current lithium processing operations, which are located in a World War II-era building. That building, Building 9204-2, or Beta 2, has had materials fall from the ceiling, including chunks of concrete that reportedly weighed up to 200 pounds. The falling materials and concerns about worker safety have been cited by federal officials during congressional hearings in Washington, D.C.
Filed Under: Front Page News, National Nuclear Security Administration, Slider, U.S. Department of Energy, Y-12, Y-12 National Security Complex Tagged With: Beta 2, Biology Complex, Building 9204-2, Lisa E. Gordon-Hagerty, lithium, lithium processing facility, National Nuclear Security Administration, NNSA, Steven Wyatt, U.S. Department of Energy, Y-12 National Security Complex
NNSA signs $600 million contract to build its first exascale supercomputer
Posted at 12:48 pm August 13, 2019
Image courtesy Lawrence Livermore National Laboratory
The National Nuclear Security Administration has signed a $600 million contract with Cray Inc. to build the first exascale supercomputer for the NNSA at Lawrence Livermore National Laboratory in California.
It is one of three exascale systems to be built at U.S. Department of Energy or NNSA laboratories. The other two exascale machines will be at DOE laboratories: Aurora at Argonne National Laboratory near Chicago and Frontier at Oak Ridge National Laboratory.
ORNL currently has the most powerful supercomputer in the world, Summit, and LLNL has the second-fastest, Sierra. They are both petaflop systems. Summit is capable of 200 petaflops, or 200,000 trillion calculations per second.
All three of the new exascale supercomputers will be built by Cray using their Shasta architecture, Slingshot interconnect, and new system software platform, the NNSA said in a press release Tuesday.
An exascale computer will be able to solve calculations up to 50 times faster than today's top supercomputers, exceeding a quintillion, or 1018, calculations per second. That's a billion billion calculations per second.
Filed Under: Front Page News, National Nuclear Security Administration, NNSA, Slider, Top Stories, U.S. Department of Energy Tagged With: Argonne National Laboratory, Aurora, Cray, DOE, El Capitan, exaflops, exascale supercomputer, Frontier, Intel, Lawrence Livermore National Laboratory, Lisa E. Gordon-Hagerty, National Nuclear Security Administration, NNSA, nuclear weapons stockpile, Oak Ridge National Laboratory, petaflops, Rick Perry, Sierra, summit, supercomputer, U.S. Department of Energy
Highly enriched uranium from UK brought to Y-12 for secure storage
Posted at 2:10 am May 14, 2019
The Y-12 National Security Complex is pictured above. (Photo courtesy CNS Y-12)
Note: This story was updated at 9:15 a.m.
Almost 700 kilograms of highly enriched uranium has been moved from the United Kingdom to the United States, and the material is being securely stored at the Y-12 National Security Complex in Oak Ridge for now, federal officials said.
The National Nuclear Security Administration said this month that the highly enriched uranium, or HEU, will be down-blended later into low enriched uranium for use as nuclear reactor fuel.
"The material was returned to Y-12 for secure storage awaiting future disposition," the NNSA said in a statement provided Friday by Steven Wyatt of the NNSA Production Office in Oak Ridge.
Wyatt said Y-12 supported the removal effort, which was announced by the NNSA on May 3, through technical oversight and guidance of the processing and packaging of material.
Filed Under: Front Page News, National Nuclear Security Administration, Slider, Top Stories, U.S. Department of Energy, Y-12, Y-12 National Security Complex Tagged With: David Peattie, Dounreay nuclear site, HEU, highly enriched uranium, Lisa E. Gordon-Hagerty, low enriched uranium, National Nuclear Security Administration, NNSA, NNSA Production Office, Nuclear Decommissioning Authority, nuclear reactor fuel, nuclear weapons, Office of Material Management and Minimization Nuclear Material Removal Program, Steven Wyatt, U.S. Department of Energy, United Kingdom, United States, Y-12 National Security Complex
CNS settles with DOE, NNSA over improper shipment, storage of classified records
Posted at 3:28 pm August 29, 2018
A large off-site building on Pine Ridge that was once used to store records for the Y-12 National Security Complex. The building is pictured above on Wednesday, Aug. 15, 2018. (Photo by John Huotari/Oak Ridge Today)
Consolidated Nuclear Security LLC has reached a settlement agreement with federal officials over the improper shipment and storage of classified archived records at the Y-12 National Security Complex in Oak Ridge.
The settlement agreement with the U.S. Department of Energy and National Nuclear Security Administration requires CNS, which manages and operates Y-12, to implement corrective actions and pay a $73,000 monetary remedy.
The settlement agreement was entered into on July 23 between CNS, NNSA, and DOE's Office of Enterprise Assessments' Office of Enforcement.
In a July 13 letter, NNSA Administrator Lisa E. Gordon-Hagerty and Kevin L. Dressman, acting director of the Office of Enforcement, said CNS made a decision in 2016 to vacate an off-site records storage facility on Pine Ridge that had met DOE requirements.
To vacate that building, CNS sent boxes of inactive archived records, dating back to 1943, to one of three U.S. National Archives and Records Administration facilities: unclassified records went to two different federal records centers based on whether the records were textual or non-textual (e.g., films), and classified records, regardless of the medium, were transferred to a federal records center that is authorized to store classified information. [Read more…]
Filed Under: Front Page News, National Nuclear Security Administration, Top Stories, U.S. Department of Energy, Y-12 National Security Complex Tagged With: classified archived records, classified information, CNS, Consolidated Nuclear Security LLC, DOE, DOE's Office of Enterprise Assessments' Office of Enforcement, federal records center, improper shipment and storage, Kevin L. Dressman, Lisa E. Gordon-Hagerty, Morgan Smith, NARA, National Nuclear Security Administration, NNSA, off-site records storage facility, records storge, settlement agreement, U.S. Department of Energy, U.S. National Archives and Records Administration, Y-12 National Security Complex
UPF lawsuit: NNSA considering new, supplemental environmental impact statement for Y-12
Posted at 1:35 pm May 21, 2018
The sign at the main entrance to the Y-12 National Security Complex is pictured above on Sunday, Aug. 6, 2017. (Photo by John Huotari/Oak Ridge Today)
With a lawsuit pending, federal officials are considering whether a new or supplemental environmental impact statement is needed for the Y-12 National Security Complex after design plans changed for the Uranium Processing Facility, the largest federal construction project in Tennessee since World War II.
As part of the process, the National Nuclear Security Administration is preparing what is known as a supplement analysis, or SA. A draft of the new SA has been issued, and you can read it on the Y-12 website.
Comments on the draft supplement analysis can be submitted through June 20.
The final new supplement analysis and a record of decision could be issued by July 27, although the schedule is subject to change, according to a joint status report filed in U.S. District Court in Knoxville on May 11. The record of decision is expected to say whether a new or supplemental environmental impact statement is required for Y-12.
There was a site-wide environmental impact statement, or EIS, prepared for Y-12 in 2011. About five years later, in 2016, there was a supplement analysis prepared under the National Environmental Policy Act. It was connected to the decision by the NNSA and U.S. Department of Energy to not prepare a new or supplemental environmental impact statement after the NNSA decided on a new multi-building design for the UPF, rather than a single-building design, as part of an effort to keep project costs down, among other considerations. [Read more…]
Filed Under: Courts, Federal, Front Page News, Government, National Nuclear Security Administration, Slider, U.S. Department of Energy, United States, Y-12, Y-12 National Security Complex Tagged With: Administrative Procedure Act, Defense Nuclear Facilities Safety Board, DOE, Ed Sullivan, environmental impact statement, Frank G. Klotz, Jack Carl Hoefer, James Richard "Rick" Perry, James Richard "Rick" Perry and Frank G. Klotz, Linda Ewald, Lisa E. Gordon-Hagerty, National Environmental Policy Act, National Nuclear Security Administration, Natural Resources Defense Council, NNSA, Nuclear Watch of New Mexico, Oak Ridge Environmental Peace Alliance, Pamela L. Reeves, Ralph Hutchison, record of decision, site-wide environmental impact statement, summary judgement, supplement analysis, U.S. Department of Energy, U.S. District Court, U.S. Geological Survey, UPF, uranium processing facility, Y-12 National Security Complex
Construction authorized for main Uranium Processing Facility buildings
Posted at 1:22 pm March 23, 2018
A rendering of the Uranium Processing Facility at the Y-12 National Security Complex. (Image from May 2017 courtesy of NNSA)
Federal officials have authorized the start of construction of the three main buildings, including one for enriched uranium operations, at the Uranium Processing Facility at the Y-12 National Security Complex in Oak Ridge. It's the largest federal construction project in Tennessee since World War II.
The authorization was announced Friday by the National Nuclear Security Administration, which is part of the U.S. Department of Energy. Y-12 is an NNSA site.
The authorization came from DOE leadership, NNSA said in a press release on Friday. The authorization allows the NNSA to start construction on the Main Process Building, Salvage and Accountability Building, and Process Support Facilities subprojects, the press release said.
UPF will replace an early-Cold War plant with a modern, more efficient, and safer facility for conducting highly-enriched uranium operations at Y-12, the NNSA said. Federal officials have been saying for a while that the facility is expected to be completed by 2025 at a cost of no more than $6.5 billion. [Read more…]
Filed Under: Federal, Front Page News, Government, National Nuclear Security Administration, Slider, U.S. Department of Energy, Y-12, Y-12 National Security Complex Tagged With: construction, Dan Brouillette, DOE, enriched uranium, enriched uranium operations, highly-enriched uranium operations, Lisa E. Gordon-Hagerty, Main Process Building, National Nuclear Security Administration, NNSA, Process Support Facilities, Rick Perry, Salvage and Accountability Building, U.S. Department of Energy, UPF, uranium processing facility, Y-12 National Security Complex
Gordon-Hagerty sworn in as first female NNSA administrator
Posted at 11:05 am February 26, 2018
Lisa E. Gordon-Hagerty is sworn in by Energy Secretary Rick Perry as the U.S. Department of Energy's under secretary for nuclear security and administrator of the National Nuclear Security Administration on Thursday, Feb. 23, 2018. (Photo by NNSA)
Lisa E. Gordon-Hagerty was sworn in Thursday by Energy Secretary Rick Perry as the U.S. Department of Energy's under secretary for nuclear security and administrator of the National Nuclear Security Administration.
Gordon-Hagerty is responsible for managing and operating the NNSA in support of the nuclear security agenda of Perry and President Donald Trump, a press release said. The Y-12 National Security Complex in Oak Ridge is an NNSA site.
"Lisa Gordon-Hagerty exemplifies the leadership and institutional knowledge required to oversee the National Nuclear Security Administration," Perry said in the press release. "I am especially proud of the fact that she is the first woman in history to lead the NNSA and look forward to working together to address the administration's goal of modernizing our nuclear security enterprise."
Gordon-Hagerty has more than 30 years of national security experience, the press release said. [Read more…]
Filed Under: Federal, Front Page News, Government, National Nuclear Security Administration, U.S. Department of Energy Tagged With: administrator, DOE, Donald Trump, Frank Klotz, Lisa E. Gordon-Hagerty, National Nuclear Security Administration, national security, naval reactor, NNSA, nuclear materials, nuclear nonproliferation, nuclear security, nuclear weapons, Rick Perry, Steve Erhart, U.S. Department of Energy, under secretary for nuclear security, Y-12 National Security Complex
Gordon-Hagerty confirmed as NNSA administrator
Posted at 2:03 am February 16, 2018
Lisa E. Gordon-Hagerty was confirmed by the U.S. Senate on Thursday as the U.S. Department of Energy's under secretary for nuclear security and administrator for the National Nuclear Security Administration.
Once she is sworn in to the position, Gordon-Hagerty will be responsible for the management and operation of NNSA, supporting the nuclear security agenda of Energy Secretary Rick Perry and President Donald Trump, a press release said.
The Y-12 National Security Complex in Oak Ridge is an NNSA site.
The NNSA is a semi-autonomous agency within DOE, and it is responsible for nuclear nonproliferation, the nation's naval reactor programs, and managing and securing the nation's nuclear weapons. It also responds to nuclear and radiological emergencies in the United States and abroad; provides safe and secure transportation of nuclear weapons, components, and special nuclear materials; and has other national security missions. [Read more…]
Filed Under: Federal, Front Page News, Government, National Nuclear Security Administration, Top Stories, U.S. Department of Energy, Y-12 National Security Complex Tagged With: administrator, DOE, Donald Trump, Frank Klotz, infrastructure modernization, Lisa E. Gordon-Hagerty, National Nuclear Security Administration, NNSA, Rick Perry, Senate Armed Services Committee, Steve Erhart, U.S. Department of Energy, U.S. Senate, under secretary for nuclear security, Y-12 National Security Complex
Search Oak Ridge Today
Public Notice: Comment period extended for Draft EA for Lithium Processing Facility at Y-12
EXTENSION OF THE COMMENT PERIOD FOR THE DRAFT ENVIRONMENTAL ASSESSMENT FOR THE LITHIUM PROCESSING … [Read More...]
Public Notice: Draft Environmental Assessment Available for Lithium Production Facility at Y-12
AVAILABILITY OF THE DRAFT ENVIRONMENTAL ASSESSMENT FOR THE LITHIUM PROCESSING FACILITY AT THE Y-12 … [Read More...]
Availability of the Final Environmental Assessment for the Oak Ridge Enhanced Technology and Training Center (ORETTC) (DOE/EA-2144), Finding of No Significant Impact, and Wetland Statement of Findings
The U.S. Department of Energy (DOE) National Nuclear Security Administration (NNSA) announces the … [Read More...]
Police chief to speak to League of Women Voters on Tuesday
Martin Luther King Jr. celebration will feature ORHS principal
Controlled burns start this week on DOE land
Current status of city facilities due to COVID
Rep. Fleischmann tests positive for COVID
Oak Ridge man charged with second robbery
Mason, an IDB member, community volunteer, dies of COVID complications
Tammy Dunn appointed Oak Ridge city attorney
Which Wich closes
Obituary: David Lane Mason
A Twitter List by OakRidgeToday
Matt Bailey on Dodson also wants to serve as mayor pro tem
Mark Caldwell on Dodson also wants to serve as mayor pro tem
Tracy Powers on Planning Commission to consider Main Street apartments, plan revisions
johnhuotari on Four incumbents re-elected to Oak Ridge City Council
Levi D. Smith on Four incumbents re-elected to Oak Ridge City Council
samuel hopwood on Housing: Apartments proposed on former AMSE site
Matt Bailey on Robin Smith named Oak Ridge police chief
About Oak Ridge Today
Contact Oak Ridge Today
Copyright © 2021 Oak Ridge Today


text:
Strikes and weekly demonstrations have been going on since the beginning of December against the pension reform. Yet almost everything is stacked against the strikers. The government has a large majority in Parliament and will pass the pension reform law regardless. Opposition political parties that could have given support are weak and split. The unions themselves are weak and split. The strikes are felt by all because of the impact on public transport and to a lesser extent on schools, but few people are actually involved, and almost no one from the private sector, unlike in 1995. And Macron has a successful record of sitting out strikes with his reforms more or less intact when the movement dies down.
The government has the press, radio and television at its service. All stress the violence and 'radicalisation' of strikers and demonstrators. State radio presents Macron's record positively, announcing that from February, 80% of households will no longer pay the main local tax and all households will see their income tax reduced; not only that, but, says France Inter, unemployment has dropped, thanks to the lowering of social security contributions on the one hand, and the bonus given to people on the minimum wage since the Gilets Jaunes, on the other.
Despite all these advantages, the government has not managed to make the population accept willingly the pension reform. 60% still want it cancelled altogether after two months of protests and concessions. It has presented it badly, not as something necessary because of demographic reasons, but as necessary for justice and the end of special cases, 'one euro contributed would mean the same entitlement for everyone. And the leaving age would be the same for everyone, ie 62 legally, (but 64 if you want your full entitlement)'. It was soon clear that since not everyone will contribute the same number of euros, the pensions will not be the same. Not only that, but since the low paid live on average 10 years less than the well paid, the low paid contributions would go to pay the pensions of the better paid.
The question of wear and tear at work negates the possibility of a single leaving age. Sewage workers die 17 years before the average, it is obviously not just that they should retire at 64 like an office worker. The different schemes which the pension reform was supposed to remove exist for a reason and are here to stay.
The government therefore made a series of concessions on the leaving age, for example policemen could retire at 52; then they confused and annoyed the gendarmes by not including them in this regime! 58 railway jobs officially considered hard will give rise to the possibility of working part time (paid full time) at the end of a working life.
Airline pilots can still retire at 60. (The announcement of this clause led airline crews to cancel industrial action). Ballet dancers can still retire at 42, if employed before 2022. The 'no more exceptions' rationale of the reform has been blown to pieces. The State Council (that decides on the constitutionality of government measures) has declared the reform unacceptable in its present (amended) form.
The government made other exceptions, e.g. Bonuses will count towards calculations of the average income over 25 years. This is to compensate civil servants' drop in pensions with the new reform. Except that not all civil servants get bonuses.
Another objection, felt particularly by certain professions, for example la Caisse de retraite du personnel navigant (CRPN) the retirement fund of flying airline personnel, is the move from unions or employee groups being in charge of pension funds to the state being in charge instead. Since some pension funds are in surplus, they are justifiably unhappy that the ministry of Finance will take over the money.
Also concerning the better paid professions, the amount they can contribute to the public pension scheme will be capped; if they want to contribute more, they will have to use private pension funds, such as Black Rock. Here Macron giving the Légion d'Honneur to the CEO of Black Rock France after launching the reform did not go down well.
This capping means a decrease in employer spending (they no longer need to contribute a percentage of wages on the part of wages over 120,000 euros a year) and a loss of revenue for the state (the employee does not pay contributions after the first 120,000 euros, or rather they do, but at the rate of 2,8% rather than 28%). Between 200,000 and 300,000 people fall in this category.
Since at least Sarkozy, who said labour should be as good a source of income as capital, people have been aware that the part of labour in GDP has fallen compared to dividends. The pension reform is seen as a further reduction of income, which it clearly is, and part of an on-going unfair trend.
Finally, the rule that people born before 1975 would not be concerned by the reform but only their children was not impressive and did not impress.
As far as women are concerned, the reform will worsen their situation; at present divorced women were entitled to a reversion pension if their ex-husband died, this is no longer the case. Today women receive a bonus in terms of years contributions for each child. The reform will give a 5% bonus to either parent instead. If the husband takes it because he is paid more at the time the decision is made, the mother will receive nothing in case of divorce. Today one in five retired women is divorced; in generations post 1975 the number will be much higher, as will the number of single mothers never married. What happens to them is not clear.
Nevertheless, and despite various actions by various professions (lawyers throwing their copies of the Code Civil at the feet of the minister of Justice, actors closing down theatres minutes before the start of a performance, employees at the Louvre closing the museum in the faces of queueing tourists, electricity supply employees shutting down parts of the grid without warning), it seems that Macron's persistence will wear the strikers out. Will all this have lasting effects, or will people just get used to the new state of affairs? Will all this have an effect on the local elections in March?
Local elections are popular, with over 63% participation in 2014; they are also seen as a judgment on the sitting government. They are therefore a worry for Macron, since his party, or movement, La République en Marche (LRM) did not exist at the last local elections, and has almost no local implantation in the 35,000 towns and villages that have a mayor and a municipal council. He is more popular in the few large urban centres, and less so in the thousands of small towns. The statistics therefore won't look good for him when the results town by town are announced.
His strategy for not appearing to fail is threefold.
First tactic, don't present LRM candidates. Only 54% of candidates put forward by the majority for local elections belong to his movement; the rest belong to other parties. Outgoing mayors are often popular and solidly implanted, therefore the government has decided to support them rather than risk defeat by presenting their own.
Next, create a new political nuance 'divers centre', an umbrella including LREM, and make it a rule that a candidate supported by LREM is counted in official statistics as 'divers centre', regardless of his actual affiliation.
Thirdly, the political affiliation of lists in towns of less than 9,000 inhabitants will not be recorded in the official statistics when results are presented to the public nationally. That removes 93% of the total number of towns and villages, and 49% of the population from the official results. (Previously towns below 3,500 inhabitants were not recorded).
All this was done by a circular from the minister of the Interior in early December, still being discussed end of January.
The divers centre label will be attributed to Macron's party if the list was presented by his party, but also if it was supported by his party. (LRM support is split 2/3 for right lists and 1/3 for left.) There is opposition to this manoeuvre from both right and left. In Toulouse and Nice for example the outgoing mayor is supported by both LR (Sarkozy's party, Les Républicains) and LRM, but LRM wants to have him classed as 'divers centre', ie LRM. Naturally LR are not happy, even if the candidates welcome the extra support.
This category 'divers centre' is not a label but a 'nuance' [in French in the original]. The préfet (head of the département) attributes the nuance to the list proposed, which allows him to attribute the nuance 'divers centre' as he likes. Candidates on the list can protest and have it changed. If a list is supported by Macron's party, it will be counted as 'divers centre', even if the head of the list declared himself as representing another party. When results are announced officially, it is the nuance that will be made public, not the actual affiliation.
Macron has a further difficulty, which he can perhaps exploit to his advantage. He has allowed two members of his own party to stand for the same city, giving himself the let out clause that they did not win that municipality because they were split (rather than unpopular); this happened in Paris as explained in the last Froggy, but also Biarritz, Lyon, Villeurbanne, Annecy, Metz and Besançon. His supporters say that Macron allowed this situation to develop because he comes from the world of business, where internal competition is supposed to let the best man win, rather than a political leader, who places his favourites in good places, and lets it be known that his decision is final. Add to that the new party/movement does not have strong and effective personalities that would be obvious choices; most of his MPs are novices: 95% of those elected to Parliament in 2017 had never been MPs before. Political personalities come from local politics, and this is still true today.
The lack of a clear political alternative to Macron explains his success. He has support among the dynamic and successful, who have jobs that take them abroad, often working in the medium of English. On the international, or Anglo-Saxon circuit, Macron's reforms are popular, they align with conditions in Sweden and the UK for example. Foreign colleagues object to the French social model and indulge in 'French bashing'; this has diminished with the advent of Macron.
Partisans of the French social model are divided. One massive division is between Muslim and non-Muslim. The old red belt round cities has become immigrant ghettoes. The obsession of the left with so-called secularism and identity politics are almost designed to keep people with similar class interests apart. The attention of the young is further diverted because of climate fears. Macron does not have answers to multiculturalism or the environment, but these questions do not impede his progress. Despite his clumsiness and lack of rapport with the masses, despite the sacrifices made by the Gilets jaunes, and the dedication of the strikers, Macron still holds the upper hand.
After this article was written, the State Council (body that looks at the constitutionality of government directives) has overruled the disposition regarding the 9000 inhabitants and the attribution of 'Various Centre' to lists supported by LREM.

redpajama_set_name: RedPajamaCommonCrawl


text:
Home / Products / "Come Up and Fight" Original Painting by Gareth Hector
"Come Up and Fight" Original Painting by Gareth Hector
Now is your chance to own a one-of-a-kind masterpiece by renowned artist Gareth Hector, depicting Pappy Boyington and his Black Sheep pilots in action over Bougainville island during October 1943.
The detail is magnificent from Pappy in the cockpit of his F4U Corsair to the gradient of the tropical water below. It's easy to see how this painting took Gareth more than a year to create!
This original oil painting on canvas is sized at 40" x 20", and is sold unframed. A no-interest payment plan is available upon request.
This is the only Gareth Hector painting that we have available for sale so don't wait to purchase this ultimate collectible!
Born in 1973, Gareth found an early passion for painting and military history while growing up in Scotland.
He would go on to a successful career in the world of computer animation and digital painting, working on projects such as Medal of Honor, Doctor Who, and Halo.
In the aviation art field, Gareth's work most frequently appeared on the cover of Osprey publishing's aircraft books and on aviation magazines spanning Aviation History to Aeroplane.
In 2010, Gareth dusted off his oil paints and returned to his love of traditional painting after a 15 year hiatus.
Since his rebirth as an oil painter, his original paintings have found their way into the collections of the CIA, RAF and Marine fighter squadrons, and in private homes across the globe.
THE rising star in the world of military artwork, we're proud to bring "Outrun the Eagles" to you now and look forward to bringing you more stunning works by Gareth in the coming future!


text:
Macrocarpaea macrophylla är en gentianaväxtart som först beskrevs av Carl Sigismund Kunth, och fick sitt nu gällande namn av Ernest Friedrich Gilg. Macrocarpaea macrophylla ingår i släktet Macrocarpaea och familjen gentianaväxter. Inga underarter finns listade i Catalogue of Life.

Källor

Gentianaväxter
macrophylla

redpajama_set_name: RedPajamaWikipedia


text:
Nintendo's Switch Lite Is Selling Like Crazy, JoyCon Drift Be Damned
By Joel Hruska on October 31, 2019 at 4:05 pm
The Switch Lite is selling incredibly well for Nintendo. The company revealed during its last quarterly report that it shipped 1.95 million Switch Lite consoles in the first ten days it was available. That compares well even against the Switch, which sold 2.74 million units in its first month on shelves when it launched in April 2017.
The Switch Lite's performance is a bit surprising for two reasons: It's a less expensive version of a new console, not a brand-new system, and the price difference between the two is not as large as some of the other consoles on the market. At $199, the Switch Lite is definitely cheaper than a $299 Switch, but it's not an enormous difference. It's also got a significant negative stacked up against it — JoyCon drift. JoyCon drift is a problem where JoyCon controllers begin to register ghost "input" that occurs with no one actually touching the controller. It's completely separate from any calibration problem, and we know the Switch Lite suffers from it — reports of JoyCon drift on the Switch Lite began to surface almost as soon as the console launched.
But any fear that the drift problem might lead to sales problems was apparently wrong. Nintendo has racked up huge results for the console in just the first few weeks. Nintendo moved 4.8M Switch consoles this quarter and 1.95M of them were the Switch Lite. Game sales were up 48 percent thanks to the strong performance of titles like Link's Awakening. The Switch family is projected to beat the SNES lifetime (49.1M units) and could even top the 61.91M units sold over the lifetime of the original NES. Super Mario Maker 2 (3.93M units), Fire Emblem: Three Houses (2.29M units) were the other two major titles called out for top performance this quarter.
It's striking to see how strong the Switch is performing in comparison with the last major handheld that Nintendo launched. The 3DS had major problems at launch, with slow sales and a weak game lineup. A lot of articles were written about how mobile games and handheld titles were eating the entire market, and consoles like the 3DS might be a casualty of this process. I remember thinking that the 3DS could probably be flipped into a success, but that the console would be unlikely to repeat the DS' success. That's more-or-less how things played out for Nintendo, while Sony was driven out of the handheld market altogether.
Given the rocky situation for handhelds, you might have expected Nintendo to move away from them altogether. Instead, the company explored the concept in two stages, first with the Wii U's handheld controller (which generally failed), and then with the Switch, which rather obviously hasn't. It's an interesting example of how Nintendo was willing to stick with a concept and polish it when other companies might have pulled the plug and gone back to building more conventional living-room hardware. Instead of treating the Wii U as if it failed because of the controller, Nintendo obviously decided that it failed because the controller wasn't an independent gaming system capable of running the living room games people wanted to play while simultaneously providing on-the-go options.
Sony and Microsoft continue to cater to the more traditional gaming crowd, and Nintendo's JoyCon drift problem is a severe issue that the company should fix whether its hardware is popular or not. But the Japanese firm has a knack for finding the right way to zig when others are zagging.
No One Can Figure Out What Causes Performance Hiccups in Link's Awakening on Switch
Joy-Con Drift Is Still a Problem on the Nintendo Switch Lite
The New Nintendo Switch Delivers Vastly Improved Battery Life
Link's Awakening


text:
Exit polls forecast big win for BJP in Maharashtra, Haryana
PTI Last Updated: October 21, 2019 | 23:51 IST
(Eds: Updating figures) New Delhi, Oct 21 (PTI) The BJP appears to be set to retain power with a bigger mandate in Maharashtra, where it is in an alliance with the Shiv Sena, as well as in Haryana, as exit polls have forecast a facile victory for the party in the two states and a rout for its rivals, led by the Congress. Exit polls, broadcast soon after polling for the Maharashtra and Haryana Assembly polls was concluded on Monday, varied widely in their projection of seats for the rival alliances, but were in no doubt about an emphatic victory with more than two-thirds seats for the BJP-led NDA in both the states. The India Today-Axis exit poll projected 166-194 seats for the BJP-Shiv Sena in the 288-member Maharashtra Assembly and 72-90 for the Congress-NCP alliance. The exit poll by News18-IPSOS gave the BJP a near-majority on its own by predicting a whopping 142 seats for the saffron party and 102 for its ally Shiv Sena. The Congress and the NCP would bag 17 and 22 seats respectively, it predicted. The ABP-C Voter predicted 210 seats for the BJP-Shiv Sena and 63 for the Congress-NCP, while the corresponding figures by Times Now were 230 and 48. In Haryana, the BJP win was predicted to be even more dominant. The ABP-C Voter forecast 70 and eight seats for the BJP and the Congress respectively in the 90-member House. The CNN-IPSOS projected 75 and 10 seats for the two parties respectively. The Times Now survey gave the BJP and the Congress 71 and 11 seats respectively. The poll of polls brought out by NDTV gave the BJP and the Congress 66 and 14 seats respectively in Haryana, and 211 to the saffron alliance and 64 to the Congress-NCP in Maharashtra. The BJP had brought the issue of nullification of Article 370 of the Constitution and national security at the centre of its campaign, with development works of its state governments playing the second fiddle. In 2014, the BJP and the Sena had won 122 seats and 63 seats respectively in Maharashtra, followed by 42 and 41 seats by the Congress and the NCP. All four parties had contested the polls independently. In Haryana, the BJP had won 47 seats, followed by the Indian National Lok Dal's (INLD) 19 and 15 of the Congress. PTI KR RC
Romana hit and run case: J&K court awards life sentence to accused
Orissa HC adjourns contempt hearing over lawyers' strikes to Nov 4


text:
On a beautiful day in May 1869, a monumental decision was made on the part of twenty earnest men and women to establish a Baptist Congregation. They met in a little old red schoolhouse and adopted the Articles of Faith and the Church Covenant as it was published in the Baptist Church Members Handbook. The organization, called The First Baptist Church and Society, elected trustees in June and became legalized before Ralph Fowler, the founder of the village, who was then Justice of the Peace, and on July 12th, it was recorded by the clerk in Livingston County.
Courtesy of Michael Grimm
The congregation must now have a building to meet in, so after four busy years, the first church building was built on North Ann Street, the land being given by Ralph Fowler. Two years later the men moved the building to a lot on the northwest corner of East Grand River and Maple Street.
In September of 1890, there was a ground breaking ceremony for the present church building. At this gathering, Pastor C.C. Willet read from Psalm 127:1, "Except the Lord build the house, they labor in vain that build it…" Other passages were read, a hymn was sung, a prayer for God's blessing on the work, and then the Pastor dug a spade of turf and declared the work of excavation commenced for a church, "to the glory of God and in memory of William Carey, originator of the Baptist Missionary Society."
From the first pastor to its current pastor, the leaders of the First Baptist Church of Fowlerville have sought diligently to further the goals of the founding members of this church. They have sought to promote the true worship of God, to foster Christian fellowship, to share the gospel in their community and around the world, and to educate the next generation so that they too will set their hope in God.


LOS ANGELES (AP) _ In a matter that has raised delicate questions of church and state, the Los Angeles school district is being asked to approve a so-called charter school that would use reading textbooks written by Scientology founder L. Ron Hubbard.
Special education teacher Linda Smith, a 20-year member of the Church of Scientology, wants to set up a 100-student charter school in suburban Tujunga that would rely on texts employing Hubbard's "study technology."
"These are incredible study techniques ... that have nothing to do with religion," Smith said. She said she has used the books to teach reading for more than 20 years "with stellar results."
This page was last modified on 8 April 2019, at 13:38.


This page presents the Google satellite map (zoomable and browsable) of Cattle Creek in Queensland.
Geographical coordinates are -24.250000000 and 143.616668701 and its feature type is Stream. More information below.


Arm® Cortex®-M0+ Software Design is a 2-day class for software engineers developing software for platforms based around the Arm Cortex-M0+ processor core. Including an introduction to the Arm product range and supporting IP, the course covers the Arm Cortex-M0+ programmer's model, instruction set architecture and software development tools.
The class includes a number of worked examples developed by Arm to reinforce the lecture material.
Software engineers writing application and system software for platforms using the Arm Cortex-M0+ processor core.
Some knowledge of embedded systems.
A basic awareness of Arm is useful but not essential.
Knowledge of programming in C.
Experience of assembler programming is not required but would be beneficial.
Arm and Cortex-M0+ are registered trade marks of Arm Holdings Plc.


2017 saw Natasha release four new songs, including "Let Go" and "Hey Boy." However, her personal life took center stage in the latter half of the year; she announced her pregnancy in the fall, and her son Solomon was born on December 31st.
In February, Natasha said she was "really determined to get some of the best music and art that I've made out and into your ears". Now that she's back in the studio, we can't help but wonder: might a new album be in the cards for 2018?
Natasha's last album, Strip Me, came out an astonishing 8 years ago. Since then, Natasha has spent the better part of the past six years writing and recording, yet a full record still eludes us. Though we've gotten plenty of songs here and there over the years, fans are desperate for a full-length release. Here's hoping we'll finally get album #4 this year!
It's exciting to know that new Natasha music could be coming our way. Catch up on all we know about the long-awaited fourth album. Keep checking back here for all the latest Natasha Bedingfield music news.


text:
Q: iPhone LocationManager - Getting Coordinates at App Start I'm getting the location through - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation. It should work when you move (can't really test it in simulator, at least I don't know how) but when I first load the app, the mapview is focused on the whole world, not just my location. Can I anyhow call the method to change the location on first view?
Here is my current code if it helps:
http://pastebin.com/9Sb2xVmE
http://pastebin.com/rh9WB2ca

A: If your using mapkit:
Have you tried
setRegion:(MKCoordinateRegion)region animated:(BOOL)animated

Example:
CLLocationCoordinate2D coord = {latitude: 61.2180556, longitude: -149.9002778};
MKCoordinateSpan span = {latitudeDelta: 0.2, longitudeDelta: 0.2};
MKCoordinateRegion region = {coord, span};

[mapView setRegion:region];

this should zoom the mapview to your desired size, while maintaining focus on the center.
If your using CoreLocation:
Heres a checklist of what might have gone wrong:

*

*Did you remember to import

*Do you have a location manager (locationManager = [[CLLocationManager alloc] init];)

*Is the code mentioned within the delegate of the location manager ?

I advise you to go to this page : Getting location of a iOS device with objective-C and follow the tutorial bit by bit. That should help you out.
Also, heres the mapkit docs
Best of luck with your project :]

A: we cant able to get the current location by running it in simulator. if you run the application in device it will show the correct location. In simulator it will show the default loaction as califorina(apple head quaters).

redpajama_set_name: RedPajamaStackExchange


text:
We Are Pilots es el álbum debut de la banda de Los Ángeles, Shiny Toy Guns. Fue lanzado el 17 de octubre del 2005 por Universal Motown y es el tercer lanzamiento de la banda tras sus dos álbumes lanzados independientemente y también titulados "We Are Pilots", Los críticos lo titulan como la versión 3.0.
El álbum contiene el sencillo "Le Disko", fue usada en el publicitado comercial de la serie de televisión de realidad America's Next Top Model "Cycle 8". Le Disko también es utilizada como banda sonora del juego de Playstation, Burnout Dominator y "You Are The One" es utilizada para el videojuego FIFA 07.

Lista de canciones
 "You Are the One" – 4:31
 "Le Disko" – 3:23
 "Starts With One" – 3:46
 "When They Came for Us" – 4:25
 "Don't Cry Out" – 4:10
 "Chemistry of a Car Crash" – 3:51
 "Waiting" – 4:21
 "Rainy Monday" – 4:00
 "Jackie Will Save Me" – 3:59
 "Shaken" – 3:44
 "We Are Pilots" – 4:15
 "I Promise You Walls" – 4:08 bonus track exclusivo para (Best Buy)
 "Weather Girl" - 4:42 bonus track exclusivo para (iTunes)
 "Rocketship" - 3:32 bonus track exclusivo para el (RU)

Personal
 Chad Petree – guitarrista, vocalista
 Carah Faye Charnow – sintetizador, vocalista
 Jeremy Dawson – sintetizador, bajista
 Mikey Martin – baterista

Álbumes de 2006
Álbumes de música electrónica
Álbumes en inglés


text:
Make a Grand Entrance at Oak Alley Plantation
Let Our Friendly Crew Welcome You
Admire the Views from the Paddlewheeler Lounge
The 2nd Modern Riverboat on the Mississippi
Discover Civil War History
Enjoy True Southern Hospitality
Savor the Seasoning
Relax in Comfort on Your Private Balcony
Explore the French Quarter of New Orleans
Art and Culture Abound
Travel to the Popular Jackson Square
Visit Elvis' Graceland
Enjoy an epic 15-day journey on our Grand Heartland Cruise. This cruise on the Mississippi River travels from the northern reaches of St. Paul all the way down to the basin in New Orleans.
View the dramatic landscapes of the Upper Mississippi River which have long inspired artists, writers, and steamboat passengers. Visit Hannibal, the hometown of Mark Twain where the characters in his most popular works come to life. Immerse yourself in the culture of Memphis, the mid-South's most vibrant city, famous for Blues and BBQ.
As you journey down the river, hear stories about southern life on the plantation and tour historic Civil War sites led by our local area experts. On your final stop, New Orleans, enjoy privileged access to its vibrant music scene and the best in Cajun and Creole cuisine.
Just as it was in Mark Twain's day, every cruise on the Mississippi River is unique due to fluctuating river conditions that can have an impact on our itinerary. The river has a mind of its own and our sailing schedules must adapt to it. This is part of the adventure and American Cruise Lines will always work to provide a seamless travel experience.
Coming in the summer of 2019 - American Harmony, the second in our series of new modern riverboats. Click here to learn how this new ship will revolutionize U.S. river cruising.
Complimentary Package
Red Wing, MN
Fort Madison, IA
Day of River Cruising
Journey the length of the Mississippi River on this extraordinary two-week cruise. The Grand Heartland cruise offers guests a front-row view of 10 states aboard one of the most comfortable authentic paddlewheelers or modern riverboats on the Mississippi.
Reverse itineraries available. Please contact your Cruise Specialist for more information. Excursions subject to change.
Pre-Cruise
Each Mississippi itinerary comes complete with a Complimentary Pre-Cruise Package, providing you with a seamless way to board the ship and explore the local area. Arrive the day before your scheduled cruise date and American Cruise Lines will handle the rest. The package includes a premium hotel stay, where you can enjoy the city at your leisure. On the morning of the cruise, meet in the hotel lobby after breakfast and we will transport you to the ship to begin your cruise. All luggage will be brought directly from the hotel and placed in your stateroom aboard the ship.
Pre-Cruise Packages must be reserved at least 30 days before your cruise date.
St. Paul is a thrilling place to begin your adventure on the Mississippi River. History buffs will enjoy a walking tour of Summit Avenue, which showcases gorgeous historic mansions built in the late 1800's. St. Paul's enchanting art galleries, world class museums, and entertaining stage performances will capture your imagination.
Nestled among the scenic bluffs of the upper Mississippi River, Red Wing's beauty has inspired artisans and craftspeople for over 150 years. Red Wing delivers a diverse blend of arts, entertainment, and activities for your pleasure. Enjoy a show at the historic Sheldon Performing Arts Theatre or observe the beauty of nature at one of Red Wing's 38 parks.
National Eagle Center - Complimentary Excursion
Witness bald and golden eagles like never before, face-to-face! The National Eagle Center offers a unique viewing opportunity that brings visitors within a few feet of these majestic creatures with no barrier in between. This is an experience like no other and one you will never forget.
Red Wing City Excursion & Pottery Museum - Complimentary Excursion
Travel back in time, as you tour the beautiful city of Red Wing. Led by our local expert guide, view some of the most impressive Victorian homes of the period, as well as the historic St. James Hotel. Visit the Pottery Museum of Red Wing and admire the numerous vintage pieces of artisan-crafted stoneware, art pottery, dinnerware, and folk art.
Step into 19th-century America in La Crosse, located on the banks of three legendary rivers. Riverboats depart from the city's Riverside Park which features international friendship gardens with landscape styles from around the world. Visit the Riverside Museum which traces the rich history of La Crosse or Dahl Auto Museum with an expansive collection restored classic cars. Explore Grandad Bluff Park with walking trails which offer spectacular views of the city.
Hixon House & La Crosse Experience
Take a narrated tour of this wonderful city. Discover the historic downtown with its late 19th and early 20th-century buildings, as well as the well-preserved residential neighborhoods. Gain insight into LaCrosse's development, from the boomtown riverboat days and roaring '20s to the challenges and opportunities of the 21st century. Visit the Hixon House, an authentic Victorian home and designated Historic Landmark, which has retained 90% of its original furnishings.
La Crosse Queen Eco Cruise
Cruise along the scenic Mississippi River on a classic paddlewheeler, as your tour guide highlights current and historical facts about the area and tests your knowledge with trivia along the way.
Witness some of the most beautiful views in the Midwest, including native wildlife and steep bluffs on the river. Learn about the locking process while cruising past the Lock & Dam No. 7 in Dresbach, MN.
A "Masterpiece on the Mississippi," Dubuque is among the oldest settlements west of the river. Take a ride on the Fenelon Place Elevator, the world's shortest and steepest scenic railway, or try your luck in one of Dubuque's state-of-the-art casinos. View colorful Victorian mansions, stroll through the bustling downtown area, or visit the national Mississippi River Museum and Aquarium.
Delight in Dubuque
Step back in time and experience the elegance of Victorian-era Dubuque during a tour through the town's many historic attractions. Learn about the architecture, families, and events that made 19th-century Dubuque such a unique treasure. Your guide will lead you through Dubuque's beautiful historic sites, including the Mathias Ham House and The Old Jail Museum.
National Mississippi River Museum & Aquarium - Complimentary Excursion
Take an entertaining and informative journey along the mighty Mississippi at the National Mississippi River Museum & Aquarium. The museum's interactive exhibits will give you an inside look at the Mississippi River's past, present, and future. On this guided tour, learn about the lives of the pioneers, explorers, and artists who once lived along the Mississippi River. Get close to nature, as you make your way through six large aquariums.
Voted one of the Most Livable Small Cities in America, Davenport is often described as a lively, active city with a hometown feel. The Legacy of John Deere, the largest agricultural exhibit in the world, resides here. Music enthusiasts will enjoy Davenport's many festivals, including the Mississippi Valley Blues Festival, The Mississippi Valley Fair, and the Bix Beiderbecke Memorial Jazz Festival.
John Deere Pavilion & Davenport Exploration- Complimentary Excursion
Enjoy a stop at the John Deere Pavilion and Store. The company's rich heritage is chronicled in exhibits, interactive touch screen displays, and equipment dating back nearly 175 years, including antique tractors and giant modern combines. Continue on a narrated city tour of Davenport and learn about the Rock Island Arsenal, Davenport native Bix Biederbecke's contribution to Jazz, Rock Island's 1920's "Crime Lord" John Looney, the area's beautiful college campuses, and the city's Native American history.
Black Hawk State Historic Site - Complimentary Excursion
Enjoy a guided tour of the Hauberg Indian Museum. Located in the Black Hawk State Historic Site, this museum interprets the story of the Sauk and Meskwaki Indians who once called it home. During the tour, view full-size replicas of Sauk winter and summer homes, dioramas with life-size figures of the Sauk and Meskwaki Indians, and traditional artifacts, including authentic trade goods and jewelry.
Founded as an active military outpost in 1808, Fort Madison was one of three posts established by the U.S. Army to maintain control over the newly acquired Louisiana Territory. Today, Fort Madison offers visitors a vibrant cultural scene, bucolic landscapes, and an active agri-tourism industry which celebrates the American heartland. Explore its many historic districts, where you can admire the well-preserved Victorian and Post Renaissance architecture. Enjoy the area's museums, unique boutiques, antique shops, as well as the local breweries and wineries.
Historic Fort Madison Exploration - Complimentary Excursion
Step back in time to when the Mississippi River reached to the railway line, when breweries and distilleries reigned supreme, and where a garment district attracted the likes of Chicago gangsters who came to buy their "Hesse" suits during the roaring 20s. Stop at Fort Madison, an active military outpost from 1808 to 1813 and the only known War of 1812 battlefield in the state of Iowa. Visit the Iowa Territorial Prison, the longest continually used penitentiary in the United States, operational from January of 1839 to August of 2015. View the original 1839 cell block which still stands in testament to the frontier justice that was handed out throughout the heartland.
Lee County Agri-tourism Excursion
Enjoy an exploration of two working farms in rural Lee County.
Stop at the Hinterland Dairy Farmstead Cheese, a working farm where a farmer will tell you about its history, how production works, as well as other insights about life at the farm. Explore the brand new state-of-the-art cheese production facility and learn about the process of cheese making from start to finish. Stop at the onsite shop featuring all Iowa-made products and of course, the cheese!
Visit the Harvestville Farm, a 5th generation family farm. Explore the farm, enjoy a trip through the corn maze, browse through the retail barn, and even take a wagon ride through the acreage. You will have an opportunity to pick up some homemade treats and goods that are either made right there on the farm or by a local vendor.
Hannibal, "America's Hometown," is a place where you can rediscover adventures from Mark Twain's era. Tom Sawyer and Huck Finn come to life in this charming Missouri town, where you can run your hand along Aunt Polly's fence, explore Injun Joe's Cave, and get reacquainted with one of the world's most beloved authors. The downtown area is a thriving haven for artisans, filled with specialty shops unique to Hannibal.
Mark Twain Boyhood Home & Museum - Complimentary Excursion
As you arrive in Hannibal, the boyhood home of famous author Mark Twain, relive the author's experiences that heavily influenced his writings. Visit the actual home that Mark Twain grew up in, which is surrounded by the legendary whitewashed fence of Tom Sawyer. The vivid stories told by Mark Twain come to life at this interactive museum. Visit the Becky Thatcher House, the Huck Finn Home, and the Tom and Huck Statue at the foot of Cardiff Hill. Stop at the Interpretive Center, home to 15 original Normal Rockwell paintings.
Rockcliffe Mansion & Trolley Excursion
Relive the adventures of Mark Twain's time in Hannibal during this historical trolley tour. Your experienced guide will share the history of Hannibal and take you to places of significance, including the Rockcliffe Mansion, an amazing 13,500 square foot American castle built to overlook the mighty Mississippi River. This excursion will also highlight many of the exciting places which inspired Mark Twain's famous tales.
Mark Twain Walking Exploration
Join your local guide strolling through the streets of Hannibal, the hometown that inspired Mark Twain's famous literary novels. Learn about its history through the author's own words and observations.
St. Louis is often referred to as the "Gateway to the West." Take in the Gateway Arch Riverfront, highlighted by the Gateway Arch, the largest man-made monument in the U.S. Enjoy St. Louis' many world-class attractions, including the Art Museum, Science Center, Anheuser-Busch Brewery, and the Missouri History Museum. End your day by relaxing at the Missouri Botanical Garden, one of the world's most popular public gardens.
Missouri History Museum
Enjoy a guided tour through two of the museum's most popular exhibits; The 1904 World's Fair: Looking Back at Looking Forward, an event that attracted over 200,000 visitors to the opening day, and Seeking St. Louis, delve into the history of the Gateway City from its founding through the new millennium.
Please Note: This tour is only offered on cruises ending in St. Louis, MO and on the Complete Mississippi and Grand Heartland itineraries.
Discover St. Louis - Complimentary Excursion
Enjoy a narrated tour of downtown St. Louis, the riverfront, Citygarden, and the historic neighborhoods of Soulard and Lafayette Square. Delight in a visit to St. Louis' 1,371 acre Forest Park, known as a natural oasis in an urban environment. Stop at the Cathedral Basilica, where you explore the interior if this stunning church which rivals the cathedrals in Rome, Italy.
Please Note: This tour is only offered on cruises ending in St. Louis and on the Complete Mississippi and Grand Heartland itineraries.
Curl up with a good book in one of our spacious lounges, or grab a pair of binoculars and enjoy the fall foliage as we make our way down the Mississippi River.
Excitement resonates as you reach America's third-largest inland port, famous for Blues, BBQ, and Elvis Presley's Graceland. The city has been at the forefront of several American cultural movements such as Civil Rights and Rock 'n' Roll. In fact, the city's Beale Street is often called "America's Most Iconic Street" due to its significance to our country's history and contributions to the music industry.
Memphis City Experience - Complimentary Excursion*
Relax and let your guide show you the highlights of this fascinating City on the Bluff. Memphis is located on the Mississippi River at the northern end of the Mississippi Delta where the Blues was born, with a history linked to cotton and music. On this narrated excursion, view Mud Island, a Mississippi River Educational Park; Cotton Row, where 60% of the nation's cotton was once traded; National Civil Rights Museum, where Dr. Martin Luther King, Jr. was assassinated; and The Pinch District, Memphis' first neighborhood which was a melting pot of immigrants, mostly Irish immigrants who came to America to escape the Potato Famine.
For cruises starting in Memphis, this tour is only offered as part of the 2-day Pre-Cruise Package.
Deluxe Graceland Exploration
No trip to Memphis is complete without a trip to the home of the "King of Rock n' Roll," Elvis Presley. The full Graceland experience will take you from Elvis' humble beginnings through his rise to super stardom. See where Elvis lived, relaxed, and spent time with his family and friends. Explore the famous "Jungle Room" where the star recorded one of his final albums. Visit the many onsite museums where you can view Elvis' many jumpsuits and gold records, as well his collection of automobiles and custom jets.
This is a Signature shore excursion and should be reserved in advance. Please call (800) 460-4518 for information.
Spend a beautiful day with friends in one of the ship's comfortable lounges as we explore the river from Memphis to Vicksburg.
U.S. history is alive in Vicksburg. This "Queen City of the Bluff" offers plenty of opportunities to take a step back in time. Civil War battlefields, century old churches, cotton fields, and restored train depots are just a few of the many intriguing landmarks that await your visit. Marvel in the beautiful antebellum-style homes and learn about Vicksburg's rich history as displayed on the riverfront murals.
Vicksburg National Military Park - Complimentary Excursion
The night before our visit, our onboard Civil War historian gives a captivating lecture detailing all you are about to witness at Vicksburg National Military Park. After a hearty southern-inspired breakfast, you will be greeted by our private tour guide who will stay with you throughout the day to answer questions and provide additional information. Upon arrival at the park, rangers who are well-versed in Civil War history guide you on a customized tour that's specific to the interests of the group. Your guides will take you through the restored ironclad gunboat, U.S.S Cairo, the battlefield where the Siege of Vicksburg took place, and the over 1,300 monuments dedicated to the brave souls who lost their lives.
Settled in 1716, Natchez is rich in history and southern hospitality. Enjoy a guided exploration of this fascinating city which has retained its antebellum charm since its surrender during the Civil War. Visit Frogmore, a historic cotton plantation still in use today, or attend a special piano concert in the J. N. Stone music room.
J.N. Stone House Tour & Concert
Upon arrival, you will be greeted by the fourth-generation owner, Joseph Stone, whose family has owned the home for over 135 years. Mr. Stone will guide you on a personal tour of his unique antebellum-style home and explain the many different purposes it has served over the years. Here, you can explore his eclectic collection of period-specific artwork and one-of-a-kind antiques. The afternoon concludes in the music hall with refreshments as Mr. Stone performs an exclusive classical piano concert.
Frogmore Plantation
Our onboard experts tell many stories about southern life on a plantation; today you will learn what life was really like. Our insightful local guide will accompany you from the ship to the cotton and will be your escort as you explore the 1,800-acre cotton plantation. In intimate groups, owners Lynette and Buddy Tanner will delve into plantation life, including the housing, music, and relationships between the owners and workers. You will have the opportunity to pick cotton directly from the field, participate in a live gospel performance, and witness the progress in cotton technology from Eli Whitney's original gin to their modern 900 bales-per-day computerized plantation.
Historic Longwood Exploration - Complimentary Excursion
Longwood is just one of the elegant historic houses that graces the historic district of Natchez. This octagonal house epitomizes the rise and fall of the South. As the Civil War began, the workmen stopped construction and the house was never completed. View the finished first floor with original family furnishings and the upper five stories that are still a work in progress.
Natchez Shuttle - Complimentary Excursion
Explore downtown Natchez on your own. Take time for shopping and strolling through town. The shuttle will make regularly scheduled stops at Rosalie House, the Natchez Visitors Center, and the downtown shopping district.
Experience the wonder of Baton Rouge, Louisiana's capital and one of the most historic and unforgettable cities in the South. Known as the Red Stick, Baton Rouge has everything you would expect to find in a state capital, but with a down-home flavor that is part of its charm.
USS Kidd
Known as the "Pirate of the Pacific," this Fletcher-class destroyer is a memorial to the men and women who served in the American armed forces. Step back in time on this amazing tour as you witness original artifacts and aircraft from World War II.
Historic Baton Rouge Exploration - Complimentary Excursion
The vibrant history of Louisiana is evident throughout the state's capital. After breakfast, you will be greeted at the ship by Philippa Blair and her visitor center representatives as they welcome you to Baton Rouge with vibrant Mardi Gras beads. Your first stop is the Louisiana Old State Capitol where you will experience a one-of-a-kind interactive film, made with the help of Disney, bringing you face-to-face with the ghost of the castle, Sarah Morgan. Afterward, Baton Rouge native, Ira Bobin, will serve as our tour guide and will bring you to the Louisiana State Museum, a completely interactive museum with three floors of displays detailing each region of Louisiana.
Welcome back to New Orleans, the birthplace of Jazz. Culture and art abound around every corner of this unique city. The open-air artist colony proudly displays local works on the iron fence in Jackson Square, while the city's 45 museums carefully preserve its rich history. Stay an extra day or more to enjoy the famed French Quarter.
New Orleans City Excursion
New Orleans is a city full of history, intrigue, and colorful characters. Begin your journey through the "Big Easy" with a private tour guide, who will give you a local's look at the area's most famous attractions. Explore the most popular areas including the French Quarter, the colorful garden district, and the famous stately mansions which still remain in period form. There will be plenty of time for you to enjoy the local flavors, like chicory coffee, sweet beignets, and famous New Orleans Jazz music.
Please Note: This tour is only offered on cruises ending in New Orleans, LA
This 11-day cruise visits the most sought after destinations of the Lower and Upper Mississippi River. As you travel through the Heartland, delight in the rich history and beautiful landscapes that surround you.
Featured Onboard Experts and Performers
We carefully select onboard experts and performers to host enrichment programs that bring the local history, nature, and culture of the Mississippi River to life.*
Ideal Viewing Locations
Aboard the America and Queen of the Mississippi, there are many options for spectacular viewing.
The journey along the Lower Mississippi takes you to historic sites that were critical to the development of our great country. Iconic places you will visit include:
Scenic Ventures
Some of the beautiful sites you will visit along the way:
Regionally Inspired Cuisine
The Mississippi and the surrounding bluffs and floodplains provide food and shelter for a variety of mammals, migrating birds, and fish. Throughout your journey you may see:
The American River Cruise revolution continues with American Harmony, the second in American Cruise Lines' highly anticipated series of contemporary riverboats. These, the first modern riverboats ever in the U.S., have introduced many pioneering innovations to America's waters.
With a capacity of just 190 guests, American Harmony has the modern amenities and contemporary styling that today's traveler has come to expect. Featured are expansive lounges with large glass windows, offering astounding views. This new ship also features a five-story, glass-enclosed atrium with a large domed skylight, which serves as the central gathering point for the entire ship.
Our new suite design allows for unprecedented comfort while traveling, beginning with the new Grand Suites featuring 800 square feet of private space. These spacious suites include two glass walls and a wraparound private balcony. Complimentary room service during select mealtimes is available for every stateroom, but the Grand Suites offer ample space to host small cocktail parties or private dinner events.
Experience the American Harmony for yourself on our Lower Mississippi Itineraries.
Grand Suite (Private Balcony)
Veranda Suite (Private Balcony)
AAM (Private Balcony)
AAR (Private Balcony)
The luxurious Grand Suite measures over 800 sq. ft. and offers 270◦ of panoramic views through floor-to-ceiling glass windows. Sliding glass doors lead out to a wrap-around balcony complete with a private dining area, the perfect place to enjoy breakfast room service or watch the sun set. Each Grand Suite features a separate bedroom and living area, ideal for gathering with family and friends after an invigorating day of exploration.
Each Owner's Suite offers the finest accommodations with unsurpassed views of the passing scenery. A spectacular 645 sq. ft. of space is your private sanctuary to spread out and make yourself at home. This spacious suite features a full-size bathroom, as well as a separate bedroom and living area. Floor-to-ceiling sliding glass doors let light pour in and allow private panoramic views from every vantage point. An expansive private balcony is a perfect place to savor a calm afternoon or to enjoy breakfast as the sun rises over the riverbank.
With a generous 405 sq. ft. of relaxing space, each Veranda suite includes a private walk-out balcony to enjoy the panoramic views. Considered one of the finest staterooms on any cruise ship, guests will enjoy full-size bathrooms and large living area with sliding glass door.
Located on the fourth deck, these spacious staterooms feature commanding views of the passing river landscapes. At 350 sq. ft., there is plenty of room to enjoy the tasteful comfort of your surroundings. These staterooms have all the comforts of a fine hotel and feature floor-to-ceiling sliding glass doors with a private balcony to offer panoramic views from every angle.
AAC staterooms are conveniently located on the third deck and offer all of the comforts of a fine hotel. Complete with a private balcony and floor-to-ceiling sliding glass doors, these staterooms provide spectacular views of the Mississippi River and the surrounding landscape. At 316 sq. ft., these staterooms also offer a sitting area, desk and full-size bathrooms.
AAL staterooms can be found on the second deck and offer a luxurious 300 sq. ft. of living space. Each room is equipped with plush seating, full-size bathroom, and a private balcony with large sliding glass doors that offer great views of the Mississippi scenery. These staterooms are the epitome of comfort and relaxation.
AAR staterooms on the main deck offer complete comfort with approximately 275 sq. ft. of living space. Enjoy a full-size bathroom, large picture window, and door leading out to a furnished private balcony. These staterooms also feature a large sitting area, ideal for getting together with friends.
Perfect for the solo traveler, our Single staterooms offer all of the amenities you expect from a fine hotel. At 250 sq. ft., these staterooms have spacious bathrooms and large sliding glass doors that lead to a private balcony.
American Harmony Deck Plan
Built in 2015, Queen of the Mississippi offers an authentic paddlewheeler experience with all the comforts of home.
Guests can enjoy large staterooms with private balconies, hotel-style bathrooms, and complimentary room service. Experience breathtaking scenery from the privacy of your stateroom as the Queen of the Mississippi makes its way down the legendary river.
At a generous up to 445 sq. ft., the Owner Suites of Queen of the Mississippi offer the finest accommodations with unsurpassed views of the Mississippi River. With a spacious seating area and full-size bathrooms, each suite is a private sanctuary where you can unwind after a day of exploration in the tasteful comfort of your surroundings. Each of these suites features large sliding glass doors leading out to a private balcony, where you can enjoy the ever-changing scenery. Every modern amenity is at your fingertips, along with a desk, and spacious seating area.
Located on the top deck, these spacious staterooms feature scenic views of the passing landscape. At 328 sq. ft., you will enjoy all of the modern comforts that are expected of a premium hotel. These staterooms also offer full-size bathrooms and a walk-out private balcony where the grandness of the Mississippi can be appreciated.
Our AAC staterooms are conveniently located on the fourth deck and at 304 sq. ft. offer all of the comforts of a fine hotel. Complete with a private balcony and floor-to-ceiling sliding glass doors, these staterooms provide spectacular panoramic views of the Mississippi River and the surrounding landscape.
AAL staterooms can be found on the third deck of the Queen of the Mississippi. Enjoy a luxurious 304 sq. ft. of living space that is equipped with plush seating, a full-size bathroom, and a private balcony with large sliding glass doors that offer great views of the Mississippi scenery.
AAR staterooms can be found on the second deck of the Queen of the Mississippi. Enjoy a luxurious 304 sq. ft. of living space that is equipped with a full-size bathroom and a large private balcony with sliding glass doors.
These 290 sq ft staterooms offer exceptional comfort and a relaxing living area. Featuring a large opening picture window, all are equipped with modern amenities, full-size bathrooms, and closet space.
A comfortable getaway, our Single staterooms offer individuals a spacious room with convenient amenities. At 203 sq. ft., all have interior entrances and large viewing windows where the sights of the Mississippi can be enjoyed.
Queen of the Mississippi Deck Plan
Launched in 2016, America is one of the finest paddlewheeler ever built, introducing features never before seen on the Mississippi.
America embodies a casual ambiance and relaxed atmosphere while providing panoramic views of the passing scenery. With only 185 guests, fellow guests will quickly become new friends.
Each Owner's Suite on America offers the finest accommodations on the Mississippi River with unsurpassed views of the passing scenery. A spectacular up to 445 sq. ft. of space is your private sanctuary to spread out and make yourself at home. Floor-to-ceiling sliding glass doors lead to an expansive private balcony offering private panoramic views throughout the room. Every modern amenity is at your fingertips, along with a spacious seating area, desk, and full-size bathroom.
Located on the top deck, these spacious staterooms feature commanding views of the passing Mississippi landscape. At 328 sq. ft., there is plenty of room to enjoy the tasteful comfort of your surroundings. These staterooms have all the comforts of a fine hotel and feature floor- to-ceiling sliding glass doors with a private balcony to offer panoramic views of the Mississippi from every angle. These staterooms also offer a sitting area, desk, and full-size bathrooms and are the epitome of comfort and relaxation.
AAC staterooms are conveniently located on the fourth deck and at 304 sq.ft offer all of the comforts of a fine hotel. Complete with a private balcony and floor-to-ceiling sliding glass doors, these staterooms provide spectacular panoramic views of the Mississippi River and the surrounding landscape.
AAL staterooms can be found on the third deck of America. Enjoy a luxurious 304 sq. ft. of living space that is equipped with plush seating, full-size bathrooms, and a private balcony with large sliding glass doors that offer great views of the Mississippi scenery.
AAR staterooms can be found on the second deck of the America. Enjoy a luxurious 304 sq. ft. of living space that is equipped with full-size bathrooms and a private balcony complete with an outdoor seating area.
These 290 sq. ft. staterooms offer exceptional comfort and a relaxing living area. Featuring a large opening picture window, these staterooms are equipped with modern amenities, full-size bathrooms, and closet space.
A comfortable getaway, our Single suites offer individuals a spacious room with convenient amenities. At 203 sq. ft., these staterooms have interior entrances and large opening viewing windows where the sights of the Mississippi can be enjoyed.
America Deck Plan
All Aug/2020 Sep/2020 Oct/2020 Aug/2021 Oct/2021
All America American Harmony Queen of the Mississippi
See Our Other Mississippi River Cruises
"America"
Narrated by Charlie Daniels
Interested in a cruise? Request a cruise guide!
Click Here For Yours


Tribal EA is the newest conservative trading Expert Advisor with a powerful order control filter, the development of which took the last six months.
The EA does not use martingale, averaging or similar risky techniques. It always uses stop loss, tale profit and order closure based on additional filters.
All appropriate settings are stored in the Expert Advisor code, so there is no need to download additional set files - you only need to attach the EA to recommended pairs. The settings are valid for GMT+2 brokers. If your broker's time differs, set the appropriate value of TimeShift. You can also choose and use custom settings.
Deposit: $200 per 0.01 lot.
All settings in points are given for 2-digit (JPY) and 4-digit quotes. Values are automatically multiplied by 10 for trading accounts with 3- and 5-digit quotes.
UseAuthorSetFiles - use optimized properly tested unique sets. Set to false if you want to trade using your custom parameters.
Set Name - the name of the user created set file.
Lots - default lot value.
Auto Risk % - risk value as the percent of deposit per trade. The parameter is ignored if Lots is set to true.
Max Spread - the maximum allowable spread value, above which the EA will not open orders; in points.
Dynamic TP Channel Percent - take profit value as the percent of the channel width. Static TP is disable if the parameter is set to > 0.
Hedging Orders - allow opening opposite orders when a signal appears.
Filter Max Candle Size - maximum value of the previous candlestick, orders will not be opened if the candlestick was larger.
Pause After Stop Loss - stop trading for the specified number of minutes after a losing trade.
Trailling Start - the distance in points from the opening price to activate Trailing Stop.
Trailling Distance - distance of trailing stop from the current price.
TimeShift - broker's time shift. Can also be a negative value.
hi, I purchased this EA, the Trading pairs is: AUDCAD, EURCHF, EURJPY, GBPAUD, GBPCAD, GBPUSD , But I saw the signal you provided and it traded: AUDCAD, EURCHF, EURJPY, GBPAUD, GBPCAD, GBPUSD, AUDUSD , CADJPY , USDCAD in the history, should I trade these 9 pairs too?
- Added new parameter "Raise Lot After SL (Multiplier)". If the parameter more 0, lot of the new order will be multiplied to it if the previous order was closed by Stop Loss. When current order close with profit, the next order will opened with a regular lot.
- Removed the automatic unloading of the EA from the chart when the "AutoTrading" button is released. (the EA was removed from the chart during synchronization with the MQL5 VPS).


The youngest of the classic collection created in 1906, Shem-el-Nessim is Arabic for inhaling the breeze and is inspired by an Egyptian festival celebrating springtime.
Shem-el-Nessim is a languid breeze slowly carrying soft and perfumed air over the Nile.
Bergamot and neroli give Shem-el-Nessim a citrus edge that gives way to a prominent powdery orris in the heart notes. Geranium, rose, jasmine and ylang-ylang give a delicate floral lift to the heart notes.
Sweet vanilla, musk, heliotrope and cedarwood give Shem-el-Nessim a dusky, gossamer base.


text:
/* @flow */
import type { Node, Value } from '../../../../flowtypes/AST'

export default function cssValue(
  body: Array<Node> = [],
  important: ?boolean = false
): Value {
  return {
    type: 'Value',
    important,
    body,
  }
}

redpajama_set_name: RedPajamaGithub


text:
Growing cross-country solidarity with Muskrat Falls land protectors in Labrador
The rabble podcast network offers an alternative take on politics, entertainment, society, stories, community and life in general. All opinions belong to the podcaster; however, podcasters are expected to adhere to our guidelines. We welcome new podcasters -- contact us for details.
Please chip in to support more articles like this. Support rabble.ca for as little as $5 per month!
Scott Neigh
Talking Radical Radio
TRR_rpn_nov6-10_2017_ontario_muskrat_solidarity.mp3
On this week's episode of Talking Radical Radio, Scott Neigh interviews Kelly Morrissey and Emily Philpott about the work of the Ontario Muskrat Solidarity Committee. They are building support in Ontario and elsewhere in the country for the mostly-Indigenous land protectors in Labrador who oppose the Muskrat Falls hydroelectric dam project.
Kelly Morrissey is a Nunatsiavumiuk woman from Happy Valley-Goose Bay, Labrador, which is one of the directly affected communities, and she is currently living in Ottawa, Ontario. Emily Philpott is a white settler woman from Corner Brook, Newfoundland, currently living in Toronto, though she happened to be in Happy Valley-Goose Bay when this conversation was recorded. Emily also has family living in the impacted area of Labrador, and her research for her Master's degree in International Development Studies at York University is about the impact of Muskrat Falls on local residents.
Back in June, an episode of Talking Radical Radio featured Jennifer Hefler-Elson talking about the Labrador Land Protectors, a mostly Indigenous group in rural Labrador defending the land from the Lower Churchill Project, also known as the Muskrat Falls hydroelectric dam project. Today's program revisits the Muskrat Falls struggle through the lens of one of the encouraging developments in the resistance – the ongoing emergence of solidarity activism happening elsewhere in the country.
The Muskrat Falls hydroelectric dam is being built by the provincial crown corporation Nalcor on the Churchill River in Labrador. It is in territory that is part of the Innu Nation's land claim, but impacts territory shared by members of the other two major Indigenous groupings in the region as well, the Nunatsiavut and the Southern Inuit of NunatuKavut. As is always true of such projects, the idea is to construct a massive dam, flood an area to create a reservoir, and release water from the reservoir in a controlled way to generate electricity.
Objections to the project are many. Though there is a formal agreement with the Innu Nation, there are many criticisms of that agreement as not adequately fulfilling the requirement for free, prior, and informed consent, and the other impacted Indigenous groups have not signed anything.
Another major concern is that the flooding of land to create a reservoir can result in a sharp increase in a toxin called methyl mercury, which can then contaminate the local food web. This is particularly troubling given that not only is harvesting food from the land integral to local Indigenous cultures, it is something that a lot of local people depend on. As well, there is significant concern that the dam might result in flooding of downstream communities. The project is billions of dollars over budget, on the backs on the people of Newfoundland and Labrador. And the energy that it will ultimately produce is mostly for export, while hydro rates in the province are expected to increase significantly.
Local resistance to the Muskrat Falls dam reached a high point just over a year ago, with a coordinated campaign by the three Indigenous groups, some civil disobedience, a hunger strike, and regular local mobilization, all focused in particular on concerns about methyl mercury. This pushed the premier of the province, Dwight Ball, to meet with Indigenous leaders and to promise measures meant to mitigate the threat from methyl mercury. While this satisfied some residents, lots of others – many under the banner of the Labrador Land Protectors – continued to organize in opposition to the project.
Over the last year there have been demonstrations, events, and actions in the local area on almost a weekly basis, as well as arrests and various measures that seem designed to intimidate land protectors. And almost none of the measures that the province agreed to a year ago, around mitigating methyl mercury contamination, have in fact been taken.
The first solidarity action in Ontario was actually back in September 2016, when Kelly helped put together a small demonstration on Parliament Hill. A group subsequently coalesced under the name Ontario Muskrat Solidarity Committee. The group has organized at least one other demonstration. Members in the Ottawa area have been meeting with federal politicians and officials to express their concerns, with a particular focus on the $9 billion federal loan guarantee for the Muskrat Falls project. And after a successful recent panel in Toronto on which both Kelly and Emily spoke, public education events involving one or both of them are planned in the near future in Ottawa, London, Perth, Halifax, and more.
By bringing people together in cities in Ontario and beyond and raising public consciousness of the issue, they hope to expand the wave of solidarity, and contribute to the kind of momentum that the land defenders on the ground will need in order to win.
Image: Modified from a photo taken by Douglas Sprott, used under the Creative Commons Attribution-NonCommercial 2.0 Generic license.
Talking Radical Radio brings you grassroots voices from across Canada, giving you the chance to hear many different people that are facing many different struggles talk about what they do, why they do it, and how they do it, in the belief that such listening is a crucial step in strengthening all of our efforts to change the world. To learn more about the show check out its website here. You can also follow them on FaceBook or Twitter, or contact [email protected] to join our weekly email update list.
Talking Radical Radio is brought to you by Scott Neigh, a writer, media producer, and activist based in Hamilton (formerly Sudbury), Ontario, and the author of two books examining Canadian history through the stories of activists.
Talking Radical Radio has been nominated for a Hamilton Independent Media Award. If you like the show, please vote for Scott Neigh under the category of "Best Journalist – Social Justice and Human Rights" before November 8!
Thank you for reading this story…
More people are reading rabble.ca than ever and unlike many news organizations, we have never put up a paywall – at rabble we've always believed in making our reporting and analysis free to all, while striving to make it sustainable as well. Media isn't free to produce. rabble's total budget is likely less than what big corporate media spend on photocopying (we kid you not!) and we do not have any major foundation, sponsor or angel investor. Our main supporters are people and organizations -- like you. This is why we need your help. You are what keep us sustainable.
rabble.ca has staked its existence on you. We live or die on community support -- your support! We get hundreds of thousands of visitors and we believe in them. We believe in you. We believe people will put in what they can for the greater good. We call that sustainable.
So what is the easy answer for us? Depend on a community of visitors who care passionately about media that amplifies the voices of people struggling for change and justice. It really is that simple. When the people who visit rabble care enough to contribute a bit then it works for everyone.
And so we're asking you if you could make a donation, right now, to help us carry forward on our mission. Make a donation today.
We welcome your comments! rabble.ca embraces a pro-human rights, pro-feminist, anti-racist, queer-positive, anti-imperialist and pro-labour stance, and encourages discussions which develop progressive thought. Our full comment policy can be found here. Learn more about Disqus on rabble.ca and your privacy here. Please keep in mind:
Tell the truth and avoid rumours.
Add context and background.
Report typos and logical fallacies.
Be respectful.
Respect copyright - link to articles.
Stay focused. Bring in-depth commentary to our discussion forum, babble.
Use oppressive/offensive language.
Libel or defame.
Bully or troll.
Post spam.
Engage trolls. Flag suspect activity instead.


text:
<?php
/**
 * Query Builder - build SQL queries programatically
 *
 * @package Automatorm\Database
 */

namespace Automatorm\Database\QueryBuilder;

use Automatorm\Database\SqlString;
use Automatorm\Database\QueryBuilder;
use Automatorm\Database\Interfaces\Renderable;
use Automatorm\Exception;

class Expression implements Renderable
{
    const PLACEHOLDER = '?';

    protected $column;
    protected $comparitor;
    protected $value;
    protected $placeholder;
    protected $count = false;

    public function __construct(Column $column, $affix, $value)
    {
        $this->column = $column;
        $this->comparitor = '=';
        $this->value = $value;
        $this->placeholder = static::PLACEHOLDER;

        // Special case for # "count" clause
        if (strpos($affix, '#') !== false) {
            // Excise the # from the affix
            $affix = substr($affix, 0, strpos($affix, '#')) . substr($affix, strpos($affix, '#') + 1);
            $this->count = true;
        }

        // Set comparitor
        switch ($affix) {
            case '=':
            case '!=':
            case '>':
            case '<':
            case '>=':
            case '<=':
                $this->comparitor = $affix;
                break;
            case '!':
                $this->comparitor = '!=';
                break;
            case '%':
                $this->comparitor = 'like';
                break;
            case '!%':
            case '%!':
                $this->comparitor = 'not like';
                break;
        }

        // Special cases for null values in expressions
        if (is_null($value)) {
            if ($affix == '!') {
                $this->comparitor = 'is not null';
            } else {
                $this->comparitor = 'is null';
            }
        }

        // Special case for in clauses
        if (is_array($value)) {
            // Special case for empty in clauses
            if (!count($value)) {
                $this->column = null;
                $this->comparitor = $affix === '!' ? "true" : "false";
            } else {
                $this->comparitor = $affix === '!' ? "not in" : "in";
                $this->placeholder = '(' . implode(',', array_fill(0, count($value), '?')) . ')';
            }
        }

        if ($value instanceof QueryBuilder) {
            // MySQL doesn't support in with limits - so special case limit 1 to use =
            // Of course, MySQL is SOL if limit > 1
            if ($value->limit === 1) {
                $this->comparitor = $affix === '!' ? "<>" : "=";
            } else {
                $this->comparitor = $affix === '!' ? "not in" : "in";
            }
        }

        if ($value instanceof InnerQuery) {
            $this->comparitor = $affix === '!' ? "not in" : "in";
        }
    }

    public function __clone()
    {
        $this->column = clone $this->column;
        if (is_object($this->value)) {
            $this->value = clone $this->value;
        }
    }

    public function render(QueryBuilder $query) : string
    {
        // Special case for tautological or contractdictory expressions (true / false)
        if (!$this->column) {
            return $this->comparitor;
        }

        if ($this->count) {
            $column = $this->column->renderFunction($query, 'count');
        } else {
            $column = $this->column->render($query);
        }

        if ($this->value instanceof Renderable) {
            return $column . " " . $this->comparitor . " " . $this->value->render($query);
        }

        if (isset($this->value)) {
            if (is_array($this->value)) {
                $query->addData($this->value);
            } else {
                $query->addData([$this->value]);
            }
            return $column . " " . $this->comparitor . " " . $this->placeholder;
        }

        // Special case for null values - use "is null" / "is not null"
        return $column . " " . $this->comparitor;
    }

    public static function extractAffix(string $column) : array
    {
        preg_match('/^([!=<>%#]*)([^!=<>%#]+)([!=<>%#]*)$/', $column, $parts);
        $affix = (string) $parts[1] . (string) $parts[3];
        $column = $parts[2];

        return [$column, $affix];
    }
}