teleren/devto huggingface dataset:
How to develop the best Crypto Exchange Platform.
Tags: crypto, cryptoexchange, bestcrypto
Published: 2023-05-04 11:44:07

A Crypto Exchange Platform serves as a digital marketplace where various digital currency tokens and fiat money can be traded with virtual currency. It allows traders to buy and sell cryptocurrencies, buy products, and other crypto-related properties. In addition to facilitating trades, crypto exchanges provide services involving wallet services, charting tools, real-time price seeking, and customer support. It is commonly well-known nowadays that several companies and entrepreneurs operate crypto trades. There are different types of crypto exchange platforms available, and let us have a deep dive into the topic.

**Types of Crypto Exchange Platforms**:
  
Centralized Crypto Exchange
Decentralized Crypto Exchange
Peer-to-Peer Crypto Exchange
Hybrid Crypto Exchanges

**Features of Crypto Exchange:**

User Interface
User authorization and verification
Trading engine
Wallet
Admin panel
Transaction history
Security
Liquidity

**Benefits:**

Low cost
Everyone can use it
Privacy and security
Non-Stop access to your currency
Revenue generation 


**Steps to develop crypto exchange and what to consider when developing a platform:**

**Plan and Prepare**: One of the most important decisions you will make when developing a crypto exchange platform is choosing the right technology. You need to select a secure and fast technology.

**Focus on security**: Security is foremost when it comes to crypto exchanges. You will need to implement the latest security measures.

**Provide a  user experience**: The user experience is crucial to the success of a crypto exchange platform. Your platform has to be easy to utilize and handle.

**Provide excellent customer service**: Good customer service is essential for building a loyal user base. 

**Regulatory compliance**: It is a critical aspect of running a crypto exchange platform. It is necessary to be updated with the latest regulations and ensure the platform is compliant with all applicable laws.

**Launch the exchange**: Finally, you should market your platform effectively to attract users. It may include using social media, paid advertising, and influencer marketing.

**Conclusion:**

As a result, developing a cryptocurrency exchange platform is a difficult task, but there are companies providing a top-notch cryptocurrency exchange platform development solution. If you are looking to develop your own crypto exchange platform, I suggest Beleaf Technologies.

Beleaf Technologies is a leading company that establishes the best crypto exchange platform. It has a team of skilled developers. They provide security, user-friendly, regulatory compliance, and effective marketing. Spark your Crypto exchange business with Beleaf Technologies.
Call Asynchronous With Typescript
Tags: tutorial, typescript, webdev, beginners
Published: 2023-05-04 13:06:16

**Make Interface for What Api You Can Get**

```
interface ITodo {
	userId: number;
	id: number;
	title: string;
	completed: boolean;
}
```

**Make Call With Async and Await Arrow Function**

```
const getTodo = async (): Promise<ITodo> => {
	const response = await fetch("https://jsonplaceholder.typicode.com/todos/1");
	return await response.json();
};
```

and **Last Get The Data in Another Async Await Arrow Function**

```
const getTodoData = async (): Promise<void> => {
	const result = await getTodo();
	console.log(result);
};

getTodoData();
```
Resolvendo problemas no hackerRank: Redução de Strings
Tags: javascript, beginners
Published: 2023-05-04 12:58:47

Olá, seja bem vindo a mais um Resolvendo problemas no HackerRank: No caso de hoje, reduzir os valores que se encontram dentro de um parâmetro. Vejamos mais informações com a explicação e sua resolução.

**Super Reduced String -**

Reduza uma sequência de caracteres minúsculos no intervalo ascii[‘a’..’z’]executando uma série de operações. Em cada operação, selecione um par de letras adjacentes que correspondam e exclua-as.

Exclua o máximo de caracteres possível usando este método e retorne a string resultante. Se a string final estiver vazia, retorne Empty String. Vejamos um exemplo:

- aaabccdddd

- abd

A execução do código a seguir nos mostra:

```
function superReducedString(s) {
    // Write your code here
  let arr = s.split("");
  
    for (let i = 0; i < arr.length; i++) {
      
        if (arr.length === 0) return ('Empty String')
        if (arr[i] === arr[i + 1]) {
            arr.splice(i, 2)
            i = i - 2
        }
    }
    return arr.join('')
}
```

A linha let arr = s.split(""); converte a string s em um array de caracteres, onde cada caractere da string se torna um elemento do array. Isso é feito usando o método split(""), que divide a string em cada caractere vazio.

