teleren/devto huggingface dataset:
3/356 Three is the magic number
Published: 2022-01-09 07:50:07

Hey it's a me!
yeah.
I initially never thought I would make it 3 days in a row and not give up instead here I am.
Today i continue studying pentesting and i hope to try make my first room,  i think i need also  make some challenge onn hackerank in python for not forget , or miss training. 
what do u think make a programmer a good programmer?
have a nice day.

Song of the day: [U2 - Beautiful Day](https://www.youtube.com/watch?v=co6WMzDOh1o)
Use Ternary Operators - Daily JavaScript Tips #2
Tags: javascript, node, webdev, beginners
Published: 2022-01-09 07:27:08

TL;DR The **ternary operator** is a shortcut for `if/else`

It contains three `operands`
- A `condition`
- A question mark `?`
- A colon `:`

### `if/else`
```js
let fruit;
if(fruit === "Apple"){
    return "It is a fruit";
}else{
    return "It is not a fruit";
}
```
### **Ternary operators**
```js
let fruit;
let ternary = (fruit === "Apple") ? "It is a fruit" : "It is not a fruit";
```
See how it got executed in one line

***
Thank you for reading

- Follow me on Twitter - [@codewithsnowbit](https://twitter.com/codewithsnowbit)
- Subscribe me on YouTube - [Code With SnowBit](https://www.youtube.com/channel/UCNTKqF1vhFYX_v0ERnUa1RQ?view_as=subscriber&sub_confirmation=1)
#10 - Valid Spacing CodeWars Kata (7 kyu)
Tags: javascript, webdev, programming, 100daysofcode
Published: 2022-01-09 07:20:58

##Instructions

Your task is to write a function called valid_spacing() or validSpacing() which checks if a string has valid spacing. The function should return either True or False.

For this kata, the definition of valid spacing is one space between words, and no leading or trailing spaces. Below are some examples of what the function should return.

**Examples:**

> 'Hello world' = true
> ' Hello world' = false
> 'Hello world  ' = false
> 'Hello  world' = false
> 'Hello' = true
> // Even though there are no spaces, it is still valid because none are needed
> 'Helloworld' = true 
> // true because we are not checking for the validity of words.
> 'Helloworld ' = false
> ' ' = false
> '' = true

---

> Note - there will be no punctuation or digits in the input string, only letters.

##My solution:

```javascript
function validSpacing(s) {
  return s=='' ? true : s.split(' ').find(el=> el=='') >= 0 ? false : true
}

```

##Explanation
I returned the values using a ternary operator, so first I used a conditional that if the string is empty it will return true, then I used another conditional in which I splitted into an array the string between every space and then I used the find method, so if it finded an element that had an empty space it means that the spacing is not correct and it returned false, else it'll return true


Comment how would you solve this kata and why? 👇🤔

[My Github](https://github.com/Cesardlr)
[My twitter](https://twitter.com/cesar__dlr)
[Solve this Kata](https://www.codewars.com/kata/5f77d62851f6bc0033616bd8)
My First Post and Hackathon
Tags: atlashackathon
Published: 2022-01-09 04:06:38

### Overview of My Submission
Hello everyone, this is my first post, hackathon, and full-stack application! I am a relatively new programmer and have created this with a lot of work, sweat, and tears. I created a flash card application. The inspiration came from all of the learning I have been doing lately. I think learning with flash cards is a great method but buying cards and then writing each one is tiring. Typing them out in this easy to use format is quicker and you don't have to find a place to store them. The main flash card tab has two links: create and view cards. Create does just that: creates a flash card and stores it in the MongoDB (Atlas). View card shows the fronts of the cards and if you click on them, they flip to reveal the answer and an edit and delete button.

[Note]: # Choose Your Own Adventure


### Link to Code:

{% github KFitz114/studySesh %}

[Note:] # Screen Shots

![view cards](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnxif0qr72nwb4de7tz1.PNG)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cm9c8el1urvcqhivla71.PNG)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m551a7d311jn756skhki.PNG)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/41ofbu62y42kon7o7qnm.PNG)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gguknvrf1lbl02r67v7.PNG)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/35svns8d7116ifn50pfq.PNG)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vtc1dexwk0wqly8weli.PNG)
HTML & CSS: A Brave New World
Tags: html, css, a11y, webdev
Published: 2022-01-09 06:47:12

