diff --git a/AWK/hello_world.awk b/AWK/hello_world.awk deleted file mode 100755 index 25043baf5..000000000 --- a/AWK/hello_world.awk +++ /dev/null @@ -1,2 +0,0 @@ -# !/usr/bin/awk -f -BEGIN { print "Hello, World!" } diff --git a/Bash/helloworld b/Bash/helloworld deleted file mode 100644 index de06dabea..000000000 --- a/Bash/helloworld +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -# -# Print "Hello World" and exit - -echo "Hello World!" diff --git a/Bash/helloworld.sh b/Bash/helloworld.sh deleted file mode 100644 index 2a43bb269..000000000 --- a/Bash/helloworld.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "hello world" diff --git a/Brainfuck/HelloWorld.bf b/Brainfuck/HelloWorld.bf deleted file mode 100644 index 1fd1eabf9..000000000 --- a/Brainfuck/HelloWorld.bf +++ /dev/null @@ -1 +0,0 @@ -+[>>>->-[>->----<<<]>>]>.---.>+..+++.>>.<.>>---.<<<.+++.------.<-.>>+. diff --git a/C#/HelloWorld.cs b/C#/HelloWorld.cs deleted file mode 100644 index b1319153c..000000000 --- a/C#/HelloWorld.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace hello -{ - class HelloWorld - { - static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - } - } -} diff --git a/C++/BinarySearch.cpp b/C++/BinarySearch.cpp index c6e916133..f4084a963 100644 --- a/C++/BinarySearch.cpp +++ b/C++/BinarySearch.cpp @@ -1,26 +1,26 @@ -#include -using namespace std; -bool BinarySearch(int arr[], int n, int k){ - int s=0;int e=n-1; - while (s<=e){ - int mid=(s+e)/2; - if (arr[mid]==k) return true; - if (arr[mid]>arr[i]; - cout<<"enter the number you want to search"; - cin>>target; - if(BinarySearch(arr,n,target) cout<<"The number exists"< +using namespace std; +bool BinarySearch(int arr[], int n, int k){ + int s=0;int e=n-1; + while (s<=e){ + int mid=(s+e)/2; + if (arr[mid]==k) return true; + if (arr[mid]>arr[i]; + cout<<"enter the number you want to search"; + cin>>target; + if(BinarySearch(arr,n,target) cout<<"The number exists"< -#define SIZE 5 /* Size of Circular Queue */ - -using namespace std; - -class Queue { -private: - int items[SIZE], front, rear; - -public: - Queue(){ - front = -1; - rear = -1; - } - - bool isFull(){ - if(front == 0 && rear == SIZE - 1){ - return true; - } - if(front == rear + 1) { - return true; - } - return false; - } - - bool isEmpty(){ - if(front == -1) return true; - else return false; - } - - void enQueue(int element){ - if(isFull()){ - cout << "Queue is full"; - } else { - if(front == -1) front = 0; - rear = (rear + 1) % SIZE; - items[rear] = element; - cout << endl << "Inserted " << element << endl; - } - } - - int deQueue(){ - int element; - if(isEmpty()){ - cout << "Queue is empty" << endl; - return(-1); - } else { - element = items[front]; - if(front == rear){ - front = -1; - rear = -1; - } /* Q has only one element, so we reset the queue after deleting it. */ - else { - front=(front+1) % SIZE; - } - return(element); - } - } - - void display() - { - /* Function to display status of Circular Queue */ - int i; - if(isEmpty()) { - cout << endl << "Empty Queue" << endl; - } - else - { - cout << "Front -> " << front; - cout << endl << "Items -> "; - for(i=front; i!=rear;i=(i+1)%SIZE) - cout << items[i]; - cout << items[i]; - cout << endl << "Rear -> " << rear; - } - } - -}; - - -int main() -{ - Queue q; - - // Fails because front = -1 - q.deQueue(); - - q.enQueue(1); - q.enQueue(2); - q.enQueue(3); - q.enQueue(4); - q.enQueue(5); - - // Fails to enqueue because front == 0 && rear == SIZE - 1 - q.enQueue(6); - - - q.display(); - - int elem = q.deQueue(); - - if( elem != -1) - cout << endl << "Deleted Element is " << elem; - - q.display(); - - q.enQueue(7); - - q.display(); - - // Fails to enqueue because front == rear + 1 - q.enQueue(8); - - return 0; -} +#include +#define SIZE 5 /* Size of Circular Queue */ + +using namespace std; + +class Queue { +private: + int items[SIZE], front, rear; + +public: + Queue(){ + front = -1; + rear = -1; + } + + bool isFull(){ + if(front == 0 && rear == SIZE - 1){ + return true; + } + if(front == rear + 1) { + return true; + } + return false; + } + + bool isEmpty(){ + if(front == -1) return true; + else return false; + } + + void enQueue(int element){ + if(isFull()){ + cout << "Queue is full"; + } else { + if(front == -1) front = 0; + rear = (rear + 1) % SIZE; + items[rear] = element; + cout << endl << "Inserted " << element << endl; + } + } + + int deQueue(){ + int element; + if(isEmpty()){ + cout << "Queue is empty" << endl; + return(-1); + } else { + element = items[front]; + if(front == rear){ + front = -1; + rear = -1; + } /* Q has only one element, so we reset the queue after deleting it. */ + else { + front=(front+1) % SIZE; + } + return(element); + } + } + + void display() + { + /* Function to display status of Circular Queue */ + int i; + if(isEmpty()) { + cout << endl << "Empty Queue" << endl; + } + else + { + cout << "Front -> " << front; + cout << endl << "Items -> "; + for(i=front; i!=rear;i=(i+1)%SIZE) + cout << items[i]; + cout << items[i]; + cout << endl << "Rear -> " << rear; + } + } + +}; + + +int main() +{ + Queue q; + + // Fails because front = -1 + q.deQueue(); + + q.enQueue(1); + q.enQueue(2); + q.enQueue(3); + q.enQueue(4); + q.enQueue(5); + + // Fails to enqueue because front == 0 && rear == SIZE - 1 + q.enQueue(6); + + + q.display(); + + int elem = q.deQueue(); + + if( elem != -1) + cout << endl << "Deleted Element is " << elem; + + q.display(); + + q.enQueue(7); + + q.display(); + + // Fails to enqueue because front == rear + 1 + q.enQueue(8); + + return 0; +} diff --git a/C++/Hello World b/C++/Hello World deleted file mode 100644 index 4ab4e694e..000000000 --- a/C++/Hello World +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; -int main(){ - -cout<<"hello"; - -return 0; -} diff --git a/C++/HelloWorld.cpp b/C++/HelloWorld.cpp deleted file mode 100644 index 95e8fbd92..000000000 --- a/C++/HelloWorld.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include - -void main() -{ - char ch = "helloo everyone"; - for(int i=0;i<10;i++) - { - cout< -class Node -{ -public: - T value; - Node* next; - - Node(T); - ~Node(); - -}; - -template -class Queue -{ - int count; - Node* front; - Node* back; - -public: - int length(); - T Front(); - bool Empty(); - void push(T); - void pop(); - void clear(); - Queue(); - ~Queue(); -}; diff --git a/C++/binarysearch.cpp b/C++/binarysearch.cpp deleted file mode 100644 index f4084a963..000000000 --- a/C++/binarysearch.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include -using namespace std; -bool BinarySearch(int arr[], int n, int k){ - int s=0;int e=n-1; - while (s<=e){ - int mid=(s+e)/2; - if (arr[mid]==k) return true; - if (arr[mid]>arr[i]; - cout<<"enter the number you want to search"; - cin>>target; - if(BinarySearch(arr,n,target) cout<<"The number exists"< -#define SIZE 5 /* Size of Circular Queue */ - -using namespace std; - -class Queue { -private: - int items[SIZE], front, rear; - -public: - Queue(){ - front = -1; - rear = -1; - } - - bool isFull(){ - if(front == 0 && rear == SIZE - 1){ - return true; - } - if(front == rear + 1) { - return true; - } - return false; - } - - bool isEmpty(){ - if(front == -1) return true; - else return false; - } - - void enQueue(int element){ - if(isFull()){ - cout << "Queue is full"; - } else { - if(front == -1) front = 0; - rear = (rear + 1) % SIZE; - items[rear] = element; - cout << endl << "Inserted " << element << endl; - } - } - - int deQueue(){ - int element; - if(isEmpty()){ - cout << "Queue is empty" << endl; - return(-1); - } else { - element = items[front]; - if(front == rear){ - front = -1; - rear = -1; - } /* Q has only one element, so we reset the queue after deleting it. */ - else { - front=(front+1) % SIZE; - } - return(element); - } - } - - void display() - { - /* Function to display status of Circular Queue */ - int i; - if(isEmpty()) { - cout << endl << "Empty Queue" << endl; - } - else - { - cout << "Front -> " << front; - cout << endl << "Items -> "; - for(i=front; i!=rear;i=(i+1)%SIZE) - cout << items[i]; - cout << items[i]; - cout << endl << "Rear -> " << rear; - } - } - -}; - - -int main() -{ - Queue q; - - // Fails because front = -1 - q.deQueue(); - - q.enQueue(1); - q.enQueue(2); - q.enQueue(3); - q.enQueue(4); - q.enQueue(5); - - // Fails to enqueue because front == 0 && rear == SIZE - 1 - q.enQueue(6); - - - q.display(); - - int elem = q.deQueue(); - - if( elem != -1) - cout << endl << "Deleted Element is " << elem; - - q.display(); - - q.enQueue(7); - - q.display(); - - // Fails to enqueue because front == rear + 1 - q.enQueue(8); - - return 0; -} diff --git a/C++/factorial.cpp b/C++/factorial.cpp deleted file mode 100644 index 728113db6..000000000 --- a/C++/factorial.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -using namespace std; -int factorial(int n) -{ - if(n==1 || n==0) - return 1; - else - return n*factorial(n-1); -} -int main() -{ - int n; - cout << "Enter a positive integer: "; - cin >> n; - cout << "Factorial of " << n << " = " << factorial(n)< -int main() { - std::cout << "Hello, World!"; - return 0; -} diff --git a/C++/hello-world.cpp b/C++/hello-world.cpp deleted file mode 100644 index ddfa75a81..000000000 --- a/C++/hello-world.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -using namespace std; - -int main() { - - cout << "Hola Mundo en español :w" << endl; - - return 0; - -} diff --git a/C++/hello.cpp b/C++/hello.cpp deleted file mode 100644 index 599978158..000000000 --- a/C++/hello.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/hello__world.cpp b/C++/hello__world.cpp deleted file mode 100644 index e7a65eb0d..000000000 --- a/C++/hello__world.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main() -{ - cout<<"HELLO WORLD:)"; - return 0; -} \ No newline at end of file diff --git a/C++/hello_world!.cpp b/C++/hello_world!.cpp deleted file mode 100644 index c68205469..000000000 --- a/C++/hello_world!.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() { - - cout << "hello WORLD" << endl; - return 0; -} diff --git a/C++/hello_world.cpp b/C++/hello_world.cpp deleted file mode 100644 index 88ca3f879..000000000 --- a/C++/hello_world.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main() -{ - cout<<"Hello World\n"; - return 0; -} \ No newline at end of file diff --git a/C++/helloworld.cpp b/C++/helloworld.cpp deleted file mode 100644 index 2e73d4708..000000000 --- a/C++/helloworld.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include - -void main() -{ - char ch = "helloo everyone"; - for(int i=0;i<10;i++) - { - cout< -main() { - long long P = 1, - E = 2, - T = 5, - A = 61, - L = 251, - N = 3659, - R = 271173410, - G = 1479296389, - x[] = { G * R * E * E * T , P * L * A * N * E * T }; - puts((char*)x); -} \ No newline at end of file diff --git a/C/Hello_Hacktoberfest.c b/C/Hello_Hacktoberfest.c deleted file mode 100644 index 45ca726f3..000000000 --- a/C/Hello_Hacktoberfest.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("HELLO HACKTOBERFEST :)"); - return 0; -} diff --git a/C/Hello_world.c b/C/Hello_world.c deleted file mode 100644 index 35dd43bf3..000000000 --- a/C/Hello_world.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(void) -{ - printf("Hello World"); - return 0; -} diff --git a/C/hello.c b/C/hello.c deleted file mode 100644 index 1e6544cff..000000000 --- a/C/hello.c +++ /dev/null @@ -1,6 +0,0 @@ -#include //header file -int main() //main function -{ - printf("Hello World ! \n:)"); //print statement - return 0; -} diff --git a/C/helloWorld.c b/C/helloWorld.c deleted file mode 100644 index 4fd6a4056..000000000 --- a/C/helloWorld.c +++ /dev/null @@ -1,13 +0,0 @@ -#include -main() { - long long P = 1, - E = 2, - T = 5, - A = 61, - L = 251, - N = 3659, - R = 271173410, - G = 1479296389, - x[] = { G * R * E * E * T , P * L * A * N * E * T }; - puts((char*)x); -} \ No newline at end of file diff --git a/C/helloWorld.cpp b/C/helloWorld.cpp deleted file mode 100644 index a9df1f549..000000000 --- a/C/helloWorld.cpp +++ /dev/null @@ -1,11 +0,0 @@ -//# Hello-world -//Add any Program in any language you like or add a hello world Program ❣️ if you like give us :star: - -#include -using namespace std; - -int main() -{ - cout << "Hello, World" << endl; - return 0; -} diff --git a/Cpp/HelloWorld.cpp b/Cpp/HelloWorld.cpp deleted file mode 100644 index 36b8d5168..000000000 --- a/Cpp/HelloWorld.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; - -int main(){ - cout<<"Hello world!"; - return 0; -} diff --git a/Crystal/hello_world.cr b/Crystal/hello_world.cr deleted file mode 100644 index a957a6f94..000000000 --- a/Crystal/hello_world.cr +++ /dev/null @@ -1,3 +0,0 @@ -# Hello world in Crystal - -puts "Hello World" \ No newline at end of file diff --git a/Crystal/inputexample.cr b/Crystal/inputexample.cr deleted file mode 100644 index ffdc9f971..000000000 --- a/Crystal/inputexample.cr +++ /dev/null @@ -1,20 +0,0 @@ -puts "Hello there! Please write your name!" -name = gets -puts "Great! So #{name}, write your favorite number!" - -number = gets.to_s.to_i64? - -if number.nil? - puts "That's not a Number!!" - exit -else - i = number || 0 -end - -while i > 0 - puts "There is #{i} Crystals on the wall, take one down now there is #{i - 1} Crystals on the wall!" - i -= 1 -end - -puts "There is no more Crystals on the wall, time to write some more!" - diff --git a/Docker/docker swarm service create example.sh b/Docker/docker swarm service create example.sh deleted file mode 100644 index 099520712..000000000 --- a/Docker/docker swarm service create example.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -Sudo docker service create --name mycluster --hostname mycluster --replicas 1 --publish 80:80 imagename:latest \ No newline at end of file diff --git a/Fish/obfuscated-hello-world.fish b/Fish/obfuscated-hello-world.fish deleted file mode 100644 index 739cde884..000000000 --- a/Fish/obfuscated-hello-world.fish +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env fish - -set x (printf 'G1szbXNtYXNoG1swbSB0aGF0IG1mIGxpa2UgYnV0dG9uIPCfmKnwn5GM' | base64 -d) -for char in (string split '' $x) - grep -Faom 1 $char /dev/urandom | head -n 1 | tr -d '\n' -end -echo diff --git a/GNU Make/Makefile b/GNU Make/Makefile deleted file mode 100644 index 7cc67d18d..000000000 --- a/GNU Make/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - @echo "HACKTOBERFEST 2018" \ No newline at end of file diff --git a/GO/hello-world.go b/GO/hello-world.go deleted file mode 100644 index 87595e3cf..000000000 --- a/GO/hello-world.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("hello world") -} diff --git a/Golang/HelloWorld.go b/Golang/HelloWorld.go deleted file mode 100644 index eb735bb3f..000000000 --- a/Golang/HelloWorld.go +++ /dev/null @@ -1,8 +0,0 @@ -package main - - -import "fmt" - -func main() { - fmt.Println("Hey, Hello Go. I started learning you") -} diff --git a/Hello world python/helloWorld.py b/Hello world python/helloWorld.py deleted file mode 100644 index 75d9766db..000000000 --- a/Hello world python/helloWorld.py +++ /dev/null @@ -1 +0,0 @@ -print('hello world') diff --git a/Html/Hello-world.html b/Html/Hello-world.html index e88765c34..abc822ea6 100644 --- a/Html/Hello-world.html +++ b/Html/Hello-world.html @@ -1,10 +1,10 @@ - - - HELLO WORLD - - -

