teleren/devto huggingface dataset:
CHAR HAQIDA MA'LUMOT
Published: 2022-12-16 14:34:42

`

### Char bugungi mavzuyimiza,  oz ichiga faqatgina  1ta belgini oladi.
Misol uchun:


```cpp
int main1() {
int a = 10;
float b = 10.5;
double c = 10.232153515136;
string d ="ikkichilar";

// char => character(belgi);

char belgi = 65;
int son = 'A';
// int son = 3;

cout << belgi << " " <<son;
return 0;
}
```


 _Charda faqatgina 1ta dona belgini saqlashimiza mumkun.Undan kopni saqlay olmaymiz.Charni intga ,intni esa charga ozgartiramiza.
_

Misol uchun:

```cpp
#include <iostream>
#include <cmath>
using namespace std;
int main3(){
int a =65;
char b ='z';
cout << char (a);
cout << endl << int (b);
return 0;
}
```
`Chardan`  A va a belgilarni qanday qilib chiqarishni organib oldik.

`Misol uchun:`

```cpp
#include <iostream>
#include <cmath>
using namespace std;

int main (){
char a;
cin >> a;
cout << char (a+32);



return 0;
}
```
_BUGUNGI DARSIMIZA CHAR HAQIDA BOLDI._



@dawroun
Quick notes on using insta
Published: 2022-12-16 14:29:35

[Insta](insta.rs) is a nice snapshot testing tool for Rust.

## Snapshot testing

Snapshot tests are a more general extension of the normal [tests](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) we have in Rust.

Usually we use `assert_eq!` and similar macros. Insta let you deal with the reference values in a richer way and store them inside or outside your codebase.

## Pitfalls to keep in mind
I spent way too much time stumbling upon a bunch of annoyances while converting some tests in [rust-code-analysis](https://github.com/mozilla/rust-code-analysis) so it is better to list them so you will avoid to suffer from similar mistakes:
- `cargo insta` is git-aware, make sure to pass `--no-ignore` if your snapshots directory is populated by different means even better if you can use **git-submodules**.
- If you deal with floating points, round them to the precision you care about. Different arches/libc may have different precisions
- If you save paths keep in mind that Windows is special in this regard and you may have to manually serialize it.

## Nice things to keep in mind
- `cargo test -- --nocapture` provides enough information to see what went wrong.
- `cargo insta test --review` makes adding more tests and make sure you do not break anything by mistake.


That's all for today
Responsive Navigation Menu Bar Using HTML CSS & JavaScript
Tags: html, css, javascript
Published: 2022-12-16 14:28:39

Responsive Navigation Menu Bar Using HTML CSS & JavaScript

in this tutorial, we will learn How to make a Responsive Navigation Menu Bar Using HTML CSS & JavaScript. The navbar is very important to navigate the users with different pages.

When you will create a project, you must be use navbar menus. So, I've made the complete tutorial on it, How to make responsive menus using HTML CSS and also a little bit of JavaScript.

hope this tutorial is helpful and beneficial for you.

{% embed https://www.youtube.com/watch?v=o9yMYd-Xqp0 %}
How to Add Sentry Integration to your NodeJS App
Tags: node, sentry, tracing
Published: 2022-12-16 14:24:02

---
title: How to Add Sentry Integration to your NodeJS App
published: true
date: 2022-12-16 14:17:39 UTC
tags: nodejs, sentry, tracing
canonical_url: 
---
![How to addsentry to nodejs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e1kenajw2ccz65k1c7ua.png)

To add Sentry integration to a Node.js Express app written in TypeScript, you will need to install the Sentry SDK for Node.js and the @sentry/node package:

```
npm install @sentry/node @sentry/tracing

```

Next, you will need to configure the Sentry SDK by creating a `sentry.ts` file in your project and adding the following code:

```
import * as Sentry from '@sentry/node';

export function initializeSentry(dsn: string) {
  Sentry.init({
    dsn,
    tracesSampleRate: 1.0,
  });
}

```

This code initializes the Sentry SDK with the provided DSN and enables full tracing.

To use Sentry in your Express app, you will need to import the `initializeSentry` function and call it at the beginning of your app, passing in the DSN for your Sentry project:

```
import express from 'express';
import { initializeSentry } from './sentry';

