teleren/devto huggingface dataset:
Hi, New Dev World
Published: 2022-11-01 05:42:08

Hi, 
This is Ankit Mishra, I'm a software developer. I got this platform quite interesting. So I thought I should also share some of my knowledge and gain some knowledge from lots of developers.
I see technology is changing new world for lots of its core thinking. 
https://github.com/kdeldycke/awesome-falsehood#software-engineering
I got this git repo quite amazing, worth it for reading for people want to grow in software engineering.
It is a real way of adjusting the code and find the solution.

Hope you enjoy this repo.
How To Get Current Week Records In MySQL Query
Tags: laravel, php, mysql, database
Published: 2022-11-01 05:30:00

This article will show how to get the current week's records in MySQL query. We often get the current week's records or fetch this week’s records for reporting and analysis. So, we will learn how to get current week data in MySQL laravel PHP. For getting data for the week in MySQL we use the week() function. MySQL week() returns the week number for a given date. The return value is from 0 to 53.

So, let's see an SQL query to get the current week's data or get the current week's data in laravel.

> Get Current Week Records In MySQL Example:

In this example, we will see an SQL query to get data for every hour in MySQL.

id | order_date | amount
---+------------+-------
 1 | 2022-01-31 | 150
 2 | 2022-02-02 | 200
 3 | 2022-02-03 | 100
 4 | 2022-02-04 | 300
 5 | 2022-02-05 | 200
 7 | 2022-02-06 | 190

In your table, the record needs to be like date and amount.

```
select * from users where week(order_date) = week(now());
```

In the above query, we use the now() function to get the current date, and the week() function to get the week number of date values. So, we select rows whose order_date’s week number is the same as the week number of today’s day.
 
Using the week() function we can get the week number like the below query.

```
SELECT WEEK("2022-02-05");
```

Output:

```
Week Number: 5
``` 

Find the current week number using the week() function.

```
SELECT WEEK(NOW()) AS Current_Week;
```

Output:

```
Current_Week: 39
```
Projects for Diploma Students
Tags: javascript, beginners, diploma, webdev
Published: 2022-11-01 05:29:40

 
Takeoff Edu Group provides the most creative conceptions and ideas that can make very effective final year projects for scholars, experimenters, and engineers. So browse through our list of [projects for diploma students](https://takeoffprojects.com/projects-for-diploma-students) and choose the smart final year projects for your requirements. 
 
Get Guidance and training along with final period programs accouterments for your last time diploma. Our tone learning final year projects for diploma students accouterments are guaranteed to guide you and help you score the stylish marks in your final semesters. This program guidance is handed by our professionals that can be used in your last time diploma so that you can concentrate your time on your last time studies and score well.
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eec1q1u1na66oi9e0mzb.png)

All the final time diploma programs accouterments are designed to help you score better in your semester. Browse through our list of rearmost parchment systems accouterments . These systems are innovative systems for final year diploma in IT, Computers as well as Electronics and communication. Our lists of final time systems accouterments for parchment in computer engineering, parchment in electronics negotiating ece, parchment in electrical engineering and further. Find the great diploma design content for your final time at this amazing depository of engineering diploma systems.
 
 
Engineering student projects for B.Tech, M.Tech and Diploma final year students. Takeoff Edu Group offers a wide range of projects best for [projects for diploma students](https://www.youtube.com/watch?v=1RZlPPKqeCk) looking for magnificent final projects at low cost. 
 
Few of the projects for diploma students are:

- Smart Event Invitation
- On Road Vehicle Assistance Finder
- Agriculture Updates Android Project
- Anti-Ragging App
- Android File Storage
Katalon Studio Setup
Published: 2022-11-01 05:29:07

**<u>Install Katalon </u>**
1. Go to -> https://katalon.com/ and click on **Get Started**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ifaclx6t33rhfsqs6aiq.png)
2. Then it redirect into https://katalon.com/solution-selection screen
3. Select **Katalon Studio** and click on **Create your first test**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7dvse6jx9epc0hjpxdtg.png)
3. After that it will redirect into https://katalon.com/download/ according to your OS. Click on **Download** it will downloading the studio

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

4. Open the dmg file 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7284tnbmsdk4vgria3hk.png)
5. After installation when you open Katalon studio it show "**No project with Git integration found, Go to techOps**". **click  Git Repository** and it will redirect into https://docs.katalon.com/docs/organize/upload-test-scripts-from-the-git-repository-to-katalon-testops screen. Then **<u>click start now</u>**, and <u>**sign in or sign up**</u> in Katalon. 

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

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

