teleren/devto huggingface dataset:
Removing duplicates from a sorted array 14G 10days code challenge
Tags: javascript, programming, computerscience, leetcode
Published: 2022-09-21 21:36:46

I am in the 14G community and currently learning data structures, algorithms and problems solving.I saw a mail about 10 days coding challenge sprint,
It came just in time as I need it, I am using [Geeks4Geeks](https://www.geeksforgeeks.org/)
_I applied and was selected yay!!!!._

Today is the first day of the 10 days challenge and the problems was given a sorted array in ascending order you are to remove duplicates in the array and return it's length.
Category: Easy

The first thing that came to my mind after I started reading the problem and the category was to create a new set iterate through the array and add all the element, because I know sets only take unique values.
Hence I will return the length of the set.
Time Complexity O(n)
Space Complexity O(n)
I went straight to code the solution and submitted.
It failed because i'ts expected that I will use O(1) space complexity and also will modify the original array and remove all the duplicates as well.

Lesson, do not read half way of the question. There might be some detail that will give more information and guidance about a problem.

I then think since the numbers are sorted.
and in descending order, e.g [1,2,3,3,4,,4,4,5....]
The first unique value is at index 0;
I will create a pointer to the next value after unique which is index 1;
pointer = 1
Iterate through the sorted array
 check if the unique value is not equal the iteration  index
  if it is not
     assign last unique at the index of pointer
     increment pointer
  
return pointer

Pseudocode
nums =  [....]
pointer = 1
for num in nums
  if num[pointer -1] != num
     num[pointer] = num
     pointer++

return pointer

Thanks

[Link to leetcode problem](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)

[Link to solution in Js](https://github.com/ismaelsadeeq/I4G_coding_challenge/blob/main/removeArrayDuplicates.js)
Remove Duplicates from Sorted Array
Published: 2022-09-21 20:31:33

```
class Solution:
    def removeDuplicates(self, nums: List[int]) -> int:
        a = 0
        for i in range(len(nums)):
            if nums.count(nums[a])>1:
                del nums[a]
            else:
                a+=1
```
So i solved this leetcode problem which can be found [here](https://leetcode.com/problems/remove-duplicates-from-sorted-array/). 

My thought process was simple. I initialized a counter variable (called 'a') that would index the entire array (starting from zero) then i looped through the array while counting each variable. I then check if the count of the variable is greater than 1. If yes, then i delete that particular variable and if no, then i increment the counter variable to move to the next index.
At the end of the day, what is left are numbers whose count are equal to 1.

Hope you enjoyed reading, bye :)
Interactive Rating Component
Tags: codepen, react, tailwindcss
Published: 2022-09-21 20:29:51

My first work with tailwindcss
{% codepen https://codepen.io/joaojuniordev/pen/abGZJBQ %}

challenger from [Front-End-Mentor](https://www.frontendmentor.io/solutions/codepen-interactive-rating-component-Qh7Vl8cywR#comment-632b68710e511d36537a422e)
SliTaz GNU/Linux Community Funding
Tags: opensource, gnu, linux, distro
Published: 2022-09-21 20:26:29

Hi! The SliTaz GNU/Linux operating system has been alive now for 16 years old and mainly funded by the developer community.

This fundraising was created for the project costs (domain, server), defray active developers, repay the funds invested by developers and ensure the project's sustainability.

We did not asked for any donations those last 6 years, but now it would really help! 

[SliTaz GNU/Linux Community Funding](https://gofund.me/5946ad6e)
Remove Duplicates from Sorted Array
Tags: javascript, python, algorithms, beginners
Published: 2022-09-21 20:09:49

I had been looking for a means to practice data structures and algorithm problems in a healthy competitive environment and I4G's 10 days of coding challenge gave me just the avenue I needed.

The first challenge was to solve a problem on leetcode to remove duplicates from a sorted array arranged in ascending order.
Below is the link to the challenge

https://leetcode.com/problems/remove-duplicates-from-sorted-array/

I solved the challenge using JavaScript and Python.

My thought process:

We want to count the total number of unique values in the array. So the first unique value should be placed in the index 0, the second in the index 1 up to the last unique value which would be in the last index.

We have two pointers to help loop through the array. One for the left and one for the right side of the array. The one on the right scans through the entire array to check for duplicates while the one on the left tells us at what position to put the unique values. The left also tells us how many unique values we have so far, so we increment it by 1.

Below is the link to my final submission for the challenge: https://leetcode.com/problems/remove-duplicates-from-sorted-array/submissions/
Welcome Thread - v192
Tags: welcome
Published: 2022-09-21 20:06:25

---
title: Welcome Thread - v192
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![A little white fluffy dog popping out of a white fluffy blanket with the word "hi" appearing on the screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hba263ekk92vhosodwst.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
A Flow to Audit Inactive Google Workspace Users in Okta
Tags: nocode, workflows, okta, google
Published: 2022-09-21 20:02:23

---
title: A Flow to Audit Inactive Google Workspace Users in Okta
published: true
date: 2022-09-21 19:59:56 UTC
tags: NoCode, Workflows,okta, google
canonical_url: https://maxkatz.net/2022/09/21/a-flow-to-audit-inactive-google-workspace-users-in-okta/
---

Okta Workflows community flows are flows shared by community members. These flows show how to solve a particular problem. You might have the same problem you are trying to solve or a similar one. Either way, these community flows will help you learn and build automations.

A directory of all other Okta Workflows community-created flows ⤵️
{% embed https://dev.to/oktaworkflows_staff/all-okta-workflows-community-created-flows-3kmm %}

_This flow [Bilal Habib](https://www.linkedin.com/in/bilal-habib-72159b8a/), IT Infrastructure Engineer for MADE.COM_

> This flopack audits Google Workspace users similar to the template for Auditing Inactive Okta Users
> 
> <cite><em> <a rel="noreferrer noopener" href="https://www.linkedin.com/in/bilal-habib-72159b8a/" target="_blank">Bilal Habib</a></em></cite>

[![A flow from audit inactive Google Workspace users (source)](https://katzmax.files.wordpress.com/2022/09/workflows_community_audit_google_users.png?w=1024)](https://katzmax.files.wordpress.com/2022/09/workflows_community_audit_google_users.png)
<figcaption>A flow from audit inactive Google Workspace users</figcaption>

[Learn more and download](https://github.com/pro4tlzz/ITSupportTools/tree/main/okta-workflows/inactive-google-workspace-users) the flow from GitHub.

* * *

**More resources to help you learn** :

🎥 Short how-to [Workflows videos](https://youtube.com/playlist?list=PLIid085fSVdvyK8F4xuk49EchBPmAVNHG) to help you become a better automation builder.

🍿 A collection of helpful [Workflows tips](https://maxkatz.net/okta-workflows-tips/).
Day 2: the js toolchain craze
Tags: 100daysofcode, webdev, devjournal
Published: 2022-09-21 19:53:28

I wanted to publish a small library as npm package. It's basically just a few hundred lines of typescript, nothing big. The code was there, and I just have to wrap it up, right? Well, I was naive again. Somehow, all the programming languages I used in the past had a very precise and clear way how to use, build and share packages, but somehow it's not the case in the JS community.

I was baffled by how many different "build tools" there are.  I thought things had settled since last time I used gulp and grunt and webpack and other various build tools (even something like "gobble") but it seems the situation is gotten worse. Now yarn and pnpm are shadowing npm while on the build side you have esbuild, vite, snowpack, neutrino, parcel and bla bla bla. Then put on it some "monorepo" tools like lerna and turborepo and ...holy shit. It's not making things easy. It's also quite the polar opposite of more "traditional" programming languages. Java has maven, Python has pip, X has ... but javascript is like a bazaar with toolchains popping up like fashion trends.

But it gets worse, I was thinking. "Ok, let's go with the flow, let's pick the 'default' toolchain for a typescript lib." So I went to the typescript official site, to see how they minimize stuff and such, and boom! They don't have a standard for that! You have a ticket [#8](https://github.com/microsoft/TypeScript/issues/8) wishing for having this feature built-in since 2014 but instead they have integrations for [a whole list of third party tool(chain)s](https://www.typescriptlang.org/docs/handbook/integrating-with-build-tools.html)!

...at the end of the day, I'm still a bit unsure which one I should pick. Heck, I just want to minimize it! In the end, I ended up learning, gauging and assessing a gazillion of different tools doing similar things. Well, let's see how the [race](https://2021.stateofjs.com/en-US/libraries/build-tools) evolves next year. ;) 

As a first attempt, I tried 'Parcel' which was hailed as the "zero configuration build tool" which fitted my case, but the resulting minified script seemed far from optimally minimized.

Tomorow I'll try using esbuild in combination with typescript a shot, let's hope that does the trick (yes, I'm looking at you sourcemap).

----


Today was not really productive. ...more annoying.

I was also sidetracked by some library I use as a cornerstone of my UI:

{% embed https://cdmoro.github.io/bootstrap-vue-3/ %}

But it misses some really basic things. Like a carousel for example. So in the end, I got sidetracked making a PR for it: https://github.com/cdmoro/bootstrap-vue-3/pull/691

It's not something huge, but it still takes quite some time, also because you spend time looking around the various sources and tools. There are also things I would have done otherwise, but I stopped there to avoid going too much down the rabbit hole. After all, these kind of things are bottomless pits.
Day 3 of 100: Recharts Debut
Tags: react, webdev, beginners, 100daysofcode
Published: 2022-09-21 19:52:08

Today I read up on Recharts and rendering charts on #ReactJS. I've taken a fancy to radarcharts because I feel like it'll play a major part to the site's structure down the line(also it remind me a lot of FIFA so that's an added bonus). I also made low-fidelity prototype on a new way to structure my website. This then led me to restructuring all of my files and folders because my previous structure folder wasn't allowing for much growth for when I eventually expand the website in the future. ONE STEP CLOSER TO THE 100


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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ql7cj4vgm0dzl2qy23o.png)
Do you use '&' before the parameter name in PHP?
Tags: php, design, algorithms
Published: 2022-09-21 19:40:06

In my career, when I was meeting a new PHP developer or working on any project, I haven't seen too many people using '&' in front of a parameter name.

Even when I started my adventure with PHP, I didn't hear about it. I think this is a great time to remind the community about the "&".

Ind [documentation](https://www.php.net/language.references.pass) we can read 

> You can pass a variable by reference to a function so the function can modify the variable

```
function foo(&$var)
{
    $var++;
}

$a=5;
foo($a); // $a is 6 here
```

This means that the function gets a reference to the original value of $var, not a copy of that value. Example:

```
function more(&$num) { $num++; }

$number = 0;
more($number);
echo $number; // this outputs "1"
```
why Next.js is the best choice for create a blog site or even using it with wordpress ? 🤔😉
Tags: nextjs, blog, wordpress, react
Published: 2022-09-21 19:36:08

We are now seeing the huge number of blogging sites, whether on your own application or on sites ready for blogs such as WordPress, Blogger and others
_Of course, one of them is me 😀 😀
  
Now what distinguishes sites from each other is not only the quality of the content, but the ease, speed, efficiency and responsiveness
**Here we have [Next.js](https://nextjs.org/)**

#### First let me define Next.js:

**Next.js** is a JavaScript framework created by** Zeit**. It allows you to create server-side rendering and static web applications using React. It's a great tool for building your next website. It has many great features and advantages, which can make Nextjs your first choice for building your next web application.

Next.js comes with a bunch of cool features like <u>server-side</u> <u>rendering,</u> <u>routers,</u> and <u>slow loading</u>.

**Server-side rendering:**
Next.js performs server-side rendering by default. This makes your application optimized for search engines. You can also integrate any middleware like [express.js](https://expressjs.com/) or [Hapi.js](https://hapi.dev/), and you can run any database like [MongoDB](https://www.mongodb.com/) or[ MySQL](https://www.mysql.com/).

Next.js comes with a header component that allows you to add and create dynamic meta tags.
These make your website able to be indexed by search engines like Google.

**Create a static website with Next.js**
In addition to server-side rendering, you can still compile and export your app as an HTML static website and publish it to a static hosting website like a [GitHub](https://github.com/) page or [netlify](https://www.netlify.com/).

**routers**
This is another great feature of Next.js. When using the create-reaction-app, you usually need to install the interactive router and create its own custom configuration.

**lazy loading**
Slow loading makes your app offer a better user experience. Sometimes it may take a while for the page to load. The user may abandon your app if it takes more than 30 seconds to load.

The way to avoid this is to use some trick to indicate to the user that the page is loading, for example by displaying a turntable. Lazy loading or code splitting is one feature that allows you to handle and control lazy loading so that you only load the necessary code on your page.



## Conclusion :

These features make next.js the best choice to start blogging and profit from it in the best possible way

Building a blog with Next.js is today's top choice for those who want a simple yet powerful blog - without ending up with a lot of code and while increasing our SEO rankings.

**SEO** (Search Engine Optimization) is the process of optimizing your app to rank better on search engines. It is very important for any blog that wants to rank better on search engines and bring in more traffic. A good app with poor SEO rankings will not be productive, effective, or successful.
General Things around Python
Tags: python, beginners, programming, opensource
Published: 2022-09-21 19:25:44

**1) Python is Interpreted Language ** - Line by Line the Code is been Executed
**2) Object Oriented Language** - Supports Classes and Objects
**3) Dynamically Type Language** - Here we need not have to Define Datatype of Variable
**4) Ease to Practice** - Start this as First Language
**5) Scope of Python **- Python is used Everywhere in IT Industry

Python Example

```
print("Hello World")
```
print Statements print Default in New Line
Run this code saving the File using .py Extension


**Variables  - Variables are the Name given to Memory Location**

1. Variables names must start with a letter or an underscore.
 x = True # valid
 _y = True # valid
 9x = False # starts with numeral
=> SyntaxError: invalid syntax 
 $y = False # starts with symbol
=> SyntaxError: invalid syntax
2. The remainder of your variable name may consist of letters, numbers and underscores.
has_0_in_it = "Still Valid"
3. Names are case sensitive.
x = 9 
y = X*5 
=>NameError: name 'X' is not define

**Global Variables**

```
a = "good"

def test():
    global a
    b = "Omkar"
    
test()

print("python is " + a)

```

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

Inputs in Python are By Default Store as a **String**

Datatypes in Python
1) Numeric Datatype  - int,float,Complex
2) Sequence Number - String,Char,List,Tuple
3) Dictionary,Set,Boolean

Examples on Datatype

```
# Integer
a = 3
type(a)

# Float
b = 4.5
print(b)

# Complex 
h = 2j
print(h)

# String 
p = "Python is Easy Lanuage"
print(p)

# Char
c = 'A'
print(c)

# List 
l = [1,2,3,4,5,"python","Language"]
print(l)
print(type(l))

# Tuple
t = (1,2,3,4,5)
print(t)

# Dictionary
d = {1:"One",2:"Two",3:"Three"}

# Set 
s = {2,2,2,2,2,234,,4,4,}
print(s)

```

**Function**

```
def test(a,b):
    """This is my Function for Addition"""
    return a+b
# This is Doc String
```
**Operators in python**

1) Arithmetic Operator (+,-,/,*,//,%)
2) Comparison Operator(< , > , = , >= , <=)
3) Logical Operator (and , or , not)
4) Identity Operator()
5) Membership Operator 
6) Bitwise Operator

`a = 5 
b = 10

print("Value is ", a+b)
print("Value is ", a-b)
print("Value is ", a/b)
print("Value is ", a//b)
print("Value is ", a*b)
print("Value is ", a**b)
print("Value is ", a+b)
print("Value is ", a+b)`
Cin - Console input
Published: 2022-09-21 18:58:49

**Cin** - `C++` dasturlash tilida `Console Input` qilish uchun ishlatamiz.
  Misol qilib aytadigan bo'lsak biror-bir saytga kirish qismida **Username** va **Parol** so'rashi deyarli hammma saytlarda ishlatilishini bilamiz.
  Demak,`cin` operatori bizga shu vazifani bajarishga yordam berishi mumkin.

Cin operatorini ishlashini misollar yordamida tushuntirsak:

```cpp
#include <iostream>
using namespace std;

int main(){
  
int n;
  cin>>n;
  cout<<n*9;

  return 0;
  }

```

Console:

```cpp
12
108

```
qisqacha ko'rinishda `cin input` operatorini ishlatilish sentaksisini ko'rsatib o'tdik.
React.js
Published: 2022-09-21 17:00:02

this - description
```
class Dog {
  showingThis() {
    console.log(this);
  }
}

const fido = new Dog();
fido.showingThis();
// => Dog {}
```
scope
fetch
-response (r)
--.ok
--.json()

[if res not ok] - setErrors(Object.entries(e.error).flat()



Events and Event Listeners
Looping
JSX

useEffect - triggers code to be run once component mounts
useState
useNavigate
useParams


We can simplify this process of making requests to the correct port by using create-react-app in development to proxy the requests to our APILinks to an external site.. This will let us write our network requests like this:

fetch("/movies");
// instead of fetch("http://localhost:3000/movies")
To set up this proxy feature, open the package.json file in the client directory and add this line at the top level of the JSON object:

"proxy": "http://localhost:3000"
Let's also update the "start" script in the the package.json file to specify a different port to run our React app in development:

"scripts": {
  "start": "PORT=4000 react-scripts start"
}
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8x4ilhcgtlo7xduknvxm.png)


async function handleSubmit(e) {
  e.preventDefault();
  // fetch returns a Promise, we must await it
  const response = await fetch("/movies", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(formData),
  });
  // response.json() returns a Promise, we must await it
  const data = await response.json();
  if (response.ok) {
    console.log("Movie created:", data);
  } else {
    setErrors(data.errors);
  }
}
RedwoodJS
Tags: webdev, javascript, beginners, podcast
Published: 2022-09-21 18:48:02


Original: https://codingcat.dev/podcast/2-40-RedwoodJS

{% youtube https://youtu.be/YpBmxKxzWco %}

### Links

[https://community.redwoodjs.com/t/1m-redwoodjs-funding/2960](https://community.redwoodjs.com/t/1m-redwoodjs-funding/2960)

[https://chatterbug.com/en/](https://chatterbug.com/en/)

Rob’s Twitter [https://twitter.com/cannikin](https://twitter.com/cannikin)

Redwood Videos [https://www.youtube.com/c/RedwoodJS/videos](https://www.youtube.com/c/RedwoodJS/videos)

[https://www.redwoodstartupfund.com/](https://www.redwoodstartupfund.com/)

## Questions

1. Can you tell us more about yourself?
2. What is the focus of [PrestonWernerVentures](https://twitter.com/PWVentures)?
3. How did Redwood get started?
4. When you compare the integration of GraphQL and Apollo server, can someone coming from Gatsby easily understand how the data is managed?
5. Can you breakdown what [Cells](https://redwoodjs.com/docs/cells) are, and how someone might use them?
6. Are authentication providers built into Redwood?
7. I probably know Redwood best from the community that is surrounding Redwood. Would you say that this was a focus day one?
8. RedwoodJS Startup Fund
9. Why would you choose Redwood over something like Next/Remix? What about Django and Laravel?
10. Will Redwood ever migrate away from GraphQL to something like tRPC?
11. Is Redwood scalable for long term growth?
12. Where do you see Redwood fitting into the landscape of JS Frameworks in the next 5 years?
  1. [StateofJS](https://2021.stateofjs.com/en-US/libraries/back-end-frameworks)
Pushpa The Rule OTT Release Date: Netflix, Prime Video & Disney Hotstar
Published: 2022-09-21 18:37:49

Actor Allu Arjun is coming back again for his fans with the fever of Pushpa the Rule ( Pushpa 2 ). Though major of the Bollywood movies which have been released this year have not been able to make much on the big screen which is quite opposite for the south movies.
Pushpa the Rule ( Pushpa 2 ) is gonna start from the part where we left Pushpa the Rise. The movie revolves around Pushpa Raj, played by Allu Arjun, who works as a laborer in the black market trade of red sandalwood in the forests that are left over in Tirupati

[Read More](https://whatsnextott.com/pushpa-the-rule-ott-release-date-netflix-prime-video-disney-hotstar/)or [check](https://www.crunchbase.com/organization/whatsnextott)