text:
Q: How to implement a getComponent(/*Class*/) method for video game in kotlin I'm writing in kotlin, developing a text based RPG game for android.
I'm currently at the development of my object system going with a strategy / entity component design.
I'm stuck on the getComponent function and have no clue what I'm doing
I need a method that accepts a reference to a Class type and then compares that to all the component instance's class types.
I've tried using generics, KClass, Java Type but can't find the answer.
My main issue is the "as" operator. I have no clue what it accepts.
All I got so far is :
fun getComponent(clazz : KClass<*>) : Component? {
    for(component in components) {
        if(component is clazz) {
            return component
        }
    }
    return null
}

This code is wrong. IntelliJ alerts me that clazz does not exist as it's not ann actual Class.

A: You have a KClass instance, which is a runtime object representing a type, used for reflection. You have two main options here. You can use reified generics, like so, which allows you to avoid using reflection entirely:
inline fun <reified T : Component> getComponent() : T? {
    for(component in components) {
        if(component is T) {
            return component
        }
    }
    return null
}

This method can be invoked like so:
getComponent<SomeClass>()

Alternatively, you can use KClass.isInstance:
fun getComponent(clazz : KClass<*>) : Component? {
    for(component in components) {
        if(clazz.isInstance(component)) {
            return component
        }
    }
    return null
}

You can make this a little bit more convenient with generics and casting as well:
fun <T : Component> getComponent(clazz : KClass<*>) : T? {
    for(component in components) {
        if(clazz.isInstance(component)) {
            return component as T
        }
    }
    return null
}

For both of these, the usage is the same:
getComponent(SomeClass::class)


text:
Children's Revolt
It's a cliche to say that a given country is at a "crossroad," but in this case Thailand really is. Do the elders have the wisdom to hear what the younger is demanding and negotiate a very different kind of future for the country?
Doing journalism is not a crime
The use of violence against protesters has a direct effect on the media who's reporting in the area where the demonstration was dispersed. So the Isaan Record condemns the use of violence and the arrest of a Prachatai reporter.
Ubon Ratchathani University students organize in solidarity with protesters in Bangkok
16/10/2020 16/10/2020 News
Students at Ubon Ratchathani University joined into the group "Ubon U won't tolerate" on Friday even to show support for protesters in Bangkok and issue a statement condemning government violence.
Govt disperses "The People's Party 2020" rally, arrests leaders
Photos by Suphaphorn Tumprakon Early this morning at about 4:30 a.m., a group of around 500 crowd-control officers with shields and body armor broke up a group of about 1,000 protesters demonstrating on the street next to Government House. It took the police just one hour to take control of the area where they also […]
Thailand sees moviegoers remaining in their seats during the playing of the royal anthem
14/10/2020 26/10/2020 Features
A new trend of not standing in theaters during the royal anthem is going viral. People who do not stand declare it as an individual right and the act of not standing is not illegal. It's happening in Isaan, too.
No work without physical contact: Women workers affected by COVID-19
01/10/2020 06/10/2020 Interviews
The economic impact of the novel coronavirus pandemic has been disproportionally affecting female service workers. In addressing the crisis, policymakers need to take gender questions into account argues sociologist Patcharin Lapanun from Khon Kaen University's Faculty of Humanities and Social Science.
The Good Daughters of Isaan (21) – Our readers respond, raising questions about inequality, racism, and gender relations
In this final part of our series on the mia farang phenomenon in Isaan, we capture some of the comments and feedback we received from Thai and foreign readers. Themes raised by our readers included attitudes towards Isaan women and men, and questions about equality, social mobility, racism and the position of Isaan within the Thai state.
Despite death threats, anti-mining group vows to reclaim mine in Nong Bua Lamphu
A group of locals is planning to escalate their longstanding opposition to a limestone mine in Nong Bua Lamphu's Suwannakhuha District on Friday amid death threats against one of its advisors.
The Good Daughters of Isaan (18) – Has online dating changed the dynamics of Thai-Western relationships?
The conventional view of Thai-Western relationships is older Western men meeting their future partner, often a single mother, at a tourist venue, getting married, and then moving to the man's home country or settling down in Thailand. But online dating apps also see a new phenomenon emerging: younger Thai women connecting up with younger Westerners. Guest contributor Kate Santaliz takes a look.

redpajama_set_name: RedPajamaCommonCrawl


Shalimar is a 1978 Hindi film,Co-star in movie Dharmendra, Sir Rex Harrison, Zeenat Aman, Shammi Kapoor, Prem Nath, Aruna Irani and American actors John..
The film stars Amitabh Bachchan, Zeenat Aman, Pran, Iftekhar, Helen and Om Shivpuri, Satyen Kappu and Pinchoo.It was the third-highest grossing Bollywood movie of 1978..
Qurbani is a 1980 Indian Bollywood movie.Co-star Feroz Khan, Vinod Khanna, Zeenat Aman, Amjad Khan, Shakti Kapoor, Aruna Irani, Amrish Puri and Kadar Khan..
Hare Rama Hare Krishna Filmfare Best Supporting Actress Award ..
Satyam Shivam Sundaram Filmfare Nomination as Best Actress for..
Insaaf Ka Tarazu Filmfare Nomination for Best Actress Zeenat..
Gawaahi Her last role as the female lead was in movie.
Hum Kisi Se Kum Nahin Hum Kisi Se Kum Nahin is a 1977 Hindi action film,..


Our Passion Play procession now continues up Merseybank Road and stops in the green outside Hadfield Infant's school. Here is the setting for the trial against Pilate.
Jesus is dragged to see Pilate by the soldiers.
A cornet solo announces Pilate.
A very regal Pilate questions Jesus: "are you King of the Jews?". Pilate can find no evidence that Jesus is guilty of any crime so appeals to the crowds. He asks them if they want to free Jesus, as it is the custom for Roman officials to free a Jewish prisoner every Passover. But the crowd yell "Free Barabbas!" Pilate asks what they want him to do about Jesus. The crowd shouts "Crucify Him!"
So Pilate orders Jesus's death. The soldiers drag Him off to be crucified. We sing "My song is Love unknown" (verses 2 and 3).