Em seguida, um loop for é usado para iterar sobre o array de caracteres. A variável de controle i representa o índice atual no array.

Dentro do loop, há uma verificação condicional if (arr.length === 0) return ('Empty String'). Se o tamanho do array se tornar zero, isso significa que todos os caracteres idênticos foram removidos e a string resultante é vazia. Nesse caso, a função retorna a string 'Empty String' para indicar que a string original foi completamente reduzida.

A próxima verificação condicional if (arr[i] === arr[i + 1]) verifica se o caractere atual é igual ao próximo caractere no array. Se eles forem idênticos, isso significa que encontramos uma sequência de caracteres repetidos.

Dentro do bloco if, a linha arr.splice(i, 2) remove os caracteres repetidos do array. O método splice modifica o array original, removendo dois elementos a partir da posição i, ou seja, o caractere atual e o próximo caractere.

Após a remoção dos caracteres repetidos, a linha i = i - 2 é executada para atualizar o valor da variável de controle i. Isso é necessário para garantir que o próximo loop do for verifique novamente o caractere atual e seu novo próximo caractere, já que os índices do array foram modificados pela remoção.

O loop continua até que todos os caracteres repetidos tenham sido removidos do array.

Finalmente, fora do loop, a função retorna a string resultante usando o método join(''). Isso une todos os elementos do array em uma única string sem espaços entre eles.

O resultado será:

```
aaabccddd
Expected Output
abd
```


Assim, concluímos mais um Resolvendo problemas no HackerRank: até a próxima.
Nunca deixe ninguém diminuir seus feitos - a importância de valorizar suas conquistas!
Tags: beginners, devrel
Published: 2023-05-04 12:56:25

Todos nós temos objetivos, sonhos e metas que queremos alcançar em nossas vidas. Quando finalmente conseguimos realizar algo que tanto desejávamos, é natural sentir uma sensação de orgulho e satisfação. No entanto, muitas vezes, essa alegria é rapidamente abalada pela falta de reconhecimento dos outros.

É comum que, quando contamos nossas conquistas, as pessoas não demonstrem o mesmo entusiasmo que sentimos. Ou pior, algumas pessoas podem minimizar nossos feitos ou até mesmo tentar nos desencorajar. Isso pode acontecer por diversos motivos, como inveja, ciúmes ou simplesmente falta de interesse.

Mas, independente do motivo, nunca deixe que a falta de reconhecimento dos outros diminua seus feitos. Você trabalhou duro, superou obstáculos e conseguiu alcançar algo que queria muito. Isso é motivo de comemoração e deve ser valorizado.

Ao invés de se deixar abalar pela falta de reconhecimento dos outros, celebre suas conquistas com quem realmente se importa com você. Faça uma festa, saia para jantar, compre um presente para si mesmo. Crie rituais de comemoração que sejam significativos para você e que te ajudem a reconhecer a importância do que conseguiu.

Além disso, é importante lembrar que o sucesso é relativo e que cada pessoa tem suas próprias definições de sucesso. O que pode ser um grande feito para você, pode não ser tão significativo para outras pessoas. Isso não significa que seus feitos sejam menos importantes ou menos dignos de celebração. Apenas significa que cada um tem suas próprias prioridades e objetivos na vida.

Por fim, nunca se auto-sabote diminuindo seus próprios feitos. Reconheça todo o trabalho que teve para chegar onde está e valorize cada passo que deu em direção aos seus objetivos. Mantenha o foco em suas metas e siga em frente, sem se importar com a falta de reconhecimento dos outros. Afinal, o mais importante é o que você pensa de si mesmo e das suas realizações.
Java error: import javax.xml.bind.JAXB
Tags: java, xml, jaxb, maven
Published: 2023-05-04 12:56:18

I work at one project which is developed on Java 8 (i.e. Java 1.8). I cloned the repo on my computer, I have installed the dependencies and I got this error:


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

The import javax.xml.bind.JAXBException cannot be resolved

Since Java 11 this library is not contained anymore in Java. I'm running Java 14. So, I don't have it. To fix this I had to add this dependency in pom.xml

```
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.1</version>
</dependency>
```

And that has fixed the project.
12 Easy and Useful JavaScript Snippets for Beginners.
Tags: webdev, javascript, tutorial, beginners
Published: 2023-05-04 12:48:44

