teleren/devto huggingface dataset:
Navigating the Decentralized Cosmos: A Journey with 0G's Modular Starship
Published: 2024-03-03 23:57:19

Embark on a journey like no other with 0G Labs' modular starship, the gateway to the decentralized cosmos. In this blog post, we'll take you on a voyage through space and time, exploring the vast expanse of possibilities that await those who dare to dream and innovate with 0G's modular technology.

_**Launching into the Unknown: Exploring New Frontiers**_

Just as explorers of old set sail for uncharted territories, so too do developers and content creators embark on a journey into the unknown with 0G's modular starship. With its modular architecture and interoperable design, the starship serves as a vessel for exploration, enabling users to navigate the decentralized cosmos with ease and discover new worlds of possibility.

_**Charting Your Course: Customizing Your Journey**_

No two journeys are alike, and with 0G's modular starship, users have the freedom to chart their own course through the decentralized cosmos. Whether you're exploring the depths of AI-powered virtual reality or charting a course through the blockchain galaxy, the modular starship puts the power of customization in your hands, allowing you to tailor your journey to your unique vision and objectives.

_**Forging Alliances: Collaborating Across the Cosmos**_

As you traverse the decentralized cosmos, you'll encounter fellow explorers, innovators, and visionaries who share your passion for discovery and innovation. With 0G's modular starship, forging alliances and collaborating across the cosmos has never been easier. Whether you're joining forces to tackle a common challenge or pooling resources to explore new frontiers, the modular starship provides a platform for collaboration and cooperation that transcends boundaries and borders.

_**Pushing the Boundaries: Innovation Without Limits**_

Innovation knows no bounds, and with 0G's modular starship, the sky's the limit. Whether you're pushing the boundaries of AI, blockchain, or virtual reality, the starship provides a platform for innovation without limits, empowering users to dream big, think boldly, and explore new horizons. With 0G's modular technology as your guide, the possibilities are limitless, and the journey is yours to define.

_**Conclusion: Beyond the Stars**_

As we journey through the decentralized cosmos with 0G's modular starship, we're reminded that the true essence of exploration lies not in the destination, but in the journey itself. With its modular architecture, interoperable design, and boundless potential, the starship serves as a beacon of innovation, guiding us toward new frontiers of possibility and paving the way for a brighter, more decentralized future for all.  https://0g.ai/
Open Source Project Updates
Tags: architecture, c, netcore, aspnet
Published: 2024-03-03 23:13:11

---
title: Open Source Project Updates
published: true
date: 2024-03-03 23:06:11 UTC
tags: Architecture,C,netcore,aspnet
canonical_url: https://jamienordmeyer.net/2024/03/03/open-source-project-updates/
cover_image: https://jamienordmeyer.net/wp-content/uploads/2021/12/console-guid.png
---

I’ve updated two of my open-source projects for those who might care, moving them both up to .NET 8.