6. Then you need to [Create Project](https://admin.katalon.com/organization/947703/teams/projects?). then Configure GitHub to your katalon Studio. Input Github user name, repository name and [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).

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

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

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

7. After that back to Kataton Studio. **Click on File > open project > Show Open project modal > set Project name > set Git Repository URL > Set git User name > set Personal Access Token > Click OK button. Project created**

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k87vgn2iwn0z5ghfwhq3.png)
Agile Iceberg
Tags: storybytes, agile, business, agileprojectmanagement
Published: 2022-11-01 05:18:12



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

Agile processes have become a recognized, well-spread standard - not only in IT. If correctly applied, the buzz around is reasonable, and the impact is remarkable. But the challenge is that Agile will not solve your problems. On the contrary, the issues will become more visible and painful. The profound underlying truth is that an agile process is driven by humans, and we humans are unpredictable. The deeper you address the possibility to manage and improvise your Business and agility, the longer and better the Ice Berg will stand by its own. An Iceberg without much depth will melt away - just like that. We are running multiple retrospectives at this given time to find out how we at Web and App Studio can improvise our Agile Iceberg and keep it rolling. Together with our Agile Team, we will keep on iterating on improving.
Web performance metrics
Tags: storybytes, performance, webperformancemetrics, webperf
Published: 2022-11-01 05:11:06


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

A User expects an excellent looking design, interaction and a lightning-fast site, and mobile-friendly. Fulfilling the needs of a user has never been more challenging. The only way to determine what works for you is to monitor performance metrics. Creating an optimal user experience for your website's visitors is an art by paying attention to specific performance metrics. The website producers and the owners should always focus on the performance of the website with the user at the centre point. We at Web and App Studio have discovered this art throughout the years by wearing the glasses from a user point of view and keeping the performance metrics in check.
Skip Bin Hire Western Suburbs Melbourne
Tags: skip
Published: 2022-11-01 04:47:18


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8szokc9m51dfvoz0zpdd.jpg)

In every day of our lives, we are judiciously generating waste. From feeding to driving, sports all across our existence. Not that there is really a fault in that, the fault rather is not in disposing of this waste appropriately. Garbage is not a good company and should be carefully stored and promptly disbanded. From the health damages to your family to the pollution of your environment, garbage shouldn’t be detained in your premises for unnecessarily long. This is why Mini Skip Hire Prices Melbourne are becoming more readily adopted these days in Melbourne. Our  skip bin hire western suburbs Melbourne service at Concorde skip hire Melbourne is perfectly what you need for your waste management. Want to know why our clients find us irreplaceable?

