teleren/devto huggingface dataset:
How to create a new token on the Solana Blockchain
Tags: blockchain, solana, tokens
Published: 2022-07-05 10:55:03

## Introduction
Tokens are units of value that are built and maintained on blockchain networks, they are essentially digital assets that are usually fungible or nonfungible.
The Solana blockchain has its associated framework for building and deploying tokens similar to the ERC-20 tokens on the Ethereum network.

In this tutorial, we will create our own token and deploy it to the Solana blockchain.

The Solana token program is written in Rust programming language and basic knowledge of the language is recommended. We are going to create our token using the **spl command-line interface**.
After successful installation of rust on your computer, run the following command to install the `spl-token-cli`on your computer:

```
cargo install spl-token-cli
```
to know more about the `spl-token-cli` commands, check the help command for some tips with this command, `spl-token --help`. That's great, let's move ahead to create our token in the following steps. But before we go further, we need to have a Solana wallet to be able to create our token.

Install the Solana tool suite on your computer by following these three steps.

1. Open the command prompt as a system administrator, and paste the following command to Download the Solana installer into a temporary directory. 

```
curl https://release.solana.com/v1.10.29/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dirs
```
2. Copy and paste the following command to update to the latest version of the Solana suite.

```
C:\solana-install-tmp\solana-install-init.exe v1.10.29
```
you can also update Solana anytime using `solana-install update`.

Send a few `Sols` to the wallet you are using to create a token as you will have to use a small price to create a new token.
create the token with the following command.

3. Restart your terminal to get the installations updated. Great,  we're almost there. The next step is to create our token. 

Initialize the token creation with the following command and that's all with token creation on Solana network.
```
spl-token create-token
```
A unique token identifier will be given for your token.
Once you are able to create your token successfully, you also  need to create an account for your new token and you can do this by using this command. 

```
spl-token create-account <unique token identifier>
```
Mint some tokens into the account you created for your new token with the following command.

```
spl-token mint <unique token identifier> 50
```
The token supply and balance can now be viewed from your account:

```
spl-token balance <unique token identifier>
```

```
spl-token supply <unique token identifier>
```
Always refer to `spl-token --help` for further actions on your token.
React Native fixing typescript issue: "Type 'Timeout' is not assignable to type 'number'"
Tags: reactnative, typescript, mobile
Published: 2022-07-05 10:54:58

---
title: React Native fixing typescript issue: "Type 'Timeout' is not assignable to type 'number'"
published: true
description: 
tags: reactnative, typescript, mobile
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omtqxr7xzbcr4t1mqt7z.png 

---


You may encounter this typescript issue in your React Native project with ease (for example after updating RN to the latest version)

The correct tygins for global functions are provided by the lib definition, though:


```tsx
declare function setTimeout(handler: () => void, timeout: number): number;
declare function setTimeout<Args extends any[]>(
    handler: (...args: Args) => void,
    timeout?: number,
    ...args: Args
): number;
```