const app = express();

initializeSentry(process.env.SENTRY_DSN);

// Add routes and middleware to app...

app.listen(3000, () => {
  console.log('App listening on port 3000');
});

```

Once Sentry is initialized, you can use it to capture errors and events in your app by calling the `Sentry.captureException` and `Sentry.captureMessage` functions, respectively. For example:

```
app.get('/', (req, res) => {
  try {
    // Some code that might throw an exception
  } catch (error) {
    Sentry.captureException(error);
  }
});

app.post('/', (req, res) => {
  Sentry.captureMessage('Something happened');
});

```

This will send the errors and events to your Sentry project, where you can view them and use them to troubleshoot issues in your application.

Overall, integrating Sentry into a Node.js Express app written in TypeScript is relatively straightforward. By installing the necessary packages and configuring the Sentry SDK, you can easily capture errors and events in your app and use them to troubleshoot issues and improve the reliability of your application.

I hope this helps you, set up sentry, to your NodeJS app without any issues.

Until next time, Peace <3
Bilan de 2022
Tags: discuss, french
Published: 2022-12-16 14:15:03

On arrive à la fin de l'année 2022 et il est temps de faire un petit récapitulatif de l'année, ainsi que de voir rapidement ce qui nous attend pour 2023!

---

## 2022

Au total, ce sont 60 articles *(incluant celui-ci)* qui ont été écrits, les barres de **100 000 lectures** et **100 followers** ont été dépassées. 🎉

Même si je n'ai pas vraiment été constant sur les publications ou leur contenu, j'espère que vous les aurez appréciées.

---

## 2023 

Pour 2023, je vais essayer d'être un peu plus constant dans le type de contenu et j'ai déjà quelques sujets pour produire des séries d'articles.

---

Merci beaucoup d'avoir lu mes articles, j'espère qu'ils vous ont plu et que vous aimerez aussi les prochains!

Sur ce, je vous souhaite un joyeux temps des fêtes! Et à l'année prochaine!

---

*cover : [Kelly Sikkema]("https://unsplash.com/@kellysikkema?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/fr/s/photos/2022?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)*
Char haqida ma`lumot.
Published: 2022-12-16 14:13:25


```cpp
int main1() {

int a = 10;
float b = 10.5;
double c = 10.25215315136;
string d = "ikkichilar";

// char => charcter(belgi);

char belgi = 65;
int son = 'A';
// int son = 3;

cout << belgi << " " << son;

return 0;
  }
```
@dawroun
Help me in finding the issue in my script.
Tags: linux, bash, bashscript, scriptlanguage
Published: 2022-12-16 14:13:24


Problem : Write a script to replace 20% lines in a C file randomly and replace it with the pattern 
Sample Execution:
1. ./replace_DEL.sh main.c
#incude <stdio.h>
int main()
{
         printf(“Hello world\n”);
}
After replacing
#incude <stdio.h>
int main()
{
<-----------Deleted------------>
}

2. ./replace_DEL.sh main1.c
Error : No such a file.
						
3. ./replace_DEL.sh main2.c
Error : main2.c is empty file. So can’t replace the string.
						
4. ./replace_DEL.sh
Error : Please pass the file name through command line.

Script:
`#!/bin/bash

if [ $# -ne 0 ]                                                
    if [ -f $1 ]                                                                    
    then
	if [ -s $1 ]                                                                
    	then
    	    echo "Before Replacing"
    	    cat $1
    	    line_no=`wc -l < $1` 
    	    if [ $line_no -ge 5 ]
    	    then
    	    	num=`echo "0.2 * $line_no" | bc`                                    #Calculating 20% of lines to replace
    		random=`shuf -i 1-${line_no} -n ${num}`                             #Randomly selecting the 20% lines for replacing 
    		for i in ${random}                                                  #Passing random numbers as a list to looping
    		do
    			sed -i $i's/.*/<---------Deleted-------->/' $1                  #Replacing the contents in the line-number with the given content
    		done
    		echo "After Replacing"
    		cat $1
    	     else
    			echo "Error : Not enough lines to replace"
    	     fi
	else
    	    echo "Error : $1 is empty file. So can't replace the string"            
    	fi
    else
		echo "Error: No such a file"                                                #Error statement for file exists or not
    fi
else
    echo "Error: Please pass the filename through command line"                     #Error statement for no Arguments passed
fi`
Final post of 2022
Tags: discuss
Published: 2022-12-16 14:11:10

