text:
Scan QR Code To Download
Or Visit the App Stores
*Click on icons below
GEAR UP NC is a federally funded program from the U.S. Department of Education (P334S120003). The Gaining Early Awareness and Readiness for Undergraduate Programs (GEAR UP) project aims to increase the number of students who are prepared to enter and succeed in postsecondary education. GEAR UP NC is operated by the University of North Carolina System.
The GEAR UP NC Virtual Reality (VR) app is intended to help first-generation students gain early awareness of college options in North Carolina. It is also intended to motivate students to think of college as an option and to begin to take the necessary steps to apply to college and for financial aid.
The project began as a pilot with the University of North Carolina at Chapel Hill Visitor Center's First Look program and has since expanded to include all 16 University of North Carolina campuses. GEAR UP NC intends to expand the project to include North Carolina Community Colleges and possibly private colleges and universities.
How To Use A Cardboard Headset
To start off, scan the code on the back of the box or download GEAR UP VR from the App Store.
Proceed to open the app and click "Just Get Started."
Set aside your phone. Slide the cardboard headset out of the cover and set it aside.
Pull open the coardboard from the top, and set aside the headphones.
Open the flaps and fold them over the top and velcro the sides.
Pull the plastic off the eyepieces.
On the GEAR UP app, press play on any of the 360 videos and then press pause.
On the bottom right of the video player, press the icon of the person with the headset to start cardboard mode.
Place the phone within the flap of the cardboard. Plug in your headphones.
Press play. Fold the coardboard flap up and velcro at the top and enjoy!
If you don't have a cardboard, no worries! You can just press play on the video and move your phone around to enjoy the content.
Register/login or select "Just Get Started," which will take you right into the app. *Note: Making an account will allow you to save an university as your favorite.
Opening screen takes you to the GEAR UP home page, which has:
Introductory 360-degree video.
Majors and Degrees: 360-degree video with general information about majors and degrees. Transcript of the video is below and will have any links mentioned in the video.
#HowtocollegeNC: 360-degree video with general information about colleges in North Carolina. Transcript of the video is below and will have any links mentioned in the video.
Campus Life: 360-degree video with general information about campus life. Transcript of the video is below and will have any links mentioned in the video.
Visit NC Colleges: This takes you to the list of all of the universities in the UNC-system.
Visit any UNC-system University. Each campus has:
360-degree video with an overview about the university and student life.
About: Links to the university's website, application, financial aid information, and degrees and majors information.
Connect: Social media links for Facebook, Twitter, Instagram and YouTube.
Contact: Opens up your mail app, so you can email admissions, which will be provided for you when you select contact. *Coming soon: The contact features will eventually use Ai, so you can text the university's admissions bot with any questions.
YouTube Playlist
All of the videos can be watched here on your computer. Closed captioning is enabled for all of these videos.
© GEAR UP NC
GEAR UP VR was created by The University of North Carolina at Chapel Hill and abides by all University policies including the privacy policy.
The University of North Carolina at Chapel Hill ("the University") is committed to protecting your privacy, and we will not disclose your personal information to third parties unless required to do so by law. By using this website or the app, you agree to abide by this privacy policy as well as any other applicable Information Technology Services policies.
For support with the GEAR UP VR app, please submit as much information about your problem here.
Privacy Policy | Support | Contact


