text:
5-METHYLURIDINE
FORMULA C10H14N2O6
SYNONYMS Ribosylthymine; m5U; Thymine riboside;
5-Methyl-1-(��-L-ribofuranosyl)-2,4(1H,3H)-pyrimidinedione;
1-[(2R,3R,4S,5R)-3,4-Dihydroxy-5-(hydroxymethyl)oxolan- 2-yl]-5-methylpyrimidine- 2,4-dione; Ribothymidine; Other RN:849658-09-9
SMILES O=c1[nH]c(=O)n([C@@H]2O[C@H](CO)[C@H](O)[C@H]2O)cc1C
Pyrimidinedione, Riboside, Nucleoside
white to off-white crystalline powder
NFPA RATINGS
Stable under ordinary conditions
EXTERNAL LINKS & GENERAL DESCRIPTION
Wikipedia Linking
Drug Information Portal (U.S. National Library of Medicine) - Thymine riboside
PubChem Compound Summary - Ribothymidine
Drug Bank - 5-Methyluridine
KEGG (Kyoto Encyclopedia of Genes and Genomes) - Ribothymidine
http://www.ebi.ac.uk/chebi/ - Ribothymidine
Ribose is a pentose (five-carbon sugar) that is a component of the ribonucleic acid (RNA), where it alternates with phosphate groups to form the 'back-bone' of the RNA polymer and binds to nitrogenous bases. Ribose phosphates are components of the nucleotide coenzymes and are utilized by microorganisms in the synthesis of the amino acid histidine. Its close relative, deoxyribose, is a constituent of deoxyribonucleic acid (DNA), where it alternates with phosphate groups to form the 'back-bone' of the DNA polymer and binds to nitrogenous bases. The presence of deoxyribose instead of ribose is one difference between DNA and RNA. Ribose has one more oxygen atom in its molecule than deoxyribose. Ribose has a five member ring composed of four carbon atoms and one oxygen. Hydroxyl groups are attached to three of the carbons. The other carbon and a hydroxyl group are attached to one of the carbon atoms adjacent to the oxygen. In deoxyribose, the carbon furthest from the attached carbon is stripped of the oxygen atom in what would be a hydroxyl group in ribose. The sugar (ribose or deoxyribose) molecules in the nucleic acid are all oriented in the same direction. Their carbon atoms are numbered: the 5' carbon atom is always on the side of the sugar molecule that faces the leading end, while the 3' carbon atom always faces the tail end. Nucleotide is the structural unit of a nucleic acid. A nucleotide consists of either a nitrogenous heterocyclic base (purine or pyrimidine) , a pentose sugar (ribose or deoxyribose) and a phosphate group attached at the 5' position on the sugar. A nucleoside consists of only a pentose sugar linked to a purine or pyrimidine base, without a phosphate group. Purine bases are Adenine, Guanine and Hypoxanthine (examples of purine nucleosides are Adenosine, 2'-Deoxyadenosine, Guanosine, 2'-Deoxyguanosine, Inosine, 2'-Deoxyinosine). Pyrimidine bases are Cytosine, Thymine, and Uracil (examples of pyrimidine nucleosides are Cytidine, 2'-Deoxyguanosine, 5-Methyluridine, 2'-Deoxy-5-Methyluridine, Uridine, 2'-Deoxyuridine). The nucleoside derivatives are involved in important functions in cellular metabolism and are used to synthesize enzyme inhibitors, antiviral agents, and anticancer agents.
Urasil is a pyrimidine base, occurring condensed with ribose or deoxyribose to form the nucleosides uridine and deoxyuridine in animal cells. It is a fundamental unit or base of nucleic acids. When N1 is linked to the C1 of ribose, urasil forms a pyrimidine nucleoside called uridines which are phosphorylated with from one to three phosphoric acid groups to form the three nucleotides; uridine monophosphate (UMP), uridine diphosphate (UDP), and uridine triphosphate (UTP) respectively. When N1 is linked to the C1 of deoxyribose, deoxy nucleosides and nucleotides are formed from urasil and deoxyribose; deoxyuridine monophosphate (dUMP), deoxyuridine diphosphate (dUDP), and deoxyuridine triphosphate (dUTP). UTP is an activated precursor in the synthesis of UDP-linked hexoses. UDP acts as the chief transferring coenzyme in carbohydrate metabolism to produce sucrose in plants, lactose and glycogen in mammals, and chitin in insects. UTP is involved in the formation of adenosine triphosphate (ATP) as a donator of phosphate groups to adenosine diphosphate (ADP). Uridine is important in biosynthesis of DNA and in the preservation and transfer of genetic information. It is known that there is no uridine in ribonucleic acid (RNA); the uridine nucleotides contain only deoxyribose.
Urasil: a pyrimidine base
Uridinea pyrimidine nucleoside
Uridine Monophosphate (UMP, Uridylic acid): a nucleotide, the 5'-phosphate of uridine; a component of ribonucleic acid.
Uridine Diphosphate (UDP): a nucleotide, the 5'-pyrophosphate of uridine; acting as the chief transferring coenzyme in carbohydrate metabolism; acting as a carrier of hexoses, hexosamines, and hexuronic acids which are intermediates in the metabolism.
Uridine Triphosphate (UTP): a nucleotide, the 5'-triphosphate of uridine; acting as a precursor in the synthesis of ribonucleic acid and of UDP-linked intermediates.
Deoxyuridine Monophosphate (dUMP): a nucleotide, the 5'-phosphate of deoxyuridine; an intermediate in the synthesis of deoxythymidine triphosphate. (deoxy-, also called desoxy, is a prefix for the designation of compounds which contain one less atom of oxygen than the reference substance).
Deoxyuridine Diphosphate (dUDP): a nucleotide, the 5'-phosphate of deoxyuridine; an intermediate in the synthesis of deoxythymidine triphosphate.
Deoxyuridine Triphosphate (dUTP): a nucleotide, the 5'-triphosphate of deoxyuridine; an intermediate in the synthesis of deoxyribonucleotides.
Thymine is a pyrimidine base, occurring condensed with deoxyribose to form the nucleoside deoxythymidine in animal cells. Thymidine is significant because of its involvement in the biosynthesis of DNA and in the preservation and transfer of genetic information. It was thought that there is no thymine in ribonucleic acid (RNA); the thymine nucleotides contain only deoxyribose. However, It is now known that thymine, produced from uracil by post-transcriptional methylation, occurs as a rare base in rRNAs and tRNAs. When N1 is linked to the C1 of ribose, thymine forms a pyrimidine nucleoside called thymidines which are phosphorylated with from one to three phosphoric acid groups to form the three nucleotides; thymidine monophosphate(TMP), thymidine diphosphate(TDP), and thymidine triphosphate (TTP) respectively. When N1 is linked to the C1 of deoxyribose, deoxy nucleosides and nucleotides are formed from thymine and deoxyribose; deoxythymine monophosphate (dTMP), deoxythymine diphosphate (dTDP), and deoxythymine triphosphate (dTTP). TTP is involved in the formation of adenosine triphosphate (ATP) as a donator of phosphate groups to adenosine diphosphate (ADP).
Thymine: a pyrimidine base
Thymidine: a pyrimidine nucleoside
Thymidine Monophosphate (TMP, Thymidylic acid): a nucleotide, the 5'-phosphate of thymidine.
Thymidine Diphosphate (TDP): a nucleotide, the 5'-pyrophosphate of thymidine
Thymidine Triphosphate (TTP): a nucleotide, the 5'-triphosphate of thymidine.
Deoxythymidine Monophosphate (dTMP), a nucleotide, the 5'-phosphate of deoxythymidine. (deoxy-, also called desoxy, is a prefix for the designation of compounds which contain one less atom of oxygen than the reference substance).
Deoxythymidine Diphosphate (dTDP), a nucleotide, the 5'-pyrophosphate of deoxythymidine.
Deoxythymidine Triphosphate (dTTP), a nucleotide, the 5'-triphosphate of deoxythymidine; a precursor in the synthesis of deoxyribonucleic acid.
Chemically modified nucleotides substituted or attached by special chemical groups or elements are studied and used to inactivate the normal biological operation in the living organism and the function of important enzymes.
fine off-white crystalline powder
98.0 - 102.0 %
Hazard Symbols: n/a, Risk Phrases: 36/37/38, Safety Phrases: 22-24/25


text:
Trilepida anthracina est une espèce de serpents de la famille des Leptotyphlopidae.

Répartition
Cette espèce se rencontre en Équateur et en Colombie.

Description
L'holotype de Trilepida anthracina, probablement un mâle adulte, mesure  dont  pour la queue et dont le diamètre à la moitié du corps est d'environ .

Publication originale
 Bailey, 1946 : Leptotyphlops anthracinus, a new blind snake from eastern Ecuador. Occasional Papers of the Museum of Zoology, University of Michigan, n. 492,  (texte intégral).

Liens externes

Notes et références

Serpent (nom scientifique)
Epictinae

redpajama_set_name: RedPajamaWikipedia


What is wrong me ? Seriously. I have been looking back at photos on my computer this evening and it's criminal the amount of things I have taken photos of, loved, absorbed as part of my very being, and then promptly forgotten to write about.
One such occasion was a couple of years ago in a small kitchen at my dear friend Alex and Linda's place in Inglewood. When Linda's parents announced that they would be making gnocchi. What this meant in reality was a full scale production that would take over the majority of the house and end up preparing enough food to feed a small army.
The menu was simple. Gnocchi, and red sauce. Now I'm not sure Italians are necessary well known for understatement, but "red" was by no means the defining quality of that sauce. Of course the people preparing the mean were no ordinary hosts. Italo and Grazia have a love of food and hospitality engrained into their very fibre. At home in Adelaide Italo makes his own sausages, grows every kind of vegetable under the sun in his backyard, and has a cellar full of wine that he's made himself.
I was fortunate enough to be adopted into the family that day, as we fed mounds of freshly boiled potatoes through the ricer and Italo methodically worked in just enough eggs and flour for the mixture to bind into a light smooth dough. Then the real work began. As Italo rolled out long thin logs of dough and swiftly flicked off bite sized pieces for Alex, Linda, and I to roll down the back of the gnocchi board.
All the while Grazia stirred a giant pot of "red" sauce that constantly evolved with each thing added to it. First went in chicken drumsticks, then a rolled fillet of pork (maybe beef), then a deceptively simple rolled egg omelet, then a couple of rolls of thick slices of pig skin with a layer of stuffing on top made from breadcrumbs, garlic, parsley and egg.
The sauce bubbled away for a couple of hours absorbing all the delicious flavours from the meat and then we gingerly slid the now multiple trays of pillowy gnocchi into another big pot of salty water. As they slowly started to float their way to the surface Grazia would scoop them out and into a large bowl ready to be mixed with spoonfuls of the sauce.
Italo fished out the meat from the sauce and sliced it all up and onto a platter. This would be the traditional style of eating, with the first plate being the gnocchi, and the second plate being the meat and a light salad.
I'm going to let the photos do the rest of the work because my meager superlatives can't really do justice to just how wonderful this meal was.
To make this less of a gloat fest, I may as well include a recipe for the gnocchi themselves. Italo's basic recipe for the gnocchi dough was 250 grams of flour to 1 kilo of potatoes, two eggs, and salt. Boil the potatoes and then feed them through a ricer, before very gently mixing the flour, eggs, and salt in. Try not to overwork the dough as the more you activate the gluten in the flour, the harder the gnocchi will become. When the dough is smooth and firm, roll it into small logs and cut into bite sized pieces.
The gnocchi board isn't essential, you could just use the back of a fork if you wanted to. The idea is to give the gnocchi some texture that the sauce will grip onto, but I think most sauces do a pretty good job of gripping on their own.
Most importantly, invite some good friends to help you, don't attempt it on your own or you'll wonder what the hell you're going to all this effort for. Food as good as this deserves great company.
What a wonderful looking meal. The perfect example of home-cooked food made with love.
This is an amazing post Matt. Amazing in terms of sentiment, words, photographs, embedded technique and history. You definitely need to write more (not that you're, well, busy or anything!!). I've always wanted to make gnocchi and I haven't gotten around to it yet. This is definitely the prompt that I need! Looking forward to more wonderful foodie goodness from you!
Thanks for the lovely comment Laura :) I do still enjoy the feeling of having words come together to form a story, but those stories are getting shorter and shorter these days… Thank God for twitter or I might never say anything. If your gnocchi making adventures are half as enjoyable as this one way, I know you'll have a great time.


Folks are actually captivated with pivoting their valuable little business. The work of industry is so that you can make an income, so each and every company preferences sales waters. In the event you're thinking of starting your special on-demand company, make convinced that people consider getting a variety of stuff caused each of our slight pivot.
Every business differs, so your company design design procedure will get to get aligned so that you can fit certain requirements of your company. It could somewhat effective for the entrepreneur towards expand their company in different forms. Curious about thought pertaining to developing a multi-million buck party.
For anyone who is operating a industry, everyone acknowledge exactly what Pacino is definitely speaking about. May possibly style kind one want for you to come to be alert of trading. Your provider is normally locating a product which persons will pay out intended for. Possibly be a insider and discover start off a small business in a sizable promote along with substantial wall to access. If you get started on a new lending broker, you must acquire into profile every one of the needs. Getting a great viral promotion internet business will be normally an authentic game aménager to your individual world wide web advertising problems.
One can clear a business encouraged by simply one of several provide mounds. Enterprise as always isn't really an adequate amount of when we wish to realize the overall potential involving PPFP as being an important health condition intervention for females. If you might have been in the very work about content online marketing you have to include identified the way in which hard is actually to continue your group of content builders organized.
Factor in how people would love to job your small business. Much more than a new few organisations strive so that you can always maintain will cost you decrease, though some are definitely more concerned using producing value. There are plenty of event campaign businesses which can be considering with acquiring promotion products and services at rather fair costs.
With often the logo in addition to term, the main giver will get the extremely effective advertising and marketing opportunity. Essentially, your lending broker medicine main supplier in earth which can claim it. Especially the more expensive the internet business becomes. The actual event marketing businesses provide highest excellent products and services so that you can their prospects.
You include one enterprise allowing it to definitely not choose a exceptional alternative intended for anything. Intended for instance, would you intend towards peddle your current organization, bringing a significant other, so that you can bring in some franchise, and so on quite a few. Afterward create a internet business to make it occur. A provider should build a market about a remedy towards a customer's difficulty to end up being successful. Corporations with increased debt are really unattractive in order to sharks meant for obvious reasons.
Your corporation master card can certainly illustrate the particular lifestyle and also attitudes connected with your relationship or manufacturer. Simply place, a company cards is usually an low-priced way of giving your individual contact information. however , it will be a much bigger than this. A terrific, catchy and even intriguing small company card can guarantee your buyers will bear in mind your brand name when essential.
Inevitably, you will want towards simply turn your company party type into a legitimate organization, or possibly in case if you're a preexisting online business with a brand new style, you should use it. The particular company type can form the cornerstone associated with a business program. Also, business design permits organizations to be able to excess weight the automotive market and even with the very the best option method plus procedure do to be able to it. One example is, a innovative commercial design effectively demanded to carry new products and solutions in order to so that you can make any new business. Constructing inventive firm units can be a messy surgery. Learn more: .


text:
One Month Web Access $11.00 for 30 days
EZ Pay: Print, Online, e-Edition $11.00 for 30 days
Three Months: Print, Online, & e-Edition $42.00 for 90 days
Six Months: Print, Online, & e-Edition $78.00 for 180 days
Twelve Months: Print, Online, & e-Edition $144.00 for 365 days
Marketinginfo
Lifestyle Today
Sevice Directory
Request Vacation Hold
Report Delivery Errors
MillerGroup Marketplace
80° Sunny
LaSalle, IL (61301)
Partly cloudy. A stray shower or thunderstorm is possible. High 89F. Winds WSW at 5 to 10 mph..
Clear to partly cloudy. Low 74F. Winds SSE at 10 to 15 mph.
GIRLS TRACK AND FIELD: Donner retires after 35 years
Kevin Chlum
Dale Donner recalls spring days that he spent standing on the track at Bureau Valley watching his athletes practice in the sleet.
"They'd ask, 'what are we doing this for,'" Donner said. "I'd say, 'Because nobody else in the state is doing it. We're making ourselves better.' We got through to them that we're going to do whatever it takes to make ourselves better and we're not going to cut corners."
Over his 35 years as a track and field coach — including 24 years as the only girls track coach in Bureau Valley history — his athletes bought into his hardworking mentality.
"He stressed that you can do it," four-time state qualifier and recent BV graduate Saige Barnett said. "He really stressed mental toughness. He knew we had to put the work in and he pushed us to be our best every single day.
"Nobody wanted to let him down because he was so successful as a track coach. He knew what he was talking about. I think most of the motivation (to work) came from trusting what he was saying and wanting to be just as good as the year before. Not letting down the program was definitely one big factor."
After building the Storm into a program that consistently achieves state-level success, Donner decided to retire.
He made his decision to retire in March but didn't announce it until the team's end of season awards banquet.
"I figured 35 years was enough time," said Donner, who was inducted into the Illinois Track and Cross Country Coaches Hall of Fame in 2015. "I hoped to go out with a bang this year and we had a great year.
"I can't pinpoint one thing that said, 'Hey, it's time to retire,' but it's time to retire. I enjoyed it. I loved the kids. I loved the parents. I loved the atmosphere at school, but every time I thought maybe I shouldn't retire, something would come up to remind me why I was getting out."
Donner led the Storm to four straight sectional championships from 2005-08 and another sectional plaque in 2017. The Storm also finished fourth place in Class 1A in 2018, falling just one point shy of a state trophy.
Under Donner, the Storm won 11 conference titles, including the last five Three Rivers Conference championships.
"He's a legend," Barnett said. "He was inducted into the Hall of Fame for a reason. He always stressed team before individual even though from the outside it looks like an individual sport, but it really isn't. From freshman year it's ingrained. That's why Bureau Valley track is so successful."
Donner said having talented athletes that believed in the coaching staff helped build the Storm program into a perennial power.
"The kids knew the staff was going to put in the same amount of work they put in," Donner said. "We wouldn't just send the kids outside and on a cold, rainy day and say, 'Go out there and come back when you're done.' We were out there with them. They knew the coaches would research what the other teams did, what the other teams were good at and where we could score extra points every meet, and they put in the extra work to get the extra points.
"Success builds upon success. It's all related to confidence. The kids had confidence in the coaching staff that we were going to do the right thing for them. Whether we were doing the right things or not, they believed it so when we got to state they expected to succeed instead of hoping to succeed."
Donner also said a strong coaching staff and supportive parents contributed to the success in his tenure.
"We've been blessed to have parents that support us and I've been blessed to have a great coaching staff — Don Guier, Jeff Ohlson, Jenny Adams, Nick Hartz," Donner said. "The kids are the way they are because of their parents. They raised them to have trust in the coaches. The parents always supported us. We still have parents of kids who graduated 20 years ago come back to help at track and cross country meets. People like that help build the program.
"We've been lucky at Bureau Valley to have all that. We wouldn't have had the success without all that."
Although he's retiring, Donner said he'll still be around the program in some capacity when he's not traveling.
"I'll be back helping out," Donner said. "Right now, we're trying to figure out what we're going to do. We'll do a little traveling. A few years down the road we may do a winter home in Florida. My brother lives down there. My cousin lives down there. We'll come back here during the summers.
"On cold, sleety days, I don't have to be standing on the track. I can be sitting at home in front of the fireplace."
Kevin Chlum can be reached at 220-6939, or at sports@newstrib.com. Follow him on Twitter @NT_SportsEditor.
Dale Donner
Bureau Valley
Saige Barnett
Follow Kevin Chlum
A real time look at local businesses social media postings.
Evan Knoblauch
PHOTOS: St. Bede, comrades say goodbye to firefighter Evan Knoblauch (VIDEO)
Oglesby firefighter Knoblauch succumbs to cancer
La Salle resident calls out alderman for 'disgusting' house
Margaret "Marge" Fisher
Henry "Hank" Lushina
Princeton fire responding to call on South Main Street
Mendota sisters to compete in national rodeo
PHOTO: Rollover crash at LaMoille
James "Jamie" "Smiley" Giuliani
Penalties for texting while driving steeper starting July 1 (2)
Most genealogists stumble on to criminals. Gwen Kubberness looks for them. (2)
My favorite songs of 2019 - So far (1)
Rudy's Liquors to receive $12,500 facade grant (1)
The Fab Five: Five dishes every new grad or rookie chef should learn to make (1)
Oglesby forms committee to review Senica Square feedback (1)
Is a roundabout a good idea for Utica's four corners?
News Tribune e-Edition
Subscription Starts/Renewals
newstrib.com
La Salle, IL 61301
Email: ntonline@newstrib.com
© Copyright 2019 newstrib.com, 426 Second Street La Salle, IL | Terms of Use | Privacy Policy

redpajama_set_name: RedPajamaCommonCrawl


Enjoy 650 kilometres of forest hiking paths on foot, on mountain bike or on horseback; take some of the steepest funiculars and most modern cableways in the world to reach vast networks of ski runs, comfortable refuge huts, magnificent lakes and alpine pastures. Stop to admire the breathtaking views and discover the ancient customs and history of the valley by paying a visit to local museums and some splendid examples of Romanesque architecture. A further fascinating aspect of the region is the existence, side by side, of ancient history and the futuristic technology currently being used to build the longest railway tunnel in the world.


text:
CALLAHAN CONCRETE
More About Callahan Concrete
Callahan Concrete is a family owned and operated business that caters to our customer's needs. The business was incorporated in 1969 by Troy Callahan and Ronald Gobble under the name Gobble Callahan Inc. Troy and his son Jeffrey finished concrete for over 30 years as a part of the company's operations.
Jeffrey acquired Troy's shares when he retired in 1997. The Callahan family invested in Ronald's remaining shares in 2010. Jeffrey's son Jake, who graduated in Dec 2009 from NCSU with a business degree, assumed the position of company president in March 2010.
Previously, he was employed with his father and several other local concrete finishers to get the background that is essential for this position. Our management philosophy holds that you must first have been a customer to fully understand the customer's needs.
Dee Dee Callahan is the secretary/treasurer and batch technician. She worked on the yard for the last four years learning the fundamental operations of the concrete business.
Copyright © 2020 CALLAHAN CONCRETE, all rights reserved.
3545 West US Hwy 64, Lexington, NC 27295 (336) 787-5294


As applications grow increasingly complex, more and more organizations are turning to static code analysis tools to ensure that code meets uniform expectations around security, reliability, performance, and maintainability.
Many evaluators take a common approach to selecting a static code analysis tool for their group or organization: they run each tool on the same code, compare the results, then choose the static code analysis tool that reports the most violations out-of-the-box.
This isn't really a static code analysis product evaluation; it's a bake-off. And the winner is not necessarily the best static code analysis tool for establishing a sustainable, scalable static analysis process within the team or organization. In fact, many of the key factors that make the difference between successful static analysis adoption and yet another failed initiative are commonly overlooked during these bake-offs.
Here are some steps for selecting a static code analysis tool that your team will actually use: one that suits your current situation and will grow with you as your needs evolve.
Before you start searching for a static code analysis tool that meets your needs, you need to take a brutally honest look at where your organization stands today and where you hope static code analysis will take it.
What specific pains are you hoping to address with static code analysis? For example, do you want to eliminate specific performance or stability issues that have been troubling you? Reduce the length and number of QA cycles? Make code more reusable and easier to extend? Satisfy regulatory compliance expectations?
Is your development process stable, repeatable, and streamlined enough to provide a strong foundation for static code analysis? Are there weaknesses you should address first such as a lack of a fully-automated build process?
If you tried static code analysis before, why did it fail? What can be done to prevent the same obstacle from stopping you this time?If you tried static code analysis before, why did it fail? What can be done to prevent the same obstacle from stopping you this time? Organization structure: How is your development organization structured? Will there be a fixed set of quality policies organization-wide and/or more specific rule sets to suit the needs of specific projects and teams?
How will static code analysis efforts vary across your current projects? What new projects are anticipated in the foreseeable future and how will static code analysis apply?
Where do you want your organization to be in terms of static code analysis 2-3 years from now? 10 years from now?


We are located in the historic area of Jim Thorpe, PA. about 1 hour south of Scranton, 1 1/2 hours north of Philadelphia and roughly 2 hours west of New York. Detailed directions and Google Maps below.
From the toll booth, follow signs for 209 South for 6 miles to Jim Thorpe. (After a mile, you will need to turn right after the bridge to stay on 209 South.) At the light, turn left onto Broadway into the town of Jim Thorpe. Broadway turns into West Broadway. We are about 1/4 mile on the right.


DATA Act review finds errors in $2 billion of DHS transactions. Nearly $2 billion in financial transactions completed by the Department of Homeland Security could not be linked to their corresponding award-level transactions for Q2 of FY2017. These misaligned transactions constituted about 38 percent of that quarter's total obligations, according to the DHS' inspector general. This was one of the data quality issues auditors found in their review of the department's compliance with the Digital Accountability and Transparency Act.
Senator seeks probe of 'burrowing' CFPB fed. A Republican senator is asking the Office of Special Counsel to investigate the circumstances surrounding the conversion of Leandra English from an Obama-era political appointee at the Office of Personnel Management to a career official at the Consumer Financial Protection Bureau. Sen. Ron Johnson (R-Wis.), chairman of the Senate Homeland Security and Governmental Affairs Committee, sent a letter to Special Counsel Henry Kerner Dec. 4 flagging what he believes was an improper approval by OPM to convert a senior political appointee into a career position, a practice known as "burrowing in."
Will 2018 be the year for blockchain for government? Government application of the ledger technology lags behind the hype, but expect more experiments to take off in the coming months.
Congress requires mobile-friendly websites. With federal government websites often a generation behind commercial sites, Congress in late December passed the Connected Government Act, which requires all federal agencies that create or redesign websites for public use ensure to the "greatest extent possible" that their websites are mobile friendly. Mobile friendly is defined as a website configuration that can be easily navigated, viewed and accessed on a smartphone, tablet computer or similar mobile device. After the legislation is signed by President Donald Trump, the Office of Management and Budget, in consultation with the General Services Administration, will submit a report to Congress within 18 months describing the act's and agency compliance.
White House names acquisition leaders at DOD, Air Force. The White House announced nominations for two key defense acquisition positions Jan. 3 for the Office of the Secretary of Defense and the Air Force.Kevin Fahey, who formerly led the Army's Acquisition, Logistics, and Technology's systems engineering and integration and was the program executive officer for combat ground systems, will become the assistant defense secretary for acquisition. The White House named William Roper, the current director for the defense secretary's Strategic Capabilities Office, to be the Air Force's assistant secretary of acquisition.
Reflections on a Career in Service. Federal News Radio's Tom Temin interviews former IRS Commissioner John Koskinen about his varied career experiences in public service, tackling big, thankless problems.
The Business of Government Hour: Conversations with Authors Series on Five Actions to Improve Military Hospital Performance. What challenges does the US Department of Defense's direct care system face? How can these challenges be overcome? What are five actions to improve military hospital performance? Join host Michael Keegan next week on a Special Edition of The Business of Government Hour as he explores these questions and more with John Whitley, author of the IBM Center report, Five Actions to Improve Military Hospital Performance.


Notable chart achievements for three of your faves...really!
6/28/1975 (42 years ago today) - The Eagles kick off a five-week run at No. 1 with their fourth studio album "One Of These Nights" -- Truly a breakthrough release, featuring three Top 5 singles (the title track, "Take It To The Limit", and "Lyin' Eyes" which also won a Grammy) and selling over 4 million copies in the process -- In the four years that followed they clearly established themselves as America's Number One band: you do know what came next don't you?
Share your mumblings and grumblings with the Calendar here on our web site and on the WBLM Facebook and Twitter pages with the hashtag #TommysCoffeeBreak.
"Got to keep the loonies on the path...", xoxo!


It finally happened. Just like on television. A man walked right up to me and asked me if he could buy me a cup of coffee. I politely turned him down, refused to give him my number, but let him know he could look for me at the library.
The problem? I'm not sure. First of all, is sharing coffee at the library with a man really considered a date? Especially considering the fact that I'm new in town and itching to learn more about my surroundings, as well as meet new people. Is it wrong to assume that every man who asks to spend time with me only has one thing on his mind? Is it wrong of me to rate every man based on his dateability factor, and summarily dismiss the thought of getting to know anyone I wouldn't consider dating material? But in my defense, he was older, and darker, and carried the backpack that so often carries with it the indication of homelesness.
But wait. I was also standing on the lawn of the library, wearing a backpack. And, let's not forget, that just a few weeks ago people actually mistook me for being homeless. So I guess my question is this—in the spirit of meeting new people, am I being too judgmental? Should I indulge in a cup of java with a man who obviously isn't a dating match? Is it possible to enjoy conversation and learn about my new surroundings without worrying about another's motives?
You probably look for alot of the same traits in romantic partners and friends so if you dont want to date him maybe you just arent that interested in getting to know him period.
So when I read your blog I immediately was reminded of a great word picture describing what I think every woman dreams of. Marry Me by Train video depicts a waitress on her knees cleaning spilled coffee while her admirer is sitting there wondering what her name is. Great video and could not help but hold out the same hope with this mysterious man. Yet I do agree that the spark will be there also and that you should go with your first instinct. Just saying…. friends still are where we make them……Hugs friend and you look terrific!


As of yesterday the videos of the last Apache Hadoop Get Together Berlin are available online.
Thanks to the speakers for providing insight in their projects and thanks to Cloudera for sponsoring the videos.
The next meetup will be announced soon - three talks have already been proposed. In addition, StudiVZ offered to sponsor video taping of the next Get Together. Looking forward to seeing you in Berlin in December.


In case you didn't catch it, Mike Valley was interviewed by Josh Fisher on last night's game. He stated that Brent Krahn has a doctor's appointment today to see if he can be cleared to get back out on the ice. He then said that it would take at least a week and a half after that to get Krahn back in game shape. Just some great news to pass along.
I actually have yet to see him play. I think he was only in net one or two of our home games early in the season? Still sad about what Krahn coming back might mean for Ford, but after last night he showed us he's only human after all. Ford's career will be one to follow, though.
Stephen, any word on how it went?


What a great weekend at Beaver Creek Park! There was plenty of relaxation, laughter, and great food. We cooked for the masses and guests stopped by the cabin throughout the afternoon and evening. Everyone brought their appetites and best campfire stories.
My favorite part of the evening was bedtime. My mom, aunt, and I pulled up cots around the campfire and slept under the stars. It took me forever to fall asleep because I just couldn't stop staring at the sky with a big goofy grin on my face. Montana isn't just the Big Sky State during the day; the night sky is amazing! The Milky Way stretched across the sky and I saw at least a dozen shooting stars. I finally fell asleep to the sound of the coyotes howling.
In the morning I decided to go for a walk through the meadow, but the hill behind the cabin was calling my name. I grabbed the dogs' favorite squeak toy and headed up the hill with Amigo and Chester in hot pursuit. Only Chester followed me all the way to the top. He was so proud he was the one to get the squeak toy that he strutted all the way back down the hill to show everyone back at the camp. Tomorrow it's off to Glacier Park!
What a perfect way to spend the day! Yummy looking lunch too! I love eating outside!
It was pretty amazing! Like an animal returning to the wild, I could feel the social pressures just slipping away throughout the weekend. My favorite part was sleeping under the stars! It was just so gorgeous and the coyotes howling behind us made it all the more special!
I know, it is wonderful eh? I just spend the past weekend camping in a tent on the Kennebec River in Maine. The flowing waters lulled me to sleep every night. It was perfect!
That does sound perfect! Oh and by the way I did get to hang out with some Canadians over the weekend. 🙂 They have a cabin a few doors down from my aunt.


text:
[![Swift 5](https://img.shields.io/badge/swift-5-lightgrey.svg?style=for-the-badge)](https://swift.org)
![iOS 8+](https://img.shields.io/badge/iOS-8-lightgrey.svg?style=for-the-badge)
![Carthage](https://img.shields.io/badge/carthage-compatible-green.svg?style=for-the-badge)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg?style=for-the-badge)](https://github.com/cuba/NetworkKit/blob/master/LICENSE)

NetworkKit
============

**ATTENTION** NetworkKit has been **RENAMED** to [PewPew](https://github.com/cuba/PewPew). This repository is no longer supported but the project is still going on [here](https://github.com/cuba/PewPew) (just under a new name).

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Encoding](#encoding)
- [Decoding](#decoding)
- [ResponseFuture](#responsefuture)
- [Memory Managment](#memory-managment)
- [Custom Encoding](#custom-encoding)
- [Custom Decoding](#custom-decoding)
- [Mock Dispatcher](#mock-dispatcher)
- [Future Features](#future-features)
- [Dependencies](#dependencies)
- [Credits](#credits)
- [License](#license)

## Features

- [x] A wrapper around network requests
- [x] Uses ResponseFuture to allow scalablity and dryness
- [x] Convenience methods for deserializing Decodable and JSON
- [x] Easy integration
- [x] Handles common http errors
- [x] Returns production safe error messages
- [x] Strongly typed and safely unwrapped responses
- [x] Easily extensible to support other networking tools and frameworks such as Alamofire, ObjectMapper and MapCodableKit

## Installation

### Carthage

[Carthage](https://github.com/cuba/NetworkKit) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with [Homebrew](http://brew.sh/) using the following command:

```bash
$ brew update
$ brew install carthage
```

To integrate NetworkKit into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "cuba/NetworkKit" ~> 4.2
```

Run `carthage update` to build the framework and drag the built `NetworkKit.framework` into your Xcode project.

## Usage

### 1. Import `NetworkKit` into your file

```swift
import NetworkKit
```

### 2. Implement a  `ServerProvider`

The server provider gives the server url.  The reason a simple URL is not used is so that you can dynamically change the url.  Say for example you have an environment picker.  You would have to recreate the dispatcher every time you change the environment.  The simplest way to create a ServerProvider is to just implement the protocol on your ViewController.

```swift
extension ViewController: ServerProvider {
    var baseURL: URL {
        return URL(string: "https://example.com")!
    }
}
```

But you may chose to use a seperate object to implement the server provider or create a singleton.  Because the reference to the server provider on the `NetworkDispatcher` is weak, you don't have to worry about circular references.

### 3. Making a request.

Now that we have our `ServerProvider` established, we can start making api calls.

```swift
let dispatcher = NetworkDispatcher(serverProvider: self)
let request = BasicRequest(method: .get, path: "/posts")

dispatcher.future(from: request).response({ response in
    // Handles all responses including negative responses such as 4xx and 5xx

    // The error object is available if we get an
    // undesirable status code such as a 4xx or 5xx
    if error = response.error {
        // Throwing an error in any callback will trigger the `error` callback.
        // This allows us to pool all failures in one place.
        throw error
    }

    let post = try response.decode(Post.self)
    // Do something with our deserialized object
    // ...
}).error({ error in
    // Handles any errors during the request process,
    // including anything thrown in any of the callback (except this one).
}).completion({
    // The completion callback is guaranteed to be called once
    // for every time the `start()` or `send()` method is triggered on the future.
    //
}).start()
```

**NOTE**: Nothing will happen if you don't call `start()`.
**NOTE**: Strange things might happen if you call  `start()` more than once.  Don't do it.

### 4. Splitting up concerns and transforming the future

*Pun not indended (honestly)*

Now lets decode our object somewhere else.  This way, our business logic is not mixed up with our serialization logic.
One of the great thing about using futures is that we can return them! So now we can move the serialization part of our logic somewhere else without heavy restructuring of our code.

If we have the following method,

```swift
private func getPosts() -> ResponseFuture<[Post]> {
    let dispatcher = NetworkDispatcher(serverProvider: self)
    let request = BasicRequest(method: .get, path: "/posts")

    // We create a future and tell it to transform the response using the
    // `then` callback.
    return dispatcher.future(from: request).then({ response -> [Post] in
        // This callback transforms our response to another type
        // We can still handle errors the same way as we did before.

        if let error = response.error {
            // The error is available when a non-2xx response comes in
            // Such as a 4xx or 5xx
            // You may also parse a custom error object here.
            throw error
        }

        // Return the decoded object. If an error is thrown while decoding,
        // It will be caught in the `error` callback.
        return try response.decode([Post].self)
    })
}
```

**NOTE**: We intentionally did not call `start()` in this case.

Then we can simply do this:

```swift
getPosts().response({ posts in
    // Handle the success which will give your posts.
    responseExpectation.fulfill()
}).error({ error in
    // Triggers whenever an error is thrown.
    // This includes deserialization errors, unwraping failures, and anything else that is thrown
    // in a any other throwable callback.
}).completion({
    // Always triggered at the very end to inform you this future has been satisfied.
}).send()
```

## Encoding

NetworkKit has some convenience methods for you to encode objects into JSON and add them to the `BasicRequest` object.

### Encode JSON `String`
Since this is a JSON Request, this string should be encoded as JSON.

```
var request = BasicRequest(method: .post, path: "/users")
request.setJSONBody(string: jsonString, encoding: .utf8)
```

### Encode JSON Object

```
let jsonObject: [String: Any?] = [
    "id": "123",
    "name": "Kevin Malone"
]

var request = BasicRequest(method: .post, path: "/users")
try request.setJSONBody(jsonObject: jsonObject)
```

### Encode `Encodable`

```
var request = BasicRequest(method: .post, path: "/posts")
try request.setJSONBody(encodable: myCodable)
```

### Custom Encoding (By setting the `Data` object)

You can add a simple data object if you need to add some custom data encoding.

```swift
var request = BasicRequest(method: .post, path: "/users")
request.httpBody = myData
```

### Wrap Encoding In a ResponseFuture

It might be beneficial to wrap the Request creation in a ResponseFuture. This will allow you to:
1. Delay the request creation at a later time when submitting the request.
2. Combine any errors thrown while creating the request in the error callback.

To quickly do this, there is a convenience method on the Dispatcher protocol.

```swift
dispatcher.future(from: {
    var request = BasicRequest(method: .post, path: "/posts")
    try request.setJSONBody(myCodable)
    return request
}).error({ error in
    // Any error thrown while creating the request will trigger this callback.
}).send()
```

## Decoding

NetworkKit can decode any number of object types.

### Unwrapping `Data`

This will unwrap the data object for you or throw a ResponseError if it not there. This is convenent so that you don't have to deal with those pesky optionals.

```swift
dispatcher.future(from: request).response({ response in
    let data = try response.unwrapData()

    // do something with data.
    print(data)
}).error({ error in
    // Triggered when the data object is not there.
}).send()
```

### Decode `String`

```swift
dispatcher.future(from: request).response({ response in
    let string = try response.decodeString(encoding: .utf8)

    // do something with string.
    print(string)
}).error({ error in
    // Triggered when decoding fails.
}).send()
```

### Decode `Decodable`

```swift
dispatcher.future(from: request).response({ response in
    let posts = try response.decode([Post].self)

    // do something with string.
    print(posts)
}).error({ error in
    // Triggered when decoding fails.
}).send()
```

For arrays:

```swift
dispatcher.future(from: request).success({ response in
    let posts = try response.decodeMapDecodable([Post].self)

    // do something with string.
    print(posts)
}).error({ error in
    // Triggered when decoding fails.
}).send()
```

## ResponseFuture

You've already seen that a `ResponseFuture` allows you to chain your callbacks, transform the response object and pass it around.  But besides the simple example above, there is so much more you can do to make your code amazingly clean.

```swift
dispatcher.future(from: request).then({ response -> Post in
    // Handles any responses and transforms them to another type
    // This includes negative responses such as 4xx and 5xx

    // The error object is available if we get an
    // undesirable status code such as a 4xx or 5xx
    if let error = response.error {
        // Throwing an error in any callback will trigger the `error` callback.
        // This allows us to pool all our errors in one place.
        throw error
    }

    return try response.decode(Post.self)
}).replace({ post -> ResponseFuture<EnrichedPost> in
    // Perform some operation operation that itself requires a future
    // such as something heavy like markdown parsing.
    return self.enrich(post: post)
}).join({ enrichedPost -> ResponseFuture<User> in
    // Joins a future with another one returning both results
    return self.fetchUser(forId: post.userId)
}).response({ enrichedPost, user in
    // The final response callback includes all the transformations and
    // Joins we had previously performed.
}).error({ error in
    // Handles any errors throw in any callbacks
}).completion({
    // At the end of all the callbacks, this is triggered once.
}).send()
```

### Callbacks

#### `response` callback

The success callback when the request is recieved and no errors are thrown in any chained callbacks (such as `then` or `join`).
At the end of the callback sequences, this gives you exactly what your transforms promised to return.

```swift
dispatcher.future(from: request).response({ response in
    // When a response is recieved
})
```

**NOTE**:  This method should **ONLY** be called **ONCE**.

#### `error` callback

The error callback is triggered whenever something is thrown during the callback sequence from the moment you trigger `send()`.  This includes errors thrown when attempting to deserialize the body for both successful and unsuccessful responses, errors in any `then`, `join`, `replace` and `response` callbacks.

```swift
dispatcher.future(from: request).error({ error in
    // Any errors thrown in any of the callbacks (except this one)
})
```

**NOTE**:  This method should **ONLY** be called **ONCE**.

#### `completion` callback

The completion callback is always triggered at the end after all `ResponseFuture` callbacks once every time `send()` or `start()`  (`Promise` only) is triggered.

```swift
dispatcher.future(from: request).completion({
    // The completion callback guaranteed to be called once
    // for every time the `send` or `start` method is triggered on the callback.
})
```

**NOTE**:  This method should **ONLY** be called **ONCE**.

#### `then` callback

This callback transforms the `success` type to another type.

```swift
dispatcher.future(from: request).then({ response -> Post in
    // The `then` callback transforms a successful response
    // You can return any object here and this will be reflected on the success callback.
    return try response.decode(Post.self)
}).response({ post in
    // Handles any success responses.
    // In this case the object returned in the `then` method.
})
```

#### `replace` callback

This callback transforms the future to another type using another callback.  This allows us to make asyncronous calls inside our callbacks.

```swift
dispatcher.future(from: request).then({ response -> Post in
    return try response.decode(Post.self)
}).replace({ post -> ResponseFuture<EnrichedPost> in
    // Perform some operation operation that itself requires a future
    // such as something heavy like markdown parsing.
    return self.enrich(post: post)
}).response({ enrichedPost in
    // The final response callback has the enriched post.
})
```

#### `join` callback

This callback transforms the future to another type containing its original results plus the results of the returned callback. This allows us to make asyncronous calls in series.

```swift
dispatcher.future(from: request).then({ response -> Post in
    return try response.decode(Post.self)
}).join({ post -> ResponseFuture<User> in
    // Joins a future with another one returning both results
    return self.fetchUser(forId: post.userId)
}).response({ post, user in
    // The final response callback includes both results.
})
```

#### `send` or `start`

This will start the `ResponseFuture`. In other words, the `action` callback will be triggered and the requests will be sent to the server.

**NOTE**: If this method is not called, nothing will happen (no request will be made).
**NOTE**: This method should **ALWAYS** be called **AFTER** declaring all of your callbacks (`success`, `failure`, `error`, `then` etc...)
**NOTE**:  This method should **ONLY** be called **ONCE**.

### Creating your own ResponseFuture

You can create your own ResponseFuture for a variety of reasons. If you do, you will have all the benefits you have seen so far.

Here is an example of a response future that does decoding in another thread.

```
return ResponseFuture<[Post]>(action: { future in
    // This is an example of how a future is executed and
    // fulfilled.

    // You should always syncronize
    DispatchQueue.global(qos: .userInitiated).async {
        // lets make an expensive operation on a background thread.
        // The below is just an example of how you can parse on a seperate thread.

        do {
            // Do an expensive operation here ....
            let posts = try response.decode([Post].self)

            DispatchQueue.main.async {
                // We should syncronyze the result back to the main thread.
                future.succeed(with: posts)
            }
        } catch {
            // We can handle any errors as well.
            DispatchQueue.main.async {
                // We should syncronize the error to the main thread.
                future.fail(with: error)
            }
        }
    }
})
```

**NOTE** You should **ALWAYS** syncronize the results on the main thread before succeeding or failing your future

## Memory Managment

The `ResponseFuture` may have 3 types of strong references:
1. The system may have a strong reference to the `ResponseFuture` after `send()` is called. This reference is temporary and will be dealocated once the system returns a response. This will never create a circular reference but as the promise is held on by the system, it will not be released until **AFTER** a response is recieved or an error is triggered.
2. Any callback that references `self` has a strong reference to `self` unless `[weak self]` is explicitly specified.
3. The developer's own strong reference to the `ResponseFuture`.

### Strong callbacks

When **ONLY**  `1` and `2` applies to you, no circular reference is created. However the object reference as `self` is held on stongly temporarily until the request returns or an error is thrown.  You may wish to use `[weak self]` in this case but it is not necessary.

```swift
dispatcher.future(from: request).then({ response -> [Post] in
    // [weak self] not needed as `self` is not called
    return try response.decode([Post].self)
}).response({ posts in
    self.show(posts)
}).send()
```

**WARNING** If you use `[weak self]` do not forcefully unwrap `self` and never forcefully unwrap anything on `self`.

**!! DO NOT DO THIS !!**:

```swift
dispatcher.future(from: request).success({ response in
    // We are foce unwrapping a text field! DON NOT DO THIS!
    let textField = self.textField!

    // If we dealocated textField by the time the
    // response comes back, a crash will occur
    textField.text = "Success"
}).send()
```

You will have crashes if you force unwrap anything in your callbacks (i.e. usign a `!`).  We suggest you **ALWAYS** avoid force unwrapping anything in your callbacks. Always unwrap your objects before using them including any `IBOutlet`s that the system generates.

### Strong reference to a `ResponseFuture`

You may be holding a reference to your `ResponseFuture`. This is fine as long as you make the callbacks weak in order to avoid circular references.

```swift
self.postResponseFuture = dispatcher.future(from: request).then({ response in
    // [weak self] not needed as `self` is not called
    let posts = try response.decode([Post].self)
    return SuccessResponse<[Post]>(data: posts, response: response)
}).response({ [weak self] response in
    // [weak self] needed as `self` is called
    self?.show(response.data)
}).completion({ [weak self] in
    // [weak self] needed as `self` is called
    self?.postResponseFuture = nil
})

// Perform other logic, add delay, do whatever you would do that forced you
// to store a reference to this ResponseFuture in the first place

self.postResponseFuture?.send()
```

**WARNING** If you hold strongly to your future but don't make `self` weak using `[weak self]` you are guaranteed to have a cirucular reference. The following is a bad example that should not be followed:

**!! DO NOT DO THIS !!**

```swift
self.strongResponseFuture = dispatcher.future(from: request).response({ response in
    // Both the `ResponseFuture` and `self` are held on by each other.
    // `self` will never be dealocated and neither will the future!
    self.show(response.data)
}).send()
```

if `self` has a strong reference to your `ResponseFuture` and the `ResponseFuture` has a strong reference to `self` through any callback, you have created a circular reference. Neither will be dealocated.

### Weak reference to a `ResponseFuture`

You may chose to have a weak reference to your ResponseFuture. This is fine, as long as you do it after calling `send()` as your object will be dealocated before you get a chance to do this.

```swift
self.weakResponseFuture = dispatcher.future(from: request).completion({
    // Always triggered
}).send()

// This ResponseFuture may or may not be nil at this point.
// This depends on if the system is holding on to the
// ResponseFuture as it is awaiting a response.
// but the callbacks will always be triggered.
```

**NOTE** The following is an example of where we our request will never happen because we lose the referrence to the ResponseFuture before `send()` is triggered:

**DO NOT DO THIS**:

```swift
self.weakResponseFuture = dispatcher.future(from: request).completion({
    // [weak self]
    expectation.fulfill()
})

// WHOOPS!!!!
// Our object is already nil because we have not established a strong reference to it.
// The `send()` method will do nothing and no callback will be triggered.

self.weakResponseFuture?.send()
```

## Custom Encoding

You can extend BasicRequest to add encoding for any type of object.

### ObjectMapper

`ObjectMapper` is not included in the framework. This is in order to make the framework much lighter for those that don't want to use it.  But if you want, you can easily add encoding support for `ObjectMapper`.  Here is an example how you can add `BaseMappable` (`Mappable` and `ImmutableMappable`) encoding support for objects and arrays:

```swift
extension BasicRequest {
    /// Add JSON body to the request from a `BaseMappable` object.
    ///
    /// - Parameters:
    ///   - mappable: The `BaseMappable` object to serialize into JSON.
    ///   - context: The context of the mapping object
    ///   - shouldIncludeNilValues: Wether or not we should serialize nil values into the json object
    mutating func setJSONBody<T: BaseMappable>(mappable: T, context: MapContext? = nil, shouldIncludeNilValues: Bool = false) {
        let mapper = Mapper<T>(context: context, shouldIncludeNilValues: shouldIncludeNilValues)

        guard let jsonString = mapper.toJSONString(mappable) else {
            return
        }

        self.setJSONBody(string: jsonString)
    }

    /// Add JSON body to the request from a `BaseMappable` array.
    ///
    /// - Parameters:
    ///   - mappable: The `BaseMappable` array to serialize into JSON.
    ///   - context: The context of the mapping object
    ///   - shouldIncludeNilValues: Wether or not we should serialize nil values into the json object
    mutating func setJSONBody<T: BaseMappable>(mappable: [T], context: MapContext? = nil, shouldIncludeNilValues: Bool = false) {
        let mapper = Mapper<T>(context: context, shouldIncludeNilValues: shouldIncludeNilValues)

        guard let jsonString = mapper.toJSONString(mappable) else {
            return
        }

        self.setJSONBody(string: jsonString)
    }
}
```

### MapCodableKit

[MapCodableKit](https://github.com/cuba/MapCodableKit) is a lightweight json parsing framework.

Similarly `MapCodableKit` support is no longer available on this framework.  But like `ObjectMapper` You can easily add back support for  `MapEncodable`.

```swift
extension BasicRequest {
    /// Add body to the request from a `MapEncodable` object.
    ///
    /// - Parameters:
    ///   - mapEncodable: The `MapEncodable` object to serialize into JSON.
    ///   - options: Writing options for serializing the `MapEncodable` object.
    /// - Throws: Any serialization errors thrown by `MapCodableKit`.
    mutating public func setJSONBody<T: MapEncodable>(mapEncodable: T, options: JSONSerialization.WritingOptions = []) throws {
        ensureJSONContentType()
        self.httpBody = try mapEncodable.jsonData(options: options)
    }
}
```

## Custom Decoding

Similar to encoding, you can also add Decoding support for whatever decoder you are using, including `ObjectMapper` by extending the `ResponseInterface`

### ObjectMapper

```swift
extension ResponseInterface where T == Data? {
    /// Attempt to Decode the response data into an BaseMappable object.
    ///
    /// - Returns: The decoded object
    func decodeMappable<D: BaseMappable>(_ type: D.Type, context: MapContext? = nil) throws  -> D {
        let jsonString = try self.decodeString()
        let mapper = Mapper<D>(context: context)

        guard let result = mapper.map(JSONString: jsonString) else {
            throw SerializationError.failedToDecodeResponseData(cause: nil)
        }

        return result
    }

    /// Attempt to decode the response data into a BaseMappable array.
    ///
    /// - Returns: The decoded array
    func decodeMappable<D: BaseMappable>(_ type: [D].Type, context: MapContext? = nil) throws  -> [D] {
        let jsonString = try self.decodeString()
        let mapper = Mapper<D>(context: context)

        guard let result = mapper.mapArray(JSONString: jsonString) else {
            throw SerializationError.failedToDecodeResponseData(cause: nil)
        }

        return result
    }
}
```

### MapCodableKit

[MapCodableKit](https://github.com/cuba/MapCodableKit) is a lightweight json parsing framework.

```swift
extension ResponseInterface where T == Data? {

    /// Attempt to deserialize the response data into a MapDecodable object.
    ///
    /// - Returns: The decoded object
    func decodeMapDecodable<D: MapDecodable>(_ type: D.Type) throws -> D {
        let data = try self.unwrapData()

        do {
            // Attempt to deserialize the object.
            return try D(jsonData: data)
        } catch {
            // Wrap this error so that we're controlling the error type and return a safe message to the user.
            throw SerializationError.failedToDecodeResponseData(cause: error)
        }
    }

    /// Attempt to decode the response data into a MapDecodable array.
    ///
    /// - Returns: The decoded array
    func decodeMapDecodable<D: MapDecodable>(_ type: [D].Type) throws  -> [D] {
        let data = try self.unwrapData()

        do {
            // Attempt to deserialize the object.
            return try D.parseArray(jsonData: data)
        } catch {
            // Wrap this error so that we're controlling the error type and return a safe message to the user.
            throw SerializationError.failedToDecodeResponseData(cause: error)
        }
    }
}
```

## Mock Dispatcher

Testing network calls is always a pain.  That's why we included the `MockDispatcher`.  It allows you to simulate network responses without actually making network calls.

```swift
let url = URL(string: "https://jsonplaceholder.typicode.com")!
let dispatcher = MockDispatcher(baseUrl: url, mockStatusCode: .ok)
let request = BasicRequest(method: .get, path: "/posts")
try dispatcher.setMockData(codable)

/// The url specified is not actually called.
dispatcher.future(from: request).send()
```

## Future Features

- [ ] Parallel calls
- [x] Sequential calls:
- [ ] Custom translations
- [ ] More futuresque request creation
- [ ] A more generic dispatcher. The response object is way too specific.

## Dependencies

NetworkKit includes. This is a light-weight library.

## Credits

NetworkKit is owned and maintained by Jacob Sikorski.

## License

NetworkKit is released under the MIT license. [See LICENSE](https://github.com/cuba/NetworkKit/blob/master/LICENSE) for details

redpajama_set_name: RedPajamaGithub


text:
package gov.va.hmp.vista.rpc.conn;

import gov.va.hmp.vista.rpc.RpcException;
import gov.va.hmp.vista.rpc.RpcHost;
import gov.va.hmp.vista.rpc.RpcRequest;
import gov.va.hmp.vista.rpc.RpcResponse;

/**
 * A Connection represents an application-level handle that is used by a client to access the underlying
 * physical connection to a VistA instance.
 *

 *
A client gets a Connection instance by using the getConnection method on a ConnectionFactory instance.
 *
 * @see ConnectionFactory
 */
public interface Connection {

    /**
     * The hostname and port of the VistA system to which this connection is open.
     * @return
     */
    RpcHost getHost();

    /**
     * Gets the information on the underlying VistA instance represented through an active connection.
     *
     * @return {@link SystemInfo} instance representing information about the VistA instance.
     * @throws gov.va.hmp.vista.rpc.RpcException if there is a failure getting information about the connected VistA instance.
     */
    SystemInfo getSystemInfo() throws RpcException;

    /**
     * Gets the information on the currently connected user to the underlying VistA instance.
     *
     * @return {@link ConnectionUserDetails} instance representing information about the connected user.
     * @throws RpcException if there is a failure getting information on the currently connected user.
     */
    ConnectionUserDetails getUserDetails() throws RpcException;

    /**
     * Sends an {@link gov.va.hmp.vista.rpc.RpcRequest} to the underlying VistA instance, giving it a chance to respond with an
     * {@link gov.va.hmp.vista.rpc.RpcResponse} or a {@link RpcException}.
     *
     * @param request an RpcRequest to send to the VistA system
     * @return an RpcResponse returned by the VistA system
     * @throws RpcException if any error occurs during execution of the RPC
     * @see gov.va.hmp.vista.rpc.RpcRequest
     * @see gov.va.hmp.vista.rpc.RpcResponse
     */
    RpcResponse send(RpcRequest request) throws RpcException;

    /**
     * Releases this {@link Connection} object's network resources
     * immediately instead of waiting for them to be automatically released.
     *

     * Calling the method close on a {@link Connection}
     * object that is already closed is a no-op.
     *
     * @throws RpcException if an error occurs
     */
    void close() throws RpcException;

    /**
     * Returns whether or not this connection has been closed.
     *
     * @return true if the connection is closed, false otherwise.
     * @throws RpcException if an error occurs testing whether or not the connection is closed.
     */
    boolean isClosed() throws RpcException;

     /**
     * Checks whether this connection has gone down.
     * Network connections may get closed during some time of inactivity
     * for several reasons. The next time a read is attempted on such a
     * connection it will throw an {@link java.io.IOException}.
     * This method tries to alleviate this inconvenience by trying to
     * find out if a connection is still usable. Implementations may do
     * that by attempting a read with a very small timeout. Thus this
     * method may block for a small amount of time before returning a result.
     * It is therefore an expensive operation.
     *
     * @return  true if attempts to use this connection are
     *          likely to succeed, or false if they are likely
     *          to fail and this connection should be closed
     */
    boolean isStale();

    /**
     * Returns a set of connection metrics.

     * @return ConnectionMetrics
     */
    ConnectionMetrics getMetrics();

    /**
     * Number of milliseconds it took to establish and authenticate the connection with VistA.
     * @return
     */
    long getElapsedMillis();
}


text:
Meet the Lottery man who makes millionaires in the Westcountry
'It's a great job. I see it as being akin to being a midwife, helping someone with a newborn baby'
Tristan CorkSenior Reporter
Andy Carter, the National Lottery's south west and Wales winner's advisor. (Image: Photo: Dylan Nolte)
Sign up for our Truro newsletter and you'll never miss a big story again
There's a man in the Westcountry whose job it is to make millionaires.
If you win the lottery tonight or tomorrow or next week, this man will hand over your winnings, but he'll also look after you for life if you need.
Andy Carter is the official National Lottery winners' advisor. The 47-year-old guides people through the immediate shock of having their life transformed overnight - and for days, weeks, months and even years to come.
And his unique role, which covers anyone who wins more than £50,000 anywhere in the south west from Tewkesbury to Penzance, means he has an equally unique take on what happens when someone suddenly comes into a very large sum of money.
The most common amount given out by Andy is a million pounds - but it can be much, much more. Under normal circumstances, without a global pandemic, you will find yourself making a cup of tea for Andy in your kitchen within 24 hours of you making that phone call to claim your win.
From there, you might see him once or twice more, or he could become a close confidante and advisor - something that is often the case if you keep your big win a secret, and he's the only other person you know who knows about it.
CornwallLive, DevonLive and PlymouthLive work hard to bring you uplifting, fascinating and captivating features each weekend. To read them before anyone else, sign up to our Weekend Report here
But for most people, sharing their lives with this new best friend is a joy - and Andy has made friends for life from his job.
"I get sent the details and make contact with the winners. If you win in Bristol tonight, I would give you a call back after you've phoned in the claim," he said.
"There's the part of the job which is the checking out of the ticket, making sure everything is above board, and that doesn't take long, and then there's the second, main part, which is looking after someone going through what for most people is a life-changing experience," he added.
According to Andy, giving someone a million pounds - or £10 million - doesn't make you realise how greedy and extravagant people are, but instead quite the opposite. It's very often an uplifting experience.
"It's a real privilege - they take you into their life at a unique time, and it reinforces your faith in human nature.
"On the whole, people are really sensible with it and don't go mad straight away.
"Normally we'd be in their house within 24 hours, but at the moment with Covid and everything, we have tended to meet up at a third venue, or do work via video call.
"What this job teaches you is that everybody is so different and unique."
Peter Congdon and his lucky balls (Image: Tom Last/Cornwall Live)
One of the Westcountry's most high profile winners was Peter Congdon, from the Trelander estate in Truro, who won £13.5million in 2015. He went on holiday to Butlins to celebrate his win but has since paid off his children's mortgages, bought them cars, moved to a new house across the road from his old one and donated millions to the Merlin MS Centre which helped his wife.
"The winners I deal with come in all sorts of different shapes, sizes and situations - it could be someone who is married with grown up children, who they might not even want to tell, or it could be a syndicate at a workplace, so you have different issues to deal with there, or a whole family, or a sports team - it's absolutely everyone and anyone and it's always really really different," he added.
Plymouth's National Lottery winners and how they blew their fortunes
Someone who wins a million on the lottery can, of course, take the money, say 'thank you very much' and book the first flight to Barbados without ever talking at length with Andy, but in practice that doesn't happen.
"The first thing we say to people, and it always sounds quite boring, is to take your time with stuff," he said.
"Covid has helped that a bit, because it's made people stop and think and they can't actually just go straight off into the sunset.
"It's a huge shock and you do need a bit of time. Winning a million or more - that's a lot to take and you don't need to do anything quickly.
"The second thing is we provide access to good advice, lawyers and financial advice, that could also be life coaches and concierge experts. All of a sudden, people are in a different world, and there are people who can help with that," he added.
"On the whole, people are overwhelmingly generous. We know that everyone plays that game of dreaming what you'd do with a big lottery win - they say 'I'd have an apartment in Barbados or a boat or something' - but actually when it comes down to it, the things people do first are sensible things: They pay off their mortgage, set up their children, they think about their work situation rather than just quit their job straight away, because you still need a reason to get up in the morning," he added.
John and Allison have quit their jobs since scooping the huge win (Image: PA)
It's a long held truth that we reveal ourselves at times of great upheaval and shock, when life-changing things happen. Very often, that's in tragic circumstances, but it can be true in those life-changing positive moments too.
"This job gives you a fascinating insight into what happens to people - and people are overwhelmingly conservative," Andy said.
"People grow into their wealth over time. It might be a couple of years before they start making those sort of extravagant purchases.
"If someone wins something like £105 million, we would be with them for a good few days. We're in contact with them for as long as they need us to be.
"What's lovely is that people will get back in touch a couple of years later to tell me that they've finally done that thing they were talking about, and splashed out on a villa in the sun or something - especially if they haven't told anyone about their win, and actually I'm the only other person who knows," he added.
One of the things big lottery winners are asked fairly quickly is whether or not they want the publicity - the photocall with the big cheque and the champagne, and the press conference or interview.
"You've got to do what's right for you - what sort of person are you?" said Andy.
"If you're someone who is outgoing and happy to be photographed, then go for it, but if you're someone who is a bit more reserved and private, then maybe not.
"It also would be very different to be the person who wins £105 million compared to the person who wins less than a million," he added.
The question, funnily enough, means different things for people depending on where they live, what sort of community they are in, according to Andy, who will visit you if you live a transitory life in Bristol's bedsits, or if you've lived in the same village with the same neighbours for 50 years.
"As well, you have to think about who is going to find out anyway. Someone living in a small village or rural community, where everyone knows everyone else's business - I find people in the community find out quite quickly, but if you're in an urban area where your neighbours might not really know you that well, then it always seems easier to not disclose it.
"The decision is always the winner's choice entirely. It's not right for everyone to go public," he added.
Meet the Bodmin postie who wears fancy dress on his round every Friday
What people do with their money varies hugely too, once they've taken the financial advice, planned for the future, set up their loved ones, paid off the mortgage or bought that house.
"People have bought everything from prosthetic limbs to football clubs," he added.
National Lottery - £300,000 winner Kirsty Pippard, from Bridgwater (Image: Huw John)
The first thing people imagine a big lottery win will mean is the dream of sticking two fingers up at your boss and walking out of the job, never to be seen again.
But actually, that is a prospect many people who actually win the lottery don't go through with, for a number of reasons.
"The question about whether you should, can or do give up work is actually more complicated than people think," explained Andy.
"It might not be the case that winning a million or £10 million means you can give up work or if you will even want to.
"It all depends on your age and what sort of lifestyle you want. If you're 55 and win a million, you could probably give up work and retire early with the sort of retirement lifestyle you were expecting.
"But if you're 21 and win a million, you would have to work again, no question.
Inside a car boot sale in Cornwall during a pandemic
"Everything is on your age and desired income. This is what the financial planners will work with you on, and a lot of it depends on the kind of life you want.
"In actual fact, very few people give up work, even if they can. Retirement is a big shock to people even when they are expecting it and planning for it, so then it's even more of a shock to the system when it comes suddenly.
"Plus, a lot of people I come across love their jobs. What they might do, what the win enables them to do, is to drop a couple of days a week, or don't worry about doing that overtime anymore," he added. "I've had a few people win sizeable sums, and say to me after a while that the win has meant that they can spend more time with their kids because they've been able to cut the hours they work."
"You realise just how different everyone is. Everyone has their own set of circumstances, their own family set up - they might be on their own, a retired couple, they might be with a partner but not married, be divorced with children they share with their ex- and a new partner's children, it can be very complicated, and winning the lottery can suddenly make people stop and take stock," he added.
"You can't interfere and you need to know when to withdraw. I probably see around 150 winners a year, right across the south west and Wales," he added.
Travelling the West Country giving life-changing sums of money to people sounds like a great job - and Andy shares in the celebrations and glow that brings. As an employee of the lottery, he's not allowed to buy a ticket himself, but he feels like he wins the lottery by proxy every week.
"It's a great job. I see it as being akin to being a midwife, helping someone with a newborn baby. That might sound like a strange analogy, but hear me out," he laughed.
"When you have your first child, you come home from the hospital with this thing in your hands and you are not quite sure what to do, whether you're doing it right, what's going on. And not only that, but everyone around you is suddenly an expert on raising a baby.
"Winning the lottery is a bit like that. When you bring that baby home, all you need is a bit of peace and quiet and time alone. I guess I'm the midwife who tries to provide that peace and reassurance and to give people the time they need to adjust. It is a real privilege," he added.
Teacher strikes: Cornwall schools closed on first day of action
Cornwall schools are closing and being affected starting on Wednesday (February 1) after the National Education Union announced seven strike days in the coming weeks
SaltashFour dogs and one person rescued from Saltash property in suspected arsonIt happened in the early hours of this morning (February 1)
Cruise ships to visit Cornwall almost 50 times in Falmouth in 2023
Some of the world's biggest cruise liners will visit Cornish waters between April and October


text:
Q: Google Maps API - infowindow on hover showing same text I have the following code setup to display a custom Google Maps interface.  I want to have infowindow on hover for each marker, with dynamic text for each pulled from the array (first position).  For some reason this code results in each marker displaying the same text, which ends up being only the first word of the final element in the locations array.
I don't understand what I'm doing wrong as the other dynamic elements from the array change each time through the loop, and get set correctly.
    var locations_parks = [

     ['Mahoney Park', 45.39928, -75.74984, 1, '', 'parks/mahoney.png'],
     ['Clare Gardens Park', 45.38800, -75.74689, 1, '', 'parks/clare-gardens.png'],
     ['Iona Park', 45.42153, -75.69719, 1, '', 'parks/iona.png'],
     ['Parkdale Park', 45.40198, -75.72986, 1, '', 'parks/parkdale.png'],
     ['Champlain Park', 45.42153, -75.69719, 1, '', 'parks/champlain.png'],
     ['Lions Park', 45.39417, -75.75269, 1, '', 'parks/lion.png'],
     ['Fisher Park', 45.39573, -75.73047, 1, '', 'parks/fisher.png'],
     ['McCormick Park', 45.40281, -75.72716, 1, '', 'parks/mccormick.png'],
     ['Hintonburg Park', 45.39906, -75.72019, 1, '', 'parks/hintonburg.png'],
     ['Riverside Terrace Park', 45.39982, -75.75279, 1, '', 'parks/riverside-terrace.png'],
     ['Plouffe Park', 45.40680, -75.71397, 1, '', 'parks/plouffe.png'],
     ['Laroche Park', 45.42153, -75.69719, 1, '', 'parks/laroche.png'],
     ['Base Marker', 45.402169, -75.726418, 1, 'Base', 'well_icon.png']

];

var markersArray = [];
var iconBase = 'http://www.doamin.com/_icons/';
var mapOptions = {

      center: new google.maps.LatLng(45.402169, -75.726418),
      zoom: 15,
      scrollwheel: false,
      scaleControl: false,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };

var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

function initialize() {

    //var infowindow = new google.maps.InfoWindow();

    var marker, i;

    for (i = 0; i < locations_parks.length; i++) {

      var infowindow = new google.maps.InfoWindow({
        content: locations_parks[i][0]
      });

      if (locations_parks[i][4] == "Base") {
              marker = new google.maps.Marker({
                position: new google.maps.LatLng(locations_parks[i][1], locations_parks[i][2]),
                map: map
                ,icon: iconBase + locations_parks[i][5]
                ,url: locations_parks[i][4]
                ,zIndex:900
              });
      } else {
              marker = new google.maps.Marker({
                position: new google.maps.LatLng(locations_parks[i][1], locations_parks[i][2]),
                map: map
                ,icon: iconBase + locations_parks[i][5]
                ,url: locations_parks[i][4]
                ,animation: google.maps.Animation.DROP
                ,zIndex:100
              });
      }

      markersArray.push(marker);

      google.maps.event.addListener(marker, 'mouseover', function() {
            infowindow.open(map,this);
       });

      google.maps.event.addListener(marker, 'mouseout', function() {
            infowindow.close();
       });

    }

  }

  google.maps.event.addDomListener(window, 'load', initialize);

A: Closure issue. You have to make closure for infowindow around event listeners, like:
    (function(infowindow) {

        google.maps.event.addListener(marker, 'mouseover', function() {
            infowindow.open(map, this);
        });

        google.maps.event.addListener(marker, 'mouseout', function() {
            infowindow.close();
        });
    })(infowindow);

redpajama_set_name: RedPajamaStackExchange