Wednesday, March 11, 2020

Google Maps gets Lens integration

Google added a Lens Menu to its Map app. This feature would allow users to analyze a physical restaurant menu and flag popular dishes. Most of us find pictures of menus uploaded on the listing of a restaurant in Google Maps. However, these menus are difficult to comprehend. But now, as spotted...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Saima Salim via Digital Information World

PHP Magic Methods Cheatsheet

In this post, I'll give you a cheetsheet quick reference to all the magic methods available in PHP. 

Whether you are a seasoned PHP developer or a novice in PHP development, if you’ve worked with OOP in PHP, then you’re using at least a couple of PHP magic methods already. However, if you have not heard of PHP magic methods yet, let me introduce them:

The function names __construct(), __destruct(), __call(), __callStatic(), __get(), __set(), __isset(), __unset(), __sleep(), __wakeup(), __toString(), __invoke(), __set_state(), __clone() and __debugInfo() are magical in PHP classes. You cannot have functions with these names in any of your classes unless you want the magic functionality associated with them. All magic methods MUST be declared as public.

If you’re wondering why these methods are called magic methods, it’s because of the fact that if you define one of these methods in your class, it’ll be called automatically and you are just supposed to define what should happen within it. The best example of the magic method is the __construct() function which is called automatically when the object is instantiated.

In general, magic methods in PHP allow you to perform various kinds of operations with objects. It also allows you to handle certain kinds of situations by manipulating objects.

PHP Magic Methods

The aim of this article is to go through all the magic methods in PHP and explain them each briefly.

The __contruct() Method

If you define this method in your class, it’ll be called automatically when an object is instantiated. The purpose of this method is to assign some default values to object properties. This method is also called a constructor.

Let’s have a look at a quick example to understand how it works:

In the above example, when you instantiate a new object by with new student('John','john@tutsplus.com'), it calls the __construct() method in the first place. In the __construct() method, we’ve assigned values passed in the arguments to the object properties.

The __destruct() Method

The __destruct() method is called a destructor and it’s called when the object is destroyed. Generally, it’s also called when the script is stopped or exited. The purpose of this method is to provide an opportunity to save the object state or any other cleanups you would want to perform.

Let’s have a look at the following example:

The __set() Method

The __set() magic method is called when you try to set data to inaccessible or non-existing object properties. The purpose of this method is to set extra object data for which you haven’t defined object properties explicitly.

Let’s get back to our example to understand how it works.

As you can see in the above example, we’re trying to set the phone property which is non-existent. And thus, the __set() method is called. The first argument of the __set() method is the name of the property which is being accessed and the second argument is the value we’re trying to set.

The __get() Method

In the case of the __set() method example in the previous section, we discussed how to set values for non-existent properties. The __get() method is exactly the opposite of it. The __get() magic method is called when you try to read data from inaccessible or non-existing object properties. The purpose of this method is to provide values to such properties.

Let’s see how it works in action.

The __toString() Method

The __toString() magic method allows you to define what you would like to display when an object of the class is treated like a string. If you use echo or print on your object, and you haven’t defined the __toString() method, it’ll give an error.

Let’s try to understand it with the following example.

In the above example, when you echo the $objStudent object, it’ll call the __toString() method. And in that method, you can decide what you would like to display. If you hadn’t defined the __toString() method, this would have resulted in an error!

The __call() and __callStatic() Methods

If __get() and __set() methods are called when you’re dealing with non-existent properties, the __call() method is called when you’re trying to invoke inaccessible methods, the methods that you haven’t defined in your class.

As you can see, we’ve called the method getStudentDetails which is not defined, and thus the __call() magic method is called. The first argument is the name of the method being called and the second argument is an array of arguments that were passed in that method.

The __callStatic() method is very similar to the __call() method with the only exception is that it’s called when you’re trying to invoke inaccessible methods in a static context. So if you’re trying to access any static method which is not defined, the __callStatic() function will be called.

The __isset() and __unset() Methods

