teleren/devto huggingface dataset:
How to mint NFTs using Crossmint API
Tags: nft, nextjs, crossmint
Published: 2023-03-06 20:38:11

Hi,
I am developing NFT marketplace integrating Crossmint API now.
I added crossmintPayButton to my website like the following.

```
import { CrossmintPayButton } from '@crossmint/client-sdk-react-ui';
...
<CrossmintPayButton
    className='xmint-btn'
    clientId={process.env.NEXT_PUBLIC_CROSSMINT_CLIENT_ID!}
      environment='staging'
      mintConfig={{
      type: 'erc-721',
      totalPrice: price * mintQuantity,
      _price: price
      _quantity: mintQuantity,
      _metadata: {
        name: "Test NFT",
        description: "This is my test NFT!",
        image: "..."
      }
    }}
/>
```
How can I write mint function of contract to mint NFTs?
Please, help me.
#CodeNewbie Meme Monday
Tags: codenewbie, beginners, discuss, career
Published: 2023-03-06 20:30:42

We have made it to Meme Monday once again over here at DEV, and once again we from CodeNewbie wanted to have a say in things. 

Drop your newbie-related, job-related, or starting-a-new-career-related memes or inspiration— we would love to see them! OR if you are a newbie, HEY! We are happy you are here.
Wifi hiccup
Tags: wifi, linux, debian
Published: 2023-03-06 20:28:27

Ever had that problem that your wifi suddenly got a hiccup? 30 seconds where you are almost at a point to reboot or plug in the wire?

Well, I got that feeling for some time now and worked around it by exactly doing the latter: Using the wire!

Finaly, after tinkering around with all sorts of settings, I now found a working solution for myself. Seems like disabling the power saving mode for NetworkManager did the trick!

Create the file `/etc/NetworkManager/conf.d/wifi-powersave-off.conf` and put the following content in it:

```
# File to be place under /etc/NetworkManager/conf.d
[connection]
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
wifi.powersave = 2
```

Restart NetworkManger with `udo systemctl restart networking.service`
Coinlookup Bot and API Added Shortcut Query e.g. 100 STEEM
Tags: crypto, blog, api, query
Published: 2023-03-06 20:15:29

Previously, I have noticed that many users just typed "1000 STEEM" and they would like to know the value of their assets, possibly in the unit of USD.

They could have queried "100 STEEM USD" or "100 STEEM USDT" but they just don't want to bother typing that much.

