teleren/devto huggingface dataset:
Graph Algorithm - Cycle Detection in Undirected Graph using BFS
Tags: programming, career, opensource, beginners
Published: 2022-03-20 12:39:27

## What is a cycle
In graph theory, a path that starts from a given node and ends on the same node is a cycle.

## Cycle Detection in an Undirected Graph

A graph is said to be undirected if it is bidirectional. It is a set of vertices and edges connected where edges are bidirectional.
The cycle in a graph can be detected using graph traversal algorithms. Let us discuss the cycle detection using Breadth-First Search Algorithm.

## BFS Algorithm for Cycle Detection in an Undirected Graph

📌 Initialise a visited boolean array with all nodes unvisited.
Below is a disconnected graph of nodes from 0 to 9 with a queue, visited array initialised.


![BFS Setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah0qr1376wgqhg4em5op.png)

📌 Run a loop from 0 to 9 and start our BFS when the node is not visited.

📌 Initialise an empty queue. This queue will be holding a pair, nodes and the previous node.

📌 Mark the node as visited and add the node and previous node into the queue. At the very start, there won't be any previous node, so add {node, -1} to the queue.

📌 Until our queue is empty, repeat the following steps :
📎 Remove the node from the top of the queue.
📎 Traverse through the children of the currently removed node.
📎 If the child is not visited, mark the child as visited. Add child and the previous node, the currently removed node, to the queue.
📎 If the child is visited and the previous node = child node, continue with our BFS algorithm as it is not a cycle.
📎 If the child is visited and the previous node != child node, this means we reached our child through some other path which will result in a cycle. We stop our BFS now and return that we have detected a cycle in the graph.

📌 If we continue with our algorithm till our queue becomes empty and all the nodes become visited, this means we haven't found any cycle in the graph and return that we haven't detected any cycle in the graph.


![BFS Code walkthrough](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ty6s4ew1z6d6d01mhkda.gif)

## Time and Space Complexity

We are traversing through all the nodes and edges. So time complexity will be O(V + E) where V = vertices or node, E = edges.
We use a visited array, queue, and an adjacency list for the graph. So the space complexity will be O(V) + O(V) + O(V + E). (Ignoring the space for the final result list).

## Code

![Java Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rdwy3a7vi9gtr8f6quba.png)

