Skip to content

Commit 277ff28

Browse files
committed
Added Graph-traversa
2 parents e739218 + ffdb981 commit 277ff28

File tree

164 files changed

+19132
-866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+19132
-866
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# These are supported funding model platforms
22

33
github: Ajay-Dhangar # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4-
patreon: # Replace with a single Patreon username
4+
patreon: ajay_dhangar # Replace with a single Patreon username
55
open_collective: codeharborhub # Replace with a single Open Collective username
66
ko_fi: # Replace with a single Ko-fi username
77
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel

.github/pull_request_template.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## Related Issue
2+
3+
[Cite any related issue(s) this pull request addresses. If none, simply state "None”]
4+
5+
## Description
6+
7+
[Please include a brief description of the changes or features added]
8+
9+
## Type of PR
10+
11+
- [ ] Bug fix
12+
- [ ] Feature enhancement
13+
- [ ] Documentation update
14+
- [ ] Other (specify): _______________
15+
16+
## Screenshots / Videos (if applicable)
17+
18+
[Attach any relevant screenshots or videos demonstrating the changes]
19+
20+
## Checklist
21+
- [ ] I have performed a self-review of my code.
22+
- [ ] I have read and followed the Contribution Guidelines.
23+
- [ ] I have tested the changes thoroughly before submitting this pull request.
24+
- [ ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
25+
- [ ] I have commented my code, particularly in hard-to-understand areas.
26+
<!-- [X] - put a cross/X inside [] to check the box -->
27+
28+
## Additional Context
29+
30+
[Include any additional information or context that might be helpful for reviewers.]
31+
32+
## Resources for Guidance
33+
34+
Here are some resources that may be helpful as you contribute to CodeHarborHub:
35+
- [Code Harbor Hub Community Features](https://www.codeharborhub.live/community/features)
36+
- [Docusaurus Documentation](https://docusaurus.io/docs/create-doc)
37+
- [React.js Documentation](https://legacy.reactjs.org/docs/getting-started.html)
38+
- [Markdown Guide](https://www.markdownguide.org/)
39+
- [MDX Documentation](https://mdxjs.com/docs/)
40+
- [Mermaid Documentation](https://mermaid.js.org/)
41+
42+
**Resources for DSA Features on Our Site:**
43+
44+
- Tabs: [Switch Languages](https://www.codeharborhub.live/community/features#multi-language-support-code-blocks)
45+
- [Line Numbering](https://www.codeharborhub.live/community/features#line-numbering)
46+
- [Math Equations](https://www.codeharborhub.live/community/features#math-equations-with-katex)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Auto Comment on PR Merge
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
comment:
9+
if: github.event.pull_request.merged == true
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Comment on merged PR
14+
uses: actions/github-script@v6
15+
with:
16+
github-token: ${{ secrets.GITHUB_TOKEN }}
17+
script: |
18+
const pr = context.payload.pull_request;
19+
const comment = `🎉 Congratulations @${pr.user.login}! Your pull request has been merged. Thank you for your contribution to the project.`;
20+
github.rest.issues.createComment({
21+
issue_number: pr.number,
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
body: comment
25+
});

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ To contribute to this project, please follow these steps:
3939
Launch GitHub Desktop and log in to your GitHub account if you haven't already.
4040

4141
2. **Clone the Repository:**
42-
- If you haven't cloned the ResourceHub repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
43-
- Choose the ResourceHub repository from the list of repositories on GitHub and clone it to your local machine.
42+
- If you haven't cloned the CodeHarborHub repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
43+
- Choose the CodeHarborHub repository from the list of repositories on GitHub and clone it to your local machine.
4444
4545
3. **Switch to the Correct Branch:**
4646
- Ensure you are on the branch that you want to submit a pull request for.
@@ -57,15 +57,15 @@ To contribute to this project, please follow these steps:
5757
After committing your changes, click the "Push origin" button in the top right corner of GitHub Desktop to push your changes to your forked repository on GitHub.
5858
5959
7. **Create a Pull Request:**
60-
- Go to the GitHub website and navigate to your fork of the ResourceHub repository.
60+
- Go to the GitHub website and navigate to your fork of the CodeHarborHub repository.
6161
- You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.
6262
6363
8. **Review and Submit:**
6464
- On the pull request page, review your changes and add any additional information, such as a title and description, that you want to include with your pull request.
6565
- Once you're satisfied, click the "Create pull request" button to submit your pull request.
6666

6767
9. **Wait for Review:**
68-
Your pull request will now be available for review by the project maintainers. They may provide feedback or ask for changes before merging your pull request into the main branch of the ResourceHub repository.
68+
Your pull request will now be available for review by the project maintainers. They may provide feedback or ask for changes before merging your pull request into the main branch of the CodeHarborHub repository.
6969

7070
⭐️ Support the Project
7171
If you find this project helpful, please consider giving it a star on GitHub! Your support helps to grow the project and reach more contributors.

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,13 @@ This project is licensed under the [MIT License](LICENSE).
7979
8080
[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=CodeHarborHub_codeharborhub)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub)
8181
82-
[![DeepSource](https://app.deepsource.com/gh/CodeHarborHub/codeharborhub.svg/?label=active+issues&show_trend=true&token=D5-vPYsEG8PSYlzqpUGIbsiB)](https://app.deepsource.com/gh/CodeHarborHub/codeharborhub/) [![DeepSource](https://app.deepsource.com/gh/CodeHarborHub/codeharborhub.svg/?label=resolved+issues&show_trend=true&token=D5-vPYsEG8PSYlzqpUGIbsiB)](https://app.deepsource.com/gh/CodeHarborHub/codeharborhub/) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=bugs)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub)
82+
[![DeepSource](https://app.deepsource.com/gh/CodeHarborHub/codeharborhub.svg/?label=active+issues&show_trend=true&token=D5-vPYsEG8PSYlzqpUGIbsiB)](https://app.deepsource.com/gh/CodeHarborHub/codeharborhub/) [![DeepSource](https://app.deepsource.com/gh/CodeHarborHub/codeharborhub.svg/?label=resolved+issues&show_trend=true&token=D5-vPYsEG8PSYlzqpUGIbsiB)](https://app.deepsource.com/gh/CodeHarborHub/codeharborhub/) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=bugs)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=CodeHarborHub_codeharborhub&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub) [![DeepScan grade](https://deepscan.io/api/teams/24046/projects/27285/branches/870905/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=24046&pid=27285&bid=870905)
8383
8484
## Contributors
8585
86-
![Contributors](https://opencollective.com/codeharborhub/contributors.svg?button=false)
86+
![Contributors](https://opencollective.com/codeharborhub/contributors.svg)
87+
88+
## Chat with us
89+
90+
[![Chat with us](https://github.com/CodeHarborHub/codeharborhub/assets/99037494/e898e0e8-7985-4adb-9730-a2588fcba78e)](https://www.patreon.com/ajay_dhangar/membership)
8791
88-
<!--
89-
<a href="https://github.com/codeharborhub/codeharborhub/graphs/contributors">
90-
<img src="https://contrib.rocks/image?repo=codeharborhub/codeharborhub" />
91-
</a>
92-
-->

courses/react-js/advanced-level/advanced-react-concepts/Component.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
import withLogger from "./withLogger";
42

53
const Component = ({ message }) => {

courses/react-js/advanced-level/advanced-react-concepts/withLogger.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
const withLogger = (WrappedComponent) => {
42
return (props) => {
53
console.log(`Rendering ${WrappedComponent.name} with props:`, props);

courses/react-js/advanced-level/component-optimization/MemoizationExample.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import React, { useMemo, useState } from "react";
2+
import PropTypes from 'prop-types';
3+
24

35
const ExpensiveComponent = ({ value }) => {
46
const expensiveFunction = (value) => {
57
// Expensive computation
68
return value * 2;
79
};
10+
11+
ExpensiveComponent.propTypes = {
12+
value: PropTypes.number.isRequired
13+
};
814
const memoizedValue = useMemo(() => expensiveFunction(value), [value]);
915
return <div>{memoizedValue}</div>;
1016
};

courses/react-js/advanced-level/component-optimization/VirtualizationExample.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { FixedSizeList } from "react-window";
32
const VirtualizationExample = () => {
43
const Row = ({ index, style }) => <div style={style}>Row {index}</div>;

courses/react-js/begginer-level/building-user-interfaces/IfElseExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22

33
function IfElseExample() {
44
const [isLoggedIn, setIsLoggedIn] = useState(false);

courses/react-js/begginer-level/building-user-interfaces/KeyPropExample.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
function KeyPropExample() {
42
const items = [
53
{ id: 1, name: "Apple" },

courses/react-js/begginer-level/building-user-interfaces/ListExample.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
function ListExample() {
42
const items = ["Apple", "Banana", "Cherry", "Date"];
53

courses/react-js/begginer-level/building-user-interfaces/TernaryOperatorExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22

33
function TernaryOperatorExample() {
44
const [isError, setIsError] = useState(false);

courses/react-js/begginer-level/building-your-first-react-app/Counter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from "react";
1+
import { Component } from "react";
22

33
class Counter extends Component {
44
constructor(props) {

courses/react-js/begginer-level/building-your-first-react-app/WelcomeMessage.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
function WelcomeMessage() {
42
return <div>Welcome to React!</div>;
53
}

courses/react-js/begginer-level/intro-to-react/lesson_3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ console.log('Hello, Node.js!');
125125

126126
Save the file and open a terminal or command prompt in the same directory. Run the following command to execute the JavaScript code using Node.js:
127127

128-
```bash title="Run hello.js with Node.js"
128+
```bash
129129
node hello.js
130130
```
131131

courses/react-js/begginer-level/introduction-to-forms/FormComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22

33
function FormComponent() {
44
const [formData, setFormData] = useState({

courses/react-js/begginer-level/working-with-components-and-data/ChangeEventExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import { useState } from 'react';
22

33
function ChangeEventExample() {
44
const [value, setValue] = useState('');

courses/react-js/begginer-level/working-with-components-and-data/ComplexStateExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22

33
function ComplexStateExample() {
44
const [user, setUser] = useState({ name: "Ajay", age: 24 });

courses/react-js/begginer-level/working-with-components-and-data/SubmitEventExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import { useState } from 'react';
22

33
function SubmitEventExample() {
44
const [value, setValue] = useState('');

courses/react-js/intermidiate-level/handling-data-flow/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { ThemeProvider } from "./ThemeContext";
32
import Header from "./Header";
43
import Content from "./Content";

courses/react-js/intermidiate-level/handling-data-flow/Content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useContext } from "react";
1+
import { useContext } from "react";
22
import { ThemeContext } from "./ThemeContext";
33

44
function Content() {

courses/react-js/intermidiate-level/handling-data-flow/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useContext } from "react";
1+
import { useContext } from "react";
22
import { ThemeContext } from "./ThemeContext";
33

44
function Header() {

courses/react-js/intermidiate-level/handling-data-flow/ReduxApp/Counter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { connect } from "react-redux";
32

43
function Counter({ count, increment, decrement }) {

courses/react-js/intermidiate-level/handling-data-flow/ReduxApp/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { Provider } from "react-redux";
32
import store from "./store";
43
import Counter from "./Counter";

courses/react-js/intermidiate-level/handling-data-flow/ThemeContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { createContext, useState } from "react";
1+
import { createContext, useState } from "react";
22

33
const ThemeContext = createContext();
44

courses/react-js/intermidiate-level/managing-complex-uis/App.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

courses/react-js/intermidiate-level/managing-complex-uis/ChildComponent.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

courses/react-js/intermidiate-level/managing-complex-uis/ParentComponent.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

courses/react-js/intermidiate-level/managing-complex-uis/TodoApp.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)