I've attempted to steer my career in the area of web development, all the back in 2006, but something as always stood in my way. Other interests, job, JavaScript (that's a story for another day), to just name a few of those obstacles.

Here in 2022 I'm making the earnest attempt to become a full stack developer and a developer in general. After taking refresher courses in both HTML and CSS, it's incredible how far both languages have come in the years. Compared to when I first started, creating a website is as easy as it's ever been (front end strictly speaking).

CSS3 and HTML5 have introduced some amazing new features; CSS was long overdue for new features that made centering elements easier (yes you read that correctly). Though with HTML5, inclusion has been one of the stand out features. In order to have websites more accessible for people dealing with numerous disabilities.

Called "a11y" (stands for "accessibility" and the 11 represents the 11 letters in between "a" and "y"), the belief is that the world wide web should be fundamentally designed to work for everyone, regardless if someone is using a screen reader, have dyslexia, or even colorblindness. 

HTML5 introduced some new tags in order to aid with making website more accessible. Some we've been using for years - h1, h2, h3 etc... in order to denote what's the main focus of the webpage, and the "alt" attribute when placing images in websites. Here's a rundown of a few new tags that helps with inclusion. 

**Header** - Introduces with the webpage is about, usually includes the h1 tag, possible logo and navigation. 

**Footer** - What I would consider the sister (or brother, cousin, whatever you like) of the header element. The Footer usually contains copyright information.

**Main** - Used to wrap, of course, the main content. This information is related to the content of the page, and every page should contain only one Main element.

**Article** - The Article tag is used to denote specific or self contained content. Think of blog/forum posts, news articles, etc.

**Section** - There seems to be some discourse between when to use Articles and when to use Sections. Section tags are used to group **similarly themed** content, and can be used in tandem with the Article tags.

**Label** - Seen in forms, the Label tag is wrapped around a name or short sentence for a choice or input by the user (checkboxes, email, etc). Labels **need** the **for** attribute in order to associate that label with the option its representing. Because of this, the **for** attribute in labels must match the **id** of the input tag so that everything makes sense, especially for screen readers. 

These new tags are only scratching the surface; for more in-depth details please head over to **The a11y Project** for more on inclusion and accessibly (they even include a checklist) and **MDN Web Docs** for a deeper dive into the tags.
NEW DISCORD SERVER FOR DEVS
Published: 2022-01-09 06:25:14

Hey there Devs,
It's me Dave again
We have created a DISCROD SERVER for y'all. Please do join the server
Invite Link: https://discord.gg/rrR9rZw89m
If you need any help, go ahead and DM me 
My Discord ID: DJ050708#7940
Contact Email: davidjeremiah050708@gmail.com
Some GitHub Terms You Should Know!

Tags: git, github, beginners, webdev
Published: 2022-01-09 06:06:38

GitHub is one of the most used hosting platform for version control and collaboration, we must have heard about the terms like repo and PR in your coding career what do they mean, or simply put what do they even mean to us? here are a few Github terms you must know!

### Repository (Repo)
it is a directory that stores all of the files and folders you used to build the project and it also stores the changes made to the project.

### Commit
commit is a change that you bring to your program, it can be adding, removing, modifying code or files from your project. 

### Local and Remote
your project will have two independent repos one which is offline is called Local and one which is hosted online on platforms like GitHub or GitLab is Remote

### Pull, Push or Fetch
to synchronize your project between local and remote we use these three operations.

**Pull** - pull changes from remote to local

**Push** - push changes from local to remote

**Fetch** - only downloads new data but doesn't integrate it to your working project in local

### Branch

they basically divert you from the mainline of development, so that you can fix the bug or build a new feature and then merge it back without messing up the main code.

