Skip to content

new update #2071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Welcome to CodeHarborHub Tutorials
sidebar_label: Welcome to CodeHarborHub
sidebar_position: 1
slug: /
sidebar_class_name: "tutorial-learning-tasks"
---

Hello, and welcome to CodeHarborHub! Our mission is to provide accessible and comprehensive educational resources to learners of all levels, from beginners to advanced professionals. Whether you're looking to kickstart your career in web development, master a new programming language, or stay updated on the latest tech trends, we've got you covered.
Expand Down
43 changes: 24 additions & 19 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faLinkedin, faYoutube, faDiscord, } from '@fortawesome/free-brands-svg-icons';

import { themes as prismThemes } from "prism-react-renderer";
import { default as npm2yarn } from "@docusaurus/remark-plugin-npm2yarn";
import { themes as prismThemes } from "prism-react-renderer";

const remarkMath = require("remark-math");
const rehypeKatex = require("rehype-katex");

Expand Down Expand Up @@ -96,11 +94,21 @@ const config = {
{ name: "twitter:creator", content: "@CodesWithAjay" },
{ property: "og:type", content: "website" },
{ property: "og:site_name", content: "CodeHarborHub" },
{ property: "og:title", content: "CodeHarborHub - A place to learn and grow" },
{ property: "og:description", content: "CodeHarborHub is a place to learn and grow. We provide accessible and comprehensive educational resources to learners of all levels, from beginners to advanced professionals."},
{ property: "og:image", content: "https://codeharborhub.github.io/img/nav-logo.jpg" },
{
property: "og:title",
content: "CodeHarborHub - A place to learn and grow",
},
{
property: "og:description",
content:
"CodeHarborHub is a place to learn and grow. We provide accessible and comprehensive educational resources to learners of all levels, from beginners to advanced professionals.",
},
{
property: "og:image",
content: "https://codeharborhub.github.io/img/nav-logo.jpg",
},
{ property: "og:url", content: "https://codeharborhub.github.io" },
{ name: "robots", content: "index, follow" },
{ name: "robots", content: "index, follow" },
],

