teleren/devto huggingface dataset:
My FrontEnd Stack
Tags: javascript, webdev, react, discuss
Published: 2022-01-03 03:10:13

Here is my frontend stack for webapps developed in 2021.

**ReactJS**: Https://reactjs.org/docs/getting-started.html

**Material UI**: https://material-ui.com/getting-started/usage/

**Styled-Component**:https://styled-components.com/docs

To make a API call, I had decided to use Fetch API with react-query

**Fetch API**: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API	

**React-query v2**:https://react-query-v2.tanstack.com/docs/overview

For state management:

**React Context API**:https://reactjs.org/docs/context.html

**Zustand**:https://github.com/pmndrs/zustand

For Testing:

**Unit Testing**: https://jestjs.io/

**E2E Testing** : https://www.cypress.io/ 

For SSR:
	**GatsbyJS**: https://www.gatsbyjs.com/docs/



For developing Micro Frontend App

**Single-Spa**
	https://single-spa.js.org/docs/getting-started-overview



For creating and maintaining component design system

**Figma**:https://www.figma.com/
**StoryBook**:https://storybook.js.org/docs/react/get-started/introduction

For setting up monorepo:

**Lerna** : https://github.com/lerna/lerna
**Yarn**  :  https://yarnpkg.com/



**Build**
	Webpack: https://webpack.js.org/


For building CLI
	**CommanderJS**: https://github.com/tj/commander.js


What was your tech stack and tools ? What did you add/remove to your tech stack in 2022?


Cover Photo by <a href="https://unsplash.com/@ibrahimboran?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Ibrahim Boran</a> on <a href="https://unsplash.com/s/photos/2021?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
How To Create Cron Job Schedule In Laravel 7/8
Tags: laravel, cronjob, schedule, laravel8
Published: 2022-01-03 02:57:59

In this tutorial I will show you how to create cron job schedule in laravel 7/8. many time we require to run some piece of code specific interval time period in laravel and we need to run manully every time but command scheduler through we can run and create cron job in laravel 7/8.

You may define all of your scheduled taks in the schedule method of your application's App\Console\Kernel class. In this example create cron job schedule in laravel 7/8 and  how to run cron job in laravel 7/8 and how to create custom command in laravel 7/8.

First of all you need to create custom command it will execute with task scheduling scron job.

---

> **_[Read More : How To Create Cron Job Schedule In Laravel 7/8](https://techsolutionstuff.com/post/how-to-create-cron-job-schedule-in-laravel-7-8)_**
Field level security in the Dataverse
Tags: powerplatform, powerapps, dynamics365, dataverse
Published: 2022-01-03 02:01:09

#Introduction

Whilst the Dataverse supports permissions at the table or row level, there may be times you need more granular security permissions on the individual field level. 

Dataverse supports this with Column Security Profiles. They are easy to set up and this article will provide a quick example to get you started.

# 1. In any table, create new field called PrivateValue and make sure Column Security is enabled.

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

# 2. Add this field to a form

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

# 3. Create a new Column Security Profile 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z6gaon1plsdooc4cimaw.png)
 
# 4. Configure it so you have access to the field

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/td5mzgw76qdv2920m0qs.png)
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j9g5wecij3tx3oi6bzsb.png)
 
# 5. Publish and test by navigating to the form

For someone with access, it should appear like this
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmwgnmsq4wtkyjo940hj.png)
 
For someone without access, it should appear like this

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


# 6. Resources and final comments

Note that this isn't available for some of the system fields (for example, you can't enable field security for a Status Reason or Status field in a table).

Note that in your column security profile, you can provide different levels of permissions on the field (read only, create etc).

