teleren/devto huggingface dataset:
Why OpenChat Model is So Much Better Than ChatGPT?
Tags: datascience, programming, ai, machinelearning
Published: 2023-11-21 16:33:09

Hugging Face recently announced their new open-source Large language model, OpenChat, which is a fine-tuned version of OpenChat that focuses on helpfulness and outperforms many larger models on Alpaca-Eval, MT-bench, and Vicuna-bench benchmarks.
It has about 13 billion parameters that can be run easily on a laptop, answer user questions, and generate sentences.

This article was originally published on: [Page](https://quickaitutorial.com/why-openchat-model-is-so-much-better-than-chatgpt/)
How to handle your Arthera Lifetime Subscription NFTs
Tags: arthera, nfts, subscription
Published: 2023-11-21 16:31:59

[Arthera](https://www.arthera.net/) is a Layer 1 EVM-compatible blockchain, improved by DAG-based technology. Testnet is live and Mainnet launches on December 25th 2023.

With a dual model offering both pay-as-you-go and subscription options, Arthera's Lifetime Subscriptions (LTS) provide unparalleled access to our evolving ecosystem. On Arthera you subscribe and **forget gas fees - for life**.

**Get yours [here](https://lifetime.arthera.net/)**, and/or create your own referral link [there](https://lifetime.arthera.net/).

You can get your limited edition of Arthera Lifetime Subscription (LTS) on seven different networks: 

- Arbitrum (222)
- Avalanche (111)
- Base (111)
- BNB Chain (333)
- Ethererum (444)
- Optimism (111)
- Polygon (333)

## How to add your NFT to your wallet? 

The easiest way to add your NFT to your wallet is to:

1. Go to the explorer of the network/blockchain you selected
2. Paste your wallet address in the search bar
3. Find your NFT, in most of explorers there's an "NFT transfers" or "ERC721 Token Txns"
4. Copy-paste the NFT contract address, and keep the NFT ID in mind
5. Open MetaMask, and click on the "NFTs" tab
6. Click on "Import NFT"
7. Paste the NFT contract address and NFT ID
8. Click on "confirm"

Voilà! :tada:

![julien-LTS-NFT](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cebk3l20m94pv6oe9fgo.png)

You can now transfer your NFT using MetaMask wallet. 

If you're using any other wallet, there should be some way to add it to your wallet.

## View your NFT

You can also view your NFT in a lot of different NFT marketplaces depending on which network you have claimed it. 

## What's next?

In a near future, you'll be able to use this NFT to activate your lifetime subscription, forget gas fees, and make up to 30 daily transactions on Arthera at no cost at all. For Life.
Adding CI for testing
Published: 2023-11-21 16:29:08

Hi everyone,

In this part i have added continuous integration for better testing of the project and maintaining with good quality on the GitHub.

GitHub actions: this is added in my project for checking any changes in the code and integrating it on main branch if it is functioning correctly.

In my Partner project i have: added workflow which will trigger on every push to the main branch and makes pull requests targeting the main branch. It sets up Node.js, installs dependencies, and runs test using the npm test command. 


Thank you
Resolving "File cannot be loaded because running scripts is disabled on this system" Error in Nodemon
Tags: node, nodemon, remotepolicy, javascript
Published: 2023-11-21 16:24:45

```
nodemon : File C:\Users\MyUser\AppData\Roaming\npm\nodemon.ps1 cannot be loaded because running scripts is disabled on this system. For more 
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ nodemon app
+ ~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
```
Developers using Nodemon to enhance their Node.js development experience may encounter a common hurdle when attempting to execute the tool within a PowerShell environment. The stumbling block manifests as the error message, "File cannot be loaded because running scripts is disabled on this system," creating a roadblock in an otherwise smooth development process.

This error is a consequence of PowerShell's robust security features, specifically designed to safeguard systems from potentially harmful script execution. While these protections are vital for maintaining a secure computing environment, they can occasionally impede the seamless execution of legitimate development tools like Nodemon. There are different levels of execution policy as below:

1. **_Restricted_**: No scripts can be run. Default for the highest level of security.
2. _**AllSigned**_: Only scripts that are digitally signed by a trusted publisher can be run.
3. **_RemoteSigned_**: Allows local scripts but requires downloaded scripts to be signed by a trusted publisher.
4. **_Unrestricted_**: Allows the execution of all scripts with warnings in some cases, regardless of source.
5. **_Bypass_**: Allows us to run scripts from anywhere without warning regardless of the source.

So, in order to resolve this issue, you have to change the execution policy. For that follow the given steps.

- **Open PowerShell as Administrator** - In Start Menu, search for PowerShell. Right-click on the PowerShell icon and choose "Run as Administrator." This ensures that you have the necessary permissions to change the execution policy.

- **Get Execution Policy** - Run the following command to get the current execution policy.
```
Get-ExecutionPolicy
```

- **Change the Execution Policy** - Run the following command to set the execution policy to RemoteSigned. This allows locally created scripts to run but requires scripts from the internet to be signed by a trusted publisher
```
Set-ExecutionPolicy RemoteSigned
```
If you are prompted like below then simply type `A` to accept all the changes or you can choose to accept them individually by typing `Y`.

![Changing Execution Policy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5o1j8fhmwfggevxtxm1.png)

That's all. Now Run your script with `nodemon` again and enjoy.

Note: You may need to restart your system in some cases.
I made a free tool to spy on any website's hosting & domain providers
Tags: webdev, javascript, productivity, testing
Published: 2023-11-21 16:19:45

For a few days, I sought a tool to find hosting and domain information for any domain.

Whether I find a website online or my competitor's website, cloud portal or anything, I want to know where they're hosting their platform.

I found some solutions online that don't meet my requirements and sometimes don't work.

So, I made it my own and published it free, forever for you.

The tool is **[Hosting Lookup](https://tech.zerobizz.com/tools/hosting-lookup)**.

![free hosting checker online](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzpxh5njfa40ua4c6cri.jpeg)

You can look up any website, domain or URL to know what hosting or proxy provider they use.

Tool link: https://tech.zerobizz.com/tools/hosting-lookup/

This tool is for SAAS developers, cybersecurity students, bloggers, SEOs, domain traders and many other individuals.

This tool is free and always will be. So feel free to bookmark or install PWA to get information quickly.

You can also embed the information card into your website.

{% codepen https://codepen.io/zerobizztech/pen/YzBaLor %}

Just copy the code and paste it anywhere.

![embed hosting information](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q15rh266hi41e2l3nyxj.jpeg)

```
<iframe src="https://tech.zerobizz.com/tools/hosting-lookup/embed.html?domain=dev.to" style="width: 100%; height: 520px; border: none;"></iframe>
```

## New Update

When I first launched the tool to a couple of users, they found it interesting but also they wanted WHOIS data as well.

I said, OK... let's do it.

![free whois checker online](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kiygxybin4u6vsinpctf.jpeg)

Now, you can look up any website's **domain** and **hosting** data in one place for free, forever.

![whois lookup, raw whois data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/modz48khjxpe8h4o271t.jpeg)

You can also view the **raw WHOIS data** and copy it as JSON.

Please note: This tool is still in beta and it's a 2-hour project. I made it for myself but accidentally found out that people can use it as well.

Let me know what your feedback on this tool so that I can improve it and my coding skills better.

Thanks. You are awesome <3
Next Generation App Development Company
Published: 2023-11-21 16:05:14

TechnBrains: Elevate your digital presence with our premier Mobile App Development services. As a leading [App Development Agency](https://www.technbrains.com/services/mobile-app-development/), we bring cutting-edge solutions to the forefront. Specializing in Android and iOS app development, our seasoned experts ensure your app stands out in the competitive landscape. From the initial concept to deployment and beyond, we are committed to turning your vision into a reality. Choose TechnBrains for innovative and transformative Mobile App Development experiences.
Sui basic - ownership
Tags: sui, tutorial, beginners
Published: 2023-11-21 16:00:39

## Introduction

Each object in Sui has an owner field that indicates how this object is being owned. In Sui Move, there are a total of four types of ownership.

- Owned
    - Owned by an address
    - Owned by another object 
- Shared
    - Shared immutable
    - Shared mutable

## Owned Objects

> The first two types of ownership fall under the `Owned Objects` category. Owned objects in Sui are processed differently from shared objects and do not require global ordering. 


### Owned by an Address

Let's continue using our `transcript` example here. This type of ownership is pretty straightforward as the object is owned by an address to which the object is transferred upon object creation, such as in the above example at this line:

```rust
    transfer::transfer(transcriptObject, tx_context::sender(ctx)) // where tx_context::sender(ctx) is the recipient
```

where the `transcriptObject` is transferred to the address of the transaction sender upon creation.

### Owned by an Object

In order for an object to be owned by another object, it is done using `dynamic_object_field`, which we will explore in a future section. Basically, when an object is owned by another object, we will call it a child object. A child object is able to be looked up in global storage using its object ID.

## Shared Objects

> A shared object is an object that is shared using the sui::transfer::share_object function and is accessible to everyone. Unlike owned objects, anyone can access shared ones on the network. Extended functionality and accessibility of this kind of objects requires additional effort by securing access, if needed.
> Shared objects require the key ability.

### Shared Immutable Objects

Certain objects in Sui cannot be mutated by anyone, and because of this, these objects do not have an exclusive owner. All published packages and modules in Sui are immutable objects. 

To make an object immutable manually, one can call the following special function:

```rust
    transfer::freeze_object(obj);
```

### Shared Mutable Objects

Shared objects in Sui can be read or mutated by anyone. Shared object transactions require global ordering through a consensus layer protocol, unliked owned objects. 

To create a shared object, one can call this method:

```rust
    transfer::share_object(obj);
```

Once an object is shared, it stays mutable and can be accessed by anyone to send a transaction to mutate the object. 


*💡Note: You can find some example in [here](https://github.com/truonggau/sui-tutorial/blob/main/basic_example/basic_example/build/basic_example/sources/transcript_2.move).*

## Referent

- Part 1: [object](https://dev.to/truongnx/sui-move-basic-object-18cn)

- Part 3: [parameters](https://dev.to/truongnx/sui-basic-parameter-2fj4)
💥Ini Caraku Meredirect User ke Aplikasi Android
Tags: api, nextjs, android, indonesia
Published: 2023-11-21 16:00:00

Halo teman-teman dev, jadi aku baru aja diberikan tugas untuk membuat API di Next.JS untuk redirect ke aplikasi android.

Disini aku buat API di path api/dashboard.ts

```jsx
import { NextApiRequest, NextApiResponse } from "next";

export default function handler(req: NextApiRequest, res: NextApiResponse) {
  res.writeHead(302, {
    Location:
      "intent://dashboard#Intent;scheme=kerjatim;package=id.co.mka.kerjatim;end",
  });
  res.end();
}
```

Ketika pengguna mengakses localhost:3000/api/dashboard, server Next.js akan merespons dengan header Location yang mengarahkan pengguna ke URL Intent yang sesuai untuk membuka aplikasi Android.

Untuk response http nya menggunakan kode **302**, yaitu kode status HTTP yang menunjukkan pengalihan sementara (temporary redirect). Artinya sumber daya yang diminta sementara tidak tersedia di lokasi yang diminta, tetapi dapat ditemukan di lokasi lain.

Selain itu, dalam konteks kode diatas

**intent://** adalah skema URL yang digunakan untuk membuka aplikasi Android dengan Intent.

‘**dashboard**’ adalah bagian dari URL yang menunjukkan halaman dashboard dalam aplikasi Android.

**scheme=kerjatim** adalah bagian dari URL Intent yang digunakan untuk membuka aplikasi Android dengan skema yang ditentukan.

**package=com.example.myapp** adalah paket aplikasi Android yang harus ada di perangkat pengguna untuk membuka aplikasi.

Itu adalah caraku redirect user ke aplikasi android, kalau cara kalian gimana?

Sekian sharing singkat kali ini, ayo memperbanyak tulisan-tulisan Indonesia di dev.to
117 berufliches Vorwärtskommen: Vorgesetzter ignoriert klares Zeichen.
Tags: deutsch, career, story, discuss
Published: 2023-11-21 16:00:00

Moin Moin,

habt ihr es schon mal erlebt, dass ihr ein klares Zeichen für ein Problem gesehen habt, eine Fehlermeldung beispielsweise, ihr dies kommuniziert habt, euer Vorgesetzter diese Warnung jedoch ignorierte?

Falls ja möchte ich dich hiermit dazu Einladen dein Erlebnis in den Kommentaren mit uns zu teilen.

Mir selbst fällt dabei, die Arbeit an einer Sammelforschung ( deutsch für Statistik ) ein. Hierfür sollte ein CRM erweitert werden. Wichtig ist zu wissen, dass ein Eigentümer des Unternehmens diese Leistung in Auftrag gegeben hat. Das CRM war web-basiert und auf Serverseite in PHP implementiert. Mein Vorgesetzter bestand darauf ein ORM zu nutzen. Ich wies nach, dass mit dem ORM zu viel Speicher verbraucht wird und dass eine direkte Anfrage ohne ORM ( also direkt mittels PDO ) die Anforderungen erfüllt.
Nun gefiel dies meinem Vorgesetzten nicht. Er übernahm die Aufgabe selbst und setzte diese mit dem ORM um. Bei der Präsentation wollte der Eigentümer natürlich wissen, ob er denn nun seine Auswertung erhält… Das Programm stürzte ab – Arbeitsspeicher verbrauch zu hoch…

Nun geht diese Geschichte noch etwas weiter und ggf. war der spätere Ansatz sich die Daten stückweise zu holen, also mehrere Anfragen zu stellen mit ORM, vielleicht besser als eine Anfrage zu stellen ohne ( wobei man auch ohne ORM mehrere Anfragen stellen kann und es ggf. nach Datenmenge mit ORM früher zu Zeitüberschreitungen kommen sollte… ), aber ja.

Was für ein Erlebnis hast du zu teilen?

Lass uns mittels Kommentaren austauschen.

Beste Grüße,
Mustafa

Oder auch mittels E-Mail: mustafa.kevin.dwenger@posteo.de
Betreff: Austausch
Js Devs: Position of you ++ or — matters
Tags: javascript, react, tutorial, programming
Published: 2023-11-21 15:51:01

   JavaScript provides powerful operators for manipulating numeric values ++ for incrementing and -- for decrementing. Understanding the nuances between postfix and prefix usage is crucial for precise programming.



### Postfix Increment and Decrement

   Postfix increment and decrement operators (i++ and i--) are used to change the value of a variable after its current value is used in an expression.

```js
let i = 5;
console.log(i++); // Outputs: 5 (uses current value, then increments)
console.log(i);   // Outputs: 6 (value has been incremented)
```

### Prefix Increment and Decrement
   Prefix increment and decrement operators (++i and --i) are used to change the value of a variable before its current value is used in an expression.

```js
let i = 5;
console.log(++i); // Outputs: 6 (increments first, then uses the updated value)
console.log(i);   // Outputs: 6 (value has been incremented)
```

### An extra example

- 
With postfix
```js
// Postfix decrement: prev--
let inventoryCount = 5;

function processSalePostfix() {
  if (inventoryCount > 0) {
    console.log("Item sold! Remaining inventory:", inventoryCount--);
  } else {
    console.log("Item out of stock!");
  }
}

// Simulate sales
processSalePostfix(); // Output: Item sold! Remaining inventory: 5
processSalePostfix(); // Output: Item sold! Remaining inventory: 4
processSalePostfix(); // Output: Item sold! Remaining inventory: 3
```
In this scenario, with postfix decrement, the current inventory count is logged, and then the inventory count is decremented. This might be useful if you want to display the current inventory count before processing the sale.

- with prefix
```js
// Prefix decrement: --prev
let inventoryCount = 5;

function processSalePrefix() {
  if (--inventoryCount > 0) {
    console.log("Item sold! Remaining inventory:", inventoryCount);
  } else {
    console.log("Item out of stock!");
  }
}

// Simulate sales
processSalePrefix(); // Output: Item sold! Remaining inventory: 4
processSalePrefix(); // Output: Item sold! Remaining inventory: 3
processSalePrefix(); // Output: Item sold! Remaining inventory: 2
```
In this scenario, with prefix decrement, the inventory count is decremented before checking if it's greater than 0. This might be useful if you want to ensure that the inventory count is updated before any other operations, such as logging or further processing.


### Conclusion

In summary, postfix increment/decrement is useful when you need the current value before the change, and prefix increment/decrement is ideal when you need the updated value after the change. This nuanced understanding will undoubtedly enhance your proficiency as a JavaScript developer.

**NOTE FOR REACT DEVELOPERS:** Be careful with postfix if your values may be used before a rerender.

Thanks for your time 🙂👍.
Seguridad C# .Net Core
Published: 2023-11-21 15:45:45

## Plataforma Identity

Esta plataforma ofrece los servicios de autenticación y autorización para el desarrollo de aplicaciones donde los usuarios podrán iniciar sesión, obtener permisos para el uso de recursos restringidos, establecer políticas de usuario y muchas operaciones más.

## Los componentes
La plataforma se compone de:

- API de configuración.
- Contenido para desarrolladores.
- Portal de administración.
- Librerías de código abierto.
- Servicio de autenticación compatible con OAuth 2.0 y OpenID Connect.

El desarrollador no necesitará implementar todos los módulos de seguridad desde cero gracias a todas las funciones y aplicaciones integradas de forma nativa. Será posible crear una aplicación multiplataforma de escritorio, móvil, web app, MVC, Blazor Webassembly, SPA, o API con todo integrado. En la siguiente imagen se resumen cada uno de los módulos y servicios:

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


## Composición general de un sistema Auth
Se resumen las características, servicios y módulos básicos que un sistema de autenticación y autorización debe conformar:


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

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

## Diagrama UML: Procesos de autenticación y autorización generales
El siguiente diagrama describe el proceso que desarrollaremos en los laboratorios:


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


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

## El proyecto paso a paso
Iniciemos desde cero con la creación del proyecto. Abra su IDE Visual Studio.Net:

1. Seleccione nuevo proyecto, plantilla ASP.NET Core Web app.
2. Asigne un nombre. 
3. Como recomendación ubíquelo en su PC idealmente en una carpeta con nombre inicial de repositorio, por ejemplo > RepositorioIdentit.
4. Chequee la opción > ‘Colocar solución en el mismo directorio’. Deje por default lo demás.
5. En siguiente chequee la opción > HTTPS, y en autenticación de campo deje > ‘Ninguno’; Pulse en > Crear.

Ahora sigue el paso a paso en nuestro [BLOG](https://vladodotnet.wordpress.com/2023/05/20/seguridad-c-net-core-leccion-2/), haciendo uso de .NET Core. Y disfruta del Aprendizaje Hecho Fácil!


Vlado
Senior .Net
AWS Lambda Automatic Retry on Failure and How to Configure It
Tags: aws, lambda, beginners
Published: 2023-11-21 15:37:25

#### AWS Lambda's Automatic Retry Behavior
AWS Lambda's behavior for automatic retries on failure depends on how the Lambda function is triggered.

1. **Asynchronous Invocation**: When Lambda functions are triggered by asynchronous events, like S3 events or SNS messages, Lambda automatically retries failed executions. The first retry happens almost immediately, and the second retry occurs a few minutes later.

2. **Synchronous Invocation**: For synchronous invocations, such as those made through API Gateway or the Lambda API, Lambda does not automatically retry. The client must handle errors and retry as needed.

3. **Stream-based Triggers**: With stream-based triggers, such as DynamoDB or Kinesis streams, Lambda continues to read from the stream and reprocess failed records until they are processed successfully.

#### How to Change Retry Settings
1. **Changing Asynchronous Retry Settings**
   - Log in to the Lambda console and select your function.
   - Open the 'Configuration' tab and click on the 'Asynchronous invocation' section.
   - Change settings for retry attempts or Dead Letter Queues (DLQs).

2. **Stream-based Retry Settings**
   - For stream-based triggers (DynamoDB or Kinesis), you can configure batch size, batch window, and retry policies.
   - These settings can be changed in the trigger's configuration page.

#### Important Considerations
- It's crucial to understand the automatic retry behavior correctly and ensure the idempotency of your processing.
- Setting up Dead Letter Queues (DLQs) can help retain messages that fail to be processed for later analysis.
C# - Lambda Improvements in C# 10.0
Tags: csharp, programming, beginners, tutorial
Published: 2023-11-21 15:30:00

C# 10.0 introduced several improvements to lambda expressions, making them more powerful and flexible. These enhancements include the ability to have natural types for lambda expressions and method group conversions to delegates, improving the readability of your code.

Here's a look at how you can utilize these lambda improvements:

1. **Natural Types for Lambdas:**
   Lambdas can now be used in places where a natural type is expected, without the need to explicitly specify the delegate type. This reduces verbosity and improves readability.

2. **Method Group Conversions:**
   Method groups can now be implicitly converted to delegates with matching parameter types, further simplifying delegate usage.

Example:

```csharp
var list = new List<int> { 1, 2, 3, 4, 5 };

// Natural type for lambdas
var evenNumbers = list.Where(x => x % 2 == 0);

// Method group conversion
Func<int, int, int> addMethod = Add;
var result = addMethod(5, 10);

int Add(int x, int y) => x + y;
```

In this example, the lambda expression in the `Where` method call doesn’t need a delegate type to be specified, and the `Add` method is directly assigned to the delegate without needing a lambda expression. These improvements make the code more concise and easier to understand.

Leveraging these lambda improvements in C# 10.0 can produce more expressive and less verbose code, particularly in scenarios involving LINQ queries or event handlers. This makes your codebase cleaner and more maintainable.