Thus, I have added the support for such shortcut query in the [cryptocurrency lookup tools](https://helloacm.com/the-chromebookmark-cryptocurrency-lookup-tool-in-javascript/).

When the query is in the format of `AMOUNT COIN-OR-FIAT` it will be as like querying `AMOUNT COIN-OR-FIAT USD`, which is to append " USD" at the end of the query.

See the examples of invoking the shortcut query in the [Cryptocurrency Bot](https://steemyy.com/bots.php):

```bash
$ curl -s --data "100 STEEM" https://price.justyy.workers.dev/query
{"query":["100 STEEM"],"time":"2023-03-06T20:10:16.225Z","result":["100 steem = 20.88650875 USD"]}
```


![image.png](https://cdn.steemitimages.com/DQmYjkBjjf1J3vcEPcVQBWhqNQeRaS2q4E3ie5Jvb3TRg7B/image.png)


![image.png](https://cdn.steemitimages.com/DQmX6Zt966uKoVHAxwfs3DRtn4n6SkgwwD38zPrjgJfZbpr/image.png)




<hr/>

### [Steem](https://steemyy.com) to the Moon!
You can swap the STEEM/SBD to USDT (TRC-20) via [Steem2USDT](https://steemyy.com/steem2usdt.php)
Personalizando Fonts no React + Material UI [Muito Fácil]
Tags: react, css, mui, beginners
Published: 2023-03-06 19:42:38

Se você já leu a documentação e tentou personalizar suas `fonts` quando está usando o Material UI no React deve ter fica espantado, mas calma lá, é bem mais simples que parece e vou explicar aqui.

##1 **Etapa 1** 
### 1.1 Escolha a fonte

Você vai importar sua font via CSS

>*Antes eu quero deixar uma recomendação, tenha um arquivo `Theme.css`*

*Nesse arquivo em geral eu coloco tudo relacionado exclusivamente aos temas... meio óbvio né* 😒


Veja um exemplo.

```CSS
:root {
  /* toknes cores */
  --tons-neutro-bg-primary: #f9fafc;
  --brand-color-primary: #3f8be9;
  --brand-color-secondary: #0b1f4d;
  --tons-neutro-text: #606162;
  --tons-neutro-border: #e6e8f0;
  --tons-neutro-bg-secondary: #fff;

  /* medidas radius */
  --radius-small: 0.25rem;
  --radius-medium: 0.5rem;
  --radius-large: 1rem;
  --radius-xlarge: 1.5rem;

  /* medidas fontes */
  --font-size-small: 0.75rem;
  --font-size-medium: 1rem;
  --font-size-large: 1.25rem;
  --font-size-xlarge: 1.5rem;
}
```
> Isso não é obrigatório, é só uma sugestão 😉 

### 1.2 Como e onde escolher minha fonte?
1. Acesse o Google Fonts [https://fonts.google.com/](https://fonts.google.com/)

![Google Fonts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ax24kvc6hqvzkjqvrvrw.png)

*Nesse exemplo estou usando a fonte Inter.*

Quando acessamos a fonte, você pode ver as variações do `font-weight` e aqui tem um passo importante.

> 
⚡ Selecione somente as fontes que você vai usar no seu projeto.

![Selecione a fonte que vai usar no projeto](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ao58e9r47fft63bk3d3.png)


Agora vem o pulo do gato 🙀

Clique nesse ícone
![Clique nesse ícone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijg4b9r3pgjach1o560i.png)

Aqui ele mostra as fontes que você selecionou, inclusive pode acrescentar mais.

![Revisão fontes selecionadas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kefpx1orm2rcxxd8c28s.png)

E aqui está a parte importante, você vai copiar apenas o endereço http, que nesse exemplo seria esse aqui 👇
`https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap`

![endereço http](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0k8xvgictqlq05ofioxj.png)


## *Etapa 2*
### Importando a fonte no CSS

Abra seu arquivo CSS principal ou onde está seu tema, no meu caso é o `Theme.css`.

Agora basta adicionar esse `@import` no topo

``` css
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;700;900&display=swap);

:root {
  /* toknes cores */
  /* ... */
}
```

## *Etapa 3*
### Usando sua fonte

Agora que fez isso, nos seus arquivos CSS, basta importar o arquivo `theme.css` e usar a fonte.

```css
@import "./Theme.css"; /* importando o CSS do tema. */

body {
  font-family: "Inter", sans-serif; /* sua nova fonte aqui */
}
```
Data Engineering
Tags: dataengineering, dezoomcamp, datatalks
Published: 2023-03-06 19:27:36

#Week5 of the Data Engineering Zoomcamp featuring Sejal Vaidya, Ankush Khanna, and Alexey Grigorev by #DataTalksClub.

Week 5 repo ➡️ [Github](https://github.com/Manny-97/Data-Engineering-Project/)

🛠 Tools
🧵 Apache Spark
🧵 Apache Hadoop
🧵 Google VMs

![Apache Airflow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfc0zps9z49kxpry3zpn.png)

🏹Week 5 (Batch Processing) Summary:

🎯 Streaming vs. Batch Processing: Advantages and Disadvantages.
🎯 Theoretical and Practical understanding of Batching Processing.
🎯 Bash scripting
🎯 Anatomy of Spark
🎯 RDDS
🎯 Connecting Spark to BigQuery
🎯 Setting up Dataproc cluster


![Apache Spark](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r0r0oqncs3hmhrbojqpk.png)

What a beautiful Monday to begin the week.
What is Smoke Testing
Published: 2023-03-06 19:11:14

Smoke testing is a type of software testing that is used to quickly evaluate the basic functionality of an application or system after a new build or release. The main objective of smoke testing is to ensure that the critical or core features of the application are working as expected, and that there are no show-stopper defects that would prevent further testing.

Smoke testing involves running a series of simple tests or test cases that cover the essential or most important functionalities of the application. These tests are typically focused on the key business flows or use cases that the application is designed to handle, and are intended to verify that the application is stable and can be further tested.

The term “smoke testing” is derived from the hardware industry, where it was used to describe the process of testing a new device for the first time, to check if it started up without catching fire or smoking. In software testing, smoke testing is often performed manually or through automated scripts, and can be executed quickly and efficiently to provide immediate feedback on the quality and stability of the software build.
What is Load Testing?
Published: 2023-03-06 19:02:04

Load testing is a type of software testing that is performed to evaluate how well an application or system can handle a large amount of traffic or user requests, under normal and peak conditions. The goal of load testing is to identify performance bottlenecks, assess system behavior, and determine whether the system can handle the expected load, all while maintaining acceptable response times.

Load testing involves simulating a large number of concurrent users, requests, or transactions to stress-test the system and observe how it behaves under different loads. During load testing, various performance metrics are measured, such as response time, throughput, and error rate, to evaluate the system’s performance under different loads.

Load testing is typically performed using specialized load testing tools that can simulate large amounts of traffic or users, and can generate detailed reports and metrics for analysis. The load testing tools can also simulate different types of traffic or user behavior to model real-world scenarios, such as peak traffic or unexpected spikes in usage.

Overall, load testing is an important aspect of software testing, as it helps to ensure that the system is capable of handling the expected load and that it can maintain acceptable levels of performance and response times.

**What is throughput here?**

In load testing, throughput refers to the rate at which a system can handle a specific number of requests or transactions within a given time frame. It is a measure of the system’s capacity to handle a certain amount of load, and is typically expressed in terms of requests per second (RPS) or transactions per second (TPS).

For example, if a web application can handle 100 requests per second, its throughput would be 100 RPS. Similarly, if a database system can process 50 transactions per second, its throughput would be 50 TPS.

Throughput is an important metric in load testing, as it helps to assess the system’s ability to handle a specific amount of load and to maintain acceptable levels of performance. By measuring the system’s throughput under different loads, load testers can identify performance bottlenecks and determine whether the system can handle the expected load.
There's no silver bullet
Published: 2023-03-06 18:53:00

I have some years in programming, and often I see some people being a fanboy of their favorite language/framework and forgetting how they should look at the problem they are trying to solve.

I was a big fanboy, Javascript was the savior salvation to all problems in the world for me, but that's not the truth.

Back in the day, I thought that JS could do everything, from webpages and backend to machine learning, and I was right JS still can do these things, but it is not the better tool for all that stuff.

> If the only thing you know how to use is a hammer, every problem looks like a nail

It's essential to understand that there's no one-size-fits-all solution in programming. Each language or framework has its strengths and weaknesses, and it's important to choose the appropriate tool for each task.

For example, Golang is a great tool for low-latency projects, but it might not be the best choice for machine learning. Similarly, Python is excellent for data analysis and machine learning, but it might not be the best option for mobile development.

## Conclusion
We must have an open mind to use different tools and languages to solve problems effectively. And we must be willing to learn new languages and frameworks as they emerge, rather than sticking to what we already know.

In summary, there's no silver bullet in programming. Instead, we must have a diverse toolkit and the ability to choose the right tool for each job.
What is Regression Testing?
Tags: testing, regression, programming, beginners
Published: 2023-03-06 18:49:46

Regression testing is a type of software testing that is performed to verify that changes made to an application or system have not introduced new defects or caused existing features to fail. It is a way to ensure that the software continues to function as expected after modifications have been made.

Regression testing involves re-running previously executed test cases on the modified code to ensure that all existing functionality continues to work correctly. This helps to identify any unintended consequences of changes, such as breaking existing functionality or introducing new bugs.

Regression testing is typically performed after major changes to an application, such as a new release, update, or bug fix. It can be performed manually or using automated testing tools, and can include both functional and non-functional testing, such as load testing and performance testing.

Overall, regression testing is an important aspect of software development and quality assurance, as it helps to ensure that changes to the software do not negatively impact existing functionality and that the application continues to meet the requirements and expectations of its users.
Compartilhando o Serial do Windows com a VM
Tags: virtualbox, windows, linux, virtualization
Published: 2023-03-06 18:47:39

Os computadores mais antigos tinham uma etiqueta com o número serial. Nos computadores mais novos o número serial está gravado na Bios.

Para recuperar o número serial através do Linux:

```
sudo strings /sys/firmware/acpi/tables/MSDM
```

Caso você não queira digitar o número serial, é possível compartilhar o serial diretamente com a VM através do VirtualBox:

```
VBoxManage setextradata VM-name \
"VBoxInternal/Devices/acpi/0/Config/CustomTable0" "/sys/firmware/acpi/tables/MSDM"
```

É preciso alterar a permissão do arquivo /sys/firmware/acpi/tables/MSDM:

```
sudo chmod 444 /sys/firmware/acpi/tables/MSDM
```

Referência: https://www.virtualbox.org/manual/ch09.html#changeacpicust
Built In Data Type in Ruby
Tags: webdev, javascript, programming, tutorial
Published: 2023-03-06 18:16:46

_Data types are types of “things” that are mainly used to represent data, such as numbers, text, and other values._

We will discusss the following data types:

- Numbers
- Strings (texts)
- True, False, and Nil
- Symbols
- Arrays
- Hashes

## Number:

1. A number is defined by a series of digits, using a dot as a decimal mark, and optionally an underscore as a thousands separator.
2. Mathematical operations result in a floating point number except if all number
s used are integer numbers.

```
# 0.1 + 2
# => 2.1
# 3.0/2
# => 1.5
```

## String:

1. The String, in programming languages, is text.
2. Strings can be defined by enclosing any text with single or double quotes.
3. These last few examples are examples of “calling methods on objects that are Strings”. Methods are “behaviour” that objects are capable of.

```
"This is one String!"
'And this is another one.'

# Here are a few things you can do with Strings:
"bhartee" + "sahare"
=> "bharteesahare"

"hi" + "hello" + "hey"
=> "hihellohey"

"hey" * 2
=> "heyhey"

"1"+"1"+"1"
=> "111"

"1"* 5
=> "11111"

"hello".upcase
=> "HELLO"

 "hello".capitalize
 => "Hello"

 "hello".reverse
 => "olleh"

 "hello".length
 => 5
```

## True, False, and Nil:

1. The object true represents “truth”, while false represents the opposite of it.
2. The object nil represents “nothing”.

## Symbols:

1. Symbols are like strings, except they are code.
2. A symbol is created by adding a colon in front of a word.
3. A symbol is written like this:= :name
4. Symbols are unique identifiers that are considered code, not data.
5. Symbols are a special, limited variation of Strings.
The technical difference:

```
# even though the 3 Strings created are exactly the same, every new String created has a different object_id: They’re actually different objects, even though they contain the same text.

"a".object_id
 => 460
 "a".object_id
 => 480
 "a".object_id
 => 500

We now get the same object_id for each of the Symbols, meaning they’re referring to the exact same object.

:test.object_id
 => 380188
3.0.0 :002 > :test.object_id
 => 380188
3.0.0 :003 > :test.object_id
 => 380188
```

> Array and Hash Cover in Next Post......
Finish.
Tags: webdev, beginners, programming
Published: 2023-03-06 18:10:00

It's been a while since my first post. Going into the bootcamp, I had done a bit of studying in online courses and I was probably prepared for a measly week or two. For the rest of the 3 months, information was force fed to me for 4 hours, 5 days a week and it got me drained. 

But I would tell anyone, that I would do it all again. The amount of technology learned, tools used, and habits made compiled into the skills I need in order to be a starting developer. Even though sometimes the imposter syndrome arises, I have to continue to work diligently, think critically, and finish strong.
The Revert Statement in Solidity
Tags: solidity, ethereum, web3, blockchain
Published: 2023-03-06 18:05:53

>The revert statement in Solidity is used to throw an exception, return unused gas, and revert to the original state 

The revert statement is a function in Solidity that is used to generate exceptions and display an error message. It is similar to the require function, but it does not evaluate any statement and does not depend on any state or statements. When a revert statement is hit, an exception is thrown, along with the return of unused gas, and reverts to its original state. The Solidity assert exceptions use all of the gas provided to the call. Metropolis (the third stage of the Ethereum launch process), require not to use of gas. 

Solidity has functions designed for reverting state changes to prevent possible issues. The revert function accepts a string message consisting of information about the issue delivered to the caller. Instances of errors can only be created using revert statements. The error creates data that is then passed to the caller with the revert operation to either return to the off-chain component or catch it in a try/catch statement. Custom errors are defined using revert statements, but they are rather expensive, especially when it comes to deployment cost, and it is difficult to use dynamic information in them. 

When a contract invokes a function that reverts, and updates down all adjacent branches will fail with it. An original signed transaction from an externally owned account will fail if it encounters a revert statement.

Similar to the require statement, this one specifies the condition. It does not assess any conditions and does not rely on any state or statement to function properly. It can be used to generate exceptions, display errors, and revert the function call, amongst other things. This statement comprises a string message that describes the problem with the information provided by the exception. It is implied by the usage of the revert statement that an exception is raised, the used gas is returned, and the state is restored to its initial state. Revert is used to handle the same types of exceptions as require does, but with a little bit more advanced logic than require does.
```
pragma solidity ^0.8.0;
 
// Creating a contract
contract revertStatement {
   
   // Defining a function to check condition
   function checkOverflow(uint num1, uint num2) public view returns(string memory, uint){
        uint sum = num1 + num2;
         if(sum < 0 || sum > 255){
             revert(" Overflow Exist");
         }
         else{
             return ("No Overflow", sum);
         }         
    }        
}
```
For more content, follow me at - https://linktr.ee/shlokkumar2303
Boost Your Productivity as a Developer with Obsidian
Tags: obsidian, productivity, note, knowledgebase
Published: 2023-03-06 18:03:29

Are you a developer who struggles to keep track of all your notes and ideas? Do you find yourself drowning in a sea of digital clutter? Well, fear not my tech-savvy friends, because [Obsidian](https://obsidian.md/) is here to help! 🎉

Obsidian is a productivity tool that's been gaining popularity in the developer community. It's a note-taking app that uses a concept called "networked thought" to connect your notes and ideas in a more meaningful way. And let me tell you, it's a game-changer! 🚀

So, how can Obsidian improve productivity for a developer? Let's dive into some tips and tricks. 🤓

1. Organize Your Thoughts: Obsidian allows you to organize your notes in a way that makes sense to you. Use tags, links, and folders to create a network of information that's easy to navigate. Whether you're working on a specific project or just trying to keep your thoughts in order, Obsidian can help.

2. Create a Knowledge Base: Obsidian is great for creating a personal knowledge base. You can use it to store information like coding snippets, links to helpful resources, and documentation for projects. With Obsidian, you'll have all the information you need at your fingertips, organized and ready to use.

3. Stay Focused: Obsidian allows you to create focused workspaces, which can help you stay on task and reduce distractions. Whether you're working on a complex project or just trying to stay focused during a busy day, Obsidian can help you get things done.

4. Collaborate with Others: Obsidian makes it easy to collaborate with others. You can share your notes and ideas with colleagues, and work together to create a network of information that's useful for everyone. With Obsidian, you can stay connected and collaborate from anywhere.

5. Stay on Top of Your Tasks: Obsidian has a built-in task manager that allows you to keep track of your to-do list. You can set due dates, create recurring tasks, and mark tasks as complete when you're done. With Obsidian, you'll never forget an important task again.

Obsidian functions like a reliable personal assistant that never forgets anything, resembling a brain that is always active without the need for a caffeine addiction, and is similar to a secret weapon in your productivity arsenal. With Obsidian, becoming a productivity ninja is achievable in no time. 💪

To sum up, Obsidian is a potent tool that can aid developers in remaining organized, focused, and successful. Whether you're working on a challenging project or attempting to keep track of your daily tasks, Obsidian can be beneficial in completing your to-do list. So, why not give it a shot and witness how it can enhance your productivity? You won't be disappointed! 🙌

And if you want more productivity tips and tech insights, be sure to follow me on Twitter at [@amirmeimari](https://twitter.com/amirmeimari). Happy note-taking!