The year 2022 comes to an end and it's time to do a little recap and see what will comes in 2023!

---

## 2022

In total, I posted 60 posts *(including this one)*, go over **100 000 reads** and pass the **100 followers** mark. 🎉

Not very consitent on the timeline or the content type, but I hope you liked it.

---

## 2023 

For next year, I will try to be a little more consistent about the content and already have some topics to develop in multiple series.

---

So thank you so much to read my posts, I hope you liked it and you will like the future content!

Have an happy holiday season! And see you next year!

---

*cover : [Kelly Sikkema]("https://unsplash.com/@kellysikkema?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/fr/s/photos/2022?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)*
Adding new features
Published: 2022-11-27 03:33:36

For my final release for the course, I would be working with a repository that I worked on during hacktoberfest called [battlemath](https://github.com/JesseRWeigel/battlemath). This one has a fairly simple goal in mind, and that is to teach children with math. My first feature that will be implemented is a "difficulty" selection. This is fairly similar to their already existing mode selection for the operators. The difference is that, it will change the values that will be used.
<br />

As the image below dictates, it would be standing side by side to the already existing "mode-selection", and will contain 3 difficulties.

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

Each difficulties should only change the numbers, and follow the corresponding operator

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



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

<br />
Later down the line, I will try to implement two new modes for 'decimals' and 'factoring', which will change the entire functionality of the game, which I find a tad difficult to implement, but we'll see how it goes.

Similar to the previous implementation, it will also be a new mode selection, but it's much more complex than the previous, because it has to change not just the numbers, but also how the entire calculation is done.

I imagine the new addition to be similar to this...

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


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

While writing this blog, I come to realize the difficulty of adding a "factoring" mode. I will try to implement it as best as I can, but I'm a bit worried if I would be able to finish it in due time.


> Starting up

My first thought about how I should tackle this is to read through the entire code and understand how everything works, but I realized that working at random is not going to help me understand anything. Therefore, I went ahead and look through only those that are directly connected with the feature that I will be implementing.

For the case of this project, they already have a 'mode' selection, which made my life a bit easier in terms of figuring out how I should implement mine. I noticed that for larger projects, it's best to back track on everything. What this mean is that to read through a code, and look at what it does from the inside, and keep going until you reach an end. For my case everything ends at the "object" that contains all the values for the operations. Once I figure out how the selection work, I can create my code base on my understanding from that.
Trying Simulation with AWS SimSpace Weaver
Tags: simspaceweaver, aws
Published: 2022-12-16 13:42:03

![img](https://day-journal.com/memo/images/try-097_01.png)

### I tried a simulation with AWS SimSpace Weaver :tada:  

I was curious about "[AWS SimSpace Weaver](https://aws.amazon.com/simspaceweaver)" after watching the Keynote at AWS re:Invent 2022!

AWS SimSpace Weaver allows you to build dynamic, large-scale spatial simulations on AWS managed infrastructure. The fee is about $6 per hour, and you need to pay attention to the billing as of December 2022, the Japan region is not yet supported.

I ran the default simulation this time, but you can define [Schema](https://docs.aws.amazon.com/simspaceweaver/latest/userguide/schema-reference.html) in YAML to simulate different patterns!

<br>

The following is a detailed explanation.

- Download the application
- Running the Simulation
- Viewing the Simulation

<br>

## Download the application

First, here is how to download an application in AWS SimSpace Weaver.

Click AWS Management Console → AWS SimSpace Weaver.
![img](https://day-journal.com/memo/images/try-097_02.png)

Click on "Get started."
![img](https://day-journal.com/memo/images/try-097_03.png)

Click on "Download client." 
![img](https://day-journal.com/memo/images/try-097_04.png)

The application for display will be downloaded.
The application is for Windows only.
Note that it may not launch properly depending on your PC specs.
![img](https://day-journal.com/memo/images/try-097_05.png)

The application download is now complete!

<br>

## Running the Simulation

The next step is to simulate with AWS SimSpace Weaver.  

Click on "Start simulation."
![img](https://day-journal.com/memo/images/try-097_07.png)

After a few moments, the simulation will run.
Copy the IP and port as they are displayed.
![img](https://day-journal.com/memo/images/try-097_08.png)

The simulation is now complete!

<br>

## Viewing the Simulation

Finally, here is how to display the simulation in AWS SimSpace Weaver.

Run "UnrealClient.exe" from the unzipped application.
![img](https://day-journal.com/memo/images/try-097_06.png)

After the application launches, paste the IP and port you copied into the text box in the lower left corner, and your simulation will be displayed!
![img](https://day-journal.com/memo/images/try-097_09.png)

<br>

References
[AWS SimSpace Weaver](https://aws.amazon.com/simspaceweaver)
This Week In Python
Tags: python, discuss, thisweekinpython
Published: 2022-12-16 13:24:07


**Fri, December 16, 2022**


This Week in Python is a concise reading list about what happened in the past week in the Python universe. 

**I have received some good suggestions for this week's content. Thank you.**

**Did I miss anything from the Python universe this week? What did you read or tried out?**


## Python Articles


- [Building an environmental monitoring system from scratch](https://medium.com/david-moore/building-an-environmental-monitoring-system-from-scratch-91283511ee3) 
- [Django Settings Patterns to Avoid](https://adamj.eu/tech/2022/11/24/django-settings-patterns-to-avoid/) 
- [Maintain A Clean Architecture With Dependency Rules](https://sourcery.ai/blog/dependency-rules/) 
- [Practical Python Programming](https://dabeaz-course.github.io/practical-python/Notes/Contents.html) 
- [Python Magic Methods You Haven't Heard About](https://martinheinz.dev/blog/87) 


## Projects



- [pynecone](https://github.com/pynecone-io/pynecone) – Web apps in pure Python
- [panoptisch](https://github.com/R9295/panoptisch) – A recursive dependency scanner for Python projects 
- [reacton](https://github.com/widgetti/reacton) – A pure Python port of React for ipywidgets
- [samila](https://github.com/sepandhaghighi/samila) – Generative Art Generator
- [qutebrowser](https://github.com/qutebrowser/qutebrowser) – A keyboard-driven, vim-like browser based on Python and Qt



**Did I miss anything from the Python universe this week? What did you read or tried out?**
TO'G'RI TO'RTBURCHAK YUZUNI TOPISH O'RGANAMIZ.
Published: 2022-12-16 11:35:57

#TO'G'RI TO'RTBURCHAK YASAH O'RGANAMIZ.
```cpp
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int eni, boyi;
  cout << "Area is ";
  cin >> eni >> boyi;
  cout << setprecision(2) << fixed << eni * boyi << (".") ;
return 0;
}
```
@DAWROUN
Front-end Best Practices
Published: 2022-12-16 13:12:24

Most of the people thought front-end development is easy but actually it's not. It is as hard as Backend-Development, Block-chain development etc. 
Also, Front-end Developer's are more powerful than other as for non programmer's  the first thing matter is LOOK. After that they judge Speed, Accuracy , Security etc.

There is a great quote for Front-End Developers i.e.
**“If you're already a front-end developer, well, pretend you're also wearing a pirate hat.” - Ethan Marcotte**

So , today in this blog I am sharing some useful tips regarding front-end development which will helps a lot in one's front-end journey.
So, let's get started.

**1) Avoid empty src and href  :**
We might thought that a browser will do nothing when it encounter an element with an empty src or href.But actually it's not in all the browsers.
In some browsers empty href and src atribute will trigger unnecessary server requests that will waste bandwidth and server resources.

**2) Use a consistent layout and design:** A consistent layout and design helps create a sense of familiarity for users and makes it easier for them to navigate your site.

**3) Optimize for mobile:** With the increasing use of mobile devices to access the internet, it's important to ensure that your site is optimized for mobile viewing. This includes using responsive design techniques to ensure that your site looks good on a variety of screen sizes.

**4) Use semantically correct HTML:** Using semantically correct HTML tags helps make your code easier to read and maintain, and also makes it easier for search engines to understand the content of your site.

**5) Use modern web standards:** Adopting modern web standards, such as HTML5 and CSS3, can help ensure that your site is more efficient and faster to load.

**6) Use a version control system:** Using a version control system, such as Git, can help you keep track of changes to your code and collaborate with other developers more effectively.

**7) Test your site on different browsers and devices:** It's important to test your site on a variety of browsers and devices to ensure that it looks and functions correctly for all users.

**8) Use performance optimization techniques:** There are various techniques you can use to optimize the performance of your site, such as optimizing images, minifying CSS and JavaScript, and using a content delivery network (CDN).

**9) Use a tool to manage your dependencies:** Using a tool such as npm (Node Package Manager) can help you manage your project's dependencies and ensure that you have all the required libraries and modules installed.

**10) Follow accessibility guidelines:** Ensuring that your site is accessible to users with disabilities is not only good practice, but it's also a legal requirement in many countries. following guidelines such as the Web Content Accessibility Guidelines (WCAG) can help you make your site more accessible.

**11) Use a CSS preprocessor:** CSS preprocessors, such as Sass or LESS, can help you write more efficient and maintainable CSS code by adding features such as variables, mixins, and functions.
Solving day 16 of Advent of Code 2022 in JavaScript
Tags: challenge, adventofcode, javascript, video
Published: 2022-12-16 12:55:37

---
title: Solving day 16 of Advent of Code 2022 in JavaScript
published: true
description: JavaScript walkthrough of Advent of Code 2022 (day 16)
tags: challenge, AdventOfCode, javascript, video
series: Advent of Code 2022 in Javascript
---

{% youtube YSDzaEi-xsA %}
README.md em mais de uma língua
Tags: beginners, markdown, github, documentation
Published: 2022-12-16 12:55:22

O inglês é, inegavelmente, a linguagem da tecnologia. Por isso, recomenda-se sempre utilizar essa língua em sites, artigos e documentações, a fim de que seu projeto tenha o maior alcance possível.

Eu, como desenvolvedora em formação, procuro maximizar o alcance dos meus projetos sempre que possível. Isso me trouxe um dilema: o **README.md** do meu **GitHub** deve ser em português, minha língua natal e mais acessível à pessoas do meu país, ou desde já deixar em inglês, para permitir o acesso para o mundo todo? 

Para resolver esse dilema, decidi pelas duas coisas: por quê não manter uma versão em português e outra em inglês, facilmente intercambiáveis de acordo com a necessidade de quem está acessando meu repositório?

Procurei então por uma solução simples, sem envolver linguagens de programação, e cheguei a esse resultado: a criação de dois **README.md**, seguindo esses três passos:

- Criação dos dois **README.md**’s:
    
![README.md em inglês](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ca7phtb6645zhfpknto.png)
    
Como já possuía a versão em português, apenas criei uma segunda versão, traduzindo para o inglês todo o texto.
    

- Definição da versão principal (_default_):
    
![Dois arquivos README.md com diferentes nomes.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xvls4bbu1xt0z9v22qt9.png)
    
Essa definição foi feita por simples mudança na nomeclatura: a versão de exibição prioritária (que, no meu caso, foi o português) foi deixada como “**README.md**”, e a segunda versão foi nomeada como “**README-en.md**”, indicando sua linguagem. Dessa forma, posso adicionar quantas linguagens ou versões diferentes quiser, modificando apenas sua identificação.
    

- Criei um link, em cada versão, que direciona a página para a outra versão:
    

![README em português com destaque em link para README em inglês](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lfuwn16kf7zl68h7puz1.png)
    
![README em inglês com destaque em link para README em português](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rp05j5cu5cme2uwmw0s6.png)
    
Logo no início do texto, abaixo do título, inseri um link clicável que direciona o usuário para a página traduzida. Na página principal, em português, esse texto foi inserido em inglês, e vice-versa, para garantir que o usuário consiga entender e chegar à versão no idioma de sua preferência. Para melhor experiência do usuário, criei um link que levava diretamente ao título da versão em inglês, para tirar o foto das informações desnecessárias da página.
    

Dessa forma simples, otimizei o alcance do meu perfil de **GitHub**, sem dificultar o acesso de quem não possui bom entendimento do inglês. Isso pode ser usado não apenas para o perfil do **GitHub**, mas em todos os repositórios de projetos que possuam uma documentação em **Markdown**.