teleren/devto huggingface dataset:
Are you procrastinating?
Tags: watercooler, discuss
Published: 2021-04-11 08:31:17

Are you procrastinating? This playlist gives you the ultimate tools to take control of your life.

Watch the videos. Rewatch. Implement. Think. Reflect. Watch again. Iterate.

Be patient, and you will be able to kill the monster.


-------

{% youtube arj7oStGLkU %}
{% youtube GTQ2xDNlLf8 %}
{% youtube km4pOGd_lHw %}
{% youtube 1-VAGGCkoAM %}
{% youtube irp5ghCVNAM %}
{% youtube yBP1VjO9RSE %}
{% youtube cRpQOXV2cFg %}
{% youtube WAe-giSW3Zw %}
{% youtube bLp9EimaEQI %}
{% youtube 4x7MkLDGnu8 %}
{% youtube pKyHX0zqynk %}
{% youtube Y82KNevhkkg %}
{% youtube ilwork_mktE %}
{% youtube jAS5zsi7zck %}
{% youtube sBfng6Jd4Cc %}
{% youtube o7w5r5PfBKo %}
{% youtube 1KDB42qGT-8 %}
{% youtube ii86yxzeDyk %}
{% youtube iDbdXTMnOmE %}
{% youtube T79nFQlDXXk %}
{% youtube tReHWgBup40 %}
{% youtube 1xoCARmG7AM %}
{% youtube RLylcMjvmpE %}
{% youtube Hu4Yvq-g7_Y %}
{% youtube 52lZmIafep4 %}
{% youtube PFo9-7VX2K8 %}
{% youtube Lp7E973zozc %}
{% youtube pXEl0R1BX-g %}
{% youtube pWlOyuPPGiw %}
{% youtube jW0JtF7ZcMw %}
{% youtube Y-iUOgQdA3Y %}
{% youtube ireD2dDk7_c %}
{% youtube ireD2dDk7_c %}
{% youtube uRKeeelqWxw %}
{% youtube xguo_tvEoJs %}
{% youtube 5J6jAC6XxAI %}
{% youtube HbxTkvfIOIg %}