- Hello World by Juan V. -

- - + + + HELLO WORLD + + +

+ Hello World by Juan V. +

+ + diff --git a/Html/HelloWorld.html b/Html/HelloWorld.html deleted file mode 100644 index 294f53b91..000000000 --- a/Html/HelloWorld.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -
- Hello World! -
- - -

Hello World!

- orange - - -
-

Hacktoberfest 2018

-
- diff --git a/Html/Hello_world.html b/Html/Hello_world.html index 07a97bb92..b362e3034 100644 --- a/Html/Hello_world.html +++ b/Html/Hello_world.html @@ -1,8 +1,8 @@ - - -HELLO WORLD - - -HELLO WORLD - + + +HELLO WORLD + + +HELLO WORLD + \ No newline at end of file diff --git a/Html/hello-world.html b/Html/hello-world.html deleted file mode 100644 index abc822ea6..000000000 --- a/Html/hello-world.html +++ /dev/null @@ -1,10 +0,0 @@ - - - HELLO WORLD - - -

- Hello World by Juan V. -

- - diff --git a/Html/hello_world.html b/Html/hello_world.html deleted file mode 100644 index 07a97bb92..000000000 --- a/Html/hello_world.html +++ /dev/null @@ -1,8 +0,0 @@ - - -HELLO WORLD - - -HELLO WORLD - - \ No newline at end of file diff --git a/Html/index.html b/Html/index.html deleted file mode 100644 index 1a19b7f47..000000000 --- a/Html/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Hello World - - -

Hello World :)

-

This is a paragraph

- - diff --git a/Html/just12.html b/Html/just12.html deleted file mode 100644 index e1829857d..000000000 --- a/Html/just12.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - just12 - - - - -

hellow world

- - diff --git a/Java/BubbleSort.java b/Java/BubbleSort.java deleted file mode 100644 index 16db89252..000000000 --- a/Java/BubbleSort.java +++ /dev/null @@ -1,36 +0,0 @@ -import java.util.*; - -public class BubbleSort { - public static void main(String[] args) { - - Scanner s = new Scanner(System.in); - - System.out.println("enter number of elements"); - int n = s.nextInt(); - - int arr[] = new int[n]; - - System.out.println("enter elements"); - - for (int i = 0; i < n; i++) { - arr[i] = s.nextInt(); - } - BubbleSort b=new BubbleSort(); - b.bubble(arr); - } - - public void bubble(int[] arr) { - for (int i = 0; i < arr.length - 1; i++) { - for (int j = 0; j < arr.length - i - 1; j++) { - if (arr[j] > arr[j + 1]) { - int temp = arr[j]; - arr[j] = arr[j + 1]; - arr[j + 1] = temp; - } - } - } - for(int i: arr) - System.out.println(i); - } - -} diff --git a/Java/HelloWorld.java b/Java/HelloWorld.java deleted file mode 100644 index 01112a082..000000000 --- a/Java/HelloWorld.java +++ /dev/null @@ -1,5 +0,0 @@ -public class Program { - public static void main(String[] args) { - System.out.print("Hello"); - } -} diff --git a/Java/HelloWorld/Hello.java b/Java/HelloWorld/Hello.java deleted file mode 100644 index b438404f4..000000000 --- a/Java/HelloWorld/Hello.java +++ /dev/null @@ -1,5 +0,0 @@ -public class hello{ - public static void main(String [] args){ - System.out.println("Hello world"); - } -} diff --git a/Java/HelloWorld/helloWorld.java b/Java/HelloWorld/helloWorld.java deleted file mode 100644 index 167c4aba9..000000000 --- a/Java/HelloWorld/helloWorld.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello World"); - } -} diff --git a/Java/Helloworld.java b/Java/Helloworld.java deleted file mode 100644 index 01112a082..000000000 --- a/Java/Helloworld.java +++ /dev/null @@ -1,5 +0,0 @@ -public class Program { - public static void main(String[] args) { - System.out.print("Hello"); - } -} diff --git a/Java/MergeSort.java b/Java/MergeSort.java deleted file mode 100644 index 2806328e1..000000000 --- a/Java/MergeSort.java +++ /dev/null @@ -1,100 +0,0 @@ -class MergeSort -{ - - void merge(int arr[], int l, int m, int r) - { - - int n1 = m - l + 1; - int n2 = r - m; - - - int L[] = new int [n1]; - int R[] = new int [n2]; - - - for (int i=0; i - - - - - - Interactive dice - - - - - - - - - - - - - - - - - - - -
-

Sei maggiorenne?

-

Inserisci la data di nascita sotto

-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Interactive Dice!

-
-

Fare un scelta:

-
- 5 chf - 10 chf - 20 chf - 50 chf -
- -
- -
-

Budget:

-
-

-
-

↓ Dadi utente ↓

-
-

↓ Dadi computer ↓

-
- - - - - -
-

-
-

Score utente:

- -
-

Score Pc:

- -
- - - \ No newline at end of file diff --git a/JavaScript/Dice/main.js b/JavaScript/Dice/main.js index a71b3d946..0b4b47ad0 100644 --- a/JavaScript/Dice/main.js +++ b/JavaScript/Dice/main.js @@ -1,187 +1,187 @@ -var maggiorenne = false; -var budget = 50; -var userScore = 0; -var pcScore = 0; -var puntato = 0; -var giocaOk = false; - -var userNumber = 0; -var PcNumber = 0; -function enter() { - var eta = new Date(document.getElementById("dataUser").value); - if(eta.getTime() < new Date().getTime()){ - if (new Date().getTime() - eta.getTime() > new Date(567600000000)) - maggiorenne = true; - else - maggiorenne = false; - - document.getElementById("login").style = "display : none;"; - document.getElementById("game").style = "display : table;"; - displayFunction(); - }else if(eta == "Invalid Date"){ - window.alert("Inserisci una data!!"); - } - else{ - window.alert("Inserire una data del passato non del futuro!!"); - } - -} -function displayFunction(){ - document.getElementById('dopoGioco1').style = "display : none"; - document.getElementById('dopoGioco2').style = "display : none"; - document.getElementById('dopoGioco3').style = "display : none"; - document.getElementById('dopoGioco4').style = "display : none"; - if(maggiorenne){ - document.getElementById('maggiorenneSoldi').style = "display : table-row"; - document.getElementById('maggiorennePuntata').style = "display : table-row"; - document.getElementById('maggiorenneBudget').style = "display : table-row"; - document.getElementById('minorenneButton').style = "display : none"; - document.getElementById('budget').textContent = budget; - } - else{ - document.getElementById('maggiorenneSoldi').style = "display : none"; - document.getElementById('maggiorennePuntata').style = "display : none"; - document.getElementById('maggiorenneBudget').style = "display : none"; - document.getElementById('minorenneButton').style = "display : table-row"; - } -} - -function updateGameGratis(){ - gameInformationShow(); - var numbers = [4]; - for(var i = 0;i<4;i++){ - numbers[i] = getRandom(); - } - var userNumber = numbers[0] + numbers[1]; - var PcNumber = numbers[2] + numbers[3]; - - document.getElementById('dado1Utente').src = "img/dice-rolling-"+numbers[0]+".png"; - document.getElementById('dado2Utente').src = "img/dice-rolling-"+numbers[1]+".png"; - - document.getElementById('dado1Pc').src = "img/dice-rolling-"+numbers[2]+".png"; - document.getElementById('dado2Pc').src = "img/dice-rolling-"+numbers[3]+".png"; - - if(userNumber > PcNumber){ - document.getElementById('result').textContent = "Vince l'utente"; - userScore++; - }else if(userNumber < PcNumber){ - document.getElementById('result').textContent = "Vince il Pc"; - pcScore++; - }else{ - document.getElementById('result').textContent = "Vince il Pc"; - pcScore++; - } - updateScore(); -} -function gameInformationShow(){ - document.getElementById('dopoGioco1').style = "display : table-row"; - document.getElementById('dopoGioco2').style = "display : table-row"; - document.getElementById('dopoGioco3').style = "display : table-row"; - document.getElementById('dopoGioco4').style = "display : table-row"; -} - -function checkBudget(){ - var puntatoUno = false; - var check5 = 0; - var check10 = 0; - var check20 = 0; - var check50 = 0; - if(document.getElementById("check5").checked){ - check5 = 5; - puntatoUno = true; - }else{ - check5 = 0; - } - if(document.getElementById("check10").checked){ - check10 = 10; - puntatoUno = true; - }else{ - check10 = 0; - } - if(document.getElementById("check20").checked){ - check20 =20; - puntatoUno = true; - }else{ - check20 = 0; - } - if(document.getElementById("check50").checked){ - check50 =50; - puntatoUno = true; - }else{ - check50 = 0; - } - puntato = check5 + check10 + check20 + check50; - if(puntato <= budget && puntatoUno == true && puntato > 0){ - giocaOk = true; - }else{ - giocaOk = false; - if(budget == 0){ - if(confirm("Hai perso tutti i soldi :( \nVuoi fare un altra partita?")){ - resetGame(); - } - }else{ - window.alert("Devi puntare una somma maggiore di 0 e minore del budged attuale"); - } - - } -} -function resetGame(){ - budget = 50; - document.getElementById("check5").checked = false; - document.getElementById("check10").checked = false; - document.getElementById("check20").checked = false; - document.getElementById("check50").checked = false; - document.getElementById('dado1Utente').src = ""; - document.getElementById('dado2Utente').src = ""; - document.getElementById('dado1Pc').src = ""; - document.getElementById('dado2Pc').src = ""; - userScore = 0; - pcScore = 0; - document.getElementById('result').textContent = ""; - document.getElementById('scoreUtente').textContent = userScore; - document.getElementById('scorePc').textContent = pcScore; - document.getElementById('budget').textContent = budget; -} - -function updateGame(){ - - checkBudget(); - if(giocaOk){ - gameInformationShow(); - var numbers = [4]; - for(var i = 0;i<4;i++){ - numbers[i] = getRandom(); - } - userNumber = numbers[0] + numbers[1]; - PcNumber = numbers[2] + numbers[3]; - - document.getElementById('dado1Utente').src = "img/dice-rolling-"+numbers[0]+".png"; - document.getElementById('dado2Utente').src = "img/dice-rolling-"+numbers[1]+".png"; - - document.getElementById('dado1Pc').src = "img/dice-rolling-"+numbers[2]+".png"; - document.getElementById('dado2Pc').src = "img/dice-rolling-"+numbers[3]+".png"; - updateScore(); - document.getElementById('budget').textContent = budget; - } - -} - -function updateScore(){ - if(userNumber > PcNumber){ - document.getElementById('result').textContent = "Vince l'utente"; - userScore++; - budget += puntato; - }else if(userNumber < PcNumber){ - document.getElementById('result').textContent = "Vince il Pc"; - pcScore++; - budget -= puntato; - }else{ - document.getElementById('result').textContent = "Vince il Pc"; - budget -= puntato; - } - document.getElementById('scoreUtente').textContent = userScore; - document.getElementById('scorePc').textContent = pcScore; -} -function getRandom(){ - return Math.floor((Math.random() * 6) + 1); +var maggiorenne = false; +var budget = 50; +var userScore = 0; +var pcScore = 0; +var puntato = 0; +var giocaOk = false; + +var userNumber = 0; +var PcNumber = 0; +function enter() { + var eta = new Date(document.getElementById("dataUser").value); + if(eta.getTime() < new Date().getTime()){ + if (new Date().getTime() - eta.getTime() > new Date(567600000000)) + maggiorenne = true; + else + maggiorenne = false; + + document.getElementById("login").style = "display : none;"; + document.getElementById("game").style = "display : table;"; + displayFunction(); + }else if(eta == "Invalid Date"){ + window.alert("Inserisci una data!!"); + } + else{ + window.alert("Inserire una data del passato non del futuro!!"); + } + +} +function displayFunction(){ + document.getElementById('dopoGioco1').style = "display : none"; + document.getElementById('dopoGioco2').style = "display : none"; + document.getElementById('dopoGioco3').style = "display : none"; + document.getElementById('dopoGioco4').style = "display : none"; + if(maggiorenne){ + document.getElementById('maggiorenneSoldi').style = "display : table-row"; + document.getElementById('maggiorennePuntata').style = "display : table-row"; + document.getElementById('maggiorenneBudget').style = "display : table-row"; + document.getElementById('minorenneButton').style = "display : none"; + document.getElementById('budget').textContent = budget; + } + else{ + document.getElementById('maggiorenneSoldi').style = "display : none"; + document.getElementById('maggiorennePuntata').style = "display : none"; + document.getElementById('maggiorenneBudget').style = "display : none"; + document.getElementById('minorenneButton').style = "display : table-row"; + } +} + +function updateGameGratis(){ + gameInformationShow(); + var numbers = [4]; + for(var i = 0;i<4;i++){ + numbers[i] = getRandom(); + } + var userNumber = numbers[0] + numbers[1]; + var PcNumber = numbers[2] + numbers[3]; + + document.getElementById('dado1Utente').src = "img/dice-rolling-"+numbers[0]+".png"; + document.getElementById('dado2Utente').src = "img/dice-rolling-"+numbers[1]+".png"; + + document.getElementById('dado1Pc').src = "img/dice-rolling-"+numbers[2]+".png"; + document.getElementById('dado2Pc').src = "img/dice-rolling-"+numbers[3]+".png"; + + if(userNumber > PcNumber){ + document.getElementById('result').textContent = "Vince l'utente"; + userScore++; + }else if(userNumber < PcNumber){ + document.getElementById('result').textContent = "Vince il Pc"; + pcScore++; + }else{ + document.getElementById('result').textContent = "Vince il Pc"; + pcScore++; + } + updateScore(); +} +function gameInformationShow(){ + document.getElementById('dopoGioco1').style = "display : table-row"; + document.getElementById('dopoGioco2').style = "display : table-row"; + document.getElementById('dopoGioco3').style = "display : table-row"; + document.getElementById('dopoGioco4').style = "display : table-row"; +} + +function checkBudget(){ + var puntatoUno = false; + var check5 = 0; + var check10 = 0; + var check20 = 0; + var check50 = 0; + if(document.getElementById("check5").checked){ + check5 = 5; + puntatoUno = true; + }else{ + check5 = 0; + } + if(document.getElementById("check10").checked){ + check10 = 10; + puntatoUno = true; + }else{ + check10 = 0; + } + if(document.getElementById("check20").checked){ + check20 =20; + puntatoUno = true; + }else{ + check20 = 0; + } + if(document.getElementById("check50").checked){ + check50 =50; + puntatoUno = true; + }else{ + check50 = 0; + } + puntato = check5 + check10 + check20 + check50; + if(puntato <= budget && puntatoUno == true && puntato > 0){ + giocaOk = true; + }else{ + giocaOk = false; + if(budget == 0){ + if(confirm("Hai perso tutti i soldi :( \nVuoi fare un altra partita?")){ + resetGame(); + } + }else{ + window.alert("Devi puntare una somma maggiore di 0 e minore del budged attuale"); + } + + } +} +function resetGame(){ + budget = 50; + document.getElementById("check5").checked = false; + document.getElementById("check10").checked = false; + document.getElementById("check20").checked = false; + document.getElementById("check50").checked = false; + document.getElementById('dado1Utente').src = ""; + document.getElementById('dado2Utente').src = ""; + document.getElementById('dado1Pc').src = ""; + document.getElementById('dado2Pc').src = ""; + userScore = 0; + pcScore = 0; + document.getElementById('result').textContent = ""; + document.getElementById('scoreUtente').textContent = userScore; + document.getElementById('scorePc').textContent = pcScore; + document.getElementById('budget').textContent = budget; +} + +function updateGame(){ + + checkBudget(); + if(giocaOk){ + gameInformationShow(); + var numbers = [4]; + for(var i = 0;i<4;i++){ + numbers[i] = getRandom(); + } + userNumber = numbers[0] + numbers[1]; + PcNumber = numbers[2] + numbers[3]; + + document.getElementById('dado1Utente').src = "img/dice-rolling-"+numbers[0]+".png"; + document.getElementById('dado2Utente').src = "img/dice-rolling-"+numbers[1]+".png"; + + document.getElementById('dado1Pc').src = "img/dice-rolling-"+numbers[2]+".png"; + document.getElementById('dado2Pc').src = "img/dice-rolling-"+numbers[3]+".png"; + updateScore(); + document.getElementById('budget').textContent = budget; + } + +} + +function updateScore(){ + if(userNumber > PcNumber){ + document.getElementById('result').textContent = "Vince l'utente"; + userScore++; + budget += puntato; + }else if(userNumber < PcNumber){ + document.getElementById('result').textContent = "Vince il Pc"; + pcScore++; + budget -= puntato; + }else{ + document.getElementById('result').textContent = "Vince il Pc"; + budget -= puntato; + } + document.getElementById('scoreUtente').textContent = userScore; + document.getElementById('scorePc').textContent = pcScore; +} +function getRandom(){ + return Math.floor((Math.random() * 6) + 1); } \ No newline at end of file diff --git a/JavaScript/HelloWorld-Bahasa b/JavaScript/HelloWorld-Bahasa deleted file mode 100644 index f4c837ac5..000000000 --- a/JavaScript/HelloWorld-Bahasa +++ /dev/null @@ -1 +0,0 @@ -alert("Halo Dunia, dari Indonesia!"); diff --git a/JavaScript/HelloWorldNew.js b/JavaScript/HelloWorldNew.js index bce40974d..ea73d192d 100644 --- a/JavaScript/HelloWorldNew.js +++ b/JavaScript/HelloWorldNew.js @@ -1,3 +1 @@ -function HelloWorld(){ - console.log('hello world'); -} +console.log("Hey World!") diff --git a/JavaScript/helloWorld.js b/JavaScript/helloWorld.js deleted file mode 100644 index 35ae15b82..000000000 --- a/JavaScript/helloWorld.js +++ /dev/null @@ -1,8 +0,0 @@ - - - Hello World - - -

Hello World

- - diff --git a/JavaScript/helloWorldNew.js b/JavaScript/helloWorldNew.js deleted file mode 100644 index ea73d192d..000000000 --- a/JavaScript/helloWorldNew.js +++ /dev/null @@ -1 +0,0 @@ -console.log("Hey World!") diff --git a/JavaScript/hello_world.js b/JavaScript/hello_world.js deleted file mode 100644 index 706186e0d..000000000 --- a/JavaScript/hello_world.js +++ /dev/null @@ -1 +0,0 @@ -document.write("hello, world") diff --git a/JavaScript/helloworld.js b/JavaScript/helloworld.js deleted file mode 100644 index 35ae15b82..000000000 --- a/JavaScript/helloworld.js +++ /dev/null @@ -1,8 +0,0 @@ - - - Hello World - - -

Hello World

- - diff --git a/Javascript/Dice/dice.txt b/Javascript/Dice/dice.txt deleted file mode 100644 index 48d8e20c5..000000000 --- a/Javascript/Dice/dice.txt +++ /dev/null @@ -1,21 +0,0 @@ -Verificare se l'utente è maggiorenne o minorenne (chiedere data di nascita guaradare microsecondi) -se è magiorenne gioca con i soldi -se no gioca senza soldi -genera l'estrazione di una coppia di dati -1 per l'utente -1 per il computer -chi ha la somma più grande perde -in caso di parità vince il computer - -se minorenne gioca infinity il pc ritorna partite vinte e partite perse - -se magiorenne c'è il budget di 50 chf tramite un input l'utente fa la sua scommessa l ascommessa minima avrà un costo minimo e massimo (min e max dipende da cosa è l'input) -checkbox: 5, 10 , 20 ,50 -no gioca se non c'è nemmeno una selezione -se pc perde da la somma al utente. -se l'utente ha meno di 0 chf non può giocare -scommessa massima all-in - -finche l'utente non ha fatto una puntata non pu� giocare - -l'utente minorenne non deve vedere l'input delle puntate \ No newline at end of file diff --git a/Javascript/Dice/img/dice-rolling-3.png b/Javascript/Dice/img/dice-rolling-3.png deleted file mode 100644 index a6267ba7b..000000000 Binary files a/Javascript/Dice/img/dice-rolling-3.png and /dev/null differ diff --git a/Javascript/Dice/img/dice-rolling-5.png b/Javascript/Dice/img/dice-rolling-5.png deleted file mode 100644 index 1ca583fca..000000000 Binary files a/Javascript/Dice/img/dice-rolling-5.png and /dev/null differ diff --git a/Javascript/Dice/img/dice-rolling-6.png b/Javascript/Dice/img/dice-rolling-6.png deleted file mode 100644 index 75de1ed66..000000000 Binary files a/Javascript/Dice/img/dice-rolling-6.png and /dev/null differ diff --git a/Javascript/Dice/main.js b/Javascript/Dice/main.js deleted file mode 100644 index 0b4b47ad0..000000000 --- a/Javascript/Dice/main.js +++ /dev/null @@ -1,187 +0,0 @@ -var maggiorenne = false; -var budget = 50; -var userScore = 0; -var pcScore = 0; -var puntato = 0; -var giocaOk = false; - -var userNumber = 0; -var PcNumber = 0; -function enter() { - var eta = new Date(document.getElementById("dataUser").value); - if(eta.getTime() < new Date().getTime()){ - if (new Date().getTime() - eta.getTime() > new Date(567600000000)) - maggiorenne = true; - else - maggiorenne = false; - - document.getElementById("login").style = "display : none;"; - document.getElementById("game").style = "display : table;"; - displayFunction(); - }else if(eta == "Invalid Date"){ - window.alert("Inserisci una data!!"); - } - else{ - window.alert("Inserire una data del passato non del futuro!!"); - } - -} -function displayFunction(){ - document.getElementById('dopoGioco1').style = "display : none"; - document.getElementById('dopoGioco2').style = "display : none"; - document.getElementById('dopoGioco3').style = "display : none"; - document.getElementById('dopoGioco4').style = "display : none"; - if(maggiorenne){ - document.getElementById('maggiorenneSoldi').style = "display : table-row"; - document.getElementById('maggiorennePuntata').style = "display : table-row"; - document.getElementById('maggiorenneBudget').style = "display : table-row"; - document.getElementById('minorenneButton').style = "display : none"; - document.getElementById('budget').textContent = budget; - } - else{ - document.getElementById('maggiorenneSoldi').style = "display : none"; - document.getElementById('maggiorennePuntata').style = "display : none"; - document.getElementById('maggiorenneBudget').style = "display : none"; - document.getElementById('minorenneButton').style = "display : table-row"; - } -} - -function updateGameGratis(){ - gameInformationShow(); - var numbers = [4]; - for(var i = 0;i<4;i++){ - numbers[i] = getRandom(); - } - var userNumber = numbers[0] + numbers[1]; - var PcNumber = numbers[2] + numbers[3]; - - document.getElementById('dado1Utente').src = "img/dice-rolling-"+numbers[0]+".png"; - document.getElementById('dado2Utente').src = "img/dice-rolling-"+numbers[1]+".png"; - - document.getElementById('dado1Pc').src = "img/dice-rolling-"+numbers[2]+".png"; - document.getElementById('dado2Pc').src = "img/dice-rolling-"+numbers[3]+".png"; - - if(userNumber > PcNumber){ - document.getElementById('result').textContent = "Vince l'utente"; - userScore++; - }else if(userNumber < PcNumber){ - document.getElementById('result').textContent = "Vince il Pc"; - pcScore++; - }else{ - document.getElementById('result').textContent = "Vince il Pc"; - pcScore++; - } - updateScore(); -} -function gameInformationShow(){ - document.getElementById('dopoGioco1').style = "display : table-row"; - document.getElementById('dopoGioco2').style = "display : table-row"; - document.getElementById('dopoGioco3').style = "display : table-row"; - document.getElementById('dopoGioco4').style = "display : table-row"; -} - -function checkBudget(){ - var puntatoUno = false; - var check5 = 0; - var check10 = 0; - var check20 = 0; - var check50 = 0; - if(document.getElementById("check5").checked){ - check5 = 5; - puntatoUno = true; - }else{ - check5 = 0; - } - if(document.getElementById("check10").checked){ - check10 = 10; - puntatoUno = true; - }else{ - check10 = 0; - } - if(document.getElementById("check20").checked){ - check20 =20; - puntatoUno = true; - }else{ - check20 = 0; - } - if(document.getElementById("check50").checked){ - check50 =50; - puntatoUno = true; - }else{ - check50 = 0; - } - puntato = check5 + check10 + check20 + check50; - if(puntato <= budget && puntatoUno == true && puntato > 0){ - giocaOk = true; - }else{ - giocaOk = false; - if(budget == 0){ - if(confirm("Hai perso tutti i soldi :( \nVuoi fare un altra partita?")){ - resetGame(); - } - }else{ - window.alert("Devi puntare una somma maggiore di 0 e minore del budged attuale"); - } - - } -} -function resetGame(){ - budget = 50; - document.getElementById("check5").checked = false; - document.getElementById("check10").checked = false; - document.getElementById("check20").checked = false; - document.getElementById("check50").checked = false; - document.getElementById('dado1Utente').src = ""; - document.getElementById('dado2Utente').src = ""; - document.getElementById('dado1Pc').src = ""; - document.getElementById('dado2Pc').src = ""; - userScore = 0; - pcScore = 0; - document.getElementById('result').textContent = ""; - document.getElementById('scoreUtente').textContent = userScore; - document.getElementById('scorePc').textContent = pcScore; - document.getElementById('budget').textContent = budget; -} - -function updateGame(){ - - checkBudget(); - if(giocaOk){ - gameInformationShow(); - var numbers = [4]; - for(var i = 0;i<4;i++){ - numbers[i] = getRandom(); - } - userNumber = numbers[0] + numbers[1]; - PcNumber = numbers[2] + numbers[3]; - - document.getElementById('dado1Utente').src = "img/dice-rolling-"+numbers[0]+".png"; - document.getElementById('dado2Utente').src = "img/dice-rolling-"+numbers[1]+".png"; - - document.getElementById('dado1Pc').src = "img/dice-rolling-"+numbers[2]+".png"; - document.getElementById('dado2Pc').src = "img/dice-rolling-"+numbers[3]+".png"; - updateScore(); - document.getElementById('budget').textContent = budget; - } - -} - -function updateScore(){ - if(userNumber > PcNumber){ - document.getElementById('result').textContent = "Vince l'utente"; - userScore++; - budget += puntato; - }else if(userNumber < PcNumber){ - document.getElementById('result').textContent = "Vince il Pc"; - pcScore++; - budget -= puntato; - }else{ - document.getElementById('result').textContent = "Vince il Pc"; - budget -= puntato; - } - document.getElementById('scoreUtente').textContent = userScore; - document.getElementById('scorePc').textContent = pcScore; -} -function getRandom(){ - return Math.floor((Math.random() * 6) + 1); -} \ No newline at end of file diff --git a/Javascript/HelloWorld.js b/Javascript/HelloWorld.js deleted file mode 100644 index 35ae15b82..000000000 --- a/Javascript/HelloWorld.js +++ /dev/null @@ -1,8 +0,0 @@ - - - Hello World - - -

Hello World

- - diff --git a/Javascript/HelloWorld_NL.js b/Javascript/HelloWorld_NL.js deleted file mode 100644 index 3d274d32f..000000000 --- a/Javascript/HelloWorld_NL.js +++ /dev/null @@ -1,9 +0,0 @@ -let language = window.navigator.language||navigator.browserLanguage; - if (language === "nl-BE"){ - document.write("Hallo wereld, maar in het Vlaams"); -} -else if (language === "nl-NL"){ - document.write("Hallo wereld, maar in het Nederlands"); -}else{ - document.write("Hello World"); -} diff --git a/Javascript/aloha_world.js b/Javascript/aloha_world.js deleted file mode 100644 index 8fe43520e..000000000 --- a/Javascript/aloha_world.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Aloha World!'); diff --git a/Javascript/hello-world-complex-for-no-reason.js b/Javascript/hello-world-complex-for-no-reason.js deleted file mode 100644 index ccada5235..000000000 --- a/Javascript/hello-world-complex-for-no-reason.js +++ /dev/null @@ -1,16 +0,0 @@ -const text = ('Hello World').split(''); - -Promise.all(text.map(char => { - return createPromise(char) -})).then((res) => { - console.log(res.join('')); -}) - - -function createPromise(_s) { - return new Promise((resolve) => { - setTimeout(() => { - resolve(_s) - }, Math.random() * 10); - }); -} diff --git a/Javascript/hello-world-with-promise.js b/Javascript/hello-world-with-promise.js deleted file mode 100644 index a9bd140b1..000000000 --- a/Javascript/hello-world-with-promise.js +++ /dev/null @@ -1,7 +0,0 @@ -const promise = new Promise(resolve => { - resolve('Hello world!'); -}); - -promise.then(response => { - console.log(response); -}); diff --git a/Javascript/hello-world.fr.js b/Javascript/hello-world.fr.js deleted file mode 100644 index fae71e2aa..000000000 --- a/Javascript/hello-world.fr.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Bonjour monde!') diff --git a/Julia/Hello-World.jl b/Julia/Hello-World.jl deleted file mode 100644 index e9b623853..000000000 --- a/Julia/Hello-World.jl +++ /dev/null @@ -1 +0,0 @@ -println("I'm excited to learn Julia!") diff --git a/Kotlin/helloWorld.kt b/Kotlin/helloWorld.kt deleted file mode 100644 index 874e7a9bd..000000000 --- a/Kotlin/helloWorld.kt +++ /dev/null @@ -1,5 +0,0 @@ -package main - -fun Array.main() { - println("Hello world!") -} diff --git a/LaWea/helloworld.lw b/LaWea/helloworld.lw new file mode 100644 index 000000000..3549b2631 --- /dev/null +++ b/LaWea/helloworld.lw @@ -0,0 +1,9 @@ +aweonao aweonao aweonao aweonao aweonao pichula puta aweonao aweonao puta aweonao aweonao aweonao +weón puta aweonao aweonao aweonao aweonao aweonao puta aweonao aweonao aweonao aweonao aweonao weón +chucha chucha chucha chucha maricón tula puta puta aweonao ctm puta weón ctm puta maraco ctm ctm +aweonao weón ctm chucha chucha chucha aweonao aweonao ctm maraco maraco maraco maraco maraco maraco +ctm puta puta maraco maraco maraco maraco maraco maraco maraco ctm puta ctm aweonao weón ctm maraco +maraco maraco ctm chucha aweonao aweonao aweonao aweonao aweonao aweonao weón ctm chucha chucha weón +ctm puta puta puta puta aweonao aweonao aweonao aweonao aweonao ctm + +# test: https://laweainterpreter.firebaseapp.com/ \ No newline at end of file diff --git a/NodeJS/.gitignore b/NodeJS/.gitignore deleted file mode 100644 index d5f19d89b..000000000 --- a/NodeJS/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -package-lock.json diff --git a/NodeJS/bruteforce.js b/NodeJS/bruteforce.js deleted file mode 100644 index 763e4f7a7..000000000 --- a/NodeJS/bruteforce.js +++ /dev/null @@ -1,28 +0,0 @@ -function msleep(n) { - Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, n); -} - -function rand(min, max) { - return Math.floor(Math.random() * (max - min + 1)) + min; -} - -var find = "Hacktoberfest".split(''); -var result = []; - -for(var i = 0; i < find.length; i++) { - var notFound = true; - while(notFound) { - var randomChar = String.fromCharCode(rand(32, 126)); - result[i] = randomChar; - - msleep(5); - process.stdout.write(result.join('') + "\r"); - - if(find[i] == randomChar) { - notFound = false; - } - } -} - -process.stdout.write(result.join('') + "\r\n"); - diff --git a/NodeJS/bt.js b/NodeJS/bt.js deleted file mode 100644 index a4060b4e5..000000000 --- a/NodeJS/bt.js +++ /dev/null @@ -1,12 +0,0 @@ -// shows nearby bluetooth device -const bluetooth = require('node-bluetooth'); - -const device = new bluetooth.DeviceINQ(); - -device.listPairedDevices(console.log) - -device -.on('finished', console.log.bind(console, 'finished')) -.on('found', function found(address, name){ -console.log(name'+'address) -}).scan() diff --git a/NodeJS/flatiron.js b/NodeJS/flatiron.js deleted file mode 100644 index 064129d81..000000000 --- a/NodeJS/flatiron.js +++ /dev/null @@ -1,22 +0,0 @@ -var flatiron = require('flatiron'); -var app = flatiron.app; - -app.use(flatiron.plugins.http); - -app.router.get('/', function () { - this.res.writeHead(200, { - 'Content-Type': 'text/plain' - }); - - this.res.end('Hello world!\n'); -}); - -app.start(8080, function(err) { - if (err) { - app.log.error(err.message); - - return process.exit(1); - } - - app.log.info('Listening at http://localhost:8080'); -}); diff --git a/NodeJS/gulp-exec-example.js b/NodeJS/gulp-exec-example.js deleted file mode 100644 index 31f27c462..000000000 --- a/NodeJS/gulp-exec-example.js +++ /dev/null @@ -1,10 +0,0 @@ -var exec = require('child_process').exec; - -gulp.task('task', function (cb) { - exec('ping localhost', function (err, stdout, stderr) { - console.log(stdout); - console.log(stderr); - console.log('Task executed successfully.'); - cb(err); - }); -}) \ No newline at end of file diff --git a/NodeJS/hapi.js b/NodeJS/hapi.js deleted file mode 100644 index 7ce54cc93..000000000 --- a/NodeJS/hapi.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var Hapi = require('hapi'); - -var server = Hapi.server({ - port: 3000, - host: 'localhost' -}); - -server.route({ - method: 'GET', - path: '/', - handler: (request, h) => { - return 'Hello world!'; - } -}); - -var helloWorld = async () => { - await server.start(); - console.log(`Listening at: ${server.info.uri}`); -}; - -process.on('unhandledRejection', (err) => { - console.log(err); - process.exit(1); -}); - -helloWorld(); diff --git a/NodeJS/hello-date.js b/NodeJS/hello-date.js deleted file mode 100644 index 1fed917ed..000000000 --- a/NodeJS/hello-date.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -let now = new Date(); -console.log( - `Today is ${now.getFullYear() + - '-' + - (now.getMonth() + 1) + - '-' + - now.getDate()}` -); - -let yestoday = new Date(now.getTime() - 1000 * 60 * 60 * 24 * 1); -console.log( - `Yestoday was ${yestoday.getFullYear() + - '-' + - (yestoday.getMonth() + 1) + - '-' + - yestoday.getDate()}` -); diff --git a/NodeJS/index.js b/NodeJS/index.js deleted file mode 100644 index 099da3705..000000000 --- a/NodeJS/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -console.log("/**********") -console.log("Hello World") -console.log("**********/") \ No newline at end of file diff --git a/NodeJS/omdbRequest.js b/NodeJS/omdbRequest.js deleted file mode 100644 index 5e682b730..000000000 --- a/NodeJS/omdbRequest.js +++ /dev/null @@ -1,16 +0,0 @@ -// Include the request npm package (Don't forget to run "npm install request" in this folder first!) -var request = require("request"); - -// Then run a request to the OMDB API with the movie specified -request("http://www.omdbapi.com/?t=halloween&y=&plot=short&apikey=96837c43", function(error, response, body) { - - // If the request is successful (i.e. if the response status code is 200) - if (!error && response.statusCode === 200) { - - //parse the response to retrieve data pertaining to request - console.log("The title is: " + JSON.parse(body).Title + "\nThe year the movie came out is: " + JSON.parse(body).Year - + "\nThe IMDB Rating is: " + JSON.parse(body).imdbRating + "\nRotten Tomatoes Rating: " + JSON.parse(body).Ratings[1].Value - + "\nCountry of production: " + JSON.parse(body).Country + "\nLanguage of movie: " + JSON.parse(body).Language - + "\nPlot: " + JSON.parse(body).Plot + "\nActors in movie: " + JSON.parse(body).Actors); - } -}); \ No newline at end of file diff --git a/NodeJS/one-line-hello-world.js b/NodeJS/one-line-hello-world.js deleted file mode 100644 index b7b892ef3..000000000 --- a/NodeJS/one-line-hello-world.js +++ /dev/null @@ -1 +0,0 @@ -var wzhouwzhou__0x29eb=['\x4a\x53\x72\x43\x74\x46\x33\x43\x74\x4d\x4b\x6c\x77\x72\x6e\x43\x70\x63\x4f\x7a\x77\x70\x6e\x44\x6c\x63\x4b\x49\x4f\x67\x3d\x3d','\x77\x72\x66\x43\x6a\x53\x6f\x3d'];(function(_0x935282,_0xc55a8d){var _0x29db11=function(_0x259360){while(--_0x259360){_0x935282['push'](_0x935282['shift']());}};var _0x5985ab=function(){var _0xe5fd2b={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x3396d4,_0x5d7b38,_0x1ffe69,_0x3e7101){_0x3e7101=_0x3e7101||{};var _0x3621de=_0x5d7b38+'='+_0x1ffe69;var _0x2753c1=0x0;for(var _0x2753c1=0x0,_0x213707=_0x3396d4['length'];_0x2753c1<_0x213707;_0x2753c1++){var _0x53a6a6=_0x3396d4[_0x2753c1];_0x3621de+=';\x20'+_0x53a6a6;var _0x30e4d9=_0x3396d4[_0x53a6a6];_0x3396d4['push'](_0x30e4d9);_0x213707=_0x3396d4['length'];if(_0x30e4d9!==!![]){_0x3621de+='='+_0x30e4d9;}}_0x3e7101['cookie']=_0x3621de;},'removeCookie':function(){return'dev';},'getCookie':function(_0x1622cd,_0x4f8b33){_0x1622cd=_0x1622cd||function(_0x5784fb){return _0x5784fb;};var _0x4985be=_0x1622cd(new RegExp('(?:^|;\x20)'+_0x4f8b33['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));var _0x5d0955=function(_0x340f29,_0xeaa107){_0x340f29(++_0xeaa107);};_0x5d0955(_0x29db11,_0xc55a8d);return _0x4985be?decodeURIComponent(_0x4985be[0x1]):undefined;}};var _0x4d2dec=function(){var _0xc1fe71=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0xc1fe71['test'](_0xe5fd2b['removeCookie']['toString']());};_0xe5fd2b['updateCookie']=_0x4d2dec;var _0x1b2f7e='';var _0x246c08=_0xe5fd2b['updateCookie']();if(!_0x246c08){_0xe5fd2b['setCookie'](['*'],'counter',0x1);}else if(_0x246c08){_0x1b2f7e=_0xe5fd2b['getCookie'](null,'counter');}else{_0xe5fd2b['removeCookie']();}};_0x5985ab();}(wzhouwzhou__0x29eb,0x9b));var wzhouwzhou__0x2ff2=function(_0x3dba32,_0x2ef2ff){_0x3dba32=_0x3dba32-0x0;var _0x20e627=wzhouwzhou__0x29eb[_0x3dba32];if(wzhouwzhou__0x2ff2['CpoOJf']===undefined){(function(){var _0x412e57;try{var _0x4a5918=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x412e57=_0x4a5918();}catch(_0x2ea165){_0x412e57=window;}var _0x51849a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x412e57['atob']||(_0x412e57['atob']=function(_0x23fc46){var _0x337853=String(_0x23fc46)['replace'](/=+$/,'');for(var _0x219ae0=0x0,_0x38dd70,_0x5e58b9,_0x331ac1=0x0,_0x2e40fd='';_0x5e58b9=_0x337853['charAt'](_0x331ac1++);~_0x5e58b9&&(_0x38dd70=_0x219ae0%0x4?_0x38dd70*0x40+_0x5e58b9:_0x5e58b9,_0x219ae0++%0x4)?_0x2e40fd+=String['fromCharCode'](0xff&_0x38dd70>>(-0x2*_0x219ae0&0x6)):0x0){_0x5e58b9=_0x51849a['indexOf'](_0x5e58b9);}return _0x2e40fd;});}());var _0x340e62=function(_0x571be3,_0x2ef2ff){var _0x559ea9=[],_0x2311c0=0x0,_0x2db000,_0xb77a0b='',_0x51df20='';_0x571be3=atob(_0x571be3);for(var _0x2e28c2=0x0,_0x3de68b=_0x571be3['length'];_0x2e28c2<_0x3de68b;_0x2e28c2++){_0x51df20+='%'+('00'+_0x571be3['charCodeAt'](_0x2e28c2)['toString'](0x10))['slice'](-0x2);}_0x571be3=decodeURIComponent(_0x51df20);for(var _0x44e9b7=0x0;_0x44e9b7<0x100;_0x44e9b7++){_0x559ea9[_0x44e9b7]=_0x44e9b7;}for(_0x44e9b7=0x0;_0x44e9b7<0x100;_0x44e9b7++){_0x2311c0=(_0x2311c0+_0x559ea9[_0x44e9b7]+_0x2ef2ff['charCodeAt'](_0x44e9b7%_0x2ef2ff['length']))%0x100;_0x2db000=_0x559ea9[_0x44e9b7];_0x559ea9[_0x44e9b7]=_0x559ea9[_0x2311c0];_0x559ea9[_0x2311c0]=_0x2db000;}_0x44e9b7=0x0;_0x2311c0=0x0;for(var _0x3668fc=0x0;_0x3668fc<_0x571be3['length'];_0x3668fc++){_0x44e9b7=(_0x44e9b7+0x1)%0x100;_0x2311c0=(_0x2311c0+_0x559ea9[_0x44e9b7])%0x100;_0x2db000=_0x559ea9[_0x44e9b7];_0x559ea9[_0x44e9b7]=_0x559ea9[_0x2311c0];_0x559ea9[_0x2311c0]=_0x2db000;_0xb77a0b+=String['fromCharCode'](_0x571be3['charCodeAt'](_0x3668fc)^_0x559ea9[(_0x559ea9[_0x44e9b7]+_0x559ea9[_0x2311c0])%0x100]);}return _0xb77a0b;};wzhouwzhou__0x2ff2['jwicwt']=_0x340e62;wzhouwzhou__0x2ff2['jHmIFa']={};wzhouwzhou__0x2ff2['CpoOJf']=!![];}var _0x3860ce=wzhouwzhou__0x2ff2['jHmIFa'][_0x3dba32];if(_0x3860ce===undefined){if(wzhouwzhou__0x2ff2['sqJOoT']===undefined){var _0x432db8=function(_0x242594){this['fDBQMI']=_0x242594;this['HUDRMk']=[0x1,0x0,0x0];this['dxjtRW']=function(){return'newState';};this['jmXMDe']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['oauOQJ']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x432db8['prototype']['MfWNni']=function(){var _0x2766da=new RegExp(this['jmXMDe']+this['oauOQJ']);var _0x5f5a05=_0x2766da['test'](this['dxjtRW']['toString']())?--this['HUDRMk'][0x1]:--this['HUDRMk'][0x0];return this['mdXvwu'](_0x5f5a05);};_0x432db8['prototype']['mdXvwu']=function(_0x518957){if(!Boolean(~_0x518957)){return _0x518957;}return this['oCzkGd'](this['fDBQMI']);};_0x432db8['prototype']['oCzkGd']=function(_0x457bfc){for(var _0x44eb81=0x0,_0x2666e5=this['HUDRMk']['length'];_0x44eb81<_0x2666e5;_0x44eb81++){this['HUDRMk']['push'](Math['round'](Math['random']()));_0x2666e5=this['HUDRMk']['length'];}return _0x457bfc(this['HUDRMk'][0x0]);};new _0x432db8(wzhouwzhou__0x2ff2)['MfWNni']();wzhouwzhou__0x2ff2['sqJOoT']=!![];}_0x20e627=wzhouwzhou__0x2ff2['jwicwt'](_0x20e627,_0x2ef2ff);wzhouwzhou__0x2ff2['jHmIFa'][_0x3dba32]=_0x20e627;}else{_0x20e627=_0x3860ce;}return _0x20e627;};var _0x48b48c=function(){var _0x291901=!![];return function(_0x3ea833,_0x11d41e){var _0x4d4f1b=_0x291901?function(){if(_0x11d41e){var _0x22d93c=_0x11d41e['apply'](_0x3ea833,arguments);_0x11d41e=null;return _0x22d93c;}}:function(){};_0x291901=![];return _0x4d4f1b;};}();var _0x30ba32=_0x48b48c(this,function(){var _0x2f241d=function(){return'\x64\x65\x76';},_0x19ef12=function(){return'\x77\x69\x6e\x64\x6f\x77';};var _0x1bf679=function(){var _0x285953=new RegExp('\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d');return!_0x285953['\x74\x65\x73\x74'](_0x2f241d['\x74\x6f\x53\x74\x72\x69\x6e\x67']());};var _0x2b9d52=function(){var _0x2922b8=new RegExp('\x28\x5c\x5c\x5b\x78\x7c\x75\x5d\x28\x5c\x77\x29\x7b\x32\x2c\x34\x7d\x29\x2b');return _0x2922b8['\x74\x65\x73\x74'](_0x19ef12['\x74\x6f\x53\x74\x72\x69\x6e\x67']());};var _0x57e902=function(_0x6979e){var _0x1421b5=~-0x1>>0x1+0xff%0x0;if(_0x6979e['\x69\x6e\x64\x65\x78\x4f\x66']('\x69'===_0x1421b5)){_0xb2342a(_0x6979e);}};var _0xb2342a=function(_0x561737){var _0x42bfdb=~-0x4>>0x1+0xff%0x0;if(_0x561737['\x69\x6e\x64\x65\x78\x4f\x66']((!![]+'')[0x3])!==_0x42bfdb){_0x57e902(_0x561737);}};if(!_0x1bf679()){if(!_0x2b9d52()){_0x57e902('\x69\x6e\x64\u0435\x78\x4f\x66');}else{_0x57e902('\x69\x6e\x64\x65\x78\x4f\x66');}}else{_0x57e902('\x69\x6e\x64\u0435\x78\x4f\x66');}});_0x30ba32();(()=>console[wzhouwzhou__0x2ff2('0x0','\x26\x67\x59\x72')](wzhouwzhou__0x2ff2('0x1','\x32\x29\x24\x46')))(); diff --git a/NodeJS/palindrome.js b/NodeJS/palindrome.js deleted file mode 100644 index 3b7a81df4..000000000 --- a/NodeJS/palindrome.js +++ /dev/null @@ -1,11 +0,0 @@ -const palindrome = function (value) { - - let revValue = value.toLowerCase().split("").reverse().join(""); - return revValue == value.toLowerCase(); -}; - -console.log("Welcome to Hacktoberfest 2018"); -console.log("This is a simple palindrome program"); -console.log("Examples: "); -console.log("'Hello' is " + (palindrome("Hello") ? "" : "not ") + "a palindrome"); -console.log("'Madam' is " + (palindrome("Madam") ? "" : "not ") + "a palindrome"); \ No newline at end of file diff --git a/NodeJS/ramda.js b/NodeJS/ramda.js deleted file mode 100644 index 02dbfca0e..000000000 --- a/NodeJS/ramda.js +++ /dev/null @@ -1,22 +0,0 @@ -// Run `npm install ramda` before executing. - -let R = require('ramda') - -let codes = [ 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33 ] - -function inspect (x) { - console.log(x) - return x -} - -function toChar (code) { - return String.fromCharCode(code) -} - -const greetWorld = R.pipe( - R.map(toChar), - R.join(''), - inspect -) - -greetWorld(codes) diff --git a/NodeJS/testserver b/NodeJS/testserver deleted file mode 100644 index d60f2bd09..000000000 --- a/NodeJS/testserver +++ /dev/null @@ -1,7 +0,0 @@ -const http = require('http'); -const port = process.env.PORT || 3000; -http.createServer((req, res)=>{ - res.write('Hello World Hacktoberfest'); - res.end(); -}) -.listen(port); diff --git a/NodeJS/zmq.js b/NodeJS/zmq.js old mode 100644 new mode 100755 diff --git a/NodeJs/README.md b/NodeJs/README.md deleted file mode 100644 index 704d13b36..000000000 --- a/NodeJs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# HelloWorld with NodeJS -``` -$ node index.js -``` \ No newline at end of file diff --git a/NodeJs/app.js b/NodeJs/app.js deleted file mode 100644 index 9a9d1af13..000000000 --- a/NodeJs/app.js +++ /dev/null @@ -1,10 +0,0 @@ -const express = require("express"); -const app = express(); -const bodyParser = require("body-parser"); -const path = require('path'); - -const server = app.listen(8080, "localhost", () => { - const port = server.address().port; - const hostname = server.address().address; - console.log(`Server running at ${hostname}:${port}`); -}); diff --git a/NodeJs/arrayFunctions.js b/NodeJs/arrayFunctions.js deleted file mode 100644 index 0f1fe55c3..000000000 --- a/NodeJs/arrayFunctions.js +++ /dev/null @@ -1,26 +0,0 @@ -//forEach - const forEach = (array, fn) => { - for(let i=0; i console.log(el)) - - const map = (array, fn) => { - const newArray = [] - forEach(array, el => newArray.push(fn(el))) - return newArray - } - - console.log(map([1,2,3], el => el*3)) - - const filter = (array, fn) => { - const newArray = [] - forEach(array, el => { - if(fn(el)) newArray.push(el) - }) - return newArray - } - - console.log(filter(["nickname", "user", "game", "gamer"], el => /er$/.test(el))) \ No newline at end of file diff --git a/NodeJs/camelize.js b/NodeJs/camelize.js deleted file mode 100644 index 571e503b5..000000000 --- a/NodeJs/camelize.js +++ /dev/null @@ -1,9 +0,0 @@ -const camelize = (text) => { - return text.replace(/\W+(.)/g, (match, chr) => { - return chr.toUpperCase(); - }); -}; - -console.log(camelize("Hacktoberfest Exercise")); -console.log(camelize("Hacktoberfest exercises")); -console.log(camelize("HacktoberfestExercises")); diff --git a/NodeJs/chai-example.js b/NodeJs/chai-example.js deleted file mode 100644 index c4b2eceee..000000000 --- a/NodeJs/chai-example.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @description This exampl is for mocha and chai test cases - */ -var expect = require('chai').expect; -var request = require('request'); - -it('Would you like to have tea ?', function(done) { - request('http://localhost:8080' , function(error, response, body) { - expect(body).to.equal('Hello World chai pilo !!!'); - done(); - }); -}); diff --git a/NodeJs/check-object-size.js b/NodeJs/check-object-size.js deleted file mode 100644 index 31b93516f..000000000 --- a/NodeJs/check-object-size.js +++ /dev/null @@ -1,10 +0,0 @@ -var sizeof = require('sizeof'); -var anyObject = { - 'key': { - name: 'abc', - age: 123, - active: true - } -} -console.log(sizeof.sizeof(anyObject)); // 50 -console.log(sizeof.sizeof(anyObject, true)); // 50B \ No newline at end of file diff --git a/NodeJs/easyurban-example.js b/NodeJs/easyurban-example.js deleted file mode 100644 index 5770cb1a5..000000000 --- a/NodeJs/easyurban-example.js +++ /dev/null @@ -1,8 +0,0 @@ -const UrbanDictionary = require('easyurban'); -const dictionary = new UrbanDictionary; -dictionary.lookup('\x52\x69\x63\x6b\x20\x52\x6f\x6c\x6c') - .then(result => { - console.log(result.list); - console.log(`You just got ${result.list[0].word}ed!`); - }) - .catch(console.error) diff --git a/NodeJs/feathers.js b/NodeJs/feathers.js deleted file mode 100644 index e892a3f3a..000000000 --- a/NodeJs/feathers.js +++ /dev/null @@ -1,5 +0,0 @@ -const feathers = require('@feathersjs/feathers'); -const express = require('@feathersjs/express'); -const app = express(feathers()); - -app.listen(8080); diff --git a/NodeJs/fizzbuzz.js b/NodeJs/fizzbuzz.js deleted file mode 100644 index f008cb598..000000000 --- a/NodeJs/fizzbuzz.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * for loop that iterates up to given no n - * while outputting - * "fizz" at multiples of 3, "buzz" at multiples of 5 and "fizzbuzz" at multiples of 3 and 5 - */ - - -const funPrint = (n)=>{ - for(i=1;i<=n;i++){ - let s = ''; - if(i%3==0) - s+='fizz'; - if(i%5==0) - s+='buzz'; - if(s==='') - console.log(i); - else - console.log(s); - } -} - -funPrint(n); - \ No newline at end of file diff --git a/NodeJs/hacktober.js b/NodeJs/hacktober.js deleted file mode 100644 index 636c2fd49..000000000 --- a/NodeJs/hacktober.js +++ /dev/null @@ -1,7 +0,0 @@ -const str = 'HacktoberFest2k18!'; - -for (i = 0; i < str.length; i++) { - for (j = 0; j <= i; j++) - process.stdout.write(str[j]); - process.stdout.write('\n'); -} diff --git a/NodeJs/hello-reverse.js b/NodeJs/hello-reverse.js deleted file mode 100644 index 6af20f087..000000000 --- a/NodeJs/hello-reverse.js +++ /dev/null @@ -1 +0,0 @@ -Reflect.apply(console.log, {}, [(this.r = ((str = 'Hello, world!') => str.length === 0 ? str : `${this.r(str.substring(1))}${str[0]}`))()]); diff --git a/NodeJs/helloworld.js b/NodeJs/helloworld.js deleted file mode 100644 index 0439b5c55..000000000 --- a/NodeJs/helloworld.js +++ /dev/null @@ -1,9 +0,0 @@ -console.log(`Hello world! -# # ##### ### # ##### -# # ## #### # # ##### #### ##### ###### ##### ###### ###### #### ##### # # # # ## # # -# # # # # # # # # # # # # # # # # # # # # # # # # # # -####### # # # #### # # # ##### ##### # # ##### ##### #### # ##### # # # ##### -# # ###### # # # # # # # # # ##### # # # # # # # # # # -# # # # # # # # # # # # # # # # # # # # # # # # # # # -# # # # #### # # # #### ##### ###### # # # ###### #### # ####### ### ##### ##### `) - diff --git a/NodeJs/html-to-pdf.js b/NodeJs/html-to-pdf.js deleted file mode 100644 index d33cb9670..000000000 --- a/NodeJs/html-to-pdf.js +++ /dev/null @@ -1,40 +0,0 @@ -var wkhtmltopdf = require('wkhtmltopdf'); - -// URL -wkhtmltopdf('http://google.com/', { pageSize: 'letter' }) - .pipe(fs.createWriteStream('out.pdf')); - -// HTML -wkhtmltopdf('

