teleren/devto huggingface dataset:
💻 5 Useful VS Code extensions to help you with Javascript, React and Git
Tags: vscode, javascript, react, git
Published: 2021-04-27 08:35:38

This is a list of 5 extensions and themes for VS Code that I often use and find useful.

1. [**ES7 React/Redux/GraphQL/React-Native snippets**](https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets) ✂️
This extension gives use a great number of code snippets to create components or imports faster. The first I do after create a new React component file is to use this extension, which autocomplete the initial part of a new component by just typing `rafc + enter` 🤯
👉 [Here the list of snippets](https://github.com/dsznajder/vscode-es7-javascript-react-snippets#basic-methods)
{% github dsznajder/vscode-es7-javascript-react-snippets no-readme %}
![snippet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t6grmc6notjkmilusy8z.gif)

2. [**Code Spell Checker**](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) 🇬🇧
This is a _grammar checker for VS Code_, I lost the count of how many times this extension saved me from typos. When you misspell an English word as variable or string, the extension will print a blue underline, and you can fix it with right click and see if in the suggested words there is the one needed
{% github streetsidesoftware/vscode-spell-checker no-readme%}
![spell-checker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dorfje2qng8wudvrgp7a.gif)

3. [**vscode-styled-components**](https://marketplace.visualstudio.com/items?itemName=jpoissonnier.vscode-styled-components) 🌈
I use a lot styled-component and thanks to this extension CSS remains colored has normal otherwise it will be considered as a string, and it would be just green text
{% github styled-components/vscode-styled-components no-readme %}
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xeu79zo1vaa6zl09vvh.gif)

4. [**CodeSandbox Theme**](https://marketplace.visualstudio.com/items?itemName=ngryman.codesandbox-theme) 🎨
I often code in CodeSandbox, and then I use that code in my project, I prefer to maintain a theme consistence, that's why I use it
{% github ngryman/codesandbox-theme no-readme %}
![code-sandbox](https://raw.githubusercontent.com/ngryman/codesandbox-theme/master/screenshot.png)

5. [**Git Graph**](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph) 🌳
Git Graph gives you a really nice view of your branches
also, can perform Git Actions, View commit details and file changes, compare any two commits by clicking on a commit, Code Review, etc...
{% github mhutchie/vscode-git-graph no-readme %}
![git-graph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnz2uox8slagsxjou9tn.gif)
Singapore Career Opportunity with Global Leading IT Companies
Tags: java, php, python, software
Published: 2021-04-27 08:19:13

I am helping my clients look for Backend Engineers, they are all global lead IT companies in Singapore.

Basic Requirements: Prefer Bilingual English/Chinese Use one of these languages Java/Python/PHP/Golang/C++ 3+ years of working experiences

Job Description Example:

The backend engineer is responsible for analysing requirements, designing and developing functionalities based on the product requirements. The duty includes optimizing the product for maximum performance and scalability, improve its stability and user experience. You will develop services/ systems/platforms used by products.

The Successful Applicant · Bachelor's or higher degree Computer Science or related fields · 3 or more years' of experience · Write high-quality, clean, maintainable code using engineering best practices · Familiar with one of t he programming languages including Go, Python, C++, and Java; hands-on experience is preferred · Familiar with web technologies(Django, Ruby On Rails, or Node.js) / common network protocols (TCP, UDP, HTTP) / data structures and database / data analytics tech stack(UBA and A/B testing) · Familiar with Linux development environments Skills are optional but preferable · Passionate about coding and programming, innovation, and solving challenging problems

Please feel free to PM me or via email eric.zhang@dadaconsultants.com for a private conversation.
เด็กใหม่ในวงการ
Tags: beginners
Published: 2021-04-27 08:11:29

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

เรียนรู้ #Flutter
โค้ด
https://github.com/warapetch/flutter-input-form
Mobile App Development Company In Gurgaon

Tags: app, development
Published: 2021-04-27 07:58:39

Synram Technolab is one of the <a href="https://www.synramtechnolab.com/mobile-app-development-company-in-gurgaon.html">mobile app development company in Gurgaon</a>. Our motto is to help companies in making businesses efficient and grow at a rapid pace.   

Synram Technolab has handed over multiple projects to the clients. We have experience with all kinds of mobile applications i.e. native apps as well as hybrid apps. Building different projects for different business domains have helped us to know what are the requirements of a particular domain and how to make it efficient.         

As an App Development Company In Gurgaon, we have always given the highest priority to the security of the website and how fast we can make it. We believe Time is money and want to provide maximum value to the clients. 

We as an Android App Development Company In Gurgaon have aced in developing robust mobile applications. We have developed a range of mobile apps ranging from simple to complex and feature-loaded eCommerce apps.        

IOS is also growing in the market. Thus we are also one of the best IOS App Development Company In Gurgaon. 
So, next time if you are looking for a mobile app development company in Gurgaon we can help you.
Combining SQL outer joins with inner joins
Tags: sql
Published: 2021-04-27 07:57:21

When You have 3 tables in an SQL query, and You need all records from `table1 t1`,
but records from `table2 t2` and `table3 t3` only if there is a record on both tables `t2` and `t3`, You have some options:
* Write all outer joins with a `WHERE` clauses

```sql
select t1.field1, t2.field2, t3.field3
from 
  table1 t1 
  left outer join table2 t2 on t1.field1 = t2.field1
  left outer join table3 t3 on t2.field2 = t3.field2
where
  t3.field3 is not null 
```

* Write sub-query

```sql
select t1.field1, t_.field2, t_.field3
from
  table1 t1
  left outer join (
    select t2.field1, t2.field2, t3.field3
    from
      table2 t2
      join table3 t3 on t2.field2 = t3.field2
    where
      t3.field3 is not null
  ) t_ on t1.field1 = t_.field1
```

In my case, I had to have exactly 1 record returned, that was filtered on `t1`.
  
So outer joins with a specific `WHERE` clause with `NOT NULL` expressions would not work, as it could return no rows, if no rows in `t3` matched my requirements.

I tried using outer join for `t2` but inner join for `t3`

```sql
select t1.field1, t2.field2, t3.field3
from 
  table1 t1 
  left outer join table2 t2 on t1.field1 = t2.field1
  join table3 t3 on t2.field2 = t3.field2
where
  t3.field3 is not null 
```

But this would still result in no rows if there were no matching rows in `t3` (silly me)

While searching, I stumbled upon a thread on [StackOverflow](https://stackoverflow.com/a/9714564), with a similar question, and I noticed a strange syntax for the joins:

```sql
select t1.field1, t2.field2, t3.field3
from 
  table1 t1 
  left outer join (
    table2 t2 join table3 t3 on t2.field2 = t3.field2
  ) t_ on t1.field1 = t_.field1
```

As it turns out, this is a shorthand syntax for a sub-query - it just omits the `SELECT * FROM` part.

If we test the same query, rewritten to use a sub-query
```sql
select t1.field1, t2.field2, t3.field3
from 
  table1 t1 
  left outer join (
    select *
    from table2 t2 join table3 t3 on t2.field2 = t3.field2
  ) t_ on t1.field1 = t_.field1
```
We get the same result. 

When looking for a more detailed write up on this, I could not find any. All I could find is a mention of this in
PostgreSQL (I use mostly PostgreSQL for all my projects) docs, when talking about ["Table and Column Aliases"](https://www.postgresql.org/docs/current/queries-table-expressions.html#QUERIES-TABLE-ALIASES).

If You know where I can read more about this construct, please, let Me know.
CSS Modern multi-line ellipsis
Tags: css
Published: 2021-04-27 07:49:27

A while ago I wrote an article on [truncating text with ellipsis](https://daily-dev-tips.com/posts/css-truncate-text-with-ellipsis/), and we used a fail-safe version for the multi-line ellipsis.

Today I'm looking into a more modern and simple approach to solve this truncate problem.

The end result:

{% codepen https://codepen.io/rebelchris/pen/JjExdqO %}

## HTML Structure

The HTML for this assignment is super basic, we just need one big paragraph.

```html
<p>
  Morbi rutrum lectus turpis, sit amet sollicitudin eros condimentum vitae. Integer
  consequat eros vel tortor tempor, et vulputate turpis pretium. Suspendisse vel metus
  sem. Aenean sollicitudin luctus est ac gravida. Curabitur eros tellus, scelerisque sit
  amet suscipit consequat, laoreet at quam. Nullam massa ante, tincidunt quis metus ut,
  consequat facilisis risus. Orci varius natoque penatibus et magnis dis parturient
  montes, nascetur ridiculus mus.
</p>
```

As you can imagine this is way bigger than just three lines right.
Let's see how we can solve this in the modern-day and age.

## CSS Truncate text on 3 lines

To get right to it, we'll be using `line-clamp` to solve this.
Line-clamp will allow us to state how many lines it should cut the text.

```css
p {
  width: 200px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
```

As you may have spotted, for now, this only works if the display method is `webkit-box`.

So far this is by far the easiest way to achieve this, but has some odds and ends, like having to use the display format.

## Browser support

I actually was surprised the browser support for this is quite good.
Most modern browsers support it out of the box.

![CSS webkit-line-clamp](https://caniuse.bitsofco.de/static/v1/mdn-css__properties__-webkit-line-clamp-1619253498523.png)

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Push Git Commit Tanpa Memasukkan Password
Tags: github, git
Published: 2021-04-27 07:39:57

Mager banget gak sih pas mau ngepush ke remote git namun tiap kali ngepush harus masukkin password? Nah GitHub punya cara nih buat connect local git ke remote git, caranya pakai SSH(Secure Shell).

> Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying your username and personal access token at each visit. -GitHub

singkatnya SSH itu adalah tanda pengenal kalian sewaktu kalian ngepush ke GitHub lewat internet biar cuma kalian aja yang bisa ngepush ke GitHub. Kan gak lucu tuh kalo ada stranger tiba-tiba ngepush :D 

Nah langsung aja, step pertama yaitu 

## Membuat SSH key

* Buka terminal / Git Bash(untuk windows)
* Copas code berikut dan masukkan email yang terdaftar di GitHub kamu.
```
$ ssh-keygen -t ed25519 -C "your_email@example.com"
```
atau
```
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
```
* Jika ada prompt seperti ini tekan saja enter, maka akan memilih default value untuk kalian

```
Enter a file in which to save the key (/home/you/.ssh/id_ed25519): [Press enter]
```

## Memasukkan SSH key ke SSH agent

Singkatnya SSH agent adalah tools buat memanage ssh kalian, penjelasan lengkapnya [disini](https://smallstep.com/blog/ssh-agent-explained/).
menjalankan ssh agent.

```
$ eval `ssh-agent -s`
// output > Agent pid 59566
```

```
$ ssh-add ~/.ssh/id_ed25519
```

Note: jika kalian tidak menemukan file bernama`id_ed25519` kalian coba masuk ke folder ~/.ssh dan masukkan command `ssh-add <namafile>`

Masuk ke file ssh kalian, maka akan ada random string seperti ini. *copy kode tersebut. *
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lug1wssz4evc0za9eby.png)
 
## Menambahkan SSH key di akun GitHub

* login ke GitHub kalian
* Masuk ke settings
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bexct5easlw7ei6lsks2.png)
* Pilih SSH and GPG keys ![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xdau4vhwjlzojkmv49b.png)
 
* Click new SSH keys ![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9wkzs7nvly7wxitu8l3f.png)

* Paste code yang sudah di copy sebelumnya kedalam kolom key, untuk kolom title bebas diisi apa aja, misal `Laptop ASUS`, `my MacBook` dll. ![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93a08a9f11j8gzzxr72k.png)
Types of USSD codes - Shared and Dedicated USSD codes
Tags: ussd, sms, ussdcode
Published: 2021-04-27 07:38:33

A USSD code is the number you dial between a * and a # to access a USSD application e.g. *502#. 

There are two types of USSD codes:
- Dedicated code 
- Shared code

##Dedicated USSD code
This USSD code is assigned and used by one or particular organization. It is that organization, which manages that USSD code and is not shared with other organizations. 

An example is *123#.
##Shared USSD code
A dedicated USSD code is not free and can be very expensive to acquire and maintain one. Thus, one can acquire a USSD code and let it be shared by many organizations. 

More often, a USSD aggregator acquires a a dedicated USSD code, shares it to many organization at lower prices compared to the dedicated USSD code. 

Example of a shared USSD code is *123*20#.
- *123# is the main USSD code and
- 20 is the channel

You can observer that, on the main USSD code, you could create many channels for different organizations.  

If you wish to learn how to develop, test an deploy USSD and SMS apps, please checkout this course [Building and Testing USSD and SMS Applications](https://skillsday.co/courses/building-and-testing-ussd-and-sms-applications/) by [Skillsday](https://skillsday.co)
笔记本进启动菜单难
Published: 2021-04-27 07:17:23

好像现在的笔记本进启动菜单普遍不容易，好像是硬件速度太快，很难把握时机，一会儿就进入系统了。我新买的战66笔记本，我尝试了一二十遍，只成功进入过两次，好像得在键盘亮时立刻按住 F9
Add a DM Button to Your Tweet
Tags: ruby, twitter, sinatra, rails
Published: 2021-04-27 07:10:08

Inspired by my twitter friends, I intended to simplify the way of creating Direct Message Button.

## What the Twitter DM Button is?

The Twitter DM Button is an elegant way for you to help others send DM to you. It's default content can be customized.

and it's effect(on mobile device):

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2tes8y2oko5g03r05arl.jpg)

default message is "hello, 🍟~~~" here.

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

It seems that it doesn't work out of twitter environment(like web or mobile app), but you can see the origin tweet by clicking it.

{% twitter 1386690916694380551 %}

## How I Started

At the beginning, I analyzed the link of this button.

```
https://twitter.com/messages/compose?text=hello,%20%F0%9F%8D%9F~~~&recipient_id=1190406529922416641
```

Easy to find, the `text=` part defines the default message and `recipient_id=` is your twitter id(not handle)

so it's not hard to combine a link like this by ruby

```ruby
def make_permlink(content, twitter_id)
  baselink = "https://twitter.com/messages/compose?"
  greetings = URI.encode content
  "#{baselink}text=#{greetings}&recipient_id=#{twitter_id}"
end
```

`URI.encode` convert spaces to `%20` or something.

## How it Ended

I decided to share this "widget" and obviously sharing `.rb` files is not a good idea. So I began to write a web app.

At first I chose Rails but it's like using a cannon to hit a mosquito. So I take some time learning another web framework [`Sinatra`](http://github.com/sinatra/sinatra) and use it.

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

Its simplicity fits this simple web app best. You can see the core code of this project:

```ruby
# twitter.dm.rb

get '/' do
  erb :index
end

post '/' do
  unless params[:handle].empty? or params[:content].empty?
    @permlink = make_permlink params[:content], params[:handle]
  end
  erb :index
end
```

and view

```erb
# views/index.erb

<% if @permlink %>
  <div>
    Your DM Button's link is:
    <%= escape_html(@permlink) %>
  </div>
<% end %>
```

The Repo: [vonhyou/get-twitter-dm-btn](https://github.com/vonhyou/get-twitter-dm-btn)

Web App: [Twitter DM Button](https://whispering-hamlet-89096.herokuapp.com)

ps: I am not familiar with the front-end, if you are interested, welcome to pr 🥺
70 Data Science Cheat Sheets for Everyone in 2021
Tags: datascience, machinelearning, python, analytics
Published: 2021-04-27 06:57:24

In data science, there are various **tools and techniques** which you need to remember. But it’s quite challenging and not possible for everyone to recall all the functions, operations, and formulas of each concept. That’s why **cheat sheets** help us to remind these concepts. So, I decided to share some best **Data Science Cheat Sheets** with you.

I would recommend you **bookmark this article** for future reference. Now without any further ado, let’s get started-

##**Data Science Cheat Sheets**
For your convenience, I have divided these cheat sheets into different categories such as **Python, R, Machine Learning, Big Data, etc.**

So let’s start with the Python cheat sheets-
**[Click to continue reading...](https://www.mltut.com/data-science-cheat-sheets/)**
Day 44 of 100 Days of SwiftUI
Tags: swift
Published: 2021-04-27 06:26:58

I just completed day 44 of 100days of swiftUI. Today I continue learning about animations in SwiftUi. We built this using CGAffineTransform, which describes how a path or view should be rotated, scaled, or sheared.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3fxrg9saxb0h9jo251ye.png)
Kubernetes events aware?
Tags: shell, kubernetes, discuss
Published: 2021-04-27 06:25:58

---
title: Kubernetes events aware?
published: true
description: A simple share to inform you about events, and you're welcome!
tags: shell, kubernetes, discussion
//cover_image: https://direct_url_to_image.jpg
---

This is a call for participation on k8s and command line shell tricks that the lovers will hate and appreciate.

```sh
#!/bin/sh -e
alias k=kubectl
for pod in $(k get pod | sed 1d | awk '{print $1}')
do k describe pod $pod | sed -n /Events:/,\$p
done
```

In case you've a better a solution, let us know. (tip: Kubernetes has other ways to inspect events)
Finding minimum cost of spanning trees using prims?
Tags: python, datastructure
Published: 2021-04-27 06:01:29

## What is a spanning tree?
A spanning tree is a subgraph of tree such that it has all the vertices of given graph but it is not mandatory to cover all the edges.

## What is prims Algorithm?
Prim's algorithm is mainly used to find the minimum cost spanning tree. First, we need to take a vertex which has minimum cost and it is declared as root.From this vertex check adjacent vertices which has minimum cost vist that vertex and continue this process until all the edges in the graph are covered.

## The below example shows minimum cost spanning tree using prims algorithm

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5sgt8gzllghf5y719zsc.png)

## Explantion:
1.From the given graph vertex 1 is choosen as root vertex.It has two adjacent edges of cost 10 and 16 among that minimum cost edge will be choosen.                       
 2.Here 10 is chossen and vertex 2 is choosen,from vertex 2 it has two adjacent edges 7 and 12, from that minimum will be choosen.  
 3.After selecting vertex 4 among the adjacent edges minimum cost will be choosen following the same pattern such that all the vertices from the given graph should be covered.

## The minimum cost of the spanning tree is 10+7+3+8=28
Make A Responsive Footer Using HTML And CSS
Tags: javascript, html, css, webdev
Published: 2021-04-27 06:00:16

On every website you will find what is known as a footer, an essential extension of your website's navigation. Your footer is a reminder of your brand, product, and the various elements of content on your website. It also serves as a great way to enable site search, social share, and contact forms. Having a mobile responsive footer is essential in the mobile age and this article will walk you through adding a responsive footer to your website.

{% youtube CYaQPm2OMHA %}

Download Source Code:- https://www.websitemakers.xyz/2021/04/make-responsive-footer-using-html-and.html

Below is the HTML and CSS required to add a responsive footer to your website.

**HTML Code:-**
{% gist https://gist.github.com/pawanbhayde/ff6a97007ae11c9258d4dee14940df86 %}

**CSS Code:-**
{% gist https://gist.github.com/pawanbhayde/e3872fa828b1385d11a4687f6edaa8ed %}

**Note:-** visit my youtube channel for frontend tutorials

**subscribe to my youtube channel :-** https://www.youtube.com/channel/UCR64vQptythbJ1SmI-ub0Rg
10 Different Types of Computer Mouse
Published: 2021-04-27 05:59:19

With something as fundamental and standard as a PC mouse, it's difficult to envision that there is more than one kind. There is really a wide range of sorts for a wide range of PC mouse to look over. 

Inside the diverse "species" of PC mice <a href="https://www.pickmouse.com/">(or mouses)</a>, there are some that are all the more usually seen like the conventional line mouse or the outdated ball mouse. However, there are a couple of unforeseen curve plans, which can all be found in the accompanying rundown: 

1. Wired Mouse 

2. Remote Mouse 

3. Ball/Mechanical Mouse 

4. Wheel/Scroll Mouse 

5. Optical Mouse 

6. Laser Mouse 

7. BlueTrack Mouse 

8. Touchpad 

9. Trackball Mouse 

10. Gaming Mouse


1. Wired Mouse 

This is your normal, average, fundamental mouse that associates with your PC with a USB wire. There isn't anything amiss with this mouse, yet there is nothing to think of home about all things considered. There is an or more point however about this sort of mouse: they don't need a battery, so they will not at any point run out of charge! <a href="https://www.pickmouse.com/2021/01/how-to-connect-wired-mouse-to-computer.html">(How to connect a wired mouse to a computer).</a> 

2. Distant Mouse 

A remote mouse is only equivalent to its archetype, yet without its tail. It is by and large what the name states; remote! This sort of mouse requires a battery and can be associated with your PC through a USB that radiates radio frequencies. 

3. Ball/Mechanical Mouse 

This was one of the main mice seen utilized with PCs. It utilized an elastic ball to follow movement – the ball would turn toward the path you moved the mouse and the sensor identified it to figure out what approach to move the cursor. This mouse is very obsolete and once in a while seen being utilized any longer. 

4. Wheel/Scroll Mouse 

The wheel mouse can come in all structures; remote, optical, wired and the sky is the limit from there. The wheel alludes to the little wheel appended between the left and right snap catches, which permits you to look all over pages without physically utilizing the parchment alternative on the page. 

5. Optical Mouse 

This is the most normally seen PC mice nowadays. It utilizes a LED light at the lower part of the gadget where the old elastic ball in a mechanical mouse would exist. The LED identifies development through mirrored light. This implies the mouse doesn't chip away at all surfaces; clear glass and plastic surfaces are not ideal.