The __isset() magic method is called when you call the isset() method on inaccessible or non-existing object properties. Let’s see how it works through an example.

In the above example, the phone property is not defined in the class, and thus it’ll call the __isset() method.

On the other hand, the __unset() is a method called when you call the unset() method on inaccessible or non-existing object properties.

The __sleep() and __wakeup() Methods

The __sleep() magic method is different compared to methods that we’ve discussed so far. It’s called when you call the serialize() function on the object. In case of a very large object, you only want to save selected properties during serialization, and clean up the object. The __sleep() method must return an array with the names of all properties of the object that should be serialized.

Again, let’s revise our example to see how it works.

In the above example, when you serialize() the Student object, it’ll call the __sleep() method and it’ll only preserve the values of name, email and phone variables.

On the other hand, the use of the __wakeup() magic method is to reestablish any connections and start up tasks when the unserialize() function is called on the object.

The __invoke() Method

The __invoke() magic method is a special method which is called when you try to call an object as if it was a function. Firstly, let’s see how it works and then we’ll see the purpose of this magic method.

As you can see, the $objStudent object is treated as if it was a function, and as we’ve defined the __invoke() method, it’ll be called instead of giving you an error. The main purpose of the __invoke() method is that if you want to treat your objects as callable, you can implement this method.

The __clone() Method

If you want to duplicate an existing object, you could use the clone keyword to do that. But after cloning, if you want to modify properties of the cloned object, you can define the __clone() magic method in your class.

The issue with the above approach is that it makes a shallow copy of the object while cloning, and thus internal objects of the cloned object will not be cloned.

In the context of the above example, if you wouldn’t have defined the __clone() method, the cloned object, $objStudentTwo, would still point to the same Student_School object referenced by the $objStudentOne object. Thus, by implementing the __clone() method, we make sure that the Student_School object is cloned as well along with the main object.

The __debugInfo() Method

The __debugInfo() magic method is called when you try to dump any object by the var_dump() function. If you haven’t defined this method in your class, it’ll dump all public, private and protected properties. So if you want to restrict the information which is displayed while dumping, you can use this method.

This method should return an array of key, value pairs which will be displayed when the var_dump() function is called on the object. As you can see, you can completely control what you want to display when the object will be dumped with the var_dump() function.

The __set_state() Method

The __set_state() method is a static method which is used in conjunction with the var_export() function. The var_export() function outputs a structured information about a variable. When you use this function to export classes, you need to define the __set_state() method in your class.

As you can see, the exported string is a valid PHP code and you can use it to restore the original object.

Conclusion

In this article, we’ve gone through all the magic methods available in PHP. For every method, I provided a short but meaningful example which should help you to understand the purpose of it. And I hope you could use this article as a quick reference or a cheatsheet in your day-to-day PHP development.

The Best PHP Scripts on CodeCanyon

Explore thousands of the best and most useful PHP scripts ever created on CodeCanyon. With a low-cost one time payment, you can purchase these high-quality WordPress themes and improve your website experience for you and your visitors.

Here are a few of the best-selling and up-and-coming PHP scripts available on CodeCanyon for 2020.



by Sajal Soni via Envato Tuts+ Code

5 Best Free WordPress Hosting Providers for 2020

Are you looking for someone to host your WordPress website, but aren’t sure whether free or premium hosting is right for you?

If your website is going to be a success, then you need the right hosting provider—after all, there are countless companies who can help run your website, but a reliable, secure and scalable WordPress hosting provider can help improve your website.

In this article, we’ll be taking a look at 5 WordPress hosting providers that can help you create and host a successful WordPress website for free.

Fast and Easy WordPress Hosting With SiteGround 

And if you decide that you need performance and support for your WordPress site that isn't available for free, I'll also introduce you SiteGround, our recommendation for paid WordPress hosting.

Managed WordPress Hosting From SiteGround

Thanks to Envato's partnership with SiteGround, you can get up to 70% off managed WordPress hosting.

What Are the Benefits of Free WordPress Hosting?