Originally Published on : [LinkedIn Newsletter](https://www.linkedin.com/newsletters/graph-algorithm-6905161199672025088/)

## Practice Problem

[Cycle Detection in undirected graph](https://practice.geeksforgeeks.org/problems/detect-cycle-in-an-undirected-graph/1)

## Github Link

{% github https://github.com/Rohithv07/LeetCodeTopInterviewQuestions %}
ORACLE DATABASE IN DOCKER
Tags: docker, oracle
Published: 2022-03-20 12:31:17

---
title: ORACLE DATABASE IN DOCKER
published: true
description: 
tags: docker,oracle
//cover_image: https://direct_url_to_image.jpg
---

In this article I'll show you how to install oracle database in a container docker

# Create a Docker container with Oracle Database

To create a Docker Container with Oracle Database we need to log in at docker account. To do this, type this command bellow in your terminal: 

```shell
docker login
```

And put your registered login like this print bellow:

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

Now let's go to pull the docker image. To do this, just type this command bellow: 

```shell
docker pull store/oracle/database-enterprise:12.2.0.1
```

### Create a container 

Our next step will be to create a container, to do this, we just need this command bellow: 

```shell
docker run -d -p 1521:1521 --name oracle store/oracle/database-enterprise:12.2.0.1
```

This command will create a oracle database container with the name oracle using the version 12.2.0.1, working in port 1521:1521.

After the installation is completed, we can connect to the Oracle SQL Plus tool to create users and grant the necessary permissions  as follows.

```shell
docker exec -it oracle bash -c "source /home/oracle/.bashrc; sqlplus /nolog"
```

Now let's to connect as sysdba in Docker

```shell
connect sys as sysdba;
```

And create your Oracle User:

```shell
create user your_username identified by your_password;
``` 

After this grant permission to your new user:

```shell
GRANT ALL PRIVILEGES TO YOUR_USER_NAME;
```

NOTE: You can grant permissions for certain privileges ​​such as SELECT, INSERT, UPDATE, CREATE TABLE instead of ALL PRIVILEGES, I granted all priviles just to show how you can do this in this article.

Now to connect to SQL Developer in Docker you can use this connetion bellow:

```shell
Username: username
Password: password
Hostname: localhost
Port: 1521
Service name: ORCLCDB.localdomain
```
Operators in JavaScript
Tags: javascript, webdev, beginners, programming
Published: 2022-03-20 12:18:21

## Operators in JavaScript


- Basic Operators
- Comparison Operators
- Logical Operators
- Bitwise Operators

---

### Basic Operators

1. `+` Addition
2. `-` Subtraction
3. `*` Multiplication
4. `/` Division
5. `%` Modulus
6. `++` Increment
7. `--` Decrement
8. `()` Group

---

### Comparision Operators

1. `==` Equal Value
2. `===` Equal Value And Same Type
3. `!=` Not Equal Value
4. `!==` Not Equal Value And Different Type
5. `>` Greater Than
6. `<` Less Than
7. `>=` Greater than and Equal to
8. `<=` Lesser than and Equal to.

---

### Logical Operators

1. `&&` Logical And
2. `||` Logical OR
3. `!` Logical Not

---

### BitWise Operators

1. `&` AND statement
2. `|` OR statement
3. `~` NOT
4. `^` XOR
5. `<<` Zero fill left shift
6. `>>` Signed right shift
7. `>>>` Zero Fill right shift

> Hope you learned something useful today! Peace Out ✌️
Email Marketing Tips
Published: 2022-03-20 11:51:57

To make the planning part easy, we’ve highlighted some best practices you’ll want to consider when making a strategy for your [email marketing](https://neilpatel.com/blog/beginners-guide-email-marketing/).

• **Define your audience**

Whatever you sell, you must have a clear idea of who your audience is order to effectively talk to them. Mailchimp permits you to dig a little greater to segment users within your audience and that means you can send them personal and targeted emails that aid in increasing engagement, build trustful relationships and crank out greater ROI.

• **Signup sources**

The most valuable data your signup form offers is how and where subscribers signal up for your list. If you happen to be an e-commerce business with your store to Mailchimp, knowing where customers linked your list can give you idea of how to communicate with them and where you should focus your marketing efforts planning forward.

•**Segments and groups**

As soon as you’ve determined smaller collections of men and women inside your larger audience, you will be able to create groups and segments to deliver more relevant and individualized emails to your recipients—and the greater relevant the marketing campaign, the better the results. Occasionally you will want to deliver to your whole list, but by segmenting users and taking good thing about Mailchimp’s segmentation tools can significantly raise the click-through rates and e-commerce requests your campaigns create.

• **Decide what to write**

Seeing that you know who you’re writing to, it’s time to think with ok bye to your content. What do you want to say to your audience? What is the content marketing strategy? You’ll want to send messages with purpose, that truly speak to your subscribers, so always keep in head what they agreed to.
API Template using Clean Node Architecture
Published: 2022-03-20 11:51:35

## Getting Started

<div> I am introduced a simple API template for backend developers using clean architecture based on express application. This article is meant to help you with improved code. </div>

#### Main features

<div> The template supports admin dashboard, access menu permission based on role, switch custom theme, secure data with authN and authZ, integrate with chart.js lib, generate easily CRUD API, upload media files, cache with redis memory, switch multi databases and design for TDD. </div>

#### The followings must be pre-installed on your machine: 

<div> Node.js, MongoDB, MySQL, Redis </div>

#### Clone itemplate repository

```bash
git clone https://github.com/waiphyo285/itemplate-backend.git
```

#### Navigate root directory and install dependencies

```bash
npm install
```

#### Migrate MySQL database and tables

```bash
npx knex migrate:latest
npx knex seed:run
```

#### Run app and then go to browser

```bash
npm run dev
localhost:6060
```

#### TDD `./**/*.spec.js` in controllers

```
npm run test
```

#### CLI commands in src/cli

```bash
node index
node index --index
node index --show=623210497fc2cb28840d1448
```

## Clean Architecture

<div> First of all, let me admit [this article](https://mannhowie.com/clean-architecture-node) is inspired to develop this project. Uncle Bob's famous [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) is a way to write resilient software. </div> <br>

<div> Resilient software is divided into layers, underpinned by business logic and is independent of technologies. It should be: </div> <br>

1. **Testable:** Can be tested without external dependencies.
2. **Independent of UI:** You can easily switch CLI for Web or RasberryPi.
3. **Independent of Database:** Switch out SQL [MySQL or PostgreSQL] for MongoDB.
4. **Independent of Frameworks:** Libraries and frameworks should be treated as tools and not dependencies.
5. **Independent of any external agency:** Business rules don't know anything about outside world.

<div> In practice, choice of technology should be the last decision you make or code you write (e.g. database, platform, framework). By following clean architecture, you can write software today that can be easily switched out for different technologies in the future. <div> <br>

<div> [Click here for github repo.](https://github.com/waiphyo285/itemplate-backend) </div> <br>

<div> _Note: this application is different to the Clean Architecture diagram above but attempts to achieve the same outcome. </div>
2021 year in review
Tags: watercooler, yearinreview, career
Published: 2022-03-20 11:36:53


> Yes I know, I am late at publishing this. Somehow I missed it in my drafts. 

Looking back at your achievements at the end of every year is a great way to boost your confidence and tackle the imposter syndrome :) So, here we go!

- **1st prize at Remote Hackathon** - Participated in the company’s internal remote hackathon with 6 other team members. Checkout more details [here](https://www.linkedin.com/posts/tothenew_geekcombat-hackathon-activity-6775326843689025536-WWY1?utm_source=linkedin_share&utm_medium=member_desktop_web)
- Started writing technical blogs on topics related to python programming and software engineering. I also self-hosted the blog [here](https://dollardhingra.com) with my first ever [article](https://dev.to/dollardhingra/beginners-guide-to-abstract-base-class-in-python-476i-temp-slug-1599916). Since then I try to write at least 1 blog article each month. **This year itself my posts had 20k views**.

- **Delivered talks** on following topics at my workplace 
  - Introduction to ELasticsearch
  - Clean Code
  - Data Structures in Python
- Created an open source telegram bot for covid : [covid19-india-resources](https://dollardhingra.com/projects/#covid19-india-resources---telegram-bot), [repo link](https://github.com/dollardhingra/cowinquick)
- Created a [panel](https://dollardhingra.com/cowinquick/) for checking vaccine booking slots. Booked 30+ slots for family and friends using this panel, [Repo link](https://github.com/dollardhingra/covid19indiaresources)

- Read the following books: 
  - [System Design Interview](https://www.amazon.in/System-Design-Interview-insiders-Second/dp/B08CMF2CQF)
  - [Understanding Asyncio](https://www.amazon.in/Using-Asyncio-Python-Understanding-Asynchronous/dp/9352139674/ref=sr_1_1?crid=2OHIII2QZBKME&keywords=understanding+asyncio&qid=1647712919&s=books&sprefix=underdtanding+asyncio%2Cstripbooks%2C349&sr=1-1)
  - [No Drama Discipline](https://www.amazon.in/No-Drama-Discipline-Whole-Brain-Nurture-Developing/dp/0345548043/ref=sr_1_1?keywords=no+drama+discipline+book&qid=1647713084&s=books&sprefix=no+dra%2Cstripbooks%2C187&sr=1-1)
- Awesome movies that I watched: 
  - [A beautiful mind](https://www.imdb.com/title/tt0268978/)
  - [Parasite](https://www.imdb.com/title/tt6751668/)
- Accepted a job offer from [Tata 1mg](https://www.1mg.com/) as SDE-3. We are hiring at [Tata 1mg](https://www.1mg.com/). Checkout the [jobs](https://1mg.darwinbox.in/ms/candidate/careers) and let me know if you are interested to work at India’s leading healthcare brand.
Reactni boshlash uchun JavaScriptni qanchalik bilish muhim?
Published: 2022-03-20 11:32:16

Ko'pchilik JavaScriptni yetarlicha o'rganmay turib Reactga (yoki boshqa js frameworklariga) o'tishayotganini guvoohi bo'lyapmiz. Bu to'g'ri emas. 
Agar siz JavaScriptdan yetarlicha bilimga ega bo'lmay turib Reactga o'tsangiz, Reactni o'rganish davomida tez-tez jsga qaytishingizga to'g'ri keladi. Bu esa Reactni o'rganish jarayonini uzoqlashtiradi, ko'plab chalkashliklarga olib keladi.
Keling, Reactdani boshlash uchun jsdan qanchalik bilish muhim ekanligini koʻrib chiqaylik.
Bular: 
➊  Basics
➋  Array.prototype Methods
➌  Array Destructuring
➍  Array Spread
➎  Object Destructuring
➏  Object Spread
➐  Template Literals
➑  ES Modules
Basics:
➊  Basics

❍  Variable Declaration
❍  Variable Scope
❍  Variable Hoisting
❍  Functions
❍  Arrow Functions
❍  Callback Functions
❍  Closure
❍  Basic Operators
❍  Array Literals
❍  Object Literals
❍  if, if...else
❍  for, for...in, for...of, while, do...while



➋  Array metodlar

❍  forEach()
❍  map()
❍  reduce()
❍  flat()
❍  flatMap()
❍  find()
❍  filter()
❍  slice()
❍  splice()
❍  push()
❍  pop()
❍  shift()
❍  unshift()
❍  some()
❍  every()

➌  Array Destructuring

U tez-tez hooclarda ishlatiladi, xususan useState() hoocida
Masalan:

⇥  const [fruits, setFruits] = useState([]);

➍  Array Spread
Foydalanish holatlari juda ko'p. Biz arrayni nusxa ko'chiradigan  joylarimizdan biri bu statedan elementni qo'shish/yangilash/o'chirishdir.

⇥  let newArray = [itemToAdd, ...oldArray]


➎  Object Destructuring
Propertylar bizning funktsiya komponentimizga ob'ekt parametri sifatida uzatiladi.

Biz uni buzishimiz va faqat biz foydalanmoqchi bo'lgan xususiyatlarni belgilashimiz mumkin.
Masalan:

function MyComponent({name, address}) {

}

➏  Object Spread

Biz obyektni child componentiga o'tkazish uchun spread operatordan foydalanshimiz mumkin.
Masalan:
function MyComponent({name, address, ...rest}) {
  return <ChildComponent {...rest} />
}

➑  ES Modullar

❍  import
❍  import {}
❍  export
❍  export default

O'rganish usuli barchada turli bo'ladi.  JS bilimiga ega boʻlish majburiy boʻlmasa-da, siz bir vaqtning oʻzida React va JSni ham oʻrganishingiz mumkin.  Ammo oson bo'lishi uchun React sayohatingizni boshlashdan oldin JS bo'yicha asosiy bilimlarga ega bo'lishingiz tavsiya etiladi.

@ Swapna Kumar
Python Flask, ElasticSearch and Docker environment
Published: 2022-03-20 10:46:20

Hi, the second article devoted to the theme: “How to work with ElasticSearch using Python and Flask framework” is already ready for reading. It is about preparing microservice environment using docker and docker compose. All details are here: "[Python Flask, ElasticSearch and Docker environment](https://sergiiblog.com/python-flask-elasticsearch-and-docker-environment/)". Have a pleasant reading.
How to download and install visual studio code
Published: 2022-03-20 10:13:26

How to install and download visual studio codeIn this post, we are going to look that how to install visual studio code or vs code in windows machines. well it is not difficult to install and download visual studio code, but many users may find some errors while downloading and installing it, so in this post, you are able to install and download visual studio code without any single error, this post is mainly for installation of windows machines, so let's get started.

## What we are going to do in this post
~ What is visual studio code
~ How to download visual studio code
~ How to install visual studio code
~ Important settings in visual studio code

## What is Visual Studio Code
Visual studio code is an open-source project by Microsoft, it is basically a text editor but not like text editors it comes with many built-in features which allows you to code faster and more efficiently, many developers contribute on visual studio code on Github to make it better day by day, currently visual studio code is the best code editor for coding.

## How to install visual studio code
Visit this page for installation process [CLICK HERE](https://codewithng.blogspot.com/2022/03/how-to-install-and-download-visual-studio-code.html)
TaskForce Week Five
Tags: awesomitylab, codeofafrica, bootcamp, intership
Published: 2022-03-20 10:12:31

Design thinking is a five-step process to come up with meaningful ideas that solve real problems for a particular group of people. 
the process is taught in top design and business schools around the world, it has brought many businesses lots of happy customers and helped entrepreneurs from all around the world to solve problems with Innovative new Solutions. 

![Empathise ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzasn8pkbs09mudvwut8.png)
 
The purpose of Step One is to conduct interviews they give you an idea about what people really care about we need to empathize with the situation for example if you want to help older people you might find that they want to keep the ability to walk around and you'll conversations they might share with you different ways they can do that later into the interview you'll want to dig a little deeper look for personal stories of situations where things became difficult ideally you redo the process with many people with the same problem 

![Define the problem](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/224dllnpyomw8r6r7ixg.png)
 
Looking at the interviews you can now understand the actual needs that people are trying to fulfill with that and activities one way to do that is to the line the pubs or activities that the people mentioned when talking about those problems like going for a walk, meeting old friends for tea, or simply going grocery shopping around the corner store. you might realize it's not so much about going out, but more about staying in touch. after your analysis, formulate a problem statement such as `some elderly are afraid to be alone, they want to stay connected`.

![Ideate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jmtgeeumx29rjx582pq5.png)
 
Now Focus only on the problem statement and come up with ideas that solve the problem. the point is not to get a perfect idea come up with many ideas, like a unique virtual reality experience has CD or friendly hoverboards, or a modified pushcart, whatever it is sketch up your best ideas and show them to the people you are trying to help, so you can get that feedback. 

![Prototype](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jew1y4ypxvuo1zury632.png)
 
Now take a moment to reflect on what you have learned from your conversations about the different ideas, and ask yourself; `how does your idea fit in the context of people's actual lives`. 
Your solution could be a combination of a new idea and what is already being used then connect the dots sketch up your final solution and go build an actual prototype enough to be tested.

![Testing the prototype](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3235wv0ay3hxx6jnoov.png)
 
Now test your prototype with actual users don't defend your idea in case people don't like it the point is to learn what and what didn't so I need feedback is great then go back to ideation or prototyping and apply your learning repeat the process until you have a prototype that works and solve the real problem, now you are ready to change the world.
Windows Explorer aufräumen: OneDrive und Creative Cloud Files Icon aus Explorer entfernen
Tags: technik, windows
Published: 2022-03-21 15:39:52

---
title: Windows Explorer aufräumen: OneDrive und Creative Cloud Files Icon aus Explorer entfernen
published: true
date: 2022-03-20 10:09:00 UTC
tags: Technik,windows
canonical_url: https://bloggerpilot.com/onedrive-und-creativ-cloud-files-aus-explorer-entfernen/
---

![Windows Explorer aufräumen: OneDrive und Creative Cloud Files Icon aus Explorer entfernen](https://bloggerpilot.com/wp-content/uploads/2022/03/explorer-aufraeumen.png)

Anleitung für Windows 10 und Windows 11. Die großen Softwarehäuser...

Der Original-Artikel erschien auf [Windows Explorer aufräumen: OneDrive und Creative Cloud Files Icon aus Explorer entfernen](https://bloggerpilot.com/onedrive-und-creativ-cloud-files-aus-explorer-entfernen/).
The Weekly Dev - 202212
Published: 2022-03-20 09:58:14

---
title: The Weekly Dev - 202212
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
canonical_url: 'https://kevwe.com/weekly/202212'
---
The Boring, the Unsecured and the API

Every technology has a user, and sometimes the technologists miss the point by not thinking like a user.

It is sometimes a good lesson to see how strange things can come out of it:

https://kevwe.com/weekly/202212
Quality Over Velocity
Tags: awesomitylab, codeofafrica, organization, api
Published: 2022-03-20 09:56:55

Without excluding the IT business, it is highly likely that all professions today involve some level of stress. On top of having to meet deadlines, dealing with last-minute changes in requirements, and dealing with people, software engineers have to labor in front of a computer for 8+ hours, which adds to the stress.


![developer-sleeping](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bub6ny6oalxwl3hvjwxo.png)
One of the pillars of agile software development is self-organization, which is a must-have skill for a software engineer to be able to handle day-to-day tasks, especially when working in teams, allowing everyone to comprehend the larger context of the project, making decision-making more faster and easier.

![decision-making](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ib3e8a6oeu7nywe6z83m.jpeg)

> **You are free to choose, but you are not free to alter the consequences of your decisions.”
― Ezra Taft Benson**

We make numerous judgments every day. We frequently make these judgments on our own, without any formal procedure in place, and often without even realizing it.
Few developers have a system in place for understanding context and repercussions and making better decisions.
Decisions might be simple or complex by nature. The more complicated ones are more difficult to create. The more difficult it is to make a decision, the more willpower it will take.

![bug](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf9fq97bu2a0d0fin4lk.gif)

This week was not easy for me and my teammate [ManipleKwizera](https://dev.to/maniplek) on the backend, since sending an email to a registered user proved to be a difficult process for the three days we spent trying to fix it.
We were able to repair it thanks to our beloved senior developer [KagaboFaustin](https://github.com/kagabof) by twiddling a handful of our laptop options.

![success-shaking hands](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nn0w9rsqkvf12zy0qcwr.gif)
To summarize, a smart software developer should prioritize quality over speed; providing a good working product to the world should be the primary goal, rather than releasing one that is buggy.