text:
			{% include svgs/devices/iphone6plus.min.svg %}
      {% if include.parallax %}
        {% if include.parallaxDirection == "horizontal" %}
          {% assign directionClass = "casestudy__responsive-screen--horizontal-scroll" %}
        {% endif %}

      {% else %}

      {% endif %}
	        {% include rio-image.html src=include.url alt="Built from mobile up to big screens" %}

      {% include svgs/shapes/casestudy-responsive.min.svg %}

Built responsive from mobile up to big screens

redpajama_set_name: RedPajamaGithub


Power & Tel is unsurpassed in mastering even the fastest-moving supply chain challenges. Our broad spectrum of products and service solutions enable you to attain every opportunity in this rapidly evolving industry.
You need the right products at the right place and the right time. Our customers tell us we set the bar for accurate, consistent delivery.


Knurled line at base of socket allows for extra grip and easy identification of Metric sizes. Set includes: 1/4" drive 6mm, 7mm, 8mm, 9mm, 10mm, 11mm, 12mm, 13mm and 14mm 6 point deep metric sockets; 4mm, 5mm, 6mm, 7mm, 8mm, 9mm, 10mm, 11mm and 12mm 12 point standard metric sockets; 2" and 6" 1/4" drive extensions; 1/4" drive spinner handle and 1/4" drive full polish teardrop ratchet. Packaged in a blow molded case with removable lid.


"The Company" means CV1 Displays Ltd trading as Next Day Displays, "the Customer" means the person, firm, company or corporation who orders, purchases and/or contracts to order or purchase goods of the Company.
Goods will be despatched by the most convenient means unless otherwise agreed in writing and carriage will be charged at a rate that is carrier cost plus packaging.
Any undamaged and re-saleable goods that are returned for credit will be subject to a restocking charge of 15% of the value of the returned goods or £20 , whichever is the greater.
This charge and any collection charge is deducted before a refund is made.
Any problem concerning goods or delivery must be reported in writing within 3 working days of receipt of goods. Goods cannot be returned without prior agreement with our trade sales manager who must provide authorisation in writing. We cannot be held responsible for any delivery signed for as undamaged which is subsequently reported to have been damaged in transit.


We need an osCommerce template for a new web shop. The shop will sell AV products from selected manufacturers. Since the products are high end, we'd like a webshop with a nice, clean look and feel.
We will sell about 10-12 different brands in about the same number of categories.
We will also offer products with no price publicly available on the website. Here the customers will need to ask for a quote.
Edit: The heading is a bit confusing. This contest is ONLY to produce a design. No coding required.


text:
Content Strategy 16 June 2017 • 3 minutes reading time
16th June 2017 • 3 minutes reading time
SEO & PPC
A Digital Marketing Perspective
Content marketing is considered one of the most important components of any marketing program, but very few organisations consider their function as strategic and advanced.
According to a recent UK study by the Content Marketing Institute, only 5% of organisations would classify their content marketing efforts as sophisticated.
Yet, 79% stated they would increase the amount content produced in 2017. A further 21% of businesses also rated content marketing as the most commercially impactful activity to generate leads and sales, according to Hubspot.
Brands agree they need to produce more and better content, but the question is HOW?
In this report, we detail how to make content marketing a strategic and commercially impactful function, and how search plays an important part in the process. Our examples cover best practices from both leading brands and publishers.
1. Transforming Customer Needs into Content
Using Search Intelligence to Inform Content Ideas
Search behaviour represents people's top of mind thoughts and queries. By understanding customer motivations behind their searches, brands can be more targeted and creative with their content.
The importance of search to understand customer needs is illustrated in the below example, which compares the online visit share of British beauty brand, Charlotte Tilbury and British beauty retailer, Space NK. Charlotte Tilbury has had a stellar year, growing by 106% in April year-on-year, overtaking Space NK in the latest month.
If we were to take the perspective of Space NK, we can see which terms Space NK has missed out on, over the month of April. Aside from product searches, Charlotte Tilbury had captured a significant share of organic searches around customer needs and product tools.
A comparison of the two beauty websites will help allude why this is the case. Charlotte Tilbury features a rich variety of content that addresses customer needs, including blogs, videos and how-to guides.
In contrast, customers are directed from search query directly to Space NK's product pages. There is then an opportunity for Space NK to integrate content and solutions with their product listings.
Top Takeaway
Conduct search gap analysis on a regular basis against the competition. Understand customer motivations behind their searches and use this as a basis to develop creative, useful and engaging content.
2. Keeping Evergreen Content Fresh
A Best Practice Case Study from Conde Nast Traveller
Condé Nast Britain is home to some of the world's most iconic media titles, including British Vogue, GQ, Wired, Glamour and CNTraveller. Success is a result of relentless optimisation in reader engagement, with Hitwise at the heart of their intelligence tools. In this chapter, we look at how Condé Nast Britain uses Hitwise tools to refresh their evergreen content and maintain top search rankings.
Condé Nast Britain titles have enjoyed huge growth in traffic from organic search, with individual articles seeing over 100% year-on-year gains.
Geoff Richards, Head of Data, Analytics and Insight at Condé Nast Britain, says:
"Hitwise gives us the power to uncover untapped content opportunities, with significant improvements delivered through simple optimisations, such as Search Term Variation capabilities.
As shown in this example for "The Best Afternoon Tea in London", Hitwise allowed us to identify top-trending terms, like "afternoon tea at the ritz" and "afternoon tea at the shard", and re-write our content accordingly."
Geoff continues: "As a result, we saw a 104% rise in vists to this article YoY, with high traffic levels maintained outside of standard seasonality."
Keep evergreen content alive through simple yet effective optimisation techniques, such as replicating keywords from search results and re-designing content to meet changing preferences.
3. Generating Quick Wins Through Search
Using Fast-Moving Search Terms to Get the First-Mover Advantage
As our preferences and interests change on a daily basis, so do our online searches. Brands and publishers need to keep track of what is trending online, particularly for new and topical content.
In this section, we look at the Nokia 3310 relaunch, and analyse how The Independent won the lion's share of traffic from this emerging news story.
Online buzz around the revived Nokia 3310 first came about almost 2 weeks before its official announcement (at the Mobile World Congress on the 27th February).
If we dig deeper into the search variations around "Nokia 3310" during this week, terms with high organic rates also included "relaunch", "new" and "price".
Looking at the downstream traffic from these searches, The Independent had gained the highest share in the weeks of the 18th and 25th of February. Within these weeks, the publication used the top searched for terms with high organic rates, such as "relaunch" and "new" in their headlines to gain traffic. Other publishers, such as The Sun, Telegraph and Tech Radar, eventually caught up with their coverage in the week of the 25th.
Use fast moving organic terms as a source of inspiration to get the first mover advantage. Replicate key organic terms to optimise click share against your competitors.
Understand customer motivations behind their searches.
Use customer needs as a basis to develop creative, useful and engaging content.
Keep evergreen content alive through simple optimisation techniques, such as keyword searches.
Use fast moving organic terms to get the first mover advantage.
Replicate key organic terms to optimise click share against your competitors.