Test

Hello world

') - .pipe(res); - -// Stream input and output -var stream = wkhtmltopdf(fs.createReadStream('file.html')); - -// output to a file directly -wkhtmltopdf('http://apple.com/', { output: 'out.pdf' }); - -// Optional callback -wkhtmltopdf('http://google.com/', { pageSize: 'letter' }, function (err, stream) { - // do whatever with the stream -}); - -// Repeatable options -wkhtmltopdf('http://google.com/', { - allow : ['path1', 'path2'], - customHeader : [ - ['name1', 'value1'], - ['name2', 'value2'] - ] -}); - -// Ignore warning strings -wkhtmltopdf('http://apple.com/', { - output: 'out.pdf', - ignore: ['QFont::setPixelSize: Pixel size <= 0 (0)'] -}); -// RegExp also acceptable -wkhtmltopdf('http://apple.com/', { - output: 'out.pdf', - ignore: [/QFont::setPixelSize/] -}); \ No newline at end of file diff --git a/NodeJs/index.js b/NodeJs/index.js deleted file mode 100644 index 099da3705..000000000 --- a/NodeJs/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -console.log("/**********") -console.log("Hello World") -console.log("**********/") \ No newline at end of file diff --git a/NodeJs/json-to-csv.js b/NodeJs/json-to-csv.js deleted file mode 100644 index fac1ef2b6..000000000 --- a/NodeJs/json-to-csv.js +++ /dev/null @@ -1,11 +0,0 @@ -const Json2csvParser = require('json2csv').Parser; -const fields = ['field1', 'field2', 'field3']; -const opts = { fields }; - -try { - const parser = new Json2csvParser(opts); - const csv = parser.parse(myData); - console.log(csv); -} catch (err) { - console.error(err); -} \ No newline at end of file diff --git a/NodeJs/koa.js b/NodeJs/koa.js deleted file mode 100644 index f6ac0c6a3..000000000 --- a/NodeJs/koa.js +++ /dev/null @@ -1,10 +0,0 @@ -const Koa = require('koa'); -const app = new Koa(); - -app.use(ctx => { - ctx.body = 'Hello World'; -}); - -app.listen(8080, () => { - console.log('goto http://localhost:8080'); -}); diff --git a/NodeJs/luirting.js b/NodeJs/luirting.js deleted file mode 100644 index cb94c7d25..000000000 --- a/NodeJs/luirting.js +++ /dev/null @@ -1,2 +0,0 @@ -console.log('Hello World!'); -console.log('Viva Mexico Compa!'); \ No newline at end of file diff --git a/NodeJs/map.js b/NodeJs/map.js deleted file mode 100644 index aba0875f4..000000000 --- a/NodeJs/map.js +++ /dev/null @@ -1,3 +0,0 @@ -const commands = ["hello", "world", "hacktoberfest", "2018"]; - -commands.map(command => console.log(command.toUpperCase())); diff --git a/NodeJs/mocha-tests.js b/NodeJs/mocha-tests.js deleted file mode 100644 index 14a8c5190..000000000 --- a/NodeJs/mocha-tests.js +++ /dev/null @@ -1,7 +0,0 @@ - -const assert = require('assert'); -describe('Mocha Test Cases', function () { - it('should return -1 when the value is not present', function () { - assert.equal([1, 2, 3].indexOf(4), -1); - }); -}); diff --git a/NodeJs/name.js b/NodeJs/name.js deleted file mode 100644 index 59be2cb82..000000000 --- a/NodeJs/name.js +++ /dev/null @@ -1,4 +0,0 @@ -var Date = new Date() -var name = 'Jack' - -console.log(`My name is ${name} and I am contributing to the ${Date.getYear()} Hacktoberfest!`) diff --git a/NodeJs/package.json b/NodeJs/package.json deleted file mode 100644 index af5f30469..000000000 --- a/NodeJs/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "hello-world", - "version": "1.1.0", - "description": "Hello World with nodejs", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [ - "hello-world", - "hello_world", - "helloworld" - ], - "author": "Jhon Alexander Perez Valencia ", - "license": "ISC" -} diff --git a/NodeJs/pairs.js b/NodeJs/pairs.js deleted file mode 100644 index ee1ee8f1b..000000000 --- a/NodeJs/pairs.js +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************** -* pairs(names): -* -* - It accepts an array of names: -* pairs(['Asis', 'Hamsa', 'Fawas', 'Mishmish']) -* -* - It returns a randomized pairing of names: -* [['Mishmish', 'Asis'], ['Fawas', 'Hamsa']] -* -* - It can handle an odd number of names: -* pairs(['Asis', 'Hamsa', 'Fawas', 'Mishmish', 'Hussein]) -* returns [['Mishmish', 'Fawas'], ['Asis', 'Hussein'], ['Hamsa']] -* -* - It returns an empty array if it gets passed an empty array: -* pairs([]) returns [] -* -* - It returns an empty array if it gets passed nothing: -* pairs() returns [] -****************************************************************/ -function pairs(names) { - names = names || []; - pairs = []; - - while (names.length > 1) { - pairs.push([names.getRandom(), names.getRandom()]); - } - - if (names.length) { - pairs.push([names[0]]); - } - - return pairs; -} - -module.exports = pairs; - -/********************************************** -* READ ME!!!! -* -* We've including this handy method for you. -* It will remove a random element from an array -* and return it to you. -* -* Example Usage: -* -* let numbers = [1, 2, 3, 4]; -* let random = numbers.getRandom(); // randomly returns something from the array. e.g. 3 -* console.log(random); // 3 (the random element) -* console.log(numbers); // [1, 2, 4] (missing the random element) -************************************************/ -Array.prototype.getRandom = function () { - return this.splice(Math.floor(Math.random()*this.length), 1)[0]; -} - -console.log(pairs(['Asis', 'Hamsa', 'Fawas', 'Mishmish', 'Hussein', 'Lailz', 'Mr Potato'])); diff --git a/NodeJs/parameters.js b/NodeJs/parameters.js deleted file mode 100644 index f97405a29..000000000 --- a/NodeJs/parameters.js +++ /dev/null @@ -1,7 +0,0 @@ -// The user will enter in 2 numbers and this node application will console log true if the numbers are equal -//You can use process.argv to obtain the parameters the user enters -//process.argv[0] = file path -//process.argv[1] = file name -//parameters inputted by the user start at process.argv[2] -console.log(process.argv[2] === process.argv[3]); - diff --git a/NodeJs/process_end.js b/NodeJs/process_end.js deleted file mode 100644 index f13a126ba..000000000 --- a/NodeJs/process_end.js +++ /dev/null @@ -1,10 +0,0 @@ -process.on('exit', function(code) { - - // Following code will never execute. - setTimeout(function() { - console.log("This will not run"); - }, 0); - - console.log('About to exit with code:', code); -}); -console.log("Program Ended"); diff --git a/NodeJs/pull-request-tutorial.js b/NodeJs/pull-request-tutorial.js deleted file mode 100644 index cfa02baf9..000000000 --- a/NodeJs/pull-request-tutorial.js +++ /dev/null @@ -1,107 +0,0 @@ -/* Run me with `node pull-request-tutorial.js` */ -const readline = require("readline"); - -const terminal = readline.createInterface({ - input: process.stdin, - output: process.stdout -}); - -const askName = () => { - return new Promise((resolve, reject) => { - terminal.question("What is your name?: ", name => { - console.log( - `Hi ${name}, you're going to learn how to make a pull request.\n` - ); - resolve(name); - }); - }); -}; - -const instruction1 = name => { - return new Promise((resolve, reject) => { - console.log( - 'First, you need to fork the repository you want to contribute to by pressing\n' + - `the 'Fork' button at the top-right of the repository's GitHub page. Try that now, ${name}.` + - '\n\n[Press enter to continue]' - ); - - terminal.on("line", () => { - resolve(); - }); - }); -}; - -const instruction2 = name => { - return new Promise((resolve, reject) => { - console.log( - 'Next, clone your newly forked repository to your computer. To do this click the green\n' + - `'Clone or download' button on your newly forked repository on GitHub, then copy the link text.\n` + - `Now open your terminal and type 'git clone' and paste in the repository link.\n` + - 'Example: git clone https://github.com/Hacktoberfest-2018/Hello-world.git' + - `\n\n[Hit that return key, ${name}]` - ); - - terminal.on("line", () => { - resolve(); - }); - }); -}; - -const instruction3 = name => { - return new Promise((resolve, reject) => { - console.log( - 'Make the code changes you want to, but be sure to adhere to the standards and guidelines\n' + - `of the repository you're contributing to, ${name}. Then use 'git add' to stage your changes\n` + - `and 'git commit' to commit your changes with a useful message. Now push your changes\n` + - `using 'git push -u origin \n` + - 'Example: git push -u origin master' + - '\n\n[Mix it up, press the enter key on the number pad 😲 ]' - ); - - terminal.on("line", () => { - resolve(); - }); - }); -}; - -const instruction4 = name => { - return new Promise((resolve, reject) => { - console.log( - `Now your changes are pushed to your forked repository, it's time to make your pull request!\n` + - `Go to your forked repository on GitHub in your browser, and click the 'New pull request' button.\n` + - `Now click the big, green 'Create pull request' button.` + - `\n\n[Almost there now ${name}, tap enter!]` - ); - - terminal.on("line", () => { - resolve(); - }); - }); -}; - -const instruction5 = name => { - return new Promise((resolve, reject) => { - console.log( - `Finally, give your pull request a descriptive title, and describe it using the text box.\n` + - `Now press the green 'Create pull request' button.` + - `\n\n[Last time, give it some welly! 😤 ]` - ); - - terminal.on("line", () => { - resolve(); - }); - }); -}; - -const main = async () => { - let name = await askName(); - await instruction1(name); - await instruction2(name); - await instruction3(name); - await instruction4(name); - await instruction5(name); - console.log(`💚 💚 💚 💚 You made a pull request! Well done, ${name}! 💚 💚 💚 💚`); - terminal.close(); -}; - -main(); diff --git a/NodeJs/scrape.js b/NodeJs/scrape.js deleted file mode 100644 index 5ab979cff..000000000 --- a/NodeJs/scrape.js +++ /dev/null @@ -1,30 +0,0 @@ -var fs = require('fs'); -var request = require('request'); -var cheerio = require('cheerio'); - -url = 'http://www.imdb.com/title/tt1229340/'; - -request(url, function(error, response, html){ - if(!error){ - // Next, we'll utilize the cheerio library on the returned html which will essentially give us jQuery functionality - console.log(html) - var $ = cheerio.load(html); - var title, release, rating; - var json = { title : "", release : "", rating : ""} - $('.header').filter(function(){ - - // Let's store the data we filter into a variable so we can easily see what's going on. - - var data = $(this); - - // In examining the DOM we notice that the title rests within the first child element of the header tag. - // Utilizing jQuery we can easily navigate and get the text by writing the following code: - - title = data.children().next().text(); - console.log(title) - // Once we have our title, we'll store it to the our json object. - - json.title = title; - }) - } -}) diff --git a/NodeJs/unique.js b/NodeJs/unique.js deleted file mode 100644 index a54dabb2a..000000000 --- a/NodeJs/unique.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Remove duplicate values from array - */ -module.exports = function unique (arr) { - if (!Array.isArray(arr)) { - throw TypeError('Input must be an Array') - } - - if (arr.length === 0) { - return arr - } - - const set = new Set(arr) - const uniqueArr = Array.from(set) - - return uniqueArr -} diff --git a/NodeJs/ytsearcher-example.js b/NodeJs/ytsearcher-example.js deleted file mode 100644 index b63791f6b..000000000 --- a/NodeJs/ytsearcher-example.js +++ /dev/null @@ -1,11 +0,0 @@ -const { YTSearcher } = require('ytsearcher'); -const search = new YTSearcher({ - key: process.env.YTAPIKEY || '[redacted]', -}); - -search.search('oHg5SJYRHA0', { type: 'video' }).then(searchResult => { - let result = searchResult.first; - console.log(result); - console.log(`You just got ${result.title}`); - process.exit(0); -}).catch(console.error); diff --git a/NodeJs/zmq.js b/NodeJs/zmq.js deleted file mode 100755 index 7306ce5a3..000000000 --- a/NodeJs/zmq.js +++ /dev/null @@ -1,12 +0,0 @@ -const zlib = require('zlib'); -const zmq = require('zeromq'); // npm install zeromq -const sock = zmq.socket('sub'); - -sock.connect('tcp://eddn.edcd.io:9500'); -console.log('Worker connected to port 9500'); - -sock.subscribe(''); - -sock.on('message', topic => { - console.log(JSON.parse(zlib.inflateSync(topic))); -}); diff --git a/PHP/HelloWorld.php b/PHP/HelloWorld.php deleted file mode 100644 index 0368dbad4..000000000 --- a/PHP/HelloWorld.php +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Hello World - - -

