teleren/devto huggingface dataset:
Maneira simples de construir objetos utilizando Object.assign
Published: 2021-08-03 19:38:39

Quando trabalhamos com formulário as vezes precisamos ter uma maneira mais prática de fazer "a coisa" acontecer. 

Passei por uma situação quer precisava realizar a união de dois objetos, literalmente fazer um merge.

E encontrei essa solução que achei incrível e sem dúvida vai me facilitar muito a vida a partir de hoje. 

Vamos ao exemplo!

Temos informações básicas de um cliente.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3brh7mg2kgwmnvtyrd44.png)

Também informações básicas do cartão de crédito desse cliente.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sdd24jvgo1v81nnogl0p.png)

Podemos usar o Object.assign dessa forma para unir esses dois objetos e ter um consolidado dessa maneira e formar um novo objeto que para o nosso exemplo vamos chamar de fatura.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3bls1r3j85ztvv24olz9.png)

Como resultado teremos o seguinte objeto.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3na2k88rw1mbc7xyupg.png)

Podemos ir um pouco mais além e como você chegou até aqui, vou demontrar um segredo legal. Agora vamos supor que precisamos adicionar um array dentro desse objeto, esse array contem a descrição dos itens que devem ser pagos.

Para isso basta criar um novo objeto do tipo array e fazer o seguinte:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6frsxfevimt2d2itdlll.png) 

No exemplo criei um objeto cobranca que armazena um objeto contendo o array das parcelas pendentes. O próximo passo é usar o Object.assing para fazer o merge desse objeto cobranca com o objeto fatura.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adnojdq98axrc8y50bqo.png)

e temos o objeto fatura com o objeto cobranca.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f1j8ejnxlf5cd3aidetx.png)
  
Concluíndo... 
Usar Object.assing pode ser muito útil e versátil, atualemente uso muito esse recurso no Angular porque ele permite para alguns casos específicos montar o objeto de json de maneira mais livre, isso é muito útil quando estamos trabalhando com formulários que possam exigir um pouco mais de flexibilidade.
So you ever wonder what the heck is kubernetes
Tags: kubernetes, devops, docker, aws
Published: 2021-08-03 17:11:30

Well kubernetes is like a control panel of a space ship that manages and gives a form of control of the different engines, network,  and components of the space ship to the space pilot; Kubernetes simply controls and manage a huge list of mini like computers that are kind of isolated from each other.

It's management process includes and not limited to deploying new mini computers when old ones fail: which is called a fault-tolerant system; Creation and management of network to various mini computers that it manages; Allocation of resources and secrets like password between various mini-computers; Ability to control shutting down and deployment of new mini like computers; Ability to observe, monitor and alert this mini computers; there is a whole lot more that is not mentioned.

This mini computers are actually containers that are running.
Follow me to catch my coming series on how to be a devops engineer.
TIL: Wildcard SSL certificate does not support nested subdomains
Tags: todayilearned, web
Published: 2021-08-03 18:48:52

---
title: TIL: Wildcard SSL certificate does not support nested subdomains
published: true
description: 
tags: til, web
//cover_image: https://direct_url_to_image.jpg
---

A wildcard SSL certificate for `*.example.net` will match sub.example.net but not `sub.sub.example.net`. You need to generate a separate certificate for `*.sub.example.net`.   

