teleren/devto huggingface dataset:
AZURE APP SERVICE
Tags: azure, deploymentcenter, networking, appservice
Published: 2022-05-16 08:14:34

MY AZURE BLOG

What is Microsoft Azure: Azure is a public cloud computing platform that offers services such as analytics, virtual computing, storage, networking, and more. It can enhance or replace your on-premise servers.
Microsoft Azure is Flexible (you can move to compute resources up and down as needed), Open (Supports almost any OS, language, tool, or framework), Reliable (99.95% availability SLA and 24×7 tech support), Global (Data housed in geosynchronous data centers), and Economical (you Only pay for what you use)
In this article, we will be creating an app service on Microsoft azure. Azure App Service is a one-of-a kind cloud service that allows you to rapidly and easily build enterprise-ready web and mobile apps for any platform or device, then deploy them on a scalable and reliable cloud infrastructure.
Azure App Service is a web application, REST API, and mobile back end hosting service that runs on HTTP. You can code in any language you like, including.NET,.NET Core, Java, Ruby, Node.js, PHP, or Python. Both Windows and Linux-based systems make it easy to run and scale applications.
App Service not only adds the security, load balancing, autoscaling, and automated management features of Microsoft Azure to your application. It also has DevOps features including continuous deployment via Azure DevOps, GitHub, Docker Hub, and other sources, package management, staging environments, custom domains, and TLS/SSL certificates.

1.	Create an Azure account (Microsoft.azure.com)
2.	Sign in to your Microsoft Azure account (portal.azure.com)
3.	On your Microsoft Azure home tab, click on App Services

**Creating a New App Service Plan**
4.	Then click on create (+Create) on the top option bars
5.	Specify your choice of subscription
6.	Click on Create a new resource group


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rj4qqsbgxm2udnqu12ja.png)
 


7.	In the name section under the Instance Details, add a   unique name.
8. In the publish section, select code if you will be publishing a code(code can be published using Visual studio), Docker container (packaged Softwares that have everything the software needs to run including libraries, system tools, code, and runtime), or Static web app(you can build a static web app on azure using Quickstart).
8.	Select your runtime stack in the runtime stack drop-down list. A runtime stack simply means the programming language used in building your app.
9.	Select your operating system, either Windows or Linux
10.	Select a region that best suits your app service plan
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wt7ik4ftotnpthb1zf1a.png)
 

11.     Click on review and create, review your actions and create if all is set up.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqfnmx0vrofi2eoytm69.png)
Hurray!! your App Service is all set up.

In my next blog, I will be sharing insights on how to build a static web app on Azure. I hope you are just as excited as I am.
Full Screen Background Image With HTML & CSS | Responsive Full Page Background Image Using CSS 🤯
Tags: webdev, css, html, javascript
Published: 2022-05-16 08:14:22

