teleren/devto huggingface dataset:
[PHP] How to easily get video information from YouTube
Tags: php, linux, webdev
Published: 2021-02-23 13:52:07

If you want to get the video information of a specific channel or the playlist list, I think you will use YouTube API v3.
With PHP, it's good to use the official Google library with Composer, but for certain videos **you can get the video information more easily.**

Specifically, the JSON that stores the video information is called from the API.
that's all!
# JSON request parameter structure
`https://www.googleapis.com/youtube/v3/videos?id=[videoID]&key=[APIKey]&part=snippet,contentDetails,statistics,status`

 [TIPS]The video ID is the character string following "watch? V = ～" in the URL.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0y7fzdyq1ktb54w1fz9.png)
Enter the API key obtained from Google API in [API Key].
# Sample code
Try to get the title of a specific video from YouTube API v3.

``` php
$api_key = "API Key"
$video_id = "Video ID"
$url = "https://www.googleapis.com/youtube/v3/videos?id=" . $video_id . "&key=" . $api_key . "&part=snippet,contentDetails,statistics,status";
$json = file_get_contents($url);
$getData = json_decode( $json , true);
foreach((array)$getData['items'] as $key => $gDat){
    $title = $gDat['snippet']['title'];
}
// Output title
echo $title;
```
8 Resources To Learn Web Development
Tags: beginners, codenewbie, learning, webdev
Published: 2021-02-23 14:36:57

The tech industry has exploded with possibilities since the hit of the pandemic, which seems to be here for the foreseeable future. In adjusting to this new normal, opportunities to learn new skills have rushed to the surface. Maybe they were always there, but a lot has changed and for many people it's now about survival and changing careers to create a better life.

If that's you, here are a few resources (in no particular order) to help you learn to code:

* [freeCodeCamp] (https://www.freecodecamp.org/)
* [Traversy Media YouTube channel] (https://www.youtube.com/c/TraversyMedia)
* [Internet Fundamentals] (https://internetfundamentals.com/)
* [Frontend Masters Web Development Bootcamp] (https://frontendmasters.com/bootcamp/)
* [Interneting is Hard] (https://www.internetingishard.com/)
* [MDN Web Docs] (https://developer.mozilla.org/en-US/)
* [The Web Developer Bootcamp 2021] (https://www.udemy.com/course/the-web-developer-bootcamp/)
* [Learn With Leon Web Development Bootcamp] (https://www.youtube.com/channel/UCGiRSHBdWuCgjgmPPz_13xw/featured)

But wait! Before you go diving head first into every resource to learn "all the things", check out my article [Examine How You Learn] (https://dev.to/debrakayeelliott/examine-how-you-learn-195o) so you don't get lost in numerous resources with no progress. Shiny Object Syndrome is real and it's easy to get caught up in what everyone says you should learn. This quickly leads to information overwhelm and frustration if you don't grasp technical concepts as fast as you see the developers you admire do.  

Now don't let the hype on the interwebs fool you, learning to code is not easy. It will take a lot of time and you will get frustrated. There will be times you'll lose motivation and feel like giving up because it's not clicking the way people who are already successful developers talk about. Trust me.

Finding a supportive community that meets you where you are in your journey, helps you through your struggles and encourages you to keep going is also essential. *Trust me.*

I hope you found this helpful 🙂.

Until next time 👋🏾
How to start a WordPress blog?
Published: 2021-02-23 16:11:16

Be it a blog for your small business or a brand blog to make money, it is easier to build one with a CMS like WordPress.org.

It usually involves 4 steps:

1) Picking a niche to blog
2) Registering your website URL and web hosting
3) Installing blog on WordPress.org
4) Initial settings and the design

See, how easy-peasy it is!!

Being a blogger for more than 5 years, I have compiled a detailed guide on starting a blog to help aspirants and beginners to get started with blogging. I'm sure it helps, please check out it here - <a href="https://www.bloggingexplained.com/how-to-start-a-blog/">How to start a blog</a>
Splat Operator in PHP
Tags: php, operator, magic
Published: 2021-02-24 10:02:48

`...$str` is called a splat operator in PHP (other languages, including Ruby.)

This feature allows you to capture a variable number of arguments to a function, combined with "normal" arguments passed in if you like. It's easiest to see with an example:

```php
<?php

function concatenate($transform, ...$strings) {
  $string = '';
  foreach($strings as $piece) {
    $string .= $piece;
  }
  return($transform($string));
}

echo concatenate("strtoupper", "I'm ", 20 + 2, " years", " old.");
```
Output
```
I'M 22 YEARS OLD.
```
### Latest feature
After PHP 5.5.x, arrays and traversable objects can be unpacked into argument lists when calling functions by using the `...` operator.

```php
<?php
function add($a, $b, $c) {
    return $a + $b + $c;
}

$operators = [2, 3];
echo add(1, ...$operators);
?>
```
Output
```
6
```
That's cool. 😎
The Difference Between i++ and ++i (Postfix vs. Prefix)
Tags: javascript, tutorial, beginners, programming
Published: 2021-02-24 14:37:35

*This post was originally published at [kais.blog](https://kais.blog/p/the-difference-between-i-and-i-postfix-vs-prefix).*

**Let's move your learning forward together!** [Follow me on Twitter](https://twitter.com/intent/follow?screen_name=kais_blog) for your daily dose of developer tips. Thanks for reading my content!

---

JavaScript (and many other languages) support the *postfix* and the *prefix increment operator* (`++`). You have probably seen and used it before.

Often it's used like this:

```js
i++;
```

In this case it's almost equivalent to:

```js
i = i + 1;
```

But, what do you think? Is there a difference between

```js
let i = 3;
const j = i++;
```

and

```js
let i = 3;
const j = ++i;
```

...

Well, yes. The first example uses the *postfix increment operator* (`i++`). The second example uses the *prefix increment operator* (`++i`). At first, it seems like there's no difference. However, it's important to understand what is going on here:

The *postfix increment operator* increments the value and returns the value **before** the increment.

The *prefix increment operator* increments the value and returns the value **after** the increment. 

Let's take a look at our two examples again:

```js
// postfix increment

let i = 3;
const j = i++;

console.log({ i, j }); // { i: 4, j: 3 }
```

```js
// prefix increment

let i = 3;
const j = ++i;

console.log({ i, j }); // { i: 4, j: 4 }
```

Spotted the difference? The value of `j` differs. Therefore, it is important to know this small difference between *postfix* and *prefix*.

By the way, the same applies to the *postfix decrement* and *prefix decrement operator* (`--`). The only difference is, that instead of *incrementing* we are *decrementing* the value.

That's all there is to say. I hope I made the difference a bit clearer. See you soon!

---

**Let's move your learning forward together!** [Follow me on Twitter](https://twitter.com/intent/follow?screen_name=kais_blog) for your daily dose of developer tips. Thanks for reading my content!

*This post was originally published at [kais.blog](https://kais.blog/p/the-difference-between-i-and-i-postfix-vs-prefix).*
Wednesday Links - Edition 2021-02-24
Tags: java, kotlin, microservices, jvm
Published: 2021-02-24 11:12:55

Optional.stream() (2 min read) 🏞️
https://blog.frankel.ch/optional-stream

Distributed Application Runtime (Dapr) v1.0 Announced (2 min read) 🏃
https://www.infoq.com/news/2021/02/dapr-production-ready

JEP draft: Frozen Arrays Preview (15 min read) 🥶
https://openjdk.java.net/jeps/8261007

unmodifiableCollection wrapping (30 sec read) 🌯
https://twitter.com/tagir_valeev/status/1363446543169257473

javadoc tag to avoid duplication of return information (1 min read) 🕳️
https://bugs.openjdk.java.net/browse/JDK-8075778

Writing Meaningful Commit Messages (8 min read) 📜
https://reflectoring.io/meaningful-commit-messages

ARCHITECTURE.md (2 min read) 📝
https://matklad.github.io//2021/02/06/ARCHITECTURE.md.html

Spring's JdbcTemplate + Java 15 Multiline Strings (30 sec read) 📃
https://twitter.com/helpermethod/status/1364511256154169344

JDoctor, a Java library for good error messages (2 min read) 🧑‍⚕️
https://github.com/melix/jdoctor

Multik: Multidimensional Arrays in Kotlin (2 min read) 🕯️
https://blog.jetbrains.com/kotlin/2021/02/multik-multidimensional-arrays-in-kotlin

Simulating Latency with SQL / JDBC (4 min read) 🐢
https://blog.jooq.org/2021/02/15/simulating-latency-with-sql-jdbc/
Download view-only shared Google Drive video
Tags: download, shared, googledrive, googleworkspace
Published: 2021-03-07 15:10:43

---
title: Download view-only shared Google Drive video
published: true
date: 2021-03-01 16:02:56 UTC
tags: download,shared,googledrive,googleworkspace
canonical_url: https://medium.com/@victorleungtw/download-view-only-shared-goo-9226ac5d9f44
---

### Download view-only shared Google Drive video

Last week, I got a Google Drive recording video and it was shared with me with View-Only access. The video was further shared with my team but they are getting access denied on the link. Here are the steps on how to download the video:

1. In Chrome, open developer tools and select the “ **Network** ” tab.
2. Reload the page that plays the video and filter by type “ **videoplayback** ”.
3. Right-click on this link and select “ **open in new tab** ”.
4. Right-click on the video and select “ **save video as** ”.

That is. No external plugin required. And you can upload your video to the shared drive for your teams, or upload it to youtube depending on your use case.

Written by **Victor Leung** who is a keen traveller to see every country in the world, passionate about cutting edge technologies.   
[Get in touch](mailto:hello@victorleungtw.com) | [View my porfolio](https://victorleungtw.com/portfolio)

_Originally published at_ [_https://victorleungtw.com_](https://victorleungtw.com/download-view-only-shared-google-drive-video)_._
To all developers out there
Tags: survey, webdev, coding, ux
Published: 2021-03-09 15:00:20

In recent times, in the galaxy near, nearby... 

There has been released an order in which nearly all of the developers are declared the enemies of the Great Emperor and convicted to be neutralised. Though the situation is drastic, there is a way to prevent the extermination from happening. We, a group of rebel designers, located in the Otasoft system, can stop the Emperor's plans, but to do that we need to understand how the developers think.

We send this cryptic message to all developers out here, looking for the answers only you can provide. This link will explain you everything...

https://docs.google.com/forms/d/e/1FAIpQLSdRu1xmA_n5s14l9x7g3oGyVVZz5539F86PGdqZrTK0F9_MzA/viewform


The fate of the galaxy is in your hands! 


// end of message
Hire Laravel Developer for developing a unique and efficient website

Tags: laravel, php, hirelaraveldeveloper
Published: 2021-03-10 09:30:39

Most of the businesses have their website but not get outcomes as they want because of their website structure and development method. Business success obeys on staying one step ahead of their competitors. A unique business method will create value for their targeted audiences. Successful businesses do not compromise the quality of the product. Reach out to targeted audiences is not an easy task for businesses. For reaching out to those targeted customers, you have to strong online presence on the web. And the main method of making an online presence over the internet is a Website.  

A website is a replica of your business on the internet. People judge your business through your website. So, developing a better website is a necessity. For any quality task, we find out an expert or experienced person to complete their task. Same in website development you should hire an expert web developer. 

Laravel is a famous PHP website development framework. Laravel helps in building a unique and functionally rich website for your business. And developing a website with Laravel framework you should hire larvael developers or laravel development company.

Laravel developers have a high demand on the market because of their comparatively low cost and high efficiency as well as speedy work. Most businesses or company outsourced their website development task. And companies looking for web developers on market. Most businesses hire a Laravel developer for their business because this is a cost-effective and efficient way to develop a website.

Laravel lions is a Laravel Web Development company with hands-on experience in Laravel Development. Provide unique and Spontaneous solutions for your business. Also, a company offers custom Laravel development at an affordable rate.  Being a reputed company, we take care of your Intellectual Property security, and we provide a signed Document for Intellectual Property Protection and also a Non-Disclosure Agreement at the beginning of any project.

So, [hire a dedicated laravel developer](https://www.laravellions.com/hire-laravel-developers/) from Laravel Lions and empower your web Identity.
Backend developers' help needed in research 💡
Tags: webdev, backend, frontend, ui
Published: 2021-03-10 13:36:23

Hi!

We at UI Bakery, a low-code tool for building internal apps, are searching for the ways to improve the interface creation mechanism. We’re running user tests on different apps to find the best approach in visual building. If you have some free time and a desire to have your hands in a low-code tool development, feel free to contact me via [v.romanovskaya@akveo.com](v.romanovskaya@akveo.com), or just [send me a direct message in LinkedIn](https://www.linkedin.com/in/viktoria-romanovskaya-647607102/).

I’m looking for:
– Backend developers
– Those somehow related to backend development
– Developers with not much expertise with frontend

I’ll ask you to do a small task in several similar systems. It will not take a lot of time. :)
Introducing an innovative New Model File System
Tags: javascript, programming, computerscience, cloud
Published: 2021-03-10 13:56:03

[MODLR](https://modlr.co/), an innovative leader in Corporate Performance Management software, will be introducing a series of updates to its Cloud Platform for release in 2021’s Q1. These updates were showcased this month during the live MODLR user group, watch it here.

Included in the updates, is the New Model File System, which provides MODLR’s users with greater flexibility to organise their models and store third-party files within the Corporate Performance Cloud itself.

The Model File System’s features include:
* PDF, MS Excel and MS Word Uploads — The MODLR Model File System will provide users with the ability to upload PDFs and Microsoft Excel and Word Documents to a Model folder.
* Create shortcuts to various model components — Speed up your planning processes further through creating your own shortcuts to model components; optimising your workflow.
* Model File System available in MODLR’s Excel Add-in — The Model File System is accessible through MODLR’s Excel Add-In, allowing users to upload reports from MS Excel to store reports in MODLR.
* Cloud View of MS Excel Reports — In the MODLR Gateway, the Model File System will enable users to open Excel Reports, giving users a web view of Excel Reports within the MODLR Cloud.
* Publish an Excel Folder in MODLR — Users will have the ability to publish Excel folders to their MODLR application, enabling access to an Excel Folder’s processes, variables and more within MODLR.

 <img width="100%" style="width:100%" src="https://cdn.modlr.co/288/art_MODLR_model_file_system_05.gif">

To see more of the features in store for the MODLR Cloud’s 2021 Q1 update, you can watch MODLR’s Roadmap for 2021 [here](https://www.youtube.com/watch?v=WWGW3lHY4xw).
Full background-color that will take the full width on hover
Tags: html, css, nav, hover
Published: 2021-03-10 16:54:48

How can I style my hoverable background color to take full width in a display:flex styling?

I have a navigation link nested in a div class, on hover, the background-color is only around the text content. I want it to take the full width since the display is given a flex-direction of column
Conversão de Tipos de Dados
Published: 2021-03-11 23:31:45

Chegamos a mais um post da minha [saga de estudos](https://dev.to/inando85/bem-vindo-de-novo-javascript-1b48) em JavaScript.

No post de hoje irei falar sobre conversão de tipos.

Significa dizer que é possível converter um tipo de dado para outro, e mais, terão momentos em que fazer isso será necessário para obter determinado resultado na aplicação.

No exemplo abaixo, eu irei criar uma variável `score` e irei atribuir uma `string` para ela. E no console.log irei realizar soma de + 1 ao valor dela, e como já falamos anteriormente, quando uma `string` é somada a um `number`, ocorre a concatenação, logo, não teremos o resultado esperado.

E iremos verificar o tipo do dado da variável utilizando o `typeof`, que irá nos retornar o tipo do dado atribuído a variável. 

```js
let score = '100'

console.log(score + 1) // 1001
console.log(typeof score) // string
```

Eu irei utilizar funções construtoras para realizar a conversão de tipos, não se atenham muito a elas ainda, irei falar de funções mais a frente. Mas é importante saber que converter tipos é perfeitamente possível.

```js
let score = '100'

score = Number(score)

console.log(score + 1) // 101
console.log(typeof score) // number
```

Porém a conversão de strings leva em consideração que se a `string `a ser convertida para `number` não fizer sentido (matematicamente falando), o Not a Number `NaN` será retornado.

```js
const crazyConversion = Number('Maça')

console.log(crazyConversion) // NaN
console.log(typeof crazyConversion) // number
```

Também é possível converter `number` para `string`, utilizando a função construtora `String()`.

```js
const convertedNumber = String(97)

console.log(convertedNumber) // 97
console.log(typeof convertedNumber) // string
```

E ainda existe a possibilidade de conversão para o tipo de dado `boolean`. 

Mas para isso, é importante frisar que no JavaScript, alguns valores são considerados verdadeiros `truthy` e outros falsos `falsy`.

Valores considerados falsy = [0, "", '', ``, null, undefined, NaN]

Valores considerados truthy = Todos os valores que não são falsy.

Sabendo dessa informação, ficará claro o exemplo abaixo:

```js
const booleanConversionTruthy = Boolean('Dominic') 
const booleanConversionFalsy = Boolean('null')

console.log(booleanConversionTruthy) // true
console.log(booleanConversionFalsy) // false
```

Deixo aqui o link para a documentação da MDN sobre [conversão de tipos](https://developer.mozilla.org/en-US/docs/Glossary/Type_Conversion).

________________________________________________________________

Esse foi mais um post da minha saga de estudos em JavaScript Vanilla. Espero que estejam gostando!

Qualquer dúvida ou sugestão, vocês me encontram nas minhas redes sociais:

[LinkedIn](https://linkedin.com/in/inando85)
[GIthub](https://github.com/inando85)
[Twitter](https://twitter.com/inando85)
Supprimer un billet de blog, ça tourne mal
Tags: python, blogging
Published: 2021-06-16 10:56:30

J'ai supprimé par inadvertance mon fichier markdown sur l'article _CUL 0b11_ avec un bon `rm cul-3.md`. Le fail, j'ai validé la commande plus vite que mon ombre _facepalm_.

![meme](https://i.kym-cdn.com/entries/icons/original/000/000/554/picard-facepalm.jpg)

Comment s'en sortir et le retrouver, sans backup ?   
Heureusement Python est mon ami. L'idée est simple : récupérer le code source de l'article, directement depuis le site. Je prends la partie qui m'intéresse.  
Puis avec une recherche internet, je tombe sur _html2text_. Un coup de `pip3 install` et hop je suis parti pour un one-liner dégueulasse :

```
import html2text
open('cul-3.md', 'w').write(html2text.html2text(open('article-en-html').read()))

```

Et voilà, je retrouve mon article correctement nommé. Plus qu`à retrouver les metadonnées de l'article en 30 secondes et c'est bon. Boulette réparée.  
Après test sur un serveur en local (merci `python -m http.server`), il est de nouveau là. J'aime l'informatique.
Day 39: Blackjack Checker
Tags: 100daysofcode, python
Published: 2021-03-12 22:48:37

```python
def read_player_hands():
    player_hands = []
    lines = open('input').readlines()
    for line in lines:
        tokens = line.split(": ")
        name = tokens[0]
        cards = map(lambda s : s.split(" ")[0], tokens[1].split(", "))
        player_hands.append((name, cards))
    return player_hands
 
def eval_hand(hand):
    card_values = {
        'Two'   : 2,
        'Three' : 3,
        'Four'  : 4,
        'Five'  : 5,
        'Six'   : 6,
        'Seven' : 7,
        'Eight' : 8,
        'Nine'  : 9,
        'Ten'   : 10,
        'Jack'  : 10,
        'Queen' : 10,
        'King'  : 10 }
    val = 0
    aces = 0
    for card in hand:
        if card == 'Ace':
            aces += 1
        else:
            val += card_values[card]
    if aces > 0:
        aces -= 1
        val += aces
        if aces > 0:
            if val + 11 <= 21:
                val += 11
            else:
                val += 1
 
    if val <= 21 and len(hand) >= 5:
        return 22
    elif val > 21:
        return 0
    else:
        return val
 
def get_winner(hand_values):
    winning_val = max(map(lambda v : v[2], hand_values))
    if winning_val == 0:
        print("Everyone busts.")
    else:
        winners = [hand_val for hand_val in hand_values if hand_val[2] == winning_val]
        if len(winners) == 1:
            if winning_val == 22:
                print("%s wins with the 5 card trick." % winners[0][0])
            else:
                print("%s wins." % winners[0][0])
        else:
            print("Draw between %s." % " and ".join(map(lambda v : v[0], winners)))
 
def play():
    hand_values = []
    for hand in read_player_hands():
        hand_values.append((hand[0], hand[1], eval_hand(hand[1])))
    get_winner(hand_values)
 
play()
```
A tip on how to stay motivated and not give up when learning to code
Tags: coding, javascript, motivation, learntocode
Published: 2021-03-13 00:39:30

### Remind yourself why you started learning to code

In this [Facebook community](https://www.facebook.com/groups/codecademy.community/) Sunjay A. shared the following advice:
 > “In those days you feel without motivation, take a deep breath and find ways to rest. Next… try to remember the goal you had when you first began this journey. What motivated you then? If you had no specific goal, set one today and work toward that.”

Well, I agree with Sunjay because I believe that remembering why you started can be a nice way to rediscover what inspired you in the first place, reinvigorate your desire to learn, and help you find the motivation to keep going.

Thank you for reading!

You can follow/connect me on:

* [Linkedin](https://www.linkedin.com/in/patrick-tunezerwane-0a901ba8/)
* [GitHub](https://github.com/patricktunez123)
* [Twitter](https://twitter.com/tunezpatrick)