There’s one major reason why so many people choose free WordPress hosting over premium hosting, and the clue’s in the name: free WordPress hosting is free.

Since you don’t have to pay any upfront costs, free WordPress hosting is ideal if you’re on a budget, or if you want to test drive a few ideas before committing to a paid hosting subscription. If you’re new to WordPress, then free hosting can also help you decide whether WordPress is right for you, by giving you some hands-on experience with the platform. 

Finally, if you don’t have any plans to monetize your website, then free hosting can be a way to indulge in your love of blogging, without having to pay for the privilege. 

The Drawbacks to Free WordPress Hosting

Every free WordPress hosting provider has their own unique strengths and weaknesses. However, if you opt for free WordPress hosting then you should expect to encounter some, or all of the following limitations.

Traffic, Storage and MySQL Restrictions

Free hosting providers often restrict their servers, which means your website may struggle to handle large volumes of traffic. Some hosting providers will also place restrictions on disk space, database size, and the total number of MySQL connections that you can operate at any one time.

These restrictions are often designed with upselling in mind, as many free hosting providers also offer unrestricted premium services. Over time, your website may outgrow its free hosting plan, at which point you’ll have no choice but to upgrade to a paid offering.

Tougher Terms and Conditions

Regardless of whether you opt for premium or free hosting, most providers have Terms and Conditions that specify how you can and can’t use their services. If you violate these terms, then your provider may suspend your account, or even delete your website and all of its content entirely. 

Most of the time these restrictions are understandable, for example the vast majority of free and premium WordPress providers won’t host a website that promotes illegal substances or activities. However, free hosting providers tend to be pickier about the type of content they allow, and may sometimes take issue with content that doesn’t strike you as particularly controversial, for example banning websites that promote any kind of competition or contest.

To avoid losing access to your WordPress website and potentially all of your content and data, it’s vital that you review your provider’s Terms and Conditions carefully.

Upselling Emails and Third-Party Spam

Free hosting providers need to earn a living too, and one popular method is encouraging users to upgrade to a premium package.

While the occasional marketing email is a small price to pay for free WordPress hosting, some companies take things too far, and you may find yourself receiving regular unsolicited emails. These emails can range from blatant adverts for premium products and services, to more subtle upselling initiatives, for example emails encouraging you to check out the provider’s latest blog post, download their new ebook or sign up for their free webinar. 

You should also be aware that if you’re not paying for a product, then you are the product, so there’s a chance your provider may sell your information to a third party. If you opt for a reputable WordPress provider then in theory you shouldn’t receive any third party spam, but it’s important to note that gathering and selling data is a popular way for companies to monetize their free products and services.

You’re Not a Paying Customer

When it comes to WordPress hosting, free doesn’t necessarily mean bad.

All the companies mentioned in this article have great community feedback, and provide all the features you need to create and maintain a successful WordPress website. 

Many free hosting providers also offer premium plans, so their business model relies on free users upgrading to one of their premium hosting packages, so they have an incentive to keep their free users happy. 

However, despite all these points you’re never going to have the same leverage as a paying customer. If your requirements aren’t being met or you’re unhappy with the service, then you can file a support ticket, make a complaint or leave the provider a negative review, but you can't threaten the one thing that all companies fear the most: that a paying customer will take their business elsewhere. 

Free WordPress Hosting: 5 Options Compared

Despite the potential drawbacks, free WordPress hosting is one of the quickest and easiest ways to create a WordPress website. 

To help get your website off to the best possible start, let’s take an in-depth look at 5 places where you can host your WordPress website, for free.

  1. WordPress.com

Let’s get the obvious out of the way first: WordPress.com is a free hosting service created by the co-founder of WordPress. 

Rather than splashing out on your own hosting solution, you can head over to WordPress.com, click Get started, complete a few forms, and your website will be ready to go.

When you create a WordPress website you can opt for WordPresscom or WordPressorg

WordPress.com is a quick, easy and convenient solution that offers robust security and reliable performance, regardless of how many people visit your website. If you use WordPress.com as your provider, then you also won’t have to worry about manually installing any updates or creating backups, as all of this is managed automatically. 

