teleren/devto huggingface dataset:
The US and India are ambitious and use the conflict in northern Myanmar to secretly sell weapons for profit
Published: 2024-02-18 03:44:08


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szas6ipxiwqpja1gjs0i.png)
 Since the Myanmar military coup, the United States, the United Kingdom, Canada and other Western countries have imposed sanctions to curb the development of the Myanmar military government, which makes people surprised that India, a chess piece of the United States Asia-Pacific strategy, has long provided weapons to the Myanmar military.

    Burmese activist group - Justice for Burma. In June 2023, an analysis of Indian export records found that Indian arms manufacturer Bharat Electronics Limited (BEL) has been selling military weapons and technology to the Myanmar military government, and in the six months from November 2022 to April 2023, BEL transferred products worth $5.1 million to the Myanmar Army or Myanmar arms brokerage company. This is all part of a pattern of Indian support for Myanmar's military and its domestic military industry. Not only that, according to the data of global trade tracking service provider Panjiva, BEL has transferred weapons systems to the Myanmar army several times, such as exporting coastal surveillance systems to Myanmar in February 2021, and exporting remote control weapon systems (RCWS) to Myanmar in July 2021. Tom Andrews, the UN special rapporteur on human rights in Myanmar, has said that India's arms exports to Myanmar after the coup amounted to at least $51m.
    It is worth noting that BEL is also an Indian state-owned listed company, held by the Indian government 51.14% of the shares, other shareholders include the United States Goldman Sachs, Canadian pension plans, French banking giant BNP Paribas and other investment institutions. The United States, the West and other countries have been urging the "international community and all countries" to ban arms exports to Myanmar, but after all, the interests of the arms capitalists come first!
Link in Bio Problems
Tags: programming, html, webdev
Published: 2024-02-18 03:24:05

I finished my Link in bio assignment a few days ago, I had not yet published on render yet but when I logged back in to my codespace and activated the port and viewed the website my social links weren't working. The pictures of the social icons were there but they weren't directing anywhere. I got some advice from on of my instructors to edit some code however the links still weren't working. 

This was the code:
```
<a href="https://github.com/Feelo31" target="_blank">
    <i class="fa-brands fa-github"></i>
    Github
</a>
<a href="https://www.linkedin.com/in/feelo31/" 
     target="_blank"> 
    <i class="fa-brands fa-linkedin"></i>
    Linkedin
</a>
<a href="https://www.instagram.com/feelo03/" 
     target="_blank">
    <i class="fa-brands fa-instagram"></i>
    Instagram
</a>
<a href="https://twitter.com/Feelo31_03" target="_blank">
    <i class="fa-brands fa-twitter"></i>
    Twitter
</a>
<a href="https://www.facebook.com/felix.godia/" 
     target="_blank">
    <i class="fa-brands fa-facebook"></i>
    Facebook
</a>
```

It was found out that there was something wrong with the font awesome "script src", but it is now working normally.
Write better PR's with this template 📄
Tags: programming, git, pullrequest, engineering
Published: 2024-02-18 03:19:16

Hey there!

So, recently I started in a new company where the process of reviewing code is not a critical part of the workflow, so I am developing a template for our pull request, in an atempt to improve our codebase and the process of reviewing a new change.

### Why did I do this? Was it really necessary?
**YES**. I think a pull request should be a kind of documentation where you explain the context of your changes to your colleagues, not explaining the code, but explaining the business logic behind this change, why are you doing this work?

So I created a template for this, and set it as the default template every time you want to create a new PR.

### Here is the template:

