teleren/devto huggingface dataset:
Math & Tech Vlogs List
Tags: science, mathematics, math, technology
Published: 2021-04-13 18:28:48

I was talking with @miguelmj about my sources in [this thread](https://dev.to/cacilhas/how-to-compute-arbitrary-precision-transcendental-numbers-59lc/comments), when I suggested to share my Math&Tech YouTube favourite channels.

I did it in [the comments](https://dev.to/cacilhas/comment/1dd0b), but I think it could be more useful in a separated post.

So, let’s go into my (current) YouTube Math&Tech channels list:

- [CERN](https://www.youtube.com/channel/UCrHXK2A9JtiexqwHuWGeSMg)
- [CodePulse](https://www.youtube.com/channel/UCUVahoidFA7F3Asfvamrm7w)
- [D!NG](https://www.youtube.com/channel/UClq42foiSgl7sSpLupnugGA)<sup>★</sup>
- [ENSICO](https://www.youtube.com/channel/UC5c66xEDYKZVSgmwRk_ANow) (Portuguese)
- [IETF](https://www.youtube.com/channel/UC8dtK9njBLdFnBahHFp0eZQ)
- [A Matemaníaca](https://www.youtube.com/channel/UCz4Zuqtj9fokXH68gZJmCdA) (Portuguese)
- [MathGurl](https://www.youtube.com/channel/UC5RV_s1Jh-jQI4HfexEIb2Q) (Portuguese)
- [Mathologer](https://www.youtube.com/channel/UC1_uAIS3r8Vu6JjXWvastJg)<sup>★</sup>
- [minutephysics](https://www.youtube.com/channel/UCUHW94eEFW7hkUMVaZz4eDg)
- [Numberphile](https://www.youtube.com/user/numberphile)
- [Peixe Babel](https://www.youtube.com/channel/UCqB90BBr6eNRaJl-kl30Xxw) (Portuguese)
- [Physics Girl](https://www.youtube.com/channel/UC7DdEm33SyaTDtWYGO2CwdA)<sup>★</sup>
- [Retro Game Mechanics Explained](https://www.youtube.com/channel/UCwRqWnW5ZkVaP_lZF7caZ-g)
- [The Science Asylum](https://www.youtube.com/channel/UCXgNowiGxwwnLeQ7DXTwXPg)<sup>★</sup>
- [Stand-up Maths](https://www.youtube.com/channel/UCSju5G2aFaWMqn-_0YBtq5A)<sup>★</sup>
- [Steve Mould](https://www.youtube.com/channel/UCEIwxahdLz7bap-VDs9h35A)<sup>★</sup>
- [TechWorld with Nana](https://www.youtube.com/channel/UCdngmbVKX1Tgre699-XLlUA)
- [Tibees](https://www.youtube.com/channel/UC52kszkc08-acFOuogFl5jw)
- [Up and Atom](https://www.youtube.com/channel/UCSIvk78tK2TiviLQn4fSHaw)<sup>★</sup>
- [Veritasium](https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA)<sup>★</sup>
- [Vsauce](https://www.youtube.com/channel/UC6nSFpj9HTCZ5t-N3Rm3-HA)<sup>★★★★★</sup>

I put a <sup>★</sup>mark in my most favourites.
What have you learned this week? 
Tags: discuss
Published: 2021-04-13 18:22:08

I’ll go first! I’ve been learning this week about optimization algorithms and using them to solve the Traveling Salesman Problem (TSP). 

Optimization algorithms are used to solve problems such as when you have a number of packages to deliver and need to deliver them on time and in the least amount of miles possible. 

There are other optimization algorithms, and no algorithm leads to the best solution, only an optimal solution. 

What have you learned this week?
<marquee> tag in HTML
Tags: capscode
Published: 2021-04-13 18:19:27

The <marquee> tag is one of the most important tag in Html5.
It is a container tag of Html which is used for scrolling an Image or Text in Left, Right, Up or Down direction automatically.

Syntax : <marquee> "This is a marquee tag" </marquee>

The above syntax is the by-default property of the marquee tag, it simply scrolls the text("This is a marquee tag") from RIGHT-to-LEFT, and again restarts automatically from the Right-side when the end to the word crosses the left-most side, and this is the end of one complete loop.


The Marquee element contains several attributes that are used to control and adjust the appearance of the marquee.
1. direction
2. height
3. width
4. bgcolor
5. behavior
6. direction
7. loop
Day 91,92,93,94,95,96,97,98,99,100:100DaysOfCode
Tags: productivity, programming, 100daysofcode
Published: 2021-04-13 17:50:48

great 10days with the finish of this great challenge.
learned a lot ->
many cf contest in past days ->
cf div2(solved 1)
div3(solved 1)
educational round(solved 3)
atcoder beginner(solved 2)
leetcode weekly contest(solved 1)

--> learnt how to integrate apis(basically created on spring boot) in flutter
started studying javascript,
codedrills icpc practise #6 contest(solved 1),

practised greedy/bits on leetcode.

it was a great experience with this #100daysofcode challenge.

You can Follow me->
https://github.com/singhtaran1005
https://www.linkedin.com/in/taranpreet-singh-chabbra-27517918a/
[solved] How to update php version from cpanel
Tags: php, cpanel, wordpress
Published: 2021-04-13 17:48:04

---
title:[solved] How to update php version from cpanel
published: true
description: 
canonical_url: https://jovialcore.tech/solved-how-to-update-php-version-from-cpanel

tags: php, cpanel, wordpress
cover_image: ![lkklkl](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3wk76xo92qn0hrjblv4.png)---
Often, people do encounter outdated-php-version error warnings that arouses concerns as to what steps to take that will remedy the situation.

Deprecated php version error warnings can result to plugins and themes incompatibility for cms users like wordpress, etc.

Here is a quick and straight forward guide to upgrade low php version to a higher version from cpanel

First, login your cpanel area/dashboard.

Next, navigate to the section where you will see ` Multiphpmanager`

![Image design](https://res.cloudinary.com/chidiebere/image/upload/v1618253463/upgrade%20php/Screenshot_from_2021-04-12_15-58-10.png)

The next action is to click the check box for the domain you want to upgrade your php version to then select the php version by clicking on the dropdown towards your right then click APPLY

![update php version](https://res.cloudinary.com/chidiebere/image/upload/v1618332698/upgrade%20php/Screenshot_from_2021-04-13_17-47-14.png)

Afterwards, go back to your cpanel dashboard then navigate to the section where you have `Select php version`...

![update php version](https://res.cloudinary.com/chidiebere/image/upload/v1618333506/upgrade%20php/Screenshot_from_2021-04-13_17-59-08.png)


...you will be redirected to another interface-- this is where you will set the configuration so that user's website will use the version set in CloudLinux PHP Selector manager.

![update php version](https://res.cloudinary.com/chidiebere/image/upload/v1618334094/upgrade%20php/Screenshot_from_2021-04-13_18-04-30.png)

So click on the `Use PHP Selector`, you'll should see a pop-up, press confirm..

We are done !!!

You can go back to your website to see the effect on your site.

I'm on [twitter](https://twitter.com/jovial_core) too
>= 1 Site/Day for a week
Tags: html, beginners, challenge
Published: 2021-04-13 17:47:59

The title is my goal. I started yesterday.
Today's site so far is at https://earlydays.droppages.net/
I would dearly love any feedback, suggestions, comments, etc.
Even really truly very snarky and crude feedback could be good.

"Positive or negative attention... is seen as success." - Michael Franti as Disposable Heroes of Hiphopracy, before Spearhead, before his new fame as a solo artist, back when he was raw and brilliant. ;P

5 tips for the site-making initiated on the path:

1) don't put www. in front of neocities.org

2) Site44 has the best per site pricing I have found, as well as a 30-day trial

3) Good free trials currently also on Dropbox and Droppages

4) Using Dropbox -> Site44, (& maybe others) if you save your index file as html, it will MERGE with the former index.html rather than replacing it.

5) Dropbox -> Forge seems broken
Understanding Node Modules
Tags: npm, node, backend
Published: 2021-04-13 17:43:37

Starting a Node application
1. create a folder - node-examples
2. now intiliaze the package.json by typing - npm init
3. Accept the standard defaults suggested and the update the package.json
file until you end up with the file containing the following
{
  "name": "node-examples",
  "version": "1.0.0",
  "description": "Simple Node Examples",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index"
  },
  "author": "Sonu Jha",
  "license": "ISC"
}


4. now create a file name index.js 

var rect = {
	perimeter : (x,y) =>(2*(x+y)),
	area: (x,y) => (x*y)
};

function solveRect(l,b) {
    console.log("Solving for rectangle with l = " + l + " and b = " + b);
    if (l <= 0 || b <= 0) {
        console.log("Rectangle dimensions should be greater than zero:  l = "
               + l + ",  and b = " + b);
    }
    else {
	    console.log("The area of the rectangle is " + rect.area(l,b));
	    console.log("The perimeter of the rectangle is " + rect.perimeter(l,b));
    }
}
solveRect(2,4);
solveRect(3,5);
solveRect(0,5);
solveRect(-3,5);

5. To run the Node Application type the following at prompt
npm start


A simple Node Module
1. Now create a file name rectangle.js and the following code to it:

exports.perimeter =  (x, y) => (2*(x+y));

exports.area = (x, y) => (x*y);


2. Then Update index.js as follows :

var rect = require('./rectangle');


In Conclusion, A Node Modules are js files that are imported using require() function to use the functionalty.
How to update php version from cpanel
Published: 2021-04-13 17:38:37

---
title:How to update php version from cpanel
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

Often, people do encounter outdated-php-version error warnings that arouses concerns as to what steps to take that will remedy the situation.

Deprecated php version error warnings can result to plugins and themes incompatibility for cms users like wordpress, etc.

Here is a quick and straight forward guide to upgrade low php version to a higher version from cpanel

First, login your cpanel area/dashboard.

Next, navigate to the section where you will see ` Multiphpmanager`

![Image design](https://res.cloudinary.com/chidiebere/image/upload/v1618253463/upgrade%20php/Screenshot_from_2021-04-12_15-58-10.png)

The next action is to click the check box for the domain you want to upgrade your php version to then select the php version by clicking on the dropdown towards your right then click APPLY

![update php version](https://res.cloudinary.com/chidiebere/image/upload/v1618332698/upgrade%20php/Screenshot_from_2021-04-13_17-47-14.png)

Afterwards, go back to your cpanel dashboard then navigate to the section where you have `Select php version`...

![update php version](https://res.cloudinary.com/chidiebere/image/upload/v1618333506/upgrade%20php/Screenshot_from_2021-04-13_17-59-08.png)


...you will be redirected to another interface-- this is where you will set the configuration so that user's website will use the version set in CloudLinux PHP Selector manager.

![update php version](https://res.cloudinary.com/chidiebere/image/upload/v1618334094/upgrade%20php/Screenshot_from_2021-04-13_18-04-30.png)

So click on the `Use PHP Selector`, you'll should see a pop-up, press confirm..

We are done !!!

You can go back to your website to see the effect on your site.

I'm on [twitter](https://twitter.com/jovial_core) too
Create object property string path generator with typescript
Tags: typescript, angular, react, tutorial
Published: 2021-04-13 17:32:29

# Create object property string path generator with typescript

Wow, that was a large noun cluster. Well, what is it anyway?

Now, using some libraries/frameworks you might sometimes need to generate a string that would represent a path to a property of some object, for example when you need to perform a get on Angular's `FormGroup` or have nested form field in `React Hook Form`.

You could create several monstrous constants, ie something akin to:

```typescript
const nestedAddressField = 'user.contacts.address';
```

Or maybe use template strings and enums, but there is a better way.

Typescript 4 bring along amazing stuff: [Template Literal Types
](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html). These are the solution.

Now, using this amazing feature we can create a type with infinite recursion and a helper function to generate all possible property paths an object has for us.

Check this out. First let us create a type that would basically be a colletion of all possible string paths in an object:

```typescript
// For convenience
type Primitive = string | number | bigint | boolean | undefined | symbol;

// To infinity and beyond >:D
export type PropertyStringPath<T, Prefix=''> = {
    [K in keyof T]: T[K] extends Primitive | Array<any> 
    ? `${string & Prefix}${ string & K }` 
    : `${string & Prefix}${ string & K }` | PropertyStringPath <T[K], `${ string & Prefix }${ string & K }.`> ;
}[keyof T];
```

Basically what it does is iterating over object's properties and returning each field as a string with a given prefix. Initially the prefix is empty string, which is nothing. If it encounters a primitive or an array, it returns a string with prefix, if it encounters an object, it then invokes itself recursively, but adds a dot to the prefix. Easy-peasy.

Now what's left to do is to create a simple factory that can generate us helper functions to provide hints:

```typescript
export function propertyStringPathFactory<T, R=string>(): (path: PropertyStringPath<T>) => R {
    return (path: PropertyStringPath<T>) => (path as unknown as R);
}
```

So now instead of walking on eggshells with strings we can use helper function that safeguards us from making mistakes.

Have fun ^_^

Oh, and by the way, there's an [npm package](https://www.npmjs.com/package/property-string-path) with this utility 💪

![Demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ks3uxzd99ni6jmwn2tu7.gif)
Give your users some colour
Tags: css, user, javascript, tutorial
Published: 2021-04-13 17:20:58

This is a real quick one!

If you have a project that involves users interacting with each other, like a chat app or something with profiles, it might be nice to assign them a colour. A bit like WhatsApp names. The challenge is how to make sure the same users always have the same colour as themselves, but within a wide range such that it's effectively random?

You can use ASCII key codes and the modulo operator and combine with HSL for a quick solution that will always return a random, but identical, hue, thereby converting any string into colour.

```javascript

const name = 'Michael Jordan';
const characters = name.split('');
const code = characters.map(a => a.charCodeAt(0)).join('');
// code is 771059910497101108327411111410097110
const hue = code % 255;
const nameHSL = `hsl(${hue}, 80%, 40%)`;

```

Of course, you might prefer to use a UID or 'user created at' timestamp in case you have two Michael Jordans - this works for literally any string!

For anyone wondering, MJ is this leafy green.

![Screenshot 2021-04-13 at 18.14.15](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/esfp1zwvvq2m09qvcoi5.png)

Lovely.
Salesforce: Importing Data
Tags: salesforce
Published: 2021-04-13 17:01:52

*Salesforce has so much terminology it can be a bit overwhelming in the beginning. I am starting a series of short posts to help me learn the definitions.*

-----

##Data Import Wizard
- Import up to 50,000 records

##Data Loader
- Import 50,000 to 5 million records
- Objects not supported by the Data Import Wizard
- scheduled loading like nightly imports

If you need to load over 5 million records check the AppExchange for a suitable partner product.

1. Create an export file
2. Sanitize the data
  - remove duplicates
  - delete unnecessary information
  - correct spelling and other errors
  - enforce naming conventions
3. Confirm that your data will be mapped into the correct Salesforce fields
  - [Field Mapping for Other Data Sources and Organization Import](https://help.salesforce.com/apex/HTViewHelpDoc?id=field_mapping_for_other_data_sources_and_organization_import.htm&language=en_US)
4. Make any required Salesforce configuration changes
  - create new custom fields
  - add new values to picklists
  - temporarily deactivate workflow rules

https://trailhead.salesforce.com/en/content/learn/modules/lex_implementation_data_management/lex_implementation_data_import?trail_id=force_com_dev_beginner
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2021-04-13 17:00:03

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️_

## Time is of the essence

"Despite being a failure at managing my own time, I can still give some advice and tips," writes @technoglot. You sure can! 


{% link https://dev.to/technoglot/time-management-productivity-tips-for-devs-4d33 %}

## The Real Work™ of programming

@adamcoster explains that the Real Work™ of programming mostly consists of things that aren't directly writing code. And documentation is certainly one of them!

{% link https://dev.to/adamcoster/documentation-as-code-40a7 %}

## Try to have a wonderful weekend

As @poudyal_rabin says, weekends are precious. As developers, we often but our personal time on the back-burner since it's especially easy for work to follow us home these days. If you need some inspiration for your weekend, this post is for you.   


{% link https://dev.to/poudyal_rabin/how-to-spend-a-meaningful-weekend-as-a-programmer-353j %}

## Spring cleaning

Need some unit testing tips and tricks for clean code? @thawkin3 has you covered.


{% link https://dev.to/thawkin3/clean-code-with-unit-tests-tips-and-tricks-for-keeping-your-test-suites-clean-483l  %}


## A uniquely portable magic

@jordienr shares a short but sweet list of books that aren't directly related to programming, but are enriching for developers, nonetheless. 


{% link https://dev.to/jordienr/4-books-that-are-not-about-computers-that-made-me-a-good-software-developer-2hac %}


## Create, build and publish a package to npm in ES6

"The npm ecosystem is a great way to distribute useful blocks of reusable code," says @whitep4nth3r. "Through learning how to build and publish packages to npm, I feel like I’ve really levelled up my web dev skills." Congrats! 

{% link https://dev.to/whitep4nth3r/how-to-build-test-and-release-a-node-module-in-es6-296b %}

## You've got mail

@aahnik explains how you can easily send an email using a Python script. If everything goes right, there will be no output in the terminal, and you will see the email sitting right in the recipient's inbox!


{% link https://dev.to/aahnik/how-to-send-emails-with-python-simply-explained-for-beginners-hea %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Tuesday!_
easy way to generate SSH keys from VPS 💻
Tags: tutorial, server, network
Published: 2021-04-13 16:58:15

SSH Key is a standart component used for secure remote shell session through less secure network using various cryptography techniques.

Here's how to generate it from VPS easily.

1. Login to your VPS.
2. Run ``ssh-keygen`` and enter until end.
![SSH Keygen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4196w3h7t3s0faqs58b1.JPG)
3. Check if ``id_rsa`` and ``id_rsa.pub`` on ``~/.ssh`` is created.
![Check Dot SSH](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7sn2txwphj0dsfwohfge.JPG)
4. Run ``ssh-agent /bin/bash``
![SSH Agent](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bkwu068wz4ljhojrzvgl.JPG)
5. Run ``ssh-add ~/.ssh/id_rsa``
![SSH Aff](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spyrab1oseyz33zk21db.JPG)
6. Last thing to do, get ssh key that was created. Run ``cat ~/.ssh/id_rsa.pub``
![Get SSH Key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x4e4sge92h3e2ncwhwln.JPG)

SSH Key was generated! You can use it on any apps that needs it.

**One Run Command**
```sh
ssh-keygen
ssh-agent /bin/bash
ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub
```
Repair Windows EFI partition after a Linux installation
Tags: windows, linux, efi, dualboot
Published: 2021-04-13 16:52:22


I was exited to try the new Gnome 40 update on the latest Fedora beta release, and broke my Windows dual boot. I'm not sure how it happened but the `/boot/efi`partition did not contain any Windows files after installing Fedora, preventing `os-prober` to detect Windows and adding it to Grub2, I was also unable to boot Windows from the UEFI boot selector.

Fixing this took me way more time in internet digging than it should, so this blog article will serve my future self and other careless Linux dual boot enthusiast in case of missing Windows EFI files.

The first thing to do is to [download Windows latest ISO file](https://www.microsoft.com/en-us/software-download/windows10ISO) and create a bootable USB key. For this I used [Balena Etcher](https://www.balena.io/etcher/) which is the most shiny bootable USB maker tool that I could find.

After booting my laptop on the USB key with Windows, I tried an automatic repair which wiped my Fedora boot files in the `/boot/efi` partition, I had to reinstall Fedora, which in turn removed all Windows files again and leaving me back to my starting point, but 3 hours later.

Automatic repair was not what I needed, I had to dig deeper to fix that one. That's when I found the great [BCDBoot](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcdboot-command-line-options-techref-di) command that helped me fix my EFI partition.

Boot your computer on the USB key and navigate to the command prompt, it should be something like: 
`Repair Computer > Troubleshoot > Advanced > Command Prompt`

Once you are in the command prompt use the following command to show your partitions:

```
$ diskpart // Start a diskpart shell
diskpart> list disk  // List all disks
diskpart> sel disk <disk_id> // Select the disk with the EFI partition
diskpart> list vol // List all volumes
diskpart> sel vol <volume_id> // Select the EFI volume
diskpart> assign letter=F // Assign a letter to the EFI volume (I choosed F)
diskpart> exit
$ bcdboot C:\Windows /s F: /f ALL // Create all Windows boot files in F:
```

Note that the `ALL` flag will create files for UEFI and Bios based boot system. You can find all the available option for the `bcdboot` command in the [documentation](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcdboot-command-line-options-techref-di).

I do not have much experience with the Windows shell so let me know if I missed something. In any case I learned something new during the weekend, and I'm glad I fixed my dual boot, I can now go back to playing Planet Zoo on Windows!