Before you jump in, there are some restrictions you need to be aware of: 

  • You cannot sell advertising space on your website... This severely limits your options when it comes to generating revenue, especially since you can’t monetize your website by adding membership functionality, or eCommerce features
  • ...but WordPress can! WordPress has the right to place adverts on your website. You have no control over which adverts WordPress chooses to display, and you won’t receive any of the revenue generated by these ads. 
  • You can’t upload plugins. The huge community of third party plugins is one of WordPress’ biggest strengths, allowing you to add all sorts of powerful, innovative and niche features to your website. If you opt for WordPress.com, then you won’t be able to use any of these plugins, unless you purchase an additional plan or shell out for the WordPress.com VIP program.
  • Limited storage space. A free account comes with 3GB of storage, but you’ll need to upgrade to a paid plan if you require more than 3GB. 
  • You can only use the provided themes. WordPress.com doesn’t support custom themes, so you’ll be limited to WordPress’ collection of free themes.
When you opt for WordPresscom youre restricted to their free themes colletion
  • A lack of support for third party tracking platforms. WordPress has a built-in Stats page that displays some basic information, such as the total number of people who’ve visited your site. However, WordPress.com doesn’t support third party tracking tools, so you can’t get a deeper insight by installing tools such as Google Analytics.
  • You cannot remove the WordPress disclaimer. By default, your website will feature a Powered By WordPress message in its footer. Although you can remove this disclaimer on WordPress.org, it’s a permanent fixture on WordPress.com. 
All WordPresscom websites feature the Powered by WordPress disclaimer in their footer
  • You can only use a WordPress-branded domain. When you create your website using WordPress, its URL must contain WordPress.com, for example mywebsite.wordpress.com. Unless you purchase a custom domain name, you’re stuck with this WordPress branding! 

2. 000Webhost: 99% Uptime and 300MB of Disk Space

Compared to many other free hosting services, 000WebHost has very few limitations and offers an impressive set of features. 

For the grand total of $0, you’ll get access to a website builder, a one-click WordPress installer, 300MB of disk space, and free domain hosting that supports the latest versions of PHP and MySQL. According to the 000WebHost website, they also have proven 99% uptime and a dedicated admin team who’ll be on-hand to ensure your website is running smoothly. 

However, there are some restrictions. To make it more difficult for spammers to abuse the platform, 000Webhost limits the number of concurrent MySQL connections to 30 connections per database. Your database is also limited to 1GB, and a maximum of 100 tables. 

For most WordPress users, these limitations shouldn’t be an issue, however if you use a large number of plugins then there’s a chance your web pages will be slow to load, or they may even throw a 502 Bad Gateway error. 

The following plugins are also known to cause Error 500:

  • W3 Total Cache
  • WP Speed of Light
  • WP Fastest Cache
  • WP Performance Score Booster

3. ByetHost's Clustered Hosting Network

ByetHost provides free and premium hosting to over 1,000,000 websites. 

ByetHost features a Softaculous auto-installer and a custom VistaPanel control panel

If you opt for ByetHost’s free services, then you’ll get 5GB of disk space, an FTP account and File Manager, unlimited Addon domains, parked domains and subdomains, plus automatic HTTPS SSL.

You’ll also get access to ByetHost’s own VistaPanel control panel, and the Softaculous application, which can install over 333 scripts, including PHPbb3, Zen-Cart, osCommerce, MyBB, MyLittle Forum, 4images, Coppermine, SMF, and Joomla. To boost performance, ByetHost spreads your website’s traffic across multiple servers simultaneously, by maintaining their own clustered hosting network.

However, ByetHost only provides self-signed SSL certificates, so anyone who visits your website will receive a security warning unless they explicitly trust your site. With security a major concern for many Internet users, this warning can have a negative impact on how many people actually click through to your website. 

4. AwardSpace: Access to Custom "Zacky" Tools

