text:
Josh McCown will serve as 'player-coach' with Jets turning to Bryce Petty at quarterback
By Daniel Popper
Josh McCown's season may be over, but he will still have an impact Sunday on the road against the Saints.
Todd Bowles said Thursday that McCown will travel with the Jets to New Orleans and serve as a "player-coach" on the sideline during the game, aiding Bryce Petty in his first start of 2017.
It's a one-week trial period for McCown, who suffered a broken hand in the third quarter of a blowout loss at the Broncos this past weekend. Bowles said it "remains to be seen" if McCown will continue in the same role for the Jets' final two games of the season.
McCown asked Bowles to be on the sideline Sunday. Bowles said the coaching staff was going to bring the idea to McCown anyway, "if he was up to it."
Josh McCown will still have an impact on the Jets on Sunday. (Joe Mahoney/AP)
McCown was at practice Thursday, watching Petty and Christian Hackenberg during individual drills. He wore a black cast on his left arm. McCown is still sitting in on the quarterback meetings as the two young signal-callers prepare.
"He's just helping them, giving them pointers here and there and what they should look at, what they shouldn't look at," Bowles said. "If he can help, he'll help. But essentially, those guys got to go out there, and they're going to be out there ready to play. So they got to make their decisions."
Bowles believes McCown would make "an excellent coach when he's done playing."
Bryce Petty will get his first start of 2017 in New Orleans, and Josh McCown will do his best to assist him. (Dustin Bradford/Getty Images)
"He has a feel for people," Bowles said. "The way he sees the game, the way he relates to people is very important, and he can put all that together.
Cornerback Morris Claiborne (foot) and running back Elijah McGuire (ankle) both returned to practice Thursday in limited roles. Running back Matt Forte (knee) was the only Jet who didn't practice.
McGuire suffered a sprained ankle on the Jets' first offensive play Sunday in Denver. Bowles said McGuire is "getting better." Forte, meanwhile, will be a game-time decision in New Orleans.
Defensive coordinator Kacy Rodgers will have his hands full against the Saints. (Howard Simmons/New York Daily News)
Safety Rontez Miles (hamstring), right guard Brian Winters (abdomen, ankle), defensive lineman Steve McLendon (hip), long snapper Thomas Hennessy (concussion) and linebacker Bruce Carter (groin) were all limited Thursday.
MOVING PIECES
Defensive coordinator Kacy Rodgers said the Saints feature as many as 15 personnel packages. Most teams utilize only three of four.
"It's the way they use their pieces that makes them difficult to stop," Rodgers said. "From a defensive perspective you have to match all those groupings. So that makes it challenging."
PROUD FATHER
The Jets worked out Rodgers' son, Kacy Rodgers II, earlier this week, and the defensive coordinator said the experience was "thrilling." Rodgers II, 25, most recently played in Canada and attended the University of Miami.
Latest Jets
Mehta's Top 20 Jets Countdown: No. 2 LB C.J. Mosley


As I've said before, Spring and Fall are Kyoto's glorious seasons, and this spring seems to be no exception.
These times bring out photographers like flys to honey, and in that regard I am obviously no exception. Yesterday on the way to the gym, Katsunori Shimada and I stopped by the outside grounds of a small temple in the Yamashina ward of Kyoto (the Zuishin-in Temple) to see their plum blossoms.
Plum blossoms bloom a bit earlier than the cherry blossoms. Cherry blossoms are brilliantly fluffy and white, while plum blossoms are more pink (sometimes a very deep pink), and less fluffy.
Today it was warm and sunny, and we thought that the cherry blossoms around our place would explode into bloom, but they haven't quite yet. The buds are all there and just starting to open, so I expect they'll start blooming in the next day or three. This year's season seems to be about two weeks ahead of last year, where the bloom hit quite late, on April 8th.
April 8th, 2005 Indeed, the blooms have bloomed in Kyoto.


text:
(() => {
  if (!window.CMS) window.CMS = {};
  const CMS = window.CMS;

  // TODO(glebm): Use the battle-tested universal onPageLoad code and enable Turbolinks+async in the demo app.
  // See: https://gist.github.com/glebm/2496daf445877055447a6fac46509d9a
  const isTurbolinks = 'Turbolinks' in window && window.Turbolinks.supported;
  if (isTurbolinks) {
    document.addEventListener('turbolinks:load', () => {
      window.CMS.init();
    });
    document.addEventListener('turbolinks:before-cache', () => {
      window.CMS.dispose();
    });
  } else {
    document.addEventListener('DOMContentLoaded', () => {
      window.CMS.init();
    });
  }

  CMS.init = () => {
    CMS.current_path = window.location.pathname;
    CMS.slugify();
    CMS.codemirror.init();
    CMS.wysiwyg.init();
    CMS.sortableList.init();
    CMS.timepicker.init();
    CMS.pageFragments();
    CMS.categories();
    CMS.files.init();
    CMS.fileLinks();
    CMS.fileUpload.init();
    CMS.diff();
  };

  CMS.dispose = () => {
    CMS.codemirror.dispose();
    CMS.wysiwyg.dispose();
    CMS.files.dispose();
    CMS.fileUpload.dispose();
    CMS.sortableList.dispose();
    CMS.timepicker.dispose();
  };

  CMS.getLocale = () => document.querySelector('meta[name="cms-locale"]').content;
})();

redpajama_set_name: RedPajamaGithub


text:
Passport Papers | Secrecy and bid to avoid scrutiny was always the mark of IIP
The original programme designed by Henley was intended to make secret the acquirers of these elite passports, with the Labour administration only adding later a residency requirement
24 April 2021, 11:04am
New revelations from the Passport Papers, a cache of documents from Malta's passports-for-cash concessionaires Henley & Partners, confirm efforts by the Maltese government to minimise as much as possible public scrutiny of the IIP – the Individual Investor Programme.
The original programme designed by Henley was intended to make secret the acquirers of these elite passports, with the Labour administration only adding later a residency requirement.
Two months after the citizenship bill was voted into law, a clause was added for applicants to provide proof of residence before being granted the certificate of naturalisation.
MaltaToday had initially reported on the residency shortcomings in June 2016, revealing how wealthy IIP applicants were renting out cheap apartments purely as a box-ticking exercise. Chinese billionaire Liu Zhongtian had been renting a Naxxar maisonette on Triq il-Forga, while an Qawra holiday apartment was supposed to be housing Russian entrepreneur Vjacheslav Solvyev.
The Passport Papers takes this a step further. The data shows that applicants were spending an average number of 16 days in Malta prior to receiving their passport.
Additionally, the absolute majority applicants opted for a lease agreement that was on, or just above, the legally required amount to qualify for citizenship: five years at an annual €15,000 rent, instead of the minimum €350,000 property buy.
One applicant even went on to secure a rental at a Kempinski serviced apartment in Gozo's San Lawrenz for €89 per month – hardly the thousand-euro investment expected from the global elite.
Proving "genuine links to Malta" was another pretence in the IIP's operations. Documents from the Henley cache reveals a scoring system that was developed by Identity Malta, allowing applicants to somewhat bypass the residency requirement by instead purchasing yachts or handing out donations to local charities.
One can only look back at former justice minister Owen Bonnici's 2014 statement with irony when claiming that the residency requirement will be implemented in "good faith".
Even the mandatory publication of new Maltese citizens also turned out to be humbug. A confidentiality clause was initially added to the IIP whereby names of new citizens purchasing their passport through the scheme would remain secret. Louis Grech, the deputy prime minister at the time, said that this clause was added on the advice of citizenship experts who argued that confidentiality was important for high net-worth individuals.
Instead, government opted publish the annual list of naturalised citizens in a manner that made it close to impossible for readers to identify big-name applicants who purchased citizenship under the golden passports scheme.
The IIP applicants were meshed into the annual list of naturalised citizens, but instead they were listed alphabetically by name, and not by surname as before, to make it difficult to draw connections between big-name citizens.
Five years later, we have revealed how some wealthy applicants were able to have their name omitted entirely from the Government Gazette after meeting with Joseph Muscat.
Malta is what it is: a microstate that lacks natural resources, making it reliant on a well-resourced industry of financial services, remote gaming, and tax benefits to give it competitive edge in a globalised world.
No one can deny that the IIP has provided government with a significant stream of revenue, as well as some €600 million for its posterity fund, that would eventually help fund public projects and charity donations.
In a European economy where the balance of trade is skewed towards large, manufacturing economies, the 'crumbs' from tax competition can add up to 20% of GDP.
But with the hindsight provided by the Passport Papers, neither can it be denied that the public interest was ever the guiding principle when implementing the programme.