I stopped by Old Westbury Gardens for the classic car show this past Sunday and I thought I might as well take a few shots of the house since it was so nice out. So above and below are more of 'Westbury House', the John S. Phipps estate designed by George Crawley c. 1905 in Old Westbury. Click HERE for more on 'Westbury House'.
looking at all this perfectly preserved stuff at westbury makes talbot house all the more poignant. the talbot house for all its crowding is so together - the ceilings, for example, all have the same theme. i love this blog but hate seeing things like that and the ones that were wnatonly demolished. to quote the witch in the wizard of oz - " what a world, what a world"
i am in total synch with talbot tho (and i bet dilletante feels it too). the urge to collect can't be denied and once you're hooked, it makes addictive drugs look like cotton candy. you know you don't need that sedan chair or one more table and it will make the room look REALLY crowded but there it is and don't you just love it.
Actually, Turner old boy, being in the business keeps my own collecting urges to a minimum---I get to buy and possess without having to worry about permanent placement and long term care. My own house is about as spare and edited as it gets. But I do love other people's opulence, and Old Westbury certainly is a lovely bit of it. The sad truth is that one can't save everything, and that actually not everything is worth saving, but Westbury is an unusually good and complete example, and thank goodness that Mrs. Boegner had the combination of sentiment, foresight, and funds needed to make this happen.
Agreed! Another picture of Westbury never hurts! No matter how many times I see it, and from whatever angle, it never fails to take my breath away a little bit. It is a great stroke that this one has bee preserved and so beautifully and fully!
There still has been no mention of the indoor tennis court that once existed in the woods east of the house and north of the pond. It can be seen in the 1966 and 1980 HistoricAerials.com photos, but, alas, had become a clearing in the 2000 photos. I've seen it on many occasions and my brother was lucky enough to have played on it before it was torn down. As for the estate itself, masterpiece is the only word that comes to mind. The house is beautifully proportioned, with livable scale, light airy comfortable rooms devoid of the (chair) mayhem seen in "Talbot House". The grounds are magnificent. The collection of "outdoor rooms" is an invitation to explore. The mile long alee of trees emanates from the house and stretches south to Jericho Turnpike and north to the LIE. The trees lining the driveway and beyond (across the road) seem to go on forever. One finds new vistas at every turn and is constantly in awe. Despite visiting the property on countless occasions, (the antique car shows and summer evening picnic/pops concerts were among my favorites), throughout the seasons there always seems to be something new to discover. The impressive thing about Westbury House was that John Phipps built it as a home for Mrs. Phipps and their children vs. as a monument to himself. We are fortunate that Old Westbury Gardens has been preserved in (close to) its original state and can be enjoyed by the public. Despite today's economic pressures, this special place has remained a model of preservation thanks to the foresight of the Phipps family and the dedication and generosity of its many members, volunteers and employees.
Thanks for the insights & another tennis house to add to the list. I felt sure that there were more Phipps playhouses but couldn't identify where! Look forward to further reminiscences from you as something jogs your memory.
I'm going through Talbot House withdrawals!
I could never in my eyes confirm the location of the court at OWH. Is this the location?
Its possible you can see structure going back to 1994 at Google Earth.
It looks to be more then just a rectangle box. Was it designed with hints of the main house? Pictures, Details???? Why would they destroy this one?
I checked with my brother and while I recall the exterior covering of the Wesbury House indoor tennis court as being naturally weathered shake shingles, he was not sure. He recalls that in addition to the basic rectangle, it included adjoining lounge facilities in the front and a small (tennis court caretaker's) apartment attached to the back. Your Google Earth location is spot on. As to why they would destroy it, simple economics is the most logical explanation. Maintenance, wages, utilities and property taxes would be very high on such a structure, especially if it were being under-utilized and/or if it produced no offsetting revenue (like renting it to a tennis pro). A nonprofit organization such as Old Westbury Gardens often has to make difficult choices regarding the optimization of its limited resources. I'll bet that somewhere in the Old Westbury Gardens photo archives, there exist pictures of the indoor tennis court complex.
While we're on the subject of indoor tennis courts, check out Dilletante's 6/8 blog for some great pictures (circa 1948) of the Oak Point complex (after the tennis court was turned into a conservatory by Mrs. Williams).
Tangent is the word of the day. Ever since I found the Oak Point complex I've taken the time to Google her name and have kept wanting to find more.
Capri anyone? An Aesthete's Lament had a link to something about this place?????
The video link above was new in April.
Half Pudding, I have photos from May 1948 of the playhouse at Oak Point, inside and out, and photos of her house at Capri. 2 of the Oak Point photos are on my blog today, in a post called Everywhere I look. I also, somewhere, have a picture of her New York drawing room, in a book temporarily packed while my office is being painted, Email me and I'll be glad to send anything you might want.
What am I thinking? I'll send the Oak Point pics to Zach, who can post them. Duh.
That Rolls was definitely one of the nicest cars there. Mint condition.
And I would be more than happy to post some pictures of Oak Point.
I remember the tennis court building at OWG, and I believe that O(F)LI is correct: it was a wooden structure in green shingles. I also remember that it was in pretty bad condition and appeared not to have been used in years (this was in the 1980's). As those of us cursed with lovely old frame houses know, it doesn't take many years of benign neglect to reduce a once proud structure to a leaking, peeling, rotting mess. If my memory serves me, the surrounding trees had grown up around the playhouse and the resulting shade and damp must have hastened the decline. With not unlimited funds at their disposal, it was probably a fairly easy decision for the trustees of OWG to do away with the building. Given how well they keep everything else, I don't fault them. And HPHS- Mona Bismark was, by all accounts, one of the world's most stylish, enigmatic women. Whether she was interesting as a person or not, who knows. Here are some great reads about her, if you're interested: Famous Jewelry Collectors by Stefano Papi; Bismark, Balenciaga et Beaton by the Mona Bismark Foundation (tout en Francais- God, I wish I had paid more attention in Mme. Guillemont's classes through high school)and the last, and best (prepare to take out a mortgage- hard to find) All American VII 'Til We Get it Right by Bruce Weber, of all people. It has a wonderful chapter on Mona Bismark, including great photos of Oak Point. I'd love to share and if anyone can tell me how (make it simple- I'm somewhat technology challenged) and assure me that I'm not infringing on copyrights, etc., I'd be happy to.


I wonder how to perform Univariate Logistic Regression analysis in SPSS. Tested variables are dichotomized and predictors are ordinal and scale variables, totally 4.
For clarification, you want to conduct logistic regression with just one independent variable and repeat the process 4 times to take into account your 4 variables of interest?
If you are asking how to perform SPSS code this would be better in that forum.
I know of binomial, multinomial, and ordered logistic regression. This is the first time I heard of univariate logistic regression.
Thank u for the answer. I have looked for the answers in the internet/my books and could not find ABSOLUTLY anything. I think it was just mistake (have got feedback on my work).
How do i perform forward stepwise multiple logistic regression analysis? Where can i see the deference between enter, forward conditional, forward LP in Logistic regression ?
Do they mean logistic regression with a single predictor?
This is the best site I know for SPSS and logistic regression.
I don't reccomend stepwise (which has a variety of problems and is often criticized in the literature). I assume those terms means pretty much what the do in linear regression. Forward adds variables one at a time until some criteria is met. Backward starts with all predictors than removes them until a criteria is reached. The documentation I posted above should show you how.
Noetsi - univariate = single variable.
Which is what I suggested. I have never seen this referred to as univariate logistic regression before Dason.
Question of curiousity, is this for a school course or work?
I have seen the univariate phrasing before but did not know what the "LP" was specifically referencing.
excuse me for my late answers. It is for work and school (master thesis).
The problem is that i cant use linear regression because of the nature of my variables. And i cant find stepwise regression function in binary logistic regression. That.'s why i am a bit confused. Thank u for the link!
but to be honest, right now, i don't understand how to apply it in SPSS.
I would read one of the critiques of stepwise (there are many in the literature) before I used it. If nothing else you need to be prepared to defend your choice of this method.
Thank you very much! I will do my best!
please can you help me understand the comments of a review...?
Univariate analysis implies that you have a single dependent variable (multivariate, in contrast, assumes >=2 outcome variables). Based on your description, your analysis is univariate -- given a single binary outcome.
On a side note, although logistic regression is generally preferable for a dichotomous outcome, a linear probability model (LPM) can also provide consistent estimates. Perhaps, you can use it to ensure robustness of your estimates.


text:
The significance of a j-hope and Becky G collaboration
Iris Vukmanovic
Becky G and j-hope in the music video for the song 'Chicken Noodle Soup' (Photo via YouTube.)
When I was in kindergarten, I came home every day to my after-school snack — my Croatian grandma's homemade chicken noodle soup. Growing up first-generation in the United States shaped a large part of my identity. At home, I was in Serbia, and at school, I was in America.
It was normal for me to have "weird" lunches and answer the phone in a different language because my parents were calling. It was also normal to be obsessed with Snapple and play the Hannah Montana soundtrack on repeat until my parents couldn't take it anymore. I recognize that this experience may not be unique to "first-generation kids," but I want to paint a picture.
I specifically remember my dad playing the same CDs in his car for months on end. And I always learned the lyrics, even though a lot of them weren't in Serbo-Croatian or in English. They were in Italian, Spanish, French and even Mandinka. In retrospect, this probably primed my future interest in K-pop.
So, when I saw that j-hope of BTS — one of the most popular K-pop groups in the world — came out with a song featuring "Shower" singer Becky G, I was both confused and elated. BTS has been on hiatus for the past month or so, but our hope, j-hope, never rests! Last Friday, j-hope released a song and music video called "Chicken Noodle Soup," based on the 2000s hit of the same name by Webstar and Young B featuring AG aka The Voice of Harlem.
[Read more: Review: Seventeen's new album 'An Ode' is an electronic explosion]
OK, OK, but why does this lighthearted song about chicken noodle soup matter? Short answer: because it is a powerful merger of cultures. Let me explain.
K-pop has launched itself into the public eye of the West slowly and steadily over the past decade, with PSY's "Gangnam Style" as its first global phenomenon. Now the genre has come to a fever pitch with BTS becoming the first Korean group to win a Billboard Music Award.
We could argue that Latin music has done the same thing — slowly creeped into the American music consciousness with hits like "Vamos a la playa" and the record-breaking earworm that is "Despacito." Becky G, once known as a one-hit wonder for her song "Shower," created a career for herself in Latin urban pop alongside artists such as Maluma and J Balvin, when top 40 pop didn't work out for her.
Now, I mentioned earlier that I was confused when this song first came out. I wondered, "What do j-hope and Becky G have to do with each other? This is so random." But since then, my friends, I have realized it is SO NOT RANDOM. It is, in fact, genius.
By having a Korean pop star and a Latin pop star perform a song together, music executives are basically combining the power of the two largest fandoms in the world. According to Rolling Stone, Latin music dominated YouTube in 2018. And you can take one look at YouTube's most played K-pop music videos of all-time list to notice how many of those in the top 10 came out in the last two years. K-pop was even (clumsily) referenced in the latest YouTube Rewind.
[Read more: Review: 'Ms. Purple' is a colorful portrayal of love and identity in present-day Koreatown]
Bottom line: Lots of people watch and listen to both Latin pop and K-pop, and I'm sure there's a lot of crossover as well. I've seen plenty of Spanish and Portuguese comments left on K-pop videos before, so "Chicken Noodle Soup" is probably successfully tapping into that fan base. Not to mention, the fact that this song is a remake gives a nod to the genre K-pop borrows a lot of inspiration from: hip-hop.
Aside from the numbers, I want to address the part of this that I believe is the most significant: This song is trilingual. We got English, we got Korean and we got Spanish! There's something so special about watching people from different backgrounds come together to make art, and having relatively high-profile artists doing it is even more moving. It makes you feel like, "Yeah, we might be different, but there is something that can unite us all: music."
As a first-generation kid in America, I've always been wary of the salad bowl versus melting pot debate. I still haven't decided which our country is, but when this kind of art is made, it makes me think it's possible to have an international melting pot.
Every culture is different, but the most exciting part of culture is being able to share that with others and celebrate it. "Chicken Noodle Soup" does exactly that — and it gives me the warmth that I felt while eating my grandma's soup.
latin urban pop
musica urbana
Review: Olivia Rodrigo dazzles with debut single "drivers license"
Emma Grazado
The 'Ratatouille' musical shows the power of the Broadway community
Evan Hecht
Review: I watched 'Bridgerton' in 24 hours, and you should, too
Rachel S. Hunt

redpajama_set_name: RedPajamaCommonCrawl


Being both lightweight and rugged the Static V is an ideal sleeping pad for the avid backpacker to casual camper.
A comfortable backcountry pad providing winter insulation and all-season comfort.
The pinnacle of rugged luxury, Static V Luxe Sleeping Pad hits the sweet spot where comfort, technical performance, durability and lightweight packability come together.
The popular Static V goes double-wide. A wide 188 cm width the Double V is perfect for couples camping and comes with its own air pump / stuff sack.
The popular Static V goes double-wide. A wide 188 cm width the Double V is perfect for couples camping and comes with its own air pump / stuff sack. 4-season insulation.
Being both lightweight and rugged the V Ultralite SL is an ideal sleeping pad for the avid backpacker to casual camper.
Being both lightweight and rugged the Insulated V Ultralite SL is an ideal sleeping pad for the avid backpacker to casual camper.
Combining our comfort technologies with our weight saving innovations, the Inertia O Zone is light, compact and supportive.
One-of-a-kind design for a better sleeping experience.
The original air pad by Klymit that changed the way people Sleep Outside™ - in a hammock.


Boron Ionic Mineral Supplement, Fully Absorbable 20 +/ ppm, 16 fl oz Boron Ionic Mineral Supplement, Fully Absorbable, 20 +/- ppm - 16 fl. oz.
WaterOz Ionic Boron is a pure liquid Boron supplement. Boron: Is said to potentiate estrogen's role in building bones by helping convert vitamin D into the active form necessary for the absorption of calcium. Boron is essential to bone metabolism and calcification of bones, and helps prevent osteoporosis, arthritis, and tooth decay. Boron is necessary for cartilage formation and repair; it affects calcium, magnesium, and phosphorus levels. Memory and brain function can be improved with boron. Boron plays a role in regulating the hormones, especially estrogen, but testosterone as well. A boron deficiency can cause weak and fragile cell walls. Some research shows that boron improves libido. Boron is stored in the parathyroid glands.
Natural Sources of Boron: Whole grains, nuts, seeds, apples, pears, grapes, leafy greens.


text:
Q: Short read while trying to open partition On my personal home computer running Kubuntu Linux 13.04 I'm having trouble mounting a partition that is very dear to me. My backup policy is to perform a backup about monthly, so I do have a backup from August :). Is there any way to recover the personal files that are on this drive?
The drive is a 1.5 year old 1000 GiB Western Digital Green drive, with home mounted on /dev/sdc2, the filesystem root on /dev/sdc6, and media files on /dev/sdc3. Therefore of course sdc2 would be the one to go! So far as I know there were no power outages or other such events during the life of the drive. I managed to get this information by running a Kubuntu LiveCD:
kubuntu@kubuntu:~$ sudo fdisk -l

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes                                                                                Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00008044

  Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        4094    88066047    44030977    5  Extended
/dev/sdc2        88066048  1419266047   665600000   83  Linux
/dev/sdc3      1419266048  1953523711   267128832   83  Linux
/dev/sdc5            4096     6146047     3070976   82  Linux swap / Solaris
/dev/sdc6         6148096    47106047    20478976   83  Linux
/dev/sdc7        47108096    88066047    20478976   83  Linux

kubuntu@kubuntu:~$ sudo mount -t ext4 /dev/sdc2 c1
mount: wrong fs type, bad option, bad superblock on /dev/sdc2,
  missing codepage or helper program, or other error
  In some cases useful info is found in syslog - try
  dmesg | tail  or so

  kubuntu@kubuntu:~$ sudo debugfs -c /dev/sdc2
debugfs 1.42.5 (29-Jul-2012)

/dev/sdc2: Attempt to read block from filesystem resulted in short read while opening filesystem
debugfs:  quit

kubuntu@kubuntu:~$ sudo fsck /dev/sdc2
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
fsck.ext4: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdc2
Could this be a zero-length partition?

kubuntu@kubuntu:~$ sudo fsck.ext4 -v /dev/sdc2
e2fsck 1.42.5 (29-Jul-2012)
    fsck.ext4: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdc2
Could this be a zero-length partition?

kubuntu@kubuntu:~$ dmesg | tail
[ 2684.532855] Descriptor sense data with sense descriptors (in hex):
[ 2684.532858]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 2684.532876]         05 3f c8 b0
[ 2684.532885] sd 5:0:0:0: [sdc]
[ 2684.532893] Add. Sense: Unrecovered read error - auto reallocate failed
[ 2684.532898] sd 5:0:0:0: [sdc] CDB:
[ 2684.532902] Read(10): 28 00 05 3f c8 b0 00 00 08 00
[ 2684.532917] end_request: I/O error, dev sdc, sector 88066224
[ 2684.532927] Buffer I/O error on device sdc2, logical block 22
[ 2684.532973] ata6: EH complete

Help me Unix & Linux, you're our only hope.

A: There might still be hope, but your drive seems to have hardware problems (my interpretation of the read error in dmesg output).
You should try to make a copy of what is recoverable from that partition onto another drive (to minimize disc access). Use ddrescue for that, it might take a while but gets most if not all of the recoverable data of the partition.
If possible start from another disc, from a Live CD, or connect the drive to a different computer that has its own Linux to boot from. The reason I would do so is that the read errors while doing ddrescue probably has an impact on the disc access speed on the other partitions.
Once you have that copy, lets call that the original copy, as file on another disc, make a copy of that copy. Then try to do a filesystem check on that copy. If that recovery scrambles the copy, you can start from the original copy and try once more, something else.

A: (I know this is an old question, I came across this problem myself and got my FS back to life without ddrescue, so I'll share the expericence for anyone else encountering this)
Ext filesystems store backups of the superblock -- for an occasion just like this one.
First, determine the locations of the backups (make sure you have the -n option! otherwise this will wipe the file system with a new one):
mke2fs -n /dev/sdxx

This is a test run (i.e. no write) of FS creation routine. It will let you know the offsets of where it would put superblock backups if it were creating a filesystem. If you know your FS block size to be something other than 4096, you must also specify the parameter -b {blocksize} to get the right numbers.
For 4096-sized blocks, first backup superblock will be at 32768. If the following operations fail with the same error message about bad superblock/short read, try the next superblock backup from the list mke2fs gave you.
Next, you can either mount the filesystem using the backup superblock like this
mount -o sb=32768 /dev/sdxx /mnt/sdxx

then explore the FS from your file manager, copy undamaged files etc.
Or, to actually fix the FS, you can run fsck with backup superblock like this
e2fsck -fy -b 32768 /dev/sdxx

Here -f makes it scan the disk even if it's not dirty and -y answers yes to all enquiries about fixing stuff. The -b option, aside from specifying the backup superblock, will make it update the original superblock with info from backup.
After this, you should have your filesystem back.
If e2fsck fails to write the main superblock
If the superblock got corrupted because it's on a bad sector e2fsck will finish the run, attempt to update the superblock, and give you the following error message:
Error writing block 1 (Attempt to write block from filesystem resulted in short write)

Obviously, the main superblock isn't updated and the whole e2fsck run is in vain.
You need to hint the disk to remap that sector -- by writing zeroes to it. Thanks to @Keith for pointing this out: the next command can make a lot of mess if mistyped, so triple-check it before running. Here's the magic:
dd if=/dev/zero of=/dev/sdxx bs=4096 count=1 seek=0

This will write 1 4096-sized block of zeroes to sdxx at offset 0. Don't forget to account for different block size if that's the case for you.
After that you'll be able to write to superblock (which will be on a different physical sector transparently to you). Now, you run the e2fsck command above again and it should succeed writing the superblock allowing you to mount the FS normally.
Goes without saying Now you should backup the critical data to another physical drive and, if you still plan on using the filesystem, run
e2fsck -fccy /dev/sdxx

PS Kudos to @Nemo on this find: in case all of the backups of the superblock of your FS are corrupted, mke2fs/mkfs has the -S option that will re-create the superblock and group descriptors as if creating a new filesystem, without touching anything else. But you absolutely have to be sure your blocksize is right and the man page says you should run e2fsck after it and there are no guarantees about data being left for rescuing. Read the man page and throw a plus on this answer.

redpajama_set_name: RedPajamaStackExchange


As you may have read in my recent post things are going to get a whole lot more travel related up in here. Welcome to the first instalment of our Mediterranean cruise holiday.
Today I will be starting with the first place we docked at during our cruise, Gibraltar.
I must admit I wasn't that exacted about going to Gibraltar. Nick and I flew there last year on a way to Marbella and we hadn't been that enamoured with it.
This time round, I loved it! As a first time cruiser I think that it is the perfect place to stop at first. Being part of the UK, it gently lulls you into what to expect on a cruise in a familiar setting.
We had no plans for our day in Gibraltar and instead took a leisurely 20 minute walk into the town Centre from our ship for a look around.
You enter the Centre under a fort wall and are greeted by a lovely square surrounded my quaint restaurants. You also have familiar favourites such as costa coffee and burger king.
The main high street is just off of the square and you will find a variety of shops there such as h and m, mothercare, m and s, dorothy perkins as well as lots of spanish style pharmacies and designer sunglasses shops.
In Gibraltar all shopping is tax free so you can make some excellent savings on designer items and luxury beauty brands. My best find, a pharmacy just off the square that stocked Jo Malone candles and perfume. I was in heaven!
We had a lovely day strolling around the town, popping in and out of the shops. We treated ourselves to a delicious ice cream and headed back to our boat.
It turns out I only took a three photos of our day in Gibraltar, Fail! but I vlogged lots so take a look at our mediterranean cruise holiday vlog over on my channel to see more of sunny Gibraltar.
I've never been but it sounds great and a fab first stop for a cruise!
We've been it sounds and looks like a lovely place. It looks like you had a lovely time.
I've been to Gibraltar once, the centre was a nice place to stroll around. Looking forward to reading about your adventures!
I would love to go to Gibraltar, it looks such a stunning place and even better that things are tax free!


First Treasurer of the Society of the Cincinnati in New Jersey 1783-1811. Began his service in the Revolutionary War as 2nd Lieutenant in Captain John Ross Company 3rd Regiment NJ Line 9 Feb 1776. 1st Lieutenant 29 Oct 1776. Captain in the 3rd Regiment NJ Line 1 Jan 1777. Transferred to the 2nd Regiment NJ Line 1 Jan 1781. Brigade Major to Brigadier General William Maxwell in the 2nd Regiment NJ Line 6 Jan 1783. Retained in and last served in Cummings New Jersey Continental Battalion from Apr 1783. Served to the close of war. Born on 3 Jan 1755. Place of birth unknown. Died in Mount Holly, New Jersey on 9 Mar 1816 (or 29 Oct 1841). Married Jane Ross on 6 Apr 1779.


text:
New Devices for Hearing-Impaired and People with Motor Disabilities
Two devices, 'Vibe' for the hearing impaired and 'iGest' for persons with cerebral palsy, and other motor disabilities.
By ISW Desk	 On Dec 5, 2021
Researchers at the Indian Institute of Technology (IIT)-Madras are working on developing new wearable devices that will assist people with hearing impairment and cerebral palsy, and other motor disabilities to communicate independently and enhance their quality of life.
Two major projects are being developed: 'Vibe' for the hearing impaired and 'iGest' for persons with cerebral palsy, and other motor disabilities. Both devices are embedded systems that will bring the latest developments from the Internet of Things and Machine Learning to wearable assistive devices. Such wearable devices will have rechargeable batteries and communicate with a mobile phone over Bluetooth.
`Vibe' features a multitude of sound patterns that are recognized using a microphone and voice recognition modules. It will alert the hearing impaired about a specific sound such as a doorbell, alarm, or a crying child. It is wearable as a watch. It provides vibration input for the pre-identified surrounding sounds, with each such sound corresponding to a specific vibration and blinking LEDs to alert the user.
iGest, on the other hand, will function as an alternative and augmentative communication device for persons with cerebral palsy and other motor disabilities. It will recognize the gestures of the patients and convert them into audio output through a smartphone. For persons with cerebral palsy, movements can be much slower than normal people and also less repetitive.
The devices are being developed by the Centre for Rehabilitation Engineering and Assistive Technology (CREATE), which is a multi-disciplinary translational research and educational initiative of IIT Madras. Sony Pictures Networks India (SPNI) is supporting the projects through its CSR initiatives.
Prof. Anil Prabhakar, Head, CREATE-IIT Madras, and Faculty, Department of Electrical Engineering, IIT Madras, said, "The focus is to keep the cost of the product low, less than Rs. 5000/-. The advancements in technology and the advent and availability of low-cost microcontrollers and sensors are making it possible."
Also Read : Newly Amended Patents Rules, 2021
Mr. Rajkumar Bidawatka, Compliance Officer and Head CSR, Sony Pictures Networks India, noted "Inclusivity is an essential aspect of the culture at Sony Pictures Networks India. We are proud to extend our support to IIT Madras for this project, which is an effort to ensure that the needs of differently-abled communities are addressed in the most convenient, affordable and accessible manner."
As per the last census, 20 percent of the Indian population suffered from a motor disability. In the case of persons with cerebral palsy, limited motor control also manifests itself as a speech impairment and an inability to communicate independently. The overall incidence of cerebral palsy at birth is about 0.3 percent. They account for 15-20 percent of children with a physical disability. Likewise, in the case of the hearing impaired, currently due to the non-availability of affordable and sustainable assistive devices and systems, many are excluded from mainstream and inclusive education. (India Science Wire)
#IIT MadrasBluetoothcerebral palsyCSRInternet-of-Thingsmachine learningmicrophonemobile phone
ISW Desk
can be reached on twitter
@indianscinews
Enforcement Task Force Monitoring Delhi-NCR Air Quality
Mamata's Third Front!


MINNEAPOLIS – Five Heidelberg University football players have been named All-North Region by D3football.com for the 2014 season. Cartel Brooks, Austin Hunter and Donteea Dye were First Team selections. Alex Damschroder was named to the Second Team and Ben Poirier was named to the Third Team.
Brooks capped off his Heidelberg career with another exceptional season, being named First Team All-North Region for the third consecutive year. He is the only player in Berg football history to be named 1st team All-Region in multiple seasons. Brooks concluded the 2014 campaign with 1401 rushing yards and 17 rushing touchdowns, averaging 8.3 yards per carry. He was named to the D3football.com Team of the Week after the season-opening win over Alma where he ran for 192 yards and three touchdowns on just nine carries. Brooks concludes his career averaging 7.71 yards per carry -- an NCAA Division III record.
Hunter's selection on the First Team All-North Region squad follows a Second Team selection one year ago. He received the Ken Wable Award, given to the top offensive lineman in the Ohio Athletic Conference. Hunter helped paved the way for a record-breaking Student Prince offense that averaged 532.5 yards per game this season and set the school record for yards of total offense in a game twice -- with 696 against Alma and 729 versus Ohio Northern. The 5,325 yards of total offense for the season also broke the previous mark set in 2012.
Dye was the other First Team All-North Region selection, turning in one of the top seasons for a wide receiver in Heidelberg history. This was the first All-Region selection for the senior. He was the top receiving target for the record-setting Berg offense, finishing the year with 14 touchdown receptions, which lead the OAC for the regular season and ranked second in Berg history. Dye had two touchdown catches in six different games, including a 213-yard performance in a shootout win over Ohio Northern. His 1,022 receiving yards on the season also led the conference in the regular season.
Damschroder, who was a Third Team All-Region selection a year ago, was named to the Second Team this year. The junior from Carey High School was a big part of blocking for Brooks and his record-breaking rushing attack the past two seasons. Damschroder and the rest of the offensive line controlled the line of scrimmage throughout the season, helping the Heidelberg offense break multiple records.
Poirier was named Third Team All-North Region, marking the third straight season he has been named All-Region. He was a First Team selection a year ago and Third Team as a sophomore in 2012. He led the team with seven sacks and 10.5 tackles for loss on the season. Poirier wrapped up the season with a career-high 11 tackles against Baldwin Wallace, recording 2.5 sacks and 3 tackles for loss, earning him a spot on D3football.com's Team of the Week for the second time in his career.
Heidelberg was one of four schools to have five or more players named to the All-North Region teams.
Each of the five Student Princes selected by D3football.com will be on the ballot for the website's All-America team, which will be announced prior to the Amos Alonzo Stagg Bowl on December 19.


For 3000 years, order has been maintained among the three worlds of the Bleach Universe. But peace cannot be maintained forever. Events have occurred that will lead to the advent of another Great Spiritual War.
If you like roleplaying, and you like Bleach, this is the place where you can play a role in deciding the future of these worlds. Bleach: Awakening of the Elder Ones is its own community in its own universe. This allows all of the members to have full freedoms in creating a path to a new struggle.
Who are the Elder Ones? What are their purpose? And how will they affect all three worlds? These answers will all be answered for those who join. If you are still interested, then become our newest member!
The players have all appeared, the pieces have all be set up, and time has begun to move again. Deep within the halls of the three worlds, the drums of war have begun their terrible beat. What part will you play in this grand drama of life and death?
Bleach:AEO is led by a diligent staff. We will respond immediately to any issues or problems that come up. It is assured that the staff will be fair to all users and make sure the roleplaying process as fun and exciting as possible while still maintaining a high level of quality among the users. A complex plot has already been set up and everyone can find their particular spot that suits them best.


text:
Child Trafficker Sentenced To 472 Years In Prison, Longest In The U. S. History
By Lily Dada Last updated Nov 24, 2017
Suspect: Brock Franklin
31 year old convicted child sex trafficker, Brock Franklin, has received the longest sentence for human trafficking in the history of the United State.
According to Fox news, Franklin was sentenced to 472 years in prison for running a prostitution ring in Colorado that preyed on young girls.
In march, a jury found Franklin guilty on 30 counts including human trafficking, sexual exploitation of a child, kidnapping and child prostitution.
'A 400 year sentence sends a strong message across the country that we're not going to tolerate this kind of violence to women and vulnerable populations',
Janet Drake with the Colorado Attorney General's office told Fox 31.
Prosecutors said Franklin controlled the girls with drugs and violence, forcing them to have sex with him and also selling them online for sex.
Brian Leary, one of Franklin's victims, told the court:
'I can't begin to even explain to the court what he did to my life'.
In all, Franklin was found guilty of the following charges:
– Violating the Colorado Organized Crime Control Act
– Human trafficking of a minor
– Pimping a child.
– Patronizing a prostituted child
– Soliciting for child prostitution
– Inducement of child prostitution
– Pandering of a child
– Sexual exploitation of a child –producing a performance
– Contributing to the delinquency of a minor
– Second degree kidnapping of a minor — unlawful use of controlled substance
– Distribution of a schedule 1 or 2 controlled substance to a minor
– Human trafficking of an adult
– Five counts of pimping
– Sexual assault
– Attempt to commit pimping.
abusecrimepedophileprostitutiontrafficking
Lily Dada 6397 posts 5 comments
World's First Naked Restaurant Set To Return Permanently
Atiku Resigns From APC
Siblings Laud Mum After She Stabbed Pedophile Who Abused…
Seun Ojo: Ondo State Native Murders Girlfriend Over Lack Of…
Ogun Police Arrest Man For Allegedly Trafficking Wife To…


text:
FGM issues in Scotland to be explored in new play
Cora Bisset play has support of Scottish Refugee Council
The issue of female genital mutilation (FGM) will be explored in a new play to be performed in Scotland.
The production by the National Theatre of Scotland (NTS) and Manchester Theatre Contact is called RITES and has been created by director Cora Bisset and poet Yusra Warsama.
The show is based on real stories of girls and mothers in the UK and the producers have been working with the Scottish Refguee Council (SRC) in order to research communities affected by FGM.
The production, NTS's first collaboration with Contact, will open at the Tron in Glasgow in May before moving to Manchester, Bristol and and then back to Scotland for a five-day run at the Traverse Theatre in Edinburgh.
Nina Murray from the Scottish Refugee Council, blogged on the SRC website about the play.
She said that the organisation initially had reservations due to the sensitive nature of the subject, but after meeting Bisset and Warsama said that she was convinced they "were the perfect double act to write a play that would thoughtfully expose some of the complexities of the issue of FGM and its impact on communities in Scotland".
"We hope that the play will help open up dialogue within and between communities affected by FGM in Scotland, as well as keeping this important issue on the public and political agenda," Murray wrote.
Earlier this month, CommonSpace reported (click here to read more) a PS220,000 pledge from First Minister Nicola Sturgeon to help prevent female genital mutilation (FGM) in Scotland.
The money will be used for projects raising awareness of FGM, improving community engagement, providing training and boosting support services.
FGM is most common in parts of Africa, Asia and the Middle East, and is most often carried out on girls from infancy up until the age of 15.
The WHO estimates that 125 million women alive today have been harmed by FGM, which has no medical basis.
The painful procedure involves partial or total removal of parts of the female genitalia, and genital mutilation and can cause serious long term effects for women, including recurring bladder and urinary tract infections, infertility and even death.
Picture by Blatant World


text:
Quotes For Entrepreneurs–September 2013
By Sean Murphy| 2019-05-14T18:12:04+00:00	September 30th, 2013|Quotes, skmurphy|1 Comment
You can follow @skmurphy to get these hot off the mojo wire or wait until these quotes for entrepreneurs are collected in a blog post at the end of each month. Enter your E-mail address if you would like have new blog posts sent to you.
Quotes For Entrepreneurs September 2013
"The basic unit of information in creative, social work is not content in the form of documents but interaction in the form of conversations."
Esko Kilpi (@EskoKilpi)
"When people are confused, they overuse their strengths."
Michael Bowen (@mdcbowen) in "That Culturally Embarrassing Moment"
See also #14 in "Cobb's Rules." There is an alternate earlier version
"People don't have weaknesses so much as they overuse their strengths"
Michael Bowen in "The (Old) Guide to Cobb – Concepts & Terms."
"Experience and enthusiasm are two fine business attributes seldom found in one individual."
"Unless a man has been kicked around a little, you can't really depend upon him to amount to anything."
"Next to a sincere compliment, I think I like a well-deserved and honest rebuke."
"Fast is fine but accuracy is final. You must learn to be slow in a hurry."
"In many lines of work, it isn't how much you do that counts, but how much you do well and how often you decide right."
"No research without action,
no action without research."
Kurt Lewin
"Faithless is he that says farewell when the road darkens."
J.R.R. Tolkien, The Fellowship of the Ring
more context
At that moment Elrond came out with Gandalf, and he called the Company to him. "This is my last word," he said in a low voice. "The Ring-bearer is setting on the Quest of Mount Doom. On him alone is any charge laid; neither to cast away the Ring, nor to deliver it to any servant of the Enemy nor indeed to let any handle it, save members of the Company and the Council, and only then in gravest need. The others go with him as free companions, to help him on his way. You may tarry, or come back, or turn aside into other paths, as chance allows. the further you go, the less easy will it be to withdraw; yet no oath or bond is laid upon you to go further than you will. For you do not yet know the strength of your hearts, and you cannot foresee what each may meet upon the road."
"Faithless is he that says farewell when the road darkens," said Gimli.
"Maybe," said Elrond, "but let him not vow to walk in the dark, who has not seen the nightfall."
"Yet sworn word may strengthen quaking heart," said Gimli.
"Or break it," said Elrond. "Look not too far ahead! But go now with good hearts!"
"Make sure you have finished speaking before your audience has finished listening."
Dorothy Sarnoff
h/t "Quotes for Public Speakers (39)"
"You need a team to keep you honest, to keep you humble, to give a different perspective on a problem, to question your assumptions, and to provide support when things look bad."
Tristan Kromer in Startups, Go Out and Talk to Your Customers!
"The nature of revolutions is that they destroy the perfect and enable the impossible. "
Seth Godin in "Tried and False"
"I get quiet joy from the observation of any man who does his job well."
Used as the closing quote in "BeamWise Blends Biophotonic and Model Based Design Expertise"
"I not only bow to the inevitable, I am fortified by it."
Used as closing quote for "Remembering 9-11: Our Children Will Also Live in Interesting Times."
"No one sees further into a generalization than his own knowledge of detail extends."
"Curiosity is the mother of intelligence and the father of creativity."
Eugene Cheong
"Curiosity is the mother of intelligence" appears as an unsourced quote in Alan Fletcher's great book"The Art of Looking Sideways. See also February 2013 Quotes for Entrepreneurs. This is also implied in "The Marriage Between Necessity and Curiosity " by Michelle Blade. I think I would phrase it "invention and creativity are the children of necessity and curiosity."
"Results are obtained by exploiting opportunities, not by solving problems."
"All business proceeds on beliefs, or judgments of probabilities, not on certainties."
Charles William Eliot
This led to an interesting exchange with Bob Marshall:
Bob Marshall (@flowchainsensei): Surely "beliefs" ARE "certainties"?
Sean Murphy (@skmurphy): What is believed may not be certain; certainties are commoditized knowledge without competitive advantage.
Bob Marshall (@flowchainsensei): Way to go with the unilateral definition, dude :{
Sean Murphy (@skmurphy): I had believed that you would find it useful but was not certain. Surely reasonable men may differ.
Bob Marshall (@flowchainsensei): Surely :)
"The success of everything depends on intuition, the capacity of seeing things in a way which afterwards proves to be true, even though it cannot be established at the moment, and of grasping the essential fact, discarding the unessential, even though one can give no account of the principles by which this is done."
Which I posted in 140 characters on twitter as:
"Success depends on intuition, on seeing what afterwards proves true but cannot be established at the moment."
"Some men will never ask for information, because it implies that they do not know."
Henry Cardinal Manning
"Exercise the writing muscle every day. Writers are like dancers, like athletes. Without that exercise, the muscles seize up."
"When you're managing a project, peer pressure is the your most effective tool for keeping everyone on schedule."
Bob Lewis in "Random Thoughts From a Spanish Vacation"
Recruiting a team members who set high standards for themselves and asking for their advice on how to improve shared performance–and following it–are key to a early startup success. Founders are often highly self-motivated and often experts in their field, this can blind them to the value of soliciting alternative perspectives and suggestions and letting the team set goals. It's much hard to let the team down when you participated in the decision than if you are responding to an edict.
"Memory is a net: one finds it full of fish when he takes it from the brook, but a dozen miles of water have run through it without sticking."
Oliver Wendell Holmes, Sr.
Have you stocked the stream of words in your presentation with at least a few of the fish that your audience is looking for? Used as the opening quote and inspiration for the title of "Is the Stream of Your Presentation Stocked with Fish for your Audience?"
"An MVP is an offer to a particular type of customer for a specific need; it must provide enough value to justify an initial purchase."
this is the twitter version of the slide from "MVP: What's Really Under Your Control"
"Stories are the creative conversion of life itself into a more powerful, clearer, more meaningful experience. They are the currency of human contact."
Robert McKee
"Inspiration exists but it has to find us working."
I have gone back to morning pages to kickstart me on those mornings when I need to start working before inspiration shows up.
"A man needs a purpose for real health."
From Edward Tufte's series of "Philosophical Diamond Signs"
Using the format of diamond signs that provide alerts and warnings about the road ahead, this series of works on canvas shows philosophical alerts, imperatives, and thoughts about the path past and future.
I used this as a sidebar image in "Transcript From Elena Krasnoperova's Learning Hacks for Bootstrappers."
Jamie @ thehealthy September 30, 2013 at 6:07 pm
Great post – some great inspirational quotes. I've needed some inspiration as of late–this one spoke volumes to me:
Recently, i've taken on some work that has been very difficult for me to handle – a lot of hours and driving. I think if I can survive 'being kicked around' – i can rely on the experience later on in life.


Used Dodge Ram 2500 For Sale Lapeer MI Page 4 CarGurus With 2014 Dodge Ram 2500 Slt Columbus Oh And Width 1200 Height 900 IMG On 1200x900px 2014 Dodge Ram 2500 Slt Columbus Oh is one of pictures thet are related with the picture before in the collection gallery. If you would like to see the Used Dodge Ram 2500 For Sale Lapeer MI Page 4 CarGurus With 2014 Dodge Ram 2500 Slt Columbus Oh And Width 1200 Height 900 IMG On 1200x900px 2014 Dodge Ram 2500 Slt Columbus Oh in High Resolution [HD Resolution] version, please press the right click on picures/image then choose "Save as Image" option, and done. You will get Used Dodge Ram 2500 For Sale Lapeer MI Page 4 CarGurus With 2014 Dodge Ram 2500 Slt Columbus Oh And Width 1200 Height 900 IMG On 1200x900px 2014 Dodge Ram 2500 Slt Columbus Oh pictures that you want. The exactly dimension of Used Dodge Ram 2500 For Sale Lapeer MI Page 4 CarGurus With 2014 Dodge Ram 2500 Slt Columbus Oh And Width 1200 Height 900 IMG On 1200x900px 2014 Dodge Ram 2500 Slt Columbus Oh was 1200x900 pixels. You can also look for some pictures by collection on below this picture. Find the other picture or article about 60 Images 2014 Dodge Ram 2500 Slt Columbus Oh Ideas here. We hope it can help you to get information of the picture.


I have kik and will be glad to share it if we get to know each other.
I have recently explored new "natural things" to do with my spare time with my Fiance and enjoy it greatly.
I do NOT yiff so dont ask. Thanks a bunch.
I speak German, Spanish, and of course...english.
I like the 40's and 50's a ton.
I love video games and john tron and Lol and Wow.


text:
Start the day smarter ☀ USA TODAY podcasts 🎧 Tips for filing 📄 2023 lineups 🎶
Are you social distancing correctly? An AR guide to flattening the curve amid coronavirus
The Centers for Disease Control and Prevention is very clear about the best way to avoid contracting coronavirus: don't be exposed to the disease.
There is no vaccine to prevent the COVID-19 disease, which is thought to spread mainly from person-to-person. People with the disease do not always show symptoms, yet they can spread it to others. As a result, social distancing has become the thing that everyone is talking about.
Social distancing involves avoiding interactions with people outside of those who live in your household. When someone needs to leave their home, they are advised to stay at least 6 feet away from other people.
By practicing social distancing, everyone can help flatten the curve of the spread of the disease. Without social distancing, the number of people who are sick with the disease is likely to spike up very quickly, overwhelming hospitals and health care workers. With social distancing, that growth curve will flatten out, the disease will spread more slowly and fewer people will get sick at the same time.
How are you doing at practicing social distancing? We've created this challenge in Augmented Reality to help you evaluate the decisions you are making every day.
The full interactive story on social distancing can be found within the Augmented Reality section of the USA TODAY app. To access "Flatten the Curve":
Download the latest version of the USA TODAY app on your Android or iOS AR-capable device.
Open the app, and look for Augmented Reality in Sections at the bottom of your screen.


As Executive Director, Gwenn is responsible for managing all aspects of the grant-making process ― beginning with scrutiny of Letters of Inquiry and Applications, making site visits, and ending with the review and analysis of progress reports from current grantees before a grant is closed for the year. She also oversees the management of the Foundation's financial resources; drafting the Budget, keeping the accounts up-to-date, and maintaining communication with the investment manager and the accountant. Twice a year, she organizes the Board meetings during which the Directors set policy and allocate grants.
During the last 15 years, she has kept the Foundation on the leading edge of the use of computer technology and was an early adopter of online grants management. Gwenn continues to enjoy her part-time work as the Executive Director of the Replogle Foundation, and in particular, says site visits are one of the highlights of her job.
Gwenn graduated from Brown University in 1982 with an undergraduate degree in Environmental Studies. She earned a MA in Public Policy and a MA in Public Health through a joint degree program at Columbia University in New York. After working for two years at the US Environmental Protection Agency in Washington, DC, she was offered the position of Executive Director of the Luther I. Replogle Foundation in 1989.


St. Mary's Guildhall is located directly behind Coventry Council House, and on the south side of the Cathedral Ruins. Signs to the venue can be found at the railway station and throughout the city centre. Follow directions towards Coventry Cathedral or the Herbert Art Gallery and Museum.
The medieval guilds were the business networks of their age, with guildhalls providing the social, ceremonial and administrative hubs for the medieval city's professional trades and merchants. At St. Mary's Guildhall they are proud to continue this centuries-old tradition, offering venues and hospitality services for today's businesses in Coventry and beyond.
St Mary's Guildhall are delighted to offer a range of versatile rooms with character, supported by excellent facilities, quality catering options and professional, attentive staff. From an intimate meeting space to day conferences and high profile corporate events, they have the venues and experience to fulfil your needs and deliver a first class service.


text:
Řečický potok je přítokem Volfířovského potoka. Délka jeho toku je 6,7 km. Plocha povodí měří 12,12 km².

Průběh toku
Pramení v rybníku Pstruhovec v přírodním parku Javořická vrchovina nedaleko vesnice Řečice. Protéká rybníkem Hadrava, Višťanským rybníkem a Velkým řečickým rybníkem, před kterým podtéká silnici II/408. Teče převážně jihovýchodním až jižním směrem. Po necelých sedmi kilometrech se vlévá do Volfířovského potoka.

Fotogalerie

Odkazy

Externí odkazy

Reference

Potoky v Javořické vrchovině
Potoky v Křižanovské vrchovině
Potoky v okrese Jindřichův Hradec
Povodí Moravské Dyje

redpajama_set_name: RedPajamaWikipedia


text:
//===--- GenDistributed.cpp - IRGen for distributed features --------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
//  This file implements IR generation for distributed features.
//
//===----------------------------------------------------------------------===//

#include "GenDistributed.h"

#include "BitPatternBuilder.h"
#include "CallEmission.h"
#include "Callee.h"
#include "ClassTypeInfo.h"
#include "ExtraInhabitants.h"
#include "GenCall.h"
#include "GenClass.h"
#include "GenDecl.h"
#include "GenMeta.h"
#include "GenOpaque.h"
#include "GenProto.h"
#include "GenType.h"
#include "IRGenDebugInfo.h"
#include "IRGenFunction.h"
#include "IRGenModule.h"
#include "LoadableTypeInfo.h"
#include "ScalarPairTypeInfo.h"
#include "swift/ABI/MetadataValues.h"
#include "swift/AST/ExtInfo.h"
#include "swift/AST/GenericEnvironment.h"
#include "swift/AST/GenericSignature.h"
#include "swift/AST/ProtocolConformanceRef.h"
#include "swift/IRGen/Linking.h"
#include "swift/SIL/SILFunction.h"

using namespace swift;
using namespace irgen;

llvm::Value *irgen::emitDistributedActorInitializeRemote(
    IRGenFunction &IGF, SILType selfType, llvm::Value *actorMetatype, Explosion &out) {
  auto &classTI = IGF.getTypeInfo(selfType).as<ClassTypeInfo>();
  auto &classLayout = classTI.getClassLayout(IGF.IGM, selfType,
                                             /*forBackwardDeployment=*/false);
  llvm::Type *destType = classLayout.getType()->getPointerTo();

  auto fn = IGF.IGM.getDistributedActorInitializeRemoteFn();
  actorMetatype =
      IGF.Builder.CreateBitCast(actorMetatype, IGF.IGM.TypeMetadataPtrTy);

  auto call = IGF.Builder.CreateCall(fn, {actorMetatype});
  call->setCallingConv(IGF.IGM.SwiftCC);
  call->setDoesNotThrow();

  auto result = IGF.Builder.CreateBitCast(call, destType);

  out.add(result);

  return result;
}

namespace {

struct ArgumentDecoderInfo {
  /// The instance of the decoder this information belongs to.
  llvm::Value *Decoder;

  /// The pointer to `decodeNextArgument` method which
  /// could be used to form a call to it.
  FunctionPointer MethodPtr;

  /// The type of `decodeNextArgument` method.
  CanSILFunctionType MethodType;

  /// Protocol requirements associated with the generic
  /// parameter `Argument` of this decode method.
  GenericSignature::RequiredProtocols ProtocolRequirements;

  // Witness metadata for conformance to DistributedTargetInvocationDecoder
  // protocol.
  WitnessMetadata Witness;

  ArgumentDecoderInfo(llvm::Value *decoder, llvm::Value *decoderType,
                      llvm::Value *decoderWitnessTable,
                      FunctionPointer decodeNextArgumentPtr,
                      CanSILFunctionType decodeNextArgumentTy)
      : Decoder(decoder), MethodPtr(decodeNextArgumentPtr),
        MethodType(decodeNextArgumentTy),
        ProtocolRequirements(findProtocolRequirements(decodeNextArgumentTy)) {
    Witness.SelfMetadata = decoderType;
    Witness.SelfWitnessTable = decoderWitnessTable;
  }

  CanSILFunctionType getMethodType() const { return MethodType; }

  ArrayRef<ProtocolDecl *> getProtocolRequirements() const {
    return ProtocolRequirements;
  }

  /// Form a callee to a decode method - `decodeNextArgument`.
  Callee getCallee() const;

private:
  static GenericSignature::RequiredProtocols
  findProtocolRequirements(CanSILFunctionType decodeMethodTy) {
    auto signature = decodeMethodTy->getInvocationGenericSignature();
    auto genericParams = signature.getGenericParams();

    // func decodeNextArgument<Arg : #SerializationRequirement#>() throws -> Arg
    assert(genericParams.size() == 1);
    return signature->getRequiredProtocols(genericParams.front());
  }
};

class DistributedAccessor {
  IRGenModule &IGM;
  IRGenFunction &IGF;

  /// Underlying distributed method for this accessor.
  SILFunction *Target;

  /// The interface type of this accessor function.
  CanSILFunctionType AccessorType;
  /// The asynchronous context associated with this accessor.
  AsyncContextLayout AsyncLayout;

  /// The list of all arguments that were allocated on the stack.
  SmallVector<StackAddress, 4> AllocatedArguments;

public:
  DistributedAccessor(IRGenFunction &IGF, SILFunction *target,
                      CanSILFunctionType accessorTy);

  void emit();

private:
  void decodeArguments(const ArgumentDecoderInfo &decoder,
                       llvm::Value *argumentTypes, Explosion &arguments);

  /// Load an argument value from the given decoder \c decoder
  /// to the given explosion \c arguments. Information describing
  /// the type of argument comes from runtime metadata.
  void decodeArgument(unsigned argumentIdx, const ArgumentDecoderInfo &decoder,
                      llvm::Value *argumentType, const SILParameterInfo &param,
                      Explosion &arguments);

  void lookupWitnessTables(llvm::Value *value,
                           ArrayRef<ProtocolDecl *> protocols,
                           Explosion &witnessTables);

  /// Load witness table addresses (if any) from the given buffer
  /// into the given argument explosion.
  ///
  /// Number of witnesses to load is provided by \c numTables but
  /// it's checked against the number of \c expectedWitnessTables.
  void emitLoadOfWitnessTables(llvm::Value *witnessTables,
                               llvm::Value *numTables,
                               unsigned expectedWitnessTables,
                               Explosion &arguments);

  /// Emit an async return from accessor which does cleanup of
  /// all the argument allocations.
  void emitReturn(llvm::Value *errorValue);

  FunctionPointer getPointerToTarget() const;

  Callee getCalleeForDistributedTarget(llvm::Value *self) const;

  /// Given an instance of invocation decoder, its type metadata,
  /// and protocol witness table, find `decodeNextArgument`.
  ArgumentDecoderInfo findArgumentDecoder(llvm::Value *decoder,
                                          llvm::Value *decoderTy,
                                          llvm::Value *witnessTable);

  /// The result type of the accessor.
  SILType getResultType() const;

  /// The error type of this accessor.
  SILType getErrorType() const;
};

} // end namespace

static NominalTypeDecl *getDistributedActorOf(SILFunction *thunk) {
  assert(thunk->isDistributed() && thunk->isThunk());
  return thunk->getDeclContext()
      ->getInnermostTypeContext()
      ->getSelfNominalTypeDecl();
}

/// Compute a type of a distributed method accessor function based
/// on the provided distributed target.
static CanSILFunctionType getAccessorType(IRGenModule &IGM,
                                          SILFunction *Target) {
  auto &Context = IGM.Context;

  // func __accessor__<D: DistributedTargetInvocationDecoder>(
  //   inout D, <- invocation decoder
  //   UnsafeRawPointer,  <- argument types
  //   UnsafeRawPointer,  <- result buffer
  //   UnsafeRawPointer?, <- generic parameter substitutions
  //   UnsafeRawPointer?, <- witness tables
  //   UInt,              <- number of witness tables
  //   <actor>
  // ) async throws

  SmallVector<GenericFunctionType::Param, 8> parameters;

  // A generic parameter that represents instance of invocation decoder.
  auto *decoderType =
      GenericTypeParamType::get(/*isTypeSequence=*/false,
                                /*depth=*/1, /*index=*/0, Context);

  // decoder
  parameters.push_back(GenericFunctionType::Param(
      decoderType,
      /*label=*/Identifier(),
      /*flags=*/ParameterTypeFlags().withInOut(true)));

  // argument type buffer
  parameters.push_back(
      GenericFunctionType::Param(Context.getUnsafeRawPointerType()));

  // result buffer
  parameters.push_back(
      GenericFunctionType::Param(Context.getUnsafeRawPointerType()));

  // generic parameter substitutions
  parameters.push_back(
      GenericFunctionType::Param(Context.getUnsafeRawPointerType()));

  // witness tables
  parameters.push_back(
      GenericFunctionType::Param(Context.getUnsafeRawPointerType()));

  // number of witness tables
  parameters.push_back(GenericFunctionType::Param(Context.getUIntType()));

  // actor
  {
    auto targetTy = Target->getLoweredFunctionType();
    auto actorLoc = targetTy->getParameters().back();

    parameters.push_back(
        GenericFunctionType::Param(actorLoc.getInterfaceType()));
  }

  auto decoderProtocolTy =
      Context
          .getProtocol(KnownProtocolKind::DistributedTargetInvocationDecoder)
          ->getDeclaredInterfaceType();

  // Build generic signature that includes all contextual generic parameters.
  GenericSignature signature;
  {
    SmallVector<GenericTypeParamType *, 4> genericParams;
    SmallVector<Requirement, 4> genericRequirements;

    auto *actor = getDistributedActorOf(Target);
    assert(actor);

    for (auto *genericParam : actor->getInnermostGenericParamTypes())
      genericParams.push_back(genericParam);

    // Add a generic parameter `D` which stands for decoder type in the
    // accessor signature - `inout D`.
    genericParams.push_back(decoderType);
    // Add a requirement that decoder conforms to the expected protocol.
    genericRequirements.push_back(
        {RequirementKind::Conformance, decoderType, decoderProtocolTy});

    signature = GenericSignature::get(genericParams, genericRequirements);
  }

  auto accessorTy = GenericFunctionType::get(
      signature, parameters, Context.TheEmptyTupleType,
      ASTExtInfoBuilder()
          .withRepresentation(FunctionTypeRepresentation::Thin)
          .withAsync()
          .withThrows()
          .build());

  return IGM.getLoweredType(accessorTy).castTo<SILFunctionType>();
}

llvm::Function *
IRGenModule::getAddrOfDistributedTargetAccessor(SILFunction *F,
                                                ForDefinition_t forDefinition) {
  auto entity = LinkEntity::forDistributedTargetAccessor(F);

  llvm::Function *&entry = GlobalFuncs[entity];
  if (entry) {
    if (forDefinition)
      updateLinkageForDefinition(*this, entry, entity);
    return entry;
  }

  Signature signature = getSignature(getAccessorType(*this, F));
  LinkInfo link = LinkInfo::get(*this, entity, forDefinition);

  return createFunction(*this, link, signature);
}

void IRGenModule::emitDistributedTargetAccessor(SILFunction *target) {
  assert(target->isDistributed());

  auto *f = getAddrOfDistributedTargetAccessor(target, ForDefinition);
  if (!f->isDeclaration())
    return;

  IRGenFunction IGF(*this, f);
  DistributedAccessor(IGF, target, getAccessorType(*this, target)).emit();
}

DistributedAccessor::DistributedAccessor(IRGenFunction &IGF,
                                         SILFunction *target,
                                         CanSILFunctionType accessorTy)
    : IGM(IGF.IGM), IGF(IGF), Target(target), AccessorType(accessorTy),
      AsyncLayout(getAsyncContextLayout(
          IGM, AccessorType, AccessorType, SubstitutionMap())) {
  if (IGM.DebugInfo)
    IGM.DebugInfo->emitArtificialFunction(IGF, IGF.CurFn);
}

void DistributedAccessor::decodeArguments(const ArgumentDecoderInfo &decoder,
                                          llvm::Value *argumentTypes,
                                          Explosion &arguments) {
  auto fnType = Target->getLoweredFunctionType();

  // Cover all of the arguments except to `self` of the actor.
  auto parameters = fnType->getParameters().drop_back();

  // If there are no parameters to extract, we are done.
  if (parameters.empty())
    return;

  // Cast type buffer to `swift.type**`
  argumentTypes =
      IGF.Builder.CreateBitCast(argumentTypes, IGM.TypeMetadataPtrPtrTy);

  for (unsigned i = 0, n = parameters.size(); i != n; ++i) {
    const auto &param = parameters[i];
    auto paramTy = param.getSILStorageInterfaceType();

    // Check whether the native representation is empty e.g.
    // this happens for empty enums, and if so - continue to
    // the next argument.
    if (paramTy.isObject()) {
      auto &typeInfo = IGM.getTypeInfo(paramTy);
      auto &nativeSchema = typeInfo.nativeParameterValueSchema(IGM);

      if (nativeSchema.empty())
        continue;
    }

    auto offset =
        Size(i * IGM.DataLayout.getTypeAllocSize(IGM.TypeMetadataPtrTy));
    auto alignment = IGM.DataLayout.getABITypeAlignment(IGM.TypeMetadataPtrTy);

    // Load metadata describing argument value from argument types buffer.
    auto typeLoc = IGF.emitAddressAtOffset(
        argumentTypes, Offset(offset), IGM.TypeMetadataPtrTy,
        Alignment(alignment), "arg_type_loc");

    auto *argumentTy = IGF.Builder.CreateLoad(typeLoc, "arg_type");

    // Decode and load argument value using loaded type metadata.
    decodeArgument(i, decoder, argumentTy, param, arguments);
  }
}

void DistributedAccessor::decodeArgument(unsigned argumentIdx,
                                         const ArgumentDecoderInfo &decoder,
                                         llvm::Value *argumentType,
                                         const SILParameterInfo &param,
                                         Explosion &arguments) {
  auto &paramInfo = IGM.getTypeInfo(param.getSILStorageInterfaceType());
  // TODO: `emitLoad*` would actually load value witness table every
  // time it's called, which is sub-optimal but all of the APIs that
  // deal with value witness tables are currently hidden in GenOpaque.cpp
  llvm::Value *valueSize = emitLoadOfSize(IGF, argumentType);

  Callee callee = decoder.getCallee();

  std::unique_ptr<CallEmission> emission =
      getCallEmission(IGF, callee.getSwiftContext(), std::move(callee));

  StackAddress resultValue = IGF.emitDynamicAlloca(
      IGM.Int8Ty, valueSize, paramInfo.getBestKnownAlignment());

  llvm::Value *resultAddr = resultValue.getAddress().getAddress();

  resultAddr = IGF.Builder.CreateBitCast(resultAddr, IGM.OpaquePtrTy);

  Explosion decodeArgs;
  // indirect result buffer as `swift.opaque*`
  decodeArgs.add(resultAddr);
  // substitution Argument -> <argument metadata>
  decodeArgs.add(argumentType);

  // Lookup witness tables for the requirement on the argument type.
  lookupWitnessTables(argumentType, decoder.getProtocolRequirements(),
                      decodeArgs);

  Address calleeErrorSlot;
  llvm::Value *decodeError = nullptr;

  emission->begin();
  {
    emission->setArgs(decodeArgs, /*isOutlined=*/false,
                      /*witnessMetadata=*/nullptr);

    Explosion result;
    emission->emitToExplosion(result, /*isOutlined=*/false);
    assert(result.empty());

    // Load error from the slot to emit an early return if necessary.
    {
      SILFunctionConventions conv(decoder.getMethodType(), IGM.getSILModule());
      SILType errorType =
          conv.getSILErrorType(IGM.getMaximalTypeExpansionContext());

      calleeErrorSlot =
          emission->getCalleeErrorSlot(errorType, /*isCalleeAsync=*/true);
      decodeError = IGF.Builder.CreateLoad(calleeErrorSlot);
    }
  }
  emission->end();

  // Remember to deallocate later.
  AllocatedArguments.push_back(resultValue);

  // Check whether the error slot has been set and if so
  // emit an early return from accessor.
  {
    auto contBB = IGF.createBasicBlock("");
    auto errorBB = IGF.createBasicBlock("on-error");

    auto nullError = llvm::Constant::getNullValue(decodeError->getType());
    auto hasError = IGF.Builder.CreateICmpNE(decodeError, nullError);

    IGF.Builder.CreateCondBr(hasError, errorBB, contBB);
    {
      IGF.Builder.emitBlock(errorBB);
      // Emit an early return if argument decoding failed.
      emitReturn(decodeError);
    }

    IGF.Builder.emitBlock(contBB);
    // Reset value of the slot back to `null`
    IGF.Builder.CreateStore(nullError, calleeErrorSlot);
  }

  switch (param.getConvention()) {
  case ParameterConvention::Indirect_In:
  case ParameterConvention::Indirect_In_Constant: {
    // The only way to load opaque type is to allocate a temporary
    // variable on the stack for it and initialize from the given address
    // either at +0 or +1 depending on convention.

    auto stackAddr =
        IGF.emitDynamicAlloca(IGM.Int8Ty, valueSize, Alignment(16));

    emitInitializeWithCopyCall(IGF, argumentType, stackAddr.getAddress(),
                               resultValue.getAddress());

    // Remember to deallocate a copy.
    AllocatedArguments.push_back(stackAddr);
    break;
  }

  case ParameterConvention::Indirect_In_Guaranteed: {
    // The argument is +0, so we can use the address of the param in
    // the context directly.
    arguments.add(resultAddr);
    break;
  }

  case ParameterConvention::Indirect_Inout:
  case ParameterConvention::Indirect_InoutAliasable:
    llvm_unreachable("indirect 'inout' parameters are not supported");

  case ParameterConvention::Direct_Guaranteed:
  case ParameterConvention::Direct_Unowned: {
    auto paramTy = param.getSILStorageInterfaceType();
    Address eltPtr = IGF.Builder.CreateBitCast(
        resultValue.getAddress(), IGM.getStoragePointerType(paramTy));

    cast<LoadableTypeInfo>(paramInfo).loadAsTake(IGF, eltPtr, arguments);
    break;
  }

  case ParameterConvention::Direct_Owned: {
    // Copy the value out at +1.
    cast<LoadableTypeInfo>(paramInfo).loadAsCopy(IGF, resultValue.getAddress(),
                                                 arguments);
    break;
  }
  }
}

void DistributedAccessor::lookupWitnessTables(
    llvm::Value *value, ArrayRef<ProtocolDecl *> protocols,
    Explosion &witnessTables) {
  auto conformsToProtocol = IGM.getConformsToProtocolFn();

  for (auto *protocol : protocols) {
    auto *protocolDescriptor = IGM.getAddrOfProtocolDescriptor(protocol);
    auto *witnessTable =
        IGF.Builder.CreateCall(conformsToProtocol, {value, protocolDescriptor});

    auto failBB = IGF.createBasicBlock("missing-witness");
    auto contBB = IGF.createBasicBlock("");

    auto isNull = IGF.Builder.CreateICmpEQ(
        witnessTable, llvm::ConstantPointerNull::get(IGM.WitnessTablePtrTy));
    IGF.Builder.CreateCondBr(isNull, failBB, contBB);

    // This operation shouldn't fail because runtime should have checked that
    // a particular argument type conforms to `SerializationRequirement`
    // of the distributed actor the decoder is used for. If it does fail
    // then accessor should trap.
    {
      IGF.Builder.emitBlock(failBB);
      IGF.emitTrap("missing witness table", /*EmitUnreachable=*/true);
    }

    IGF.Builder.emitBlock(contBB);
    witnessTables.add(witnessTable);
  }
}

void DistributedAccessor::emitLoadOfWitnessTables(llvm::Value *witnessTables,
                                                  llvm::Value *numTables,
                                                  unsigned expectedWitnessTables,
                                                  Explosion &arguments) {
  auto contBB = IGF.createBasicBlock("");
  auto unreachableBB = IGF.createBasicBlock("incorrect-witness-tables");

  auto incorrectNum = IGF.Builder.CreateICmpNE(
      numTables, llvm::ConstantInt::get(IGM.SizeTy, expectedWitnessTables));

  // Make sure that we have a correct number of witness tables provided to us.
  IGF.Builder.CreateCondBr(incorrectNum, unreachableBB, contBB);
  {
    IGF.Builder.emitBlock(unreachableBB);
    IGF.Builder.CreateUnreachable();
  }

  IGF.Builder.emitBlock(contBB);

  witnessTables = IGF.Builder.CreateBitCast(witnessTables,
                                            IGM.Int8PtrPtrTy->getPointerTo());

  for (unsigned i = 0, n = expectedWitnessTables; i != n; ++i) {
    auto offset = Size(i * IGM.getPointerSize());
    auto alignment = IGM.getPointerAlignment();

    auto witnessTableAddr = IGF.emitAddressAtOffset(
        witnessTables, Offset(offset), IGM.Int8PtrPtrTy, Alignment(alignment));

    arguments.add(IGF.Builder.CreateLoad(witnessTableAddr));
  }
}

void DistributedAccessor::emitReturn(llvm::Value *errorValue) {
  // Deallocate all of the copied arguments. Since allocations happened
  // on stack they have to be deallocated in reverse order.
  {
    for (auto alloca = AllocatedArguments.rbegin();
         alloca != AllocatedArguments.rend(); ++alloca) {
      IGF.emitDeallocateDynamicAlloca(*alloca);
    }
  }

  Explosion voidResult;

  Explosion error;
  error.add(errorValue);

  emitAsyncReturn(IGF, AsyncLayout, getResultType(), AccessorType, voidResult,
                  error);
}

void DistributedAccessor::emit() {
  auto *actor = getDistributedActorOf(Target);
  auto targetTy = Target->getLoweredFunctionType();
  SILFunctionConventions targetConv(targetTy, IGF.getSILModule());
  TypeExpansionContext expansionContext = IGM.getMaximalTypeExpansionContext();

  auto params = IGF.collectParameters();

  auto directResultTy = targetConv.getSILResultType(expansionContext);
  const auto &directResultTI = IGM.getTypeInfo(directResultTy);

  Explosion arguments;

  unsigned numAsyncContextParams =
      (unsigned)AsyncFunctionArgumentIndex::Context + 1;
  (void)params.claim(numAsyncContextParams);

  // A container that produces argument values based on the given set of
  // argument types (supplied as a next argument).
  auto *argDecoder = params.claimNext();
  // `swift.type**` that holds the argument types that correspond to values.
  auto *argTypes = params.claimNext();
  // UnsafeRawPointer that is used to store the result.
  auto *resultBuffer = params.claimNext();
  // UnsafeRawPointer that represents a list of substitutions
  auto *substitutions = params.claimNext();
  // UnsafeRawPointer that represents a list of witness tables
  auto *witnessTables = params.claimNext();
  // Integer that represented the number of witness tables
  auto *numWitnessTables = params.claimNext();
  // Reference to a `self` of the actor to be called.
  auto *actorSelf = params.claimNext();
  // Metadata that represents passed in the invocation decoder.
  auto *decoderType = params.claimNext();

  // If the distributed thunk is declarated in a protocol that conforms
  // to `DistributedActor` protocol, there is an extract parameter that
  // represents a type of protocol witness.
  if (isa<ProtocolDecl>(actor))
    (void)params.claimNext();

  // Witness table for decoder conformance to DistributedTargetInvocationDecoder
  auto *decoderProtocolWitness = params.claimNext();

  GenericContextScope scope(IGM, targetTy->getInvocationGenericSignature());

  // Preliminary: Setup async context for this accessor.
  {
    auto fpKind = FunctionPointerKind::defaultAsync();
    auto asyncContextIdx =
        Signature::forAsyncEntry(IGM, AccessorType, fpKind)
            .getAsyncContextIndex();

    auto entity = LinkEntity::forDistributedTargetAccessor(Target);
    emitAsyncFunctionEntry(IGF, AsyncLayout, entity, asyncContextIdx);
    emitAsyncFunctionPointer(IGM, IGF.CurFn, entity, AsyncLayout.getSize());
  }

  auto *typedResultBuffer = IGF.Builder.CreateBitCast(
    resultBuffer, IGM.getStoragePointerType(directResultTy));

  if (targetConv.getNumIndirectSILResults()) {
    // Since tuples are not allowed as valid result types (because they cannot
    // conform to protocols), there could be only a single indirect result type
    // associated with distributed method.
    assert(targetConv.getNumIndirectSILResults() == 1);
    arguments.add(typedResultBuffer);
  }

  // There is always at least one parameter associated with accessor - `self`
  // of the distributed actor.
  if (targetTy->getNumParameters() > 1) {
    /// The argument decoder associated with the distributed actor
    /// this accessor belong to.
    ArgumentDecoderInfo decoder =
        findArgumentDecoder(argDecoder, decoderType, decoderProtocolWitness);

    // Step one is to load all of the data from argument buffer,
    // so it could be forwarded to the distributed method.
    decodeArguments(decoder, argTypes, arguments);
  }

  // Add all of the substitutions to the explosion
  if (auto *genericEnvironment = Target->getGenericEnvironment()) {
    // swift.type **
    llvm::Value *substitutionBuffer =
        IGF.Builder.CreateBitCast(substitutions, IGM.TypeMetadataPtrPtrTy);

    // Collect the generic arguments expected by the distributed thunk.
    // We need this to determine the expected number of witness tables
    // to load from the buffer provided by the caller.
    llvm::SmallVector<llvm::Type *, 4> targetGenericArguments;
    expandPolymorphicSignature(IGM, targetTy, targetGenericArguments);

    // Generic arguments associated with the distributed thunk directly
    // e.g. `distributed func echo<T, U>(...)`
    auto numDirectGenericArgs =
        llvm::count_if(targetGenericArguments, [&](const llvm::Type *type) {
          return type == IGM.TypeMetadataPtrTy;
        });

    auto expectedWitnessTables =
        targetGenericArguments.size() - numDirectGenericArgs;

    for (unsigned index = 0; index < numDirectGenericArgs; ++index) {
      auto offset =
          Size(index * IGM.DataLayout.getTypeAllocSize(IGM.TypeMetadataPtrTy));
      auto alignment =
          IGM.DataLayout.getABITypeAlignment(IGM.TypeMetadataPtrTy);

      auto substitution =
          IGF.emitAddressAtOffset(substitutionBuffer, Offset(offset),
                                  IGM.TypeMetadataPtrTy, Alignment(alignment));
      arguments.add(IGF.Builder.CreateLoad(substitution, "substitution"));
    }

    emitLoadOfWitnessTables(witnessTables, numWitnessTables,
                            expectedWitnessTables, arguments);
  }

  // Step two, let's form and emit a call to the distributed method
  // using computed argument explosion.
  {
    Explosion result;
    llvm::Value *targetError = nullptr;

    auto callee = getCalleeForDistributedTarget(actorSelf);
    auto emission =
        getCallEmission(IGF, callee.getSwiftContext(), std::move(callee));

    emission->begin();
    emission->setArgs(arguments, /*isOutlined=*/false,
                      /*witnessMetadata=*/nullptr);

    // Load result of the thunk into the location provided by the caller.
    // This would only generate code for direct results, if thunk has an
    // indirect result (e.g. large struct) it result buffer would be passed
    // as an argument.
    {
      Address resultAddr(typedResultBuffer,
                         directResultTI.getBestKnownAlignment());
      emission->emitToMemory(resultAddr, cast<LoadableTypeInfo>(directResultTI),
                             /*isOutlined=*/false);
    }

    // Both accessor and distributed method are always `async throws`
    // so we need to load error value (if any) from the slot.
    {
      assert(targetTy->hasErrorResult());

      Address calleeErrorSlot =
          emission->getCalleeErrorSlot(getErrorType(), /*isCalleeAsync=*/true);
      targetError = IGF.Builder.CreateLoad(calleeErrorSlot);
    }

    emission->end();

    // Emit an async return that does allocation cleanup and propagates error
    // (if any) back to the caller.
    emitReturn(targetError);
  }
}

FunctionPointer DistributedAccessor::getPointerToTarget() const {
  auto fnType = Target->getLoweredFunctionType();
  auto fpKind = classifyFunctionPointerKind(Target);
  auto signature = IGM.getSignature(fnType, fpKind);

  auto *fnPtr =
    llvm::ConstantExpr::getBitCast(IGM.getAddrOfAsyncFunctionPointer(Target),
                                   signature.getType()->getPointerTo());

  return FunctionPointer::forDirect(
      FunctionPointer::Kind(fnType), fnPtr,
      IGM.getAddrOfSILFunction(Target, NotForDefinition), signature);
}

Callee
DistributedAccessor::getCalleeForDistributedTarget(llvm::Value *self) const {
  auto fnType = Target->getLoweredFunctionType();
  CalleeInfo info{fnType, fnType, SubstitutionMap()};
  return {std::move(info), getPointerToTarget(), self};
}

ArgumentDecoderInfo DistributedAccessor::findArgumentDecoder(
    llvm::Value *decoder, llvm::Value *decoderTy, llvm::Value *witnessTable) {
  auto *actor = getDistributedActorOf(Target);
  auto expansionContext = IGM.getMaximalTypeExpansionContext();

  auto *decodeFn = IGM.Context.getDistributedActorArgumentDecodingMethod(actor);
  assert(decodeFn && "no suitable decoder?");

  auto methodTy = IGM.getSILTypes().getConstantFunctionType(
      expansionContext, SILDeclRef(decodeFn));

  auto fpKind = FunctionPointerKind::defaultAsync();
  auto signature = IGM.getSignature(methodTy, fpKind);

  // If the decoder class is `final`, let's emit a direct reference.
  auto *decoderDecl = decodeFn->getDeclContext()->getSelfNominalTypeDecl();

  // If decoder is a class, need to load it first because generic parameter
  // is passed indirectly. This is good for structs and enums because
  // `decodeNextArgument` is a mutating method, but not for classes because
  // in that case heap object is mutated directly.
  if (isa<ClassDecl>(decoderDecl)) {
    auto selfTy = methodTy->getSelfParameter().getSILStorageType(
        IGM.getSILModule(), methodTy, expansionContext);

    auto &classTI = IGM.getTypeInfo(selfTy).as<ClassTypeInfo>();
    auto &classLayout = classTI.getClassLayout(IGM, selfTy,
                                               /*forBackwardDeployment=*/false);

    llvm::Value *typedDecoderPtr = IGF.Builder.CreateBitCast(
        decoder, classLayout.getType()->getPointerTo()->getPointerTo());

    Explosion instance;

    classTI.loadAsTake(IGF, {typedDecoderPtr, classTI.getBestKnownAlignment()},
                       instance);

    decoder = instance.claimNext();
  }

  if (isa<StructDecl>(decoderDecl) || isa<EnumDecl>(decoderDecl) ||
      decoderDecl->isFinal()) {
    auto *decodeSIL = IGM.getSILModule().lookUpFunction(SILDeclRef(decodeFn));
    auto *fnPtr = IGM.getAddrOfSILFunction(decodeSIL, NotForDefinition,
                                           /*isDynamicallyReplacible=*/false);

    auto methodPtr = FunctionPointer::forDirect(
        classifyFunctionPointerKind(decodeSIL), fnPtr,
        /*secondaryValue=*/nullptr, signature);

    return {decoder, decoderTy, witnessTable, methodPtr, methodTy};
  }

  auto methodPtr =
      emitVirtualMethodValue(IGF, decoderTy, SILDeclRef(decodeFn), methodTy);

  return {decoder, decoderTy, witnessTable, methodPtr, methodTy};
}

SILType DistributedAccessor::getResultType() const {
  SILFunctionConventions conv(AccessorType, IGF.getSILModule());
  return conv.getSILResultType(IGM.getMaximalTypeExpansionContext());
}

SILType DistributedAccessor::getErrorType() const {
  SILFunctionConventions conv(AccessorType, IGF.getSILModule());
  return conv.getSILErrorType(IGM.getMaximalTypeExpansionContext());
}

Callee ArgumentDecoderInfo::getCallee() const {
  CalleeInfo info(MethodType, MethodType, SubstitutionMap());
  return {std::move(info), MethodPtr, Decoder};
}

redpajama_set_name: RedPajamaGithub


If you're kids attend Hoover Middle school, you will see more police at drop off time.
Over the weekend, there was an internet rumor that there was some sort of threat made involving the school. However, it turns out to be something that police have assured residents and parents is "unfounded."


All our Discos / Video Discos come with free access to our online planing service and request maker, making sure you get the music you want at your event.
Thank you to Del who Dj'd my husbands 50th. The music was great and everyone had a great time. Would highly recommend.
The disco and photobooth was great everyone commented on DJ and the photo booth is great.Thankyou for a great night.
Great work from Trevor last night! Good music and kept the party spirit going. Thanks.
Great nite on Saturday. All enjoyed. Thanks Mark.
Would 100% recommend. Friendly and good fun.


Turns out, you don't have to spend a bundle to buy a stylish handbag. This affordable waxed canvas day bag is made out of durable canvas and dotted with a panoply of distinctive tiny triangles. Measuring 13 inches wide and 10 inches tall, the interior fits everything you need for the day, and the adjustable strap lets you transition from wearing it over the shoulder to across your body. When the fabric needs a facelift, just wipe it down with a damp cloth.


text:
US, UK and France refuse to send forensic scientists to site of alleged chemical attack in Syria
Latest, Video, News
Alex Christoforou
President and writer for The Duran. Follow me on: Facebook…
Financial Times: Russia's oil and gas industry booming BECAUSE of sanctions
More reasons to believe that the Idlib chemical weapons attack was indeed a false flag, for which the US, UK, France (and many western powers) are trying to cover up.
The Organisation For The Prohibition Of Chemical Weapons has rejected Russia and Iran's proposal for a new team to probe the suspected chemical attack earlier this month in Syria. Moscow's pushing for a wider investigation, because it believes the OPCW cannot properly confirm anything until it's actually visited the site.
The blocking of the Russian proposal at the Organisation for the Prohibition of Chemical Weapons (OPCW) on investigating the alleged chemical weapon use in Syria's Idlib province aims to direct attention to the idea of regime change in Syria, Russian Foreign Minister Sergey Lavrov said.
The OPCW is not willing to properly probe the alleged chemical attack in Idlib. This is very odd.
What does a proper investigation entail?
How about the OPCW actually visit the site of the alleged attack, instead of rely on samples sent by White Helmets, or Al Qaeda, or anyone else for that matter.
How was the OPCW able to analyze the samples so quickly? Usually such lab work requires weeks, not hours.
What were the documented procedures for collecting the samples, and sending the samples? No documentation as to the collection process has been provided.
This is all very sloppy forensics, and it appears that western powers are working hard to keep this as sloppy as possible so as to avid a professional investigation which will, in my opinion, most certainly debunk the "Assad did it" narrative.
"Sarin or a 'sarin-like' substance" is repeated by UK diplomats in the video above. How can a verdict be attributed when officials are not even certain of the chemical allegedly used? Once again we see clever word play from the "Assad must go" coalition.
I Know Which Country the U.S. Will Invade Next
Here is what Russian FM Lavrov had to say about the OPCW at a joint meeting with Chinese Foreign Minister Wang Yi.
"Yesterday, our joint proposal that OPCW experts visit the sites of the suspected chemical weapon use incident in Syria was blocked by western delegations without coherent explanations. This showed the complete incompetence of the positions of our western colleagues who basically prohibit the OPCW from sending their experts to the site of the incident, to the air base from where aircraft loaded with chemical weapons allegedly flew out."
Lavrov noted that the UK and France have been curiously silent towards Russia's requests for detailed information on the alleged chemical weapon probes taken in Syria.
"I think we are very close to this organization [OPCW] being discredited."
"False information on the use of chemical weapons by the Syrian government is being used to move away from the implementation of resolution 2254 which stipulates a political settlement with the participation of all the Syrian parties and to switch to the long-cherished idea of regime change."
Syria Sergei Lavrov Idlib OPCW
Latest, Analysis, News
OPCW investigation of Khan Sheikhoun attack collapses before it starts
US Power is Waning
What's next for Syria?
The Only Strategic Rationale for America's Involvement in Syria Finally Revealed
Fearful US Grants China an Oil Waiver