• The new CLAW cable runner is a unique solution for permanently installed climbing protection systems, allowing employees safe access when working at heights or depths. The cable runner is suitable for vertical access to steel ropes with a diameter of 8 mm.
• Its double safety construction also prevents incorrect installation, thanks to the integrated locking mechanism, for example. In addition, a skull symbol clearly indicates the application error "incorrect installation". If the climber slips or falls, the carabiner swings very suddenly downwards. This is how the CLAW stops the fall. The runner is suitable for maintenance or servicing work on wind turbines, buildings, masts or manholes.
• The product is certified in accordance with EN 353-1:2014 as a guided type fall arrester including a rigid anchor line.
• It secures a maximum of one person weighing from 50 kg to 150 kg.


mean there is a problem with your side airbags.
When you turn the ignition switch to the ON (II) position, the indicator should come on briefly and then go off. If it doesn't come on, stays on, or comes on while driving without a passenger in the front seat, have the system checked.


text:
Magazine summary
FARE Eastern European Development Project
Against racism in the stadiums
Audio materials
Home Our news Articles from 2011 "NEVER AGAIN" ASSOCIATION SHARES ANTI-RACISM EXPERIENCE IN KAZAN
"NEVER AGAIN" ASSOCIATION SHARES ANTI-RACISM EXPERIENCE IN KAZAN
Members of the 'NEVER AGAIN' Association held meetings with authorities and civil society leaders in several cities across the Russian Federation between 26-30 September 2011. They discussed future cooperation and exchange of experiences in the struggle against racism and xenophobia in the lead up to the 2018 World Cup to be held in Russia.
Among others, they visited Kazan - the home of FC Rubin and a 2018 World Cup host city -where they were received by the leaders of the Parliamentary Civic Chamber of the Republic of Tatarstan including the Chairman of the Chamber, Il'giz Khairullin. The meeting at the Kazan Kremlin was scheduled for 40 minutes but extended to more than 2 hours of friendly discussion about issues of multi-culturalism and xenophobia.
Members of the 'NEVER AGAIN' Association also met with the leadership of the Assembly of the Peoples of Tatarstan, including key leaders of the Kazakh, Georgian, Uzbek, Vietnamese, Russian-German, and Udmurt minority communities. They also met with the heads of the Jewish and Bahai communities in Kazan, the NGO Azamat, and with the Centre for Study of Discrimination, Extremism and Xenophobia in the Republic of Tatarstan. They also discussed grass-roots cooperation with the Kazan Federation of Mini-Football (Futsal), which is to result in joint activities with the Assembly of the Peoples of Tatarstan for this year's Football Against Racism in Europe Weeks of Action in October.
-'I appreciate the exceptionally warm welcome we received in Kazan and the high level of discussions we had here' - said Dr Rafal Pankowski of the 'NEVER AGAIN' Association, coordinator of the East Europe Monitoring Centre set up in cooperation with the FARE Network and UEFA. - 'Tatarstan is a unique example of a dynamic multi-ethnic society where diversity is valued. There is a lot we can learn from each other.'
The 'NEVER AGAIN' Association is an independent educational and monitoring organization established in Poland in 1996. Since 2009, 'NEVER AGAIN' has coordinated the FARE East European Development Project supported by UEFA in the run up to EURO 2012 in Poland and Ukraine. 'NEVER AGAIN' has set up the East Europe Monitoring Centre documenting racism and xenophobia across the region.
www.nigdywiecej.org
www.farenet.org
More photos on the site of the Civic Chamber of the Republic of Tatarstan: http://oprt.tatar/ .