- - diff --git a/PHP/HelloWorldFromPh.php b/PHP/HelloWorldFromPh.php deleted file mode 100644 index 674a964ae..000000000 --- a/PHP/HelloWorldFromPh.php +++ /dev/null @@ -1,4 +0,0 @@ -li[j+1]): - swap(li, j, j+1) - - - return li - - - -# To check the functioning of the above function : - -# 1) Uncomment the next lines -#lis = [2,9,4,1,6,5,-1] -#print(bubble_sort(lis)) - -# 2) Take input from the user, uncomment the following lines to run -#print("Please enter the list of numbers you want to sort") -#a = [int(x) for x in input().split()] -#print(bubble_sort(list(a))) - diff --git a/Python/Fibonacci.py b/Python/Fibonacci.py deleted file mode 100644 index 123a71b91..000000000 --- a/Python/Fibonacci.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Sun Sep 2 15:13:33 2018 - -@author: Karan Randhir -""" -#Print fibonacci series upto a range input by user -first = 0 -second = 1 -n=input("Enter the range of fibbonaci series") -try : - n=int(n) - - print("Required fibonacci series is ") - for i in range (0,n) : - if i <=1 : - fibonacci = i - else : - fibonacci = first + second - first = second - second = fibonacci - print(fibonacci) -except : - print("please enter an integer") \ No newline at end of file diff --git a/Python/HELL_O.py b/Python/HELL_O.py index 5e70b90ae..1bdf878b9 100644 --- a/Python/HELL_O.py +++ b/Python/HELL_O.py @@ -1,3 +1,3 @@ -##Hello everyone -print("Hello Dear All") +##Hello everyone +print("Hello Dear All") import this \ No newline at end of file diff --git a/Python/Hello-world.py b/Python/Hello-world.py deleted file mode 100644 index 916bb2959..000000000 --- a/Python/Hello-world.py +++ /dev/null @@ -1,3 +0,0 @@ -num=int(input("enter a number")) -if(num==1): - print("Hello, World!") diff --git a/Python/HelloHacktoberfest2018.py b/Python/HelloHacktoberfest2018.py deleted file mode 100644 index 2b5431d02..000000000 --- a/Python/HelloHacktoberfest2018.py +++ /dev/null @@ -1,4 +0,0 @@ -# Hi Folks ! Add your city to see where we came from ! - -print("Hello to Hacktoberfest 2018 from Saint-Petersburg!!!") -print("Hello to Hacktoberfest 2018 from Strasbourg !!!") diff --git a/Python/HelloWorld.py b/Python/HelloWorld.py deleted file mode 100644 index ad35e5ae3..000000000 --- a/Python/HelloWorld.py +++ /dev/null @@ -1 +0,0 @@ -print("Hello World") diff --git a/Python/Hello_Open_Source.py b/Python/Hello_Open_Source.py deleted file mode 100644 index b40cbcb76..000000000 --- a/Python/Hello_Open_Source.py +++ /dev/null @@ -1,2 +0,0 @@ -#simple program that prints "Hello Open Source Community!" -print("Hello Open Source Community!") diff --git a/Python/HelloworlD b/Python/HelloworlD deleted file mode 100644 index c1ba4b74e..000000000 --- a/Python/HelloworlD +++ /dev/null @@ -1 +0,0 @@ -print(”你好世界“) diff --git a/Python/Helloworld.py b/Python/Helloworld.py deleted file mode 100644 index ad35e5ae3..000000000 --- a/Python/Helloworld.py +++ /dev/null @@ -1 +0,0 @@ -print("Hello World") diff --git a/Python/bubbleSort.py b/Python/bubbleSort.py deleted file mode 100644 index 3e0e30b9f..000000000 --- a/Python/bubbleSort.py +++ /dev/null @@ -1,13 +0,0 @@ -import random - -def bubbleSort(lists): - for j in range(0, len(lists)-1-i): - if(lists[j]>lists[j+1]): - lists[j+1], lists[j] = lists[j], lists[j+1] - -lists = random.sample(range(0, 5001), 5000) -print(lists) - -bubbleSort(lists) - -print(lists) diff --git a/Python/fizzbuzz.py b/Python/fizzbuzz.py deleted file mode 100644 index 9fa89367f..000000000 --- a/Python/fizzbuzz.py +++ /dev/null @@ -1,12 +0,0 @@ -i = 1 -while (i <= 100): - if (((i % 3) == 0) and ((i % 5) == 0)): - print("FizzBuzz") - elif ((i % 3) == 0): - print("Fizz") - elif ((i % 5) == 0): - print("Buzz") - else: - print(i) - i+=1 - diff --git a/Python/hell_o.py b/Python/hell_o.py deleted file mode 100644 index 1bdf878b9..000000000 --- a/Python/hell_o.py +++ /dev/null @@ -1,3 +0,0 @@ -##Hello everyone -print("Hello Dear All") -import this \ No newline at end of file diff --git a/Python/hello-World.py b/Python/hello-World.py deleted file mode 100644 index 916bb2959..000000000 --- a/Python/hello-World.py +++ /dev/null @@ -1,3 +0,0 @@ -num=int(input("enter a number")) -if(num==1): - print("Hello, World!") diff --git a/Python/hello-world.py b/Python/hello-world.py deleted file mode 100644 index 916bb2959..000000000 --- a/Python/hello-world.py +++ /dev/null @@ -1,3 +0,0 @@ -num=int(input("enter a number")) -if(num==1): - print("Hello, World!") diff --git a/Python/helloworld b/Python/helloworld deleted file mode 100644 index c1ba4b74e..000000000 --- a/Python/helloworld +++ /dev/null @@ -1 +0,0 @@ -print(”你好世界“) diff --git a/Python/helloworld.py b/Python/helloworld.py deleted file mode 100644 index ad35e5ae3..000000000 --- a/Python/helloworld.py +++ /dev/null @@ -1 +0,0 @@ -print("Hello World") diff --git a/Python/passwordmanager.py b/Python/passwordmanager.py deleted file mode 100644 index 41098348e..000000000 --- a/Python/passwordmanager.py +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/python3 -# Password_locker.py An insecure Password locker program -Passwords={} -x=input('Enter the website you want a password for') -y=input('ENter the password') -Passwords[x]=y -import pyperclip -if len(sys.argv) < 2: - print('Usage: python Password_locker.py [account] - copy account password') - sys.exit() -account = sys.argv[1] # first command line arg is the account name -if account in Passwords: - pyperclip.copy(Passwords[account]) - print('Password for', account, 'is copied to clipboard.') -else: - print('There is no account named', account) diff --git a/Python/rockPaperScissors.py b/Python/rockPaperScissors.py deleted file mode 100644 index f13b94678..000000000 --- a/Python/rockPaperScissors.py +++ /dev/null @@ -1,44 +0,0 @@ -import random - -r = "rock" -p = "paper" -s = "scissors" - -choices = [r, p, s] - -win = False - -player = input("Enter 'rock', 'paper', or 'scissors': ") - -if player not in choices: - print("invalid input") - -else: - - robot = choices[random.randint(0,2)] # pick a random element from choices[] - - # rock beats scissors, paper beats rock, scissors beats paper - - if player == r: - if robot == s: - win = True - if player == p: - if robot == r: - win = True - if player == s: - if robot == p: - win = True - if player == robot: - win = None - - # print end screen - - print("You picked " + player) - print("I picked " + robot) - if win: - print("You win >:(") - elif win == None: - print("Draw") - else: - print("YOU LOSE!!!!!!") - print("MUAHAHAHAAHAH") diff --git a/R/Hello-World.r b/R/Hello-World.r deleted file mode 100644 index e66db13aa..000000000 --- a/R/Hello-World.r +++ /dev/null @@ -1,4 +0,0 @@ -names <- "Alaburda" -greeting <- paste0("Hello, ",names,"!") - -print(greeting) diff --git a/R/hello.r b/R/hello.r deleted file mode 100644 index 457391d7f..000000000 --- a/R/hello.r +++ /dev/null @@ -1 +0,0 @@ -print("Hello", quote=FALSE) diff --git a/R/helloworld.r b/R/helloworld.r deleted file mode 100644 index a27ecb5a0..000000000 --- a/R/helloworld.r +++ /dev/null @@ -1 +0,0 @@ -print("Hello World!", quote = FALSE) diff --git a/Swift/Hello.swift b/Swift/Hello.swift deleted file mode 100644 index 99dbbc8ff..000000000 --- a/Swift/Hello.swift +++ /dev/null @@ -1,33 +0,0 @@ -class HelloWorldSwift: UIViewController {} - -print("Hello, World!") - - - let helloWorldLabel: UILabel = { - let label = UILabel() - label.text = "Hello World!!! hackoctober is here.." - label.isUserInteractionEnabled = false - label.translatesAutoresizingMaskIntoConstraints = false - return label - }() - - var array = [] - - override func viewDidLoad() { - super.viewDidLoad() - - setupViews() - - view.addSubview(helloworldLabel) - } - - - func setupViews() { - - view.addSubview(helloWorldLabel) - - helloWorldLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true - helloWorldLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true - } - -} diff --git a/Swift/HelloWorld.swift b/Swift/HelloWorld.swift deleted file mode 100644 index f1a18139c..000000000 --- a/Swift/HelloWorld.swift +++ /dev/null @@ -1 +0,0 @@ -print("Hello world!") diff --git a/ansible/hello.yaml b/ansible/hello.yaml deleted file mode 100644 index 28c489791..000000000 --- a/ansible/hello.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Hello World! - hosts: all - - tasks: - - name: Hello World! - shell: echo "Hi!" diff --git a/befunge/helloworld.bf b/befunge/helloworld.bf deleted file mode 100644 index d5c16ca1b..000000000 --- a/befunge/helloworld.bf +++ /dev/null @@ -1,3 +0,0 @@ -> v -v ,,,,,"Hello"48*, v -v,,,,,,"World!"25*,@ diff --git a/c/flipping-the-matix.cpp b/c/flipping-the-matix.cpp deleted file mode 100644 index c3054ab55..000000000 --- a/c/flipping-the-matix.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "stdafx.h" -#include - - -int main()// main fibonacci program -{ - int fib1 = 0; - int fib2 = 1; - int fib3 = 0; - int c; - char g; - //decalare all variables - std::cout << "How many fibonacci numbers do you want?" << std::endl; - std::cin >> c; - //get user input and print the first "0" and "1" - std::cout << fib1 << std::endl;; - std::cout << fib2 << std::endl;; - for (int i = 0; i < c; i++)// Looping though the fibonacci algorythm - { - fib3 = fib1 + fib2; - fib1 = fib2; - fib2 = fib3; - std::cout << fib3 << std::endl; - }; - //Keeping the consol window open... - std::cout << "press any key then enter to exit." << std::endl; - std::cin >> g; - std::cout << g; - return 0; -} diff --git a/chicken/index.ck b/chicken/index.ck deleted file mode 100644 index 5f7464ee5..000000000 --- a/chicken/index.ck +++ /dev/null @@ -1,59 +0,0 @@ -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken -chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken - -chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken - -chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken -chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken - -chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken - -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken - -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken -chicken chicken chicken chicken chicken chicken diff --git a/cpp/CHEFPDIG.cpp b/cpp/CHEFPDIG.cpp deleted file mode 100644 index bf2e9a5e0..000000000 --- a/cpp/CHEFPDIG.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// Problem : https://www.codechef.com/viewsolution/15275148 - -#include -using namespace std; - -#define DEBUG(x) cout << '>' << #x << ':' << x << endl; -#define rep(i,n) for(int i=0;i<(n);++i) -#define sd(n) scanf("%d",&n) -#define sdll(n) scanf("%lld",&n) -#define prn(n) printf("%d\n",n) -#define prnll(n) printf("%lld\n",n) -#define pb(n) push_back(n) -#define MOD 1000000007z -#define MAX 32000 -const int INF = 1<<29; -typedef unsigned long long ll; -//////////////////////////////////////////////////////////////////////////////// -int main() -{ - int t; - sd(t); - while(t--){ - string s; - cin >> s; - int cnt[10]; - - rep(i,10) - cnt[i] = 0; - int n = s.size(); - - for(int i=0;i 2) - cnt[s[i]-48] = 2; - } - - for(int i=65;i<=90;i++){ - int x = i/10 , y = i%10; - - if(x==y and cnt[x]!=2){ - continue; - } - - if(cnt[x] and cnt[y]){ - cout << (char)i ; - } - } - cout << endl; - } - return 0; -} diff --git a/cpp/Red-Black-Tree.cpp b/cpp/Red-Black-Tree.cpp deleted file mode 100644 index 517413716..000000000 --- a/cpp/Red-Black-Tree.cpp +++ /dev/null @@ -1,276 +0,0 @@ -#include -using namespace std; - -/* VERMELHO = 0 - * PRETO = 1 - */ -enum Cor {VERMELHO, PRETO}; - -// Estrutura de Nó -struct No -{ - int chave; - bool cor; - No *esquerda, *direita, *super; - - No(int chave) - { - this->chave = chave; - esquerda = direita = super = NULL; - } -}; - -// Classe da Árvore Rubro-Negra -class ArvRB -{ -private: - No *raiz; -protected: - void rotacaoEsquerda(No *&, No *&); - void rotacaoDireita(No *&, No *&); - void violacao(No *&, No *&); -public: - - ArvRB() { raiz = NULL; } - ~ArvRB(){}; - void inserir(const int &n); - void emOrdem(); - void corrigirEstrutura(No *&, No *&); - void ordemNivel(); -}; - -void ordenaArv(No *raiz) -{ - if (raiz == NULL) - return; - - ordenaArv(raiz->esquerda); - cout << raiz->chave << " "; - ordenaArv(raiz->direita); -} - -No* inserirBST(No* raiz, No* pt) -{ - if (raiz == NULL) - return pt; - - if (pt->chave < raiz->chave) - { - raiz->esquerda = inserirBST(raiz->esquerda, pt); - raiz->esquerda->super = raiz; - } - else if (pt->chave > raiz->chave) - { - raiz->direita = inserirBST(raiz->direita, pt); - raiz->direita->super = raiz; - } - - return raiz; -} - -void ordenaNivel(No *raiz) -{ - if (raiz == NULL){ - return; - } - - int c=0, count=0; - No *noNULL = NULL; - std::queue q; - q.push(raiz); - while (!q.empty()) - { - No *temp = q.front(); - if(temp == noNULL){ - q.pop(); - count++; - continue; - } - - if(temp->cor == 1) - printf("\033[1m\033[30m (%d) \033[0m",temp->chave); - else - printf("\033[31m (%d) \033[0m",temp->chave); - q.pop(); - count++; - if((int)log2(count)==c){ - cout<esquerda == NULL || temp->direita == NULL) - q.push(noNULL); - if (temp->esquerda != NULL) - q.push(temp->esquerda); - - if (temp->direita != NULL) - q.push(temp->direita); - } -} - -void ArvRB::rotacaoEsquerda(No *&raiz, No *&pt) -{ - No *pt_direita = pt->direita; - pt->direita = pt_direita->esquerda; - if (pt->direita != NULL) - pt->direita->super = pt; - - pt_direita->super = pt->super; - - if (pt->super == NULL) - raiz = pt_direita; - - else if (pt == pt->super->esquerda) - pt->super->esquerda = pt_direita; - - else - pt->super->direita = pt_direita; - - pt_direita->esquerda = pt; - pt->super = pt_direita; -} - -void ArvRB::rotacaoDireita(No *&raiz, No *&pt) -{ - No *pt_esquerda = pt->esquerda; - - pt->esquerda = pt_esquerda->direita; - - if (pt->esquerda != NULL) - pt->esquerda->super = pt; - - pt_esquerda->super = pt->super; - - if (pt->super == NULL) - raiz = pt_esquerda; - - else if (pt == pt->super->esquerda) - pt->super->esquerda = pt_esquerda; - - else - pt->super->direita = pt_esquerda; - - pt_esquerda->direita = pt; - pt->super = pt_esquerda; -} - -void ArvRB::corrigirEstrutura(No *&raiz, No *&pt) -{ - No *super_pt = NULL; - No *su_super_pt = NULL; - - while ((pt != raiz) && (pt->cor != PRETO) && - (pt->super->cor == VERMELHO)) - { - - super_pt = pt->super; - su_super_pt = pt->super->super; - - if (super_pt == su_super_pt->esquerda) - { - - No *lad_pt = su_super_pt->direita; - - if (lad_pt != NULL && lad_pt->cor == VERMELHO) - { - su_super_pt->cor = VERMELHO; - super_pt->cor = PRETO; - lad_pt->cor = PRETO; - pt = su_super_pt; - } - - else - { - - if (pt == super_pt->direita) - { - rotacaoEsquerda(raiz, super_pt); - pt = super_pt; - super_pt = pt->super; - } - - rotacaoDireita(raiz, su_super_pt); - swap(super_pt->cor, su_super_pt->cor); - pt = super_pt; - } - } - - else - { - No *lad_pt = su_super_pt->esquerda; - - if ((lad_pt != NULL) && (lad_pt->cor == VERMELHO)) - { - su_super_pt->cor = VERMELHO; - super_pt->cor = PRETO; - lad_pt->cor = PRETO; - pt = su_super_pt; - } - else - { - if (pt == super_pt->esquerda) - { - rotacaoDireita(raiz, super_pt); - pt = super_pt; - super_pt = pt->super; - } - - rotacaoEsquerda(raiz, su_super_pt); - swap(super_pt->cor, su_super_pt->cor); - pt = super_pt; - } - } - } - - raiz->cor = PRETO; -} - -void ArvRB::inserir(const int &chave) -{ - No *pt = new No(chave); - - raiz = inserirBST(raiz, pt); - - corrigirEstrutura(raiz, pt); -} - -void ArvRB::emOrdem() { ordenaArv(raiz);} -void ArvRB::ordemNivel() { ordenaNivel(raiz); } - - -int main() -{ - ArvRB * arvore = new ArvRB; - int escolha=-1; - int novaChave; - int tipoImpressao = -1; - do{ - cout << "\033[2J\033[1;1H"; - cout<emOrdem(); - else - arvore->ordemNivel(); - cout<>escolha; - cout<>novaChave; - arvore->inserir(novaChave); - arvore->ordemNivel(); - break; - case 2: tipoImpressao = 1; - break; - case 3: tipoImpressao = 0; - break; - case 4: delete arvore; - ArvRB * arvore = new ArvRB; - break; - } - }while(escolha!=0); - - return 0; -} diff --git a/cpp/bubble_sort.cpp b/cpp/bubble_sort.cpp deleted file mode 100644 index bee6863a4..000000000 --- a/cpp/bubble_sort.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include -using namespace std; - - -int main(){ - - int a[10]; ///Creates an array of 10 integers - int n,key; - - cin>>n; - ///Read n numbers; - for(int i=0;i>a[i]; - } - - ///Bubble Sort - Optimised - for(int times=0;timesa[j+1]){ - ///Inbuild Swap Fn - swap(a[j],a[j+1]); - swaps++; - } - } - if(swaps==0){ - break; - } - } - - ///Print - for(int i=0;i - -using namespace std; - -int main() { - cout << "Hellor World" << endl; - - return 0; -} diff --git a/cpp/helloworld.cpp b/cpp/helloworld.cpp deleted file mode 100644 index 36b8d5168..000000000 --- a/cpp/helloworld.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; - -int main(){ - cout<<"Hello world!"; - return 0; -} diff --git a/crystal/hello_world.cr b/crystal/hello_world.cr deleted file mode 100644 index a957a6f94..000000000 --- a/crystal/hello_world.cr +++ /dev/null @@ -1,3 +0,0 @@ -# Hello world in Crystal - -puts "Hello World" \ No newline at end of file diff --git a/docker/Docker service Apache example.sh b/docker/Docker service Apache example.sh deleted file mode 100644 index f556e6086..000000000 --- a/docker/Docker service Apache example.sh +++ /dev/null @@ -1,5 +0,0 @@ -#This is an example of httpd apache service creation script in swarm mode. -docker service create --name httpdcluster--hostname httpdnode--replicas 3 --publish 80:80 httpd - - - diff --git a/docker/DockerWebStackExample.yaml b/docker/DockerWebStackExample.yaml deleted file mode 100644 index 7623574e6..000000000 --- a/docker/DockerWebStackExample.yaml +++ /dev/null @@ -1,24 +0,0 @@ -version: '3' -services: -db: - image: mysql - ports: - - "3306:3306" - volumes: - - ./var/mysql:/var/lib/mysql - environment: - - MYSQL_DATABASE=db - - MYSQL_USER=admin - - MYSQL_PASSWORD=password - - MYSQL_ROOT_PASSWORD=password - -web: - # image: eboraas/apache-php - image: tutum/apache-php - ports: - - "80:80" - - "443:443" - links: - - db - volumes: - - ./www:/app diff --git a/docker/Docker_Stack_Yaml_example b/docker/Docker_Stack_Yaml_example deleted file mode 100644 index 735da477a..000000000 --- a/docker/Docker_Stack_Yaml_example +++ /dev/null @@ -1,14 +0,0 @@ -version: '3' -services: - servicename: - image: servicename:latest - deploy: - ports: - - "00:00" - volumes: - - ./var/example - environment: - - MYSQL_DATABASE=database - - MYSQL_USER=login - - MYSQL_PASSWORD=password - - MYSQL_ROOT_PASSWORD=password diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 88ef15c1d..000000000 --- a/docker/README.md +++ /dev/null @@ -1 +0,0 @@ -This is a simple compilation of hello worlds for docker and docker swarm mode. diff --git a/docker/dockerstackexample.sh b/docker/dockerstackexample.sh deleted file mode 100644 index 3206da0c4..000000000 --- a/docker/dockerstackexample.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo docker deploy -c example.yaml nameofstack diff --git a/go/.gitignore b/go/.gitignore deleted file mode 100644 index 6b820fd90..000000000 --- a/go/.gitignore +++ /dev/null @@ -1 +0,0 @@ -hello-world diff --git a/go/README.md b/go/README.md deleted file mode 100644 index a7b333f75..000000000 --- a/go/README.md +++ /dev/null @@ -1,4 +0,0 @@ -go run hello-world.go -go build hello-world.go -./hello-world - diff --git a/html/Hello-World_xavier vick-west b/html/Hello-World_xavier vick-west deleted file mode 100644 index 85bc71177..000000000 --- a/html/Hello-World_xavier vick-west +++ /dev/null @@ -1,9 +0,0 @@ - - - - Hello World - - -

