teleren/devto huggingface dataset:
OWASP Top 10 for LLMs
Tags: 100daystooffload, owasp, llm, security
Published: 2023-09-02 08:54:02


The Open Web Application Security Project ([OWASP](https://owasp.org/)) is an open community dedicated to improving the security of software. It provides free and open resources. Maybe their most famous resource is [OWASP Top Ten](https://owasp.org/www-project-top-ten/) for web applications. Since web applications are a major target for attackers, the OWASP Top Ten list is used by organizations around the world to prioritize their security efforts.

OWASP has now released similar list for LLM applications, [OWASP Top 10 for Large Language Model Applications](https://owasp.org/www-project-top-10-for-large-language-model-applications/). The project provides a list of the top 10 most critical vulnerabilities often seen in LLM applications, highlighting their potential impact, ease of exploitation, and prevalence in real-world applications.
 
1. Prompt Injection
2. Insecure Output Handling
3. Training Data Poisoning
4. Model Denial of Service
5. Supply Chain Vulnerabilities
6. Sensitive Information Disclosure
7. Insecure Plugin Design
8. Excessive Agency
9. Overreliance
10. Model Theft

Visit OWASP to deep dive into each vulnerability.

Happy reading!
What Is NodeJS?
Tags: node, javascript, webdev, backend
Published: 2023-09-02 08:49:27

Even though there are plenty of good answers out there, the one that I like the most is this one, Node Js is an environment to run JavaScript outside the browser.
NodeJs was created in 2009 and It is built on Chrome's JavaScript V8 engine.
As you probably are aware, every browser has an engine, a tool that compiles our code down to machine code and Chrome uses one by the name of V8.
In extremely simple terms, the creator of Node Ryan Dahl ripped out the V8 engine and built Node on top of it.
Since the moment it was created, Node has evolved tremendously and while there are many things to like about Node, I particularly enjoy the large community around Node since that exceedingly saves time on feature development, as well as the fact that with the help of Node, it has never been easier to build full-stack apps since both front-end and back-end are essentially built in the same language, and you guessed it, that language is our beloved JavaScript.
"Arbor Odyssey" DevLog #0
Published: 2023-09-02 08:47:42

!Game concept was partly made with the help of Chat Gpt-3.5, some of the following text is his response towards me. I'm a solo dev and I don't want to make the same mistake for the hundredth time of choosing a game with a massive scope.!


Concept:
"Arbor Odyssey" is a 2D platformer that combines the charm of a squirrel's agile movement with the atmospheric and immersive elements inspired by "Rain World." In this game, players take on the role of a nimble squirrel exploring a lush and mysterious 'Tree World'. The goal is to traverse the Tree, solve puzzles, interact with diverse creatures, and uncover the secrets of the Tree while experiencing the ecosystem's vibrant and autonomous behaviour.

Key Features:

Squirrel Agility: Emphasize the squirrel's agility and acrobatics. Allow players to leap, glide, swing, and perform parkour-like moves among the trees.
Procedurally Animated Creatures: Create a diverse array of procedurally animated forest creatures, each with its own unique behaviors, interactions, and contributions to the forest's ecosystem.
Dynamic Ecosystem: Develop a living, breathing forest ecosystem that operates independently of the player. Creatures hunt, migrate, and adapt to changing conditions, creating a sense of realism and immersion.
Atmospheric Design: Focus on creating an atmospheric and visually captivating forest environment with hand-drawn art, dynamic lighting, and weather effects. Use sound design to enhance the mood and ambiance.
Puzzles and Challenges: Design tree-based puzzles and challenges that require both dexterity and wit to solve. Encourage players to explore and interact with the environment to progress.
Creature Interaction: Enable players to interact with forest creatures in meaningful ways. These interactions can aid in solving puzzles, uncovering secrets, or forming alliances with certain creatures.
Day-Night Cycle: Implement a day-night cycle that affects creature behaviors and opens up new opportunities and challenges for the player.
Hidden Lore: Incorporate a rich narrative and lore that players can gradually uncover through exploration, interactions, and environmental storytelling.
Player-Driven Exploration: Allow players to explore the forest at their own pace, uncovering secrets, and choosing their path through the treetops.
Acrylic Window effect with Tauri
Tags: nuxt, tauri, tutorial, rust
Published: 2023-09-02 08:39:14

Today we'll look at how you can make a beautiful Acrylic window effect with [Tauri](https://tauri.app/), [Nuxt](https://nuxt.com/) and [window-vibrancy](https://github.com/tauri-apps/window-vibrancy) (Remember rounded corners won't work).

> *You won't be able to drag/close/minimize your app after this 
(still possible with the taskbar icon) because we have to remove the titlebar. To make it work again, you will have to make your own. I will upload a tutorial on how to do that soon.*

Okay, first open `tauri.conf.json` and add `"decorations": false,"transparent": true` to `"windows"` in `"tauri"` like this:
```json
"tauri": {
    "windows": [
        {
            ...
            "decorations": false,
            "transparent": true
        }
    ],
    ...
}
```

After that, remove `<NuxtWelcome />` from `app.vue` and add style tags:
```vue
<template>
</template>

<style>
</style>
```

In `style` make HTML and body full sized + transparent:
```vue
<style>
* {
  margin: 0;
  padding: 0;
}

html, body {
  background-color: rgba(0, 0, 0, 10%);
  height: 100%;
  overflow: hidden;
}
</style>
```
You should now see a black, transparent and empty window (ignore that thing at the bottom mid on my example).
![Transparent window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1cgz0h2tdqyfy5axq3d3.png)

Now let's get to the interesting part. To add the acrylic effect, open `src-tauri/Cargo.toml` and add `window-vibrancy = "0.4.0"` to `[dependencies]`:
```toml
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.4.0", features = ["api-all"] }
window-vibrancy = "0.4.0"
```
Next, open `src-tauri/src/main.rs` (full code on [GitHub](https://github.com/Waradu/nuxt-tauri-tutorial)) and do as follows:

Add this at the top of the file below the first 2 lines: 
```rust
use tauri::Manager;
use window_vibrancy::{apply_acrylic};
```
Finally, add this below `tauri::Builder::default()`:
```rust
.setup(|app| {
    let window = app.get_window("main").unwrap();

    apply_acrylic(&window, Some((0, 0, 0, 10)));

    Ok(())
})
```
`Some((R, G, B, A))` is RGBA, so change it to what you prefer.

![Acrylic window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fcq1fw8812wgjzo5py1c.png)

Ha, that was easy!

If you have any questions/problems/ideas, feel free to add me on discord: `waradu`.

src-tauri/src/main.rs:
```rust
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

use tauri::Manager;
use window_vibrancy::{apply_acrylic};

fn main() {
  tauri::Builder::default()
    .setup(|app| {
      let window = app.get_window("main").unwrap();

      apply_acrylic(&window, Some((0, 0, 0, 10)));

      Ok(())
    })
    .run(tauri::generate_context!())
    .expect("error while running tauri application");
}
```
JavaScript Functions and Events : A Comprehensive Guide
Tags: javascript, webdev, beginners, learning
Published: 2023-09-02 08:35:11

Functions are the building blocks of JavaScript. They allow you to encapsulate code into reusable blocks, making your code organized and more maintainable. In this comprehensive guide, we'll explore everything you need to know about JavaScript functions, from creating and calling them to understanding parameters and return values.

**Creating JavaScript Functions:**

![javascript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dprwhrq8kzmpdn74e9t.png)

**Parameters and Arguments:**

In JavaScript, functions can accept parameters (inputs). These parameters are like variables that store values passed to the function when it's called.

![javascript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/airy0ayhki20xwhy8oay.png)

Return Values:

Functions can also return values (outputs). These values are what the function computes and gives back to the caller.

![javascript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emzouxd592zx08wn1hek.png)

Anonymous Functions (Function Expressions):

JavaScript allows you to define functions without a name, known as anonymous functions or function expressions.

Arrow Functions (ES6):

ES6 introduced arrow functions, a more concise way to write functions.


![javascript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l7f5dd2q8fce9e4wfh97.png)

**JavaScript Events: Handling User Interactions**

JavaScript is often used to create interactive web pages by responding to events like clicks, keypresses, and form submissions. Here's how you handle events:


![javascript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jcv62xtf3mbpc3x5on6y.png)

This code listens for a button click event and displays an alert when the button is clicked.

**Conclusion:**

Functions and event handling are fundamental aspects of JavaScript programming. By mastering these concepts and practices, you'll be well-equipped to build interactive and dynamic web applications.

`LinkedIn Account` : [LinkedIn](https://www.linkedin.com/in/matthew-odumosu/)
`Twitter Account `: [Twitter](https://twitter.com/iamcymentho)
**Credit**: Graphics sourced from [Youtube](https://www.youtube.com/watch?v=Z_QMgo9rVCI)
Unlock Your Earning Potential with TikTok Marketing — Earn 90% Commissions!
Tags: tiktok, tiktokvirals, marketings, viralmarketing
Published: 2023-09-02 08:20:33

Are you ready to turn your TikTok presence into a revenue-generating powerhouse? With TikTok Marketing, you can do just that and more! Get ready to discover how you can earn an astounding 90% commissions by leveraging the power of TikTok.

_**Why TikTok Marketing Matters**_

In the realm of social media, TikTok has emerged as a force to be reckoned with. Boasting over a billion monthly active users worldwide, TikTok offers an exciting opportunity for influencers, content creators, and affiliate marketers to thrive. But the real magic lies in how you can monetize your TikTok efforts and earn jaw-dropping commissions.

_**What's Inside the TikTok Marketing Toolbox**_

Our comprehensive guide, "TikTok Marketing - Earn 90% Commissions," is your key to unlocking the secrets of successful TikTok monetization. Here's a glimpse of what you'll uncover:

1. **Affiliate Marketing Unleashed:** Dive into the world of affiliate marketing and learn how TikTok can be your ultimate affiliate marketing platform.

2. **Strategies for Success:** Explore proven strategies to promote affiliate products effectively and maximize your earning potential on TikTok.

3. **Content that Converts:** Discover the art of creating content that not only entertains but also drives conversions and sales.

4. **Niche Opportunities:** Explore different affiliate programs and niches that align perfectly with TikTok's vibrant user base.

5. **Maximize Your Commissions:** Gain insights and tips on how to optimize your commissions and skyrocket your earnings.

6. **Building Your Personal Brand:** Learn how to build and leverage your personal brand on TikTok, ensuring long-term financial success.

_**Who Should Dive In**
_
Whether you're a TikTok enthusiast looking to monetize your passion, an experienced affiliate marketer, or someone seeking to capitalize on TikTok's incredible potential, "TikTok Marketing - Earn 90% Commissions" is your ultimate guide. Our guide offers actionable insights and strategies that can be tailored to meet your unique goals.

Don't let the opportunity to transform your TikTok presence into a lucrative income stream slip through your fingers. "TikTok Marketing - Earn 90% Commissions" is your ticket to financial freedom through TikTok.

Are you ready to start earning those impressive 90% commissions? Grab your copy now and embark on your journey to TikTok success!

Buy this Product —> https://bit.ly/Earn90percentCommissionAtTiktok
Unlocking the Viral Secrets of TikTok
Tags: tiktok, viral, marketing
Published: 2023-09-02 07:55:09

**TikTok Marketing: Unlocking the Viral Secrets of TikTok**

In the ever-evolving landscape of social media marketing, TikTok has emerged as a powerhouse platform, captivating the attention of millions and offering unprecedented opportunities for businesses and content creators alike. With its rapidly growing user base and engaging short-form video format, TikTok has become a goldmine for viral content. If you're looking to harness the full potential of TikTok for your marketing efforts, you've come to the right place. Welcome to "TikTok Marketing: Unlocking the Viral Secrets of TikTok."

_**Why TikTok?**_

TikTok, with its addictive scrolling interface, boasts over a billion monthly active users worldwide. It's a platform where creativity knows no bounds, and your brand can connect with a vast and diverse audience. Whether you're a seasoned marketer or just starting, TikTok offers a level playing field to reach users through innovative and engaging content. The key to success? Understanding the platform's secrets to go viral.

_**What's Inside?**_

Our guide, "TikTok Marketing: Unlocking the Viral Secrets of TikTok," takes you on a journey through the world of TikTok marketing, revealing the strategies, tactics, and techniques that can help your content skyrocket to stardom. Here's a sneak peek at what you'll discover:

1. **Cracking the TikTok Algorithm:** Understand how TikTok's algorithm works and learn how to create content that aligns with it.

2. **Creating Killer Content:** Explore the art of crafting compelling videos, from trends and challenges to storytelling and humor.

3. **Hashtag Hacks:** Master the art of hashtagging to increase your content's discoverability and reach.

4. **Engaging with Your Audience:** Learn to foster a loyal TikTok community through effective engagement strategies.

5. **Collaborations and Influencer Marketing:** Discover the power of collaborations and partnerships to amplify your brand's presence on TikTok.

6. **Advertising on TikTok:** Explore TikTok's advertising options to promote your products and services to a targeted audience.

7. **Analyzing TikTok Metrics:** Dive into the data to track your performance and refine your TikTok marketing strategy.

_**Who Should Read This Guide?**_

Whether you're a business owner, a digital marketer, a content creator, or just someone curious about TikTok's potential, "TikTok Marketing: Unlocking the Viral Secrets of TikTok" is your roadmap to success on this dynamic platform. We provide actionable insights and tips that can be tailored to suit your unique marketing goals.

Don't miss out on the opportunity to harness the viral power of TikTok. Get ahead of the curve and start creating TikTok content that captures hearts, minds, and most importantly, views. "TikTok Marketing: Unlocking the Viral Secrets of TikTok" is your guide to making waves in the world of TikTok marketing.

Ready to embark on your TikTok marketing journey? Order your copy today and take the first step towards viral success!

Buy this Product —> https://bit.ly/viralSecretsofTikTok
Write a program by creating an 'Employee' class having the following functions and print the final salary.
Tags: coding, cpp, class
Published: 2023-09-02 07:51:21

the next part of the question:-

1 - 'getInfo()' which takes the salary, number of hours of work per day of employee as parameters
2 - 'AddSal()' which adds $10 to the salary of the employee if it is less than $500.
3 - 'AddWork()' which adds $5 to the salary of the employee if the number of hours of work per day is more than 6 hours.


here the code begins
>-<

#include<iostream>
using namespace std;
class Employee{
       
    public:
    int salary,hours;
    int getinfo(int s,int h){
        salary=s;
        hours=h;
    }
    int addsal(){
        if (salary<500){
            return salary+10;
        }
        else if (salary>500){
            return salary;
        }
      }

int addwork(){
if ( hours>6){
            cout<<"salary1 is : "<< addsal()+5;
        }
        else{
            cout<<"salary is : "<<addsal();
        }
    }
        
};
int main()
{

  Employee obj;
int salary1,hours1;
  cout<<"The salary1 of the employee : ";
  cin>>salary1;
  cout<<"The working hours1 of the employee : ";
  cin>>hours1;
  obj.getinfo(salary1,hours1);
  obj.addsal();
 obj.addwork();
 
   
}
RubyMine Auto Completion Freeze
Tags: issue, rubymine, jetbrains
Published: 2023-09-02 07:44:59

## Problem

[JetBrains RubyMine](https://www.jetbrains.com/ruby/features/) is an IDE for Ruby development.

RubyMine has the [Auto Completion](https://www.jetbrains.com/help/ruby/auto-completing-code.html) feature.

Recently, the RubyMine got stuck when the completion pop up on my macOS. I have to force close it from Activity Monitor.

Restart RubyMine can not fix the issue.

## Solve Progress

### Disable ML completion or EditorConfig support (Fail)

I found the issue ticket: [IDEA sometimes complete hangs indefinitely when opening autocomplete modal](https://youtrack.jetbrains.com/issue/IDEA-280095/IDEA-sometimes-complete-hangs-indefinitely-when-opening-autocomplete-modal)

Disable ML completion

![Disable ML completion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6gql7l2ddo7pnps3fgs.png)


Disable EditorConfig support

![Disable EditorConfig support](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6rck351di94bt8rve0t4.png)

They both do not fix the issue.

### Clear RubyMine Cache (Works)

I found the community post: [WebStorm 2023.2 hangs](https://intellij-support.jetbrains.com/hc/en-us/community/posts/12843522069778-WebStorm-2023-2-hangs)

Follow the comment, I deleted the files under RubyMine Logs folder and restart RubyMine. But it does not work.

Note：
- Remember replace `<macOS Username>` to your macOS Username.
- Remember replace `RubyMine2023.2` to the version you are using.

```
/Users/<macOS Username>/Library/Logs/JetBrains/RubyMine2023.2/
```

I tried another comment: Delete the RubyMine `caches`.

I deleted the files under RubyMine Caches folder and restart RubyMine.

Note：
- Remember replace `<macOS Username>` to your macOS Username.
- Remember replace `RubyMine2023.2` to the version you are using.

```
/Users/<macOS Username>/Library/Caches/JetBrains/RubyMine2023.2/caches/*
```

Then I fix the issue successfully.

## References

- [IDEA sometimes complete hangs indefinitely when opening autocomplete modal](https://youtrack.jetbrains.com/issue/IDEA-280095/IDEA-sometimes-complete-hangs-indefinitely-when-opening-autocomplete-modal)
- [WebStorm 2023.2 hangs](https://intellij-support.jetbrains.com/hc/en-us/community/posts/12843522069778-WebStorm-2023-2-hangs)

## My Blog
[Bear Su's Blog(zh_tw)](https://blog.bear-su.dev/)

![Bear Su's Blog](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/di2jrbcop26soiemlc77.png)
Installing Citus From Source Code
Published: 2023-09-02 07:26:15

## Introduction

In this blog we will be installing citus on postgresql. You can follow the official documentation but if you have complied postgresql through its source code this tutorial can help you install citus on it easily.

## Step 1: Installing PostgreSQL

Before installing citus we need a compatible version of postgresql. For this purpose we will install postgresql 15 from source code.

## Creating directories to install postgresql
```
mkdir citus_installation
cd citus_installation
mkdir pg
cd pg

```

## Installing dependencies for postgreSQL
```
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison

```

## Downloading and unpacking PostgreSQL 15
```
wget https://ftp.postgresql.org/pub/source/v15.3/postgresql-15.3.tar.gz && tar -xvf postgresql-15.3.tar.gz && rm -f postgresql-15.3.tar.gz

```

## Installation
Next, we will proceed with the installation of "pg". The "--prefix" option specifies the directory path where we want to install "psql". In this instance, we will be installing it in the current directory using "pwd".

```
cd postgresql-15.3

# configure by setting flags
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"

# now install
make install

# go back
cd ../../

```
## Step 2: Installing Citus

Now we will install citus on our PostgreSQL. This is a rather easy and smooth process.

## Dependencies:
Before installing citus you need to install all the build dependecies for citus

```
sudo apt-get install -y postgresql-server-dev-15 postgresql-15 \
                        autoconf flex git libcurl4-gnutls-dev 
libicu-dev \
                        libkrb5-dev liblz4-dev libpam0g-dev libreadline-dev \
                        libselinux1-dev libssl-dev libxslt1-dev libzstd-dev \
                        make uuid-dev

```

## Downloading Citus

After that you can clone the citus repo

```
git clone https://github.com/citusdata/citus.git
cd citus
```

## Configuration And Installation

Then run the following commands to configure and install

```
PG_CONFIG=/home/yourusername/citus_installation/pg/postgresql-15.3/bin/pg_config ./configure
make
sudo make install

```

## Setup in PostgreSQL
Then to add Citus to your local PostgreSQL database, add the following to postgresql.conf:

```
shared_preload_libraries = 'citus'
```

## Conclusion:

Now you have successfully installed citus with a source code compiled postgreSQL. Have fun enjoying the power of scaling databases and using realtime analytics with PostgreSQL.