Maintaining a list of useful yet simple JavaScript code snippets can save a good amount of time. You can always revisit the list when you are working on a complex JavaScript app and don't want to spend too much of time building a logic for simple tasks. Let's have a look at some of these snippets that are easy-to-understand and can save a good amount of time.

#1. Create an array of a range of numbers
```JavaScript
const numbers = [...Array(15).keys()].map(x => x + 1);
console.log(numbers); //[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
```

#2. Check if the number is Even or Odd
```JavaScript
//Even
const num = 4;
const isEven = num % 2 === 0;
console.log(isEven); //true

//Odd
const num = 9;
const isOdd = num % 2 !== 0;
console.log(isOdd); //true
```

#3. Get a sub-string of a string
```JavaScript
const subStr = 'jason'.substring(1, 4);
console.log(subStr); //aso
```

#4. Replace a string
```JavaScript
const replacedStr = 'king'.replace('in', 'on');
console.log(replacedStr); //kong
```

#5. Check if a string starts with or ends with a specific strings
```JavaScript
//startsWith
const startsWth = 'arnold'.startsWith('ar');
console.log(startsWth); //true;

//endsWith
const endsWth = 'arnold'.endsWith('ld');
console.log(endsWth); //true;
```

#6. Trim and remove all empty spaces from a string
```JavaScript
const strWithSpace = ' ryan ';
const strWithoutSpace = strWithSpace.trim();
console.log(strWithoutSpace);
```

#7. Get the power of a number.
```JavaScript
//1) Using the Math.pow() method
const power = Math.pow(2, 6);
console.log(power); //64;

//2) Using the exponentiation operator
const power1 = 2**6;
console.log(power); //64;
```

#8.  Check if an object has a specific property
```JavaScript
const name = {
 firstName: "Shawn",
 lastName: "Ronalds",
 age: 35
};
const hasProp = 'firstName' in name;
console.log(hasProp); //true;
```

#9. Creating a copy of an object
```JavaScript
const profile = {
 name: "John Davis",
 city: "London",
 age: '45',
 hobby: 'football'
}
const profileCopy = {...profile};
console.log(profileCopy); //{name: 'John Davis', city: 'London', age: '45', hobby: 'football'}
```

#10. Delete a property from an object
```JavaScript
const car = {
 brand: 'Volvo',
 topSpeed: '250mph',
 color: 'red'
}
delete car.brand;
console.log(car); //{topSpeed: '250mph', color: 'red'}
```

#11. Remove duplicate items from an array
```JavaScript
const arr = [1, 2, 1, 3, 4, 7, 4, 8, 9]
const removeDuplicates = [...new Set(arr)];
console.log(removeDuplicates);
```

#12. Merge 2 arrays or 2 objects
```JavaScript
//1) Merging arrays
const arr1 = [1, 2];
const arr2 = [3, 4]
const mergedArr = [...arr1, ...arr2]
console.log(mergedArr); // [1, 2, 3, 4]

//2) Merging Objects
const obj1 = {name: 'Larry'};
const obj2 = {age: '30'};
const mergedObj = {...obj1, ...obj2};
console.log(mergedObj); // {name: 'Larry', age: '30'}
```
So, that was a short list of some of the code snippets that I feel are highly useful and yet easy to understand. Hope you find this list helpful. Have a beautiful day.
CSS Fonts for Beginners (Google Fonts)
Tags: beginners, css, codenewbie, frontend
Published: 2023-05-04 12:41:53

Let's talk about Fonts for CSS!!

First of all, what does CSS stand for again?? It stands for,  Cascading Style Sheets and it is used to alter fonts, colours, sizes and spacing of your content. It literally styles it!! So now let's talk about **Fonts!**

You can use many sites to help with your fonts such as **'WhatFont'** which is a chrome extension but I use **Google Fonts**. I find Google Fonts very easy to use, and has a huge variety of fonts to choose from. Bear in mind that there may be fonts already existing in your code editor, for example, in **VS Code** I sometimes use the font 'monospace' which looks great but if you want your font to look just that little bit more professional, then I recommend using Google Fonts. 

Now, how do you use Google Fonts?? It's easy.

First of all you have to google, Google fonts and you will be able to spot it straight away. Then you will be able to browse all the fonts. Google Fonts is a library of over 1,400 open source and FREE fonts that you can use to make your page look great!