algolia: {
Expand Down Expand Up @@ -130,13 +138,13 @@ const config = {
<a href="/docs/category/html/" class="nav__icons"> <img src="/icons/html-5.svg" title="HTML5" alt="HTML" /> </a>
<a href="/docs/" class="nav__icons"> <img src="/icons/css.svg" title="CSS" alt="CSS" /> </a>
<a href="/docs/category/javascript/" class="nav__icons" > <img src="/icons/js.svg" title="JavaScript" alt="JavaScript" /> </a>
<a href="/docs/category/react/" class="nav__icons"> <img src="/icons/jsx.svg" title="React.Js" alt="React" /> </a>
<a href="/docs/category/typescript/" class="nav__icons"> <img src="/icons/ts.svg" title="TypeScript" alt="TypeScript" /> </a>
<a href="/docs/category/python/" class="nav__icons"> <img src="/icons/py.svg" title="Python" alt="Python" /> </a>
<a href="/docs/category/java/" class="nav__icons"> <img src="/icons/java.svg" title="Java" alt="Java" /> </a>
<a href="/docs/category/react/" class="nav__icons"> <img src="/icons/jsx.svg" title="React.Js" alt="React" /> </a>
<a href="/docs/category/typescript/" class="nav__icons"> <img src="/icons/ts.svg" title="TypeScript" alt="TypeScript" /> </a>
<a href="/docs/category/python/" class="nav__icons"> <img src="/icons/py.svg" title="Python" alt="Python" /> </a>
<a href="/docs/category/java/" class="nav__icons"> <img src="/icons/java.svg" title="Java" alt="Java" /> </a>
<a href="/docs/category/tailwind/" class="nav__icons"> <img src="/icons/tailwind-css.svg" title="Tailwind CSS" alt="Tailwind" /> </a>
<a href="/docs/category/cpp/" class="nav__icons"> <img src="/icons/cpp.svg" title="CPP" alt="CPP" /> </a>
<a href="/docs/category/NextJs/" class="nav__icons"> <img src="/icons/next-js.svg" title="NextJs" alt="Next" /> </a>
<a href="/docs/category/cpp/" class="nav__icons"> <img src="/icons/cpp.svg" title="CPP" alt="CPP" /> </a>
<a href="/docs/category/NextJs/" class="nav__icons"> <img src="/icons/next-js.svg" title="NextJs" alt="Next" /> </a>
</div>
</div>`,
},
Expand All @@ -151,7 +159,7 @@ const config = {
value: `<div class="dropdown">
<a class="dropbtn" href="/courses/"> Courses&nbsp; </a>
<div class="dropdown-content">
<a href="/courses/category/reactjs/" class="nav__icons"> <img src="/icons/jsx.svg" alt="React" /> </a>
<a href="/courses/category/reactjs/" class="nav__icons"> <img src="/icons/jsx.svg" alt="React" /> </a>
</div>
</div>`,
},
Expand Down Expand Up @@ -362,22 +370,19 @@ const config = {
{
label: "LinkedIn",
href: "https://www.linkedin.com/company/codeharborhub/",
icon: 'faLinkedin',
},
{
label: "YouTube",
href: "https://www.youtube.com/",
icon: 'faYoutube',
icon: "faYoutube",
},
{
label: "Discord",
href: "https://discord.gg/c53FQn3pRv",
icon: 'faDiscord',
},
{
label: "Twitter(X)",
href: "https://twitter.com/CodesWithAjay",
icon: 'faTwitter',
},
],
},
Expand Down
21 changes: 14 additions & 7 deletions dsa-solutions/gfg-solutions/Basic/0093.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
id: replace-zeros-with-fives
id: replace-zeros-with-five
title: Replace All 0's with 5
sidebar_label: 0093 Replace All 0's with 5
tags:
- Python
- Java
- C++
- C
- Python
- Java
- C++
- C
description: "This document covers methods to replace all occurrences of the digit 0 with the digit 5 in a given number in various programming languages."
---

Expand All @@ -15,7 +15,9 @@ description: "This document covers methods to replace all occurrences of the dig
Given a number N. The task is to complete the function **convertFive()** which replaces all zeros in the number with 5 and returns the number.

### Examples:

**Example 1:**

```
Input
2
Expand Down Expand Up @@ -50,7 +52,9 @@ Since this is a functional problem you don't have to worry about input, you just
- $1 <= N <= 10^4$

## Solution

### Python

```python
def convertFive(self,n):
num_str = str(n)
Expand All @@ -64,6 +68,7 @@ def convertFive(self,n):
```

### Java

```java
public static int convertFive(int n){
String numStr = String.valueOf(n);
Expand All @@ -72,7 +77,7 @@ public static int convertFive(int n){
char currentChar = numStr.charAt(i);
if (currentChar == '0') {
result.append('5');
}
}
else {
result.append(currentChar);
}
Expand All @@ -83,6 +88,7 @@ public static int convertFive(int n){
```

### C++

```cpp
int convertFive(int n) {
string numStr = to_string(n);
Expand All @@ -97,6 +103,7 @@ int convertFive(int n) {
```

### C

```c
int convertFive(int n) {
int result = 0;
Expand All @@ -105,7 +112,7 @@ int convertFive(int n) {
int digit = n % 10;
if (digit == 0) {
result += 5 * position;
}
}
else {
result += digit * position;
}
Expand Down
29 changes: 29 additions & 0 deletions src/components/Chatbot/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React, { useEffect } from 'react';
import styles from './styles.module.css';

const Chatbot = () => {
useEffect(() => {
const script1 = document.createElement('script');
script1.src = "https://cdn.botpress.cloud/webchat/v1/inject.js";
script1.async = true;
document.body.appendChild(script1);

const script2 = document.createElement('script');
script2.src = "https://mediafiles.botpress.cloud/4e10f671-b66c-4211-a966-8d2a4b404513/webchat/config.js";
script2.defer = true;
document.body.appendChild(script2);

return () => {
document.body.removeChild(script1);
document.body.removeChild(script2);
};
}, []);

return (
<div>
<div id="bp-web-widget" className={styles.bpwLayoutLeft}></div>
</div>
);
};

export default Chatbot;
Loading
Loading