teleren/devto huggingface dataset:
What is tRPC?
Tags: graphql, webdev, api, typescript
Published: 2022-11-10 19:33:29

If you've ever wanted a fully typesafe API without having to deal with the complexity of the traditional data query and manipulation language for APIs such as GraphQL (developed by Facebook in 2012), REST etc. you may want to try tRPC. tRCP combines the ideas of classic REST APIs with GraphQL to form a new way of transfering data from the server to the client and vice versa, this essentially allows you to call functions on clients doing API calls behind the scene. The calls are fully typesafe and end to end.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/51edlkb4pp9gfq1uti6u.JPG)

tRPC is for full-stack typescripters, it is designed for monorepos as you need to export/import the type definition from/to your server. If you have a custom GraphQL-server for your project, you may want to use tRPC. It makes it dead easy to write "endpoints" which you safely use in your app.

tRCP is library agnostic so it could be used with any front-end framework been utilised. Below are some of the features of tRPC:

* Full static typesafety & autocompletion on the client, for inputs and errors
* Light - tRPC has zero deps and a tiny client-side footprint
* Snappy DX - No code generation, run-time bloat, or build pipeline
* Easy to add to your existing brownfield project
* Request batching - requests made at the same time can be automatically combined into one

tRPC also include a lot of other things like the option to add middlewares, request context, merge routers, batching of your queries, error handling, data transformer etc. If you are interested in typesafety from server to client in your APIs or GraphQL is not for you, check out tRPC at https://trpc.io
dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 3
Tags: programming, community, opensource, ruby
Published: 2022-11-10 19:24:43

Day 3! We're getting somewhere! Thanks to everyone that contributed! @sherrydays posted the most liked comment for today, congrats!

**Please note that the language of choice was Ruby! Any comment in another language might need some translation.**

This experiment is inspired by a [post on the ProgrammerHumor subreddit](https://www.reddit.com/r/ProgrammerHumor/comments/yot55f/the_most_upvoted_comment_picks_the_next_line_of/), where the original author did this exact thing: The most liked comment after 24 hours picks the next line of code.

**The rules:**

 * Nothing that's against any applicable law
 * Nothing that's against the community code of conduct, terms of use, or privacy policy
 * No leaking of personal information of anyone
 * No malware/ransomware/viruses/etc.
 * Keep it civil
 * (To be expanded, depending on the case)

Our code so far:

```ruby
emotions = ["🥲", "🥰", "🥺", "😫", "🤬", "😞", "😅", "😊", "😰"]
how_i_feel_right_now = emotions.sample
```

See you in 24 hours!
What is Synchronous VS Asynchronous in 2 minutes or less ⛲
Tags: jokes
Published: 2022-11-10 19:15:33

My house is over 100 years old and still running. But my toilet on the other hand 🪠 has this quirk, the cistern will not full until the sink tap runs, you might say it's synchronous 😏.

Asynchronous is like everyone else's house where the water runs at the same time for all toilets and taps.

... I don't know what to do with this info but you can apply it to your programming knowledge, things happen one after the other or things that happen at the same time, async and sync are concepts of time and with, it's time for me to go.
Let's Start the Journey for better job
Tags: beginners, career, productivity
Published: 2022-11-10 18:01:43

Hi Everyone,
This is Vasanth Kumar Cheepurupalli from India. I  was graduated in June 2021 with Computer Science and Engineering Bachelor's Degree. 

I started working in a IT company based on Hyderabad(India) since August 2021. I was trained as a Full Stack MERN developer during Aug 15 - Sep 15 and got into React Project for the next 6 months. And by April 2022 I was into another React Project which will end in few days(Nov 29, 2022).

Its been a good year in terms of work but things were starting monotonous. It is like same day but developing different UI screen. 

Now, I want to apply for different remote jobs which will pay better(current salary is $500-$600/month). But the problem is I feel like "I am not the candidate to apply for that job" (insecure feeling). And I don't have a strong DSA skills (Leetcode) or Git-hub profile. (I didn't even a portfolio website)


During August 2021, my plan is to equip myself with better skills and be in a better job after a year(because I signed a bond to work at least for a year). But it didn't happened. And you guessed it right, that goal moved a year ahead. So, now it is same goal => Equip new skills, be a better programmer, land in a better job. 

To do that I want to go public and have my journey documented through blogging. 

Let's rock it guys. 





PS: I do love my current job as it is my first. Just upset with myself for not upgrading.
What is Optical Character Recognition (OCR)
Published: 2022-11-10 17:57:07