AwardSpace has a number of pricing plans, but they also offer free WordPress hosting.

AwardSpace makes it easy to create a WordPress website

If you opt for their free plan, then you’ll get access to:

  • One free domain. You can choose from a free dx.am domain plus a long list of free subdomains, although if you want a .com domain then you’ll need to upgrade to one of AwardSpace’s premium hosting plans.
  • up to three subdomains
  • 5GB of bandwidth 
  • 1GB of disk space
  • access to the same high-speed network as AwardSpace’s paying clients
  • MySQL database support
  • a one-click Zacky Installer
  • AwardSpace’s Zacky Website Builder, which lets you build a website with no coding 
  • access to AwardSpace’s custom hosting control panel
AwardSpaces control panel displays information about your websites incoming traffic
  • web-based File Manager for easier uploads
  • protection against hackers, spammers and other digital threats, with a built-in firewall and ClamAV anti-virus software
  • No ads. In the Terms and Conditions, AwardSpace explicitly states that they will never force you to place ads on your website. 
  • 24/7 customer support

As always, there are some drawbacks: 

  • There’s no guarantee that you’ll be able to renew your domain successfully, even if you pay for AwardSpace’s domain renewal service. 
  • For security reasons, all outgoing connections are disabled.
  • You’re responsible for backing up your own data.
  • There’s a maximum upload file limit of 15MB, and some file types are unsupported, including MP3, .exe, Torrent, ZIP, .gz and .tgz.  
  • If your website doesn’t receive any traffic for 12 months, then your account will be marked as inactive and may be deleted. 
  • You’re limited to a single MySQL Database with a maximum 30MB of space. You’re also restricted to 12,000 MySQl queries per hour, and a maximum of 30 concurrent connections. 

5. WPNode: DDoS and CloudFlare protection

WPNode offers free domain and subdomain hosting with no ads, 1GB of SSD storage, and unlimited data transfer.

To protect your website against Denial-of-service (DDoS) attacks, WPNode uses CloudFlare and hides your wp-config.php file, so your information isn’t easily accessible to hackers. If you choose WPNode as your hosting provider, then your website will also be protected by a built-in firewall, malware detection, patch management, and reputation management.

WPNode offers 24/7 support to all their customers, and their website makes the impressive claim that if you contact them via their support ticketing system then you can expect a response within minutes.

Onto the negatives, and the WPNode staff manually verify each and every signup, which can take up to 10 hours, so you may not be able to start using your WordPress website straight away. 

When you create a new website the WPNode staff will need to manually approve your site which can lead to delays

WPNode will backup your content, but only once per week. To make sure that you never lose an entire week’s worth of content and data, it’s recommended that you perform your own manual backups, in addition to WPNode’s scheduled backups. 

Removing Restrictions, With Premium WordPress Hosting

As we’ve seen in this article, all free hosting providers have their own unique strengths and weaknesses.

If you know exactly what you want from a hosting provider, then you should be able to find a free provider who meets most (if not all) of your requirements. However, if you’re creating a website for your business, have plans to monetize your content, or have long-term plans to grow your website, then it makes more sense to invest in premium WordPress hosting. 

Premium hosting providers don’t typically place any major restrictions on traffic and storage, and give you more options for monetizing your content.

Interested in premium WordPress hosting? SiteGround provides premium hosting to over 2,000,000 domains, including a managed WordPress hosting service that’s officially recommended by WordPress.org. Best of all, our partnership with SiteGround means that you can get reliable, easy to use WordPress hosting for up to 70% off!

Managed WordPress Hosting From SiteGround

Some of SiteGround’s notable features include:

Automated WordPress Installation

Why go to the effort of downloading, installing and configuring WordPress manually, when you can take advantage of SiteGround’s click-and-install solution? SiteGround’s WordPress Starter tool provides easy access to a portfolio of professional website designs and key functionalities that you can add to your site, including online stores and contact forms.  

SiteGround lets you create a WordPress website in just a few clicks

SiteGround Migrator Plugin