For more information see this [link](https://docs.microsoft.com/en-gb/power-platform/admin/field-level-security).
Top 10 Most Popular PHP Frameworks To Use in 2022
Tags: php, laravel, webdev, programming
Published: 2022-01-03 01:42:23

**Top 10 Most Popular PHP Frameworks To Use in 2022**

In this blog, we are going to see Top 10 Most Popular PHP Frameworks To Use in 2022. We will discuss their features and which companies are using. They’re all diverse and cater to various demands, so make sure you choose the proper one for your project.

Laravel
Symfony
Codelgniter
Cake PHP
Zend
Yii
Fuel PHP
Phalcon
PHPixie
Slim

### [Click Here](https://codexashish.blogspot.com/2022/01/top-10-most-popular-php-frameworks-to.html) to read this post in detailed.
If any querry then comment below.

_Thanks_
Tree-based Plots in NetworkX
Tags: python
Published: 2023-01-05 22:43:54

---
title: Tree-based Plots in NetworkX
published: true
date: 2022-01-03 01:36:41 UTC
tags: Python
canonical_url: https://brandonrozek.com/blog/networkxtree/
---

A graph in D3 and NetworkX can be represented as a JSON file.

Example:

```
{
    "nodes": [
        {"id": 1, "name": "A"},
        {"id": 2, "name": "B"},
        {"id": 3, "name": "C"}
    ],
    "links": [
        {"source": 1,"target": 2},
        {"source": 1,"target": 3}
    ]
}

```

The `nodes` entry in the JSON is a list containing a `node` object. Each `node` object has a unique id and a name which can appear inside the node in the drawing.

The `links` entry in the JSON is a list of `link` objects which each denote a (directed) edge between a source and target id.

To run the following script you’ll need `graphwiz` installed on the system. You’ll also need to have the python packages `networkx` and `pydot`.

```
import networkx as nx
from networkx.readwrite import json_graph
from networkx.drawing.nx_pydot import graphviz_layout
import matplotlib.pyplot as plt

# Replace graph_json variable with JSON representation of graph
graph_json = {"nodes": [{"id": 1, "name": "A"},{"id": 2, "name": "B"}],"links": [{"source":1,"target":2}]}

node_labels = {node['id']:node['name'] for node in graph_json['nodes']}
for n in graph_json['nodes']:
    del n['name']
g = json_graph.node_link_graph(graph_json, directed=True, multigraph=False)
pos = graphviz_layout(g, prog="dot")
nx.draw(g.to_directed(), pos, labels=node_labels, with_labels=True)
plt.show()

```

Given the JSON from the top of the post it’ll produce:

![image-20220103000837137](https://brandonrozek.com/files/images/blog/20220103000837137.png)
Want to learn Rust Programming Language 
Tags: rust, tutorial, programming
Published: 2022-01-03 01:33:58

Hey if you want to learn **Rust Programming Language** I will be making a series of Rust videos on my YouTube channel you can ask me anything in comments if you have any doubts and I will surely reply. I want everyone to know this great language. I’m planning to make some projects for the course too. We will be using rocket framework for making an web api. We will use image crate for image manipulation.

[**CLICK HERE TO GET STARTED**](https://youtu.be/l7rbqL20evY)
JavaScript Dev Learning Journey - Leap Year!
Tags: javascript, beginners, tutorial, programming
Published: 2022-01-03 00:55:39

I am currently picking back up on assignments I have been working on to improve my JavaScript self-learning journey and currently doing a program to determine if a year given is a Leap Year or not! What better way to start a new year :-)

My first step right away was looking up the method of how to determine if a year is a leap year, which I found out through a [Microsoft docs ](https://docs.microsoft.com/en-us/office/troubleshoot/excel/determine-a-leap-year) which states the following:


>**Any year that is evenly divisible by 4 is a leap year: for example, 1988, 1992, and 1996 are leap years.**

Which seems pretty easy ! Right away I knew I would be coding a conditional statement so I wrote up the following:

```javascript
const leapYears = function (yearNum) {
   
    if (yearNum % 4 == 0) {
        return true;
    }else{
        return false;
    }

};

```
Of course, as I was going through the tests, thinking I am in the clear, I knew a part of me felt that this was too easy/good to be true. Sure enough, I ran into a problem where my test failed when the year was 1900 for example. So what I decided to do was go back to documentation to see if there's anything about that and sure enough:

> _**However, there is still a small error that must be accounted for. To eliminate this error, the Gregorian calendar stipulates that a year that is evenly divisible by 100 (for example, 1900) is a leap year only if it is also evenly divisible by 400.**_

So that means although 1900 works with 100, it doesn't work with 400 and therefore is not a leap year!

So, now I need to account for how to make a number go through several checks:
1. Make sure it is divisible by 4. 
2. Check to see if it's divisible by 100 AND 400 after checking if divisible by 4. 
3. If it's divisible by 100 but NOT 400, it's not a leap year. Same if it's flipped around. 

That's a simple fix! Taking my previous code, I've updated it to the following:

```javascript
const leapYears = function (yearNum) {
   
    if (yearNum % 4 == 0 && yearNum % 100 == 0 && yearNum % 400 == 0) {
        return true;
    }else{
        return false;
    }

    //Any year divisible by 4 is a leap year.
    //Check if divisible by 3 numbers: 4, 100, and 400. 
    //if-statements on passing all three conditions to be leap years


};

```

Where yearNum is checked to have a remainder 0(hence the usage of % to show if it's divisible by a number) with 4, 100, AND 400. This will cover the cases where it can be divisible by 4 and 100 BUT not by 400, making it NOT a leap year. This goes the same if divisible by 100 and 400, but not 4 in addition to divisible by 400 and 4, but not 100.

And no-- 2022 is not a leap year. 2024 is when we will have our next leap year!
3 services for someone who hates using a mouse🐭
Tags: vim
Published: 2022-01-03 00:45:08


Using a mouse on computer is no more than one little action but, it could be a stressful experience when it comes to handling repeated tasks.
Today, I want to introduce 3 nice services for someone who hates using a mouse.
Let's get it started!


## 1.[Rectangle](https://rectangleapp.com/)
In short,Rectangle is **an app that allows you to adjust the size and position of window so easily and smooth**
.

With a combination of [option]＋[control]＋[(several keys)],you can move windows to anywhere in the desktop (to the bottom or corner or center or etc) or adjust their size.

You can also move windows in between multi displays with this app without using a mouse.

Here's a short movie of this app's [demo](https://www.youtube.com/watch?v=AaZiA43Jm90).


## 2.[Rearrange Tabs](https://chrome.google.com/webstore/detail/rearrange-tabs/ccnnhhnmpoffieppjjkhdakcoejcpbga?hl=ja)
Rearrange Tabs is a Chrome extension that allows you to change the order of tabs with keyboard.

With [shift]＋[control]＋(←or→)　,you can change the order of tabs in the browser so easily.

Here's a short movie of this app's [demo](https://www.youtube.com/watch?v=A1X3geKtF8A)

## 3.[Vimium](https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=ja)

Vimium is a Chrome extension that allows you to create shortcuts to almost every link in the browser.
Tap [f] or [shift]＋[f],then you will see yellow shortcut keys to every link in the web page. (see down below)

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

Goodbye to those days you were mashing [tab] key not to use a mouse.



Thanks to the ones who created those 3 nice services.
Longest Word Algorithm
Tags: algorithms, javascript
Published: 2022-01-03 00:07:25

In this post I will explain how to solve the longest word algorithm problem. This challenge asks to: return the longest word in a sentence as a string. If there are multiple words of the same length, return array. 

Step 1. 
Remove punctuation (like commas and periods). We will use .match on this to return a filtered array. 

``` function longestWord(sentence) {
    const words = sentence.match(/[a-z0-9]+/g) //global so it doesn't stop at first 
} ```

Step 2. Sort by Length

We will use .sort and compare the words based on length in each iteration. They will be returned in sorted order. 

`function longestWord(sentence) {
    const words = sentence.match(/[a-z0-9]+/g)
    const sorted = words.sort(function(one, two){
        return two.length - one.length
    });
  const longestArray = sorted.filter(function(word){
        return word.length === sorted[0].length;
    });
}`

Step 3. Handle multiple words by putting them into array. 

`function longestWord(sentence) {
    const words = sentence.match(/[a-z0-9]+/g)
    const sorted = words.sort(function(one, two){
        return two.length - one.length
    });
  const longestArray = sorted.filter(function(word){
        return word.length === sorted[0].length;
    });
}`

Step 4. Check array length, and return based on length. 

``` 
function longestWord(sentence) {
    const words = sentence.match(/[a-z0-9]+/g)

    const sorted = words.sort(function(one, two){
        return two.length - one.length
    });

  const longestArray = sorted.filter(function(word){
        return word.length === sorted[0].length;
    });
}
 ```
Azure Functions University - HTTP Lesson (.NET 6)
Tags: azure, serverless, programming, dotnet
Published: 2022-03-16 20:08:20

---
title: Azure Functions University - HTTP Lesson (.NET 6)
published: true
date: 2022-01-03 00:00:00 UTC
tags: azure, serverless, programming, dotnet
canonical_url: https://blog.marcduiker.nl/2022/01/03/azfuncuni-http-lesson-dotnet6.html
series: Azure Functions University
---

![Http Lesson .NET 6](https://blog.marcduiker.nl/assets/2022/01/03/AzureFunctionsUniversity_HTTP_Lesson_dotnet6.png)

Hi serverless friends, we have a new Azure Functions University lesson for you! In this lesson we will learn how to use the HTTP trigger in Azure Functions written in .NET 6.

<!--more-->
## Lesson

You can find the lesson on GitHub: [HTTP Trigger (.NET 6)](https://github.com/marcduiker/azure-functions-university/blob/main/lessons/dotnet6/http/README.md).

And you can watch the video on YouTube:
{% youtube aifFp86G3tI %}

The lesson consists of the following exercises:

| Nr | Exercise |
| --- | --- |
| 0 | Prerequisites |
| 1 | Creating a Function App |
| 2 | Changing the template for GET requests |
| 3 | Adding a BadRequest response |
| 4 | Handling POST requests with string data |
| 5 | Handling POST requests with JSON data |
| 6 | Changing the route for a custom greeting |
| 7 | Homework |
Newbie In Technical Writing Space, What are Your Thoughts?
Tags: writing, tutorial, beginners, discuss
Published: 2022-01-02 21:32:44

Gooday to anyone reading this. Preciate you for taking out time to listen to what a newbie has to say

So I just started technical writing, trying to get my feet wet in the tech industry. Still learning other things on the side but I'd like to get your thoughts. Kindly leave a comment below if you can, thanks!
Attribute-Based Access Control Sample for a .Net Core API Application
Tags: dotnet, authorization, authentication, permissions
Published: 2022-01-02 21:15:02

GitHub Link: github.com/venbacodes/ABAC-Sample-for-API

This is a simple demo sample on implementing ABAC in a .Net Core API Application. This uses three main aspects of Attributes => ACCESS, SCOPE, and MODULE.

## Key Points

1. Access, Scope, and Module attributes are used
2. It is possible to extend this sample to accommodate as many attributes as needed
3. No External libraries were used
4. Handled all the necessary authn and authz in the handlers itself.
5. Optional takeaway - added an additional path for restricting resources in [PermissionsAuthHandler.cs#L60](https://github.com/venbacodes/ABAC-Sample-for-API/blob/main/Authorization/PermissionsAuthHandler.cs#L60)

## To Explore
1. Clone and run the code
2. Generate a JWT token with email/sub and exp. Applicable emails can be found in [TestUsers.cs](https://github.com/venbacodes/ABAC-Sample-for-API/blob/main/Model/TestUsers.cs)
3. Add the generated JWT token in the swagger authorization menu and call the APIs
🥳 How to Get More Stars on Github! (Part 2)
Tags: discuss, tutorial, opensource, github
Published: 2022-01-02 21:05:05

I’ve been working on [eaf-linter](https://github.com/fairfield-programming/eaf-linter/) for about a few days now, and it already has 6 stars and 2 forks. My other project that I've been working on, [the Backend Server](https://github.com/fairfield-programming/backend-server/), has 14 stars, 9 forks, and nearly 10 outside contributors. That might not sound like a lot, but both of these projects are only about a week old.

**So, how did I do it?**

The most important thing has been issues, [which I talked about here](https://dev.to/williammcgonagle/how-to-get-more-stars-on-github-5a66). But, the second most important thing has been designing a great readme. 

__A good readme is the difference between someone staring your project and someone ignoring it.__ If you have badges, easily understandable features, and lots of images, you have a star worthy repository. 

First, you need to have badges. If you don't know what a badge is, it's the little image that says how many stars, downloads, etc. a project has. These are also known as shields, and you can get them from [this website](https://shields.io/). If you have a ton of them and they all say good things, it increases the confidence that someone has in your project. 

Secondly, you need easily understandable features. If you look at my newest repository, [eaf-linter](https://github.com/fairfield-programming/eaf-linter/), you will see that all of the features have a simple headline and they link to a new page. __This is very important__. If your feature can link to a more in depth description of the feature, it will increase the confidence that the possible contributor has in your project. 

Finally, images are super important. In my [backend server](https://github.com/fairfield-programming/backend-server/), I have a ton of really eye-catching images. These images increase the likelihood that someone will keep looking through your readme, and the longer that the person stays on your page, the more likely they are to star your repository. 

There will be more tips like this coming tomorrow and the day after, so if you liked hearing this, make sure to follow me, so you can see more tips as they come out.

Also, our open-source, non-profit is [hiring right now](https://www.linkedin.com/company/fairfield-programming) if you're interested. Don't forget to follow us on LinkedIn.
AgnosticUI—One stylesheet…all the frameworks!
Published: 2022-01-02 20:45:23

---
title: AgnosticUI—One stylesheet…all the frameworks!
published: true
description: Easily build design systems that works in React, Vue 3, Angular, and Svelte!
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kkbmja6r0u0amzgg05vv.png
---

# AgnosticUI

Check it out here: [AgnosticUI Site](https://agnosticui.com)

:boom: Easily build design systems that works in React, Vue 3, Angular, and Svelte!

:raised_hands: Semantic and accessible HTML

:muscle: Unprocessed decoupled CSS

:zap: One stylesheet per component propagates to all framework 
implementations

:paintbrush: Synchronized theming via CSS custom properties

Built with :yellow_heart: by Rob Levin

#javascript #css #uicomponents #ui #design
Android TV — Leanback Kavramı
Tags: nrkdrk, android, leanback, smarttv
Published: 2022-01-02 20:29:00

Android Tv, Google tarafından smart tv’ler için geliştirilmiş bir İşletim Sistemidir. Google bu işletim sistemini Google Tv’nin yerini alması için geliştirmiştir. Google Tv bir çok açıdan başarısız bir girişim olarak kabul edilmektedir. Geliştirilmiş olan bu yeni platform Sony, Philips gibi markalar tarafından smart tv katmanı olarak kabul gördü. Android Tv içerisinde Chromecast dahil edilerek geliştiriciler ve kullanıcılar için harici android cihazlar üzerinden tüm medya cast işlemleri daha esnek ve kullanışlı hale getirildi.

[adres](https://medium.com/@nrkdrk/android-tv-leanback-kavramı-3dd5436ff346?p=3dd5436ff346)
Android Leanback Kütüphanesi — Manifest Ayarları
Tags: nrkdrk, android, leanback, smarttv
Published: 2022-01-02 20:27:59

Leanback kütüphanesi, geliştiricilerin uygulamalarının önemli bölümlerini hızlı bir şekilde geliştirebilmeleri için hazır kalıp bir kullanıcı arayüzü sağlar. Hazır kalıp sayfalar,dialoglar ve benzeri yapılar barından Leanback kütüphanesini detaylı bir şekilde inceleyelim.


[adres](https://medium.com/@nrkdrk/android-leanback-kütüphanesi-manifest-ayarları-9cb65b51da63?p=9cb65b51da63)
Laravel Searchable ile Birden Fazla Model’de Arama Yapın
Tags: nrkdrk, laravel, php, search
Published: 2022-01-02 20:26:41

Laravel Searchable Nedir?
Harici dış bağımlılıklar olmaksızın, model veya modeller içerisinde arama işlemlerini kolay,etkili ve düzenli bir şekilde yapmamızı sağlayan bir paket olarak önümüze gelmektedir. Bazı durumlarda proje içerisinde büyük çaplı arama işlemleri yapmak zorunda kalabiliyoruz. Bu durumlarda yetenekli olduğuna inandığım bir pakettir Searchable. Basit bir örnekleme ile Searchable kullanımını anlatmaya…


[adres](https://medium.com/@nrkdrk/laravel-searchable-ile-birden-fazla-modelde-arama-yapın-95bb38539a29?p=95bb38539a29)
Update on Log 4j vulnerability
Tags: log4j, security, vulnerability, patchupdate
Published: 2022-01-02 20:10:32

please check out how to resolve Log 4j vulnerability:

https://www.zdnet.com/article/apache-releases-new-2-17-0-patch-for-log4j-to-solve-denial-of-service-vulnerability/?ftag=TRE-03-10aaa6b&bhid=%7B%24external_id%7D&mid=%7B%24MESSAGE_ID%7D&cid=%7B%24contact_id%7D&eh=%7B%24CF_emailHash%7D
Desestruturação para variáveis já existentes
Tags: javascript
Published: 2022-01-02 19:44:35

É possível utilizar desestruturação para variáveis ao invés de sempre criar novas.

Por exemplo, caso tenhamos um objeto como o a seguir:

```javascript
const user = { name: "Eduardo", age: 39 };
```

Podemos fazer a desestruturação com a seguinte sintaxe:

```javascript
const { name, age } = user;

console.log(name); // Eduardo

console.log(age); // 39
```

Porém se as variáveis `name` e `age` já tiverem sido declaradas no mesmo escopo, será necessário desestruturar e renomear ao mesmo tempo:

```javascript
const { name: newName, age: newAge } = user;

console.log(newName); // Eduardo

console.log(newAge); // 39
```

Para atribuir a desestruturação para as variáveis declaradas anteriormente, utiliza-se a seguinte sintaxe (parênteses na declaração):

```javascript
let name = "Fulano",
  age = 22;

({ name, age } = user);

console.log(name); // Eduardo

console.log(age); // 39
```

Atualização: também funciona com _arrays_. Inclusive, nesse caso, utilizando _;_ no fim das sentenças, não é necessário o parênteses.
The Weekly Dev - 202201
Published: 2022-01-02 19:41:59

---
title: The Weekly Dev - 202201 
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
canonical_url: 'https://kevwe.com/weekly/202201'
---

We the Devs

If you are willing to have your code customer-facing in some way and maybe also open on the internet, you will definitely have to deal with authentication, security schemes and - in some measure - be aware of the proper ways to use cryptography for your own good and for GDPR compliance, whether your are in the EU or not:

https://kevwe.com/weekly/202201