text:
Best Food in London
London bucket listYou'll find all of the fun things I've seen and done since moving to London over 5 years ago. Everything from events to walks to things I've photographed. And check out my London food reviews for the best eats in the city.
Sitting Waiting WishingHow do you pass the time when travelling on trains, planes or automobiles? Here are my fun recommendations for music, podcasts, TV and film.
Travel Blogger Interviews
Best Family Holiday Ideas
Best Beach Destinations
Instagrammable PlacesInstagrammable places are all of my favourites photos in one place. Follow me on Instagram!
Write For Us – Travel Guest Post
Follow us on Twitter | Instagram
Home » Europe
Things to do in Gdynia: Why visit?
In the wake of the Euro 2012 football tournament, the world saw the true face of Poland – welcoming, charming and exciting.
Poland's long, fascinating and turbulent history is noticeable everywhere, whether you're strolling past ugly Soviet-era apartment blocks in Łódź or sipping a coffee under the midday sun in Kraków's historic Rynek Główny.
Babie Doly, Gdynia, Poland (Photo credit: jan.mikolaj)
One place above all else embodies Poland's spirit. That place is called Gdynia and it's located on the country's northern coast.
Why is Gdynia so special?
For one thing, it's a unique mixture of modern concrete and steel, lacking historical charm. On the other hand, its home to some of Poland's most spectacular coastal scenery. Delve beneath the city's modernity however, and you'll uncover some of the most important events in Polish, and indeed in world history.
Gdynia is situated within a metropolitan area known as 'Trójmiasto' in Polish and 'Tricity' in English, along with Gdańsk and Sopot. The three cities are mere miles apart and travelling between them is quick and effortless.
Medieval Old Town
Gdańsk is renowned worldwide for its splendid old town and medieval buildings, while Sopot is famed for having the longest pier in Europe and the wonderfully puzzling 'Crooked House'. Out of the three, Gdynia is sometimes overlooked, yet there's something to discover around every corner in this charming city.
Gdynia, Poland – restaurants on Skwer Kościuszki (Photo credit: yorkville)
One of the first things you'll notice in Gdynia is a distinct lack of historic buildings. There are two reasons for this – Gdynia itself remained a village until the 1920s when the Polish government started construction of a deepwater port, so grand buildings were never really afforded priority.
Secondly, immense wartime destruction resulted in the disappearance of what little historic buildings there were. The city was rebuilt from the rubble of the Second World War in a distinctly Soviet fashion.
While the streets are broad and straight and the buildings are shabby and grey, the friendly locals fill the place with a vibrant sense of warmth. If you're lost in Gdynia, don't hesitate to approach somebody on the street and ask for directions. Many younger Poles will be keen to practise their English skills.
If you're lucky, you might get invited to one of Gdynia's cosy pubs for a pint of Żywiec, a delicious Polish lager. Amid all the modernity, you can still spot some historic buildings like St. Michael Archangel's Church in Oksywie, a charismatic old structure with red roof tiles and a wooden belfry.
Świętojańska street – Gdynia, Poland (Photo credit: yorkville)
Getting around Gdynia
Getting around Gdynia is very easy. A fleet of white and blue electric trolleybuses and conventional buses service the city, with a 24 hour ticket costing 10 zł or €2.40. Gdynia is one of only two cities in Poland with a trolleybus network, the other one being Tychy. If you wish to travel to Sopot or Gdańsk, hop on the Szybka Kolej Miejska or SKM, a fast and cheap commuter train.
Attractions in Gdynia
Most of Gdynia's key attractions can be found at the seafront, so make this the very core of your trip. The port really breathes history and there's a multitude of museums that put all of the pieces together.
Gdynia's harbour
It was here in December 1970 that scores of striking shipyard workers were killed by the army, profoundly impacting workers across Poland and eventually resulting in the emergence of the Solidarity movement. Memorials stand to the massacred workers in Gdynia, Gdańsk and Elbląg.
Two impressive museum ships stand in Gdynia's harbour – the Dar Pomorza, a sailing frigate dating from 1909 and the ORP Błyskawica, the oldest preserved destroyer in the world. The tall white sails of the Dar Pomorza are highly impressive and it's well worth a visit.
The ship was operated by Britain and France before sailing around the world in 1935. It served Poland for several decades, and was decommissioned in 1982. The ORP Błyskawica had a much more violent and glorious existence on the other hand, fighting throughout the Second World War. In the process, it shot down four German aircraft and damaged three U-boats.
Sea Towers, Gdynia, Poland (Photo credit: Wikipedia)
Standing at the harbour and looking out towards the horizon, many visitors to Gdynia remain unaware of a gargantuan maritime tragedy that took place close to the city in 1945. While in the process of evacuating civilians from East Prussia, a German ship named the MV Wilhelm Gustloff was torpedoed by a Soviet submarine soon after departing Gdynia.
It sunk with the loss of an estimated 9,400 people, making it the deadliest ship sinking in recorded maritime history. Most of the dead were civilians, including upwards of 4,000 children.
>>> Warsaw: The Polish Capital on the Rise for Tourism
If you're keen to experience a more light-hearted and relaxed side of Gdynia, head to the aquarium. Its home to more than 1,000 of species fish, amphibians and reptiles from every corner of the world.
The building is very spacious and modern, located a stone's throw away from the museum ships in the port. One of the best things about visiting Poland is how much money you can save. Everything is very cheap and in fact, Poland actually has the lowest food prices in Europe.
The great outdoors of Gdynia
If you want to explore the great outdoors, Gdynia is the perfect place. Miles of beautiful sandy beaches stretch out in every direction, dotted with marinas, promenades and restaurants. Make sure you take a stroll at Plaża w Orłowie, a wonderful white sandy stretch of coastline located under the Orłowie cliffs.
There's an old wooden pier here, a great place to relax and take in the views. Colourful little fishing boats bob up and down in the tide while a massive brown tree trunk lies across the beach.
It contrasts wonderfully with the cream coloured cliffs in the background, a spot of stunning beauty. Sitting on that tree trunk at sunset, you'll find yourself in the most radiant spot in all of Poland.
Walk up into the hills and cliffs overlooking the beaches and enjoy marvellous views over the Baltic Sea. It's very tranquil along the paths overlooking the roaring Baltic, and you can walk for hours on end. In the summer, it does get crowded and noisy, nowhere moreso than the beaches themselves.
Poles flock to Sopot more than Gdynia, so if you're after a more relaxing summer experience, find yourself a spot on the sand at Plaża w Orłowie or the wild beach at Osada Rybacka.
Bulwar Szwedzki – Gdynia, Poland (Photo credit: yorkville)
Cyganeria
In terms of buzz, vibrancy and life, Gdynia is hard to beat. Move away from the beaches and walk back towards the city where you'll find Cyganeria, an old and much loved bar noir. Budding student revolutionaries used to plot coups in this bar, and its sofas provide the perfect place to relax with a cold beer or warm cappuccino, depending on the weather. If you're hungry, go to Barracuda.
This modern, stylish place serves the very best seafood in Poland and its terrace has an unbeatable atmosphere during summer. Gdynia offers plenty of exciting events, like Heineken Open'er, an early summer music festival attracting the industry's top names and up to 70,000 fans.
For cinema lovers, the Gdynia Film Festival is the highlight of the year, culminating in the award of the Golden Lion trophy for the best film.
After a short visit, Gdynia is easy to gauge. Beneath its initially off-putting façade, you break into a city full of spectacular history, friendly people, buzzing events and alluring seaside strolls. Its deepwater port is literally Poland's lifeblood and some have described Gdynia as the gateway to the country.
Yet Gdynia isn't just the gateway to Poland, it's so much more. It's a summer holiday resort, an important logistics base, rapidly developing economic force. Gdynia is experiencing its very best days right now, so go and enjoy everything it has to offer!
Seamus Murphy writes for Trenditionist.
P.S. You might be interested in...
Warsaw: The Polish Capital on the Rise for Tourism
A Guide to Indonesia's Most Beautiful Islands
5 Things to do in Sheffield: A Weekend Guide