If you have an existing website, then you can securely migrate all of your content to SiteGround while keeping your configuration intact.

Protection Against Security Vulnerabilities and Exploits

SiteGround manages the overall security of your application at the server and firewall level, and they’re continuously adding rules that can help protect your website against new and emerging threats.

A Faster, More Reliable Website

SiteGround is hosted on the powerful Google Cloud platform. In addition, SiteGround uses NGINX Direct Delivery, the SuperCacher service, Memcached, and the CloudFlare Content Delivery Network (CDN) to improve your website’s loading speeds.

SiteGround comes with the SuperCacher service built-in

Automatic Updates

SiteGround can update all of your plugins and your WordPress software automatically, so you’ll always have access to the latest bug fixes, patches and features.

Want to learn more? Explore SiteGround’s various WordPress hosting solutions!

Conclusion 

In this article, we explored some of the most popular free WordPress hosting services that you can start using today. 

Free WordPress hosting can be a quick, convenient and affordable option for many websites, but there are some scenarios where free hosting may not be the best fit. To help you decide whether this kind of hosting is right for you, we also covered some of the most common drawbacks associated with free hosting, and introduced a premium alternative that you may want to try.

Do you have any more recommendations for free WordPress hosting? If your favourite provider didn’t feature in this article, then be sure to leave your recommendations in the comments below!


by Jessica Thornsby via Envato Tuts+ Code

Android lose more value than iPhone - What to buy now?

People used to prefer Android devices and Premium Android phones over iPhones and iPads but they cannot do this anymore because Android is depreciating double the value of iPhone for the last few years that made them perplex what to buy. According to the reports and data of BankMyCell, Android...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by aqsqa qadir via Digital Information World

Website Inspiration: Luca Pederzini

Clean long-scrolling One Page portfolio for Italian architect Luca Pederzini.

Full Review


by Rob Hope @robhope via One Page Love

10 Git Techniques You Need to Know Before You Join a Team

Have you been using Git for some time but never in a team environment? Are you familiar with the basics of Git but unsure how large teams use Git at work?

In this post, I’ll talk about the basic Git techniques that you must be familiar with before you join a team. I’ve listed them in an order that you’d logically follow to contribute to a repository, as the importance of each step is paramount. Let’s now jump into the list.

1. Cloning: Getting Started in a Team

If you’ve used Git for personal projects, you may only have initialized a project from scratch and added to it over time. When you’re working on an existing codebase, the first step is to clone the codebase into your local system. This enables you to work on your copy of the repository without any interference from other changes.

To clone a repository, run the git clone command, followed by the path to the repository:

git clone /path/to/repo

If your source doesn’t reside in the same system, you can SSH to a remote system and clone too:

git clone username@remote_system_ip:/path/to/repo/on/remote

If you’re cloning from a source on the Internet, you can simply add the URL:

git clone https://github.com/sdaityari/my_git_project.git

Whenever you’re cloning a repository, you’ve the choice of multiple protocols to connect to the source. In the GitHub example above, I’ve used the https protocol.

2. Managing Remotes in Git

Once you’ve cloned your repository, it still maintains a pointer to the source. This pointer is an example of a remote in Git. A remote is a pointer to another copy of the same repository. When you clone a repository, a pointer origin is automatically created which points to the source.

You can check a list of remotes in a repository by running the following command:

git remove -v

To add a remote, you can use the git remote add command:

git remote add remote_name remote_address

You can remove a remote using the git remote remove command:

git remote remove remote_name

If you’d like to change the address of a remote, you can use the set-url command:

git remote set-url remote_name new_remote_address

3. Branching in Git

The biggest advantage of Git over other version control systems is the power of its branches. Before I jump into the essentials of branching, you may be wondering what a branch is. A branch is a pointer to a commit in your repository, which in turn points to its predecessor. Therefore, a branch represents a list of commits in chronological order. When you create a branch, you effectively create only a new pointer to a commit. However, in essence, it represents a new, independent path of development.