### Pull Request
it is simply a way of telling people that you want the changes you made in the branch to get included in Main Code.
My first simple rest api using golang
Tags: go, beginners, restapi, simplerestapi
Published: 2022-01-09 05:49:59

```
package main

import (
	"net/http"

	"github.com/gin-gonic/gin"
)

type album struct {
	ID     string  `json:"id"`
	Title  string  `json:"title"`
	Artist string  `json:"artist"`
	Price  float64 `json:"price"`
}

func main() {
	// new_list := []string{}
	// fmt.Printf("%T\n", albums)
	// fmt.Printf("%T\n", new_list)
	router := gin.Default() //Default returns an Engine instance with the Logger and Recovery middleware already attached.
	router.GET("/albums", getAlbums)
	router.Run("localhost:8000")
}

var albums = []album{
	{ID: "1", Title: "Blue Train", Artist: "John Coltrane", Price: 56.99},
	{ID: "2", Title: "Jeru", Artist: "Gerry Mulligan", Price: 17.99},
	{ID: "3", Title: "Sarah Vaughan and Clifford Brown", Artist: "Sarah Vaughan", Price: 39.99},
}

func getAlbums(c *gin.Context) { //gin.Context is the most important part of Gin.
	//It carries request details, validates and serializes JSON, and more.
	//(Despite the similar name, this is different from Go’s built-in context package.)
	c.IndentedJSON(http.StatusOK, albums) //Call Context.IndentedJSON to serialize the struct into JSON and add it to the response.
}

```
WIHLT - What I Have Learn Today.
Published: 2022-01-08 21:23:13