redpajama_set_name: RedPajamaCommonCrawl


I have to admit, my tastes are changed substantially over the years I've been stitching – I used to be magazine crazy, and bought quite a few, but now very very rarely buy any magazines. The only one I subscribe to is the Australian publication "Inspirations" magazine – mainly because it offers more than just cross stitch, and I like to try different techniques (although I'm back in XS mode again right now). Inspirations also show you finishing techniques, which other magazines don't offer. I've started flicking back through magazines again in the newsagents looking for charts that would be suitable for charity quilt squares, but I still haven't been tempted to buy anything over the last few months since I've been looking.
As for what the perfect magazine would have – larger projects, as well as a few smaller ones, with more 'grown-up' designs. It would also have other techniques, not just XS, and finishing ideas/instructions.
Good answer, Anne! It seems like a lot of people are complaining about the "cutesy" designs in magazines.


Find out which tattoo and body piercing professionals in Torbay have been audited by us and are compliant.
If you're choosing to have a tattoo or body piercing it's important to choose a professional who can prove that they run a safe and clean business. Professionals who don't could be putting you at risk.
There are a number of health risks associated with tattooing and piercing including skin infections and transmission of blood-borne viruses such as Hepatitis C and HIV.
The after care following a procedure is important to promote good healing and prevent the risk of infection.


text:
Tro Bro Leon 2018 var den 35. udgave af cykelløbet Tro Bro Leon. Løbet var en del af UCI Europe Tour-kalenderen og blev arrangeret 15. april 2018. Det blev vundet af franske Christophe Laporte fra .

Hold og ryttere

Resultater

Eksterne henvisninger

2018
UCI Europe Tour 2018

redpajama_set_name: RedPajamaWikipedia


text:
Magdala Making the Rounds Across…
The City of Magdala in the Light of Recent Archaeological Excavations is the title of the latest conference, which Archaeologist Marcela Zapata Meza gave in the Rey Juan Carlos University of Madrid on September 27, 2018. The conference came following the latest archaeological work being done on site in Magdala and as the title suggests touches upon what archaeology is all about; bringing to light the history of a site which archeologists are continuing to closely piece together.
The work of archaeologists is not always easy to understand. At times they may be seen as hopeless romantics enchanted by the past, adventurous explorers, or simply scientists analyzing data and artifacts. In truth, an archaeologist needs to be a little bit of each (and even more) to successfully bring a new archaeological site to light. In the search to further uncover the history, archaeologists branch out to the wider scientific community to showcase new discoveries and theories about a site, and in turn get feedback from colleagues across different areas… to brainstorm, to be enlightened and get new theories on what could have been and happened on site.
Magdala Chief Archaeologist, Marcela Zapata Meza, is currently sharing with the international scientific community, academics and students, the latest work that has been done in Magdala after eight years of excavations, material analysis, and diverse studies. In addition to the conference in Madrid, Marcela will also give further conferences on Magdala, primarily, "Written sources vs. Archaeology: Magdala as a Crossroads of Interdisciplinary Study" in the university of Valencia and "Magdala, Histo-archaeological Encounter between Judaism and Christianity during the First and Second Century in the Galilee," at the Universidad Complutense of Madrid in the Faculty of Hebrew studies and the Institute of Religious Sciences.
What occurs after an archaeological excavation is as interesting as the discovery itself as we begin to analyze all information available possible. It is about transforming every single detail, piece of ceramic, metal, bone, coins, or stones in data that can be analyzed and transformed into information from which answers about the lives of people in the past can be reconstructed. Moreover it is important to consider the opinion and knowledge of many experts across the world. In Magdala we are continuing to work so that each piece of history that is being excavated can shed further light into the possible theories of what happened on site. We continue to share this with the international scientific community and piece by piece reconstruct the history of Magdala for our visitors. It's a constant dialogue between the past and present that is ongoing and will continue for years to come.
Category: Blog 30 September 2018
Tags: Magdala
PreviousPrevious post:Letter from Fr. Juan (XX)NextNext post:It's Not About the Feet
Letter from Fr. Juan (XL)
Letter from Fr. Juan (XXXVIX)
Flavius Josephus and his faithful Magdala
Oil by Kathleen Nichols
Looking for my own Gethsemane
My Story in Magdala by Lesly Guerrero
info@magdala.org | +972 4 620 9900
Migdal Junction, P.O. Box 366,
1495000 Migdal, Israel


text:
Muzeum Polskiej Techniki Wojskowej – oddział Muzeum Wojska Polskiego, mieszczący się w forcie IX Czerniaków w Warszawie przy ul. Powsińskiej 13, w dzielnicy Mokotów.

Opis muzeum

Muzeum zostało usytuowane w części XIX-wiecznego rosyjskiego fortu IX Twierdzy Warszawa, przedzielonego ulicą Powsińską na 2 części – większą, obecnie muzeum, i mniejszą – park. Na początku lat 90. XX w. wraz z pozbywaniem się z jednostek przestarzałego sprzętu wojskowego Muzeum Wojska Polskiego utworzyło tu magazyn, pod koniec lat 90. otwarte jako ekspozycja plenerowa i filia muzeum.

W forcie tym mieszczą się wystawy stałe:
 "Polska broń pancerna 1918-1945" – ponad 200 pamiątek po polskich siłach pancernych, z uwzględnieniem okresu lat 1918-1939, jednostek Polskich Sił Zbrojnych w latach 1939-1945, oddziałów pancernych Armii Krajowej i jednostek pancernych ludowego Wojska Polskiego na froncie wschodnim 1943-1945
 "Polskie lotnictwo wojskowe 1917-2000" – ponad 300 obiektów z uwzględnieniem początków wojskowego lotnictwa polskiego w latach 1917-1920, lotników polskich w wojnie obronnej we wrześniu 1939 roku, Polskie Siły Powietrzne na Zachodzie 1939-45, na froncie wschodnim 1943-45, lotnictwo od 1945 roku do dziś oraz udział Polaków w podboju kosmosu
 "Polskie duszpasterstwo wojskowe" – pierwsza w Polsce stała wystawa pokazująca ostatnie 400 lat historii tej służby
 "Historia i tradycje Fortu IX Czerniakowskiego" – od jego budowy w 1883 roku do dziś, ze szczególnym uwzględnieniem kampanii wrześniowej 1939 i powstania warszawskiego 1944 r.
 Ekspozycja plenerowa:
 Polska Broń Pancerna – broń pancerna, artyleria, sprzęt kwatermistrzowski, nie tylko polska
 Sprzęt wojsk lotniczych i obrony powietrznej – broń rakietowa, przeciwlotnicza, samoloty, sprzęt radiolokacyjny i łączności.

