teleren/devto huggingface dataset:
Length of the Longest Alphabetical Continuous Substring
Tags: leetcode, javascript
Published: 2022-09-18 08:04:18

```js
var longestContinuousSubstring = function(s) {
let n = s.length, count = 1, ans = 1;
  for (let i = 1; i < n; i++) {
    let currCharcode = s.charCodeAt(i);
    let prevCharcode = s.charCodeAt(i - 1);
    if (currCharcode - prevCharcode === 1) count++;
    else count = 1;
    ans = Math.max(ans, count);
  }
  return ans;
};

```
Today's Fun Joke For Developers - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2022-09-18 08:00:13

---
title: "Today's Fun Joke For Developers - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125988c2636.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ Why did the web developer always go to the wrong hotel room?

___A:___ They were in room 301.
 -->
طراحی سایت صرافی انلاین
Tags: exchangesitedesign, exchangedesign
Published: 2022-09-18 07:11:49

امروزه با افزایش محبوبیت ارزهای دیجیتال در بین کاربران در سراسر جهان و همچنین استفاده روزافزون از ارزهای دیجیتال برای مقاصد مختلف، بسیاری از کاربران در سراسر جهان به دنبال بسترهای مناسب و قابل اعتماد برای خرید، فروش و مبادله ارزهای دیجیتال هستند.