{% embed https://youtu.be/_WarmeM2q-0 %}

In my latest **[Youtube Video](https://youtu.be/_WarmeM2q-0)**, I'm showing you how to create a **Full Screen Responsive Background Image** using just **HTML & CSS** 🤯

Make sure to watch the **[Youtube Video](https://youtu.be/_WarmeM2q-0)** and also make sure to **Like** the **[Youtube Video](https://youtu.be/_WarmeM2q-0)** & **Subscribe** to my **[Youtube Channel](https://www.youtube.com/channel/UCIb8_J9lqtiWGMIOdQ5DVsg)** for more **Amazing** content related to **Web Development** and **Self Taught Developer** Journey 🙌

---

Please do me a favour by **Reacting** to this post with 
❤️ + 🦄 and also bookmark 🔖 it for your future reference ✅

---

**Connect/Follow** me on Social platforms like Twitter, Linkedin where I regularly post Tips💡+ Guides📜 + Resources 🌟 related to Web Development and Programming 👨‍💻


![RammCodes Social Follow Request Banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8a5vzbe9atsgmoll0oih.png)

### 🐦 **[My Twitter](https://twitter.com/rammcodes)**
### 👨‍💼 **[My Linkedin](https://www.linkedin.com/in/rammcodes/)**
### 🌐 **[My Website](https://rammaheshwari.com)**

---

Press the **Follow** button to stay updated with my content 🚀

Thanks for your **Support** ❤️
CSS Combinators Explained.
Tags: css, webdev, html, web
Published: 2022-05-16 08:07:54

When selecting HTML elements, sometimes it can be a little tricky to figure out which element you've selected. In this article, we'll provide an explanation of CSS combinators, making them easier to understand. Yeah, you've heard it, explained in an easy way.

**CSS Combinators** explains the relationship between CSS selectors, well I think you know what selectors are, if not consider reading this [article](https://www.w3schools.com/cssref/css_selectors.asp).  As the name says they combine different CSS selectors to provide useful relationships with each other.

Well, let's not take too long. 


HTML code.
```
<div class="box">
     <p>Text in box</p>
      <section>
          <p>Text in box inside section</p>
    </section>
</div>
<div>
  <h1>Heading inside div.</h1>
  <p>Text in div not in box</p>
</div>
<p>Text 1 not both div and box</p>
<p>Text 2 not both div and box</p>
```

### 1. Descendant combinator 

The descendant selector matches all elements that are descendants (children, grandchildren, and so on) of a specified element. We use **space** between selectors.

The following example selects all `<p>` elements inside `<div>` elements: 
```
div p{
color: red;
}
```
Output:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qnqfarx0i5tlnxcktcgt.png)
 


### 2. Child combinator (>)
The child selector selects all elements that are direct descendants (children only) of a specified element. We use **greater-than sign** (>) between selectors.

The following example selects all `<p>` elements that are children of a `<div>` element:
```
div > p{
color: red;
}
```
Output:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/96b4lgbz51ecsgn1een3.png)
 

### 3. Adjacent sibling combinator (+)

The adjacent sibling selector is used to select an element that immediately follows another specific element. Sibling elements must have the same parent element. We use **plus sign** (+) between selectors.

The following example selects the first `<p>` element that are placed immediately after `<div>` elements:
```
div + p{
color: red;
}
```
Output:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/exttd44l0bgph717m42n.png)
 

### 4. General sibling combinator (~)

The general sibling selector selects all elements that are next siblings of a specified element.
We use **tilde sign** (~) between selectors.

The following example selects all <p> elements that are next siblings of <div> elements: 
```
div ~ p{
color: red;
}
```
Output:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo0y7dcj9h3qaxk7ovwe.png)
 

Let's connect:

[Twitter](https://twitter.com/felix__dusenge)
[GitHub](https://github.com/felixdusengimana)
How To Check if String Contains Specific Word in PHP Laravel
Tags: laravel, php, tutorial, beginners
Published: 2022-05-16 08:02:07

Originally posted @ https://codeanddeploy.com visit and download the sample code:
https://codeanddeploy.com/blog/laravel/how-to-check-if-string-contains-specific-word-in-php-laravel

In this post, I will share how to check if the string contains a specific word in Laravel. Sometimes we need to check the submitted string if exists a particular word/string on it and Laravel provides an easy way how to do it.

 

In PHP if we want to do it. We need to use the `strpos()` function if the specific string exists on a string. The function below is before the PHP 8 version.

```php
$a = 'This is laravel framework.';

if (strpos($a, 'laravel') !== false) {
    echo 'true';
}
```
But after the PHP 8 version, we can use `str_contains()` the function. See below on how to do it.

```php
if (str_contains('How are you', 'are')) { 
    echo 'true';
}
```
Okay. What if we want to use the Laravel helper. So here is an example of how to use it.

```php
use Illuminate\Support\Str;
   
$string = 'Laravel is the best PHP framework.';
     
if(Str::contains($string, 'framework')) {
   echo 'true';
}
```
For multiple words/strings, you can use an array for the second parameter as you can see below.

```php
use Illuminate\Support\Str;
   
$string = 'Laravel is the best PHP framework.';
     
if(Str::contains($string, ['framework', 'php'])) {
   echo 'true';
}
```

I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/laravel/how-to-check-if-string-contains-specific-word-in-php-laravel if you want to download this code.

Happy coding :)
Beginners guide to Azure App Service
Tags: azure, microservices, cloudskills
Published: 2022-05-16 08:00:14

This is a step by step guide on how you can set up your Microsoft Azure app service , developers will benefit greatly from Azure App Services

What is Microsoft Azure App Service?

Azure app services are quite strong and can get you up and running in a matter of minutes. They offer a slew of incredible features, including (auto)scaling, simple authentication, offline sync (for Mobile Apps), hybrid connections, and much more.

kindly follow through and let me know if you experience any challenge, let's dig in:

Okay, so the first step is to create a Microsoft account (if you don't already have one, you can use ANY name of your choice.

I already have one, so I'll skip that part, once you create your outlook account(Microsoft account), you can then proceed to:

portal.azure.com  this is basically where it all happens, log in with your existing outlook account and proceed

On the homepage, select "App service"- see image below:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dklz25uf1gplmak4g3jz.png)


Remember, we are creating a new app service, so what we need is to click "create"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cgx9l3xtenucg3rer4im.png)