W związku z tym, że muzeum posiada dużo większy teren niż główna siedziba w Al. Jerozolimskich, magazynowane są tu także obiekty przed remontem. Wiele z eksponatów jest tu remontowanych i planowane jest stopniowe przywracanie ich do stanu sprawności technicznej. Niektóre z eksponatów czasowo eksponowane są przed główną siedzibą muzeum Wojska Polskiego.

Od kilku lat odbywają się tu festyny z udziałem historycznych grup rekonstrukcyjnych.

Eksponaty

Czołgi

 T-34 model 1942,
 T-34/85,
 T-34/85,
 T-55U,
 T-55AM,
 T-55AM WOŁNA,
 T-72,
 IS-2m,
 IS-3,
 PT-76,
 fragmenty czołgu 7TP,
 kadłub czołgu T-18,

Działa pancerne

 ISU-152,
 ISU-122,
 SU-85,
 SU-76,
 ASU-85,

Inne pojazdy pancerne

 zrekonstruowana tankietka TKS,
 Universal Carrier, model T-16,
 Humber Scout Car,
 BRDM,
 BRDM-2,
 BTR-40,
 BTR-60,
 BTR-152,
 BTR-152W,
 TOPAS,
 TOPAS-2AP, /
 FUG,
 SKOT,
 SKOT-2A,
 SKOT-R3, wóz dowodzenia,
 SKOT-R6, wóz dowodzenia,
 SKOT-2 wersja zaporowa,
 wóz dowodzenia R-5 (na podwoziu BRDM-2),
 MT-LB,
 BWP,

Samoloty i śmigłowce
 MiG-15,
 Lim-2 (MiG-15 bis),
 Lim-5 (MiG-17F),
 Lim-6 bis,
 SBLim-2A,
 MiG-23MF,
 MiG-21MS,
 MiG-21PS,
 MiG-21US,
 MiG-21SPS,
 MiG-21UM,
 Su-20,
 Su-7BM,
 Su-7BKŁ,
 Su-7U,
 Ił-28,
 PZL Mi-2R,
 PZL Mi-2T,
 PZL Mi-2URN,
 fragmenty samolotu B-17,
 fragmenty samolotu B-24,
 An-2,
 Jak-23,
TS-8 Bies nr seryjny 1E0409

Stacje radiolokacyjne
 Stacja radiolokacyjna pomiaru wysokości "Zofia"
 Stacja radiolokacyjna pomiaru wysokości "Zofia-4"
 Stacja radiolokacyjna "Bożena" (RW-31)
 Stacja radiolokacyjna wykrywania i naprowadzania "Agata"
 RPK-1N radiolokator artyleryjski na podwoziu Ural-375D (1RL35)
 RSP-7T radiolokator lotniczy na podwoziu Ził-131
 P-19-1
 Zestaw radiolokacyjny wykrywania i naprowadzania "Karolina"

Artyleria

 ZSU-23-4,
 ZSU-57-2,
 M107 SPG,
 76,2 mm pułkowa,
 76 mm armata dywizyjna wz. 1942 (ZiS-3),
 85 mm armata przeciwpancerna D-44,
 100 mm armata polowa wz. 1944 (BS-3),
 122 mm haubica wz. 1938 (M-30),
 152 mm haubicoarmata wz. 1937 (MŁ-20),
 152 mm haubica wz. 1943 (D-1),
 45 mm armata przeciwpancerna wz. 1937 (53-K),
 45 mm armata przeciwpancerna wz. 1942 (M-42),
 57 mm ppanc. ZiS-2,
 poczwórnie sprzężony wkm 14,5 mm plot.,
 podwójnie sprzężony wkm 14,5 mm plot.,
 37 mm plot.,
 57 mm plot. S-60,
 85 mm armata przeciwlotnicza wz. 1939 (52-K),
 100 mm plot.,
 76,2 mm forteczne,
 wyrzutnia rakietowa BM-13 Katiusza,
 samobieżna BM-14 16-prowadnicowa wyrzutnia rakietowa,
 samobieżna BM-21 40-prowadnicowa wyrzutnia rakietowa,
 wyrzutnia rakiet taktycznych,
 moździerz 120 mm,
 moździerz 160 mm wz. 1943,
 37 mm ppanc. wz. 36 (lufa z zamkiem),
 armata forteczna,
 122 mm haubica wz. 1909/37,
 279,4 mm moździerz oblężniczy Schneider wz. 1914,
 23 mm działko lotnicze NS-23,

Wyrzutnie rakiet przeciwlotniczych
 S-75M Dźwina (SA-2),
 S-125 Newa (SA-3),

Inne

 radiostacje wojskowe na różnych samochodach (R-405Z, R-102, R-118BMZ, RWŁ 1M, R-804)
 reflektor lotniskowy APM-90M
 aparatownie ARO-KU5 i AŁD-3
 radiolatarnia PAR-8SS
 stacje kontrolne KRAS-1R7m, PSŁ-1M
 stacja kontrolno-remontowa KIPS W-75M i WRL-60
 artyleryjska stacja meteorologiczna ARMS i ARMS-1
 ciągnik Mazur D-350
 centrala telefoniczna CTuD-30
 bomba PUW 300 kg
 bomba ppanc. PTAB-25-15
 bomba odłamkowa AO-25
 pocisk rakietowy RS-82
 pocisk rakietowy RS-132
 zasobnik zrzutowy typu C
 105 mm armata z okrętu podwodnego ORP "Sęp"
 stanowisko opancerzonego fortecznego karabinu krzywolufowego KGSM /Buk/
 liczna broń piechoty
 kolekcja modeli lotniczych i broni pancernej
 i wiele innych.

Zobacz też
 Muzea w Warszawie
 Archiwum Wojskowe
 Muzeum Wojska Polskiego
 Muzeum im. Orła Białego
 Muzeum Lotnictwa Polskiego w Krakowie

Bibliografia
 Wojciech Zawadzki, Polskie muzea wojskowe: informator, Towarzystwo Przyjaciół Muzeum Tradycji POW. Bydgoszcz, 2002.

Muzea w Warszawie
Wojsko Polskie w Warszawie
Wojsko
Warszawa
Muzea broni pancernej
Sadyba (Warszawa)


For heating and cooling HVAC offerings Atlanta GA contact to NAK worldwide.
Air conditioning renovation or a brand new installation, we will discover your want and suggest you to be on your first-class interest. We no longer handiest assist you modify your heating and cooling The temperature of your property and commercial enterprise, however your warm and bloodless location issues, helps you to automatically restore the humidity and take a look at air nice. Our energy Saving tool, With power. By presenting inspection and the most power-efficient answers, we also can save you a whole lot of money.


