teleren/devto huggingface dataset:
Running Apache AGE using docker
Tags: docker, database, installation, bitnine
Published: 2023-08-24 16:27:03

This blog is the continuation of last blog. In this blog we will run Apache AGE using docker. In our last blog we worked on setup of docker. So, if you are new to docker you can first follow [this blog](https://dev.to/muhammadzeeshan03/setting-up-docker-on-linux-apache-age-a-step-by-step-guide-1953). And then start working on this one.

## Apache AGE
Apache AGE, which is an extension of PostgreSQL. It's a graphical representation of relational database. You can setup and install AGE on docker.

Run the command
```
docker pull apache/age
```
If your docker is setup properly it will pull Apache AGE from the docker hub. In our last blog we also setup docker hub.
If everything is successful it will show an output of this type.

![installed image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/blct04fy2pyru5zsdxx1.jpeg)
You have successfully pulled the apache AGE from the doecker hub. Now its time to configure and run the docker image. 
And for that we need to setup a few things. like port, User, password and database. To setup these all you can run the commands.
```
docker run \
    --name age  \
    -p 5455:5432 \
    -e POSTGRES_USER=postgresUser \
    -e POSTGRES_PASSWORD=postgresPW \
    -e POSTGRES_DB=postgresDB \
    -d \
    apache/age
```
If it successful, it will return the container id. This will setup an and run the apache AGE container. To check the running container you can run the commad. 

```
docker ps
```
This will show all the running containers.
To see the list of all containers irrespective of those are running or not you can add `-a` flag to the above command. 

```
docker ps -a
```
Now to start or stop a specific container you can run the command.

```
docker stop container-name
docker start container-name
```

To check all the images that you have on your machine locally you can run the command.

```
docker images
```

That's all for this time. Happy learning!

## References
[https://hub.docker.com/r/apache/age](https://hub.docker.com/r/apache/age)
Destructuring can worsen code readability
Tags: javascript
Published: 2023-08-24 16:08:50

Destructuring objects is handy and often code is easier to read when it looks simpler.

But destructured variables lack context and this can worsen code readability.

Here is an example:

```jsx
// A.)
const {title} = game;
// A FEW LINES LATER…
const text = title; // Title what?
```

```jsx
// B.) 
const text = game.title; // It's the title of the game!
```

Use destructuring when the context is obvious and your code gets hard to read without.

This post is mostly a reminder to myself not to always deconstruct everything. Because I just had to trace a number of variables to understand where they came from.

Happy coding!
Tescilli Markaların 5 Yıl Süreyle Kullanılmaması Halinde İptali
Published: 2023-08-24 16:08:41

Markaların tescil edildiği emtia ve sınıflarda kural olarak belirli bir süre içerisinde kullanılıyor olması gerekmektedir. Bu hususa mülga 556 sayılı Markaların Korunması Hakkındaki KHK’ da hem bir iptal sebebi hem de hükümsüzlük sebebi olarak yer verilmiş ve daha sonra Anayasa Mahkemesi tarafından her iki madde de mülkiyet hakkının olağan dönemde çıkan  KHK ile sınırlandırılamayacağından bahisle iptal edilmiştir. Ancak, 10.01.2017 tarihinde yürürlüğe giren Sınai Mülkiyet Kanunu’ nda markanın kullanılmaması sadece bir iptal sebebi olarak öngörülmüştür.

6769 sayılı Sınai Mülkiyet Kanunu’ nun (“SMK”) 9. maddesinde de belirtildiği üzere tescil tarihinden itibaren beş yıl içinde haklı bir sebep olmadan tescil edildiği mal veya hizmetler bakımından marka sahibi tarafından Türkiye’de ciddi biçimde kullanılmayan ya da kullanımına 5 (beş) yıl kesintisiz ara verilen markanın iptaline karar verilmektedir. Kanun koyucunun böyle bir hüküm koymasındaki amaç, markayı kullanmadığı sınıf ve emtialarda  haksız yere tescil eden kişilerin önüne geçmektir.

Tescilli Markanın 5 Yıl Süre İle Kullanılmaması Halinde İptal Koşulları Nelerdir?

[Markanın İptal Talebinde](https://www.toylakhukuk.com/2022/03/08/tescilli-markalarin-5-yil-sureyle-kullanilmamasi-halinde-iptali/) Yetkili Makam Kimdir ve Nereye Başvurulur?

SMK’ nın “İptal Halleri ve İptal Talebi” başlıklı 26. maddesinde ifade edildiği üzere yukarıda bahsi geçen iptal hallerinin mevcut olması halinde ilgili markanın iptaline ilişkin talebin ibraz edileceği makam TÜRK PATENT’ tir. İdari iptal yetkisinin düzenlenmesi ve yetkinin Türk Patent ve Marka Kurumu’ na verilmesinin nedeni Avrupa Birliği’nin marka mevzuatına uyumlu olmasının amaçlanmış olmasıdır.

Ancak kanun koyucu 26. maddenin yürürlük tarihini yayımı tarihinden itibaren 7 (yedi) yıl sonra 10.01.2024 olarak düzenlemiştir. Dolayısıyla 10.01.2024 tarihine kadar markanın iptaline karar verme yetkisi [Fikrî ve Sınaî Haklar Hukuk Mahkemeleri](https://www.toylakhukuk.com/2022/03/08/tescilli-markalarin-5-yil-sureyle-kullanilmamasi-halinde-iptali/) tarafından kullanılacak olup (Bu mahkemelerin bulunmadığı yerlerde Asliye Hukuk Mahkemeleri görevlidir.) belirlenen tarihten sonra ise karar verme makamı olarak TÜRKPATENT belirlenmiştir.

[Anadolu Yakası Avukatlık Bürosu,](https://www.toylakhukuk.com)
[Hukuki Danışmanlık Bürosu](https://www.toylakhukuk.com)
[Miras Davası Avukatı](https://www.toylakhukuk.com)
[İş Hukuk Avukatlık Bürosu](https://www.toylakhukuk.com)
[İcra ve İflas Hukuk Avukatı](https://www.toylakhukuk.com)
Interactive ROI calculator
Tags: codepen, webdev, javascript, html
Published: 2023-08-24 16:05:08

If you could travel back in time, what asset would you invest in? Gold, S&P500, Bitcoin?

Check out our simplified ROI calculator to find out your potential profits or losses based on historical data and also what diagramming enthusiasts will appreciate, how [JointJS](https://www.jointjs.com/?utm_source=dev.to&utm_medium=referral) handles the integration of HTML form elements directly into the shapes via foreign objects.

As a bonus, this demo shows JointJS accessibility as it works well on screen readers. Check it out!

{% codepen https://codepen.io/jointjs/pen/oNazJme %}

This demo was built with JointJS, a proven JavaScript diagramming library. If you are interested in enhancing your application with interactive diagrams, explore our gallery of pre-built diagraming applications and cut your development time to days: [https://www.jointjs.com/demos](https://www.jointjs.com/demos?utm_source=dev.to&utm_medium=referral)
Light & Dark Mode for diagrams (flowchart)
Tags: codepen, webdev, javascriptlibraries, javascript
Published: 2023-08-24 16:05:00

How to completely style a diagram in CSS? How to toggle the diagram's light and dark mode? How to design elements and links with bevelled edges?  How to keep the link anchor on the element boundary? How to write your own orthogonal router?  Check out this CodePen that gives you all the answers.

{% codepen https://codepen.io/jointjs/pen/ExpqGBz %}

This demo was built with JointJS, a proven JavaScript diagramming library. If you are interested in enhancing your application with interactive diagrams, explore our gallery of pre-built diagraming applications and cut your development time to days: [https://www.jointjs.com/demos](https://www.jointjs.com/demos?utm_source=dev.to&utm_medium=referral)
Marey Chart
Tags: codepen, javascriptlibraries, javascript, webdev
Published: 2023-08-24 16:04:51

Marey diagrams or Marey charts are usually used to analyze transportation systems such as bus or train schedules. However, there are other uses for this type of diagram, one of which is workflow analysis.

Below you can see an interactive example of a Marey diagram and feel free to [study the source code](https://codepen.io/jointjs/pen/xxPqBmJ) to learn how to build one.

{% codepen https://codepen.io/jointjs/pen/xxPqBmJ %}

Inspired by Mike Bostock D3 example: <a href="https://bl.ocks.org/mbostock/5544008" target="_blank">https://bl.ocks.org/mbostock/5544008</a>

This demo was built with JointJS, a proven JavaScript diagramming library. If you are interested in enhancing your application with interactive diagrams, explore our gallery of pre-built diagraming applications and cut your development time to days: [https://www.jointjs.com/demos](https://www.jointjs.com/demos?utm_source=dev.to&utm_medium=referral)
Sloan's Inbox: Any advice for estimating work?
Tags: discuss
Published: 2023-08-24 16:00:00

Heyo folks! Sloan, DEV Moderator and resident mascot, back with another question submitted by a DEV community member. 🦥

For those unfamiliar with the series, this is another installment of Sloan's Inbox. You all send in your questions, I ask them on your behalf anonymously, and the community chimes in to offer advice. Whether it's career development, office politics, industry trends, or improving technical skills, we cover all sorts of topics here. If you want to send in a question or talking point to be shared anonymously via Sloan, that'd be great; just scroll down to the bottom of the post for details on how.

So, let's get down to business...

### Today's question is:

> **I really struggle to provide accurate time estimates when taking on projects. Does anybody have any advice when it comes to scoping work?**
>

Share your thoughts and lets help a fellow DEV member out! Remember to keep kind and stay classy. 💚

---

*Want to submit a question for discussion or ask for advice? [Visit Sloan's Inbox](https://docs.google.com/forms/d/e/1FAIpQLSc6wgzJ1hh2OR4WsWlJN9WHUJ8jV4dFkRDF2TUP32urHSAsQg/viewform)! You can choose to remain anonymous.*
Why initialising the array, even before giving the input in the search bar?
Tags: react
Published: 2023-08-24 15:59:11

import { useState } from "react";
const products =[
    {type:'fruit', name:"banana", inStock:'yes'},
    {type:'veggie',name:"potato", inStock:"no"},
    {type:'fruit', name:"apple", inStock:'no'},
    {type:'veggie', name:"bottlegourd", inStock:"yes"}];

function Filterall(){
    
    return (
        <>
        <Filteredproducts products={products}/>
        </>
    )}

function Filteredproducts({products}){
    const [search, setSearch]= useState('');

    const handleSubmitChange= (e)=> {
        e.preventDefault();
    }
    return(
    <div className="filterit">
        <SearchBar search={search} setSearch={setSearch} handleSubmitChange={handleSubmitChange}/>
        <ShowProducts search={search} products={products}/>
    </div>
    
    )
}

function SearchBar({search,setSearch,handleSubmitChange}){
    function handleChange(e){
        setSearch(e.target.value);
}
    return(
        <div className="searchit">
            <form onSubmit={handleSubmitChange}>
                <input type="text"
                placeholder="enter the name"
                value={search}
                onChange = {handleChange}
                autoComplete="on"
                />
            </form>
        </div>
    )
}

function ShowProducts({ search, products }) {
    // Filter fruits and veggies separately
    const fruits = products.filter(product => {
      return (
        product.type === "fruit" &&
        product.inStock === 'yes' &&
        product.name.toLowerCase().includes(search.toLowerCase())
      );
    });
  console.log(fruits);
    const veggies = products.filter(product => {
      return (
        product.type === "veggie" &&
        product.inStock === 'yes' &&
        product.name.toLowerCase().includes(search.toLowerCase())
      );
    });
  console.log(veggies);
   /* if(search==='')
    {
        return null;
    }*/
    if (fruits.length > 0) {
      return (
        <div>
          <p>Fruits available in stock:</p>
          {fruits.map((product, index) => (
            <p key={index}>{product.name} is available in the stock</p>
          ))}
        </div>
      );
    } else if (veggies.length > 0) {
      return (
        <div>
          <p>Veggies available in stock:</p>
          {veggies.map((product, index) => (
            <p key={index}>{product.name} is available in the stock</p>
          ))}
        </div>
      );
    } else {
      return (
        <p>No {search} element in the basket</p>
      );
    }
  }
  
export default Filterall;

I have this code to display the fruits and veggies that are in stock. Though the useState is set to empty initially, during the inital render, I can see that two arrays are being set up with the items in stock, one for fruits and the other for veggies. I can't seem to figure out why. Hence during the initial render I'm getting the output as "Fruits available in stock" "banana". It might be a bad code, but I want to know where am i going wrong and if possible what I should learn in order to make it better
Exciting news for movie and manga enthusiasts
Tags: news, showdev, startup, design
Published: 2023-08-24 15:56:06

This is big news for all movie buffs, manga lovers, and everyone who wants to stay updated with the latest releases.

If you're eager to find out about the upcoming movie releases, the next seasons of your favorite animes, the forthcoming mangas, the next concerts, or even the upcoming video games, you're going to love my latest project: [QUODAT.com](https://quodat.com/about).


![Newsfeed of the upcoming tracked releases](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ht4q0sbw4utzsyb1amg0.png)

> _Newsfeed of the upcoming tracked releases and immediate access to various purchasing platforms._

In a nutshell, Quodat is an aggregator of cultural and event releases, regularly updated by its community, and freely accessible to everyone!

This intuitive and user-friendly platform is perfect for:

- Movie enthusiasts and manga readers looking to search and find the latest releases or upcoming events in the entertainment industry.
- Event organizers and publishers wanting to share updates on their latest offerings.
Quodat is still under enhancement, but you can explore the platform and join our community today

👉 [https://quodat.com](https://quodat.com)

![Upcoming releases are on Quodat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/14nyeqmwkb0m5j1g25jq.png)
81 berufliches Vorwärtskommen: Vorteilsentdecker.
Tags: deutsch, career, motivation, discuss
Published: 2023-08-24 15:44:00

Moin Moin,

Entdecker…, „-er“ – also eine Person die etwas berufsmäßig, gewohnheitsmäßig oder im Augenblick tut (1). Ich schlage vor gewohnheitsmäßig ein Vorteilsentdecker zu sein (2). Entdecke immer wieder Vorteile. Deinen Blick für Vorteile zu schulen, kann deinen Blick auf dich selbst und auf das was du bisher erreicht hast verändern. Du könntest neue Seiten an dir entdecken. Es hilft dir jedoch auch bei anderen auf Vorteile zu achten. Manchmal erkennt man durch die Vorteile anderer seine eigenen. Zusätzlich kann man damit anderen helfen. 

Durchs Entdecken unserer Vorteile, schärfen wir den Blick für unsere Möglichkeiten / unser Potential. Wenn dann auch noch diese [Vorteile bevorteilen→](https://dev.to/amustafa16421/80-berufliches-vorwartskommen-den-vorteil-bevorteilen-1coo) bauen wir diese aus.

Wie sähe nun ein Team von IT-Fachkräften aus, bei dem jeder voll auf seinen Vorteil setzt? Wie stünde es um das Arbeitserlebnis? Wie wäre diese Erfahrung? Du kennst dies vielleicht bereits, lass es uns wissen.

1) Meinst es sei sinnvoll das Entdecken von Vorteilen zu seinem eigenen Vorteil zu machen?

Lass uns mittels Kommentaren austauschen.

Beste Grüße,
Mustafa

Oder auch mittels E-Mail: mustafa.kevin.dwenger@posteo.de
Betreff: Austausch

(1) [dwds.de - „-er“↗](https://www.dwds.de/wb/-er)
(2) Gegen beruflich spricht nichts.
Advanced ways for generate captcha's using Python
Tags: python, coding, tutorial
Published: 2023-08-24 15:38:32


## Hi 🙂🖐

In today's post, I will share with you advanced ways to generate captchas using Python. I will use a library called captcha, and we will use advanced functions to generate captchas.

you need to install captcha from here : `pip install captcha`

Generate a captcha using the **create_captcha_image** function. With this function, you can set the text, font color, and background color.



```python
from captcha.image import ImageCaptcha

captcha = ImageCaptcha()
captcha = captcha.create_captcha_image('123', 'red', 'white')
captcha.save('test.jpg')
```

## result



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


## Add some distance to spread pixels using the **effect_spread** function.




```python

from captcha.image import ImageCaptcha


captcha = ImageCaptcha()
captcha = captcha.create_captcha_image('123', 'red', 'white')
captcha = captcha.effect_spread(6)
captcha.save('test.jpg')

```





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



## Add random curve using **create_noise_curve** function

```python

captcha_image = ImageCaptcha()
        
image = captcha_image.generate_image('123')

captcha_image = captcha_image.create_noise_curve(image, 'red')
        
captcha_image.save('test.jpg')

```


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


## Add random dots using **create_noise_dots** function

```python
captcha_image = ImageCaptcha()
        
image = captcha_image.generate_image('123')

captcha_image = captcha_image.create_noise_dots(image, 'red', 10, 30)
        
captcha_image.save('test.jpg')
```


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


## Rotate captcha using **rotate** function 



```python
from captcha.image import ImageCaptcha


captcha = ImageCaptcha()
captcha = captcha.create_captcha_image('123', 'red', 'white')
captcha = captcha.rotate(angle= 50, expand=True)
captcha.save('test.jpg')
```


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




**Now we're done 🤗**

**Don't forget to like and follow 🙂**

**Support me on PayPal 🤗**
https://www.paypal.com/paypalme/amr396
Flutter learning: Am I missing any topic?
Tags: flutter, dart, mobile
Published: 2023-08-24 15:34:19

Hi guys, hope you're doing well.
I started reading about Flutter about 6 weeks ago. Official documentation, tutorials and codelabs.
And several YouTube videos from many devs. 

So, I wrote down a list of topics that I should cover while learning Flutter, also with some logic orden, from easy to difficult.

I'd love if you guys could help me completing the list, modifying whatever you think is not correct.

Flutter roadmap:

dart language  
stateless widget  
stateful widget  
set state  
User inputs & forms  
packages  
debugging  
	breakpoints  
	stacktrace  
API calls  
Error Handling  
DB integration  
	Authentications  
	Data Storage  
	Cloud functions  
Linting  
Responsive design  
State Management  
	BLoC  
Project Structure & Architecture  
	Clean Architecture  
	DI  
	Repository pattern  
Navigation  
	Pages  
	Navigator  
	Router  
	Drawer  
	Tab pages  
Testing  
	Unit testing  
	Mocks  
	Widget testing  
	Integration Testing  
Animations  
Deploy  
Firebase  
Isolates  


Thanks in advance!
Server options for your PHP development environment
Tags: php, webdev
Published: 2023-08-24 15:19:57

In this post I am trying to share with you some of my insights into what are the available server options we have when it comes to setting up our PHP development environment.

1. The most straightforward one is, PHP's built-in web server (php -S localhost:port). While this is a very handy option for quickly running a website, it may not be suitable in some cases as it is prone to hang up when the app is trying to perform a resource intensive tasks. If you don't know that fact, you may left wondering what on earth going wrong there. 

2. Traditional Nginx/php-fpm stack or Apache/php-fpm combination. Also available as WAMP/XAMPP. 

3. Vagrant

And there's 

4. Docker

Vagrant and Docker are both resource intensive so it can become a concern if you have many sites running simultaneously on your low/average hardware (CPU/Ram). 

I've used all of the above options during my career and personally for me, it comes down to choosing between Nginx/php-fpm vs Apache/php-fpm. And I prefer to go with Nginx/php-fpm combination as Nginx scores high in many areas (including performance) over Apache. Another thing I like about Nginx is its lack of per-directory configuration. While there maybe disadvantages to it when compared to Apache, I've never been a fan of Apache's .htaccess rules. That reason alone is good enough for me to appreciate and stick with Nginx and it has been a very comfortable experience so far.
How to Log into an EC2 Instance
Published: 2023-08-24 15:17:16

Amazon Elastic Compute Cloud (EC2) is a web service that provides resizable compute capacity in the cloud. You can use EC2 to launch virtual machines (VMs) with a variety of configurations, including CPU, memory, storage, and networking.

To access an EC2 instance, you need to log into it. There are several ways to do this:

- Using the AWS Management Console: This is the easiest way to log into an EC2 instance. In the AWS Management Console, navigate to the EC2 dashboard and select the instance that you want to log into. Then, click the Connect button and select the Console option.
- Using SSH: You can also use SSH to log into an EC2 instance. SSH is a secure shell protocol that allows you to connect to a remote computer. To use SSH, you will need to know the public key of the EC2 instance that you want to log into. You can find the public key in the EC2 instance's metadata.
- Using the AWS CLI: You can also use the AWS CLI to log into an EC2 instance. The AWS CLI is a command-line tool that allows you to interact with AWS services. To use the AWS CLI, you will need to install the AWS CLI and configure it with your AWS credentials.
Once you have logged into an EC2 instance, you will be able to access the instance's filesystem and run commands on the instance.

Here are some additional tips for logging into EC2 instances:

1. Use strong passwords: When creating passwords for your EC2 instances, use strong passwords that are difficult to guess.
2. Use SSH keys: SSH keys are a more secure way to log into EC2 instances than passwords.
3. Use a bastion host: A bastion host is a secure server that you can use to access other servers on your network. You can use a bastion host to log into EC2 instances without exposing your local machine to the internet.
NumPy Tutorial #7: Array Reshape
Tags: datascience, python, beginners, tutorial
Published: 2023-08-24 15:11:41

{% embed https://youtu.be/SUJgrOAXD6w %}

If you have read the previous blog in the series, you might already familiar to array shape. Now how can we reshape the existing array, perhaps if we want to flatten a multidimensional array.

---

## Reshape

NumPy has provided a method called `reshape` to reshape an array. This method requires shape of the target array. To understand more, let us see it through an example.

Let us create an array
```python
import numpy as np

arr = np.array([[1, 2, 3], [4, 5, 6]])
```

I want the `arr` to be flat, meaning that it will only have one dimension and that dimension has 6 items in it. I can do that by
```python
flatten_arr = arr.reshape(6, )
```

Let us print the `flatten_arr` to see the output
```python
print(flatten_arr)
```

You will see the following output
```
[1 2 3 4 5 6]
```

You can see the output shows the original array have been flatted.

---

There you go, that is how you can reshape an array. Thank you for reading and see you next time!