text:
A New Mayflower Voyage, Captained by AI Technology
After several setbacks, the Mayflower Autonomous finally crossed the Atlantic.
By: Sarah Cowgill | June 21, 2022 | Tags: Mayflower, robot, voyage 467 Words
Replica of the original Mayflower (Photo by Jonathan Wiggs/The Boston Globe via Getty Images)
It was September 16, 1620, when the Mayflower set sail from England. Destination: the new world. The new colonies, to be exact, to escape religious persecution under the reign of King James I. The Mayflower was 106 feet long and 25 feet wide, and it carried 102 passengers and 30 crew members to Plymouth, Massachusetts, in 66 days.
Fast forward 402 years later, and another voyage has made history. The Mayflower Autonomous, a boat navigating only by Artificial Intelligence (AI), made nearly the same trek and became the first unmanned craft to complete the Atlantic crossing. That means the ship traveled with no humans onboard – it was totally controlled by computer. The trip took 40 days. Due to tech problems that had to be fixed, the trip involved one unplanned layover.
The experiment was planned to collect data on AI technology and navigation. Excited researchers and scientists say the new Mayflower did just what she was designed to do. "The journey she made across was arduous," said project director Brett Phaneuf, who is also a founder of ProMare, the maritime research group that led the expedition.
The Pilgrimage
Mayflower Autonomous (Photo by ProMare)
The idea to recreate the Mayflower crossing began in 2015 when plans were underway to make the unmanned journey across the rough Atlantic Sea and land in Plymouth, MA, on the 400th anniversary of that historic voyage that Americans celebrate today. The idea attracted global partners, including technology companies Nvidia and IBM. The 49.2-foot vessel was equipped with an AI captain, six AI-powered cameras, 15 computer systems, more than 30 sensors, navigation tech, and a weather station.
A late 2020 launch was scheduled. But setbacks here and there pushed the date to 2021, and after a few days into the voyage, the vessel returned due to a problem that only a human could fix. But another launch was scheduled, and the Mayflower Autonomous launched again into deep waters on April 27, 2022. Except there was a change in destination: it was heading not to Massachusetts, but to Virginia.
After a two-week layover in the Azores islands (located in the middle of the Atlantic Ocean) to fix the generator and wait for better weather, the voyage resumed. But not for long: another power problem arose, and the Mayflower Autonomous was diverted to Halifax, Nova Scotia, in Canada. The vessel finally landed in Canada on June 5, 2022. Even though it didn't make it to Plymouth, unlike the original Mayflower, the boat was the first to cross the Atlantic with no humans onboard.
ProMare updated the status on social media: "Our journey … has been eventful and challenging. So we are thrilled that our ship completed the endurance challenge of being the first self-directed autonomous ship to cross the Atlantic Ocean."
Test your knowledge – try a quiz based on this article!