The first is the dotnet GUID tool, which is documented [here](https://dev.to/nordyj/net-global-clis-1ef4) and found [here](https://github.com/StaticSphere/guid-cli) on Github. There were no changes made to this project other than to update it to .NET 8.

The second is the Clean Architecture solution template for `dotnet new`. This is documented [here](https://dev.to/nordyj/clean-architecture-solution-template-4i6k) and found [here](https://github.com/StaticSphere/clean-architecture-dotnet-template) on Github.

Neither release changed functionality, and the code was only changed in the Clean Architecture solution to remove a couple warnings related to the move to .NET 8. Both projects also had their Nuget package dependencies updated to latest and greatest at the time of their most recent commits.
Retry JavaScript fetch to solve AWS Parameters and Secrets Lambda Extension error on cold start!
Published: 2024-03-03 23:03:29

Hello,

Recently, I noticed one of the lambda functions has an error that randomly occurs. The function has "AWS Parameters and Secrets Lambda Extension" as a lambda layer to load and cache the configs from AWS Systems Manager Parameter Store and AWS Secrets Manager!

After debugging and trying to reproduce the error, I found out the error will not occur after the lambda function retry so my assumption was the extension layer API is not ready to work! It might be related to the lambda cold start situation!

Immediately after that, I thought of making a retry to the extension layer API instead of letting lambda trigger a retry and sending an error log to the monitoring platform!

Here is a basic retry implementation for the fetch function of JavaScript.

![Retry JavaScript fetch to solve AWS Parameters and Secrets Lambda Extension error on cold start!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8l3gp9lch6hdbdxstpmm.png)

[Source code](https://gist.github.com/mjyaqubi/0d36a64f9af81d6af18529d7ee73a4d8)

If you are interested in using the extension here is the AWS blog post [Using the AWS Parameter and Secrets Lambda extension to cache parameters and secrets](https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html).
AI Assistants as Engagement?
Tags: ai, marketing, openai
Published: 2024-03-03 23:02:31

---
title: AI Assistants as Engagement?
published: true
description: Could AI Assistants be useful for engagement with potential clients?
tags: #ai #marketing #openai
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9fiwwrf335muj9f2nond.jpg
# published_at: 2024-03-03 21:23 +0000
---

Will AI Assistants be useful in getting potential clients engaged? 

When it comes to web sites too many of them are one way pamphlets that dump information to the reader. They can be either too dense, getting into technical jargon and aspects which the reader may not really need to know, or be too high level and general.

Recently we have been thinking about an approach that engages the user so they become an active participant. We are aiming for a simple site which offers the user the opportunity to  discuss their requirements. After a little while the user is asked to provide and email address to receive further assistance.

![Assistant Screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zysgs7njiuycakj9eos.png)

[Visit the site here.](https://devcentre.nz)

The entire discussion is then sent to a consultant, where it can be evaluated and the user contacted to further discuss whether we can meet their needs.

Right now this is a rather personalized service, looking for clients which would typically want custom built software. Our technologies try to avoid development, with a focus on Low Code approaches. This includes being able to dynamically generate data structures.

![Data Structure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04g6p11giprwjxwia6rn.png)

Data Structures are more than simply database schemas as they also detail metadata about how the fields should look in the user interface, what kind of validation should occur and whether it is read only after record creation. A similar approach is used to define automation, integrations, visualizations and the latest addition, AI assistants.

This means that we are almost able to develop whole applications without writing code. The intention is to release this as a service in the not too distant future. 

But what do you think? Are AI Assistants really going to play a role in marketing? Or are they just a passing fad? How else can we leverage AI technologies into marketing?
شركة زيد الأولى للتجارة
Tags: codepen
Published: 2024-03-03 22:19:10


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5l0d33ot53r5mi4utbwv.jpg)كل ما يخص السيارات واكسسوارات 

{% codepen https://codepen.io/Yahya-Mohammed-the-vuer/pen/abxzVZB %}
Laravel Deployer Free package for laravel and nodejs apps Deployment
Tags: webdev, laravel, packages, deploy
Published: 2024-03-03 22:17:34

Presenting [Laravel Deployer](https://github.com/omaralalwi/laravel-deployer), an advanced package that transforms the deployment process for both Laravel and Node.js applications. This cutting-edge solution ensures smooth deployment, zero downtime, and provides extensive support for various environments and branches, making the deployment of your Laravel apps a breeze.


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

**Key Features of Laravel Deployer:**

1. **Flexibility for Customization:**
   - Customize your deployment process to suit your specific needs.

2. **Non-Root User Friendly:**
   - No requirement for root user access if PHP restart is not enabled.

3. **Branch Deployment Ease:**
   - Deploy on a specific branch effortlessly.

4. **Custom Extra Commands:**
   - Add your own custom extra commands to enhance flexibility.

5. **Laravel Deployment with Node.js:**
   - Deploy Laravel applications seamlessly with Node.js, offering multiple options.

6. **Node.js Integration:**
   - Deploy Laravel apps with Node.js integration as required.

7. **Custom PHP Restart Commands:**
   - Add your own OS command to restart PHP.

8. **SSH Key Verification:**
   - Check for SSH key existence and generate it on GitHub if not present.

9. **Compatibility:**
   - Support for all PHP and Laravel versions from 7.4 to 8.3.

10. **Free Forever:**
    - Enjoy the benefits of Laravel Deployer without any cost.

**Installation Steps:**

1. Install the package:
   ```bash
   composer require omaralalwi/laravel-deployer
   ```

2. Publish the configuration file:
   ```bash
   php artisan vendor:publish --tag=laravel-deployer-config
   ```

3. Set up GitHub SSH connection and generate the key using:
   ```bash
   php artisan deploy:key-generate your_github_email@domain.com
   ```


****Configuration Options:****

- **DEPLOY_BRANCH:**
  - Default Value: "master"

- **DEPLOY_PATH:**
  - Default Value: Project directory in Linux. For other OS, set it manually in ENV.

- **DEPLOY_BUILD_NPM:**
  - Default Value: false

- **DEPLOY_RESTART_HORIZON:**
  - Default Value: false

- **DEPLOY_RESTART_PHP_FPM:**
  - Default Value: false

- **DEPLOY_RESTART_PHP_FPM_COMMAND:**
  - Default Value: null

- **DEPLOY_SUDO_USER:**
  - Default Value: null

- **DEPLOY_SUDO_USER_PASSWORD:**
  - Default Value: null


****Getting Started:****

Run the following command to initiate deployment:
```bash
php artisan deploy:publish
```

Explore more about Laravel Deployer in the [package documentation](omaralalwi.github.io/laravel-deployer).

For detailed information and access to the package, visit the [GitHub repository](https://github.com/omaralalwi/laravel-deployer).
vulnerability assessment
Published: 2024-03-03 21:51:41

## Vulnerability Assessment

A  Vulnerability Assessment aims to identify and categorize risks for security weaknesses related to assets within an environment. It is important to note that there is little to no manual exploitation during a vulnerability assessment. A vulnerability assessment also provides remediation steps to fix the issues.

The purpose of a Vulnerability Assessment is to understand, identify, and categorize the risk for the more apparent issues present in an environment without actually exploiting them to gain further access. Depending on the scope of the assessment, some customers may ask us to validate as many vulnerabilities as possible by performing minimally invasive exploitation to confirm the scanner findings and rule out false positives. Other customers will ask for a report of all findings identified by the scanner. As with any assessment, it is essential to clarify the scope and intent of the vulnerability assessment before starting. Vulnerability management is vital to help organizations identify the weak points in their assets, understand the risk level, and calculate and prioritize remediation efforts.

It is also important to note that organizations should always test substantial patches before pushing them out into their environment to prevent disruptions.
Ingest EHR HL7 feeds into AWS S3
Published: 2024-03-03 21:47:56

Check out this overview of how easy hl7v2 messaging with Amazon S3 buckets can be.
[![Image Thumbnail](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cqwmp6u7pny3isv7bqpd.png)](https://youtu.be/5GkcPShUO5w?si=mWC4QGGgKxOrKd3n)
What if anyone steals your JWT
Tags: javascript, jwt, security, webdev
Published: 2024-03-03 11:57:27

Storing JWTs (JSON Web Tokens) in cookies is a common practice, but it comes with security considerations. When storing JWTs in cookies, it's essential to set appropriate security measures to mitigate the risk of token theft. Here are some strategies to enhance security:

## HttpOnly Flag:
 Set the HttpOnly flag on cookies containing JWTs. This prevents client-side scripts from accessing the cookie, reducing the risk of cross-site scripting (XSS) attacks.

## Secure Flag:
 Set the Secure flag on cookies to ensure they are only transmitted over HTTPS connections. This prevents interception of cookies in transit over unsecured HTTP connections.

## SameSite Attribute:
 Set the SameSite attribute on cookies to control when cookies are sent in cross-origin requests. Setting it to "Strict" or "Lax" helps prevent Cross-Site Request Forgery (CSRF) attacks.

## Token Expiry:
 JWTs should have a relatively short expiration time. This limits the window of opportunity for an attacker to steal and misuse the token.

## Token Revocation:
 Implement mechanisms for token revocation in case of suspected token compromise. This could involve maintaining a blacklist of revoked tokens or using token rotation techniques.

## Additional Security Layers:
 Implement additional security measures such as rate limiting, IP filtering, and user-agent verification to protect against token theft and misuse.

While storing JWTs in cookies can simplify authentication workflows, it's crucial to implement proper security measures to safeguard against potential vulnerabilities. Additionally, regularly reviewing and updating security practices based on emerging threats and best practices is essential to maintaining a secure authentication system.

If you feel there are other ways, Feel free to comment. I would love to discuss on that.
What is Next.js?
Tags: javascript, react, nextjs, webdev
Published: 2024-03-03 21:33:56

Day 1 of 100 days code and I am already mind blown 💥! I started my journey with Next.js and learned so much today. I got to know about the history of Next.js, its definition, the difference between Next.js and React, and Client Side Rendering (CSR) and Server Side Rendering (SSR).

Next.js is a front-end framework for building React applications with server-side rendering capabilities. It was developed by the team at Vercel (f.k.a Zeit), led by Guillermo Rauch, the founder of Vercel. The wider community has also contributed to its development over time.

Next.js brings in SSR, automatic code splitting, and more, making it simply amazing and very cool ✨. It was built on top of React, so there are no changes in syntax, it's simply React + more.

In CSR, the app loads and generates the output on the browser dynamically. In SSR, the UI we see is not generated by the browser, but on the server. This means that when an app loads, it doesn't need to parse the UI on the browser, instead, it comes from the server side.

I'm excited to continue this journey and share more with you. See you guys tomorrow! Let's go.
Dica - Definindo enums como parâmetros em componentes JSF
Tags: webdev, braziliandevs, java, programming
Published: 2024-03-03 20:53:47


Você pode definir no seu componente JSF um parâmetro do tipo Enum, e, na hora de utilizar, passar a representação como string.

Em runtime, o JSF irá fazer o cast para verificar se a string corresponde a um valor do Enum.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4ncmgxtkxka0ukr18e8.png)
Internal packages in Go
Tags: 100daystooffload, go, programming, cleancode
Published: 2024-03-03 20:46:03

Since the release of Go version 1.4 in December 2014 ([Go 1.4 Release Notes]([Go .14 Release Notes](https://go.dev/doc/go1.4))), the concept of internal packages was introduced to Go developers. This feature enables them to structure their programs with clearer intentions. Like many features in Go, it utilizes a simple naming convention to provide its functionality.

**Why use internal packages?**
The core of using internal packages lies in their ability to manage visibility and establish clear boundaries within a Go program. By using internal packages, developers can ensure that certain parts of their codebase are "shielded" from external use, thus maintaining a clean and well-defined interface for users and other parts of the program.

**Creating an internal package**
To take advantage of this feature, you simply need to place the desired package within a directory named `internal`, or within any subdirectory of an `internal` directory. The Go toolchain enforces access restrictions based on this convention.

**In practice**
If you navigate to the standard package [crypto](https://cs.opensource.google/go/go/+/refs/tags/go1.22.0:src/crypto/), you will see these files and directories for that package.

![Files for crypto standard package](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ofap9vzbsrhvzrpju3wr.png)

As you can see, there is an `internal` directory just in the middle of the image. According to the rules governing internal packages, this package can only be imported by code that lives within the crypto directory tree. This means that code situated outside repository is prohibited from accessing it.

![folders in internal folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysv8d2n9ghhxz9y62lmq.png)

This mechanism ensures that developers can create segments of their codebase that are for internal use only, without fear of them being accidentally depended upon by external parties. It's a critical feature for maintaining modular, secure, and clean code architectures in larger projects.

Full details of the mechanism are in [the design document](https://go.dev/s/go14internal).
Простая задача на динамическое программирование: Лучшее время для покупки и продажи акции
Published: 2024-03-03 20:36:42

## Задача. 
Дан массив целых чисел prices, где prices[i] - цена на акцию в день i. Вам нужно максимизировать прибыль выбрав один день, когда вы купите одну акцию, а также другой день в будущем, когда вы продадите акцию. В качестве результата нужно вернуть максимальную прибыль, которую можно получить. Если прибыль получить нельзя, то вернуть 0.

Ссылка на leetcode: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/

Пример:
prices = [7,1,5,3,6,4]
Ответ: 5 (Купить по 1, продать по 6).

## Решение. 

### Brute force.
Первое решение, которое приходит в голову, это перебрать все пары, посчитать для каждой прибыль и найти максимальную прибыль. Такое решение работает за **O(n^2)** по времени и **O(1)** по памяти.
Перебор пар можно сделать при помощи вложенного цикла:
```java
for (int i = 0; i < prices.length; i++) {
    for (int j = i + 1; j < prices.length; j++) {
        ......
    }
}
```
Тогда прибыль для покупки в день i и продажи в день j: 
int profit = prices[j] - prices[i];
И нам нужно найти максимум:
```java
public int maxProfit(int[] prices) {
    int maxProfit = Integer.MIN_VALUE;
    for (int i = 0; i < prices.length; i++) {
        for (int j = i + 1; j < prices.length; j++) {
            maxProfit = Math.max(maxProfit, prices[j] - prices[i]);
        }
    }
    return maxProfit > 0 ? maxProfit : 0;
}
```

### Dynamic Programming.
Можно ли улучшить это решение? Да, используя динамическое программирование. Давайте применим bottom-up подход. Для этого нужно разбить задачу на подзадачи, а также установить связь решения подзадач с решением более общей задачи.
В данном случае, **такой подзадачей может быть максимальная прибыль, которую мы можем получить, если решим продавать в день i**. Тогда решением общей задачи будет **максимум из всех таких вариантов (максимум из прибылей, когда мы продаем в день 1, день 2, день 3 и т.д.).** Как нам определить максимальную прибыль, которую мы можем получить, если продавать в день i? Очевидно, **такая прибыль будет максимальная, когда мы купили в день с минимальной ценой в какой-то день до текущего дня i.** 
```java 
maxProfit(i) = prices[i] - min(prices[j], j = 0, .., i - 1)
```
Тогда ответ будет максимум из таких прибылей:
```java
maxProfit = max(maxProfit(i), i = 1, .., n - 1)
```
Для того, чтобы нам снова и снова не перевычислять min(prices[j], j = 0, .., i - 1), мы можем хранить это в переменной minPriceSoFar и обновлять ее по мере итерации по массиву.
Код решения:
```java
public int maxProfit(int[] prices) {
    int maxProfit = Integer.MIN_VALUE;
    int minPriceSoFar = Integer.MAX_VALUE;
    for (int i = 0; i < prices.length; i++) {
        minPriceSoFar = Math.min(minPriceSoFar, prices[i]);
        int currentProfit = prices[i] - minPriceSoFar;
        maxProfit = Math.max(maxProfit, currentProfit);
    }
    return maxProfit;
}
```
Решение работает за **O(n)** по времени и **O(1)** по памяти.
Meet FileScout: Simple, Fast Deep Text Search on Windows
Tags: productivity, opensource, showdev, rust
Published: 2024-03-03 20:31:25

Introducing FileScout, a straightforward desktop application designed for Windows to help you quickly find text within files. Built with Rust for speed and reliability, FileScout simplifies the search process, making it easier than ever to locate the content you need.

## Simple Yet Powerful

FileScout is all about simplicity and efficiency. It allows you to perform deep text searches within your files, ensuring that finding specific content is no longer a time-consuming task.

### How It Works

1. **Specify Path and Keyword**: Start by telling FileScout where to look and what you're looking for.
2. **File Tree Building**: FileScout scans the specified path, preparing a list of files to search through.
3. **Deep Text Search**: The app then searches within these files for your keyword, ensuring thorough results.

### Features

- **Efficiency**: Built for speed, FileScout finds what you need quickly.
- **Simplicity**: Easy to use, with a focus on user-friendly design.
- **Precision**: Designed for deep text searches, ensuring accurate findings.

## Get Started

FileScout is available for Windows users looking for a fast, reliable way to search text within files. Download, install, and start searching—it's that simple.

[Download FileScout here](https://github.com/anridev24/file-scout/releases/tag/0.0.1)

## Your Feedback Matters

We're always looking to improve. Share your FileScout experiences and suggestions with us, helping to make it even better.

## Conclusion

For those needing a fast, simple solution for deep text searches on Windows, FileScout is here. Try it out and see how it can streamline your search process.