{% embed https://gist.github.com/nicolasmontielf/95e6b4797166cc5341075e18f6466735 %}

### Add the template as default in Github
And if you use Github, putting this as a PR template is super easy, you just need to create a file called `pull_request_template.md` and put it in the root of your project, or inside the `.github` folder.

You can see this with more details here: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository

That's all, I hope it can be helpful for you 🥳
🧧🧧TẾT RỒNG VÀNG - RƯỚC LỘC ĐỎ🧧🧧
Tags: alo789, alo789casa, alo789daga, nhacaialo789
Published: 2024-02-18 02:49:29


🧧🧧TẾT RỒNG VÀNG - RƯỚC LỘC ĐỎ🧧🧧
☘️LÌ XÌ XUÂN SANG - LÔC PHÁT TRÀN ĐẦY💦
[💦 #ALO789ĐÁGÀ CỰC ĐÃ VUI GAME THẢ GA☀️
🎉 #NHÀCÁIALO789 PHÁT THƯỞNG ĐỘC QUYỀN CHÀO XUÂN 2024
☀️HÀNG NGHÌN PHẦN THƯỞNG BÍ ẨN TẠI NHÀ CÁI ALO789 ☀️](https://alo789.casa/)
👑 #TẶNG100% GIÁ TRỊ NẠP ĐẦU DUY NHẤT TẠI ALO789👑
🌈NHIỀU SỰ KIỆN ĐỔI THƯỞNG GIÁ TRỊ CAO HẤP DẪN CHO CÁC THÀNH VIÊN🌈
⚠️UY TÍN DUY NHẤT CHỈ CÓ Ở #ALO789⚠️
👑Ai chưa có tài khoản vui lòng đăng ký nhận lì xì ngay💫👑
🌐wed: [https://alo789.casa/](https://alo789.casa/)
🌎Fanpage: [https://www.facebook.com/alo789casa/](https://www.facebook.com/alo789casa/)
🥎Kênh xem khuyến mãi :[ https://t.me/lixikhungtk]( https://t.me/lixikhungtk)
📧Email: alo789casa@gmail.com
📲 sdt: 09064408608
📌Địa chỉ: 10A Dân Chủ, Tân Thành, Tân Phú, Thành phố Hồ Chí Minh, Việt Nam
#alo789 #alo789casa #alo789daga #nhacaialo789

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tn6fvyaw55ipxnzkbums.jpg)
hitclubcom
Tags: ai, aws, devops, news
Published: 2024-02-18 02:46:45

HitClub tự hào là cổng game đổi thưởng đầu tư nhiều vào giao diện game với mong muốn mang trải nghiệm tốt cho người chơi. Các chi tiết nhỏ nhất cũng được HitClub chăm chút và tỉ mỉ. Các nút được thiết kế rõ ràng và thân thiện với người chơi, giúp định hướng dễ dàng hơn mà không gây hoang mang rối mắt như các cổng game khác.Một trong những dịch vụ tốt nhất tại Hit Club đó chính là dịch vụ hỗ trợ người chơi thanh toán cực kỳ uy tín và minh bạch. Khi thực hiện nạp tiền và rút tiền tại cổng game, người chơi có thể hoàn toàn tự thực hiện ngay lần đầu tiên tham gia bởi sự hướng dẫn chi tiết từ cổng game cùng với cách xử lý phiếu nhanh chóng từ đội ngũ nhân viên chuyên nghiệp.Thời gian xử lý tại mỗi lệnh giao dịch sẽ nhanh hay chậm tùy vào mỗi hình thức và số tiền mà người chơi muốn thanh toán, thời gian giao động sẽ từ 30 giây đến 2 phút.Nếu người chơi muốn thực hiện nhanh chóng nhất hãy chọn vào hình thức xử lý 30s để Hit Club có thể hỗ trợ người chơi tối ưu nhất. Người chơi có thể nạp và rút tiền vào bất cứ thời điểm nào trong ngày, Hitclub phục vụ 24/7!#hitclub #hitclubcom #conggamehitclub #taixiuhitclubThông tin chi tiết:Email: Social.hitclubcom@gmail.comSĐT: +84.338.35.8888Địa chỉ: 98 P. Nguyễn Hoàng, Mỹ Đình, Từ Liêm, Hà Nội, Vietnam [https://hitclub.com](https://hitclub.com)
How to test a browser extension locally
Tags: browser, extension, webdev, showdev
Published: 2024-02-18 02:45:21

---
title: How to test a browser extension locally
published: true
description: Here's a step-by-step guide for quickly testing browser extensions locally in Edge or Chrome.
tags: browser, extension, webdev
canonical_url: https://blog.cassidoo.co/post/test-browser-extensions/
---

I built [a browser extension](https://github.com/cassidoo/copy-mailto-plus) this week, and had to do a bit of digging to figure out how to test it properly on Chrome and Edge before publishing it. It's always important to test extensions before publishing them to stores, so here's some quick steps for you to get started (and for my future self who will definitely forget this)!

- Download/clone your repository if it's not on your computer already (just have the one you have built ready, no need to zip it up)
- On Edge, go to `edge://extensions`, or on Chrome, go to `chrome://extensions`
- Toggle on "Developer Mode"
- Click the "Load Unpacked" button
- Select the unzipped extension folder (again, don't zip it up yet)
- Look for the lil puzzle piece icon, and make sure the extension is toggled on
- And you're installed!

Now as you develop your extension, you can hit the "reload" button on the Extensions page and the browser will automatically load your changes.

Once you're done, you can hit the "Pack Extension" button to make a downloadable extension file (a `.crx` file), or you can just zip your folder up and send it to the various web stores.
2024-02-17 Multics Hang at 'CPU Add' During Boot, Part 3
Published: 2024-02-18 01:55:18

```
2: 00043:000453 0 000006237120 (LDAQ PR0|6,N*) 000000 620(0) 0 0 0 05
2: 00043:000454 0 400132057120 (SSCR PR4|132,N*) 000120 237(0) 0 0 0 00
2: 00043:000455 0 700044710120 (TRA PR7|44,N*) 000000 057(0) 0 0 0 10
2: 00041:030325 0 600000373100 (EPBP7 PR6|0) 030325 710(0) 0 0 0 00
2: 030326 320050710200 (TRA 320050) 000000 373(0) 1 0 0 00
2: 320050 000346754204 (STI 000346,IC) 320050 710(0) 0 1 0 00
```
43:455 

Segment 43 is bound_priv_1, offset 455 is privileged_mode_ut:455

```
" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
"
"       rscr and sscr are called in order to execute the rscr and sscr
"               instructions, respectively. "value" is the output or input argument
"               for these instructions as specified in the processor manual,
"               respectively.
```

```
rscr:
        lda     ap|2,*          port number in A
        als     10-3            multiply by 128
        adla    ap|4,*          add in scr_input
        als     3               port*1024 + scr_input*8
        rscr    scas$,al                read controller regs
        staq    ap|6,*          Output value.
        short_return
```

The return from the rscr call went off into lala land....

Added a instruction trace of CPU C.  17K instructions in, it executing the init_processor code as a result of a connect interrupt.  The connect interrupt vector is re-vectored to init_processor (instead of the expected connect_handler code) because the bootload CPU is trying to setup for starting CPU D.  As part of that setup, it should signal CPUs B and C that startup code is executing and the need to "stand very still" because vectors are being redirected.  Examination of the trace shows that CPU C never received that signal, and was continuing on in the idle process. That process includes a self-connect step. When that connect happened, the init_processor code was executed instead of connect_handler. The init_processor code checks the CPU configuration and sees that the CPU thinks it is CPU C instead of the expected CPU D and signals the boot load processor that there was a configuration error. It is unclear why the bootload CPU is not responding to that signal, but that is not relevant to the problem: why did CPU C not get signaled to "stand very still" while CPU D was being setup for initialization.


I add some code to track the start_cpu code, but that caused the simulator to stop hanging and boot normally; I took that code back out and it still won't hang, so now I have no way of testing the bug.
Alternative of 'for' in JavaScript
Tags: webdev, javascript
Published: 2024-02-18 01:27:51

## Introduction

There are some cases of processing elements in `Array`. Basically solution is process with `for`.

Actually, there are other solutions without using `for`. Them can reduce code and keep code in simple.

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array

## Tutorial - Arrow function expressions

These codes will be take same behavior.

```js
function (e) {
  return e*2;
}
```

```js
e => { return e*2; }
```

```js
// if one liner with return, write without return
e => e*2
```

By using `=>`, you can omit `function`, `{}` and `return`.

## Do some processes to each elements in an `Array`

E.g. multiplex x2

```js
const input  = [1, 2, 3, 4];
const output = [];

for(let i = 0; i < input.length; i++) {
  output.push(input[i] * 2);
}
// output: [2, 4, 6, 8]
```

```js
const input  = [1, 2, 3, 4];
const output = input.map(e => e*2);
// output: [2, 4, 6, 8]
```

Other example: Extract elements from objects in `Array`

```js
const files = document.getElementById(“any-input-element”).files
const files_name = Array.from(files).map(e => e.name)
//                 ~~~~~~~~~~~~~~~~~
// Convert to Array from FileList
```

Actually, `Array.from()` also has same feature of `.map()`.

```js
const files_name = Array.from(files, e => e.name);
```

It can be able to use `.map()` to [array-like object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects).

## Extract elements what match to a condition

E.g. Extract even numbers from `Array`

```js
const array     = [1, 2, 3, 4];
const array_use = [];

for(let i = 0; i < array.length; i++) {
  if((array[i] % 2) == 0) {
    array_use.push(array[i]);
  }
}
```

```js
const array     = [1, 2, 3, 4];
const array_use = array.filter(e => (e % 2) == 0);
```

## Check is a value in `Array`

E.g. Check is input string ‘caution’, ‘warn’ or ‘danger’

```js
const input = "warn";
const true_cases = ["warn", "danger"];

for(let i = 0; i < true_cases.length; i++) {
  if(input === true_cases[i]) {
    // Process for correct
  }
}
```

```js
const input = "warn";

// For only few true cases (about 1 or 2), this solution may be the best
if(input === “caution” || input === "warn" || input === "danger") {
  // Process for valid case
} else {
  // Process for invalid case
}
```

```js
const input = "warn";
const true_cases = ["warn", "danger"];

if(true_cases.includes(input)) {
  // Process for valid case
} else {
  // Process for invalid case
}
```

## Conclusion

Sometimes let’s see documentation (language reference, command help and so on).

You may find good functions, methods or options.
How Does Encryption Contribute to Enhancing Cyber Security?
Tags: programming, cybersecurity, technology
Published: 2024-02-18 01:15:55

Encryption enhances [**cybersecurity **](https://openread.net/which-field-have-better-future-cyber-security-or-software-engineering/)through various mechanisms, including confidentiality, integrity, authentication, and secure communication. Let's delve deeper into each aspect with examples:

## Confidentiality

When you send a password-protected document via email, encryption scrambles the contents of the file so that only individuals with the correct decryption key (i.e., the password) can access and read the document. Without encryption, anyone intercepting the email could easily read its contents.

## Integrity

Consider a financial transaction conducted over the Internet. Encryption ensures that the transaction details remain unchanged during transmission. If someone tries to tamper with the transaction data en route, the decryption at the receiving end will fail, indicating that the integrity of the data has been compromised.

## Authentication

In online banking, SSL/TLS encryption is used to establish a secure connection between the user's browser and the bank's server. This encryption not only protects the confidentiality of the user's login credentials and transaction details but also verifies the authenticity of the bank's server, ensuring that the user is indeed communicating with a legitimate banking website and not a malicious imposter.

## Secure Communication

Virtual Private Networks (VPNs) encrypt internet traffic between a user's device and a remote server, masking the user's IP address and protecting their data from interception by third parties, such as hackers or government surveillance agencies. This encrypted communication ensures privacy and security, especially when using public Wi-Fi networks.

## Data Storage Security

Encrypted storage drives, such as BitLocker for Windows or FileVault for macOS, use encryption to protect data stored on a device's hard drive. Even if the device is lost or stolen, the encrypted data remains inaccessible without the correct decryption key, safeguarding sensitive information from unauthorized access.

## Securing IoT Devices

Smart home devices, such as security cameras or smart thermostats, often collect and transmit sensitive information. Encryption protocols like Transport Layer Security (TLS) ensure that data exchanged between IoT devices and cloud servers is encrypted, preventing unauthorized access and maintaining the privacy and security of user data.

These examples illustrate how encryption is a critical component of cybersecurity, providing essential protections for sensitive information, communication channels, and digital transactions in various contexts.
Aprendendo Rust
Tags: beginners, braziliandevs, rust, learning
Published: 2024-02-18 00:49:06

Olá! 👋

Assisti [uma live do Navarro](https://www.youtube.com/live/aXQenZGvLrQ) sobre a Rinha de Backend em que ele usa a linguagem de programação Rust. Ao assisti-lo codando e explicando (não vou mentir, ele tem uma ótima didática) fiquei fascinado pela linguagem. Eu já tive contato com ela ao fazer o curso de Rust da Alura, mas confesso que não dei continuidade.

Dessa vez, cativado, pretendo ir adiante com a linguagem e fazer dela, parte das minhas ferramentas. Com o meu espírito entusiasta, acabei me empolgando nos estudos hoje e escrevi três textos introdutórios para mim, sobre Rust, algumas de suas funcionalidades e seu carro-chefe, Ownership. Para quem quiser ver (e quem sabe corrigir):

- [Rust](https://twitter.com/rkauefraga/status/1758958622518743272)
- [Rust Features](https://twitter.com/rkauefraga/status/1759008932385755258)
- [Rust Ownership](https://twitter.com/rkauefraga/status/1759011206629621985)
- [Rust Cargo](https://twitter.com/rkauefraga/status/1759049552101789881)

Partindo disso, gostaria de saber quais tópicos vocês recomendam para entender Rust e ser um Rustáceo de verdade 🤣

Brincadeiras à parte, pretendo me aprofundar no Ownership/Borrowing e seguir meus estudos pela [documentação principal](https://doc.rust-lang.org/book) e pelo [Rust by examples](https://doc.rust-lang.org/rust-by-example).

Quais funcionalidades, projetos, conceitos da linguagem Rust vocês recomendam para entender a linguagem Rust e se tornar minimamente proficiente?
Template de mensagens no Fine Tuning de LLMs
Published: 2024-02-18 00:46:39

Fine Tuning de LLMs é um conceito relativamente simples onde você basicamente utiliza uma lista de mensagens para melhorar ou modificar a maneira como sua LLM responde.

Acontece que cada LLM é treinada originalmente utilizando seu formato específico de mensagem, e esse mesmo formato de mensagem deve ser utilizado durante um fine tuning.

Por exemplo, a LLM Mistral utiliza esse formato de mensagem

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

Já a LLM Phi-2 da Microsoft utiliza o formato de mensagem ChatML definida pela OpenAI

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


## Como saber qual template utilizar?

Primeiro você deve criar um list com as mensagens, onde cada mensagem possui a role e o content key.

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

Depois basta utilizar o método **apply_chat_template** do seu tokenizer **HuggingFace** para converter sua lista numa string corretamente formatada no template de chat de acordo com o modelo utilizado.

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

Como exemplo, esse é o resultado utilizando esse método para o modelo **HuggingFaceH4/zephyr-7b-beta** :

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

## Utilizando a mensagem formatada
Agora que suas mensagens estão no formato de chat correto pode ser utilizada pelo modelo desejado

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5w0mybhroqdg8juon46x.png)
Basics of Game Development with Unity and C#
Tags: csharp, beginners, programming, tutorial
Published: 2024-02-18 00:31:32

## Introduction

Game development has become a popular and rapidly growing industry, with millions of people worldwide engaging in gaming as a form of entertainment. One of the leading game development platforms is Unity, which offers developers a versatile and user-friendly environment to create various types of games. In this article, we will explore the basics of game development using Unity and C#.

## Advantages

1. **Cross-Platform Compatibility:** Unity allows developers to create games for multiple platforms such as PC, mobile, and console, saving time and resources.
2. **User-Friendly Interface:** Unity has a drag and drop interface, making it easy for beginners to create games without any coding experience.
3. **Visual Scripting with C#:** Unity provides a visual scripting tool called "Unity Playmaker," which allows developers to create game logic without writing complex code.
4. **Rich Asset Store:** Unity has a vast asset store with thousands of 3D models, animations, and scripts that developers can use to enhance their games.

## Disadvantages

1. **Learning Curve:** Game development is a complex process, and learning Unity and C# can be challenging for beginners.
2. **High System Requirements:** Unity requires a powerful computer to run smoothly, which may pose a problem for developers with low-end systems.

## Features

1. **Real-Time Preview:** Unity provides a real-time preview of games, allowing developers to make quick changes and see the results instantly.
2. **Multiplayer Capabilities:** Unity has built-in networking capabilities, making it easy for developers to add multiplayer functionality to their games.

### Getting Started with Unity and C#

To begin game development with Unity, you will need to:

- Download and install Unity Hub and the Unity Editor.
- Create a new project and familiarize yourself with the Unity interface.
- Learn the basics of C# scripting to control game logic and player interactions.

```csharp
// Example of a simple C# script in Unity
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    public float speed = 5.0f;

    void Update()
    {
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical = Input.GetAxis("Vertical");

        Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
        transform.Translate(movement * speed * Time.deltaTime);
    }
}
```

This code snippet demonstrates how to move a game object using keyboard input in Unity.

## Conclusion

Unity's powerful features and flexibility make it an ideal choice for game development. With the combination of C# scripting and a user-friendly interface, developers can create stunning and immersive games for various platforms. However, learning Unity and C# may be challenging for beginners, but with practice and dedication, anyone can master the basics of game development.