Today i thought i can create this type of post for maximize the learn of the day.
i can make a recap about what i have learned or studied and try to explain here. 
is in theory like a Feynman's technique? i dont know but i can try. 
Osint and Information Gathering is one of the most powerful tool in ethical hacking! 
is incredible how much information we leave on internet everyday.
is correct when we say the problem in a pc is who is sit between chair and computer.
Crawler is so important but so bad if make a perfect map of a website.
Have all the directory with the path is so...power!
often we underestimate the possibility of a hacker attack and boredom leads us to use frameworks and equipment without changing data or settings, we know that attacks exist but we do not think that they can be interested in us
It sounds like the story of the turkey who is fed every day and thinks it will always be like that, until Thanksgiving comes around.
is incredible this tool too see the framework and techonoly of the website [Wappalyzer](https://www.wappalyzer.com/).
i learn something about the IDOR attack , the attack is change the ID in a link of a page and see other information , and is incredible because in 2014 i made this in a webapplication of my school , i see the link with a number and i tried to change.. this thing reminded me how in hacking, the curiosity is one of the most important skill and probably also empathy.
Today i replied 56 question on tryhackme argoument Webapplication pentesting and phishing.
About w3 i learn how works Metamask , tomorrow i explain what i learned.

Please if u read mistake tell me , i want improve for my error! and forgive me!
I published My new Chapter
Tags: beginners, html, css, javascript
Published: 2022-01-09 05:33:19

I created a new chapter.
Here is the link...

[Subhransu Patra](https://inform-our-world.github.io/Saqha/CH%202.5)

Previous Chapter [Chapter 2.4](https://inform-our-world.github.io/Saqha/CH%202.4)
Recipe Cards Collection - Powered by MongoDB, Responsively Designed
Tags: atlashackathon, mongodb, beginners
Published: 2022-01-09 05:24:13

[Instructions]: # (To submit to the MongoDB Atlas Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
I'm a busy person who likes to save money by cooking at home. The thing I hate the most is when I want to start cooking, but I can't remember the link and I need to spend time searching. I used to print out recipes, but my mom threw them out. I saved things to the tabs on my phone, but my phone reset and I lost those links, too. Basically, with MongoDB and some HTML, CSS, and JS, I managed to create a mobile recipe card system.

I used MongoDB Atlas as my database and Realms as my way to connect to that database easily. Professionally, I'm a UX/UI Designer. I don't know how to use fancy developer tools and this was my first time making something with a backend connection. I spent since the beginning of this hackathon just learning MongoDB and how to use it with a static website.  


### Submission Category: 

Choose Your Own Adventure 


### Link to Code

Live Demo: https://roxioxx.github.io/mongoDB_hackathon/ 
Github Repo: https://github.com/roxioxx/mongoDB_hackathon
{% github roxioxx/mongoDB_hackathon %}


### Additional Resources / Info

**Acceptance Criteria**

- Had to be responsive. If I'm on my phone, the text has to be large enough for me to read without needing to zoom. However, I need to share this with my sister in college, and she wants to read it on her laptop.
- Needs to have links to the source material.
- Ingredients are the most important thing and have to be listed in a certain order.

**Final Notes**

I am so happy to have participated in my first hackathon. I learned so much. I never knew just how difficult it is to deploy a page with dynamic content (like, HOLY COW). I've gained more respect for my developer colleagues. For the future, I know I want to use MongoDB more and keep growing. I hope you like this super simple project. 



[Reminder]: # (Submissions are due on January 13th, 2022 @ 11:59 PM PT/2 AM ET on January 14th, 2022/6 AM UTC on January 14th, 2022).
Top 3 Most Demanding Skills in 2022
Published: 2022-01-09 05:17:48

The subject of computer science is growing in popularity these days, and it is expected to continue for the next decades. Here are some of the fields that will pay you the most in 2022.

## **1. Data Science and Machine Learning

Data science is a branch of study that tries to extract meaning and insights from data using a scientific approach.
Machine learning, on the other hand, is a set of data science approaches that allows computers to learn from data.

Machine learning and [data](https://picsartapks.com/picsart-gold-apk/) science are two high-demand computer technologies that you can learn about on Coursera, YouTube, and Udemy.

## **2. The Blockchain 

**
Blockchain is a security system or system that records information that is difficult to hack or alter, and Bitcoin is a cryptocurrency for which blockchain provides security.

Learn [Blockchain](https://www.edx.org/learn/blockchain)

## **3. Full Stack Development

**
In 2022, full stack development refers to a developer's mastery of all programming fields that pertain to a certain domain. In other words, a full stack developer must be a master of some and a jack of all trades. Full stack development is often used in web development and other fields, however it includes js frameworks such as React/Vue/Angular and node.js in web development.

Learn [Full Stack Development](https://www.freecodecamp.org/news/what-is-a-fullstack-developer/)
mobdro clone
Published: 2022-01-09 04:51:18

**[mobdro clone](https://omninos.in/mobdro-app-clone.php)**:- All things considered, this has not been a blunder on the advancement side. On Thursday, March eleventh, it was made authority that Mobdro has been brought down. This was refined after a cooperation between the Premier League and Spanish specialists. The application no longer loads content, and the fundamental site isn't reachable. Nonetheless, streaming applications being brought down has forever been an instance of bringing one down and ten more springing up in its place. Along these lines, it will be intriguing to check whether there will be any Mobdro clones as it was on account of the Terrarium TV closure.
 
Read More:- **[https://omninos.in/mobdro-app-clone.php](https://omninos.in/mobdro-app-clone.php)**
Add:- James Hendrix 595 Macon Highway, 13 Athens GA 30606
Toll Free Number :- +1 585 457 5655
Email Id:- info@omninos.com
Project 97 - React Native Color Customizer
Tags: react, reactnative, javascript
Published: 2022-01-09 04:10:34

*Hey! I'm on a mission to make 100 React.js projects. Please follow my dev.to profile or my [twitter](https://www.twitter.com/jwhubert91) for updates and feel free to reach out if you have questions. Thanks for your support!*

Link to the repo: [github](https://github.com/jwhubert91/project97_reactNativeColorCustomizer)

![Color customizer app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5y3hklrzzksh7b4pem6w.png)

**If you like projects like this and want to stay up to date with more, check out my Twitter [@jwhubert91](https://twitter.com/jwhubert91), I follow back! See you tomorrow for another project.**
[BTY] Day 12: Auto resurrecting tmux sessions
Tags: betterthanyesterday, productivity, tool, tmux
Published: 2022-01-09 03:59:55

Tmux is great, except when you have to restart the computer. You lose all the running programs, working directories, pane layouts etc. 

`tmux-resurrect` is a tool to persist a tmux environment across system restarts.

But, you have to manually save an entire tmux session or restore the session.

`tmux-continuum` comes as a cure because it continuously saves your tmux environment at regular intervals and automatically restores it when tmux is started.


Checkout here: https://github.com/tmux-plugins/tmux-continuum


```
# In ~/.tmux.conf
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

# https://github.com/tmux-plugins/tmux-continuum/issues/48#issuecomment-527336993
set -g @continuum-save-interval '15'

# Option to display current status of tmux continuum in tmux status line. 
set -g status-right 'Continuum status: #{continuum_status}'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

# Restart / reload TMUX env using : Prefix + I or "tmux source ~/.tmux.conf"
```
Journey to C++
Published: 2022-01-09 03:50:33

## Motive
Many of you might be confused that what does it actually means, right?

**Actually** Journey to C++ is a GitHub Repository created so that peoples like **you** can post various C++ snippets and basic to advance level codes and master C++ along with community!

---

## Know more on GitHub
{% github eagle1309/journey-to-cpp %}

---

## What will be benifits of Contribution?

- You will get to learn more about c++ by examining program written by others

- You will get better and better at c++ if you will practice it by writing more code

- While coding with community you will get to know about some tricks that others use for faster development!

---
Hope you guys will like my small idea so that everyone who wants to learn c++ will get helped! Make sure to contribute and add your codes and snippets _(divided into categories)_ now!
Dev note 8JAN2021

Tags: algorithms, javascript
Published: 2022-01-09 03:40:10

## Leetcode 

**Palindrome Partitioning**
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of 

A palindrome string is a string that reads the same backward as forward.

 

Example 1:

Input: s = "aab"
Output: [["a","a","b"],["aa","b"]]
Example 2:

Input: s = "a"
Output: [["a"]]
 

Constraints:

1 <= s.length <= 16
s contains only lowercase English letters.


**Depth first search approach**

- dfs the possible set of letters starting from index 0.
so like in s = "aaba", start from `s[0] = "a"`,
possible forms would be :
`a` , `aa` , `aab`, `aaba`
Among above candidates, if candidate is not a palindrome we would skip to next candidate.
``` js
function dfs(s, start, subList, result){
  for(var end = start ; end < s.length; end ++){
    if(isPalindrome(start, end)){
    
    }
  }
}

```
If candidate is palindrome, add the current candidate to `subList`, then dfs in after the  next following letter after the candidate.
``` js
function dfs(s, start, subList, result){
  for(var end = start ; end < s.length; end ++){
    if(isPalindrome(start, end)){
      subList.push(s.slice(start, end+1)
      dfs(end+1, subList, result)
    }
  }
}
```
Setup the base condition of this dfs recursive call. Which would be when `start >= s.length`, then add `subList` to result then get out from single recursion. Then backtrack by popping out an element from subList.

``` js
function dfs(s, start, subList, result){
  if(start >= s.length){
    result.push([...subList])
    return
  }
  for(var end = start ; end < s.length; end ++){
    if(isPalindrome(start, end)){
      subList.push(s.slice(start, end+1)
      dfs(end+1, subList, result)
      subList.pop() // backtracking
    }
}
```
Now the whole setup would look like this.
``` js
var answer = function(s) {
    const result = []
    function isPalindrome(s, start, end){
        while(start < end){
            if( s[start] !== s[end]){
                return false;
            }
            start ++
            end --
        }
    return true;
}
    function dfs(s, start, subList, result){
        if(start >= s.length){
            result.push([...subList])
            return 
        }

        for(var end = start; end < s.length; end++){
            if(isPalindrome(s,start,end)){
                subList.push(s.slice(start,end+1))
                dfs(s,end+1, subList, result)
                subList.pop()    
            }
        }
    }
    dfs(s, 0, [], result)
    return result
};
```