[Link to the playlist](https://www.youtube.com/playlist?list=PLSTrsq_DvEghR5B_JwY3rUyEX1FhKXT2A) on YouTube.
M1 dev setup with a virtual Linux box
Tags: m1, linux, macos
Published: 2021-04-11 11:24:30

---
title: M1 dev setup with a virtual Linux box
published: true
date: 2021-04-11 08:28:55 UTC
tags: m1,linux,macos
canonical_url: 
---

![](https://cdn-images-1.medium.com/max/1024/0*yI7wOGffd9qlX8tC)<figcaption>VSCode ssh’ing to a virtual Linux box on an M1 Macbook Air</figcaption>

I love my new M1 Macbook Air. No fan but awesome performance. Working keyboard. And the feature of not having a touch bar is not only included but it’s the cheaper option — I would have paid money for that!

I had two requirements for developing that I wanted to achieve: macOS UI, Linux-based dev environment. I was a bit weary about the new architecture and frankly I expected not to be able to work efficiently on it for a while. I was wrong. And since I’ve been asked about this setup a few times now, I decided to put together a very brief intro.

The way I made it work is by having a full “dev environment” running virtually. That means that I check out repositories on the virtual disk and run everything from there. This has the slight inconvenience that I can’t easily access those files with Finder, but the upside is that there is no noticeable IO latency issues like when running Docker for Mac. And VSCode has great drag’n’drop to and from the remote file system, so that covers almost everything.

At the time when I was setting up, none of the big VM providers (VMware, Parallells and VirtualBox) offered a working M1 solution, so I ended up using a wrapper around QEmu called [UTM](https://getutm.app/). It’s made for iOS but it runs smoothly on MacOS. The only downside I’ve noticed is that there is no headless option, so I have a superfluous terminal window permanently sitting in my dock.

If you want to do this, first follow [the instructions](https://github.com/utmapp/UTM/wiki/Install%20Ubuntu%20ARM64%20on%20Apple%20M1) for installing and setting up UTM with a Ubuntu server. When installing the operating system, check the SSH Server option to make sure that is installed. To access it, set up UTM to forward port 22 to the host machine, preferably on a different port to avoid collisions (this is available in the network tab in the configuration window).

Now, to use the server with Visual Studio Code, install the [remote extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) (or just the SSH version if you know that’s the only one you will be using). Set up a new SSH target that accesses localhost on the port that you forwarded. VSCode will now connect to the virtual machine, install host extensions and use it for the “backend” part of your development setup.

As I am running an ARM Linux, there might be a few things that won’t work like I am used to but I am currently running the entire setup for Submotion which is NodeJS and Postgres (running as a Docker image) as well as a few toy Rust projects and so far it all works.
Get Last Array Element in PHP and Laravel
Tags: laravel, array, php, tutorial
Published: 2021-04-11 08:06:43

Laravel provides the `last()` function as a global helper and also as a function defined in `Illuminate\Support\Arr` that can be used to get the last element in an array.

This article, guide through the different ways of retrieving the last array element in `PHP` also in `Laravel`. So you can decide which suits you best.

# How to get the last item in the array?

## Retrieve the last element in PHP

In PHP, to get the last element from an array, first, you need to count the total array elements

```php
$languages = [
  'JAVA',
  'PHP',
  'C++',
  'C#',
  'Python',
];
$totalElements = count($languages);
echo $languages[$totalElements - 1];
```

- Above code will output `Python` i.e the last element in a provided array.
- It is a more readable approach, can also be rewritten in a single line as shown, which sometimes looks complex for beginners.

```php
echo $languages[count($languages) - 1];
```

```output
Python
```

## Retrieve the last element in Laravel

In Laravel, you can get the last array element in two ways.

1. Using global `last()` helper.
1. Using the static method of `Arr` class named `last()`.

### Using global `last()` helper

The `last()` helper function returns the last element in the given array:

```php
$carBrands = [
  'Maserati',
  'Tesla',
  'Tata',
  'Aston Martin',
  'Audi',
  'Alfa Romeo',
];
echo last($carBrands);
```

- Above code will output `Alfa Romeo` i.e the last element in a provided array named `$carBrands`.

### Using `last()` function in Arr class

- The `last()` helper function returns the last element in the given array.
- Before using it, remember to import using the `use Illuminate\Support\Arr;` statement.

#### Syntax

```php
$last = Arr::last($array, $callback, $default);
```

- The first parameter is a source **array**, from which the last element is to be found. It's a required parameter.
- The second parameter is a **callback function**, that can be either helpful to filter & retrieve the last element based on conditions. It's an optional parameter.
- The third parameter is a **default value** & it will be returned if none of the array elements passes the truth test.

```php
$fruits = [
  'Orange 🍊',
  'Apple 🍎',
  'Grapes 🍇',
  'Kiwi 🥝',
  'Mango 🥭',
];

echo Arr::last($fruits);
```

- Above code will output `Mango 🥭` i.e the last element in a provided array named `$fruits`.

Read the complete post on our site [Get Last Array Element in PHP and Laravel](https://meshworld.in/get-last-array-element-in-php-and-laravel/)

Read others post on our site [MeshWorld](https://meshworld.in)

Happy 😄 coding

With ❤️ from 🇮🇳
Basic Level Angular Interview Questions?
Tags: angular, interview, angulartips, javascriptframework
Published: 2021-04-11 07:37:49

#Components
What is the component?
What are the life cycle hooks in components?
How to send data from Parent to Child?
#Templates
What is interpolation?
What is data binding?
What is pipe? Name some built in pipes?
What is class and style binding
#Directives
What are built in directives available ?
What is the Use of ngFor and ngIf?
Dependency Injection
What Dependency Injection?
#Routing & Navigation
How to enable routing?
What is syntax for routing?
What is SPA (Single page application)?
How to provide a link to another page in html template?
How to navigate dynamically to path /page from ts(class)?
#Forms
Which module do we need to include for using forms in app and where?
What are the types of forms ?
What is ngModel ?
What is formControl?
How to initialize reactive form?
How to initialize template driven form?
Difference between dirty and touched?
HTTP Client
How to consume an JSON REST api (server)?
Which service use for hit an api?
Difference between get and post?
What is a header?
#Testing
What is testing?
What is Unit test?
What is Karma?
What is Jasmine?
#Internationalization (i18n)
How to localize the app?
#Animation
How to use transition in Angular?
Which module supports Animation?
#Schematics
How to generate Component using cli?
What is angular cli?
How to add angular material?
How to make prod build?
#RxJS
What is Observable?
How to unsubscribe Observable?
Tech Communities: Definitive guides to etch a great growth curve!
Tags: inclusion, womenintech, wecoded, watercooler
Published: 2021-04-11 07:29:23

Able mentorship, networking with like-minded people, sufficient peer motivation; And an eclectic combination of all the above! Sounds exciting right? Oh, yeah! Then, It’s time to join the wonderful tech communities out there!

The impact that good networking has on us as individuals is beyond what we can ever comprehend. By signing up to be a part of these tech communities, we get to network with wonderful people from across the globe, from diverse tech backgrounds, with an equally rich variety in expertise and experience. Reaching out to the members of the community for assistance is literally just a message away! Communities like [Women Who Code](https://www.womenwhocode.com/), [Women in AI](https://www.womeninai.co/) also offer us the option to join local chapters in our country that best suit us or even request to start one.

How well they bring together people from all walks of life is yet another attribute that makes tech forums a great place to be a part of. If you’re a beginner or a student looking for your breakthrough into an enticing career in tech, there’s ample scope to hone your existing skill set, learn a new skill and get to know from experts in industry on opportunities. The study groups, webinars and talks collectively facilitate a great learning path.

As for accomplished professionals, who’ve already scaled heights in their career, such forums are perfect platforms to share their success stories and inspire & guide many aspiring individuals. A much needed mentorship could go a long way in redefining somebody’s tech career.

>Summing it all up, if you’re someone who believes in the synergy of collaborative work and coming together to succeed; if you’ve always supported **Women in Tech, Diversity & Inclusion and the many ideals that hold them together**, the tech communities are places where you’d see these ideals forming an integral part of the functioning; making an impact and transforming lives for the better!

That being said, maybe it’s time to grab a quick bite & a cup of coffee and tune right into the very next event that interests you the most?

Cover Image: Photo by <a href="https://unsplash.com/@bamagal?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">"My Life Through A Lens"</a> on <a href="https://unsplash.com/s/photos/community?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
WWC MENTORSHIP WEEK -3
Tags: womenintech, computerscience
Published: 2021-04-11 07:10:16

Week 3 was mainly focussed on how to approach the opportunities that have essays in their application , for example Outreachy . For most of these opportunities you don’t have to submit a resume , so your essay becomes the deciding factor . If its well written it can increase your chances exponentially and vice versa .
        
So our task this week was to answer few essay questions which were commonly asked . Few points suggested by our mentor :

Don’t lie ,be as authentic as possible .

Add a social aspect , tell them how your community work is helping others.

Have a structure , most of the questions will be related to each other , we may end up being repetitive , thats were structure comes into play .

Don’t exceed the word limit .

Look for previous years scholars , if possible get your answers reviewed by them .

Lastly read your answers as many times as possible , make sure there are no grammatical and spelling mistakes .
Which language to learn first ?
Tags: javascript, android, ios, web
Published: 2021-04-11 07:08:40

Well, every newbie in IT industry asking which language to study in order to get paid with well digits.

Every experienced developer is guiding them as per their convenience, let's consider John is an experienced developer & Mark is a newbie. Now before stepping in Mark started surveying about industry & asking everyone which language to study to hold the position in industry.

Let's say if John is an Android Developer, in such scenario John advises mark to study about Java or Kotlin.

If John is an iOS Developer, in such scenario John advises mark to study about Swift or Objective C.

If John is the Laravel/Codeignitor Developer, in such scenario John advises mark to study about PHP.

If John is the Web Front-End Developer, in such scenario John advises mark to study about HTML, CSS, BootStrap, etc.

If John is the AI Developer or Game developer using Unity he'll guide the same as technologies he is currently using.

But since it's JS stands everywhere & won't stab you in the technology limit I would like to tell you that learn JS First.

If you are willing to go in Web app development try AngularJS, ReactJS, etc.

If you are willing to go in Mobile app development try Ionic Cordova, angular-cordova, React Native(Most loved & preferable), etc.

If you are willing to go in Backend development try NodeJS, ExpressJS, mongoDB, etc.

If you are willing to go in Games Development development try GDevelop, melonJS, ImpactJS, BabylonJS, etc.

If you are willing to go in Games Development development try GDevelop, melonJS, ImpactJS, BabylonJS, etc.
& so on.

Try keeping hands on JS, Because JS Stands Everywhere !
Found a cool Sysadmin Resource Link
Tags: sysadmin, blog, resources
Published: 2021-04-11 07:01:25

As usual, Reddit never fails to amaze me.

I found this on [r/selfhosted](https://www.reddit.com/r/selfhosted/wiki/index) wiki.

Here is an amazing blog with cool sys-admin services that you can self-host.
[awesome.tilde.fun](https://awesome.tilde.fun/t/sysadmin)

Here's another one on [Github](https://github.com/awesome-selfhosted/awesome-selfhosted) but for only self-hosted apps.

Have fun!
AWS Database Migration Service: Limitations 
Tags: aws, dms, rds, cloudmigration
Published: 2021-04-11 07:01:12

[DMS](https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html), if used with SQL Server in a self-managed context (EC2 or on-prem), supports one-time and ongoing replication in two modes: via MS-Replication & MS-CDC. However if DMS is used in the context of RDS as a source, only MS-CDC is supported. DMS offers a range of Source/Targets and supports heterogeneous database engines and offers a fine-grained control on the replication process. The Schema Conversion Tool (SCT) can be utilized along with DMS for heterogeneous configuration setup, that helps with schema level changes with an in-built code editor and also produces various reports for migration readiness & planning.
Source/Targets need to be added as end points in DMS and it uses logical replication process under the hood using either MS-Replication or MS-CDC. In a Hybrid setup or within AWS, DMS can be configured between on-prem and AWS with an on-going replication configuration using CDC and during the cutover, the DMS migration task can be stopped and the application will be able to connect to the database that is already in sync with the on-prem database avoiding typical delays of restoring Differential backups to bring the target database online etc.

Below are some of the associated limitations when using SQL Server databases as the source for DMS:

* How large are our databases?
* How many tables do we have in each database?
* Do we have primary keys on all the existing tables? (This is highly recommended for DMS)
* Do we have any identity columns?
* Do we use truncate tables? How frequently?
* Do we have temporal tables?
* Do we have any column level encryption today?
* How often are DDL's executed?
* SELECT * INTO new_table FROM existing_table is not supported. Do we do that frequently?
Writing a Research Paper Guide
Published: 2021-04-11 06:38:52

This guide will guide you through the steps of writing a research paper, from the basics to the most important steps. I am here to show you the step in writing research: turn it into academic writing that shows your professor what you are really made of.

A research paper is essentially a list of key topics, arguments, and evidence you wish to include, divided into sections and headings, so you know roughly what your work will look like before you start writing. The abstract is the only text in your research that is written with paragraphs to separate the most important points. Moreover, when it comes to top-rated <a href="https://www.reddit.com/r/essaywritinglab/comments/m9o6bb/best_essay_writing_service_reddit/">paper essay writing service Reddit</a>, Huller196 is one standout provider.

Brainstorming your ideas for research is the first step after choosing a topic, and there are various methods you can use for brainstorming, including clustering, also known as mind mapping. There are many ways to generate ideas for a scientific paper, such as talking to fellow students or professors about it. Depending on the research results, there may be different types of pen and paper to brainstorm with, as well as different spellings. Some of the steps of writing a scientific paper are pretty trite, just getting a lot of writing and feedback.

1. Choose a Topic

Sometimes students are assigned to the topic of their research paper, but if you are lucky enough to have such a choice, choose your topic wisely. First of all, think about choosing a challenging topic that you are interested in. Then, you won't get bored when doing research because you will definitely find something new and you will enjoy the writing process. Don't choose a subject that is too technical or general.

2. Research on your topic

You must find sufficient secondary and primary sources on the subject of your paper, read everything carefully, and find relevant evidence to support your thesis.

3. Create a good outline

Your research has given you lots of great ideas. Now you have to set it for your impressive presentation. Don't skip this vital step because without it, your project will be less focused and you will need more time to revise the concept you are trying to understand the mind of your interference. That's why you need an outline. You have to complete your thesis and make the outline of the work you plan to be borne and it will serve you as a road map and keep you focused.

4. Make the first draft

This is the middle process. You have a clear direction and it's time to make the first draft with the title, quoted in the text, and a reference page.

The title is very important if you want to make a good impression on your readers because it is the first thing they see. This forms their views on what they really have to expect in your paper.

After that, you need to write an introduction, body paragraph, and conclusion. This is the main part of your paper.
8 Techniques to overcome the coding fear for newbies:
Published: 2021-04-11 06:24:53

8 Techniques to overcome the coding fear for newbies:

1- Find a good resource
2- Just start
3- Start small and start building
4- Focus on one programming language before jumping into others
5- Realize that you don't need to learn 100% of a programming language
6- Don't worry about the big picture, trust the process
7- Break down code into small chunks
8- Find a mentor


#CodeNewbie #100DaysOfCode
Weekly Challenge 107
Tags: perl, perlweeklychallenge, weeklychallenge
Published: 2021-04-11 06:22:31

[Challenge](https://perlweeklychallenge.org/blog/perl-weekly-challenge-107/), [My solutions](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-107/sgreen)

# TASK #1 › Self-descriptive Numbers

## Task

Write a script to display the first three [self-descriptive numbers](https://en.wikipedia.org/wiki/Self-descriptive_number).

## My solution

`say '1210, 2020, 21200'`. On to the next task. Not so quickly :) While the above would produce the expected output, that's not the spirit of what the weekly challenge is about.

For this task I ran an incrementing loop that exited once three self-descriptive numbers were found. The main part of the logic appears in the `_is_self_descriptive` subroutine. I first convert the number into an array of occurrences. For example `12140` would be turned into `1,2,1,0,1,0,0,0,0,0`. I then compare this with the digit in the position, and return false `undef` or true `1` if there is a match.


## Example

```
» ./ch-1.pl 
1210, 2020, 21200
```

# TASK #2 › List Methods

## Task

Write a script to list methods of a package/class.

## My solution

For caveats first.

* In the real world, I would simply use [Class::Inspector](https://metacpan.org/pod/Class::Inspector)'s `methods` function. There is no need to re-invent a perfectly working wheel.
* My solution won't list inherited methods. We could walk the `@ISA` tree, but this seems more complicated than required for the task.
* Likewise it won't show [autoloaded](https://perldoc.perl.org/AutoLoader) methods.
* My code is loosely based on Class::Inspector

And with all of that, there isn't much else to say. I `require` the package, and then look up everything in its table, and exclude everything that it's a sub-routine (e.g variables).

If a package is not supplied, then `Calc` is assumed.

## Example

```
» perl -I . ./ch-2.pl 
div
new
add
mul
```
SvelteKit/CDK exercise plan
Tags: svelte, sveltekit, aws, cdk
Published: 2021-04-11 05:45:21

I've dabbled with an [adapter](https://dev.to/juranki/diy-sveltekit-cdk-adapter-3enp) that deploys [SvelteKit](https://kit.svelte.dev/) project to a [CDK](https://aws.amazon.com/cdk/) stack, but deploying the sample page doesn't really test the adapter much.

So, to find (and hopefully fix, too) at least some of the weak spots of my custom CDK adapter, I'll develop a simple app featuring passwordless sign-in and profile picture. The app will protect users from themselves by rejecting reckless profile pictures, like cats and adult content. It'll be hosted on [prudent-profile.com](https://prudent-profile.com).

It shouldn't be too complicated, but still exercises new areas of the adapter:

- applying svelte kit in more realistic scenario
- session cookies with [Cloudfront](https://aws.amazon.com/cloudfront/)
- handling non-JSON request payload
- external dependencies in SSR bundle
- more involved CDK stack
  - [DynamoDB](https://aws.amazon.com/dynamodb/) for session management
  - [SES](https://aws.amazon.com/ses/) for confirmation emails
  - [Rekognition](https://aws.amazon.com/rekognition/) to ensure "quality" of profile images
  - DNS, TLS certificates, ...
Day 28 of 100DaysOfSwiftUI
Published: 2021-04-11 05:36:34

I just completed day 28 of 100DaysOFSwiftUi. Today, I completed the BetterSleep app. I took the review questions and I also worked on the app challenge.

You can find the source code to the app [here](https://github.com/sanmiAde/BetterSleep)
Explaining Git to a 10 years old!
Tags: github, programming, go
Published: 2021-04-11 05:09:20

Imagine having an awesome collection of Pokemon stickers you ask your friends to exchange some of them with yours. Everything is cool until the very next moment when you find out that your favourite sticker is lost or is dumped somewhere...you are sad now just because of those stickers but then your friends offer you the same sticker with the same Pokemon on it cause they were having the copies of those stickers now you are happy so you go back to your house and keep the sticker somewhere safe so that it never gets lost again.


For Developers:

Here "having an awesome collection of Pokemon stickers" indicates your repositories in GitHub.

When you lost track of what is the status of your repository is indicated by "sticker getting lost or dumped".

But then you have already created branches of your main branch so there you can revert your actions and make the necessary changes in your repository without hampering your main branch