If you’ve been working on your own project, you may never have consciously used branches. By default, Git uses the master branch for development. Any new commits are added to this branch.

Branching is necessary for Git to bifurcate lines of work in a project. At a single time, there may be many developers who are working on a variety of different problems. Ideally, these problems are worked on in different branches to ensure logical separation of new code until code review and merge.

To check a list of branches and the current active branch, run the following command:

git branch

To create a new branch, run the following command:

git branch new_branch

Even though Git creates a new branch, notice that your active branch is still the old one. To start development in a new branch, run the following:

git checkout new_branch

To create a new branch and change the active branch, run the following command:

git checkout -b new_branch

To rename the current branch, run the following command:

git branch -m new_renamed_branch

Use the -D option to remove a branch:

git branch -D new_renamed_branch

Here’s a detailed guide on branching in Git.

4. Update your Local Repository: Merging

While we’ve checked the basics of branching in Git, the next logical step is to merge a branch into your base branch when you’ve finished working on a problem. To merge a branch, run the following command:

git checkout base_branch
git merge new_branch

While it may sound like an easy process, merging is potentially the most time-consuming process in Git, as it can give rise to conflicts.

5. Handle Conflicts

Imagine that you’re working on a file in a new branch. After you commit the changes, you request Git to merge your new branch with your base branch. However, the same part of the same file in the base branch has been updated since you created the new branch. How does Git decide which changes to keep and which changes to discard?

Git always tries to not lose any data in the process of a merge. If the changes to the same file were done in different parts of the file, you could get away by keeping both sets of changes. However, if Git is unable to decide which changes to keep, it raises a conflict.

When a conflict has been raised, running git status on your repository shows a list of files that were modified in both branches being merged. If you open any file with a conflict, you’d notice the following set of lines:

<<<<<<<< HEAD
...
...
========
...
...
>>>>>>>> new_branch

The part of the file between <<<<<<<< HEAD and ======== contains that code which is present in the base branch. The lines of code between ======== and >>>>>>>> new_branch are present in the new_branch branch. The developer who’s merging the code has the responsibility to decide what part of the code (or a mix of both parts) should be included in the merge. Once edited, remove the three sets of lines shown, save the file, and commit the changes.

The post 10 Git Techniques You Need to Know Before You Join a Team appeared first on SitePoint.


by Shaumik Daityari via SitePoint

The performance benefits of variable fonts

#431 — March 11, 2020

Read on the Web

Frontend Focus

The Performance Benefits of Variable Fonts — This is a good look at the performance gains you can expect when using variable fonts, with a focus on font requests, file sizes and time to first render. If you’re just starting to explore using variable fonts, this is a great related resource.

Mandy Michael

Setting Height And Width On Images Is Important Again — Thanks to some recent changes in browsers, it’s now well worth setting width and height attributes on your images to prevent layout shifts and improve the experience of your site visitors.

Barry Pollard

AWS Webinar: How to Scale Kubernetes in AWS — Operating a Kubernetes environment at scale requires monitoring for performance and health. Join this webinar to discover how to proactively approach monitoring of your Kubernetes environments—at any scale and any level of complexity.

Amazon Web Services (AWS) sponsor

Many Podcast Episodes Won’t Play in Web Browsers Later This Year — An estimated 1 million+ podcast episodes aren’t available over secure connections, and it’s about to become a problem.

Dan Misener

The History of the URL — This is a great deep-dive into the anatomy of the humble URL and how it came into being.

Zack Bloom (Cloudflare)

Firefox 74.0 Released — Version 74 of Firefox arrived today. We’ve linked to the developer release notes as the headline features are minimal. Developer level changes include Feature Policy support enabled by default, TLS 1.0 and 1.1 support removed, text-underline-position CSS property now enabled, and JavaScript gains the optional chaining operator.

Mozilla

More Accessible Defaults, Please — Due to the complex nature of web apps, it’s no longer correct to say the web is ‘accessible by default’. As Hidde points out, we need browser accessibility bugs to be prioritized.

Hidde de Vries

💻 Jobs