Quickly fill the details such as:

Subscription
Select a resource group - you can leave the default value 
Web Name (input a befitting name of your choice)
Runstack Time should be  '.NET 3L'

The next tags e.g Deployment, Networking, Monitoring etc. 
please use the default values an proceed to "review + create"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfvo8x1jny839g9i6alt.png)


Please give it a few minutes to deploy, after the deployment is successful, you have successfully created an app service on the Azure portal.

The  next part of this post is to walk you through , how to deploy an Api using your new App Service

This is a little technical so please stay with me, I'll be walking you through in the next posts.
PHP Carbon Formatting that Readable for Humans
Tags: php, carbon, tutorial, beginners
Published: 2022-05-16 07:59:29

Originally posted @ https://codeanddeploy.com visit and download the sample code:
https://codeanddeploy.com/blog/php/php-carbon-formatting-that-readable-for-humans

In this example, I will show you an example of how to use Carbon Formatting dates in PHP that are readable for humans.

 

**See the example below:**

 

## PHP Carbon Format to Date Example

```php
<?php

$date = Carbon::now();

echo $date->toDateString();
//Result: 2022-05-06
```

## PHP Carbon Format to Date & Time Example
```php
<?php

$date = Carbon::now();

echo $date->toDateTimeString();
//Result: 2022-05-06 07:20:48
```

## PHP Carbon Formatted Example
```php
<?php

$date = Carbon::now();

echo $date->toFormattedDateString();
//Result: May 6, 2022
```

## PHP Carbon Format to Time Example
```php
<?php

$date = Carbon::now();

echo $date->toTimeString();
//Result: 07:24:08
```

## PHP Carbon Format to Day, Date, and Time
```php
<?php

$date = Carbon::now();

echo $date->toDayDateTimeString();
//Result: Fri, May 6, 2022 7:25 AM
```

## PHP Carbon Format Days Ago
```php
<?php

echo Carbon::now()->subDays(3)->diffForHumans();
//Result: 3 days ago
```

## PHP Carbon Format Weeks Ago
```php
<?php

echo Carbon::now()->subWeek(3)->diffForHumans();
//Result: 3 weeks ago
```

## PHP Carbon Format Months Ago
```php
<?php

echo Carbon::now()->subMonth(3)->diffForHumans();
//Result: 3 months ago
```

## PHP Carbon Format Long Relative for Humans
```php
<?php

echo Carbon::create('2022')->longRelativeDiffForHumans('2019');
//Result: 4 months 5 days 7 hours 31 minutes 21 seconds ago
```

I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/php/php-carbon-formatting-that-readable-for-humans if you want to download this code.

Happy coding :)
Laravel Redirect Cheat Sheet
Tags: laravel, laravelcheatsheet, tutorial, beginners
Published: 2022-05-16 07:55:48

Originally posted @ https://codeanddeploy.com visit and download the sample code:
https://codeanddeploy.com/blog/laravel/laravel-redirect-cheat-sheet

In this post, you will learn some **Laravel Redirect** Cheat Sheet that is useful in your Laravel development.

 

It will redirect to another page with status 302 indicating a temporary redirect.

```php
//redirect to another page. Status is 302 indicating temporay redirect
Route::redirect('/page', '/new-page');
```

This example can define page status as 3rd parameter which indicates a permanent redirect.

```php
//can pass status as 3rd Parameter. 301 indicates permanent redirect
Route::redirect('/page', '/new-page', 301);
```