Optical character recognition (OCR) is sometimes referred to as "text recognition." It is the extraction of data into machine-encoded text from scanned documents, images, and PDFs. The original material can be accessed and edited by using OCR software, which isolates letters on the image, turns them into words, and then turns the words into sentences.

OCR is extensively used as a form of data entry from printed records. This technology allows people to digitize data for increased productivity.

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

Using OCR, ElectroNeek can recognize and read information from document sources that range from accounts, invoices, contracts, tables, and other financial documents.

You can do a deep dive into OCR automation with ElectroNeek here:

https://forum.electroneek.com/t/electroneek-ocr-automation-to-word-file-transferring-ocr-content-to-a-word-file/763

Also, don't forget to post a comment or a question.

You can also join our forum at: https://forum.electroneek.com
Container Apps & Metabase Saved Big Bucks
Tags: azure, metabase, data, analytics
Published: 2022-11-10 17:53:30

I've got another post that I wrote on my Substack that I think is particularly relevant to small businesses with their data in the cloud. While my journey took place on Azure, the same approach can apply to any cloud provider.

I cover my experience starting with Azure Kubernetes Services and ending up on Azure Container Apps and the $180 per month it saved me!

**[Substack: Serverless Metabase Saved Big Bucks](https://affordabledata.substack.com/p/serverless-metabase-bi-saved-big)**
HackSquad
Tags: opensource, hacktoberfest, community, computerscience
Published: 2022-11-10 17:45:14

I am excited to share the me and my friends participated in hackSquad as a team,and got global rank of 26.I am looking for some awesome open source events.Thanks for reading.
PS:Any suggestion for upcoming open source events(like hacksquad/hacktoberfest).
Use GitHub Desktop to open your first Pull Request
Tags: github, git, opensource, beginners
Published: 2022-11-10 17:38:51

Contributing to Open Source projects that are hosted on GitHub has a barrier: `git`.

Some fresh developers might already be confident in the languages they just studied, but in order to make a contribution to someone else's repository on GitHub they also need to play around with git.

A few weeks ago I shared an article with the basic git commands that are needed to contribute, it was focused on Hacktoberfest, but git remains the same all 12 months of the year ;)

