teleren/devto huggingface dataset:
Day 25-33: JS Calculator
Tags: 100daysofcode, javascript, react, redux
Published: 2022-05-26 14:14:04

*Procrastinated too much after the JS Calculator project, I should be more consistent.*

## The project
The aim is to build a calculator with Javascript, with the help of frameworks and libraries. I'd never actually build a calculator in any language before, so I'm not too familiar with its algorithm (and it certainly shows if you follow my [Twitter](https://twitter.com/Kemystra) lol).

This is the first project where I got to use Redux to manage states. There's too much boilerplate code to use it in small projects, but now I'm facing into this, might as well use it.

In total I used React, Redux, SASS, and FontAwesome. For math formulas evaluation, I use [math.js](https://mathjs.org/) library.

## Result

Here it is:
{% codepen https://codepen.io/Kemystra/pen/KKQzQaV %}

## What I learned from it

### I'm still not good in programming

This project took me a week, and it revealed my weakness in problem solving in programming. It can be dark at times, but I have to understand that I still have a long way to go before being good enough in programming.

There's quite a lot that I didn't know. Algorithms and data structures, design patterns, programming paradigms, etc. These are tools that may help me in this project and other projects in the future.

In a nutshell, more learning is absolutely necessary to thrive in this field where competitions are fierce and people come and go.

### Never underestimate a project's complexity

Upon seeing a problem, I pulled the keyboard, opened VSCodium,  and started typing away. This is honestly a bad practice of mine. Getting stuck midway is a punch to the face that I deserve for my ignorance.

A good problem solver would approach a problem with caution and an eagle eye, so that they can spot weird edge cases or possible bugs ahead of time. And no, that's not me. I simply head-dive into the problem, only to be completely *bugged* later.

As such, I learned that a proper planning prior to actually writing code is necessary. You don't want to get bugged, do you?

### React's logic separation is actually good

Yeah I understand now why React do this. The idea of isolating UI code and the logic really does come easy to me. There's not much to say about this LOL.

### Pay attention on package version requirement

Although FreeCodeCamp doesn't enforce this, their unit tests only supports certain keywords (e.g: `ReactDOM.render`) that are not up-to-date to React 18. This one tied my development for a week, and a simple package version warning would have made this a lot easier.

## Afterwords

Calculator JS was, and still, the biggest project that I have finished. It's hard but it's worth it. Now that I realize my weakness, I can work to improve myself to be a better developer.

Follow me on [Github](https://github.com/Kemystra)!
Also on [Twitter](https://twitter.com/Kemystra)!
Liquidity Provision on Autopilot with Cross-Chain Zaps
Tags: news, web3
Published: 2022-05-26 14:12:40

Today we’re announcing cross-chain zaps integration into the Symbiosis protocol.

We strive at working out two advancements:

The LP token acquisition automation on the destination chain (due to cross-chain functionality);
1-click cross-chain experience while providing liquidity into DeFi protocols.
The highest security standards are met with audit performed by Zokyo (kudos to the team).

Let’s see how it all works.

What is a Zap?
One can think of a Zap as a shortcut. Imagine being able to get into the pool regardless of the assets you have at your hands, gas tokens, and so on. So to reiterate, it’s a liquidity provision shortcut.

The sweet thing about it is that Symbiosis Zap is essentially cross-chain, so compared to all other existing solutions you can add liquidity in any token.

The bottom line is: using Zap we can add liquidity to the DeFi protocol with literally any token. For example, we want to add USDC liquidity to the Ethereum/BNB pool, but we only have ETH on hand. In this case, we will swap ETH->on-chain swap->USDC->cross-chain swap->get LP USDC/BUSD and all done in one transaction.





Getting LP tokens with cross-chain zaps
Although we’ve composed a detailed user guide on cross-chain zaps, let’s discuss its raison d’etre.

Assume that you’re a big fun of what Boba Network does and you want to enjoy a delicious 27% APR (at the time of writing) on stables in Boba/BNB pool in the Symbiosis protocol. In that case, you will need to go through a quite lengthy process as you need:

1. USDC Boba

2. BUSD BEP20

3. Gas tokens for both

The process is described here. But if you’re lazy enough like we are (which is great because it is the laziness that typically pushes innovation), then you better use Symbiosis Zaps.

With cross-chain zaps, instead you can choose a token on the source network and turn it into a LP token on the destination network. And that’s it!



Buckle Up! Cross-Chain DeFi Liquidity is Coming
Further on, we’re planning to integrate several DeFi-native protocols so that Symbiosis can be used as a unified cross-chain communication layer. On top of that, pretty much the same workflow will be available to third parties via Symbiosis SDK.

Watch this space for more! 👾

Follow us on social media

[Twitter](https://twitter.com/symbiosis_fi) | [Telegram](https://t.me/symbiosis_finance) | [Discord](https://discord.gg/DckkhfWN) | [Facebook](https://web.facebook.com/symbiosis.finance/) | [Instagram](https://www.instagram.com/symbiosis.fi/) | [Linkedin](https://www.linkedin.com/company/symbiosis-finance?trk=pulse-article_main-author-card)
The return statement that keep me silent
Tags: beginners, discuss
Published: 2022-05-26 14:10:56

When I first started in development I was in college. One of the first languages that I was learning was C#. I had no clue what a return statement was except that it was making my method stop. There was code below this damning return statement and I was so sure that this section of code should be running. I was sure of it.

When this took place I had just learned about StackOverflow. It had helped me with other issues and I was sure that it could help me here. Previously, I had only used other contributors questions to come up with solutions for my problem. This time I wanted to contribute my own question. (Can you see where this is going?)

I had so much joy in contributing my question, "Why does the return statement end my method?". Ten plus years later this question seems so naive and if I had looked in my textbook I would have found the answer, but nevertheless I was proud to contribute to community.

As you might guess there were very few responses back to my question. There was one that I am still recovering from to this day. Not in a it caused me to tailspin out of joining the development community way but rather a caution when posting online kind of way. The response was a sarcastic, snarky response when boiled down came with this message. 

> That's what it is supposed to do, newbie. Asking dumb questions gets dumb responses.

While this is harmless and I have a successful career in development it has kept me from posting online for all these years. I was so proud to contribute when I got this answer it defeated me in letting my voice be heard in the community. 

Most recently, I had left a comment on a post here on dev.to, one of the first since I was in college. I found myself thinking the comment was negative towards me when in reality it wasn't, it was actually helpful. I am realizing that I placed the pain of the encounter ten plus years ago on this helpful commentator. That was not fair to them.

So, now that story time is over I have a few questions for you.

1. Have you experienced a similar situation and have not joined into the conversation of development online/in-person?

2. If so, have you overcome that fear and feeling of defeat? How?

3. How can we help younger developers join in the conversation and let their voice be heard in the community?

Let's discuss below.
Nvtop - 在Linux即時監控GPU使用率
Tags: nvt
Published: 2022-05-26 14:00:04

- 訂閱patreon即可看到更多文章 https://www.patreon.com/wade3c
- Youtube頻道 https://www.youtube.com/c/增廣建文

---

![image.png](https://res.craft.do/user/full/71bea674-0503-893e-0a7a-91e236797ff9/doc/ee02961e-810c-4b77-b9b3-a16e39d5b8aa/270d17ad-0f7a-41fa-9116-15c3d83c0143)

同時支援Nvidia以及AMD的GPU

## Install

### Apt

```shell
sudo apt update
sudo apt install nvtop
```

### Dockerfile

```plaintext
FROM nvidia/cuda

RUN apt-get update && \
    apt-get install -y cmake libncurses5-dev libncursesw5-dev git && \
    rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/local/cuda-10.1/targets/x86_64-linux/lib/stubs/libnvidia-ml.so /usr/local/lib/libnvidia-ml.so && \
    ln -s /usr/local/cuda-10.1/targets/x86_64-linux/lib/stubs/libnvidia-ml.so /usr/local/lib/libnvidia-ml.so.1 && \
    cd /tmp && \
    git clone https://github.com/Syllo/nvtop.git && \
    mkdir -p nvtop/build && cd nvtop/build && \
    cmake .. && \
    make && \
    make install && \
    cd / && \
    rm -r /tmp/nvtop && \
    rm /usr/local/lib/libnvidia-ml.so && \
    rm /usr/local/lib/libnvidia-ml.so.1

ENTRYPOINT ["/usr/local/bin/nvtop"]
```

這裡cuda用的是10.2可能得視自身情況修改 (ex: RTX30不支援)

或是可以參考nvtop repo內的Dockerfile

## FAQ

1. ### Unable to Locate Package

#### Update Source List

有可能是清單內沒有可以下載的網址，比較常發生在debian，可以去source list設定non-free

```shell
sudo vim /etc/apt/sources.list
```

在每行的結尾加上空格與non-free (這個做法不適用於Ubuntu)

#### Manual Compile

有些OS並沒有提供已經編譯好的套件供安裝，這裡就得自己compile了

> 撰寫文章時只支援Ubuntu 20.04/ 20.10，而18.04已經裝不了

先裝必要的套件

```shell
sudo apt install cmake libncurses5-dev libncursesw5-dev git
```

```shell
git clone https://github.com/Syllo/nvtop.git
mkdir -p nvtop/build && cd nvtop/build
cmake .. -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON
make

# Install globally on the system
sudo make install

# Alternatively, install without privileges at a location of your choosing
# make DESTDIR="/your/install/path" install
```

----

## Reference

[GitHub - Syllo/nvtop: AMD and NVIDIA GPUs htop like monitoring tool](https://github.com/Syllo/nvtop)

[Wrap NVTOP in docker (Impossible to initialize nvidia nvml) · Issue #42 · Syllo/nvtop](https://github.com/Syllo/nvtop/issues/42)

[nvtop not found in Debian Buster repositories · Issue #46 · Syllo/nvtop](https://github.com/Syllo/nvtop/issues/46)
Problemas al cambiar la ubicacion predeterminada de carpetas en Windows 10
Tags: w10, spanish, espanol
Published: 2022-05-26 13:32:11

Si al instalar Windows 10, cuentas con dos discos de almacenamiento, en donde tu disco `C:` se aloja tu instalación de Windows y en el otro disco se encuentran archivos personales. Entonces quieres cambiar la ubicación de las carpetas Documentos, Descargas, Imagenes... al tu segundo disco de almacenamiento, pero no te es posible debido al error...

```
No se puede mover la carpeta porque hay una carpeta no redirigible 
en la misma ubicación. Acceso denegado
```

![Imagen problema](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/evtzp6fszevdsnnnadh6.png)


Para ello, haz intentando eliminar manualmente la carpeta desde `Users`, pero esta se vuelve a crear y volvemos al mismo problema, incluso desinstalar **OneDrive** no logra resolver este problema.

------------

### Solucion

Para poder resolver este problema, tenemos que modificar algunos registros. Presionaremos `Ctrl + R` dentro escribimos `regedit`.
Ahora buscaremos en la ubicación

```
Equipo\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
```

Dentro encontraremos varios registros, para ello nos enfocaremos principalmente en la columna **Datos** la cual nos ayudara a saber la ubicacion predeterminadas de cada carpeta y cual registro debemos modificar. En este caso, seran aquellos que contengan en su ruta "One Drive"

![Regedit con Onedrive](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x682zxy7e82rpyy7602v.png)


Vamos a ir modificando los registro deseados dando doble click sobre ellos y poniendo la ubicación deseada de la carpeta. 
_Recuerda que esta ubicacion debe existir para no tener problemas_

![Cambio de ruta](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w7d8pyqpswbb8pawqgmg.png)


Al final obtendremos algo parecido a lo de abajo, con todos los registros deseados cambiados. 

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

Luego de esto, tendremos que reiniciar nuestro computador para que los cambios se realicen en el **Explorador de Archivos**.

![Cambios realizados](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ocpe969zmgjaagy1x87v.png)
Top 5 IT Security Tips for Remote Workforce
Tags: workfromhome, cybersecurity, technology, news
Published: 2022-05-26 13:59:50

Remote work has adapted to the modern workforce, but it still lacks the security needed to keep threats and attackers from the organizational ecosystem. Read to know more

It’s been over a year that a large number of organizations made a shift to remote work practices. Many of them now have teams distributed across geographies with employees in multiple countries, working across time zones. Most of these employees rely on their personal WiFi networks, networks, and sometimes, even accounts and ids to carry out their day to day work-related tasks.

What can the lack of good security do?

One of the biggest Social Media companies, Twitter fell prey to security attackers when working from home in 2020, and mind you, Twitter has a robust [**cybersecurity**](https://ai-techpark.com/cyber-security/) team.

**IT security tips**

**1) Zero Trust Security** – Keeper utilizes a proprietary, zero-knowledge security architecture that supports on-premise, cloud as well as hybrid-cloud environments and infrastructures for client-side encryption key management that can be quite effective when protecting your organization from remote data breaches.

**2) Encryption tools** – Utilize Application security for the on-device apps needed by your remote workforce by using set-and-forget encryption tools and deliver an end-to-end protection ranging from encryption to scanning.

**3) Advanced DevOps** – Empower your IT teams command-line tools, open source code, and API, so that they can easily manage password rotational functionalities.

Read More on Website @ [**Top 5 IT Security Tips for Remote Workforce**](https://ai-techpark.com/top-5-it-security-tips-for-remote-workforce/)
Reemo | Made with Nuxt JS
Published: 2022-05-26 13:59:05

![Reemo | Made with Javascript | Nuxt JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1652888093/large_reemo_made_with_nuxt_js_6390dfe863.png "Reemo | Made with Javascript | Nuxt JS")


### Low Latency Desktop Streaming for Windows, Linux and MacOS

> Reemo.io instantly connects creatives, gamers or anyone to their workstations wherever they are, from a chrome browser.
> 
> ✅ Low latency streaming desktop technology
> 💥 Windows, Linux, MacOS
> 👌 Free for personal use
> 🚀 [Businesses] Connect remote teams - 🎁👇
> 
> ### REEMO, THE POWER OF STREAMING
> The next streaming revolution for remote work, cybersecurity, games & cloud computing for creativity.
> 
> ### Reemo Cloud
> Blazing fast remote desktop for everyone
> 
> ### Reemo Studio
> Empower your team to work from anywhere remotely on any device and get them up to speed quickly.
> 
> ### Reemo Secure Browsing
> Move web browsing sessions off your network

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Reemo on Twitter](https://twitter.com/withjavascript/status/1529823164871495681?s=20&t=L6IC_nV94EiwCcKUtGrnTA)
 |
| Medium | [Reemo on Medium](https://medium.com/@madewithjavascript/reemo-made-with-nuxt-js-5af3aabb6eb1)
 |
| Facebook | [Reemo on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid023bLJbuc12eEjsRmYNXtgEg9MoQ49sTMdZWWGv6dLVbf3N29saGe9Kn4RMaXXPftql)
 |
| Tumblr | [Reemo on Tumblr](https://madewithjavascript.tumblr.com/post/685321405999497216/reemo-made-with-nuxt-js-low-latency-desktop)
 |
| LinkedIn | [Reemo on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6935589372113141760)
 |


Filled Under:

 - [Made with Javascript](https://madewithjavascript.club)    
 - [Made with Nuxt JS](https://madewithjavascript.club/categories/nuxt-js)

Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!
JavaScript Array Methods : Find()
Tags: javascript, beginners, programming, array
Published: 2022-05-26 13:58:05

The find() method returns the first element in the provided array that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned.

```
const array1 = [5, 12, 8, 130, 44];

const found = array1.find(element => element > 10);

console.log(found);
//output: 12
```


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

Follow me on : [Github](https://github.com/jps27cse) [Linkedin](https://www.linkedin.com/in/jps27cse/)
2022 IoT OS Global Tech Conference Online & Free
Published: 2022-05-26 13:56:01

The 2021 RT-Thread IoT OS Tech Conference has 1500+ developers registered for the conference, over 20 topics were shared, featured on the open-source RT-Thread OS projects and the new development RT-Smart Micro-Kernel OS, RISC-V ecosystems and associated manufacturers introduced, STM32 ecosystems, embedded projects showcase, IoT security, trending technical knowledge such as AI, ROS, Rust, Micropython, and more!

The 2022 RT-Thread IoT OS Global Tech Conference will continue kicking off with unique insights, exciting innovative technologies, inspiring projects showcases.

As the time for the 2022 RT-Thread IoT OS Global Tech Conference approaches, we’re happy to attach more details to this conference so you’ll know what to expect.

Free Register: http://bit.ly/3GNujSQ

The virtual conference will feature 29 trending topics, starting from June 1 to June 3. Here’s the Agenda:


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


**Dev Boards GiveAway**
We’ll randomly giveaway the RT-Thread inside Dev Boards for participants, each day 3 times, and on June 3, we’ll have a Super Luxury Dev Boards Package to give away, so keep closely with the conference and stay tuned, you’re the lucky one!


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fkmxayczbiabzroahet9.png)
Carpetas doble de OneDrive (Windows 10)
Tags: onedrive, w10, spanish, espanol
Published: 2022-05-26 13:54:28

Haz tenido el problema de al tener tu cuenta de OneDrive vinculada, de la nada en el explorador de archivos aparecen dos carpetas de OneDrive, una donde no tienes nada o la carpeta no existe y otra de la cuenta vinculada, pero no sabes quitarla?

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

### Solucion

Para ello, tendremos que presionar `Ctrl + R` y escribir `regedit` te abrira una ventana, tendras que dirigirte a:

```
Equipo\HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}
```

Dentro, buscaras el registro `System.IsPinnedToNameSpaceTree` 
Si no existe, deberas crearlo dando click izquierdo sobre el espacio en blanco > Nuevo > Valor de DWORD (32 bits).

![Crear registro](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/md7d6curur6y4toufjlm.png)
 
Dandole como nombre `System.IsPinnedToNameSpaceTree`

Ahora, das doble click sobre el y tendras que ponerle el valor de **0** con Base **Hexadecimal** damos aceptar.

![Registro](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l7mdd1wdjs96uo7lpcj2.png)
 
Abres el explorador de archivos y podras ver que ya no esta la segunda carpeta de OneDrive.

![Solucion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5aabff1qgbsh24slwws.png)
Comonetize | Made with React JS
Published: 2022-05-26 13:50:59

![Comonetize | Made with Javascript | React JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1652887301/large_comonetize_made_with_react_js_376043da4c.png "Comonetize | Made with Javascript | React JS")


### Create a marketplace of professionals and engage subscription membership. 

> Create a marketplace of professionals and engage subscription membership. Monetize your community with our super simple dedicated tool.
> 
> ### Turn your community into a laser-focused recruiting engine: 
> Build a career site in two minutes, free!
> 
> #### Member Subscriptions
> Multiple subscription options for running your paid Membership Community
> 
> #### Members Directory
> A searchable directory of community professionals or business members
> 
> #### Community Board
> Your own monetizable marketplace, like Fivver, with an automated notification system, which can be used for Jobs, Courses, Paid Projects, Podcasts, Digital Products, and more.
> 
> Events Board, Community blog, and a built-in newsletter system to reach members with content and opportunities

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Comonetize on Twitter](https://twitter.com/withjavascript/status/1529821115148820481?s=20&t=-FWrGwy45N48reP4O5xsSw)
 |
| Medium | [Comonetize on Medium](https://medium.com/@madewithjavascript/comonetize-made-with-react-js-e7fbc7b41ae5)
 |
| Facebook | [Comonetize on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid0iztEqoEfDdUUN725E3YTMVBEdR2TAXdh7JE9yRnLYbiFCSfhTYZsPCwVJHkjzo9cl)
 |
| Tumblr | [Comonetize on Tumblr](https://madewithjavascript.tumblr.com/post/685320851436011520/comonetize-made-with-react-js-create-a)
 |
| LinkedIn | [Comonetize on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6935587118681399296)
 |

Filled Under:
 - [Made with Javascript](https://madewithjavascript.club)  
 - [Made with React JS](https://madewithjavascript.club/categories/react-js)

Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!