Regions with copy number variations (in germline cells) or copy number alteration (in somatic cells) are of great interest for human disease gene mapping and cancer studies. They represent a new type of mutation and are larger-scaled than the single nucleotide polymorphisms. Using genotyping microarray for copy number variation detection has become standard, and there is a need for improving analysis methods.
We apply the cumulative plot to the detection of regions with copy number variation/alteration, on samples taken from a chronic lymphocytic leukemia patient. Two sets of whole-genome genotyping of 317 k single nucleotide polymorphisms, one from the normal cell and another from the cancer cell, are analyzed. We demonstrate the utility of cumulative plot in detecting a 9 Mb (9 ×106 bases) hemizygous deletion and 1 Mb homozygous deletion on chromosome 13. We also show the possibility to detect smaller copy number variation/alteration regions below the 100 kb range.
As a graphic tool, the cumulative plot is an intuitive and a scale-free (window-less) way for detecting copy number variation/alteration regions, especially when such regions are small.
Most efforts in genetic mapping of human diseases focus on single-nucleotide-polymorphism (SNP): individual nucleotide base that may differ from one person to another. If the cause of a polymorphism is due to diverging paths in population genetic history, such as in multiple ethnic groups, it can be used as an ancestry or ethnic identity marker . If the polymorphism is a functional mutation (non-synonymous or promoter-region polymorphism)  underlying a human disease, then it is the focus of attention in case-control genetic analyses .
A new type of genetic polymorphism emerged recently as another source of mutation that may lead to human diseases: the copy number variation (CNV) (for literature on CNV, see an online bibliography ). Local duplication and deletion events occuring at kb (103 bases) or Mb (106 bases) scales are the cause of CNV. If these events occurred in prior generations, CNV can be treated as a genetic marker whose transmission might be traced in studying the disease-status correlation. These events can also occur in the current generation, as de novo mutations.
Similar duplication and deletion events also occur in somatic cells, leading to copy number alteration (CNA). Besides the link between CNA and cancers studied before , an early CNV-disease association was reported on Charcot-Marie-Tooth disease , in inherited neurological disorder. In the past year or two, the number of reports on association of CNV with human diseases increased dramatically, especially for psychiatric disorders such as Schizophrenia [7–9], bipolar , and for brain developmental disorder such as Autism [11–15]. These diseases have long been evading genetic dissection, and the CNV link offers new optimism for our ultimate understanding of these diseases.
The technology for CNV detection evolves from Mb-level comparative genomic hybridization (CGH) to higher-resolution array-based CGH . Genotyping array whose original goal is to genotype individual SNPs, has increasingly been used for CNV detection [17–20]. There are two relevant pieces of information from a genotyping array data for the purpose of CNV detection.
The first is the ratio of intensity reading of alleles for a sample to that from a reference group of normal samples. If the ratio is larger than 1, there are more copies of piece of DNA in the sample than normal (which is 2 copies). If the ratio is less than 1, it indicates a deletion. The second signal is the genotype. Deletion of one of the chromosomes leads to a run of homozygosity for all SNPs in the region, though run of homozygosity can also be due to inbreeding [21, 22]. The homozygosity property of one-copy deletion is well exploited in detecting loss-of-heterozygosity in CNA of cancer cells .
CNV detection using genotype microarray data relies on these two sequences: if the intensity ratio deviates from the normal value of 1 for a chromosome region with a consistent value, it can be a CNV region. Similarly, if a run of homozygosity is observed in a region, it could indirectly indicate a copy-number deletion. A CNV region detection is more convincing if CNV signals exhibited by both sequences overlap in a common region.
Methods for calling CNV regions can be roughly classified into two types. The first type is straightforward: a CNV detection is claimed when the log-ratio value is significantly deviated from 0 . The problem with this method is that the threshold for calling CNV varies greatly from platform to platform, from study to study, and a comparative investigation is urgently needed . The second type uses hidden Markov models (HMM), where the underlying CNV status is the hidden variable, and the log-ratio and genotype sequences are the two observed variables [25–30]. One advantage of the HMM framework is that it can incorporate information from both sequences at once.
When the parameter settings in a HMM are fixed, HMM is a stationary (homogeneous) process along a chromosome. There is one parameter in HMM which controls the transition probability from the (hidden) CNV state to non-CNV state. That parameter can also be transformed to the characteristic size for CNV region . What if the CNV regions do not have a characteristic size, or equivalently, the length distribution is not exponential? In that case, CNV-calling methods that do not require stationarity are preferred.
The guanine-cytosine content (GC%) in DNA sequences has been a focus of non-stationary, non-Markov, long-range-correlated modeling for more than twenty years [31–33]. It is well acknowledged that the hierarchical pattern of GC%-domains within GC%-domains is possible [34, 35]. In order to detect both small and large GC-homogeneous domains, one applies methods that do not preset a characteristic scale. One such method is the recursive segmentation that adopts a divide-and-conquer approach . Another is the cumulative plot.
Cumulative plot is a graphic display of sequence information such that trend in a region becomes more visible and obvious. It is a window-less method because no characteristic scale needs to be specified, although a window can be imposed to a plot when all patterns within certain length scale are to be ignored. In DNA sequence context, such cumulative plots were called "DNA walk" [37, 38] or "Z curve" [39, 40]. The cumulative plot has also been widely used for detection of replication origin [41, 42]. To our knowledge, cumulative plots have not been applied to CNV/CNA detection. The purpose of this paper is not to provide a comprehensive comparison of various CNV/CNA-calling methods, but limited to the presentation and illustration of this new approach.
Since our method applies equally to CNV and CNA data, here we examine the CNA pattern in a cancer patient with chronic lymphocytic leukemia (CLL) . DNA samples from the patient's normal cell and that from the cancer cell are obtained and genotyped with 317,000 SNPs genomewide. Figure 1 shows the log-ratio and θ sequences (see Methods) for chromosome 13, where a 9 Mb CNA region (deletion) in the cancer cell is clearly visible. A deletion region is characterized by a drop in log-ratio value, and an absence of heterozygosity. Our goal is to capture the same information using cumulative plots.
Log-ratio and genotype sequences for chromosome 13 in paired samples from a CLL patient. Log-ratio (top) and genotype θ (bottom) sequence for SNPs from chromosome 13 of two samples taken from the same cancer patient: black for normal cell and blue for cancer cell. For the log-ratio plot, the copy number of 2 level log(2/2) = 0 and the copy number of 1 level log(1/2) = -0.693147 are marked.
The left panel of Figure 2 shows the two cumulative plots corresponding to log-ratio sequence and homozygosity indicator sequence h, respectively. In the simplest version, at each new SNP, the curve moves up or down by an amount equal to the log-ratio value of that SNP, or by the presence of a homozygote (+1) and a heterozygote (-1).
Cumulative plot of log-ratio and homozygosity sequence. Cumulative plot and detrended cumulative plot for both the log-ratio sequence and the homozygosity indicator sequence (for the chromosome 13 data shown in Figure 1). Top: cumulative plots for log-ratio sequence. Bottom: cumulative plot for homozygosity sequence (1 for homozygote, -1 for heterozygote). Left: original cumulative plots. Right: detrended cumulative plots. The linear trend obtained from the normal sample is used to detrend both the normal and the cancer sample. Black for the normal cell and blue for the cancer cell. The 9 MB hemizygous deletion and the neighboring 1 Mb homozygous deletion region are marked by red lines.
For a deletion region, the log-ratio value is consistently negative, and the first cumulative plot shows a drop; and genotype is consistently homozygous (also called run of homozygosity (ROH)), and the second cumulative plot shows a jump. However, from Figure 2 (left), even outside the CNA region, the first (second) cumulative plot continues to go down (up), reflecting a global abundancy of negative log-ratio over positive one (homozygotes over heterozygotes).
To remove the global or chromosome-wide average, we redraw a detrended cumulative plot (right panel of Figure 2) where the linear trend from the normal cell is subtracted from the two cumulative plots. If the difference of global trends between the cancer and normal cell is an artifact, e.g., the poor DNA quality in cancer cell that leads to higher missing rate for genotype calling, thus seemingly lower heterozygote frequency, then the normal and cancer cumulative plots should be detrended separately. Without such an evidence, we use the linear trend in normal cell to detrend both samples to highlight the difference between the two.
Cumulative plots can be customized to pick any specially defined signal. Suppose we are mainly interested in regions with copy number equal to 1, i.e., hemizygous deletion. Such deletion region should exhibit two features: (1) log-ratio is equal to log(1/2) = -0.693147 (as versus log(2/2) = 0 in the normal situation); (2) homozygosity indicator equal to 1 (as versus to a mixture of -1's and 1's). For a SNP, we then define a "one deletion" indicator variable whose value is 1 if -2 < log-ratio < -0.34657 (mid-point between -0.693147 and 0) and if its genotype is a homozygote and the value is -1 otherwise.
Figure 3 shows the cumulative plot for "one deletion" indicator variable, without or with detrending (by the linear trend in the normal sample). In both versions, the hemizygous deletion region can be seen clearly. Not only the cumulative plot detects the CNA region easily, but also it delineates the border of the deletion region accurately.
Cumulative plot of the hemizygous deletion indicator variable. Cumulative plot (top) and detrended cumulative plot (bottom) for the 9 Mb hemizygous deletion region on chromosome 13, using the "one deletion" indicator variable.
When deletion occurs in both chromosomes, called homozygous deletion, the copy number is equal to zero. For homozygous deletions, both A- and B-channel intensity (see Methods) is close to zero, and the log(r) is a large negative value. Because in the A- and B-channel plane (see Methods), these SNPs are near the origin, the angle θ can not be determined unambiguously. This leads to a broad distribution of θ values between 0 and 1, as can be seen from Figure 1 (top).
We define a "two deletions" indicator variable whose value is 1 if the log-ratio is < -2; and the value is -1 otherwise. Note that the genotype information is not used. Figure 4 shows the cumulative plot for the "two deletions" indicator variable for chromosome 13. One homozygous deletion region with ~1 Mb is clearly identified immediately adjacent to the 9 Mb hemizygous deletion region.
Cumulative plot of the homozygous deletion indicator variable. Cumulative plot (top) and detrended cumulative plot (bottom) for the 1 Mb homozygous deletion region on chromosome 13, using the "two deletions" indicator variable.
The 9 Mb deletion on chromosome 13 in our CLL sample, which was one of the known common deletions for this disease , represents an example of easy detection of CNA/CNV region, because the difference between the normal and cancer cell for both log-ratio and genotype sequence is already obvious from the raw data (Figure 1). The advantage of cumulative plot is perhaps its ability to detect CNA/CNV region of smaller sizes.
Figure 5 shows the example of chromosome 6 of our sample where there is no large-scaled CNA region. The log-ratio and genotype sequence look almost identical between the normal and the cancer cell. The cumulative plot for the "one deletion" indicator variable shows that there are +400 more SNPs in the cancer cell than in the normal cell to have the one deletion signal (the "two deletion" cumulative plot is not shown because the signal is mostly absent along the chromosome). However, these SNPs are distributed throughout the chromosome, instead of forming clusters, and we still do not have strong evidence that the cancer sample has more micro deletion regions as compared to the normal sample. In order to explore the possible existence of smaller CNA regions, we pick the longest ROH region (roughly 4 Mb) and view it with cumulative plots. Figure 6 (left) shows the un-detrended cumulative plot for the one-deletion indicator variable in this region. A clear hemizygous deletion region should show up as a jump in the cumulative plot. However, the tendency within this ROH region is downward instead of upward. In other words, although all genotypes in this region are homozygous, the log-ratio mostly fails the <-0.34657 criterion.
Log-ratio and genotype sequences for chromosome 6 in paired samples from a CLL patient. The log-ratio sequence (top), genotype θ sequence (bottom), and the detrended cumulative plot for the "one deletion" indicator variable for SNPs on chromosome 6. Black and blue color refer to the normal and cancer cell sample taken from the same cancer patient. The largest run-of-homozygosity region is marked by red vertical lines. The copy number of 2 level log(2/2) = 0 and the copy number of 1 level log(1/2) = -0.693147 are marked in the log-ratio plot.
Zoom in of smaller regions. Cumulative plots of "one deletion" indicator variable for the region marked in Figure 5 (left), and the sub-region marked by a horizontal bar on the left (right). Black and blue refer to the normal and the cancer sample.
The failure in detecting hemizygous deletion at the Mb scale does not necessarily prevent its possible existence at a smaller length scale. The right panel of Figure 6 shows a 200 kb sub-region (marked in Figure 6 (left)) that contains a 36 kb region with an upward trend in the cumulative plot. A zooming into any small region in a cumulative plot enables it to detect CNA/CNV regions with ever smaller sizes.
It was previously suggested that run of homozygosity can be a sequence feature that is associated with certain human diseases . We see here that ROH is only a partial indicator for a CNA/CNV region. The longest ROH on chromosome 6 in our sample only shows some weak evidence in a much narrower region for one-deletion CNA. Considering both ROH and log-ratio sequence is clearly better than considering ROH alone. Although ROH may still be biologically meaningful, as it could reflect a copy-neutral loss-of-heterozygosity event, one has to obtain extra evidence to exclude population genetics events such as inbreeding as the true cause.
The pairing of the normal and the cancer sample is not essential to our method. In Figures 3, 4, 6, the CNA regions can be identified by cancer sample (the blue curve) alone. However, the comparison with the normal sample provides supporting evidence that deletion only occurs in the cancer cell and not in the normal cell. When SNPs along a chromosome are not evenly distributed, it may not be appropriate to move one step per SNP in the cumulative plot. For example, if multiple SNPs are in strong linkage disequilibrium in a densely typed region, the indicator variable values are positively correlated, and a sequence of +1 values is partially a consequence of their correlation, not as a series of independent evidences for CNA/CNV. We can adjust for this correlation by calculating the probability ratio α (see Method) in favor for concordant genotypes between neighboring SNPs, as compared to the average. If α > 1, we discount a +1 (or -1) movement by dividing the α value. For the chromosome 13 data, a is in a very narrow range of (0.9921, 1.0002). Because the probability ratio in favor of concordant homozygotes is so close to 1, the adjusted cumulative plot is indistinguishable from the original cumulative plot.
So far the delineation of an upward trend in the cumulative plot is determined by visual inspection. Segmentation programs can be developed to carry out the delineation automatically. In particular, one may move along the cumulative plot, calculate the slope from the start point to the moving position, then from the moving position to the end point. The position that maximizes the difference of the two slopes is chosen, leading to the first segmentation. This segmentation can be carried out recursively similar to the method described in .
Finally, for case-control analysis using CNV, one deals with two groups of samples . In this situation, cumulative plot can be first applied to each individual person to identify the CNV/CNA region. Then, chromosomes can be partitioned into equal-sized windows and the frequency of CNV/CNA-containing window in the case group is compared to that in the control group for a statistical test.
We have shown here that cumulative plots of an indicator variable derived from the log-ratio and SNP genotype sequence can easily identify CNV or CNA regions. We illustrate the procedure for hemizygous deletion (copy number equal to 1) and homozygous deletion (copy number equal to 0) using samples taken from a chronic lymphocytic leukemia patient. Although CNV/CNA regions at the Mb scale can also be detected by viewing the raw data, cumulative plot is able to delineate the borders with higher degree of accuracy. Another advantage of cumulative plot is perhaps in detecting smaller CNV/CNA regions, such as those in the range of 10 kb–100 kb, as it is a scale-free approach that does not require a fixing of the window size. Cumulative plot is simple enough that no special-purpose program is needed for its use except a graphic routine: for example, all results shown here are obtained by the general statistical package R .
In a two-channel (two-color) SNP genotyping microarray, the A- and B- channel (A- and B-allele) intensity reading is recorded. These two intensities are normalized by reference intensity values which are obtained by averaging many normal samples. Each SNP can be represented by a point in the (x, y) plane where x, y are the normalized A- and B-channel intensity. The polar coordinate of the point is r = x 2 + y 2 MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacPC6xNi=xH8viVGI8Gi=hEeeu0xXdbba9frFj0xb9qqpG0dXdb9aspeI8k8fiI+fsY=rqGqVepae9pg0db9vqaiVgFr0xfr=xfr=xc9adbaqaaeGaciGaaiaabeqaaeqabiWaaaGcbaGaemOCaiNaeyypa0ZaaOaaaeaacqWG4baEdaahaaWcbeqaaiabikdaYaaakiabgUcaRiabdMha5naaCaaaleqabaGaeGOmaidaaaqabaaaaa@3476@ and θ = tan-1(y/x) . Log(r) is the "log ratio" value that provides a copy-number information, and θ provides a genotype information, where θ = 0, 1 correspond to two homozygotes, and θ = 0.5 corresponds to the heterozygote. Note: (1) r value depends on a group-averaged reference level, and this information is provided by the array-maker company. (2) Although r and θ is in principle independent, there could be weak correlation between them. Our starting point are the two sequences of log(r) and discretized θ values (i.e. genotype) along a chromosome.
To highlight the difference between the cancer cell and the normal cell, we use the a and b obtained from the normal cell to detrend the cumulative plot for the cancer cell.
When SNPs are not distributed evenly along a chromosome, one may consider correcting the effect of inhomogeneous correlation between neighboring SNPs. We first calculate the probability of a neighboring SNP of a homozygous SNP to be also homozygous due to the correlation between them. This calculation is carried out by the Haldane's map .
The unit of M is Morgan, which is roughly equal to 100 Mb (or 1 centi Morgan is equal to 1 Mb ). The probability of observing a non-recombinant is 1 - R.
Denote p same the probability that one homozygous SNP is followed by another homozygous SNP that is M genetic distance apart. Since Haldane formula is applicable to haplotype, or a single copy of a chromosome, for two copies of a chromosome, p same = (1 - R)2 ≈ 1 - 2R = e-2M.
We assume that p same is calculated in the same way as for other indicator variables, meaning CNV/CNA of a particular type is maintained at the neighboring SNP by the same probability e-2M, and the above formula can be used to correct other cumulative plots. Note that transition probability from one genotype in a SNP to another genotype in the neighboring SNP can also be estimated from the HapMap data.
We thank Nick Chiorazzi for providing the CLL sample, and Pedro Bernaola-Galván, José Oliver for discussions on segmentation methods.
W.L. designed the method, carried out the analysis, and wrote the manuscript; A.L. genotyped the samples; P.K.G. proposed the CNV study of chronic lymphocytic leukemia.


