teleren/devto huggingface dataset:
RocketSEO - AI Powered SEO Keyword Generator
Tags: ios, mobile, swift, api
Published: 2023-01-22 16:00:37

Hey people 👋

Im a Indie iOS Developer with a keen passion for mobile development, technology and creating awesome sh*t!

Today, my new app got accepted onto the App Store after a few failed attempts and rejections its finally live!
 
RocketSEO uses AI to generate SEO keywords in seconds and with ease. 

I would appreciate all feedback and constructive criticism if any?

Happy hacking!

Link: - [Appstore](https://apps.apple.com/gb/app/rocketseo/id1666924606)

Feel free to leave a rating if you believe it deserves one.

Connect with me: [Twitter](https://twitter.com/hxydey) *Im new to twitter so bare with me

Thank you.
Integrating AI for Improved Customer Service on Easyjobber.fr
Tags: webdev, node, productivity, php
Published: 2023-01-22 15:36:18

Hello community,

We are always looking for ways to improve the user experience on Easyjobber.fr and one area we are interested in exploring is the use of AI for customer management. We would like to know if any of you have experience in adding an AI chatbot or other AI-based customer service solution to a website and the best way to proceed with it.

We would greatly appreciate any advice or suggestions on how to integrate an AI-powered chatbot or other AI-based customer service solution into our platform. If you have any examples of chatbot or AI-based customer service solutions that you think would be a good fit for **[Easyjobber.fr](https://easyjobber.fr)**, please share them with us.

Thank you for your help and support in improving our platform.

Best regards,
The Easyjobber Team
ERROR Error: Uncaught (in promise): Error: Expected validator to return Promise or Observable. - angular
Published: 2023-01-22 15:32:56

I wrote my custom validator to check if filename is right:

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

And add it in this way on fb.group

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

And this error came up:

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

and fix it adding is this way:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/66cbzgal7otgkda4ryfw.png)
Building a free Open-source portfolio template using HTML, CSS and JS | Part 5
Tags: html, css, beginners, opensource
Published: 2023-01-22 15:13:50

On the 15th of May in 2020 I [wrote here](https://dev.to/nisarhassan12/free-open-source-portfolio-template-for-developers-ih) about the free open source portfolio template that anyone could use for free.

<blockquote>
    <div>
        GitHub <a href="https://github.com/nisarhassan12/portfolio-template" target="_blank">Repo Link →</a>
    </div>
    <br/>
    <div>
        Check out the <a href="https://portfolio-template.surge.sh" target="_blank">live demo here →</a>
    </div>
</blockquote>

Since then it has got 395 stars on GitHub and 128 forks.

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

I have started a [video series](https://www.youtube.com/watch?v=1nchVfpMGSg&list=PLwJBGAxcH7GzdavgKlCACbESzr-40lw3L) on YouTube where I'm going to build it from scratch using HTML, CSS and a little bit of JavaScript. 

Come join me in the journey [here is the link of the 5th  video in the series](https://www.youtube.com/watch?v=GldVuc6p2MY).
{% youtube GldVuc6p2MY %}

[https://www.youtube.com/@nisarhassan12](https://www.youtube.com/@nisarhassan12) if you find it worthy. Thanks
131. Palindrome Partitioning
Published: 2023-01-22 15:12:12

**Problem Statement:**

Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.


**Example 1:**

**Input:** s = "aab"
**Output:** [["a","a","b"],["aa","b"]]

**Example 2:**

**Input:** s = "a"
**Output:** [["a"]]
 

**Constraints:**

- 1 <= s.length <= 16
- s contains only lowercase English letters.

**Solution:**

**Algorithm:**

1. Use DFS to traverse all the possible partitions.
2. Use a helper function to check if the current substring is a palindrome.
3. If the current substring is a palindrome, add it to the path and continue to traverse the rest of the string.
4. If the current substring is not a palindrome, do not add it to the path and continue to traverse the rest of the string.
5. If the current index is equal to the length of the string, add the current path to the result.
6. After the traversal is completed, return the result.

**Code:**
```
public class Solution {
    public List<List<String>> partition(String s) {
        List<List<String>> res = new ArrayList<>();
        List<String> path = new ArrayList<>();
        dfs(s, 0, path, res);
        return res;

    }

    private void dfs(String s, int index, List<String> path, List<List<String>> res) {
        if (index == s.length()) {
            res.add(new ArrayList<>(path));
            return;
        }
        for (int i = index; i < s.length(); i++) {
            if (isPalindrome(s, index, i)) {
                path.add(s.substring(index, i + 1));
                dfs(s, i + 1, path, res);
                path.remove(path.size() - 1);
            }
        }
    }

    private boolean isPalindrome(String s, int left, int right) {
        while (left < right) {
            if (s.charAt(left) != s.charAt(right)) {
                return false;
            }
            left++;
            right--;
        }
        return true;
    }

}

```
**Time Complexity:**
O(n*2^n)O(n∗2n) The time complexity of the backtracking algorithm is exponential, because in the worst case, we need to add n-1 separators into a string of length n, which results in 2^n2

**Space Complexity:**
O(n)O(n) The space complexity of the backtracking algorithm is linear, because in the worst case, the depth of the recursion tree can reach nn.
AWS Verified Access (Preview): How You Can Provide Secure Access To Corporate Applications Without A VPN
Tags: webdev, aws, vpn, beginners
Published: 2023-01-22 15:10:36

**AWS Verified Access (Preview)** is a new service from Amazon Web Services (AWS) that allows organizations to verify the identity of users who are trying to access their AWS resources. This service is currently in preview and is available for customers to try out and provide feedback.

The service is built on top of **AWS Identity and Access Management (IAM)** and uses the same underlying identity and access management infrastructure as other AWS services. This allows organizations to easily integrate AWS Verified Access with their existing IAM policies and access controls.

**## AWS Verified Access Uses
**

1. This is one of the main uses of AWS Verified Access is to provide an additional layer of security for sensitive resources. This can include resources such as data lakes, data warehouses, and other sensitive data stores. By requiring users to verify their identity before accessing these resources, organizations can greatly reduce the risk of unauthorized access and data breaches.

2. Another use case for AWS Verified Access is to provide a way for your organizations to ensure that their employees are who they say they are when accessing resources. This can be particularly useful for organizations that have a large number of remote workers or that have employees that frequently travel.

**

## How To set up AWS Verified Access

**
To set up AWS Verified Access, you will first need to create an IAM user or role that will be used to access the service.

- You will then need to configure your IAM policies to allow this user or role to access the AWS Verified Access service.

- Once this is done, you can then enable the service for your organization and configure it to work with your existing IAM policies and access controls.

- In order to use AWS Verified Access, you  will need to have a mobile device with the AWS Verified Access app installed. 

- You will then need to enter a code that is generated by the app in order to verify their identity. This code can be sent to the your mobile device via SMS or push notification, or it can be generated by the app itself.

Overall, AWS Verified Access (Preview) is a powerful new service that can help organizations to better secure their resources and ensure that only authorized users can access them. With its integration with IAM and its ability to work with existing access controls, it is a great addition to any organization's security toolkit.

In summary, AWS Verified Access (Preview) is a new service from Amazon Web Services (AWS) that allows organizations to verify the identity of users who are trying to access their AWS resources. By requiring users to verify their identity before accessing sensitive resources, organizations can greatly reduce the risk of unauthorized access and data breaches.
Starchart: Choosing a technology
Tags: webdev, javascript, programming
Published: 2023-01-22 15:03:38

# Finding a path #

By the end of last week, we were informed that for the creation of our project (Starchart), we will be using a specific technologies for it. Such technologies are...

- [Sattelite](https://github.com/Seneca-CDOT/telescope/tree/master/src/satellite) for the back end
- [Remix](https://remix.run/) for the front-end framework
- [MySql](https://www.mysql.com/) for database
- [TypeScript](https://www.typescriptlang.org/) for the language
- and many other

I have my career planned out for a while now, and I planned on working with the front-end to get accustomed with the work, and also because it has a visual presentation of what my code is doing in real time (I'll work my back-end once I'm more accustomed). Thus, when choosing a technology to work on, I decided to pick [Chakra UI](https://chakra-ui.com/), due to it being a library of react components (which I'm a bit familiar of). Having a thorough understanding of the library should help me have a much deeper understanding of the ReactJS library.

# What I found #

The reading I did made me realize that Chakra UI actually helps keep a group much more organized when working with a project. The problems I noticed with working with other people, is that individuals have different answers for similar questions. If you tell someone to create a side navigation bar, what they'll come up with will be quite different from yours. I'm not referring to the design, but the source code. With the use of pre-made components, chakra ui reduce the burden of having to figure out your peer's work, and help new contributors get in to action much faster.

I'm planning on implementing this library to a project I have for a different course. Working with people with no experience will bound to be un-organized, and this should help lessen that issue. 

I'll be updating the [wiki](https://github.com/Seneca-CDOT/starchart/wiki/Chakra-UI) once a week to help contributors to the project a basic knowledge of what chakra is
How IoT is Improving Urban Life
Tags: iot, smartcity, connecteddevices, technology
Published: 2023-01-22 14:57:32

- A smart city with full-fledged IoT would likely feature a wide range of interconnected devices and systems that gather and analyze data in real-time. This could include things like smart traffic lights and transportation systems, smart buildings and energy management systems, and a variety of sensors and cameras that monitor air and water quality, noise levels, and other environmental factors.

- The data collected by these devices would be used to optimize and automate a wide range of city services, such as traffic flow, waste management, and public safety. For example, IoT-enabled traffic lights could adjust their timing based on real-time traffic data, and smart waste management systems could automatically schedule pickups based on trash levels.

- Additionally, a smart city with full-fledged IoT would likely feature a variety of digital services and platforms that allow citizens to access information and interact with city services in new ways. This could include things like mobile apps that allow citizens to report issues or request services, and online portals that provide real-time information on things like traffic, weather, and public transportation.


- Let’s have look at 5 important IoT use cases for smart cities:

1. Smart Transportation: IoT-enabled devices such as sensors, cameras, and GPS can be used to monitor and optimize transportation systems, including traffic lights, public transportation, and ride-sharing services. This can help to reduce congestion, improve traffic flow, and enhance the overall mobility of citizens.

2. Smart Energy Management: IoT-enabled devices and systems can be used to monitor and optimize energy usage in buildings, homes, and public spaces. This can help to reduce energy costs, improve energy efficiency, and reduce carbon emissions.

3. Smart Public Safety: IoT-enabled devices and systems can be used to monitor and enhance public safety, including security cameras, gunshot detection systems, and other sensors. This can help to reduce crime, improve emergency response times, and enhance overall safety and security in the city.

4. Smart Waste Management: IoT-enabled devices and systems can be used to monitor and optimize waste collection and disposal, including trash levels and recycling bin fill levels. This can help to reduce waste and improve the overall cleanliness and hygiene of the city.

5. Smart Health Care: IoT-enabled devices and systems can be used to monitor and optimize healthcare services, including remote patient monitoring, telemedicine, and emergency response systems. This can help to improve the overall health and well-being of citizens and to reduce healthcare costs.

- In brief, a smart city with full-fledged IoT would be a highly connected and responsive environment that leverages data and technology to improve the quality of life for citizens and to make city services more efficient and effective.
Nereden başlasam
Tags: turkce, veri, veribilimi, makineogrenmesi
Published: 2023-01-22 14:43:48

Merhaba herkese burayı yeni keşfettim. Açıkçası bir şeyler paylasabilirsem çok sevineceğim. 

Bu dönem veri bilimi dersleri vereceğim. Bunun için ders notları hazırlıyorum. Tabii hazırlarken pek çok kaynaktan faydalanmaya çalışıyorum. 

Benim en çok ilgimi çeken bir kaç makaleyi sizlerle paylaşacağım. 

Bugünün konusu: Veri Modelleme 

Veri modelleme konusu Türkçe kaynaklarda gerçekten hem çok zayıf hem de çok yüzeysel işlenen bir konu. Bulabildiğim herkese açık en iyi [veri modelleme](https://www.bilimma.com/veri-modelleme-nedir/) makalelerinden biri ise bu yazı. 

Elbette text booklarda çok daha fazlası detaylı ve güzel bir şekilde yer alıyor ve ben de oradan işliyorum çoğunlukla. Ancak dediğim gibi türkçe kaynakların hem yüzeysel hem de zor anlaşılır olmasından dolayı bir miktar kalbim kırık. Açıkçası bu alanı biraz üvey evlat gibi görüyorlar sanırım.. 

Burada daha fazla veri bilimi yazısına yer vereceğim ilerleyen günlerde umarım bu eksikliğin kapanmasında faydam olur.
Job Portal API Using Node.js, Express.js, Prisma & TypeScript
Tags: node, prisma, typescript, api
Published: 2023-01-22 14:33:00

# Job Portal API

This API allows users to create an account, login, update their profile, upload their resume, and add, update, and delete job listings. Users can also apply for jobs and view all jobs they have applied for. 

The API is built using Node.js, Express.js, Prisma and TypeScript.

## Getting Started

1. Clone the repository: `git clone https://github.com/saidMounaim/job-portal-api.git`
2. Install dependencies: `npm install`
3. Start the development server: `npm run dev`
4. Make sure you have running prisma cli and prisma server

## Endpoints

- `POST /users`: Create a new user account
- `POST /users/login`: Login to an existing user account
- `PUT /users/:id`: Update a user's profile
- `PUT /users/:id/resume`: Upload a user's resume
- `POST /jobs`: Add a new job listing
- `PUT /jobs/:id`: Update an existing job listing
- `GET /jobs/:id`: Retrieve a single job listing
- `DELETE /jobs/:id`: Delete a job listing
- `POST /jobs/:id/apply`: Apply for a job listing
- `GET /users/:id/jobs`: Retrieve all jobs a user has applied for

## Note

This project is still under development and the endpoints may not be completely functional yet.

## Contribution

All kind of contributions are welcome, please feel free to submit pull requests.

Github Repo: https://github.com/saidMounaim/job-portal-api
Github Profile: https://github.com/saidMounaim/
AWS 基礎 Part 4 -- API Gateway アクセス時に Lambda 関数を発火させる。
Tags: aws, apigateway, lambda
Published: 2023-01-22 14:18:02


## why

CloudFront -> API Gateway -> Lambda -> ECS ...

と言う構成を作りたかった。
API Gateway には Lambda が必須なように見えた

---

# Lambda

---

## Lambda とは？

https://qiita.com/miyuki_samitani/items/14497a78e5c0cbbb0e37

無料で Python, Node.js, Ruby

これらの言語で処理を実行できる環境のようだ。

外部から叩かれる必要がある様に見える。

https://www.benjamin.co.jp/blog/technologies/lambda-1-create/

実行中のみの課金らしい。

https://qiita.com/suo-takefumi/items/b47922362366de897920

Slack 通知を書いたりできる。
アプリに直接書く場合と違って、サクッと編集したり、共通化できたりするメリットがあると考察した。

---

## Lambda 関数を作る

Lambda のページに行って

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

https://qiita.com/miyuki_samitani/items/f01f1bd49334f97fe84c

miyuki_samitani さんの記事を参考に nodejs で
hello-lambda 関数を作り

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

ログとレスポンスに Hello from Lambda! と出すコードを入れた。


---
---







# API Gateway

---

## API Gateway を作成して Lambda と繋げる

https://qiita.com/miyuki_samitani/items/f01f1bd49334f97fe84c

同じく miyuki_samitani さんの記事通りに

hello-api を作成し

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

`/` の GET で 統合タイプとして Lambda の hello-lambda をセットした。

これによって

API Gateway の hello-api にアクセスされると 
Lambda の hello-lambda 関数が呼ばれる

hello-lambda のメッセージが返ってくる

このように作ることができた。


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


Lambda の hello-lambda を開いてみると、
API Gateway からつながっていることを見れる。

---

## Lambda から ECS Task の nginx サーバーにリクエストできないことを確認。

これで API Gateway にアクセスされたときに、
Lambda が動いて、Lambda に書かれているレスポンスが返る様になった。

次は、Lambda が ECS のタスクとして動いている nginx を呼び、そこの返り値を返すように作りたい。

しかし、調べて見ると Lambda にできるのは ECS Task を走らせて、結果を受け取ることだけのようだ。

なのでバックエンドの Spring などを走らせて、エンドポイントごとに呼び分けることはできないように見えた。

https://www.gravitywell.co.uk/insights/using-ecs-tasks-on-aws-fargate-to-replace-lambda-functions/

この図を見ると
機能によってタスクを動かすようだ

Lambda を使う場合は機能ごとに別のタスクコンテナ、アプリケーションを作る必要が出てきてしまう。

同じタスクをよんで、エンドポイントで呼び分けることはできなそうだ。


API Gateway から直接　Public or Private の ECS タスクのサーバーを叩いて結果をもらうように変えてみる。
Doubly Linked List Series: Creating get() and set() methods with JavaScript
Published: 2023-01-22 14:09:19

This post will continue to build off of the previous blog on Doubly Linked List methods - [linked here](https://dev.to/tartope/doubly-linked-list-series-creating-shift-and-unshift-methods-with-javascript-2mmd).  Today I will share how I have learned to create get() and set() methods for a Doubly Linked List.  Beginning with get(), this method accepts an index as a parameter and retrieves a node at a chosen position in the list.  Since lists are not indexed, a counter will have to be used to find the wanted node.  See an illustration below for this method:

![First part of drawing for get method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8oeabx0oy77e7jfr3p4p.png)
![Second part of drawing for get method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wjyx3qemdkl05shzf74i.png)

Edge case: if the index is less than zero, or greater than or equal to the length of the list, return null.  Otherwise, follow the steps listed above.

Here is an example of code for a get() method:

![Picture of code for a get method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1iiytd57pnddu5wvivh.png)

The method for set() is used to change the value of a node at a chosen position in the list.  Set() accepts two parameters - an index to be found, and a value to be updated.  Creating this method is a little easier because we can use the get() method created earlier to support this method.  Below is an illustration:

![Drawing for get method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ny0ubg1i3g0hisw8lq1s.png)

Here is an example code for a set() method:

![Picture of code for a set method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ncs9h8t6l87101xxnms.png)

The time complexity for get() and set() methods in a Doubly Linked List is O(n) linear time because as the lists' length increases so does the number of operations.  Please feel free to share comments or corrections if I got anything incorrect.  In the next blog I will share what I have learned about creating insert(), remove(), and reverse() methods for Doubly Linked Lists.
Don't Be Scared of Ternary Operators
Published: 2023-01-13 03:24:58

---
title: Don't Be Scared of Ternary Operators
published: true
date: 2023-01-12 02:35:39 UTC
tags: 
canonical_url: 
---

Sometimes when looking through a C/C++ codebase you may see these weird symbols littered through code that you do not understand. For example:

```
    z = (x < y) ? 10 : 0;

```

When I first started coding these operations scared me because I had no idea what was going on at all, but it is more simple than I thought!

The above statement is the same as:

```
if(x < y)
    z = 10;
else
    z = 0;

```

But using the ternary operator cuts the number of lines needed from 4 to 1! Not only does it cut down on the number of lines but it can also increase the readability of a program. Instead of having to look through 4 lines of code (or more if there are more if-else blocks), we can look at one single line with ternary operators. Here is another example:

```
int sum;
int x = 5;
int y = 0;

sum = (x == 5 ? (y == 0 ? 10 : 5) : 0);

```

In this case, we are doing a nested ternary operation. The integer sum will be equal to 10 when evaluated. These operations may not look useful but when implementing things like a stretchy buffer (dynamic array in C) these operations help make extremely powerful macros for dealing with dynamic arrays. In my next post, I will go over a super simple dynamic array class in C created with macros, ternary operators, and good ol' pointer arithmetic.