{% embed https://dev.to/this-is-learning/51-basic-git-commands-you-need-for-hacktoberfest-2022-glj %} 

Instead, today I want to repeat the same steps between forking a repository and creating a Pull Request, but this time by using a Graphical User Interface (GUI) to interact with git. No terminal, no CLI.

If you want to contribute to Open Source without running git commands from the terminal, sit down, relax, download [GitHub Desktop](https://desktop.github.com/) and enjoy this tutorial:

{% embed https://youtu.be/8x6V5IOuXog %}

---

Thanks for reading this article, I hope you found it interesting!

Do you like my content? You might consider subscribing to my YouTube channel!
You can find it here:
[![YouTube](https://img.shields.io/badge/YouTube:%20Dev%20Leonardo-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/channel/UC-KqnO3ez7vF-kyIQ_22rdA?sub_confirmation=1)

Feel free to follow me to get notified when new articles are out ;)
{% embed https://dev.to/balastrong %}
Resources to get started with Nx
Tags: nx, resources
Published: 2022-11-10 17:12:16

You know the old saying _“Ask me once, I’ll share a tweet. Ask me twice, I’ll share a tweet. Ask me a third time, I’ll share a blog post”_? (ok, it’s not an old saying — [I came up with it two days ago](https://twitter.com/dzhavatushev/status/1590074512590401536) 😅). Anyway, I was asked a couple of times on Twitter about getting started with Nx, so I thought I’d write a post collecting all sorts of links, resources, courses, people to follow, etc. that I can share next time someone asks 😎

_Note:_ I’ll try to update the post as I discover new stuff, so send them my way if something’s not in the list bellow.

- [Official Nx website](https://nx.dev/)

### Blogs

- [Official Nx Blog](https://blog.nrwl.io/)
- [Nx organization on DEV Community](https://dev.to/nx)
- [Nx tag on DEV Community](https://dev.to/t/nx)
- [Nx Newsletter](https://go.nrwl.io/nx-newsletter)

### GitHub repos

- [Nrwl organization on GitHub](https://github.com/nrwl)
- [Main Nx repo on GitHub](https://github.com/nrwl/nx)
- [Example repo for Nx workspace](https://github.com/nrwl/nx-examples)
- [Nx Recipes](https://github.com/nrwl/nx-recipes)

### Nx Console

- [GitHub repo](https://github.com/nrwl/nx-console)
- [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)

### Nx Cloud

- [Nx Cloud](https://nx.app/)
- [Nx Cloud Github Workflows](https://github.com/nrwl/ci)

### Plugins

- [Nx Plugin Directory](https://nx.dev/community#plugin-directory)

### Video

- [Nx YouTube Channel](https://www.youtube.com/nrwl_io)

#### Courses

##### Free

- [Nx Workspaces (by Nrwl)](https://nxplaybook.com/p/nx-workspaces)
- [Nx courses on Egghead](https://egghead.io/q/nx?access_state=free)

##### Paid

- [Advanced Nx Workspaces (by Nrwl)](https://nxplaybook.com/p/advanced-nx-workspaces)
- [Nx courses on Egghead](https://egghead.io/q/nx?access_state=pro)

### Books

- [The Angular Developer's Nx Handbook](https://leanpub.com/the-angular-developers-nx-handbook)
- [Enterprise Monorepo Angular Patterns](https://go.nrwl.io/angular-enterprise-monorepo-patterns-new-book)
- [Effective React Development with Nx](https://go.nrwl.io/react-book)

### Community

- [Nx Conf](https://nx.dev/conf)
- [Twitter](https://twitter.com/NxDevTools)
- [Community Slack Channel](https://go.nrwl.io/join-slack)
- [Twitch](https://www.twitch.tv/nxdevtools)

#### People to follow

- [Everyone on Nrwl’s About Us page](https://nrwl.io/about-us) 🌟
- [Nrwlians - Past and present Nrwl people (Twitter list)](https://twitter.com/i/lists/1171086812095205376)

##### Community members

- [Dominik Pieper](https://twitter.com/dominik_pieper)
- [Giora Guttsait](https://twitter.com/gioragutt)
- [Jordan Hall](https://twitter.com/JordanHall_dev)
- [Jay Bell](https://twitter.com/JayCooperBell)
- [Lara Newsom](https://twitter.com/LaraNerdsom)
- [Lars Gyrup Brink Nielsen](https://twitter.com/LayZeeDK)
- [Luca Del Puppo](https://twitter.com/puppo92)
- [Manfred Steyer](https://twitter.com/ManfredSteyer)
- [Santosh Yadav](https://twitter.com/SantoshYadavDev)
8 years and I didn't even thought about it...
Tags: webdev, javascript, css, react
Published: 2022-11-10 16:53:46

I have been in industry for more then 8 years, but never thought about one crucial optimisation which can be done in applications and it's so obvious...

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vnmutbbugvphbpdtyju.gif)
In modern Web the crucial point as we all know is a performance. LET'S BE SERIOUS YOU WON'T WAIT TILL PAGE LOAD IF IT'S LOADIN FOR 5 SECS...

The think which I have discovered, well not me it was pointed to me if to be honest. To don't use props in Styled Components, if it's not necessary. Why?
Because how React works, on every prop change it would re-render a component. Let's take as example, we do have A small component which changes a colour on prop change..

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/juoidiu3zanxlyf1z2ef.png) 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omdc1ha3tcqu25p2a7ay.png)




versus using something like classNames and do css class name logic
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwnrzoa8c5nu2bmhjy4d.png)


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




Initially it renders for 2.8ms. One component...with a green color. Then we increase a counter to + 1. It will rerender this smallish component again.. which will take 0.8ms. Okay you can say this isn't much but imagine you DO have some complex logic and one state is changing a layout drastically.
Introducing Azure PaaS Series
Tags: azure, paas, cloud, techtalks
Published: 2022-11-10 16:48:34

Azure, when it started back in 2009, announced in Professional Developer Conference (PDC) 2009 by then the boss Amitav Srivastava. All it contained are total three services: Web/Worker Role, Storage, Database. All of them were 100% PaaS. Industry was not ready for it. Then the demand was to have Infrastructure as a Service (IaaS) and eventually Microsoft had introduced it. Now Azure has more services than we can remember. PaaS is the way for many organizations today due to its obvious benefits. In this series I plan to cover some of the most important Azure PaaS. Hope this will be helpful and share your thoughts and feedback. 

https://youtu.be/Y6ohFIolBv4

{% youtube Y6ohFIolBv4 %}

For more please subscribe 
https://www.youtube.com/c/TechTalksWriju?sub_confirmation=1
PostgreSQL all tables count Row
Tags: uyumsoft
Published: 2022-11-10 16:27:45

```
drop table zzz_table_schema_rows_n;

create table zzz_table_schema_rows_n as 
WITH tbl AS
  (SELECT table_schema,
          TABLE_NAME
   FROM information_schema.tables
   WHERE
    1=1
	AND TABLE_NAME not like 'pg_%'
	AND TABLE_TYPE='BASE TABLE'
	AND table_schema in ('uyumsoft'))
SELECT table_schema,
       TABLE_NAME,
       (xpath('/row/c/text()', query_to_xml(format('select count(*) as c from %I.%I', table_schema, TABLE_NAME), FALSE, TRUE, '')))[1]::text::int AS rows_n
FROM tbl
ORDER BY rows_n DESC;


select * from zzz_table_schema_rows_n

```
HTML document subtitles?
Tags: pwa, webdev, html, javascript
Published: 2022-11-10 16:27:06

**TLDR: Explainer for adding a document.subtitle (subtitle meta value) to a web page/app;**

[Read the explainer here](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/DocumentSubtitle/explainer.md)

Hola!

We all know and love (and abuse) the html `<title>` tag. Before all the new fancy APIs allowed us to do badging and notifications and all other sorts of bells and whistles, the `<title>` element was where most of this information started appearing. It's not uncommon to see:

* Web (email) apps that show number of unread emails on the title.
* Web (IM) apps that notify when there is a new instant message on the title.
* Web (productivity) apps that put contextual information about an open file that is being edited. 

And we can go on with the list of examples. Generally, the UA takes the content of the `<title>` tag and displays it in a prominent useful position within the browser, generally **this is the text that appears on a tab**. 

Title continues to be a really useful tag, but with the increased complexity that a web app can portray, it seems useful to have a new bucket in which we can store relevant content for our app. Hence, the idea of having a `document.subtitle`. Let's say, I can have as the title of my web app **Word Processing Web App** and as the subtitle **openDocTitle.docx**. 

Furthermore, if in an installed PWA scenario, the UA can take the information from the subtitle and use it to customize the text that appears on the title bar of the installed PWA. This way, for the example mentioned before, my installed word processor PWA would display in its title bar "**Word Processing Web App - openDocTitle.docx**".
smadav Antivirus: The Safest Way To Protect Yourself Online
Published: 2022-11-10 16:19:25

Smadav 2023 free download

[Smadav 2023](https://smadav-2023.blogspot.com/) is the latest version of this antivirus program. It's available for free from the official website. We have tested this program and found it to be clean of any form of malware. This software is very light on system resources and can be run on even older computers without any issue. The interface is also very simple and easy to use. Overall, we think this is a great program and worth downloading.

What is Smadav 2023?

Smadav 2023 is the latest version of Smadav Antivirus, which is a free and open source anti-virus program for Windows. It was released on February 14, 2023. Smadav 2023 is available in both 32-bit and 64-bit versions. Some of the new features in Smadav 2023 include:

- Improved detection and removal of viruses, worms, and Trojans
- New heuristic engine for better detection of unknown viruses
- Improved user interface
- Support for Microsoft Edge browser

If you are looking for a free and effective antivirus program for your Windows computer, then you should definitely download and install Smadav 2023.

The Different Types of Smadav 2023

There are four different types of Smadav 2023 available for download:

1. Smadav Free: This is the basic version of the software and is available for free. It offers basic protection against viruses and malware.

2. Smadav Pro: This is the paid version of the software and offers more advanced protection against viruses and malware. It also includes additional features such as real-time protection, automatic updates, and priority support.

3. Smadav Business: This is the business version of the software and offers comprehensive protection against viruses and malware for businesses. It includes all the features of the Pro version, plus additional features such as server-based protection and centralized management.

4. Smadav Enterprise: This is the enterprise version of the software and offers comprehensive protection against viruses and malware for enterprises. It includes all the features of the Business version, plus additional features such as Active Directory integration and 24/7 priority support.

Pros and Cons of Smadav 2023
Creator Project : DIY K2000 lights with STM32 boards
Tags: programming, opensource, diy, luos
Published: 2022-11-10 16:16:44

One of the Luos Creators Thomas, customized his car with led strips in K2000 mode and used a STM32 boards and Luos to make it work. 

⏩ Check out his [project](https://www.youtube.com/shorts/w8hsQDp0ciE)

If you have been working on any projects using Luos and you want to give them a platform, upload a video of your project to Youtube and send us the link via discord!
Top Competitors | HackerRank | MSSQL
Tags: hackerrank, computerscience, tutorial, mssql
Published: 2022-11-10 16:00:00

## The Problem

Write a query to print the respective `hacker_id` and `name` of hackers who achieved **full** `scores` for **more than one** `challenge`. Order your output in **descending order** by the total number of `challenges` in which the hacker earned a full score. If _more than one hacker_ received full scores in _same number of challenges_, then sort them by **ascending** `hacker_id`.

## The Input

Sample:

![Samples of tables](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tlpxn0ygkj54dbs9tuu.png)

## The Output

Sample:

`90411 Joe`

### Explanation

1. Hacker 86870 got a score of 30 for challenge 71055 with a difficulty level of 2, so 86870 earned a full score for this challenge.
1. Hacker 90411 got a score of 30 for challenge 71055 with a difficulty level of 2, so 90411 earned a full score for this challenge.
1. Hacker 90411 got a score of 100 for challenge 66730 with a difficulty level of 6, so 90411 earned a full score for this challenge.
1. Only hacker 90411 managed to earn a full score for more than one challenge, so we print their `hacker_id` and `name` as 2 space-separated values.

## The Solution

Observe the relationship across the table. From the input [sample](#the-input) and the [explanation](#explanation), we can conclude that `hacker_id` column in `Challenges` table doesn't serve any purpose in this problem (purple annotations).

![hacker_id in challenge table](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/luzgmfzedpobbd8vy0ju.png)

So, we join these 4 tables together like the following:
1. Join `Submissions` table with `Hackers` table on both `hacker_id`
1. Join `Challenges` table with `Submissions` table on both `challenge_id`
1. Join `Difficulty` table with `Challenges` table on both `difficulty_level`
1. Join `Difficulty` table with `Submissions` table on both `score` to get whoever gets the top score of each challenge

### The Code

```sql
SELECT
    h.hacker_id, h.name
FROM
    hackers h
    JOIN submissions s ON h.hacker_id = s.hacker_id
    JOIN challenges c ON s.challenge_id = c.challenge_id
    JOIN difficulty d ON c.difficulty_level = d.difficulty_level AND s.score = d.score
GROUP BY
    h.hacker_id,
    h.name
HAVING
    COUNT(c.challenge_id) > 1
ORDER BY
    COUNT(c.challenge_id) DESC,
    h.hacker_id
```

[Original Source](https://www.hackerrank.com/challenges/full-score/problem?isFullScreen=true)

[Let's be friend & support me👋](https://beacons.ai/ranggakd)
SPA, MPA, SSR, CSR
Tags: programming, braziliandevs, frontend
Published: 2022-11-10 15:45:27

MPA - multi page application: um aplicativo tradicional onde cada interação recebe um tratamento de solicitação-espera-resposta-espera e a página é totalmente recarregada a cada clique.

SPA - aplicativo de página única: a página carrega uma vez, o HTML é enviado ao cliente e o JavaScript entra em ação para toda interação futura e atualização da interface do usuário.

SSR - renderização do lado do servidor: o servidor renderiza a página e retorna HTML totalmente compilado. 

CSR - renderização do lado do cliente: o servidor retorna HTML (quase) vazio e JavaScript renderiza a página no lado do cliente

SSG - Static Site Generation: também conhecido como pré-renderização, é outra técnica popular para construir sites rápidos. Se os dados necessários para renderizar uma página pelo servidor forem os mesmos para todos os usuários, em vez de renderizar a página toda vez que uma solicitação for recebida, podemos renderizá-la apenas uma vez, antecipadamente, durante o processo de compilação. As páginas pré-renderizadas são geradas e servidas como arquivos HTML estáticos.

Alguns frameworks e o que eles suportam.

React: SPA, NextJs suportam SSR — SSG e GastbyJs, react -static para SSG.

Vue: SPA, NustJs suporta SSR — SSG e Gridsome, vuepress para SSG.

Angular: SPA, Angular Universal suporta SSR e scully para SSG.

Wordpress: MPA e SPA. 
Joomla: MPA
shirates-core 1.2.0 released
Published: 2022-11-10 15:36:54

## Shirates (shirates-core)
Shirates is an integration testing framework that makes it easy and fun to write test code for mobile apps.
shirates-core is core library.

[shirates-core 1.2.0](https://github.com/ldi-github/shirates-core/releases)

New Feature
- Introduced new [parameter](https://github.com/ldi-github/shirates-core/blob/1.1.1/doc/markdown/basic/parameter/parameters.md) "enableImageAssertion"

Bug Fix
- Spec-Report logging (tapAppIcon, target, SKIP_SCENARIO, SKIP_CASE, stub, stubNot, dataPattern)
- Summary-Report logging (os colum)