Hello World

- - diff --git a/html/header.html b/html/header.html deleted file mode 100644 index aa5a177d5..000000000 --- a/html/header.html +++ /dev/null @@ -1,5 +0,0 @@ -

HEllo world

-

HEllo world

-

HEllo world

-

HEllo world

-
HEllo world
diff --git a/html/hello_html.html b/html/hello_html.html deleted file mode 100644 index f9992a6b6..000000000 --- a/html/hello_html.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Hello World - - -

Hello World

- - diff --git a/html/hello_world.html b/html/hello_world.html deleted file mode 100644 index b362e3034..000000000 --- a/html/hello_world.html +++ /dev/null @@ -1,8 +0,0 @@ - - -HELLO WORLD - - -HELLO WORLD - - \ No newline at end of file diff --git a/jQuery/index.html b/jQuery/index.html deleted file mode 100644 index 07754f4c3..000000000 --- a/jQuery/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - -jQuery Hello World - - - - - - - - - -This is Hello World by HTML - -
-
- - - diff --git a/java/helloworld.java b/java/helloworld.java deleted file mode 100644 index dccccce61..000000000 --- a/java/helloworld.java +++ /dev/null @@ -1,5 +0,0 @@ -public class Program { - public static void main(String[] args) { - System.out.print("Hello World."); - } -} diff --git a/nodejs/README.md b/nodejs/README.md deleted file mode 100644 index 704d13b36..000000000 --- a/nodejs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# HelloWorld with NodeJS -``` -$ node index.js -``` \ No newline at end of file diff --git a/nodejs/package.json b/nodejs/package.json deleted file mode 100644 index af5f30469..000000000 --- a/nodejs/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "hello-world", - "version": "1.1.0", - "description": "Hello World with nodejs", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [ - "hello-world", - "hello_world", - "helloworld" - ], - "author": "Jhon Alexander Perez Valencia ", - "license": "ISC" -} diff --git a/puppet/hello-world.pp b/puppet/hello-world.pp deleted file mode 100644 index dd662f5d4..000000000 --- a/puppet/hello-world.pp +++ /dev/null @@ -1 +0,0 @@ -notify{"Hello World from Puppet": } diff --git a/python/helloworld.py b/python/helloworld.py deleted file mode 100644 index ad35e5ae3..000000000 --- a/python/helloworld.py +++ /dev/null @@ -1 +0,0 @@ -print("Hello World") diff --git a/typescript/hello.ts b/typescript/hello.ts deleted file mode 100644 index d9f698d6b..000000000 --- a/typescript/hello.ts +++ /dev/null @@ -1,20 +0,0 @@ -function greeting(person){ - return "Hello"+person; -} - -let user = "Vikum"; -//document.html.innerBody = user(greeting); -console.log("Hello" + user); - - -let user1:String = "hi all how are you"; -console.log(user1) -if(!user1){ - console.log("se") -}else{ - console.log("go and find obj") - -} - - -//this just a simple workout with type script \ No newline at end of file