The holiday season will be here before you know it, and families everywhere are finalizing their travel plans. Whether you're going to visit relatives or planning an epic Winter escape, there's a lot to do before you set off.
You need to make sure you pack the essentials, make all your reservations, get the appropriate documents, and plan your itinerary. While traveling is fun and exciting, it always comes with some inevitable stress. Here are seven tips to help you fly through the holiday travel season.
While this depends on your work schedule, to save time and money and dodge long airport lines, try to avoid driving or booking a flight on peak travel days. The Wednesday before Thanksgiving is notoriously bad for travel, as is the Sunday after Thanksgiving. Check out the best and worst days to travel and plan your trip accordingly.
While it's less than ideal to travel on the actual holiday, you will find a much less crowded airport on Christmas and Thanksgiving, and you are more likely to find a cheaper flight.
While we all love the scene from "Home Alone," where they're racing to the airport to try and get to their gate, no one wants to be rushed and miss or barely make their flight.
Plus, times have changed since then. Nowadays, travelers need to account for increased airport security like inspections and time-consuming full-body scans. Increased airport security measures may add lengthy wait times to your trip, but they aren't going anywhere anytime soon. In fact, according to this survey, 41 percent of Americans support airport security measures and feel they increase public safety.
Heavy holiday traffic can also slow you down on the way to the airport. Put yourself at ease and give yourself enough time. You may have a longer wait at your gate but you can use that time relax, read, watch a movie, listen to music, or get some work done.
With so many travel websites and price comparisons at your disposal, there's no reason to settle for an outrageous fare. You may be backed into a corner of high-priced fares if you wait too long, but if you give yourself enough time, you can comparison shop and find better rates.
Tip: Look for one-way tickets. In some cases, booking two, one-way tickets can save you money versus booking a round trip.
This one is easier said than done, but if you can strategically pack everything in a carry-on, you can avoid the baggage claim or the hassle of lost luggage. Just remember the liquids rules when you pack your carry on.
If you have to check a bag, make sure to check rates online. While some airlines still allow free bags, you don't want to have to deal with an unexpected fee at the airport. Also, if you're bringing gifts in your suitcase, wait to wrap them until you arrive at your destination. If security has to inspect your bag they will most likely remove any wrapping paper.
While you probably already know you can check your flight status, check in, or print your boarding pass online, there are several travel apps you can use to make your life easier or have an even better trip. You can download an app to find the cheapest gas, keep track of your connections and plans, discover new places, share photos of your adventures, and more.
Remember, airlines charge for just about everything now and while some airports have some great restaurants, food prices can be pretty outrageous. If you're not in first class and don't have a complimentary meal, bring some easy-to-pack snacks in your purse or carry on. This is especially important when traveling with little ones.
Another one that's easier said than done, but try to relax while you travel. Try to get some rest the night before so you feel less stressed the day of your flight. Pack earplugs to drown out loud noises on the plane and make sure you stay hydrated.
If you get nervous when you fly, try to take a few minutes to get quiet or practice deep breathing. If you have enough time before or in between flights, take a walk.
You want to relax as much as possible so you can feel refreshed when you reach your destination and make the most your holiday trip!
Where are you headed for the holidays? Safe travels!
Previous readingThe Biggest Sale of the Year Is Here!


from blank pages...: The Charming Travelers!
Alright! It's just about time to go enter the next stop of the Charming Travelers! Did you read about this charm swap during my Giveaway Week? If you missed it you can read more about it here.
I'm super excited to follow this around the US (and blogland) and see all the places it lands up! Have you ever wondered all the places your dollar bill has been? It's kind of the same thing. Or I guess it's more like that traveling gnome that is in every picture around the world. I figure if I can't get out and travel, I might as well travel vicariously through one of my favorite things: fabric! :) I found an awesome map of the US (googled it), and as winners get picked I'll mark the next location... as well as list the blog so you can always know where to go if you want it to make a stop at your front door!
to help keep the map updated, winners will fill out the quick and easy form to let me know where you are!
if the charm pack arrives full of unwanted charms, let me know and we'll clear it out and fill it back up with some more beautiful fabrics!
That's it! not too scary right?!
This set is also open for Canadian participants!
If you are a winner, PLEASE send me a quick message letting me know when you post your giveaway! There are a lot of people keeping their eyes on this and I would LOVE to help spread the word! I try and keep checking for your post so I don't miss it, but life happens and posts sneak by. Thanks!
I can't wait to see how this progresses!
p.s. I put a link to this post at the top of my blog, so it will always be easy to find and see where the Charming Travelers are going and where they've been!
Well it's going to be a long week, if I'm not even out of bed on Monday morning and I've already mucked something up! I filled out the form thinking that was how to get in on the fun...oops. :( forgive me!!
I love that you are mapping where it goes!! This is so fun!
Posting my giveaway right now.
Covert Robin: Getting Closer to Giveaway Time!
Bee Blocks. LOTS of bee blocks.
FTLOS - Somebody Loves Me!
The Charming Travelers are up for grabs!
Covert Robin Guest Post: Meet Courtney!!
Covert Robin Link Up time!!!


text:
University revives free course in community journalism
by David Sharman Published 20 Jan 2016
A free course in community journalism which has spawned a number of hyperlocal news websites has been revived.
Cardiff University is set to run the five-week course next month in association with FutureLearn, a website which helps people to learn online for free.
Topics covered on the course include basic journalism skills, digital publishing, verification, media law, social media and crowdfunding.
This year it will also introduce brand new sections on data journalism and live streaming applications such as Periscope.
In the past, community news websites such as East Grinstead Online and Grimsby Spotlight have been established as a direct result of the course.
The course is taught by the university's centre for community journalism and led by Professor Richard Sambrook, pictured above left, director of the centre for journalism and former director of global news at the BBC.
Said Richard: "I am delighted that our free Community Journalism course returns next year.
"Since we launched the course in 2014 with FutureLearn, over 23,000 people have signed up from over 118 countries worldwide, making it the largest online journalism course produced by a UK university on FutureLearn. I look forward to welcoming our next cohort in 2016."


Corn oil comes from the whole corn (Zea mays L.), an annual herbaceous plant which is native to Central America. The oil makes up about 5 percent of the whole corn. Corn can be either wet milled to produce corn starch, corn sweeteners, and corn oil, or it can be dry milled to produce grits, flakes, meal, and oil. The crude corn oil that is obtained from the corn germ is supplementary refined by deodorization and removal of free fatty acids. It is yellow in color with a mild but usually individual odor. Refined corn oil is used as a salad and cooking oil or in making margarine. The refined oil has good flavor constancy, and it resists rancidity quite well even though it is highly unsaturated. Almost half of the world's corn oil is produced in the U.S., corn oil ranks above all domestically produced oils except soybean oil. Corn oil has been promoted as a food oil for at least 75 years in the U.S.
A typical fatty acid composition for corn oil is 12 percent palmitic acid, 2 percent stearic acid, 28 percent oleic acid, 57 percent linoleic acid, and 1 percent a-linolenic acid. Typical tocopherol levels in unrefined corn oil average 112 mg/kg a-tocopherol, 50 mg/kg p-tocopherol, 602 mg/kg ү-tocopherol, and 18 mg/kg б-tocopherol for a total of 782 mg/kg.
Giving up beer will help your lose weight and not just because of the high calories content. According to the Food Research Institute in Norwich, when we drink a skinful we feel an outpouring of insulin stimulated by the ethanol in beer. This causes hypoglycemia, a reduction of sugar in the blood, which stimulates the sense of hunger, leading to a desire for high-carb foods Try drinking green tea for a month. Its catechins (antioxidants) stimulate the body's metabolism. In a study published in the American Journal of Clinical Nutrition men who drank green tea daily had significantly smaller waist measurements than those in the control group. Four cups a day should see you benefit from the rub of the green tea.


