Skip to content

Commit 9df1e22

Browse files
authored
Merge pull request #2071 from CodeHarborHub/dev-3
new update
2 parents d7ce251 + 073ea7b commit 9df1e22

File tree

7 files changed

+321
-55
lines changed

7 files changed

+321
-55
lines changed

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Welcome to CodeHarborHub Tutorials
44
sidebar_label: Welcome to CodeHarborHub
55
sidebar_position: 1
66
slug: /
7+
sidebar_class_name: "tutorial-learning-tasks"
78
---
89

910
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.

docusaurus.config.js

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
2-
import { faLinkedin, faYoutube, faDiscord, } from '@fortawesome/free-brands-svg-icons';
3-
4-
import { themes as prismThemes } from "prism-react-renderer";
51
import { default as npm2yarn } from "@docusaurus/remark-plugin-npm2yarn";
2+
import { themes as prismThemes } from "prism-react-renderer";
3+
64
const remarkMath = require("remark-math");
75
const rehypeKatex = require("rehype-katex");
86

@@ -96,11 +94,21 @@ const config = {
9694
{ name: "twitter:creator", content: "@CodesWithAjay" },
9795
{ property: "og:type", content: "website" },
9896
{ property: "og:site_name", content: "CodeHarborHub" },
99-
{ property: "og:title", content: "CodeHarborHub - A place to learn and grow" },
100-
{ 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."},
101-
{ property: "og:image", content: "https://codeharborhub.github.io/img/nav-logo.jpg" },
97+
{
98+
property: "og:title",
99+
content: "CodeHarborHub - A place to learn and grow",
100+
},
101+
{
102+
property: "og:description",
103+
content:
104+
"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.",
105+
},
106+
{
107+
property: "og:image",
108+
content: "https://codeharborhub.github.io/img/nav-logo.jpg",
109+
},
102110
{ property: "og:url", content: "https://codeharborhub.github.io" },
103-
{ name: "robots", content: "index, follow" },
111+
{ name: "robots", content: "index, follow" },
104112
],
105113

106114
algolia: {
@@ -130,13 +138,13 @@ const config = {
130138
<a href="/docs/category/html/" class="nav__icons"> <img src="/icons/html-5.svg" title="HTML5" alt="HTML" /> </a>
131139
<a href="/docs/" class="nav__icons"> <img src="/icons/css.svg" title="CSS" alt="CSS" /> </a>
132140
<a href="/docs/category/javascript/" class="nav__icons" > <img src="/icons/js.svg" title="JavaScript" alt="JavaScript" /> </a>
133-
<a href="/docs/category/react/" class="nav__icons"> <img src="/icons/jsx.svg" title="React.Js" alt="React" /> </a>
134-
<a href="/docs/category/typescript/" class="nav__icons"> <img src="/icons/ts.svg" title="TypeScript" alt="TypeScript" /> </a>
135-
<a href="/docs/category/python/" class="nav__icons"> <img src="/icons/py.svg" title="Python" alt="Python" /> </a>
136-
<a href="/docs/category/java/" class="nav__icons"> <img src="/icons/java.svg" title="Java" alt="Java" /> </a>
141+
<a href="/docs/category/react/" class="nav__icons"> <img src="/icons/jsx.svg" title="React.Js" alt="React" /> </a>
142+
<a href="/docs/category/typescript/" class="nav__icons"> <img src="/icons/ts.svg" title="TypeScript" alt="TypeScript" /> </a>
143+
<a href="/docs/category/python/" class="nav__icons"> <img src="/icons/py.svg" title="Python" alt="Python" /> </a>
144+
<a href="/docs/category/java/" class="nav__icons"> <img src="/icons/java.svg" title="Java" alt="Java" /> </a>
137145
<a href="/docs/category/tailwind/" class="nav__icons"> <img src="/icons/tailwind-css.svg" title="Tailwind CSS" alt="Tailwind" /> </a>
138-
<a href="/docs/category/cpp/" class="nav__icons"> <img src="/icons/cpp.svg" title="CPP" alt="CPP" /> </a>
139-
<a href="/docs/category/NextJs/" class="nav__icons"> <img src="/icons/next-js.svg" title="NextJs" alt="Next" /> </a>
146+
<a href="/docs/category/cpp/" class="nav__icons"> <img src="/icons/cpp.svg" title="CPP" alt="CPP" /> </a>
147+
<a href="/docs/category/NextJs/" class="nav__icons"> <img src="/icons/next-js.svg" title="NextJs" alt="Next" /> </a>
140148
</div>
141149
</div>`,
142150
},
@@ -151,7 +159,7 @@ const config = {
151159
value: `<div class="dropdown">
152160
<a class="dropbtn" href="/courses/"> Courses&nbsp; </a>
153161
<div class="dropdown-content">
154-
<a href="/courses/category/reactjs/" class="nav__icons"> <img src="/icons/jsx.svg" alt="React" /> </a>
162+
<a href="/courses/category/reactjs/" class="nav__icons"> <img src="/icons/jsx.svg" alt="React" /> </a>
155163
</div>
156164
</div>`,
157165
},
@@ -362,22 +370,19 @@ const config = {
362370
{
363371
label: "LinkedIn",
364372
href: "https://www.linkedin.com/company/codeharborhub/",
365-
icon: 'faLinkedin',
366373
},
367374
{
368375
label: "YouTube",
369376
href: "https://www.youtube.com/",
370-
icon: 'faYoutube',
377+
icon: "faYoutube",
371378
},
372379
{
373380
label: "Discord",
374381
href: "https://discord.gg/c53FQn3pRv",
375-
icon: 'faDiscord',
376382
},
377383
{
378384
label: "Twitter(X)",
379385
href: "https://twitter.com/CodesWithAjay",
380-
icon: 'faTwitter',
381386
},
382387
],
383388
},

dsa-solutions/gfg-solutions/Basic/0093.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
id: replace-zeros-with-fives
2+
id: replace-zeros-with-five
33
title: Replace All 0's with 5
44
sidebar_label: 0093 Replace All 0's with 5
55
tags:
6-
- Python
7-
- Java
8-
- C++
9-
- C
6+
- Python
7+
- Java
8+
- C++
9+
- C
1010
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."
1111
---
1212

@@ -15,7 +15,9 @@ description: "This document covers methods to replace all occurrences of the dig
1515
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.
1616

1717
### Examples:
18+
1819
**Example 1:**
20+
1921
```
2022
Input
2123
2
@@ -50,7 +52,9 @@ Since this is a functional problem you don't have to worry about input, you just
5052
- $1 <= N <= 10^4$
5153

5254
## Solution
55+
5356
### Python
57+
5458
```python
5559
def convertFive(self,n):
5660
num_str = str(n)
@@ -64,6 +68,7 @@ def convertFive(self,n):
6468
```
6569

6670
### Java
71+
6772
```java
6873
public static int convertFive(int n){
6974
String numStr = String.valueOf(n);
@@ -72,7 +77,7 @@ public static int convertFive(int n){
7277
char currentChar = numStr.charAt(i);
7378
if (currentChar == '0') {
7479
result.append('5');
75-
}
80+
}
7681
else {
7782
result.append(currentChar);
7883
}
@@ -83,6 +88,7 @@ public static int convertFive(int n){
8388
```
8489

8590
### C++
91+
8692
```cpp
8793
int convertFive(int n) {
8894
string numStr = to_string(n);
@@ -97,6 +103,7 @@ int convertFive(int n) {
97103
```
98104
99105
### C
106+
100107
```c
101108
int convertFive(int n) {
102109
int result = 0;
@@ -105,7 +112,7 @@ int convertFive(int n) {
105112
int digit = n % 10;
106113
if (digit == 0) {
107114
result += 5 * position;
108-
}
115+
}
109116
else {
110117
result += digit * position;
111118
}

src/components/Chatbot/index.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React, { useEffect } from 'react';
2+
import styles from './styles.module.css';
3+
4+
const Chatbot = () => {
5+
useEffect(() => {
6+
const script1 = document.createElement('script');
7+
script1.src = "https://cdn.botpress.cloud/webchat/v1/inject.js";
8+
script1.async = true;
9+
document.body.appendChild(script1);
10+
11+
const script2 = document.createElement('script');
12+
script2.src = "https://mediafiles.botpress.cloud/4e10f671-b66c-4211-a966-8d2a4b404513/webchat/config.js";
13+
script2.defer = true;
14+
document.body.appendChild(script2);
15+
16+
return () => {
17+
document.body.removeChild(script1);
18+
document.body.removeChild(script2);
19+
};
20+
}, []);
21+
22+
return (
23+
<div>
24+
<div id="bp-web-widget" className={styles.bpwLayoutLeft}></div>
25+
</div>
26+
);
27+
};
28+
29+
export default Chatbot;

0 commit comments

Comments
 (0)