If you see a font that you like, you are able to try it out. Click on the chosen font and where it says 'Type here to preview text', that is where you type what you want to tryout. It will then automatically change all the fonts you are browsing through, to that text you want to preview. Now it will be easier to make your mind up about which font is best. 

Once you have found the most suitable font, click on it, then on the right side you will be able to see a wide range of 'Thin', 'Italic' and different font weights such as '100', '400', '900' (the higher the font weight number, the bolder the font) but I want to add that not every font has as many font weights etc...

Once you have decided, click the plus sign and it will be added to your 'selected families' on the right side of the page. Now you're almost there!!

Now that you have added a font to your font family selection, you have to embed the code into the <`head`> of your HTML file. You will see two options...link or import. Make sure you click the link option so then your are able to copy the link into your HTML file. 


On the bottom right side of the shown code, click the icon which resembles 'copy code'. Now once you have done that, all you have to do is paste it into the <`head`> of your HTML file and thats it!! You have embedded the font you want into your file. Now we have to apply the chosen font.

In your CSS, you have to use font-family to change the style of font. Underneath the <link> code that you copied from Google Fonts, there is another code which you will notice begins with font-family:
This is an example:

```
font-family: 'Roboto', sans-serif;
```
All you have to do is copy this into CSS...for example:

```
p {
font-family: 'Roboto', sans-serif;
}
```
The paragraph will then be in the 'Roboto' font, and that is it...It is so easy!! 

I hope this has helped. Go check out Google Fonts and play around with the fonts. In the next blog I will be talking about Colours!!

Thank you for reading and KEEP CODING!!
convert old('d') to $model->d in Laravel using regular expressions (RegEx)
Tags: regex, laravel, vscode, automation
Published: 2023-05-04 12:41:33

While developing a website in PHP Laravel, I reused `create.blade.php` as `edit.blade.php`. So I need to edit some things, especially the input values.

In `create.blade.php` we use `old('something')` to retain the current `<input>` value by the user.

But in `edit.blade.php` we use `$model->something` to get the `<input>` value from the project backend.

So, I need to convert every `old()` to `$model`. But I am too lazy to rewrite all of them manually.

I used regular expressions (RegEx) to automate that replacement / conversion.

I used this `old\('(\w+)'\)` to select all of those `old('something')`, then I added `$product->$1` to replace all selected to `$product->something`.

## Steps to use RegEx in VS Code

In Visual Studio Code, press `CMD + F` (Mac OS) or `Ctrl + F` (Windows or Linux). You'll see an input box in the top right corner. write the RegEx in it to select them. Make sure you have pressed the `.*` button as it indicates the usage of regular expressions. Then click on the arrow on the left side of the input box, which is like `>`. After clicking on that arrow, another input box will appear below the current one. Write the RegEx to replace the selected statements or text.

You can click the button to replace the current selected one, or click on replace all to convert all selected statements at once.

## RegEx code explained

```regex
old \(  '   ( \w+ )   '   \)
old (   '   material    '   )
```

In RegEx, we use `\(` to select literal `(` not the meaning of brackets in regular expressions. It is the case in using `\)` too.

We use `\w+` to select all text content with English letters only. So, RegEx will select the text until it finds any other character. In our case, it selects until it reaches `'` character.

The brackets `()` around `\w+` are not escaped – as you can see in code – because want their semantic meaning in regular expressions. We do not want a literal brackets. Their meaning in RegEx is to capture the content in a variable. The variable in our case is `$1` as it is our first selected range.

There is `$0` but it is a story for another time.

![use RegEx to replace all old with $model in Laravel in VS Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vj0eyb3ofx73izeh4pzo.jpeg)