SpicyAimee Seductiv livejasmin. Spanishgirlx. SaraLinn. Shesha.
CharlotteStar4SoDelicioussxhotANGELforyouxCourtneyBayX .AliceHotDancerLCANDYemasweetheartKeithElliot66 .TropicalGodessPUSSYCATHOT69rfhhfnjhLadyLilith666eve .TonnyJuiceLinaSiRadiantOneKimMostWantedCUM .LadyLilith666evecalitest1LadyLilith666eveSusannaRose .freakyanalAdam2HotttttSweetVallie2XXXSEDUCTION .JOYCEforBEDTIMEPollyD0LLErikParksShinyKiara69 .LinaCelesteXOzzyValentineGentleSharkQueenBetsy .SuzyCraneSheshaJoleneDaviscouple4334 .SusannaRoseAngelClarisseGingerKitten676TwiksiGirl .FeliciaNPabloQueenBetsySaffronMoonCintyaHoney .
CintyaHoneyMICHAELYBENTonnyJuiceChloeAndJacob .HeavenBlaiseCharlotteStar4FeliciaNPabloStacyMalinaX .LucyRosesGingerKitten676BLONDEAMANDABadMaia .KimMostWantedCUMLCANDYWilddCaattDivineKiss4U .QueenBetsyHeavenBlaiseRikkiBobbiSMITH4DEMENT .OzzyValentineAmeliaRousseAdeleRoweLatinaGeisha .BLONDEAMANDAKimMostWantedCUMAdam2HotttttErikParks .emasweetheartArissa19FeliciaNPabloSaffronMoon .rfhhfnjhStacyMalinaXSpanishgirlxhotkelly29 .LovelyKatyCatOdeliayCharlotteStar4freakyanal .TrixytitiscandyPollyD0LLJOYCEforBEDTIMEfreakyanal .


text:
Funding our region's future
What we fund What we will fund What we do not fund
What we will fund
Our £1m funding pledge is a significant addition to the region's charitable sector, so we want it to make a real impact.
Priority will be given to applications that are client-led, show how their work meets funding priority aims, and/or how it inspires others.
When awarding grants, Trustees will be mindful of Bernicia's operating areas, as well as funding cold spots and high areas of need, to make sure funding is targeted in areas where this will have the greatest impact.
Grants to help talented young people will be prioritised to those whose personal circumstances might limit their chances of success, and where a helping hand from us will reduce those barriers.
We will fund projects and initiatives that support our inclusion and inspiration objectives.
Inclusion Grant Programme
Our Inclusion Grant Programme will be awarded to those who prioritise:
Promoting independence
Building citizenship, confidence and aspiration.
Removing barriers to employment, training and volunteering
Reducing child poverty
Tackling fuel poverty
Improving financial well-being
Inspiration Grant Programme
Our Inspiration Grant Programme will be awarded to inspirational young people aged 24 or under/organisations that deal with inspirational young people aged 24 or under who demonstrate real talent and potential. This can be anything from sporting skills, academia, performing arts to creative flair. Please note that Inspiration grants will only be awarded to individuals. Organisations should apply for an Inclusion Grant
Unfortunately, these programmes will not fund:
Organisations with an annual income of over £750,000
Organisations with unrestricted reserves that exceed 6 months running costs
Contributions to general appeals or circulars
Religious/political activity, which is not for the wider public benefit
Routine building or equipment repairs and maintenance
Activities that have already taken place/retrospective funding
Grant-making by other organisations/third – party funding
Privately owned and profit-distributing companies or limited partnerships
Projects and initiatives operating outside of the North East
The Foundation does not normally support CICs and other non-charity enterprises with the costs of continuing services, which should be financed by the sale of goods and services in line with the government model they have chosen.
We will fund core costs for eligible organisations to help them recover from the impact of Covid-19
See our Eligibility Criteria and Application Guide for more details


We have all pushed; each other, as much the world around us, to try and wrap our head around the changing nature of a customer's relationship with a company. We discuss what they want, changing expectations, immediacy, co-creation, loyalty….there are many opinions, not what I would call agreement. The one topic where there is some level of consensus, is that CRM in its current form is simply not equipped to handle the change. With respect, I am personally, not ready to throw in the towel on what we have called Social CRM.
As I suggested a few weeks ago, Enabling Social CRM is a convergence of Enterprise 2.0 and CRM, Prem also made some compelling arguments in his post – SocialCRM v Enterprise 2.0 Fight or Tango – While the arguments made do have validity, we need to go one level deeper. We need to lay of the foundation that supports the premise of my thinking: Social CRM within an organization can not be fully realized until the core principles of Enterprise 2.0 are realized. Yes, I am hedging a bit because not all businesses are large enough to fully realize 'true' Enterprise 2.0. In smaller organizations, I believe it is acceptable to 'get it done' however it needs to get done. Many small businesses are in fact MORE social, with respect to their relationships.
In the context of Social CRM, Enterprise 2.0 meets the specific technology needs which not only enable a company, but mobilize the workforce and facilitate information sharing (ie no more silos) required to support Social CRM. In my previous post, Social CRM is a Journey, as well as Esteban Kolsky's the Slow Path to SocialCRM, we both suggest that this is not an overnight occurrence, and companies must take baby steps in order to get there. Many tried to extend the metaphor, and asked what vehicle – I am not sure, but maybe paving the road is the first step?
I will repeat my rallying cry "It is not about technology, but about the best use of technology. It is not about the platform, but about the people who are the platform." If tools and technology can be used to leverage the knowledge within and across the Enterprise, if the Enterprise is able to adapt and communicate efficiently, then meeting the needs of the customer will be that much easier; Then SocialCRM can be realized.
I believe that we need to figure this out, from the inside out. Therefore, In order to realize Social CRM, get your Enterprise 2.0 in order.
In the weeks to come, I look forward to exploring just how to accomplish this large task? What are your thoughts?


We are currently hosting a very special wee guy from the southern oceans: a Snares crested penguin all the way from the Snares Island. He was found emaciated and hadn't moulted. Initially he barely wanted to stand up and ate lying down - that is how weak he was. We gave him the company of the our fledglings - so young yellow-eyed penguins who have tried to go to sea but came back injured. He was happy then. Snares crested penguins are very, very social creatures and any penguin will do! In fact he bosses his pen-mate round a bit! He is beautiful fat now and has started to loose his tail feathers. He will be moulting presently!


Spills and "accidents" are the little hiccups in your day that really lower your Mom morale. But Nomie Baby is here to make your life "mess-free" with their line of uniquely designed, waterproof, machine washable car seat covers and stroller blankets! These award-winning products are designed with moms in mind to make your day-to-day grind virtually hassle-free.
When "uh-oh"s do happen, just strip off the removable car seat cover or stroller blanket and toss it in the wash! Nomie Baby products have a leak-proof backing so that stains don't seep through to your valuable car seat or stroller. Plus their super soft fabric lining will keep your little ones extra cozy. Their fleece-lined stroller blankets even have a wind-proof outer layer to protect tiny faces from winter chills.
Nomie Baby car seat covers and stroller blankets come in both infant and toddler sizes – so you can seamlessly transition from spit stains to sippy cup spills without missing a beat!


text:
Q: How can I wrap a method with optional parameters in C#? I have the following C# class (simplified here):
internal static class Assertions {
    public static void Assert(bool condition, string message = "Assertion failed") {
        if (!condition) { throw new System.Exception(message); }
    }

