teleren/devto huggingface dataset:
Don't buy Clubhouse Invite codes from FAKE websites
Tags: clubhouse, apple, ios
Published: 2021-02-15 16:34:42

This is a followup to my last post: https://dev.to/felix_josemon/don-t-buy-clubhouse-invite-from-ebay-sale-3cmo

After I wrote it, I got many folks share their stories on how they were scammed by some shady websites promising them with Clubhouse Invites. As I run a Pay it forward trusted train for [Clubhouse Invite (medium post)](https://medium.com/@felixjosemon/looking-for-clubhouse-invite-codes-pay-it-forward-clubhouse-community-could-help-you-6ee8036babbf) , I thought it's my responsibility to call these CLUBHOUSE INVITE scams out!

A lot, I mean **a lot of innocent folks are getting scammed by total internet strangers with promise of a clubhouse app invite**. They just literally block you once you made the payment or make you download some shady code generator apps. App has spiked growth with Elon Musk and Kanye West (in next few days) going online on Clubhouse.

So a few tips on how to not get yourself scammed when searching for Clubhouse Invite codes.

![Clubhouse Invite Code](https://dev-to-uploads.s3.amazonaws.com/i/gfwxb518ewkijwiw6d61.png)

This is just a search for Clubhouse Invite on Youtube. All the comments says it works and lot of comments from new accounts.

![Don't buy clubhouse invites](https://dev-to-uploads.s3.amazonaws.com/i/jqq0a0qogf5htpc2qm00.png)Some folks like me have identified the BS and called them out on comments.

Do you think it's just on youtube?

Nope! 

Even on Google search there are a lot of fake Clubhouse Invite code generators, which asks you to download other apps and share your Email Address.

Point to note here is **Clubhouse is connected to your iPhone number and there is no Invite code generators for Clubhouse**!!

!["Clubhouse Invite" google search result](https://dev-to-uploads.s3.amazonaws.com/i/al9ept32n8h1l9ws2aki.jpg)

These point to some PDF with "Click here to get Clubhouse Invite" and this!
![Asking to download shady apps clubhouse invite scams](https://dev-to-uploads.s3.amazonaws.com/i/39zi9aai0vejrap4ksf0.jpg)

A lot more cases where someone says to offer invites for 5 or 10 bucks and just ghosts you once you made the payment. Beware of cheap clubhouse invites on Internet.

**I wish everyone took a background check on where they are getting invites from, who they are etc, before falling to these traps or scams. Check twice or thrice whom you are getting invites from, they normally block Innocent people once they get your hard earned money. Don't fall for such traps.**

This is the same reason I started a pay it forward Clubhouse invite train. 

How it works? 

As we get invites we share with next person. And so far we have onboarded 700+ great folks from 50+ countries and counting. 

You can read more here: https://www.buymeacoffee.com/felixbmc or "why I do what I do" on my medium blog above.
++[[]][+[]]+[+[]] = "10"
Tags: javascript, learning, writing, wtfjs
Published: 2021-02-15 16:27:50



บันทึกความเข้าใจ [Why does ++[[]][+[]]+[+[]] return the string “10”?
](https://stackoverflow.com/questions/7202157/why-does-return-the-string-10)

แยกมันออกก่อน
```javascript
++[[]][+[]]
+
[+[]]
```
In JavaScript, เป็น true  `+[] === 0`

`+` จะแปลงบางอย่างเป็น number (เช่น 1+"2")

**ในกรณี `+[]` จะเป็น `+""` or `0`** 
ได้เป็น
```javascript
++[[]][0]
+
[0]
```

`[[]][0]` หมายถึง first element จาก `[[]]` 

[[]][0] return ภายใน array (`[]`)

ลอง `console.log([[]][0]);` ดู

ได้เป็น

```javascript
(+[] + 1) // +A + 1  +A = number
+
[0]
```
ก่อนที่ `+[]` จะบังคับ array ให้เป็นเลข 0 ได้จำเป็นต้องบังคับให้ array เป็น string ก่อน ก็คือ "" 


- `(+[] + 1) === (+"" + 1)`
- `(+"" + 1) === (0 + 1)`
- `(0 + 1) === 1`

```avascript
1
+
[0]
```

JavaScript: [0] == "0"

`0 == "0" is true`

`"1" + "0" === "10" // Yay!`


![b60b490bf6b5a5c239d9a4ab3e705bc2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iulhalf9wp5j9gnaoyp3.gif)
 
## อธิบายเพิ่มเติม Why +[] or +“” equal to 0

เครื่องหมาย `+` (Unary + Operator) นั้นทำให้เราสามารถแปลงข้อมูลจากชนิดข้อมูลอื่นให้เป็นตัวเลขได้ เช่นเดียวกับที่ Number() ทำ

```js
console.log(+[]);  // -> 0
console.log(typeof +[]); // -> number
```
เพราะว่าการใช้ `+` นำหน้าเป็นการเรียก  `.valueOf().toString()`  ดังนั้น

**`+[]` is equal to `+[].valueOf().toString()`**  

---

## มาดูอีกตัวอย่างที่น่าสนใจ

```js
(![] + [])[+[]] +
  (![] + [])[+!+[]] +
  ([![]] + [][[]])[+!+[] + [+[]]] +
  (![] + [])[!+[] + !+[]];
// -> 'fail'
```

แก้บรรทัดแรกก่อน
```js
(![] + [])[0] // +[] = +"" = 0
(false)[0] // -> ![]=false
"f"
```
บรรทัดที่สอง
```js
(![] + [])[+!+[]] 
(false+"")[+true] //->  !+[]=true
(false+"")[1] // -> +true=1
"a"
```
บรรทัดที่สาม
```js
([![]] + [][[]])[+!+[] + [+[]]] 
([false]+[][[]])[1+[0]]
"falseundefined"[10]
i
```
บรรทัดที่สี่
```js
(![] + [])[!+[] + !+[]];
(false+"")[2]
"false"[2]
l
```
ผลลัพท์สุดท้ายคือ  `fail`

### expression simplifies

```js
+[] 
+[].valueOf().toString()
+"" // ->  empty string is  Falsy Values
0  // -> 0 is false  (1 is true)
```

```js
![]  ->  [] is Truthy 
!true
false
```

```js
+!+[]
+true
1
```



🦠Reference🦠: 
- [Why +[] or +“” equal to 0 in javascript [duplicate]](https://stackoverflow.com/questions/36986056/why-or-equal-to-0-in-javascript)
- [unary-plus-operator](https://www.babelcoder.com/blog/articles/unary-plus-operator)
SpOngEboB TExt
Published: 2021-02-15 16:25:56

This is the first program that I wrote for my enjoyment. I wrote this program in c++ when I was taking an intro to c++ class in NHTI. This program is important to me because it was the first time that I realized I really enjoyed coding and saw the potential that coding offered. I saw that you could make useful code even with a basic understanding of programing. Solving problems no matter how small they are is a lot of fun for me. In this program I solved a problem that most people didn't even know was a problem. "Mocking your friends by typing back their sentence in `spongebob text` takes up way too much time." In this project I made it easier to randomize the capital letters in a sentence and greatly enhance the user's ability to joke with their friends. It's extremely simple It uses the randint function along with ASCII values to change lowercase letters to capital letters.
```
#include <cstdlib>
#include <ctime>
#include <iostream>
using namespace std;

string spongebob(string sentence)
{
    int * sentence = new int[sentence.length()];
    for(int i = 0; i < sentence.length(); i++)
    {

        int j;
        j = (rand()%2)+1;

        sentence[i] = j;

    }

    for(int i = 0; i < sentence.length(); i++)
    {
        if (sentence[i] == 32)
        {
            if(sentence[i] == 1)
            {
                sentence[i] = '?';
            }
        }
        else if(sentence[i] == 1)
        {
            char temp = thang[i];
            temp = temp - 32;
            sentence[i] = temp;
        }
    }

    return thang;

}
int main(){

    srand((unsigned)time(0));

    string jason = "yeah that program is ok at best";
    cout << spongebob(jason);
}
```
We've made the decision to not move forward at this time
Tags: interview, rejection
Published: 2021-02-15 16:24:10

Last week I completed a third interview for a company, a pair programming session with the company's lead developer. I completed the tasks in a reasonable time, and pushed myself to use the syntax the company prefers. All in all, I felt I had an decent interview and I stuck around to chat with the lead developer for ten minutes after the challenge was over. Within one hour I received an email notifying me I would not move on to the next round.

*After trapping myself with my thoughts for a 12 mile run I came to some realizations, along with more questions.*

I completed my coding bootcamp just over two months ago, and I've been aggressively job hunting since the first week of January. I've had trouble knowing how to spend my time, and what exactly I should be focusing on each day.

In no way did I feel I deserved a job so early in my job hunt, and I was clearly not the best technical candidate for this position, so why did this rejection crush all my hope of finding a job so easily?

## Is this a job I wanted?

By all standards this was an awesome job opening.  The opening was a full-stack position at an up and coming company, the tech stack is mostly familiar to me, and there was lots of room to grow quickly. I would have been challenged in many ways in this position, and very happy to secure employment for my family's sack.

## Is a full-stack position what I want? 

I would have been thrilled with this position, and happy to apply my knowledge.

But... Do I enjoy working on backend code for hours on end? No, not really. I enjoy keeping things organized, and solving problems but I rarely open up backend code to play around. Working on backend code is a means to an end for me, and my primary goal is to complete it so I can move on to the frontend. 

When I have free time, I obsess over hex colors, about responsive designs, and font choices. I read about accessibility, and perform assessments on "cool" sites ( news flash - they don't pass many accessibility requirements ) then I rework my portfolio for the twentieth time. Maybe I never entirely kicked design school out of my system? Maybe that's ok.

## So what do I want?

I want to make sites that are really beautiful, and work really well - for everyone. I want to keep learning about CSS at a super granular level. I want to make sure websites are accessible, and easily understood. I want a job where they want me to become certified in accessibility and value passion for that. I want to take designs and make them into responsive layouts that look good on any screen size. Working on those issues every day sounds like a dream come true. 

I suppose it's time I hang up the idea that I will be a full-stack developer. I clearly love working on the frontend, and I have been too afraid to admit that before. I was really mad that I was good enough for this position, but maybe I was never going to love it. I will continue to search for a job that I can sink my teeth into what I love to do.
TypeScript Basics for Automation
Tags: typescript, node, automation, javascript
Published: 2021-02-15 16:21:46

Typescript is the buzzword in the javaScript world without a doubt. The question do Quality Engineers dealing with nodejs automation with tools like WebdriverIO, Cypress, Playwright, Protractor, Puppeteer need to get on to that wagon?

The short answer is, Yes definitely.

In this video below, I have explained the basics of typescript and these points

1. Shortcomings in javascript
2. How to configure Typescript
3. TypeScript Example
4. tsc TypeScript compiler
5. What is ts-node
6. tsconfig.json

{% youtube U3kOuNxvlk4 %}
Cheers
Ap.
#DevHack: CORS for Cloudflare cached Azure Storage blobs
Tags: cloudflare, cdn, webdev, azure
Published: 2021-02-15 16:15:33

In the previous post, I told you why we moved to Cloudflare CDN to serve our Azure Storage files instead of Azure CDN. During the testing of Cloudflare, I found out that CORS headers were not present for the files. Usually, this is not needed if you only retrieve one file, but if you want to retrieve another file, for instance, a template from your site, these cross-origin resource sharing headers are required.

> **Info**: Read more about the move to Cloudflare here: [Use Cloudflare CDN for your Azure Storage caching](https://www.eliostruyf.com/devhack-cloudflare-cdn-azure-storage-caching/).

On the Azure CDN, I configured the CORS as an extra header to send with the response, but on Cloudflare, you cannot configure it easily on the portal. Luckily there are two ways to provide CORS headers via Cloudflare:

1. Create a Cloudflare worker that processes each request and adds the header. This approach requires some development and should only be used, in my opinion, if you do not have another choice.
2. On the Cloudflare support site, they state to set the CORS headers on the *origin server*. [Using cross-origin resource sharing (CORS) with Cloudflare](https://support.cloudflare.com/hc/en-us/articles/200308847-Using-cross-origin-resource-sharing-CORS-with-Cloudflare). This approach is pretty straightforward.

## Setting CORS headers on Azure Storage

All you need to do to set the CORS headers is to open your Azure Storage Account in the Azure Portal. On the Azure Storage account, you can search for **CORS**.

For each of the services, you can define the CORS setting individually. In my case, I am only interested in the `blob service`. You can define for which kind of actions you want to pass the CORS headers on this settings page.

![Azure Storage Settings](https://dev-to-uploads.s3.amazonaws.com/i/a6g3omatks3ic8gnqhcn.png)

Once you set your preferred settings, go back to Cloudflare and purge your cache to see an effect on all the files immediately.

First published on: [https://www.eliostruyf.com/devhack-setting-cors-azure-storage-blobs-cloudflare/](https://www.eliostruyf.com/devhack-setting-cors-azure-storage-blobs-cloudflare/)
Basic data-structures every programmer should know pt1: Ref cards
Tags: webdev, javascript, python, watercooler
Published: 2021-02-15 16:15:31

The data structure is a method of organizing the data for effective use.
It is important to understand the different data structures available for understanding and approaching a specific problem effectively. 
Below are some of the data structure ref cards from the microideation app. 

##Arrays
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xfqhsvdgknbbck7rrtk5.jpg)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/x62tsahs6rnytjd9ale3.jpg)

##Linked List
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lep9yzyxvrs5z1tuwuoc.jpg)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/553rocjyanfxsh80mj6u.jpg)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/saydtyg756qvv65qbvqu.jpg)

##Doubly linked list
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/t59sa5lbawtyditz2zrx.jpg)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6j59l2h7bmm9lei8s9y5.jpg)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rm9tx7tgap9suqbmng1z.jpg)

##Circular linked list
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1u1cwtn35mn6iink7n82.jpg)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gqcq5gyas3zdazw7t1jc.jpg)

Casual learning is a method of learning the topics that are split into simple self-contained content ( preferably within 500 characters ). Programming is a wonderful area for casual learning as you can understand the concepts as simple explanations. It's a simple approach for beginners to get started as well as experienced programmers to refer to as reference cards.

For this and more content on data structure and other programming topics, you can download and use the microideation app for free ( no mandatory registration). You have the ability to view related ideations or to freeze an interesting topic/subject and follow.

https://play.google.com/store/apps/details?id=com.microideation.app

More details
https://www.microideation.com
WordPress - Create database tables programmatically
Tags: wordpress, database, plugin, activation
Published: 2021-02-15 16:09:41


```php
<?php

/*
Plugin Name: Demo Plugin
Plugin URI: https://shwetadanej.com/
Description: A simple way to create custom database tables and it's CRUD operations from WordPress admin panel
Version: 1.0.0
Author: Shweta Danej
Author URI: https://shwetadanej.com/
Text Domain: demo-plugin
*/

/**
 * Add function on plugin activation hook
 */
register_activation_hook(__FILE__, 'sd_plugin_activation');

/**
 * Callback function of plugin activation hook
 * This will check if website is multisite or not, if yes then loop through it and create table for each website
 *
 * @return void
 */
function sd_plugin_activation()
{
    $db_created = get_option("sd_db_created");
    if (!$db_created) {
        global $wpdb;
        $table1 = $wpdb->prefix . 'sd_tbl_1';
        require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
        $charset_collate = $wpdb->get_charset_collate();
        $table1_query = "CREATE TABLE IF NOT EXISTS " . $table1 . " (
            id int(11) NOT NULL AUTO_INCREMENT,
            user_id int(11) NOT NULL,
            date date NOT NULL,
            time time NOT NULL,
            PRIMARY KEY id (id)
        )$charset_collate;";
        dbDelta($table1_query);

        $table2 = $wpdb->prefix . 'sd_tbl_2';
        $table2_query = "CREATE TABLE IF NOT EXISTS " . $table2 . " (
            id int(11) NOT NULL AUTO_INCREMENT,
            question text NOT NULL,
            answer varchar(50) NOT NULL,
            PRIMARY KEY id (id)
        )$charset_collate;";
        dbDelta($table2_query);
        update_option("sd_db_created", true);
    }
}


```
Day 2
Tags: 100daysofcode
Published: 2021-02-15 16:01:03

Day 2/100 of #100DaysOfCode

Hidden-Search-Widget | Face-Recognition-Brain | Codewars

Hours coded: 4.6

Lines of code: 495

Keystrokes: 4914

1.Completed the Hidden-Search-Widget project. It was part of the "50 Projects in 50 Days" Udemy Course.

Technology: HTML, CSS, JavaScript DOM

2.Today I completed the "API, Sign in & Register Form" part of the Face-Recognition-Brain Project. This web app can detect faces. It was part of "The Complete Web Developer in 2021: Zero to Mastery" Udemy Course.

Technology: React, Clarifai-API, tachyons, react-tilt, react-particles-js

3.I solved the "Take a Ten Minute Walk" problem on Codewars.

via @software_hq's #vscode extension https://www.software.com/100-days-of-code
A Couple VSCode Themes I Made 🎨
Tags: vscode, productivity, webdev, programming
Published: 2021-02-15 15:46:06

---
title: A Couple VSCode Themes I Made 🎨
published: true
description: 
tags: vscode, productivity, webdev, programming
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/id2l0xrxhoiecz644g0n.png
---

I made a couple of VS Code themes that I thought I'd share with you all!

---

# 1. Neon Glow

I'm a fan of neon color schemes and dark themes, so I figured I'd try my hand at making my own neon theme.

![Neon Glow Theme](https://dev-to-uploads.s3.amazonaws.com/i/id2l0xrxhoiecz644g0n.png)

## [Install Neon Glow](https://marketplace.visualstudio.com/items?itemName=NickScialli.neon-glow-theme)

---

# 2. Svelte Dark

I have been getting into the Svelte framework and decided it could use a dark theme.

![Svelte Dark Theme](https://dev-to-uploads.s3.amazonaws.com/i/qw40odg1ic1eserufcan.png)

## [Install Svelte Dark](https://marketplace.visualstudio.com/items?itemName=NickScialli.svelte-dark)

--- 

# Let Me Know What You Think

I'd appreciate it if you tried out these themes and let me know what you think! I'm certain they're not perfect so I'd love any suggestions.
Vue Clean Celebrates Its First 10K Downloads
Tags: vue, showdev, javascript, webdev
Published: 2021-02-15 15:45:54

When I started developing with Vue I often found myself doing the same steps everytime I wanted to set up a new project. As developers we want to automate as much as possible to reduce errors, and so the idea for this plugin came up to my mind.

>What if I build a script to delete all the unnecessary files and download the right dependencies to my project? That's nice, but what if there are other developers who are struggling with this same problem?

Immediately after thinking this I went to the Vue documentation about how to build a custom Vue CLI plugin, and deployed the first stable version of Vue Clean back in September, 2020.

Today, Vue Clean has **10K** downloads on **npm** with an average of **2.2K downloads per month**, and all I can say is **¡THANK YOU!** 🙌🏼. And  If you haven't download it yet, please give it a chance, I would love to hear your feedback. (Also don't forget to give it a star ⭐ while you are at it).

{% github https://github.com/DevTony101/vue-cli-plugin-clean %}

While we are here I want to show two new features Vue Clean has:

- **Auto-export Vuex Modules**: If you work with Vuex, you know the hassle of creating modules and importing them in the Vuex instance for every module you create. As per version **v0.5.0** Vue Clean comes shipped with a script that auto-import all modules inside the `vuex/` folder, so you can focus on what really matters, the code!
- **Props for the BaseButton component**: If you have been working with the base button template, you'll be glad to know that now the component includes props for controlling the _width_ and _height_ of the button. This feature was introduced in version **v0.5.1**.

Thank you for reading this far! I'm excited to see what awesome projects you can do with the help of Vue Clean.

See you next time 👋🏼.
forEach() Array Method
Tags: javascript, loops, array, beginners
Published: 2021-02-15 15:44:26

JavaScript provide us with several built in functions to work with arrays which are know as Array Methods. Lets take a closer look at JavaScript  forEach() method.

The forEach() method executes a callback function for each element of array. That callback function accepts between one and three arguments:

* Current Value (required) – The value of the current array element being processed in loop
* Index (optional) – The current element’s index number
* Array (optional) – The array forEach() was called upon

Considering that we have the following array below:

```
const numbersArray = [1, 2, 3, 4, 5];
```
Lets apply forEach() method to numbers array, you need a callback function (or anonymous function):

```
numbersArray.forEach(function() {
    // code
});
```

The function will be executed on each element of the array. It requires the current value parameter which represents the element of an array which is currently being processed in loop:

```
numbersArray.forEach(function(number) {
    console.log(number);
});
```

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/puaht7kosiosl1gzam5a.png)

This is the minimum required syntax to run forEach() method.

Alternatively, you can use the ES6 arrow function representation for simplifying the code:

```
numbersArray.forEach(number => console.log(number));
```
If you enjoyed this post please share, and follow me on [DEV.to](https://dev.to/alitahashakir) or [Twitter](https://twitter.com/AliTahaShakir) if you would like to know as soon as I publish a post! 🔥
Meet Developers where they are and build inclusive developer communities
Tags: devrel, podcast, inclusion
Published: 2021-02-15 15:41:49

**Theme of the week:**
How integral is "community" in Developer Relations?

For the first episode of 2021, we are joined by a great friend, Leandro Margulis.
Community is all about people coming together and working together. But, do you really need to build your own community?
We talked about this with Leandro and also about several Developer Relations and community topics:

* What he loves most in Developer Relations 
* How integral is "community" in Developer Relations 
* Tactics to make your community more welcoming - and hence more inclusive
* Do you need to build a community?
* Meeting developers where they are
* The future of Developer Relations

Listen to this episode to meet developers where they are and make your community welcoming.

{% spotify spotify:episode:1RSbxNi200NARqX20GN9yk %}

##Let’s talk Data
This is the graph we discuss with Leandro: [Ranking of reasons for adoption] (https://www.devrelx.com/trends?lightbox=comp-kisqz2fe3__item-kisqu8ax_runtime_dataItem-kisqz2ff).
**Trends page now has a new look and fresh graphs! Make sure to check it out.**

**Leandro Margulis** is the VP of Developer Relations at UnifyID. He is an entrepreneurial leader with strong Business Development experience, effective sales and marketing skills used to launch new products and businesses. Leandro sits at the intersection between business and product, thinking creatively about product and partnerships to fulfil the customer's use case. Leandro is the customer's advocate internally and the company's advocate externally. Prior to joining Unify ID, Leandro led Developer Relations at TomTom. In this role, Leandro led a global, multidisciplinary team including Sales, Marketing, Product Marketing and Developer Portal engineers with the mandate to build the developer community around TomTom Maps APIs.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/vo1tofghb512rlgs8e8t.jpg)