teleren/devto huggingface dataset:
3D Tree design using html, css
Tags: freecodez, react, html, blog
Published: 2023-11-07 15:27:06

Hey there, You are most welcome to this article. I hope you will enjoy this article. If you like this article then please share this article with your friends and colleagues. If you have any questions or suggestions regarding this article then please comment down below.

**3D Tree design using html, css**

![3D Tree design using html, css](https://res.cloudinary.com/freecodez/image/upload/v1699370813/images/dscjh5o0titz4crrdeku.webp)

For full source code visit : [https://freecodez.com/post/dslcirf](https://freecodez.com/post/dslcirf)


```
<!-- https://freecodez.com -->
<div class="container">
    <div class="tree">
        <div class="branch" style="--x:0">
            <span style="--i:0;"></span>
            <span style="--i:1;"></span>
            <span style="--i:2;"></span>
            <span style="--i:3;"></span>
        </div>
        <div class="branch" style="--x:1">
            <span style="--i:0;"></span>
            <span style="--i:1;"></span>
            <span style="--i:2;"></span>
            <span style="--i:3;"></span>
        </div>
        <div class="branch" style="--x:2">
            <span style="--i:0;"></span>
            <span style="--i:1;"></span>
            <span style="--i:2;"></span>
            <span style="--i:3;"></span>
        </div>
        <div class="branch" style="--x:3">
            <span style="--i:0;"></span>
            <span style="--i:1;"></span>
            <span style="--i:2;"></span>
            <span style="--i:3;"></span>
        </div>
        <div class="stem">
            <span style="--i:0;"></span>
            <span style="--i:1;"></span>
            <span style="--i:2;"></span>
            <span style="--i:3;"></span>
        </div>
        <span class="shadow"></span>
    </div>
</div>
```

Source Code : [https://freecodez.com/post/dslcirf](https://freecodez.com/post/dslcirf)

For more such articles visit : [https://freecodez.com](https://freecodez.com/all)
DRF detailed information of user in related serializer
Published: 2023-11-07 14:48:55

My question was: How can I improve this detailed view of a contributor?


```python
# serializers.py

class ContributorDetailSerializer(serializers.ModelSerializer):

    class Meta:
        model = Contributor
        fields = ["id", "user"]
```

result in Postman:

![postman result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nzo2xzdva20d2e3u5ob9.png)


<hr>

My contributor model has just one attribute: `user` a ForeignKey relation to the user model. 

```python
# models.py

class User(AbstractUser):
    pass

    def __str__(self):
        return self.username


class Contributor(models.Model):

    user = models.ForeignKey(
        "api.User",
        on_delete=models.CASCADE,
        related_name="users",
        verbose_name=_("user"),
    )

    def __str__(self):
        return self.user.username
```

<hr>

There are several possibilities, I want to show two different approaches:

**first example:**
using the `__str__` method of the user model

```python
# serializers.py

class ContributorDetailSerializer(serializers.ModelSerializer):
    user = serializers.StringRelatedField()

    class Meta:
        model = Contributor
        fields = ["id", "user"]
```

result in Postman:

![username displayed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r8bd7k6eapfhu1y5i8kl.png)

`user = serializers.StringRelatedField()` is displaying the `__str__` method of the user model. As you can see above in the `__str__` method in user model, it returns the `username` of the user.


**second example**
display all information of an other Serializer

```python 
# serializers.py

class ContributorDetailSerializer(serializers.ModelSerializer):
    user = UserSerializer(read_only=True)

    class Meta:
        model = Contributor
        fields = ["id", "user"]
```

result in Postman:
![all info of user model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4iwjzrb70hg35k69t4p5.png)

`user = UserSerializer(read_only=True)` takes all the attributes of UserSerializer and adds them to the ContributorSerializer attribute user and display all information.
How to query JMX from Jolokia REST Interface
Tags: jmx, java, jolokia
Published: 2023-11-07 14:44:24

A lot of people use Jolokia to export their JMX MBean data to a time series database. 
This is specially useful for applications like Hazelcast cache, where the community version of the application doesnt provide an out-of-the-box monitoring interface like management center (limited to enterprise license)

When you use Jolokia to expose your JMX mbeans, it provides a REST interface which you can 

- directly query,or 

- use telegraf to send the metrics to a Timeseries Database like Influx or

- use Prometheus to scrape.

---------

Here is a quick guide on how to query some metric from the REST interface when you have limited information.

**1. How to find a MBean?**
For example, here we will use search API and regular expression to search for an MBean:

```
curl
http://localhost:8087/jolokia/search/java.lang:type=MemoryPool,name=G1*

{"request":{"mbean":"java.lang:name=G1*,type=MemoryPool","type":"search"},"value":["java.lang:name=G1 Eden Space,type=MemoryPool","java.lang:name=G1 Old Gen,type=MemoryPool","java.lang:name=G1 Survivor Space,type=MemoryPool"],"timestamp":1699355487,"status":200}
```

Here you can see that starting with G1 there are multiple MBeans. Lets see if we want to check some attribute inside "G1 Eden Space". But what are the attribute names?

**2. How to get the attribute names for a MBean?**
Using the list API

```
curl http://localhost:8087/jolokia/list/java.lang/name=G1%20Eden%20Space,type=MemoryPool

{"request":{"path":"java.lang\/name=G1 Eden Space,type=MemoryPool","type":"list"},"value":{"op":{"resetPeakUsage":{"args":[],"ret":"void","desc":"resetPeakUsage"}},"attr":{"Usage":{"rw":false,"type":"javax.management.openmbean.CompositeData","desc":"Usage"},"UsageThresholdCount":{"rw":false,"type":"long","desc":"UsageThresholdCount"},"MemoryManagerNames":{"rw":false,"type":"[Ljava.lang.String;","desc":"MemoryManagerNames"},"UsageThresholdSupported":
..... shortening the output
```

So in this output we can see all the attributes that are available for the "G1 Eden Space", how to find "PeakUsage" attribute value?

**3. How to find the value of "PeakUsage" attribute?**
Using the read API:

```
curl
http://localhost:8087/jolokia/read/java.lang:type=MemoryPool,name=G1%20Eden%20Space/PeakUsage

{"request":{"mbean":"java.lang:name=G1 Eden Space,type=MemoryPool","attribute":"PeakUsage","type":"read"},"value":{"init":226492416,"committed":2696937472,"max":-1,"used":2566914048},"timestamp":1699367905,"status":200}
```

---------
**Note:**

_- In this article, we are using port 8087 as configured inside Telegraf.conf for jolokia plugin._

_- You can connect to the JVM's JMX port using jconsole to be able to look at metrics. But by querying the data, you can write automation to alert you on certain conditions. Or monitor the data using InfluxDB/Grafana._
Installing Python-3.12.0 in Debian 12.2.0 (Bookworm)
Tags: python, debian, linux
Published: 2023-11-07 14:37:39

Debian-12.2.0 comes with Python 3.11.2 but pip is not included.

Its necessary to install Python3 separately to use all features of python!

You can use the command in terminal to install Python3:

sudo apt-get install python3-full

But this will not install the latest version and will not provide full control over the installation process.

Using apt-get to install Python 3 will cause problems to install packages using pip.

Before installing Python 3 you need to download additional packages from https://www.debian.org/distrib/packages as given below:

libpkgconf3_1.8.1-1_amd64.deb
pkgconf-bin_1.8.1-1_amd64.deb
pkgconf_1.8.1-1_amd64.deb
pkg-config_1.8.1-1_amd64.deb

libffi-dev_3.4.4-1_amd64.deb

zlib1g_1.2.13.dfsg-1_amd64.deb
zlib1g-dev_1.2.13.dfsg-1_amd64.deb

libbabeltrace1_1.5.11-1+b2_amd64.deb
libdebuginfod-common_0.188-2.1_all.deb
libdebuginfod1_0.188-2.1_amd64.deb
libipt2_2.0.5-1_amd64.deb
libsource-highlight-common_3.1.9-4.2_all.deb
libboost-regex1.74.0_1.74.0+ds1-21_amd64.deb
libsource-highlight4v5_3.1.9-4.2+b3_amd64.deb
gdb_13.1-3_amd64.deb

Also note that pip doesn't work without openssl. So you also need to download it from https://www.openssl.org/source/

So lets get started!

Enter the following commands in terminal sequentially to install the dependencies:

1. ~$ sudo dpkg -i libpkgconf3_1.8.1-1_amd64.deb pkgconf-bin_1.8.1-1_amd64.deb pkgconf_1.8.1-1_amd64.deb pkg-config_1.8.1-1_amd64.deb

2. ~$ sudo dpkg -i libffi-dev_3.4.4-1_amd64.deb

3. ~$ sudo dpkg -i zlib1g_1.2.13.dfsg-1_amd64.deb zlib1g-dev_1.2.13.dfsg-1_amd64.deb

4. ~$ sudo dpkg -i libbabeltrace1_1.5.11-1+b2_amd64.deb libdebuginfod-common_0.188-2.1_all.deb libdebuginfod1_0.188-2.1_amd64.deb libipt2_2.0.5-1_amd64.deb libsource-highlight-common_3.1.9-4.2_all.deb libboost-regex1.74.0_1.74.0+ds1-21_amd64.deb libsource-highlight4v5_3.1.9-4.2+b3_amd64.deb gdb_13.1-3_amd64.deb

Install OpenSSL as follows sequentially:

1. Extract the .tar.gz of source downloaded and enter the directory containing the source code like: ~$ cd openssl-3.1.4
2. ~$ ./Configure
3. ~$ make
4. ~$ make test
5. ~$ sudo make install

Finally! Install Python 3 as follows:

1. Extract the .tar.gz of source downloaded and enter the directory containing the source code like: ~$ cd python 3.12.0
2. ~$ ./configure --enable-optimizations
3. ~$ make
4. ~$ sudo make test
   (gives an error if 'sudo' not used with 'make test')
5. ~$ sudo sudo make install

To update pip(optional):

~$ pip3 install --upgrade pip
             OR
~$ python3 -m pip install --upgrade pip

Imortant: Don't forget to add the line 

export PATH="/home/USER/.local/bin:$PATH"

to your .bashrc file (located in /home/USER/ directory) to add the /home/USER/.local/bin directory to your $PATH environment variable because the packages are installed by pip into this directory.

Thanks!
SQL String Mask
Tags: uyumsoft, postgres
Published: 2023-11-07 14:36:40

```
SELECT
REG.register_full_name,
rpad(left(reg.register_name,1),length(reg.register_name)-1,'*') as "Adı",
rpad(left(reg.register_surname,1),length(reg.register_surname)-1,'*') as "Soyadı"
FROM HRMD_REGISTER REG;

SELECT
REG.register_full_name,
left(reg.register_name,1)||repeat('*',length(reg.register_name)-1) as "Adı",
left(reg.register_surname,1)||repeat('*',length(reg.register_surname)-1) as "Soyadı"
FROM HRMD_REGISTER REG;

SELECT
REG.register_full_name,
regexp_replace(reg.register_name,'\Y\w','*','g') as "Adı",
regexp_replace(reg.register_surname,'\w\Y','*','g') as "Soyadı"
FROM HRMD_REGISTER REG;
```
User Defined Functions by Schema in PostgreSQL Database
Tags: uyumsoft, postgres
Published: 2023-11-07 14:32:57

```
select 
n.nspname as function_schema,
p.proname as function_name,
l.lanname as function_language,
case when l.lanname = 'internal' 
     then p.prosrc
     else pg_get_functiondef(p.oid)
end as definition,
pg_get_function_arguments(p.oid) as function_arguments,
t.typname as return_type

from      pg_proc      p
left join pg_namespace n on p.pronamespace = n.oid
left join pg_language  l on p.prolang      = l.oid
left join pg_type      t on t.oid          = p.prorettype 

where n.nspname not in ('pg_catalog','information_schema')

order by function_schema, function_name;

```
Hacktoberfest 2023 complete
Tags: hack23contributor, hacktoberfest, hacktoberfest23, opensource
Published: 2023-11-07 14:27:56

Hello world! I am Priyansh Agrawal. I work as a Senior Software Engineer with Bloomberg (London). 

I am happy to share that I’ve completed my first Hacktoberfest this year and it’s been rather fun doing so. I hope to continue doing this every year going forward.

Please feel free to connect with me on:
- [Linkedin](https://linkedin.com/in/priyansh-agrawal)
- [GitHub](https://github.com/Priyansh121096)

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

{% embed https://github.com/Priyansh121096 %}
📢 First-class cryptocurrency exchange service - easy, fast, and without verification! 💫
Tags: cryptocurrency, swap, swapzone
Published: 2023-11-07 14:16:32

Are you wondering how to exchange [Monero](https://phreesite.com/what-is-monero/) for Ethereum without unnecessary bureaucracy and delays? We understand that decentralization and protecting your personal information are especially important for XMR users. That's why we are pleased to offer you a solution that aligns with your values.
With great excitement, we introduce **Swapzone** - one of the most reliable and convenient platforms for cryptocurrency exchange. Our service brings together over 15 trusted exchangers, so you can find the optimal exchange rate and receive quality service. We make the exchange process easy and secure - all you need are a few simple steps to exchange your coins at a time convenient for you.
Of course, there is an alternative - exchanges. However, they require strict verification, which doesn't always align with the ideals of decentralization. We understand that your anonymity and assurance of keeping your privacy intact are of utmost importance. That's why our service will be the perfect choice for those who value freedom and independence.
And finally, let's talk about the financial opportunities of cryptocurrencies. They are becoming increasingly popular as a means for speculative income and making payments. Cryptocurrencies provide you with freedom from strict control and regulation, allowing you to freely manage and dispose of your funds without surveillance.
Join Swapzone today and discover the world of easy and secure cryptocurrency exchange! Don't miss the opportunity to be part of the new financial era where you have full control over your funds.
🔥 **Swapzone** - your path to freedom and prosperity!
Make Bootable Using dd on Linux
Tags: linux, archlinux, engineer
Published: 2023-11-07 14:05:31

Postingan kali ini akan membahas membuat bootable.
Sebenarnya banyak opsi untuk membuat bootable di sistem operasi linux seperti balena etcher, unebootin dll.
Tapi disini kita akan buat dengan menggunakan `dd`.

Untuk kekurangan dan kelebihnaya mungkin bisa di search di sumber lain, saya hanya akan membahas cara pemakaiannya saja.

Pertama pastikan flashdrive yang akan di pakai sudah di format. Saya merekomendasikan menggunakan `GParted` untuk memformatnya dengan GUI atau bisa langsung dengan `mkfs`. Pastikan juga flashdrive dalam keadaan `umount` plus lokasi dari flashdrive sesuai, sebagai contoh `/dev/sda`.

Perintah dasarnya sebagai berikut

```
sudo dd if=/file/source/ of=/direktori/output bs=1M
```

Contoh penerapanya
```
sudo dd if=ubuntu-20.04.3-live-server-amd64.iso of=/dev/sdb1 bs=1M
```
Tunggu hingga proses selesai.
Semoga bermanfaat.
Do I need Unit testing if I use Cypress?
Tags: discuss, help
Published: 2023-11-07 14:00:34

---
title: Do I need Unit testing if I use Cypress?
published: true
description: Help Wanted about testing
tags: discussion
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-10-15 07:10 +0000
---


I was wondering, do we need Unit testing (Let's say with Jest) if we use Cypress for E2E and Component testing? When I have started writing test codes for a signin page, I see that the validation codes are same in unit test and cypress code. So, if cypress handles the unit test part, then should I add unit testing too? I am not actually finding the difference/importance of separate unit testing here. 

Can you explain this?
Unleashing Potential: Dog's Brain Training Enhanced by AI Technology
Tags: ai, tools, developer, dog
Published: 2023-11-07 13:55:53

In recent years, the integration of AI technology has revolutionized the world of dog training, offering tailored solutions to enhance cognitive development and modify behavioral patterns. Leveraging the power of machine learning algorithms, AI-driven training programs have the capacity to adapt to individual dog traits, catering to diverse breeds, temperaments, and learning capacities. This personalized approach ensures an optimized learning experience, fostering mental agility and promoting a deeper understanding between dogs and their human companions.

AI-powered brain training for dogs extends beyond mere cognitive stimulation, encompassing a holistic approach that addresses behavioral issues through personalized modules. By analyzing behavioral patterns and responses, AI systems can design specific training regimens that target common problems such as excessive barking, separation anxiety, and leash aggression. Through the integration of positive reinforcement techniques and data-driven strategies, AI-driven training not only modifies behavior effectively but also cultivates a harmonious coexistence between dogs and their owners, nurturing a stronger bond built on trust and mutual understanding.

The role of data analysis and the feedback loop within AI-based dog training is instrumental in refining the learning process. By continuously collecting and analyzing data on a dog's responses and progress, AI systems can adapt training methods, ensuring an evolving and dynamic learning experience. This iterative feedback mechanism not only enhances the effectiveness of the training but also facilitates a deeper comprehension of canine behavior, enabling trainers to tailor their approach for long-term results and sustained development.

Looking ahead, the future of AI-powered dog training holds immense promise. With ongoing advancements in machine learning and data analysis, the potential for more sophisticated and intuitive training techniques is on the horizon. However, it is crucial to underscore the ethical considerations surrounding the integration of AI in pet care. Upholding the well-being and happiness of our canine companions should remain at the forefront, guiding the development and implementation of AI-driven training methods to ensure responsible and compassionate pet care practices.

([Click here for best Dog's brain training tool](https://tinyurl.com/25benzdn))
Le mot-clé this en JavaScript
Tags: javascript, webdev, beginners, french
Published: 2023-11-07 13:55:53

Le mot-clé this en JavaScript est un concept important, mais il peut être un peu déroutant pour les débutants. 

La [définition de MDN](https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Operators/this) nous dit que : "L'objet JavaScript [this représente] le contexte dans lequel le code courant est exécuté."

Autrement dit, `this` est comme une sorte de caméléon qui change selon le contexte dans lequel il se trouve. 🦎

Voici quelques exemples concrets pour mieux comprendre ce concept. 

## Dans le contexte d'une méthode d'objet

```javascript
let personne = {
    nom: "Alice",
    direBonjour: function() {
        console.log("Bonjour, je m'appelle " + this.nom);
    }
};

personne.direBonjour(); // Affiche "Bonjour, je m'appelle Alice"
```

Dans ce cas, this fait référence à l'objet personne, donc this.nom renvoie la valeur de nom dans cet objet.


## Dans le contexte d'un constructeur de classe

Les constructeurs de classe sont comme les usines à objets de JavaScript. 🏭  Le mot-clé `this` fait référence à l'instance d'objet créée lors de l'utilisation du constructeur. 

```javascript
class Personne {
    constructor(nom) {
        this.nom = nom;
    }
}

let alice = new Personne("Alice");
console.log(alice.nom); // Affiche "Alice"
```

## Dans le contexte d'un événement

Lorsqu'un événement se produit, "this" est comme un détective qui pointe du doigt la chose qui a déclenché l'événement, généralement un élément DOM. 🕵️‍♀️ Par exemple, dans un gestionnaire d'événements de clic :

```javascript
let bouton = document.querySelector("#monBouton");

bouton.addEventListener("click", function() {
    console.log("Bouton cliqué : " + this.id);
});
```

En résumé, `this` en JavaScript dépend du contexte d'exécution, et il est utilisé pour faire référence à l'objet sur lequel une fonction est appelée. Comprendre comment "this" fonctionne dans différents contextes est essentiel pour devenir un maître du JavaScript ! 🚀🤓

Merci d'avoir lu cet article jusqu'au bout! Je t'invite à me laisser ton avis en commentaire, ou à me suivre sur [Twitter](https://twitter.com/claire_dochez) pour plus d'astuces JavaScript! 🚀👩‍💻👍
Configuring Apollo client with Quasar
Published: 2023-11-07 13:52:17

Hi, I'm having some issues using the app-extension-apollo for Quasar. I have some queries and mutations in a 'composable.ts' file. This file is imported into a Vue file. If I use it in the root of the 'setup()' composition API, it works fine. However, if I want to execute the same query or mutation inside a function within the same 'setup()', it returns this error message: "Apollo client with id 'default' not found. Use 'app.runWithContext()' or 'provideApolloClient()' if you are outside of a component setup." To solve this, I had to provide an Apollo Client in the same Vue file. It works, but this cannot be the final solution because I'm going to have to create this Apollo Client inside every Vue file. Any suggestions?
Location Analytics: Unlocking Insights in Geographic Data
Published: 2023-11-07 13:46:38

Through real-world examples and case studies, readers will discover how location analytics is being used to address a wide range of challenges. From optimizing supply chain logistics and improving urban planning to enhancing marketing strategies and responding to environmental concerns, this book demonstrates how geographic data analysis is reshaping industries and shaping a more sustainable and efficient future.
Visit - [https://www.workstatus.io/reporting-analytics/location-analytics](https://www.workstatus.io/reporting-analytics/location-analytics)
Write data into DynamoDB from json file
Tags: aws, dynamodb, go, awssdk
Published: 2023-11-07 13:44:59

---
title: Write data into DynamoDB from json file
published: true
description: 
tags: aws, dynamoDB, golang, awssdk

# Use a ratio of 100:42 for best results.
# published_at: 2023-11-07 13:38 +0000
---

https://medium.com/p/274ce0499878
The Very Best Workflow For SDXL DreamBooth / Full Fine Tuning With Text Encoder Training
Tags: sdxl, dreambooth, stablediffusion, training
Published: 2023-11-07 13:27:20

The very best Stable Diffusion XL (SDXL) DreamBooth training with Text Encoder configuration (.json) added to our Patreon post.

Hopefully I will make a full public tutorial as well very soon.

Download link > https://www.patreon.com/posts/89213064

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujdxadbn1u4k3xcwzucx.png)
Placeholder Contributor
Published: 2023-11-07 13:24:13

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
<!-- Share a bit about yourself as a contributor. Is this your first Hacktoberfest, or have you contributed to others? Feel free to embed your GitHub account by using {% embed LINK %} -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your learning or career goals changed since working on these new projects? -->
Best and Delicious Italian Food in Stuart
Published: 2023-11-07 13:10:11


Savor the epitome of culinary excellence at best and delicious **[italian food in stuart](https://nostalgiakouzina.com/)**. Immerse yourself in a delightful journey where authentic Italian flavors meet with exceptional taste. From classic pasta dishes to delectable pizzas, each bite is a celebration of Italy's rich culinary heritage, delivering an unforgettable dining experience.