teleren/devto huggingface dataset:
Computing colors (Need tips)
Published: 2022-09-30 19:33:39

Hello,

We've lastly built a module for managing colors (at pixa.pics), it uses quite the same code in terms of architecture and style that the one of [simd.js](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js) ! Awesome concept you can learn more about on intel website and hacks dot mozilla dot com...

https://01.org/node/1495

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


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

So here we got our module: https://github.com/pixa-pics/pixa-pics.github.io/tree/main/src/js/utils/simdope

AAAAND it is faaaast! Awesome...

Now, we manage mostly colors in a series of bits which are manipulated by typed array of unsigned integer of 8 bits, that makes 1 byte thanks captain obvious. [ASM.js](http://asmjs.org/) also does compiling code being more efficient exerting bits operation to variables to predict and force them to fit less space and more predictability in the JS VM... 


For our module, how would you like to have the name of functions and so one... ?

https://github.com/pixa-pics/pixa-pics.github.io/tree/main/src/js/utils/simdope
Github UI Widget CDN
Published: 2022-09-30 19:33:32

https://github.com/ahmetilhan24/github-ui-widgets
# Github UI Widget
![alt](https://media-exp1.licdn.com/dms/image/C4D22AQE5cN_je8e50w/feedshare-shrink_2048_1536/0/1664564320669?e=1667433600&v=beta&t=bfdRYkJ2XOH271_zpUm60B3XObKqgrqBNQZ8uSSJ5W0)
## Routes

- `:username/profile`
- `:username/:repo/commits`    
- `:username/repositories`

## Route Structure

#### Profile

- `:username/user-card`
- Allows you to retrieve a user's information such as followers, following, public repositories, gists
- **_Params_**: `username: string | required` Your Github username E.G. **`/ahmetilhan24/user-card`**
- **_Response_**:
  **`fullname, username, bio, public repositories, gists, follower, following`**
- **_Usage_**:
  ```html
  <iframe
    title="Github User Profile"
    width="310px"
    height="340px"
    src="http://localhost:5555/ahmetilhan24/profile"
  ></iframe>
  ```

> Not responsive

#### Repositories

- `:username/repositories`
- Lets you get public repositories
- **_Params_**: `username: string | required` Your Github username E.G. **`/ahmetilhan24/repositories`**
- **_Response_**:
  **`name, description, topics, language, start, forks`**
- **_Usage_**:
  ```html
  <iframe
    title="Github User Repositories"
    width="350px"
    height="340px"
    src="http://localhost:5555/ahmetilhan24/repositories"
  ></iframe>
  ```

> Not responsive

#### Commits

- `:username/repoName/commits`
- Lets you get commits of public repositories
- **_Params_**: `username: string | required, repoName: string | required` Your Github username E.G. **`repos/ahmetilhan24/github-ui-widgets/commits`**
- **_Response_**:
  **`commit msg, commit author`**
- **_Usage_**:
  ```html
  <iframe
    title="Github Commits"
    width="350px"
    height="340px"
    src="http://localhost:5555/ahmetilhan24/github-ui-widgets/commits"
  ></iframe>
  ```

> Not responsive

## LICENSE

**MIT**

_Coded by Ahmet ilhan **github@ahmetilhan24**_
The Best SvelteKit YouTube Tutorials – UPDATED on October 2022
Tags: sveltekit, svelte, tutorial
Published: 2022-09-30 19:09:54

SvelteKit is in its [release candidate](https://github.com/sveltejs/kit) phase now. The recent breaking changes get SvelteKit to a new level. 

But at the same time this changes made almost every older SvelteKit tutorial rather obsolete, including the ones I have listed in my older posts ([The Best SvelteKit YouTube Tutorials – UPDATED on Feb 2022](https://dev.to/kvetoslavnovak/the-best-sveltekit-youtube-tutorials-updated-4fba) and [The Best SvelteKit YouTube Tutorials](https://dev.to/kvetoslavnovak/the-best-sveltekit-youtube-tutorials-34oe)). 

So here is the new list of up to date SvelteKit YouTube Tutorials. Just hoping that other new ones will follow as SvelteKit will be more and more stable. 

&nbsp;

## [James Q Quick](https://www.youtube.com/watch?v=LMTfzyVJIXs&ab_channel=JamesQQuick)

{% youtube LMTfzyVJIXs %}

&nbsp;

## [Huntabyte](https://www.youtube.com/watch?v=EQy-AYhZIlE&list=PLq30BP0TIcqXP149TyFMfRhnMT6T5--e5&index=2&ab_channel=Huntabyte)

{% youtube EQy-AYhZIlE %}
[Full Playlist](https://www.youtube.com/playlist?list=PLq30BP0TIcqXP149TyFMfRhnMT6T5--e5)

&nbsp;

## [Joy of Code](https://www.youtube.com/watch?v=eVFcGA-15LA&t=3s&ab_channel=JoyofCode)

{% youtube eVFcGA-15LA %}
[Full Playlist](https://www.youtube.com/c/JoyofCodeDev/videos)

&nbsp;

## [LevelUpTuts](https://www.youtube.com/watch?v=i5zdnv83mxY&ab_channel=LevelUpTuts)

{% youtube i5zdnv83mxY %}
[Full Playlist](https://www.youtube.com/c/LevelUpTuts/videos)

&nbsp;

## [Johnny Magrippis](https://www.youtube.com/watch?v=dKv2eZITvcg&t=1770s&ab_channel=JohnnyMagrippis)

{% youtube dKv2eZITvcg %}
[Full Playlist](https://www.youtube.com/c/jmagrippis/videos)

&nbsp;

## [Wolfr](https://www.youtube.com/watch?v=bpHd_G6DHpc&ab_channel=Wolfr)

{% youtube bpHd_G6DHpc %}
Unpopular Opinion: “90% of Academic AI Research is Useless”
Tags: ai, devops, machinelearning, management
Published: 2022-09-30 18:49:47

{% youtube OKHguMfVSo8 %}

Ubisoft is bridging the gap between academics and video games, and Joshua Romoff, R&D Scientist, is here to discuss how. Join Joshua and host Conor Bronsdon as they discuss how 90& of academic research is useless when it comes to AI since it just never gets real world application, and how Ubisoft researches differently. Watch the full episode here ► https://www.youtube.com/watch?v=XUY2-ClVDx0

-------------------------------------

## [You’re invited to Interact on October 25th!](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)

*Want to know how engineers at Slack and Stripe connect their dev teams’ work to the business bottom line? Or how team leads at Shopify and CircleCI keep elite cycle time while minimizing dev burnout and maximizing retention?*

*These are just two of the topics we’ll tackle at [Interact](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog) on October 25th.* 

*A* ***free, virtual, community-driven engineering leadership conference,*** *[Interact](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog) is a one-day event featuring over 25 of the most respected minds in development, all selected by the thousands of engineering leaders in the Dev Interrupted community.* 

## [Register now!](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)


![Register now!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9xpvwbw5xfawom98qga.jpg)
1.1.0 New Version of Illa Opensource low code tool
Tags: opensource, lowcode, devtool, javascript
Published: 2022-09-30 18:43:45

Hey folks, Please check out new product: wwww.illacloud.com
Check out our project the latest 1.1.0 version  @github here: 
github.com/illa-family
If you have any questions with our product you can ask us in the Discord. 
With the latest version there are many new features enhanced, especially the following:

- Table 

- Chart

Those features can help you more about visualize data. If you have any questions about our product, you can join our Discord community either on Read.me page at Github or via Discord button at our Website.
Have A nice weekend
Valid Number
Published: 2022-09-30 18:27:40

**Challenge**
A valid number can be split up into these components (in order):

- 
A decimal number or an integer.

- 
(Optional) An 'e' or 'E', followed by an integer.


A decimal number can be split up into these components (in order):


- 
(Optional) A sign character (either '+' or '-').

- 
One of the following formats:

- 
One or more digits, followed by a dot '.'.

- 
One or more digits, followed by a dot '.', followed by one or more digits.

- 
A dot '.', followed by one or more digits.

An integer can be split up into these components (in order):

- 
(Optional) A sign character (either '+' or '-').

- 
One or more digit

Check [leetcode](https://leetcode.com/problems/valid-number/description/) for full code challenge 

**Approach**
The challenge looked so simple until I started solving it. My initial approach was to check the data type and return the appropriate result whether the conditions were true or false. However, this approach won't work for all type cases, so I had to use another approach which lead to using the regex or regular expression in python which helps to check a specified text pattern.

With this approach, I was able to check the validity of the input based on the expressions I specified.
IntellCreatio (Discord Bot Architecture)
Tags: discord, typescript, discordjs, node
Published: 2022-09-30 18:13:24

Greetings to all who have decided to read this post, in which I will talk a little about the architecture that I began to write literally not long ago, and I am looking for like-minded people who would like to develop this project together!

**What exactly is this?**
This is an architecture that aims to simplify and more efficient development of discord bots based on the popular library [discord.js](https://discord.js.org/#/)

**Description**
Discord API in recent years is very advanced and grows more and more functional which is already becoming difficult to manage (I tell you as a person who made bots for popular Russian-language discord servers).

It is not difficult to make a simple bot that writes something into a chat or mutilates and banishes participants if they have broken some certain rules.

And what to do if you need a bot on a particular server that will be responsible for the economy, mini-games built around this economy, convenience for moderators in the form of bans and mutes on roles.

When you start to talk about this unwittingly think that it is just as simple, but there is a problem that is very difficult to solve, over time, the code base grows surplus, or a set of utilities that could be put in separate packages or removed altogether, Working with the database, working over time - all this is very difficult.

## What supports the architecture at the moment?

1. Environment Vars (.env)
2. Database (TypeORM)
3. Full TypeScript (ts-node)
4. Flexible config file
5. Hot Reload
6. Interactions router
7. Locales (i18n)

**Interactions router**
Instead of creating a script that will automatically load commands or context menus, I decided to make a better way to load certain scripts.

There is a file called `interactions.json` this file has full links to some scripts.

```json
{
    "commands": {
        "example": "~/interactions/commands/example.ts"
    },
    "user_context_menu": {
        "Log in Console": "~/interactions/context_menus/example.ts"
    },
    "message_context_menu": {},
    "buttons": {
        "delete": "~/interactions/buttons/delete.ts"
    },
    "select_menus": {}
}
```

`~` - This is the path to the project root directory.

So our scripts can lie anywhere and we can turn them off at any time.

Contribute to this project <3 (Please help me!)

{% embed https://github.com/intellcreatio/intellcreatio %}
Follow Friday: Preptember Edition (30 September 2022)
Tags: meta, opensource, preptember, hacktoberfest
Published: 2022-09-30 17:56:25

---
title: Follow Friday: Preptember Edition (30 September 2022)
published: true
description: 
series: Follow Friday
tags: meta, opensource, preptember, hacktoberfest
---

_Happy Friday, friends! 🎉 Follow Friday is your weekly opportunity to shout out fellow DEV Community members doing awesome work. Check out the comments and follow someone new!_

Ahhh, Preptember! The month (or...week 😅) of preparation before the fun and chaos of [Hacktoberfest](https://hacktoberfest.com/) begins. Whether you're a maintainer or a contributor, it's always a good idea to get organized before diving into this annual open source celebration.

This week's topic encompasses multiple writing topics:
- Preptember
- Hacktoberfest
- Staying organized as an open source maintainer
- Staying organized as an open source contributor
- Tidying up your Github profile

So! Devs! Who are your favorite authors writing on any of the above topics?

_**Formatting tip**: to populate a card with a follow button, use the liquid tag syntax `{% embed https://... %}` and insert the URL of your favorite author's profile._

Join in on the #FollowFriday fun by @mentioning your favorite author to follow on the many topics of Preptember (and letting us know why you love their posts!) ⤵️
Azure Functions – Access has been blocked by CORS policy
Tags: azurefunctions, cors, serverless
Published: 2022-10-03 11:58:28

---
title: Azure Functions – Access has been blocked by CORS policy
published: true
date: 2022-09-30 17:46:25 UTC
tags: AzureFunctions,CORS,Serverless
canonical_url: https://jasonstcyr.com/2022/09/30/azure-functions-access-has-been-blocked-by-cors-policy/
cover_image: https://theagilecoder.files.wordpress.com/2022/09/a010-markuss-0666.jpg
---

It all started by trying to over-engineer things with an Azure Function. And then it wouldn’t work! This blog post is mostly for me so that I can find this stuff later when I inevitably hit the same CORS issue.

I had gone through the [whole Microsoft tutorial for JavaScript Azure Functions](https://docs.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-node), and then tested my Azure Function locally and remote via Visual Code’s built-in unit testing. When I tried to get my application’s JavaScript to call the function, I was suddenly blocked by a CORS issue.

## The Code
In my JavaScript, I have a very simple fetch call to my Azure Function:

``` javascript
fetch(`https://myfunction.azurewebsites.net/api/capturesubscribers?channelId=${channelId}`)
```

## The Error
Invoking this led to the following error:


> Access to fetch at 'https://myfunction.azurewebsites.net/api/capturesubscribers?channelId=REDACTED' from origin 'http://dev.local' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

##The Fix
A few Google results later, I found this StackOverflow question: [https://stackoverflow.com/questions/45332131/call-azure-function-from-javascript](https://stackoverflow.com/questions/45332131/call-azure-function-from-javascript)

The answer here confirmed that this is a CORS configuration on the Azure side that needs to be done in the Portal. From Visual Code I right-clicked on my Azure function and selected **Open in portal**:

![Image of context menu in Visual Code showing option to Open in Portal](https://theagilecoder.files.wordpress.com/2022/09/azurefunctions_openinportal.png)

This popped open the Azure Portal to the correct function in my subscription. On the left pane, I then scrolled down to the **API** section and selected **CORS**.

A CORS management panel loads up where I can enter allowed origins:

![A screenshot from the Microsoft Azure Portal showing the options to edit CORS allowed origins. The user has entered http://dev.local into the Allowed Origins section](https://theagilecoder.files.wordpress.com/2022/09/azurefunctions_configurecors.png)

From here I could add my local development URL and everything worked! HOORAY!
Obviously, later on I will have to add any staging or production hosting domains as well, but for now, I can move forward.
OSD600 Blog #5 - Lab 3
Published: 2022-09-30 17:36:15

For this weeks lab, we were tasked with creating two parallel branches on our program's repo, to create two new features. 

The idea behind this weeks activity was to get familiar with `git merge`, and the idea of `fast-forward` merges and `three-way recursive` merges. 

Originally, I forgot to create both issue branches at the same time (so that they would have the same "starting point"), and created a branch just for my first issue and then merged that when it was solved. But then I realized this defeated the purpose of this weeks activity, so I decided to add 2 additional features to that I could get some practice with git merge. 

My links are given below (note - Issues 25 and 26 were the ones that were incorrectly initiated):

[Project Repo](https://github.com/rokaicker/StaticSiteGenerator)

1 - [Issue #25](https://github.com/rokaicker/StaticSiteGenerator/issues/25) - Ability to specify HTML language.
[Merge Commit](https://github.com/rokaicker/StaticSiteGenerator/commit/bfb3b2cfe088e5f2284e51402e33b02f3b078bf1)

2 - [Issue #26](https://github.com/rokaicker/StaticSiteGenerator/issues/26) - Parse inline code blocks.
[Merge Commit](https://github.com/rokaicker/StaticSiteGenerator/commit/f4fb9a87f6f13ed12901ca7c07f45415f3991f9a)


3 - [Issue #27](https://github.com/rokaicker/StaticSiteGenerator/issues/27) - Parse markdown horizontal rules.
[Merge Commit](https://github.com/rokaicker/StaticSiteGenerator/commit/c45f2c21c18c54df893a0fc37257d1a14002704b)


4 - [Issue #28](https://github.com/rokaicker/StaticSiteGenerator/issues/28) - Parse single line blockquotes.
[Merge Commit](https://github.com/rokaicker/StaticSiteGenerator/commit/272b410f6f5dd0fda5d0fd77a8be1944811aa2b4)


For Issues 25 and 26, the "merges" were conflict free because of the wrong way I did them. But for Issues 27 and 28, I did encounter a "conflict" (shown below).


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

I thought it was interesting that Git will first prevent the merge from occuring (because of the presence of a conflict), and then actually modify your file to show you exactly where the conflict is occuring. I was able to quickly fix this issue, as all I had to do was separate the if-else statements. 

As I had mentioned in a previous blog post, I really wanted to take this course because I knew I'd get a chance to improve my git skills, and doing these weekly labs have really given me the chance to do just that. 

As for my project, I definitely have  alot of improvements to make (I beleive I have about 10 "issues" pending in my repo), and I look forward to seeing what improved versions of my project will look like!
Building advanced SQL search from a user text input
Tags: javascript, postgres
Published: 2022-09-30 17:29:50

We are going to build a program that parses user search query and serializes it into a SQL statement. Here is an example of a search query:

```
firstName:"Thomas" -jefferson birthdate:[1960 TO 1970] (profession:"inventor" OR profession:"engineer")
```

What this says is:

* Find records with first name "Thomas"
* Exclude mentions of "jefferson"
* Narrow down results to where the birthdate is between 1960 and 1970
* Narrow down results to where the profession is either "inventor" or "engineer"

In SQL, this could look something like:

```sql
"firstName" = 'Thomas' AND
"searchName" ILIKE '%jefferson%' AND
"birthdate" BETWEEN 1960 AND 1970 AND
(
  "profession" = 'inventor' OR
  "profession" = 'engineer'
)
```

It might not be the most succinct form of SQL to do the job, but it is good enough.

https://contra.com/p/WobOBob7-building-advanced-sql-search-from-a-user-text-input
How to make projects as a fresher
Tags: javascript, webdev, beginners, programming
Published: 2022-09-30 17:21:37



Hello all

If you are freshers or just learning things don't just directly jump on your idea of creating Facebook or another LinkedIn

🔥 Start with an easy project then slowly move towards complex projects  (make 6 to 7 projects)

🔥 List down all the functionality you want literally all

🔥 Then sort on the basis of  "MVP", "must have", "good to have"," time Raha to bna duga", 

🔥 Draw a bare minimum design on paper or Figma So that you don't have to refactor every time  And have a clear idea of what you are building 

🔥 Host your project somewhere no one is going to look them on  your localhost

🔥 Prepare a demo video host on YouTube (give a demo like you are giving a demo to clients believe me in the industry this is a very good skill and every developer has to give a demo to an actual client)

🔥 Challenge your friends to find bugs in it (bug nikaal dia to party duga)

🔥 Make projects in a timely manner (another very good trait of developers, in your job you have to give timelines for features, make sprints, and plan everything) don't demotivate yourself if you fail to develop in the sprint in the job , developers also fail to deliver the project on time 

🔥 Make a readme file the impact of the readme is very good when the interviewer look at the project this shows that you care about your project and haven't developed it just for the sake of the job 

Follow me on LinkedIn for more content https://www.linkedin.com/in/shadab-ali
How I cleared CKA exam?
Tags: kubernetes, cloudnative, linux
Published: 2022-09-30 17:18:36


Recently I cleared CKA exam by scoring 83/100 and now wanted to share my tips and tricks which might help you to crack it.

## Preparation
0. Please note before going CKA exam you should have a good understanding about linux administrator and container or docker.
1. You can start mumshad cka course from [kodekloud](https://kodekloud.com/courses/certified-kubernetes-application-developer-ckad) or buy [cka exam bundle](https://training.linuxfoundation.org/training/kubernetes-fundamentals-lfs258-cka-exam-bundle/) during exam registration.  Both are good resource for preparation purpose.
2. Wanted to get better knowledge about kubernetes then you can read blog of [iximiuz](https://iximiuz.com/en/categories/?category=Kubernetes)
3. Along with above you can also refer youtube video of [tech world with nana](https://www.youtube.com/watch?v=X48VuDVv0do)


## Practice, practice and practice
1. Along with theoretical knowledge from above preparation material, do as much as lab/exercise you can.
2. Along with exam buy, you will also get simulator like real exam for practice from [killer.sh](https://killer.sh/dashboard) . You get two sessions in the same simulator, both have the same questions. So do as much practice as you can. 
3. I feel questions provided from this [freecode](https://www.freecodecamp.org/news/how-to-become-a-certified-kubernetes-application-developer/) blog are useful for practice purpose. 

## Tips for exam
1. Time is key so use it wisely, don't stuck in any single question for long time instead flag it and try to solve it later if time permit.
2. Please note during exam they provide their own PSI browser so all bookmarks related to kubernetes won't work. 
3. Before starting on first question split your screen vertically in three part such as 20% for question part , 40% for terminal, 40% for firefox browser. Make sure to use as large monitor as possible mine was 24inch
4. Most important to update your .bashrc with following snippet
```bash
alias k='eval kubectl'
alias kf='kubectl create -f'
alias kg='kubectl get'
export do='--dry-run=client -o yaml'
export ex='--help | sed -n "/Examples:/,/^[A-Z]/p"' # eval in alias of k is important to execute ex
alias kc='kubectl config set-context '
```

This way you will save lots of time, you can use above command as below
```bash
# To create resource from file as pod.yaml
kf pod.yaml
# To show all service in default namespace
kg svc
# Create yaml file before creating resource
kubectl create deployment my-deploy --replicas 2 --image nginx $do > mydeploy.yaml
# See examples from help
k create role $ex
```
## Here is my certificate

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

### Best of luck for your exam.
If you want to get introductory information before deciding to go for exam , I would suggest to take a look on this article [Kubernetes – Basic Concepts](https://spacelift.io/blog/kubernetes-tutorial)