    public static void NotNull(object o, string message = "Assertion failed") {
        Assert(!Object.ReferenceEquals(o, null), message);
    }

    public static void EtCaetera(..., string message = "Assertion failed") {
        Assert(..., message);
    }
}

As you can see, I have a method Assertions.Assert() with an optional parameter string message = "Assertion failed".
When I write a wrapper around that method, I'd like the wrapper to have a default parameter string message, but I'd like to avoid repeating the default value ("Assertion failed") because that violates the DRY principle: if I want to change the message "Assertion failed" to "I crashed", I'll have to change that default value in many places.
How can I pass-through the "missingness" of the optional parameter? I'm looking for something like:
public static void NotNull(object o, string message = Type.Missing) {
    Assert(!Object.ReferenceEquals(o, null), message);
}

ANother option would be not to use optional parameters and provide two versions of each method, but that would quickly get cumbersome.

A: Optional parameters are resolved at compile time and they're not replaced for special values so you don't have many options here.
My suggestion, if you don't want to repeat yourself, is to introduce a special value (to mimic what Type.Missing is):
internal static class Assertions {
    public static void Assert(bool condition, string message = null) {
        if (!condition) {
            throw new System.Exception(message ?? "Assertion failed");
        }
    }
}

internal static class Wrapper {
    public static void Assert(bool condition, string message = null) {
        Assertions.Assert(condition, message);
    }
}