Same as above example but no need to set a 301-page status

```php
//Same as above
Route::permanentRedirect('/page', '/new-page');
```
This example shows that we can redirect with parameters.
```php
//Redirect along with the parameter
Route::redirect('/page/{param}', '/new-page/{param}');
 
```
This example can redirect with all parameters available.
```php
//Redirect with all parameters
Route::redirect('/page/{params?}', '/new-page/{params?}')->where('params', '(.*)');
```

I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/laravel/laravel-redirect-cheat-sheet if you want to download this code.

Happy coding :)
Understand ACID and Transaction
Published: 2022-05-16 07:49:58

One document which had two pages content was sent to printer

**Transaction** - Document sent to printer

**Atomicity** - Printer prints two pages of a document or none.
**Consistency** - Printer prints half page and the page gets. stuck. The printer restarts itself and prints two pages with all content.
**Isolation** - While there were multiple print outs in progress - printer prints the right content of the document.
**Durability** - While printing, there was a power cut- printer again prints documents without any errors.


_I really liked this simple exmplaination of transaction and ACID and I thought you guys might also benefit from it. 
Ref: [Stackoverflow](https://stackoverflow.com/questions/3740280/how-do-acid-and-database-transactions-work)_
Easiest Implementation Custom Expiration for Laravel Remember Me Login
Tags: laravel, laravelauthentication
Published: 2022-05-16 07:48:57

Originally posted @ https://codeanddeploy.com visit and download the sample code:
https://codeanddeploy.com/blog/laravel/easiest-implementation-custom-expiration-for-laravel-remember-me-login

In my previous [post](https://codeanddeploy.com/blog/laravel/how-to-implement-remember-me-with-custom-expiration-to-your-laravel-8-login), I share how to implement custom expiration for your **Laravel Remember Me** authentication/login. But when I test my code it seems not to work if I delete the session and it will be redirected me to the login page. So I researched but still no luck then I check the Auth Session Guard and I found that there is a public method that can set the Remember me duration by minutes.

 

Here is the full code of my `LoginController`.

```php
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests\LoginRequest;
use Illuminate\Support\Facades\Auth;

class LoginController extends Controller
{
    /**
     * Display login page.
     * 
     * @return Renderable
     */
    public function show()
    {
        return view('auth.login');
    }

    /**
     * Handle account login request
     * 
     * @param LoginRequest $request
     * 
     * @return \Illuminate\Http\Response
     */
    public function login(LoginRequest $request)
    {
        $credentials = $request->getCredentials();

        if(!Auth::validate($credentials)):
            return redirect()->to('login')
                ->withErrors(trans('auth.failed'));
        endif;

        $user = Auth::getProvider()->retrieveByCredentials($credentials);

        if($request->get('remember')):
            Auth::setRememberDuration(43200); // equivalent to 1 month
        endif;

        Auth::login($user, $request->get('remember'));

        return $this->authenticated($request, $user);
    }

    /**
     * Handle response after user authenticated
     * 
     * @param Request $request
     * @param Auth $user
     * 
     * @return \Illuminate\Http\Response
     */
    protected function authenticated(Request $request, $user) 
    {
        return redirect()->intended();
    }
}
```
In my previous tutorial, I created a custom Trait Class that customizes the Laravel remember me authentication/login. But now I removed it and just put the 3 lines of code before `Auth::login()` method.

```php
if($request->get('remember')):
   Auth::setRememberDuration(43200);
endif;
```
In just 3 lines you will now customize the Laravel remember me. I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/laravel/easiest-implementation-custom-expiration-for-laravel-remember-me-login if you want to download this code.

Happy coding :)
Ever get the feeling you’re being watched?
Tags: privacy, tracking, vivaldi, browser
Published: 2022-05-18 07:34:31

---
title: Ever get the feeling you’re being watched?
published: true
date: 2022-05-16 07:44:02 UTC
tags: Privacy, Tracking, Vivaldi, Browser
canonical_url: https://vivaldi.com/blog/privacy/ever-get-the-feeling-youre-being-watched/
cover_image: https://vivaldi.com/wp-content/uploads/banspying_og-980x551.png
---

Massive information about us is collected from all quarters of our lives. And, as this information is compiled, it develops a highly detailed picture of us – one that reveals what we do in our daily lives, including in our most sensitive moments.

This Spy Cat video, produced by the Consumers’ Association of Iceland in collaboration with Vivaldi, takes a darkly humorous approach to make the pervasiveness and hazards of targeted profiling and advertising more relatable. Please view and share!

{% vimeo 699557886 %}

For more information about this campaign, as well as tips for avoiding or limiting the information being gathered about you, visit [banspying.org](http://banspying.org). 

And a special shout out goes to Flóki, Hneta, Lotta, Mandarína, Milla, Mirra, Móri and Stormur for channeling their inquisitive feline powers for this video. Fortunately for us, their true intentions were 0% evil, 100% adorable.

What do you think about this campaign? Let us know in the comments.
yourid.js
Published: 2022-05-16 07:43:53

## yourId

A simple id generator. Thats fast, easy, and fun to use.

## Installation

```sh
$ npm install yourid
```

## Usage

```js
var yourId = require("yourid");

// Generate a new id

console.log(
    yourId.generate({
        length: 10, // the length of the random id string
        keyspace: "customkeyspace", // the keyspace to use
        prefix: "yourPrefix", // set a prefix
        includePrefix: true, // you can set it to FALSE or TRUE
    })
); // => Random ID String length 10 & Prefix yourPrefix
```
Laravel Translation With Variables Example
Tags: laravel, tutorial, beginners
Published: 2022-05-16 07:34:10

Originally posted @ https://codeanddeploy.com visit and download the sample code:
https://codeanddeploy.com/blog/laravel/laravel-translation-with-variables-example

In this post, I will show you how to implement **Laravel translation with variables**. Building a Laravel Application with multi-language is amazing and it is easy to do it with the Laravel framework. How about you want to pass a dynamic value to your language with a variable/placeholder?

 

So let's say this is your English language.

```php
{
   "This is a sample message for :name with another :variable2": "This is a sample message for :name with another :variable2"
}
```

So, how to input a dynamic value to your language variable/placeholder?

 

See the example below:

```php
$name = "your dynamic value here";
$variable2 = "dynamic value for variable 2";

// you can do it inside your PHP code like controller
trans('This is a sample message for :name with another :variable2', [ 'name' => $name, 'variable2' => $variable2]);

// or this helper function
__('This is a sample message for :name with another :variable2', [ 'name' => $name, 'variable2' => $variable2]);

// for blade template
@lang('This is a sample message for :name with another :variable2', [ 'name' => $name, 'variable2' => $variable2]);
```

I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/laravel/laravel-translation-with-variables-example if you want to download this code.

Happy coding :)
IS LEARNING EVERYTHING IMPOSSIBLE? NO, IT’S NOT.
Tags: learning, success, motivation
Published: 2022-05-16 07:32:41

 “It always seems impossible, until it’s done.”

                                                                                  ------Nelson Mandela.


Many of us have a crazy question, is learning everything possible? Now, I would like to answer, “Yes, it is possible.”


I am not kidding or talking crazy things to you. I AM SERIOUS! I know, no one in history had learned everything. But, if anyone now did it and break all records of learning? If the record-breaker is you?


Today, we live in a digital world, where everything is at our fingertips. We can browse information on any topic from different websites and encyclopedias. We can download and read books for free from various websites. We can also do courses on any subject from home. Therefore, if we go on a mission of learning everything, all the resources we need are available.


But the other gadgets we need are motivation, time management, a strict routine, no procrastination and progress on the way to success. During this process, we will learn more than the average people and experience more than we did before.
I am on that mission for a couple of years. I didn’t learn everything, but I can see my progress. I have read hundreds and hundreds of books till now. I have learned Spanish, German and Turkish languages. I have also learned five programming languages including Python, JS, R and so on, and I am still learning them. In summary, I am taking advantage of information and technology. And I spent $0.00 till now on all this.


So, what are you waiting for? Throw all doubts and discouragements away from your mind, and start your project on Learn Everything.


And remember, everything is possible and you can turn all impossibles into possibles. Best wishes to you.


NUSRAT RAHMAN
Email ✉️ rahmannusrat19@gmail.com
Instagram: nusratrahman19