UX/Frontend Engineer @ Siteline — Join the founding engineering team at Siteline and help us revolutionize the payments process for construction.

Siteline

React JS Developer (Remote) — 9+ million people plan outdoor adventures with our apps every day. If you are smart and ambitious, join us to inspire people to explore more of the great outdoors.

Komoot

Find a Dev Job Through Vettery — Vettery is completely free for job seekers. Make a profile, name your salary, and connect with hiring managers from top employers.

Vettery

ℹ️ If you're interested in running a job listing in Frontend Focus, there's more info here.

📙 News, Tutorials & Opinion

How We Created a Static Site That Generates Tartan Patterns in SVG — There are thousands of Tartan patterns (the cloth that’s typically associated with Scotland) - here’s a look at how they were all digitally weaved with code (React).

Paulina Hetman

Scroll Snapping After Layout Changes — Starting in Chrome 81, scrollers remain snapped when the page layout changes, no longer requiring event listeners to force snapping, which fixes a shortcoming of this feature.

Yi Gu, Kaan Alsan, Adam Argyle

Can We Make Open Source More Sustainable? — TJ VanToll on the problematic economic model of OSS and a few options to make it more sustainable. Share your thoughts.

Progress KendoReact sponsor

Adding Scroll Animations to Your Page — This detailed tutorial was first published last year but has recently been updated to include IntersectionObserver methods.

CSS Animation

Intersection Observer API Makes Lazy Loading a Snap — Related to the above item, here's a decent overview of IntersectionObserver, using the example of lazy loading elements.

Leonardo Maldonado

How to Build a File Upload Form with Express and DropzoneJS — Lukas White takes an in-depth look at DropzoneJS — a configurable JavaScript library that makes it easier to deal with file uploads.

Lukas White

▶  Building an Animated Counter with JavaScript — JavaScript has just gotten so serious nowadays, so I like to frequently link to tutorials like this that cover building neat Web page effects.. like we used JavaScript for back in the 90s 😄 18 minutes.

Traversy Media

Why Svelte Is Our Choice for A Large Web Project in 2020

Ryan Atkinson

31 Days of #MarchMediaMadness. New Cloudinary Challenges, Win Daily

Cloudinary sponsor

Announcing Mobile First Indexing for The Whole Web

Google

An Explainer for The Proposed 'IsLoggedIn' API

Theresa O'Connor

Modal vs Page: A Decision Making Framework

Ryan Neufeld

🔧 Code, Tools and Resources

OpenSilver: A Modern, Plugin-Free Reimplementation of Silverlight — This is a replacement for Microsoft’s deprecated Silverlight. It’s open-source and runs in current browsers via WebAssembly. Here’s the announcement post.

Userware

Bootstrap Treeview: A Simple Plugin to Build A Treeview with Bootstrap 4 — Here’s a live demo.

Sami Chniter

ls-lint: A Fast File and Directory Name Linter — Written in Go but clearly aimed at JS/front-end dev use cases. ls-lint provides a way to enforce rules for file naming and directory structures.

Lucas Löffel

geo-info: A Reverse Geocoding API — Used to to turn coordinates into human readable locations.

geo-info

A List of Browser-Based SVG Editors

Chris Coyier

   ðŸ—“ Upcoming Events

PerfMatters, March 31 - April 1 — Redwood City, USA — A web performance conference with a focus on frontend web performance with talks by internationally renowned performance developers.

FrontCon, April 1-3 — Riga, Latvia — A two-day conference that focuses on front-end concepts and technologies. This event is still going ahead at time of writing but updated safety measures have been shared.

ImageCon, April 22-23 — San Francisco, USAThis event has been postponed due to the Coronavirus outbreak.

Frontend United, April 30 - May 2 — Minsk, Belarus — Three days of sessions, workshops and socials for frontend devs and designers.

You Gotta Love Frontend Conference, May 14-15 — Vilnius, Lithuania — Described as having "big names with irresistible talks and a whole lot of fun".


by via Frontend Focus