Skip to content

Commit

Permalink
Added Graph-traversa
Browse files Browse the repository at this point in the history
  • Loading branch information
W-ight committed May 25, 2024
2 parents e739218 + ffdb981 commit 277ff28
Show file tree
Hide file tree
Showing 164 changed files with 19,132 additions and 866 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# These are supported funding model platforms

github: Ajay-Dhangar # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
patreon: ajay_dhangar # Replace with a single Patreon username
open_collective: codeharborhub # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
Expand Down
46 changes: 46 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Related Issue

[Cite any related issue(s) this pull request addresses. If none, simply state "None”]

## Description

[Please include a brief description of the changes or features added]

## Type of PR

- [ ] Bug fix
- [ ] Feature enhancement
- [ ] Documentation update
- [ ] Other (specify): _______________

## Screenshots / Videos (if applicable)

[Attach any relevant screenshots or videos demonstrating the changes]

## Checklist
- [ ] I have performed a self-review of my code.
- [ ] I have read and followed the Contribution Guidelines.
- [ ] I have tested the changes thoroughly before submitting this pull request.
- [ ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
- [ ] I have commented my code, particularly in hard-to-understand areas.
<!-- [X] - put a cross/X inside [] to check the box -->

## Additional Context

[Include any additional information or context that might be helpful for reviewers.]

## Resources for Guidance

Here are some resources that may be helpful as you contribute to CodeHarborHub:
- [Code Harbor Hub Community Features](https://www.codeharborhub.live/community/features)
- [Docusaurus Documentation](https://docusaurus.io/docs/create-doc)
- [React.js Documentation](https://legacy.reactjs.org/docs/getting-started.html)
- [Markdown Guide](https://www.markdownguide.org/)
- [MDX Documentation](https://mdxjs.com/docs/)
- [Mermaid Documentation](https://mermaid.js.org/)

**Resources for DSA Features on Our Site:**

- Tabs: [Switch Languages](https://www.codeharborhub.live/community/features#multi-language-support-code-blocks)
- [Line Numbering](https://www.codeharborhub.live/community/features#line-numbering)
- [Math Equations](https://www.codeharborhub.live/community/features#math-equations-with-katex)
25 changes: 25 additions & 0 deletions .github/workflows/auto-comment-on-pr-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Auto Comment on PR Merge

on:
pull_request:
types: [closed]

jobs:
comment:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Comment on merged PR
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = context.payload.pull_request;
const comment = `🎉 Congratulations @${pr.user.login}! Your pull request has been merged. Thank you for your contribution to the project.`;
github.rest.issues.createComment({
issue_number: pr.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ To contribute to this project, please follow these steps:
Launch GitHub Desktop and log in to your GitHub account if you haven't already.

2. **Clone the Repository:**
- If you haven't cloned the ResourceHub repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
- Choose the ResourceHub repository from the list of repositories on GitHub and clone it to your local machine.
- If you haven't cloned the CodeHarborHub repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
- Choose the CodeHarborHub repository from the list of repositories on GitHub and clone it to your local machine.
3. **Switch to the Correct Branch:**
- Ensure you are on the branch that you want to submit a pull request for.
Expand All @@ -57,15 +57,15 @@ To contribute to this project, please follow these steps:
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.
7. **Create a Pull Request:**
- Go to the GitHub website and navigate to your fork of the ResourceHub repository.
- Go to the GitHub website and navigate to your fork of the CodeHarborHub repository.
- You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.
8. **Review and Submit:**
- 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.
- Once you're satisfied, click the "Create pull request" button to submit your pull request.

9. **Wait for Review:**
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.
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.

⭐️ Support the Project
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.
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,13 @@ This project is licensed under the [MIT License](LICENSE).
[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=CodeHarborHub_codeharborhub)](https://sonarcloud.io/summary/new_code?id=CodeHarborHub_codeharborhub)
[![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)
[![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)
## Contributors
![Contributors](https://opencollective.com/codeharborhub/contributors.svg?button=false)
![Contributors](https://opencollective.com/codeharborhub/contributors.svg)
## Chat with us
[![Chat with us](https://github.com/CodeHarborHub/codeharborhub/assets/99037494/e898e0e8-7985-4adb-9730-a2588fcba78e)](https://www.patreon.com/ajay_dhangar/membership)
<!--
<a href="https://github.com/codeharborhub/codeharborhub/graphs/contributors">
<img src="https://contrib.rocks/image?repo=codeharborhub/codeharborhub" />
</a>
-->
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from "react";

import withLogger from "./withLogger";

const Component = ({ message }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from "react";

const withLogger = (WrappedComponent) => {
return (props) => {
console.log(`Rendering ${WrappedComponent.name} with props:`, props);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import React, { useMemo, useState } from "react";
import PropTypes from 'prop-types';


const ExpensiveComponent = ({ value }) => {
const expensiveFunction = (value) => {
// Expensive computation
return value * 2;
};

ExpensiveComponent.propTypes = {
value: PropTypes.number.isRequired
};
const memoizedValue = useMemo(() => expensiveFunction(value), [value]);
return <div>{memoizedValue}</div>;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { FixedSizeList } from "react-window";
const VirtualizationExample = () => {
const Row = ({ index, style }) => <div style={style}>Row {index}</div>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import { useState } from "react";

function IfElseExample() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from "react";

function KeyPropExample() {
const items = [
{ id: 1, name: "Apple" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from "react";

function ListExample() {
const items = ["Apple", "Banana", "Cherry", "Date"];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import { useState } from "react";

function TernaryOperatorExample() {
const [isError, setIsError] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component } from "react";
import { Component } from "react";

class Counter extends Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from "react";

function WelcomeMessage() {
return <div>Welcome to React!</div>;
}
Expand Down
2 changes: 1 addition & 1 deletion courses/react-js/begginer-level/intro-to-react/lesson_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ console.log('Hello, Node.js!');

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:

```bash title="Run hello.js with Node.js"
```bash
node hello.js
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import { useState } from "react";

function FormComponent() {
const [formData, setFormData] = useState({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';

function ChangeEventExample() {
const [value, setValue] = useState('');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import { useState } from "react";

function ComplexStateExample() {
const [user, setUser] = useState({ name: "Ajay", age: 24 });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';

function SubmitEventExample() {
const [value, setValue] = useState('');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { ThemeProvider } from "./ThemeContext";
import Header from "./Header";
import Content from "./Content";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext } from "react";
import { useContext } from "react";
import { ThemeContext } from "./ThemeContext";

function Content() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext } from "react";
import { useContext } from "react";
import { ThemeContext } from "./ThemeContext";

function Header() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { connect } from "react-redux";

function Counter({ count, increment, decrement }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { Provider } from "react-redux";
import store from "./store";
import Counter from "./Counter";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { createContext, useState } from "react";
import { createContext, useState } from "react";

const ThemeContext = createContext();

Expand Down
19 changes: 0 additions & 19 deletions courses/react-js/intermidiate-level/managing-complex-uis/App.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 277ff28

Please sign in to comment.