در حال حاضر مردم در سرتاسر دنیا در حال تهیه ارزهای دیجیتال برای اهداف مختلفی مانند خرید و فروش کالا، پرداخت های برون مرزی یا کسب سود و درآمد ارزهای دیجیتال از نوسانات و روش های مختلف درآمدزایی هستند. این موضوع اهمیت [طراحی سایت صرافی آنلاین](https://changex.dev/) و دیجیتال را چندین برابر کرده است!
در صورت نیاز به دریافت راهنمایی و یا سوال در رابطه با نحوه سفارش، برآورد قیمت طراحی سایت صرافی، امکانات و یا… همین حالا با کارشناسان ما در شرکت طراحی سایت صرافی چنجکس ارتباط برقرار کنید.
Setting up the medusa server
Tags: javascript, webdev, beginners
Published: 2022-09-18 06:58:19

Regarding medusa, the project is made up of different building blocks.

For instance, you can run a server and separate admin panels or storefronts.
When it comes to all of these, the server is the heart of everything. It maintains the database and all the available actions.

Let's dive into that part, and I'll show you how we can set up the server and interact with it directly.

## Setting up the medusa server

The first step is to install the medusa-cli. This will help us set up the project quickly.

Run the following command in your terminal.

```bash
npm install @medusajs/medusa-cli -g
```

With this installed, we can create the server project. You can even go ahead and seed the database with dummy data.

```bash
medusa new medusa-server --seed
```

The project will be created in the `medusa-server` folder, and you can change this name in the command above to whatever you use.

It will take a while to install everything and seed the database. Once it's done, you can navigate to the folder.

```bash
cd medusa-server
```

And from there, we can start the server with the following command.

```bash
medusa develop
```

This should spool up the product, and you should eventually see it stating the server is available on port 9000.

## Connecting to the database

The default medusa server will work based on an SQLite database, and we can super easily connect to the actual file with any [database client](https://daily-dev-tips.com/posts/top-5-mysql-clients-for-mac/).

In this example, I'm using TablePlus to connect to the SQLite file at the root of the project.

![Medusa connection](https://cdn.hashnode.com/res/hashnode/image/upload/v1662619929745/VdGCBq6GY.png)

Once you're connected, you should see the seeded data available.

![Exploring the medusa database](https://cdn.hashnode.com/res/hashnode/image/upload/v1662619986582/C6buBfj1b.png)

## Viewing products

Another thing we can try out now is to test the actual API endpoints.

For instance, we can try and retrieve a list of all products.
This endpoint is available under: `localhost:9000/store/products`.

For example, when querying it with Insomnia, we can see all our products neatly listed.

![Insomnia query all products medusa](https://cdn.hashnode.com/res/hashnode/image/upload/v1662621363796/iC-ZQCBOi.png)

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
The TV Channel website template
Tags: javascript, webdev, programming, career
Published: 2022-09-18 06:29:39

<p>Do you think that website does better job than TV station?</p>

<p>Yes, because what TV station does is broadcasting pre-recorded videos and/or live videos, and we can do the same thing on website by broadcasting those kind of videos.</p>


<p>For this purpose, with the website template "The TV Channel", we can broadcast unlimited all kind of videos 24 hours per day and 7 days per week with no cost at all. What we need to do is uploading videos to YouTube channel and publishing them on our website, The TV Channel template will do everything for us by pulling the latest videos from the database as much as we want to continuously broadcast on the website.</p>

 
<p>
Moreover, unlike the regular tv station, The TV Channel website template also allow us to choose videos by category to watch. For example, we can choose to watch news, movies, entertainment... anything we like. Remember that with The TV Channel template, we can do anything that traditional tv station can do with no cost.</p>

 
<p>
In addition, with The TV Channel template, our website has larger coverage than which of the regular tv station. The coverage of the website built with The TV Channel template is worldwide.</p>

https://khmerweb.deta.dev/post/2ar0h0nneod8

<a style="width: 100%" href="https://khmerweb.deta.dev/post/2ar0h0nneod8"><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2o8c0kgbnv06j0xtquw.jpeg" style="width: 100%" /></a>
HOW TO COLLABRATE ON GITHUB
Tags: github, community, tutorial, git
Published: 2022-09-18 05:59:39

GitHub is an incredibly effective way to collaborate on development projects -track files -push.

One of the most important things to understand when getting started with collaboration on open-source projects, is to recognize your role. Often, there are plenty of things you as a developer can do that don’t involve being an extremely clever programmer. In fact, fear of being an inadequate programmer is often the reason why people don’t get in open-source projects to begin with.

Instead of trying to fix a major bug; or rewriting an entire module, try finding things like documentation inadequacies or cross device testing and patching or even simple syntax errors and grammar issues.

This kind of tasks are good way to get your foot in the door as a contributor to the project without trying to take more than you can handle.

## Learn the ecosystem of the project

> Don't be afraid to start small.

With any collaborative effort, a set of conventions has probably been adopted. This may include a vocabulary set, a way of contributing and formatting commit messages, a certain rhythm of collaboration, that the contributors have agreed to, or even syntactic standards that have been established.

Before you try to get involved with a project, read all the document related to these things. For instance, GitHub has standardized a [CONTRIBUTING .md](https://github.com/github/docs/blob/main/CONTRIBUTING.md) file. These guides are maintained by the people who also maintain the codebase and the master branch.

Another way of understanding the ecosystem is to simply look at the existing codebase and the Git log. Reading through the commit messages and perusing the code style can tell you a lot about a project. Read through the project’s documentation, and adopt the vocabulary used to that your contributions maintain continuity and portray a similar voice.

Once you’re part of the project’s cultural ecosystem, how do you actually contribute code?

## The pull request work flow for code contribution.

The work flow for contributing code can seem daunting at first. The most important thing to remember is to follow the patterns and standards outlined by the project you are working on. The general work flow that git hub supports is fairly simple.

1. Fork the repo to your own account.
2. Clone the repo to your local machine.
3. Check out a new ‘’topic branch’’ and move changes.
4. Push your topic branch to your fork.
5. Use the diff viewer on git hub to create a pull request via a discussion.
6. Make any requested changes.
7. The pull request is then merged(usually, to the master branch) and the topic branch is deleted from the upstream(target) repo.

> P.S: Found this in one of my Jotnotes. f you have valuable materials to recommend in references on this topic, do drop.
3 Best Books To Learn Python In 2022
Tags: python, books
Published: 2022-09-18 06:19:57

Learning Python is not an easy task. It requres time and effort as well to become master of it. Having Good Python books can help you to learn faster. That's the reason we have found 3 Best Books To Learn Python in 2022
**What is Python?**
Python is a programming language with many features and applications. It is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built-in data structures, combined with dynamic typing and binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. 

Python is quite different from most other languages, and it can take a while to get used to it. But once you do, the way you program will change for ever. In this article I’ll show you how to overcome some of the hurdles that come with learning Python. 

Why To Learn Python?
Python has become the most popular programming language in the world and is very versatile. Here are four reasons why you should learn Python. 
You can Download Free Python Book Here: [BooksGuru](https://booksguru.net/)

1.  Python is Easy to Learn
2.  It is most commonly used as a scripting language, but it can also be compiled into byte-code for use with other programs.
3. The syntax of Python is simple and easy to learn.
4. Used for Web development now

## 3 Best Books To Learn Python
**1) Python Crash Course**
Python Crash Course is a book that aims to teach beginners the basics of coding in Python. The book starts with the absolute basics and gradually builds up to more complex concepts. I found this book to be very well written and easy to follow. The author does a great job of explaining things in a way that is easy to understand. I would definitely recommend this book to anyone who is looking to learn Python.
**2) Think Python**
Python has been described as a "batteries included" language, with relatively few surprises for experienced programmers. It is very readable and sometimes considered easier to learn than other popular languages. Allen Downey's "Think Python" book aims to teach readers Python programming basics while also teaching good software engineering habits.


Downey begins with the absolute basics of programming and moves on to more complicated concepts from there. He includes many examples and exercises throughout the book.
The early chapters focus on learning to program in Python, while the later chapters focus more on software design issues.
**3) Learn Python 3**
If you're looking to learn Python 3, "Learn Python 3 the Hard Way" is a great choice for a beginner's book. The author, Zed A. Shaw, does an excellent job of breaking down the material into manageable pieces. The book starts with the absolute basics and gradually builds up your skills from there. By the end, you'll be able to confidently write your own programs in Python 3.
SSO (and MFA/2FA) for Sonatype Nexus Repository Manager | Microsoft 365 (Azure AD), Okta, Duo...
Published: 2022-09-18 05:35:30

https://www.youtube.com/watch?v=Y4DEiXjzGzc


This is a demo on how to use Datawiza to login user using Microsoft 365 (Azure AD) SSO for **Open Source** Sonatype Nexus Repository Manager. 

Datawiza works as a reverse proxy to enable SSO and MFA for Nexus by leveraging the Nexus Repository's Rut Auth capability: https://help.sonatype.com/repomanager3/nexus-repository-administration/user-authentication/authentication-via-remote-user-token

The solution works with any identity provider and MFA (2FA) service, like Microsoft 365 (O365; Azure AD), Cisco Duo, Okta, AWS, Google, Auth0, Ping, ForgeRock, OneLogin, ADFS.

Datawiza secures any web apps including:
- Business apps, like Oracle JD Edwards (JDE), PeopleSoft, E-Business Suite (EBS), Siebel, SAP and more. 
- Homegrown apps written in any language, like JAVA, PHP, .Net, Python, Go and more.
- Critical tools like Wordpress, Kibana, Kubernetes, Jenkins, Grafana, SuperSet, AirFlow and more. 

___________________________________________
Learn with Datawiza

The Datawiza blog - https://www.datawiza.com/blog
___________________________________________
Follow Us on Social

Join our Discord Community - https://discord.com/invite/Sn3nbc83Up
Follow us on Twitter - https://twitter.com/datawiza_com
Follow us on LinkedIn -  https://www.linkedin.com/company/datawiza/
Useful CSS Shorthand
Tags: css, webdev
Published: 2022-09-18 05:30:28

As a developer, we must try to minimize our code as much as possible, without affecting the efficiency of our program/code. Be it on front-end side, server side, back-side, database queries or design code. We should learn positive shorthand for the same. Here we are discussing some useful CSS Shorthand for developers.

## Font
Instead of
```
font-style: italic;
font-weight: bold;
font-size: 0.8em;
line-height: 1.2;
font-family: Arial, sans-serif;
```
use
```
font: italic bold 0.8em/1.2 Arial, sans-serif;
```

## Background
Instead of
```
background-color: #000;
background-image: url(images/bg.gif);
background-repeat: no-repeat;
background-position: left top;
```
Use
```
background: #000 url(images/bg.gif) no-repeat left top;
```

## Border
Instead of
```
border-width: 1px;
border-style: solid;
border-color: black
```
Use
```
border: 1px solid black;
```

## Margin
Instead of
```
margin-top: 10px;
margin-right: 15px;
margin-left: 20px;
margin: 25px;
```
Use
```
margin: 10px 15px 20px 25px;
```
Or instead of
```
margin-top: 10px;
margin-right: 10px;
margin-left: 10px;
margin: 10px;
```
Use
```
margin: 10px;
```

## Transition
Instead of
```
transition-property: all;
transition-duration: 3s;
transition-timing-function: ease;
transition-delay: 1s;
```
Use
```
transition: all 3s ease 1s;
```

## List
Instead of
```
list-style-type: disc;
list-style-position: inside;
list-style-image: url(disc.png)
```
Use
```
list-style: disc inside url(disc.png)
```
Supervised and Unsupervised Learning
Tags: machinelearning, beginners
Published: 2022-09-18 03:36:20

Supervised and Unsupervised Learning are an important part of Machine Learning. These two models of machine learning are used frequently in many works.

So what is Supervised Learning? Supervised Learning is that part of machine learning which takes an input x and gives a corresponding output. We can take the example of house price predictor. For predicting the price of the house, we can take the size of the house as input x and predict the price of the house. But how will we do this? First, let's see the graph of size and price of the house.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pzsg777ybmosytuay3jy.png)
In this graph we have plotted some points for house price. Now we can pass a straight line through these points and this straight is the prediction of the house of the house like this image below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qg42twp8r4tehaizww82.png)
This method of passing a straight line for predicting an output is called regression. There is another part of Supervised Learning which is called classification. It has a fixed set of outputs. We can take the example of spam detection for an email. In this case, we can have only two outputs which are that the email will be a spam or it won't.

Now we can talk about Unsupervised Learning. Unlike Supervised Learning, Unsupervised Learning is used to find a pattern within a data and  seperating a boundary for the data. We an see the example in the following graph.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebl5zilctciv30d2wk8o.png)
Clustering is a good example of Unsupervised Learning.
In conclusion, Supervised Learning Learning takes an input variable x and finds the corresponding output y and Unsupervised Learning finds a pattern within the data and predicts a solution for the data.
CSS Icon: Google Photos
Tags: css, webdev, beginners, tutorial
Published: 2022-09-18 05:13:00

I will create the **Google Photos** icon in this article using CSS only. Let's look at how we do that.

## Problem

![problem](https://imgur.com/MKql9lI.png)

## Solution
### Video

{% youtube https://youtu.be/eTd-511xwME %}


First, we need to create the structure for this logo then we will style that structure.

### HTML 

```html
<div class="wrapper">
  <div class="yellow"></div>
  <div class="red"></div>
  <div class="green"></div>
  <div class="blue"></div>
</div>
```

### CSS 

```css
.wrapper {
  width: 200px;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.yellow, .blue {
  width: 100%;
  height: 55%;
}

.red, .green {
  width: 55%;
  height: 100%;
}

.yellow {
  border-radius: 1in 1in 0 7px;
  place-self: end;
  background: #fbbc01;
}

.red {
  border-radius: 7px 1in 1in 0;
  background: #ea4132;
}

.green {
  border-radius: 1in 0 7px 1in;
  place-self: end;
  background: #069e57;
}
.blue {
  border-radius: 0 7px 1in 1in;
  background: #4086f4;
}
```

### Codepen 

{% codepen https://codepen.io/j471n/pen/mdLWZNq %}

## Wrapping up

If you have any queries, feel free to drop a comment below. This is a series of CSS Icons so make sure you follow for more such articles. If you like this then don't forget to ❤️ it. And I'll see you in the next one.


### 🌐 Connect with me:
[Twitter](https://twitter.com/j471n_)
[Github](https://github.com/j471n)
[Instagram](https://www.instagram.com/j471n_/)
[Newsletter](https://www.getrevue.co/profile/j471n)
[LinkedIn](https://www.linkedin.com/in/j471n/)
[Website](https://j471n.in)
[Buy me a Coffee](https://buymeacoffee.com/j471n)
42. Leetcode solution in python3
Tags: python3, python, programming
Published: 2022-09-18 04:56:58

```
class Solution:
  def trap(self, height: List[int]) -> int:
    n = len(height)
    l = [0] * n  # l[i] := max(height[0..i])
    r = [0] * n  # r[i] := max(height[i..n))

    for i, h in enumerate(height):
      l[i] = h if i == 0 else max(h, l[i - 1])

    for i, h in reversed(list(enumerate(height))):
      r[i] = h if i == n - 1 else max(h, r[i + 1])

    return sum(min(l[i], r[i]) - h
               for i, h in enumerate(height))

```


#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/trapping-rain-water/
Laravel pagination: serial problem (serial starts with 0)
Tags: laravel, php, paginate, webdev
Published: 2022-09-18 04:54:59

When you use Laravel default pagination, you may face a problem with its Key. If you use Key as the serial number, when you go to the second page, the key starts from 0. 

To fix this, several methods can be applied. There are some build-in function. But these have a version issue. That's why, I can show you a way without using build-in version.

At first, let's see the url. 

> https://pgnbd.com/registration/view?page=2

This is the url when you are in second page. Similarly, when it's third page, the url is:

> https://pgnbd.com/registration/view?page=3

So, we can catch the _page_ parameter into a variable by this.

` if(isset($_GET['page']))
     $i=  $_GET['page']-1;
  else
     $i = 0;`

The _else_ portion is for the first page where you can't find any page parameter. Suppose you show 20 data in a page using paginate like this `paginate(20)`. Then you can write the serial number like this.

` @foreach ($gallery as $key=>$item)
       {{($key+1) + ($i*20)}}
  @endforeach
`

Happy coding 😎!!
Colorize GCP Console based on project ID
Tags: gcp, googlecloud
Published: 2022-09-18 04:52:55

Managing multiple projects with multiple environments, you might want to have a way to differentiate production projects from others in Console. 

There is a Chrome extension **GCP Console Colorize** offered by Yuki Furuyama that helps to change the header color based on project ID.

https://chrome.google.com/webstore/detail/gcp-console-colorize/higjahjicmccalicmgfpokdmooopdhej

The extensions works with RegEx so you can define rule for all project that ID ends with -prod. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/91nclmcd4xjkcg0dhdem.png)
Best Software For Make a Professional Flowchart.
Tags: javascript, beginners, programming, productivity
Published: 2022-09-18 04:48:32

hello, edrawmax 12 is a professional tool. It offers you to make a professional flowchart of business or education related. You can easily download and install it. [edrawmax crack](https://crackwinx.com/edraw-max-crack-activation-key-download/) This program provides you a lot of templates of chart. You can also select and use it our data.
Difference Type of Console in JavaScript
Tags: javascript, beginners, tutorial
Published: 2022-09-18 04:25:23

Hi Every one Welcome back. This time I have come back with types of console in JavaScript. well the beginners think there is one type of **console.log()** but there are more than one types like 

1.console.log()
2.console.info()
3.console.clear()
4.console.error()
5.console.warn()
6.console.assert()
7.console.count()
8.console.trace()
9.console.table()
10.console.time() and console.timeEnd()
11.console.group() , console.groupEnd() and console.grupCollapsed()

this many types of console are there let us start

**1.console.log()** 
As a new programmer you have learned to display the program from console.log() and console.log() displays the mathematical expressions.

```
console.log('name');          

console.log(1);

console.log(true);

console.log(['a','b','c','d']);

console.log({ one: 1, two: 2, three: 3 });`
```
you can check out the output it will make you pratice.


**2.console.info**
it is same has console.log() but little difference. it use to display important message to console.

```
console.info('This is information');

console.info({firstName : 'abc', lastName : 'xyz'});

console.info([1,2,3,4,5]);
```


**3.console.clear()**
It is as simple as the name. it used to clear the mess in the   console

```
console.clear();
```


**4.console.error()**

the heading only tell you what it will do. this method was developed by debugging only.

```
console.error('Error on line 1');
```


**5.console.warn()**

this method is used to display the warning message when any thing is going wrong.


```
console.warn("This is a Warning");
```

other six will share infomation on other post.