[Source](https://stackoverflow.com/questions/2115611/wildcard-ssl-on-sub-subdomain)


Free Cloudflare account does not support creating a wildcard SSL certificate for `sub.sub.example.net`, [you need $10/m subscription for Advanced Certificate Manager from Cloudflare](https://community.cloudflare.com/t/argo-tunnel-nested-subdomain/273061/2).
Hello World!
Tags: devjournal, beginners
Published: 2021-08-04 04:21:42

Hello world! I've been a long time lurker and have posted may once or twice under a different name, but switching over here since this is my serious name. All jokes aside, I'm making it a point now to focus on development, blogging, and sharpening my skills in order to both share and monetize a couple of blogs as a side hustle. Here's what I'm working on right now:

- Being an Admin of a Wordpress site and trying to do it for free. 
- Building and running my own blog built from Hugo to hopefully share knowledge with both beginners and folks who need some help with tech
- My own personal portfolio site

I'll be using this dev.to blog to bring anyone who is curious along the way. I'll also be looking to learn React, Gatsby, and whatever it takes to make my own portfolio site shine since that will be the most complicated of the bunch. The other two I just want to be simple, fast, to the point and make a difference in peoples lives. 

So I hope this and my subsequent posts help someone out in the future with getting started with getting with their own site or set of sites and know that we all need to start somewhere!
borb, the open source, pure Python PDF library
Tags: python, pdf, borb
Published: 2021-08-04 06:24:11

1. Hyphenation ensures your document just flows, without the hideous gaps

    ![c64gpukzted71](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ef2kgo1mhmc65t5x77h.png)

2. borb allows you to use emoji, even if your font doesn't contain these characters.

    ![cj805rlzted71](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ji4eowebnv1fd8idxhoy.png)

5. Lists and Tables (or combinations thereof) are no issue for borb

    ![g4geunkzted71](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ouoojpzziremga0gv546.png)
 
2. borb comes with an extensive library of line-art, to ensure your documents are always on fleek. You can tweak line-thickness, stroke color, fill color, etc

    ![po41epkzted71](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yoxswds8csts2d85xah6.png)

1. borb can handle any MatPlotLib figure, as well as regular images (url, path, PIL)

    ![yf75bnkzted71](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/leadeph90wdc7gs7zvqb.png)


Check out the project on [Github](https://github.com/jorisschellekens/borb), or download directly using [pip](https://pypi.org/project/borb/).Be sure to have a look at the extensive [EXAMPLES.md](https://github.com/jorisschellekens/borb/blob/master/EXAMPLES.md) file, which should answer most (if not all) of your questions.

I would appreciate it if you star my repo.
How to make Infinity!
Tags: javascript
Published: 2021-08-04 08:46:17

### New Method to make `Infinity`!
> So... I found a new way to make `Infinity` in Javascript!

#### This is how:
> Using `parseInt()` with `.repeat()`! 🤣

#### Meaning of `parseInt()`
> `parseInt()` basically converts a string into Integer. If some invalid string is passed (like: "hi"), it returns `NaN`

#### Meaning of `.repeat()`
> `string.repeat()` returns the same string but repeated the number of times given! 

#### Using it to make `Infinity` ∞!
> Code:

```js
   parseInt(`${"9".repeat(999)}`)
```

> So if you just use
```js
   "9".repeat(999)
```
> It will return something like this: 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u44hxmbpnijjhe5ol62d.png)
> More the 9's more the number's digits! (But I used `999`)

> #### Now, `parseInt` converts the string with the `999` 9's into an integer. The integer is so big that javascript treats it like `Infinity`!

> #### Yay we got `Infinity` in javascript!

#### 😳 I found this when trying to make a string with millions of `Hi!`s


[**New**] Easier way 
```js
Math.pow(9999, 9999)
```
JINA AI | Cloud native neural search
Tags: jina
Published: 2021-08-04 11:38:55

Jina AI is a neural search company. Jina is the core product, released on April 28th, 2020. The official tagline Jina put on it's Github repository is: Jina is a cloud-native neural search solution powered by state-of-the-art AI and deep learning. To put it simply, you can use Jina to search for anything: image-to-image, video-to-video, tweet-to-tweet, audio-to-audio, code-to-code, etc. To understand what we want to achieve at Jina AI, I often explain Jina with the following two expressions.

Google recently announced they are using a “neural matching” algorithm to better understand concepts. Google's Danny Sullivan said is being used for 30% of search queries. Google has recently published a research paper that successfully matches search queries to web pages using only the search query and the web pages.

A "TensorFlow" for search. TensorFlow, PyTorch, MXNet, and Mindspore are all universal frameworks for deep learning. You can use them for recognizing cats from dogs, or playing Go and DOTA. They are powerful and universal but not optimized for a specific domain. In Jina, they are focusing on one domain only: the search. We are building on top of the universal deep learning framework and providing an infrastructure for any AI-powered search applications. The next figure illustrates how they position themselves.
A design pattern. There are design patterns for every era, from functional programming to object-oriented programming. Same goes for the search system. 30 years ago, it all started with a simple textbox. Many design patterns have been proposed for implementing the search system behind this textbox, some of which are incredibly successful commercially. In the era of neural search, a query can go beyond a few keywords; it could be an image, a video, a code snippet, or an audio file. When traditional symbolic search systems cannot effectively handle those data formats, people need a new design pattern for the underlying neural search system. That's what Jina is: a new design pattern for this new era.

## JINA RESOURCES

Github: https://github.com/jina-ai/jina/
Opensource: https://opensource.jina.ai
Website: https://jina.ai
Twitter: https://twitter.com/jinaai_?lang=en
LinkedIn: https://www.linkedin.com/company/jinaai
Press: press@jina.ai
Are you above average?
Tags: seniordev, juniordev
Published: 2021-08-05 07:50:21

---
title: Are you above average?
published: true
date: 2021-08-04 00:00:00 UTC
tags: seniordev,juniordev
canonical_url: https://jhall.io/archive/2021/08/04/are-you-above-average/
---

> “It seems like everyone with more than 5 years coding experience thinks they’re above average.”  
> — A developer friend of mine, in disgust

Bob Martin once famously recounted that since the beginning of the computer industry, roughly starting with Alan Turing in the 1940s, the majority of software developers have had less than 5 years experience. Roughly, this holds true today, too, for the simple reason that the industry is growing faster than people leave the field.

The newest [StackOverflow Developer Survey](https://insights.stackoverflow.com/survey/2021) seems to show a similar pattern:

![](https://jhall.io/archive/images/years-coding-survey.png)

49.53% of respondants had 9 years coding experience or less. And given that this survey has a large selection bias, we can assume that if we were to do a representative survey of all software developers, the numbers would include a lot more inexperienced developers. This suggests that Bob Martin’s assertion that the median developer experience is around 5 years is probably correct, and that my friend’s frustration was probably misplaced.

What does this mean for you?

Well, if you’re in the group of people with less than 5 years experience, don’t worry. You’re not alone. Literally half of the industry is in the same boat with you, making honest mistakes, and learning along the way.

If you’re like me, and have more than 5 or 10 years experience, I can think of two ways to look at the situation. One is to simply rest on your laurels. If that’s your approach, I guess in some sense you’ve earned it. I hope you enjoy it.

I tend to look at it as having a big responsibility. Maybe the IT industry is no longer in its infancy, but I think it’s fair to say it’s still in early adolescence. And there’s a lot still to be learned—and taught—across an entire gamut of IT experience, from technology, to management styles, to ethical implications of our craft.

This is why I started [this mailing list](https://jhall.io/daily), and my [podcast](http://podcast.jhall.io/) and [YouTube channel](https://www.youtube.com/channel/UC5UfX0EgUWlcdQ2RDsq_fcA). I don’t necessarily think I have any “special” insight. But I do have more years experience than roughly 90% of the people in the IT industry. This is my way of giving back, and helping others avoid many of my past mistakes.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
tmux new-session
Tags: cli, linux, tmux
Published: 2021-08-04 14:35:39

---
tags: ['cli', 'linux', 'tmux',]
series: tmux
title: tmux new-session
canonical_url: https://waylonwalker.com/tmux-new-session/
published: true
---

This one starts a new chapter in our series that is going to open up a whole new set of workflow productivity options, understanding how the `new-session` command is a critical command in our adventure into tmux glory.  This is going to open the door for some seriously game changing hotkeys and scripting.

``` bash
# create a new session
tmux new-session

# create a new session detached
tmux new-session -d


# create a new session and name it
tmux new-session -s me

# create a new named session and attach to it if one exists
tmux new-session -As me
```


Be sure to check out the full YouTube playlist and subscribe if you like it.

[![tmux playlist on youtub](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v4cgo76y53s1hwykajo1.png)](https://www.youtube.com/playlist?list=PLTRNG6WIHETB4reAxbWza3CZeP9KL6Bkr)

{% post https://dev.to/waylonwalker/how-i-navigate-tmux-in-2021-2ina %}

> Also check out this long form post for more about how I use tmux.
My first VSCode Theme...
Tags: vscode, extension, theme
Published: 2021-08-04 17:19:30

Hi Folks 👋🏻,

Hope you are safe out there!

VSCode is a place where developers spent most of their time, right. So, it should look appealing to us. I know there are innumerable themes in VSCode. But, I just thought why can't be a part of that. Also, I personally love playing around with themes. So, I tried to create my own personalized colour theme for VSCode. And, I did that. I create pair of themes each for light and dark. Kindly do check out that 🙂.

---

![Coding Theme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ep5q8gatypyhs2todidn.png)

**Coding Theme - [here](https://marketplace.visualstudio.com/items?itemName=Rajeswaran.coding-theme)**

![Coding Theme Light](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ys2mvti1zc0nn4pp7yk.png)

**Coding Theme Light - [here](https://marketplace.visualstudio.com/items?itemName=Rajeswaran.coding-theme-light)**

---

And If you liked my theme, kindly share it with your friends.

Have a great day :)
Making beautiful websites: Top 5 FREE color palettes resources
Tags: webdev, design
Published: 2021-08-05 17:07:10

Choosing a beautiful and pleasing color scheme is one of the most difficult tasks for every designer.
Even with the general rule of using a base, accent and a neutral color for your palette, choosing the colors is mostly a matter of intuition and experience.
Don't worry, I have you covered - check out the top five resources and choosing your perfect color palette will be a breeze.


PS: Don't forget to check the *bonus link*!




## [coolors](http://coolors.co)
The super fast and super fun color schemes generator. Gamification for the win. You can play for hours or just pick the first color scheme.

## [colorhunt](http://colorhunt.co)
Thousands of pre-made color palettes. Each appealing palette consists of four matching colors ready to use.

## [paletton](http://paletton.com)
Are you looking for a more traditional and professional way of choosing matching colors? You are looking for "triad" or "tetrad" palettes?
Try Paletton, it is the complete opposite of coolors.co. - no gamification but lots of options.

## [colors.muz.li](https://colors.muz.li/)
Upload a picture and muzli colors does not only generates a matching palette from the predominant colors, you will also get a sample page and related palettes.


## Bonus: [colormind](http://colormind.io/)
Use technology instead of intuition: Colormind is a color scheme generator that uses deep learning. It can learn color styles from photographs, movies, and popular art.

---

Follow me on [Twitter: @martinkr](http://twitter.com/_martinkr) and consider to [buy me a coffee](https://www.buymeacoffee.com/martinkr)
VS Code plugins to increase coding speed
Tags: reactnative, vscode, react
Published: 2021-08-17 05:08:21

Hey world, here is the list of plugins that I found helpful for react native developers to increase coding speed.

1. **[AutoRename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag)**
        Since VS code will not rename the paired tag automatically, this plugin will help you solve that issue.

2. **[Intellij IDEA keymap](https://plugins.jetbrains.com/plugin/12062-vscode-keymap)**
        If you are an android developer who recently migrated to react, learning new VS code shortcuts will be a tiresome job. And this plugin will be a life saver. It will allow you to use Intellij idea shortcuts in VS code without any further change.

3. **[Git Lens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)**
       Git lens plugin will enhance your VS code git capabilities with features like viewing authorship, code comparison and blaming, navigation between repositories, etc.

4. **[Settings sync](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync)**
       Next in the list, we have the settings sync to sync all our customizations, keyboard shortcuts, extensions, and other settings so that you don't need to waste your time on setting up your IDE next time. You can use your GitHub account token and gist to upload your file.

5. **[Bookmarks](https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks)**
       Since VS code doesn't have an option to bookmark, this plugin will help you create bookmarks and navigate between them easily.

Thanks for your minute :-), __Happy coding!__
A Fun Programming Joke To Start Your Day
Tags: jokes, dailydeveloperjokes
Published: 2021-08-05 12:00:20

---
title: "A Fun Programming Joke To Start Your Day"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259118e11e.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What's a compiler developer's favorite spice?

___A:___ Parsley.
 -->
Hello, World! in 10 different languages 🔥🔥
Tags: programming, helloworld, coding, languages
Published: 2021-08-05 12:15:41

#1. Python
```python
print("Hello World!")
```

#2. Java
```java
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}
```

#3. JavaScript
```javascript
console.log("Hello, World!")
```

#4. C Sharp
```c#
using System;
class Hello {         
    static void Main(string[] args)
    {
        Console.WriteLine("Hello, World!");
    }
}
```

#5. Swift
```swift
print("Hello, World!")
```

#6. Dart
```dart
void main() {
  print("Hello, World!");
}
```

#7. Go
```go
package main
import "fmt"
func main() {
    fmt.Println("Hello, World!")
}
```

#8. C++
```c++
#include <iostream>
using namespace std;
int main()
{
    cout<<"Hello, World!";
    return 0;
}
```

#9. C
```c
#include <stdio.h>
int main(void)
{
    printf("Hello, World!");
}
```

#10. Kotlin
```kotlin
fun main(args: Array<String>) {
    println("Hello, World!")
}
```
“Greenfield” doesn't exist in agile projects
Tags: refactoring, greenfield, brownfield, rewrite
Published: 2021-08-09 10:16:06

---
title: “Greenfield” doesn't exist in agile projects
published: true
date: 2021-08-05 00:00:00 UTC
tags: refactoring,greenfield,brownfield,rewrite
canonical_url: https://jhall.io/archive/2021/08/05/greenfield-doesnt-exist-in-agile-projects/
---

Many engineers love the idea of working on [greenfield projects](https://en.wikipedia.org/wiki/Greenfield_project). That is, new projects, where design mistakes and technical debt have not yet been acrued.

I’ve worked on a number of such projects over the years, but there’s a problem that’s practically always overlooked with these types of projects.

A greenfield project is only greenfield for about a week.

Very quickly, you’ll start bumping into decisions you made, which don’t fit the current circumstance perfectly, and you’ll begin refactoring. You’ll begin to see that you’re working on a brownfield project.

What can you do?

Stop dreaming of your next greenfield project, and just learn to deal with technical debt, legacy code, refactoring, and all the other things that come with the territory.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
whatsapp message sending bot using selenium
Published: 2021-08-05 12:49:37

in this post i will say how to send whatsapp message using selenium
libaries required are""'iam also begnniner in python """
selenium
and code goes here 
# import selenium libary in that import webdriver
from selenium import webdriver
'''now create variable which calls ur default browser anything i have used chrome,for chrome u need download chromedriver from chrome drivermanager site and stored in any drive'''
driver=webdriver.Chrome('C:/Users/lenovo/OneDrive/Documents/PYTHON COURSE/chromedriver.exe')
driver.implicitly_wait(15)
#get whatsapp web url

driver.get('https://web.whatsapp.com')
# find user name or friend name
driver.find_element_by_css_selector("span[title='" + input("Enter name to spam: ") + "']").click()
#message u want to send
inputs=input("enter ur message")
#convert it to string and store in variable
word=str(inputs)
driver.find_element_by_xpath('//*[@id="main"]/footer/div[1]/div[2]/div/div[2]').click()
while True:
    driver.find_element_by_xpath('//*[@id="main"]/footer/div[1]/div[2]/div/div[1]/div').send_keys(word)
    driver.find_element_by_xpath('//*[@id="main"]/footer/div[1]/div[2]/div/div[2]').click()
Programming Term: "glob"
Published: 2021-08-07 10:23:52

**glob patterns** specify sets of filenames with wildcard characters. For example, the Unix Bash shell command `mv *.txt textfiles/` moves (`mv`) all files with names ending in `.txt` from the current directory to the directory `textfiles`. Here, `*` is a wildcard standing for "any string of characters" and `*.txt` is a glob pattern.

([From Wikipedia](https://en.wikipedia.org/w/index.php?title=Glob_(programming)&oldid=1034211884))