> Source: [`types/react-native/globals.d.ts`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/25dc5becf64ac808ba8a9c56e7d5c6741c3ee410/types/react-native/globals.d.ts#L18-L23)

The primary issue is that `@type/node` global types replace `@type/react-native` global types.

And by default, typescript behaves in that way:

> All visible ”@types” packages are included in your compilation.

---

Ok, then let's specify only that global typing that we actually need (`tsconfig.json`): 

```json
{
  "compilerOptions": {
    "types": ["react-native", "jest"]
  }
}
```

After modifying `compilerOptions.types` nodejs typing will be exclude.

Read more:
- https://www.typescriptlang.org/tsconfig#types
Important Tips For an Interview
Tags: career, interview
Published: 2022-07-05 10:43:20

- Before attending any interviews, the first thing you should do is investigate the company you intend to work for.

- Understanding the job function is another crucial task for applicants, therefore it is best to read up on it in advance of the interview if you have any lingering questions.

- Preparing for the fundamental [interview questions](https://insideaiml.com/blog/most-common-guesstimate-interview-questions-1199) is another suggestion for a fruitful interview. The employer will frequently ask you the same questions, such as "Tell us about yourself" and "Why do you want to work with us?

- In an interview, it's crucial to stay focused and keep an eye on the calibre of your responses. Your preparation is evident in the way you present your responses.
NAKIVO Backup for Microsoft 365 and Exchange Online backup plan
Tags: microsoft
Published: 2022-07-05 07:01:49

Exchange Online is a tool that provides online access to your business email from anywhere in the world. It is important to regularly backup your Exchange Online webmail in order to make sure your files are restorable in the event of a data breach or data loss incident.

[NAKIVO Backup & Replication](https://piunikaweb.com/2022/06/01/nakivo-backup-for-microsoft-365-and-exchange-online/) is software that facilitates the creation and storing of your Office 365 Exchange Online backups onsite. It is an excellent solution for Microsoft 365 to protect your cloud data.

Some presume that Microsoft Exchange Online and Office 365 are absolutely different. However, Exchange Online is just one of the options that are a part of Office 365, which is a compilation of tools and not a separate product.
Recognize and Bind a Bank Card Through One Tap Using ML Kit
Tags: hmscore, news, machinelearning
Published: 2022-07-05 10:39:35

Developments in mobile network technology have facilitated numerous errands in our daily life, for example, shopping online and offline, paying utility bills, and transferring money. Such convenience is delivered by apps with the payment function that often requires a card to be bound to user's account. Users have to complete the whole binding process themselves, by manually inputting a long bank card number, which is both time-consuming and error-prone. The [bank card recognition](https://developer.huawei.com/consumer/en/doc/development/hiai-Guides/bank-card-recognition-0000001050038118?ha_source=hms3) service from ML Kit overcomes these drawbacks by automatically recognizing a bank card's key details. With it, mobile apps can provide a better user experience and thus improve their competitiveness.

## Service Introduction
The service leverages the optical character recognition (OCR) algorithm to recognize a bank card from the image or camera streams (whose angle offset can be up to 15 degrees) captured from a mobile device. Then the service can extract key card details like the card number, validity period, and issuing bank. Extracted details are then automatically recorded into the app. It works with the [ID card recognition](https://developer.huawei.com/consumer/en/doc/development/hiai-Guides/idcard-recognition-0000001050040063?ha_source=hms3) service to provide a host of handy functions including identity verification and card number input, simplifying the overall user experience.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ri9g2x6a8qfi8e0ucwf8.PNG)

### Demo
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/whld70jzxkh1zcsmlloq.gif)

## Use Cases
Currently, binding bank cards is required by apps in a range of industries, including banking, mobile payment, and e-commerce. This service can accurately extract bank card details for the purpose of performing identity verification for financial services. Take an e-commerce app as an example. With the service integrated, such an app can record the bank card information that is quickly and accurately output by the service. In this way, the app lets users spend less time proving who they are and more time shopping.

## Features

- **Wide coverage of bank cards:** This service supports mainstream bank cards such as China UnionPay, American Express, Mastercard, Visa, and JCB, from around the world.

- **Accurate and fast recognition:** The service recognizes a card in just 566 milliseconds on average, delivering a recognition accuracy of over 95% for key details.

**How to Integrate ML Kit?**
For guidance about ML Kit integration, please refer to its [official document](https://developer.huawei.com/consumer/en/doc/development/hiai-Guides/service-introduction-0000001050040017?ha_source=hms3). Also welcome to the [HUAWEI Developers](https://developer.huawei.com/consumer/en/?ha_source=hms3) website, where you can find other resources for reference.
A practical approach to creating graphql APIs in node.js - part two(How to setup Apollo Server)
Tags: javascript, beginners, tutorial, graphql
Published: 2022-07-05 10:31:31

In our previous post [here](https://dev.to/princewhyte2/a-practical-approach-to-creating-graphql-apis-in-nodejs-part-one-schemas-and-queries-26e4) we looked at the foundational concept of graphql (schemas and queries).

Let's take it a step further and implement a node.js graphql server.

We'll be implementing our server by using the leading library Apollo server.

To begin use the command **_npm init_** to create a new node.js project and install dependencies.

`npm install apollo-server graphql`

let's create an index.js file with initial content as follows:

```
const { ApolloServer, gql } = require("apollo-server")

let contacts = [
  {
    name: "Della charles",
    phoneNo: "234-4567-890",
    address: "Eleme street 34",
    id: "3d594650-3436-8b80ba54c431",
  },
  {
    name: "Awurum mikel",
    phoneNo: "234-4567-560",
    street: "Tombia town 7",
    id: "3d599470-3436-8b80ba54c431",
  },
]

const typeDefs = gql`
  type Contact {
    name: String!
    phoneNo: String
    address: String!
    id: ID!
  }

  type Query {
    countContact: Int!
    allContacts: [Contact!]!
    findContact(name: String!): Contact
  }
`

const resolvers = {
  Query: {
    countContact: () => contacts.length,
    allContacts: () => contacts,
    findContact: (root, args) => contacts.find((p) => p.name === args.name),
  },
}

const server = new ApolloServer({
  typeDefs,
  resolvers,
})

server.listen().then(({ url }) => {
  console.log(`Server running at ${url}`)
})

```
For our server to be running here the most important weapon is this block of code :

`const server = new ApolloServer({
  typeDefs,
  resolvers,
})`

The ApolloServer takes in an object with two properties as an argument. The first is the typeDefs (our schemas and queries definition), and the second is resolvers.

Resolvers are the code, which defines how GraphQL queries are responded to.

`const resolvers = {
  Query: {
    countContact: () => contacts.length,
    allContacts: () => contacts,
    findContact: (root, args) => contacts.find((p) => p.name === args.name),
  },
}`

the resolver above responds to the query definition below 

` type Query {
    countContact: Int!
    allContacts: [Contact!]!
    findContact(name: String!): Contact
  }`

As you can see each query has an equivalent resolver.

we can now start our server by running the command
`node index.js`

Our server can now listen for queries and the apollo server comes with a default explorer to try out the queries.

see you in the next post.
you can connect with me on [linkedin ](https://www.linkedin.com/in/princewhyte2)
[github ](https://github.com/princewhyte2)
👤How to add a People Picker to an Adaptive Card
Tags: giulianodeluca, adaptivecards, powerautomate, microsoftteams
Published: 2022-07-05 10:24:30

---
title:👤How to add a People Picker to an Adaptive Card
published: true
description: In this video tutorial, you'll learn how to add a People Picker to an Adaptive Card.
tags: giulianodeluca,adaptivecards,powerautomate,microsoftteams
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gm3l6bgin0lfx7mm377e.png
# Use a ratio of 100:42 for best results.
---

👤How to add a People Picker to an Adaptive Card 
🎬NEW VIDEO N. 244🎬 
In this video tutorial, you'll learn how to add a People Picker to an Adaptive Card. 
People Picker helps users to search and select users in Adaptive Card. 
You can add People Picker as input control to Adaptive Card, which works across chats, channels, task modules, and tabs. People Picker supports the following features: 
- Searches single or multiple users. 
- Selects single or multiple users. 
- Reassigns to single or multiple users. 
- Prepopulates the name of selected users. 

{% youtube gHuqcrzZ0LA %}
Tips for Code Authors for Better Code Reviews
Tags: codereview, webdev
Published: 2022-07-05 10:21:06

1. Keep pull requests small

Try to keep the pull requests as small as possible. When a pull request requires more than three comments— and especially once it reaches five — it is usually a sign that the pull request should have been broken up into smaller pull requests. 

‍

2. Be open to feedback

Remember, it can be just as stressful to give feedback as it is to receive it. Coding is a craft and it is hard to point out ways that someone else's hard work could be improved. 

If you feel frustrated by the feedback you received, pause before responding – perhaps put it aside and go for a walk/sleep on it and come back to it the next day. Is there some truth to the feedback that was shared? 

The more open and appreciative you can be with feedback, the more ideas you will get from others, and the more you will grow.

‍

3. Respond quickly – if you can

If you have a negative emotional reaction to the review, best to step away. As Oasis so eloquently sang, Don’t Write Back to a Code Review in Anger… or at least that’s how we remember it.

If you don’t have a negative reaction, deal with the review as fast as possible– answer the questions, make the changes, and ask follow-up questions.

Context switching is a killer for coding flow. The goal is to minimize the time spent for you and the Reviewer thinking about this review vs. other coding work. If you can reply to the review just after the Reviewer completes it, you avoid the mental effort later for both of you to get back up to speed.

‍

4. Switch to synchronous communication for any follow-up

Code reviews are usually asynchronous and can be completed thousands of miles apart.

In the Olden Days, when Dinosaurs kept using up the copier toner with jokes that really weren’t all that funny, a Coder could ask a question or a colleague by walking over to their desk.

Now we have many other tools, which are helpful up to a point. 

Now it’s time for the sixth and final Golden Rule of Code Reviews (you didn’t think we’d forget, did you? If the code Author has a follow-up question to a code review, do it synchronously in real-time, not asynchronously. Pick up the phone, start a huddle, and walk over.

‍

The reason is context switching. At this point, there will be three moments of focused attention on the code:

1- Author writing

2- Reviewer reviewing

3- Author internalizing the review

‍

Asking clarifying questions about the review automatically means there will be a fourth moment:

4-Reviewer responding.

‍

The goal of synchronous communication here is to avoid requiring a fifth, sixth, seventh, etc. moment of attention.
Leverage git to quickly explore a new project
Tags: git, swift, productivity, programming
Published: 2022-07-05 09:55:50

Let’s assume you’re new to a project, want to quickly catch up with a team or from whatever other reason just want to grasp on what’s currently happening in it.

A great tip from https://twitter.com/LukaszKasperek 👇
https://appunite.com/blog/how-to-quickly-explore-new-project
Merge Two Sorted Lists using recursion ,Leetcode Problem (Leetcode:21)
Tags: javascript, leetcode, programming, computerscience
Published: 2022-07-05 09:53:49

You are given the heads of two sorted linked lists list1 and list2.
Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list.

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

Solution: Here we are checking two list with empty case if any of list is null then it will return other list. After that we are trying to check value of first list is greater than values of second list then we are doing recursion based upon where we are passing Next pointer of first list and second list as parameter and vice versa.

Javascript solution:
```
var mergeTwoLists = function(list1, list2) {
     if (list1 === null) {
        return list2;
    }

    if (list2 === null) {
        return list1;
    }

    if (list1.val < list2.val) {
        list1.next = mergeTwoLists(list1.next, list2)
        return list1;

    } else {
        list2.next = mergeTwoLists(list1, list2.next)
        return list2;
    }
};
```
Optimize your bundle size by eliminating dead code / tree-shaking in Webpack
Tags: webpack, javascript, optimization, react
Published: 2022-07-05 09:52:07

When building modern javascript apps (regardless of browser or server-side use), it's important to know what your dependencies are and what you utilize from those dependencies. If no care is given to this, your bundle size may end up being very large and result in a non-performant user experience. Especially if this is a browser-based application that every byte matters.

Today, I want to talk about a very effective method to optimize your bundle size called Tree Shaking.

Traditionally, we install a module and import the methods we use from a module. In many modules, the methods in them are not separately exported and are part of a single default export that we object deconstruct from the default import. The most common example of this is:

```
import { Box } from "@material-ui/core"
```

This results webpack to bundle all module methods. Even if we don't use any of them.
There are a couple of ways to avoid this. Some libraries like lodash allow you to install only what you need. Instead of installing the entire lodash library, you can install only the module you need like lodash.get or lodash.trottle.

Another method is the tree shaking where we still install the full library but when we package our bundle, we tell webpack that we are only importing a portion of the larger library.

[https://material-ui.com/guides/minimizing-bundle-size/#option-1](https://material-ui.com/guides/minimizing-bundle-size/#option-1)

Instead of:

```
import { Box } from "@material-ui/core"
```

Do this:

```
import Box from "@material-ui/core/Box";
```

Similarly, a lodash example: instead of:

```
import { groupBy } from "lodash";
```

Do this:

```
import groupBy from "lodash/groupBy";
```

### Alternative method

There is also a babel plugin that can do this for you: babel-plugin-tree-shaking-import

### Consistent import convention

Another key point to pay attention to about tree shaking is the consistency throughout your code. Make sure every instance of a module's imports should be done consistently to point module paths. A single instance of a traditional way of importing the module and then deconstructing the parts needed will result in bundling the whole module in your bundle again.

Another reason to look into using the babel plugin is to achieve this automatically.

---

This post was first published on my personal blog: [https://mfyz.com/optimize-your-bundle-size-by-eliminating-dead-code-tree-shaking-in-webpack/](https://mfyz.com/optimize-your-bundle-size-by-eliminating-dead-code-tree-shaking-in-webpack/)
#firstpost
Tags: webdev, beginners, firstyearincode, devjournal
Published: 2022-07-05 09:31:41

I am Feranmi and this  is a technical writing containing all I've learnt so far in the Code Bootcamp:
	Deciding to come to the bootcamp and being able to make it is a decision I'll be forever grateful for. Before now I did not know anything about coding or web development,I've just heard about it, but when it was announced that the bootcamp will be coming up, I decided to give it a trial. I was not present on the first day of the class,I joined the class during the second meeting, when the class started I was lost, I did not know what was going on, everything the teacher was teaching looked foreign and I became dicouraged, I started contemplating on whether to leave the class and not come back,but as God will have I did not leave,I kept looking at the screen and doing whatever the teacher asked us to do.
	We were being taught how to prepare a CV that day,the teacher was very patient while he taught us the basic things we needed to know,I started following what he was doing and I discovered it wasn't that hard. From the beginning of the class till this moment here are the highlights of the things I've learnt so far:
* How to create a new folder
* How to create a file in VSCode
* How to download an image from google
* How to upload an image on the Visual Studio Code
* How to prepare a CV using Visual Studio Code
*  The various elements we have in HTML
* How to design our code in CSS
* How to link our CSS file with HTML
* Different styles in HTML and CSS
* Meaning of various elements and tags in HTML and CSS
* How to inspect our work  
	To mention a few,I'll be writing more as the class continues.
	Credit to my teacher and coach 
	MR. OKIKI and PASTOR AMAO
Build a Group Video Call System using PHP,Javascript + WebRTC Day 6
Tags: webrtc, webdev, php, programming
Published: 2022-07-05 09:30:18

WebRTC unlocks the possibility that people can create any video chat app they like. The freedom that WebRTC grants makes the technology highly competitive against traditional video chat apps like Skype.In this video we'll cover creating GenerateProfileImage method  for Participant

{% youtube PjXQo6u293o %}
How to Develop an Interactive CLI with C# to Manage SendGrid Dynamic Email Templates
Tags: cli, dotnet, csharp, sendgrid
Published: 2022-07-05 09:26:40

I like developing my own CLIs and installing them using the dotnet tool command. I can then use them to make some manual tasks easier for myself. Recently I started playing with SendGrid Dynamic Email Templates. They have a great user interface but I wanted to do things programmatically.

I used [CliFx](https://github.com/Tyrrrz/CliFx) before and was already familiar with how fast you can develop a CLI. The fun part of this project was to make the CLI interactive by using the [Sharprompt](https://github.com/shibayan/Sharprompt) library.

It basically works like this:
[![asciicast](https://asciinema.org/a/506289.svg)](https://asciinema.org/a/506289)

If you're interested in expanding on it, you can find the source code [here](https://github.com/Dev-Power/sendgrid-dynamic-template-email-manager-cli). It's open-source so feel free to clone and play around.

I also wrote a step-by-step article (quite long though) to explain how all the tools work together [here](https://devpower.co.uk/dotnet/how-to-develop-an-interactive-cli-with-csharp/)