We allow you the royalty of choice as to the size of your [skip bin hire western suburbs Melbourne](https://www.concordeskipbin.com.au/) in Melbourne. Our bins are of different sizes for you to choose from Mini Skip Hire to Big Skip Hire. Our experts will gauge your waste and accurately determine which skip bins will work perfectly for you in view of delivery time and also in your best interest economically too.
Convert Array, Object to Unix Tree
Tags: javascript, webdev, beginners, programming
Published: 2022-11-01 04:39:56

# javascript-unix-tree
Github: https://github.com/HoSheiMa/javascript-unix-tree
 Pure Javascript Unix Tree Script
 ```js
// our array example
let array = [
  1,
  2,
  [3, 4, 5],
  {
    name: "Qandil",
    links: [
      "https://www.freelancer.com/u/wadielnatrontv",
      "https://www.facebook.com/qandilabdel.fadilawyan/",
    ],
    ex: [1, 2, 3, { say: "hello" }],
  },
];
```


## Simple result
```js

new output(
  new unix(array).output
);
/**
Output:
├── 1
├── 2
├── Array
│   ├── 3
│   ├── 4
│   └── 5
├── Object
│   ├── Qandil
│   ├── Array
│   │   ├── https://www.freelancer.com/u/wadielnatrontv
│   │   └── https://www.facebook.com/qandilabdel.fadilawyan/
│   ├── Array
│   │   ├── 1
│   │   ├── 2
│   │   ├── 3
│   │   ├── Object
│   │   │   └── hello
*/
```

## Simple result and full Array() details
```js

new output(
   new unix(array, {
    show_array_index: true,
    show_object_keys: false,
  }).output
);
/**
Output:
├── Array: 0
│   └── 1
├── Array: 1
│   └── 2
├── Array
│   ├── Array: 0
│   │   └── 3
│   ├── Array: 1
│   │   └── 4
│   ├── Array: 2
│   │   └── 5
├── Object
│   ├── Qandil
│   ├── Array
│   │   ├── Array: 0
│   │   │   └── https://www.freelancer.com/u/wadielnatrontv
│   │   ├── Array: 1
│   │   │   └── https://www.facebook.com/qandilabdel.fadilawyan/
│   ├── Array
│   │   ├── Array: 0
│   │   │   └── 1
│   │   ├── Array: 1
│   │   │   └── 2
│   │   ├── Array: 2
│   │   │   └── 3
│   │   ├── Object
│   │   │   └── hello
*/
```

## Simple result and full Object details
```js
new output(
  new unix(array, {
    show_array_index: false,
    show_object_keys: true,
  }).output
);
/**
Output:
├── 1
├── 2
├── Array
│   ├── 3
│   ├── 4
│   └── 5
├── Object
│   ├── Object: name
│   │   └── Qandil
│   ├── Array
│   │   ├── https://www.freelancer.com/u/wadielnatrontv
│   │   └── https://www.facebook.com/qandilabdel.fadilawyan/
│   ├── Array
│   │   ├── 1
│   │   ├── 2
│   │   ├── 3
│   │   ├── Object
│   │   │   ├── Object: say
│   │   │   │   └── hello
*/
```

## Simple result, full Array() and Object details
```js
new output(
  new unix(array, {
    show_array_index: true,
    show_object_keys: true,
  }).output
);
/**
Output:
├── Array: 0
│   └── 1
├── Array: 1
│   └── 2
├── Array
│   ├── Array: 0
│   │   └── 3
│   ├── Array: 1
│   │   └── 4
│   ├── Array: 2
│   │   └── 5
├── Object
│   ├── Object: name
│   │   └── Qandil
│   ├── Array
│   │   ├── Array: 0
│   │   │   └── https://www.freelancer.com/u/wadielnatrontv
│   │   ├── Array: 1
│   │   │   └── https://www.facebook.com/qandilabdel.fadilawyan/
│   ├── Array
│   │   ├── Array: 0
│   │   │   └── 1
│   │   ├── Array: 1
│   │   │   └── 2
│   │   ├── Array: 2
│   │   │   └── 3
│   │   ├── Object
│   │   │   ├── Object: say
│   │   │   │   └── hello
*/
```
Same Tree
Tags: algorithms, csharp, leetcode, easy
Published: 2022-11-01 03:51:56

_#100.Same Tree_

### Problem statement
Given the roots of two binary trees `p` and `q`, write a function to check if they are the same or not.

Two binary trees are considered the same if they are structurally identical, and the nodes have the same value.

**Example 1**
```
Input: p = [1,2,3], q = [1,2,3]
Output: true
```

**Example 2**
```
Input: p = [1,2], q = [1,null,2]
Output: false
```

### Explanation
給定兩個二元樹的樹根 `p` 和 `q` ，檢查兩個二元樹是否相同，相同的定義為結構相同、節點也具有相同的值，最終返回 `true` 或 `false`

### Solution
有關二元樹的題目，解法通常離不開遞迴，這題要比較兩個二元樹結構是否完全相同，用遞迴可寫出優雅的解法，一開始先判斷二元樹是否為 null，若其中一個是 null，返回兩者是否相等的判斷結果，若兩個節點都不是 null，則比較兩者節點值是否相同，若不同則在最底部返回 `false`，若節點值相同則繼續走訪左子樹和右子樹，呼叫自己 `IsSameTree` 並傳入要比較的對應節點，直到判斷完成

```cs
public bool IsSameTree(TreeNode p, TreeNode q)
{
	if (p == null || q == null) return p == q;

	if (p.val == q.val)
		return IsSameTree(p.left, q.left) && IsSameTree(p.right, q.right);

	return false;
}
```

### Reference
[LeetCode Solution](https://leetcode.com/problems/same-tree/discuss/1312965/C-Solution)

[GitHub Repository](https://github.com/FakeStandard/LeetCode-CSharp/tree/main/Solution/0100.Same-tree)

---

Thanks for reading the article :tulip: :sunflower: :blossom:

If you like it, please don't hesitate to click heart button :heart:
or click like on my Leetcode solution
or follow my [GitHub](https://github.com/FakeStandard) :star:
or buy me a coffee :arrow_down: I'd appreciate it.

[![Buy-me-a-coffee][1]][2]

[1]: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h077sxd0vx1hix4t7lw8.png
[2]: https://www.buymeacoffee.com/FakeStandard

---
Hacktoberfest Part 4: Final contribution
Published: 2022-11-01 03:36:44

## Overview
The last repository I worked on was  [OrcaCollective/techbloc-directory](https://github.com/OrcaCollective/techbloc-directory) which is a Directory for Tech Bloc resources. 

## Issue
The [issue](https://github.com/OrcaCollective/techbloc-directory/issues/21) was pretty small and straightforward and it was about re-ordering sections in their websites.

## Implementation
This thing wasn't difficult to do because it is just basic manipulations with HTML. I made the[PR](https://github.com/OrcaCollective/techbloc-directory/pull/22) and got feedback from the maintainer who pointed out the error that I made so I made another commit and got eventually approved.

## Conclusion
Even when you work on small and easy tasks you shouldn't lose focus on small things and try to avoid making an error as I made.
Hacktoberfest Recap
Published: 2022-11-01 03:17:05

Throughout October, I took part in Hactoberfest as part of an assignment for my course in Open-Source Development. I worked on four issues in three different projects. Even though I could not get four pull requests approved before the end of October, I still learned a lot by contributing.

Before October, I knew little about open-source development. I was somewhat anxious about contributing to other repositories, especially if they used technologies that I was not familiar with or had not even worked with before. However, I found that open-source community is open and welcoming. I was able to understand how projects were setup and work my way through issues, and a big part of that was due to the awesome contribution documentation provided by the maintainers. This made contributing quite fun and rewarding.

I learned a lot about different languages and technologies. For example, I worked on an issue in a project called [AppFlowy](https://github.com/AppFlowy-IO/AppFlowy) which is build using Rust, and Flutter. Prior to working on it, I knew about rust. I had heard about it and started learning it. However, I did not know how it could be used to create large scale applications. I had never heard of flutter or dart, and how they could be used with rust to create an application. Flutter could be used to create the user interface, and rust to create the backend infrastructure.

I also learned more about git, and got more familiar with the process of forking, squashing, and rebasing. I used to leave squashing to the GitHub UI (before merging) when I was working on my own projects or projects at work. However, it is not possible to do this when contributing to an open-source project since usually you do not have write access to squash commits when merging. 

So, when I squashed my commits locally when working on an issue, I ended up facing issues while trying to push to the remote branch in my fork. Git's error message told me that my local branch was behind the remote branch. Therefore, I tried to do a `git pull` to fix this. This allowed me to push my changes but resulted in commits being duplicated on the PR. I later found that in order to be able to push the squashed commits to the remote branch, the `-f` option (i.e., force) should be specified in the `git push` command.

Finally, I also learned that for quite a few issues, writing the code to address the issue can take far less time than setting up the project locally and understanding how it works. Though this may also be because I had not used the technologies used by the projects that I worked on.
Créez votre premier serveur avec node.js
Published: 2022-11-01 03:07:36

Pour créer un serveur avec node, faites seulement ceci : 


```
const http = require('http');
const server = http.createServer((req, res) => {
    res.end('Voilà la réponse du serveur !');
});

server.listen(5000);

```

Ah bon ? Seulement ça ? Et je viens de créer tout un serveur ? 😇 

Oui, tout un serveur! 

Là nous avons crée notre premier serveur avec node, mais avant de vous expliquer très bien le code, comprenons d'abord c'est quoi un serveur et c'est quoi Node ! 

Quand vous naviguez sur internet, vous faites la plupart de fois une demande à un autre ordinateur distant connecté sur internet, qui vous fournit alors la page web en réponse.

L’ordinateur avec lequel vous parlez au travers internet c'est ce qu'on appelle 'Un serveur web'. Un serveur web reçoit des requêtes HTTP d’un client(Votre navigateur), et fournit ensuite une réponse HTTP, comme une page HTML ou du JSON d’une API.

Et en quoi est-ce que node intervient dans tout ça...🤔 

Node.js est un runtime qui nous facilite l'écriture de nos taches coté serveur. Il est basé sur le moteur V8 qu'on retouve dans chrome. Comprenez SIMPLEMENT que, node.js, c'est du Javascript coté serveur. C'est bon n'est ce pas 😍 

Oui, et alors, son avantage c'est quoi donc..

Avec Node, vous avez la possibilité de créer des applications RTA (Real Time Application). C'est une catégorie d'application qui auront besoin de se mettre à jour fréquemment et en temps réel. Par exemple quand vous faites la messagerie instatannée avec whats'app, c'est du Real Time ! Ça donne envie d'aller plus loin, mais, laissez-moi vite passer vous expliquer le code là ! là en haut.. Nous l'avions déjà oublié 😇

```
const http = require('http');

```
Ici, nous venons d'importer le package HTTP inclus nativement dans node pour créer notre serveur. Nous l'avons passé une fonction qui l'executera à chaque fois qu'il y aura un appel vers ce serveur. Le mot clé 'require' nous sert simplement de désigner l'importation de notre module (Au lieu de 'import').

```
const server = http.createServer((req, res) => {
    res.send('Hey, c'est ça ma réponse 😍  !');
});

```
Ensuite, là nous venons de créer une fonction appélée 'server' qui va recevoir deux objets en arguments : 'request' et 'response'. vers la fin, nous avons utilisé dans cet exemple la méthode 'send' de l'objet 'response', pour renvoyer une réponse du type string au client.

```
server.listen(5000);

```
Et voilà le code qui nous permet d'écouter notre serveur au port 5000.

Est-ce que ça va marcher si j'essayes ?

Oui, ça va marcher! Essayes seulement en lançant le serveur. Faites : node server.js/


Bravo ! Vous avez crée et lancer votre premier serveur avec Node.js !



Écrit par Jéthron Kashira.
Working with Linter
Tags: javascript, github, webdev, beginners
Published: 2022-11-01 02:57:42

| Tools | Description |
|---|---|
| [Prettier](https://prettier.io/) | Ensures that the repo is available to follow a consistent formatting throughout its development cycle
| [ESLint](https://eslint.org/)/[Standard](https://standardjs.com/) | Analyze the code from the repo to ensure that no bugs occur by following the best coding practices, and locating problematic patterns |

<br />
I use prettier simply, because I've been using it for my code since the 3rd lab, as it was introduced by my partner. I used both ESLint and Standard to ensure that I see as much problem as possible.
<br />
> Setting Up Prettier

Install prettier locally, and should be set up for DevDepencies for later stages
`npm install --save-dev --save-exact prettier`

Once this is done, we go ahead with creating our `.prettierrc.json` and `.prettierignore`.
The former is used for when you want to change the default setting of prettier, whilst the latter is to tell it to not touch any of the files or directories provided.
<br />
> Setting Up ESLint

Install ESLint locally with `npm init @eslint/config`.
Packages like ESLint are usually already set up for DevDepencies, so there is no need to imply it when installing. This will automatically provide us with our `.eslintrc.js` which will be used to create our custom rules. The rules that that are available for you to apply are located on their website https://eslint.org/docs/latest/rules/
<br />
> Setting up Standard

It's a lot easier to to set up standard compared to the other two. First you need to enter `npm install standard --save-dev`, and that's basically how it goes. From what I read, there's no rules to set nor to apply, everything just work as intended. 
<br />
> Hidden Problems

I first ran my prettier with `npx prettier --write`, and noticed that most of my files were automatically changed. It turned out I wasn't even following the standard that I had given myself.
Once this was done I ran ESLint with `eslint --fix`, which showed me that I have been using "let" instead of const on some of my properties. Lastly, I have typed in `npx standard` and it showed that I adding semi-colons, after each statement (they might not cause problems, but there's no point of adding them there).
<br />
> VSCode

I have changed my setting to add `prettier` and `eslint` for every time my file is saved.
<br />
> What I Learn

I learned that regardless of how much you follow the standard, that there will always be moments where you might mess up. I always ensure that I use `const` for things that don't change, and `let` to those that do, but as `standard` pointed out, I still made a mistake regarding using one of them. 

Also, having a standard for a repository to follow from the start is the best form of action for it ensures that regardless of how many people contribute for the project, they will always be using the same standard from when the project was still smaller