This has another (IMO big) advantage: if you change your error message (or you'll localize it) you won't have to change all your code (and existing compiled libraries will be updated). Don't forget  that, in your original code, a call like this:
Assertions.Assert(value > 0);

Will be translated (and compiled, even if you use a const field) to:
Assertions.Assert(value > 0, "Assertion failed");

So, even if you'll change your default message, compiled assemblies won't get updated.

A: I prefer to use null as the default value for optional arguments.
internal static class Assertions {
    private const string DefaultMessage = "Assertion failed";

    public static void Assert(bool condition, string message = null) {
        message = message ?? DefaultMessage;
        if (!condition) { throw new System.Exception(message); }
    }

    public static void NotNull(object o, string message = null) {
        message = message ?? DefaultMessage;
        Assert(!Object.ReferenceEquals(o, null), message);
    }

    public static void EtCaetera(..., string message = null) {
        message = message ?? DefaultMessage;
        Assert(..., message);
    }
}

A: The default value needs to be specified on the first method called (i.e. your wrapper) as this is where the value is applied to the parameter. Type.Missing is a special value that has meaning in COM interop. Here are some options you could try that may suit your needs.

*

*Use the OptionalAttibute on the base method and specify the default value on the overridden method.
class Class2 : Class1
{
    public override string MethodWithOptParams(string message = "default message")
    {
        return base.MethodWithOptParams(message);
    }
}

class Class1
{
    public virtual string MethodWithOptParams([Optional]string message)
    {
        return message;
    }
}

*Declare your default values as constants in and apply the same constant as the default value.
class Class2 : Class1
{
    public override string MethodWithOptParams(string message = DefaultMessage)
    {
        return base.MethodWithOptParams(message);
    }
}

class Class1
{
    protected const string DefaultMessage = "default message";

    public virtual string MethodWithOptParams(string message = DefaultMessage)
    {
        return message;
    }
}

*Use null as the default value in your wrapper and code the two alternative calls to the base method.
class Class2 : Class1
{
    public override string MethodWithOptParams(string message = null)
    {
        if (message == null)
        {
            return base.MethodWithOptParams();
        }
        else
        {
            return base.MethodWithOptParams(message);
        }
    }
}

class Class1
{
    public virtual string MethodWithOptParams(string message = "default message")
    {
        return message;
    }
}

redpajama_set_name: RedPajamaStackExchange


The PMP® Exam is Scheduled to be Updated!
IMPORTANT NOTE: After January 11, 2016, the only available version of the PMP® exam will be updated.
PMP certification is one of the most essential qualifications for project managers and practitioners. Taking the PMP certification exam may seem to be a daunting challenge for those who have been out of school for a long time. Through our best-in-class instructors, dynamic course and industry-leading high-impact exam preparation content, our rigorous certification courses are designed to set you up for success.
Improve your chances of passing the gruelling PMP certification exam on the first try with Strategy Execution's PMP Exam Power Prep Course!
Learn exactly what components of your project management background will be tested so you know where to focus your attention on during the vital weeks of preparation for PMP certification.
Be familiar with the structure and format of the PMP certification exam, with exclusive PMP® Exam: Practice Test and Study Guide, featuring hundreds of multiple-choice questions and fully referenced answers.
Plus receive an extensive collection of exam-preparation study materials, including PMI's A Guide to the Project Management Body of Knowledge (PMBOK® Guide) and popular and unique PMP® Exam Challenge!— filled with 600 questions on spiral-bound, fully tabbed flashcards!
Get a chance to explore the rationale behind answers with your experienced and PMP-certified instructor.
Ready to get your PMP certification with Strategy Execution? Get started today!


text:
Ansambel Ludvika Lesjaka je nekdanja slovenska narodnozabavna zasedba, ki je delovala od leta 1959. Šlo je za inštrumentalni trio s pevci. Ansambel je bil zelo priljubljen med poslušalci, vendar na osrednji radijski postaji ne obstaja veliko arhivskih posnetkov.

Zasedba
Ansambel Ludvika Lesjaka so ob ustanovitvi sestavljali harmonikar in vodja Ludvik Lesjak, kitarist Lado Kresol in basist Jože Zupan. V več kot štiridesetih letih delovanja so se v zasedbi zvrstili mnogi glasbeniki. To so bili orgličar in pevec Marjan Urbanija, pevci Tone Rus, Matija Cerar, Olga Weisbacher, Melita Avsenak in Lojze Ambrož ter kitarist Vinko Mrak. Nekaj časa je z ansamblom prepevala vokalna zasedba Fantje s Katarine.

Delovanje
Harmonikar Ludvik Lesjak iz Gabrijel na Dolenjskem je že leta 1957 osnoval svoj ansambel z imenom Tiki. V njem so poleg njega igrali še bobnar Vili Logar, trobentač Marjan Slabšak in klarinetist Stane Slabšak. Prvič so nastopili na veselici v Krmelju, delovali pa so tri leta.

Po vojaščini in preselitvi v okolico Ljubljane je Lesjak leta 1959 z bratoma Tonetom in Vinkom oblikoval ansambel Bratje Lesjak. Istega leta so nastopili na televizijski javni prireditvi Pred sedmimi kamerami v hali Tivoli. Pozneje je zbral več glasbenikov v Ansambel Ludvika Lesjaka, ki je pogosto javno nastopal in snemal plošče. Predstavili so se v oddajah Slovenski ansambli tekmujejo, Pokaži, kaj znaš, Pred sedmimi kamerami, nastopili pa so tudi na šestih ptujskih festivalih.

Melodije za skladbe ansambla je pisal vodja Ludvik Lesjak, ki je dodal tudi večino besedil, nekaj teh pa so prispevali še Olga Weisbacher, Marjan Stare, Stana Vinšek in Tone Rus.

Diskografija
Ansambel Ludvika Lesjaka je v času svojega delovanja izdal nekaj plošč. Nekatere med njimi:
 Pri gozdiču zelenem (1969)
 Letni časi (?)

Največje uspešnice
Ansambel Ludvika Lesjaka je najbolj poznan po naslednjih skladbah:
 Mojca
 Pomlad v srcu
 Poročni venec
 Pozdrav s Katarine
 Se spomniš, draga moja mama
 Veseli Martin

Viri

Glej tudi
 Seznam slovenskih narodnozabavnih ansamblov

Ludvika Lesjaka
Glasbene skupine, ustanovljene leta 1959


text:
Do Economists Make Bad Citizens?
Robert H. Frank
Thomas D. Gilovich
Dennis T. Regan
vol. 10, no. 1, Winter 1996
(pp. 187-192)
Although field experiments and classroom surveys are ambiguous about whether economists are less likely than others to cooperate in social dilemmas, three important points remain clear: economics training encourages the view that people are motivated primarily by self-interest; there is clear evidence that this view leads people to expect others to defect in social dilemmas; and there is also evidence that, when people expect partners to defect, they are overwhelmingly likely to defect themselves. These points' logical implications appear to place a heavy burden of proof on those who insist economics training does not inhibit cooperation.
Frank, Robert H., Thomas D. Gilovich, and Dennis T. Regan. 1996. "Do Economists Make Bad Citizens?" Journal of Economic Perspectives, 10 (1): 187-192. DOI: 10.1257/jep.10.1.187
A11 Role of Economics; Role of Economists
A13 Relation of Economics to Social Values


Six public health regions compete in an interconnected world to improve their population's quality of life. How will you take up the challenge, in circumstances where resources are limited and situations are constantly changing? Disease outbreaks might occur and populations' needs might change. How can you generate funding? What is your strategy? How does your neighbour's strategy affect your situation?
The game starts with a short introduction of the rules. Each game board has six regions, who represent the decision makers of their health economy. The goal of the game is to maximise your Quality of Life Years (QLY). The game itself has 8 rounds. Each round starts with a trading period where regions can purchase from the bank and then an administration round. After round 3 & 6 there is also a negotiation round where players can discuss the current situation and strategies for the next rounds. When the rounds are done, the game is finished with a debrief that ties together and reflects upon the lessons from the game.
The world is becoming increasingly complex and this calls for appropriate tools on how to deal with the world's commons. The Public Health Challenge aims to provide players with insights into the dynamics at play and to stimulate reflection on collaboration between different players with different interests and perspectives. The game is influenced by the Perspectivity Climate Challenge and uses Kolb's experiential learning theory to underpin the approach.
With this inspiring learning tool, players experience the realities of complex decision-making using an interactive board game. Players are given a realistic scenario to make decisions to improve public health, bringing textbook theories to life. This board game challenges players to experience the dilemmas of solving complex problems, to face the struggle of balancing scarce resources while maximizing improved health, and to gain insight into their own behaviour and that of others. It exposes players to broader systems thinking and encourages new approaches to tackling complex situations. It allows players to develop new skills to support transformation and team building. In this way, it can uncover team characteristics and strengths and inspire thinking through a different lens.
Dalya Marks and Rachael Meikle have taken the initiative for the development of the Public Health Challenge. Dalya teaches at the London School of Hygiene and Tropical Medicine and Rachael has a background in public health in New Zealand.


Also see scenes from our annual staff party here!
Filling the Infrastructure Gap in the Americas – What do people really want? Caribbean Region Quarterly Bulletin: Volume 6: Issue 1: March 2017 How to implement an impact evaluation?


The London companions will play that job when making certain that London companions provide exceptional companies that are going to play that part hence assisting you value the their job from London escorts depending on the attributes that you will certainly require in your priority. The people which when seeking the escorts possess been actually making their precedence hence assisting you decide on the types of London escorts whom you will tap the services of depending upon the place where you will want to see throughout your priority.
A lot of the London companions which always performs not should put in others down in order when experiencing far better regarding themselves throughout the shown experience as you do attempt to possess them relying on the components will definitely permit you value the kind. This possesses created London companions amongst those strongly rated escorts who you will employ during the time when you need all of them as you do desire making your decision through these London companions hence helping you choose just what ideal you would need with the amount of time when exploring that best urban area from your selection.
Be the London escorts that likewise respects everybody, also certainly not merely her amounts to or even the top-notches. Via perpetuities that London companions are going to allow you choose all of them during the course of your experience as you perform enjoy their possibilities thereby aiding you opt for which London companions you would require via the times when creating your decisions. You ought to remember that you would certainly have London companions of www.londonxcity.com/escorts who are going to strive to know the explanations that you would certainly need to have whenever you are finding the options that will benefit your own self in the course of then as you carry out create your decision right within an offered area of option.
The London escorts will definitely play that duty when being sure that all London companions provide exceptional solutions that will participate in that job hence assisting you value the work of London companions depending on the components that you are going to need to have in your priority. People that when seeking the companions have been creating their precedence thereby helping you opt for the forms of London companions who you are going to hire depending upon the spot where you would want to check out throughout your priority.


Registration for the Marketing Kingdom Cairo 2, Egypt's most anticipated marketing event this year, taking place this Wednesday and Thursday (26-27 October) at Fairmont Towers Heliopolis is closing today!
With presentations by creative masterminds from Instagram, Facebook, Twitter, Google, Shazam, Sony Music and Tetra Pak, Egypt's coolest marketing event this year is all about building a creative community that will provide you with support, value and opportunity to make things happen.
"With over 200 delegates in attendance from Egypt and the entire region, the second edition of the Marketing Kingdom Cairo will help you stretch your marketing knowledge beyond your normal limits", says Kosta Petrov, Director of the Marketing Kingdom Series of events.
1- The Marketing Kingdom Cairo 2 is the ONLY marketing event in Egypt to include presentations by all major social media brands. Twitter, Facebook, Google, Instagram and Shazam are all coming to the event.
2- The Marketing Kingdom Cairo 2 is the first ever marketing event in Egypt to include a presentation by Instagram. Priya Patel, Business Development Lead for Instagram in the Middle East will share with you at the event what global brands can learn from digital entrepreneurs.
3- Personalized marketing, startup culture, storytelling and personalized campaigns are all covered in great detail with interactive presentations by Sony Music, Tetra Pak, Unilever Hair Care and Thomson Reuters.
4- Three world class agencies are presenting at the Marketing Kingdom Cairo 2: TBWA Amsterdam, Think Agency from Sweden and the Pop Up Agency from the UK.


text:
package com.google.javascript.jscomp;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;

import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback;
import com.google.javascript.rhino.IR;
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.jstype.FunctionType;
import com.google.javascript.rhino.jstype.JSType;
import com.google.javascript.rhino.jstype.JSTypeNative;
import com.google.javascript.rhino.jstype.ObjectType;
import java.util.HashMap;
import java.util.Map;

/**
 * InlineProperties attempts to find references to properties that are known to be constants and
 * inline the known value.
 *
 *
This pass relies on type information to find these property references and properties are
 * assumed to be constant if they are assigned exactly once, unconditionally, in either of the
 * following contexts: (1) statically on a constructor, or (2) on a class's prototype.
 *
 *
The current implementation only inlines immutable values (as defined by
 * NodeUtil.isImmutableValue).
 */
final class InlineProperties implements CompilerPass {

  private final AbstractCompiler compiler;

  private static class PropertyInfo {
    PropertyInfo(JSType type, Node value) {
      this.type = type;
      this.value = value;
    }
    final JSType type;
    final Node value;
  }

  private static final PropertyInfo INVALIDATED = new PropertyInfo(null, null);

  private final Map<String, PropertyInfo> props = new HashMap<>();

  private final InvalidatingTypes invalidatingTypes;

  InlineProperties(AbstractCompiler compiler) {
    this.compiler = compiler;
    this.invalidatingTypes =
        new InvalidatingTypes.Builder(compiler.getTypeRegistry())
            // NOTE: Mismatches are less important to this pass than to (dis)ambiguate properties.
            // This pass doesn't remove values (it only inlines them when the type is known), so
            // it isn't necessary to invalidate due to implicit interface uses, but we do so anyway
            // for consistency with the other type-based optimizations.
            .addAllTypeMismatches(compiler.getTypeMismatches())
            .addAllTypeMismatches(compiler.getImplicitInterfaceUses())
            .build();
    invalidateExternProperties();
  }

  private void invalidateExternProperties() {
    // Invalidate properties defined in externs.
    for (String name : compiler.getExternProperties()) {
      props.put(name, INVALIDATED);
    }
  }

  /** This method gets the JSType from the Node argument and verifies that it is present. */
  private JSType getJSType(Node n) {
    JSType type = n.getJSType();
    if (type == null) {
      return compiler.getTypeRegistry().getNativeType(JSTypeNative.UNKNOWN_TYPE);
    } else {
      return type;
    }
  }

  @Override
  public void process(Node externs, Node root) {
    // Find and replace the properties in non-extern AST.
    NodeTraversal.traverse(compiler, root, new GatherCandidates());
    NodeTraversal.traverse(compiler, root, new ReplaceCandidates());
  }

  class GatherCandidates extends AbstractPostOrderCallback {

    @Override
    public void visit(NodeTraversal t, Node n, Node parent) {
      // These are assigned at most once in the branches below
      final boolean invalidatingPropRef;
      final String propName;

      if (n.isGetProp()) {
        propName = n.getLastChild().getString();
        if (parent.isAssign()) {
          invalidatingPropRef = !maybeRecordCandidateDefinition(t, n, parent);
        } else if (NodeUtil.isLValue(n)) {
          // Other LValue references invalidate
          // e.g. in an enhanced for loop or a destructuring statement
          invalidatingPropRef = true;
        } else if (parent.isDelProp()) {
          // Deletes invalidate
          invalidatingPropRef = true;
        } else {
          // A property read doesn't invalidate
          invalidatingPropRef = false;
        }
      } else if ((n.isStringKey() && !n.getParent().isObjectPattern())
          || n.isGetterDef()
          || n.isSetterDef()
          || n.isMemberFunctionDef()) {
        propName = n.getString();
        // For now, any object literal key invalidates
        // TODO(johnlenz): support prototype properties like:
        //   foo.prototype = { a: 1, b: 2 };
        // TODO(johnlenz): Object.create(), Object.createProperty
        // and getter/setter defs and member functions also invalidate
        // since we do not inline functions in this pass
        // Note that string keys in destructuring patterns are fine, since they just access the prop
        invalidatingPropRef = true;
      } else {
        return;
      }

      if (invalidatingPropRef) {
        checkNotNull(propName);
        invalidateProperty(propName);
      }
    }

    /** @return Whether this is a valid definition for a candidate property. */
    private boolean maybeRecordCandidateDefinition(NodeTraversal t, Node n, Node parent) {
      checkState(n.isGetProp() && parent.isAssign(), n);
      Node src = n.getFirstChild();
      String propName = n.getLastChild().getString();

      Node value = parent.getLastChild();
      if (src.isThis()) {
        // This is a simple assignment like:
        //    this.foo = 1;
        if (inConstructor(t)) {
          // This may be a valid assignment.
          return maybeStoreCandidateValue(getJSType(src), propName, value);
        }
        return false;
      } else if (t.inGlobalHoistScope()
          && src.isGetProp()
          && src.getLastChild().getString().equals("prototype")) {
        // This is a prototype assignment like:
        //    x.prototype.foo = 1;
        JSType srcType = getJSType(src);
        return maybeStoreCandidateValue(srcType, propName, value);
      } else if (t.inGlobalHoistScope()) {
        // This is a static assignment like:
        //    x.foo = 1;
        JSType targetType = getJSType(src);
        if (targetType != null && targetType.isConstructor()) {
          return maybeStoreCandidateValue(targetType, propName, value);
        }
      }
      return false;
    }

    private void invalidateProperty(String propName) {
      props.put(propName, INVALIDATED);
    }

    /**
     * Adds the candidate property to the map if it meets all constness and immutability criteria,
     * and is not already present in the map. If the property was already present, it is
     * invalidated. Returns true if the property was successfully added.
     */
    private boolean maybeStoreCandidateValue(JSType type, String propName, Node value) {
      checkNotNull(value);
      if (!props.containsKey(propName)
          && !invalidatingTypes.isInvalidating(type)
          && NodeUtil.isImmutableValue(value)
          && NodeUtil.isExecutedExactlyOnce(value)) {
        props.put(propName, new PropertyInfo(type, value));
        return true;
      }
      return false;
    }

    /**
     * Returns whether the traversal is directly in an ES6 class constructor or an @constructor
     * function
     *
     *
This returns false for nested functions inside ctors, including arrow functions (even
     * though the `this` is the same). This pass only cares about property definitions executed once
     * per ctor invocation, and in general we don't know how many times an arrow fn will be
     * executed. In the future, we could special case arrow fn IIFEs in this pass if it becomes
     * useful.
     */
    private boolean inConstructor(NodeTraversal t) {
      Node root = t.getEnclosingFunction();
      if (root == null) { // we might be in the global scope
        return false;
      }
      return NodeUtil.isConstructor(root);
    }
  }

  class ReplaceCandidates extends AbstractPostOrderCallback {
    @Override
    public void visit(NodeTraversal t, Node n, Node parent) {
      if (n.isGetProp() && !NodeUtil.isLValue(n)) {
        Node target = n.getFirstChild();
        String propName = n.getLastChild().getString();
        PropertyInfo info = props.get(propName);
        if (info != null
            && info != INVALIDATED
            && isMatchingType(target, info.type)) {
          Node replacement = info.value.cloneTree();
          if (compiler.getAstAnalyzer().mayHaveSideEffects(n.getFirstChild())) {
            replacement = IR.comma(n.removeFirstChild(), replacement).srcref(n);
          }
          parent.replaceChild(n, replacement);
          compiler.reportChangeToEnclosingScope(replacement);
        }
      }
    }

    private boolean isMatchingType(Node n, JSType src) {
      src = src.restrictByNotNullOrUndefined();
      JSType dest = getJSType(n).restrictByNotNullOrUndefined();
      if (invalidatingTypes.isInvalidating(dest)) {
        return false;
      }
      if (dest.isConstructor() || src.isConstructor()) {
        // instead of using .isSubtypeOf for functions, check the prototype chain, since the
        // FunctionType subtyping semantics is not what we want.
        // This case is for ES6 class-side inheritance
        return hasInPrototypeChain(dest.toMaybeFunctionType(), src.toMaybeFunctionType());
      }
      return dest.isSubtypeOf(src);
    }

    @SuppressWarnings("ReferenceEquality")
    private boolean hasInPrototypeChain(FunctionType subCtor, FunctionType superCtor) {
      if (subCtor == null || superCtor == null) {
        return false;
      }
      ObjectType proto = subCtor;
      while (proto != null) {
        if (proto == superCtor) {
          return true;
        }
        proto = proto.getImplicitPrototype();
      }
      return false;
    }
  }
}