Skip to content

Commit 619bf21

Browse files
Merge pull request #399 from sanskaarz/master
fix minor mistakes/errors in code
2 parents 3601ca4 + 8ac14b5 commit 619bf21

File tree

4 files changed

+23
-31
lines changed
  • 2]. Technical Subjects/4]. Computer Network (CN)
  • 4]. Projects
    • Desktop Development/Console Projects/01). Alexa Virtual Desktop Assistant
    • Web Development
      • JavaScript Projects/01]. API Based Project/05). JS-Issue-Tracker
      • ReactJS Projects/01). Google Clone

4 files changed

+23
-31
lines changed

2]. Technical Subjects/4]. Computer Network (CN)/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
- **LAN (Local Area Network):**
5656
- It is used for a small geographical location like office, hospital, school, etc.
5757

58-
- **HAN (House Area Network):**
58+
- **HAN (Home Area Network):**
5959
- It is actually a LAN that is used within a house and used to connect homely devices like personal computers, phones, printers, etc.
6060

6161
- **CAN (Campus Area Network):**

4]. Projects/Desktop Development/Console Projects/01). Alexa Virtual Desktop Assistant/Alexa.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Author : Akash Khandelwal
22

3-
#Importing Important Library
3+
#Importing Important Libraries
44
from pygame import mixer
55
import wolframalpha
66
import time
@@ -49,7 +49,7 @@ def news():
4949
except Exception as e:
5050
speak("No Internet connection")
5151

52-
#Function for fecthing weather report
52+
#Function for fetching weather report
5353
def Weather_Report(cityname):
5454
api_address = 'http://api.openweathermap.org/data/2.5/weather?appid=1ee020e53372311cc5131630c27b7427&q='
5555

@@ -104,7 +104,7 @@ def wishMe():
104104
time.sleep(2)
105105

106106

107-
#Function for Taking command From User
107+
#Function for Taking commands From User
108108
def takeCommand():
109109
# It takes Microphone input from user
110110
r = sr.Recognizer()
@@ -126,7 +126,7 @@ def takeCommand():
126126
return "None"
127127
return query
128128

129-
#It's Validate to User
129+
#It Validates the User
130130
def check_password():
131131
global i
132132
speak("Enter Your Password:")
@@ -184,7 +184,7 @@ def check_password():
184184
time.sleep(5)
185185

186186
elif 'open stack overflow' in query:
187-
speak("PLease Wait sir Opeaning Stack Overflow")
187+
speak("Please wait sir, opening Stack Overflow")
188188
webbrowser.open("stackoverflow.com")
189189
time.sleep(10)
190190

@@ -204,7 +204,7 @@ def check_password():
204204
os.startfile(codepath)
205205

206206
elif 'goodbye' in query or 'you can go now' in query:
207-
speak("ok sir goodbye it's nice conservation with you")
207+
speak("goodbye sir it's nice conversation with you")
208208
exit()
209209
elif 'open instagram' in query:
210210
speak("Ok sir, Opening Instagram")
@@ -229,7 +229,7 @@ def check_password():
229229

230230

231231
elif 'who is akash khandelwal' in query:
232-
speak("Akash khandelwal is a Computer Science Graduate Apart from that he well qualified Programmer and developer")
232+
speak("Akash Khandelwal is a Computer Science Graduate Apart from that he is a well-qualified Programmer and developer")
233233

234234
elif 'i am coming' in query:
235235
speak("Where are you going")
@@ -379,7 +379,7 @@ def check_password():
379379
speak("tell me only time")
380380

381381
elif 'write a note' in query:
382-
speak("waht should i write,sir")
382+
speak("what should i write, sir")
383383
note = takeCommand()
384384
file = open("jarvis.txt",'w')
385385
speak("sir,Should i include date and time")

4]. Projects/Web Development/JavaScript Projects/01]. API Based Project/05). JS-Issue-Tracker/script.js

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,30 +56,22 @@ function saveIssue(e) {
5656
}
5757

5858
// close status
59-
function setStatusClosed (id) {
60-
var issues = JSON.parse(localStorage.getItem('issues'));
61-
62-
for(var i = 0; i < issues.length; i++) {
63-
if (issues[i].id == id) {
64-
issues[i].status = "Closed";
65-
}
66-
}
67-
68-
localStorage.setItem('issues', JSON.stringify(issues));
69-
fetchIssues();
59+
function setStatusClosed(id) {
60+
var issues = JSON.parse(localStorage.getItem('issues'));
61+
let issue = issues.find(issue => issue.id == id);
62+
if (issue) {
63+
issue.status = "Closed";
64+
}
65+
localStorage.setItem('issues', JSON.stringify(issues));
66+
fetchIssues();
7067
}
7168

7269
// delete issue
73-
function deleteIssue (id) {
74-
var issues = JSON.parse(localStorage.getItem('issues'));
75-
76-
for(var i = 0; i < issues.length; i++) {
77-
if (issues[i].id == id) {
78-
issues.splice(i, 1);
79-
}
80-
}
81-
localStorage.setItem('issues', JSON.stringify(issues));
82-
fetchIssues();
70+
function deleteIssue(id) {
71+
var issues = JSON.parse(localStorage.getItem('issues'));
72+
issues = issues.filter(issue => issue.id != id);
73+
localStorage.setItem('issues', JSON.stringify(issues));
74+
fetchIssues();
8375
}
8476

8577
//clear all issues

4]. Projects/Web Development/ReactJS Projects/01). Google Clone/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
clone this repo
1717

1818
```
19-
gti clone https://github.com/Sukhendra523/google-clone.git
19+
git clone https://github.com/Sukhendra523/google-clone.git
2020
```
2121

2222
- Step-2:

0 commit comments

Comments
 (0)