Watch this [short video](https://www.youtube.com/shorts/so5LAN0x6jg) for more clarity. I hope this helps. Share if you care.

Follow me to get notified of new posts I create here on [my blog](https://abanoubhanna.com/posts/regex-replace-old-model-laravel/). Follow me on [Twitter @abanoubha](https://twitter.com/abanoubha). Follow me on [LinkedIn](https://www.linkedin.com/in/abanoub-hanna/). Join my [Telegram channel @softwarepharaoh](https://t.me/softwarepharaoh). Follow my [Facebook page @softwarepharaoh](https://www.facebook.com/SoftwarePharaoh).
Stored Procedure and Function in MSSQL
Tags: sql, sqlserver, beginners, mssql
Published: 2023-05-04 12:12:09

I used to learn about SQL, especially MySQL. I make these notes to guide me and others who want to transition to mssql. I usually summarized what I found and understood so far from browsing the internet.

My takeaways:

| Feature                 | Stored Procedure                                      | Function                                       |
|-------------------------|-------------------------------------------------------|------------------------------------------------|
| Purpose                 | Perform actions or tasks, can modify data            | Return a single value or a table of values    |
| Return Values           | Can return multiple values or none                   | Must return a single value or table           |
| Usage                   | Can be called from a trigger, another procedure, or an application | Can be used in SELECT, WHERE, and JOIN clauses |
| Parameters              | Can have input, output, and input-output parameters  | Can have only input parameters                 |
| Transactions            | Can use transactions (COMMIT, ROLLBACK)              | Cannot use transactions                        |
| Error Handling          | Can use error handling (TRY, CATCH)                  | Cannot use error handling                      |
| Modify Data             | Can modify data (INSERT, UPDATE, DELETE)             | Cannot modify data directly                    |

## Stored Procedures

1. Use stored procedures for complex business logic and tasks that modify data.
1. Use error handling and transactions for better control over data consistency.
1. Utilize parameterization to avoid SQL injection attacks.
1. Follow naming conventions and proper documentation for easier maintenance.

## Functions

1. Use functions for calculations and data manipulation that return a single value or table.
1. Keep functions simple and focused on a specific task.
1. Avoid using functions that have side effects or modify data.
1. Utilize scalar functions for single value returns and table-valued functions for returning tables.

# In Short

Think of stored procedures as a set of instructions you give to the database to perform tasks, like updating or deleting data. They can be called by other parts of your application or database to execute these tasks. Functions, on the other hand, are more like formulas or calculations that you can use in your queries to retrieve or manipulate data. They return a single value or a table of values, and you can use them in various parts of your SQL queries, such as filtering or combining data.
GitHub Slash Commands
Tags: github, webdev
Published: 2023-05-04 12:09:03

GitHub have recently released slash commands, which allow you to create complex Markdown such as tables, task lists and code blocks to name a few with minimal typing and effort!

So lets dive into what commands there are and see what they can do!

### Where can I use slash commands?

Slash commands can be used in description or comment fields in issues, pull requests, or discussions (where supported).

### Current Slash Commands

Using the slash command is simple - just type the command in the description/comment box and then follow the prompts to create your custom markdown.


#### **/table**

Creates a markdown table. You will be prompted to choose the number of rows and columns.

[![Image from Gyazo](https://i.gyazo.com/399f92adc51ed9ba29a5195b380b38bb.gif)](https://gyazo.com/399f92adc51ed9ba29a5195b380b38bb)


#### **/code**

Creates a markdown code block. You will be prompted to choose the language for the code block, or you can select no syntax if your language is not currently supported.

[![Image from Gyazo](https://i.gyazo.com/6013555563ac14233aeab4a028195eb3.gif)](https://gyazo.com/6013555563ac14233aeab4a028195eb3)


#### **/template**

Shows you all the templates available within that repository for you to select and insert. This command works with issue templates and pull request templates.

[![Image from Gyazo](https://i.gyazo.com/8bafef0f9605603550e4a49416693bb7.gif)](https://gyazo.com/8bafef0f9605603550e4a49416693bb7)


#### **/details**

Creates a collapsible detail area within the description/issue. Simply add the title and content.

[![Image from Gyazo](https://i.gyazo.com/a16bf86687a18fcaab8879eae41295fb.gif)](https://gyazo.com/a16bf86687a18fcaab8879eae41295fb)


#### **/savedreplies**

Inserts a saved reply from your account. 

If you add **%cursor%** to the saved reply template, the slash command will place the cursor in that spot when you insert the template. This is great for allowing you to quickly customise your template, for example adding a name etc.

[![Image from Gyazo](https://i.gyazo.com/48d9384c98fdcdc8681976214bb2ab17.gif)](https://gyazo.com/48d9384c98fdcdc8681976214bb2ab17)


#### **/tasklist**

Creates a tasklist. This command only works in issue descriptions. 
    
As the tasklist command is currently in private beta, it may not be available to all users, unfortunately I'm one of those users, so no gif for tasklists ☹️

---
### Further Reading

* [GitHub Slash Commands](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-slash-commands#about-slash-commands)


I'd love to know in the comments if you plan to implement these commands in your workflow, or what command would you create to save time?