In the modern table tennis, the passive block technique is no longer exist. The player is asked to add more power in the stroke, for both forehand block or backhand block technique. That's why today, we will learn the "active backhand block" technique of Ma Long. Blocking is very underrated skills that not many players focus on. But it the big mistake (especially for young players). Blocking is the very important techniques to gain control and the pace in table tennis. Pace variation is fundamental in table tennis tactics.
You can learn the backhand topspin of Ma Long.
The principle of the block technique is "control the direction of the ball". To do that, you need firstly to absorb the power of the incoming ball.
The Chinese coach normally says "Bend your body, use the abdomen to absorb the power".
Fold your abdomen. Use it to absorb the power of the incoming ball. This is the only way to block the powerful ball from the opponent. Some amateur players are too tense. They can block the ball consistently. Relax is the key to control.
Always contact the ball in front of your body. If you block the ball at the side, you can't use the abdomen to absorb the power. Backhand block in front of the body also helps you easily to drive, to block in a good direction.
When you can control and absorb the powerful shots, you can change the direction of the ball. One of the best drills to improve your backhand block (or forehand block technique) is: Let your partner attack (forehand loop) to your left side. You stay there, block and control the ball. Block one ball to their wide forehand side. Block the next ball to the middle. And block the ball to the wide forehand side. Repeat it: Forehand, Middle, Forehand. Your partner will practice the footwork and the forehand topspin technique. You learn the blocking technique.
In general, Chinese coach doesn't recommend learning the forehand block. Why?
Because if the ball comes to your forehand side, why you block it? Just attack! Powerful topspin attack! Don't just block the ball on the forehand side.
On the backhand side, if you don't have enough power or enough time to prepare for the backhand topspin, you can just block the ball. It's better for you to learn the block technique on your backhand side.
Note: Backhand block technique is better than forehand block.
Some new players have the problem with the blocking skills. They can't block consistently. To improve the consistency, you need to focus on your stance and your timing.
Stand close to the table.
racket higher than the elbow.
Bend your body and weight leaning forward.
early timing, before 'peak' (the highest bouncing position (Position 3)). You should contact the ball at the position 2 to 2.5.
Close your racket, the angle varying depending on the opponent's spin.
some new players just block the ball too late (especially with the forehand block). So if they block too hard the ball will go outside of the table. But if they block too soft, the ball will go to the net. The best way to correct this fault is: block sooner.
You should read more about the backhand techniques.