mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2024-12-22 13:22:39 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
4fe3d0c76f
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ _site/
|
||||
.jekyll-cache/
|
||||
.jekyll-metadata
|
||||
README.md.bak
|
||||
.idea/
|
||||
|
11
1.Helloworld.html
Normal file
11
1.Helloworld.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>my first webpage</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>hello world!</p>
|
||||
</body>
|
||||
</html>
|
8
HelloWorld.cpp
Normal file
8
HelloWorld.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
cout <<"\nHello World"<< endl;
|
||||
return 0;
|
||||
}
|
163
README.md
163
README.md
@ -80,6 +80,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
[![twitter-alt][twitter-img]](https://twitter.com/abaykandotcom)
|
||||
[![github-alt][github-img]](https://github.com/abaykan)
|
||||
|
||||
### Abhishek Kumar
|
||||
- Competietive Coder
|
||||
- Student, Self taught
|
||||
|
||||
### Adeonir Kohl
|
||||
|
||||
- UI Designer, Frontend Developer
|
||||
@ -250,13 +254,19 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![github-alt][github-img]](https://github.com/Arisdolanan)
|
||||
- [![facebook-alt][facebook-img]](https://facebook.com/arisdolanan)
|
||||
|
||||
### Arjun Rajpal
|
||||
### Arighna Chakrabarty
|
||||
- I'm cuerrently a student at IIT Guwahati, India.
|
||||
- My passions are:-
|
||||
- Python Developer
|
||||
- DL enthusuiast
|
||||
- Open Source Freak (Have worked in SymPy..!)
|
||||
- [![github-alt][github-img]](https://github.com/ArighnaIITG)
|
||||
|
||||
- Software Engineer and a ML Enthusiast
|
||||
- [![github-alt][github-img]](https://github.com/arjunrajpal)
|
||||
### Arjun Rajpal
|
||||
- Software Engineer and a ML Enthusiast
|
||||
- [![github-alt][github-img]](https://github.com/arjunrajpal)
|
||||
|
||||
### ASHKUSH
|
||||
|
||||
- Undergrad 2nd year CS student
|
||||
- Open Source contributor
|
||||
- [![github-alt][github-img]](https://github.com/ashkush21)
|
||||
@ -382,6 +392,13 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- Lover of programming, drums, cars, ping-pong and anime.
|
||||
- [![github-alt][github-img]](https://github.com/costassolla)
|
||||
|
||||
### Chirag Gupta
|
||||
- First Year Student
|
||||
- Interested in development, machine learning.
|
||||
- Lover of programming, Greek mythology, Marvel.
|
||||
- [![github-alt][github-img]](https://github.com/chirag2506)
|
||||
[![twitter-alt][twitter-img]](https://twitter.com/chiraggupta2506)
|
||||
|
||||
### CohheeTime
|
||||
|
||||
- I built my first website in 1999
|
||||
@ -637,12 +654,24 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![github-alt][github-img]](https://github.com/ryokugyu)
|
||||
[![twitter-alt][twitter-img]](https://twitter.com/ryokugyu_)
|
||||
|
||||
### Himanshu Aggarwal
|
||||
- Studies at IIITD.
|
||||
- I am a Data Science enthusiast.
|
||||
- [![github-alt][github-img]](https://github.com/himanshu0113)
|
||||
|
||||
### Ha Huy Long Hai
|
||||
|
||||
- An undergraduate Computer Science student
|
||||
- Interests: Machine learning
|
||||
- [![github-alt][github-img]](https://github.com/longhai18)
|
||||
|
||||
### HubbleJo
|
||||
|
||||
- Student from Germany
|
||||
- Really likes Kotlin
|
||||
- Also interested in electronics and artificial Intelligence
|
||||
- [![github-alt][github-img]](https://github.com/hubblejo)
|
||||
|
||||
# I
|
||||
|
||||
### Icaro Lima
|
||||
@ -711,6 +740,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- I also like playing the cello, watching shows on Netflix, and cooking.
|
||||
- [![github-alt][github-img]](https://github.com/janicek1m)
|
||||
|
||||
### Janitha Rasanga
|
||||
- I am a student of University of Moratuwa
|
||||
- [![facebook-alt][facebook-img]](https://web.facebook.com/janitha.rasanga.7)
|
||||
[![github-alt][github-img]](https://github.com/Janitha133)
|
||||
|
||||
### Jason
|
||||
|
||||
- AI/ML enthusiast
|
||||
@ -769,6 +803,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- I like developing and doing graphic art!
|
||||
- [![twitter-alt][twitter-img]](https://twitter.com/jvcks0n)
|
||||
|
||||
### J.D.
|
||||
|
||||
- I'm a software developer from Germany
|
||||
- I like Lord of the Rings
|
||||
|
||||
### João Pedro B.B.
|
||||
|
||||
- A Brazilian trying to print Hello World.
|
||||
@ -807,8 +846,15 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![facebook-alt][facebook-img]](https://www.facebook.com/joao.coelho.505)
|
||||
- [![github-alt][github-img]](https://github.com/vtavares11)
|
||||
|
||||
|
||||
### Jerin
|
||||
- I'm a CSE engineering student
|
||||
- [![github-alt][github-img]](https://github.com/jerinjoseph1)
|
||||
|
||||
|
||||
# K
|
||||
|
||||
|
||||
### Kautuk Kundan
|
||||
|
||||
- Btech 3rd Year student at IPU
|
||||
@ -827,6 +873,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- Loves coding and dancing.
|
||||
- [![github-alt][github-img]](https://github.com/KanchanThareja)
|
||||
|
||||
### Kanishk Gupta
|
||||
- Student,At Chandigarh University , tech enthusiast.
|
||||
- Currently, I am Campus Ambassador at HackerEarth.
|
||||
- I am love to take challenges!!
|
||||
- [![github-alt][github-img]](https://github.com/gkanishk)
|
||||
|
||||
### Karen Geerts
|
||||
|
||||
- I work for REA (https://www.rea-group.com/IRM/content/default.aspx) and am a junior Ruby developer.
|
||||
@ -900,6 +952,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![twitter-alt][twitter-img]](https://twitter.com/lukasgf18)
|
||||
[![github-alt][github-img]](https://github.com/lukasg18)
|
||||
|
||||
### Lúcio Leandro
|
||||
- Computer science student
|
||||
- nerd, I like Free Software, musician
|
||||
- [![github-alt][github-img]](https://github.com/lucioleandro)
|
||||
|
||||
### Luis Chaglla
|
||||
|
||||
- Software Engineer in Spain
|
||||
@ -984,15 +1041,23 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![twitter-alt][twitter-img]](https://twitter.com/_mohit_yadav)
|
||||
[![github-alt][github-img]](https://github.com/mohityadav7)
|
||||
|
||||
### mkaur7999
|
||||
### Morteza Hosseini
|
||||
- Yet Another Developer
|
||||
- [![twitter-alt][twitter-img]](https://twitter.com/mortezism)
|
||||
[![github-alt][github-img]](https://github.com/mory91)
|
||||
|
||||
- I am a young developer in Sri Lanka
|
||||
- I'm currently a undergraduate
|
||||
- My hobbies include:
|
||||
- Coding
|
||||
- Gaming
|
||||
- Nature Photography
|
||||
- [![github-alt][github-img]](https://github.com/mkaur7999)
|
||||
### mkaur7999
|
||||
- I am a young developer in Sri Lanka
|
||||
- I'm currently a undergraduate
|
||||
- My hobbies include:
|
||||
- Coding
|
||||
- Gaming
|
||||
- Nature Photography
|
||||
- [![github-alt][github-img]](https://github.com/mkaur7999)
|
||||
|
||||
### Muh. Salman Alfansuri
|
||||
- I am a web developer and student in Indonesia
|
||||
- [![github-alt][github-img]](https://github.com/Alfansuri)
|
||||
|
||||
### Muhammad Harits Syaifulloh
|
||||
|
||||
@ -1003,6 +1068,7 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![facebook-alt][facebook-img]](https://twitter.com/mharitss)
|
||||
[![github-alt][github-img]](https://github.com/askmhs)
|
||||
|
||||
|
||||
# N
|
||||
|
||||
### Nikhil Singh
|
||||
@ -1012,6 +1078,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![github-alt][github-img]](https://github.com/nikmufc7)
|
||||
[![twitter-alt][twitter-img]](https://twitter.com/creativemartial)
|
||||
|
||||
### Nikhil Taneja
|
||||
- Just a Noob
|
||||
[![github-alt][github-img]](https://github.com/itsnikhil)
|
||||
|
||||
### Nabheet Madan
|
||||
|
||||
- I'm a SAP Technical Consultant interested in #Technical stuff.
|
||||
@ -1074,6 +1144,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![github-alt][github-img]](https://github.com/nomitpahuja)
|
||||
[![twitter-alt][twitter-img]](https://twitter.com/NomitP)
|
||||
|
||||
### NotoriousRebel
|
||||
- Student pursuing B.S. in Computing Security.
|
||||
- Passionate about learning and coding useful things.
|
||||
- I enjoy python and making things more efficient.
|
||||
- [![github-alt][github-img]](https://github.com/NotoriousRebel)
|
||||
|
||||
### Nitish Kumar Jha
|
||||
|
||||
- I am from Mechanical but want to start carrier in software development
|
||||
@ -1159,6 +1235,21 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- C++ - Favourite Programming Language
|
||||
- [![github-alt][github-img]](https://github.com/prince17080)
|
||||
|
||||
### Pawan Singh
|
||||
- Computer Science Graduate from India
|
||||
- Software Engineer
|
||||
- Open Source Contributor
|
||||
- Love working with javaScript and Python
|
||||
- Currently working on
|
||||
- NodeJS
|
||||
- MeteorJS
|
||||
- ReactJS
|
||||
- AngularJS
|
||||
- MongoDB
|
||||
- Python
|
||||
- and sometimes Java
|
||||
- [![github-alt][github-img]](https://github.com/pawansingh972)
|
||||
|
||||
### Pritish Thakkar
|
||||
|
||||
- I'm an undergraduate from Punjab engineering college
|
||||
@ -1183,6 +1274,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- First PR!
|
||||
- [![github-alt][github-img]](https://github.com/pranjalsingh20)
|
||||
|
||||
### Priyam Mehta
|
||||
- I'm 11th grade Computer Science Student.
|
||||
- I am an aspiring Software Developer.
|
||||
- [![github-alt][github-img]](https://github.com/priyyyamm)
|
||||
|
||||
# Q
|
||||
|
||||
### Quang Vũ Nhật
|
||||
@ -1330,6 +1426,14 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- Student, Self-taught Developer
|
||||
- [![github-alt][github-img]](https://github.com/rachitmanchanda)
|
||||
|
||||
### Ruchika Salwan
|
||||
- Software Engineer
|
||||
- Hobbies:
|
||||
- Coding :heart:
|
||||
- Reading :heart:
|
||||
- [![twitter-alt][twitter-img]](https://twitter.com/ruchika_salwan)
|
||||
[![github-alt][github-img]](https://github.com/Ruchika8)
|
||||
|
||||
# S
|
||||
|
||||
### Sadik Kuzu
|
||||
@ -1346,6 +1450,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- Besides coding, I love to read novels and explore different places.
|
||||
- [![github-alt][github-img]](https://github.com/sahilwasan000)
|
||||
|
||||
### Sattu
|
||||
|
||||
- I am an undergraduate student.
|
||||
- [![github-alt][github-img]](https://github.com/CantFindAName0001)
|
||||
|
||||
### Samyak
|
||||
|
||||
- Description about me
|
||||
@ -1365,6 +1474,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- Apart from such inriguing concepts, I am a big fan of Data Science and reading fiction novels.
|
||||
- [![github-alt][github-img]](https://github.com/sralli)
|
||||
|
||||
### Shivam Singh
|
||||
- A Nature love and an Android enthusiast
|
||||
[![github-alt][github-img]](https://github.com/meditat)
|
||||
|
||||
### Shivani Gupta
|
||||
|
||||
- I'm a computer science student.
|
||||
@ -1506,7 +1619,7 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
|
||||
- Student Computer Science
|
||||
- Reverse engineer all the things
|
||||
- [![github-alt][github-img](https://github.com/trillcosby)
|
||||
- [![github-alt][github-img]](https://github.com/trillcosby)
|
||||
|
||||
### Tanet Pornsirirat
|
||||
|
||||
@ -1541,7 +1654,6 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- [![github-alt][github-img]](https://github.com/uds5501)
|
||||
|
||||
### Uğur Soğukpınar
|
||||
|
||||
- Backend Developer
|
||||
- Interested in Machine Learning, Deep Learning, AI
|
||||
- [![github-alt][github-img]](https://github.com/ugursogukpinar)
|
||||
@ -1589,6 +1701,7 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- Painter
|
||||
- [![github-alt][github-img]](https://github.com/Vishal1541)
|
||||
|
||||
|
||||
### Vishal Madheshia
|
||||
|
||||
- iOS Developer
|
||||
@ -1596,6 +1709,24 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
- Expert in Swift
|
||||
- [![github-alt][github-img]](https://github.com/vishalwaka)
|
||||
|
||||
### Volkan Şengül
|
||||
- Software Engineer
|
||||
- Interest : Machine Learning
|
||||
- Teaching software development on youtube
|
||||
- Digital Painting
|
||||
- [![github-alt][github-img]](https://github.com/volkansengul)
|
||||
[![twitter-alt][twitter-img]](https://twitter.com/volkansengul)
|
||||
[![youtube-alt][youtube-img]](https://youtube.com/volkansengul)
|
||||
|
||||
### Apurva Vishwakarma
|
||||
- I am a young developer in India
|
||||
- I'm currently a undergraduate
|
||||
- My hobbies include:
|
||||
- Coding
|
||||
- Gaming
|
||||
- Playing sports
|
||||
- [![github-alt][github-img]](https://github.com/iamapurva)
|
||||
|
||||
# W
|
||||
|
||||
### Wisnu Febriadi
|
||||
@ -1609,6 +1740,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
|
||||
# X
|
||||
|
||||
# Y
|
||||
### Yaderson Patiño
|
||||
- Im from Colombia .student of programing, junior web Developer, in Vue Js, Node... Javascript is amazing
|
||||
- [![twitter-alt][twitter-img]](https://mobile.twitter.com/Yaderr_)
|
||||
[![github-alt][github-img]](https://github.com/yaderson)
|
||||
|
||||
### Yee Antonio
|
||||
|
||||
|
180
code/AVL.py
Normal file
180
code/AVL.py
Normal file
@ -0,0 +1,180 @@
|
||||
'''
|
||||
A AVL tree
|
||||
'''
|
||||
|
||||
|
||||
class Node:
|
||||
|
||||
def __init__(self, label):
|
||||
self.label = label
|
||||
self._parent = None
|
||||
self._left = None
|
||||
self._right = None
|
||||
self.height = 0
|
||||
|
||||
@property
|
||||
def right(self):
|
||||
return self._right
|
||||
|
||||
@right.setter
|
||||
def right(self, node):
|
||||
if node is not None:
|
||||
node._parent = self
|
||||
self._right = node
|
||||
|
||||
@property
|
||||
def left(self):
|
||||
return self._left
|
||||
|
||||
@left.setter
|
||||
def left(self, node):
|
||||
if node is not None:
|
||||
node._parent = self
|
||||
self._left = node
|
||||
|
||||
@property
|
||||
def parent(self):
|
||||
return self._parent
|
||||
|
||||
@parent.setter
|
||||
def parent(self, node):
|
||||
if node is not None:
|
||||
self._parent = node
|
||||
self.height = self.parent.height + 1
|
||||
else:
|
||||
self.height = 0
|
||||
|
||||
|
||||
class AVL:
|
||||
|
||||
def __init__(self):
|
||||
self.root = None
|
||||
self.size = 0
|
||||
|
||||
def insert(self, value):
|
||||
node = Node(value)
|
||||
|
||||
if self.root is None:
|
||||
self.root = node
|
||||
self.root.height = 0
|
||||
self.size = 1
|
||||
else:
|
||||
# Same as Binary Tree
|
||||
dad_node = None
|
||||
curr_node = self.root
|
||||
|
||||
while True:
|
||||
if curr_node is not None:
|
||||
|
||||
dad_node = curr_node
|
||||
|
||||
if node.label < curr_node.label:
|
||||
curr_node = curr_node.left
|
||||
else:
|
||||
curr_node = curr_node.right
|
||||
else:
|
||||
node.height = dad_node.height
|
||||
dad_node.height += 1
|
||||
if node.label < dad_node.label:
|
||||
dad_node.left = node
|
||||
else:
|
||||
dad_node.right = node
|
||||
self.rebalance(node)
|
||||
self.size += 1
|
||||
break
|
||||
|
||||
def rebalance(self, node):
|
||||
n = node
|
||||
|
||||
while n is not None:
|
||||
height_right = n.height
|
||||
height_left = n.height
|
||||
|
||||
if n.right is not None:
|
||||
height_right = n.right.height
|
||||
|
||||
if n.left is not None:
|
||||
height_left = n.left.height
|
||||
|
||||
if abs(height_left - height_right) > 1:
|
||||
if height_left > height_right:
|
||||
left_child = n.left
|
||||
if left_child is not None:
|
||||
h_right = (right_child.right.height
|
||||
if (right_child.right is not None) else 0)
|
||||
h_left = (right_child.left.height
|
||||
if (right_child.left is not None) else 0)
|
||||
if (h_left > h_right):
|
||||
self.rotate_left(n)
|
||||
break
|
||||
else:
|
||||
self.double_rotate_right(n)
|
||||
break
|
||||
else:
|
||||
right_child = n.right
|
||||
if right_child is not None:
|
||||
h_right = (right_child.right.height
|
||||
if (right_child.right is not None) else 0)
|
||||
h_left = (right_child.left.height
|
||||
if (right_child.left is not None) else 0)
|
||||
if (h_left > h_right):
|
||||
self.double_rotate_left(n)
|
||||
break
|
||||
else:
|
||||
self.rotate_right(n)
|
||||
break
|
||||
n = n.parent
|
||||
|
||||
def rotate_left(self, node):
|
||||
aux = node.parent.label
|
||||
node.parent.label = node.label
|
||||
node.parent.right = Node(aux)
|
||||
node.parent.right.height = node.parent.height + 1
|
||||
node.parent.left = node.right
|
||||
|
||||
|
||||
def rotate_right(self, node):
|
||||
aux = node.parent.label
|
||||
node.parent.label = node.label
|
||||
node.parent.left = Node(aux)
|
||||
node.parent.left.height = node.parent.height + 1
|
||||
node.parent.right = node.right
|
||||
|
||||
def double_rotate_left(self, node):
|
||||
self.rotate_right(node.getRight().getRight())
|
||||
self.rotate_left(node)
|
||||
|
||||
def double_rotate_right(self, node):
|
||||
self.rotate_left(node.getLeft().getLeft())
|
||||
self.rotate_right(node)
|
||||
|
||||
def empty(self):
|
||||
if self.root is None:
|
||||
return True
|
||||
return False
|
||||
|
||||
def preShow(self, curr_node):
|
||||
if curr_node is not None:
|
||||
self.preShow(curr_node.left)
|
||||
print(curr_node.label, end=" ")
|
||||
self.preShow(curr_node.right)
|
||||
|
||||
def preorder(self, curr_node):
|
||||
if curr_node is not None:
|
||||
self.preShow(curr_node.left)
|
||||
self.preShow(curr_node.right)
|
||||
print(curr_node.label, end=" ")
|
||||
|
||||
def getRoot(self):
|
||||
return self.root
|
||||
|
||||
t = AVL()
|
||||
t.insert(1)
|
||||
t.insert(2)
|
||||
t.insert(3)
|
||||
# t.preShow(t.root)
|
||||
# print("\n")
|
||||
# t.insert(4)
|
||||
# t.insert(5)
|
||||
# t.preShow(t.root)
|
||||
# t.preorden(t.root)
|
@ -1,2 +1,2 @@
|
||||
document.write("Hello World!");
|
||||
document.write("Hello World");
|
||||
document.write("I am Ashik Paul. I am a Web Developer");
|
||||
|
37
code/BoardPath.java
Normal file
37
code/BoardPath.java
Normal file
@ -0,0 +1,37 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class getBoardPath {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Scanner scn = new Scanner(System.in);
|
||||
System.out.println("Enter Current Position:");
|
||||
int n1= scn.nextInt();
|
||||
System.out.println("Enter Destination Position:");
|
||||
int n2= scn.nextInt();
|
||||
System.out.println(GetBoardPath(n1, n2));
|
||||
|
||||
}
|
||||
|
||||
public static ArrayList<String> GetBoardPath(int curr, int end) {
|
||||
// Returns all snake & ladder board paths from curr to end
|
||||
if (curr == end) {
|
||||
ArrayList<String> basePositive = new ArrayList<>();
|
||||
basePositive.add("\n");
|
||||
return basePositive;
|
||||
}
|
||||
if (curr > end) {
|
||||
ArrayList<String> baseNegative = new ArrayList<>();
|
||||
return baseNegative;
|
||||
}
|
||||
ArrayList<String> MyResult = new ArrayList<>();
|
||||
for (int dice = 1; dice <= 6; dice++) {
|
||||
ArrayList<String> RecResult = GetBoardPath(curr + dice, end);
|
||||
for (String RecResultString : RecResult) {
|
||||
MyResult.add(dice + RecResultString);
|
||||
}
|
||||
}
|
||||
return MyResult;
|
||||
}
|
||||
|
||||
}
|
26
code/FILES-BINARY-IN-C-PLUS-PLUS.cpp
Normal file
26
code/FILES-BINARY-IN-C-PLUS-PLUS.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
/* WORKING FIRST FILE BINARY */
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
using namespace std;
|
||||
int main(){
|
||||
char msg[100];
|
||||
ofstream escritura("File1.txt");
|
||||
if(escritura.fail()){
|
||||
cout<<"Error in FILE";
|
||||
}else{
|
||||
cout<<"FILE Successfully generated"<<endl;
|
||||
cout<<"Msg: ";
|
||||
fflush(stdin);
|
||||
gets(msg);
|
||||
escritura<<msg;
|
||||
}
|
||||
|
||||
escritura.close();
|
||||
/* cout<<"Archivo -- close"<<endl;
|
||||
char ar[100];
|
||||
ifstream lectura("archivo1.txt");
|
||||
lectura >> ar;
|
||||
cout<<ar<<endl;
|
||||
lectura.close();
|
||||
*/
|
||||
}
|
10
code/HelloWOrld.cs
Normal file
10
code/HelloWOrld.cs
Normal file
@ -0,0 +1,10 @@
|
||||
// Hello World! program C#
|
||||
namespace HelloWorld
|
||||
{
|
||||
class Hello {
|
||||
static void Main(string[] args)
|
||||
{
|
||||
System.Console.WriteLine("Hello HacktoberFest!");
|
||||
}
|
||||
}
|
||||
}
|
6
code/HelloWorld.java
Normal file
6
code/HelloWorld.java
Normal file
@ -0,0 +1,6 @@
|
||||
public class HelloWorld{
|
||||
|
||||
public static void main(String[] args){
|
||||
System.out.println("Hello World from India!");
|
||||
}
|
||||
}
|
8
code/HelloWorld_jatin.py
Normal file
8
code/HelloWorld_jatin.py
Normal file
@ -0,0 +1,8 @@
|
||||
//Jatin Aggarwal
|
||||
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
printf("Hello, World!");
|
||||
return 0;
|
||||
}
|
6
code/Hello_World_Janitha.java
Normal file
6
code/Hello_World_Janitha.java
Normal file
@ -0,0 +1,6 @@
|
||||
public class HelloWorld {
|
||||
public static void main( String[] args ) {
|
||||
System.out.println( "Hello World!" );
|
||||
System.exit( 0 );
|
||||
}
|
||||
}
|
193
code/doublylinklist.cpp
Normal file
193
code/doublylinklist.cpp
Normal file
@ -0,0 +1,193 @@
|
||||
#include<stdlib.h>
|
||||
#include<stdio.h>
|
||||
#include<malloc.h>
|
||||
|
||||
struct node
|
||||
{
|
||||
|
||||
int id ;
|
||||
char name[20];
|
||||
struct node*prev;
|
||||
struct node*next;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
node*temp,*start=NULL,*last=NULL;
|
||||
|
||||
|
||||
void creation();
|
||||
void deletion();
|
||||
void display();
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
int decision;
|
||||
int ch;
|
||||
ch=1;
|
||||
while(ch==1)
|
||||
{
|
||||
|
||||
printf(" \n 1.CREATE A NEW CONSUMER RECORD \n 2.DELETE A RECORD \n 3.DISPLAY \n 4.EXIT \n");
|
||||
|
||||
printf("\n ENTER YOUR CHOICE ");
|
||||
scanf("%d", &decision);
|
||||
|
||||
|
||||
switch(decision)
|
||||
{
|
||||
|
||||
case 1 : creation();
|
||||
break;
|
||||
|
||||
|
||||
case 2 : deletion();
|
||||
break;
|
||||
|
||||
|
||||
case 3 : display();
|
||||
break;
|
||||
|
||||
|
||||
case 4 : exit(0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void creation()
|
||||
{
|
||||
|
||||
int ch;
|
||||
ch=1;
|
||||
|
||||
while(ch==1)
|
||||
|
||||
{
|
||||
|
||||
|
||||
temp= (node*)malloc(sizeof(node));
|
||||
|
||||
printf(" ENTER THE CONSUMER ID : ");
|
||||
scanf("%d",&temp->id);
|
||||
|
||||
printf(" ENTER THE CONSUMER NAME : ");
|
||||
scanf("%s",&temp->name);
|
||||
|
||||
|
||||
if(start==NULL)
|
||||
{
|
||||
temp->prev=NULL;
|
||||
temp->next=NULL;
|
||||
start=last=temp;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
temp->next=start;
|
||||
start->prev=temp;
|
||||
|
||||
start=temp;
|
||||
|
||||
|
||||
}
|
||||
|
||||
printf(" WANT TO ENTER MORE (0/1) : ");
|
||||
scanf("%d",&ch);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void deletion()
|
||||
{
|
||||
|
||||
if(start==NULL)
|
||||
{
|
||||
printf(" NO DATA TO DELETE");
|
||||
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
temp=start;
|
||||
node*temp2;
|
||||
|
||||
while(temp->next!=NULL)
|
||||
{
|
||||
temp2=temp;
|
||||
|
||||
temp=temp->next;
|
||||
|
||||
|
||||
}
|
||||
|
||||
temp2->next=NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void display()
|
||||
{
|
||||
temp=start;
|
||||
|
||||
while(temp!=NULL)
|
||||
{
|
||||
|
||||
printf(" C.NAME : %s C.ID : %d -->", temp->name,temp->id) ;
|
||||
|
||||
temp=temp->next;
|
||||
|
||||
}
|
||||
|
||||
printf("NULL \n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
code/hello.elm
Normal file
7
code/hello.elm
Normal file
@ -0,0 +1,7 @@
|
||||
module Hello exposing (..)
|
||||
|
||||
import Html exposing (text)
|
||||
|
||||
|
||||
main =
|
||||
text "Hello World!"
|
3
code/helloNewWorld.py
Normal file
3
code/helloNewWorld.py
Normal file
@ -0,0 +1,3 @@
|
||||
#New Hello World Code in Python
|
||||
print("Hello World! This is Hacktober 2018! Enjoy!")
|
||||
|
22
code/sort.js
Normal file
22
code/sort.js
Normal file
@ -0,0 +1,22 @@
|
||||
function (arr) {
|
||||
function swap(i, j) {
|
||||
let temp = arr[i];
|
||||
arr[i] = arr[j];
|
||||
arr[j] = temp;
|
||||
}
|
||||
let n = arr.length;
|
||||
let sw = true;
|
||||
let x = 0;
|
||||
while (sw) {
|
||||
sw = false;
|
||||
x = x + 1;
|
||||
for (let i = 1;i<=(n-x);i++) {
|
||||
if (arr[i - 1] > arr[i]) {
|
||||
swap(i - 1, i);
|
||||
sw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return arr
|
||||
}
|
Loading…
Reference in New Issue
Block a user