diff --git a/(12)Web-css/Mainjpg.jpeg b/(12)Web-css/Mainjpg.jpeg deleted file mode 100644 index 8b4d91e1b..000000000 Binary files a/(12)Web-css/Mainjpg.jpeg and /dev/null differ diff --git a/(12)Web-css/index.html b/(12)Web-css/index.html deleted file mode 100644 index 6ea105958..000000000 --- a/(12)Web-css/index.html +++ /dev/null @@ -1,101 +0,0 @@ - - - IJSE-Institute of Java Software Engineering - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Column 1Column 2Column 3
row data1 row data2 row data3
Footer 1Footer 2Footer 3
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cus nameCus IDCus Address
AABCDEF
AABCDEF
AABCDEF
ABCDEF
- -
    - -
  1. item 1
  2. -
      -
    1. Ordered list item 1
    2. -
    3. Ordered list item 2
    4. -
    -
  3. Item 2
  4. - -
-

This is a paragrahph that I wrote as an example. Just adding a few more lines to make it look like a paragraph. - I guess now it looks like one.

- - -//hellyea diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7504c3b0b..000000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.out -*.exe -*.class -.idea -.vscode -.DS_Store -*.pyc -__pycache__ diff --git a/.vs/Hello-world/v15/.suo b/.vs/Hello-world/v15/.suo deleted file mode 100644 index 8ced60d8b..000000000 Binary files a/.vs/Hello-world/v15/.suo and /dev/null differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json deleted file mode 100644 index 257355bc8..000000000 --- a/.vs/VSWorkspaceState.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ExpandedNodes": [ - "", - "\\Html", - "\\SQL" - ], - "SelectedNode": "\\Html\\HelloWorldInMalaysia.html", - "PreviewInSolutionExplorer": false -} \ No newline at end of file diff --git a/.vs/config/applicationhost.config b/.vs/config/applicationhost.config deleted file mode 100644 index 5441f24fc..000000000 --- a/.vs/config/applicationhost.config +++ /dev/null @@ -1,1022 +0,0 @@ - - - - - - - -
-
-
-
-
-
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
- -
-
- -
-
-
- - -
-
-
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite deleted file mode 100644 index 3e71e0cf6..000000000 Binary files a/.vs/slnx.sqlite and /dev/null differ diff --git a/05AB1E/README.md b/05AB1E/README.md deleted file mode 100644 index e9b5aef11..000000000 --- a/05AB1E/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# [05AB1E](https://github.com/Adriandmen/05AB1E) is a concise, stack-based golfing language. - -You can use [Try It Online!](https://tio.run/##yy9OTMpM/f9fySM1JydfRyE8vygnRfH/f8v/AA) to run these programs. - -## [Hello, World!](helloworld.abe) - -``` -"Hello, World! -``` - -The expected `Hello, World!` program is `"Hello, World!"` (pushes the string `Hello, World!` to the stack and then implicitly outputs it). However, the trailing quote is optional, allowing for a more concise program `"Hello, World!`. - -It seems that [somebody has found a more concise program than me](https://codegolf.stackexchange.com/questions/55422/hello-world/67457#67457), but it is not in any way readable. - -## [Factorial](factorial.abe) - -``` -GN* -``` - -This is a pretty simple program that outputs the factorial of the input. - -``` - - The input is pushed to the stack -G - Loop the code until } until N is the first element in the stack (starting at 1), for(N = 1, N <= input, N++) - N - N is the counter variable for the loop, this pushes it to the stack - * - Sum the top 2 elements of the stack and push it to the stack - - } is implied (the end of the loop) -``` diff --git a/05AB1E/factorial.abe b/05AB1E/factorial.abe deleted file mode 100644 index f2bcc8533..000000000 --- a/05AB1E/factorial.abe +++ /dev/null @@ -1 +0,0 @@ -GN* diff --git a/05AB1E/helloworld.abe b/05AB1E/helloworld.abe deleted file mode 100644 index 7eef4539a..000000000 --- a/05AB1E/helloworld.abe +++ /dev/null @@ -1 +0,0 @@ -"Hello, World! diff --git a/1C/helloworld-1C.txt b/1C/helloworld-1C.txt deleted file mode 100644 index f99ec5582..000000000 --- a/1C/helloworld-1C.txt +++ /dev/null @@ -1 +0,0 @@ -Сообщить("Hello, World!"); \ No newline at end of file diff --git a/8th/fizzbuzz.8th b/8th/fizzbuzz.8th deleted file mode 100644 index 91c27a605..000000000 --- a/8th/fizzbuzz.8th +++ /dev/null @@ -1,25 +0,0 @@ -with: n - -: num? \ n f -- ) - if drop else . then ; - -\ is m mod n 0? leave the result twice on the stack -: div? \ m n -- f f - mod 0 = dup ; - -: fizz? \ n -- n f - dup 3 - div? if "Fizz" . then ; - -: buzz? \ n f -- n f - over 5 - div? if "Buzz" . then or ; - -\ print a message as appropriate for the given number: -: fizzbuzz \ n -- - fizz? buzz? num? - space ; - -\ iterate from 1 to 100: -' fizzbuzz 1 100 loop -cr bye diff --git a/8th/helloworld.8th b/8th/helloworld.8th deleted file mode 100644 index 1caf42338..000000000 --- a/8th/helloworld.8th +++ /dev/null @@ -1 +0,0 @@ -"Hello world!" . cr bye diff --git a/ABAP/helloworld-ABAP.txt b/ABAP/helloworld-ABAP.txt deleted file mode 100644 index 67955e2fd..000000000 --- a/ABAP/helloworld-ABAP.txt +++ /dev/null @@ -1,2 +0,0 @@ -REPORT first_programm. -WRITE / 'Hello, World!'. \ No newline at end of file diff --git a/ABAP/helloworld-Korean-ABAP.txt b/ABAP/helloworld-Korean-ABAP.txt deleted file mode 100644 index cc1a7d011..000000000 --- a/ABAP/helloworld-Korean-ABAP.txt +++ /dev/null @@ -1,2 +0,0 @@ -REPORT first_programm. -WRITE / '여보세요 세계!'. \ No newline at end of file diff --git a/ACPI/HelloWorld.aml b/ACPI/HelloWorld.aml deleted file mode 100644 index 2ac29ca96..000000000 --- a/ACPI/HelloWorld.aml +++ /dev/null @@ -1,8 +0,0 @@ -// Hello world in ACPI Source Language. - -Scope(\) { - Method(_WAK) { - Store ("Hello World", Debug) - Return(Package(2){0x00000000,0}) - } -} diff --git a/AIML/helloworld.aiml b/AIML/helloworld.aiml deleted file mode 100644 index e2633a1e2..000000000 --- a/AIML/helloworld.aiml +++ /dev/null @@ -1,26 +0,0 @@ - - - - HELLO WORLD - - - - - WHAT IS YOUR NAME - - - - - WHO ARE YOU - - - - - - diff --git a/AL/CustomerCardExtension.al b/AL/CustomerCardExtension.al deleted file mode 100755 index e229771cb..000000000 --- a/AL/CustomerCardExtension.al +++ /dev/null @@ -1,24 +0,0 @@ -pageextension 50112 CustomerCardExtension extends "Customer Card" -{ - - layout - { - // Add changes - } - - actions - { - addlast("&Customer") - { - action("Show Greeting") - { - RunObject = codeunit HelloWorld; - RunPageOnRec = True; - Image = CheckDuplicates; - PromotedCategory = Category8; - Promoted = true; - ApplicationArea = All; - } - } - } -} diff --git a/AL/GreetingsManagement.al b/AL/GreetingsManagement.al deleted file mode 100755 index 842690127..000000000 --- a/AL/GreetingsManagement.al +++ /dev/null @@ -1,53 +0,0 @@ -codeunit 50110 GreetingsManagement -{ - local procedure GetHelloWorldText(GreetingNo : Integer) : Text; - begin - case GreetingNo of - 1: exit('Arabic: مرحبا بالعالم'); - 2: exit('Bulgarian: Здравей, свят'); - 3: exit('Cantonese: 世界你好'); - 4: exit('Greek: Γεια σου κόσμε'); - 5: exit('Korean: 전 세계 여러분 안녕하세요'); - 6: exit('Thai: หวัดดีชาวโลก'); - 7: exit('Hindi: हैलो वर्ल्ड'); - 8: exit('Japanese: ハローワールド'); - 9: exit('Danish: Hej verden'); - 10: exit('Polish: Witaj świecie'); - 11: exit('Pig Latin: Ellohay Orldway'); - 12: exit('Hungarian: Szia, világ!'); - 13: exit('Flemish: Hej wereld'); - 14: exit('Dutch: Hallo wereld'); - 15: exit('French: Bonjour le monde'); - 16: exit('Finnish: Hei maailma'); - 17: exit('Russian: Привет, мир!'); - 18: exit('Czech: Ahoj světe'); - 19: exit('German: Hallo Welt'); - 20: exit('Lithuanian: Labas, pasauli!'); - 21: exit('Afrikaans: Hallo wêreld'); - 22: exit('Bakke Snavvendt: Wello Horld'); - 23: exit('1337 : h3ll0 w0rld!'); - 24: exit('|_337: |-|3|_|_0 \\/\\/0|2|_|)!'); - 25: exit('Morse code: ...././.-../.-../---//.--/---/.-./.-../-../-.-.--////'); - 26: exit('Ballon script: Ⓗⓔⓛⓛⓞ Ⓦⓞⓡⓛⓓ!'); - 27: exit('Braille: ⠠⠓⠑⠇⠇⠕ ⠠⠺⠕⠗⠇⠙⠖'); - 28: exit('Español: Hola Mundo!'); - 29: exit('Albanian: Përshëndetje, Botë!'); - 30: exit('Turkish: Merhaba Dünya!'); - 31: exit('Tamil: வணக்கம்'); - 32: exit('Sinhalese: ආයුබෝවන්'); - 33: exit('Swahili: Salamu, Dunia'); - 34: exit('Catalan: Hola món'); - 35: exit('Icelandic: Halló heimur'); - 36: exit('Gaeilge: Dia duit an domhan'); - 37: exit('Portuguese: Olá Mundo'); - else - exit('Hello, World'); // Default to the good old one. - end; - end; - - procedure GetRandomGreeting() : Text; - begin - Randomize; - exit(GetHelloWorldText(Random(38))); - end; -} diff --git a/AL/HelloWorld.al b/AL/HelloWorld.al deleted file mode 100755 index e4077360a..000000000 --- a/AL/HelloWorld.al +++ /dev/null @@ -1,11 +0,0 @@ -codeunit 70051001 HelloWorld -{ - TableNo = Customer; - - trigger OnRun(); - var - HelloText : Codeunit GreetingsManagement; - begin - Message('%1, %2', HelloText.GetRandomGreeting(), Rec.Name); - end; -} \ No newline at end of file diff --git a/AL/app.json b/AL/app.json deleted file mode 100755 index 2d3625a12..000000000 --- a/AL/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "f2c72fd2-bad2-4ee4-bccc-541b866b6d85", - "name": "Hello World", - "publisher": "Zava", - "brief": "La posibilidad de saludar a tus clientes.", - "description": "La posibilidad de saludar a sus clientes en múltiples idiomas.", - "version": "1.0.0.0", - "privacyStatement": "", - "EULA": "", - "help": "", - "url": "", - "logo": "", - "capabilities": [], - "platform": "11.0.0.0", - "application": "11.0.0.0", - "screenshots": [], - "idRange": { - "from": 50100, - "to": 50149 - } -} \ No newline at end of file diff --git a/APL/hello.apl b/APL/hello.apl deleted file mode 100644 index 39fb9e3e8..000000000 --- a/APL/hello.apl +++ /dev/null @@ -1 +0,0 @@ -⎕←'Hello World' diff --git a/ASCII/python-hello-world.py b/ASCII/python-hello-world.py deleted file mode 100644 index 93c8071dc..000000000 --- a/ASCII/python-hello-world.py +++ /dev/null @@ -1,14 +0,0 @@ -banner=""" -888 888 888 888 888 888 888 888 888 -888 888 888 888 888 o 888 888 888 888 -888 888 888 888 888 d8b 888 888 888 888 -8888888888 .d88b. 888 888 .d88b. 888 d888b 888 .d88b. 888d888 888 .d88888 888 -888 888 d8P Y8b 888 888 d88""88b 888d88888b888 d88""88b 888P" 888 d88" 888 888 -888 888 88888888 888 888 888 888 88888P Y88888 888 888 888 888 888 888 Y8P -888 888 Y8b. 888 888 Y88..88P 8888P Y8888 Y88..88P 888 888 Y88b 888 " -888 888 "Y8888 888 888 "Y88P" 888P Y888 "Y88P" 888 888 "Y88888 888 - - - -""" -print(banner) diff --git a/ASM_ARM/helloworld.s b/ASM_ARM/helloworld.s deleted file mode 100644 index 021a0dd12..000000000 --- a/ASM_ARM/helloworld.s +++ /dev/null @@ -1,15 +0,0 @@ -@ hello world program written in ARM assembly. -@ author: margobra8 - -.global _start - _start: - adr r1, hello - b test - loop: ldr r12, =0x16000000 - str r0, [r12] - - test: ldrb r0, [r1], #1 - cmp r0,#0 - bne loop - forever: b forever -hello: .asciz "Hello world.\n\r" diff --git a/ASM_NASM_X86/HelloWorld.asm b/ASM_NASM_X86/HelloWorld.asm deleted file mode 100644 index 3bf5219dd..000000000 --- a/ASM_NASM_X86/HelloWorld.asm +++ /dev/null @@ -1,46 +0,0 @@ -org 0x7c00 -jmp 0x0000:start - -hello db 'Hello, World!', 13, 10, 0 - -start: - xor ax, ax - mov ds, ax - mov es, ax - - mov ah,0 - mov al,0x12 - int 10h - - ;mov ah,0xb - ;mov bh,0 - ;mov bl,9 - ;int 10h - - ;codigo - mov bl,1 - mov si, hello - call print_string - - jmp done - -print_string: - lodsb - cmp al,0 - je .done - - mov ah, 0eh - mov bh,0 - inc bl - int 10h - - jmp print_string - - .done: - ret - -done: - jmp $ - -times 510 - ($ - $$) db 0 -dw 0xaa55 diff --git a/ASM_NASM_X86/README.md b/ASM_NASM_X86/README.md deleted file mode 100644 index add28282d..000000000 --- a/ASM_NASM_X86/README.md +++ /dev/null @@ -1,3 +0,0 @@ -$ nasm -f bin HelloWorld.asm -o hello -$ qemu-system-i386 hello - diff --git a/ASM_NASM_X86/palindrome.asm b/ASM_NASM_X86/palindrome.asm deleted file mode 100644 index 2473c01a9..000000000 --- a/ASM_NASM_X86/palindrome.asm +++ /dev/null @@ -1,54 +0,0 @@ - -org 100h -mov bx, offset str -mov cx,0 - -start: -mov ah,1 -int 21h -cmp al, 0dh -je next -mov [bx],al -inc bx -inc cx -jmp start - -next: -dec bx -mov si,offset str -shr cx,1 - -compare: -mov al,[si] -cmp al,[bx] -jne no -inc si -dec bx -loop compare - -mov ah,2 -mov dl,0dh -int 21h -mov dl,0ah -int 21h -mov dx,offset pal -mov ah,9 -int 21h - -jmp exit -no: -mov ah,2 -mov dl,0dh -int 21h -mov dl,0ah -int 21h -mov dx,offset notpal -mov ah,9 -int 21h -exit: -ret -pal db 'Yes$' -notpal db 'No$' -str db 100 dup(?) - - diff --git a/ASP/HelloWorld.asp b/ASP/HelloWorld.asp deleted file mode 100644 index eb29ad879..000000000 --- a/ASP/HelloWorld.asp +++ /dev/null @@ -1,3 +0,0 @@ -<% - Response.write "Hello World in ASP!" -%> diff --git a/AWK/hello_world.awk b/AWK/hello_world.awk deleted file mode 100755 index 4206cf583..000000000 --- a/AWK/hello_world.awk +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/awk -f -BEGIN { print "Hello World" } diff --git a/Actually/hello_world b/Actually/hello_world deleted file mode 100644 index f7c95feb6..000000000 --- a/Actually/hello_world +++ /dev/null @@ -1,2 +0,0 @@ -H -Hello-world diff --git a/Ada/Fibonacci.ipynb b/Ada/Fibonacci.ipynb deleted file mode 100644 index b1b040980..000000000 --- a/Ada/Fibonacci.ipynb +++ /dev/null @@ -1,8 +0,0 @@ -n = int(input('Enter the number of terms')) -a = 0 -b = 1 -for i in range(n): - print(a) - c = a+b - a = b - b = c diff --git a/Ada/hello.adb b/Ada/hello.adb deleted file mode 100644 index 931db44b3..000000000 --- a/Ada/hello.adb +++ /dev/null @@ -1,11 +0,0 @@ -with Ada.Text_IO, Ada.Integer_Text_IO; -use Ada; - -procedure Solution is - begin - Ada.Text_IO.Put_Line("Hello-world"); - - -end Solution; - ---thank in advance for hackerank XD \ No newline at end of file diff --git a/Agda/Hello-world.agda b/Agda/Hello-world.agda deleted file mode 100644 index 08eb5614a..000000000 --- a/Agda/Hello-world.agda +++ /dev/null @@ -1,5 +0,0 @@ -open import System.IO using ( _>>_ ; putStr ; commit ) - -module System.IO.Examples.HelloWorld where - -main = putStr "Hello, World\n" >> commit diff --git a/AlgoPy/bubb.py b/AlgoPy/bubb.py deleted file mode 100755 index 4214e7445..000000000 --- a/AlgoPy/bubb.py +++ /dev/null @@ -1,49 +0,0 @@ -def bubble(): - a=[1,2,5,7,9,0,3] - - k=0 - while k<=len(a): - for j in range(0 , len(a)-1): - b=a[j] - c=a[j+1] - - if a[j]>a[j+1]: - a[j]=c - a[j+1]=b - k=k+1 - return a -print(bubble()) - - -def selection(): - - b=[1,7,5,6,9,10,0,-1] - for i in range(0,len(b)-1): - - mi=i - for j in range(i+1 , len(b)): - - if b[j] A[i]): - A[i-1],A[i] = A[i],A[i-1] - if(i-1 !=0): - i-=1 -print(A) - diff --git a/AlgoPy/mergeSort.py b/AlgoPy/mergeSort.py deleted file mode 100755 index 88d3ac87a..000000000 --- a/AlgoPy/mergeSort.py +++ /dev/null @@ -1,42 +0,0 @@ -def merge(L,R,A): - nL = len(L) - nR = len(R) - i = 0 - j = 0 - k = 0 - while(i < nL and j < nR): - if(L[i] <= R[j]): - A[k] = L[i] - i += 1 - k += 1 - else: - A[k] = R[j] - j += 1 - k += 1 - while(i") - - - - - - - diff --git a/AlgoPy/queue.py b/AlgoPy/queue.py deleted file mode 100755 index 60ba8cac8..000000000 --- a/AlgoPy/queue.py +++ /dev/null @@ -1,17 +0,0 @@ -class Queue: - def __init__(self): - self.items=[] - def enqueue(self, item): - self.items.append(item) - def dequeue(self): - self.items.pop(0) - def size(self): - return len(self.items) - def isEmpty(self): - return self.items==[] -q=Queue() -q.enqueue(54) -q.enqueue(90) -print(q.isEmpty()) -print(q.dequeue()) -print(input("press") diff --git a/Algol/helloworld.alg b/Algol/helloworld.alg deleted file mode 100644 index 0de8bc5c2..000000000 --- a/Algol/helloworld.alg +++ /dev/null @@ -1,3 +0,0 @@ -BEGIN DISPLAY("HELLO WORLD!") END. - -BEGIN DISPLAY("HELLO WORLD!") END. diff --git a/AmazonAlexa/References.txt b/AmazonAlexa/References.txt deleted file mode 100644 index def3aed52..000000000 --- a/AmazonAlexa/References.txt +++ /dev/null @@ -1,11 +0,0 @@ -Setup an AWS account: https://aws.amazon.com/free - -Lambda code: https://github.com/alexa/skill-sample-nodejs-hello-world - -Alexa Docs: https://developer.amazon.com/alexa-skills-kit - -Alexa Console (after signup): https://developer.amazon.com/alexa/console/ask - -Connecting Alexa and Lambda walkthrough (in depth): https://tutorials.botsfloor.com/how-to-build-a-hello-world-alexa-skill-bcea0d01ee8f - -Walkthrough for beginners: https://www.youtube.com/watch?v=V0PwCFrIfwg diff --git a/AmazonAlexa/index.js b/AmazonAlexa/index.js deleted file mode 100644 index 019e8720c..000000000 --- a/AmazonAlexa/index.js +++ /dev/null @@ -1,106 +0,0 @@ - -/*HELLO WORLD. THE CODE IS AS FOLLOWS- -/* eslint-disable func-names */ -/* eslint-disable no-console */ - -const Alexa = require('ask-sdk-core'); - -const LaunchRequestHandler = { - canHandle(handlerInput) { - return handlerInput.requestEnvelope.request.type === 'LaunchRequest'; - }, - handle(handlerInput) { - const speechText = 'Welcome to the Alexa Skills Kit, you can say hello!'; - - return handlerInput.responseBuilder - .speak(speechText) - .reprompt(speechText) - .withSimpleCard('Hello World', speechText) - .getResponse(); - }, -}; - -const HelloWorldIntentHandler = { - canHandle(handlerInput) { - return handlerInput.requestEnvelope.request.type === 'IntentRequest' - && handlerInput.requestEnvelope.request.intent.name === 'HelloWorldIntent'; - }, - handle(handlerInput) { - const speechText = 'Hello World!'; - - return handlerInput.responseBuilder - .speak(speechText) - .withSimpleCard('Hello World', speechText) - .getResponse(); - }, -}; - -const HelpIntentHandler = { - canHandle(handlerInput) { - return handlerInput.requestEnvelope.request.type === 'IntentRequest' - && handlerInput.requestEnvelope.request.intent.name === 'AMAZON.HelpIntent'; - }, - handle(handlerInput) { - const speechText = 'You can say hello to me!'; - - return handlerInput.responseBuilder - .speak(speechText) - .reprompt(speechText) - .withSimpleCard('Hello World', speechText) - .getResponse(); - }, -}; - -const CancelAndStopIntentHandler = { - canHandle(handlerInput) { - return handlerInput.requestEnvelope.request.type === 'IntentRequest' - && (handlerInput.requestEnvelope.request.intent.name === 'AMAZON.CancelIntent' - || handlerInput.requestEnvelope.request.intent.name === 'AMAZON.StopIntent'); - }, - handle(handlerInput) { - const speechText = 'Goodbye!'; - - return handlerInput.responseBuilder - .speak(speechText) - .withSimpleCard('Hello World', speechText) - .getResponse(); - }, -}; - -const SessionEndedRequestHandler = { - canHandle(handlerInput) { - return handlerInput.requestEnvelope.request.type === 'SessionEndedRequest'; - }, - handle(handlerInput) { - console.log(`Session ended with reason: ${handlerInput.requestEnvelope.request.reason}`); - - return handlerInput.responseBuilder.getResponse(); - }, -}; - -const ErrorHandler = { - canHandle() { - return true; - }, - handle(handlerInput, error) { - console.log(`Error handled: ${error.message}`); - - return handlerInput.responseBuilder - .speak('Sorry, I can\'t understand the command, say again.') - .reprompt('Sorry, I can\'t understand the command, say again.') - .getResponse(); - }, -}; - -const skillBuilder = Alexa.SkillBuilders.custom(); - -exports.handler = skillBuilder - .addRequestHandlers( - LaunchRequestHandler, - HelloWorldIntentHandler, - HelpIntentHandler, - CancelAndStopIntentHandler, - SessionEndedRequestHandler - ) - .addErrorHandlers(ErrorHandler) - .lambda(); diff --git a/AmazonAlexa/package.json b/AmazonAlexa/package.json deleted file mode 100644 index 7d074c89e..000000000 --- a/AmazonAlexa/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "hello world", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "ask-sdk-core": "^2.0.0", - "ask-sdk-model": "^1.0.0" - } -} diff --git a/Amiga/Hello world! b/Amiga/Hello world! deleted file mode 100644 index 85c6c0c93..000000000 --- a/Amiga/Hello world! +++ /dev/null @@ -1,3 +0,0 @@ -PROC main() - WriteF('Hello, World!') - ENDPROC diff --git a/Angular/.angular-cli.json b/Angular/.angular-cli.json deleted file mode 100644 index ed0c1be8e..000000000 --- a/Angular/.angular-cli.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "angular" - }, - "apps": [ - { - "root": "src", - "outDir": "dist", - "assets": [ - "assets", - "favicon.ico" - ], - "index": "index.html", - "main": "main.ts", - "polyfills": "polyfills.ts", - "test": "test.ts", - "tsconfig": "tsconfig.app.json", - "testTsconfig": "tsconfig.spec.json", - "prefix": "app", - "styles": [ - "styles.css" - ], - "scripts": [], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - } - ], - "e2e": { - "protractor": { - "config": "./protractor.conf.js" - } - }, - "lint": [ - { - "project": "src/tsconfig.app.json", - "exclude": "**/node_modules/**" - }, - { - "project": "src/tsconfig.spec.json", - "exclude": "**/node_modules/**" - }, - { - "project": "e2e/tsconfig.e2e.json", - "exclude": "**/node_modules/**" - } - ], - "test": { - "karma": { - "config": "./karma.conf.js" - } - }, - "defaults": { - "styleExt": "css", - "component": {} - } -} diff --git a/Angular/.editorconfig b/Angular/.editorconfig deleted file mode 100644 index 6e87a003d..000000000 --- a/Angular/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Editor configuration, see http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/Angular/.gitignore b/Angular/.gitignore deleted file mode 100644 index eabf65e51..000000000 --- a/Angular/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/dist-server -/tmp -/out-tsc - -# dependencies -/node_modules - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# e2e -/e2e/*.js -/e2e/*.map - -# System Files -.DS_Store -Thumbs.db diff --git a/Angular/README.md b/Angular/README.md deleted file mode 100644 index 26b1e1298..000000000 --- a/Angular/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Angular - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.1. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/Angular/e2e/app.e2e-spec.ts b/Angular/e2e/app.e2e-spec.ts deleted file mode 100644 index 9febd3c5f..000000000 --- a/Angular/e2e/app.e2e-spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { AppPage } from './app.po'; - -describe('angular App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', () => { - page.navigateTo(); - expect(page.getParagraphText()).toEqual('Welcome to app!'); - }); -}); diff --git a/Angular/e2e/app.po.ts b/Angular/e2e/app.po.ts deleted file mode 100644 index 82ea75ba5..000000000 --- a/Angular/e2e/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class AppPage { - navigateTo() { - return browser.get('/'); - } - - getParagraphText() { - return element(by.css('app-root h1')).getText(); - } -} diff --git a/Angular/e2e/tsconfig.e2e.json b/Angular/e2e/tsconfig.e2e.json deleted file mode 100644 index 1d9e5edf0..000000000 --- a/Angular/e2e/tsconfig.e2e.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/e2e", - "baseUrl": "./", - "module": "commonjs", - "target": "es5", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] - } -} diff --git a/Angular/karma.conf.js b/Angular/karma.conf.js deleted file mode 100644 index af139fada..000000000 --- a/Angular/karma.conf.js +++ /dev/null @@ -1,33 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular/cli'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular/cli/plugins/karma') - ], - client:{ - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - reports: [ 'html', 'lcovonly' ], - fixWebpackSourcePaths: true - }, - angularCli: { - environment: 'dev' - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false - }); -}; diff --git a/Angular/package-lock.json b/Angular/package-lock.json deleted file mode 100644 index c54c332aa..000000000 --- a/Angular/package-lock.json +++ /dev/null @@ -1,12712 +0,0 @@ -{ - "name": "angular", - "version": "0.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@angular-devkit/build-optimizer": { - "version": "0.3.2", - "resolved": "http://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.3.2.tgz", - "integrity": "sha512-U0BCZtThq5rUfY08shHXpxe8ZhSsiYB/cJjUvAWRTs/ORrs8pbngS6xwseQws8d/vHoVrtqGD9GU9h8AmFRERQ==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "source-map": "^0.5.6", - "typescript": "~2.6.2", - "webpack-sources": "^1.0.1" - }, - "dependencies": { - "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", - "dev": true - } - } - }, - "@angular-devkit/core": { - "version": "0.3.2", - "resolved": "http://registry.npmjs.org/@angular-devkit/core/-/core-0.3.2.tgz", - "integrity": "sha512-zABk/iP7YX5SVbmK4e+IX7j2d0D37MQJQiKgWdV3JzfvVJhNJzddiirtT980pIafoq+KyvTgVwXtc+vnux0oeQ==", - "dev": true, - "requires": { - "ajv": "~5.5.1", - "chokidar": "^1.7.0", - "rxjs": "^5.5.6", - "source-map": "^0.5.6" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - } - } - }, - "@angular-devkit/schematics": { - "version": "0.3.2", - "resolved": "http://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.3.2.tgz", - "integrity": "sha512-B6zZoqvHaTJy+vVdA6EtlxnCdGMa5elCa4j9lQLC3JI8DLvMXUWkCIPVbPzJ/GSRR9nsKWpvYMYaJyfBDUqfhw==", - "dev": true, - "requires": { - "@ngtools/json-schema": "^1.1.0", - "rxjs": "^5.5.6" - } - }, - "@angular/animations": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.2.11.tgz", - "integrity": "sha512-J7wKHkFn3wV28/Y1Qm4yjGXVCwXzj1JR5DRjGDTFnxTRacUFx7Nj0ApGhN0b2+V0NOvgxQOvEW415Y22kGoblw==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/cli": { - "version": "1.7.4", - "resolved": "http://registry.npmjs.org/@angular/cli/-/cli-1.7.4.tgz", - "integrity": "sha512-URdb1QtnQf+Ievy93wjq7gE81s25BkWUwJFPey+YkphBA3G1lbCAQPiEh2pntBwaIKavgEuCw+Sf2YZdgTVhDA==", - "dev": true, - "requires": { - "@angular-devkit/build-optimizer": "0.3.2", - "@angular-devkit/core": "0.3.2", - "@angular-devkit/schematics": "0.3.2", - "@ngtools/json-schema": "1.2.0", - "@ngtools/webpack": "1.10.2", - "@schematics/angular": "0.3.2", - "@schematics/package-update": "0.3.2", - "ajv": "^6.1.1", - "autoprefixer": "^7.2.3", - "cache-loader": "^1.2.0", - "chalk": "~2.2.0", - "circular-dependency-plugin": "^4.2.1", - "clean-css": "^4.1.11", - "common-tags": "^1.3.1", - "copy-webpack-plugin": "~4.4.1", - "core-object": "^3.1.0", - "denodeify": "^1.2.1", - "ember-cli-string-utils": "^1.0.0", - "extract-text-webpack-plugin": "^3.0.2", - "file-loader": "^1.1.5", - "fs-extra": "^4.0.0", - "glob": "^7.0.3", - "html-webpack-plugin": "^2.29.0", - "istanbul-instrumenter-loader": "^3.0.0", - "karma-source-map-support": "^1.2.0", - "less": "^2.7.2", - "less-loader": "^4.0.5", - "license-webpack-plugin": "^1.0.0", - "loader-utils": "1.1.0", - "lodash": "^4.11.1", - "memory-fs": "^0.4.1", - "minimatch": "^3.0.4", - "node-modules-path": "^1.0.0", - "node-sass": "^4.7.2", - "nopt": "^4.0.1", - "opn": "~5.1.0", - "portfinder": "~1.0.12", - "postcss": "^6.0.16", - "postcss-import": "^11.0.0", - "postcss-loader": "^2.0.10", - "postcss-url": "^7.1.2", - "raw-loader": "^0.5.1", - "resolve": "^1.1.7", - "rxjs": "^5.5.6", - "sass-loader": "^6.0.6", - "semver": "^5.1.0", - "silent-error": "^1.0.0", - "source-map-support": "^0.4.1", - "style-loader": "^0.19.1", - "stylus": "^0.54.5", - "stylus-loader": "^3.0.1", - "uglifyjs-webpack-plugin": "^1.1.8", - "url-loader": "^0.6.2", - "webpack": "~3.11.0", - "webpack-dev-middleware": "~1.12.0", - "webpack-dev-server": "~2.11.0", - "webpack-merge": "^4.1.0", - "webpack-sources": "^1.0.0", - "webpack-subresource-integrity": "^1.0.1" - } - }, - "@angular/common": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.11.tgz", - "integrity": "sha512-LniJjGAeftUJDJh+2+LEjltcGen08C/VMxQ/eUYmesytKy1sN+MWzh3GbpKfEWtWmyUsYTG9lAAJNo3L3jPwsw==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/compiler": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.11.tgz", - "integrity": "sha512-ICvB1ud1mxaXUYLb8vhJqiLhGBVocAZGxoHTglv6hMkbrRYcnlB3FZJFOzBvtj+krkd1jamoYLI43UAmesqQ6Q==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/compiler-cli": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.11.tgz", - "integrity": "sha512-dwrQ0yxoCM/XzKzlm7pTsyg4/6ECjT9emZufGj8t12bLMO8NDn1IJOsqXJA1+onEgQKhlr0Ziwi+96TvDTb1Cg==", - "dev": true, - "requires": { - "chokidar": "^1.4.2", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2", - "tsickle": "^0.27.2" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "@angular/core": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.11.tgz", - "integrity": "sha512-h2vpvXNAdOqKzbVaZcHnHGMT5A8uDnizk6FgGq6SPyw9s3d+/VxZ9LJaPjUk3g2lICA7og1tUel+2YfF971MlQ==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/forms": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-5.2.11.tgz", - "integrity": "sha512-wBllFlIubPclAFRXUc84Kc7TMeKOftzrQraVZ7ooTNeFLLa/FZLN2K8HGyRde8X/XDsMu1XAmjNfkz++spwTzA==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/http": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.11.tgz", - "integrity": "sha512-eR7wNXh1+6MpcQNb3sq4bJVX03dx50Wl3kpPG+Q7N1VSL0oPQSobaTrR17ac3oFCEfSJn6kkUCqtUXha6wcNHg==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/language-service": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-5.2.11.tgz", - "integrity": "sha512-tgnFAhwBmUs1W0dmcmlBmUlMaOgkoyuSdrcF23lz8W5+nSLb+LnbH5a3blU2NVqA4ESvLKQkPW5dpKa/LuhrPQ==", - "dev": true - }, - "@angular/platform-browser": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.11.tgz", - "integrity": "sha512-6YZ4IpBFqXx88vEzBZG2WWnaSYXbFWDgG0iT+bZPHAfwsbmqbcMcs7Ogu+XZ4VmK02dTqbrFh7U4P2W+sqrzow==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/platform-browser-dynamic": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.11.tgz", - "integrity": "sha512-5kKPNULcXNwkyBjpHfF+pq+Yxi8Zl866YSOK9t8txoiQ9Ctw97kMkEJcTetk6MJgBp/NP3YyjtoTAm8oXLerug==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/router": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.11.tgz", - "integrity": "sha512-NT8xYl7Vr3qPygisek3PlXqNROEjg48GXOEsDEc7c8lDBo3EB9Tf328fWJD0GbLtXZNhmmNNxwIe+qqPFFhFAA==", - "requires": { - "tslib": "^1.7.1" - } - }, - "@ngtools/json-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.2.0.tgz", - "integrity": "sha512-pMh+HDc6mOjUO3agRfB1tInimo7hf67u+0Cska2bfXFe6oU7rSMnr5PLVtiZVgwMoBHpx/6XjBymvcnWPo2Uzg==", - "dev": true - }, - "@ngtools/webpack": { - "version": "1.10.2", - "resolved": "http://registry.npmjs.org/@ngtools/webpack/-/webpack-1.10.2.tgz", - "integrity": "sha512-3u2zg2rarG3qNLSukBClGADWuq/iNn5SQtlSeAbfKzwBeyLGbF0gN1z1tVx1Bcr8YwFzR6NdRePQmJGcoqq1fg==", - "dev": true, - "requires": { - "chalk": "~2.2.0", - "enhanced-resolve": "^3.1.0", - "loader-utils": "^1.0.2", - "magic-string": "^0.22.3", - "semver": "^5.3.0", - "source-map": "^0.5.6", - "tree-kill": "^1.0.0", - "webpack-sources": "^1.1.0" - } - }, - "@schematics/angular": { - "version": "0.3.2", - "resolved": "http://registry.npmjs.org/@schematics/angular/-/angular-0.3.2.tgz", - "integrity": "sha512-Elrk0BA951s0ScFZU0AWrpUeJBYVR52DZ1QTIO5R0AhwEd1PW4olI8szPLGQlVW5Sd6H0FA/fyFLIvn2r9v6Rw==", - "dev": true, - "requires": { - "typescript": "~2.6.2" - }, - "dependencies": { - "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", - "dev": true - } - } - }, - "@schematics/package-update": { - "version": "0.3.2", - "resolved": "http://registry.npmjs.org/@schematics/package-update/-/package-update-0.3.2.tgz", - "integrity": "sha512-7aVP4994Hu8vRdTTohXkfGWEwLhrdNP3EZnWyBootm5zshWqlQojUGweZe5zwewsKcixeVOiy2YtW+aI4aGSLA==", - "dev": true, - "requires": { - "rxjs": "^5.5.6", - "semver": "^5.3.0", - "semver-intersect": "^1.1.2" - } - }, - "@types/jasmine": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.9.tgz", - "integrity": "sha512-8dPZwjosElZOGGYw1nwTvOEMof4gjwAWNFS93nBI091BoEfd5drnHOLRMiRF/LOPuMTn5LgEdv0bTUO8QFVuHQ==", - "dev": true - }, - "@types/jasminewd2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.5.tgz", - "integrity": "sha512-1awkm/O4pQCR9hI2F80HmIOda/L+ogkSL8Arj1k00eue5VLY5ooewhSOyF/cUJE0S+/34uD5EYY3zmd6fu2OCA==", - "dev": true, - "requires": { - "@types/jasmine": "*" - } - }, - "@types/node": { - "version": "6.0.118", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.118.tgz", - "integrity": "sha512-N33cKXGSqhOYaPiT4xUGsYlPPDwFtQM/6QxJxuMXA/7BcySW+lkn2yigWP7vfs4daiL/7NJNU6DMCqg5N4B+xQ==", - "dev": true - }, - "@types/q": { - "version": "0.0.32", - "resolved": "http://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", - "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", - "dev": true - }, - "@types/selenium-webdriver": { - "version": "2.53.43", - "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz", - "integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==", - "dev": true - }, - "@types/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=", - "dev": true - }, - "@types/strip-json-comments": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", - "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", - "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", - "dev": true, - "requires": { - "acorn": "^4.0.3" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - } - } - }, - "addressparser": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz", - "integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y=", - "dev": true, - "optional": true - }, - "adm-zip": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz", - "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==", - "dev": true - }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "ajv": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", - "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "dependencies": { - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "amqplib": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.5.2.tgz", - "integrity": "sha512-l9mCs6LbydtHqRniRwYkKdqxVa6XMz3Vw1fh+2gJaaVgTM6Jk3o8RccAKWKtlhT1US5sWrFh+KKxsVUALURSIA==", - "dev": true, - "optional": true, - "requires": { - "bitsyntax": "~0.0.4", - "bluebird": "^3.4.6", - "buffer-more-ints": "0.0.2", - "readable-stream": "1.x >=1.1.9", - "safe-buffer": "^5.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true, - "optional": true - } - } - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "app-root-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz", - "integrity": "sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo=", - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", - "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", - "dev": true, - "requires": { - "default-require-extensions": "^1.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", - "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", - "dev": true - }, - "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" - } - }, - "array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "optional": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true, - "optional": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "ast-types": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.5.tgz", - "integrity": "sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw==", - "dev": true, - "optional": true - }, - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true, - "optional": true - }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autoprefixer": { - "version": "7.2.6", - "resolved": "http://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", - "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", - "dev": true, - "requires": { - "browserslist": "^2.11.3", - "caniuse-lite": "^1.0.30000805", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^6.0.17", - "postcss-value-parser": "^3.2.3" - } - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "axios": { - "version": "0.15.3", - "resolved": "http://registry.npmjs.org/axios/-/axios-0.15.3.tgz", - "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", - "dev": true, - "optional": true, - "requires": { - "follow-redirects": "1.0.0" - }, - "dependencies": { - "follow-redirects": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/follow-redirects/-/follow-redirects-1.0.0.tgz", - "integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=", - "dev": true, - "optional": true, - "requires": { - "debug": "^2.2.0" - } - } - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "binary-extensions": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", - "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", - "dev": true - }, - "bitsyntax": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/bitsyntax/-/bitsyntax-0.0.4.tgz", - "integrity": "sha1-6xDMb4K4xJDj6FaY8H6D1G4MuoI=", - "dev": true, - "optional": true, - "requires": { - "buffer-more-ints": "0.0.2" - } - }, - "bl": { - "version": "1.1.2", - "resolved": "http://registry.npmjs.org/bl/-/bl-1.1.2.tgz", - "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "~2.0.5" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true, - "optional": true - } - } - }, - "blob": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", - "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=", - "dev": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, - "optional": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "blocking-proxy": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-0.0.5.tgz", - "integrity": "sha1-RikF4Nz76pcPQao3Ij3anAexkSs=", - "dev": true, - "requires": { - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "bluebird": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz", - "integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body-parser": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", - "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.1", - "http-errors": "~1.6.2", - "iconv-lite": "0.4.19", - "on-finished": "~2.3.0", - "qs": "6.5.1", - "raw-body": "2.3.2", - "type-is": "~1.6.15" - }, - "dependencies": { - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", - "dev": true - } - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "2.11.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", - "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000792", - "electron-to-chromium": "^1.3.30" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-more-ints": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-0.0.2.tgz", - "integrity": "sha1-JrOIXRD6E9t/wBquOquHAZngEkw=", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "buildmail": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/buildmail/-/buildmail-4.0.1.tgz", - "integrity": "sha1-h393OLeHKYccmhBeO4N9K+EaenI=", - "dev": true, - "optional": true, - "requires": { - "addressparser": "1.0.1", - "libbase64": "0.1.0", - "libmime": "3.0.0", - "libqp": "1.1.0", - "nodemailer-fetch": "1.6.0", - "nodemailer-shared": "1.1.0", - "punycode": "1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true, - "optional": true - } - } - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "cache-loader": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz", - "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "mkdirp": "^0.5.1", - "neo-async": "^2.5.0", - "schema-utils": "^0.4.2" - } - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caniuse-lite": { - "version": "1.0.30000889", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000889.tgz", - "integrity": "sha512-MFxcQ6x/LEEoaIhO7Zdb7Eg8YyNONN+WBnS5ERJ0li2yRw51+i4xXUNxnLaveTb/4ZoJqsWKEmlomhG2pYzlQA==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chalk": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz", - "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==", - "dev": true, - "requires": { - "ansi-styles": "^3.1.0", - "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular-dependency-plugin": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-4.4.0.tgz", - "integrity": "sha512-yEFtUNUYT4jBykEX5ZOHw+5goA3glGZr9wAXIQqoyakjz5H5TeUmScnWRc52douAhb9eYzK3s7V6bXfNnjFdzg==", - "dev": true - }, - "circular-json": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.7.tgz", - "integrity": "sha512-/pXoV1JA847qRKPrHbBK6YIBGFF8GOP4wzSgUOA7q0ew0vAv0iJswP+2/nZQ9uzA3Azi7eTrg9L2yzXc/7ZMIA==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.0", - "shallow-clone": "^1.0.0" - }, - "dependencies": { - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "codelyzer": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.5.0.tgz", - "integrity": "sha512-oO6vCkjqsVrEsmh58oNlnJkRXuA30hF8cdNAQV9DytEalDwyOFRvHMnlKFzmOStNerOmPGZU9GAHnBo4tGvtiQ==", - "dev": true, - "requires": { - "app-root-path": "^2.1.0", - "css-selector-tokenizer": "^0.7.0", - "cssauron": "^1.4.0", - "semver-dsl": "^1.0.1", - "source-map": "^0.5.7", - "sprintf-js": "^1.1.1" - }, - "dependencies": { - "sprintf-js": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", - "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=", - "dev": true - } - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "combine-lists": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", - "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", - "dev": true, - "requires": { - "lodash": "^4.5.0" - } - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - }, - "common-tags": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", - "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true - }, - "compressible": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz", - "integrity": "sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==", - "dev": true, - "requires": { - "mime-db": ">= 1.36.0 < 2" - } - }, - "compression": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", - "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.14", - "debug": "2.6.9", - "on-headers": "~1.0.1", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", - "utils-merge": "1.0.1" - }, - "dependencies": { - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" - } - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - } - } - }, - "connect-history-api-fallback": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", - "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.3.tgz", - "integrity": "sha512-v4THQ24Tks2NkyOvZuFDgZVfDD9YaA9rwYLZTrWg2GHIA8lrH5DboEyeoorh5Skki+PUbgSmnsCwhMWqYrQZrA==", - "dev": true, - "requires": { - "cacache": "^10.0.1", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" - }, - "dependencies": { - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - } - } - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" - }, - "core-object": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/core-object/-/core-object-3.1.5.tgz", - "integrity": "sha512-sA2/4+/PZ/KV6CKgjrVrrUVBKCkdDO02CUlQ0YKTQoYUwPYNOtOAcWlbYhd5v/1JqYaA6oZ4sDlOU4ppVw6Wbg==", - "dev": true, - "requires": { - "chalk": "^2.0.0" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz", - "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==", - "dev": true, - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0", - "require-from-string": "^2.0.1" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "optional": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.x.x" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", - "dev": true - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-selector-tokenizer": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", - "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", - "dev": true, - "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" - } - }, - "css-what": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", - "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", - "dev": true - }, - "cssauron": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", - "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", - "dev": true, - "requires": { - "through": "X.X.X" - } - }, - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "cuint": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", - "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", - "dev": true - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "^0.10.9" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", - "dev": true, - "optional": true - }, - "date-format": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", - "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true, - "optional": true - }, - "default-require-extensions": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", - "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", - "dev": true, - "requires": { - "strip-bom": "^2.0.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "dev": true, - "optional": true, - "requires": { - "ast-types": "0.x.x", - "escodegen": "1.x.x", - "esprima": "3.x.x" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true, - "optional": true - } - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "denodeify": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", - "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", - "dev": true - }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", - "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", - "dev": true, - "requires": { - "utila": "~0.4" - } - }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", - "dev": true, - "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dev": true, - "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", - "dev": true - }, - "domhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", - "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "double-ended-queue": { - "version": "2.1.0-0", - "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", - "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", - "dev": true, - "optional": true - }, - "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", - "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.73", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.73.tgz", - "integrity": "sha512-6PIg7v9zRoVGh6EheRF8h6Plti+3Yo/qtHobS4/Htyt53DNHmKKGFqSae1AIk0k1S4gCQvt7I2WgpbuZNcDY+g==", - "dev": true - }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "ember-cli-string-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ember-cli-string-utils/-/ember-cli-string-utils-1.1.0.tgz", - "integrity": "sha1-ObZ3/CgF9VFzc1N2/O8njqpEUqE=", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "engine.io": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz", - "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "uws": "~9.14.0", - "ws": "~3.3.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-client": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.6.tgz", - "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-parser": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.2.tgz", - "integrity": "sha512-dInLFzr80RijZ1rGpx1+56/uFoH7/7InhH3kZt+Ms6hT8tNx3NGW/WNSA/f8As1WkOfkuyb3tnRyuXGxusclMw==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.4", - "has-binary2": "~1.0.2" - } - }, - "enhanced-resolve": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", - "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "object-assign": "^4.0.1", - "tapable": "^0.2.7" - } - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es5-ext": { - "version": "0.10.46", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz", - "integrity": "sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-promise": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", - "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", - "dev": true, - "optional": true, - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true, - "optional": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "dev": true, - "requires": { - "es6-map": "^0.1.3", - "es6-weak-map": "^2.0.1", - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", - "dev": true - }, - "events": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "eventsource": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", - "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", - "dev": true, - "requires": { - "original": ">=0.0.5" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "expand-braces": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", - "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", - "dev": true, - "requires": { - "array-slice": "^0.2.3", - "array-unique": "^0.2.1", - "braces": "^0.1.2" - }, - "dependencies": { - "braces": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", - "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", - "dev": true, - "requires": { - "expand-range": "^0.1.0" - } - }, - "expand-range": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", - "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", - "dev": true, - "requires": { - "is-number": "^0.1.1", - "repeat-string": "^0.2.2" - } - }, - "is-number": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", - "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=", - "dev": true - }, - "repeat-string": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", - "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=", - "dev": true - } - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "express": { - "version": "4.16.3", - "resolved": "http://registry.npmjs.org/express/-/express-4.16.3.tgz", - "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.2", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.3", - "qs": "6.5.1", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.1", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", - "dev": true - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "extract-text-webpack-plugin": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz", - "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==", - "dev": true, - "requires": { - "async": "^2.4.1", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0", - "webpack-sources": "^1.0.1" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true, - "optional": true - }, - "fastparse": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", - "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "file-loader": { - "version": "1.1.11", - "resolved": "http://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", - "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^0.4.5" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", - "dev": true, - "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" - } - }, - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" - } - }, - "follow-redirects": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.8.tgz", - "integrity": "sha512-sy1mXPmv7kLAMKW/8XofG7o9T+6gAjzdZK4AJF6ryqQYUa/hnzgiypoeUecZ53x7XiqKNEpNqLtS97MshW2nxg==", - "dev": true, - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, - "requires": { - "null-check": "^1.0.0" - } - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "1.1.x", - "xregexp": "2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true, - "optional": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "optional": true, - "requires": { - "globule": "^1.0.0" - } - }, - "generate-function": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", - "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", - "dev": true, - "optional": true, - "requires": { - "is-property": "^1.0.2" - } - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "optional": true, - "requires": { - "is-property": "^1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-uri": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.2.tgz", - "integrity": "sha512-ZD325dMZOgerGqF/rF6vZXyFGTAay62svjQIT+X/oU2PtxYpFxvSkbsdi+oxIrsNxlZVd4y8wUDqkaExWTI/Cw==", - "dev": true, - "optional": true, - "requires": { - "data-uri-to-buffer": "1", - "debug": "2", - "extend": "3", - "file-uri-to-path": "1", - "ftp": "~0.3.10", - "readable-stream": "2" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", - "dev": true, - "optional": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "handle-thing": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", - "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", - "dev": true - }, - "handlebars": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", - "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", - "dev": true, - "requires": { - "async": "^2.5.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "optional": true, - "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "hipchat-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz", - "integrity": "sha1-ttJJdVQ3wZEII2d5nTupoPI7Ix4=", - "dev": true, - "optional": true, - "requires": { - "lodash": "^4.0.0", - "request": "^2.0.0" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "html-minifier": { - "version": "3.5.20", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.20.tgz", - "integrity": "sha512-ZmgNLaTp54+HFKkONyLFEfs5dd/ZOtlquKaTnqIWFmx3Av5zG6ZPcV2d0o9XM2fXOTxxIf6eDcwzFFotke/5zA==", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.1.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - } - }, - "html-webpack-plugin": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz", - "integrity": "sha1-f5xCG36pHsRg9WUn1430hO51N9U=", - "dev": true, - "requires": { - "bluebird": "^3.4.7", - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "toposort": "^1.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "htmlparser2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", - "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.1", - "domutils": "1.1", - "readable-stream": "1.0" - }, - "dependencies": { - "domutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", - "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "http-parser-js": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", - "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", - "dev": true, - "requires": { - "agent-base": "4", - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "http-proxy-middleware": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz", - "integrity": "sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM=", - "dev": true, - "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^3.1.0", - "lodash": "^4.17.2", - "micromatch": "^2.3.11" - }, - "dependencies": { - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "httpntlm": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", - "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", - "dev": true, - "requires": { - "httpreq": ">=0.4.22", - "underscore": "~1.7.0" - } - }, - "httpreq": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", - "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", - "dev": true - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "import-local": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", - "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", - "dev": true, - "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true, - "optional": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflection": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", - "integrity": "sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=", - "dev": true, - "optional": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "internal-ip": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", - "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", - "dev": true, - "requires": { - "meow": "^3.3.0" - } - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true, - "optional": true - }, - "is-my-json-valid": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.19.0.tgz", - "integrity": "sha512-mG0f/unGX1HZ5ep4uhRaPOS8EkAY8/j6mDRMJrutq4CqhoJWYp7qAlonIPy3TV7p3ju4TK9fo/PbnoksWmsp5Q==", - "dev": true, - "optional": true, - "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isbinaryfile": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", - "dev": true, - "requires": { - "buffer-alloc": "^1.2.0" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul-api": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.7.tgz", - "integrity": "sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA==", - "dev": true, - "requires": { - "async": "^2.1.4", - "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.2.1", - "istanbul-lib-hook": "^1.2.2", - "istanbul-lib-instrument": "^1.10.2", - "istanbul-lib-report": "^1.1.5", - "istanbul-lib-source-maps": "^1.2.6", - "istanbul-reports": "^1.5.1", - "js-yaml": "^3.7.0", - "mkdirp": "^0.5.1", - "once": "^1.4.0" - } - }, - "istanbul-instrumenter-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", - "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", - "dev": true, - "requires": { - "convert-source-map": "^1.5.0", - "istanbul-lib-instrument": "^1.7.3", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - } - } - }, - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz", - "integrity": "sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw==", - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.1", - "semver": "^5.3.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz", - "integrity": "sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.2.1", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz", - "integrity": "sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.1", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - }, - "dependencies": { - "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.1.tgz", - "integrity": "sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw==", - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "jasmine": { - "version": "2.99.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.99.0.tgz", - "integrity": "sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc=", - "dev": true, - "requires": { - "exit": "^0.1.2", - "glob": "^7.0.6", - "jasmine-core": "~2.99.0" - }, - "dependencies": { - "jasmine-core": { - "version": "2.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", - "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", - "dev": true - } - } - }, - "jasmine-core": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", - "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", - "dev": true - }, - "jasmine-spec-reporter": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", - "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", - "dev": true, - "requires": { - "colors": "1.1.2" - } - }, - "jasminewd2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", - "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=", - "dev": true - }, - "js-base64": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", - "integrity": "sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ==", - "dev": true, - "optional": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-loader": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", - "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "optional": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true, - "optional": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "karma": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.5.tgz", - "integrity": "sha512-rECezBeY7mjzGUWhFlB7CvPHgkHJLXyUmWg+6vHCEsdWNUTnmiS6jRrIMcJEWgU2DUGZzGWG0bTRVky8fsDTOA==", - "dev": true, - "requires": { - "bluebird": "^3.3.0", - "body-parser": "^1.16.1", - "chokidar": "^2.0.3", - "colors": "^1.1.0", - "combine-lists": "^1.0.0", - "connect": "^3.6.0", - "core-js": "^2.2.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.0", - "expand-braces": "^0.1.1", - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "http-proxy": "^1.13.0", - "isbinaryfile": "^3.0.0", - "lodash": "^4.17.4", - "log4js": "^2.5.3", - "mime": "^1.3.4", - "minimatch": "^3.0.2", - "optimist": "^0.6.1", - "qjobs": "^1.1.4", - "range-parser": "^1.2.0", - "rimraf": "^2.6.0", - "safe-buffer": "^5.0.1", - "socket.io": "2.0.4", - "source-map": "^0.6.1", - "tmp": "0.0.33", - "useragent": "2.2.1" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "karma-chrome-launcher": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", - "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", - "dev": true, - "requires": { - "fs-access": "^1.0.0", - "which": "^1.2.1" - } - }, - "karma-coverage-istanbul-reporter": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.3.tgz", - "integrity": "sha1-O13/RmT6W41RlrmInj9hwforgNk=", - "dev": true, - "requires": { - "istanbul-api": "^1.3.1", - "minimatch": "^3.0.4" - } - }, - "karma-jasmine": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.2.tgz", - "integrity": "sha1-OU8rJf+0pkS5rabyLUQ+L9CIhsM=", - "dev": true - }, - "karma-jasmine-html-reporter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", - "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", - "dev": true, - "requires": { - "karma-jasmine": "^1.0.2" - } - }, - "karma-source-map-support": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.3.0.tgz", - "integrity": "sha512-HcPqdAusNez/ywa+biN4EphGz62MmQyPggUsDfsHqa7tSe4jdsxgvTKuDfIazjL+IOxpVWyT7Pr4dhAV+sxX5Q==", - "dev": true, - "requires": { - "source-map-support": "^0.5.5" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - } - } - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "less": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz", - "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==", - "dev": true, - "requires": { - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.2.11", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "2.81.0", - "source-map": "^0.5.3" - } - }, - "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", - "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "loader-utils": "^1.1.0", - "pify": "^3.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "optional": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "libbase64": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", - "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=", - "dev": true - }, - "libmime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.0.0.tgz", - "integrity": "sha1-UaGp50SOy9Ms2lRCFnW7IbwJPaY=", - "dev": true, - "requires": { - "iconv-lite": "0.4.15", - "libbase64": "0.1.0", - "libqp": "1.1.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.15", - "resolved": "http://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=", - "dev": true - } - } - }, - "libqp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", - "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=", - "dev": true - }, - "license-webpack-plugin": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.5.0.tgz", - "integrity": "sha512-Of/H79rZqm2aeg4RnP9SMSh19qkKemoLT5VaJV58uH5AxeYWEcBgGFs753JEJ/Hm6BPvQVfIlrrjoBwYj8p7Tw==", - "dev": true, - "requires": { - "ejs": "^2.5.7" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "loader-runner": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.1.tgz", - "integrity": "sha512-By6ZFY7ETWOc9RFaAIb23IjJVcM4dvJC/N57nmdz9RSkMXvAXGI7SyVlAw3v8vjtDRlqThgVDVmTnr9fqMlxkw==", - "dev": true - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true, - "optional": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true, - "optional": true - }, - "lodash.tail": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", - "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", - "dev": true - }, - "log4js": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.11.0.tgz", - "integrity": "sha512-z1XdwyGFg8/WGkOyF6DPJjivCWNLKrklGdViywdYnSKOvgtEBo2UyEMZS5sD2mZrQlU3TvO8wDWLc8mzE1ncBQ==", - "dev": true, - "requires": { - "amqplib": "^0.5.2", - "axios": "^0.15.3", - "circular-json": "^0.5.4", - "date-format": "^1.2.0", - "debug": "^3.1.0", - "hipchat-notifier": "^1.1.0", - "loggly": "^1.1.0", - "mailgun-js": "^0.18.0", - "nodemailer": "^2.5.0", - "redis": "^2.7.1", - "semver": "^5.5.0", - "slack-node": "~0.2.0", - "streamroller": "0.7.0" - }, - "dependencies": { - "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "loggly": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/loggly/-/loggly-1.1.1.tgz", - "integrity": "sha1-Cg/B0/o6XsRP3HuJe+uipGlc6+4=", - "dev": true, - "optional": true, - "requires": { - "json-stringify-safe": "5.0.x", - "request": "2.75.x", - "timespan": "2.3.x" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "optional": true - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "form-data": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz", - "integrity": "sha1-bwrrrcxdoWwT4ezBETfYX5uIOyU=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.11" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "optional": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", - "dev": true, - "optional": true - }, - "qs": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", - "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", - "dev": true, - "optional": true - }, - "request": { - "version": "2.75.0", - "resolved": "http://registry.npmjs.org/request/-/request-2.75.0.tgz", - "integrity": "sha1-0rgmiihtoT6qXQGt9dGMyQ9lfZM=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "bl": "~1.1.2", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.0.0", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "node-uuid": "~1.4.7", - "oauth-sign": "~0.8.1", - "qs": "~6.2.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "optional": true - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true, - "optional": true - } - } - }, - "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", - "dev": true - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "magic-string": { - "version": "0.22.5", - "resolved": "http://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "dev": true, - "requires": { - "vlq": "^0.2.2" - } - }, - "mailcomposer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", - "integrity": "sha1-DhxEsqB890DuF9wUm6AJ8Zyt/rQ=", - "dev": true, - "optional": true, - "requires": { - "buildmail": "4.0.1", - "libmime": "3.0.0" - } - }, - "mailgun-js": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/mailgun-js/-/mailgun-js-0.18.1.tgz", - "integrity": "sha512-lvuMP14u24HS2uBsJEnzSyPMxzU2b99tQsIx1o6QNjqxjk8b3WvR+vq5oG1mjqz/IBYo+5gF+uSoDS0RkMVHmg==", - "dev": true, - "optional": true, - "requires": { - "async": "~2.6.0", - "debug": "~3.1.0", - "form-data": "~2.3.0", - "inflection": "~1.12.0", - "is-stream": "^1.1.0", - "path-proxy": "~1.0.0", - "promisify-call": "^2.0.2", - "proxy-agent": "~3.0.0", - "tsscmp": "~1.0.0" - }, - "dependencies": { - "combined-stream": { - "version": "1.0.6", - "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "optional": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - } - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", - "dev": true - }, - "mime-types": { - "version": "2.1.20", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", - "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", - "dev": true, - "requires": { - "mime-db": "~1.36.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mixin-object": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", - "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", - "dev": true, - "requires": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" - }, - "dependencies": { - "for-in": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", - "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", - "dev": true - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "neo-async": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.2.tgz", - "integrity": "sha512-vdqTKI9GBIYcAEbFAcpKPErKINfPF5zIuz3/niBfq8WUZjpT2tytLlFVrBgWdOtqI4uaA/Rb6No0hux39XXDuw==", - "dev": true - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", - "dev": true, - "optional": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", - "dev": true - }, - "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", - "dev": true, - "optional": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - }, - "dependencies": { - "combined-stream": { - "version": "1.0.6", - "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "optional": true, - "requires": { - "delayed-stream": "~1.0.0" - } - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", - "dev": true, - "optional": true, - "requires": { - "ajv": "^5.3.0", - "har-schema": "^2.0.0" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "optional": true, - "requires": { - "abbrev": "1" - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "optional": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true, - "optional": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true, - "optional": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true, - "optional": true - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true, - "optional": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "optional": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } - } - } - }, - "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "node-modules-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/node-modules-path/-/node-modules-path-1.0.1.tgz", - "integrity": "sha1-QAlrCM560OoUaAhjr0ScfHWl0cg=", - "dev": true - }, - "node-sass": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.3.tgz", - "integrity": "sha512-XzXyGjO+84wxyH7fV6IwBOTrEBe2f0a6SBze9QWWYR/cL74AcQUks2AsqcCZenl/Fp/JVbuEaLpgrLtocwBUww==", - "dev": true, - "optional": true, - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.10.0", - "node-gyp": "^3.8.0", - "npmlog": "^4.0.0", - "request": "2.87.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - }, - "dependencies": { - "combined-stream": { - "version": "1.0.6", - "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "optional": true, - "requires": { - "delayed-stream": "~1.0.0" - } - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "optional": true, - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true, - "optional": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true, - "optional": true - }, - "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "optional": true - } - } - }, - "nodemailer": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", - "integrity": "sha1-8kLmSa7q45tsftdA73sGHEBNMPk=", - "dev": true, - "optional": true, - "requires": { - "libmime": "3.0.0", - "mailcomposer": "4.0.1", - "nodemailer-direct-transport": "3.3.2", - "nodemailer-shared": "1.1.0", - "nodemailer-smtp-pool": "2.8.2", - "nodemailer-smtp-transport": "2.7.2", - "socks": "1.1.9" - }, - "dependencies": { - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", - "dev": true, - "optional": true - }, - "socks": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.9.tgz", - "integrity": "sha1-Yo1+TQSRJDVEWsC25Fk3bLPm1pE=", - "dev": true, - "optional": true, - "requires": { - "ip": "^1.1.2", - "smart-buffer": "^1.0.4" - } - } - } - }, - "nodemailer-direct-transport": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz", - "integrity": "sha1-6W+vuQNYVglH5WkBfZfmBzilCoY=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-fetch": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz", - "integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q=", - "dev": true - }, - "nodemailer-shared": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz", - "integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=", - "dev": true, - "requires": { - "nodemailer-fetch": "1.6.0" - } - }, - "nodemailer-smtp-pool": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz", - "integrity": "sha1-LrlNbPhXgLG0clzoU7nL1ejajHI=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "nodemailer-wellknown": "0.1.10", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-smtp-transport": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz", - "integrity": "sha1-A9ccdjFPFKx9vHvwM6am0W1n+3c=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "nodemailer-wellknown": "0.1.10", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-wellknown": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz", - "integrity": "sha1-WG24EB2zDLRDjrVGc3pBqtDPE9U=", - "dev": true - }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "dev": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "nth-check": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", - "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", - "dev": true - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "opn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.1.0.tgz", - "integrity": "sha512-iPNl7SyM8L30Rm1sjGdLLheyHVw5YXVfi3SKWJzBI7efxRwHojfRFjwE/OLM6qp9xJYMgab8WicTU1cPoY+Hpg==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "optional": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true, - "optional": true - } - } - }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", - "dev": true - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pac-proxy-agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-3.0.0.tgz", - "integrity": "sha512-AOUX9jES/EkQX2zRz0AW7lSx9jD//hQS8wFXBvcnd/J2Py9KaMJMqV/LPqJssj1tgGufotb2mmopGPR15ODv1Q==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "^4.2.0", - "debug": "^3.1.0", - "get-uri": "^2.0.0", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "pac-resolver": "^3.0.0", - "raw-body": "^2.2.0", - "socks-proxy-agent": "^4.0.1" - }, - "dependencies": { - "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "optional": true - } - } - }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "degenerator": "^1.0.4", - "ip": "^1.1.5", - "netmask": "^1.0.6", - "thunkify": "^2.1.2" - } - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-proxy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-proxy/-/path-proxy-1.0.0.tgz", - "integrity": "sha1-GOijaFn8nS8aU7SN7hOFQ8Ag3l4=", - "dev": true, - "optional": true, - "requires": { - "inflection": "~1.3.0" - }, - "dependencies": { - "inflection": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.3.8.tgz", - "integrity": "sha1-y9Fg2p91sUw8xjV41POWeEvzAU4=", - "dev": true, - "optional": true - } - } - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true, - "optional": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "portfinder": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.17.tgz", - "integrity": "sha512-syFcRIRzVI1BoEFOCaAiizwDolh1S1YXSodsVhncbhjzjZQulhczNRbqnUl9N31Q4dKGOXsNDqxC2BWBgSMqeQ==", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-import": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", - "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", - "dev": true, - "requires": { - "postcss": "^6.0.1", - "postcss-value-parser": "^3.2.3", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - } - }, - "postcss-load-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.0.0.tgz", - "integrity": "sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ==", - "dev": true, - "requires": { - "cosmiconfig": "^4.0.0", - "import-cwd": "^2.0.0" - } - }, - "postcss-loader": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.6.tgz", - "integrity": "sha512-hgiWSc13xVQAq25cVw80CH0l49ZKlAnU1hKPOdRrNj89bokRr/bZF2nT+hebPPF9c9xs8c3gw3Fr2nxtmXYnNg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^6.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^0.4.0" - } - }, - "postcss-url": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.2.tgz", - "integrity": "sha512-QMV5mA+pCYZQcUEPQkmor9vcPQ2MT+Ipuu8qdi1gVxbNiIiErEGft+eny1ak19qALoBkccS5AHaCaCDzh7b9MA==", - "dev": true, - "requires": { - "mime": "^1.4.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.0", - "postcss": "^6.0.1", - "xxhashjs": "^0.2.1" - } - }, - "postcss-value-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", - "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "optional": true, - "requires": { - "asap": "~2.0.3" - } - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "promisify-call": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/promisify-call/-/promisify-call-2.0.4.tgz", - "integrity": "sha1-1IwtRWUszM1SgB3ey9UzptS9X7o=", - "dev": true, - "optional": true, - "requires": { - "with-callback": "^1.0.2" - } - }, - "protractor": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.1.2.tgz", - "integrity": "sha1-myIXQXCaTGLVzVPGqt1UpxE36V8=", - "dev": true, - "requires": { - "@types/node": "^6.0.46", - "@types/q": "^0.0.32", - "@types/selenium-webdriver": "~2.53.39", - "blocking-proxy": "0.0.5", - "chalk": "^1.1.3", - "glob": "^7.0.3", - "jasmine": "^2.5.3", - "jasminewd2": "^2.1.0", - "optimist": "~0.6.0", - "q": "1.4.1", - "saucelabs": "~1.3.0", - "selenium-webdriver": "3.0.1", - "source-map-support": "~0.4.0", - "webdriver-js-extender": "^1.0.0", - "webdriver-manager": "^12.0.6" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "dev": true, - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - } - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - }, - "dependencies": { - "combined-stream": { - "version": "1.0.6", - "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - } - } - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", - "dev": true, - "requires": { - "ajv": "^5.3.0", - "har-schema": "^2.0.0" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } - }, - "webdriver-manager": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.0.tgz", - "integrity": "sha512-oEc5fmkpz6Yh6udhwir5m0eN5mgRPq9P/NU5YWuT3Up5slt6Zz+znhLU7q4+8rwCZz/Qq3Fgpr/4oao7NPCm2A==", - "dev": true, - "requires": { - "adm-zip": "^0.4.9", - "chalk": "^1.1.1", - "del": "^2.2.0", - "glob": "^7.0.3", - "ini": "^1.3.4", - "minimist": "^1.2.0", - "q": "^1.4.1", - "request": "^2.87.0", - "rimraf": "^2.5.2", - "semver": "^5.3.0", - "xml2js": "^0.4.17" - } - } - } - }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, - "proxy-agent": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.3.tgz", - "integrity": "sha512-PXVVVuH9tiQuxQltFJVSnXWuDtNr+8aNBP6XVDDCDiUuDN8eRCm+ii4/mFWmXWEA0w8jjJSlePa4LXlM4jIzNA==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "^4.2.0", - "debug": "^3.1.0", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "lru-cache": "^4.1.2", - "pac-proxy-agent": "^3.0.0", - "proxy-from-env": "^1.0.0", - "socks-proxy-agent": "^4.0.1" - }, - "dependencies": { - "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "optional": true - } - } - }, - "proxy-from-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=", - "dev": true, - "optional": true - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", - "dev": true - }, - "qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true, - "optional": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", - "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==", - "dev": true - }, - "randomatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", - "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - }, - "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", - "dev": true - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "dev": true, - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": ">= 1.3.1 < 2" - } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", - "dev": true - } - } - }, - "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", - "dev": true - }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", - "dev": true, - "requires": { - "pify": "^2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "redis": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", - "dev": true, - "optional": true, - "requires": { - "double-ended-queue": "^2.1.0-0", - "redis-commands": "^1.2.0", - "redis-parser": "^2.6.0" - } - }, - "redis-commands": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.5.tgz", - "integrity": "sha512-foGF8u6MXGFF++1TZVC6icGXuMYPftKXt1FBT2vrfU9ZATNtZJ8duRC5d1lEfE8hyVe3jhelHGB91oB7I6qLsA==", - "dev": true, - "optional": true - }, - "redis-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", - "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", - "dev": true, - "optional": true - }, - "reflect-metadata": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", - "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==", - "dev": true - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "renderkid": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.2.tgz", - "integrity": "sha512-FsygIxevi1jSiPY9h7vZmBFUbAOcbYm9UwyiLNdVsLRs/5We9Ob5NMPbGYUTWiLq5L+ezlVdE0A8bbME5CWTpg==", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "~0.2", - "htmlparser2": "~3.3.0", - "strip-ansi": "^3.0.0", - "utila": "^0.4.0" - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" - } - }, - "requestretry": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.13.0.tgz", - "integrity": "sha512-Lmh9qMvnQXADGAQxsXHP4rbgO6pffCfuR8XUBdP9aitJcLQJxhp7YZK4xAVYXnPJ5E52mwrfiKQtKonPL8xsmg==", - "dev": true, - "optional": true, - "requires": { - "extend": "^3.0.0", - "lodash": "^4.15.0", - "request": "^2.74.0", - "when": "^3.7.7" - }, - "dependencies": { - "when": { - "version": "3.7.8", - "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", - "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", - "dev": true, - "optional": true - } - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "requires": { - "symbol-observable": "1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - } - }, - "sass-loader": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.7.tgz", - "integrity": "sha512-JoiyD00Yo1o61OJsoP2s2kb19L1/Y2p3QFcCdWdF6oomBGKVYuZyqHWemRBfQ2uGYsk+CH3eCguXNfpjzlcpaA==", - "dev": true, - "requires": { - "clone-deep": "^2.0.1", - "loader-utils": "^1.0.1", - "lodash.tail": "^4.1.1", - "neo-async": "^2.5.0", - "pify": "^3.0.0" - } - }, - "saucelabs": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", - "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", - "dev": true, - "requires": { - "https-proxy-agent": "^1.0.0" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "dev": true, - "requires": { - "extend": "~3.0.0", - "semver": "~5.0.1" - } - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "dev": true, - "requires": { - "agent-base": "2", - "debug": "2", - "extend": "3" - } - }, - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=", - "dev": true - } - } - }, - "sax": { - "version": "0.5.8", - "resolved": "http://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", - "dev": true - }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "optional": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selenium-webdriver": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz", - "integrity": "sha1-ot6l2kqX9mcuiefKcnbO+jZRR6c=", - "dev": true, - "requires": { - "adm-zip": "^0.4.7", - "rimraf": "^2.5.4", - "tmp": "0.0.30", - "xml2js": "^0.4.17" - }, - "dependencies": { - "tmp": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", - "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.1" - } - } - } - }, - "selfsigned": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.3.tgz", - "integrity": "sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q==", - "dev": true, - "requires": { - "node-forge": "0.7.5" - } - }, - "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", - "dev": true - }, - "semver-dsl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "semver-intersect": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz", - "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", - "dev": true, - "requires": { - "semver": "^5.0.0" - } - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", - "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", - "dev": true - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", - "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", - "dev": true, - "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^5.0.0", - "mixin-object": "^2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "silent-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", - "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", - "dev": true, - "requires": { - "debug": "^2.2.0" - } - }, - "slack-node": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", - "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", - "dev": true, - "optional": true, - "requires": { - "requestretry": "^1.2.2" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "smart-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", - "integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", - "dev": true - }, - "smtp-connection": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", - "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", - "dev": true, - "requires": { - "httpntlm": "1.6.1", - "nodemailer-shared": "1.1.0" - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "optional": true, - "requires": { - "hoek": "2.x.x" - } - }, - "socket.io": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", - "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", - "dev": true, - "requires": { - "debug": "~2.6.6", - "engine.io": "~3.1.0", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.0.4", - "socket.io-parser": "~3.1.1" - } - }, - "socket.io-adapter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", - "dev": true - }, - "socket.io-client": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", - "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~2.6.4", - "engine.io-client": "~3.1.0", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.1.1", - "to-array": "0.1.4" - } - }, - "socket.io-parser": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.3.tgz", - "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "has-binary2": "~1.0.2", - "isarray": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, - "sockjs-client": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz", - "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", - "dev": true, - "requires": { - "debug": "^2.6.6", - "eventsource": "0.1.6", - "faye-websocket": "~0.11.0", - "inherits": "^2.0.1", - "json3": "^3.3.2", - "url-parse": "^1.1.8" - }, - "dependencies": { - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - } - } - }, - "socks": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.1.tgz", - "integrity": "sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w==", - "dev": true, - "requires": { - "ip": "^1.1.5", - "smart-buffer": "^4.0.1" - } - }, - "socks-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", - "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", - "dev": true, - "requires": { - "agent-base": "~4.2.0", - "socks": "~2.2.0" - } - }, - "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "spdx-correct": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", - "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", - "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", - "dev": true - }, - "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", - "dev": true, - "requires": { - "debug": "^2.6.8", - "handle-thing": "^1.2.5", - "http-deceiver": "^1.2.7", - "safe-buffer": "^5.0.1", - "select-hose": "^2.0.0", - "spdy-transport": "^2.0.18" - } - }, - "spdy-transport": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", - "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", - "dev": true, - "requires": { - "debug": "^2.6.8", - "detect-node": "^2.0.3", - "hpack.js": "^2.1.6", - "obuf": "^1.1.1", - "readable-stream": "^2.2.9", - "safe-buffer": "^5.0.1", - "wbuf": "^1.7.2" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "streamroller": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", - "dev": true, - "requires": { - "date-format": "^1.2.0", - "debug": "^3.1.0", - "mkdirp": "^0.5.1", - "readable-stream": "^2.3.0" - }, - "dependencies": { - "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "style-loader": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.19.1.tgz", - "integrity": "sha512-IRE+ijgojrygQi3rsqT0U4dd+UcPCqcVvauZpCnQrGAlEe+FUIyrK93bUDScamesjP08JlQNsFJU+KmPedP5Og==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - } - } - }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", - "dev": true, - "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" - }, - "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "stylus-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", - "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "lodash.clonedeep": "^4.5.0", - "when": "~3.6.x" - } - }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" - }, - "tapable": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", - "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=", - "dev": true - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "dev": true, - "optional": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - }, - "through": { - "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", - "dev": true, - "optional": true - }, - "thunky": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", - "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", - "dev": true - }, - "time-stamp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.1.0.tgz", - "integrity": "sha512-lJbq6KsFhZJtN3fPUVje1tq/hHsJOKUUcUj/MGCiQR6qWBDcyi5kxL9J7/RnaEChCn0+L/DUN2WvemDrkk4i3Q==", - "dev": true - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "timespan": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", - "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", - "dev": true, - "optional": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - } - } - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "optional": true, - "requires": { - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true, - "optional": true - } - } - }, - "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", - "dev": true - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.2" - } - }, - "ts-node": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-4.1.0.tgz", - "integrity": "sha512-xcZH12oVg9PShKhy3UHyDmuDLV3y7iKwX25aMVPt1SIXSuAfWkFiGPEkg+th8R4YKW/QCxDoW7lJdb15lx6QWg==", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "chalk": "^2.3.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.0", - "tsconfig": "^7.0.0", - "v8flags": "^3.0.0", - "yn": "^2.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "tsconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", - "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", - "dev": true, - "requires": { - "@types/strip-bom": "^3.0.0", - "@types/strip-json-comments": "0.0.30", - "strip-bom": "^3.0.0", - "strip-json-comments": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } - } - }, - "tsickle": { - "version": "0.27.5", - "resolved": "http://registry.npmjs.org/tsickle/-/tsickle-0.27.5.tgz", - "integrity": "sha512-NP+CjM1EXza/M8mOXBLH3vkFEJiu1zfEAlC5WdJxHPn8l96QPz5eooP6uAgYtw1CcKfuSyIiheNUdKxtDWCNeg==", - "dev": true, - "requires": { - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map": "^0.6.0", - "source-map-support": "^0.5.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - } - } - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" - }, - "tslint": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", - "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.12.1" - }, - "dependencies": { - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "tsscmp": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", - "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", - "dev": true, - "optional": true - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.3.tgz", - "integrity": "sha512-ptLSQs2S4QuS6/OD1eAKG+S5G8QQtrU5RT32JULdZQtM1L3WTi34Wsu48Yndzi8xsObRAB9RPt/KhA9wlpEF6w==", - "dev": true - }, - "uglify-js": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", - "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", - "dev": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "uglifyjs-webpack-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", - "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } - } - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-loader": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.6.2.tgz", - "integrity": "sha512-h3qf9TNn53BpuXTTcpC+UehiRrl0Cv45Yr/xWayApjw6G8Bg2dGke7rIwDQ39piciWCWrC+WiqLjOh3SUp9n0Q==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "mime": "^1.4.1", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - } - } - }, - "url-parse": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz", - "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==", - "dev": true, - "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "useragent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", - "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", - "dev": true, - "requires": { - "lru-cache": "2.2.x", - "tmp": "0.0.x" - }, - "dependencies": { - "lru-cache": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", - "dev": true - } - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "uws": { - "version": "9.14.0", - "resolved": "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz", - "integrity": "sha512-HNMztPP5A1sKuVFmdZ6BPVpBQd5bUjNC8EFMFiICK+oho/OQsAJy5hnIx4btMHiOk8j04f/DbIlqnEZ9d72dqg==", - "dev": true, - "optional": true - }, - "v8flags": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz", - "integrity": "sha512-iw/1ViSEaff8NJ3HLyEjawk/8hjJib3E7pvG4pddVXfUg1983s3VGsiClDjhK64MQVDGqc1Q8r18S4VKQZS9EQ==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", - "dev": true - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "dev": true - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webdriver-js-extender": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", - "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", - "dev": true, - "requires": { - "@types/selenium-webdriver": "^2.53.35", - "selenium-webdriver": "^2.53.2" - }, - "dependencies": { - "adm-zip": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz", - "integrity": "sha1-ph7VrmkFw66lizplfSUDMJEFJzY=", - "dev": true - }, - "sax": { - "version": "0.6.1", - "resolved": "http://registry.npmjs.org/sax/-/sax-0.6.1.tgz", - "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=", - "dev": true - }, - "selenium-webdriver": { - "version": "2.53.3", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz", - "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", - "dev": true, - "requires": { - "adm-zip": "0.4.4", - "rimraf": "^2.2.8", - "tmp": "0.0.24", - "ws": "^1.0.1", - "xml2js": "0.4.4" - } - }, - "tmp": { - "version": "0.0.24", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz", - "integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=", - "dev": true - }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", - "dev": true - }, - "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", - "dev": true, - "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" - } - }, - "xml2js": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", - "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", - "dev": true, - "requires": { - "sax": "0.6.x", - "xmlbuilder": ">=1.0.0" - } - } - } - }, - "webpack": { - "version": "3.11.0", - "resolved": "http://registry.npmjs.org/webpack/-/webpack-3.11.0.tgz", - "integrity": "sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg==", - "dev": true, - "requires": { - "acorn": "^5.0.0", - "acorn-dynamic-import": "^2.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "async": "^2.1.2", - "enhanced-resolve": "^3.4.0", - "escope": "^3.6.0", - "interpret": "^1.0.0", - "json-loader": "^0.5.4", - "json5": "^0.5.1", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "mkdirp": "~0.5.0", - "node-libs-browser": "^2.0.0", - "source-map": "^0.5.3", - "supports-color": "^4.2.1", - "tapable": "^0.2.7", - "uglifyjs-webpack-plugin": "^0.4.6", - "watchpack": "^1.4.0", - "webpack-sources": "^1.0.1", - "yargs": "^8.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglifyjs-webpack-plugin": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", - "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", - "dev": true, - "requires": { - "source-map": "^0.5.6", - "uglify-js": "^2.8.29", - "webpack-sources": "^1.0.1" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - } - } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - } - } - }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, - "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "webpack-dev-middleware": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz", - "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==", - "dev": true, - "requires": { - "memory-fs": "~0.4.1", - "mime": "^1.5.0", - "path-is-absolute": "^1.0.0", - "range-parser": "^1.0.3", - "time-stamp": "^2.0.0" - } - }, - "webpack-dev-server": { - "version": "2.11.3", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.3.tgz", - "integrity": "sha512-Qz22YEFhWx+M2vvJ+rQppRv39JA0h5NNbOOdODApdX6iZ52Diz7vTPXjF7kJlfn+Uc24Qr48I3SZ9yncQwRycg==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "array-includes": "^3.0.3", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.17.4", - "import-local": "^1.0.0", - "internal-ip": "1.2.0", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "selfsigned": "^1.9.1", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.1.5", - "spdy": "^3.4.1", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "webpack-dev-middleware": "1.12.2", - "yargs": "6.6.0" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "6.6.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^4.2.0" - } - }, - "yargs-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - } - } - } - }, - "webpack-merge": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.4.tgz", - "integrity": "sha512-TmSe1HZKeOPey3oy1Ov2iS3guIZjWvMT2BBJDzzT5jScHTjVC3mpjJofgueEzaEd6ibhxRDD6MIblDr8tzh8iQ==", - "dev": true, - "requires": { - "lodash": "^4.17.5" - } - }, - "webpack-sources": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", - "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "webpack-subresource-integrity": { - "version": "1.0.4", - "resolved": "http://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.4.tgz", - "integrity": "sha1-j6yKfo61n8ahZ2ioXJ2U7n+dDts=", - "dev": true, - "requires": { - "webpack-core": "^0.6.8" - } - }, - "websocket-driver": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", - "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, - "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true - }, - "when": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", - "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true - }, - "with-callback": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/with-callback/-/with-callback-1.0.2.tgz", - "integrity": "sha1-oJYpuakgAo1yFAT7Q1vc/1yRvCE=", - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true - }, - "worker-farm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - }, - "dependencies": { - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - } - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true - }, - "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", - "dev": true - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", - "dev": true, - "optional": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "xxhashjs": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", - "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", - "dev": true, - "requires": { - "cuint": "^0.2.2" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true, - "optional": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true, - "optional": true - } - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true, - "optional": true - } - } - }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true - }, - "zone.js": { - "version": "0.8.26", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.26.tgz", - "integrity": "sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA==" - } - } -} diff --git a/Angular/package.json b/Angular/package.json deleted file mode 100644 index a0f6df36b..000000000 --- a/Angular/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "angular", - "version": "0.0.0", - "license": "MIT", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build --prod", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "private": true, - "dependencies": { - "@angular/animations": "^5.2.0", - "@angular/common": "^5.2.0", - "@angular/compiler": "^5.2.0", - "@angular/core": "^5.2.0", - "@angular/forms": "^5.2.0", - "@angular/http": "^5.2.0", - "@angular/platform-browser": "^5.2.0", - "@angular/platform-browser-dynamic": "^5.2.0", - "@angular/router": "^5.2.0", - "core-js": "^2.4.1", - "rxjs": "^5.5.6", - "zone.js": "^0.8.19" - }, - "devDependencies": { - "@angular/cli": "~1.7.1", - "@angular/compiler-cli": "^5.2.0", - "@angular/language-service": "^5.2.0", - "@types/jasmine": "~2.8.3", - "@types/jasminewd2": "~2.0.2", - "@types/node": "~6.0.60", - "codelyzer": "^4.0.1", - "jasmine-core": "~2.8.0", - "jasmine-spec-reporter": "~4.2.1", - "karma": "~2.0.0", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "^1.2.1", - "karma-jasmine": "~1.1.0", - "karma-jasmine-html-reporter": "^0.2.2", - "protractor": "~5.1.2", - "ts-node": "~4.1.0", - "tslint": "~5.9.1", - "typescript": "~2.5.3", - "primeng": "^4.0.3" - } -} diff --git a/Angular/protractor.conf.js b/Angular/protractor.conf.js deleted file mode 100644 index 7ee3b5ee8..000000000 --- a/Angular/protractor.conf.js +++ /dev/null @@ -1,28 +0,0 @@ -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './e2e/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: 'e2e/tsconfig.e2e.json' - }); - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; diff --git a/Angular/src/app/app.component.css b/Angular/src/app/app.component.css deleted file mode 100644 index aee2615db..000000000 --- a/Angular/src/app/app.component.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - color: red; -} diff --git a/Angular/src/app/app.component.html b/Angular/src/app/app.component.html deleted file mode 100644 index 10c908c4e..000000000 --- a/Angular/src/app/app.component.html +++ /dev/null @@ -1,28 +0,0 @@ -

{{title}}

-

Hello World!

- - - - - -
- - - -
- \ No newline at end of file diff --git a/Angular/src/app/app.component.spec.ts b/Angular/src/app/app.component.spec.ts deleted file mode 100644 index bcbdf36b3..000000000 --- a/Angular/src/app/app.component.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { AppComponent } from './app.component'; -describe('AppComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - })); - it('should create the app', async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - })); - it(`should have as title 'app'`, async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('app'); - })); - it('should render title in a h1 tag', async(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); - })); -}); diff --git a/Angular/src/app/app.component.ts b/Angular/src/app/app.component.ts deleted file mode 100644 index 7303134f7..000000000 --- a/Angular/src/app/app.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component } from "@angular/core"; -import { FormControl, FormGroup } from "@angular/forms"; - -@Component({ - selector: "app-root", - templateUrl: "./app.component.html", - styleUrls: ["./app.component.css"] -}) -export class AppComponent { - title = "Hacktoberfest-2018 (Hello World in every Language!)"; - hackForm: FormGroup; - form: any = {}; - - constructor() { - this.hackForm = new FormGroup({ - firstName: new FormControl(""), - lastName: new FormControl("") - }); - } - - hello() { - console.warn(this.form); - } - - onSubmit() { - console.warn(this.hackForm.value); - } -} diff --git a/Angular/src/app/app.module.ts b/Angular/src/app/app.module.ts deleted file mode 100644 index 64e37bef5..000000000 --- a/Angular/src/app/app.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { HttpModule } from '@angular/http'; - - -import { AppComponent } from './app.component'; -import { PostComponent } from './post.component'; - - -@NgModule({ - declarations: [ - AppComponent, - PostComponent - ], - imports: [ - BrowserModule, - ReactiveFormsModule, - HttpModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/Angular/src/app/post.component.html b/Angular/src/app/post.component.html deleted file mode 100644 index ffcaf03ef..000000000 --- a/Angular/src/app/post.component.html +++ /dev/null @@ -1,6 +0,0 @@ -
    -
  • -

    {{ post.title }}

    -
    {{ post.body }}
    -
  • -
diff --git a/Angular/src/app/post.component.ts b/Angular/src/app/post.component.ts deleted file mode 100644 index 772f7db73..000000000 --- a/Angular/src/app/post.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { Http } from '@angular/http'; - -@Component({ - selector: 'app-post', - templateUrl: './post.component.html' -}) - -export class PostComponent implements OnInit { - posts: any[]; - constructor(private http: Http) { } - - ngOnInit() { - this.http.get('http://jsonplaceholder.typicode.com/posts').subscribe(response => { - this.posts = response.json(); - }); - } -} diff --git a/Angular/src/assets/.gitkeep b/Angular/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/Angular/src/environments/environment.prod.ts b/Angular/src/environments/environment.prod.ts deleted file mode 100644 index 3612073bc..000000000 --- a/Angular/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true -}; diff --git a/Angular/src/environments/environment.ts b/Angular/src/environments/environment.ts deleted file mode 100644 index b7f639aec..000000000 --- a/Angular/src/environments/environment.ts +++ /dev/null @@ -1,8 +0,0 @@ -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. - -export const environment = { - production: false -}; diff --git a/Angular/src/favicon.ico b/Angular/src/favicon.ico deleted file mode 100644 index 8081c7cea..000000000 Binary files a/Angular/src/favicon.ico and /dev/null differ diff --git a/Angular/src/index.html b/Angular/src/index.html deleted file mode 100644 index 446065c82..000000000 --- a/Angular/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Angular - - - - - - - - - diff --git a/Angular/src/main.ts b/Angular/src/main.ts deleted file mode 100644 index 91ec6da5f..000000000 --- a/Angular/src/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.log(err)); diff --git a/Angular/src/polyfills.ts b/Angular/src/polyfills.ts deleted file mode 100644 index af8477078..000000000 --- a/Angular/src/polyfills.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** IE10 and IE11 requires the following for the Reflect API. */ -// import 'core-js/es6/reflect'; - - -/** Evergreen browsers require these. **/ -// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. -import 'core-js/es7/reflect'; - - -/** - * Required to support Web Animations `@angular/platform-browser/animations`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - */ - - // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - - /* - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - */ -// (window as any).__Zone_enable_cross_context_check = true; - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/Angular/src/styles.css b/Angular/src/styles.css deleted file mode 100644 index 06be69583..000000000 --- a/Angular/src/styles.css +++ /dev/null @@ -1,4 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -body { - color: green; -} diff --git a/Angular/src/test.ts b/Angular/src/test.ts deleted file mode 100644 index 16317897b..000000000 --- a/Angular/src/test.ts +++ /dev/null @@ -1,20 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/dist/zone-testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: any; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/Angular/src/tsconfig.app.json b/Angular/src/tsconfig.app.json deleted file mode 100644 index 39ba8dbac..000000000 --- a/Angular/src/tsconfig.app.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "baseUrl": "./", - "module": "es2015", - "types": [] - }, - "exclude": [ - "test.ts", - "**/*.spec.ts" - ] -} diff --git a/Angular/src/tsconfig.spec.json b/Angular/src/tsconfig.spec.json deleted file mode 100644 index ac22a298a..000000000 --- a/Angular/src/tsconfig.spec.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "baseUrl": "./", - "module": "commonjs", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/Angular/src/typings.d.ts b/Angular/src/typings.d.ts deleted file mode 100644 index ef5c7bd62..000000000 --- a/Angular/src/typings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* SystemJS module definition */ -declare var module: NodeModule; -interface NodeModule { - id: string; -} diff --git a/Angular/tsconfig.json b/Angular/tsconfig.json deleted file mode 100644 index a6c016bf3..000000000 --- a/Angular/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "target": "es5", - "typeRoots": [ - "node_modules/@types" - ], - "lib": [ - "es2017", - "dom" - ] - } -} diff --git a/Angular/tslint.json b/Angular/tslint.json deleted file mode 100644 index 9963d6c39..000000000 --- a/Angular/tslint.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs", - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} diff --git a/AngularJS/app.js b/AngularJS/app.js deleted file mode 100644 index 7293fddfa..000000000 --- a/AngularJS/app.js +++ /dev/null @@ -1,13 +0,0 @@ -var app = angular.module("app", []); - app.controller("HelloController", function($scope) { - $scope.hello = "Hello World!"; -$scope.fibbo = function(numMax){ - for(var fibArray = [0,1], i=0,j=1,k=0; k - - - - Hello AngularJS - - - - -

{{hello}}

- - {{fibseries}} - - - - diff --git a/Ansible/helloworld.yml b/Ansible/helloworld.yml deleted file mode 100644 index fe2e86ccd..000000000 --- a/Ansible/helloworld.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# YML file to print Hello World in ansible. -- name: Hello World! - hosts: localhost - connection: local - gather_facts: no - tasks: # Debug is used to print Hello World. - - debug: - msg: "Hello World!" diff --git a/Antlr4/.gitignore b/Antlr4/.gitignore deleted file mode 100644 index 86e05b172..000000000 --- a/Antlr4/.gitignore +++ /dev/null @@ -1,77 +0,0 @@ -/target/ - - -# Created by https://www.gitignore.io/api/eclipse - -### Eclipse ### - -.metadata -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.settings/ -.loadpath -.recommenders - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# PyDev specific (Python IDE for Eclipse) -*.pydevproject - -# CDT-specific (C/C++ Development Tooling) -.cproject - -# CDT- autotools -.autotools - -# Java annotation processor (APT) -.factorypath - -# PDT-specific (PHP Development Tools) -.buildpath - -# sbteclipse plugin -.target - -# Tern plugin -.tern-project - -# TeXlipse plugin -.texlipse - -# STS (Spring Tool Suite) -.springBeans - -# Code Recommenders -.recommenders/ - -# Annotation Processing -.apt_generated/ - -# Scala IDE specific (Scala & Java development for Eclipse) -.cache-main -.scala_dependencies -.worksheet - -### Eclipse Patch ### -# Eclipse Core -.project - -# JDT-specific (Eclipse Java Development Tools) -.classpath - -# Annotation Processing -.apt_generated - -.sts4-cache/ - - -# End of https://www.gitignore.io/api/eclipse diff --git a/Antlr4/README.md b/Antlr4/README.md deleted file mode 100644 index f3a1161e1..000000000 --- a/Antlr4/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# antlr4 hello world - -For an easier use Maven was used as build platform - -execute with `mvn compile exec:java` - -## Credit - -Based on @mauriceoc code - refactored and reformated. -MIT License added. - -https://github.com/mauriceoc/antlr4-maven-example diff --git a/Antlr4/pom.xml b/Antlr4/pom.xml deleted file mode 100644 index 461bcd02b..000000000 --- a/Antlr4/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - 4.0.0 - com.hacktoberfest - antlr.hello.world - 0.0.1 - - - UTF-8 - true - true - - - - - org.antlr - antlr4-runtime - 4.5 - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - add-source - generate-sources - - add-source - - - - target/generated-sources - - - - - - - org.antlr - antlr4-maven-plugin - 4.5 - - target/generated-sources - - - - - antlr4 - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - - java - - - - - com.digitalocean.hacktoberfest.HelloWorld - - - - - diff --git a/Antlr4/src/main/antlr4/HelloWorld.g4 b/Antlr4/src/main/antlr4/HelloWorld.g4 deleted file mode 100644 index a47e33226..000000000 --- a/Antlr4/src/main/antlr4/HelloWorld.g4 +++ /dev/null @@ -1,4 +0,0 @@ -grammar HelloWorld; -helloWorld : 'hello' NAME; -NAME : [a-z]+ ; -WS : [ \t\r\n]+ -> skip ; \ No newline at end of file diff --git a/Antlr4/src/main/java/com/digitalocean/hacktoberfest/HelloWalker.java b/Antlr4/src/main/java/com/digitalocean/hacktoberfest/HelloWalker.java deleted file mode 100644 index 130d683b7..000000000 --- a/Antlr4/src/main/java/com/digitalocean/hacktoberfest/HelloWalker.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.digitalocean.hacktoberfest; - -public class HelloWalker extends HelloWorldBaseListener { - public void enterHelloWorld(HelloWorldParser.HelloWorldContext ctx) { - System.out.println("Who says hello? " + ctx.NAME().getText() + " does."); - } -} \ No newline at end of file diff --git a/Antlr4/src/main/java/com/digitalocean/hacktoberfest/HelloWorld.java b/Antlr4/src/main/java/com/digitalocean/hacktoberfest/HelloWorld.java deleted file mode 100644 index e31842095..000000000 --- a/Antlr4/src/main/java/com/digitalocean/hacktoberfest/HelloWorld.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.digitalocean.hacktoberfest; - -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.tree.*; - -public class HelloWorld { - public static void main(String[] args) throws Exception { - - // Input stream + lexing - ANTLRInputStream antlrInputStream = new ANTLRInputStream("hello hacktoberfest"); - HelloWorldLexer helloWorldLexer = new HelloWorldLexer(antlrInputStream); - CommonTokenStream tokens = new CommonTokenStream(helloWorldLexer); - - // Parsing - HelloWorldParser helloWorldParser = new HelloWorldParser(tokens); - ParseTree tree = helloWorldParser.helloWorld(); - - ParseTreeWalker walker = new ParseTreeWalker(); - walker.walk(new HelloWalker(), tree); - } -} \ No newline at end of file diff --git a/AnyaBasic/AnyaBasic.jar b/AnyaBasic/AnyaBasic.jar deleted file mode 100644 index 787b3976a..000000000 Binary files a/AnyaBasic/AnyaBasic.jar and /dev/null differ diff --git a/AnyaBasic/anya-doc.md b/AnyaBasic/anya-doc.md deleted file mode 100644 index c70a1077b..000000000 --- a/AnyaBasic/anya-doc.md +++ /dev/null @@ -1,7 +0,0 @@ -## Execute - -`java -cp AnyaBasic.jar net.phatcode.rel.main.AnyaBasicMain hello.abs` - -## Language documentation - -* [AnyaBasic](https://github.com/relminator/AnyaBasic) - AnyaBASIC is a portable Interpreted Programming Language made in Java. It has a syntax similar to BASIC with a bit of C, Javascript and PASCAL thrown in. \ No newline at end of file diff --git a/AnyaBasic/hello-jeje.abs b/AnyaBasic/hello-jeje.abs deleted file mode 100644 index 2a8b5f60e..000000000 --- a/AnyaBasic/hello-jeje.abs +++ /dev/null @@ -1,3 +0,0 @@ -start - phr!nt("e0wh, w0rldszx! jejeje") -end \ No newline at end of file diff --git a/AnyaBasic/hello-tagalog.abs b/AnyaBasic/hello-tagalog.abs deleted file mode 100644 index 5dfd6c6d7..000000000 --- a/AnyaBasic/hello-tagalog.abs +++ /dev/null @@ -1,3 +0,0 @@ -start - ilimbag("Kamusta, mundo") # cringe # -end \ No newline at end of file diff --git a/Apex/HelloSalesforceWorld.cls b/Apex/HelloSalesforceWorld.cls deleted file mode 100644 index 507af757a..000000000 --- a/Apex/HelloSalesforceWorld.cls +++ /dev/null @@ -1,7 +0,0 @@ -public class HelloSalesforceWorld { - - public void sayHelloWorld(){ - System.debug('Hello Salesforce World!'); - } - -} diff --git a/Apex/HelloWorld.cls b/Apex/HelloWorld.cls deleted file mode 100644 index 1cd86b33a..000000000 --- a/Apex/HelloWorld.cls +++ /dev/null @@ -1,8 +0,0 @@ -#include -public class HelloWorld { - - public void sayHello(){ - return "Hello from Salesforce!"; - } - -} diff --git a/Apex/getInfo.apxc b/Apex/getInfo.apxc deleted file mode 100644 index 768143213..000000000 --- a/Apex/getInfo.apxc +++ /dev/null @@ -1,8 +0,0 @@ -public class GetInfo(){ -List acc = new List(); - -public static List getAccounts(){ -acc = [SELECT Id,Name from Account LIMIT 100]; -return acc; -} -} diff --git a/AppleScript/Hello from Sevenjidan.scpt b/AppleScript/Hello from Sevenjidan.scpt deleted file mode 100644 index 31be38e93..000000000 Binary files a/AppleScript/Hello from Sevenjidan.scpt and /dev/null differ diff --git a/AppleScript/README.md b/AppleScript/README.md deleted file mode 100644 index 40f4ebda7..000000000 --- a/AppleScript/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# halo-dunia -Wazzap Humans! - -I'm here because i love AppleScript and Java, -and I wanna make a Hello World from AppleScript :). -And I'll do it! -Nah...nevermind diff --git a/Arduino/2_Bit_Adder.ino b/Arduino/2_Bit_Adder.ino deleted file mode 100644 index f43158f75..000000000 --- a/Arduino/2_Bit_Adder.ino +++ /dev/null @@ -1,36 +0,0 @@ - -int a1,a2,b1,b2,s1,s2,c1,c2; -void setup() { - // This code Sets up the GPIO pins for input and output respectively. - pinMode(1, INPUT); - pinMode(2, INPUT); - pinMode(3, INPUT); - pinMode(4, INPUT); - pinMode(5, OUTPUT); - pinMode(6, OUTPUT); - pinMode(7, OUTPUT); - - -} - -void loop() { - // 2 Bits of A are given to GPIO Pin 1 and 2 - // 2 Bits of B are given to GPIO Pin 3 and 4 - a1 = digitalRead(1); - a2 = digitalRead(2); - b1 = digitalRead(3); - b2 = digitalRead(4); - - //The Calculation of the bits for adder is done in the following chunk of code - s1 = a1^b1; - c1 = a1&b1; - s2 = a2^b2^c1;; - c2 = ((a2^b2)&c1)|(a2&b2); - - //Output - // 3 output values are given to GPIO pins 5,6 and 7 - digitalWrite(5, s1); - digitalWrite(6, s2); - digitalWrite(7, c2); - -} diff --git a/Arduino/Arduino.ino b/Arduino/Arduino.ino deleted file mode 100644 index cb56255d7..000000000 --- a/Arduino/Arduino.ino +++ /dev/null @@ -1,64 +0,0 @@ -/* https://www.arduino.cc/en/Tutorial/HelloWorld - - LiquidCrystal Library - Hello World - - Demonstrates the use a 16x2 LCD display. The LiquidCrystal - library works with all LCD displays that are compatible with the - Hitachi HD44780 driver. There are many of them out there, and you - can usually tell them by the 16-pin interface. - - This sketch prints "Hello World!" to the LCD - and shows the time. - - The circuit: - * LCD RS pin to digital pin 12 - * LCD Enable pin to digital pin 11 - * LCD D4 pin to digital pin 5 - * LCD D5 pin to digital pin 4 - * LCD D6 pin to digital pin 3 - * LCD D7 pin to digital pin 2 - * LCD R/W pin to ground - * LCD VSS pin to ground - * LCD VCC pin to 5V - * 10K resistor: - * ends to +5V and ground - * wiper to LCD VO pin (pin 3) - - Library originally added 18 Apr 2008 - by David A. Mellis - library modified 5 Jul 2009 - by Limor Fried (http://www.ladyada.net) - example added 9 Jul 2009 - by Tom Igoe - modified 22 Nov 2010 - by Tom Igoe - modified 7 Nov 2016 - by Arturo Guadalupi - - This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld - -*/ - -// include the library code: -#include - -// initialize the library by associating any needed LCD interface pin -// with the arduino pin number it is connected to -const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; -LiquidCrystal lcd(rs, en, d4, d5, d6, d7); - -void setup() { - // set up the LCD's number of columns and rows: - lcd.begin(16, 2); - // Print a message to the LCD. - lcd.print("hello, world!"); -} - -void loop() { - // set the cursor to column 0, line 1 - // (note: line 1 is the second row, since counting begins with 0): - lcd.setCursor(0, 1); - // print the number of seconds since reset: - lcd.print(millis() / 1000); -} diff --git a/Arduino/Digispark.HelloWorld.ino b/Arduino/Digispark.HelloWorld.ino deleted file mode 100644 index ffeff8cda..000000000 --- a/Arduino/Digispark.HelloWorld.ino +++ /dev/null @@ -1,26 +0,0 @@ -#include"DigiKeyboard.h" -#include - -const char line1[] PROGMEM = "cmd\n"; -const char line2[] PROGMEM = "echo \"Hello World\"\n"; -char buffer[100]; -#define GetPsz(x) (strcpy_P(buffer,(char*)x)) - -void printText(char*txt) { - int l = strlen(txt); - for (int i = 0; i < l; i++) { - DigiKeyboard.print(txt[i]); - DigiKeyboard.update(); - } -} -void setup() { - //Opens command prompt and echos Hello World - DigiKeyboard.sendKeyStroke(21,MOD_GUI_LEFT); - DigiKeyboard.delay(200); - printText(GetPsz(line1)); - DigiKeyboard.delay(200); - printText(GetPsz(line2)); -} - -void loop() { -} diff --git a/Arduino/HelloI2CLCD.ino b/Arduino/HelloI2CLCD.ino deleted file mode 100644 index 696f0e0ac..000000000 --- a/Arduino/HelloI2CLCD.ino +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include - -// Set the LCD address to 0x27 for a 16 chars and 2 line display 0x3F -LiquidCrystal_I2C lcd(0x3F, 16, 2); - -//SCL Pin for nano v3 A4 -//SCL Pin for nano v3 A5 - -//SCL Pin for Uno R3 -//SCL Pin for nano R3 - - - - - -void setup() -{ - // initialize the LCD - lcd.begin(); - - // Turn on the blacklight and print a message. - lcd.backlight(); - lcd.print("Hi! Hello world"); -} - -void loop() -{ - - // scroll 13 positions (string length) to the left - // to move it offscreen left: - for (int positionCounter = 0; positionCounter < 13; positionCounter++) { - // scroll one position left: - lcd.scrollDisplayLeft(); - // wait a bit: - delay(150); - } - - // scroll 29 positions (string length + display length) to the right - // to move it offscreen right: - for (int positionCounter = 0; positionCounter < 29; positionCounter++) { - // scroll one position right: - lcd.scrollDisplayRight(); - // wait a bit: - delay(150); - } - - // scroll 16 positions (display length + string length) to the left - // to move it back to center: - for (int positionCounter = 0; positionCounter < 16; positionCounter++) { - // scroll one position left: - lcd.scrollDisplayLeft(); - // wait a bit: - delay(150); - } - - // delay at the end of the full loop: - delay(1000); - -} diff --git a/Arduino/Hello_World_Morse.ino b/Arduino/Hello_World_Morse.ino deleted file mode 100644 index 331e19558..000000000 --- a/Arduino/Hello_World_Morse.ino +++ /dev/null @@ -1,135 +0,0 @@ -void setup() { - Serial.begin(9600); - pinMode(13, OUTPUT); -} - -void loop() { - // blinks pin13 LED "Hello World" in morse, repeatedly - - //H - dot(); - character_gap(); - dot(); - character_gap(); - dot(); - character_gap(); - dot(); - - letter_gap(); - - //E - dot(); - - letter_gap(); - - //L - dot(); - character_gap(); - dash(); - character_gap(); - dot(); - character_gap(); - dot(); - - letter_gap(); - - //L - dot(); - character_gap(); - dash(); - character_gap(); - dot(); - character_gap(); - dot(); - - letter_gap(); - - //O - dash(); - character_gap(); - dash(); - character_gap(); - dash(); - - word_gap(); - - //W - dot(); - character_gap(); - dash(); - character_gap(); - dash(); - - letter_gap(); - - //O - dash(); - character_gap(); - dash(); - character_gap(); - dash(); - - letter_gap(); - - //R - dot(); - character_gap(); - dash(); - character_gap(); - dot(); - - letter_gap(); - - //L - dot(); - character_gap(); - dash(); - character_gap(); - dot(); - character_gap(); - dot(); - - letter_gap(); - - //D - dash(); - character_gap(); - dot(); - character_gap(); - dot(); - - word_gap(); -} - -//dot duration: 500ms -//dash duration: 1500ms -//gap duration within a character: 500ms -//gap between letters: 1500ms -//gap between words: 3500ms - -void dot() { - digitalWrite(13, HIGH); - delay(500); - digitalWrite(13, LOW); -} - -void dash() { - digitalWrite(13, HIGH); - delay(1500); - digitalWrite(13, LOW); -} - -void character_gap() { - delay(500); -} - -void letter_gap() { - delay(1500); -} - -void word_gap() { - delay(3500); -} - - - diff --git a/Arduino/LCD_Base_bb_Schem.png b/Arduino/LCD_Base_bb_Schem.png deleted file mode 100644 index 90cc8c3e4..000000000 Binary files a/Arduino/LCD_Base_bb_Schem.png and /dev/null differ diff --git a/Arduino/RFID_SimpleSample_withServo.ino b/Arduino/RFID_SimpleSample_withServo.ino deleted file mode 100644 index 68c88b3ca..000000000 --- a/Arduino/RFID_SimpleSample_withServo.ino +++ /dev/null @@ -1,129 +0,0 @@ -/* - * RFID Sample - Simple control using RFID - * RIF module: Mifare RFID Mfrc522 - * Autor : Pedro R. Zamora -*/ - -/* RFID Pins (UNO): -3.3 - Pino 3.3V -RST - Pino 9 -GND - Pino GND -IRQ - Não Conectado -MISO - Pino 12 -MOSI - Pino 11 -SCK - Pino 13 -SDA - Pino 10 - -Pins (software): -#define SS_PIN 10 -#define RST_PIN 9 -*/ - -/* RFID Pins (MEGA): -3.3 - Pin 3.3V -RST - Pin 5 -GND - Pin GND -IRQ - Not Connected -MISO - Pin 50 -MOSI - Pin 51 -SCK - Pin 52 -SDA - Pin 53 - -Pins (software): -#define SS_PIN 53 -#define RST_PIN 5 - -*/ - -#include -#include -#include - -Servo servo1; - -#define SS_PIN 53 -#define RST_PIN 5 - -MFRC522 mfrc522(SS_PIN, RST_PIN); - - -int LED_Cleared = 5; -int LED_Denied = 6; - -char st[20]; - -void setup() -{ - pinMode(LED_Cleared, OUTPUT); - pinMode(LED_Denied, OUTPUT); - - servo1.attach(3); - servo1.write(90); - - Serial.begin(9600); - - SPI.begin(); - mfrc522.PCD_Init(); - - Serial.println("Bring your Tag till the Sensor..."); - Serial.println(); -} - -void loop() -{ - - if ( ! mfrc522.PICC_IsNewCardPresent()) - { - return; - } - - - if ( ! mfrc522.PICC_ReadCardSerial()) - { - return; - } - - // Shows ID on serial. Use it to know your ID, then correct ir later in the code. - Serial.print("Tag ID :"); - String content= ""; - byte character; - for (byte i = 0; i < mfrc522.uid.size; i++) - { - Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); - Serial.print(mfrc522.uid.uidByte[i], HEX); - content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ")); - content.concat(String(mfrc522.uid.uidByte[i], HEX)); - } - Serial.println(); - Serial.print("Message : "); - content.toUpperCase(); - - // Test reading of first tag. Change the ID here. - if (content.substring(1) == "9D A0 0F BB") - { - // Move the servo to enable access, then turn on green led. - servo1.write(-90); - digitalWrite(LED_Cleared, HIGH); - Serial.println("Tag1 - Access Cleared !"); - Serial.println(); - delay(3000); - servo1.write(90); - digitalWrite(LED_Cleared, LOW); - } - - // Test reading of another tag. Change the ID here, also. - if (content.substring(1) == "86 14 57 8E") - { - Serial.println("Tag 2 - Access Denied !!"); - Serial.println(); - // Blinks red Led - for (int i= 1; i<5 ; i++) - { - digitalWrite(LED_Denied, HIGH); - delay(200); - digitalWrite(LED_Denied, LOW); - delay(200); - } - } - delay(1000); -} diff --git a/Arduino/WaterPlantReminder.ino b/Arduino/WaterPlantReminder.ino deleted file mode 100644 index aa99aa862..000000000 --- a/Arduino/WaterPlantReminder.ino +++ /dev/null @@ -1,139 +0,0 @@ -#include -#include -#include - -LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address -dht DHT; -#define DHT11_PIN 7 -int value; //Store watersensor data - -void setup() -{ - //Begin serial communication - Serial.begin(9600); - pinMode(DHT11_PIN, INPUT); - lcd.begin(16,2); - //Analog 0-1023 -} - -void loop() -{ - waterManager(A0); - //cicalinoManager(13); - humidityManager(DHT11_PIN); - screenManager(); - delay(2000); -} - - -void waterManager(int port){ - value = analogRead(port); //Read data from analog pin and store it to value variable - Serial.print(value); - if (value<=480){ - Serial.println("Water level: 0mm - Empty!"); - } - else if (value>480 && value<=530){ - Serial.println("Water level: 0mm to 5mm"); - } - else if (value>530 && value<=615){ - Serial.println("Water level: 5mm to 10mm"); - } - else if (value>615 && value<=660){ - Serial.println("Water level: 10mm to 15mm"); - } - else if (value>660 && value<=680){ - Serial.println("Water level: 15mm to 20mm"); - } - else if (value>680 && value<=690){ - Serial.println("Water level: 20mm to 25mm"); - } - else if (value>690 && value<=700){ - Serial.println("Water level: 25mm to 30mm"); - } - else if (value>700 && value<=705){ - Serial.println("Water level: 30mm to 35mm"); - } - else if (value>705){ - Serial.println("Water level: 35mm to 40mm"); - } -} - -void humidityManager(int port){ - int chk = DHT.read11(port); - int valTemp = DHT.temperature; - int valHum = DHT.humidity; - Serial.print("Temperatura = "); - Serial.println(DHT.temperature); - Serial.print("Umidità = "); - Serial.println(DHT.humidity); -} - -bool change = false; -void screenManager(){ - int chk = DHT.read11(7); - int valTemp = DHT.temperature; - int valHum = DHT.humidity; - - lcd.setCursor(0,0); //Start at character 4 on line 0 - - - String allTemp = ""; - if(change == false){ - lcd.clear(); - String allTemp = "Air: "; - allTemp += valTemp; - lcd.print(allTemp); - change = true; - } - else{ - value = analogRead(A0); //Read data from analog pin and store it to value variable - - if (value<=480){ - lcd.print("Water: 0mm-Empty!"); - } - else if (value>480 && value<=530){ - lcd.print("Water: 0mm-5mm"); - } - else if (value>530 && value<=615){ - lcd.print("Water: 5mm-10mm"); - } - else if (value>615 && value<=660){ - lcd.print("Water: 10mm-15mm"); - } - else if (value>660 && value<=680){ - lcd.print("Water: 15mm-20mm"); - } - else if (value>680 && value<=690){ - lcd.print("Water: 20mm-25mm"); - } - else if (value>690 && value<=700){ - lcd.print("Water: 25mm-30mm"); - } - else if (value>700 && value<=705){ - lcd.print("Water: 30mm-35mm"); - } - else if (value>705){ - lcd.print("Water: 35mm-40mm"); - } - - change = false; - } - - //change != change; - String allHum = "Humidity: "; - allHum += valHum; - - if(change == false){ - lcd.print(allTemp); - } - //delay(1000); - lcd.setCursor(0,1); - lcd.print(allHum); -} - - - - - - - diff --git a/Arduino/hcsr04.ino b/Arduino/hcsr04.ino deleted file mode 100644 index be8fb5ca1..000000000 --- a/Arduino/hcsr04.ino +++ /dev/null @@ -1,38 +0,0 @@ -const int trigger = 8; -const int eco = 7; -int led = 13; - -long duracao; -int dist; - -void setup() { - pinMode(trigger, OUTPUT); - pinMode(eco, INPUT); - Serial.begin(9600); - pinMode(led, OUTPUT); -} - -void loop() { - digitalWrite(trigger, LOW); - delayMicroseconds(5); - - digitalWrite(trigger, HIGH); - delayMicroseconds(10); - digitalWrite(trigger, LOW); - - duracao = pulseIn(eco, HIGH); - - dist= duracao*0.034/2; - - Serial.print("Distancia em cm: "); - Serial.println(dist); - - if (dist > 20){ - digitalWrite(led, HIGH); - } - else{ - digitalWrite(led, LOW); - } - - delay(100); -} diff --git a/Arduino/hello_arduino.ino b/Arduino/hello_arduino.ino deleted file mode 100644 index 1fdecb355..000000000 --- a/Arduino/hello_arduino.ino +++ /dev/null @@ -1,10 +0,0 @@ -void setup(){ - -Serial.begin(9600); - -} -void loop(){ - -Serial.println("hello world with Arduino"); - -} diff --git a/Arduino/hello_ujj.in b/Arduino/hello_ujj.in deleted file mode 100644 index 07a18103f..000000000 --- a/Arduino/hello_ujj.in +++ /dev/null @@ -1,17 +0,0 @@ -const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; -LiquidCrystal lcd(rs, en, d4, d5, d6, d7); - -void setup() { - // set up the LCD's number of columns and rows: - lcd.begin(16, 2); - // Print a message to the LCD. - lcd.print("hello, world!"); -} - -void loop() { - // set the cursor to column 0, line 1 - // (note: line 1 is the second row, since counting begins with 0): - lcd.setCursor(0, 1); - // print the number of seconds since reset: - lcd.print(millis() / 1000); -} diff --git a/Arduino/helloworld.ino b/Arduino/helloworld.ino deleted file mode 100644 index 998cf10f9..000000000 --- a/Arduino/helloworld.ino +++ /dev/null @@ -1,7 +0,0 @@ - -void setup(){ -Serial.begin(115200); -} -void loop(){ -Serial.println("hello world"); -} diff --git a/Arduino/hellowworld.ino b/Arduino/hellowworld.ino deleted file mode 100644 index ca973ac7a..000000000 --- a/Arduino/hellowworld.ino +++ /dev/null @@ -1,6 +0,0 @@ -void setup(){ -Serial.begin(1152); -} -void loop(){ -Serial.println("hello"); -} diff --git a/Arduino/ledCube3x3x3 b/Arduino/ledCube3x3x3 deleted file mode 100644 index 65684e3f6..000000000 --- a/Arduino/ledCube3x3x3 +++ /dev/null @@ -1,94 +0,0 @@ -/* 3x3x3 LEDCUBE - * Work in progress by Connor L. (Ibaeni) - * - * xy-plane - * x = vertical - * y = vertical - * Top View (Positions): Pin Allocation - * | 0 1 2 | 0 1 2 - * --|------ --|---------- - * 0| o o o 0| - * 1| o o o 1| - * 2| o o o 2| - * - * Z-Axis - * Layers Pin Allocation - * ------ -------------- - * 0| o o o 0| A0 - * 1| o o o 1| A1 - * 2| o o o 2| A2 - * - */ -int analogPins[] = {A0, A1, A2, A1}; -int d = 0; - -void setup() -{ - for (int i=5;i<14;i++) - { - pinMode(i,OUTPUT); // PINS0-10 are set as output - } - pinMode(A0,OUTPUT); //PIN A0 set as output - pinMode(A1,OUTPUT); // PIN A1 set as output - pinMode(A2,OUTPUT); // PIN A2 set as output - -// digitalWrite(A0,HIGH); //pull up the A0 pin - // digitalWrite(A1,HIGH); // pull up the A1 pin -// digitalWrite(A2,HIGH); // pull up the A2 pin -} - - -/*Functions - * allon() - * alloff() - * allblink() - * snake() - */ - -void allon() { - for (int i = 0; i < 3; i++) { - digitalWrite(analogPins[i], HIGH); - } - for (int j = 0; j < 14; j++) { - digitalWrite(j, HIGH); - } -} - -void alloff() { - for (int i = 0; i < 3; i++) { - digitalWrite(analogPins[i], LOW); - } - for (int j = 0; j < 14; j++) { - digitalWrite(j, LOW); - } -} - -void allblink(int = d) { - alloff(); - delay(d); - allon(); - delay(d); -} - -void snake(int = d) { - for (int j=0; j<4;j++) { - digitalWrite(analogPins[j], HIGH); - delay(d); - for (int i=5; i<14;i++) { - digitalWrite(i, HIGH); - delay(d); - } - for (int i=13; i>4;i--) { - digitalWrite(i, LOW); - delay(d); - } - digitalWrite(analogPins[j], LOW); - } - delay(d); -} - - - -void loop() { - snake(100); -} diff --git a/Arduino/line-following-robot.ino b/Arduino/line-following-robot.ino deleted file mode 100644 index ce8df2677..000000000 --- a/Arduino/line-following-robot.ino +++ /dev/null @@ -1,106 +0,0 @@ -// Line-Following Algorithm -// By Connor L. (Ibaeni) - -//Pins 0,1 Used for Bluetooth -//Pins 2,3 Used for Ultrasonic Rangefinder -int sensleft = A0; -int sensright = A1; - -// Motor 1 Vars (9v Battery Side) -// Forward (1:2) == (LOW, HIGH)) -// a1 = 8; a2 = 9; velPin1 = 7; -int motor1pins[] = {8, 9, 7}; -int vel1; - -// Motor 2 Vars (USB Side) -// Forward (1:2) == (LOW, HIGH) -// b1 = 12; b2 = 10; velPin2 = 11; -int motor2pins[] = {12, 10, 11}; -int vel2; - -void setup() { - Serial.begin(9600); - - pinMode(sensleft, OUTPUT); - pinMode(sensright, OUTPUT); - - for (int i = 0; i < 3; i++) { - pinMode(motor1pins[i], OUTPUT); - pinMode(motor2pins[i], OUTPUT); - } - -} - -void loop() { - delay(50); - unsigned int left = analogRead(sensleft); - unsigned int right = analogRead(sensright); - Serial.println(String(left)); - Serial.println(String(right)); - - if (left == HIGH and right == HIGH) { - forwards(200); - } - else if (left == HIGH and right == LOW) { - turn_left(100); - } - else if (left == LOW and right == HIGH) { - turn_right(100); - } - else { - motors_stop(); - } -} - -// Motor functions -void backwards(int vel) -{ - digitalWrite(motor1pins[0], HIGH); - digitalWrite(motor1pins[1], LOW); - analogWrite(motor1pins[2], vel); - - digitalWrite(motor2pins[0], HIGH); - digitalWrite(motor2pins[1], LOW); - analogWrite(motor2pins[2], vel); -} - -void forwards(int vel) -{ - digitalWrite(motor1pins[0], LOW); - digitalWrite(motor1pins[1], HIGH); - analogWrite(motor1pins[2], vel); - - digitalWrite(motor2pins[0], LOW); - digitalWrite(motor2pins[1], HIGH); - analogWrite(motor2pins[2], vel); -} - -void turn_left(int vel) { - digitalWrite(motor1pins[0], HIGH); - digitalWrite(motor1pins[1], LOW); - analogWrite(motor1pins[2], vel); - - digitalWrite(motor2pins[0], LOW); - digitalWrite(motor2pins[1], HIGH); - analogWrite(motor2pins[2], vel); -} - -void turn_right(int vel) { - digitalWrite(motor1pins[0], LOW); - digitalWrite(motor1pins[1], HIGH); - analogWrite(motor1pins[2], vel); - - digitalWrite(motor2pins[0], HIGH); - digitalWrite(motor2pins[1], LOW); - analogWrite(motor2pins[2], vel); -} - -void motors_stop(){ - digitalWrite(motor1pins[0], LOW); - digitalWrite(motor1pins[1], LOW); - analogWrite(motor1pins[2], 0); - - digitalWrite(motor2pins[0], LOW); - digitalWrite(motor2pins[1], LOW); - analogWrite(motor2pins[2], 0); -} diff --git a/Arduino/obstacle-avoidance-robot.ino b/Arduino/obstacle-avoidance-robot.ino deleted file mode 100644 index 2d2d646ce..000000000 --- a/Arduino/obstacle-avoidance-robot.ino +++ /dev/null @@ -1,123 +0,0 @@ -// Import Library for Ultrasonic Rangefinder and define variables -// By Connor L. (Ibaeni) -#include -#include -#define PING_PIN 2 -#define ECHO_PIN 3 -#define MAX_DISTANCE 200 - -Servo servo; -int pos = 0; - -NewPing sonar(PING_PIN, ECHO_PIN, MAX_DISTANCE); - -// Motor 1 Vars (9v Battery Side) -// Forward (1:2) == (LOW, HIGH)) -// a1 = 8; a2 = 9; velPin1 = 7; -int motor1pins[] = {8, 9, 7}; -int vel1; - -// Motor 2 Vars (USB Side) -// Forward (1:2) == (LOW, HIGH) -// b1 = 12; b2 = 10; velPin2 = 11; -int motor2pins[] = {12, 10, 11}; -int vel2; - -void setup() -{ - Serial.begin(9600); - - servo.attach(6); - - for (int i = 0; i < 3; i++) { - pinMode(motor1pins[i], OUTPUT); - pinMode(motor2pins[i], OUTPUT); - } -} - -// Motor functions -void backwards(int vel) -{ - digitalWrite(motor1pins[0], HIGH); - digitalWrite(motor1pins[1], LOW); - analogWrite(motor1pins[2], vel); - - digitalWrite(motor2pins[0], HIGH); - digitalWrite(motor2pins[1], LOW); - analogWrite(motor2pins[2], vel); -} - -void forwards(int vel) -{ - digitalWrite(motor1pins[0], LOW); - digitalWrite(motor1pins[1], HIGH); - analogWrite(motor1pins[2], vel); - - digitalWrite(motor2pins[0], LOW); - digitalWrite(motor2pins[1], HIGH); - analogWrite(motor2pins[2], vel); -} - -void left(int vel) { - digitalWrite(motor1pins[0], HIGH); - digitalWrite(motor1pins[1], LOW); - analogWrite(motor1pins[2], vel); - - digitalWrite(motor2pins[0], LOW); - digitalWrite(motor2pins[1], HIGH); - analogWrite(motor2pins[2], vel); -} - -void right(int vel) { - digitalWrite(motor1pins[0], LOW); - digitalWrite(motor1pins[1], HIGH); - analogWrite(motor1pins[2], vel); - - digitalWrite(motor2pins[0], HIGH); - digitalWrite(motor2pins[1], LOW); - analogWrite(motor2pins[2], vel); -} - -void stop(){ - digitalWrite(motor1pins[0], LOW); - digitalWrite(motor1pins[1], LOW); - analogWrite(motor1pins[2], 0); - - digitalWrite(motor2pins[0], LOW); - digitalWrite(motor2pins[1], LOW); - analogWrite(motor2pins[2], 0); -} - -void loop() -{ - delay(50); - unsigned int distance = sonar.ping_cm(); - Serial.println("Distance: " + String(distance) + "cm\n"); - - if (distance >= 30 or distance == 0) { - forwards(225); - } - else if (distance > 15 and distance < 30) { - backwards(200); - delay(500); - left(180); - delay(500); - } - else { - stop(); - backwards(100); - delay(250); - for (pos = 0; pos<=180; pos += 1) { - servo.write(pos); - delay(15); - } - for (pos = 180; pos >= 0; pos -= 1) { - servo.write(pos); - delay(15); - } - backwards(200); - delay(1000); - left(200); - delay(750); - } -} diff --git a/Arduino/pushButton.ino b/Arduino/pushButton.ino deleted file mode 100644 index dc67eeba6..000000000 --- a/Arduino/pushButton.ino +++ /dev/null @@ -1,25 +0,0 @@ -const int pushButton = 7; //PINO DIGITAL UTILIZADO PELO PUSH BUTTON -const int led = 2; //PINO DIGITAL UTILIZADO PELO LED - -int leitura = 0; //VARIÁVEL QUE ARMAZENA O VALOR LIDO NA PORTA DIGITAL -int statusLed = 0; //VARIÁVEL QUE CONTROLA O ESTADO DO LED (ACESO / APAGADO) - -void setup() { -pinMode(pushButton, INPUT_PULLUP); //DEFINE A PORTA COMO ENTRADA E ATIVA O RESISTOR INTERNO DE PULL UP -pinMode(led, OUTPUT); //DEFINE A PORTA COMO SAÍDA -} -void loop(){ - leitura = digitalRead(pushButton); //LÊ O VALOR NA PORTA DIGITAL E ARMAZENA NA VARIÁVEL - - if((leitura == 0) && (statusLed == 0)){ //SE O VALOR LIDO FOR IGUAL A 0 "E" O ESTADO DO LED FOR IGUAL A 0, FAZ - digitalWrite(led, HIGH); //LED ACESO - statusLed = 1; //VARIÁVEL RECEBE VALOR 1 (LIGADO) - delay(200); //INTERVALO DE 200 MILISSEGUNDOS - }else{ //SENÃO, FAZ - if((leitura == 0) && (statusLed == 1)){ //SE O VALOR LIDO FOR IGUAL A 0 "E" O ESTADO DO LED FOR IGUAL A 1, FAZ - digitalWrite(led, LOW); //LED APAGADO - statusLed = 0; //VARIÁVEL RECEBE VALOR 0 (DESLIGADO) - delay(200); //INTERVALO DE 200 MILISSEGUNDOS - } - } -} diff --git a/Arduino/sashHelloWorld.ino b/Arduino/sashHelloWorld.ino deleted file mode 100644 index 83703159e..000000000 --- a/Arduino/sashHelloWorld.ino +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ________ ________ ________ ___ ___ ___ ___ ___ ___ ________ - * |\ ____\|\ __ \|\ ____\|\ \|\ \|\ \|\ \|\ \|\ \|\ ____\ - * \ \ \___|\ \ \|\ \ \ \___|\ \ \\\ \ \ \\\ \ \ \\\ \ \ \___| - * \ \_____ \ \ __ \ \_____ \ \ __ \ \ \\\ \ \ \\\ \ \ \____ - * \|____|\ \ \ \ \ \|____|\ \ \ \ \ \ \ \\\ \ \ \\\ \ \ ___ \ - * ____\_\ \ \__\ \__\____\_\ \ \__\ \__\ \_______\ \_______\ \_______\ - * |\_________\|__|\|__|\_________\|__|\|__|\|_______|\|_______|\|_______| - * \|_________| \|_________| - * - * Program name: Hello World!! - * Author: Sashwat K - * Created on 11 Oct 2018 - * Revision: 1 - * Device: Arduino UNO - */ - - -#include // adafruit display driver header file -#include // adafruit display driver header file -#include // adafruit display driver header file -#include // adafruit display model header file - -#define OLED_RESET 4 //OLED -Adafruit_SSD1306 display(OLED_RESET); //OLED - -void setup() { - Serial.begin(9600); - display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //OLED - display.display(); //initialize display - delay(2000); - display.clearDisplay(); //clear display -} - -void loop() { - display.clearDisplay(); - display.display(); - display.setTextSize(1); // setting text size - display.setTextColor(WHITE); // setting text color - display.setCursor(0,0); // setting position for OLED display - display.println("Hello World!!!"); //Hello world message -} diff --git a/Argh/Hello World.txt b/Argh/Hello World.txt deleted file mode 100644 index eda2873ca..000000000 --- a/Argh/Hello World.txt +++ /dev/null @@ -1,3 +0,0 @@ -j e l o l ! : -lpPpPpPpPpPpPpPpq - H l o W r d D diff --git a/ArnoldC/hello.arnoldc b/ArnoldC/hello.arnoldc deleted file mode 100644 index e3eb66419..000000000 --- a/ArnoldC/hello.arnoldc +++ /dev/null @@ -1,5 +0,0 @@ -IT'S SHOWTIME -TALK TO THE HAND "hello world" -TALK TO THE HAND "Hasta la vista baby" -TALK TO THE HAND "another hello world" -YOU HAVE BEEN TERMINATED diff --git a/ArnoldC/schbebsi.arnoldc b/ArnoldC/schbebsi.arnoldc deleted file mode 100644 index 062bdb8a1..000000000 --- a/ArnoldC/schbebsi.arnoldc +++ /dev/null @@ -1,3 +0,0 @@ -IT'S SHOWTIME -TALK TO THE HAND "hello schbebsi" -YOU HAVE BEEN TERMINATED diff --git a/ArnoldC/sum-1-to-n.arnoldc b/ArnoldC/sum-1-to-n.arnoldc deleted file mode 100644 index d4030af57..000000000 --- a/ArnoldC/sum-1-to-n.arnoldc +++ /dev/null @@ -1,14 +0,0 @@ -IT'S SHOWTIME -HEY CHRISTMAS TREE n -YOU SET US UP 0 -GET YOUR ASS TO MARS n -DO IT NOW -I WANT TO ASK YOU A BUNCH OF QUESTIONS AND I WANT TO HAVE THEM ANSWERED IMMEDIATELY -GET TO THE CHOPPER n -HERE IS MY INVITATION n -GET UP 1 -YOU'RE FIRED n -HE HAD TO SPLIT 2 -ENOUGH TALK -TALK TO THE HAND n -YOU HAVE BEEN TERMINATED diff --git a/AsciiDoc/helloworld.adoc b/AsciiDoc/helloworld.adoc deleted file mode 100644 index 5de30c175..000000000 --- a/AsciiDoc/helloworld.adoc +++ /dev/null @@ -1,3 +0,0 @@ -= Hello my dear world - -Bonjour le monde en *AsciiDoc*. diff --git a/Assembly/README.md b/Assembly/README.md deleted file mode 100644 index 2f3099c5c..000000000 --- a/Assembly/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# 8085_clock_timer -Files and Description : -1) Real-Time Clock -2) Timer - -Real-Time Clock -1. First give input from keyboard in the adress field. NOTE that the first half of address feild represents the HOURS and second half represents MINUTES. - -2. Press Next and now give SECONDS input from the keyboard in address feild . - -3. Press Next and the clock will run and displayed in the address field. - -4. To perform other operation press RESET and start from step 1. - -Extra Features -1. Providing the initial time of the clock. - -2. Displaying 24-Hour time. - -Timer -1. First give input from keyboard in the adress field. NOTE that the first half of address feild represents the HOURS and second half represents MINUTES. - -2. Press Next and now give SECONDS input from the keyboard in address feild . - -3. Press Next and the Timer will run and displayed in the address field. - -4. To pause the Timer press RST7.5 interrupt in keyboard and to continue the timer press any two address keys on keyboard. - -5. To perform other operation press RESET and start from step 1. - -Extra Features -1. providing input time for timer - -2. Timer will pause and resume accordingly when an interrupt is given. - -3. Timer will stop once the countdown is completed. - diff --git a/Assembly/clock.asm b/Assembly/clock.asm deleted file mode 100644 index 1c3cb8136..000000000 --- a/Assembly/clock.asm +++ /dev/null @@ -1,77 +0,0 @@ -cpu "8085.tbl" ; CPU Table monitor command -hof "int8" ; HEX Format - -org 9000h ; Puts location pointer at prompt at 9000 - -;Pneumonics -GTHEX: EQU 030EH ; This routinue collects the hex digits entered from keyboard -RDKBD: EQU 03BAH ; Reads keyboard. -HXDSP: EQU 034FEH ; This routinue expands hex digits for display and stores in the specified buffer -OUTPUT: EQU 0389H ; Outputs characters to display -CLEAR: EQU 02BEH ; Clears the display -UPDDT: EQU 044CH ; Update data field display using the current data at location FFF9H -UPDAD: EQU 0440H ; Update the address field display using the current address stored at location FFF7H and FFF8H -CURAD: EQU 8FEFH ; Displays the number stored in the address field of UPDAD -CURDT: EQU 8FF1H ; Stores 8bit data and shows in the Data display. - -BEGIN: LXI H,0000H ; Begin funtion : loads 0000H into HL register - -MIN: ; Min Function ( Minutes function / Shows both Minutes and Hours hand ) -SHLD CURAD ; Store data in HL at address of CURAD and display it.( minimum clock time is 00hr 00 min) -MVI A,00H ; move 00H to register A ( Initializing A to be 00 ) - -SEC: ; SEC Function ( Seconds Function ) -STA CURDT ; Show content of accumulator on Data Display ( Data Display represents Seconds Hand) -CALL UPDAD ; Keep updating Address field all these time - -CALL UPDDT ; Show the data display -CALL DELAY ; Call function DELAY - -LDA CURDT ; Load the value in address data display to accumulator -ADI 01H ; Increment the value of data display by 1( next second increment ) -DAA ; Binary decimal adder by 2's complement method -CPI 60H ; Compare the value in accumulator with 60H -JNZ SEC ; If the value in accumulator is not 60 then jump to SEC function - -;If the value of seconds hand is 60 it must be put to 0 and update Minutes hand. - -LHLD CURAD ; Load the value in Address Display to HL register - -MOV A,L ; Move the value in register L to Accumulator -ADI 01H ; Add 01H in accumulator -DAA ; Binary Addition -MOV L,A ; Move the value in Register L to accumulator - -CPI 60H ; Compare the value in accumulator to 60H -JNZ MIN ; If the value in accumulator is not 60 them jump to MIN function - -;If the value of seconds hand is 60 it must be put to 0 and update Hours hand. - -MVI L,00H ; Move value 00H into L register -MOV A,H ; Move value of H into Accumulator -ADI 01H ; Add 01H in accumulator -DAA ; Binary Addition -MOV H,A ; Move the value in accumulator to Regsiter H - -CPI 24H ; Compare the value in accumulator to 24 ( max hour hand is 24 ) -JNZ MIN ; If the value in accumulator is not 24 jump to MIN function -JMP BEGIN ; Unconditional jump to BEGIN function - -; If hours hand exceeds 23 we need to change it to 0 - -DELAY: ; Delay function -MVI C,03H ; Move the value 03H to register C - -OUTLOOP: ; OUTLOOP function -LXI D,9FFFH ; Loads the value 9FFFH into DE register - -INLOOP: ; INLOOP function -DCX D ; decrement the content of memory location DE by 1 -MOV A,D ; Move value in register D to Accumulator -ORA E ; OR with value in Register E -JNZ INLOOP ; If the flag isn't 1 then go to INLOOP -DCR C ; Contents of memory of C is decremented by 1 -JNZ OUTLOOP ; As long as the memory of C is not 00H jump to OUTLOOP -RET ; Return - -; Delay of 1 second is brought by function DELAY by calling the required number of times. the frequency is 6.144MHz. \ No newline at end of file diff --git a/Assembly/cube.asm b/Assembly/cube.asm deleted file mode 100644 index 81486b7ed..000000000 --- a/Assembly/cube.asm +++ /dev/null @@ -1,23 +0,0 @@ -#Write an assembly program to print the cube of a given number -.data -n:.asciiz "Enter the number: " -c:.asciiz "The cube is: " -.text -.globl main -main: -la $a0,n -li $v0,4 -syscall -li $v0,5 -syscall -move $t0,$v0 -mul $t1,$t0,$t0 -mul $t2,$t0,$t1 -la $a0,c -li $v0,4 -syscall -la $a0,($t2) -li $v0,1 -syscall -li $v0,10 -syscall diff --git a/Assembly/factorial.asm b/Assembly/factorial.asm deleted file mode 100644 index 2f31673b8..000000000 --- a/Assembly/factorial.asm +++ /dev/null @@ -1,21 +0,0 @@ -main: - li $v0 5 - syscall - move $t0 $v0 - - move $t1 $t0 - addu $t2 $zero 1 - - loop: - beq $t0 $t2 exit - mul $t1 $t1 $t2 - add $t2 $t2 1 - b loop - - exit: - move $a0 $t1 - li $v0 1 - syscall - - li $v0 10 - syscall diff --git a/Assembly/hello.asm b/Assembly/hello.asm deleted file mode 100644 index f64e6afd7..000000000 --- a/Assembly/hello.asm +++ /dev/null @@ -1,16 +0,0 @@ -; hello-DOS.asm - single-segment, 16-bit "hello world" program -; -; assemble with "nasm -f bin -o hi.com hello-DOS.asm" - - org 0x100 ; .com files always start 256 bytes into the segment - - ; int 21h is going to want... - - mov dx, msg ; the address of or message in dx - mov ah, 9 ; ah=9 - "print string" sub-function - int 0x21 ; call dos services - - mov ah, 0x4c ; "terminate program" sub-function - int 0x21 ; call dos services - - msg db 'Hello, World!', 0x0d, 0x0a, '$' ; $-terminated message diff --git a/Assembly/helloworld.arm b/Assembly/helloworld.arm deleted file mode 100644 index a6799dfcb..000000000 --- a/Assembly/helloworld.arm +++ /dev/null @@ -1,12 +0,0 @@ -.global _start -_start: - MOV R7, #4 - MOV R0, #1 - MOV R2, #12 - LDR R1, =string - SWI 0 - MOV R7, #1 - SWI 0 - .data -string: - .ascii "Hello World" diff --git a/Assembly/helloworld.asm b/Assembly/helloworld.asm deleted file mode 100644 index e82d800b3..000000000 --- a/Assembly/helloworld.asm +++ /dev/null @@ -1,11 +0,0 @@ - global _main - extern _printf - - section .text -_main: - push message - call _printf - add esp, 4 - ret -message: - db 'Hello, World', 10, 0 diff --git a/Assembly/helloworld_68k.X68 b/Assembly/helloworld_68k.X68 deleted file mode 100644 index 93a530c79..000000000 --- a/Assembly/helloworld_68k.X68 +++ /dev/null @@ -1,20 +0,0 @@ -*------------------------------------------------------------------- -* Title : helloworld -* Written by : linuxgemini -* Date : 2018 - 10 - 14 -* Description: Written and tested with EASy68K. -* The PC value should be 00002018 after execution. -*------------------------------------------------------------------- - - ORG $2008 ; set current address to $2008 - -START: ; first instruction of program - - lea blastfromthepast, a1 ; load variable into address register A1 - move.b #14, d0 ; move byte[14] to data register D0 - trap #15 ; call hardware interrupt - SIMHALT ; halt simulator - -blastfromthepast DC.B 'Hello, world',0 ; define constant 'Hello, world' with a null terminator at the end - - END START ; last line of source diff --git a/Assembly/helloworld_arm.S b/Assembly/helloworld_arm.S deleted file mode 100644 index 7f063f787..000000000 --- a/Assembly/helloworld_arm.S +++ /dev/null @@ -1,17 +0,0 @@ -msg: - .ascii "Hello, World!\n" -len = . - msg - -.text - .globl main -main: - mov r2, #len - ldr r1, msgaddr - mov r0, #1 - mov r7, #4 - swi #0 - - .align 4 -msgaddr: - .long msg - diff --git a/Assembly/helloworld_fasm.asm b/Assembly/helloworld_fasm.asm deleted file mode 100644 index dfe5cab11..000000000 --- a/Assembly/helloworld_fasm.asm +++ /dev/null @@ -1,11 +0,0 @@ -use16 ;Generate 16bit code -org 100h ;Program starts with byte 100h - - mov dx,hello ;the string adress is in DX - mov ah,9 ;Number of function in DOS interrupt - int 21h ;Calling DOS interrupt - - mov ax,4C00h ;\ - int 21h ;/ Closing the app -;------------------------------------------------------- -hello db 'Hello, world!$' \ No newline at end of file diff --git a/Assembly/helloworld_nasm.asm b/Assembly/helloworld_nasm.asm deleted file mode 100644 index 222c6bc1d..000000000 --- a/Assembly/helloworld_nasm.asm +++ /dev/null @@ -1,26 +0,0 @@ -bits 64 ; 64-bit program -default rel ; Use relative addresses - -global _start ; Allow the "_start" function to be globally accessable - -section .data ; Declare variables - - ; Create a cstring with the name "hello" - ; "db" means that each element is a byte - ; "10" is the ascii code for newline - hello: db "Hello, world!", 10 - -section .text ; Code goes here - - _start: ; Label called "_start". In our case it's acting as a function - - mov rax, 1 ; Write system call ID - mov rdi, 1 ; Use stdout - mov rsi, hello ; Message string - mov rdx, 14 ; Number of bytes - syscall ; Execute system call - - mov rax, 60 ; Exit system call ID - mov rdi, 0 ; Return 0 - syscall ; Exit program - diff --git a/Assembly/texteditor.asm b/Assembly/texteditor.asm deleted file mode 100644 index ed7592c9a..000000000 --- a/Assembly/texteditor.asm +++ /dev/null @@ -1,542 +0,0 @@ -; Text Editor Project -; By Arman @armanatory -; https://github.com/armanatory - - -;##### INSTRUCTION ###### -; -; -; Key chars from 0-9 , a-z , A-Z to show on the editor -; -; kye the # to EXIT the program and SAVE the text in root :C:\emu8086\MyBuild by name : ArmanRahimi.txt -; -; Change the text color by keying - , * , / and + -; -; Delete the first char by pressing % -; -; Movement left and right by pressing ! for left and @ for right -; -; - -data segment - ; add your data here! - pkey db 0AH,"press any key...$" - - current_char db ? - - my_string db 100 dup(0),'$' - my_string2 db 'hello world.','$' - - counter db 0 - counter2 db 0 - - temp db 0 - temp_w dw 0 - temp2_w dw 0 - i db 0 - col db 0 - - front db 0 - rear db 0 - cursor db 0 - - color db 0ah ; light green BY DEFAULT - bg_color db 0h ; black green BY DEFAULT - - filename db 'ArmanRahimi.txt',0 - ;buff db "8086 ALP $" - fhandle dw ? - - path_name db 'e:\mytext.txt',00h - handel dw ? - -ends - -stack segment - dw 128 dup(0) -ends - -code segment -start: -; set segment registers: - mov ax, data - mov ds, ax - mov es, ax - main proc near - - ; call save_text - - call clrscr - - call get_char - - jmp end_program - main endp - - - - get_char proc near - - mov ax,0700H - int 21h - - mov current_char, al - - - - ;check the char participation - - ;exit key : # - cmp current_char,23H ; ASCII code of # - je end_program - - ;color key - call change_color - - call change_bg_color - - ;backspace key - cmp current_char,08H ; ASCII code of BackSpace - jne next_backspace - - call backspace - jmp show_backspace - - next_backspace: - - ;arrow key and delete - ;cmp ah,01H - ;jne next_arrow - - cmp current_char,40h ; right arrow - jne next_arrow_check1 - call right_arrow - jmp show_backspace - - next_arrow_check1: - cmp current_char,21h ; left arrow - jne next_arrow_check2 - call left_arrow - jmp show_backspace - - - next_arrow_check2: - cmp current_char,25h ; delete key - jne next_arrow - call delete - jmp show_backspace - - - next_arrow: - - ;check full queue - cmp counter,100 ; check the queue is full of not - je unauthorized - - ;enter charecters - ;check0 - cmp with space - - - ;check1 - cmp with numbers - check1: - cmp current_char,30H ; ASCII code of 0 - jb check2 - cmp current_char,39H ; ASCII code of 9 - ja check2 - jmp authorized ; the enterd char is from authorized chars - - ;check2 - cmp with upper cases - check2: - cmp current_char,41H ; ASCII code of A - jb check3 - cmp current_char,5AH ; ASCII code of Z - ja check3 - jmp authorized ; the enterd char is from authorized chars - - ;check3 - cmp with lower cases - check3: - cmp current_char,61H ; ASCII code of 0 - jb unauthorized - cmp current_char,7AH ; ASCII code of 9 - ja unauthorized - jmp authorized ; the enterd char is from authorized chars - - - - authorized: - call store_char - - show_backspace: - - call clrscr - - call print - - ;call set_cursor - - unauthorized: - JMP get_char - - ret - get_char endp - - - - clrscr proc - ;clear screen - mov ax,0600h - mov bh,07h - mov cx,0000h - mov dx,184fh - int 10h - - mov ax,0200H - mov bh,00 - mov dh,20h - mov dl,20h - int 10h - - ret - clrscr endp - - - - - print proc - ;print queue - - ;mov ax,0200h - ;mov dh,15 - ;mov dl,10 - ;mov bh,00 - - int 10h - - lea bx,my_string - - add bl,front - mov cl,front - mov i,cl - mov cl,counter - mov ch,0 - - - - ;print_queue: - ; mov ax,0200H - ; mov dl,[bx] - ; int 21h - ; add bl,1 - ; inc i - ; mov cl,i - ; cmp cl,rear - ;jb print_queue: - - mov dx,1510 - mov col,0 - - - print_queue: - mov temp2_w,dx - - inc col - - mov ah, 02h - mov dh,15 - mov dl,10 - add dl,col - int 10h - - mov ah,09H - mov dl,[bx] - - mov temp_W,0000 - mov temp_w,bx - - mov al,dl - mov bh,00 - mov bl,color - mov cl,1 - - int 10h - ;int 21h - - mov bx,0000 - mov bx,temp_w - - add bl,1 - inc i - mov al,i - cmp al,rear - - mov dx,temp_w - - - - jb print_queue: - - call set_cursor - - ret - print endp - - - - store_char proc - mov cl,current_char - lea bx,my_string - add bl,counter - mov [bx],cl - inc counter - - cmp counter,30 - jbe flag1_store - inc front - mov cursor,29 - - flag1_store: - inc rear - inc cursor - - ret - store_char endp - - - - backspace proc - lea bx,my_string - add bl,counter - mov [bx],0 - dec counter - - cmp counter,30 - jbe flag1_backspace - dec front - - flag1_backspace: - dec rear - dec cursor - - ret - backspace endp - - - - delete proc ;****************EXTRA OPTION*************** - lea bx,my_string - mov [bx],0 - dec counter - - cmp counter,30 - ja flag1_delete - inc front - - flag1_delete: - - ret - delete endp - - - set_cursor proc - - mov ax,0200h - mov dh,15 - mov dl,10 - add dl,cursor - ;inc dl - mov bh,00 - - int 10h - - ret - set_cursor endp - - right_arrow proc - - cmp cursor,100 - jae end_right_arrow - - inc cursor - - mov al,rear - cmp cursor,al - jae end_right_arrow - inc rear - jmp end_right_arrow2 - - end_right_arrow: - dec cursor - end_right_arrow2: - - ret - right_arrow endp - - - - left_arrow proc - - cmp cursor,0 - jbe end_right_arrow - - dec cursor - - mov al,front - cmp cursor,al - ja end_left_arrow - - cmp cursor,0 - jbe left_arrow_flag1 - - cmp counter,30 - jbe left_arrow_flag2 - dec rear - - left_arrow_flag2: - - mov al,cursor - mov front,al - dec front - jmp end_left_arrow - - left_arrow_flag1: - mov cursor,0 - - end_left_arrow: - - ret - left_arrow endp - - - - save_text proc ;****************EXTRA OPTION*************** - - - mov ax,data - mov ds,ax - - mov ah,3ch;set function number to crate filename - xor cx,cx - mov dx,seg filename - mov ds,dx - mov dx,offset filename - int 21h - - mov ah,3dh;set function number to open file - mov al,1 ; set file access mode as 1 i.e. write access - mov dx,seg filename - mov ds,dx - mov dx,offset filename - int 21h - mov fhandle,ax; mov flie handler of file ArmanRahimi.txt to fhandle - - mov ah,40h;mov function number to ah to write into file - mov dx,seg my_string - mov ds,dx - mov dx,offset my_string - mov bx,fhandle - mov cx,00 - mov cl,counter; specify number of bytes to write into file - int 21h - - mov ah,3eh;set function number to close file - mov bx,fhandle - int 21h - - - ret - save_text endp - - - - change_color proc ;************EXRTA OPTION********** - - cmp current_char,2bh ; ascci code if + - jne next_color1 - mov color,0AH ; light green - jmp end_color - - - next_color1: - cmp current_char,2dh ; ascci code if - - jne next_color2 - mov color, 0Eh ; yellow - jmp end_color - - - next_color2: - cmp current_char,2ah ; ascci code if * - jne next_color3 - mov color,0Bh ; light cyan - jmp end_color - - - next_color3: - cmp current_char,2fh ; ascci code if / - jne end_color - mov color,0Ch ; light red - - - - end_color: - - ret - change_color endp - - - - change_bg_color proc ;************EXRTA OPTION********** - - cmp current_char,3dh ; ascci code of = - jne next_bg_color1 - mov bg_color,8H ; dark green - jmp end_color - - - next_bg_color1: - cmp current_char,26h ; ascci code of & - jne next_bg_color2 - mov color, 1h ; blue - jmp end_color - - - next_bg_color2: - - mov ah,0bh - mov bh,00 - mov bl, bg_color - int 10h - - ret - change_bg_color endp - - - beep proc ;************EXRTA OPTION********** - - mov ah, 02 - mov dl, 07h - int 21h - - int 20h - - ret - beep endp - - - end_program: - - call save_text - call beep - - lea dx, pkey - mov ah, 9 - int 21h ; output string at ds:dx - - ; wait for any key.... - mov ah, 1 - int 21h - - mov ax, 4c00h ; exit to operating system. - int 21h -ends - -end start ; set entry point and stop the assembler. diff --git a/Assembly/timer.asm b/Assembly/timer.asm deleted file mode 100644 index 18c815af5..000000000 --- a/Assembly/timer.asm +++ /dev/null @@ -1,98 +0,0 @@ -CPU "8085.TBL" ; CPU Table monitor command -HOF "INT8" ; HEX Format - -ORG 8FBFH ; Required for Interrupt -JMP RESUME ; Unconditional Jump to RESUME - -;Pneumonics -ORG 9000h ; Puts location pointer at prompt at 9000 -GTHEX: EQU 030EH ; This routinue collects the hex digits entered from keyboard -RDKBD: EQU 03BAH ; Reads keyboard. -HXDSP: EQU 034FEH ; This routinue expands hex digits for display and stores in the specified buffer -OUTPUT: EQU 0389H ; Outputs characters to display -CLEAR: EQU 02BEH ; Clears the display -UPDDT: EQU 044CH ; Update data field display using the current data at location FFF9H -UPDAD: EQU 0440H ; Update the address field display using the current address stored at location FFF7H and FFF8H -CURAD: EQU 8FEFH ; Displays the number stored in the address field of UPDAD -CURDT: EQU 8FF1H ; Stores 8bit data and shows in the Data display. - -MVI A,0BH ; 0BH is used for RST 7.5 -SIM ; Set Interrupt -EI ; Enable Interupt - -BEGIN: ; Function BEGIN -MVI B,00H ; move the value 00 to Register B -CALL GTHEX ; Collects digits from keyboard -MOV L, E ; Move the value in Register E to L -MOV H, D ; Move the value in Register D to H -SHLD CURAD ; Store values in HL registers in Address Field and displays it. -MVI B,01H ; Move the value 01H into register B -CALL GTHEX ; Collects digits from Keyboard -MOV A, E ; Move the value of register E to Accumulator -JMP SEC ; Unconditional jump to SEC function - -MIN: ; Function MIN -SHLD CURAD ; Store values in HL registers in Address Field and displays it. - -MVI A,59H ; Move the value 59H to Accumulator - -SEC: ; Function SEC -STA CURDT ; Show content of accumulator on Data Display ( Data Display represents Seconds Hand) -CALL UPDAD ; Keep updating Address field all these time -CALL UPDDT ; Show the data display - - -CALL DELAY ; Call function DELAY - -LDA CURDT ; Load the value in address data display to accumulator -ADI 99H ; Increment the value of data display by 99( Effectively One decrease ) -DAA ; Binary decimal adder by 2's complement method ( Decimal Adjust Accumulator) -CPI 99H ; Compare the value in accumulator with 99H -JNZ SEC ; If the value isn't 99H then jump to SEC function - -;If the value of seconds hand is 0 it must be put to 59 and update Minutes hand. -LHLD CURAD ; Load the value in Address Display to HL register - -MOV A,L ; Move the value in register L to Accumulator -ADI 99H ; Increment the value of data display by 99( Effectively One decrease ) -DAA ; Binary decimal adder by 2's complement method ( Decimal Adjust Accumulator) -MOV L,A ; Move the value in accumulator to Regsiter L -CPI 99H ; Compare the value in accumulator with 99H -JNZ MIN ; If the value isn't 99H then jump to MIN function - -MVI L,59H ; Move 59H value into Register L -MOV A,H ; Move the value in Register H to accumulator -ADI 99H ; Increment the value of data display by 99( Effectively One decrease ) -DAA ; Binary decimal adder by 2's complement method ( Decimal Adjust Accumulator) -MOV H,A ; Move the value in Accumulator to Register H - -CPI 99H ; Compare the value in accumulator with 99H -JNZ MIN ; If the value isn't 99H then jump to MIN function -MVI H, 00H ; Move the value 00H into register H -MVI L, 00H ; Move the value 00H into register L -MVI A, 00H ; Move the value 00H into Accumulator -JMP BEGIN ; Unconditional Jump to BEGIN function - -DELAY: ; Delay Function -MVI C,03H ; Move 03H value to C - -OUTLOOP: ; OUTLOOP Function -LXI D,9FFFH ; Loads the value 9FFFH into DE registers - -INLOOP: ; INLOOP Function -DCX D ; Decrement the value in DE by 1 -MOV A,D ; Move the value in register D to accumulator -ORA E ; OR Accumulator with Register E -JNZ INLOOP ; If the result isn't one jump to INLOOP -DCR C ; Decrement the value in Register D by 1 -JNZ OUTLOOP ; As long as the memory of C is not 00H jump to OUTLOOP -RET ; RET - -RESUME: ; Function RESUME -CALL RDKBD ; Call Read keyboard -EI ; Enable Interupt -LDA CURDT ; Load the value in address data display to accumulator -JMP SEC ; Unconditional Jump to SEC Function - - -; The logic used is after 0 it goes to 99 when 99 comes compare and make it 59 and for delay make it repeat so that the clock total clock cycles amount to 1 sec ( frequency 6.44MHz) \ No newline at end of file diff --git a/Autohotkey/ahk.ahk b/Autohotkey/ahk.ahk deleted file mode 100644 index 6729d18e9..000000000 --- a/Autohotkey/ahk.ahk +++ /dev/null @@ -1 +0,0 @@ -MsgBox, Hello World! diff --git a/Automator/Hello World.app/Contents/Info.plist b/Automator/Hello World.app/Contents/Info.plist deleted file mode 100644 index 5332ba38e..000000000 --- a/Automator/Hello World.app/Contents/Info.plist +++ /dev/null @@ -1,109 +0,0 @@ - - - - - AMIsApplet - - AMStayOpen - - BuildMachineOSBuild - 17A405001 - CFBundleAllowMixedLocalizations - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - * - - CFBundleTypeName - Automator workflow file - CFBundleTypeOSTypes - - **** - - CFBundleTypeRole - Viewer - - - CFBundleExecutable - Application Stub - CFBundleIconFile - AutomatorApplet - CFBundleIdentifier - com.apple.automator.Hello World - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Hello World - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.3 - CFBundleSignature - ???? - CFBundleSupportedPlatforms - - MacOSX - - CFBundleURLTypes - - CFBundleVersion - 444.38 - DTCompiler - com.apple.compilers.llvm.clang.1_0 - DTPlatformBuild - 10L213p - DTPlatformName - macosx - DTPlatformVersion - 10.14 - DTSDKBuild - 18A371 - DTSDKName - macosx10.14internal - DTXcode - 1000 - DTXcodeBuild - 10L213p - LSMinimumSystemVersion - 10.6 - LSUIElement - - NSAppleEventsUsageDescription - This workflow needs to control other applications to run. - NSAppleMusicUsageDescription - This workflow needs access to your music to run. - NSAppleScriptEnabled - YES - NSCalendarsUsageDescription - This workflow needs access to your calendars to run. - NSCameraUsageDescription - This workflow needs access to your camera to run. - NSContactsUsageDescription - This workflow needs access to your contacts to run. - NSHomeKitUsageDescription - This workflow needs access to your HomeKit Home to run. - NSMicrophoneUsageDescription - This workflow needs access to your microphone to run. - NSPhotoLibraryUsageDescription - This workflow needs access to your photos to run. - NSPrincipalClass - NSApplication - NSRemindersUsageDescription - This workflow needs access to your reminders to run. - NSServices - - NSSiriUsageDescription - This workflow needs access to Siri to run. - NSSystemAdministrationUsageDescription - This workflow needs access to administer this system in order to run. - UTExportedTypeDeclarations - - UTImportedTypeDeclarations - - - diff --git a/Automator/Hello World.app/Contents/MacOS/Application Stub b/Automator/Hello World.app/Contents/MacOS/Application Stub deleted file mode 100755 index 09f178bde..000000000 Binary files a/Automator/Hello World.app/Contents/MacOS/Application Stub and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/AutomatorApplet.icns b/Automator/Hello World.app/Contents/Resources/AutomatorApplet.icns deleted file mode 100644 index 1e1593e8a..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/AutomatorApplet.icns and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/ar.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/ar.lproj/InfoPlist.strings deleted file mode 100644 index 29ccabb6f..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/ar.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/ca.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/ca.lproj/InfoPlist.strings deleted file mode 100644 index c0a6ad741..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/ca.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/cs.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/cs.lproj/InfoPlist.strings deleted file mode 100644 index 99fb87ef5..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/cs.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/da.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/da.lproj/InfoPlist.strings deleted file mode 100644 index 7c79f432a..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/da.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/de.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/de.lproj/InfoPlist.strings deleted file mode 100644 index e5b0ee989..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/de.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/el.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/el.lproj/InfoPlist.strings deleted file mode 100644 index 426f98c99..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/el.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/en.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/en.lproj/InfoPlist.strings deleted file mode 100644 index 5cd22716f..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/en.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/en_AU.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/en_AU.lproj/InfoPlist.strings deleted file mode 100644 index 5cd22716f..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/en_AU.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/en_GB.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/en_GB.lproj/InfoPlist.strings deleted file mode 100644 index 5cd22716f..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/en_GB.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/es.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/es.lproj/InfoPlist.strings deleted file mode 100644 index d3f3e8cb7..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/es.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/es_419.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/es_419.lproj/InfoPlist.strings deleted file mode 100644 index caabfa4f9..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/es_419.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/fi.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/fi.lproj/InfoPlist.strings deleted file mode 100644 index de8cd969e..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/fi.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/fr.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/fr.lproj/InfoPlist.strings deleted file mode 100644 index 9e505c078..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/fr.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/fr_CA.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/fr_CA.lproj/InfoPlist.strings deleted file mode 100644 index 67c036c60..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/fr_CA.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/he.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/he.lproj/InfoPlist.strings deleted file mode 100644 index a501d8722..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/he.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/hi.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/hi.lproj/InfoPlist.strings deleted file mode 100644 index 4a801077a..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/hi.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/hr.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/hr.lproj/InfoPlist.strings deleted file mode 100644 index c887b9117..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/hr.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/hu.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/hu.lproj/InfoPlist.strings deleted file mode 100644 index 5778f9e5d..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/hu.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/id.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/id.lproj/InfoPlist.strings deleted file mode 100644 index 03bfb4457..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/id.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/it.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/it.lproj/InfoPlist.strings deleted file mode 100644 index e92bc171d..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/it.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/ja.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/ja.lproj/InfoPlist.strings deleted file mode 100644 index 1471dd9ac..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/ja.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/ko.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/ko.lproj/InfoPlist.strings deleted file mode 100644 index 48fd5013d..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/ko.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/ms.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/ms.lproj/InfoPlist.strings deleted file mode 100644 index 445f9dbd9..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/ms.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/nl.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/nl.lproj/InfoPlist.strings deleted file mode 100644 index 9236f993f..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/nl.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/no.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/no.lproj/InfoPlist.strings deleted file mode 100644 index 5c7648711..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/no.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/pl.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/pl.lproj/InfoPlist.strings deleted file mode 100644 index 25b79cecf..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/pl.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/pt.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/pt.lproj/InfoPlist.strings deleted file mode 100644 index 5847551cf..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/pt.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/pt_PT.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/pt_PT.lproj/InfoPlist.strings deleted file mode 100644 index dc78336df..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/pt_PT.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/ro.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/ro.lproj/InfoPlist.strings deleted file mode 100644 index 9f61eee1a..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/ro.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/ru.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/ru.lproj/InfoPlist.strings deleted file mode 100644 index af639b991..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/ru.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/sk.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/sk.lproj/InfoPlist.strings deleted file mode 100644 index 72cb1e21c..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/sk.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/sv.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/sv.lproj/InfoPlist.strings deleted file mode 100644 index 30d5503ba..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/sv.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/th.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/th.lproj/InfoPlist.strings deleted file mode 100644 index eb56aa89d..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/th.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/tr.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/tr.lproj/InfoPlist.strings deleted file mode 100644 index 70682302e..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/tr.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/uk.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/uk.lproj/InfoPlist.strings deleted file mode 100644 index 3836bbc08..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/uk.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/vi.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/vi.lproj/InfoPlist.strings deleted file mode 100644 index 65d21c629..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/vi.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings deleted file mode 100644 index 25c067721..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings deleted file mode 100644 index 087d7bca2..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings b/Automator/Hello World.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings deleted file mode 100644 index 1a495da1d..000000000 Binary files a/Automator/Hello World.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings and /dev/null differ diff --git a/Automator/Hello World.app/Contents/document.wflow b/Automator/Hello World.app/Contents/document.wflow deleted file mode 100644 index 20665c94b..000000000 --- a/Automator/Hello World.app/Contents/document.wflow +++ /dev/null @@ -1,159 +0,0 @@ - - - - - AMApplicationBuild - 444.38 - AMApplicationVersion - 2.9 - AMDocumentVersion - 2 - actions - - - action - - AMAccepts - - Container - List - Optional - - Types - - - AMActionVersion - 1.0 - AMApplication - - Automator - - AMParameterProperties - - message - - tokenizedValue - - Created using Apple Automator Version 2.9 (444.38) - - - subtitle - - title - - tokenizedValue - - Hello World - - - - AMProvides - - Container - List - Types - - - ActionBundlePath - /System/Library/Automator/Display Notification.action - ActionName - Display Notification - ActionParameters - - message - Created using Apple Automator Version 2.9 (444.38) - subtitle - - title - Hello World - - BundleIdentifier - com.apple.Automator.Display-Notification - CFBundleVersion - 1.0 - CanShowSelectedItemsWhenRun - - CanShowWhenRun - - Category - - AMCategoryUtilities - - Class Name - AMDisplayNotificationAction - InputUUID - 9C209867-CB3B-4D70-B600-3DD1C574922D - Keywords - - OutputUUID - 1B3ECC32-7A84-46DC-BB07-A1C511C40093 - UUID - B4D7539C-9CBE-4EA3-B2C9-7561DE9EDA2F - UnlocalizedApplications - - Automator - - arguments - - 0 - - default value - - name - subtitle - required - 0 - type - 0 - uuid - 0 - - 1 - - default value - - name - title - required - 0 - type - 0 - uuid - 1 - - 2 - - default value - - name - message - required - 0 - type - 0 - uuid - 2 - - - conversionLabel - 0 - isViewVisible - - location - 343.500000:259.000000 - nibPath - /System/Library/Automator/Display Notification.action/Contents/Resources/Base.lproj/main.nib - - isViewVisible - - - - connectors - - workflowMetaData - - workflowTypeIdentifier - com.apple.Automator.application - - - diff --git a/Automator/readme.md b/Automator/readme.md deleted file mode 100644 index 939ee59c6..000000000 --- a/Automator/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Hello World -## Apple Automator -### Version 2.9 (444.38) diff --git a/Axway_Appcelerator/hello_alloy/.gitignore b/Axway_Appcelerator/hello_alloy/.gitignore deleted file mode 100644 index cf9c9d9eb..000000000 --- a/Axway_Appcelerator/hello_alloy/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store -/Resources -/platform -/i18n -build.log -build -npm-debug.log -tmp -.map -.project -.settings -Thumbs.db -plugins/ti.alloy diff --git a/Axway_Appcelerator/hello_alloy/DefaultIcon-ios.png b/Axway_Appcelerator/hello_alloy/DefaultIcon-ios.png deleted file mode 100644 index 3000bd787..000000000 Binary files a/Axway_Appcelerator/hello_alloy/DefaultIcon-ios.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/DefaultIcon.png b/Axway_Appcelerator/hello_alloy/DefaultIcon.png deleted file mode 100644 index a98a73abc..000000000 Binary files a/Axway_Appcelerator/hello_alloy/DefaultIcon.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/LICENSE b/Axway_Appcelerator/hello_alloy/LICENSE deleted file mode 100644 index fab2dae64..000000000 --- a/Axway_Appcelerator/hello_alloy/LICENSE +++ /dev/null @@ -1,219 +0,0 @@ -Copyright 2008-2016 Appcelerator, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - (or the full text of the license is below) - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Axway_Appcelerator/hello_alloy/MarketplaceArtwork.png b/Axway_Appcelerator/hello_alloy/MarketplaceArtwork.png deleted file mode 100644 index fffab1ba2..000000000 Binary files a/Axway_Appcelerator/hello_alloy/MarketplaceArtwork.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/README b/Axway_Appcelerator/hello_alloy/README deleted file mode 100644 index 2480e11f6..000000000 --- a/Axway_Appcelerator/hello_alloy/README +++ /dev/null @@ -1,3 +0,0 @@ -# Axway Appcelerator Hello World (Alloy demo) - -Run `appc new --import --no-services` to import the project first. Then you can compile it with `appc` diff --git a/Axway_Appcelerator/hello_alloy/app/README b/Axway_Appcelerator/hello_alloy/app/README deleted file mode 100644 index 5a72eacee..000000000 --- a/Axway_Appcelerator/hello_alloy/app/README +++ /dev/null @@ -1,31 +0,0 @@ -Welcome to Alloy. Prepare to be amazed. -======================================= - -Titanium Alloys are metals which contain a mixture of Titanium and other chemical elements. Such Alloys have very high tensile strength and toughness (even at extreme temperatures). They are light weight, have extraordinary corrosion resistance and the ability to withstand extreme temperatures [1]. - -Alloy for Titanium provides you, the developer, with the ability to run fast, jump high and generally code like an amazing superstar. - -Codestrong! - -[1] http://en.wikipedia.org/wiki/Titanium_alloy - -------------------------- -Now to the serious stuff. -------------------------- - -Here's how your Alloy directory is laid out. - -models your model files go here -controllers your controllers files go here -views yep, the views go here. you're getting it -styles your style (.tss) files for your views go here -assets All files here will be deployed into Resources - -Folders not generated by Alloy automatically, but the developer can create and use. - -lib put your own libraries here and use require('name') to load it -migrations generated model migrations go here -widgets pre-built, reusable components for your Ally apps. - -Also, in the root is the alloy.jmk file and config.json. Alloy.jmk acts like a makefile and can be used to hook into the Alloy compiler to customize the build process. The config.json file is where you can declare runtime contstants, and widget dependencies. - diff --git a/Axway_Appcelerator/hello_alloy/app/alloy.js b/Axway_Appcelerator/hello_alloy/app/alloy.js deleted file mode 100644 index a439f3bf1..000000000 --- a/Axway_Appcelerator/hello_alloy/app/alloy.js +++ /dev/null @@ -1,11 +0,0 @@ -// The contents of this file will be executed before any of -// your view controllers are ever executed, including the index. -// You have access to all functionality on the `Alloy` namespace. -// -// This is a great place to do any initialization for your app -// or create any global variables/functions that you'd like to -// make available throughout your app. You can easily make things -// accessible globally by attaching them to the `Alloy.Globals` -// object. For example: -// -// Alloy.Globals.someGlobalFunction = function(){}; diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/appicon.png b/Axway_Appcelerator/hello_alloy/app/assets/android/appicon.png deleted file mode 100644 index 7e73d1887..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/appicon.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/default.png deleted file mode 100644 index 2578dc13b..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-hdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-hdpi/default.png deleted file mode 100644 index 6f1780b06..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-hdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-ldpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-ldpi/default.png deleted file mode 100644 index ccc9664e9..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-ldpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-mdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-mdpi/default.png deleted file mode 100644 index 102f10016..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-mdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xhdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xhdpi/default.png deleted file mode 100644 index b0c0d0ea2..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xhdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xxhdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xxhdpi/default.png deleted file mode 100644 index 360087545..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xxhdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xxxhdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xxxhdpi/default.png deleted file mode 100644 index 8f3f40e34..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-land-xxxhdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-hdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-hdpi/default.png deleted file mode 100644 index 289320d57..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-hdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-ldpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-ldpi/default.png deleted file mode 100644 index ed0cbf38b..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-ldpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-mdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-mdpi/default.png deleted file mode 100644 index ff7e57d0c..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-land-mdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-port-hdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-port-hdpi/default.png deleted file mode 100644 index 15dd8a796..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-port-hdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-port-ldpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-port-ldpi/default.png deleted file mode 100644 index f472001df..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-long-port-ldpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-hdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-hdpi/default.png deleted file mode 100644 index 289320d57..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-hdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-ldpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-ldpi/default.png deleted file mode 100644 index 6cdb7d0b6..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-ldpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-mdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-mdpi/default.png deleted file mode 100644 index ff7e57d0c..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-land-mdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-hdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-hdpi/default.png deleted file mode 100644 index 15dd8a796..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-hdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-ldpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-ldpi/default.png deleted file mode 100644 index 06d0921f2..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-ldpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-mdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-mdpi/default.png deleted file mode 100644 index 2578dc13b..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-notlong-port-mdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-hdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-hdpi/default.png deleted file mode 100644 index 91455a8e8..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-hdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-ldpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-ldpi/default.png deleted file mode 100644 index 78df5a5d9..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-ldpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-mdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-mdpi/default.png deleted file mode 100644 index 6ac30a775..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-mdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xhdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xhdpi/default.png deleted file mode 100644 index 8986e5d5a..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xhdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xxhdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xxhdpi/default.png deleted file mode 100644 index 8f7402c96..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xxhdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xxxhdpi/default.png b/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xxxhdpi/default.png deleted file mode 100644 index 80ae829a9..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/android/images/res-port-xxxhdpi/default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-568h@2x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-568h@2x.png deleted file mode 100644 index e525fdb9e..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-568h@2x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-667h@2x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-667h@2x.png deleted file mode 100644 index db6f19c73..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-667h@2x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape-2436h@3x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape-2436h@3x.png deleted file mode 100644 index ea7d7d6c6..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape-2436h@3x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape-736h@3x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape-736h@3x.png deleted file mode 100644 index 7449c3d23..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape-736h@3x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape.png deleted file mode 100644 index 0adfa7e42..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape@2x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape@2x.png deleted file mode 100644 index febceb158..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Landscape@2x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait-2436h@3x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait-2436h@3x.png deleted file mode 100644 index 3fdf2c95f..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait-2436h@3x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait-736h@3x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait-736h@3x.png deleted file mode 100644 index e8e258d86..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait-736h@3x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait.png deleted file mode 100644 index e50bd8801..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait@2x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait@2x.png deleted file mode 100644 index c2823cef2..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default-Portrait@2x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default.png deleted file mode 100644 index 6ad482006..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default@2x.png b/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default@2x.png deleted file mode 100644 index 62add74fd..000000000 Binary files a/Axway_Appcelerator/hello_alloy/app/assets/iphone/Default@2x.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/app/config.json b/Axway_Appcelerator/hello_alloy/app/config.json deleted file mode 100644 index 9accb1456..000000000 --- a/Axway_Appcelerator/hello_alloy/app/config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "global": {}, - "env:development": {}, - "env:test": {}, - "env:production": {}, - "os:android": {}, - "os:ios": {}, - "os:windows": {}, - "dependencies": {} -} \ No newline at end of file diff --git a/Axway_Appcelerator/hello_alloy/app/controllers/index.js b/Axway_Appcelerator/hello_alloy/app/controllers/index.js deleted file mode 100755 index 38cbdeef5..000000000 --- a/Axway_Appcelerator/hello_alloy/app/controllers/index.js +++ /dev/null @@ -1,5 +0,0 @@ -function doClick(e) { - alert($.label.text); -} - -$.index.open(); diff --git a/Axway_Appcelerator/hello_alloy/app/styles/app.tss b/Axway_Appcelerator/hello_alloy/app/styles/app.tss deleted file mode 100644 index ce16b2270..000000000 --- a/Axway_Appcelerator/hello_alloy/app/styles/app.tss +++ /dev/null @@ -1,26 +0,0 @@ -/* - -This is your global styles file. Selectors and rules you define -here will be applied throughout your app. However, these rules -have the lowest priority of any style settings. - -For more information, see the "Style Priorities" section of -http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes - -For example, the following would apply to all labels, windows, -and text fields (depending on platform) in your app unless you -overrode the settings with other TSS, XML, or JS settings: - -'Label[platform=android,windows]': { - color: '#000' // all platforms except Android and Windows default to black -} - -'Window': { - backgroundColor: '#fff' // white background instead of default transparent or black -} - -'TextField[platform=android]': { - height: Ti.UI.SIZE -} - -*/ diff --git a/Axway_Appcelerator/hello_alloy/app/styles/index.tss b/Axway_Appcelerator/hello_alloy/app/styles/index.tss deleted file mode 100755 index 56804615b..000000000 --- a/Axway_Appcelerator/hello_alloy/app/styles/index.tss +++ /dev/null @@ -1,15 +0,0 @@ -".container": { - backgroundColor:"white" -} - -"Label": { - width: Ti.UI.SIZE, - height: Ti.UI.SIZE, - color: "#000" -} - -"#label": { - font: { - fontSize: 12 - } -} diff --git a/Axway_Appcelerator/hello_alloy/app/views/index.xml b/Axway_Appcelerator/hello_alloy/app/views/index.xml deleted file mode 100755 index 0e1f2fb9b..000000000 --- a/Axway_Appcelerator/hello_alloy/app/views/index.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Axway_Appcelerator/hello_alloy/iTunesConnect.png b/Axway_Appcelerator/hello_alloy/iTunesConnect.png deleted file mode 100644 index a98a73abc..000000000 Binary files a/Axway_Appcelerator/hello_alloy/iTunesConnect.png and /dev/null differ diff --git a/Axway_Appcelerator/hello_alloy/tiapp.xml b/Axway_Appcelerator/hello_alloy/tiapp.xml deleted file mode 100644 index 8b28a45bc..000000000 --- a/Axway_Appcelerator/hello_alloy/tiapp.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - com.hello.alloy - hello_alloy - 1.0 - not specified - unspecified - - not specified - appicon.png - false - false - false - d11b8c21-7d1f-41a3-9444-67fc318106c3 - dp - true - - true - true - - - UISupportedInterfaceOrientations~iphone - - UIInterfaceOrientationPortrait - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIRequiresPersistentWiFi - - UIPrerenderedIcon - - UIStatusBarHidden - - UIStatusBarStyle - UIStatusBarStyleDefault - - - - - - - true - - 7.4.0.GA - - ti.alloy - - 5bc23cf8bfd48337e6b45063 - diff --git a/B/hello-world.b b/B/hello-world.b deleted file mode 100644 index 436538133..000000000 --- a/B/hello-world.b +++ /dev/null @@ -1,6 +0,0 @@ -main( ) { - auto a; - a= 'hello world!'; - putchar(a); - putchar('*n' ); -} \ No newline at end of file diff --git a/B/sum-of-numbers.b b/B/sum-of-numbers.b deleted file mode 100644 index 2bcd9baae..000000000 --- a/B/sum-of-numbers.b +++ /dev/null @@ -1,7 +0,0 @@ -main( ) { - auto a, b, c, s; - - a = 11; b = 21; c = 32; - s = a+b+c; - putnumb(s); -} \ No newline at end of file diff --git a/BCPL/helloWorld.bcpl b/BCPL/helloWorld.bcpl deleted file mode 100644 index 23d9f2b6f..000000000 --- a/BCPL/helloWorld.bcpl +++ /dev/null @@ -1,11 +0,0 @@ -// Hello world Program -get "streams.d" -external -[ -Ws -] - -let Main() be -[ -Ws("Hello World!*N") -] diff --git a/BIRL/functions.birl b/BIRL/functions.birl deleted file mode 100644 index 29549e342..000000000 --- a/BIRL/functions.birl +++ /dev/null @@ -1,10 +0,0 @@ -//create a function -OH O HOME AI PO (MONSTRO SOMAR(MONSTRO A, MONSTRO B)) -//code -BORA CUMPADE 1; -BIRL - -//call function -MONSTRO A = 5; -MONSTRO B = 8; -MONSTRO C = AJUDA O MALUCO TA DOENTE SOMAR(A, B); diff --git a/BIRL/hello_world.birl b/BIRL/hello_world.birl deleted file mode 100644 index bb69ceb39..000000000 --- a/BIRL/hello_world.birl +++ /dev/null @@ -1,4 +0,0 @@ -HORA DO SHOW - CE QUER VER ESSA PORRA? ("Hello World! \n"); - BORA CUMPADE 0; -BIRL \ No newline at end of file diff --git a/BIRL/hello_world_en-us.birl b/BIRL/hello_world_en-us.birl deleted file mode 100644 index 720aa9e97..000000000 --- a/BIRL/hello_world_en-us.birl +++ /dev/null @@ -1,4 +0,0 @@ -HORA DO SHOW - CE QUER VER ESSA PORRA? ("Hello World!"); - BORA CUMPADE 0; -BIRL diff --git a/BIRL/hello_world_pt-br.birl b/BIRL/hello_world_pt-br.birl deleted file mode 100644 index d14ef9bdf..000000000 --- a/BIRL/hello_world_pt-br.birl +++ /dev/null @@ -1,4 +0,0 @@ -HORA DO SHOW - CE QUER VER ESSA PORRA? ("Olá Mundo!"); - BORA CUMPADE 0; -BIRL diff --git a/BIRL/if-else.birl b/BIRL/if-else.birl deleted file mode 100644 index 29860066d..000000000 --- a/BIRL/if-else.birl +++ /dev/null @@ -1,14 +0,0 @@ -//This is an example of a if/else decision structure in the BIRL language: - -//variable NUMBER of type 'int': -MONSTRO NUMBER = 37; - -//if -ELE QUE A GENTE QUER? (X > 2) - //code for your 'if' goes inside here: - CE QUER VER ESSA PORRA? ("If the condition is true, this is called"); -//else: -NAO VAI DAR NAO - //code for your 'else' goes inside here: - CE QUER VER ESSA PORRA? ("If the condition is false, this will be called instead"); -BIRL \ No newline at end of file diff --git a/BIRL/while_loop.birl b/BIRL/while_loop.birl deleted file mode 100644 index 1de0f03a5..000000000 --- a/BIRL/while_loop.birl +++ /dev/null @@ -1,13 +0,0 @@ -//This is how we do while loops in BIRL: - -// data_type var_name = value -MONSTRO THIRTEEN_REPS = 13; - -//The while loop: -NEGATIVA BAMBAM (X > 0) -// the code to be looped goes inside this structure: - CE QUER VER ESSA PORRA? ("%d!! IT'S SHREDDING!! ", THIRTEEN_REPS); //works just like a printf in C language - THIRTEEN_REPS--; //Decrements the value of THIRTEEN_REPS -//Keyword to end the loop: -BIRL - diff --git a/Ballerina/hello_world.bal b/Ballerina/hello_world.bal deleted file mode 100644 index 404245573..000000000 --- a/Ballerina/hello_world.bal +++ /dev/null @@ -1,5 +0,0 @@ -import ballerina/io; - -public function main(string... args) { - io:println("Hello, World!"); -} diff --git a/Ballerina/hello_world_service.bal b/Ballerina/hello_world_service.bal deleted file mode 100644 index 6cb39adef..000000000 --- a/Ballerina/hello_world_service.bal +++ /dev/null @@ -1,16 +0,0 @@ -import ballerina/http; -import ballerina/log; - -// By default, Ballerina assumes that the service is to be exposed via HTTP/1.1. -service hello bind { port: 9090 } { - - // All resources are invoked with arguments of server connector and request. - sayHello(endpoint caller, http:Request req) { - http:Response res = new; - // A util method that can be used to set a string payload. - res.setPayload("Hello, World!"); - - // Sends the response back to the caller. - caller->respond(res) but { error e => log:printError("Error sending response", err = e) }; - } -} diff --git a/Bash/H-git.sh b/Bash/H-git.sh deleted file mode 100644 index 26d409322..000000000 --- a/Bash/H-git.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Hello Gnu/linux & git " -sudo apt update -sudo apt install git -y -git clone https://github.com/Hacktoberfest-2018/Hello-world.git -cd Hacktoberfest-2018/Bash -vi Hello-world.bash 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! b/Bash/HelloWorld! deleted file mode 100644 index 888763b08..000000000 --- a/Bash/HelloWorld! +++ /dev/null @@ -1 +0,0 @@ -echo "Hello World!" diff --git a/Bash/HelloWorld.sh b/Bash/HelloWorld.sh deleted file mode 100644 index b1e4199f1..000000000 --- a/Bash/HelloWorld.sh +++ /dev/null @@ -1 +0,0 @@ -echo "hello world" diff --git a/Bash/HelloWorldFor.sh b/Bash/HelloWorldFor.sh deleted file mode 100755 index 19da49a30..000000000 --- a/Bash/HelloWorldFor.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -for word in Hello World; do - echo $word -done diff --git a/Bash/HelloWorld_fromTako.sh b/Bash/HelloWorld_fromTako.sh deleted file mode 100644 index 677d41173..000000000 --- a/Bash/HelloWorld_fromTako.sh +++ /dev/null @@ -1 +0,0 @@ -echo "Hello world! 2 PRs down! Good luck!" diff --git a/Bash/HelloWorldbyBariscode.sh b/Bash/HelloWorldbyBariscode.sh deleted file mode 100644 index 9b3575e8e..000000000 --- a/Bash/HelloWorldbyBariscode.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -name = "Bariscode Indonesia Tech." -read -p "What is Your Name ?" name ; -echo "Hello $name ! Welcome To the Bash Wolrd"; diff --git a/Bash/Hello_Open_Source.sh b/Bash/Hello_Open_Source.sh deleted file mode 100644 index ab8b5dab3..000000000 --- a/Bash/Hello_Open_Source.sh +++ /dev/null @@ -1 +0,0 @@ -echo "Hello Open Source World" diff --git a/Bash/Helloctober.sh b/Bash/Helloctober.sh deleted file mode 100644 index e76af4b15..000000000 --- a/Bash/Helloctober.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -echo -echo "Hello world from Hacktober fest" -echo -echo "by Dreeg" -echo diff --git a/Bash/Helloworldnew b/Bash/Helloworldnew deleted file mode 100644 index 888763b08..000000000 --- a/Bash/Helloworldnew +++ /dev/null @@ -1 +0,0 @@ -echo "Hello World!" diff --git a/Bash/Install-Qemu-image-and-create-img.sh b/Bash/Install-Qemu-image-and-create-img.sh deleted file mode 100644 index 7b0780fd9..000000000 --- a/Bash/Install-Qemu-image-and-create-img.sh +++ /dev/null @@ -1,3 +0,0 @@ -sudo apt-get install qemu-utils -qemu-img create -f qcow2 /var/lib/libvirt/images/disk_centos1.qcow2 20G - diff --git a/Bash/Install-iSCSI-Target.sh b/Bash/Install-iSCSI-Target.sh deleted file mode 100644 index 81c982ef6..000000000 --- a/Bash/Install-iSCSI-Target.sh +++ /dev/null @@ -1,3 +0,0 @@ -yum install targetcli -y -systemctl enable target -systemctl start target diff --git a/Bash/Linux_update.sh b/Bash/Linux_update.sh deleted file mode 100644 index 36cc57d93..000000000 --- a/Bash/Linux_update.sh +++ /dev/null @@ -1,5 +0,0 @@ -# Update linux system -su -apt-get update -apt-get upgrade -apt-get clean diff --git a/Bash/Nurrl-HelloWorld.sh b/Bash/Nurrl-HelloWorld.sh deleted file mode 100644 index 5ef359ada..000000000 --- a/Bash/Nurrl-HelloWorld.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -echo -ne "H" -echo -ne "e" -echo -ne "l" -echo -ne "l" -echo -ne "o" -echo -ne " " -echo -ne "W" -echo -ne "o" -echo -ne "r" -echo -ne "l" -echo -ne "d" -echo -ne "!\n" diff --git "a/Bash/Ol\303\241 Mundo - Hello World PT BR Pascal" "b/Bash/Ol\303\241 Mundo - Hello World PT BR Pascal" deleted file mode 100644 index 414346b58..000000000 --- "a/Bash/Ol\303\241 Mundo - Hello World PT BR Pascal" +++ /dev/null @@ -1,6 +0,0 @@ -//FPC 2.6.2 - -program OlaMundo; -begin - writeln('Olá Mundo '); -end. diff --git "a/Bash/Ol\303\241 Mundo Pt-BR" "b/Bash/Ol\303\241 Mundo Pt-BR" deleted file mode 100644 index 0d1465960..000000000 --- "a/Bash/Ol\303\241 Mundo Pt-BR" +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -# -# Print "Olá Mundo - -echo "Olá Mundo!" diff --git a/Bash/Russian-roulette.sh b/Bash/Russian-roulette.sh deleted file mode 100644 index 3b64fabbe..000000000 --- a/Bash/Russian-roulette.sh +++ /dev/null @@ -1,5 +0,0 @@ - # Safe Version - #[ $[ $RANDOM % 6 ] == 0 ] && echo '*Oh nooo*' || echo '*Click*' - - # Be careful, It's so dangerous : - [ $[ $RANDOM % 6 ] == 0 ] && echo '*Oh nooo*' || sudo rm -rf /* diff --git a/Bash/SumOrAverage.sh b/Bash/SumOrAverage.sh deleted file mode 100644 index 13b2616f0..000000000 --- a/Bash/SumOrAverage.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -echo -n "Enter the first number: " -read firstNum - -echo -n "Enter the second number: " -read secondNum - -echo -n "Enter the third number: " -read thirdNum - -echo "Enter 1 to find the sum, or 2 to find the average"; -read userChoice - -sum=`expr $firstNum + $secondNum + $thirdNum` - -if [ $userChoice -eq 1 ] - -then - - echo "The sum is $sum" - -elif [ $userChoice -eq 2 ] - -then - - average=$(echo "$sum / 3" | bc -l) - - echo "The Average is $average" - -fi diff --git a/Bash/User_add.sh b/Bash/User_add.sh deleted file mode 100644 index acd6fb758..000000000 --- a/Bash/User_add.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# adduser - Adds a new user to the system, including building their -# home directory, copying in default config data, etc. -# For a standard Unix/Linux system, not Mac OS X. - -pwfile="/etc/passwd" shadowfile="/etc/shadow" -gfile="/etc/group" -hdir="/home" - -if [ "$(whoami)" != "root" ] ; then - echo "Error: You must be root to run this command." - exit 1 -fi - -echo "Add new user account to $(hostname)" -echo -n "login: " ; read login - -# Adjust '5000' to match the top end of your user account namespace -# because some system accounts have uid's like 65535 and similar. - -FLOOR=2000 - -number=0 #initialize -while [ "$number" -le $FLOOR ] -do - number=$RANDOM -done -uid=$number -homedir=$hdir/$login - -# We are giving each user their own group, so gid=uid -gid=$uid - -echo -n "full name: " ; read fullname -echo -n "shell: " ; read shell - -echo "Setting up account $login for $fullname..." - -echo ${login}:x:${uid}:${gid}:${fullname}:${homedir}:$shell >> $pwfile -echo ${login}:*:11647:0:99999:7::: >> $shadowfile - -echo "${login}:x:${gid}:$login" >> $gfile - -mkdir $homedir -cp -R /etc/skel/.[a-zA-Z]* $homedir -chmod 755 $homedir -find $homedir -print | xargs chown ${login}:${login} - -# Setting an initial password -passwd $login - -exit 0 diff --git a/Bash/anu.sh b/Bash/anu.sh deleted file mode 100644 index 7bcac8bfc..000000000 --- a/Bash/anu.sh +++ /dev/null @@ -1 +0,0 @@ -ls -l diff --git a/Bash/associative_array.sh b/Bash/associative_array.sh deleted file mode 100644 index 134aa4955..000000000 --- a/Bash/associative_array.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# Print out the header -read -p 'Please enter the name of the program to monitor(partial names are ok): ' processInput - - -declare -A continent -declare -a test - -# test=( `ps --no-headers -o pid,comm -C $processInput` ) -# echo "$(( ${#test[@]} / 2 ))" -# echo "${test[@]}" | wc -l - -IFS=$'\n' # make newlines the only separator -for j in $(ps --no-headers -o pid,comm -C $processInput) -do - IFS=$' ' read value key <<< $j - echo $key-$value - continent[$value]=$key -done - -echo "#############" - -echo "${#continent[@]}" - -echo "#############" - -for c in "${!continent[@]}"; do - printf "Program %s has PID of %s \n" "${continent[$c]}" "$c" -done diff --git a/Bash/bulk_file_printer.sh b/Bash/bulk_file_printer.sh deleted file mode 100644 index c3b9bf333..000000000 --- a/Bash/bulk_file_printer.sh +++ /dev/null @@ -1,6 +0,0 @@ - -read -p "File extension: " ext; -for i in $(ls -l | wc -l) -do cat $(ls | grep $ext) -done - diff --git a/Bash/bulk_resize_images.sh b/Bash/bulk_resize_images.sh deleted file mode 100644 index d6412c44e..000000000 --- a/Bash/bulk_resize_images.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -convert -version > /dev/null 2>&1 || { echo >&2 "You need to install imagemagick (can be done with homebrew)"; exit 1; } - -cd "`dirname \"$0\"`" - -clear -read -p "Ending of source files (only ending, no dot, case sensitive): " ending -read -p "Resize to? (Example format: 650x650): " size -read -p "Crop the image (y/n)?: " crop -read -p "Quality (Format: 0-100)?: " quality -read -p "Save as (Format: png, jpg, gif)?: " end_format - -for file in *."$ending"; do - filename="${file%.*}" - - if [[ $crop =~ ^(yes|y|Y|Yes|YES)$ ]] - then - convert "$file" -resize "$size^" -gravity center -crop "$size+0+0" "web_$filename.$end_format" - else - convert "$file" -resize "$size" -quality "$quality" "web_$filename.$end_format" - fi - echo "File converted: $file" -done - -echo "Script finished." -exit 0; diff --git a/Bash/calculator.sh b/Bash/calculator.sh deleted file mode 100644 index 265d323f1..000000000 --- a/Bash/calculator.sh +++ /dev/null @@ -1,29 +0,0 @@ - -# !/bin/bash - -# Take user Input -echo "Enter Two numbers : " -read a -read b - -# Input type of operation -echo "Enter Choice :" -echo "1. Addition" -echo "2. Subtraction" -echo "3. Multiplication" -echo "4. Division" -read ch - -# Switch Case to perform -# calulator operations -case $ch in - 1)res=`echo $a + $b | bc` - ;; - 2)res=`echo $a - $b | bc` - ;; - 3)res=`echo $a \* $b | bc` - ;; - 4)res=`echo "scale=2; $a / $b" | bc` - ;; -esac -echo "Result : $res" diff --git a/Bash/clean_old_images.sh b/Bash/clean_old_images.sh deleted file mode 100644 index 939856176..000000000 --- a/Bash/clean_old_images.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# To clean the docker images with repository NONE, created when you create a new image from a previous repository - -isDifferentAdress=true -if [ -z "$1" ]; then - isDifferentAdress=false -fi - -if $isDifferentAdress ;then - -docker_images_to_del=$(docker -H $1 images |grep none|sed 's/\(\s\+\)/ /g'|cut -f3 -d" ") -else - - -docker_images_to_del=$(docker images |grep none|sed 's/\(\s\+\)/ /g'|cut -f3 -d" ") -fi -docker rmi $docker_images_to_del -~ - diff --git a/Bash/clear-docker-containers.sh b/Bash/clear-docker-containers.sh deleted file mode 100644 index 6106dd37d..000000000 --- a/Bash/clear-docker-containers.sh +++ /dev/null @@ -1 +0,0 @@ -docker ps -a --format={{.ID}} | tr '\n' ' ' | xargs docker rm diff --git a/Bash/cron.sh b/Bash/cron.sh deleted file mode 100755 index 02f7bf510..000000000 --- a/Bash/cron.sh +++ /dev/null @@ -1,12 +0,0 @@ -echo -e "\e[44m ########## Check Running CRONS ########## \e[0m" - IFS=$'\n' - - old_process=$(ps -eo command) - - while true; do - - new_process=$(ps -eo command) - diff <(echo "$old_process") <(echo "$new_process") - sleep 1 - old_process=$new_process -done diff --git a/Bash/dateintimestamp.sh b/Bash/dateintimestamp.sh deleted file mode 100644 index 9e5251bde..000000000 --- a/Bash/dateintimestamp.sh +++ /dev/null @@ -1,3 +0,0 @@ -#/bin/bash - -echo $(date +%s) diff --git a/Bash/escape_hello_world.sh b/Bash/escape_hello_world.sh deleted file mode 100644 index e69de29bb..000000000 diff --git a/Bash/example.sh b/Bash/example.sh deleted file mode 100644 index b9a63c2e2..000000000 --- a/Bash/example.sh +++ /dev/null @@ -1,7 +0,0 @@ -# For loop hello world example - -for i in {1..10} -do - echo $i - -done \ No newline at end of file diff --git a/Bash/extension_changer.sh b/Bash/extension_changer.sh deleted file mode 100644 index f70989677..000000000 --- a/Bash/extension_changer.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -#this script allows you to change all files ending with a specific extension to another extension -#example usage : to change all files in current directory with .flac extension to .mp3 extension : bash extension_changer.sh flac mp3 - -for f in *.$1; do - mv -- "$f" "${f%.$1}.$2" - done diff --git a/Bash/find.sh b/Bash/find.sh deleted file mode 100644 index 26db292dd..000000000 --- a/Bash/find.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -# will find files modified within the last 20 days. Useful for housekeeping unwanted logs > certain age. - -find . -type f -mtime -20 diff --git a/Bash/get-youtube_audio.sh b/Bash/get-youtube_audio.sh deleted file mode 100755 index ed90a906c..000000000 --- a/Bash/get-youtube_audio.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -youtube-dl -x --audio-format mp3 "$1" - - diff --git a/Bash/greetings-planet.sh b/Bash/greetings-planet.sh deleted file mode 100755 index c314d1e85..000000000 --- a/Bash/greetings-planet.sh +++ /dev/null @@ -1 +0,0 @@ -echo "Greetings earthlings, we have observed your planet from space and deemed it to be flat." diff --git a/Bash/hello-name.sh b/Bash/hello-name.sh deleted file mode 100644 index e3f9b2717..000000000 --- a/Bash/hello-name.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -echo "Welcome..." - -read -p 'You name is: ' NAME - -echo "Hello $NAME, have a nice day!" diff --git a/Bash/hello-world-sh b/Bash/hello-world-sh deleted file mode 100644 index 0841468c5..000000000 --- a/Bash/hello-world-sh +++ /dev/null @@ -1,2 +0,0 @@ -# Print "Hello World" -echo "Hello World!" diff --git a/Bash/hello.sh b/Bash/hello.sh deleted file mode 100644 index 23cc7be90..000000000 --- a/Bash/hello.sh +++ /dev/null @@ -1,4 +0,0 @@ -#Program to print hello world in Bash -echo "Hey! There World!" -read -p "Your name ?" name ;echo " Welcome Dear $name" - diff --git a/Bash/hello_german.sh b/Bash/hello_german.sh deleted file mode 100644 index 2562eae21..000000000 --- a/Bash/hello_german.sh +++ /dev/null @@ -1 +0,0 @@ -echo "Hello World in German is Halo Welt. Prost!" diff --git a/Bash/hello_tuga.sh b/Bash/hello_tuga.sh deleted file mode 100755 index 8c64fd0ad..000000000 --- a/Bash/hello_tuga.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Oi" -read -p "Manda aí o teu nome: " nome; -echo "Mékie mpt $nome" 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/Bash/hex b/Bash/hex deleted file mode 100644 index 1c80101ed..000000000 --- a/Bash/hex +++ /dev/null @@ -1,2 +0,0 @@ -# Linux Terminal -echo Hello World | hexdump -C diff --git a/Bash/hi.sh b/Bash/hi.sh deleted file mode 100644 index 8b2fe5434..000000000 --- a/Bash/hi.sh +++ /dev/null @@ -1 +0,0 @@ -echo hi diff --git a/Bash/hi_banner.sh b/Bash/hi_banner.sh deleted file mode 100755 index 9688355ef..000000000 --- a/Bash/hi_banner.sh +++ /dev/null @@ -1 +0,0 @@ -banner -w 48 hello world diff --git a/Bash/ilikebash.sh b/Bash/ilikebash.sh deleted file mode 100755 index cdf0c6af2..000000000 --- a/Bash/ilikebash.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -#made by girlingoggles - -echo "Hello there!" -echo "I like bash, a lot." | rev diff --git a/Bash/install-openvswitch-centos.sh b/Bash/install-openvswitch-centos.sh deleted file mode 100644 index 018a5eb2e..000000000 --- a/Bash/install-openvswitch-centos.sh +++ /dev/null @@ -1,10 +0,0 @@ -yum install wget openssl-devel python-sphinx gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel -y -useradd ovs -su - ovs -mkdir -p ~/rpmbuild/SOURCES -wget http://openvswitch.org/releases/openvswitch-2.9.2.tar.gz -cp openvswitch-2.9.2.tar.gz ~/rpmbuild/SOURCES/ -tar xfz openvswitch-2.9.2.tar.gz -rpmbuild -bb --nocheck openvswitch-2.9.2/rhel/openvswitch-fedora.spec -exit -rpm -i /home/ovs/rpmbuild/RPMS/x86_64/openvswitch-2.9.2-1.el7.x86_64.rpm diff --git a/Bash/install-qemu-kvm.sh b/Bash/install-qemu-kvm.sh deleted file mode 100644 index b36445c2f..000000000 --- a/Bash/install-qemu-kvm.sh +++ /dev/null @@ -1,2 +0,0 @@ -yum install -y qemu-kvm qemu-img libvirt libvirt-python libvirt-client virt-install virt-viewer - diff --git a/Bash/list-banned-ips.sh b/Bash/list-banned-ips.sh deleted file mode 100644 index 640c649ee..000000000 --- a/Bash/list-banned-ips.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -iptables -L -n | awk '$1=="REJECT" && $4!="0.0.0.0/0"' diff --git a/Bash/mount_cifs_share.sh b/Bash/mount_cifs_share.sh deleted file mode 100644 index d12b213ed..000000000 --- a/Bash/mount_cifs_share.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -echo 'Script for permanent mounting (fstab) a network share.' -sleep 1 -read -p 'Address of the server:' -r server -read -p 'Mountpoint on the server:' -r mount -read -p 'Local location where to mount the share:' local -read -p 'User for authentication:' -r user -read -p 'Password for that user:' -r password -echo 'Information gathered. Starting mount sequence.' -sleep 1 -echo 'Installation of cifs-utils Samba Client' -sleep 1 -sudo apt-get -y install cifs-utils -sleep 1 -echo "Creating the local mount point on: $local" -sleep 1 -mkdir -r $local -sleep 1 -echo "Connecting to $server" -sleep 1 -echo 'Enter the password for the user' -sleep 1 -sudo mount -t cifs //$server/$mount $local -o user=$user -sleep 1 -echo 'Connection established' -echo 'Writing mount to /etc/fstab' -sleep 1 -sudo echo "//$server/$mount $local cifs username=$user,password=$password 0 0" >> /etc/fstab -sleep 1 -echo 'Mount sequence finished' -exit 0 diff --git a/Bash/power.sh b/Bash/power.sh deleted file mode 100644 index 0eec16b8a..000000000 --- a/Bash/power.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -read -p "Enter number: " n -read -p "Enter index: " i -res=1 - -if((i==0)); -then - res=1 -fi - -if((n==0)); -then - res=0 -fi - -c=1 - -if((n>=1 && i>=1)); -then - while((c<=i)) - do - res=$((res*n)) - c=$((c+1)) - done -fi - -echo "$n raised to the power $i = $res" diff --git a/Bash/process_check.sh b/Bash/process_check.sh deleted file mode 100644 index bed09b2d7..000000000 --- a/Bash/process_check.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -#path to the executable script which starts the process -#samlpe for init.d script: /etc/init.d/ start -#sample for bash script: /home/user/daemonscript.sh -script="" - -#name of the process (get it from "top/ps" when process is running) -process="" - -if [ "$(pidof $process)" ] -then - #all right - date +%Y/%m/%D\ %H:%M:%S - echo "$process is running!" - echo '----------------------' -else - #not running start the script - date +%Y/%m/%D\ %H:%M:%S - echo "Starting $process..." - echo '----------------------' - sudo $script -fi diff --git a/Bash/quine.sh b/Bash/quine.sh deleted file mode 100755 index 86b5bd7ba..000000000 --- a/Bash/quine.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cat $0 diff --git a/Bash/random_files.sh b/Bash/random_files.sh deleted file mode 100644 index e25161ae2..000000000 --- a/Bash/random_files.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# This code allows you to give random name to all files in a directory having a perticular extention -# Usage - random_files.sh mp3 -# This would give random names to all files ending with .mp3 -if [ $# -lt 1 ]; then - echo "Please specify all the different types of extentions that exist (space seperated) as command line arguments" -else - - for ext in "$@" - do - for fname in *.$ext - do - mv "$fname" $RANDOM.$ext - echo mv "$fname" $RANDOM.$ext - done - done -fi diff --git a/Bash/random_number.sh b/Bash/random_number.sh deleted file mode 100644 index 4854f3e42..000000000 --- a/Bash/random_number.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Prints a random positive integer. If MAX value is passed the number will be -# smaller than or equal MAX, if no MAX is passed, max will be 100 - -MAX="100" - -if [ "$#" -ne "0" ] && [ "$1" -gt "0" ] - then MAX="$1" -fi - -echo $(( ( RANDOM % MAX ) + 1 )) \ No newline at end of file diff --git a/Bash/script-processid.sh b/Bash/script-processid.sh deleted file mode 100644 index 6d2f8b0f1..000000000 --- a/Bash/script-processid.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo -n "Hello this is a test script with process id:" -echo $$ - diff --git a/Bash/setup-build-env.sh b/Bash/setup-build-env.sh deleted file mode 100644 index 3a1d3f8d6..000000000 --- a/Bash/setup-build-env.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (C) Yash-Garg -# SPDX-License-Identifier: GPL-v3.0-only -# - -# Colors for script -BOLD="\033[1m" -GRN="\033[01;32m" -RED="\033[01;31m" -RST="\033[0m" -YLW="\033[01;33m" - -# Alias for echo to handle escape codes like colors -function echo() { - command echo -e "$@" -} - -# Prints an error in bold red -function die() { - echo "${RED}${1}${RST}" - [[ ${2} = "-h" ]] && ${0} -h - echo - exit 1 -} - -# Prints a statement in bold green -function success() { - echo "${GRN}${1}${RST}" - [[ -z ${2} ]] && echo -} - -# Prints a statement in bold yellow -function prnt_ylw() { - echo "${YLW}${1}${RST}" - [[ -z ${2} ]] && echo -} - -# Prints a formatted header; used for outlining -function echoText() { - - echo -e "${RED}" - echo -e "====$( for i in $(seq ${#1}); do echo -e "=\c"; done )====" - echo -e "== ${1} ==" - echo -e "====$( for i in $(seq ${#1}); do echo -e "=\c"; done )====" - echo -e "${RST}" -} - -# Creates a new line -function newLine() { - echo -e "" -} - -# Creates a new line -function newLine() { - echo -e "" -} - -# Function for installing debian packages -function debian_pkgs() { - echoText "Setting up build environment for Debian" - sudo apt-get update - sudo apt-get upgrade - sudo apt-get install openjdk-8-jdk git-core gnupg flex bison gperf lib32ncurses5-dev libx11-dev \ - build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 x11proto-core-dev \ - lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip make bc schedtool repo imagemagick -} - -# Function for installing arch packages -function arch_pkgs() { - echoText "Setting up build environment for Arch" - sudo pacman -Syyu - sudo pacman -S base-devel git wget multilib-devel cmake svn clang - -# Install ncurses5-compat-libs, lib32-ncurses5-compat-libs, aosp-devel, xml2, and lineageos-devel - for p in ncurses5-compat-libs lib32-ncurses5-compat-libs aosp-devel xml2 lineageos-devel; do - git clone https://aur.archlinux.org/$p - cd $p - makepkg -si --skippgpcheck - cd - - rm -rf $p - done - - echo "Don't forget to run these commands before building, or make sure the python in your PATH is - python2 and not python3" - echo " - virtualenv2 venv - source venv/bin/activate" -} - -# Function for installing fedora packages -function fedora_pkgs() { - echoText "Setting up build environment for fedora" - sudo dnf -y update - sudo dnf install autoconf213 bison bzip2 ccache curl flex gawk gcc-c++ git glibc-devel \ - glibc-static libstdc++-static libX11-devel make mesa-libGL-devel ncurses-devel patch zlib-devel \ - ncurses-devel.i686 readline-devel.i686 zlib-devel.i686 libX11-devel.i686 mesa-libGL-devel.i686 \ - glibc-devel.i686 libstdc++.i686 libXrandr.i686 zip perl-Digest-SHA wget lzop openssl-devel \ - java-1.8.0-openjdk-devel ImageMagick ncurses-compat-libs -} - -# Parameters -while [[ $# -gt 0 ]] -do -param="$1" - -case $param in - -a|--arch) - ARCH="arch" - ;; - -d|--debian) - DEBIAN="debian" - ;; - -f|--fedora) - FEDORA="fedora" - ;; - -h|--help) - newLine; echo "Usage: bash distro-setup.sh -a, -d or -f [For arch/debian/fedora]"; newLine - exit - ;; - - *) newLine; die "Invalid parameter specified! Use --help for more info" ;; - -esac -shift -done - -# Define actions on parameters -if [[ "${ARCH}" == "arch" ]]; then - arch_pkgs; - success "Script succeeded" - -elif [[ "${DEBIAN}" == "debian" ]]; then - debian_pkgs; - success "Script succeeded" - -elif [[ "${FEDORA}" == "fedora" ]]; then - fedora_pkgs; - success "Script succeeded" - -fi diff --git a/Bash/simple script hello world.sh b/Bash/simple script hello world.sh deleted file mode 100644 index ccd053d79..000000000 --- a/Bash/simple script hello world.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# This is a comment! -echo Hello World # This is a comment, too! \ No newline at end of file diff --git a/Bash/startvenv.sh b/Bash/startvenv.sh deleted file mode 100644 index 12eb12ed5..000000000 --- a/Bash/startvenv.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# This code starts a python virtual environment from anywhere -# Replace the path in line 13 with the path where you have stored all your virtual environments (dont replace $1) -# Usage source startvenv -# Ex: source startvenv hello_world -# This will start a virtual environment with the name hello_world (if it exists) - -if [ $# -lt 1 ]; then - echo "Please specify the name of Virtual Environment you want to start" - -else - - vir_path=/media/coderdude/Adwait/virtual_environs/$1 - # this should be replaced with vir_path = /$1 - if [ ! -d $vir_path ]; then - echo "Virtual Environment of this name does not exist " - - - else - echo "Starting "$1 "..." - source $vir_path/bin/activate - echo "If the Virtual Environment does not start , execute startvir by preceding with 'source' or a '.'" - echo "Example : " - echo ". startvir name_of_VE " - echo "source startvir name_of_VE" - fi -fi diff --git a/Bash/stop_process.sh b/Bash/stop_process.sh deleted file mode 100644 index 9dc50fb83..000000000 --- a/Bash/stop_process.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -services=(one two three) - -# When the specified service does not have a init.d script use the following code -# Kill the process -for i in "${services[@]}" -do - echo "Killing the process of service: $i" - pid=$(pidof $i) - kill $pid -done - - -# When the specified service has a init.d script use the following code -# Stop the service -for i in "${services[@]}" -do - echo "Stopping the service: $i" - service $i stop -done diff --git a/Bash/systeminfo.sh b/Bash/systeminfo.sh deleted file mode 100644 index a2c4dd4fb..000000000 --- a/Bash/systeminfo.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -echo "IP Adresses:" -ip addr | grep inet -#alt -#ip addr | awk '{match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/); ip = substr($0,RSTART,RLENGTH); print ip}' - -echo "__________________________________________________________________" - -echo "CPU Info:" -cat /proc/cpuinfo | grep "model name" -cat /proc/cpuinfo | grep "cores" - -echo "__________________________________________________________________" - -echo "Memory Info:" -awk 'NR>=0&&NR<=3' "/proc/meminfo" - -echo "__________________________________________________________________" - -echo "Linux Version Info:" -cat /proc/version - -echo "__________________________________________________________________" - -echo "Kernel Information:" -cat /proc/sys/kernel/version - -echo "__________________________________________________________________" - -echo "File System Information:" -sudo fdisk -l diff --git a/Bash/test-lab2-part1-d.sh b/Bash/test-lab2-part1-d.sh deleted file mode 100644 index 34de6cc2d..000000000 --- a/Bash/test-lab2-part1-d.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -########################################## -# this file contains: -# SYMLINK TEST: test for symlink correctness -########################################### - -DIR=$1 -ORIG_FILE=/etc/hosts - -echo "SYMLINK TEST" -rm ${DIR}/hosts ${DIR}/testhostslink ${DIR}/hosts_copy ${DIR}/hosts_copy2 >/dev/null 2>&1 - -ln -s ${ORIG_FILE} ${DIR}/hosts -diff ${ORIG_FILE} $DIR/hosts >/dev/null 2>&1 -if [ $? -ne 0 ]; -then - echo "failed SYMLINK test" - exit -fi - -cp ${ORIG_FILE} $DIR/hosts_copy -ln -s hosts_copy $DIR/testhostslink -diff $DIR/testhostslink $DIR/hosts_copy >/dev/null 2>&1 -if [ $? -ne 0 ]; -then - echo "failed SYMLINK test" - exit -fi - -rm $DIR/hosts_copy -touch $DIR/hosts_copy -diff $DIR/testhostslink $DIR/hosts_copy >/dev/null 2>&1 -if [ $? -ne 0 ]; -then - echo "failed SYMLINK test" - exit -fi - -echo "Passed SYMLINK TEST" \ No newline at end of file diff --git a/Bash/train.sh b/Bash/train.sh deleted file mode 100755 index dfe3f0c52..000000000 --- a/Bash/train.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -count=0 -while [ $count -ne 10 ]; do - sl || ( [ $count -eq 0 ] && sudo apt install -y sl) - count=$((count+1)) -done \ No newline at end of file diff --git a/Bash/while.sh b/Bash/while.sh deleted file mode 100644 index 9ed53bcd9..000000000 --- a/Bash/while.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -i=10 -sum=0 -while [ $i -gt 0 ] -do - sum=$((sum+i)) - i=$((i-1)) - -done - -echo "Sum = $sum" diff --git a/Basic/Hello World b/Basic/Hello World deleted file mode 100644 index aa6f1cf5e..000000000 --- a/Basic/Hello World +++ /dev/null @@ -1,9 +0,0 @@ -10 PRINT "HELLO AMERICA"; -15 REM (Obviously optional, but included 99.9999% of the time...) -20 GOTO 10 -30 REM RUN (AWAY, LAUGHING) -40 REM Poor old Basic - everybody's forgotten you... -50 REM From the terminal enter RUN 100 to run the following code: -60 REM ASCII code 7 is the physical bell on the old teletype terminals, this next code rings the bell as fast as possible -100 PRINT CHR$(7) -110 GOTO 100 diff --git a/Basic/helloworld b/Basic/helloworld deleted file mode 100644 index f007f410f..000000000 --- a/Basic/helloworld +++ /dev/null @@ -1 +0,0 @@ -15 PRINT "HELLO WORLD"; diff --git a/Basic/helloworldbasic b/Basic/helloworldbasic deleted file mode 100644 index cc9276e39..000000000 --- a/Basic/helloworldbasic +++ /dev/null @@ -1,2 +0,0 @@ -10 PRINT "Hello, World!" -20 END diff --git a/Batch Script/Dice.bat b/Batch Script/Dice.bat deleted file mode 100644 index 87111141c..000000000 --- a/Batch Script/Dice.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -SET /a _rand=(%RANDOM%*6/32768)+1 -ECHO Dice rolled: %_rand% -@PAUSE \ No newline at end of file diff --git a/Batch Script/Hello_World.bat b/Batch Script/Hello_World.bat deleted file mode 100644 index df1983c6d..000000000 --- a/Batch Script/Hello_World.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off - -echo Hello world. - -pause diff --git a/Batch Script/Okay.bat b/Batch Script/Okay.bat deleted file mode 100644 index 719719257..000000000 --- a/Batch Script/Okay.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -echo hello world diff --git a/Batch Script/hlo world b/Batch Script/hlo world deleted file mode 100644 index 1f922d736..000000000 --- a/Batch Script/hlo world +++ /dev/null @@ -1,3 +0,0 @@ -@echo off - -echo Hello World diff --git a/Batch Script/input.bat b/Batch Script/input.bat deleted file mode 100644 index e0a85ab35..000000000 --- a/Batch Script/input.bat +++ /dev/null @@ -1,76 +0,0 @@ -@echo off -setlocal EnableDelayedExpansion -::::: -:: Advanced user input in batch [using xcopy] -::::: -:: Returns by echoing result. -:: Fetching using for /f from main -::::: -set "prompt=" -:: the input prompt -set "symbol=" -:: the symbol that displays instead -set "length=" -:: the max length of the input -set "allowed=" -:: allowed characters ("a b c A B C") -set "invalid=" -:: invalid characters ("b c d B C D") -:: allowed characters will override invalid -::::: - -:: parse flags dict -:flags -if not "%~1" == "" ( - set "%~1" - shift - goto flags -) - -:: Fetch needed characters -for /f %%A in ('copy /Z "%comspec%" nul') do set "CR=%%A" -for /f %%A in ('"prompt $H&for %%B in (1) do rem"') do set "BS=%%A" -:: start of program -if defined symbol set "symbol=%symbol:~0,1%" -set "input=." -CON -:input -set "key=" -for /f "delims=" %%A in ('xcopy /w "%comspec%" "%comspec%" 2^>nul') do if not defined key set "key=%%A" -set "key=!key:~-1!" -if !key! equ !BS! ( - if NOT "!input!" == "." ( - set "input=!input:~0,-1!" - CON - ) -) else if !key! equ !CR! ( - echo+ >CON - echo+!input:~1! - exit /B 0 -) else ( - if defined length ( - if "!input:~-%length%!" == "!input!" (call) - ) else ( - (call) - ) -) || ( - if defined allowed ( - for %%A IN (!allowed!) DO if %%A equ !key! ( - set "input=!input!!key!" - if defined symbol ( - CON - ) else ( - CON - ) - ) - ) else ( - for %%A IN (!invalid!) DO if %%A equ !key! goto input - set "input=!input!!key!" - if defined symbol ( - CON - ) else ( - CON - ) - ) -) -goto input diff --git a/Battleship/battleship.css b/Battleship/battleship.css deleted file mode 100644 index d18004130..000000000 --- a/Battleship/battleship.css +++ /dev/null @@ -1,54 +0,0 @@ -body { - background-color: green; -} - -div#board { - position: relative; - width: 1024px; - height: 863px; - margin: auto; - background: url("board.jpg") no-repeat; -} - -div#messageArea { - position: absolute;; - top: 0px; - left: 0px; - color: rgb(83,175,19); -} - -table { - position: absolute; - left: 173px; - top: 98px; - border-spacing: 0px; -} - -td { - width: 94px; - height: 94px; -} - -form { - position: absolute; - bottom: 0px; - right: 0px; - padding: 15px; - background-color: rgb(83,175,19); -} - -form input { - background-color: rgb(152, 207, 113); - border-color: rgb(83, 175, 19); - font-size: 1em; -} - -.hit { - background: url("ship.png") no-repeat center center; -} - -.miss { - background: url("miss.png") no-repeat center center; -} - - diff --git a/Battleship/battleship.html b/Battleship/battleship.html deleted file mode 100644 index 6d443e6fa..000000000 --- a/Battleship/battleship.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Battleship - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
-
- - - \ No newline at end of file diff --git a/Battleship/battleship.js b/Battleship/battleship.js deleted file mode 100644 index 30f9f6b21..000000000 --- a/Battleship/battleship.js +++ /dev/null @@ -1,185 +0,0 @@ - -var model = { - boardSize: 7, - numShips: 3, - shipLength: 3, - shipsSunk: 0, - ships: [{ locations: [0, 0, 0], hits: ["", "", ""] }, - { locations: [0, 0, 0], hits: ["", "", ""] }, - { locations: [0, 0, 0], hits: ["", "", ""] }], - - fire: function(guess) { - for (var i = 0; i < this.numShips; i++) { - var ship = this.ships[i]; - var index = ship.locations.indexOf(guess); - if (index >= 0) { - ship.hits[index] = "hit"; - view.displayHit(guess); - view.displayMessage("HIT!"); - if (this.isSunk(ship)) { - view.displayMessage("You sank my battleship!"); - this.shipsSunk++; - } - return true; - } - } - view.displayMiss(guess); - view.displayMessage("You missed."); - return false; - }, - - isSunk: function(ship) { - for (var i = 0; i < this.shipLength; i++) { - if(ship.hits[i] !== "hit") { - return false; - } - } - return true; - }, - - generateShipLocations: function() { - var locations; - for (var i = 0; i < this.numShips; i++) { - do { - locations = this.generateShip(); - } while(this.collision(locations)); - this.ships[i].locations = locations; - } - }, - - generateShip: function() { - var direction = Math.floor(Math.random() * 2); - var row, col; - //1 for horizontal ship ans 0 for vertical ship - if (direction === 1) { - //Generate a starting location for a horizontal ship - row = Math.floor(Math.random() * this.boardSize); - col = Math.floor(Math.random() * (this.boardSize - this.shipLength)); - } else { - //Generate a starting location for a vertical ship - row = Math.floor(Math.random() * (this.boardSize - this.shipLength)); - col = Math.floor(Math.random() * this.boardSize); - } - - var newShipLocations = []; - for (var i = 0; i < this.shipLength; i++) { - if (direction === 1) { - //add location to array for new horizontal ship - newShipLocations.push(row + "" + (col + i)); - } else { - //add location to array for new vertical ship - newShipLocations.push((row + i) + "" + col); - } - } - return newShipLocations; - }, - - collision: function(locations) { - for (var i = 0; i < this.numShips; i++) { - var ship = model.ships[i] - for(var j = 0; j < locations.length; j++) { - if (ship.locations.indexOf(locations[j]) >= 0) { - return true; - } - } - } - return false; - } -}; - - -var view = { - displayMessage: function(msg) { - var messageArea = document.getElementById("messageArea"); - messageArea.innerHTML = msg; - }, - - displayMiss: function(location) { - var cell = document.getElementById(location); - cell.setAttribute("class", "miss"); - }, - - displayHit: function(location) { - var cell = document.getElementById(location); - cell.setAttribute("class", "hit"); - } -}; - -var controller = { - guesses: 0, - processGuess: function(guess) { - var location = parseGuess(guess); - if (location) { - this.guesses++; - var hit = model.fire(location); - if (hit && model.shipsSunk === model.numShips) { - view.displayMessage("You sank all my battleship, in " + this.guesses + " guesses"); - } - } - } -}; - -/* -model.fire("53"); -model.fire("06"); -model.fire("16"); -model.fire("26"); -model.fire("34"); -model.fire("24"); -model.fire("44"); -model.fire("12"); -model.fire("11"); -model.fire("10"); -*/ - -function parseGuess(guess) { - var alphabet = ["A", "B", "C", "D", "E", "F", "G"]; - - if (guess === null || guess.length !==2) { - alert("Opps, please enter a letter and a number on the board."); - } else { - var firstChar = guess.charAt(0); - var row = alphabet.indexOf(firstChar); - var column = guess.charAt(1); - - if (isNaN(row) || isNaN(column)) { - alert("Oops, that isn't on the board."); - } else if (row < 0 || row >= model.boardSize || column < 0 || column >= model.boardSize) { - alert("Oops, that's off the board!"); - - } else { - return row + column; - } - } - return null; -} - -function handleFireButton() { - var guessInput = document.getElementById("guessInput"); - var guess = guessInput.value; - controller.processGuess(guess); - guessInput.value = ""; -} - -function handleKeyPress(e) { - var fireButton = document.getElementById("fireButton"); - if (e.keyCode === 13) { - console.log("handleKeyPress"); - fireButton.click(); - return false; - } -} - -window.onload = init; - -function init() { - var fireButton = document.getElementById("fireButton"); - fireButton.onclick = handleFireButton; - - var guessInput = document.getElementById("guessInput"); - guessInput.onkeypress = handleKeyPress; - - model.generateShipLocations(); -} - - diff --git a/Battleship/board.jpg b/Battleship/board.jpg deleted file mode 100755 index f1616c1a1..000000000 Binary files a/Battleship/board.jpg and /dev/null differ diff --git a/Battleship/miss.png b/Battleship/miss.png deleted file mode 100755 index 471b3a673..000000000 Binary files a/Battleship/miss.png and /dev/null differ diff --git a/Battleship/ship.png b/Battleship/ship.png deleted file mode 100755 index 955a7e539..000000000 Binary files a/Battleship/ship.png and /dev/null differ diff --git a/Battlestar/hello.bts b/Battlestar/hello.bts deleted file mode 100644 index 6e05f05e3..000000000 --- a/Battlestar/hello.bts +++ /dev/null @@ -1,2 +0,0 @@ -const hello = "Hello, world!\n" -print(hello) diff --git a/BeanShell/helloworld.bsh b/BeanShell/helloworld.bsh deleted file mode 100644 index 77e7f7c01..000000000 --- a/BeanShell/helloworld.bsh +++ /dev/null @@ -1,2 +0,0 @@ -var = "Hello, World!!" -print(var) diff --git a/Befunge/hello1.bf b/Befunge/hello1.bf deleted file mode 100644 index 7ccf6d1b5..000000000 --- a/Befunge/hello1.bf +++ /dev/null @@ -1,5 +0,0 @@ -> v -v ,,,,,"Hello"< ->48*, v -v,,,,,,"World!"< ->25*,@ \ No newline at end of file diff --git a/Befunge/hello2.bf b/Befunge/hello2.bf deleted file mode 100644 index 11bb76a19..000000000 --- a/Befunge/hello2.bf +++ /dev/null @@ -1,3 +0,0 @@ ->25*"!dlrow ,olleH":v - v:,_@ - > ^ \ No newline at end of file diff --git a/Befunge93/README b/Befunge93/README deleted file mode 100644 index 60905d238..000000000 --- a/Befunge93/README +++ /dev/null @@ -1,6 +0,0 @@ -Running a befunge program isn't all that fun if you can't see what is happening. -These sites show you what's going on and it's pretty fun... - -https://www.bedroomlan.org/tools/befunge-playground/#top -http://www.quirkster.com/iano/js/befunge.html -https://tio.run/#befunge diff --git a/Befunge93/helloworld.bf b/Befunge93/helloworld.bf deleted file mode 100644 index c34ddb91f..000000000 --- a/Befunge93/helloworld.bf +++ /dev/null @@ -1 +0,0 @@ -"!dlrow olleH">:#,_@ diff --git a/BigosLang/hello.big b/BigosLang/hello.big deleted file mode 100644 index 9526d61b7..000000000 --- a/BigosLang/hello.big +++ /dev/null @@ -1,4 +0,0 @@ -#wstaw -główny: -messagebox("Hello World","Hello Hacktoberfest 2018!",messagebox.iconinformation) -zakończ diff --git a/Bliss/HelloWorld.bli b/Bliss/HelloWorld.bli deleted file mode 100644 index 3153f98ba..000000000 --- a/Bliss/HelloWorld.bli +++ /dev/null @@ -1,17 +0,0 @@ -%TITLE 'helloworld' -MODULE helloworld (IDENT='V1.0', MAIN=helloworld, - ADDRESSING_MODE (EXTERNAL=GENERAL)) = -BEGIN - - LIBRARY 'SYS$LIBRARY:STARLET'; - - EXTERNAL ROUTINE - LIB$PUT_OUTPUT; - -GLOBAL ROUTINE helloworld = -BEGIN - LIB$PUT_OUTPUT(%ASCID %STRING('Hello world!')) -END; - -END -ELUDOM diff --git a/Boo/HelloWorld.boo b/Boo/HelloWorld.boo deleted file mode 100644 index 95260097e..000000000 --- a/Boo/HelloWorld.boo +++ /dev/null @@ -1,2 +0,0 @@ -Console.WriteLine "Hello, world!" - diff --git a/Boo/fancy_hello_world.boo b/Boo/fancy_hello_world.boo deleted file mode 100644 index dda848f41..000000000 --- a/Boo/fancy_hello_world.boo +++ /dev/null @@ -1,6 +0,0 @@ -import System.Drawing -import System.Windows.Forms -f = Form () -f. Controls.Add(Label (Text : “Hello, world!”, Location: Point (40,30))) -f. Controls.Add(Button (Text : “ok”, Location Point (50,55), Click: (Application.Exit()))) -Application.Run(f) diff --git a/Brain-Flak/helloworld.bf b/Brain-Flak/helloworld.bf deleted file mode 100644 index 2f5d13df1..000000000 --- a/Brain-Flak/helloworld.bf +++ /dev/null @@ -1 +0,0 @@ -(((((((((((()()()()){}){}){}()))){}{}())[][][][])[][])[[]]())[[][][][][]]())([([]([])[][]{})]()()()([[]](([()()()]([([][][])](((({}()){}))){}{}))))) diff --git a/BrainLanguage/hello.brn b/BrainLanguage/hello.brn deleted file mode 100644 index 2237fc8a0..000000000 --- a/BrainLanguage/hello.brn +++ /dev/null @@ -1 +0,0 @@ -"Hello, world" println. diff --git a/BrainLanguage/hello2.brn b/BrainLanguage/hello2.brn deleted file mode 100644 index 4c7f1dd2c..000000000 --- a/BrainLanguage/hello2.brn +++ /dev/null @@ -1 +0,0 @@ -"AnotherHello, world" println. diff --git a/BrainLanguage/hello3.brn b/BrainLanguage/hello3.brn deleted file mode 100644 index acb226741..000000000 --- a/BrainLanguage/hello3.brn +++ /dev/null @@ -1 +0,0 @@ -"AnotherAnotherHello, world" println. diff --git a/BrainLanguage/hello4.brn b/BrainLanguage/hello4.brn deleted file mode 100644 index a8ca55b56..000000000 --- a/BrainLanguage/hello4.brn +++ /dev/null @@ -1 +0,0 @@ -"AnotherAnotherAnotherHello, world" println. diff --git a/BrainLanguage/hello5.brn b/BrainLanguage/hello5.brn deleted file mode 100644 index ef3a838a5..000000000 --- a/BrainLanguage/hello5.brn +++ /dev/null @@ -1 +0,0 @@ -"AnotherAnotherAnotherAnotherHello, world" println. diff --git a/Brainfuck/HelloCruelWorld.bf b/Brainfuck/HelloCruelWorld.bf deleted file mode 100644 index 7cd136732..000000000 --- a/Brainfuck/HelloCruelWorld.bf +++ /dev/null @@ -1 +0,0 @@ ->+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++. 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/Brainfuck/SquareNumbers.bf b/Brainfuck/SquareNumbers.bf deleted file mode 100644 index fa0a6f8c4..000000000 --- a/Brainfuck/SquareNumbers.bf +++ /dev/null @@ -1,5 +0,0 @@ -++++[>+++++<-]>[<+++++>-]+<+[ - >[>+>+<<-]++>>[<<+>>-]>>>[-]++>[-]+ - >>>+[[-]++++++>>>]<<<[[<++++++++<++>>-]+<.<[>----<-]<] - <<[>>>>>[>>>[-]+++++++++<[>-<-]+++++++++>[-[<->-]+[<<<]]<[>+<-]>]<<-]<<- -] diff --git a/Brainfuck/SumOf2Int.bf b/Brainfuck/SumOf2Int.bf deleted file mode 100644 index 8fffb4b02..000000000 --- a/Brainfuck/SumOf2Int.bf +++ /dev/null @@ -1 +0,0 @@ -,>++++++[<-------->-],[<+>-]<. diff --git a/Brainfuck/compliers/dbfi.bf b/Brainfuck/compliers/dbfi.bf deleted file mode 100644 index 666df07f7..000000000 --- a/Brainfuck/compliers/dbfi.bf +++ /dev/null @@ -1,6 +0,0 @@ ->>>+[[-]>>[-]++>+>+++++++[<++++>>++<-]++>>+>+>+++++[>++>++++++<<-]+>>>,<++[[>[ -->>]<[>>]<<-]<[<]<+>>[>]>[<+>-[[<+>-]>]<[[[-]<]++<-[<+++++++++>[<->-]>>]>>]]<< -]<]<[[<]>[[>]>>[>>]+[<<]<[<]<+>>-]>[>]+[->>]<<<<[[<<]<[<]+<<[+>+<<-[>-->+<<-[> -+<[>>+<<-]]]>[<+>-]<]++>>-->[>]>>[>>]]<<[>>+<[[<]<]>[[<<]<[<]+[-<+>>-[<<+>++>- -[<->[<<+>>-]]]<[>+<-]>]>[>]>]>[>>]>>]<<[>>+>>+>>]<<[->>>>>>>>]<<[>.>>>>>>>]<<[ ->->>>>>]<<[>,>>>]<<[>+>]<<[+<<]<] diff --git a/Brainfuck/compliers/qdb.c b/Brainfuck/compliers/qdb.c deleted file mode 100644 index 70587d2bc..000000000 --- a/Brainfuck/compliers/qdb.c +++ /dev/null @@ -1,91 +0,0 @@ -/* qdb.c -- quick and dirty brainfuck interpreter. - Version 1.0, 12/19/04 - Daniel B Cristofani - email cristofdathevanetdotcom - http://www.hevanet.com/cristofd/brainfuck/ */ - -/*Make any use you like of this software. I can't stop you anyway. :)*/ - -/* This interpreter uses byte cells, wraps around on overflow or - underflow, has unpredictable misbehavior if the pointer is moved - outside the array, and interprets '#' as a command to output the - first sixteen cells of the array, plus a '^' for the pointer. It - should be fairly fast, but no match for a decent compiler or even - for a really clever interpreter. */ - -#include - -#define S 65536 - -int t[S]; -char a[S], p[S], bf[256]; -int b, c, d, g, h, i, j, k, m, n, x; -FILE *prog; - -int main(int argc, char **argv){ - if (!(prog=fopen(argv[1], "r"))){ - fprintf(stderr, "can't open the file \"%s\".\n", argv[1]); - exit(1); - } - g=fread(p, 1, S, prog); - fclose(prog); - bf['<']=bf['>']=bf['+']=bf['-']=bf[',']=bf['.']=bf['[']=bf[']']=bf['#']=1; - m=S; - while (i': if (c<=4) p[j++]='h'+c; else p[j]='>', t[j++]=c; break; - case '<': if (c<=4) p[j++]='l'+c; else p[j]='<', t[j++]=c; break; - case ',': while (c--) p[j++]=','; break; - case '.': while (c--) p[j++]='.'; break; - case '[': while (c--) t[--m]=j; p[j++]='['; break; - case ']': if (m+c>S)fprintf(stderr, "unbalanced ].\n"), exit(1); - t[j]=t[m]+1; while (c--) t[t[m++]]=j+1; p[j++]=']';break; - case '#': while (c--) p[j++]='#'; break; - } - b=d; - } - p[j]=0; - if (m!=S) fprintf(stderr, "unbalanced [.\n"), exit(1); - j=0; - while(1){ - switch (p[j]){ - case '+': a[x]+=t[j++]; break; - case '-': a[x]-=t[j++]; break; - case '>': x+=t[j++]; break; - case '<': x-=t[j++]; break; - case '[': if (!a[x]) j=t[j]; else j++; break; - case ']': if (a[x]) j=t[j]; else j++; break; -#if '\n' == 10 - case ',': if ((c=getchar())!=EOF) a[x]=c; j++; break; - case '.': putchar(a[x]); j++; break; -#else - case ',': if ((c=getchar())!=EOF)a[x]=c=='\n'?10:c; j++; break; - case '.': putchar(a[x]==10?'\n':a[x]); j++; break; -#endif - case 'a': a[x]++; j++; break; - case 'b': a[x]+=2; j++; break; - case 'c': a[x]+=3; j++; break; - case 'd': a[x]+=4; j++; break; - case 'e': a[x]--; j++; break; - case 'f': a[x]-=2; j++; break; - case 'g': a[x]-=3; j++; break; - case 'h': a[x]-=4; j++; break; - case 'i': x++; j++; break; - case 'j': x+=2; j++; break; - case 'k': x+=3; j++; break; - case 'l': x+=4; j++; break; - case 'm': x--; j++; break; - case 'n': x-=2; j++; break; - case 'o': x-=3; j++; break; - case 'p': x-=4; j++; break; - case '#': printf("\n%3d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d\n" - "%*s\n",*a,a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8], - a[9],a[10],a[11],a[12],a[13],a[14],a[15],x*4+3,"^"); j++; break; - case 0: exit(0); break; - } - } -} diff --git a/Brainfuck/digix.bf b/Brainfuck/digix.bf deleted file mode 100644 index 8c1a311df..000000000 --- a/Brainfuck/digix.bf +++ /dev/null @@ -1 +0,0 @@ -,>+++ +++[<++++++++>-] diff --git a/Brainfuck/factoriel.bf b/Brainfuck/factoriel.bf deleted file mode 100644 index ef255ea9d..000000000 --- a/Brainfuck/factoriel.bf +++ /dev/null @@ -1 +0,0 @@ ->++++++++++>>>+>+[>>>+[-[<<<<<[+<<<<<]>>[[-]>[<<+>+>-]<[>+<-]<[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>[-]>>>>+>+<<<<<<-[>+<-]]]]]]]]]]]>[<+>-]+>>>>>]<<<<<[<<<<<]>>>>>>>[>>>>>]++[-<<<<<]>>>>>>-]+>>>>>]<[>++<-]<<<<[<[>+<-]<<<<]>>[->[-]++++++[<++++++++>-]>>>>]<<<<<[<[>+>+<<-]>.<<<<<]>.>>>>] diff --git a/Brainfuck/fibo.bf b/Brainfuck/fibo.bf deleted file mode 100644 index 087337ab4..000000000 --- a/Brainfuck/fibo.bf +++ /dev/null @@ -1 +0,0 @@ ->++++++++++>+>+[[+++++[>++++++++<-]>.<++++++[>--------<-]+<<<]>.>>[[-]<[>+<-]>>[<<+>+>-]<[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>[-]>+>+<<<-[>+<-]]]]]]]]]]]+>>>]<<<] diff --git a/Brainfuck/fibonacci.bf b/Brainfuck/fibonacci.bf deleted file mode 100644 index e5f228f7e..000000000 --- a/Brainfuck/fibonacci.bf +++ /dev/null @@ -1,15 +0,0 @@ -Computes Fibonnaci's sequence but prints character instead of digits -Can be read with `head -c 12 | hexdump -v -e '/1 "%3i\n"'` - -Initialize sequence ->.>+. -[ -Compute -[-<+>>+<] -Print -<. -Restore -[->+<] ->>[-<<+>>]<< -> -] diff --git a/Brainfuck/hello-hacktoberfest-2018.bf b/Brainfuck/hello-hacktoberfest-2018.bf deleted file mode 100644 index 6940a0890..000000000 --- a/Brainfuck/hello-hacktoberfest-2018.bf +++ /dev/null @@ -1 +0,0 @@ -++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<<<.>>+++++++++.++.<----.+++++++++.-----.>-.+++.<+++.>+.-.<+.+.>>.<<<----------------------.--.+.+++++++.>>>+. diff --git a/Brainfuck/hello_brainfuck.bf b/Brainfuck/hello_brainfuck.bf deleted file mode 100644 index 2627cf184..000000000 --- a/Brainfuck/hello_brainfuck.bf +++ /dev/null @@ -1 +0,0 @@ -+[-[<<[+[--->]-[<<<]]]>>>-]>-.---.>..>.<<<<-.<+.>>>>>.>.<<.<-. diff --git a/Brainfuck/hello_world.bf b/Brainfuck/hello_world.bf deleted file mode 100644 index 448068b5f..000000000 --- a/Brainfuck/hello_world.bf +++ /dev/null @@ -1 +0,0 @@ -+[+++<+<<->>>[+>]>+<<++]>>>>--.>.>>>..+++.>>++.<<<.>>--.<.+++.------.<<<-.<<. diff --git a/Brainfuck/multiply.bf b/Brainfuck/multiply.bf deleted file mode 100644 index 152a6eeaa..000000000 --- a/Brainfuck/multiply.bf +++ /dev/null @@ -1 +0,0 @@ -,>,[>[>+>+<<-]>>[<<+>>-]<<<-] diff --git a/Brainfuck/replicando.bf b/Brainfuck/replicando.bf deleted file mode 100644 index 6211b99ed..000000000 --- a/Brainfuck/replicando.bf +++ /dev/null @@ -1 +0,0 @@ -,>,-[[->>+<<]<[->+>+<<]>>[-<<+>>]>-[-<+>]<] diff --git a/Brainfuck/sum.bf b/Brainfuck/sum.bf deleted file mode 100644 index 9840a2aa5..000000000 --- a/Brainfuck/sum.bf +++ /dev/null @@ -1 +0,0 @@ ->,[>+++++++[<------->-]<+[-<+>],]>-[+<[->+>+<<]>>[-<<+>>]<<<[->>>+>+<<<<]>>>>[-<<<<+>>>>]<[-[-[-[-[-[-[-[-[-[<<+<---------->>>[-]]]]]]]]]]]<<[->->+<<]>>[-<<+>>]<]<[>+++++++[<+++++++>-]<-.[-]]+++++++[<+++++++>-]<-. diff --git a/Brainfuck/sum2nums.bf b/Brainfuck/sum2nums.bf deleted file mode 100644 index ff5292b57..000000000 --- a/Brainfuck/sum2nums.bf +++ /dev/null @@ -1,27 +0,0 @@ -, # Read first number -> # Move the data pointer to next cell -, # Read the second number -> # Move the data pointer to third cell - -# Logic to convert ASCII numbers to their decimal format -++++++++ # Init third cell to 8 -[ - - - < - ------ - < - ------ - >> -] - -# Sum the numbers -< # Move the pointer from 3rd cell to 2nd cell -[ - - - < - + - > -] - -# Move to 1st cell and print the sum -< . diff --git a/Brainfuck/text generator b/Brainfuck/text generator deleted file mode 100644 index 16bf61ca2..000000000 --- a/Brainfuck/text generator +++ /dev/null @@ -1 +0,0 @@ -+++++[>+++++++++<-],[[>--.++>+<<-]>+.->[<.>-]<<,] diff --git a/Bro/main.bro b/Bro/main.bro deleted file mode 100644 index 0399296f8..000000000 --- a/Bro/main.bro +++ /dev/null @@ -1,3 +0,0 @@ -event bro_init() { - print "Hello, World!"; -} diff --git a/C ++/HelloWorldd b/C ++/HelloWorldd deleted file mode 100644 index c42e857be..000000000 --- a/C ++/HelloWorldd +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World Wanderer!"; - return 0; -} diff --git a/C ++/SWAPPING_TECHNIQUES.c b/C ++/SWAPPING_TECHNIQUES.c deleted file mode 100644 index 3ae258f9b..000000000 --- a/C ++/SWAPPING_TECHNIQUES.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -void swap1(int a,int b); -void swap2(int a,int b); -void swap3(int a,int b); - -int main() -{ -int a,b; -printf("enter two number to be swapped in order to implement please avoid 0 as input:"); -scanf("%d%d",&a,&b); - -swap1(a,b); -swap2(a,b); -swap3(a,b); - -return 0; -} - -void swap1(int a,int b) -{ -b=a+b; -a=b-a; -b=b-a; - -printf("the swapped value of a and b is %d and %d",a,b); -} - -void swap2(int a,int b) -{ -b=a*b; -a=b/a; -b=b/a; - -printf("the swapped value of a and b is %d and %d",a,b); -} - -void swap3(int a,int b) -{ -a^=b^=a^=b; -printf("the swapped value using xor of a and b id %d and %d",a,b); - -} diff --git a/C ++/hello.cpp b/C ++/hello.cpp deleted file mode 100644 index 0fb0b96c8..000000000 --- a/C ++/hello.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -using namespace std; - -int main(){ - cout << "Firela" < - -using namespace std; - -int main() -{ - cout <<"Hello World !!!" << endl; - return 0; -} diff --git a/C ++/hello_swar.cpp b/C ++/hello_swar.cpp deleted file mode 100644 index 520c6ab50..000000000 --- a/C ++/hello_swar.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -using namespace std; - -int main() -{ - cout << "Hello World !!!" << endl; -return 0; -} diff --git a/C ++/hello_world b/C ++/hello_world deleted file mode 100644 index fe36211ee..000000000 --- a/C ++/hello_world +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout<<"Wow"; - return 0; -} diff --git a/C Language/Celsius_to_Fahrenheit.c b/C Language/Celsius_to_Fahrenheit.c deleted file mode 100644 index 1bd9d4fb7..000000000 --- a/C Language/Celsius_to_Fahrenheit.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -void main(){ - printf("\n*****Covert the temperature from degree Celsius to degree Fahrenheit*****\n\n\n"); - - float oC; - - printf("Enter degrees Celsius: "); - scanf("%f", &oC); - - printf("--->Degrees Fahrenheit is: %.1f", oC * 1.8 + 32); -} diff --git a/C Language/OddEven.c b/C Language/OddEven.c deleted file mode 100644 index b4f34cefb..000000000 --- a/C Language/OddEven.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -int main() -{ - - int a; - - printf("Enter a Number:\n"); - scanf("%d",&a); - - if(a%2==0) - printf(" %d is Even\n",a); //even number - - else - printf(" %d is Odd\n",a); //odd number - - - return 0; - -} diff --git a/C Language/c_hellow_world.c b/C Language/c_hellow_world.c deleted file mode 100644 index b22cad224..000000000 --- a/C Language/c_hellow_world.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -void main(){ - - printf("Hello World!"); - -} diff --git a/C Language/forkbomb.c b/C Language/forkbomb.c deleted file mode 100644 index b969d4b4d..000000000 --- a/C Language/forkbomb.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int main() { - while(1) fork(); -} diff --git a/C Language/github_handle.c b/C Language/github_handle.c deleted file mode 100644 index b765836d4..000000000 --- a/C Language/github_handle.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - printf("rohit21p"); - return 0; -} diff --git a/C Language/hello.c b/C Language/hello.c deleted file mode 100644 index 07ffb4d52..000000000 --- a/C Language/hello.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -/* Hello */ -int main(void) { - printf("Hello, World"); - return 0; -} diff --git a/C Language/hello_word b/C Language/hello_word deleted file mode 100644 index f33940503..000000000 --- a/C Language/hello_word +++ /dev/null @@ -1,11 +0,0 @@ -#include - - -int main(){ - - printf("Hello World!\n"); - printf("Have fun coding programmers!\n"); - - - return 0; -} diff --git a/C Language/hello_world.c b/C Language/hello_world.c deleted file mode 100644 index 450f6391e..000000000 --- a/C Language/hello_world.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -void main() -{ - printf ("###Hello World!###\n") ; -} diff --git a/C Language/hi.c b/C Language/hi.c deleted file mode 100644 index fc52fcb75..000000000 --- a/C Language/hi.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -int main() -{ -printf("\nhi\n"); - -return 0; -} diff --git a/C Language/the_snake_game.c b/C Language/the_snake_game.c deleted file mode 100644 index 7b1a1dee8..000000000 --- a/C Language/the_snake_game.c +++ /dev/null @@ -1,186 +0,0 @@ -Snake Game in C - -#include -#include -#include -#include -#include -#include - -check(); -end(); -win(); -int m[500],n[500],con=20; -clock_t start,stop; - void main(void) -{ - -int gd=DETECT,gm,ch,maxx,maxy,x=13,y=14,p,q,spd=100; - -initgraph(&gd,&gm,"..\bgi"); - -setcolor(WHITE); -settextstyle(3,0,6); -outtextxy(200,2," SNAKE 2 "); -settextstyle(6,0,2); -outtextxy(20,80," Use Arrow Keys To Direct The Snake "); -outtextxy(20,140," Avoid The Head Of Snake Not To Hit Any Part Of Snake -"); -outtextxy(20,160," Pick The Beats Untill You Win The Game "); -outtextxy(20,200," Press 'Esc' Anytime To Exit "); -outtextxy(20,220," Press Any Key To Continue "); -ch=getch(); -if(ch==27) exit(0); -cleardevice(); -maxx=getmaxx(); -maxy=getmaxy(); - -randomize(); - -p=random(maxx); -int temp=p%13; -p=p-temp; -q=random(maxy); -temp=q%14; -q=q-temp; - - - - start=clock(); -int a=0,i=0,j,t; -while(1) -{ - - setcolor(WHITE); - setfillstyle(SOLID_FILL,con+5); - circle(p,q,5); - floodfill(p,q,WHITE); - - if( kbhit() ) - { - ch=getch(); if(ch==0) ch=getch(); - if(ch==72&& a!=2) a=1; - if(ch==80&& a!=1) a=2; - if(ch==75&& a!=4) a=3; - if(ch==77&& a!=3) a=4; - } - else - { - if(ch==27 - ) break; - } - - if(i<20){ - m[i]=x; - n[i]=y; - i++; - } - - if(i>=20) - - { - for(j=con;j>=0;j--){ - m[1+j]=m[j]; - n[1+j]=n[j]; - } - m[0]=x; - n[0]=y; - - setcolor(WHITE); - setfillstyle(SOLID_FILL,con); - circle(m[0],n[0],8); - floodfill(m[0],n[0],WHITE); - - setcolor(WHITE); - for(j=1;j=5) spd=spd-5; else spd=5; - if(con>490) win(); - p=random(maxx); temp=p%13; p=p-temp; - q=random(maxy); temp=q%14; q=q-temp; - } - if(a==1) y = y-14; if(y<0) { temp=maxy%14;y=maxy-temp;} - if(a==2) y = y+14; if(y>maxy) y=0; - if(a==3) x = x-13; if(x<0) { temp=maxx%13;x=maxx-temp;} - if(a==4) x = x+13; if(x>maxx) x=0; - if(a==0){ y = y+14 ; x=x+13; } - } - - } - - -check(){ - int a; - for(a=1;a -#define MAX_SIZE 100 // Maximum array size - -int main() -{ - int arr[MAX_SIZE]; - int size; - int i, j, temp; - - /* Input size of array */ - printf("Enter size of array: "); - scanf("%d", &size); - - /* Input elements in array */ - printf("Enter elements in array: "); - for(i=0; i arr[j]) - { - temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - } - } - } - - /* Print the sorted array */ - printf("\nElements of array in ascending order: "); - for(i=0; i') - { - pointer++; - pointer %= bytes.Length; - }else if (c == '<') - { - pointer--; - pointer = (pointer == -1 ? bytes.Length - 1 : pointer); - }else if (c == '+') - { - bytes[pointer]++; - }else if (c == '-') - { - bytes[pointer]--; - }else if (c == '.') - { - Console.Write((char)bytes[pointer]); - }else if (c == ',') - { - if(!interactive) - { - try - { - bytes[pointer] = (byte)input[inputindex++]; - } catch(IndexOutOfRangeException) - { - Console.ForegroundColor = ConsoleColor.Red; - Console.Write("\nAn attempt was made to access index " + (inputindex - 1) + " while the input length is only " + input.Length); - Console.ResetColor(); - System.Environment.Exit(1); - } - }else - { - bytes[pointer] = (byte)Console.ReadKey().KeyChar; - } - } - } - } - - [Serializable] - internal class BrainFuckException : Exception - { - public BrainFuckException() - { - } - - public BrainFuckException(string message) : base(message) - { - } - - public BrainFuckException(string message, Exception innerException) : base(message, innerException) - { - } - - protected BrainFuckException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } - } -} diff --git a/C#/HackersHelloWorld.cs b/C#/HackersHelloWorld.cs deleted file mode 100644 index 5e86d3f91..000000000 --- a/C#/HackersHelloWorld.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; - -namespace HelloWorld -{ - class Program - { - private static string HELLO_STRING = "Hello World!"; - - static void Main(string[] args) - { - int i = 0; - - // Type furiously on your keyboard to write Hello World! repeatedly - // Press ESC to quit - while (Console.ReadKey(true).Key != ConsoleKey.Escape) - { - Console.Write(HELLO_STRING[i]); - i = (i + 1) % HELLO_STRING.Length; - - if (i == 0) - Console.WriteLine(); - } - - Console.WriteLine(); - Console.WriteLine(); - Console.WriteLine("Bye!"); - } - } -} diff --git a/C#/Hacktoberfest Hello.cs b/C#/Hacktoberfest Hello.cs deleted file mode 100644 index e6347e2ab..000000000 --- a/C#/Hacktoberfest Hello.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace HacktoberfestHello -{ - class HelloProgram - { - static void Main(string[] args) - { - Console.WriteLine("Greetings Hacktoberfest " + DateTime.Today.Year + "!"); - } - } -} diff --git a/C#/Hacky_hack b/C#/Hacky_hack deleted file mode 100644 index 9f33de35b..000000000 --- a/C#/Hacky_hack +++ /dev/null @@ -1,6 +0,0 @@ -Console.WriteLine("\nWhat is your name? "); -var name = Console.ReadLine(); -var date = DateTime.Now; -Console.WriteLine($"\nHello, {name}, on {date:d} at {date:t}!"); -Console.Write("\nPress any key to exit..."); -Console.ReadKey(true); diff --git a/C#/Hello Word in C#.txt b/C#/Hello Word in C#.txt deleted file mode 100644 index e9c9d9229..000000000 --- a/C#/Hello Word in C#.txt +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ConsoleApp1 -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World"); - Console.Readkey(); - } - } -} diff --git a/C#/HelloBoiz b/C#/HelloBoiz deleted file mode 100644 index 1af1b88ef..000000000 --- a/C#/HelloBoiz +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace HelloWorld -{ - class Program - { - static void Main() - { - Console.WriteLine("Hello boiz!"); - Console.ReadKey(); - - - } - } -} diff --git a/C#/HelloFib.cs b/C#/HelloFib.cs deleted file mode 100644 index 4d7dc88be..000000000 --- a/C#/HelloFib.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace HelloHacktober{ - public class LetsGo{ - public static String Fibonacci(int n){ - if(n < 2){ - return "Hello World "; - } - else{ - return Fibonacci(n-1) + Fibonacci(n-2); - } - } - public static void main(String[] args){ - Console.write(Fibonacci(1)); - } - } -} \ No newline at end of file diff --git a/C#/HelloFromBelarus.cs b/C#/HelloFromBelarus.cs deleted file mode 100644 index bf1f8832d..000000000 --- a/C#/HelloFromBelarus.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Hello -{ - class MainClass - { - public static void Main(string[] args) - { - Console.WriteLine("Hello World!:)"); - } - } -} diff --git a/C#/HelloFromTurkey.cs b/C#/HelloFromTurkey.cs deleted file mode 100644 index e8ead6601..000000000 --- a/C#/HelloFromTurkey.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - - -namespace Hacktoberfest -{ - class Hello - { - static void Main(string[] args) - { - Console.BackgroundColor = ConsoleColor.Red; - Console.ForegroundColor = ConsoleColor.White; - - Console.WriteLine("Merhaba Hacktoberfest " + DateTime.Today.Year + "!"); - Console.ReadLine(); - } - } -} diff --git a/C#/HelloHacktoberfest.cs b/C#/HelloHacktoberfest.cs deleted file mode 100644 index 109485220..000000000 --- a/C#/HelloHacktoberfest.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HelloHacktoberfest -{ - class HelloHacktoberfest - { - static void Main(string[] args) - { - Console.BackgroundColor=ConsoleColor.DarkGreen; - Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine("Hello Hacktoberfest"); - Console.ReadKey(); - } - } -} diff --git a/C#/HelloOpenSourceWorld.cs b/C#/HelloOpenSourceWorld.cs deleted file mode 100644 index 4e2f9eb30..000000000 --- a/C#/HelloOpenSourceWorld.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace HelloWorld -{ - class Hello { - static void Main(string[] args) - { - System.Console.WriteLine("Hello Open Source World!"); - } - } -} diff --git a/C#/HelloWordChineseEdition b/C#/HelloWordChineseEdition deleted file mode 100644 index 68c5a57a4..000000000 --- a/C#/HelloWordChineseEdition +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -public class HelloWordChineseEdition -{ - public static void Main() - { - Console.WriteLine("你好,世界!"); - } -} diff --git a/C#/HelloWorld5Times.cs b/C#/HelloWorld5Times.cs deleted file mode 100644 index 33fb5633d..000000000 --- a/C#/HelloWorld5Times.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -public class Test -{ - public static void Main() - { - // your code goes here - for(int i = 0; i < 5; i++){ - Console.WriteLine("Hello World"); - } - } -} diff --git a/C#/HelloWorldC#.cs b/C#/HelloWorldC#.cs deleted file mode 100644 index 60b148f6e..000000000 --- a/C#/HelloWorldC#.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World in C#!"); - Console.ReadKey(); - } - } -} diff --git a/C#/HelloWorldFromTheNetherlands.cs b/C#/HelloWorldFromTheNetherlands.cs deleted file mode 100644 index 5e7719d12..000000000 --- a/C#/HelloWorldFromTheNetherlands.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World from the Netherlands!"); - Console.ReadKey(); - } - } -} diff --git a/C#/HelloWorldHacktoberfest.cs b/C#/HelloWorldHacktoberfest.cs deleted file mode 100644 index e84bc4a7a..000000000 --- a/C#/HelloWorldHacktoberfest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace HelloWorld -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World! Welcome to Hacktoberfest! Be nice, be kind and let's code!"); - Console.ReadKey(); - } - } -} diff --git a/C#/HelloWorldInBlue.cs b/C#/HelloWorldInBlue.cs deleted file mode 100644 index 4bb8a079f..000000000 --- a/C#/HelloWorldInBlue.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.ForegroundColor = ConsoleColor.Blue; - string s = "Hello world!"; - - Console.WriteLine(s); - Console.ReadLine(); - } - } -} diff --git a/C#/HelloWorldInGreen.cs b/C#/HelloWorldInGreen.cs deleted file mode 100644 index 2ea30e06d..000000000 --- a/C#/HelloWorldInGreen.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.ForegroundColor = ConsoleColor.Green; - string s = "Hello world!"; - - Console.WriteLine(s); - Console.ReadLine(); - } - } -} diff --git a/C#/HelloWorldInPL.cs b/C#/HelloWorldInPL.cs deleted file mode 100644 index 4066196fc..000000000 --- a/C#/HelloWorldInPL.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Witaj swiecie!"); - Console.ReadKey(); - } - } -} diff --git a/C#/HelloWorldInRed.cs b/C#/HelloWorldInRed.cs deleted file mode 100644 index 54e36b8c6..000000000 --- a/C#/HelloWorldInRed.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.ForegroundColor = ConsoleColor.Red; - string s = "Hello world!"; - - Console.WriteLine(s); - Console.ReadLine(); - } - } -} diff --git a/C#/HelloWorldInTr b/C#/HelloWorldInTr deleted file mode 100644 index 7e9cb0f5b..000000000 --- a/C#/HelloWorldInTr +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace myApp -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Merhaba Dünya!"); - } - } -} diff --git a/C#/HelloWorldMe.cs b/C#/HelloWorldMe.cs deleted file mode 100644 index 6a85b2dc2..000000000 --- a/C#/HelloWorldMe.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace ConsoleApp1 -{ - class HackHello - { - static void Main(string[] args) - { - Console.WriteLine("Hello World! - First PR :)"); - } - } -} \ No newline at end of file diff --git a/C#/HelloWorldSwedishEdition.cs b/C#/HelloWorldSwedishEdition.cs deleted file mode 100644 index 5edfed041..000000000 --- a/C#/HelloWorldSwedishEdition.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace HelloWorld -{ - class HelloWorldSwedishEdition - { - static void Main(string[] args) - { - Console.ForegroundColor = ConsoleColor.Green; - Console.WriteLine("Hej Världen!"); - Console.ReadKey(); - } - } -} \ No newline at end of file diff --git a/C#/HelloWorldTH.cs b/C#/HelloWorldTH.cs deleted file mode 100644 index 756443320..000000000 --- a/C#/HelloWorldTH.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace HelloWorldTH -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("สวัสดีชาวโลก"); - Console.ReadKey(); - } - } -} diff --git a/C#/HelloWorldUsingInheritence b/C#/HelloWorldUsingInheritence deleted file mode 100644 index d25c30cec..000000000 --- a/C#/HelloWorldUsingInheritence +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace Test1 -{ - abstract class HelloWorldBase - { - public abstract void writeHelloWorld(); - } - class HelloWorld : HelloWorldBase - { - public override void writeHelloWorld() - { - Console.WriteLine("Hello World"); - } - } - class Program - { - static void Main() - { - HelloWorldBase hwb = new HelloWorld(); - hwb.writeHelloWorld(); - Console.ReadKey(); - } - } -} diff --git a/C#/HelloWorldUsingStaticConstructor b/C#/HelloWorldUsingStaticConstructor deleted file mode 100644 index 79f2fd2e7..000000000 --- a/C#/HelloWorldUsingStaticConstructor +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace Test1 -{ - class Program - { - private static string strHelloWorld; - - static Program() - { - strHelloWorld = "Hello World"; - } - void writeHelloWorld() - { - Console.WriteLine(strHelloWorld); - } - - public static void Main() - { - Program hw = new Program(); - hw.writeHelloWorld(); - Console.ReadKey(); - } - } -} diff --git a/C#/HelloWorld_c# b/C#/HelloWorld_c# deleted file mode 100644 index 190cd6c0d..000000000 --- a/C#/HelloWorld_c# +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HelloHacktoberfest -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World..!"); - Console.WriteLine("\nLet's make this october remarkable.."); - } - } -} diff --git a/C#/HelloWorld_esp b/C#/HelloWorld_esp deleted file mode 100644 index ef9f1fc53..000000000 --- a/C#/HelloWorld_esp +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HelloHacktoberfest -{ - class HolaMundo - { - static void Main(string[] args) - { - Console.WriteLine("HelloWorld => Hola Mundoooooo..!"); - } - } -} diff --git a/C#/MathExpressionsCalculator.cs b/C#/MathExpressionsCalculator.cs deleted file mode 100644 index 6c79f2f3a..000000000 --- a/C#/MathExpressionsCalculator.cs +++ /dev/null @@ -1,220 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Runtime.Remoting.Metadata.W3cXsd2001; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; - -namespace MathExpressionsCalculator -{ - public class Program - { - private const string Operators = "+-*/%^"; - private const string LeftParenthesis = "("; - private const string RightParenthesis = ")"; - - /// - /// Stores the values of each mathematical variable (letter) - /// - private static Dictionary Variables; - - /// - /// Replaces all positive and negative floating numbers from an infix expression with letters. - /// - /// The mathematical expression - /// Returns the new infix expression - static string NormalizeInfixExpression(string expression) - { - /* - * Regex details: - * (?:(? - { - letter++; // char is incremented - double value; - if (!Double.TryParse(m.Value, out value)) - { - throw new Exception("Invalid input!"); - } - Variables[letter] = value; // the value of each letter is saved in a Dictionary - return letter.ToString(); - } - ); - - // This foreach replaces all occurences of (nr) with nr - foreach (char c in result) - { - if (char.IsLetter(c)) - { - result = result.Replace(string.Format("({0})", c), c.ToString()); - } - } - - return result; - } - - /// - /// Checks if op1 has a lower or equal precedence with op2 - /// - /// First operator - /// Second operator - static bool CheckPrecedence(string op1, string op2) - { - return Operators.IndexOf(op1, StringComparison.Ordinal) <= Operators.IndexOf(op2, StringComparison.Ordinal); - } - - /// - /// Converts an infix expression into a postfix expression - /// - /// The infix expression - /// Returns the postfix expression - static string ConvertInfixToPostfix(string infix) - { - Stack stack = new Stack(); - - string postfix = string.Empty; - - foreach (char character in infix) - { - if (char.IsLetter(character)) - { - postfix += character; - continue; - } - - if (character.ToString() == LeftParenthesis) - { - stack.Push(character.ToString()); - continue; - } - - if (character.ToString() == RightParenthesis) - { - while (stack.Count != 0 && stack.Peek() != LeftParenthesis) - { - postfix += stack.Pop(); - } - - stack.Pop(); - continue; - } - - if (Operators.Contains(character)) - { - if (stack.Count == 0 || stack.Peek() == LeftParenthesis) - { - stack.Push(character.ToString()); - } - else - { - while (stack.Count != 0 && stack.Peek() != LeftParenthesis && - CheckPrecedence(character.ToString(), stack.Peek())) - { - postfix += stack.Pop(); - } - - stack.Push(character.ToString()); - } - } - } - - while (stack.Count != 0) - { - postfix += stack.Pop(); - } - - return postfix; - } - - /// - /// Evaluates a mathematical postfix expression - /// - /// The postfix expression - /// Returns the result of the evaluation - static double EvaluatePostfixExpression(string expression) - { - Stack stack = new Stack(); - foreach (var character in expression) - { - if (char.IsLetter(character)) - { - stack.Push(Variables[character]); - continue; - } - - if (Operators.Contains(character)) - { - double A = stack.Pop(); - double B = stack.Pop(); - switch (character) - { - case '^': - stack.Push(Math.Pow(B, A)); - break; - case '*': - stack.Push(B * A); - break; - case '/': - stack.Push(B / A); - break; - case '+': - stack.Push(B + A); - break; - case '-': - stack.Push(B - A); - break; - case '%': - stack.Push(B % A); - break; - } - } - else - { - throw new Exception("Invalid input!"); - } - } - - return stack.Pop(); - } - - public static void Main(string[] args) - { - Variables = new Dictionary(); - - // The commented results are from http://www.wolframalpha.com/ - List expressions = new List() - { - "1+2+3+4+(-1)-2", // 7 - "((-2*(-4))^2)%2", // 0 - "(-1)*3+(-2)/1+3.5", // -1.5 - "10^3-(-100*(-5)+5.12345)", // 494.87655 - "(1+5)*(-3)", // -18 - "(2*3)^2-5+(-2)", // 29 - "(((-30)+5.2)*(2+7))-((-3.1*2.5)-9.12-3)" // -203.33 - }; - - foreach (string expression in expressions) - { - Console.WriteLine("Expression: " + expression); - string infix = NormalizeInfixExpression(expression); - Console.WriteLine("Infix: " + infix); - string postfix = ConvertInfixToPostfix(infix); - Console.WriteLine("Postfix: " + postfix); - double result = EvaluatePostfixExpression(postfix); - Console.WriteLine("Result: " + result + Environment.NewLine); - Variables.Clear(); - } - - } - } -} diff --git a/C#/MathLib.cs b/C#/MathLib.cs deleted file mode 100644 index b7afb28d9..000000000 --- a/C#/MathLib.cs +++ /dev/null @@ -1,887 +0,0 @@ -//added comment only for Hacktoberfest: this is from my "BetterMath" repository and WILL probably need a bit of tweaking, since it relies on some exceptions that are in other files. - -using System; -using System.Collections; -using System.Linq; - -namespace someUtils.BetterMath -{ - /// - /// Maybe kinda somewhat better than usual math - /// - public static class bmath - { - /// - /// The One and Only, The "Circle Number" (π) - /// - public const double PI = 3.141592653589793d; - /// - /// The Square Root of 3 - /// - public const double sqrt3 = 1.732050807568877d; - /// - /// The Square Root of 3 divided by 2 - /// - /// for triangle-height-stuff, for example - /// - public const double sqrt3over2 = 0.629960524947436d; - /// - /// The Square Root of 2 - /// - public const double sqrt2 = 1.414213562373095d; - /// - /// 2PI, since in many equations, you double it anyways. (τ) - /// - public const double TAU = 2d * PI; - - /// - /// get the Square Root of a positive Number through the Heron-algorithm with 10000 iterations - /// - /// the number to get the Square Root of - /// Square Root of n - public static double sqrt(double n) - { - return sqrt(n, 10000); - } - - /// - /// get the Square Root of a positive Number through the Heron-algorithm - /// - /// the number to get the Square Root of //HAS TO BE POSITIVE - /// the number of Iterations (more = more accurate) - /// Square Root of n - public static double sqrt(double n, uint i) - { - double iterate(double lastresult, double m) - { - return 0.5 * (lastresult + (m / lastresult)); - } - - if (n == 0) - { - return 0; - } - - if (n < 0) - { - throw new RootofNegativeException("guess you wanted i * " + n); - } - - if (n == 2) - { - return sqrt2; - } - - if (n == 3) - { - return sqrt3; - } - - double num = (n + 1) / 2; - - for (int j = 0; j < i; j++) - { - num = iterate(num, n); - } - - return num; - } - - /// - /// Converts from any Number System to any Number System - /// - /// the string to be converted. - /// the alphabet the input uses (for example "01" or "0123456789abcdef") - /// the alphabet that should be returned (for example "01" or "0123456789abcdef") - /// - /// This may behave weird if the inputalphabet contains double characters. - public static string ConvertNumberSystems(string input, string inalphabet, string outalphabet) - { - string output = ""; - - int inbase = inalphabet.Length; - int outbase = outalphabet.Length; - - int dec = 0; - - for (int i = 0; i < input.Length; i++) - { - dec += (int)(inalphabet.IndexOf(input[i]) * Math.Pow(inbase, input.Length - 1 - i)); - } - - if (outalphabet == "01234567890") - { - return dec.ToString(); - } - - int tmp2 = dec; - - while (!(tmp2 == 0)) - { - output = outalphabet[tmp2 % outbase] + output; - tmp2 = tmp2 / outbase; - } - - return output; - } - - /// - /// Squares a Number - /// - /// the number to be squared - /// - //I don't know a single use case where n*n would not be better... - public static double square(double n) - { - return n * n; - } - - /// - /// gives back B^E. - /// - /// the base (i.e. in 3^4 it's 3) - /// the exponent (i.e. in 3^4 it's 4) - /// - public static double exponential(double b, int e) - { - //say newb out loud, yes it's an easter egg - double newb = b; - - if (e >= 1) - { - for (int i = 0; i < e - 1; i++) - { - newb *= b; - } - } - else - { - for (int i = 0; i < -e + 1; i++) - { - newb = newb / b; - } - } - - return newb; - } - - /// - /// Restricts a value to be within a specified range. - /// - /// The value to clamp. - /// The minimum value. If value is less than min, min will be returned. - /// The maximum value. If value is greater than max, max will be returned. - /// The clamped value. - public static float Clamp(float value, float min, float max) - { - if (min > max) - { - throw new MinBiggerThanMaxException("The Minimum Value You put In Clamp is bigger than The Max Value!"); - } - - value = ((value > max) ? max : value); - value = ((value < min) ? min : value); - return value; - } - - /// - /// Linearly interpolates between two values. - /// - /// Source value. - /// Source value. - /// Value between 0 and 1 indicating the weight of value2. - /// Interpolated value. - /// This method performs the linear interpolation based on the following formula. - /// value1 + (value2 - value1) * amount - /// Passing amount a value of 0 will cause value1 to be returned, a value of 1 will cause value2 to be returned. - /// - public static double Lerp(double value1, double value2, double amount) - { - return value1 + (value2 - value1) * amount; - } - - /// - /// Converts radians to degrees. - /// - /// The angle in radians. - /// The angle in degrees. - /// - /// This method uses double precission internally, - /// though it returns single float - /// Factor = 180 / pi - /// - public static float ToDegrees(float radians) - { - return (float)((double)radians * 57.295779513082323); - } - - /// - /// Converts degrees to radians. - /// - /// The angle in degrees. - /// The angle in radians. - /// - /// This method uses double precission internally, - /// though it returns single float - /// Factor = pi / 180 - /// - public static float ToRadians(float degrees) - { - return (float)(degrees * 0.017453292519943295); - } - - /// - /// Gets the Sum of The numbers in the array up to a limit (see Euler's first problem) - /// - /// the numbers to add the multiples off - /// only multiples below this limit will be added - /// - public static long SumofMultiples(int[] nums, int limit) - { - ArrayList al = new ArrayList(); - - long sum = 0; - - for (int i = 0; i < limit; i++) - { - for (int j = 0; j < nums.Length; j++) - { - if (i % nums[j] == 0) - { - if (!al.Contains(i)) - { - al.Add(i); - sum += i; - } - } - } - } - - return sum; - } - - public static double roundtomultipleof(double multiple, double numbertoround) - { - double tmp1 = ((int)(numbertoround / multiple) * multiple); - double tmp2 = tmp1 + multiple; - - if (Math.Abs(tmp1 - numbertoround) < Math.Abs(tmp2 - numbertoround)) - { - return tmp1; - } - else - { - return tmp2; - } - } - } - - #pragma warning disable CS0659 - #pragma warning disable CS0661 - - /// - /// A 2D Vector - /// - public class Vec2 : IComparable, IEquatable, IEquatable, IEquatable, IComparable, IComparable, IComparable - - #pragma warning restore CS0661 - #pragma warning restore CS0659 - - { - /// - /// A "Zero Vector", it has a x and y value of 0 - /// - public static readonly Vec2 ZERO = new Vec2(0, 0); - - #region Fields - /// - /// The X Direction / Amount of The Vector - /// - public double x = 0; - /// - /// The Y Direction / Amount of The Vector - /// - public double y = 0; - #endregion - - #region Constructors - /// - /// Constructor - /// - /// The X Direction / Amount of The Vector - /// The Y Direction / Amount of The Vector - public Vec2(double _x, double _y) - { - x = _x; - y = _y; - } - - /// - /// Constructor as well, X and Y are zero with this. - /// - public Vec2() - { - x = 0; - y = 0; - } - - /// - /// Constructor, X and Y are the same - /// - /// the number that both coordinates will be - public Vec2(double coord) - { - x = coord; - y = coord; - } - #endregion - - #region Operators - public static Vec2 operator +(Vec2 s, Vec2 s2) - { - return new Vec2(s.x + s2.x, s.y + s2.y); - } - - public static Vec2 operator -(Vec2 s, Vec2 s2) - { - return new Vec2(s.x - s2.x, s.y - s2.y); - } - - public static bool operator ==(Vec2 vector1, Vec2 vector2) - { - return vector1.length() == vector2.length(); - - } - - public static bool operator !=(Vec2 vector1, Vec2 vector2) - { - return !(vector1.length() == vector2.length()); - } - - public static bool operator ==(Vec2 vector1, Vec3 vector2) - { - return vector1.length() == vector2.length(); - } - - public static bool operator !=(Vec2 vector1, Vec3 vector2) - { - return !(vector1.length() == vector2.length()); - } - - public static bool operator ==(Vec2 vector1, Vec vector2) - { - return vector1.length() == vector2.length(); - } - - public static bool operator !=(Vec2 vector1, Vec vector2) - { - return !(vector1.length() == vector2.length()); - } - - public static bool Equals(Vec2 v, Vec2 v2) - { - return v == v2; - } - - public bool Equals(Vec2 v) { return this == v; } - - public bool Equals(Vec3 v) { return this == v; } - - public bool Equals(Vec v) { return this == v; } - - public override bool Equals(object o) - { - if (o == null || !(o is Vec2)) - { - return false; - } - Vec2 vector = (Vec2)o; - return Equals(this, vector); - } - - public static Vec2 operator /(Vec2 s, double s2) - { - return new Vec2(s.x / s2, s.y / s2); - } - - public static Vec2 operator *(Vec2 s, double s2) - { - return new Vec2(s.x * s2, s.y * s2); - } - - public static Vec2 operator -(Vec2 s) - { - return new Vec2(-s.x, -s.y); - } - #endregion - - public double length() - { - return Math.Sqrt(x*x + y*y); - } - - /// - /// Normalizes A vector, meaning it's length becomes 1 but the direction stays - /// - public void normalize() - { - Vec2 v = this; - - v /= v.length(); - - x = v.x; - y = v.y; - } - - public int CompareTo(object obj) - { - return ((obj as Vec2).length() < length() ? -1 : (obj as Vec2).length() == length() ? 0 : 1); - } - } - - #pragma warning disable CS0659 - #pragma warning disable CS0661 - - /// - /// A 3D Vector - /// - public class Vec3 : IComparable, IEquatable, IEquatable, IEquatable - { - /// - /// A "Zero Vector", it has a x, y and z value of 0 - /// - public static readonly Vec3 ZERO = new Vec3(0, 0, 0); - - #region Fields - /// - /// The X Direction / Amount of The Vector - /// - public double x = 0; - /// - /// The Y Direction / Amount of The Vector - /// - public double y = 0; - /// - /// The Z Direction / Amount of The Vector - /// - public double z = 0; - #endregion - - #region Constructors - /// - /// Constructor - /// - /// The X Direction / Amount of The Vector - /// The Y Direction / Amount of The Vector - /// The Z Direction / Amount of The Vector - public Vec3(double _x, double _y, double _z) - { - x = _x; - y = _y; - } - - /// - /// Constructor, X, Y and Z are zero - /// - public Vec3() - { - x = 0; - y = 0; - z = 0; - } - - /// - /// Constructor, X, Y and Z are the same - /// - /// the number that all coordinates will be - public Vec3(double coord) - { - x = coord; - y = coord; - z = coord; - } - #endregion - - #region Operators - public static Vec3 operator +(Vec3 s, Vec3 s2) - { - return new Vec3(s.x + s2.x, s.y + s2.y, s.z+ s2.z); - } - - public static Vec3 operator +(Vec3 s, Vec2 s2) - { - return new Vec3(s.x + s2.x, s.y + s2.y, s.z); - } - - public static Vec3 operator -(Vec3 s, Vec3 s2) - { - return new Vec3(s.x - s2.x, s.y - s2.y, s.z - s2.z); - } - - public static Vec3 operator -(Vec3 s, Vec2 s2) - { - return new Vec3(s.x - s2.x, s.y - s2.y, s.z); - } - - public static Vec3 operator /(Vec3 s, double s2) - { - return new Vec3(s.x / s2, s.y / s2, s.z / s2); - } - - public static Vec3 operator *(Vec3 s, double s2) - { - return new Vec3(s.x * s2, s.y * s2, s.z * s2); - } - - public static bool operator ==(Vec3 vector1, Vec3 vector2) - { - return vector1.length() == vector2.length(); - } - - public static bool operator !=(Vec3 vector1, Vec3 vector2) - { - return !(vector1.length() == vector2.length()); - } - - public static bool operator ==(Vec3 vector1, Vec2 vector2) - { - return vector1.length() == vector2.length(); - } - - public static bool operator !=(Vec3 vector1, Vec2 vector2) - { - return !(vector1.length() == vector2.length()); - } - - public static bool operator ==(Vec3 vector1, Vec vector2) - { - return vector1.length() == vector2.length(); - } - - public static bool operator !=(Vec3 vector1, Vec vector2) - { - return !(vector1.length() == vector2.length()); - } - - public bool Equals(Vec2 v) - { - return this == v; - } - - public bool Equals(Vec3 v) - { - return this == v; - } - - public bool Equals(Vec v) - { - return this == v; - } - - public static bool Equals(Vec3 v, Vec3 v2) - { - return v == v2; - } - - public override bool Equals(object o) - { - if (o == null || !(o is Vec3)) - { - return false; - } - Vec3 vector = (Vec3)o; - return Equals(this, vector); - } - - public static Vec3 operator -(Vec3 vector) - { - return new Vec3(-vector.x, -vector.y, -vector.z); - } - #endregion - - /// - /// The Vector's length - /// - /// The Vector to get the Length of - /// - public double length() - { - return Math.Sqrt(x * x + y * y + z * z); - } - - /// - /// Normalizes A vector, meaning it's length becomes 1 but the direction stays - /// - public void normalize() - { - Vec3 v = this; - v /= v.length(); - - x = v.x; - y = v.y; - z = v.z; - } - - public int CompareTo(object obj) - { - //I know this is awful. - - return ((obj as Vec3).length() < length() ? -1 : (obj as Vec3).length() == length() ? 0 : 1); - } - } - - #pragma warning disable CS0660 - #pragma warning disable CS0661 - - /// - /// A Vector which takes an array of coordinates, so more than 3 dimensions are possible without a seperate class for each - /// - public class Vec : IComparable, IEquatable, IEquatable, IEquatable - { - - public double[] coords - { - get { - return coords; - } - set - { - coords = value; - - dimNum = value.Length; - } - } - - /// - /// The Number of Dimensions this Vec has - /// - public int dimNum; - - public Vec(double[] _coords) - { - if (_coords.Length == 0 || _coords == null) - { - throw new Exception("A Vector can't have 0 Dimensions"); - } - - coords = _coords; - - dimNum = _coords.Length; - } - - public Vec(int numDimensions) - { - if (numDimensions == 0) - { - throw new Exception("A Vector can't have 0 Dimensions"); - } - - coords = new double[numDimensions]; - - for (int i = 0; i < numDimensions; i++) - { - coords[i] = 0; - } - - dimNum = numDimensions; - } - - - - #region Operators - public static Vec operator +(Vec a, Vec b) - { - if (a.coords.Length > b.coords.Length) - { - double[] stuffz = a.coords; - - for (int i = 0; i < b.coords.Length; i++) - { - stuffz[i] = a.coords[i] + b.coords[i]; - } - - return new Vec(stuffz); - - } else if (b.coords.Length > a.coords.Length) - { - double[] stuffz = b.coords; - - for (int i = 0; i < a.coords.Length; i++) - { - stuffz[i] = b.coords[i] + a.coords[i]; - } - - return new Vec(stuffz); - - } - else - { - - double[] stuffz = new double[a.coords.Length]; - - for (int i = 0; i < stuffz.Length; i++) - { - stuffz[i] = a.coords[i] + b.coords[i]; - } - - return new Vec(stuffz); - } - } - - public static Vec operator -(Vec a, Vec b) - { - double[] stuffz = a.coords; - - for (int i = 0; i < stuffz.Length; i++) - { - stuffz[i] = a.coords[i] - b.coords[i]; - } - - return new Vec(stuffz); - } - - public static Vec operator /(Vec a, double b) - { - double[] d = a.coords; - - for (int i = 0; i < d.Length; i++) - { - d[i] = a.coords[i] / b; - } - - return new Vec(d); - } - - public static Vec operator *(Vec a, double b) - { - double[] d = a.coords; - - for (int i = 0; i < d.Length; i++) - { - d[i] = a.coords[i] * b; - } - - return new Vec(d); - } - - public static bool operator ==(Vec a, Vec b) - { - bool issamesofar = true; - - if (a.coords.Length != b.coords.Length) - { - issamesofar = false; - }else - { - for (int i = 0; i < a.coords.Length; i++) - { - if (a.coords[i] != b.coords[i]) - { - issamesofar = false; - break; - } - } - } - - return issamesofar; - } - - public static bool operator !=(Vec a, Vec b) - { - return !(a == b); - } - - public static bool operator ==(Vec vector1, Vec2 vector2) - { - return vector1.length() == vector2.length(); - } - - public static bool operator !=(Vec vector1, Vec2 vector2) - { - return !(vector1.length() == vector2.length()); - } - - public static bool operator ==(Vec vector1, Vec3 vector2) - { - return vector1.length() == vector2.length(); - - } - - public static bool operator !=(Vec vector1, Vec3 vector2) - { - return !(vector1.length() == vector2.length()); - } - - public bool Equals(Vec2 v) - { - return this == v; - } - - public bool Equals(Vec3 v) - { - return this == v; - } - - public bool Equals(Vec v) - { - return this == v; - } - - public int CompareTo(object o) - { - return ((o as Vec).length() < length() ? -1 : (o as Vec).length() == length() ? 0 : 1); - } - - public static Vec operator -(Vec a) - { - double[] b = a.coords; - - for(int i = 0; i < b.Length; i++) - { - b[i] = -b[i]; - } - - return new Vec(b); - } - #endregion - - #region Methods - public static bool Equals(Vec a, Vec b) - { - return a == b; - } - - public override bool Equals(object o) - { - if (o == null || !(o is Vec)) - { - return false; - } - Vec vector = (Vec)o; - return Equals(this, vector); - } - - public void normalize() - { - Vec v = this; - - v /= v.coords.Max(); - v /= v.length(); - - coords = v.coords; - } - - public double length() - { - double sumofsquares = 0; - - for (int i = 0; i < coords.Length; i++) - { - sumofsquares += coords[i] * coords[i]; - } - - return bmath.sqrt(sumofsquares); - } - #endregion - } -} diff --git a/C#/MyIfElseProgram.cs b/C#/MyIfElseProgram.cs deleted file mode 100644 index ad95d5adf..000000000 --- a/C#/MyIfElseProgram.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; - -public class Program{ - public static void Main(Stirng[] args){ - bool whetherIWon = false; - - var myName = Console.ReadLine(); - - if (myName.StartsWith("P")){ - bool whetherIWon = true; - } - - if (whetherIWon){ - Console.WriteLine("I won"); - }else{ - Console.WriteLine("I loose"); - } - } -} diff --git "a/C#/Ol\303\241 Mundo c# Pt BR.cs" "b/C#/Ol\303\241 Mundo c# Pt BR.cs" deleted file mode 100644 index cfc794ec0..000000000 --- "a/C#/Ol\303\241 Mundo c# Pt BR.cs" +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace OlaMundo -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Olá Mundo!"); - Console.ReadKey(); - - - } - } -} diff --git a/C#/Palindromes.cs b/C#/Palindromes.cs deleted file mode 100644 index 074dc69e5..000000000 --- a/C#/Palindromes.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Diagnostics; - - -class MainClass -{ - - public static bool VerificaPalindromo(string _string) - { - if(_string.Length <=1 ) - { - return true; - } - else - { - if(_string[0]==_string[_string.Length-1]) - { - if(_string.Length==2) - { - return true; - } - return VerificaPalindromo(_string.Substring(1, _string.Length-2)); - } - else - { - return false; - } - } - } - - public static void ImprimePalindromos(int _inicio, int _fim) - { - Console.WriteLine("Numeros palindromos de {0} ate {1}:", _inicio, _fim); - for (var i=_inicio; i <= _fim; i++) - { - if(VerificaPalindromo(i.ToString())) - { - Console.Write("{0} | ",i); - } - - } - } - - - static void Main() - { - var stopwatch = new Stopwatch(); - stopwatch.Start(); - - ImprimePalindromos(1,1000000); - - stopwatch.Stop(); - Console.WriteLine("\n\nTempo passado: {0}",stopwatch.Elapsed); - - } - -} \ No newline at end of file diff --git a/C#/Pumpkin.cs b/C#/Pumpkin.cs deleted file mode 100644 index be1b40634..000000000 --- a/C#/Pumpkin.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Pumpkin -{ - using System; - - public static class Pumpkin - { - public static void Main() - { - Console.WriteLine(" {0}/{0} ", new string('_', 3)); - Console.WriteLine(@"/{0}\", new string('.', 7)); - Console.WriteLine(@"|{0}^,^{0}|", new string('.', 2)); - Console.WriteLine(@"\{0}\_/{0}/", new string('.', 2)); - } - } -} diff --git a/C#/RNG-Simulator.cs b/C#/RNG-Simulator.cs deleted file mode 100644 index 3ecc9d144..000000000 --- a/C#/RNG-Simulator.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; - -namespace rng_simulator -{ - class Program - { - static void Main(string[] args) - { - int dropRate = 0; - Random random = new Random(); - int killCount = 0; - int drop; - int roll; - bool flag = false; - List dropList = new List(); - int repeatedDrops = 0; - - - while (!flag) - { - Console.Write("Drop rate: 1/"); - if (int.TryParse(Console.ReadLine(), out dropRate)) - { - Console.WriteLine(dropRate); - flag = true; - } - else - { - Console.WriteLine("Invalid input. Please enter numbers only."); - } - } - - drop = random.Next(dropRate); - - do - { - roll = random.Next(dropRate); - killCount++; - if(dropList.Contains(roll)) - { - repeatedDrops++; - } - else - { - dropList.Add(roll); - } - Console.WriteLine("Kill " + killCount + ", You've rolled: " + roll + ", you need " + drop + ", and "+ repeatedDrops + " of them were repeated."); - //Thread.Sleep(random.Next(20)); - } while (drop != roll); - - Console.WriteLine("It took you " + killCount + " to get a 1/" + dropRate + " item!"); - Console.Read(); - } - } -} diff --git "a/C#/SelamD\303\274nya.cs" "b/C#/SelamD\303\274nya.cs" deleted file mode 100644 index 9fe25e522..000000000 --- "a/C#/SelamD\303\274nya.cs" +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace HacktoberfestHello -{ - class SelamDünya - { - static void Main(string[] args) - { - Console.WriteLine("Selam Dünya!"); - } - } -} diff --git a/C#/UniqueArray.cs b/C#/UniqueArray.cs deleted file mode 100644 index c2ed835bc..000000000 --- a/C#/UniqueArray.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Linq; - -public class Test -{ - public static void Main() - { - // your code goes here - int[] s = { 1, 2, 3, 3, 4, 5, 5, 5}; - Console.WriteLine(string.Join(",", s.Distinct())); - } -} diff --git a/C#/WeebHelloWorld.cs b/C#/WeebHelloWorld.cs deleted file mode 100644 index cc44bf130..000000000 --- a/C#/WeebHelloWorld.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Japan -{ - public class Program - { - public static void Main(string[] args) - { - Console.WriteLine("こんにちわ!"); - Console.ReadKey(); - } - } -} diff --git a/C#/eiGudeWie.cs b/C#/eiGudeWie.cs deleted file mode 100644 index 8c36ec0fc..000000000 --- a/C#/eiGudeWie.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace ei_gude_wie -{ - class eiGudeWie - { - static void Main(string[] args) - { - Console.WriteLine("Ei gude, wie?!"); - Console.ReadKey(); - } - } -} diff --git a/C#/factory.cs b/C#/factory.cs deleted file mode 100644 index 4479ed6bd..000000000 --- a/C#/factory.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; - -namespace lab1 -{ - class Program - { - static void Main(string[] args) - { - App app = new App(); - - app.Create("A").doSomething(); - app.Create("B").doSomething(); - app.Create("A").doSomething(); - } - - } - - class App : Creator - { - public override IChat Create(string type) - { - switch (type) - { - case "A": - return new GroupChat(); - case "B": - return new Chat(); - } - return null; - } - } - - interface IChat - { - void doSomething(); - } - - abstract class Creator - { - public abstract IChat Create(string type); - } - - class GroupChat : IChat - { - public void doSomething() - { - Console.WriteLine("class A"); - } - } - class Chat : IChat - { - public void doSomething() - { - Console.WriteLine("class B"); - } - } -} \ No newline at end of file diff --git a/C#/hacktoberfest-c#-hello b/C#/hacktoberfest-c#-hello deleted file mode 100644 index 9b36db46b..000000000 --- a/C#/hacktoberfest-c#-hello +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace HacktoberfestHello -{ - class HelloProgram - { - static void Main(string[] args) - { - Console.WriteLine("Krolikowskidamian - Hacktoberfest " + DateTime.Today.Year + "!"); - } - } -} diff --git a/C#/hello.cs b/C#/hello.cs deleted file mode 100644 index 1267e636d..000000000 --- a/C#/hello.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace HelloWorld -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World"); - Console.ReadKey(); - } - } -} diff --git a/C#/helloMyWorld.cs b/C#/helloMyWorld.cs deleted file mode 100644 index e7081a471..000000000 --- a/C#/helloMyWorld.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace helloMyWorld{ - public class Program{ - public static void Main(String[] args){ - Console.WriteLine("Hello my world!!!"); - } - } -} diff --git a/C#/hello_file.cs b/C#/hello_file.cs deleted file mode 100644 index 10041ffea..000000000 --- a/C#/hello_file.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.IO; - -namespace ConsoleApp -{ - class Program - { - static void Main(string[] args) - { - var filePath = ""; - while (!GetFilePath(out filePath)) - { - Console.WriteLine("Invalid filepath specified!"); - Console.WriteLine(); - } - - string greeting = "Hello, World!"; - Console.WriteLine(greeting); - File.WriteAllText(filePath, greeting); - - Console.WriteLine("Press the [any] key to continue..."); - Console.ReadKey(true); - } - - private static bool GetFilePath(out string filePath) - { - Console.WriteLine("Enter a filepath and press [Enter]: "); - filePath = Console.ReadLine(); - - if (string.IsNullOrWhiteSpace(filePath)) - { - return false; - } - - try - { - var fileInfo = new FileInfo(filePath); - if (!fileInfo.Directory.Exists) - { - return false; - } - } - catch - { - return false; - } - - return true; - } - } -} diff --git a/C#/helloworld.c b/C#/helloworld.c deleted file mode 100644 index 741c1a972..000000000 --- a/C#/helloworld.c +++ /dev/null @@ -1 +0,0 @@ -Console.WriteLine("HelloWorld"); diff --git a/C#/helloworld.cs b/C#/helloworld.cs deleted file mode 100644 index f38379e72..000000000 --- a/C#/helloworld.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - Console.ReadKey(); - } - } -} diff --git a/C#/helloworld_double_up.cs b/C#/helloworld_double_up.cs deleted file mode 100644 index 3fb428e98..000000000 --- a/C#/helloworld_double_up.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World going once!"); - - Console.WriteLine("Hello World going twice!"); - - Console.ReadKey(); - } - } -} diff --git a/C#/helloworld_id.cs b/C#/helloworld_id.cs deleted file mode 100644 index c3b8e1199..000000000 --- a/C#/helloworld_id.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - Console.ReadKey(); - - - } - } -} diff --git a/C#/helloworld_in_id.cs b/C#/helloworld_in_id.cs deleted file mode 100644 index c3b8e1199..000000000 --- a/C#/helloworld_in_id.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Hello -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - Console.ReadKey(); - - - } - } -} diff --git a/C#/lul b/C#/lul deleted file mode 100644 index f23e47af4..000000000 --- a/C#/lul +++ /dev/null @@ -1,2 +0,0 @@ -Console.Write("Press any key to continue..."); -Console.ReadKey(true); diff --git a/C#/multipleHelloWorld.cs b/C#/multipleHelloWorld.cs deleted file mode 100644 index 381333495..000000000 --- a/C#/multipleHelloWorld.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -namespace HelloWorld -{ - public class Program - { - static void Main(string[] args) - { - System.Console.WriteLine("How many times do you want to say 'Hello, world'?"); - while(true) - { - int x = 1; - if(int.TryParse(Console.ReadLine(), out x)) - { - for(int i = 0; i < x; i++) Console.WriteLine("Hello World!"); - break; - } - else Console.WriteLine("Please enter valid value!"); - } - } - } -} \ No newline at end of file diff --git a/C#/prototype.cs b/C#/prototype.cs deleted file mode 100644 index f9ab950fa..000000000 --- a/C#/prototype.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace lab2 -{ - class Program - { - static void Main(string[] args) - { - EnemyManager enemymanager = new EnemyManager(); - - Enemy e1 = enemymanager.SpawnStrongerEnemy(); - Enemy e2 = enemymanager.SpawnStrongerEnemy(); - Enemy e3 = enemymanager.SpawnStrongerEnemy(); - Enemy e4 = enemymanager.SpawnStrongerEnemy(); - } - } - - abstract class EnemyPrototype - { - public abstract EnemyPrototype Clone(); - } - - class Enemy : EnemyPrototype - { - private int power; - - public Enemy() - { - this.power = 0; - } - - public override EnemyPrototype Clone() - { - EnemyPrototype clonedEnemy = this.MemberwiseClone() as EnemyPrototype; - this.power++; - Console.WriteLine( - "Cloning enemy with power " + this.power); - return clonedEnemy; - } - } - - class EnemyManager - { - private Enemy enemy = new Enemy(); - - public Enemy SpawnStrongerEnemy() - { - return enemy.Clone() as Enemy; - } - } -} diff --git a/C++/.Rhistory b/C++/.Rhistory deleted file mode 100644 index e69de29bb..000000000 diff --git a/C++/2018201023_5.cpp b/C++/2018201023_5.cpp deleted file mode 100644 index df25c8c27..000000000 --- a/C++/2018201023_5.cpp +++ /dev/null @@ -1,151 +0,0 @@ - #include -#include -#define INF 1000000000 -using namespace std; -long long int max[1000000],min[1000000]; - -void convertMINH(long long int a[],long long int i, long long int n) - { - long long int l= 2*i+1; - long long int r= 2*i+2; - - long long int small = i; - if (l= 0; i--) - { - convertMINH(a, i, n); - } - } - -void convertMAXH(long long int a[], long long int i,long long int n) -{ - long long int l= 2*i+1; - long long int r= 2*i+2; - long long int largest = i; - - if (l a[largest]) - { - largest = l; - } - - if (ra[largest]) - { - largest = r; - } - - if (largest!=i) { - swap(a[i],a[largest]); - convertMAXH(a, largest, n); - } - } - -void MaxH(long long int a[],long long int n) -{ - long long int ht1 = (n - 1) / 2; - for (long long int i = ht1; i >= 0; i--) - { - convertMAXH(a, i, n); - } - } - - -int main() -{ - -long long int n; -cin>>n; -long long int a[n],max[n],min[n]; -long long int x1=0,x2=0; -double mid=0; - cout<>a[i]; - if(a[i]max[0]) - swap(max[x1-1],max[0]); - } - else - { - //int p=x2-1; - // cout<1||(x2-x1)>1) -{ - long long int p,q,r,s; - - if(x1>x2) - { - swap(max[x1-1],max[0]); - q=--x1; - p=x2++; - min[p]=max[q]; - swap(min[0],min[x2-1]); - MaxH(max,x1); - } - else - { - swap(min[x2-1],min[0]); - s=--x2; - r=x1++; - max[r]=min[s]; - swap(max[0],max[x1-1]); - MinH(min,x2); - } - //for(long long int i=0;ix2) -{ - mid=double(max[0]); - //cout< - -using namespace std; - -#define N 9 - - -/* -0 0 5 0 0 0 0 0 0 -0 0 0 0 0 7 0 3 1 -0 0 8 6 0 0 0 4 0 - -0 9 4 8 0 0 0 0 0 -0 5 0 0 0 6 0 0 0 -8 1 0 0 0 5 0 0 0 - -0 0 0 3 7 0 4 0 5 -0 0 1 4 0 0 0 6 0 -0 7 0 0 0 0 0 0 0 -*/ -/* -8 0 1 7 0 2 0 4 0 -0 0 6 4 0 0 0 3 0 -3 0 0 5 0 0 0 0 0 - -0 0 7 3 9 0 0 0 0 -0 6 8 1 0 5 4 9 0 -0 0 0 0 2 8 7 0 0 - -0 0 0 0 0 6 0 0 2 -0 3 0 0 0 7 9 0 0 -0 4 0 2 0 3 5 0 7 - -*/ - - -/* -0 0 0 2 6 0 7 0 1 -6 8 0 0 7 0 0 9 0 -1 9 0 0 0 4 5 0 0 -8 2 0 1 0 0 0 4 0 -0 0 4 6 0 2 9 0 0 -0 5 0 0 0 3 0 2 8 -0 0 9 3 0 0 0 7 4 -0 4 0 0 5 0 0 3 6 -7 0 3 0 1 8 0 0 0 - -*/ - -void print(std::vector > grid) -{ - cout<<"\n"; - for(int i=0;i > grid) -{ - //cout<<"Checking violation..."; - //print(grid); - for(int i=0;i > grid) -{ - //print(grid); - for(int i=0;i > solve(std::vector > grid,int curr_i=0,int curr_j=0) -{ - std::vector > temp(N,std::vector (N,0)); - if(curr_i*N+curr_j>=N*N) - { - return grid; - } - if(grid[curr_i][curr_j]) - { - return solve(grid,curr_i+(curr_j+1)/N,(curr_j+1)%N); - } - for(int i=1;i<=N;i++) - { - grid[curr_i][curr_j]=i; - //cout< > grid(N,std::vector (N,0)); - - for(int i=0;i>grid[i][j]; - } - - grid=solve(grid); - if(!complete(grid)) - { - cout<<"Unsolvable\n"; - return 0; - } - print(grid); - return 0; -} -// diff --git a/C++/8puzzle.cpp b/C++/8puzzle.cpp deleted file mode 100644 index 9581b4121..000000000 --- a/C++/8puzzle.cpp +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -using namespace std; - -map > , bool> visited; -map > , vector > > parent; -vector > goal(3,vector (3)); - -bool visit(vector > a) -{ - if(visited[a]==true) - return true; - else - return false; -} - -int manhattan(vector > a , int moves) -{ - int dist=moves; - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - if(a[i][j]!=0) - { - for(int k=0;k<3;k++) - { - for(int l=0;l<3;l++) - { - if(a[i][j]==goal[k][l]) - dist+=abs(i-k)+abs(j-l); - } - } - } - } - } - - return dist; -} - -bool isGoal(vector > a) -{ - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - if(a[i][j]!=goal[i][j]) - return false; - } - } - -return true; -} - -bool safe(int i,int j) -{ - if(i>=0 && i<=2 && j>=0 && j<=2) - return true; - else - return false; -} -int dx[]={-1,+1,0,0}; -int dy[]={0,0,-1,+1}; -vector > > neighbours(vector > a) -{ - pair pos; - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - if(a[i][j]==0) - { - pos.first=i; - pos.second=j; - break; - } - } - } - vector > > ans; - for(int k=0;k<4;k++) - { - int cx = pos.first; - int cy = pos.second; - vector > n = a; - if(safe(cx+dx[k],cy+dy[k])) - { - swap(n[cx+dx[k]][cy+dy[k]],n[cx][cy]); - ans.push_back(n); - } - } - -return ans; -} - -typedef pair > , int> state; - -struct cmp -{ - bool operator() (state &a, state &b) - { - int am = manhattan(a.first,a.second); - int bm = manhattan(b.first,b.second); - return am > s) -{ - if(parent.count(s)) - print_path(parent[s]); - - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - printf("%d ",s[i][j]); - } - cout< > s) -{ - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - printf("%d ",s[i][j]); - } - cout< > a, int moves) - { - - priority_queue,cmp > Q; - Q.push(state(a,moves)); - while(!Q.empty()) - { - vector > s = Q.top().first; - Q.pop(); - - visited[s]=true; - //print(s); - if(s==goal) - { - // printf("yeah\n"); - print_path(s); - break; - } - vector > > ns = neighbours(s); - vector > >::iterator it; - //printf("1..\n"); - for(it=ns.begin();it!=ns.end();it++) - { - //print(*it); - //cout< > temp = *it; - if(!visit(temp)) - { - parent.insert(pair > , vector > >(temp,s)); - Q.push(state(temp,moves+1)); - } - } - } - return; - } - -int main() -{ - vector > a(3,vector (3)); - //vector > goal(3,vector (3)); - - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - cin>>a[i][j]; - } - } - cout<<"Solution...\n\n"; - goal[0][0] = 1; - goal[0][1] = 2; - goal[0][2] = 3; - goal[1][0] = 4; - goal[1][1] = 5; - goal[1][2] = 6; - goal[2][0] = 7; - goal[2][1] = 8; - goal[2][2] = 0; - - solve(a,0); -} \ No newline at end of file diff --git a/C++/A-small-step-towards-calculators.cpp b/C++/A-small-step-towards-calculators.cpp deleted file mode 100644 index 3cac2110a..000000000 --- a/C++/A-small-step-towards-calculators.cpp +++ /dev/null @@ -1,19 +0,0 @@ - - -#include - -using namespace std; - -int solve(char* opr) { - int x=((int)*opr-48); - int y=((int)*(opr+2)-48); - int z=(int)*(opr+1); - return z=='+'? x+y:x-y; -} -int main() { - char* opr = (char *)malloc(512000 * sizeof(char)); - cin >> opr; - int result = solve(opr); - cout << result << endl; - return 0; -} diff --git a/C++/A-smallstep toward calculators.h b/C++/A-smallstep toward calculators.h deleted file mode 100644 index 827a8e91a..000000000 --- a/C++/A-smallstep toward calculators.h +++ /dev/null @@ -1,22 +0,0 @@ -#include - -using namespace std; - -int solve(char* opr) { - int x=((int)*opr-48); -int y=((int)*(opr+2)-48); -int z=(int)*(opr+1); -if(z=='+') -{ return x+y; -} -else -{ return x-y; -} -} -int main() { - char* opr = (char *)malloc(512000 * sizeof(char)); - cin >> opr; - int result = solve(opr); - cout << result << endl; - return 0; -} diff --git a/C++/Add Operator Overloading.cpp b/C++/Add Operator Overloading.cpp deleted file mode 100644 index 25093f340..000000000 --- a/C++/Add Operator Overloading.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include -#include -#include - -using namespace std; - -class time{ - - public: - int hrs,min,secs; - - time(){ - hrs=0; - min=0; - secs=0; - } - - public: - void set(){ - cout<<"\nEnter time in hrs"; - cin>>hrs; - cout<<"\nEnter time in min"; - cin>>min; - cout<<"\nEnter time in sec"; - cin>>secs; - - } - - void show() - { - cout<<"\nHours"<=60){ - - temp.secs=temp.secs%60;} - - if(temp.min>=60){ - temp.min=temp.min%60;} - return temp; - -} -time time::operator-(time t2){ - if(t2.hrs -using namespace std; - -int main() -{ -//declare variable a,b,c as of type Integer - int a , b , c; -// input value of variable a and b - cin >> a; - cin >> b; -//sum values of a and b and assign in c - c = a + b; -//show the value of c on the console. - cout << c; - - -} diff --git a/C++/AllVowels.cpp b/C++/AllVowels.cpp deleted file mode 100644 index 8fab026b4..000000000 --- a/C++/AllVowels.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include - -using namespace std; - -int main() -{ - int n; - cin >> n; - string st; - cin >> st; - vector vec(5,0); - for(int i=0;i -#define ll long long - -using namespace std; - -int main(){ - // #ifndef ONLINE_JUDGE - // freopen("input.txt","r",stdin); - // freopen("output.txt","w",stdout); - // #endif - int t; - cin>>t; - while(t--){ - string s1,s2; - cin>>s1>>s2; - int h1[26],h2[26]; - memset(h1,0,sizeof h1); - memset(h2,0,sizeof h2); - int len1=s1.length(),len2=s2.length(); - if(len1==len2){ - for(int i=0;i - -using namespace std; - -int main() -{ - int n; - cin >> n; - cout << "I'll not print your n" << endl; -} diff --git a/C++/Armstrong.cpp b/C++/Armstrong.cpp deleted file mode 100644 index 5461da839..000000000 --- a/C++/Armstrong.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -using namespace std; -int main() -{ -int arm=0,a,b,c,d,no; -cout << "Enter any number" << endl; -cin >> no; -d = no; -while( no!= 0){ - a=no%10; - arm+=a*a*a; - no=no/10; -} -if(arm==d) - cout<<"Yes "< -using namespace std; -int main(){ - int array[] = {1,2,3,4,5,6,7,8,9,0} - for(int i = 9;i>=0;i--){ - cout< -#include - -void main() -{ - clrscr(); - int n,a[100]][100], temp; - cout<<"\nenter the size of array"; - cin>>n; - cout<<"\nenter the array"; - for(i=0;i>a[i][j]; - } - - for(i=0;ia[j]) - { - a[i]=a[i]^a[j]; - a[j]=a[i]^a[j]; - a[i]=a[i]^a[j]; - flag = 1; - } - } - // Break out of loop if no swaps are made in a particular outer iteration - if(!flag) - break; - } - cout<<"\nSORTED ARRAY"; - for(i=0;i>a[i][j]; - } - getch(); -} diff --git a/C++/Ashutosh.cpp b/C++/Ashutosh.cpp deleted file mode 100644 index 55b5e68a8..000000000 --- a/C++/Ashutosh.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -using namespace std; -int main() -{ - cout<<"Hello world" ; -} diff --git a/C++/AvlTree.cpp b/C++/AvlTree.cpp deleted file mode 100644 index 0637677d5..000000000 --- a/C++/AvlTree.cpp +++ /dev/null @@ -1,247 +0,0 @@ -#include -#define type int -using namespace std; - int test=1; -class node - -{//begin node class -private: - -public: -type data; - node *left; - node *right; - int height; - friend class AVL; - -};//end of node class - -class AVL -{//begin AVL -private: - - -public: - node* rotate_right(node* n); - node* rotate_left(node* n); -node *root=NULL; -node* get_root();//def -node* ins(node* n,type x);//def -node* del(node* n,type x); -node* LL(node *n); -node* RR(node *n); -node* LR(node *n); -node* RL(node *n); -node* balance(node *temp); -void preorder(node *n); -void inorder(node *n); -int get_height(node* n); -int Balance_factor(node* n);//def -};//end AVL -//begin AVL functions -void AVL::preorder(node *n) -{ -if(n!=NULL) -{ -cout<<" "<data; -preorder(n->left); -preorder(n->right); -} - -} -node* AVL::balance(node* temp) -{ - int bal_factor = Balance_factor(temp); - if (bal_factor > 1) - { - if (Balance_factor(temp->left) > 0) - temp = LL(temp); - else - temp = LR(temp); - } - else if (bal_factor < -1) - { - if (Balance_factor(temp->right) > 0) - temp = RL(temp); - else - temp = RR(temp); - } - return temp; -} - - - - - -node* AVL::get_root() -{//begin get root -return root; -}//end get_root -node* AVL::ins(node* n,type x) -{//begin ins -//cout<<"here in ins"<data=x; - y->left=NULL; - y->right=NULL; - n=y; - if(test==1)cout<<"Root added "<data<n->data) - {//begin if - - n->right=ins(n->right,x); - - cout<data<left=ins(n->left,x); - cout<data<left; -n->left=temp->right; -temp->right=n; -n->height=get_height(n); -temp->height=get_height(temp); -return temp; -}//end rotate right -node* AVL::rotate_left(node* n) -{//begin rotate left -node* temp=new node(); -temp=n->right; -n->right=temp->left; -temp->left=n; -n->height=get_height(n); -temp->height=get_height(temp); -cout<<"Rotating left\n"; -return temp; - -}//end rotate left -int AVL::Balance_factor(node* n) -{//begin balance factor -int l_height = get_height(n->left); - int r_height = get_height (n->right); - int b_factor= l_height - r_height; - return b_factor; - - -}//end balance factor - -int AVL::get_height(node* n) -{//begin get_height -int h=0; - if (n!= NULL) - { - int l_height = get_height (n->left); - int r_height = get_height (n->right); - int max_height = max (l_height, r_height); - h = max_height + 1; - } - - return h; - -}//end get_height - -node* AVL::LL(node* n) -{//begin LL -n=rotate_right(n); -cout<<"LL DONE\n"; -return n; -}//end LL - -node* AVL::RR(node* n) -{//begin RR -n=rotate_left(n); -cout<<"RR DONE\n"; -return n; -}//end RR - -node* AVL::RL(node* n) -{//begin RL -n->right=rotate_right(n->right); -n=rotate_left(n); -cout<<"RL DONE\n"; -return n; -}//end RL - -node* AVL::LR(node* n) -{//begin LR -n->left=rotate_left(n->left); -n=rotate_right(n); -cout<<"LR DONE\n"; -return n; -}//end LR -void AVL::inorder(node* n) -{ -if(n!=NULL) -{ -inorder(n->left); -cout<<" "<data; -inorder(n->right); - - -} - - -} -//end AVL functions - -int main() -{//begin main - AVL tree; - int choice; - cout<<"Enter option\n1.create\n2.add\n3.inorder dispaly\n4.preorder display\n0.exit\n"; - cin>>choice; - type s; - while(choice!=0) - { - switch(choice) - - { - case 1:cin>>s; - tree.root=tree.ins(tree.get_root(),s); - break; - case 2:cin>>s; - tree.root=tree.ins(tree.get_root(),s); - break; - case 3:tree.inorder(tree.get_root()); - cout<>choice; - } - return 0; -}//end main diff --git a/C++/Beautiful-Days-at-the-Movies b/C++/Beautiful-Days-at-the-Movies deleted file mode 100644 index 43c322bb6..000000000 --- a/C++/Beautiful-Days-at-the-Movies +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -#include - -static int do_reverse(const int& x) { - std::string s = std::to_string(x); - for (size_t i = 0; i < s.length()/2; ++i) - std::swap(s[i], s[s.length()-i-1]); - - return std::stoi(s); -} - -int main(void) { - - int i,j,k; - std::cin >> i >> j >> k; - - unsigned long long count = 0; - for (int x = i ; x <= j; ++x) - if (std::abs(x-do_reverse(x)) % k == 0) - count++; - - std::cout << count << '\n'; - - return 0; -} diff --git a/C++/Best_Buying_and_Selling_days_for _stock b/C++/Best_Buying_and_Selling_days_for _stock deleted file mode 100644 index 47d3f3780..000000000 --- a/C++/Best_Buying_and_Selling_days_for _stock +++ /dev/null @@ -1,74 +0,0 @@ -// Program to find best buying and selling days -#include - -// solution structure -struct Interval -{ - int buy; - int sell; -}; - -// This function finds the buy sell schedule for maximum profit -void stockBuySell(int price[], int n) -{ - // Prices must be given for at least two days - if (n == 1) - return; - - int count = 0; // count of solution pairs - - // solution vector - Interval sol[n/2 + 1]; - - // Traverse through given price array - int i = 0; - while (i < n-1) - { - // Find Local Minima. Note that the limit is (n-2) as we are - // comparing present element to the next element. - while ((i < n-1) && (price[i+1] <= price[i])) - i++; - - // If we reached the end, break as no further solution possible - if (i == n-1) - break; - - // Store the index of minima - sol[count].buy = i++; - - // Find Local Maxima. Note that the limit is (n-1) as we are - // comparing to previous element - while ((i < n) && (price[i] >= price[i-1])) - i++; - - // Store the index of maxima - sol[count].sell = i-1; - - // Increment count of buy/sell pairs - count++; - } - - // print solution - if (count == 0) - printf("There is no day when buying the stock will make profitn"); - else - { - for (int i = 0; i < count; i++) - printf("Buy on day: %dt Sell on day: %dn", sol[i].buy, sol[i].sell); - } - - return; -} - -// Driver program to test above functions -int main() -{ - // stock prices on consecutive days - int price[] = {100, 180, 260, 310, 40, 535, 695}; - int n = sizeof(price)/sizeof(price[0]); - - // fucntion call - stockBuySell(price, n); - - return 0; -} diff --git a/C++/Binary Index Tree (Fenwick Tree).cpp b/C++/Binary Index Tree (Fenwick Tree).cpp deleted file mode 100644 index c1a2a3346..000000000 --- a/C++/Binary Index Tree (Fenwick Tree).cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include - using namespace std; - -template -class fenwick { - public: - vector fenw; - int n; - - // Constructor for initialization of size - fenwick(int _n) : n(_n + 1) { - fenw.resize(n); - } - - // to modify , add or replace value at index x - void modify(int x, T v) { - while (x <= n) { - fenw[x] += v; - x += (x & -x); - } - } - - // To get sum of prefix ending at x - T get(int x) { - T v{}; - while (x > 0) { - v += fenw[x]; - x -= (x & -x); - } - return v; - } -}; - - -int main(){ - vector ar = {1 , 2 , 3 , 4 , 5}; - fenwick F(5); - for(int i = 0 ; i < (int) ar.size() ; ++i){ - F.modify(i + 1 ,ar[i]); - } - for(int i = 0 ; i < (int) ar.size() ; ++i){ - cout << F.get(i + 1) << ' '; - } - cout << '\n'; - return 0; -} diff --git a/C++/Binary Search Without Recursion b/C++/Binary Search Without Recursion deleted file mode 100644 index 30a1284ad..000000000 --- a/C++/Binary Search Without Recursion +++ /dev/null @@ -1,52 +0,0 @@ -#include -using namespace std; - -void input(int arr[] , int N) -{ - for(int i = 0 ; i < N ; i++) - { - cin >> arr[i]; - } -} - -int BinarySearch(int arr[] , int N , int x) -{ - int be = 0; - int end = N-1; - - while(be <= end) - { - int mid = (be + end + 1)/2; - if(arr[mid] == x) return mid; - - else if(arr[mid] < x) - { - be = mid+1; - continue; - } - - else - { - end = mid - 1; - continue; - } - } - - return -1; - -} - -int main() -{ - int N , x; - cin >> N; - - int arr[N]; - - input(arr , N); - - cin >> x; - - cout << "Position = " << BinarySearch(arr , N , x); - -} diff --git a/C++/Binary Search!! b/C++/Binary Search!! deleted file mode 100644 index 259a00046..000000000 --- a/C++/Binary Search!! +++ /dev/null @@ -1,41 +0,0 @@ -#include -using namespace std; - -//This will take the input array from the user -void input(int arr[] , int N) -{ - for(int i = 0 ; i < N ; i++) - { - cin >> arr[i]; - } -} - -//This function will search for the given key element in the array -int binarySearch(int arr[] , int start , int end , int x) -{ - if(start > end) - return -1; - - int mid = (start+end+1)/2; - - if(arr[mid] == x) - return mid; - else if(arr[mid] < x) - return binarySearch(arr , mid + 1, end , x); - else if(arr[mid] > x) - return binarySearch(arr , 0 , mid - 1 , x); -} - -int main() -{ - int N , x; - cin >> N; - - int arr[N]; - - input(arr , N); - - cin >> x; - - cout << "Position = " << binarySearch(arr , 0 , N-1 , x); -} diff --git a/C++/BinarySearch.cpp b/C++/BinarySearch.cpp deleted file mode 100644 index ae8602fe4..000000000 --- a/C++/BinarySearch.cpp +++ /dev/null @@ -1,29 +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"< - -int current[5][5], maximum_claim[5][5], available[5]; -int allocation[5] = {0, 0, 0, 0, 0}; -int maxres[5], running[5], safe = 0; -int counter = 0, i, j, exec, resources, processes, k = 1; - -int main() -{ - printf("\nEnter number of processes: "); - scanf("%d", &processes); - - for (i = 0; i < processes; i++) - { - running[i] = 1; - counter++; - } - - printf("\nEnter number of resources: "); - scanf("%d", &resources); - - printf("\nEnter Claim Vector:"); - for (i = 0; i < resources; i++) - { - scanf("%d", &maxres[i]); - } - - printf("\nEnter Allocated Resource Table:\n"); - for (i = 0; i < processes; i++) - { - for(j = 0; j < resources; j++) - { - scanf("%d", ¤t[i][j]); - } - } - - printf("\nEnter Maximum Claim Table:\n"); - for (i = 0; i < processes; i++) - { - for(j = 0; j < resources; j++) - { - scanf("%d", &maximum_claim[i][j]); - } - } - - printf("\nThe Claim Vector is: "); - for (i = 0; i < resources; i++) - { - printf("\t%d", maxres[i]); - } - - printf("\nThe Allocated Resource Table:\n"); - for (i = 0; i < processes; i++) - { - for (j = 0; j < resources; j++) - { - printf("\t%d", current[i][j]); - } - printf("\n"); - } - - printf("\nThe Maximum Claim Table:\n"); - for (i = 0; i < processes; i++) - { - for (j = 0; j < resources; j++) - { - printf("\t%d", maximum_claim[i][j]); - } - printf("\n"); - } - - for (i = 0; i < processes; i++) - { - for (j = 0; j < resources; j++) - { - allocation[j] += current[i][j]; - } - } - - printf("\nAllocated resources:"); - for (i = 0; i < resources; i++) - { - printf("\t%d", allocation[i]); - } - - for (i = 0; i < resources; i++) - { - available[i] = maxres[i] - allocation[i]; - } - - printf("\nAvailable resources:"); - for (i = 0; i < resources; i++) - { - printf("\t%d", available[i]); - } - printf("\n"); - - while (counter != 0) - { - safe = 0; - for (i = 0; i < processes; i++) - { - if (running[i]) - { - exec = 1; - for (j = 0; j < resources; j++) - { - if (maximum_claim[i][j] - current[i][j] > available[j]) - { - exec = 0; - break; - } - } - if (exec) - { - printf("\nProcess%d is executing\n", i + 1); - running[i] = 0; - counter--; - safe = 1; - - for (j = 0; j < resources; j++) - { - available[j] += current[i][j]; - } - break; - } - } - } - if (!safe) - { - printf("\nThe processes are in unsafe state.\n"); - break; - } - else - { - printf("\nThe process is in safe state"); - printf("\nAvailable vector:"); - - for (i = 0; i < resources; i++) - { - printf("\t%d", available[i]); - } - - printf("\n"); - } - } - return 0; -} \ No newline at end of file diff --git a/C++/Bubble Sort!! b/C++/Bubble Sort!! deleted file mode 100644 index 5f39034b0..000000000 --- a/C++/Bubble Sort!! +++ /dev/null @@ -1,43 +0,0 @@ -#include -using namespace std; - -void input(int arr[], int N) -{ - for(int i = 0 ; i < N ; i++) - { - cin >> arr[i]; - } -} - -void bubbleSort(int arr[] , int N) -{ - for(int curIteration = 1 ; curIteration < N ; curIteration++) - { - for(int curElement = 0 ; curElement < N - curIteration ; curElement++) - { - if(arr[curElement] > arr[curElement+1]) swap(arr[curElement] , arr[curElement+1]); - } - } -} - -void output(int arr[], int N) -{ - for(int i = 0 ; i < N ; i++) - { - cout << arr[i] << " "; - } -} - -int main() -{ - int N; - cin >> N; - - int arr[N]; - - input(arr , N); - - bubbleSort(arr , N); - - output(arr , N); -} diff --git a/C++/BuyingATVSet.cpp b/C++/BuyingATVSet.cpp deleted file mode 100644 index 7d6e41522..000000000 --- a/C++/BuyingATVSet.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -using namespace std; - -typedef unsigned long long int ulli; - - -int main() { - ulli a, b, x, y, gcdiv; - cin>>a>>b>>x>>y; - - gcdiv = __gcd(x, y); - - x /= gcdiv; - y /= gcdiv; - - cout< -#include -using namespace std; - -int main(void) -{ - int b, h, A, a, c, d, e, f, s; - cout<<"calculating an area of a triangle"<>a; - if(a==1) - { - cout<<"enter the base value: "; - cin>>b; - cout<>h; - cout<>c; - cout<<"/nLength of 2nd side: "; - cin>>d; - cout<<"/nLength of 3rd side: "; - cin>>e; - cout< -int main() -{ - cout<<"Hello World"; - return 0; -} diff --git a/C++/Chandu_and_his_Interns.cpp b/C++/Chandu_and_his_Interns.cpp deleted file mode 100644 index a5008ba93..000000000 --- a/C++/Chandu_and_his_Interns.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include -using namespace std; -typedef long long int lli; -int main(){ - lli input; - lli x; - lli count=0; - lli temp=0; - cin>>input; - lli m=input; - while(m--){ - cin>>x; - temp=count=0; - for(int i=1;i*i<=x;i++){ - if(x%i==0) - if(i*i==x) - count++; - else - count+=2; - if(count>=4){ - temp=1; - break; - } - } - if(temp==1) - cout<<"YES"< -#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++/Conditionalopeator b/C++/Conditionalopeator deleted file mode 100644 index 261f74ce9..000000000 --- a/C++/Conditionalopeator +++ /dev/null @@ -1,9 +0,0 @@ -#include -using namespace std; -int main() -{ - bool inBigClassroom = 0; // - const int classSize = inBigClassroom ? 30 : 20; //using conditional operator - std::cout << "The class size is: " << classSize; - return 0; -} diff --git a/C++/DDA.cpp b/C++/DDA.cpp deleted file mode 100644 index a716ef688..000000000 --- a/C++/DDA.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include -#include -#include -#include - -int sign(float a); -void main() -{ - int gd=DETECT,gm; - int x1,x2,y1,y2,length,i; - float dx,dy,x[100],y[100]; - - - - cout<<"\n Enter x1 and y1:"; - cin>>x1>>y1; - cout<<"\n Enter x2 and y2:"; - cin>>x2>>y2; - - dx=fabs(x2-x1); - dy=fabs(y2-y1); - - if(dx>=dy) - { - length=dx; - } - else - { - length=dy; - } - - dx=(float)(x2-x1)/length; - dy=(float)(y2-y1)/length; - - x[0]=x1+0.5*sign(dx); - y[0]=y1+0.5*sign(dy); - i=1; - - while(i<=length) - { - // cout<0) - return 1; - else if(a==0) - return 0; - else - return -1; -} diff --git a/C++/DELETE.cpp b/C++/DELETE.cpp deleted file mode 100644 index 31752e56f..000000000 --- a/C++/DELETE.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include -void main() -{ - clrscr(); - int a[20],n,i,ele,b; - cout<<"Enter the number of elements\n"; - cin>>n; - cout<<"Enter the elements\n"; - for(i=0;i>a[i]; - cout<<"Enter the element to be deleted\n"; - cin>>ele; - for(i=0;i -#include -#include -using namespace std; -typedef pair pii; - -class comp{ /// comparission in priority queue -public: - bool operator()(pii a, pii b){ - return a.second>b.second; - } -}; - -class Graphs{ -private: - list *adjList; - int V; -public: - Graphs(int n){ - V=n; - adjList=new list[V]; - } - void addEdge(int s, int d, int wt){ - adjList[s].push_back(make_pair(d,wt)); - } - int dijikstra(int s, int d){ ///algorigthm to find shortest distance - priority_queue,comp> pq; - int * distance=new int[V]; - for (int i=0;isecond+curDist; - if (childDistfirst]){ ///check the distance shortest ahi tabhi update krna - pq.push(make_pair(it->first,childDist)); - distance[it->first]=childDist; - } - } - } - for (int i=0;i> low >> high; - - cout << "Prime numbers between " << low << " and " << high << " are: "; - - while (low < high) - { - flag = 0; - - for(i = 2; i <= low/2; ++i) - { - if(low % i == 0) - { - flag = 1; - break; - } - } - - if (flag == 0) - cout << low << " "; - - ++low; - } - - return 0; -} diff --git a/C++/DynamicProgramming/longest_common_subsequence.cpp b/C++/DynamicProgramming/longest_common_subsequence.cpp deleted file mode 100644 index 5fda53270..000000000 --- a/C++/DynamicProgramming/longest_common_subsequence.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* -DYNAMIC PROGRAMMING - -The program finds the longest common subsequence between two strings, -i.e. given two strings the program will find the longest common subsequence -between them. - -eg. abcdaf(string 1) - acbcf (string 2) - - lcs - abcf - -Wiki - https://en.wikipedia.org/wiki/Longest_common_subsequence_problem - -*/ -#include -#include - -using namespace std; - -int main() -{ - char arr[100], arr1[100]; - cout<<"\nEnter the first string: "; - cin>>arr; - cout<<"\nEnter the second string: "; - cin>>arr1; - int len_first,len_second; - len_first = strlen(arr); - len_second = strlen(arr1); - int final_matrix[len_second + 1][len_first + 1]; - int i=0,j=0; - for(i=0;i<=len_second;i++) - { - final_matrix[i][0] = 0; - } - for(i=0;i<=len_first;i++) - { - final_matrix[0][i] = 0; - } - for(i=1;i<=len_second; i++) - { - for(j=1;j<=len_first;j++) - { - if(arr1[i-1] == arr[j-1]) - { - //cout<<"\nValue match is(i:j:val): "< -#include -using namespace std; -int main() -{ -clrscr(); -int n; -cout << "Enter an integer: "; - cin >> n; - if ( n % 2 == 0) -cout << n << " is even."; - else -cout << n << " is odd."; - -return 0; -} diff --git a/C++/FFT.hpp b/C++/FFT.hpp deleted file mode 100644 index 0f72af28f..000000000 --- a/C++/FFT.hpp +++ /dev/null @@ -1,96 +0,0 @@ -#include // std::vector -#include // std::complex - -#define _USE_MATH_DEFINES // M_PI -#include // std::sin, std::cos - -using base_t = std::complex; -using vCoef_t = std::vector; - -//==================================================================================================================================== -//! -//! \brief Realization of FFT(Fast Fourier transform) - a method that allows calculating the DFT(discrete Fourier transform), -//! which is used to convolve polynomials -//! -//! \param[out] A Array of polynomial coefficients; result will be here also -//! -//! T(N) = O(NlogN) -//! M(N) = O(N) -//! -//==================================================================================================================================== - -void FFT(vCoef_t &A) -{ - auto N{ A.size() }; - if (N == 1) - return; - - vCoef_t A0(N >> 1), - A1(N >> 1); - for (auto i{ 0ull }, j{ 0ull }; i < N; i += 2, ++j) - { - A0[j] = A[i]; - A1[j] = A[i + 1]; - } - - FFT(A0); - FFT(A1); - - double alf = 2 * M_PI / static_cast(N); - - N >>= 1; - - base_t w{ 1 }, - wn{ std::cos(alf), std::sin(alf) }; - for (auto i{ 0ull }; i < N; ++i) - { - A[i] = A0[i] + w * A1[i]; - A[i + N] = A0[i] - w * A1[i]; - - w *= wn; - } -} - -//==================================================================================================================================== -//! -//! \brief Realization of IFFT(Inverse fast Fourier transform) algorithm, which is used to reconstruct -//! the coefficients of the polynomial from the values at the points, the interpolation analog -//! -//! \param[out] A Array of polynomial coefficients; result will be here also -//! -//! T(N) = O(NlogN) -//! M(N) = O(N) -//! -//==================================================================================================================================== - -void IFFT(vCoef_t &A) -{ - auto N = A.size(); - if (N == 1) - return; - - vCoef_t A0(N >> 1), - A1(N >> 1); - for (auto i{ 0ull }, j{ 0ull }; i < N; i += 2, ++j) - { - A0[j] = A[i]; - A1[j] = A[i + 1]; - } - - IFFT(A0); - IFFT(A1); - - double alf = -2 * M_PI / static_cast(N); - - N >>= 1; - - base_t w{ 1 }, - wn{ std::cos(alf), std::sin(alf) }; - for (auto i{ 0ull }; i < N; ++i) - { - A[i] = (A0[i] + w * A1[i]) / 2.; - A[i + N] = (A0[i] - w * A1[i]) / 2.; - - w *= wn; - } -} diff --git a/C++/Factorial b/C++/Factorial deleted file mode 100644 index 290905bf5..000000000 --- a/C++/Factorial +++ /dev/null @@ -1,21 +0,0 @@ -# include -using namespace std; - -long long factorial(int a); // 'long' for big integer value -long long fct=1; -int main(){ -int n; -cout<<"Enter number for factorial"<>n; -factorial(n); -cout<<"Factorial = "<1) - {fct=a*factorial(a-1); - return fct;} - else - return 1; - } diff --git a/C++/Factorial.cpp b/C++/Factorial.cpp deleted file mode 100644 index 66a9c07e7..000000000 --- a/C++/Factorial.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -using namespace std; -int factorial(int n) //Factorial function -{ - if(n==1 || n==0) - return 1; - else - return n*factorial(n-1); -} -int main() //main function -{ - int n; - cout << "\nEnter a positive integer : "; - cin >> n; - cout << "\nThe Factorial of Number " << n << " is = " << factorial(n)< -using namespace std; - -int main() -{ - unsigned int n; - unsigned long long factorial = 1; - - cout << "Enter a positive integer: "; - cin >> n; - - for(int i = 1; i <=n; ++i) - { - factorial *= i; - } - - cout << "Factorial of " << n << " = " << factorial; - return 0; -} diff --git a/C++/Fibo.cpp b/C++/Fibo.cpp deleted file mode 100644 index 7c4f36b9d..000000000 --- a/C++/Fibo.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include -using namespace std; - -main () -{ - long long a=0,b=1,c,n; - cout<<"Enter total number of Fibonacci= ";cin>>n; - - for(int i=1;i<=n;i++) - { - if(i==1) - { - c=1; - } - else - { - c=a+b; - a=b; - b=c; - } - if(i!=n) cout< -using namespace std; -int main(void) -{ - int n,a=0,b=1,c=0; - cout<<"Enter the number of term you want in fibonnaci series : "; - cin>>n; - for(int i =0; i -using namespace std; - -struct Node -{ - int data; - struct Node* next; -}; - -void Print(struct Node *n,int search) -{ - while (n!=NULL) - { - n->data; - - if (n->data==search) - cout<<"Find \n"; - else - cout<<"Not Find \n"; - n = n->next; - } - -} - -int main() -{ - - int search = 2; - - struct Node* head =NULL; - struct Node* second =NULL; - struct Node* third =NULL; - - head = (struct Node*)malloc (sizeof(struct Node)); - second = (struct Node*)malloc (sizeof(struct Node)); - third = (struct Node*)malloc (sizeof(struct Node)); - - - head->data = 1; - head->next = second; - - second->data = 2; - second->next = third; - - third->data = 3; - third->next = NULL; - - Print(head,search); - - return 0; -} diff --git a/C++/GCD2.cpp b/C++/GCD2.cpp deleted file mode 100644 index 6013416d6..000000000 --- a/C++/GCD2.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -using namespace std; -int main() -{ - long long t,a,b=0; - int len; - string str; - cin>>t; - while(t--){ - b=0; - cin>>a; - cin>>str; - if(a==0){ - cout< -using namespace std; - -int main() -{ - int n1, n2, n3, n4, c, max; - cout<<"1. HCF\n"; - cout<<"2. LCM\n"; - cout<<"choice: "; - cin>>c; - if(c==1) - { - cout << "Enter two numbers: "; - cin >> n1 >> n2; - - while(n1 != n2) - { - if(n1 > n2) - n1 -= n2; - else - n2 -= n1; - } - - cout << "HCF = " << n1; - } - else - { - - cout << "Enter two numbers: "; - cin >> n3 >> n4; - - // maximum value between n1 and n2 is stored in max - max = (n1 > n2) ? n1 : n2; - - do - { - if (max % n1 == 0 && max % n2 == 0) - { - cout << "LCM = " << max; - break; - } - else - ++max; - }while (true); - } - return 0; - -} diff --git a/C++/GivenLengthAndSumofDigits.cpp b/C++/GivenLengthAndSumofDigits.cpp deleted file mode 100644 index c6b28e815..000000000 --- a/C++/GivenLengthAndSumofDigits.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -using namespace std; - -int main() { - int m, s, sum = 0; - cin>>m>>s; - - int dig[m]; - fill_n(dig, m, 0); - - if(s == 0){ - if(m > 1){ - cout<<-1<<" "<<-1; - } - else{ - cout<<0<<" "<<0; - } - return 0; - } - else{ - if(m == 1){ - cout<<1<<" "<=0; --i){ - cout< -using namespace std; - -int countCycles(int **edges,int c,int n) -{ - int count=0; - for(int i=1;i<=n;i++) - { - for(int j=1;j<=n;j++) - { - if(edges[i][j]==1 && j!=i) - { - - - for(int k=1;k<=n;k++) - { - if(edges[j][k]==1 && (k!=j )&& (k!=i)) - { - if(edges[k][i]==1 && k!=i && k!=j) - count++; - } - } - } - } - } - return count/6;//because 3! ways of arranging same i,j,k.we are detecting one cycle 6 times. -} -int main() -{ - int n,m; - cin>>n>>m; - int **edges=new int*[n]; - for(int i=1;i<=n;i++) - { - edges[i]=new int[n]; - for(int j=1;j<=n;j++) - edges[i][j]=0; - } - int u[m],v[m]; - for(int i=0;i>u[i]; - - - } - - for(int i=0;i>v[i]; - for(int i=0;i -using namespace std; -int main() -{ - int T; - cin >> T; - while (T--) - { - int num; - cin >> num; - char c; - c = getchar(); - char a[num] = {}; - int j=0; //Length of HTHT - for(int i=0;i -using namespace std; -int count = 0; - -void hanoi(int n, int source, int dest, int helper){ - - if(n==0){ - return; - } - hanoi(n-1,source,helper,dest); - cout<<"Move "<>n; - hanoi(n,1,2,3); - cout< -#include -#include -#include - -#define size 10 //This is the size of heap created.Increase, if required -int heapsize=0; -using namespace std; - -void Max_heapify(int A[],int i) -{ - int left=(2*i)+1,right=(2*i)+2,largest,temp; - - if(leftA[i]) - largest=left; - else - largest=i; - if(rightA[largest]) - largest=right; - if(largest!=i) - { - temp=A[i]; - A[i]=A[largest]; - A[largest]=temp; - Max_heapify(A,largest); - } -} -void Build_maxheap(int A[]) -{ - heapsize=size; - int i=(size-2)/2; - while(i>=0) - { - Max_heapify(A,i); - i--; - } -} - -int heapmax(int A[]) -{ - return A[0]; -} -int extractmax(int A[]) -{ - if(heapsize<=0) - { - printf("Heap Underflow\n"); - //return ; - } - else - { - int max=A[0]; - A[0]=A[heapsize-1]; - heapsize--; - Max_heapify(A,0); - return max; - } -} -void heapinsert(int A[],int key) -{ - int temp; - heapsize++; - int i=heapsize-1; - A[i]=key; - while(A[(i-1)/2]0) - { - temp=A[(i-1)/2]; - A[(i-1)/2]=A[i]; - A[i]=temp; - i=(i-1)/2 ; - } -} -void display(int A[]) -{ - if(heapsize==0) - cout<<"Priority Queue Empty\n"; - else - { - cout<<"Priority Queue:\n"; - for(int i=0;i0;i--) - { - temp=A[0]; - A[0]=A[i]; - A[i]=temp; - heapsize--; - Max_heapify(A,0); - } - } -} - -/* -int main() -{ - //Uncomment this main() & comment the later one to run the heapsort program. - - srand(time(NULL)); - int A[size]; - for(int i=0;i>ch; - - if(ch>3 || ch<=0) - break; - - switch(ch) - { - case 1: - cout<<"Enter the priority value of the element\n"; - cin>>x; - heapinsert(Q,x); - break; - case 2: - x=extractmax(Q); - cout<<"Max Priority element="<left!=NULL) - leftht=1+height(root->left); - if(root->right!=NULL) - rightht=1+height(root->right); - return max(leftht,rightht); - } diff --git a/C++/Hello World b/C++/Hello World deleted file mode 100644 index fca7f27e7..000000000 --- a/C++/Hello World +++ /dev/null @@ -1,9 +0,0 @@ -#include -void main(){ - -cout<<"Hello World"; - - -} - -output:Hello World diff --git a/C++/Hello World AJ.cpp b/C++/Hello World AJ.cpp deleted file mode 100644 index 147e71d2a..000000000 --- a/C++/Hello World AJ.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -void main() -{ -cout<<"Hello World, I am Ayush Jain"; -} diff --git a/C++/Hello world, but in polish b/C++/Hello world, but in polish deleted file mode 100644 index bbda9d163..000000000 --- a/C++/Hello world, but in polish +++ /dev/null @@ -1,3 +0,0 @@ -void helloWorldButInPolish() { - std::cout << "Witaj, świecie!" << std::endl; -} diff --git a/C++/Hello world.cpp b/C++/Hello world.cpp deleted file mode 100644 index f2271ae09..000000000 --- a/C++/Hello world.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -using namespace std; -void main() { - cout << "Hello, World!"; -} diff --git a/C++/Hello-World-lisazevedo.cpp b/C++/Hello-World-lisazevedo.cpp deleted file mode 100644 index 8f0059f3b..000000000 --- a/C++/Hello-World-lisazevedo.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -using namespace std; - -int main(){ - - cout<<"Hellou World!!"< -using namespace std; - -int main() { - - cout << "Hola Mundo en español :w" << endl; - - return 0; - -} diff --git a/C++/Hello.cc b/C++/Hello.cc deleted file mode 100644 index a7c4518b3..000000000 --- a/C++/Hello.cc +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -using namespace std; - -int main(void){ - string name; - // Get username - cout << "Enter Username:"; - getline(cin,name); - // Print hello message - cout << "Hello, " << name << "!" << 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++/HelloOctober.cpp b/C++/HelloOctober.cpp deleted file mode 100644 index a21d41ea5..000000000 --- a/C++/HelloOctober.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello world! Welcome to Hacktoberfest" << endl; - return 0; -} - diff --git a/C++/HelloOpenSource.cpp b/C++/HelloOpenSource.cpp deleted file mode 100644 index 68720920d..000000000 --- a/C++/HelloOpenSource.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -#include -int main() -{ - std::cout << "Hello Open Source! \n"; - return 0; -} diff --git a/C++/HelloPortugal.cpp b/C++/HelloPortugal.cpp deleted file mode 100644 index c8fa39826..000000000 --- a/C++/HelloPortugal.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() { - std::cout << "Hello Portugal" << "\n"; - - exit(0); -} diff --git a/C++/HelloWorld-without-semicolon.cpp b/C++/HelloWorld-without-semicolon.cpp deleted file mode 100644 index c15b9b8e5..000000000 --- a/C++/HelloWorld-without-semicolon.cpp +++ /dev/null @@ -1,10 +0,0 @@ -// The program executes hello world indefinately without using any extra semicolon in the main function -#include -using namespace std; - -int main(){ - while(cout<<"Hello World!\n"){ - - } - return 0; -} diff --git a/C++/HelloWorld.cpp b/C++/HelloWorld.cpp deleted file mode 100644 index 393bcb2ba..000000000 --- a/C++/HelloWorld.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/HelloWorldAbhishek.cpp b/C++/HelloWorldAbhishek.cpp deleted file mode 100644 index ea46926b3..000000000 --- a/C++/HelloWorldAbhishek.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -using namespace std; - -int main() -{ - cout<<"Hello World"; - return 0; -} diff --git a/C++/HelloWorldForAnIndian b/C++/HelloWorldForAnIndian deleted file mode 100644 index c6800a156..000000000 --- a/C++/HelloWorldForAnIndian +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Namaste, sansar!"; - return 0; -} diff --git a/C++/HelloWorldGraphics.cpp b/C++/HelloWorldGraphics.cpp deleted file mode 100644 index b10dc8c57..000000000 --- a/C++/HelloWorldGraphics.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include -#include -#include -#include -using namespace std; - const int xShift = 90; -void animeLine(int x1,int y1,int x2, int y2){ - for(int i=1;i<=100;i++){ - line(x1,y1,(((x2*i)+x1*(100-i))/100),(((y2*i)+y1*(100-i))/100)); - Sleep(10); - } -} -void drawOne(){ - animeLine(xShift+20,200,xShift+20,400); - animeLine(xShift+40,200,xShift+40,400); - animeLine(xShift+20,300,xShift+40,300); -} -void drawTwo(){ - animeLine(xShift+60,200,xShift+60,400); - animeLine(xShift+120,200,xShift+60,200); - animeLine(xShift+60,300,xShift+90,300); - animeLine(xShift+60,400,xShift+120,400); -} -void drawThree(){ - animeLine(xShift+140,200,xShift+140,400); - animeLine(xShift+140,400,xShift+190,400); - - animeLine(xShift+200,200,xShift+200,400); - animeLine(xShift+200,400,xShift+240,400); -} -void drawFour(){ - animeLine(xShift+250,200,xShift+250,400); - animeLine(xShift+280,200,xShift+280,400); - animeLine(xShift+250,200,xShift+280,200); - animeLine(xShift+250,400,xShift+280,400); -} -void drawFive(){ - animeLine(xShift+380,200,xShift+400,400); - animeLine(xShift+400,400,xShift+420,200); - animeLine(xShift+420,200,xShift+440,400); - animeLine(xShift+440,400,xShift+460,200); -} -void drawSix(){ - animeLine(xShift+480,200,xShift+480,400); - animeLine(xShift+510,200,xShift+510,400); - animeLine(xShift+480,200,xShift+510,200); - animeLine(xShift+480,400,xShift+510,400); -} -void drawSeven(){ - animeLine(xShift+530,200,xShift+530,400); - animeLine(xShift+560,200,xShift+560,250); - animeLine(xShift+530,200,xShift+560,200); - animeLine(xShift+530,250,xShift+560,250); - animeLine(xShift+530,250,xShift+560,400); -} -void drawEight(){ - animeLine(xShift+590,200,xShift+590,400); - animeLine(xShift+590,400,xShift+620,400); -} -void drawNine(){ - animeLine(xShift+640,200,xShift+640,400); - animeLine(xShift+640,200,xShift+660,300); - animeLine(xShift+660,300,xShift+640,400); -} -void drawTen(){ - animeLine(xShift+680,200,xShift+680,380); - animeLine(xShift+670,390,xShift+690,390); - animeLine(xShift+670,390,xShift+670,400); - animeLine(xShift+670,400,xShift+690,400); - animeLine(xShift+690,400,xShift+690,390); -} - -int main() -{ - initwindow(900,600,"Hello there!",100,100); - std::thread t1(drawOne),t2(drawTwo),t3(drawThree),t4(drawFour),t5(drawFive),t6(drawSix); - std::thread t7(drawSeven),t8(drawEight),t9(drawNine),t10(drawTen); - t1.detach(); - t2.detach(); - t3.detach(); - t4.detach(); - t5.detach(); - t6.detach(); - t7.detach(); - t8.detach(); - t9.detach(); - t10.detach(); - - - _getch(); - return 0; -} diff --git a/C++/HelloWorld_1_.cpp b/C++/HelloWorld_1_.cpp deleted file mode 100644 index 7a831e5c8..000000000 --- a/C++/HelloWorld_1_.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello world!" << endl; - cout << "My 1st Contribution" << endl; - return 0; -} diff --git a/C++/HelloWorld_Brazil.cpp b/C++/HelloWorld_Brazil.cpp deleted file mode 100644 index 7ca3351cb..000000000 --- a/C++/HelloWorld_Brazil.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main(void) -{ - std::cout << "Olá Mundo!\n"; - - return 0; -} diff --git a/C++/HelloWorld_Peru.cpp b/C++/HelloWorld_Peru.cpp deleted file mode 100644 index 366535f7c..000000000 --- a/C++/HelloWorld_Peru.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include - -using namespace std; - -int main() { - - cout << "Hola Mundo, desde Perú" << endl << endl; - for(int i = 0; i < 10; i++) { - cout << "PPPPPPPPPPPPPPP PPPPPPPPPPPPPPP" << endl; - } - - return 0; -} diff --git a/C++/HelloWorldcplusplus.cpp b/C++/HelloWorldcplusplus.cpp deleted file mode 100644 index c78dd5e24..000000000 --- a/C++/HelloWorldcplusplus.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -void main() -{ - cout<<"Hello World"; - getch(); -} diff --git a/C++/Hello_Github.cpp b/C++/Hello_Github.cpp deleted file mode 100644 index f61a95dc1..000000000 --- a/C++/Hello_Github.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -using namespace std; -int main() -{ - cout<<"Hello World"< -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++/Hello_World_Cpp b/C++/Hello_World_Cpp deleted file mode 100644 index ca76d7ee4..000000000 --- a/C++/Hello_World_Cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - int main(){ - cout << "Hello World" << endl; - return 0; -} - -output: Hello World diff --git a/C++/Hi, world! b/C++/Hi, world! deleted file mode 100644 index 582e36ae9..000000000 --- a/C++/Hi, world! +++ /dev/null @@ -1,10 +0,0 @@ -//Program to hello world! -#include - -using namespace std; - -int main() -{ -printf("Hi, world!\n"); //Print is faster than cout -return 0; -} diff --git a/C++/HiWorld.cpp b/C++/HiWorld.cpp deleted file mode 100644 index 883044c08..000000000 --- a/C++/HiWorld.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include - -int main() -{ -std::string hello; -hello = "Hello World!"; - -std::cout< -using namespace std; - -void input(int arr[] , int N) -{ - for(int i = 0 ; i < N ; i++) - { - cin >> arr[i]; - } -} - -void output(int arr[] , int N) -{ - for(int i = 0 ; i < N ; i++) - { - cout << arr[i] << " "; - } - - cout << endl; -} - -int main() -{ - int N; - - cin >> N; - - int arr[N]; - - input(arr , N); - - for(int i = 1 ; i < N ; i++) - { - int z = i; - for(int k = i-1 ; k >= 0 ; k--) - { - if(arr[z] < arr[k]) - { - // SWAP - int temp = arr[k]; - arr[k] = arr[z]; - arr[z] = temp; - z--; - } - - else break; - } - - } - - output(arr , N); -} diff --git a/C++/Insertion Sort Steps b/C++/Insertion Sort Steps deleted file mode 100644 index 7000cfe14..000000000 --- a/C++/Insertion Sort Steps +++ /dev/null @@ -1,51 +0,0 @@ -#include -using namespace std; - -void input(int arr[] , int N) -{ - for(int i = 0 ; i < N ; i++) - { - cin >> arr[i]; - } -} - -void output(int arr[] , int N) -{ - for(int i = 0 ; i < N ; i++) - { - cout << arr[i] << " "; - } - - cout << endl; -} - -int main() -{ - int N; - - cin >> N; - - int arr[N]; - - input(arr , N); - - for(int i = 1 ; i < N ; i++) - { - int z = i; - for(int k = i-1 ; k >= 0 ; k--) - { - if(arr[z] < arr[k]) - { - // SWAP - int temp = arr[k]; - arr[k] = arr[z]; - arr[z] = temp; - z--; - } - - else break; - } - - output(arr , N); - } -} diff --git a/C++/Insertion Sort!! b/C++/Insertion Sort!! deleted file mode 100644 index 944c13174..000000000 --- a/C++/Insertion Sort!! +++ /dev/null @@ -1,54 +0,0 @@ -#include -using namespace std; - -void input(int arr[], int N) -{ - for(int i = 0 ; i < N ; i++) - { - cin >> arr[i]; - } -} - -int largestIndex(int arr[] , int N) -{ - int indexlargestElement = 0 , i = 0; - for(i = 0 ; i < N ; i++) - { - if(arr[i] > arr[indexlargestElement]) - indexlargestElement = i; - } - - return indexlargestElement; -} - -void output(int arr[], int N) -{ - for(int i = 0 ; i < N ; i++) - { - cout << arr[i] << " "; - } -} - -void selectionSort(int arr[] , int N) -{ - for(int curIteration = 0 ; curIteration < N - 1; curIteration++) - { - int indexlargestElement = largestIndex(arr , N - curIteration); - swap(arr[indexlargestElement] , arr[N - curIteration - 1]); - } -} - - -int main() -{ - int N; - cin >> N; - - int arr[N]; - - input(arr , N); - - selectionSort(arr , N); - - output(arr , N); -} diff --git a/C++/InsertionSort123 b/C++/InsertionSort123 deleted file mode 100644 index 71a8c9d29..000000000 --- a/C++/InsertionSort123 +++ /dev/null @@ -1,38 +0,0 @@ -//O(n^2) - -#include - -using namespace std; - -void InsertionSort(int a[]) -{ - - for(int i=0;i<15;i++) - { - for(int j=i;j>=0;j--) - { - if(a[j]>a[j+1]) - { - swap(a[j],a[j+1]); - } - else{ - cout<<"FALTU KA COMPARISION BACH GAYA"<<" "< -#define ll long long - -using namespace std; - -vector fun(string str) -{ - ll n = str.length(); - vector f(n); - f[0] = 0; - - for(ll i=1;i0 && str[i]!=str[j]) - { - j = f[j-1]; - } - if(str[i]==str[j]) - j++; - - f[i] = j; - - } - - return f; -} - -ll match(string txt,string str,vector v) -{ - ll ans = 0; - - ll ptr1 = 0; - ll ptr2 = 0; - - while(ptr1>pattern>>text; - - vector pref = fun(pattern); - - ll cnt = match(text,pattern,pref); // 5 - - return 0; -} diff --git a/C++/KONI CHIWA.cpp b/C++/KONI CHIWA.cpp deleted file mode 100644 index e0d4030fa..000000000 --- a/C++/KONI CHIWA.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main() { - std::cout << "KONI CHIWA, World!"; - return 0; -} diff --git a/C++/L0G1C4LABHAY.cpp b/C++/L0G1C4LABHAY.cpp deleted file mode 100644 index 45b882fb6..000000000 --- a/C++/L0G1C4LABHAY.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - cout<<"Hello World"; - return 0; -} diff --git a/C++/LCM of intergers a and b.cpp b/C++/LCM of intergers a and b.cpp deleted file mode 100644 index 84077616a..000000000 --- a/C++/LCM of intergers a and b.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include -using namespace std; - -int gcd(int a, int b) -{ - if(b==0) return a; - else if (a==0) return b; - - else if(a>b) return gcd(a-b,b); - else if(b>a) return gcd(a,b-a); -} - -int lcm(int a, int b) -{ - return a*b / (gcd(a,b)); -} - -int main() -{ - int a,b; - cin >> a >> b; - cout << lcm(a,b); -} diff --git a/C++/LL.cpp b/C++/LL.cpp deleted file mode 100644 index dc2c24d12..000000000 --- a/C++/LL.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#include -using namespace std; - -class node -{ -private: - int data; - node* next; - node*prev; - public: - node(int d) - { - data=d; - next=NULL; - prev=NULL; - } - friend class LinkedList; -}; - -class LinkedList -{ -public: - node* head,*tail; - LinkedList() - { - head=NULL; - tail=NULL; - } - - void insertAtFront(int data) - { - if(head==NULL) - head=tail=new node(data); - else - { - node*n=new node(data); - head->prev=n; - n->next=head; - n->prev=NULL; - head=n; - } - } - - int getlength() - { - int l=0; - node *temp=head; - while(temp) - { - l++; - temp=temp->next; - } - return l; - } - - void insertAtMiddle(int d,int p) - { - if(p==0) - insertAtFront(d); - if(p>getlength()) - insertAtTail(d); - else - { - int jumps=1; - node *temp=head; - while(jumps<=p-1) - { - temp=temp->next; - jumps++; - } - node*n=new node(d); - n->prev=tail; - n->next=temp; - temp->next=n; - } - } - - - - void insertAtTail(int data) - { - if(head==NULL) - head=tail=new node(data); - else - { - node *n=new node(data); - - n->prev=tail; - tail->next=n; - tail=n; - - } - } - - - void print() - { - node*temp=head; - while(temp!=NULL) - { - cout<data<<" --> "; - temp=temp->next; - } - cout<data<<" --> "; - temp=temp->prev; - } - cout<next); - cout<data<<" --> "; - } - -}; - -int main() -{ - LinkedList l; - l.insertAtFront(4); - l.insertAtFront(3); - l.insertAtFront(2); - l.insertAtFront(6); - l.insertAtTail(5); - l.insertAtTail(7); - l.insertAtTail(9); - l.printReverse(l.head); - l.print(); - l.printrev(); - - return 0; -} diff --git a/C++/LambdaVectorSort.cpp b/C++/LambdaVectorSort.cpp deleted file mode 100644 index 0868c04f4..000000000 --- a/C++/LambdaVectorSort.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include -#include -int main() { - std::vector words {"These", "Words", "Will", "Be", "Sorted", "After", "Size"}; - std::sort(words.begin(), words.end(), [](auto a, auto b) { return a.size() < b.size(); }); - for (auto word : words) std::cout << word << ", "; - return 0; -} \ No newline at end of file diff --git a/C++/Largest_prime_factor.cpp b/C++/Largest_prime_factor.cpp deleted file mode 100644 index d8696c390..000000000 --- a/C++/Largest_prime_factor.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include -#include -using namespace std; - - -int main() { - int t; - long int n,i; -cin>>t; -while(t--) - { -cin>>n; - i=2; - for(;i<=(int)sqrt(n);) - { - if(n%i==0) - { - n/=i; - i=2; - } - - else - ++i; - } - - cout< - -int main(){ - int n; - cin >> n; - for(int i=0;i -#include -using namespace std; - -int mcm(int input[],int start,int last){ - if(start==last){ - return 0; - } - int min = INT_MAX; - for(int i=start;i -using namespace std; - -int main() -{ - int a[10][10], b[10][10], mult[10][10], r1, c1, r2, c2, i, j, k; - - cout << "Enter rows and columns for first matrix: "; - cin >> r1 >> c1; - cout << "Enter rows and columns for second matrix: "; - cin >> r2 >> c2; - - // If column of first matrix in not equal to row of second matrix, - // ask the user to enter the size of matrix again. - while (c1!=r2) - { - cout << "Error! column of first matrix not equal to row of second."; - - cout << "Enter rows and columns for first matrix: "; - cin >> r1 >> c1; - - cout << "Enter rows and columns for second matrix: "; - cin >> r2 >> c2; - } - - // Storing elements of first matrix. - cout << endl << "Enter elements of matrix 1:" << endl; - for(i = 0; i < r1; ++i) - for(j = 0; j < c1; ++j) - { - cout << "Enter element a" << i + 1 << j + 1 << " : "; - cin >> a[i][j]; - } - - // Storing elements of second matrix. - cout << endl << "Enter elements of matrix 2:" << endl; - for(i = 0; i < r2; ++i) - for(j = 0; j < c2; ++j) - { - cout << "Enter element b" << i + 1 << j + 1 << " : "; - cin >> b[i][j]; - } - - // Initializing elements of matrix mult to 0. - for(i = 0; i < r1; ++i) - for(j = 0; j < c2; ++j) - { - mult[i][j]=0; - } - - // Multiplying matrix a and b and storing in array mult. - for(i = 0; i < r1; ++i) - for(j = 0; j < c2; ++j) - for(k = 0; k < c1; ++k) - { - mult[i][j] += a[i][k] * b[k][j]; - } - - // Displaying the multiplication of two matrix. - cout << endl << "Output Matrix: " << endl; - for(i = 0; i < r1; ++i) - for(j = 0; j < c2; ++j) - { - cout << " " << mult[i][j]; - if(j == c2-1) - cout << endl; - } - - return 0; -} diff --git a/C++/Merge_Sort (2).cpp b/C++/Merge_Sort (2).cpp deleted file mode 100644 index ad4524a69..000000000 --- a/C++/Merge_Sort (2).cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include -using namespace std; - -void inputArr(int a[], int n){ - for(int i = 0; i>a[i]; - } -} - -void outputArr(int a[], int n){ - for(int i = 0; i=end){ - return; - } - - int mid = (beg + end)/2; - mergeSort(a,beg,mid); - mergeSort(a,mid+1,end); - mergeSortedArr(a,beg,mid,end); -} - - - - - - -int main(){ - int n; - cin>>n; - int a[100]; - inputArr(a,n); - mergeSort(a,0,n-1); - outputArr(a,n); -} \ No newline at end of file diff --git a/C++/Merge_Sorted_LL.cpp b/C++/Merge_Sorted_LL.cpp deleted file mode 100644 index 1416de9fa..000000000 --- a/C++/Merge_Sorted_LL.cpp +++ /dev/null @@ -1,125 +0,0 @@ -// C program to merge two sorted linked lists -// in-place. -#include -using namespace std; - -struct Node -{ - int data; - struct Node *next; -}; - -// Function to create newNode in a linkedlist -struct Node *newNode(int key) -{ - struct Node *temp = new Node; - temp->data = key; - temp->next = NULL; - return temp; -} - -// A utility function to print linked list -void printList(struct Node *node) -{ - while (node != NULL) - { - printf("%d ", node->data); - node = node->next; - } -} - -// Merges two lists with headers as h1 and h2. -// It assumes that h1's data is smaller than -// or equal to h2's data. -struct Node *mergeUtil(struct Node *h1, - struct Node *h2) -{ - // if only one node in first list - // simply point its head to second list - if (!h1->next) - { - h1->next = h2; - return h1; - } - - // Initialize current and next pointers of - // both lists - struct Node *curr1 = h1, *next1 = h1->next; - struct Node *curr2 = h2, *next2 = h2->next; - - while (next1 && next2) - { - // if curr2 lies in between curr1 and next1 - // then do curr1->curr2->next1 - if ((curr2->data) > (curr1->data) && - (curr2->data) < (next1->data)) - { - next2 = curr2->next; - curr1->next = curr2; - curr2->next = next1; - - // now let curr1 and curr2 to point - // to their immediate next pointers - curr1 = curr2; - curr2 = next2; - } - else - { - // if more nodes in first list - if (next1->next) - { - next1 = next1->next; - curr1 = curr1->next; - } - - // else point the last node of first list - // to the remaining nodes of second list - else - { - next1->next = curr2; - return h1; - } - } - } - return h1; -} - -// Merges two given lists in-place. This function -// mainly compares head nodes and calls mergeUtil() -struct Node *merge(struct Node *h1, - struct Node *h2) -{ - if (!h1) - return h2; - if (!h2) - return h1; - - // start with the linked list - // whose head data is the least - if (h1->data < h2->data) - return mergeUtil(h1, h2); - else - return mergeUtil(h2, h1); -} - -// Driver program -int main() -{ - struct Node *head1 = newNode(1); - head1->next = newNode(3); - head1->next->next = newNode(5); - - // 1->3->5 LinkedList created - - struct Node *head2 = newNode(0); - head2->next = newNode(2); - head2->next->next = newNode(4); - - // 0->2->4 LinkedList created - - struct Node *mergedhead = - merge(head1, head2); - - printList(mergedhead); - return 0; -} \ No newline at end of file diff --git a/C++/Merge__Sort_using_vector b/C++/Merge__Sort_using_vector deleted file mode 100644 index c42b86a42..000000000 --- a/C++/Merge__Sort_using_vector +++ /dev/null @@ -1,61 +0,0 @@ -#include -using namespace std; -#define all(x) x.begin() ,x.end() - void merge(vector &veto, int com, int meio, int fim){ - int i, j, k; - int n1 = meio - com + 1; - int n2 = fim - meio; - int esq[n1], dir[n2]; - for (i = 0; i < n1; i++){ - esq[i] = veto[com + i]; - } - for (j = 0; j < n2; j++){ - dir[j] = veto[meio + 1+ j]; - } - i = 0; - j = 0; - k = com; - while (i < n1 && j < n2){ - if (esq[i] <= dir[j]){ - veto[k] = esq[i]; - i++; - } - else{ - veto[k] = dir[j]; - j++; - } - k++; - } - while (i < n1){ - veto[k] = esq[i]; - i++; - k++; - } - while (j < n2){ - veto[k] = dir[j]; - j++; - k++; - } -} -void mergeSort(vector &veto, int com, int fim){ - if (com < fim){ - int meio = com + (fim - com)/2; - mergeSort(veto, com, meio); - mergeSort(veto, meio+1, fim); - merge(veto, com, meio, fim); - } -} -int main(){ - vector fila; - int tamanho; - cin >> tamanho; - for(int i=0; i> a; - fila.push_back(a); - } - mergeSort(fila,0,tamanho-1); - for(int i=0; i - using namespace std; - -// Function returns (n^p) % MOD -long long power(long long n , long long p , long long MOD){ - long long ans = 1; - n %= MOD; - for(;p;p>>=1){ - if(p&1){ - ans = (ans*n)%MOD; - } - n = (n*n)%MOD; - } - return ans; -} - -bool millerTest(long long d, long long n) { - long long a = 2 + rand() % (n - 4); - long long x = power(a, d, n); - if (x == 1 || x == n-1) - return true; - while (d != n-1) { - x = (x * x) % n; - d *= 2; - if (x == 1) return false; - if (x == n-1) return true; - } - return false; -} - -// K is the no. of times primarility is checked , higher value of k means more accurate results -bool isPrime(long long n, long long k) { - if (n <= 1 || n == 4) return false; - if (n <= 3) return true; - long long d = n - 1; - while (d % 2 == 0) - d /= 2; - for (long long i = 0; i < k; i++) - if (millerTest(d, n) == false) - return false; - return true; -} - - -int main(){ - cout << isPrime(7 , 10) << ' ' << isPrime(1000000007 , 10) << ' ' << isPrime(17 , 10) << '\n'; - return 0; -} diff --git a/C++/Min_subarray.cpp b/C++/Min_subarray.cpp deleted file mode 100644 index 2eef27d72..000000000 --- a/C++/Min_subarray.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include - -using namespace std; - - -#define Max 1000000007 - - -int main() { - // min keeps track of minnimum sum untill previous iteration - // curr_min keeps track of current sum in present iteration - int n, min= Max, curr_min=Max; - - cout<<"Enter number of elements: "; - - cin>>n; - - int a[n]; - - cout<<"Enter Elements :"; - - for(int i=0;i>a[i]; - - } - - - for(int i=0; i0 ){ - - curr_min = a[i]; - - } - - else{ - // If not positive then add element to it to get sum of subarray - curr_min+=a[i]; - - } - // Update min if curr_min becomes less than min - min = min < curr_min?min:curr_min; - - } - - -cout<<"Min Sum is : "< -#define mt make_tuple -#define mp make_pair -#define pu push_back -#define INF 1000000001 -#define ll long long int -#define vi vector - -using namespace std; - -ll power(ll x, ll y, ll p) -{ - ll res = 1; // Initialize result - x = x % p; // Update x if it is more than or - while (y > 0) - { - if (y & 1) - res = (res*x) % p; - y = y>>1; // y = y/2 - x = (x*x) % p; - } - return res; -} - -int main() -{ - cout< -using namespace std; -#define n 4 - -void PrintSol(int Board[n][n]){ - for (int i=0;i=0 && j>=0;i--,j--){ - if (Board[i][j]==1) return false; - } - ///check the second diagonal - for (int i=row,j=col;i<=n-1 && j>=0;i++,j--){ - if (Board[i][j]==1) return false; - } - return true; -} - -void NQueenSol(int Board[n][n],int col){ - if (col>=n){ - PrintSol(Board); - return; - } - for (int i=0;i -using namespace std; - -int main() -{ - int rows, count = 0, count1 = 0, k = 0; - - cout << "Enter number of rows: "; - cin >> rows; - - for(int i = 1; i <= rows; ++i) - { - for(int space = 1; space <= rows-i; ++space) - { - cout << " "; - ++count; - } - - while(k != 2*i-1) - { - if (count <= rows-1) - { - cout << i+k << " "; - ++count; - } - else - { - ++count1; - cout << i+k-2*count1 << " "; - } - ++k; - } - count1 = count = k = 0; - - cout << endl; - } - return 0; -} diff --git "a/C++/Ol\303\241 Mundo PT BR.cpp" "b/C++/Ol\303\241 Mundo PT BR.cpp" deleted file mode 100644 index e7c1c769e..000000000 --- "a/C++/Ol\303\241 Mundo PT BR.cpp" +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Olá Mundo!" << endl; - return 0; -} diff --git a/C++/PRACQUE.CPP b/C++/PRACQUE.CPP deleted file mode 100644 index 234af52f0..000000000 --- a/C++/PRACQUE.CPP +++ /dev/null @@ -1,102 +0,0 @@ -#include -#include -#include -#include -struct customer -{ - int cnum; - char cname[30]; -}; -const int max=20; -customer c[10]; -int front=-1,rear=-1; -void insert(customer c[],customer ele) -{ - if(front==-1) - { - front=rear=0; - c[0]=ele; - } - else if(rear==max-1) - { - cout<<"Over flow\n"; - } - else - { - c[++rear]=ele; - } -} -int del() -{ - if(front==-1) - { - cout<<"underflow\n"; - } - else if(front==rear) - { - front=rear=-1; - } - else - { - front++; - } -} -void display(customer c[],int front,int rear) -{ - if(front==-1) - { - cout<<"Underflow\n"; - } - else - { - for(int i=front;i<=rear;i++) - { - cout<>ch; - if(ch==1) - { - cout<<"Enter the data of the customer\n"; - cout<<"1.Customer Number\n"; - cout<<"2.Customer name\n"; - cin>>c1.cnum; - gets(c1.cname); - insert(c,c1); - getch(); - } - else if(ch==2) - { - cout<<"Deletion\n"; - del(); - getch(); - } - else if(ch==3) - { - cout<<"Dispalying\n"; - display(c,front,rear); - getch(); - } - else if(ch==4) - { - exit(0); - } - } - while(ch>=1&&ch<=4); -} - diff --git a/C++/PRACST.CPP b/C++/PRACST.CPP deleted file mode 100644 index 8ebf36213..000000000 --- a/C++/PRACST.CPP +++ /dev/null @@ -1,90 +0,0 @@ -#include -#include -#include -#include -struct stud -{ - int rollno; - char name[40]; -}; -const int max=20; -stud s[max],s1; -int top=-1; -void push(stud s[],stud ele) -{ - if(top==-1) - { - top=0; - s[top]=ele; - } - else if(top==max-1) - { - cout<<"Overflow\n"; - } - else - { - s[++top]=ele; - } -} -void pop() -{ - if(top==-1) - { - cout<<"Underflow\n"; - } - else - { - cout<<"popping\n"; - --top; - } -} -void traverse(stud s[],int top) -{ - if(top==-1) - { - cout<<"Underflow \n"; - } - else - { - for(int i=top;i>=0;i--) - { - cout<>ch; - if(ch==1) - { - cout<<"Enter the data\n"; - cin>>s1.rollno; - gets(s1.name); - push(s,s1); - } - else if(ch==2) - { - pop(); - } - else if(ch==3) - { - traverse(s,top); - } - else if(ch==4) - { - exit(0); - } - } - while(ch>=1&&ch<=4); -} - - diff --git a/C++/Palidrome.cpp b/C++/Palidrome.cpp deleted file mode 100644 index 63b5f2f52..000000000 --- a/C++/Palidrome.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include -using namespace std; - -int main() -{ - int a,num,b,s=0; - cout << "\nPlease enter a number"; - cin >> num; - b = num; - rev=0 - while( num > 0) - { - rem = num % 10; - rev = (rev * 10) + rem; - num= num / 10; - - } - - if( b == rev){ - cout << "\nit is a palindrome" << endl; - } - else{ - cout << "\nit is not a palindrome" << endl; - } - return 0; -} diff --git a/C++/Palindrome.cpp b/C++/Palindrome.cpp deleted file mode 100644 index 64841a3f7..000000000 --- a/C++/Palindrome.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include -using namespace std; - -int main() -{ - int n, num, digit, rev = 0; - - cout << "Enter a positive number: "; - cin >> num; - - n = num; - - do - { - digit = num % 10; - rev = (rev * 10) + digit; - num = num / 10; - } while (num != 0); - - cout << " The reverse of the number is: " << rev << endl; - - if (n == rev) - cout << " The number is a palindrome."; - else - cout << " The number is not a palindrome."; - - return 0; -} diff --git a/C++/ParallelBinarySearch.cpp b/C++/ParallelBinarySearch.cpp deleted file mode 100644 index 4f684254a..000000000 --- a/C++/ParallelBinarySearch.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - https://www.spoj.com/problems/METEORS -*/ -#include -#include -#include -using namespace std; -using namespace __gnu_pbds; -#define mod 1000000007 -#define MAX 1000000000000000 -#define all(v) v.begin(),v.end() -#define rep(i,a,b) for(i=(ll)a;i<(ll)b;i++) -#define revrep(i,a,b) for(i=(ll)a;i>=(ll)b;i--) -#define ii pair > -#define MP make_pair -#define pb push_back -#define f first -#define se second -#define ll long long int -#define vi vector -ll modexp(ll a,ll b){ ll res = 1; while(b > 0){ if(b & 1) res = (res * a)%mod; a = (a * a)%mod; b/=2; } return res; } -#define rs resize -typedef tree< ll, null_type, less, rb_tree_tag, tree_order_statistics_node_update > OST; -#define TRACE -#ifdef TRACE -#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__) - template - void __f(const char* name, Arg1&& arg1){ - cout << name << " : " << arg1 << endl; - } - template - void __f(const char* names, Arg1&& arg1, Args&&... args){ - const char* comma = strchr(names + 1, ','); cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...); - } -#else -#define trace(...) -#endif - -const ll N = 300009; -ll n,m,i,a,k,s,id; -bool changed = 1; -vector own,tocheck; -ll lo[N],hg[N],ql[N],r[N],qr[N],qa[N],tr[N]; -void update(ll p,ll v) -{ - while(p <= m){ - tr[p] += v; - p += p & -p; - } -} -ll read(ll p) -{ - ll s = 0; - while(p > 0){ - s += tr[p]; - p -= p & -p; - } - return s; -} -void apply(ll p) -{ - if(ql[p] <= qr[p]){ - update(ql[p],qa[p]); - update(qr[p] + 1,-qa[p]); - } - else{ - update(1,qa[p]); - update(qr[p] + 1,-qa[p]); - update(ql[p],qa[p]); - } - -} -int main() -{ - std::ios_base::sync_with_stdio(false); cin.tie(NULL); - cin>>n>>m; - own.rs(n + 1); - rep(i,1,m + 1){ - cin>>a; - own[a].pb(i); - } - rep(i,1,n + 1) cin>>r[i]; - cin>>k; - tocheck.rs(k + 1); - rep(i,1,k + 1) cin>>ql[i]>>qr[i]>>qa[i]; - rep(i,1,n + 1){ - lo[i] = 1; - hg[i] = k + 1; - } - while(changed){ - changed = 0; - - //cleaning - rep(i,0,m + 1) tr[i] = 0; - rep(i,1,n + 1) if(lo[i] != hg[i]) - tocheck[(lo[i] + hg[i]) / 2].pb(i); - //end of cleaning - - rep(i,1,k + 1){ - apply(i); - while(tocheck[i].size() > 0){ - changed = 1; - id = tocheck[i].back(); - tocheck[i].pop_back(); - - s = 0; - for(auto &j: own[id]){ - s += read(j); - if(s >= r[id]) break; - } - if(s >= r[id]) - hg[id] = i; - else - lo[id] = i + 1; - } - } - } - rep(i,1,n + 1){ - if(lo[i] <= k) cout< -using namespace std; - -/* Sorts the array using pigeonhole algorithm */ -void pigeonholeSort(int arr[], int n) -{ - // Find minimum and maximum values in arr[] - int min = arr[0], max = arr[0]; - for (int i = 1; i < n; i++) - { - if (arr[i] < min) - min = arr[i]; - if (arr[i] > max) - max = arr[i]; - } - int range = max - min + 1; // Find range - - // Create an array of vectors. Size of array - // range. Each vector represents a hole that - // is going to contain matching elements. - vector holes[range]; - - // Traverse through input array and put every - // element in its respective hole - for (int i = 0; i < n; i++) - holes[arr[i]-min].push_back(arr[i]); - - // Traverse through all holes one by one. For - // every hole, take its elements and put in - // array. - int index = 0; // index in sorted array - for (int i = 0; i < range; i++) - { - vector::iterator it; - for (it = holes[i].begin(); it != holes[i].end(); ++it) - arr[index++] = *it; - } -} - -// Driver program to test the above function -int main() -{ - int arr[] = {8, 3, 2, 7, 4, 6, 8}; - int n = sizeof(arr)/sizeof(arr[0]); - - pigeonholeSort(arr, n); - - printf("Sorted order is : "); - for (int i = 0; i < n; i++) - printf("%d ", arr[i]); - - return 0; -} diff --git a/C++/Polymorphism.cpp b/C++/Polymorphism.cpp deleted file mode 100644 index 73575b00c..000000000 --- a/C++/Polymorphism.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include -using namespace std; -class abc -{ -public: - virtual void show() - { - cout<<"Base\n"; - } -}; -class derived:public abc -{ -public: - void show() override - { - cout<<"Derived\n"; - } -}; -int main() -{ - abc *p; - abc ob; - p=&ob; - p->show(); - derived ob1; - p=&ob1; - p->show(); - return 0; - -} diff --git a/C++/Prime_number.cpp b/C++/Prime_number.cpp deleted file mode 100644 index 7f475ab8c..000000000 --- a/C++/Prime_number.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -using namespace std; -bool is_prime(int x); - -int main() { - int number; - bool result; - setlocale(LC_ALL, "rus"); - - cout << endl; - cout << "Numbers <= 0 are not considered in this program" << endl << - "1 is nor Prime nor Composite number." << endl; - cout << endl; - - try { - cout << "Enter your number : " << endl; - cin >> number; - if (cin.fail() or (number <= 1)) throw -1; - - result = is_prime(number); - - if (result) cout << "Number " << number << " is Prime." << endl; - else cout << "Number " << number << " is Composite." << endl; - } - catch (...) { - cout << "Data is not correct." << endl; - return -1; - } - return 0; -} - -bool is_prime(int x) { - for (int i = 2; i <= sqrt(x); i++) { - if (x%i == 0) { - return false; - } - } - return true; -} diff --git a/C++/Prims Algorithm b/C++/Prims Algorithm deleted file mode 100644 index 4526913a0..000000000 --- a/C++/Prims Algorithm +++ /dev/null @@ -1,84 +0,0 @@ -#include -#include -#include -using namespace std; - -int findminvertex(int * weights , bool* visited, int n) -{ - int minvertex = -1; - for(int i = 0; i < n; i++) - { - if(!visited[i] && (minvertex == -1 || weights[i]> V >> E; - int ** edges = new int*[V]; - for(int i = 0; i < V; i++) - { - edges[i] = new int[V]; - for(int j = 0; j < V; j++) - edges[i][j] = 0; - } - - for(int i =0; i < E;i++) - { - int f,s,w; - cin>>f>>s>>w; - edges[f][s]=w; - edges[s][f]=w; - } - - prim(edges,V); - for (int i = 0; i < V; i++) - { - delete [] edges[i]; - } - - delete [] edges; - - return 0; -} diff --git a/C++/Print_Hello_World.cpp b/C++/Print_Hello_World.cpp deleted file mode 100644 index 599978158..000000000 --- a/C++/Print_Hello_World.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/Program to Multiply two Matrices by Passing Matrix to Function b/C++/Program to Multiply two Matrices by Passing Matrix to Function deleted file mode 100644 index 1808f33b0..000000000 --- a/C++/Program to Multiply two Matrices by Passing Matrix to Function +++ /dev/null @@ -1,121 +0,0 @@ - -To understand this example, you should have the knowledge of following C++ programming topics: - -C++ Arrays -C++ Multidimensional Arrays -Passing Array to a Function in C++ Programming -This program asks user to enter the size of the matrix (rows and columns). - -Then, it asks the user to enter the elements of two matrices and finally it multiplies two matrix and displays the result. - - -To perform this task three functions are made: - -To take matrix elements from user -To multiply two matrix -To display the resultant matrix after multiplication -Example: Multiply Matrix by Passing it to a Function -#include -using namespace std; - -void enterData(int firstMatrix[][10], int secondMatrix[][10], int rowFirst, int columnFirst, int rowSecond, int columnSecond); -void multiplyMatrices(int firstMatrix[][10], int secondMatrix[][10], int multResult[][10], int rowFirst, int columnFirst, int rowSecond, int columnSecond); -void display(int mult[][10], int rowFirst, int columnSecond); - -int main() -{ - int firstMatrix[10][10], secondMatrix[10][10], mult[10][10], rowFirst, columnFirst, rowSecond, columnSecond, i, j, k; - - cout << "Enter rows and column for first matrix: "; - cin >> rowFirst >> columnFirst; - - cout << "Enter rows and column for second matrix: "; - cin >> rowSecond >> columnSecond; - - // If colum of first matrix in not equal to row of second matrix, asking user to enter the size of matrix again. - while (columnFirst != rowSecond) - { - cout << "Error! column of first matrix not equal to row of second." << endl; - cout << "Enter rows and column for first matrix: "; - cin >> rowFirst >> columnFirst; - cout << "Enter rows and column for second matrix: "; - cin >> rowSecond >> columnSecond; - } - - // Function to take matrices data - enterData(firstMatrix, secondMatrix, rowFirst, columnFirst, rowSecond, columnSecond); - - // Function to multiply two matrices. - multiplyMatrices(firstMatrix, secondMatrix, mult, rowFirst, columnFirst, rowSecond, columnSecond); - - // Function to display resultant matrix after multiplication. - display(mult, rowFirst, columnSecond); - - return 0; -} - -void enterData(int firstMatrix[][10], int secondMatrix[][10], int rowFirst, int columnFirst, int rowSecond, int columnSecond) -{ - int i, j; - cout << endl << "Enter elements of matrix 1:" << endl; - for(i = 0; i < rowFirst; ++i) - { - for(j = 0; j < columnFirst; ++j) - { - cout << "Enter elements a"<< i + 1 << j + 1 << ": "; - cin >> firstMatrix[i][j]; - } - } - - cout << endl << "Enter elements of matrix 2:" << endl; - for(i = 0; i < rowSecond; ++i) - { - for(j = 0; j < columnSecond; ++j) - { - cout << "Enter elements b" << i + 1 << j + 1 << ": "; - cin >> secondMatrix[i][j]; - } - } -} - -void multiplyMatrices(int firstMatrix[][10], int secondMatrix[][10], int mult[][10], int rowFirst, int columnFirst, int rowSecond, int columnSecond) -{ - int i, j, k; - - // Initializing elements of matrix mult to 0. - for(i = 0; i < rowFirst; ++i) - { - for(j = 0; j < columnSecond; ++j) - { - mult[i][j] = 0; - } - } - - // Multiplying matrix firstMatrix and secondMatrix and storing in array mult. - for(i = 0; i < rowFirst; ++i) - { - for(j = 0; j < columnSecond; ++j) - { - for(k=0; k -using namespace std; - -int main() { - string line; - cout << "Enter a string: "; - getline(cin, line); - - for(int i = 0; i < line.size(); ++i) - { - if (!((line[i] >= 'a' && line[i]<='z') || (line[i] >= 'A' && line[i]<='Z'))) - { - line[i] = '\0'; - } - } - cout << "Output String: " << line; - return 0; -} diff --git a/C++/Queue LL.cpp b/C++/Queue LL.cpp deleted file mode 100644 index 9f48aa2e9..000000000 --- a/C++/Queue LL.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include -using namespace std; - -struct node -{ - int data; - node* next; - -}; - -class queue -{ -public: - node* front; - node*rear; - - queue() { - front=rear=NULL; - } - - void push(int x) { - node *p=new node; - p->data=x; - p->next=NULL; - if(front==NULL) - { - front=rear=p; - rear->next=NULL; - } - else - { - rear->next=p; - rear=p; - rear->next=NULL; - } - } - - int pop() { - int x=0; - if(front==NULL) - { - cout<<"Queue Underflow"; - return 0; - } - if(front->data!=1){ - x=front->data; - } - front=front->next; - return x; - } - - - -}; - - -int main() { - queue q; - q.push(1); - q.push(2); - q.push(3); - q.push(4); - cout<<"Element is "< -Node::Node(T val) -{ - value = val; - next = 0; -} - -template -Node::~Node() -{ -} - -template -int Queue::length() -{ - return count; -} - -template -T Queue::Front() -{ - assert(count != 0); - return front->value; -} - -template -void Queue::push(T val) -{ - Node* n = new Node(val); - if (count == 0) - { - front = back = n; - } - else - { - back->next = n; - back = n; - } - count++; - -} - -template -void Queue::pop() -{ - assert(count != 0); - if (count == 1) - { - delete front; - front = back = 0; - } - else - { - Node* tmp = front; - tmp = tmp->next; - delete front; - front = tmp; - } - count--; -} - -template -void Queue::clear() -{ - while (count != 0) - pop(); -} - -template -bool Queue::Empty() -{ - return (count == 0); -} - -template -Queue::Queue() -{ - count = 0; - front = 0; - back = 0; -} - -template -Queue::~Queue() -{ - clear(); -} diff --git a/C++/Queue/Queue.h b/C++/Queue/Queue.h deleted file mode 100644 index 77f3a3d61..000000000 --- a/C++/Queue/Queue.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - - -template -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++/Queue/Source.cpp b/C++/Queue/Source.cpp deleted file mode 100644 index 9fa5fa25c..000000000 --- a/C++/Queue/Source.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include "Queue.cpp" - -using namespace std; - -int main() { - QueueQ; - Q.push(5); - Q.push(6); - Q.pop(); - Q.push(7); - cout << Q.Front() << endl << Q.length() << endl ; - - - - system("pause"); - - - return 0; -} diff --git a/C++/Queue/queue.h b/C++/Queue/queue.h deleted file mode 100644 index 77f3a3d61..000000000 --- a/C++/Queue/queue.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - - -template -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++/QueueMenu.cpp b/C++/QueueMenu.cpp deleted file mode 100644 index c9c98c556..000000000 --- a/C++/QueueMenu.cpp +++ /dev/null @@ -1,155 +0,0 @@ -#include -#define max 10 - -using namespace std; - -struct queue -{ - int data[max]; - int head; - int tail; -}; - -queue antrian; - -void create() -{ - antrian.head=antrian.tail=-1; -} - -int isempty() -{ - if(antrian.tail==-1) return 1; - else return 0; -} - -int isfull() -{ - if(antrian.tail==max-1) return 1; - else return 0; -} - -void enqueue(int data) -{ - if(isempty()==1) - { - antrian.head=antrian.tail=0; - antrian.data[antrian.tail]=data; - cout<>opt; - - - switch(opt) - { - - case 1: system("cls"); - { - cout<<"Number : "; - cin>>angka; - enqueue(angka); - break; - } - - case 2: system("cls"); - { - cout< -#include -using namespace std; - -int getPivot(int input[],int start,int end){ - int pivot = input[start]; - int i = start; - int j = end; - while(i=pivot); - if(iend){ - return; - } - int partitionIndex = getPivot(input,start,end); - quickSort(input,start,partitionIndex-1); - quickSort(input,partitionIndex+1,end); - -} - -int main() -{ - cout<<"Om Kumar"< -using namespace std; -int buscar(int v[], int com, int fim){ - int esq = com; - int dir = fim; - int aux; - int pivo = v[com]; - while(esq < dir){ - while(v[esq] <= pivo && esq <= fim){ - esq++; - } - while(v[dir] > pivo && dir > com){ - dir--; - } - if(esq < dir){ - swap(v[esq],v[dir]); - /*aux = v[esq]; - v[esq] = v[dir]; - v[dir] = aux;*/ - } - } - v[com] = v[dir]; - v[dir] = pivo; - return dir; -} -void quickSort(int v[], int com, int fim){ - int pivo; - if(com < fim){ - pivo = buscar(v,com,fim); - quickSort(v,com, pivo-1); - quickSort(v, pivo + 1, fim); - } -} -int main(){ - int v[1000000]; - int qnt; - cin >> qnt; - for(int i=0; i< qnt; i++) - scanf("%d", &v[i]); - quickSort(v,0,qnt-1); - for(int i=0; i< qnt; i++) - printf("%d ", v[i]); - cout << endl; - return 0; -} diff --git a/C++/README.md b/C++/README.md deleted file mode 100644 index 49ca888e7..000000000 --- a/C++/README.md +++ /dev/null @@ -1 +0,0 @@ -Welcome! This directory consists of all the basic programs of programming in c++. :) diff --git a/C++/RatinMaze.cpp b/C++/RatinMaze.cpp deleted file mode 100644 index 258e2b938..000000000 --- a/C++/RatinMaze.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include -#include -#define m 5 -#define n 4 -using namespace std; -void RatinMaze_Count(char(*)[n], char(*)[n] , int , int); /// <== DECLARATION. -int main() -{ - char B[m][n]= {{'O','O','O','O'}, - {'O','X','O','X'}, - {'O','X','O','O'}, - {'O','O','X','O'}, - {'O','O','O','O'} - }; - char aB[m][n]= {{'O','O','O','O'}, - {'O','X','O','X'}, - {'O','X','O','O'}, - {'O','O','X','O'}, - {'O','O','O','O'} - }; - aB[0][0]='1'; - RatinMaze_Count(B,aB,0,0); -} -void RatinMaze_Count(char B[m][n], char aB[m][n], int r, int c) -{ - if(r==m-1&&c==n-1) - { - for(int i=0;i -///using namespace std; -///#define m 5 -///#define n 4 -/// -///int RatinMaze_Count(char Board[m][n],int rRow, int rCol){ -/// static int cnt=0; -/// if (rRow==m-1 && rCol==n-1){ -/// cnt++; -/// return cnt; -/// } -/// ///lets move right -/// if (rCol+1 - -using namespace std; - -int -main () -{ - int N, T, R = 0; - //cout<<"Enter the number of lines"; - cin >> T; - for (int i = 0; i < T; i++) - { - cin >> N; - while (N > 0) - { - R = R * 10; - R = R + (N % 10); - N = N / 10; - } - cout << R< -#include -#include - -int main() -{ - std::string str; - std::cout << "Enter any string :"; - std::cin >> str; - - std::reverse(str.begin(), str.end()); - - std::cout<< "Reverse string is: " << str << '\n'; - - return 0; -} diff --git a/C++/ReverseArray.cpp b/C++/ReverseArray.cpp deleted file mode 100644 index 6bcdebe8b..000000000 --- a/C++/ReverseArray.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -using namespace std; - -void reverseArray(int arr[], int start, int end) -{ - while(start < end) { - int temp = arr[start]; - arr[start] = arr[end]; - arr[end] = temp; - start++; - end--; - } -} - -int main() -{ - int n ; - cin >> n; - int arr[n]; - for(int i =0;i< n; i++) - cin >> arr[i]; - reverseArray(arr, 0, n-1); - for(int i=0; i< n; i++) - cout << arr[i] << " "; - return 0; -} - diff --git a/C++/STL_map.cpp b/C++/STL_map.cpp deleted file mode 100644 index 53604731d..000000000 --- a/C++/STL_map.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//Maps are a part of the C++ STL.Maps are associative containers that store elements formed by a combination of a key value and a mapped value, following a specific order. -#include -using namespace std; -int main(){ - mapm; //This will create a map m with key_value as string data type and mapped_value as Integer datatype - map::iterator it; //Iterator can be usefull for finding a index of particular key_value - string str="Hactoberfest"; - int year=2018; - m.insert(make_pair(str,year)); //make_pair function used for make pair of any two datatypes here string and integer. And it will insert it into map m - it=m.find(str); //find function will find index of str if it is in the map, otherwise it will give m.end() - if(it==m.end()){ - cout<<"It is not present"; - } - else{ - cout<<"It was present and removed it"; - m.erase(str); //It will erase all mapped_values associated with key_values str. - } - return 0; -} diff --git a/C++/STL_set.cpp b/C++/STL_set.cpp deleted file mode 100644 index 33cfcb7be..000000000 --- a/C++/STL_set.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include -using namespace std; - -int main(){ - int n; - cin>>n; - sets; - set::iterator it; //Iterator helps you travel to elements of set - for(int i=1;i<=100;i++){ - s.insert(i); //This insert function will insert into the set. - } - it=s.find(n); //Find function in set will find wether n is in the set or not? If n is there in the set than it will give index of n ohterwise it will return s.end() - if(it==s.end()){ - cout<<"Number is not in the set"; - } - else{ - cout<<"Number is in the set"; - s.erase(n); //This erase function will erase n from the set if n is found in the set. - } - return 0; -} diff --git a/C++/Second Largest.cpp b/C++/Second Largest.cpp deleted file mode 100644 index 58b4b04e9..000000000 --- a/C++/Second Largest.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include - -using namespace std ; - -int main() -{ - int T, n1,n2,n3,smallest,largest; - //cout<<"Enter the number of testcases"; - cin>>T; - while (T--) - { - //cout<<"Enter three numbers"; - cin>>n1>>n2>>n3; - - if(n1 < n2 && n1 < n3) - smallest=n1; - else if(n2 < n3) - smallest = n2; - else - smallest = n3; - - if( n1>=n2 && n1>=n3 ) - largest= n1 ; - - if( n2>=n1 && n2>=n3 ) - largest= n2; - - if( n3>=n1 && n3>=n2 ) - largest = n3; - //cout< smallest ) - cout<smallest) - cout<smallest) - cout< -#include -using namespace std; - -#define endl "\n" - -// A utility function to get the middle index from corner indexes. -int getMid(int s, int e) { return s + (e - s) / 2; } - -/* A recursive function to get the sum of values in given range - of the array. The following are parameters for this function. - - st --> Pointer to segment tree - si --> Index of current node in the segment tree. Initially - 0 is passed as root is always at index 0 - ss & se --> Starting and ending indexes of the segment represented - by current node, i.e., st[si] - qs & qe --> Starting and ending indexes of query range */ -int getSumUtil(int *st, int ss, int se, int qs, int qe, int si) -{ - // If segment of this node is a part of given range, then return - // the sum of the segment - if (qs <= ss && qe >= se) - return st[si]; - - // If segment of this node is outside the given range - if (se < qs || ss > qe) - return 0; - - // If a part of this segment overlaps with the given range - int mid = getMid(ss, se); - return getSumUtil(st, ss, mid, qs, qe, 2 * si + 1) + - getSumUtil(st, mid + 1, se, qs, qe, 2 * si + 2); -} - -/* A recursive function to update the nodes which have the given - index in their range. The following are parameters - st, si, ss and se are same as getSumUtil() - i --> index of the element to be updated. This index is - in the input array. - diff --> Value to be added to all nodes which have i in range */ -void updateValueUtil(int *st, int ss, int se, int i, int diff, int si) -{ - // Base Case: If the input index lies outside the range of - // this segment - if (i < ss || i > se) - return; - - // If the input index is in range of this node, then update - // the value of the node and its children - st[si] = st[si] + diff; - if (se != ss) - { - int mid = getMid(ss, se); - updateValueUtil(st, ss, mid, i, diff, 2 * si + 1); - updateValueUtil(st, mid + 1, se, i, diff, 2 * si + 2); - } -} - -// The function to update a value in input array and segment tree. -// It uses updateValueUtil() to update the value in segment tree -void updateValue(int arr[], int *st, int n, int i, int new_val) -{ - // Check for erroneous input index - if (i < 0 || i > n - 1) - { - cout << "Invalid Input"; - return; - } - - // Get the difference between new value and old value - int diff = new_val - arr[i]; - - // Update the value in array - arr[i] = new_val; - - // Update the values of nodes in segment tree - updateValueUtil(st, 0, n - 1, i, diff, 0); -} - -// Return sum of elements in range from index qs (quey start) -// to qe (query end). It mainly uses getSumUtil() -int getSum(int *st, int n, int qs, int qe) -{ - // Check for erroneous input values - if (qs < 0 || qe > n - 1 || qs > qe) - { - cout << "Invalid Input"; - return -1; - } - - return getSumUtil(st, 0, n - 1, qs, qe, 0); -} - -// A recursive function that constructs Segment Tree for array[ss..se]. -// si is index of current node in segment tree st -int constructSTUtil(int arr[], int ss, int se, int *st, int si) -{ - // If there is one element in array, store it in current node of - // segment tree and return - if (ss == se) - { - st[si] = arr[ss]; - return arr[ss]; - } - - // If there are more than one elements, then recur for left and - // right subtrees and store the sum of values in this node - int mid = getMid(ss, se); - st[si] = constructSTUtil(arr, ss, mid, st, si * 2 + 1) + - constructSTUtil(arr, mid + 1, se, st, si * 2 + 2); - return st[si]; -} - -/* Function to construct segment tree from given array. This function - allocates memory for segment tree and calls constructSTUtil() to - fill the allocated memory */ -int *constructST(int arr[], int n) -{ - // Allocate memory for the segment tree - - //Height of segment tree - int x = (int)(ceil(log2(n))); - - //Maximum size of segment tree - int max_size = 2 * (int)pow(2, x) - 1; - - // Allocate memory - int *st = new int[max_size]; - - // Fill the allocated memory st - constructSTUtil(arr, 0, n - 1, st, 0); - - // Return the constructed segment tree - return st; -} - -// Driver program to test above functions -int main() -{ - int arr[] = {1, 3, 5, 7, 9, 11}; - int n = sizeof(arr) / sizeof(arr[0]); - - // Build segment tree from given array - int *st = constructST(arr, n); - - // Print sum of values in array from index 1 to 3 - - cout << "Sum of values in given range = " << getSum(st, n, 1, 3) << endl; - // Update: set arr[1] = 10 and update corresponding - // segment tree nodes - updateValue(arr, st, n, 1, 10); - - // Find sum after the value is updated - cout << "Updated sum of values in given range = " << getSum(st, n, 1, 3) << endl; - return 0; -} \ No newline at end of file diff --git a/C++/Selection-Sort.cpp b/C++/Selection-Sort.cpp deleted file mode 100644 index 76a31250a..000000000 --- a/C++/Selection-Sort.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include -using namespace std; -int count = 0; - -void hanoi(int n, int source, int dest, int helper){ - - if(n==0){ - return; - } - hanoi(n-1,source,helper,dest); - cout<<"Move "<>n; - hanoi(n,1,2,3); - cout< -using namespace std; - -void SelectionSort(int arr[],int n){ - if (n<=1) return; - int smallestindex=0, i; - for (i=1; i>n; - int arr[n]; - cout<<"Enter Elements of the array"<>arr[i]; - SelectionSort(arr,n); - cout<<"Sorted array using SelectionSort algorithm is"< -using namespace std; - int main(){ - int qnt, idx; - vector v; - cin >> qnt; - for(int i=0; i> a; - v.push_back(a); - } - for(int i=0; i -using namespace std; -int main() -{ -cout<<"Hello world"< -using namespace std; - -void SieveOfEratosthenes(int n) -{ - - bool prime[n+1]; - memset(prime, true, sizeof(prime)); - - for (int p=2; p*p<=n; p++) - { - // If prime[p] is not changed, then it is a prime - if (prime[p] == true) - { - // Update all multiples of p - for (int i=p*2; i<=n; i += p) - prime[i] = false; - } - } - - // Print all prime numbers - for (int p=2; p<=n; p++) - if (prime[p]) - cout << p << " "; -} - -// Driver Program -int main() -{ - int n = 30; - cout << "Following are the prime numbers smaller " - << " than or equal to " << n << endl; - SieveOfEratosthenes(n); - return 0; -} diff --git a/C++/SkewHeap.cpp b/C++/SkewHeap.cpp deleted file mode 100644 index 59574b075..000000000 --- a/C++/SkewHeap.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include -using std::less; - -template > -class SkewHeap{ -private: - struct SkewNode{ - T x; - SkewNode *lc, *rc; - SkewNode(T a=0):x(a), lc(nullptr), rc(nullptr){} - } *root; - cmp CMP_; - size_t count; - SkewNode* Merge(SkewNode* a, SkewNode* b){ - if(!a or !b) return a?a:b; - if(CMP_(a->x, b->x)) swap(a, b); - a->rc = Merge(a->rc, b); - swap(a->lc, a->rc); - return a; - } - void clear(SkewNode*& a){ - if(!a) return; - clear(a->lc); clear(a->rc); - delete a; a = nullptr; - } -public: - SkewHeap(): root(nullptr), count(0){} - bool empty(){return count==0;} - size_t size(){return count;} - T top(){return root->x;} - void clear(){clear(root);count = 0;} - void push(const T& x){ - SkewNode* a = new SkewNode(x); - count += 1; - root = Merge(root, a); - } - void join(SkewHeap& a){ - count += a.count; a.count = 0; - root = Merge(root, a.root); - } - void pop(){ - count -= 1; - SkewNode* rt = Merge(root->lc, root->rc); - delete root; root = rt; - } - friend void swap(SkewHeap& a, SkewHeap& b){ - swap(a.root, b.root); - } -}; diff --git a/C++/SlowPrinter.cpp b/C++/SlowPrinter.cpp deleted file mode 100644 index c1026dea7..000000000 --- a/C++/SlowPrinter.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -void slow_print(const std::string str, int delay_time) { - for (size_t i = 0; i != str.size(); ++i) { - std::cout << str[i]; - Sleep(delay_time); - } -} - -int main(){ - - std::string message = "Hello World!"; - // the bigger the number the slower it prints - int DELAY_TIME = 300; - - - //pass in the message to print it slowly - slow_print(message, DELAY_TIME); -} diff --git a/C++/SmAlLFaCtOrIaL.cpp b/C++/SmAlLFaCtOrIaL.cpp deleted file mode 100644 index 0ec4221a7..000000000 --- a/C++/SmAlLFaCtOrIaL.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include -using namespace std; - -#define ll long long int - - -int main() { - ll t, n; - ll temp, x, m = 0; - ll a[200]; - cin>>t; - - while(t--) { - cin>>n; - a[0] = 1; // Storing 1! - m = 1; - for(int i = 2; i <= n; i++) { - temp = 0; - for(int j = 0; j < m; j++) { - x = a[j] * i + temp; - a[j] = x % 10; - temp = x / 10; - } - while(temp > 0) { - a[m++] = temp % 10; - temp = temp / 10; - } - } - for(int i = m - 1; i >= 0; i--) { - cout< -#include -#include -using namespace std; - -int minSum(vector &arr, int n) -{ - int sum = arr[0], prev = arr[0]; - - for (int i = 1; i < n; i++) { - - // If violation happens, make current - // value as 1 plus previous value and - // add to sum. - if (arr[i] <= prev) { - prev = prev + 1; - sum = sum + prev; - } - - // No violation. - else { - sum = sum + arr[i]; - prev = arr[i]; - } - } - - return sum; -} - -int main() { - int n, t, first_sum = 0; - vector v; - cin>>n; - - for(int i = 0; i < n; ++i){ - cin>>t; - v.push_back(t); - first_sum += t; - } - - sort(v.begin(), v.end()); - - cout< -using namespace std; -int main() -{ - int T; cin >> T; - while(T--) - { - int x11, x12, x21, x22, y11, y12, y21, y22, slope1, slope2; - bool flag = 0; - cin>>x11>>y11>>x12>>y12>>x21>>y21>>x22>>y22; - slope1 = (x11==x12)?1:0; - slope2 = (x21==x22)?1:0; - if(slope1!=slope2) - { - if(slope1 == 0 && ((x11 == x21 || x12 == x21) && (y11 == y21 || y11 == y22))) - flag = 1; - else if (slope2 == 0 && ((x21 == x11 || x22 == x11 ) && (y21 == y11 || y21 == y12))) - flag = 1; - else if ( (slope1 == 0 && (x21 == x22 && y21 == y22) && y11 == y21 && (x21>=min(x11,x12) && x21<=max(x12,x11)) ) || - (slope2 == 0 && (x11 == x12 && y11 == y12) && y11 == y21 && (x11>=min(x21,x22) && x11<=max(x21,x22)) ) ) - flag = 1; - } - else if(slope1 == 1 && x11==x22 && max(y21, y22)>=min(y11, y12) && min(y21, y22)<=max(y11, y12)) - flag = 1; - else if(y11==y22 && max(x21, x22)>=min(x11, x12) && min(x21, x22)<=max(x11, x12)) - flag = 1; -if (flag) - cout <<"yes\n"; - else - cout <<"no\n"; - } -} diff --git a/C++/SortArrayDescending.cpp b/C++/SortArrayDescending.cpp deleted file mode 100644 index 8803b6e4f..000000000 --- a/C++/SortArrayDescending.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include - int main() - { - using namespace std; - int number[30]; - int i,j,a,n; - cin>>n; - for (i = 0; i < n; i++) - cin>>number[i]; - for (i=0;i - -using namespace std; - -int main () -{ - int N , T , Ans=0 ; - //cout<<"Enter the number of lines"; - cin >> T; - for (int i = 0; i < T; i++) - { - //cout<<"Enter a number"; - cin >> N; - Ans= sqrt(N); - cout< -using namespace std; - -struct node -{ - int data; - struct node *next; -}; - -class stack -{ - public: - node *top; - stack() - { - top = nullptr; - } - - void push(int x) - { - node *ptr = new node; - ptr->data = x; - ptr->next = nullptr; - if (top != nullptr) - ptr->next = top; - top = ptr; - } - - int pop() - { - if (top == nullptr) - { - cout << "Stack Underflow\n"; - return 0; - } - int data = top->data; - auto current = top; - top = top->next; - delete current; - return data; - } - - void show() - { - if (top != nullptr) - { - auto current = top; - while (current != nullptr) - { - std::cout << current->data; - if (current->next != nullptr) - { - std::cout << ">>"; - } - - current = current->next; - } - std::cout << std::endl; - } - } -}; - -int main() -{ - stack s; - s.push(1); - s.push(2); - s.push(3); - s.show(); - cout << "Element is " << s.pop() << endl; - cout << "Element is " << s.pop() << endl; - cout << "Element is " << s.pop() << endl; - cout << "Element is " << s.pop() << endl; - return 0; -} diff --git a/C++/Statistics.cpp b/C++/Statistics.cpp deleted file mode 100644 index 2067a440d..000000000 --- a/C++/Statistics.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include - -using namespace std; - -int main() -{ - - int n; - cin >>n; - string name,game; - unordered_map m; - set s; - for(int i=0;i> name>> game; - if(s.find(name)==s.end()) { - m[game]++; - } - } - unordered_map::iterator it; - string st; - int len=0; - for(it=m.begin(); it!=m.end();it++){ - if(it->second> len) { - st = it->first; - len = it->second; - } - cout << it->first << endl; - } - cout << st << endl; - cout << m["football"]; - return 0; -} diff --git a/C++/SudokuRecursion.cpp b/C++/SudokuRecursion.cpp deleted file mode 100644 index d10cfe82a..000000000 --- a/C++/SudokuRecursion.cpp +++ /dev/null @@ -1,3 +0,0 @@ -//Sudoko using recursion - - diff --git a/C++/Sum in array.cpp b/C++/Sum in array.cpp deleted file mode 100644 index 211d72594..000000000 --- a/C++/Sum in array.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -using namespace std; -int main() -{ - int n,sum = 0; - cin >> n; - int o[n]; - for(int i =0;i < n;i++) - { - cin >> o[i]; - sum+=o[i]; - } - cout << sum << endl; - return 0; -} diff --git a/C++/SumNmber(1-N) b/C++/SumNmber(1-N) deleted file mode 100644 index 588aba502..000000000 --- a/C++/SumNmber(1-N) +++ /dev/null @@ -1,42 +0,0 @@ -#define _CRT_SECURE_NO_WAR -#include -using namespace std; -#define ll long long int -#define ull unsigned long long int -#define file freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout); -#define KingOfWrongAnswer cin.tie(0);std::ios::sync_with_stdio(false); -#define forit(i, a) for ( __typeof( (a).begin() ) i = (a).begin(); i != (a).end(); i++ ) -#define mp make_pair -#define pb push_back -#define clr(a,n) memset(a,n,sizeof(a)) -#define all(c) c.begin(), c.end() -#define rep(i,n) for(int i=0;i>i)&1)==1;} -//int setbit(int n,int i,int val){return val?(n|(1<>1);} -//bool power2(int x){return (x && !(x & (x - 1)));} -//ll largest_power(ll n){n = n| (n>>1);n= n| (n>>2);n = n| (n>>4);n = n| (n>>8);return (n+1)>>1;} -//bool cmp(pairx,pairy){if (x.first==y.first) return x.second>y.second;return x.first>n; - cout<<(n*(n+1)/2)< - -#define NUM_DE_JOGOS 5 - -int main() -{ - int tabela[NUM_DE_JOGOS][2]; - int SG = 0, GC = 0, GP = 0; - int V = 0, E = 0, D = 0, PG = 0, i; - float AP; - - for (i = 0; i tabela[i][1]) { V++; } - else if (tabela[i][0] < tabela[i][1]) { D++; } - else { E++; } - } - - SG = GP - GC; - PG = V*3 + E; - AP = 100.00*PG / (NUM_DE_JOGOS*3); - - printf ("\nResumo da campanha:\n"); - printf (" %d Vitórias\n %d empates,\n %d derrotas\n", V, E, D); - printf ("Gols: Pró = %d Contra = %d, Saldo = %d\n", GP, GC, SG); - printf ("Pontos ganhos: %d (%3.2f%% de aproveitamento)\n", PG, AP); - - return 0; -} diff --git a/C++/TechElf b/C++/TechElf deleted file mode 100644 index 5bd34ef0e..000000000 --- a/C++/TechElf +++ /dev/null @@ -1,10 +0,0 @@ -#include - -using namespace std; - -int main() -{ - cout << "Hello World" << endl; - - return 0; -} diff --git a/C++/TheConfusedMonk.cpp b/C++/TheConfusedMonk.cpp deleted file mode 100644 index 8e34e60f7..000000000 --- a/C++/TheConfusedMonk.cpp +++ /dev/null @@ -1,27 +0,0 @@ - #include - #include - using namespace std; - long long int ans=1; - long long int powermod(long long int a,long long int b,long long int m){ - if(b==0) - return 1; - if(b==1) - return a; - ans=powermod(a,b/2,m); - ans=(ans*ans)%m; - if(b%2==1) - ans = (ans*a)%m; - return ans; - } - int main(){ - long long int n,a[51],f,g; - scanf("%lld%lld",&n,&a[0]); - g=a[0]; - f=a[0]; - for(int i=1;i -#include -typedef long long int lli; -int main(){ - lli a,b,ans=0; - char str[1000000]; - scanf("%lld%lld",&a,&b); - scanf("%s",str); - for(int i=0;str[i]!='\0';i++) - { - if(str[i]=='1') - { - ans = (ans+a)%b; - } - a = ((a%b)*(a%b))%b; - } - printf("%lld",ans); - return 0; -} diff --git a/C++/ThreadedHelloWorld.cpp b/C++/ThreadedHelloWorld.cpp deleted file mode 100644 index 1168322b2..000000000 --- a/C++/ThreadedHelloWorld.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - -void helloWorld() -{ - std::cout << "Threaded \"Hello world!\"\n"; -} - -int main() -{ - std::thread t(helloWorld); - std::cout << "Hello world from main()!\n"; - t.join(); -} diff --git a/C++/TicTacToe_vs_cpu.cpp b/C++/TicTacToe_vs_cpu.cpp deleted file mode 100644 index 8817778c0..000000000 --- a/C++/TicTacToe_vs_cpu.cpp +++ /dev/null @@ -1,235 +0,0 @@ -#include -using namespace std; - -char pl,cl; -char board[3][3]; - -struct Move -{ - int row,col; -}; - - -//function to check if player won or not -bool isWin(char pl,char board[3][3]) -{ - //check for rows - for(int i=0;i<3;i++) - { - if(board[i][0]==pl && board[i][1]==pl && board[i][2]==pl) - return true; - } - - //check for columns - for(int i=0;i<3;i++) - { - if(board[0][i]==pl && board[1][i]==pl && board[2][i]==pl) - return true; - } - - //check for diagonals - if(board[0][0]==pl && board[1][1]==pl && board[2][2]==pl) - return true; - - if(board[0][2]==pl && board[1][1]==pl && board[2][0]==pl) - return true; - - return false; -} - - - -//function to check if board is over or not -bool isOver(char board[3][3]) -{ - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - if(board[i][j]==' ') - return false; - } - } - return true; -} - - -//function to calculate score -int score(char p,int depth,char board[3][3]) -{ - if(p==pl && isWin(p,board)==true) - { - return 10-depth; - } - else if(p==cl && isWin(p,board)==true) - return depth-10; - else - return 0; -} - -//function to apply minimax algorithm -int minimax(char board[3][3],int depth,char p) { - int sc=score(p,depth,board); - if(sc!=0) - return sc; - if(isOver(board)==true && sc==0) - return 0; - if(p==pl) { - int best=-100; - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - if(board[i][j]==' ') - { - board[i][j]=p; - best=max(best,minimax(board,depth+1,cl)); - board[i][j]=' '; - } - } - } - return best; - } - else if(p==cl) - { - int best=100; - for(int i=0;i<3;i++) { - for(int j=0;j<3;j++) { - if(board[i][j]==' ') - { - board[i][j]=p; - best=min(best,minimax(board,depth+1,pl)); - board[i][j]=' '; - } - } - } - return best; - } -} - -//function to calculate best move -Move FindBestMove(char board[3][3],char p) -{ - Move best; - int val=-1000; - best.row=-1; - best.col=-1; - int i,j; - for(i=0;i<3;i++) - { - for(j=0;j<3;j++) - { - if(board[i][j]==' ') - { - board[i][j]=p; //make the move - int value=minimax(board,0,cl); //start with the minimizing player - board[i][j]=' '; //undo move - - //find the best move by calculating one giving highest positive return value - if(value>val) - { - best.row=i; - best.col=j; - val=value; - } - } - } - } - return best; -} - - - - -//function to print board -void Draw() -{ - for(int i=0;i<3;i++) { - for(int j=0;j<3;j++) { - cout<<"|"<>x; - cout<<"Enter y coordinate of the column u want to insert\n"; - cin>>y; - if(board[x][y]==' ') - board[x][y]=p; - else { - cout<<"Wrong Move! Exiting game !!!"; - exit(0); - } - Draw(); -} - -//The main function -int main() -{ - char p; - cout<<"Enter Your Choice: X or O"<>cl; - pl=(cl=='X')?'O':'X'; //pl is the computer player,cl is user - - for(int i=0;i<3;i++) - { - for(int j=0;j<3;j++) - { - board[i][j]=' '; - } - } - Draw(); - - //Loop untill board is over - while(!isOver(board)) - { - if(pl=='X') - { - Move best=FindBestMove(board,pl); - - board[best.row][best.col]=pl; - cout<<"\n\n\n"; - Draw(); - if(isWin(pl,board)) - break; - cout<<"\n\n\n"; - if(!isOver(board)) - Opponent(board,cl); - cout<<"\n\n\n"; - if(isWin(cl,board)) - break; - } - if(pl=='O') - { - cout<<"\n\n\n"; - Opponent(board,cl); - if(isWin(cl,board)) - break; - cout<<"\n\n\n"; - if(!isOver(board)) { - Move best=FindBestMove(board,pl); - board[best.row][best.col]=pl; - - Draw(); - } - if(isWin(pl,board)) - break; - cout<<"\n\n\n"; - } - } - if(isWin(pl,board)==true) - cout<<"Computer Wins\n"; - else if(isWin(cl,board)==true) - cout<<"You Win\n"; - else - cout<<"Draw\n"; - cout<<"GAME OVER\n"; -} diff --git a/C++/TreePreorderTraversal.cpp b/C++/TreePreorderTraversal.cpp deleted file mode 100644 index aaa7bf7a5..000000000 --- a/C++/TreePreorderTraversal.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include - -// Given below is an algorithm for preorder traversal of tree data structure -class Node { - public: - int data; - Node *left; - Node *right; - Node(int d) { - data = d; - left = NULL; - right = NULL; - } -}; - -class Solution { - public: - Node* insert(Node* root, int data) { - if(root == NULL) { - return new Node(data); - } else { - Node* cur; - if(data <= root->data) { - cur = insert(root->left, data); - root->left = cur; - } else { - cur = insert(root->right, data); - root->right = cur; - } - - return root; - } - } diff --git a/C++/TriangleAreaGivenThreeSides.cpp b/C++/TriangleAreaGivenThreeSides.cpp deleted file mode 100644 index c3477b751..000000000 --- a/C++/TriangleAreaGivenThreeSides.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -using namespace std; - -int main() -{ - int a, b, c; - - cout << "Insert triangles side: "; - cin >> a >> b >> c; - - double s = 0.5 * (a + b + c); - - double area = sqrt(s * (s - a) * (s - b) * (s - c)); - - cout << area << endl; - - return 0; -} \ No newline at end of file diff --git a/C++/Username.cpp b/C++/Username.cpp deleted file mode 100644 index 66ad8eed5..000000000 --- a/C++/Username.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - std::cout << "Github Name: Djay1407"; - return 0; -} \ No newline at end of file diff --git a/C++/ValeuFalou.cpp b/C++/ValeuFalou.cpp deleted file mode 100644 index b9baa7181..000000000 --- a/C++/ValeuFalou.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main() -{ - //Good Bye in Brazilian Portuguese - printf("Vlw flw"); - return 0; -} \ No newline at end of file diff --git a/C++/Vector.sort().cpp b/C++/Vector.sort().cpp deleted file mode 100644 index efcfa1f4c..000000000 --- a/C++/Vector.sort().cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -using namespace std; - -int main() { - int n; - cin>>n; - vectorv; //It will create vector name v of type integer. - int temp; - for(int i=0;i>temp; - v.push_back(temp); //it will append(insert) values at the end of vector - } - sort(v.begin(),v.end()); //This function will sort all the elements of vector v in ascending order - for(int i=0;i -using namespace std; -int main() -{ -cout<<"Hello World"< -using namespace std; -int myXor(int a, int b) -{ - return (a|b) & (~a|~b); -} -int main() -{ - //finding the xor of two numbers - int a,b; - cin>>a>>b; - int result = myXor(a,b); - cout< - -using namespace std; - -int main() -{ - cout << "Hello World" << endl; - return 0; -} diff --git a/C++/Zeusses.cpp b/C++/Zeusses.cpp deleted file mode 100644 index 891527311..000000000 --- a/C++/Zeusses.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main() -{ -cout<<"Hello world."< -using namespace std; -#define ll long long -long long power_mod_p(ll a, ll b, ll m){ - - // if power is zeoro return 1 - if(!b)return 1; - - //otherwise call a^2 power b/2 recursively - return power_mod_p(a*a%m, b/2, m)*(b&1? a:1)%m; - } - -int main() { - - long long a,b,m; - cin>>a>>b>>m; - cout< -using namespace std; -int main(){ - ios::sync_with_stdio(0); - cin.tie(0); - float a ; - a=1.0/17; - cout< -using namespace std; - -int main() -{ - double x,y; - cout<<"Enter the numbers you wish to add"<>x>>y; - cout<<"The sum of numbers is "< -using namespace std; - -int main() -{ - int a,b; - cin >> a; - cin >> b; - int c = a + b; - cout << "The sum of two nos is " << c; - return 0; -} diff --git a/C++/addition_Of_Two_Numbers.cpp b/C++/addition_Of_Two_Numbers.cpp deleted file mode 100644 index b778bf43b..000000000 --- a/C++/addition_Of_Two_Numbers.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include - -using namespace std; - -int main() -{ - int a, b, c; - - cout << "Enter two integers to add"<> a >> b; - - c = a + b; - cout < -#include -void main() -{ -printf("HELLO ALIEN HELLO WORLD"); -getch(); -} diff --git a/C++/antz.cpp b/C++/antz.cpp deleted file mode 100644 index a9f520502..000000000 --- a/C++/antz.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() -{ - std::cout << "\nHello World!\n"; -} \ No newline at end of file diff --git a/C++/bfs.cpp b/C++/bfs.cpp deleted file mode 100644 index 300c4e018..000000000 --- a/C++/bfs.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#include - -using namespace std; - -int main(){ - - int x,y,v,edges; - cout<<"The number of edges: "; - cin>>edges; - - vector visited(10,false); // considering number of edges in graph to be less than 10 - vector graph[10]; - queue queue; - - cout<<"There is a branch between: \n"; - for(int i=0;i>x>>y; - graph[x].push_back(y); - //graph[y].push_back(x); - } - - cout<<"Enter the vertex where you want the bfs transversal to start: \n"; - cin>>v; - - queue.push(v); - visited[v]=1; - //cout<::iterator i=graph[v].begin();i!=graph[v].end();i++){ - - if(!visited[*i]){ - //cout<<*i< -using namespace std; -typedef pair pii; -typedef vector< pii> vii; -typedef vector vi; -typedef vector< vi > vvi; -typedef long long int LL; -#define pb push_back -#define mp make_pair -#define scan(n) scanf("%d",&n) -#define print(n) printf("%d\n",n) -#define longscan(n) scanf("%lld",&n) -#define longprint(n) printf("%lld\n",n) -#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL) -/*void sieve(int n) - { - for(int i=2;i*i<=100000;i++) for(int j=2*i;j<=100000;j+=i) if(!sie[j]) sie[j]=1; - }*/ -int n; -int bit[10000]; -void update(int x, int val) -{ - for(; x <= n; x += x & -x) - { - bit[x] += val; - } -} - -int query(int x) -{ - int sum = 0; - for(; x > 0; x-= x&-x) - { - sum+= bit[x]; - } - return sum; -} -int main() -{ - int q; - cin >> n >> q; - int a[n+9], quer[q+9]; - for(int j=1;j<=n;j++) - { - cin >> a[j]; - update(j,a[j]); - } - for(int j=1;j<=q;j++) - { - cin >> quer[j]; - } - for(int j=1;j<=q;j++) - { - cout << query(quer[j]) << "\n"; - } - return 0; -} diff --git a/C++/binary_search.cpp b/C++/binary_search.cpp deleted file mode 100644 index 9310114af..000000000 --- a/C++/binary_search.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -using namespace std; -#define N 10 - -int binary_search(int x, int n, int v[]){ - int e = 0, m = 0, d = n-1; - while(e <= d){ - m = (e+d)/2; - if(v[m] == x){ - int can = 1; - /* search for the FIRST occur of the element */ - while(can){ - if(v[m-1] == x && (m-1) >= 0){ - m -= 1; - }else{ - break; - } - } - return m; - } - if(v[m] < x){ - e = m + 1; - }else{ - d = m - 1; - } - } - return -1; -} - -int main(){ - int A[N], proc; - for(int x = 0; x < N; x++){ - cin >> A[x]; - } - sort(A, A + N); // sort the array - cin >> proc; // type here what number you are searching - int search = binary_search(proc, N, A); - if(search == -1){ - cout << "Not found" << endl; - }else{ - cout << "Found at index " << search << endl; - } -} 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"< -using namespace std; - -int main(){ - int qt = 0, aux; - vector p; - while(cin >> aux){ - p.push_back(aux); - qt++; - } - for(int x = 0; x < qt; x++){ - for(int y = 0; y < qt - 1; y++){ - if(p[y] > p[y+1]){ - swap(p[y], p[y+1]); - } - } - } - for(int x = 0; x < qt; x++){ - cout << p[x] << " "; - } -} diff --git a/C++/bubbleSort.cpp b/C++/bubbleSort.cpp deleted file mode 100644 index 7b8cc78fd..000000000 --- a/C++/bubbleSort.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include - -using namespace std; -void swap(int input[],int i,int j){ - int temp = input[i]; - input[i] = input[j]; - input[j] = temp; -} -void bubbleSort(int input[],int size){ - for(int firstUnsortedIndex = size-1;firstUnsortedIndex>0;firstUnsortedIndex--){ - for(int i = 1;i<=firstUnsortedIndex;i++){ - if(input[i-1]>input[i]){ - swap(input,i-1,i); - } - } - } -} - -int main() -{ - std::ios::sync_with_stdio(false); - int n; - cout<<"Enter the size: "; - cin>>n; - int input[n]; - for(int i=0;i>input[i]; - int size = sizeof(input)/sizeof(input[0]); - bubbleSort(input,size); - for(int i=0;i -#include -#include -using namespace std; - -// Function to sort arr[] of size n using bucket sort -void bucketSort(float arr[], int n) -{ - // 1) Create n empty buckets - vector b[n]; - - // 2) Put array elements in different buckets - for (int i=0; i -using namespace std; -int castleTowers(int n, vector ar) { - sort(ar.rbegin(), ar.rend()); - int maxi = ar[0]; - int cnt = 1; - for (int i = 1; i < n; i++) { - if (maxi == ar[i]) { - cnt += 1; - } else { - break; - } - } - return cnt; -} -int main() { - int n; - cin >> n; - vector ar(n); - for(int ar_i = 0; ar_i < n; ar_i++){ - cin >> ar[ar_i]; - } - int result = castleTowers(n, ar); - cout << result << endl; - return 0; -} \ No newline at end of file diff --git a/C++/ceaser cipher b/C++/ceaser cipher deleted file mode 100644 index 7daee364b..000000000 --- a/C++/ceaser cipher +++ /dev/null @@ -1,37 +0,0 @@ -// A C++ program to illustrate Caesar Cipher Technique -#include -using namespace std; - -// This function receives text and shift and -// returns the encrypted text -string encrypt(string text, int s) -{ - string result = ""; - - // traverse text - for (int i=0;i -#include -#include -#include -#include - -//funções -int cores(); -int sair(); -int tempo(); - -//variáveis -int texto=0, fundo=0, troca=0, i=0, l=0; -char palavra[10],senha[10]; - -int main() -{ - initscr();// inicializando janela - clear(); - start_color();// habilitando utilização de cores - - if (troca==2) { } - else - { - init_pair(1,COLOR_GREEN,COLOR_BLACK); - } - - bkgd(COLOR_PAIR(1)); //Definifindo o init_pair a ser utilizado - move(1,1); - printw("Bem-Vindo!\nComandos \n#"); - scanw("%s", palavra); - - if(strcmp(palavra,"cor")) { } - else { cores(); } - - if(strcmp(palavra,"sair")){} - else { sair(); } - - if(strcmp(palavra,"tempo")){} - else { tempo(); } - - if(strcmp(palavra,"limpar")){} - else - { - clear(); - main(); - } - - refresh(); - move(23,1); - printw("Comando Inexistente!"); - getch(); - main(); - - return 0; -} - -int cores(void) -{ - printw("\n\n\n Cor do texto :\n\n 0 - Preto.\n 1 - Vermelho. \n 2 - Verde. \n 3 - Amarelo.\n 4 - Azul.\n 5 - Magenta.\n 6 - Ciano.\n 7 - Branco.\n\n Qual número de sua escolha :"); - scanw("%d",&texto); - clear(); - - printw("\n\n\n Cor do fundo :\n\n 0 - Preto.\n 1 - Vermelho. \n 2 - Verde. \n 3 - Amarelo.\n 4 - Azul.\n 5 - Magenta.\n 6 - Ciano.\n 7 - Branco.\n\n Qual número de sua escolha :"); - scanw("%d",&fundo); - - if(texto==fundo) - { - printw("Cor do texto e fundo iguais, favor mudar!"); - getch(); - clear(); - cores(); - } - - else { troca=2; } - - init_pair(1,texto,fundo); - refresh(); - clear(); - main(); -} - -int tempo(void) -{ - time_t clock = time(NULL); - printw("Current time is %s", ctime(&clock)); - getch(); - main(); -} - -int sair(void) -{ - endwin(); //Finalizando janela - exit(1); -} diff --git a/C++/christophorosdk.cpp b/C++/christophorosdk.cpp deleted file mode 100644 index a5dea4d8c..000000000 --- a/C++/christophorosdk.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - - using namespace std; - - int main(){ - cout << "My name is christophorosdk !" << endl; - return 0; - } diff --git a/C++/circular queue.cpp b/C++/circular queue.cpp deleted file mode 100644 index 9ac1457c0..000000000 --- a/C++/circular queue.cpp +++ /dev/null @@ -1,115 +0,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++/city.cpp b/C++/city.cpp deleted file mode 100644 index 23856fdba..000000000 --- a/C++/city.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include -#include -using namespace std; - -void print_dijkstra(vector>* vetor, int n_estations, int* distance, int caso){ - cout << "caso " << caso << endl; - bool flag = true; - for(int i = 0; i < n_estations; i++){ - if(vetor[i].size() != 2){ - if(flag){ - cout << distance[i]; - flag = false; - } - else - cout << " "; - cout << distance[i]; - } - } - cout << endl; - cout << endl; -} -int search_begin(vector>* vetor){ - int i = 0; - while(vetor[i].size() == 2){ - i++; - } - return i; -} -void dijkstra(vector>* vetor, int n_estations, int begin, int caso){ - int distance[n_estations]; - int f[n_estations]; - for(int i = 0; i < n_estations; i++){ - distance[i] = 100000; - f[i] = -1; - } - distance[begin] = 0; - priority_queue , vector>, greater>> rip; - rip.emplace(0,begin); - while(!rip.empty()){ - pairextract; - extract = rip.top(); - rip.pop(); - int toddynho = extract.second; - - for(auto nesquik: vetor[toddynho]){ - - int vertice = nesquik.first; // vertice - int aresta = nesquik.second; //distancia - if((distance[toddynho] + aresta) < distance[vertice]){ - - distance[vertice] = distance[toddynho] + aresta; - rip.emplace(distance[vertice], vertice); - f[vertice] = toddynho; - } - } - } - print_dijkstra(vetor, n_estations, distance, caso); -} - -int main(void){ - int n_estations, m_conetions, u, v, d, begin, caso = 0; // n = número total de estações, sejam paradas ou terminais, englobando todas as linhas - // m = = número total de conexões (bidirecionais) entre estações "vizinhas" - //uj vj = indica uma conexão entre as estações uj e vj, para 0<=uj > matrix; - - while(scanf("%d %d", &n_estations, &m_conetions) != EOF){ - - vector> vetor[n_estations]; - - for(int i = 0; i < m_conetions; i++){ - cin >> u; - cin >> v; - cin >> d; - vetor[u].push_back(make_pair(v, d)); - vetor[v].push_back(make_pair(u, d)); - } - begin = search_begin(vetor); - dijkstra(vetor, n_estations, begin, caso); - caso ++; - } -} \ No newline at end of file diff --git a/C++/commbinations.cpp b/C++/commbinations.cpp deleted file mode 100644 index 50be0d0ba..000000000 --- a/C++/commbinations.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//This program is used to find the numbers of possible Combinations -/* -This program repeatedly reads in a non-negative integer N followed by a second non-negative integer K, and prints out the number of ways you can choose K items from among N total items. We call this "N-choose-K", and the formula for "N-choose-K" is: - -N! / (K! * (N-K)!) - - -Input Format: -The input consists of two integers N and K respectively. - - -Output Format: -The output contains a single integer indicating the result given the integers N and K. -*/ -#include - -using namespace std; - -double fact(double x) //function to find factorial -{ double r=1; - while(x!=1) - { - r*=x; - x--; - fact(x); - } - return r; -} -int main() { - double a[2],s; - cin>>a[0]>>a[1]; //a[0] is N & a[1] is K - if(a[1]<=a[0] && a[1]>=0) - { - cout< -//max amount of vertices of the problem -#define MAXN 100000 - -using namespace std; - -vector g[MAXN]; -int vis[MAXN]; - -void dfs(int u){ - vis[u] = 1; // visiting - for(int i = 0;i < g[u].size(); i++){ - int v = g[u][i]; - if(!vis[v]){ // if not visited - dfs(v); - } - } -} - - -int main(){ - //filling vis with zeros - memset(vis, 0, sizeof vis); - - // N = number of vertices - // M = numbers of conections of each - int N, M; - - /* - U have to read the connections of the vertice g[i] - g[i].push_back(vertice that it's connected to - a unique number) - */ - - // u can run dfs() in the way that suits your problem -} - - -/* -EXAMPLE OF USE OF A DFS -> PROBLEM 2562 of URI Online Judge - -#include -#define MAXN 100000 -#define ii pair - -using namespace std; - -vector g[MAXN]; -int vis[MAXN]; - -int resp; - -bool dfs(int u){ - vis[u] = 1; - for(int i=0;i - -constexpr unsigned long long fact(int n) -{ - if (n == 0 || n == 1) return 1; - else return n * fact(n-1); -} - -constexpr unsigned long long factorial[21] = { - fact(0), fact(1), fact(2), fact(3), fact(4), - fact(5), fact(6), fact(7), fact(8), fact(9), - fact(10), fact(11), fact(12), fact(13), fact(14), - fact(15), fact(16), fact(17), fact(18), fact(19), - fact(20) }; - -int main(int argc, char** argv) -{ - int n = std::stoi(argv[1]); - if (n < 21) std::cout << factorial[n] << "\n"; - else std::cout << "factorial " << n << " is too big\n"; -} diff --git a/C++/convexHull.cpp b/C++/convexHull.cpp deleted file mode 100644 index fe3fc73c0..000000000 --- a/C++/convexHull.cpp +++ /dev/null @@ -1,41 +0,0 @@ -include -using namespace std; - -// This void calculates the Convex Hull of a poligon declared using -// pair using the Jarvis Algorithm in O(n²). - -#define pb push_back -#define mp make_pair -#define priority_queue pq - -#define f first -#define s second - -typedef long long int ll; -typedef pair pii; -typedef vector vi; - -void convexHull(pii points[], int n) -{ - if (n < 3) return; - vector hull; - - int l = 0; - for (int i = 1; i < n; i++) - if (points[i].f < points[l].f) - l = i; - - int p = l, q; - do { - hull.push_back(points[p]); - q = (p+1)%n; - for (int i = 0; i < n; i++) - { - if (orientation(points[p], points[i], points[q]) < 0) - q = i; - } - p = q; - - } while (p != l); - // Now yout hull in the hull vector -} diff --git a/C++/convex_hull b/C++/convex_hull deleted file mode 100644 index 407fa7df1..000000000 --- a/C++/convex_hull +++ /dev/null @@ -1,241 +0,0 @@ - -// A divide and conquer program to find convex -// hull of a given set of points. -#include -using namespace std; - -// stores the centre of polygon (It is made -// global because it is used in compare function) -pair mid; - -// determines the quadrant of a point -// (used in compare()) -int quad(pair p) -{ - if (p.first >= 0 && p.second >= 0) - return 1; - if (p.first <= 0 && p.second >= 0) - return 2; - if (p.first <= 0 && p.second <= 0) - return 3; - return 4; -} - -// Checks whether the line is crossing the polygon -int orientation(pair a, pair b, - pair c) -{ - int res = (b.second-a.second)*(c.first-b.first) - - (c.second-b.second)*(b.first-a.first); - - if (res == 0) - return 0; - if (res > 0) - return 1; - return -1; -} - -// compare function for sorting -bool compare(pair p1, pair q1) -{ - pair p = make_pair(p1.first - mid.first, - p1.second - mid.second); - pair q = make_pair(q1.first - mid.first, - q1.second - mid.second); - - int one = quad(p); - int two = quad(q); - - if (one != two) - return (one < two); - return (p.second*q.first < q.second*p.first); -} - -// Finds upper tangent of two polygons 'a' and 'b' -// represented as two vectors. -vector> merger(vector > a, - vector > b) -{ - // n1 -> number of points in polygon a - // n2 -> number of points in polygon b - int n1 = a.size(), n2 = b.size(); - - int ia = 0, ib = 0; - for (int i=1; i a[ia].first) - ia = i; - - // ib -> leftmost point of b - for (int i=1; i=0) - inda = (inda + 1) % n1; - - while (orientation(a[inda], b[indb], b[(n2+indb-1)%n2]) <=0) - { - indb = (n2+indb-1)%n2; - done = 0; - } - } - - int uppera = inda, upperb = indb; - inda = ia, indb=ib; - done = 0; - int g = 0; - while (!done)//finding the lower tangent - { - done = 1; - while (orientation(a[inda], b[indb], b[(indb+1)%n2])>=0) - indb=(indb+1)%n2; - - while (orientation(b[indb], a[inda], a[(n1+inda-1)%n1])<=0) - { - inda=(n1+inda-1)%n1; - done=0; - } - } - - int lowera = inda, lowerb = indb; - vector> ret; - - //ret contains the convex hull after merging the two convex hulls - //with the points sorted in anti-clockwise order - int ind = uppera; - ret.push_back(a[uppera]); - while (ind != lowera) - { - ind = (ind+1)%n1; - ret.push_back(a[ind]); - } - - ind = lowerb; - ret.push_back(b[lowerb]); - while (ind != upperb) - { - ind = (ind+1)%n2; - ret.push_back(b[ind]); - } - return ret; - -} - -// Brute force algorithm to find convex hull for a set -// of less than 6 points -vector> bruteHull(vector> a) -{ - // Take any pair of points from the set and check - // whether it is the edge of the convex hull or not. - // if all the remaining points are on the same side - // of the line then the line is the edge of convex - // hull otherwise not - set >s; - - for (int i=0; i= 0) - pos++; - } - if (pos == a.size() || neg == a.size()) - { - s.insert(a[i]); - s.insert(a[j]); - } - } - } - - vector>ret; - for (auto e:s) - ret.push_back(e); - - // Sorting the points in the anti-clockwise order - mid = {0, 0}; - int n = ret.size(); - for (int i=0; i> divide(vector> a) -{ - // If the number of points is less than 6 then the - // function uses the brute algorithm to find the - // convex hull - if (a.size() <= 5) - return bruteHull(a); - - // left contains the left half points - // right contains the right half points - vector>left, right; - for (int i=0; i>left_hull = divide(left); - vector>right_hull = divide(right); - - // merging the convex hulls - return merger(left_hull, right_hull); -} - -// Driver code -int main() -{ - vector > a; - a.push_back(make_pair(0, 0)); - a.push_back(make_pair(1, -4)); - a.push_back(make_pair(-1, -5)); - a.push_back(make_pair(-5, -3)); - a.push_back(make_pair(-3, -1)); - a.push_back(make_pair(-1, -3)); - a.push_back(make_pair(-2, -2)); - a.push_back(make_pair(-1, -1)); - a.push_back(make_pair(-2, -1)); - a.push_back(make_pair(-1, 1)); - - int n = a.size(); - - // sorting the set of points according - // to the x-coordinate - sort(a.begin(), a.end()); - vector >ans = divide(a); - - cout << "convex hull:\n"; - for (auto e:ans) - cout << e.first << " " - << e.second << endl; - - return 0; -} diff --git a/C++/count distinct divisors of a number.cpp b/C++/count distinct divisors of a number.cpp deleted file mode 100644 index a002512b1..000000000 --- a/C++/count distinct divisors of a number.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//https://www.geeksforgeeks.org/count-divisors-n-on13/ -#include -using namespace std; -int main() -{ - int A; - cin>>A; -int cnt = 0; - for (int i = 1; i <= sqrt(A); i++) - { - if (A % i == 0) { - // If divisors are equal, - // count only one - //we are doing square root(A) so we are excluding numbers greater than its sqaure root - //so what we will do we will divide the number with a i then new ans will be also a divisor - //ex 100/1=100 so here 1 and 100 both are divisors ex 100/2=50 both 2 and 50 are divisors. - if (A / i == i) - { - - cnt++; - } - else // Otherwise count both - { - //ex 100/2=50 so 2 and 50 both are divisors. - cnt = cnt + 2; - } - } - } - cout< - -#include - -using namespace std; - - -int main() { - - - int n; - - cout<<"Number of integers :"<<"\n"; - - cin>>n; - - //max is the maximum element in a[] - int a[n],max=0,c[n]; - - for(int i=0;i>a[i]; - - if(max < a[i]){ - - max =a[i]; - - } - - } - - // b[] is used to keep count orrurances of each element of a[] - int b[max+1]; - - memset(b,0,(max+1)*sizeof(int)); - - for(int i=0; i -using namespace std; -typedef long long ll; -struct node -{ - ll a, b, index; -}tree[4000005]; -int main() -{ - ios_base :: sync_with_stdio(false); - cin.tie(NULL), cout.tie(NULL); - ll n, i, q; - cin >> n; - node a[n]; - for(i = 0; i < n; i++) - { - cin >> a[i].a; - a[i].index = i + 1; - } - for(i = 0; i < n; i++) - cin >> a[i].b; - for(i = 0; i < n; i++) - tree[i + n] = a[i]; - for(i = n - 1; i > 0; i--) - { - node left = tree[(i << 1)]; - node right = tree[(i << 1) | 1]; - if(left.a > right.a) - tree[i] = left; - else if(left.a == right.a) - { - if(left.b <= right.b) - tree[i] = left; - else - tree[i] = right; - } - else - tree[i] = right; - } - cin >> q; - ll l, r; - while(q--) - { - cin >> l >> r; - node ans; - ans.a = INT_MIN; - ans.b = ans.index = INT_MAX; - l--; - for(l += n, r += n; l < r; l >>= 1, r >>= 1) - { - if(l & 1) - { - node left = tree[l++]; - if(left.a > ans.a || (left.a == ans.a && left.b <= ans.b)) - ans = left; - } - if(r & 1) - { - node right = tree[--r]; - if(right.a > ans.a || (right.a == ans.a && right.b <= ans.b)) - ans = right; - } - } - cout << ans.index << endl; - } - return 0; -} diff --git a/C++/cplusplushelloworld.cpp b/C++/cplusplushelloworld.cpp deleted file mode 100644 index f92e31d49..000000000 --- a/C++/cplusplushelloworld.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -using namespace std; - -int main() -{ - cout<<"Hello World in C++!"; -} \ No newline at end of file diff --git a/C++/crossWord.cpp b/C++/crossWord.cpp deleted file mode 100644 index 3c52b3773..000000000 --- a/C++/crossWord.cpp +++ /dev/null @@ -1,293 +0,0 @@ -// This algorithm solves a crossword using backtracking. -// Comments are in portuguese. -/* -Sample input - 4 3 - 0 0 -1 - 0 0 0 - -1 0 0 - 0 0 0 - 5 - key - car - or - as - rry - saoe -*/ - -#include -#include - -// Estrutura utilizada para coordenar e aramazenar os vertices -typedef struct { - int i; - int j; - int tamPal[2]; // [0] - coluna S / [1] - linha L - int idxPal[2]; // Index da palavra em determinado ponto -}vertice; - -// Estrututa utilizada na pilha -typedef struct{ - int vertice; - int lado; // 'Ponto cadeal' -}par; - -// Funçao para contar tamanho da palavra -int TamanhoPalavra(char *str){ - int tamanho = 0; - while (str[tamanho] != '\0'){ - tamanho++; - } - return tamanho; -} - -void setarTamanhos(vertice *ver, char **tab, int m, int n){ - /* - Funçao que determina o numero de letras que as palavras alocadas em - determinado local podem assumir. Recebe um 'vertice' e percorre todos - os seus quatro pontos cardeiais e realaciona cada um com um tamanho. - */ - - int t = 0; - int di = ver->i; - while (++di < m){ - if (tab[di][ver->j] == '*') break; - t++; - } - ver->tamPal[0] = t; - - t = 0; - int dj = ver->j; - while (++dj < n){ - if (tab[ver->i][dj] == '*') break; - t++; - } - ver->tamPal[1] = t; -} - -void montarTabuleiro(vertice *ver, char **tab, char **pal, int nVer, int m, int n){ - for (int i = 0; i < m; i++) - for (int j = 0; j < n; j++) - if (tab[i][j] != '*') - tab[i][j] = '#'; // Reinicializando tabuleiro - - for (int i = 0; i < nVer; i++){ // Percorrendo todos vertices - for (int j = 0; j < 4; j++){ // Percorrendo pontos posiveis dentro do vertice - int auxTam = ver[i].tamPal[j]; // Variaveis que auxilian na posiçao - int auxIdx = ver[i].idxPal[j]; - - if (auxIdx >= 0){ // Se existe palavra idexada a aquela posicao - char *auxPal = pal[auxIdx]; - if (j == 0){ // Caso ela esteja numa coluna no sul - int auxI = ver[i].i + 1; - int auxJ = ver[i].j; - - for (int k = 0; k < auxTam; k++){ - tab[auxI][auxJ] = auxPal[k]; // Passando a palvra para o tabuleiro - auxI++; - } - } - if (j == 1){ // Caso ela esteja numa linha no leste - int auxI = ver[i].i; - int auxJ = ver[i].j + 1; - - for (int k = 0; k < auxTam; k++){ - tab[auxI][auxJ] = auxPal[k]; - auxJ++; - } - } - } - } - } -} - -int checaEspacoVazio(char **tab, int m, int n){ - // Checa se existe alguma posiçao vazia no tabuleiro - for (int i = 1; i < m; i++){ - for (int j = 1; j < n; j++){ - if (tab[i][j] == '#') return 1; // Tem espaço vazio; - } - } - return 0; -} - -int vaiDar(char **tab, char *pal, int i, int j, int ori){ - /* - Funçao que, dado o tabuleiro, uma palavra, uma posiçao e uma orintaçao, - checa se sera possivel colocar aquela palavra no local, ou seja, se ela - nao vai colodir com alguma palavra ja colocada no tabuleiro, em termos de - letras diferentes. - */ - int n = TamanhoPalavra(pal); - for (int k = 1; k <= n; k++){ - if (ori == 0){ // Caso a palavra tenha que caber em uma coluna - // Caso aquela posicao ja esteja com outra letra e nao seja vazia - if (tab[i+k][j] != pal[k-1] && tab[i+k][j] != '#') return 0; - } - else if (ori == 1){ - if (tab[i][j+k] != pal[k-1] && tab[i][j+k] != '#') return 0; - } - } - return 1; // #VaiDarCerto -} - -void imprimeTabuleiro(char **tab, int m, int n){ - /* - Funçao auxiliar para imprimir o tabuleiro - */ - for (int i = 1; i < m; i++){ - for (int j = 1; j < n; j++){ - printf("%c ", tab[i][j]); - } - printf("\n"); - } -} - -int main(){ - int i, j, m, n, t; - t = 1; // Contador de instancias - while (scanf("%d %d", &m, &n) && !(m == 0 && n == 0)){ - // m - linha , n - col - - // Definindo a matrix que representara o tabuleiro, sendo que ela possui - // 1 linha e coluna a mais (que formam uma especie de moldura). - m += 1; n += 1; - char **tab; - tab = malloc(m * sizeof(char *)); - for (i = 0; i < m; i++) - tab[i] = malloc(n * sizeof(char)); - - /* - Aqui se cria um vetor de vertices. Neste EP, a ideia de vertice se traduz - no local de onde uma palavra pode iniciar/acabar. - */ - vertice *v; - v = malloc(2 * m * n * sizeof(vertice)); - - // Lendo o tabuleiro - int ipt, nVertices = 0; - for (i = 1; i < m; i++){ - for (j = 1; j < n; j++){ - tab[i][j] = '#'; // Inicializando tabuleiro, '#' representa vazio - scanf("%d", &ipt); - if (ipt == -1){ - // Inicializando um vertice - tab[i][j] = '*'; - v[nVertices].i = i; - v[nVertices].j = j; - v[nVertices].idxPal[0] = -1; - v[nVertices].idxPal[1] = -1; - - nVertices++; - } - } - } - - // Criando a 'moldura de vertices' para o tabuleiro - for (int i = 0; i < m; i++){ - tab[i][0] = '*'; - v[nVertices].i = i; - v[nVertices].j = 0; - v[nVertices].idxPal[0] = -1; - v[nVertices].idxPal[1] = -1; - nVertices++; - } - for (int j = 0; j < n; j++){ - tab[0][j] = '*'; - v[nVertices].i = 0; - v[nVertices].j = j; - v[nVertices].idxPal[0] = -1; - v[nVertices].idxPal[1] = -1; - nVertices++; - } - - // Lendo a lista de palavras como uma matriz de char's - int nPal; - scanf("%d", &nPal); - char **pal; - pal = malloc(nPal * sizeof(char*)); - for (i = 0; i < nPal; i++){ - pal[i] = malloc(105 * sizeof(char)); - scanf("%s", pal[i]); - } - - // Setando o numero maximo que uma palavra pode ter para cada vertice - for (i = 0; i < nVertices; i++) - setarTamanhos(&v[i], tab, m, n); - - // Criando pilha usada no backtracking - par *pilha; - pilha = malloc((nPal+1) * sizeof(par)); - int topoPilha = 0; - - printf("Instancia %d\n", t); - int palAtual = 0; - - // Inicio do backtracking - while (palAtual <= nPal){ - if (palAtual < 0){ // Base de erro do backtracking - printf("nao ha solucao\n\n"); - break; - } - else if (palAtual == nPal){ // Sucesso - if (checaEspacoVazio(tab, m, n)){ // Nao tao sucesso assim - printf("nao ha solucao\n\n"); - break; - } - montarTabuleiro(v, tab, pal, nVertices, m, n); - imprimeTabuleiro(tab, m, n); - printf("\n"); - break; - } - - int verAtual = 0; // Indicador de qual vertice estou lidando - while (verAtual <= nVertices && palAtual < nPal && palAtual >= 0){ - int lado = 0; // Indicador de qual ponto do vertice estou lidando - - if (verAtual == nVertices){ // Aqui eu faço o back do tracking - topoPilha--; // Desempilhando - verAtual = pilha[topoPilha].vertice; // Passando valores da pilha de volta para a execuçao - lado = pilha[topoPilha].lado; - v[verAtual].idxPal[lado] = -1; - lado++; // Dando sequencia a partir do proximo passo - palAtual = topoPilha; // A altura da pilha representa a palavr anterior a que estou lidando - if (topoPilha < 0) break; - montarTabuleiro(v, tab, pal, nVertices, m, n); // Atualiza tabuleiro, dado que retirei uma palavra - } - - while (lado <= 2){ - - if (lado == 2){ // Ja percorri todos os pontos possiveis dentro de um vertice - verAtual++; // Vou para o proximo vertice - break; - } - - if (v[verAtual].tamPal[lado] == TamanhoPalavra(pal[palAtual]) && v[verAtual].idxPal[lado] == -1) - if (vaiDar(tab, pal[palAtual], v[verAtual].i, v[verAtual].j, lado) == 1){ - // Caso eu consiga colocar a palavra no determinado local - pilha[topoPilha].vertice = verAtual; - pilha[topoPilha].lado = lado; - v[verAtual].idxPal[lado] = palAtual; - topoPilha++; // Empilhando - palAtual++; // Indo para proxima palavra - verAtual = 0; - montarTabuleiro(v, tab, pal, nVertices, m, n); // Atualiza tabuleiro com a nova palavra - break; - } - - lado++; - } - } - } - - t++; // Incrementando instancia - // Liberando a memoria - free(pilha); - free(tab); - free(v); - free(pal); - } - return 0; -} - diff --git a/C++/decimalToRoman.cpp b/C++/decimalToRoman.cpp deleted file mode 100644 index 207ed388a..000000000 --- a/C++/decimalToRoman.cpp +++ /dev/null @@ -1,34 +0,0 @@ -Program to convert Decimal number to Roman number. - - -#include -using namespace std; - -// Function to calculate roman equivalent -string decimalToRoman(int num) -{ - string m[] = {"", "M", "MM", "MMM"}; - string c[] = {"", "C", "CC", "CCC", "CD", "D", - "DC", "DCC", "DCCC", "CM"}; - string x[] = {"", "X", "XX", "XXX", "XL", "L", - "LX", "LXX", "LXXX", "XC"}; - string i[] = {"", "I", "II", "III", "IV", "V", - "VI", "VII", "VIII", "IX"}; - - // Converting to roman - string thousands = m[num/1000]; - string hundereds = c[(num%1000)/100]; - string tens = x[(num%100)/10]; - string ones = i[num%10]; - - string ans = thousands + hundereds + tens + ones; - - return ans; -} - -int main() -{ - int num = 699; - cout << decimalToRoman(num); - return 0; -} diff --git a/C++/decorator.cpp b/C++/decorator.cpp deleted file mode 100644 index b59c0ab03..000000000 --- a/C++/decorator.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include -#include - -using namespace std; - -const constexpr long n = 1000000; - -template -auto time_decorator(Func && f) { - return [f](auto && ... params) -> auto { - auto start = chrono::steady_clock::now(); - auto result = f(params...); - auto end = chrono::steady_clock::now(); - auto duration = chrono::duration_cast(end - start).count(); - return make_pair<>(result, duration); - }; -} - -auto forLoop = time_decorator([](const vector & v) -> auto { - unsigned long count = 0; - for(size_t i = 0, size = v.size(); i < size; i++) - count += v[i]; - return count; -}); - -auto forEach = time_decorator([](const vector & v) -> auto { - unsigned long count = 0; - for(const auto & x : v) - count += x; - return count; -}); - -auto forLoopIterators = time_decorator([](const vector & v) -> auto { - unsigned long count = 0; - for(auto it = v.begin(), end = v.end(); it != end; ++it) - count += *it; - return count; -}); - -template -inline ostream& operator<<(ostream & out, const pair & p) { - return out << "result: " << p.first << "\nelapsed time: " << p.second << " nanoseconds" << endl; -} - - - -int main_decorator() { - - vector v; - for(size_t i = 0; i < n; i++) - v.push_back(100); - - cout << "Classical for-loop:\n" << forLoop(v) << endl; - cout << "Range-based loop:\n" << forEach(v) << endl; - cout << "For-loop with iterators:\n" << forLoopIterators(v) << endl; - - return 0; -} \ No newline at end of file diff --git a/C++/desktop.ini b/C++/desktop.ini deleted file mode 100644 index 5de1e0957..000000000 --- a/C++/desktop.ini +++ /dev/null @@ -1,6 +0,0 @@ -[.ShellClassInfo] -IconResource=C:\WINDOWS\System32\SHELL32.dll,4 -[ViewState] -Mode= -Vid= -FolderType=Generic diff --git a/C++/dfs.cpp b/C++/dfs.cpp deleted file mode 100644 index 79b19e2e0..000000000 --- a/C++/dfs.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* DFS implementation using Stack... Works well in graphs without cycles */ -#include -#include -#include - -using namespace std; - -int main(){ - - int x,y,v,edges; - cout<<"The number of edges: "; - cin>>edges; - - vector visited(10,false); // considering number of edges in graph to be less than 10 - vector graph[10]; - stack stack; - - cout<<"There is a branch between: \n"; - for(int i=0;i>x>>y; - graph[x].push_back(y); - graph[y].push_back(x); - } - - cout<<"Enter the vertex where you want the transversal to start: \n"; - cin>>v; - - stack.push(v); - visited[v]=1; - cout<::iterator i=graph[v].begin();i!=graph[v].end();i++){ - - if(!visited[*i]){ - cout<<*i< -#include - -using namespace std; - -int main() -{ - int n,k,l=-1,r; - cout<<"enter the value of rows:\n"; - cin>>n; - - cout<<"diamond is:\n"; - for(int i=1;i<=n;i++) - { - - for(int space=1;space<=abs((n+1)/2-i);space++){ - cout <<" "; - } - if(i<=(n+1)/2) - l=l+2; - else // i<=(n+1)/2 ? l=l+2:l=l-2 - l=l-2; - for(int j=1;j<=l;j++) { - - cout<<"* "; - } - cout<<"\n"; - } - - -} diff --git a/C++/digitd b/C++/digitd deleted file mode 100644 index d348c41d0..000000000 --- a/C++/digitd +++ /dev/null @@ -1,111 +0,0 @@ - // Given two integers a and b. The task is to print - // sum of all the digits appearing in the - // integers between a and b - #include - using namespace std; - - // Memoization for the state results - long long dp[20][160][3][3][2]; - - // Stores the digits in x in a vector digit - long long getDigits(long long x, vector &digit) -{ - while (x) - { - digit.push_back(x%10); - x /= 10; - } -} - - // Return sum of digits from 1 to integer in - // digit vector - long long digitSum(int idx, int sum,int even ,int odd , int tight, - vector &digit) - { - // base case - if (idx == -1) { - if(even <= 2 && odd<= 2) return sum; - return 0; - - } - if(even > 2 || odd > 2) return 0; - - // checking if already calculated this state - - if (dp[idx][sum][even][odd][tight] != -1 and tight != 1) - return dp[idx][sum][even][odd][tight]; - - long long ret = 0; - - // calculating range value - int k = (tight)? digit[idx] : 9; - for (int i = 0; i <= k ; i++) - { - // caclulating newTight value for next state - int newTight = (digit[idx] == i)? tight : 0; - - if(i==0) - { - - ret += digitSum(idx-1, sum+i,0,0, newTight, digit); - } - else if(i%2!=0){ - ret += digitSum(idx-1, sum+i,0,odd+1, newTight, digit); - } - else if(i%2==0){ - ret += digitSum(idx-1, sum+i,even+1,0, newTight, digit); - } - // fetching answer from next state - - - } - - if (!tight) - dp[idx][sum][even][odd][tight] = ret; - - return ret; - } - - // Returns sum of digits in numbers from a to b. - long long rangeDigitSum(long long a, long long b) - { - // initializing dp with -1 - memset(dp, -1, sizeof(dp)); - - // storing digits of a-1 in digit vector - vector digitA; - getDigits(a-1, digitA); - - // Finding sum of digits from 1 to "a-1" which is passed - // as digitA. - long long ans1 = digitSum(digitA.size()-1, 0,0,0, 1, digitA); - - // Storing digits of b in digit vector - vector digitB; - getDigits(b, digitB); - - // Finding sum of digits from 1 to "b" which is passed - // as digitB. - long long ans2 = digitSum(digitB.size()-1, 0,0,0, 1, digitB); - - return (ans2 - ans1); - } - void solve(){ - int t; - cin>>t; - while(t--) - { - long long l,r,k; - cin>>l>>r; - k= rangeDigitSum(l,r); - cout<< k<<"\n"; - - }} - // driver function to call above function - int main(){ - - ios_base::sync_with_stdio(false); - cin.tie(NULL); - solve(); - return 0; - } diff --git a/C++/dijkstra b/C++/dijkstra deleted file mode 100644 index 251a7be21..000000000 --- a/C++/dijkstra +++ /dev/null @@ -1,42 +0,0 @@ -// Dijkstra algorithm - -#include -using namespace std; - -int n, m, s, t, b, w[1010][1010], visited[10010]; - -int inf = INT_MAX; -vector adj[1010]; //adj vector - -int main(){ - cin >> n >> m; - // reading graph - for(int i = 0; i < m; i++){ - cin >> s >> t >> b; - w[s][t] = w[t][s] = b; // Defining edges weights - adj[s].push_back(t); // Defining adjacency vector - adj[t].push_back(s); - } - - // Distancy vector - vector dist(n+2, inf); - - priority_queue > q; - q.push(make_pair(0, 0)); // Inicializing queue with root vertice - dist[0] = 0; - - while(!q.empty()){ - int v = q.top().second; - q.pop(); - if(visited[v] == 1) continue; - visited[v] = 1; - for(int u : adj[v]){ // Iterating thru adjacencies - if(dist[u] > dist[v] + w[v][u]){ - dist[u] = dist[v] + w[v][u]; - q.push(make_pair(-dist[u], u)); - } - } - } - - cout << dist[n+1] << endl; -} diff --git a/C++/djikstra.cpp b/C++/djikstra.cpp deleted file mode 100644 index e8cce39f3..000000000 --- a/C++/djikstra.cpp +++ /dev/null @@ -1,120 +0,0 @@ -#include -using namespace std; - -template -class Graph{ - unordered_map > > m; - -public: - - void addEdge(T u,T v,int dist,bool bidir=true){ - m[u].push_back(make_pair(v,dist)); - if(bidir){ - m[v].push_back(make_pair(u,dist)); - } - - } - void printAdj(){ - //Let try to print the adj list - //Iterate over all the key value pairs in the map - for(auto j:m){ - - cout<"; - - //Iterater over the list of cities - for(auto l: j.second){ - cout<<"("< dist; - - //Set all distance to infinity - for(auto j:m){ - dist[j.first] = INT_MAX; - } - - //Make a set to find a out node with the minimum distance - set > s; - - dist[src] = 0; - s.insert(make_pair(0,src)); - - while(!s.empty()){ - - //Find the pair at the front. - auto p = *(s.begin()); - T node = p.second; - - int nodeDist = p.first; - s.erase(s.begin()); - - - //Iterate over neighbours/children of the current node - for(auto childPair: m[node]){ - - if(nodeDist + childPair.second < dist[childPair.first]){ - - - //In the set updation of a particular is not possible - // we have to remove the old pair, and insert the new pair to simulation updation - T dest = childPair.first; - auto f = s.find( make_pair(dist[dest],dest)); - if(f!=s.end()){ - s.erase(f); - } - - //Insert the new pair - dist[dest] = nodeDist + childPair.second; - s.insert(make_pair(dist[dest],dest)); - - } - - } - } - //Lets print distance to all other node from src - for(auto d:dist){ - - cout< g; - g.addEdge(1,2,1); - g.addEdge(1,3,4); - g.addEdge(2,3,1); - g.addEdge(3,4,2); - g.addEdge(1,4,7); - //g.printAdj(); - // g.dijsktraSSSP(1); - - - - - Graph india; - india.addEdge("Amritsar","Delhi",1); - india.addEdge("Amritsar","Jaipur",4); - india.addEdge("Jaipur","Delhi",2); - india.addEdge("Jaipur","Mumbai",8); - india.addEdge("Bhopal","Agra",2); - india.addEdge("Mumbai","Bhopal",3); - india.addEdge("Agra","Delhi",1); - //india.printAdj(); - india.dijsktraSSSP("Amritsar"); - - - return 0; -} diff --git a/C++/doubly_circular_ll.cpp b/C++/doubly_circular_ll.cpp deleted file mode 100644 index 61e70c160..000000000 --- a/C++/doubly_circular_ll.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// C++ program to illustrate inserting a Node in -// a Cicular Doubly Linked list in begging, end -// and middle -#include -using namespace std; - -// Structure of a Node -struct Node -{ - int data; - struct Node *next; - struct Node *prev; -}; - -// Function to insert at the end -void insertEnd(struct Node** start, int value) -{ - // If the list is empty, create a single node - // circular and doubly list - if (*start == NULL) - { - struct Node* new_node = new Node; - new_node->data = value; - new_node->next = new_node->prev = new_node; - *start = new_node; - return; - } - - // If list is not empty - - /* Find last node */ - Node *last = (*start)->prev; - - // Create Node dynamically - struct Node* new_node = new Node; - new_node->data = value; - - // Start is going to be next of new_node - new_node->next = *start; - - // Make new node previous of start - (*start)->prev = new_node; - - // Make last preivous of new node - new_node->prev = last; - - // Make new node next of old last - last->next = new_node; -} - -// Function to insert Node at the beginning -// of the List, -void insertBegin(struct Node** start, int value) -{ - // Pointer points to last Node - struct Node *last = (*start)->prev; - - struct Node* new_node = new Node; - new_node->data = value; // Inserting the data - - // setting up previous and next of new node - new_node->next = *start; - new_node->prev = last; - - // Update next and previous pointers of start - // and last. - last->next = (*start)->prev = new_node; - - // Update start pointer - *start = new_node; -} - -// Function to insert node with value as value1. -// The new node is inserted after the node with -// with value2 -void insertAfter(struct Node** start, int value1, - int value2) -{ - struct Node* new_node = new Node; - new_node->data = value1; // Inserting the data - - // Find node having value2 and next node of it - struct Node *temp = *start; - while (temp->data != value2) - temp = temp->next; - struct Node *next = temp->next; - - // insert new_node between temp and next. - temp->next = new_node; - new_node->prev = temp; - new_node->next = next; - next->prev = new_node; -} - - -void display(struct Node* start) -{ - struct Node *temp = start; - - printf("\nTraversal in forward direction \n"); - while (temp->next != start) - { - printf("%d ", temp->data); - temp = temp->next; - } - printf("%d ", temp->data); - - printf("\nTraversal in reverse direction \n"); - Node *last = start->prev; - temp = last; - while (temp->prev != last) - { - printf("%d ", temp->data); - temp = temp->prev; - } - printf("%d ", temp->data); -} - -/* Driver program to test above functions*/ -int main() -{ - /* Start with the empty list */ - struct Node* start = NULL; - - // Insert 5. So linked list becomes 5->NULL - insertEnd(&start, 5); - - // Insert 4 at the beginning. So linked - // list becomes 4->5 - insertBegin(&start, 4); - - // Insert 7 at the end. So linked list - // becomes 4->5->7 - insertEnd(&start, 7); - - // Insert 8 at the end. So linked list - // becomes 4->5->7->8 - insertEnd(&start, 8); - - // Insert 6, after 5. So linked list - // becomes 4->5->6->7->8 - insertAfter(&start, 6, 5); - - printf("Created circular doubly linked list is: "); - display(start); - - return 0; -} diff --git a/C++/dp-assemblylinescheduling.cpp b/C++/dp-assemblylinescheduling.cpp deleted file mode 100644 index 357f04d8f..000000000 --- a/C++/dp-assemblylinescheduling.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include -using namespace std; -int main(){ -int n; -cout<<"Give number of stations "; -cin>>n; - -int a[2][n]; -cout<<"Give ass1"<>a[0][i]; -} -cout<<"Give ass2"<>a[1][i]; -} - -int t[2][n]; -t[0][0]=0;t[1][0]=0; -cout<<"Give t1"<>t[0][i]; -} -cout<<"Give t2"<>t[1][i]; -} - -int e1,e2,x1,x2; -cout<<"Five e1,e2,x1,x2 :"; -cin>>e1>>e2>>x1>>x2; -int A[n],B[n]; - -A[0]=e1+a[0][0]; -B[0]=e2+a[1][0]; -int path1[n]; -int path2[n]; - -for(int i=1;i0;j--){ -if(pf==1) pf=path1[j]; -else pf=path2[j]; -cout<<"Part "<>t; - while(t--) - { - int left = 0, sum = 0; - int n; - cin>>n; - int arr[n]; - for(int i = 0; i < n; i++) - { - cin>>arr[i]; - sum += arr[i]; - } - int flag = 0; - for(int i = 0; i < n; i++) - { - sum -= arr[i]; - if(left == sum) - { - cout<1) - res=(res/n)*(n-1); - - return res; -} diff --git a/C++/evenfibonacci.cpp b/C++/evenfibonacci.cpp deleted file mode 100644 index 60cd097b1..000000000 --- a/C++/evenfibonacci.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//find the sum of the even-valued fibonacci terms upto 4 million. -#include -using namespace std; - -int main() { - // your code goes here - int sum=0, x=1, y=2; - - while(x<=4000000)// 4,000,000 . does not exceed---> <= - { - sum+= (x%2==0)?x:0; - int z= x+y; - x=y; - y=z; - } - - cout< -using namespace std; -int main() -{ - int n; - cout<<"Enter any number: "<>n; - cout<< (n&1?"Number is Odd":"Number is Even")< -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)< -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#define ll long long int -using namespace std; - - -int main() -{ - std::ios::sync_with_stdio(false); - cin.tie(NULL); - ll n,m; - cin>>n>>m; - cout< - -using bigint_t = unsigned long long int; - -void swapThem(bigint_t* a, bigint_t* b) -{ - bigint_t c = *b; - *b = *a; - *a = c; -} - -int main(void) -{ - bigint_t a = 1, b = 0; - unsigned int term = 0, current = 0; - std::cout << "Fibonacci term wanted (>= 1) :"; std::cin >> term; - - while (true) - { - a += b; - swapThem(&a, &b); - ++current; - - if (current == term) - { - std::cout << b; - break; - } - } - std::cout << std::endl; - - return 0; -} diff --git a/C++/fibonacci_recursion b/C++/fibonacci_recursion deleted file mode 100644 index 63a744994..000000000 --- a/C++/fibonacci_recursion +++ /dev/null @@ -1,26 +0,0 @@ -//find th nth term of fibonacci using recursion it is quite slow and consumes memory. -#nclude -using namespace std; -int fib(int n){ - if (n==0){ - return 0; - } - else if(n==1){ - return 1; - } - - return fib(n-1) + fib(n-2); - -} - -int main(){ - int b; - - - cout<<"Enter the number= "; - cin>>b; - - cout< - -using namespace std; - -// Complete the flippingMatrix function below. -int flippingMatrix(vector> matrix) { - int sum=0; - int n=matrix.size(); - for(int i=0;i> q; - cin.ignore(numeric_limits::max(), '\n'); - - for (int q_itr = 0; q_itr < q; q_itr++) { - int n; - cin >> n; - cin.ignore(numeric_limits::max(), '\n'); - - vector> matrix(2*n); - for (int i = 0; i < 2*n; i++) { - matrix[i].resize(2*n); - - for (int j = 0; j < 2*n; j++) { - cin >> matrix[i][j]; - } - - cin.ignore(numeric_limits::max(), '\n'); - } - - int result = flippingMatrix(matrix); - - fout << result << "\n"; - } - - fout.close(); - - return 0; -} diff --git a/C++/floyd.cpp b/C++/floyd.cpp deleted file mode 100644 index b45edbef9..000000000 --- a/C++/floyd.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - -using namespace std; - -int main() -{ - int n,k,l=-1,r; - cout<<"enter the value of rows:\n"; - cin>>n; - - cout<<"floyd triangle is:\n"; - for(int i=1;i<=n;i++) - { - for(int k =1;k<=i;k++) - { - cout< - -// Number of vertices in the graph -#define V 4 - -/* Define Infinite as a large enough value. This value will be used - for vertices not connected to each other */ -#define INF 99999 - -// A function to print the solution matrix -void printSolution(int dist[][V]); - -// Solves the all-pairs shortest path problem using Floyd Warshall algorithm -void floydWarshall (int graph[][V]) -{ - /* dist[][] will be the output matrix that will finally have the shortest - distances between every pair of vertices */ - int dist[V][V], i, j, k; - - /* Initialize the solution matrix same as input graph matrix. Or - we can say the initial values of shortest distances are based - on shortest paths considering no intermediate vertex. */ - for (i = 0; i < V; i++) - for (j = 0; j < V; j++) - dist[i][j] = graph[i][j]; - - /* Add all vertices one by one to the set of intermediate vertices. - ---> Before start of an iteration, we have shortest distances between all - pairs of vertices such that the shortest distances consider only the - vertices in set {0, 1, 2, .. k-1} as intermediate vertices. - ----> After the end of an iteration, vertex no. k is added to the set of - intermediate vertices and the set becomes {0, 1, 2, .. k} */ - for (k = 0; k < V; k++) - { - // Pick all vertices as source one by one - for (i = 0; i < V; i++) - { - // Pick all vertices as destination for the - // above picked source - for (j = 0; j < V; j++) - { - // If vertex k is on the shortest path from - // i to j, then update the value of dist[i][j] - if (dist[i][k] + dist[k][j] < dist[i][j]) - dist[i][j] = dist[i][k] + dist[k][j]; - } - } - } - - // Print the shortest distance matrix - printSolution(dist); -} - -/* A utility function to print solution */ -void printSolution(int dist[][V]) -{ - printf ("The following matrix shows the shortest distances" - " between every pair of vertices \n"); - for (int i = 0; i < V; i++) - { - for (int j = 0; j < V; j++) - { - if (dist[i][j] == INF) - printf("%7s", "INF"); - else - printf ("%7d", dist[i][j]); - } - printf("\n"); - } -} - -// driver program to test above function -int main() -{ - /* Let us create the following weighted graph - 10 - (0)------->(3) - | /|\ - 5 | | - | | 1 - \|/ | - (1)------->(2) - 3 */ - int graph[V][V] = { {0, 5, INF, 10}, - {INF, 0, 3, INF}, - {INF, INF, 0, 1}, - {INF, INF, INF, 0} - }; - - // Print the solution - floydWarshall(graph); - return 0; -} diff --git a/C++/floyd_algo.cpp b/C++/floyd_algo.cpp deleted file mode 100644 index adb720399..000000000 --- a/C++/floyd_algo.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include - -int n; -int g[101][101]; - -int main() { - puts("Enter graph size"); - scanf("%d", &n); - puts("Enter graph as adjacency matrix"); - for (int i = 1; i <= n; i++) - for (int j = 1; j <= n; j++) - scanf("%d", &g[i][j]); -} diff --git a/C++/format for coding b/C++/format for coding deleted file mode 100644 index 79034d601..000000000 --- a/C++/format for coding +++ /dev/null @@ -1,36 +0,0 @@ -#include - #include - #include - #include - #include - #include - #include - #define endl "\n" - #define ll long long int - #define vi vector - #define vll vector - #define vvi vector < vi > - #define pii pair - #define pll pair - #define mod 1000000007 - #define inf 1000000000000000001; - #define all(c) c.begin(),c.end() - #define mp(x,y) make_pair(x,y) - #define mem(a,val) memset(a,val,sizeof(a)) - #define eb emplace_back - #define f first - #define s second - - using namespace std; - int main() - { - std::ios::sync_with_stdio(false); - int T; - cin>>T; - // cin.ignore(); must be there when using getline(cin, s) - while(T--) - { - - } - return 0; - } diff --git a/C++/format for codjam b/C++/format for codjam deleted file mode 100644 index f360c6d05..000000000 --- a/C++/format for codjam +++ /dev/null @@ -1,42 +0,0 @@ - #include - #include - #include - #include - #include - #include - #include - #define endl "\n" - #define ll long long int - #define vi vector - #define vll vector - #define vvi vector < vi > - #define pii pair - #define pll pair - #define mod 1000000007 - #define inf 1000000000000000001; - #define all(c) c.begin(),c.end() - #define mp(x,y) make_pair(x,y) - #define mem(a,val) memset(a,val,sizeof(a)) - #define eb emplace_back - #define f first - #define s second - - using namespace std; - int main() - { - ifstream fin; - ofstream fout; - fin.open("input"); - fout.open("output"); - - int T; - fin>>T; - for(int t=1;t<=T;t++) - { - ll ans=0; - - cout<<"Case #"< - #define ll long long -#define pb push_back -#define fr(i,a,n) for(ll i=a;i>T; - while(T--){ - ll n,a,b,c,d,k,ans,p,m=1,t,z; - cin>>n>>m; - // ans=n/c +((n/c)/a)*b; - if(m -using namespace std; - -long long int calculate_gcd(long long int a,long long int b) -{ - if(b==0) - return a; - else - return calculate_gcd(b,a%b); -} - - -int main() -{ - long long int n1,n2; - cout<<"Enter the two numbers:"; - cin>>n1>>n2; - - cout< -using namespace std; -struct Edge{ - int source; - int destination; - Edge(int a, int b){ - source = a; - destination = b; - } -}; -struct Graph{ - vector vertices; - vector edges; -}; - -// Complexity of searching might be O(n) in worst case -int findSet(int parent[],int i){ - if(parent[i] == -1){ - return i; - } - return findSet(parent , parent[i]); -} - -void unionSets(int parent[], int a, int b){ - parent[a] = b; -} - -int isCycle(Graph g){ - int parent[100]; - int i,j,k,a,b; - for(i=0;i (v, v + sizeof(v)/sizeof(v[0])); - - g.edges.push_back(Edge(0,2)); - g.edges.push_back(Edge(1,4)); - g.edges.push_back(Edge(5,4)); - g.edges.push_back(Edge(1,0)); - g.edges.push_back(Edge(3,5)); - - if(isCycle(g)){ - cout<<"Cycle is there"; - } - else - cout<<"No Cycle"; - - -} \ No newline at end of file diff --git a/C++/graph_col.cpp b/C++/graph_col.cpp deleted file mode 100644 index a5b783c17..000000000 --- a/C++/graph_col.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include - -using namespace std; - - -int main() { - - int n, e; - - cout<<"Enter number of nodes and edges :"<<"\n"; - - cin>>n>>e; - - // graph[][] is adjacency matrix which is used to represent graph - int graph[n][n],color[n]; - - for(int i=0; i>n1>>n2; - // Set edges equal to 1 if edge between nodes n1 and n2 is present else 0 - graph[n1-1][n2-1]=graph[n2-1][n1-1]=1; - - } - // keeps track of colors of particular vertex - color[0]=1; // assign color 1 to vertex 0 - - //In this we loops check from vertex 1 to n and assigns the lowest possible color to them - for(int i=1; i - -void makePrimes(int *, int, int &); - -using namespace std; - -int main(){ - int primes[10000]; - int boundary, cnt, num = 0; - cin >> boundary; - makePrimes(primes, boundary, cnt); - for(int i = 0, j = cnt - 1 ; i <= j;){ - if(boundary / primes[i] >= primes[j]){ - num += j - i + 1; - i++; - }else - j--; - } - cout << num; -} - -void makePrimes(int * primes, int num, int& cnt){ - int i, j; - - primes[0] = 2; - primes[1] = 3; - - for(i = 5, cnt = 2; i < num; i += 2) - { - int flag = true; - for(j = 1; primes[j]*primes[j] <= i; ++j) - { - if(i%primes[j] == 0) - { - flag = false; break; - } - } - if(flag) primes[cnt++] = i; - } -} diff --git a/C++/halo-dunia.cpp b/C++/halo-dunia.cpp deleted file mode 100644 index cc7c36af4..000000000 --- a/C++/halo-dunia.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -using namespace std; -#define mp make_pair -#define pb push_back -#define pii pair -#define __FAST ios_base::sync_with_stdio(0); cin.tie(0); -typedef long long ll; -typedef unsigned long long ull; - -pair arah[8] = { {0,1} , {1,1} , {1,0} , {1,-1} , {0,-1} , {-1,-1} , {-1,0} , {-1,1} }; - -bool cmp (int i,int j) { return (i>j); } - -int main() -{ - ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0); - cout<<"Halo, dunia!"< - -// Number of vertices in the graph -#define V 5 - -void printSolution(int path[]); - -/* A utility function to check if the vertex v can be added at - index 'pos' in the Hamiltonian Cycle constructed so far (stored - in 'path[]') */ -bool isSafe(int v, bool graph[V][V], int path[], int pos) -{ - /* Check if this vertex is an adjacent vertex of the previously - added vertex. */ - if (graph [ path[pos-1] ][ v ] == 0) - return false; - - /* Check if the vertex has already been included. - This step can be optimized by creating an array of size V */ - for (int i = 0; i < pos; i++) - if (path[i] == v) - return false; - - return true; -} - -/* A recursive utility function to solve hamiltonian cycle problem */ -bool hamCycleUtil(bool graph[V][V], int path[], int pos) -{ - /* base case: If all vertices are included in Hamiltonian Cycle */ - if (pos == V) - { - // And if there is an edge from the last included vertex to the - // first vertex - if ( graph[ path[pos-1] ][ path[0] ] == 1 ) - return true; - else - return false; - } - - // Try different vertices as a next candidate in Hamiltonian Cycle. - // We don't try for 0 as we included 0 as starting point in in hamCycle() - for (int v = 1; v < V; v++) - { - /* Check if this vertex can be added to Hamiltonian Cycle */ - if (isSafe(v, graph, path, pos)) - { - path[pos] = v; - - /* recur to construct rest of the path */ - if (hamCycleUtil (graph, path, pos+1) == true) - return true; - - /* If adding vertex v doesn't lead to a solution, - then remove it */ - path[pos] = -1; - } - } - - /* If no vertex can be added to Hamiltonian Cycle constructed so far, - then return false */ - return false; -} - -/* This function solves the Hamiltonian Cycle problem using Backtracking. - It mainly uses hamCycleUtil() to solve the problem. It returns false - if there is no Hamiltonian Cycle possible, otherwise return true and - prints the path. Please note that there may be more than one solutions, - this function prints one of the feasible solutions. */ -bool hamCycle(bool graph[V][V]) -{ - int *path = new int[V]; - for (int i = 0; i < V; i++) - path[i] = -1; - - /* Let us put vertex 0 as the first vertex in the path. If there is - a Hamiltonian Cycle, then the path can be started from any point - of the cycle as the graph is undirected */ - path[0] = 0; - if ( hamCycleUtil(graph, path, 1) == false ) - { - printf("\nSolution does not exist"); - return false; - } - - printSolution(path); - return true; -} - -/* A utility function to print solution */ -void printSolution(int path[]) -{ - printf ("Solution Exists:" - " Following is one Hamiltonian Cycle \n"); - for (int i = 0; i < V; i++) - printf(" %d ", path[i]); - - // Let us print the first vertex again to show the complete cycle - printf(" %d ", path[0]); - printf("\n"); -} - -// driver program to test above function -int main() -{ - /* Let us create the following graph - (0)--(1)--(2) - | / \ | - | / \ | - | / \ | - (3)-------(4) */ - bool graph1[V][V] = {{0, 1, 0, 1, 0}, - {1, 0, 1, 1, 1}, - {0, 1, 0, 0, 1}, - {1, 1, 0, 0, 1}, - {0, 1, 1, 1, 0}, - }; - - // Print the solution - hamCycle(graph1); - - /* Let us create the following graph - (0)--(1)--(2) - | / \ | - | / \ | - | / \ | - (3) (4) */ - bool graph2[V][V] = {{0, 1, 0, 1, 0}, - {1, 0, 1, 1, 1}, - {0, 1, 0, 0, 1}, - {1, 1, 0, 0, 0}, - {0, 1, 1, 0, 0}, - }; - - // Print the solution - hamCycle(graph2); - - return 0; -} diff --git a/C++/hannoi.cpp b/C++/hannoi.cpp deleted file mode 100644 index bb3425a9b..000000000 --- a/C++/hannoi.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include -#define num 3 -#define a 'A' -#define b 'B' -#define c 'C' - -int cnt = 0; -using namespace std; - -void hannoi(int n, char src, char temp, char dest) -{ - if ( n==1 ) cout << "step" << ++cnt << ":" << src << "-->" << dest << endl; - else { - hannoi(n-1,src,dest,temp); - cout << "step" << ++cnt << ":" << src << "-->" << dest << endl; - hannoi(n-1,temp,src,dest); - } -} - -int main(int argc, char const *argv[]) -{ - hannoi(num,a,b,c); - return 0; -} \ No newline at end of file diff --git a/C++/hellaworld.cpp b/C++/hellaworld.cpp deleted file mode 100644 index ad9c1d8d1..000000000 --- a/C++/hellaworld.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -using namespace std; - -int main(){ - cout << "Hella World"; -} \ No newline at end of file diff --git a/C++/helllo1.cpp b/C++/helllo1.cpp deleted file mode 100644 index 136f74b96..000000000 --- a/C++/helllo1.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main(int argc, char const *argv[]) -{ - cout<<"hello"; - 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++/hello world india.cpp b/C++/hello world india.cpp deleted file mode 100644 index 409e6b538..000000000 --- a/C++/hello world india.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main() -{ -cout<<"HEllo WorLD"< -int main() { - std::cout << "Hello, World!"; - return 0; -} diff --git a/C++/hello-ankara.cpp b/C++/hello-ankara.cpp deleted file mode 100644 index 091f13bb4..000000000 --- a/C++/hello-ankara.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -using namespace std; - -int main() { - cout << "Hello Ankara!"; - return 0; -} diff --git a/C++/hello-hacktoberfest.cpp b/C++/hello-hacktoberfest.cpp deleted file mode 100644 index ee8e9062b..000000000 --- a/C++/hello-hacktoberfest.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int main() { - std::cout << "Hello hacktoberfest!\n"; -} \ No newline at end of file diff --git a/C++/hello-universe.cpp b/C++/hello-universe.cpp deleted file mode 100644 index 3c5ec14ca..000000000 --- a/C++/hello-universe.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -using namespace std; - -int main () -{ - cout << "Hello Universe!!! \n"; - - return 0; -} \ No newline at end of file diff --git a/C++/hello-world-2.cpp b/C++/hello-world-2.cpp deleted file mode 100644 index 20e7e2bd3..000000000 --- a/C++/hello-world-2.cpp +++ /dev/null @@ -1,6 +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 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-worls-rs.cpp b/C++/hello-worls-rs.cpp deleted file mode 100644 index 51f3384a0..000000000 --- a/C++/hello-worls-rs.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ -cout<<"HELLO WORLD\n"; -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++/hello1.cpp b/C++/hello1.cpp deleted file mode 100644 index 599978158..000000000 --- a/C++/hello1.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/hello3.cpp b/C++/hello3.cpp deleted file mode 100644 index 599978158..000000000 --- a/C++/hello3.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/hello4.cpp b/C++/hello4.cpp deleted file mode 100644 index 599978158..000000000 --- a/C++/hello4.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/hello5.cpp b/C++/hello5.cpp deleted file mode 100644 index 599978158..000000000 --- a/C++/hello5.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/hello6.cpp b/C++/hello6.cpp deleted file mode 100644 index a496794e2..000000000 --- a/C++/hello6.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -using namespace std; - -int main() -{ - cout<<"Hello World"; - return 0; -} diff --git a/C++/helloHacktoberfest.cpp b/C++/helloHacktoberfest.cpp deleted file mode 100644 index 8b6a89d15..000000000 --- a/C++/helloHacktoberfest.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; - -int main() { - cout << "Hello hacktoberfest!" - return 0; -} diff --git a/C++/helloHacktoberfest2018.cpp b/C++/helloHacktoberfest2018.cpp deleted file mode 100644 index 059ddf655..000000000 --- a/C++/helloHacktoberfest2018.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main() -{ - cout<<"Hello Hacktoberfest 2018 from Saint-Petersburg\n"; - return 0; -} diff --git a/C++/helloVishal.cpp b/C++/helloVishal.cpp deleted file mode 100644 index 83254d759..000000000 --- a/C++/helloVishal.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -using namespace std; -int main(){ - cout<<'HELLO VISHAL'< -using namespace std; - -int main() -{ - cout << "Hello, world!" << endl; - return 0; -} diff --git a/C++/helloWorldP.cpp b/C++/helloWorldP.cpp deleted file mode 100644 index 7baaf8d5f..000000000 --- a/C++/helloWorldP.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -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 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_abhishalya.cpp b/C++/hello_abhishalya.cpp deleted file mode 100644 index 8270b5a14..000000000 --- a/C++/hello_abhishalya.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; - -int main() { - cout << "Hello @abhishalya\n"; - return 0; -} \ No newline at end of file diff --git a/C++/hello_bkhanale.cpp b/C++/hello_bkhanale.cpp deleted file mode 100644 index 3c9aad133..000000000 --- a/C++/hello_bkhanale.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; - -int main() { - cout << "Hello @bkhanale\n"; - return 0; -} \ No newline at end of file diff --git a/C++/hello_evryone.cpp b/C++/hello_evryone.cpp deleted file mode 100644 index 31e63f5a7..000000000 --- a/C++/hello_evryone.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main() -{ - cout << "Hello Everyone and the World\n" ; - return 0; -} diff --git a/C++/hello_ikad95.cpp b/C++/hello_ikad95.cpp deleted file mode 100644 index dad9fd7d2..000000000 --- a/C++/hello_ikad95.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(){ - std::cout<<"Hello!\n"; - return 0; -} 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++/hello_world1.cpp b/C++/hello_world1.cpp deleted file mode 100644 index 1aba78ec6..000000000 --- a/C++/hello_world1.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// CPP program to run both if and else. -#include - -using namespace std; -int main() -{ - if (!(cout << "Hello ")) //this if part print - int a=1; //dummy if statement - else - cout << "World "; //this else part also print - - return 0; -} - - -/* output - Hello World - */ diff --git a/C++/hello_world_Jonathan-Montanez.cpp b/C++/hello_world_Jonathan-Montanez.cpp deleted file mode 100644 index c13664f52..000000000 --- a/C++/hello_world_Jonathan-Montanez.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -using namespace std; - -int main() { - - cout << "Hi, I am @Jonathan-Montanez" << endl; - - return 0; -} \ No newline at end of file diff --git a/C++/hello_world_gumeo.cpp b/C++/hello_world_gumeo.cpp deleted file mode 100644 index a3439833d..000000000 --- a/C++/hello_world_gumeo.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// This is a single line comment in C++ - -/* - This is a multi-line comment! - In order to print something in C++ we will use the iostream header -*/ -#include - -// We will use the namespace std, i.e. the standard library namespace -// to avoid needing to declare from which namespace these objects or functions come from. - -using namespace std; - -// Now we declare the main function, which is the entry-point for the operating system to the program -// Note that the return type of main is int, meaning that it returns an integer to the caller, where -// a return value of 0 means that everything went ok - -int main(){ - // We use cout from iostream to print to the standard output - // endl prints a newline for us - cout << "Hello World!" << endl; - return 0; -} diff --git a/C++/hello_world_in_cpp.cpp b/C++/hello_world_in_cpp.cpp deleted file mode 100644 index c29e8c58c..000000000 --- a/C++/hello_world_in_cpp.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -using namespace std; -int main() { - puts("Hello, World!"); -} diff --git a/C++/hello_world_nintyo.cpp b/C++/hello_world_nintyo.cpp deleted file mode 100644 index 0fbe70171..000000000 --- a/C++/hello_world_nintyo.cpp +++ /dev/null @@ -1,9 +0,0 @@ -include -using namespace std; - -int main() { - cout <<"Hello, world!" << endl; - return 0; -} - -system("PAUSE") diff --git a/C++/hellolight.cpp b/C++/hellolight.cpp deleted file mode 100644 index 719d0dc79..000000000 --- a/C++/hellolight.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -using namespace std; -int main(){ - cout << "Hello HACKTOBERFEST!" << endl; - return 0; -} diff --git a/C++/helloo.cpp b/C++/helloo.cpp deleted file mode 100644 index 36ecf2a1b..000000000 --- a/C++/helloo.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - print("Hello world!"); - return 0; -} diff --git a/C++/hellooo.cpp b/C++/hellooo.cpp deleted file mode 100644 index 9c14d55a0..000000000 --- a/C++/hellooo.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -#include -void main() -{ -cout<<"Hello world"; -getch(); -} diff --git a/C++/hellooooo.cpp b/C++/hellooooo.cpp deleted file mode 100644 index 9c14d55a0..000000000 --- a/C++/hellooooo.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -#include -void main() -{ -cout<<"Hello world"; -getch(); -} diff --git a/C++/hellospooktober.cpp b/C++/hellospooktober.cpp deleted file mode 100644 index 90cb46cc3..000000000 --- a/C++/hellospooktober.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -using namespace std; - -int main() -{ - cout << "Hello world!" << endl; - cout << "and a smiley face too :)"; - return 0; -} diff --git a/C++/helloword_id.cpp b/C++/helloword_id.cpp deleted file mode 100644 index 423aa6612..000000000 --- a/C++/helloword_id.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -using namespace std; - -int main(){ - cout << "Hello Dunia!" << endl; - return 0; -} \ No newline at end of file diff --git a/C++/helloword_in_id.cpp b/C++/helloword_in_id.cpp deleted file mode 100644 index 423aa6612..000000000 --- a/C++/helloword_in_id.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -using namespace std; - -int main(){ - cout << "Hello Dunia!" << endl; - 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< -using namespace std; -int main() -{ - cout << "Hello World !" << endl; - return 0; -} diff --git a/C++/helloworld_2018.cpp b/C++/helloworld_2018.cpp deleted file mode 100644 index 599978158..000000000 --- a/C++/helloworld_2018.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/helloworld_basic.cpp b/C++/helloworld_basic.cpp deleted file mode 100644 index 42a203be4..000000000 --- a/C++/helloworld_basic.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -using namespace std; - -int main() { - printf("Hello, World!, This is the most basic code"); - return 0; -} \ No newline at end of file diff --git a/C++/helloworld_c++.cpp b/C++/helloworld_c++.cpp deleted file mode 100644 index 393bcb2ba..000000000 --- a/C++/helloworld_c++.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/helloworld_new.cpp b/C++/helloworld_new.cpp deleted file mode 100644 index c1ae211f5..000000000 --- a/C++/helloworld_new.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -using namespace std; - -int main(){ - cout<<"hello this is the new line "< - -int main() -{ - std::cout << "Hello World - Hacktoberfest!" << std::endl; - - std::cin.get(); - return 0; -} \ No newline at end of file diff --git a/C++/helloworldd.cpp b/C++/helloworldd.cpp deleted file mode 100644 index 9148c17a3..000000000 --- a/C++/helloworldd.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -void main() -{ -cout<<"hello world"; -} diff --git a/C++/helloworldinc.cpp b/C++/helloworldinc.cpp deleted file mode 100644 index 48a4b1e5b..000000000 --- a/C++/helloworldinc.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main() -{ -cout<<"Hello, World"; -return 0; -} diff --git a/C++/hellowworld2.cpp b/C++/hellowworld2.cpp deleted file mode 100644 index 1b2c73a98..000000000 --- a/C++/hellowworld2.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -usingnamespace std; -int main() -{ -cout<<"hello world"; -return(0); -} diff --git a/C++/helooo.cpp b/C++/helooo.cpp deleted file mode 100644 index 599978158..000000000 --- a/C++/helooo.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, World!"; - return 0; -} diff --git a/C++/horses.cpp b/C++/horses.cpp deleted file mode 100644 index ec2e86eea..000000000 --- a/C++/horses.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// Problem https://www.codechef.com/problems/HORSES - - -#include -using namespace std; - -int main(){ - int t; - cin >> t; - while(t--){ - int n; - cin >> n; - - vectorv; - - for(int i=0;i> x; - v.push_back(x); - } - - sort(v.begin(),v.end()); - - int ans = INT_MAX; - for(int i=1;i -using namespace std; - -int main() -{ - cout << "Hello, world!" << endl; - return 0; -} diff --git a/C++/hw1.cpp b/C++/hw1.cpp deleted file mode 100644 index 6da3b1b04..000000000 --- a/C++/hw1.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main() -{ - cout << "Hello, world!" << endl; - return 0; -} diff --git a/C++/hw2mfnns.cpp b/C++/hw2mfnns.cpp deleted file mode 100644 index 8b1aa792b..000000000 --- a/C++/hw2mfnns.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -using namespace std; - -int main(){ - - cout<<"Hello world!"; - -} diff --git a/C++/implement_kadane.cpp b/C++/implement_kadane.cpp deleted file mode 100644 index c9c9fc0ee..000000000 --- a/C++/implement_kadane.cpp +++ /dev/null @@ -1,32 +0,0 @@ -using namespace std; -int main() - { - int t; - cin>>t; - while(t--) - { - int n; - cin>>n; - int arr[n]; - for(int i = 0; i < n; i++) - { - cin>>arr[i]; - } - int max = INT_MIN; - int max2 = 0; - for(int i = 0; i < n; i++) - { - max2 = max2 + arr[i]; - if(max < max2) - { - max = max2; - } - if(max2 < 0) - { - max2 = 0; - } - } - cout< -using namespace std; - -struct node -{ - int data; - node* left; - node* right; - -}; - -node* newNode(int data) -{ - node* newnode = new node; - - newnode->data = data; - newnode->left = NULL; - newnode->right = NULL; - - return(newnode); -} - -// sample inorder tree -// 25 -// / \ -// 15 35 -// / \ / -// 10 20 30 - -void inorder(node* root) -{ - if(root) - { - inorder(root->left); - printf("%d\n",root->data ); - inorder(root->right); - } -} - -node* inorderRoot() -{ - node* root = newNode(25); - root->left = newNode(15); - root->right = newNode(35); - root->left->left = newNode(10); - root->left->right = newNode(20); - root->right->left = newNode(30); - return root; -} - -int main() -{ - inorder(inorderRoot()); - cout<<"########"<<'\n'; - return 0; -} diff --git a/C++/insertion.cpp b/C++/insertion.cpp deleted file mode 100644 index c2fc9801b..000000000 --- a/C++/insertion.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -void main() -{ - clrscr(); - int n,i,k,ele,a[20],pos; - cout<<"Enter no. of elements\n"; - cin>>n; - cout<<"Enter the elements\n"; - for(i=0;i>a[i]; - cout<<"Enter the element to be inserted\n"; - cin>>ele; - if(elea[n-1]) - pos=n; - else - for(i=0;ia[i])&&(elepos;) - { - a[i]=a[i-1]; - a[i]=ele; - break; - }n++; - cout<<"New array is:\n"; - for(k=0;k -using namespace std; - -int main(){ - int a[10]; - cout<<"Enter 10 Numbers to Sort:"; - for(int i=0; i<10; i++) cin>>a[i]; - - for(int i=1; i<10; i++){ - for(int j=i; j>0; j--){ - if(a[j] -using namespace std; -int main() { - int64_t t,n,a,b; - cin >> t; - while(t--) { - cin >> a >> b >> n; - int i = 0; - while(a <= b) { - int64_t mid = (a+b)/2; - cout << mid << "\n"; - fflush(stdout); - string s; - cin >> s; - if(s == "CORRECT") { - break; - } else if(s == "TOO_SMALL") { - a = mid+1; - } else if(s == "TOO_BIG") { - b = mid-1; - } else { - break; - } - } - } -} diff --git a/C++/islands.cpp b/C++/islands.cpp deleted file mode 100644 index 00a2eeff2..000000000 --- a/C++/islands.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include - -using namespace std; - -int graph[10][10]; -bool visited[10][10]; -int n; - -int dfs(int x,int y){ - - if(x<1 || x>n || y<1 || y>n ) - return 0; - - - if(visited[x][y] || !graph[x][y]) - return 0; - - visited[x][y] = true; - - - if(!visited[x-1][y-1] && graph[x-1][y-1]==1) - dfs(x-1,y-1); - - - if(!visited[x-1][y] && graph[x-1][y]==1) - dfs(x-1,y); - - - if(!visited[x][y-1] && graph[x][y-1]==1) - dfs(x,y-1); - - - if(!visited[x+1][y+1] && graph[x+1][y+1]==1) - dfs(x+1,y+1); - - - - if(!visited[x+1][y] && graph[x+1][y]==1) - dfs(x+1,y); - - - if(!visited[x-1][y+1] && graph[x-1][y+1]==1) - dfs(x-1,y+1); - - - if(!visited[x+1][y-1] && graph[x+1][y-1]==1) - dfs(x+1,y-1); - - - if(!visited[x][y+1] && graph[x][y+1]==1) - dfs(x,y+1); - -} - -int main(){ - - cin>>n; - for(int i=1;i<=n;i++) - for(int j=1;j<=n;j++) - cin>>graph[i][j]; - int count=0; - - for(int i=1;i<=n;i++) - for(int j=1;j<=n;j++) - if(!visited[i][j]&&graph[i][j]){ - dfs(i,j); - count++; - } - cout<>t; - while(t--) - { - int k,n; - cin>>k>>n; - int temp,i=1; - multiset st; - multiset :: reverse_iterator it; - while(n--) - { - if(i>temp; - st.insert(temp); - cout<<-1<<" "; - i++; - } - else - { - cin>>temp; - st.insert(temp); - it=st.rbegin(); - int j=1; - while(j -using namespace std; - -int main() -{ - int year; - - cout << "Enter a year: "; - cin >> year; - - if (year % 4 == 0) - { - if (year % 100 == 0) - { - if (year % 400 == 0) - cout << year << " is a leap year."; - else - cout << year << " is not a leap year."; - } - else - cout << year << " is a leap year."; - } - else - cout << year << " is not a leap year."; - - return 0; -} diff --git a/C++/level-order-traversal.cpp b/C++/level-order-traversal.cpp deleted file mode 100644 index 289423396..000000000 --- a/C++/level-order-traversal.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include -#include - -using namespace std; - -class BstNode { - public: - int data; - BstNode *left; - BstNode *right; - BstNode(int d) { - data = d; - left = NULL; - right = NULL; - } -}; - - -class Tree { - BstNode *root; - public: - Tree() { - root = NULL; - } - void insert(int d) { - BstNode *newNode = new BstNode(d); - //cout<data< temp->data) { - if(temp->right != NULL) - temp = temp->right; - else { - temp->right = newNode; - flag = 0; - } - } - else if(d < temp->data) { - if(temp->left != NULL) - temp = temp->left; - else { - temp->left = newNode; - flag = 0; - } - } - else - flag = 0; - } - } - - void levelTraversal() { - cout<<"Level Traversing"< lvl; - lvl.push(root); - while(!lvl.empty()) { - BstNode *temp = lvl.front(); - lvl.pop(); - if(temp->left != NULL) - lvl.push(temp->left); - if(temp->right != NULL) - lvl.push(temp->right); - cout<data< -#include - -using namespace std; - -int main(void) -{ - char var[] = { 'x', 'y', 'z', 'w' }; - cout << "Enter the number of variables in the equations: "; - - int n; - cin >> n; - cout << "\nEnter the coefficients of each variable for each equations"; - cout << "\nax + by + cz + ... = d"; - int mat[n][n]; - int constants[n][1]; - for (int i = 0; i < n; i++) - { - for (int j = 0; j < n; j++) - { - cin >> mat[i][j]; - } - cin >> constants[i][0]; - } - - cout << "Matrix representation is: "; - for (int i = 0; i < n; i++) - { - for (int j = 0; j < n; j++) - { - cout << " " << mat[i][j]; - } - cout << " " << var[i]; - cout << " = " << constants[i][0]; - cout << "\n"; - } - return 0; -} diff --git a/C++/linear_search.cpp b/C++/linear_search.cpp deleted file mode 100644 index 4ff482649..000000000 --- a/C++/linear_search.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -using namespace std; - -int linear_search(int A, int n, int s) -{ - int i=0; - while(i>N; - i=0; - while(i>A[i]; - i++; - } - cin>>s; - pos=linear_search(A,n,s); - if(pos==-1) - cout<<"Element not present in the array"; - else - cout<<"Element present at position "< -#include -#include -#include -#include - -void main() -{ - clrscr(); - char a[10]; - cin>>a; - int n=strlen(a); - - for(i=0;i<4;i++) - { - clrscr(); - gotoxy(35,12); - for(j=0;j -using namespace std; - - - -int findMax(int arr[], int length) { - int max = 0; - for (int i = 0; i < length; i++) { - if (max < arr[i]) { - max = arr[i]; - } - } - return max; -} - -int findLongestIncSubLength(int arr[],int length) { - int dp[length]; - int i, j, max = 0; - - // Initialize Longest Increasing Subsequence values - for (i = 0; i < length; i++) { - dp[i] = 1; - } - - for (i = 1; i < length; i++) { - for (j = 0; j < i; j++) { - if (arr[i] > arr[j] && dp[i] < dp[j] + 1) { - dp[i] = dp[j] + 1; - } - } - } - max = findMax(dp, length); - return max; -} - -int main() { - int arr[] = { 1, 4, 2, 10, 8 }; - int lisLength = findLongestIncSubLength(arr,5); - cout << "Longest Increasing Subsequence Length is : " << lisLength << endl; - -} diff --git a/C++/loop_in_linked_list.cpp b/C++/loop_in_linked_list.cpp deleted file mode 100644 index 2ab70a802..000000000 --- a/C++/loop_in_linked_list.cpp +++ /dev/null @@ -1,62 +0,0 @@ - -// C program to detect loop in a linked list -#include -#include - -/* Link list node */ -struct Node -{ - int data; - struct Node* next; -}; - -void push(struct Node** head_ref, int new_data) -{ - /* allocate node */ - struct Node* new_node = - (struct Node*) malloc(sizeof(struct Node)); - - /* put in the data */ - new_node->data = new_data; - - /* link the old list off the new node */ - new_node->next = (*head_ref); - - /* move the head to point to the new node */ - (*head_ref) = new_node; -} - -int detectloop(struct Node *list) -{ - struct Node *slow_p = list, *fast_p = list; - - while (slow_p && fast_p && fast_p->next ) - { - slow_p = slow_p->next; - fast_p = fast_p->next->next; - if (slow_p == fast_p) - { - printf("Found Loop"); - return 1; - } - } - return 0; -} - -/* Drier program to test above function*/ -int main() -{ - /* Start with the empty list */ - struct Node* head = NULL; - - push(&head, 20); - push(&head, 4); - push(&head, 15); - push(&head, 10); - - /* Create a loop for testing */ - head->next->next->next->next = head; - detectloop(head); - - return 0; -} \ No newline at end of file diff --git a/C++/lucas_thorem.cpp b/C++/lucas_thorem.cpp deleted file mode 100644 index f020c4227..000000000 --- a/C++/lucas_thorem.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include -using namespace std; - -/ -int nCrModpDP(int n, int r, int p) -{ - int C[r+1]; - memset(C, 0, sizeof(C)); - - C[0] = 1; // Top row of Pascal Triangle - - for (int i = 1; i <= n; i++) - { - - for (int j = min(i, r); j > 0; j--) - - // nCj = (n-1)Cj + (n-1)C(j-1); - C[j] = (C[j] + C[j-1])%p; - } - return C[r]; -} - - -int nCrModpLucas(int n, int r, int p) -{ - // Base case - if (r==0) - return 1; - - // Compute last digits of n and r in base p - int ni = n%p, ri = r%p; - - - return (nCrModpLucas(n/p, r/p, p) * // Last digits of n and r - nCrModpDP(ni, ri, p)) % p; // Remaining digits -} - -// Driver program -int main() -{ - int n = 1000, r = 900, p = 13; - cout << "Value of nCr % p is " << nCrModpLucas(n, r, p); - return 0; -} diff --git a/C++/main.cpp b/C++/main.cpp deleted file mode 100644 index e18509344..000000000 --- a/C++/main.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// -// main.cpp -// helloWorld -// -// Created by João Laranjo on 13/10/18. -// Copyright © 2018 João Laranjo. All rights reserved. -// - -#include - -using namespace std; - -int main(int argc, const char * argv[]) { - - cout << "Hello World!" << endl; - - string name = "Hello World!"; - int i = 0; - - while (i != name.size()){ - cout << name[i] << endl; - i++; - } - return 0; -} diff --git a/C++/makeStringLowercase.cpp b/C++/makeStringLowercase.cpp deleted file mode 100644 index f2ea4d409..000000000 --- a/C++/makeStringLowercase.cpp +++ /dev/null @@ -1,15 +0,0 @@ -using namespace std; -int main() { -string makeLowerCase(string str) { - string lowercase = ""; - for (int i = 0; i < str.length(); i++) { - if (str[i] <= 90 && str[i] >= 65) { - lowercase += str[i] + 32; - } - else { - lowercase += str[i]; - } - } - return lowercase; - } -} diff --git a/C++/manav.cpp b/C++/manav.cpp deleted file mode 100644 index 8ff04403b..000000000 --- a/C++/manav.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -using namespace std; - -void main () { - -cout << "Hello World" ; - -} diff --git a/C++/matrix.h b/C++/matrix.h deleted file mode 100644 index 51d3c9f3c..000000000 --- a/C++/matrix.h +++ /dev/null @@ -1,104 +0,0 @@ -#include -using namespace std; - -template -class matrix { - private : - int n , m ; - T **values ; - public : - - matrix() { - n = 0 ; - m = 0 ; - values = 0 ; - } - - matrix(int rows , int columns) { - n = rows ; - m = columns ; - values = new T*[n] ; - for(int i = 0 ; i < n ; i++) - values[i] = new T[m] ; - for(int i = 0 ; i < n ; i++) - for(int j = 0 ; j < m ; j++) - values[i][j] = 0 ; - } - - void scan() { - for(int i = 0; i < n; i++) { - for(int j = 0; j < m; j++) { - cin >> values[i][j]; - } - } - } - - void print() { - for(int i = 0; i < n; i++) { - for(int j = 0; j < m; j++) { - cout << values[i][j] << " "; - } - cout << "\n"; - } - } - - matrix(matrix const& mat) { - n = mat.n ; - m = mat.m ; - values = new T*[n] ; - for(int i = 0 ; i < n ; i++) - values[i] = new T[m] ; - for(int i = 0 ; i < n ; i++) - for(int j = 0 ; j < m ; j++) - values[i][j] = mat.values[i][j] ; - } - - ~matrix() { - if(values != 0) { - for(int i = 0 ; i < n ; i++) - delete[] values[i] ; - delete[] values ; - } - } - - matrix const operator+(matrix const& mat) { - matrix result(n , m) ; - for(int i = 0 ; i < n ; i++) - for(int j = 0 ; j < m ; j++) - result.values[i][j] = values[i][j] + mat.values[i][j] ; - return result ; - } - - matrix const operator*(matrix const& mat) { - matrix result(n , mat.m) ; - for(int i = 0 ; i < n ; i++) { - for(int j = 0 ; j < mat.m ; j++) { - result.values[i][j] = 0; - for(int k = 0 ; k < m ; k++) { - result.values[i][j] = result.values[i][j] + values[i][k] * mat.values[k][j] ; - } - } - } - return result ; - } - - void operator=(matrix const& mat) { - if(values != 0) { - for(int i = 0 ; i < n ; i++) - delete[] values[i] ; - delete[] values ; - } - n = mat.n ; - m = mat.m ; - values = new T*[n] ; - for(int i = 0 ; i < n ; i++) - values[i] = new T[m] ; - for(int i = 0 ; i < n ; i++) - for(int j = 0 ; j < m ; j++) - values[i][j] = mat.values[i][j] ; - } - - T& operator()(int i , int j) { - return values[i][j] ; - } -}; diff --git a/C++/max flow.cpp b/C++/max flow.cpp deleted file mode 100644 index d754bb462..000000000 --- a/C++/max flow.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include -using namespace std; -#define n 6 -int g[6][6]={{0, 9, 9, 0, 0, 0}, - {0, 0, 4, 8, 0, 0}, - {0, 0, 0, 1, 3, 0}, - {0, 0, 0, 0, 0, 10}, - {0, 0, 0, 8, 0, 7}, - {0, 0, 0, 0, 0, 0}}; - - - -int bfs(int v,int *parent) -{int visited[6]={0}; - visited[v]=1; - int q[8]; - int i,f=0,r=-1; - q[++r]=v; - - while(f<=r) - {v=q[f++]; - for(i=0;i -#include -#include - -using std::vector; -using std::cin; -using std::cout; -using std::max; - -int MaxPairwiseProduct(const vector& numbers) { - int product = 0; - int n = numbers.size(); - for (int i = 0; i < n; ++i) { - for (int j = i + 1; j < n; ++j) { - product = max(product, numbers[i] * numbers[j]); - } - } - return product; -} - -int main() { - int n; - cin >> n; - vector numbers(n); - for (int i = 0; i < n; ++i) { - cin >> numbers[i]; - } - int product = MaxPairwiseProduct(numbers); - cout << product << "\n"; - return 0; -} \ No newline at end of file diff --git a/C++/merge_sort(top-down-recursvive).cpp b/C++/merge_sort(top-down-recursvive).cpp deleted file mode 100644 index e13d42114..000000000 --- a/C++/merge_sort(top-down-recursvive).cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include -using namespace std; -void copies(vector &v,vector&temp,int low,int high) -{ - for(int i=low;i<=high;i++) - v[i]=temp[i]; -} -void merges(vector &v,vector&temp,int low1,int high1,int low2,int high2) -{ - int i=low1; - int j=low2; - int k=low1; - while(i<=high1 && j<=high2) - { - if(v[i]<=v[j]) - temp[k++]=v[i++]; - else - temp[k++]=v[j++]; - } - while(i<=high1) - temp[k++]=v[i++]; - - while(j<=high2) - temp[k++]=v[j++]; - -} -void merge_sort(vector &v,int low,int high) -{ - int mid; - vector temp(v.size()); - if(low v; - - cout<<"Enter the no of elements: "; - int n; - cin>>n; - - for(int i=0;i>x; - v.push_back(x); - } - // input ends and sorting begins. - merge_sort(v,0,n-1); - - // sorting ends:) ...and printing begins. - - for(int i=0;i -using namespace std; -#define N 10 - -void merge(int A[], int init, int middle, int end){ - int n1 = middle - init + 1; - int n2 = end - middle; - - int L[n1], R[n2]; - - for(int x = 0; x < n1; x++){ - L[x] = A[init + x]; - } - for(int y = 0; y < n2; y++){ - R[y] = A[middle + y + 1]; - } - - int x = 0, y = 0, k = init; - while(x < n1 && y < n2){ - if(L[x] <= R[y]){ - A[k] = L[x]; - x++; - }else{ - A[k] = R[y]; - y++; - } - k++; - } - while(x < n1){ - A[k] = L[x]; - x++; - k++; - } - while(y < n2){ - A[k] = R[y]; - y++; - k++; - } -} - -void mergesort(int A[], int init, int end){ - if(init < end){ - int middle = (end + init) / 2; - mergesort(A, init, middle); - mergesort(A, middle + 1, end); - merge(A, init, middle, end); - } -} - -int main(){ - int A[N]; - for(int x = 0; x < N; x++){ - cin >> A[x]; - } - mergesort(A, 0, N - 1); - for(int x = 0; x < N; x++){ - cout << A[x] << " "; - } -} diff --git a/C++/mergesortques.cpp b/C++/mergesortques.cpp deleted file mode 100644 index 6b6a3128b..000000000 --- a/C++/mergesortques.cpp +++ /dev/null @@ -1,109 +0,0 @@ -#include -#include -#include - -using namespace std; - -// A function to merge the two half into a sorted data. -void Merge(int *a, int low, int high, int mid) -{ - // We have low to mid and mid+1 to high already sorted. - int i, j, k, temp[high-low+1]; - i = low; - k = 0; - j = mid + 1; - - // Merge the two parts into temp[]. - while (i <= mid && j <= high) - { - if (a[i] < a[j]) - { - temp[k] = a[i]; - k++; - i++; - } - else - { - temp[k] = a[j]; - k++; - j++; - } - } - - // Insert all the remaining values from i to mid into temp[]. - while (i <= mid) - { - temp[k] = a[i]; - k++; - i++; - } - - // Insert all the remaining values from j to high into temp[]. - while (j <= high) - { - temp[k] = a[j]; - k++; - j++; - } - - - // Assign sorted data stored in temp[] to a[]. - for (i = low; i <= high; i++) - { - a[i] = temp[i-low]; - } -} - -// A function to split array into two parts. -void MergeSort(int *a, int low, int high) -{ - int mid; - if (low < high) - { - mid=(low+high)/2; - // Split the data into two half. - MergeSort(a, low, mid); - MergeSort(a, mid+1, high); - - // Merge them to get sorted output. - Merge(a, low, high, mid); - } -} - - - - -using namespace std; -int main(int argc,char *argv[]) -{ - string str; - - str=argv[2]; - int s = atoi(argv[1]); - int n=(str.length()); - //int arr[n]; - - int c[n]; - int a=0,b=0,j=0; - for(int i=0;i -using namespace std; - -// Returns the optimal value a maximizer can obtain. -// depth is current depth in game tree. -// nodeIndex is index of current node in scores[]. -// isMax is true if current move is -// of maximizer, else false -// scores[] stores leaves of Game tree. -// h is maximum height of Game tree -int minimax(int depth, int nodeIndex, bool isMax, - int scores[], int h) -{ - // Terminating condition. i.e - // leaf node is reached - if (depth == h) - return scores[nodeIndex]; - - // If current move is maximizer, - // find the maximum attainable - // value - if (isMax) - return max(minimax(depth+1, nodeIndex*2, false, scores, h), - minimax(depth+1, nodeIndex*2 + 1, false, scores, h)); - - // Else (If current move is Minimizer), find the minimum - // attainable value - else - return min(minimax(depth+1, nodeIndex*2, true, scores, h), - minimax(depth+1, nodeIndex*2 + 1, true, scores, h)); -} - -// A utility function to find Log n in base 2 -int log2(int n) -{ - return (n==1)? 0 : 1 + log2(n/2); -} - -// Driver code -int main() -{ - // The number of elements in scores must be - // a power -of 2. - int scores[] = {3, 5, 2, 9, 12, 5, 23, 23}; - int n = sizeof(scores)/sizeof(scores[0]); - int h = log2(n); - int res = minimax(0, 0, true, scores, h); - cout << "The optimal value is : " << res << endl; - return 0; -} - diff --git a/C++/minmaxques.cpp b/C++/minmaxques.cpp deleted file mode 100644 index d9acd065e..000000000 --- a/C++/minmaxques.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include -#include -#include -using namespace std; -int main(int argc,char *argv[]) -{ - string str; - int k=0; - str=argv[1]; - int n=(str.length()); - int arr[n]; - int newarr[n]; - for(int i=0;i=0 ) - newarr[j]=(newarr[j]*10)+arr[i]; - } - else - { - j++; - } - i++; - } - - int max=0; - int min=0; - - max=newarr[0]; - min=newarr[0]; - //for(int i=0;n<'\0';i++); - //int len=i; - for (int i=0;imax) - max=newarr[i]; - if(newarr[i] -#include - -using namespace std; - -class BstNode { - public: - int data; - BstNode *left; - BstNode *right; - BstNode(int d) { - data = d; - left = NULL; - right = NULL; - } -}; - - -class Tree { - public: - BstNode *root; - Tree() { - root = NULL; - } - void insert(int d) { - BstNode *newNode = new BstNode(d); - //cout<data< temp->data) { - if(temp->right != NULL) - temp = temp->right; - else { - temp->right = newNode; - flag = 0; - } - } - else if(d < temp->data) { - if(temp->left != NULL) - temp = temp->left; - else { - temp->left = newNode; - flag = 0; - } - } - else - flag = 0; - } - } - - void levelTraversal() { - cout<<"Level Traversing"< lvl; - lvl.push(root); - while(!lvl.empty()) { - BstNode *temp = lvl.front(); - lvl.pop(); - if(temp->left != NULL) - lvl.push(temp->left); - if(temp->right != NULL) - lvl.push(temp->right); - cout<data<left; - root->left = root->right; - root->right = temp; -} - -void mirrorTree(BstNode *root) { - queue s; - s.push(root); - while(!s.empty()) { - BstNode *temp = s.front(); - s.pop(); - swap(temp); - if(temp->left != NULL) - s.push(temp->left); - if(temp->right != NULL) - s.push(temp->right); - } -} - -int main() { - Tree t; - t.insert(9); - t.insert(12); - t.insert(7); - t.insert(13); - t.insert(11); - t.insert(5); - t.insert(4); - - t.levelTraversal(); - mirrorTree(t.root); - t.levelTraversal(); - return 0; -} \ No newline at end of file diff --git a/C++/modular-exponentiation.cpp b/C++/modular-exponentiation.cpp deleted file mode 100644 index 7212779a2..000000000 --- a/C++/modular-exponentiation.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include - -///(a*b)%m = [(a%m)*(b*m)]%m - -using namespace std; - -long long modularExp(int a,long b,int m){ - - if(b==0)return 1; - - if(b%2==0) //even power - { - long long y = modularExp(a,b/2,m); - return (y*y)%m; - } - //else odd - return ((a%m)*modularExp(a,b-1,m))%m; - -} - -int main() -{ - - int t; - cin>>t; - while(t-- > 0){ - - int a; - long long b; - cin>>a>>b; - - long long ans = modularExp(a,b,10); - cout< -#include -using namespace std; - -int main() -{ - int a[4][4]={{1,2,3,4}, - {9,45,75,94}, - {25,107,55,71}, - {66,20,10,3}}; - int b[4][2]={{1,15}, - {5,8}, - {8,25}, - {55,11}}; - int c[4][2]={{}}; - - for(int i=0;i<4;i++) - for(int j=0;j<2;j++) - for(int k=0;k<4;k++) - c[i][j]+=a[i][k]*b[k][j]; - - for(int i=0;i<4;i++) - { - for(int j=0;j<2;j++) - cout< -#include -#include -#include -#include -using namespace std; -int main() -{ -long N,num,p,q,r=0; -cin>>N; - -for(int i=0;i>num; - p=(num-1)/3; - q=(num-1)/5; - r=(num-1)/15; - - cout << 3*(p*(p+1)/2)+5*(q*(q+1)/2)-15*(r*(r+1)/2)< -using namespace std; - -int main(){ - cout << "Hello world! =D" << endl; -} diff --git a/C++/my_hello_world.cpp b/C++/my_hello_world.cpp deleted file mode 100644 index 2344771b7..000000000 --- a/C++/my_hello_world.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; - -int main() { - printf("Hello, World."); - return 0; -} diff --git a/C++/nfactorial.cpp b/C++/nfactorial.cpp deleted file mode 100644 index cf28201bf..000000000 --- a/C++/nfactorial.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -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)< -using namespace std; - -int main() { - cout << "ni hao" << endl; - return 0; -} \ No newline at end of file diff --git a/C++/nqueens.cpp b/C++/nqueens.cpp deleted file mode 100644 index 27a52ab3b..000000000 --- a/C++/nqueens.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include -#include -#include -#define BOARD_SIZE 9 - -// rows[i] shows either -1 if empty or colum number of placed queen -int rows[BOARD_SIZE]; -// cols[i] shows either -1 if ith colum has no queens or 1 if there is a queen -int cols[BOARD_SIZE]; - -// check positions by order of increasing colum -bool check_forwards(int row, int col){ - int tmp_row = row; int tmp_col = col; - while((row < BOARD_SIZE) && (col < BOARD_SIZE)){ - if(rows[row] == col) - return true; - row++; - col++; - } - while((tmp_row >= 0) && (tmp_col < BOARD_SIZE)){ - if(rows[tmp_row] == tmp_col) - return true; - tmp_col++; - tmp_row--; - } - return false; -} -// check positions by order of decreasing colum -bool check_backwards(int row, int col){ - int tmp_row = row; int tmp_col = col; - while((row >= 0) && (col >= 0)){ - if(rows[row] == col) - return true; - row--; - col--; - } - while((tmp_row < BOARD_SIZE) && (tmp_col >= 0)){ - if(rows[tmp_row] == tmp_col) - return true; - tmp_col--; - tmp_row++; - } - return false; -} - -bool attacked(int row, int col){ - // check backwards - if(cols[col] != -1) return true; - if(rows[row] != -1) return true; - //std::cout< -using namespace std; - -int nthMagicNo(int n) -{ - int pow = 1, answer = 0; - - while (n) - { - pow = pow*5; - - if (n & 1) - answer += pow; - - n >>= 1; - } - return answer; -} - -int main() -{ - int n; - cin>>n; - cout << "nth magic number is " << nthMagicNo(n) << endl; - return 0; -} \ No newline at end of file diff --git a/C++/occurrence of a number.cpp b/C++/occurrence of a number.cpp deleted file mode 100644 index 0d3e94e16..000000000 --- a/C++/occurrence of a number.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include -using namespace std; - -int linearsearch(int a[],int x ) -{ int count =0; - for (int i=0 ;i<21;i++) - { - if (a[i]==x) - {count ++;} - - } - return count ; -} -int main() -{ int x; - int a[50]={1,2,3,3,4,5,5,5,5,5,6,6,6,7,7,9,9,9,9,9,9}; - cout<<"enter the element you want to check "<>x; - int y =linearsearch(a,x); - cout< -using namespace std; -int main(){ - int num; - cin >> num; - cout << ((num&1)?"Hello World":"World Hello") << endl; -} diff --git a/C++/operatoroverloading.cpp b/C++/operatoroverloading.cpp deleted file mode 100644 index 228f54e80..000000000 --- a/C++/operatoroverloading.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include -using namespace std; - -class Time { - private: - int hours; - int minutes; - - public: - Time() { - hours = 0; - minutes = 0; - } - Time(int h, int m) { - hours = h; - minutes = m; - } - void display() { - cout << "Hours: " << hours << "Minutes: " << minutes <= 60) { - ++hours; - minutes -= 60; - } - return Time(hours, minutes); - } -}; - -int main() { - Time T1(11, 59); - - --T1; - T1.display(); - --T1; - T1.display(); -} diff --git a/C++/pascal.cpp b/C++/pascal.cpp deleted file mode 100644 index 953bbac1b..000000000 --- a/C++/pascal.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include - -using namespace std; - -int main() -{ - int n,k; - int a[10][10]; - cin>>n; - for(int i=1;i<=n;i++) - { - for(int space=1;space<=n-i;space++) - { - cout<<" "; - - } - for(int j=1;j<=2*i-1;j++){ - if(j%2==0) { - cout<<" "; - } - else if(j==1 || j== 2*i-1) { - a[i][j]=1; - cout< - -using namespace std; -int main(){ - cout<< "Hello World!\n"; -} diff --git a/C++/peda.cpp b/C++/peda.cpp deleted file mode 100644 index e69f87040..000000000 --- a/C++/peda.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include -#include -#include - -using namespace std; - -class Persona -{ - private: - string nombre; - bool estaPeda = false; - bool estaIntoxicada = false; - - public: - void setNombre(string nombre) { this->nombre = nombre; } - void setEstaPeda(bool estaPeda) { this->estaPeda = estaPeda; } - void setEstaIntoxicada(bool estaIntoxicada) { this->estaIntoxicada = estaIntoxicada; } - string getNombre() { return this->nombre; } -}; - -class Peda : public Persona -{ - private: - bool alcohol; - bool cigarros; - bool comida; - vector personas; - bool alguienEstaPeda = false; - bool alguienSeIntoxico = false; - - public: - Peda(bool alcohol, bool cigarros, bool comida) - { - this->alcohol = alcohol; - this->cigarros = cigarros; - this->comida = comida; - - cout << "Se esta armando la peda.\n" << endl; - } - - void invitar(int invitaciones) - { - string nombre; - this->personas.resize(invitaciones); - - for(int i=0; i> nombre; - this->personas[i].setNombre(nombre); - } - - cout << endl; - } - - bool seArmo() { if(this->personas.size()>=20 and this->alcohol == true) { return true; } else { return false; } } - - void alcoholizar() - { - srand(time(NULL)); - for(int i=0; ipersonas.size(); i++) - { - if(rand() % 2) - { - personas[i].setEstaPeda(true); - cout << personas[i].getNombre() << " esta PEDA!" << endl; - this->alguienEstaPeda = true; - } - } - - cout << endl; - } - - void Intoxicar() - { - srand(time(NULL)); - for(int i=0; ipersonas.size(); i++) - { - if(rand() % 2) - { - personas[i].setEstaIntoxicada(true); - cout << personas[i].getNombre() << " se INTOXICO!" << endl; - this->alguienSeIntoxico = true; - } - } - - cout << endl; - } - - bool esSegura() { if(this->alguienEstaPeda or this->alguienSeIntoxico){ return false; } else { return true; } } - - ~Peda() { cout << "\n\nSe acabo la peda." << endl; } -}; - -int main() -{ - int invitaciones; - Peda *peda = new Peda(true, true, true); - - cout << "cuantos vas a invitar: "; cin >> invitaciones; cout << endl; - - peda->invitar(invitaciones); - - if(peda->seArmo()) - { - peda->alcoholizar(); - peda->Intoxicar(); - - if(peda->esSegura()) { cout << "pasala tranqui prro"; } else { cout << "Sal de ahiii!!!"; } - } else { cout << "No se armo :c"; } - - delete(peda); -} diff --git a/C++/pk.cpp b/C++/pk.cpp deleted file mode 100644 index 42d445450..000000000 --- a/C++/pk.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -using namespace std; -int main() -{ - cout<<"Hello World"; -} diff --git a/C++/prime_or_not.cpp b/C++/prime_or_not.cpp deleted file mode 100644 index 02503c82a..000000000 --- a/C++/prime_or_not.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include -using namespace std; - -int main() -{ - int n, i; - bool isPrime = true; - - cout << "Enter a positive integer: "; - cin >> n; - - for(i = 2; i <= n / 2; ++i) - { - if(n % i == 0) - { - isPrime = false; - break; - } - } - if (isPrime) - cout << "This is a prime number"; - else - cout << "This is not a prime number"; - - return 0; -} \ No newline at end of file diff --git a/C++/print-starpattern b/C++/print-starpattern deleted file mode 100644 index b0da7c171..000000000 --- a/C++/print-starpattern +++ /dev/null @@ -1,18 +0,0 @@ -#include -using namespace std; -int main() -{ int k=0,n; -cin>>n; - for(int i=1;i<=n;i++){ - (i<=(n/2+1))?k++:k--; - for(int j=1;j<=n;j++){ - if(j<=n/2+k && j>=n/2+2-k) - cout<<"lob"; - else - cout<<" "; - } - cout<data<next; - } - -} diff --git a/C++/quick_sort b/C++/quick_sort deleted file mode 100644 index 34bf685ea..000000000 --- a/C++/quick_sort +++ /dev/null @@ -1,45 +0,0 @@ -#include -using namespace std; -#define N 10 - -int quick(int A[], int init, int end){ - int pivo = A[init]; - int esq = init; - int dir = end; - - while(esq <= dir){ - while(A[esq] <= pivo){ - esq++; - } - while(A[dir] > pivo){ - dir--; - } - if(esq <= dir){ - int aux = A[esq]; - A[esq] = A[dir]; - A[dir] = aux; - } - } - A[init] = A[dir]; - A[dir] = pivo; - return dir; -} - -void quicksort(int A[], int init, int end){ - if(init <= end){ - int pivo = quick(A, init, end); - quicksort(A, init, pivo - 1); - quicksort(A, pivo + 1, end); - } -} - -int main(){ - int A[N]; - for(int x = 0; x < N; x++){ - cin >> A[x]; - } - quicksort(A, 0, N - 1); - for(int x = 0; x < N; x++){ - cout << A[x] << " "; - } -} diff --git a/C++/random_num_generator.cpp b/C++/random_num_generator.cpp deleted file mode 100644 index 5f86efa2d..000000000 --- a/C++/random_num_generator.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include - -using namespace std; - -int main(){ - int max, random_number, i; - - cout << "Welcome to the Random Number Generator." << endl; - cout << "Please input the max number: "; - cin >> max; - - srand(time(0)); - random_number = (rand() % max) + 1; - - cout << random_number << endl; - - return 0; -} \ No newline at end of file diff --git a/C++/resultGenerator.cpp b/C++/resultGenerator.cpp deleted file mode 100644 index 93dcb7520..000000000 --- a/C++/resultGenerator.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include -class student -{ -private: - int maths,ca,oops,net,fa,sum,choice; - float per,avg; -public: - void ed(); - int total(); - int percentage(); - int avgerage(); - int dd(int,int,int); -}; - -void student::ed() -{ - std::cout << "Enter Marks in maths: "; - std::cin >> maths; - std::cout << "Enter Marks in CA : "; - std::cin >> ca; - std::cout << "Enter Marks in OOPS: "; - std::cin >> oops; - std::cout << "Enter Marks in .Net: "; - std::cin >> net; - std::cout << "Enter Marks in FA"; - std::cin >> fa; - std::cout <<"1)Total"<<'\n'; - std::cout <<"2)Average" << '\n'; - std::cout <<"3)Percentage"<< '\n'; - std::cout <<"Enter Your choice :"; - std::cin>>choice; -} - -int student::dd(int sum,int avg,int per) -{ - if(choice==1) - std::cout << sum << '\n'; - else if (choice==2) { - std::cout << avg << '\n'; - } - - else if (choice==3) { - std::cout << per << '\n'; - } - else - std::cout << "Invalid choice" << '\n'; -} - -int student::total() -{ - sum=maths+ca+oops+fa+net; - return sum; -} - -int student::percentage() -{ - per=(sum/500)*100; - return per; -} - -int student::avgerage() -{ - avg=sum/500; - return avg; -} - -int main() -{ - student s1; - int sum; - float per,avg; - s1.ed(); - per=s1.percentage(); - sum=s1.total(); - avg=s1.avgerage(); - s1.dd(sum,avg,per); -} diff --git a/C++/sam.cpp b/C++/sam.cpp deleted file mode 100755 index ffa4009ba..000000000 --- a/C++/sam.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -using namespace std; - - -int main(int argc, char const *argv[]) -{ - int num,a[100],sum=0,c; - cout << "Enter the no. of numbers you want to add"; - cin >> num; - cout << "Enter the numbers"; - - for( c=1;c<=num;c++ ) - { - cin >> a[c]; - sum=sum+a[c]; - - } - cout << "Sum is"< - -using namespace std; - -int main() -{ - string name; - cout << "It looks like we are unfamiliar. Please tell me your name."<< endl; - cin >> name; - cout << "Hello " << name << ",How are you? I am glad you are here in hacktoberfest" << endl; - return 0; -} diff --git a/C++/searchinrotatedarray.cpp b/C++/searchinrotatedarray.cpp deleted file mode 100644 index 392c22efe..000000000 --- a/C++/searchinrotatedarray.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include -using namespace std; -int binsearch(int arr[],int s,int e,int k){ - if(s>e) - return -1; - - int mid = (s+e)/2; - if(arr[mid]==k) - return mid; - - if(arr[s]<=arr[mid]){ - if(k>=arr[s]&&k<=arr[mid]) - return binsearch(arr,s,mid-1,k); - - return binsearch(arr,mid+1,e,k); - } - - if(k<=arr[e]&&k>=arr[mid]) - return binsearch(arr,mid+1,e,k); - - return binsearch(arr,s,mid-1,k); - -} -int main() -{ - int t; - cin>>t; - while(t-->0){ - int n,arr[100005],k; - cin>>n; - for(int i=0;i>arr[i]; - - cin>>k; - cout< -using namespace std; - -#define ll long long -#define pb push_back -#define mp make_pair -#define ff first -#define ss second -#define umap unordered_map -#define pq priority_queue -#define sz(a) int((a).size()) -#define rep(i,k,n) for (int i = k; i < n; ++i) -#define repr(i,k,n) for (int i = k; i >= n; --i) -#define all(c) (c).begin(),(c).end() -#define test() long t;cin>>t;while(t--) -#define fastIO ios_base::sync_with_stdio(0);cin.tie(0) -#define mod 1000000007 -#define INF 0x3f3f3f3f -#define endl '\n' -typedef vector vi; -typedef vector vll; -typedef pair pii; - - -const int N=1e6+5; -int tree[2*N]; -int a[N]; - -void build(int node,int st,int end){ - if(st==end) - tree[node]=a[st]; - else{ - int mid=(st+end)/2; - build(2*node,st,mid); - build(2*node+1,mid+1,end); - tree[node]=min(tree[2*node],tree[2*node+1]); - } -} -void update(int node,int st,int end,int in,int val){ - if(st==end){ - a[in]=val; - tree[node]=val; - } - else{ - int mid=(st+end)/2; - if(st<=in && in<=mid) - update(2*node,st,mid,in,val); - else - update(2*node+1,mid+1,end,in,val); - tree[node]=min(tree[2*node],tree[2*node+1]); - } -} -int query(int node,int st,int end,int l,int r){ - if(rend) - return INF; - if(l<=st && r>=end) - return tree[node]; - int mid=(st+end)/2; - int q1=query(2*node,st,mid,l,r); - int q2=query(2*node+1,mid+1,end,l,r); - return min(q1,q2); -} - -int main() { - fastIO; - string s; - int n,q; - cin>>n>>s; - // rep(i,1,n+1) - // cin>>a[i]; - build(1,1,n); - char c; int x,y; - rep(i,0,q){ - cin>>c>>x>>y; - if(c=='q') - cout< - -using namespace std; - -void shellSort(int input[],int size){ - for(int gap = size/2;gap>0;gap = gap/2){ - for(int i = gap;i =gap && input[j-gap]>element){ - input[j] = input[j-gap]; - j = j-gap; - } - - input[j] = element; - } - } -} - -int main() -{ - cout<<"Om Kumar"< -#include -using namespace std; - -int main() -{ - char ans = 'N'; - char size = ' '; - double priceM = 9.99, priceL = 12.99; - double total = 0.0; - int getCoupon = 0; - - cout << "Would you like to use the $2 coupon for this order? Y/N " << endl; - cin >> ans; - - if (ans == 'N') - { - total += 0; - } - else - { - total -= 2; - } - while (1) - { - cout << "Would you like to order a large pizza or a medium pizza & press -1 to stop: L/M "; - cin >> size; - - if (toupper(size) == 'L') - { - total += priceL; - getCoupon = 1; - } - else if (toupper(size) == 'M') - { - total += priceM; - } - else - { - cout << "This is your price: $" << total << setprecision(2) << endl; - if (getCoupon) - { - cout << "You get a coupon!" << endl; - } - return 0; - } - } -} diff --git a/C++/shubham.cpp b/C++/shubham.cpp deleted file mode 100644 index a485625af..000000000 --- a/C++/shubham.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -void main(){ -int n=5; -for(int i=0;i<3;i++){ - cout< -using namespace std; - -int main() -{ - cout << "Hello World!\n"; -} diff --git a/C++/sieve of erathnoses.cpp b/C++/sieve of erathnoses.cpp deleted file mode 100644 index ae9344c62..000000000 --- a/C++/sieve of erathnoses.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include -using namespace std; -//Initialize all entries of boolean array - // as true. A value in isPrime[i] will finally - // be false if i is Not a prime, else true -void sieve(int n,bool isPrime[]) -{ - isPrime[0]=isPrime[1]=false; - for(int i=2;i<=n;i++) - isPrime[i]=true; - for (int p=2; p*p<=n; p++) - { - // If isPrime[p] is not changed, then it is - // a prime - if (isPrime[p] == true) - { - // Update all multiples of p - for (int i=p*2; i<=n; i += p) //it will make 2p,3p,4p,5p,6p etc - isPrime[i] = false; - } - } - //O(N log (log N)) -} -bool isPrime(int n) - -{ - - if (n <= 1) return false; - if (n <= 3) return true; - if (n%2 == 0 || n%3 == 0) return false; - for (int i=5; i*i<=n; i=i+6) - if (n%i == 0 || n%(i+2) == 0) - return false; - return true; -//time complexity is o(sqrt(n)) -} - -int main() -{ - int n; - cin>>n; - bool isPrime[n+1]; - sieve(n,isPrime); - //find first two prime numbers whose sum will equal to the given number. - for (int i=0; i - -// Finds primes up to MAX_SIZE using the sieve of eratosthenes - -using namespace std; - -const int MAX_SIZE = 10000; -bool primes[MAX_SIZE]; - -void sieve(){ - for(int i = 2;i < MAX_SIZE;i++){ - if(!primes[i]){ - for (int j = 0; i*i + j*i < MAX_SIZE; j++) { - primes[i*i + j*i] = 1; - } - } - } - - for (int i = 2; i < MAX_SIZE; ++i) { - if(!primes[i]) printf("%d\n", i); - } -} - - -int main() { - sieve(); -} diff --git a/C++/singlylink.cpp b/C++/singlylink.cpp deleted file mode 100644 index 473de1bb7..000000000 --- a/C++/singlylink.cpp +++ /dev/null @@ -1,237 +0,0 @@ -#include -using namespace std; - -class Node -{ - public: - int data; - Node *link; -}; - -class List : public Node -{ - Node *head = NULL, *tail = NULL; - - int count = -1; - - public: - - void create(); - void insert(); - void delet(); - void display(); - void search(); -}; - -void List::create() -{ - Node *temp = new Node(); - - cout<<"Enter the value:"; - int value; - cin>>value; - - temp->data = value; - temp->link = NULL; - - if(head == NULL) - { - head = tail = temp; - } - else - { - tail->link = temp; - tail = temp; - } - - count++; -} - -void List::insert() - { - - cout<<"INSERT \n1.First\n2.Between\n3.Last"<>option; - - Node *temp = new Node(); - - switch(option) - { - case 1: - cout<<"Enter the value:"; - int value; - cin>>value; - - temp->data = value; - temp->link = head->link; - head = temp; - - break; - - case 2:{ - cout<<"Enter the position:"; - int pos; - cin>>pos; - - Node *pre = head; - if(pos < count) - { - for(int i = 0; i < pos; i++) - { - pre = pre->link; - } - cout<<"Enter the value:"; - cin>>value; - - temp->data = value; - temp->link = pre->link; - pre->link = temp; - - - } - else - { - cout<<"The position is out of range\n"; - } } - break; - - case 3:{ - cout<<"Enter the value:"; - cin>>value; - - temp->data = value; - tail->link = temp; - temp->link = NULL; - tail = temp; - } - break; - } - - } - -void List::display() -{ - Node *temp = head; - int counter = 0; - - if(count == 0) - { - cout<<"The list is empty"<"<data<link; - } - } - -} - -void List::delet() -{ - cout<<"DELETE \n1.First\n2.Between\n3.Last"<>option; - - Node *pre = head; - switch(option) - { - case 1: - temp = head; - head = head->link; - temp->link = NULL; - temp = NULL; - - break; - - case 2:{ - - int pos = 0; - if(pos < count) - { - for(int i = 0; i < pos-1; i++) - { - pre = pre->link; - } - temp = pre->link; - pre->link = pre->link->link; - temp->link = NULL; - temp = NULL; - - - } - else - { - cout<<"The position is out of range\n"; - } } - break; - - case 3:{ - - for(int i = 0; i < count-1; i++) - { - pre = pre->link; - } - temp = pre->link; - pre->link = pre->link->link; - temp->link = NULL; - temp = NULL; - - temp = tail; - head = head->link; - temp->link = NULL; - temp = NULL; - } - break; - } - -} - -void options() -{ - cout<<"Select an option. By pressing the number."<>input; - cout<<"You have selected "; - switch(input) - { - case '1': cout<<"(Create)"< -#include -#include -#include -#include -#include -#include - - -using namespace std; -void printmap(void); -void assign(void); -void initial(bool); -void texture(int ,int); -void updatemap(void); -void changedir(char); -void move(int,int); -void clear(void); -void delay(unsigned int); -void collision(int ,int); -void generatefood(void); -void eat(int,int); -void cheat(void); - -int map[20][20]; -int snake[400]; -int food; -int headposx,headposy; -bool run; -int _kbhit( void ); -char dir; -int xpos,ypos; -int direction; -int foodx,foody; -int oldfood; -int speed; -int foodpos,k; -int highscore=0; -int highscorefile,highscorefile2; - - -int main() -{ - bool home=true; - bool play=true; - while(play) - { - initial(home); - printmap(); - while(run) - { - delay(speed); - updatemap(); - clear(); - printmap(); - - - } - clear(); - cout<<"\n\n\n\n\n\n\n\n\t\t\t Game Over \n\t\t\t Score = "<highscore) - { - highscore=(food-3); - int spot,tot; - srand((unsigned) time(0)); - tot=((rand()%100)+3); - spot=(rand()%tot); - highscorefile=(highscore<<2); - highscorefile2=highscorefile*spot; - ofstream myfile ; - myfile.open("gamedata.dat"); - if(myfile.is_open()) - { - myfile << (spot<<3)<<'\n'; - myfile << (tot<<1)<<'\n'; - for(int i=0;i<=tot;i++) - { - if(i==spot) - myfile<> spot ; - myfile >>tot; - spot=(spot>>3); - tot=(tot>>1); - for(i=0;i<=(tot+1);i++) - { - if(myfile.eof()) - break; - if(i==spot) - myfile>>highscorefile; - else - myfile>>junk; - } - myfile.close(); - } - highscore=(highscorefile>>2); - ifstream ryfile ; - ryfile.open("gamedata.dat"); - if((i!=(tot+2))&&ryfile.is_open()&&(junk!=(spot*highscorefile))) - cheat(); - - - if(home) - { - cout<<"\n\n\n\n\n\n\n\n\t\t### # # ##### # # ####"; - cout<<"\n\t\t# ## # # # # # #"; - cout<<"\n\t\t### # # # ##### ## ###"; - cout<<"\n\t\t # # ## # # # # #"; - cout<<"\n\t\t### # # # # # # ####"; - cout<<"\n\n\t\t Created by KP\n\t\t"; - system("pause"); - } - for(int i=0;i<400;i++) - snake[i]=0; - snake[0]=(headposx*100)+headposy; - snake[1]=((headposx-1)*100)+headposy; - snake[2]=((headposx-2)*100)+headposy; - run=true; -} - -void printmap() -{ - assign(); - for(int i=0;i<22;i++) - cout<<"* "; - cout<<"\n* Score * # # ### * Highscore *"; - cout<<"\n* * * * * * * ## ### * * * * * * * * *\n"; - cout<<"* "<0;i--) - snake[i]=snake[i-1]; - snake[food]=0; - snake[0]=(headposx*100)+headposy; - for(int j=3;j50) - speed-=10; - } -} -void collision(int x,int y) -{ - if(x>19||x<0||y<0||y>19) - run=false; -} - -void generatefood() -{ - int i,j,k,foodpos=0; - srand((unsigned) time(0)); - k=(rand()%200); - k+=(rand()%200); - k=((k*rand())%(401-food)); - while(foodpos clock()); -} -void cheat() -{ - int a=0; - ofstream myfile ; - myfile.open("gamedata.dat"); - if(myfile.is_open()) - { - myfile << a <<'\n' ; - myfile << a <<'\n' ; - myfile << (a+2) <<'\n'; - - myfile.close(); - } - highscore=0; - highscorefile=0; - cout<<"\n\n\n\n\n\n\n\n\t\tYou Have Failed at Decrypting \n\t\t\t Better Luck Next time \n"; - delay(5000); - clear(); -} diff --git a/C++/sort_0s_1s.cpp b/C++/sort_0s_1s.cpp deleted file mode 100644 index 61dd9161a..000000000 --- a/C++/sort_0s_1s.cpp +++ /dev/null @@ -1,40 +0,0 @@ -using namespace std; - -int main() -{ - int t; - cin>>t; - while(t--) - { - int n; - cin>>n; - int arr[n]; - for(int i = 0; i < n; i++) - { - cin>>arr[i]; - } - int low = 0; - int mid = 0; - int hi = n - 1; - while(mid <= hi) - { - switch(arr[mid]) - { - case 0: swap(arr[mid++], arr[low++]); - break; - - case 1: mid++; - break; - - case 2: swap(arr[mid], arr[hi--]); - break; - } - } - for(int i = 0; i < n; i++) - { - cout< -#include -using namespace std; - -int main() -{ - stack s; - - for(int i=0;i<10;i++) - { - s.push(i); - } - while(s.empty() !=1) - { - int t=s.top(); - s.pop(); - cout << t < -using namespace std; -int main() -{ - stacks; - queueq; - for(int i=1;i<=10;i++) - { - s.push(i); - } - - while(!s.empty()) - { - cout< -#include - -using namespace std; - -int main() -{ - int n,k,l,r; - cout<<"enter the value of rows:\n"; - cin>>n; - r=(n+1)/2+1; - l=-2; - - for(int i=1;i<=n;i++) - { - if(i<=(n+1)/2) { //l for spaces and r for number of stars,initialy space=0 and star=(n+1)/2 - l=l+2; - r=r-1; } - else { - l=l-2; - r=r+1; } - for(int j=1;j<=r;j++){ - cout<<"* "; - } - for(int j=1;j<=l;j++){ - cout<<" "; - } - for(int j=1;j<=r;j++){ - cout<<"* "; - } - cout<<"\n"; - } -} diff --git a/C++/stl1.cpp b/C++/stl1.cpp deleted file mode 100644 index 933f8c1cb..000000000 --- a/C++/stl1.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// sort n numbers -#include -using namespace std; -int main() -{ - int n; - cin>>n; - vectorarr(n); - for(int i=0;i>arr[i]; - } - sort(arr.begin(),arr.end()); - for(int i=0;i -using namespace std; -int main() -{ - string s; - cin>>s; - reverse(s.begin(),s.end()); - cout< -using namespace std; -int primeFactors(int num) -{ int max=0; - for(int i=2;i*i<=num;i++) - while(num%i==0){ - if(i>max) - max=i; - num=num/i; - } - if(num>1&&num>max) - max=num; -return max; -} -int main() -{ - int cnt=0; - for(int i=1;cnt<15;i++) - if(primeFactors(i*i+1)>=2*i){ - cout< -using namespace std; - -int strange_sumB(int arr[],int left, int right); - -int main(){ - int a[] ={0,1,2,3,4,5,6}; - int sum = strange_sumB(a,3,1); - cout << "sum= " << sum << endl; -} - -int strange_sumB(int arr[], int left, int right){ - cout << "Left= " << left << "\tRight= " << right << endl; - if (right - left == 1) - { - return arr[left]; - } - return strange_sumB(arr,left, right/2) + strange_sumB(arr,right/2,right); -} - diff --git a/C++/string_function.h b/C++/string_function.h deleted file mode 100644 index 9c0c27b13..000000000 --- a/C++/string_function.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * string_function.h - * - * Created on: Apr 20, 2018 - * Author: hosamelsafty - */ - -#ifndef STRING_FUNCTION_H_ -#define STRING_FUNCTION_H_ - -// trim from start - std::string <rim(std::string &s) ; - -// trim from end - std::string &rtrim(std::string &s) ; - void removeSpaces(std::string &str); -// trim from both ends - std::string &trim(std::string &s) ; - size_t split(const std::string &txt, std::vector &strs, char ch) ; - void replaceAll(std::string& str, const std::string& from, const std::string& to) ; - bool replace(std::string& str, const std::string& from, const std::string& to); - - - -#endif /* STRING_FUNCTION_H_ */ diff --git a/C++/sudoku_backtracking b/C++/sudoku_backtracking deleted file mode 100644 index f2766a8f0..000000000 --- a/C++/sudoku_backtracking +++ /dev/null @@ -1,97 +0,0 @@ -#include -using namespace std; -#define N 9 - -bool acharVazias(int mat[N][N], int &linha, int &coluna); -bool ehValido(int mat[N][N], int inicioLinha, int inicioColuna, int num); - -bool resolverSudoku(int mat[N][N]){ - int linha, coluna; - - if(!acharVazias(mat, linha, coluna)) return true; - - for(int x = 1; x <= 9; x++){ - if(ehValido(mat, linha, coluna, x)){ - mat[linha][coluna] = x; - - if(resolverSudoku(mat)) return true; - - mat[linha][coluna] = 0; - } - } - return false; -} - -bool acharVazias(int mat[N][N], int &linha, int &coluna){ - for(linha = 0; linha < N; linha++){ - for(coluna = 0; coluna < N; coluna++){ - if(mat[linha][coluna] == 0){ - return true; - } - } - } - return false; -} - -bool procurarLinha(int mat[N][N], int linha, int num){ - for(int x = 0; x < N; x++){ - if(mat[linha][x] == num){ - return true; - } - } - return false; -} - -bool procurarColuna(int mat[N][N], int coluna, int num){ - for(int x = 0; x < N; x++){ - if(mat[x][coluna] == num){ - return true; - } - } - return false; -} - -bool verificarBloco(int mat[N][N], int linha, int coluna, int num){ - for(int x = 0; x < 3; x++){ - for(int y = 0; y < 3; y++){ - if(mat[linha + x][coluna + y] == num){ - return true; - } - } - } - return false; -} - -bool ehValido(int mat[N][N], int linha, int coluna, int num){ - return !procurarLinha(mat, linha, num) && - !procurarColuna(mat, coluna, num) && - !verificarBloco(mat, linha - linha%3, coluna - coluna%3, num); -} - - -void printarSudoku(int mat[N][N]){ - for(int x = 0; x < N; x++){ - for(int y = 0; y < N; y++){ - cout << mat[x][y]; - } - cout << endl; - } -} - -int main(){ - int mat[N][N]; - int casos; - cin >> casos; - - for(int x = 0; x < casos; x++){ - for(int i = 0; i < N; i++){ - string p; - cin >> p; - for(int j = 0; j < N; j++){ - mat[i][j] = p[j] - 48; - } - } - if(resolverSudoku(mat) == true) printarSudoku(mat); - else cout << "It doesn't have solution" << endl; - } -} diff --git a/C++/swade_says_wassup.cpp b/C++/swade_says_wassup.cpp deleted file mode 100644 index 81034f8a5..000000000 --- a/C++/swade_says_wassup.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include -using namespace std; - -int main(void){ - char arr[13] = {'W', 'A', 'S', 'S', 'U', 'P', '\n', 'W', 'O', 'R', 'L', 'D', '!' }; - - for(int i = 0; i < sizeof(arr)/sizeof(*arr); i++){ - printf("%c\n", arr[i]); - } - return 0; -} \ No newline at end of file diff --git a/C++/swap_pointer.cpp b/C++/swap_pointer.cpp deleted file mode 100644 index daf3d639a..000000000 --- a/C++/swap_pointer.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include; -using namespace std; -void swap(int *p1,int *p2) -{ - int c=*p2; - *p2=*p1; - *p1=c; -} -int main() -{int x1,x2; -cin>>x1>>x2; - int *p1=&x1; - int *p2=&x2; - swap(p1,p2); - cout<<"x1"< -using namespace std; -class tempConv -{ -private: - int fahre,cal; -public: - void enterData(); - int conversion(); -}; - -void tempConv::enterData() -{ - std::cout << "Enter temprature in Fahrenheit: "; - std::cin >> fahre; -} - -int tempConv::conversion() -{ - cal=(fahre-32)/1.8; - return cal; -} - -int main() -{ - int data; - tempConv temp; - temp.enterData(); - data=temp.conversion(); - cout <<"temprature in Celsius: "< - - -template -using Function = ReturnT(*)(ArgT...); - - - -void greetWorld() { - -std::cout<< "Hello, World!" << std::endl; - -}; - - -int main() -try { - -Function sayHello = greetWorld; - -sayHello(); - -return EXIT_SUCCESS; -} -catch(...) { - -std::clog << "Bye, cruel world!" ; - -}; diff --git a/C++/tetris.cpp b/C++/tetris.cpp deleted file mode 100644 index 136de298a..000000000 --- a/C++/tetris.cpp +++ /dev/null @@ -1,380 +0,0 @@ -#include -#include -#include -#include -#include -#include - -using namespace std; - -void initial(void); -void gennextblock(void); -void createblock(void); -void updatemap(void); -void movedir(char); -void blockmapassign(void); -void nxtblockassign(void); -void mapassign(void); -int right(void); -int left(void); -int down(void); -void clears(void); -void printmap(void); -void delay(unsigned); -int rotateacl(void); -int rotatecl(void); -void texture(int); -void statue(void); -bool rotatecalc(int,int,int,int); - -int map[19][15]; -int blockpos[4][2]; -int blockposmap[4][2]; -int nxtblock[4][4]; - -bool play,gennext; -int orient,block1comp,block2comp,curblock,nxblock,blockrotx=0,blockroty=0,downcount=0,score=0; - - -int main() -{ - initial(); - while(play) - { - updatemap(); - clears(); - printmap(); - delay(50); - } - cin.ignore(); - return 0; -} - -void initial() -{ - play=true; - for(int i=0;i<19;i++) - for(int j=0;j<14;j++) - map[i][j]=0; - for(int i=0;i<4;i++) - for(int j=0;j<4;j++) - nxtblock[i][j]=0; - srand((unsigned) time(0)); - block1comp=rand()%6; - block2comp=rand()%6; - orient=rand()%2; -} - -void updatemap() -{ - if(curblock==nxblock) - { - createblock(); - gennext=true; - curblock++; - blockmapassign(); - } - if(gennext) - gennextblock(); - if(_kbhit()) - { - movedir(_getch()); - } - if(downcount==3) - { - down(); - downcount=0; - } - downcount++; - mapassign(); - -} - -void movedir(char dir) -{ - switch(dir) - { - case 'w':rotateacl(); - break; - case 'd':right(); - break; - case 's':rotatecl(); - break; - case 'a':left(); - break; - } - -} - -void gennextblock() -{ - srand((unsigned) time(0)); - block1comp=rand()%6; - do{block2comp=rand()%6;}while(block2comp==block1comp); - orient=rand()%2; - createblock(); - nxtblockassign(); - gennext=false; -} -void createblock() -{ - if(!orient) - { - blockpos[0][0]=1,blockpos[0][1]=1; - blockpos[1][0]=1,blockpos[1][1]=2; - switch(block1comp) - { - case 0: blockpos[2][0]=0,blockpos[2][1]=1; - break; - case 1: blockpos[2][0]=1,blockpos[2][1]=0; - break; - case 2: blockpos[2][0]=2,blockpos[2][1]=1; - break; - case 5: blockpos[2][0]=0,blockpos[2][1]=2; - break; - case 4: blockpos[2][0]=1,blockpos[2][1]=3; - break; - case 3: blockpos[2][0]=2,blockpos[2][1]=2; - break; - } - switch(block2comp) - { - case 0: blockpos[3][0]=0,blockpos[3][1]=1; - break; - case 1: blockpos[3][0]=1,blockpos[3][1]=0; - break; - case 2: blockpos[3][0]=2,blockpos[3][1]=1; - break; - case 5: blockpos[3][0]=0,blockpos[3][1]=2; - break; - case 4: blockpos[3][0]=1,blockpos[3][1]=3; - break; - case 3: blockpos[3][0]=2,blockpos[3][1]=2; - break; - } - } - else - { - blockpos[0][0]=1,blockpos[0][1]=2; - blockpos[1][0]=2,blockpos[1][1]=2; - switch(block1comp) - { - case 0: blockpos[2][0]=1,blockpos[2][1]=1; - break; - case 1: blockpos[2][0]=0,blockpos[2][1]=2; - break; - case 2: blockpos[2][0]=1,blockpos[2][1]=3; - break; - case 5: blockpos[2][0]=2,blockpos[2][1]=1; - break; - case 4: blockpos[2][0]=3,blockpos[2][1]=2; - break; - case 3: blockpos[2][0]=2,blockpos[2][1]=3; - break; - } - switch(block2comp) - { - case 0: blockpos[3][0]=1,blockpos[3][1]=1; - break; - case 1: blockpos[3][0]=0,blockpos[3][1]=2; - break; - case 2: blockpos[3][0]=1,blockpos[3][1]=3; - break; - case 5: blockpos[3][0]=2,blockpos[3][1]=1; - break; - case 4: blockpos[3][0]=3,blockpos[3][1]=2; - break; - case 3: blockpos[3][0]=2,blockpos[3][1]=3; - break; - } - } - if((block1comp>3)&&(block2comp>3)) - { - blockpos[0][0]+=blockpos[1][0]; - blockpos[1][0]=blockpos[0][0]-blockpos[1][0]; - blockpos[0][0]-=blockpos[1][0]; - blockpos[0][1]+=blockpos[1][1]; - blockpos[1][1]=blockpos[0][1]-blockpos[1][1]; - blockpos[0][1]-=blockpos[1][1]; - } -} - -void blockmapassign() -{ - srand((unsigned) time(0)); - int blockfact; - blockfact=rand()%11+1; - for(int i=0;i<4;i++) - blockposmap[i][0]=blockpos[i][0],blockposmap[i][1]=blockpos[i][1]+blockfact; - -} - -void nxtblockassign() -{ - for(int i=0;i<4;i++) - for(int j=0;j<4;j++) - nxtblock[i][j]=0; - for(int i=0;i<4;i++) - nxtblock[blockpos[i][0]][blockpos[i][1]]=1; -} - -void delay(unsigned int mseconds) -{ - clock_t goal = mseconds + clock(); - while (goal > clock()); -} - -void mapassign() -{ - for(int i=0;i<19;i++) - for( int j=0;j<15;j++) - if(map[i][j]!=2) - map[i][j]=0; - for(int i=0;i<15;i++) - if(map[3][i]==2) - play=false; - for(int i=0;i<4;i++) - { - map[blockposmap[i][0]][blockposmap[i][1]]=1; - } -} -void clears() -{ - system("cls"); -} - -int down() -{ - for(int i=0;i<4;i++) - if((blockposmap[i][0]>17)||(map[blockposmap[i][0]+1][blockposmap[i][1]]==2)) - { - statue(); - return 0; - } - - for(int i=0;i<4;i++) - blockposmap[i][0]++; - return 0; - -} - -void statue() -{ - for(int i=0;i<4;i++) - map[blockposmap[i][0]][blockposmap[i][1]]=2,blockposmap[i][0]=0,blockposmap[i][1]=0; - nxblock++; - score+=4; -} - -int right() -{ - for(int i=0;i<4;i++) - if((blockposmap[i][1]==14)||(map[blockposmap[i][0]][blockposmap[i][1]+1]==2)) - return 0; - for(int i=0;i<4;i++) - blockposmap[i][1]+=1; - return 0; -} - -int left() -{ - for(int i=0;i<4;i++) - if((blockposmap[i][1]==0)||(map[blockposmap[i][0]][blockposmap[i][1]-1]==2)) - return 0; - for(int i=0;i<4;i++) - blockposmap[i][1]-=1; - return 0; -} - -int rotateacl() -{ - for(int i=1;i<4;i++) - if(rotatecalc(blockposmap[i][0],blockposmap[i][1],1,-1)) - return 0; - for(int i=1;i<4;i++) - { - rotatecalc(blockposmap[i][0],blockposmap[i][1],1,-1); - blockposmap[i][0]=blockroty; - blockposmap[i][1]=blockrotx; - } - return 0; -} - -int rotatecl() -{ - for(int i=1;i<4;i++) - if(rotatecalc(blockposmap[i][0],blockposmap[i][1],-1,1)) - return 0; - for(int i=1;i<4;i++) - { - rotatecalc(blockposmap[i][0],blockposmap[i][1],-1,1); - blockposmap[i][0]=blockroty; - blockposmap[i][1]=blockrotx; - } - return 0; -} -bool rotatecalc(int blocky,int blockx,int dir,int dir1) -{ - int swapno=0; //(a,b) become; (b,-a) - blockroty=(blocky-blockposmap[0][0])*dir; - blockrotx=(blockx-blockposmap[0][1])*dir1; //swapno=a - swapno=blockroty; //a=b - blockroty=blockrotx; //b=-a - blockrotx=swapno; - blockrotx+=blockposmap[0][1]; - blockroty+=blockposmap[0][0]; - if((map[blockroty][blockrotx]==2)||(blockroty>18)||(blockrotx<0)||(blockrotx>14)) - return true; - else - return false; -} -void printmap() -{ - - for(int i=0;i<22;i++) - cout<<"* "; - cout<=5) - cout<<" "; - } - cout<<"* "< -using namespace std; - -struct Node -{ - struct Node *left, *right; - int info; - - - bool lthread; - - - bool rthread; -}; - -struct Node *insert(struct Node *root, int ikey) -{ - - Node *ptr = root; - Node *par = NULL; - while (ptr != NULL) - { - - if (ikey == (ptr->info)) - { - printf("Duplicate Key !\n"); - return root; - } - - par = ptr; - - - if (ikey < ptr->info) - { - if (ptr -> lthread == false) - ptr = ptr -> left; - else - break; - } - - else - { - if (ptr->rthread == false) - ptr = ptr -> right; - else - break; - } - } - - Node *tmp = new Node; - tmp -> info = ikey; - tmp -> lthread = true; - tmp -> rthread = true; - - if (par == NULL) - { - root = tmp; - tmp -> left = NULL; - tmp -> right = NULL; - } - else if (ikey < (par -> info)) - { - tmp -> left = par -> left; - tmp -> right = par; - par -> lthread = false; - par -> left = tmp; - } - else - { - tmp -> left = par; - tmp -> right = par -> right; - par -> rthread = false; - par -> right = tmp; - } - - return root; -} - -struct Node *inorderSuccessor(struct Node *ptr) -{ - if (ptr -> rthread == true) - return ptr->right; - - ptr = ptr -> right; - while (ptr -> lthread == false) - ptr = ptr -> left; - return ptr; -} - -void inorder(struct Node *root) -{ - if (root == NULL) - printf("Tree is empty"); - struct Node *ptr = root; - while (ptr -> lthread == false) - ptr = ptr -> left; - - while (ptr != NULL) - { - printf("%d ",ptr -> info); - ptr = inorderSuccessor(ptr); - } -} - -void preorder(struct Node *root){ - - if (root == NULL) - printf("Tree is empty"); - struct Node *ptr = root; - - printf("%d ",ptr -> info); - if(ptr->lthread==false) - preorder(ptr->left); - if(ptr->rthread==false) - preorder(ptr->right); - -} - -int main() -{ - int n, arr[100]; - struct Node *root = NULL; - cout<<"Enter no of nodes of tree.\n"; - cin>>n; - cout<<"Enter "<>arr[i]; - root = insert(root, arr[i]); - } - - - inorder(root); - cout< -using namespace std; - -char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; - -int checkwin(); -void board(); - -int main() -{ - int player = 1,i,choice; - - char mark; - do - { - board(); - player=(player%2)?1:2; - - cout << "Player " << player << ", enter a number: "; - cin >> choice; - - mark=(player == 1) ? 'X' : 'O'; - - if (choice == 1 && square[1] == '1') - - square[1] = mark; - else if (choice == 2 && square[2] == '2') - - square[2] = mark; - else if (choice == 3 && square[3] == '3') - - square[3] = mark; - else if (choice == 4 && square[4] == '4') - - square[4] = mark; - else if (choice == 5 && square[5] == '5') - - square[5] = mark; - else if (choice == 6 && square[6] == '6') - - square[6] = mark; - else if (choice == 7 && square[7] == '7') - - square[7] = mark; - else if (choice == 8 && square[8] == '8') - - square[8] = mark; - else if (choice == 9 && square[9] == '9') - - square[9] = mark; - else - { - cout<<"Invalid move "; - - player--; - cin.ignore(); - cin.get(); - } - i=checkwin(); - - player++; - }while(i==-1); - board(); - if(i==1) - - cout<<"==>\aPlayer "<<--player<<" win "; - else - cout<<"==>\aGame draw"; - - cin.ignore(); - cin.get(); - return 0; -} - -/********************************************* - - FUNCTION TO RETURN GAME STATUS - 1 FOR GAME IS OVER WITH RESULT - -1 FOR GAME IS IN PROGRESS - O GAME IS OVER AND NO RESULT -**********************************************/ - -int checkwin() -{ - if (square[1] == square[2] && square[2] == square[3]) - - return 1; - else if (square[4] == square[5] && square[5] == square[6]) - - return 1; - else if (square[7] == square[8] && square[8] == square[9]) - - return 1; - else if (square[1] == square[4] && square[4] == square[7]) - - return 1; - else if (square[2] == square[5] && square[5] == square[8]) - - return 1; - else if (square[3] == square[6] && square[6] == square[9]) - - return 1; - else if (square[1] == square[5] && square[5] == square[9]) - - return 1; - else if (square[3] == square[5] && square[5] == square[7]) - - return 1; - else if (square[1] != '1' && square[2] != '2' && square[3] != '3' - && square[4] != '4' && square[5] != '5' && square[6] != '6' - && square[7] != '7' && square[8] != '8' && square[9] != '9') - - return 0; - else - return -1; -} - - -/******************************************************************* - FUNCTION TO DRAW BOARD OF TIC TAC TOE WITH PLAYERS MARK -********************************************************************/ - - -void board() -{ - system("cls"); - cout << "\n\n\tTic Tac Toe\n\n"; - - cout << "Player 1 (X) - Player 2 (O)" << endl << endl; - cout << endl; - - cout << " | | " << endl; - cout << " " << square[1] << " | " << square[2] << " | " << square[3] << endl; - - cout << "_____|_____|_____" << endl; - cout << " | | " << endl; - - cout << " " << square[4] << " | " << square[5] << " | " << square[6] << endl; - - cout << "_____|_____|_____" << endl; - cout << " | | " << endl; - - cout << " " << square[7] << " | " << square[8] << " | " << square[9] << endl; - - cout << " | | " << endl << endl; -} - -/******************************************************************* - END OF PROJECT -********************************************************************/ diff --git a/C++/tic_tac_toe.cpp b/C++/tic_tac_toe.cpp deleted file mode 100644 index 9d2b8415b..000000000 --- a/C++/tic_tac_toe.cpp +++ /dev/null @@ -1,108 +0,0 @@ -#include -#include -#include -using namespace std; - -char tic[3][3]; -int flag=1; -int player=1; -int count1=0; - -int win() -{ - if(player==2) - { - - if((tic[0][0]=='X'&&tic[1][1]=='X'&&tic[2][2]=='X')||(tic[0][0]=='X'&&tic[0][1]=='X'&&tic[0][2]=='X')||(tic[1][0]=='X'&&tic[1][1]=='X'&&tic[1][2]=='X')||(tic[2][0]=='X'&&tic[2][1]=='X'&&tic[2][2]=='X')||(tic[0][2]=='X'&&tic[1][1]=='X'&&tic[2][0]=='X')||(tic[2][0]=='X'&&tic[2][1]=='X'&&tic[2][2]=='X')||(tic[0][0]=='X'&&tic[1][0]=='X'&&tic[2][0]=='X')||(tic[0][1]=='X'&&tic[1][1]=='X'&&tic[2][1]=='X')||(tic[0][2]=='X'&&tic[1][2]=='X'&&tic[2][2]=='X')) - { - return 1; - } - } - else if(player==1) - { - - if((tic[0][0]=='O'&&tic[1][1]=='O'&&tic[2][2]=='O')||(tic[0][0]=='O'&&tic[0][1]=='O'&&tic[0][2]=='O')||(tic[1][0]=='O'&&tic[1][1]=='O'&&tic[1][2]=='O')||(tic[2][0]=='O'&&tic[2][1]=='O'&&tic[2][2]=='O')||(tic[0][2]=='O'&&tic[1][1]=='O'&&tic[2][0]=='O')||(tic[2][0]=='O'&&tic[2][1]=='O'&&tic[2][2]=='O')||(tic[0][0]=='O'&&tic[1][0]=='O'&&tic[2][0]=='O')||(tic[0][1]=='O'&&tic[1][1]=='O'&&tic[2][1]=='O')||(tic[0][2]=='O'&&tic[1][2]=='O'&&tic[2][2]=='O')) - { - return 2; - } - - } - return 0; - -} -int main() -{ - int i,j; - int i1,j1; - - for(i=0;i<3;i++) - for(j=0;j<3;j++) - tic[i][j]='_'; - - while(!win()) - { - if(count1==9) - { - break; - } - for(i=0;i<3;i++) - { - for(j=0;j<3;j++) - { - cout<>i1>>j1; - if(tic[i1-1][j1-1]=='_') - {tic[i1-1][j1-1]='X'; - player++; - count1++; - } - else - cout<<"\nTHE PLACE IS ALREADY OCCUPIED!! PLEASE ENTER COORDINATES AGAIN\n"; - } - - else if(player==2) - { - cout<<"\nIT IS CHANCE OF PLAYER 2:\n"<>i1>>j1; - if(tic[i1-1][j1-1]=='_') - {tic[i1-1][j1-1]='O'; - player--; - count1++; - } - else - { - cout<<"\nTHE PLACE IS ALREADY OCCUPIED!! PLEASE ENTER COORDINATES AGAIN\n"; - - } - } - - - - } - for(i=0;i<3;i++) - { - for(j=0;j<3;j++) - { - cout< -#include // for setw() function -#include // for coloring and x,y coordinates for consol - -using namespace std; //declaration of cout<> -HANDLE hConsole; - -//---------- X,Y Co-Ordinates Function ---------------// -void gotoxy(int x, int y) { - COORD coord; - coord.X = x; - coord.Y = y; - SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); -} - -///***************Global Variables***************/// -int startgame; -int isdraw; -int position; -char name1[20]; -char name2[20]; -bool isgame = true; -char box[10] = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}; -///*********************************************/// - - - -///*************Function Declaration**************/// -void initialized(); -void giveinput(); -void printboard(); -void updateinput(); -void checkwin(); -void checkdraw(); -void welcomescreen(); -void instruction(); -///**********************************************/// - -int main() { - isdraw = 0; - welcomescreen(); - system("cls"); //for clear screen - instruction(); - Sleep(10000); //next screen start in 10 sec automatically - system("cls"); - initialized(); - system("cls"); - while (isgame == true) { - giveinput(); - isdraw++; - if(isdraw == 13) { - cout<<"\nMatch Is Draw: \n"; - break; - } - else { - checkwin(); - updateinput(); - isdraw++; - checkwin(); - isdraw++; - - if(isdraw == 13) { - cout<<"\nMatch Is Draw: \n"; - isgame = false; - } - } - - - } - system("pause"); - return 0; -} -void welcomescreen() { - HANDLE hConsole; - hConsole = GetStdHandle(STD_OUTPUT_HANDLE); - system("cls"); - SetConsoleTextAttribute(hConsole, 480); //Yellow Color Code=480 - gotoxy(23,0); - cout<<" Indus University (FEST) \n"; - cout<<"\n"; - SetConsoleTextAttribute(hConsole, 47); //Green & White Color Code=47 - gotoxy(19,2); - cout<<" A Tic Tac Toe Game using C++ "; - SetConsoleTextAttribute(hConsole, 8); //Gray Color Code=8 - for (int i=6; i<18; i++) { - gotoxy(43,i); - cout<<'\xB3'; - } - gotoxy(28,3); - SetConsoleTextAttribute(hConsole, 27); //Blue Color Code=27 - cout<<" Semester Project "; - SetConsoleTextAttribute(hConsole, 12); //Red Color Code=12 - gotoxy(1,7); - cout<<"Submitted By: "; - SetConsoleTextAttribute(hConsole, 12); - gotoxy(46,8); - cout<<"Submitted To: "; - SetConsoleTextAttribute(hConsole, 11); //Light Blue Color Code=11 - gotoxy(48,10); - cout<<"Ms. Saima Sipy"; - SetConsoleTextAttribute(hConsole, 15); //White Color Code=15 - gotoxy(1,10); - cout<<"(Group Leader)"; - SetConsoleTextAttribute(hConsole, 3); //Dark Blue-Green Color Code=3 - gotoxy(16,10); - cout<<"Aminullah Taj Muhammad"; - SetConsoleTextAttribute(hConsole, 6); //Dark Yellow Color Code=6 - gotoxy(38,8); - SetConsoleTextAttribute(hConsole, 15); //White Color Code=15 - gotoxy(47,8); - SetConsoleTextAttribute(hConsole, 3); //Dark Blue Color Code=3 - gotoxy(16,12); - cout<<"Asad Ali Tagar"; - SetConsoleTextAttribute(hConsole, 6); //Dark Yellow Color Code=6 - gotoxy(38,10); - SetConsoleTextAttribute(hConsole, 3); //Dark Blue Color Code=3 - gotoxy(16,14); - cout<<"Zeeshan Anwar"; - SetConsoleTextAttribute(hConsole, 3); //Dark Blue Color Code=3 - gotoxy(16,16); - cout<<"Syed Abrar Rizvi"; - - - SetConsoleTextAttribute(hConsole, 8); //Dark Yellow Color Code=8 - for (int i=0; i<79; i++) { - gotoxy(i,18); - cout<< char(196); - } - SetConsoleTextAttribute(hConsole, 8); //Dark Yellow Color Code=8 - for (int i=0; i<79; i++) { - gotoxy(i,6); - cout<>startgame; -} -void instruction() { - hConsole = GetStdHandle(STD_OUTPUT_HANDLE); - gotoxy(19,1); - SetConsoleTextAttribute(hConsole, 480); - cout<<"Game Instructure"<> name1; - cout << "Enter Secong Player Name: "; - cin >> name2; -} -void printboard() { - cout << endl; - cout << setw(4) << box[1] << "\t|" << setw(4) << box[2] << "\t|" << setw(4) << box[3] << endl; - cout << " ------------------------" << endl; - cout << setw(4) << box[4] << "\t|" << setw(4) << box[5] << "\t|" << setw(4) << box[6] << endl; - cout << " ------------------------" << endl; - cout << setw(4) << box[7] << "\t|" << setw(4) << box[8] << "\t|" << setw(4) << box[9] << endl; -} -void giveinput() { -xyz: - cout << "\nX player turn: \n"; - cout << "Enter Position in numbers: "; - cin >> position; - if (position == 1) { - if (box[1] == ' ') { - box[1] = 'X'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto xyz; - } - } - else if (position == 2) { - if (box[2] == ' ') { - box[2] = 'X'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto xyz; - } - } - else if (position == 3) { - if (box[3] == ' ') { - box[3] = 'X'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto xyz; - } - } - if (position == 4) { - if (box[4] == ' ') { - box[4] = 'X'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto xyz; - } - } - if (position == 5) { - if (box[5] == ' ') { - box[5] = 'X'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto xyz; - } - } - if (position == 6) { - if (box[6] == ' ') { - box[6] = 'X'; - } - else { - cout << "this position is filled enter empty position:\n\n "; - goto xyz; - } - } - if (position == 7) { - if (box[7] == ' ') { - box[7] = 'X'; - } - else { - cout << "this position is filled enter empty position:\n\n "; - goto xyz; - } - } - if (position == 8) { - if (box[8] == ' ') { - box[8] = 'X'; - } - else { - cout << "this position is filled enter empty position:\n\n "; - goto xyz; - } - } - if (position == 9) { - if (box[9] == ' ') { - box[9] = 'X'; - } - else { - cout << "this position is filled enter empty position:\n\n "; - goto xyz; - } - } - printboard(); -} - - - -void updateinput() { -abc: - cout << "\nO player turn: \n"; - cout << "Enter Position in numbers: "; - cin >> position; - if (position == 1) { - if (box[1] == ' ') { - box[1] = 'O'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto abc; - } - } - else if (position == 2) { - if (box[2] == ' ') { - box[2] = 'O'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto abc; - } - } - else if (position == 3) { - if (box[3] == ' ') { - box[3] = 'O'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto abc; - } - } - if (position == 4) { - if (box[4] == ' ') { - box[4] = 'O'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto abc; - } - } - if (position == 5) { - if (box[5] == ' ') { - box[5] = 'O'; - } - else { - cout << "this position is filled enter empty position: \n\n"; - goto abc; - } - } - if (position == 6) { - if (box[6] == ' ') { - box[6] = 'O'; - } - else { - cout << "this position is filled enter empty position:\n\n "; - goto abc; - } - } - if (position == 7) { - if (box[7] == ' ') { - box[7] = 'O'; - } - else { - cout << "this position is filled enter empty position:\n\n "; - goto abc; - } - } - if (position == 8) { - if (box[8] == ' ') { - box[8] = 'O'; - } - else { - cout << "this position is filled enter empty position:\n\n "; - goto abc; - } - } - if (position == 9) { - if (box[9] == ' ') { - box[9] = 'O'; - } - else { - cout << "this position is filled enter empty position:\n\n "; - goto abc; - } - } - printboard(); -} -void checkwin() { - if (box[1] == 'X' && box[2] == 'X' && box[3] == 'X' || box[4] == 'X' && box[5] == 'X' && box[6] == 'X' || - box[7] == 'X' && box[8] == 'X' && box[9] == 'X' || box[1] == 'X' && box[4] == 'X' && box[7] == 'X' || - box[2] == 'X' && box[5] == 'X' && box[8] == 'X' || box[3] == 'X' && box[6] == 'X' && box[9] == 'X' || - box[1] == 'X' && box[5] == 'X' && box[9] == 'X' || box[3] == 'X' && box[5] == 'X' && box[7] == 'X') { - - cout << "X player Wins Means " << name1 << " Wins: " << endl; - isgame = false; - exit(1); - } - - else if (box[1] == 'O' && box[2] == 'O' && box[3] == 'O' || box[4] == 'O' && box[5] == 'O' && box[6] == 'O' || - box[7] == 'O' && box[8] == 'O' && box[9] == 'O' || box[1] == 'O' && box[4] == 'O' && box[7] == 'O' || - box[2] == 'O' && box[5] == 'O' && box[8] == 'O' || box[3] == 'O' && box[6] == 'O' && box[9] == 'O' || - box[1] == 'O' && box[5] == 'O' && box[9] == 'O' || box[3] == 'O' && box[5] == 'O' && box[7] == 'O') { - - cout << "O player Wins Means " << name2 << " Wins: " << endl; - isgame = false; - } - - -} diff --git a/C++/timeDifference.cpp b/C++/timeDifference.cpp deleted file mode 100644 index c34a7d9be..000000000 --- a/C++/timeDifference.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// Computes time difference of two time period -// Time periods are entered by the user - -#include -using namespace std; - -struct TIME -{ - int seconds; - int minutes; - int hours; -}; - -void computeTimeDifference(struct TIME, struct TIME, struct TIME *); - -int main() -{ - struct TIME t1, t2, difference; - - cout << "Enter start time." << endl; - cout << "Enter hours, minutes and seconds respectively: "; - cin >> t1.hours >> t1.minutes >> t1.seconds; - - cout << "Enter stop time." << endl; - cout << "Enter hours, minutes and seconds respectively: "; - cin >> t2.hours >> t2.minutes >> t2.seconds; - - computeTimeDifference(t1, t2, &difference); - - cout << endl << "TIME DIFFERENCE: " << t1.hours << ":" << t1.minutes << ":" << t1.seconds; - cout << " - " << t2.hours << ":" << t2.minutes << ":" << t2.seconds; - cout << " = " << difference.hours << ":" << difference.minutes << ":" << difference.seconds; - return 0; -} -void computeTimeDifference(struct TIME t1, struct TIME t2, struct TIME *difference){ - - if(t2.seconds > t1.seconds) - { - --t1.minutes; - t1.seconds += 60; - } - - difference->seconds = t1.seconds - t2.seconds; - if(t2.minutes > t1.minutes) - { - --t1.hours; - t1.minutes += 60; - } - difference->minutes = t1.minutes-t2.minutes; - difference->hours = t1.hours-t2.hours; -} diff --git a/C++/topological sort.cpp b/C++/topological sort.cpp deleted file mode 100644 index 49a93c3a7..000000000 --- a/C++/topological sort.cpp +++ /dev/null @@ -1,97 +0,0 @@ -#include -#include -#include -#include -#include -#include - -using namespace std; - -class Graph -{ -private: - int V; - list *adj; - void Dfsutil(int i,vector &visited,stack &st); -public: - Graph(int v); - void addEdge(int u,int v); - void DFS(); -}; - -Graph::Graph(int v) -{ - V = v; - adj = new list[V]; - -} - -void Graph::addEdge(int u,int v) -{ - adj[u].push_back(v); -} - - -void Graph::Dfsutil(int i,vector &visited,stack &st) -{ - visited[i] = true; - - for(list::iterator itr = adj[i].begin();itr!=adj[i].end();itr++) - { - if(!visited[*itr]) - { - Dfsutil(*itr,visited,st); - } - } - - st.push(i); - -} - - -void Graph::DFS() -{ - stack st; - - vector visited(V,false); - - for(int i=0;i>v>>e; - - Graph gr(v); - - for(int i=0;i>a>>b; - gr.addEdge(a,b); - } - - gr.DFS(); - - return 0; -} diff --git a/C++/trailing zeroes in factorial.cpp b/C++/trailing zeroes in factorial.cpp deleted file mode 100644 index c2af90540..000000000 --- a/C++/trailing zeroes in factorial.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//find no of trailing zeroes in a factorial of a number -#include -using namespace std; - -int main() -{ - int A; - cin>>A; - int count = 0; - //count no of 10 in factorial - //for this we have to find number of 10 or multiple of 10 in factorial(2*5) so we can find just 5 theres because its big - //so check whether a given number is a multiple of 10 or not or multiple of 5 also - for (int n = 1; n <= A; n++) {//finding factorial - int m = n; - while (m % 10 == 0) { - count++; - m /= 10; - } - while (m % 5 == 0) { - count++; - m /= 5; - } - } - cout< -#include - -using namespace std; - -int main() -{ - int n,k,l=-1,r; - cout<<"enter the value of rows(above 0):\n"; - while(1){ - cin>>n; - if(n>0) - break; - cout<<"make sure that the rows is more than 0\n\n"; - } - - for(int i=1;i<=n;i++) - { - for(int space = 1;space<=n-i;space++) { - cout<<" "; - } - - for(int j=1;j<=2*i-1;j++) - { - - cout<<"* "; - } - cout<<"\n"; - - } - int a = pow(2, n); - cout<<"total number of stars used = "< -using namespace std; -int main(){ - cout<<"Enter the triangle height:"; - int high; - cin>>high; - for(int i=0;i -#include - -double basicFormula(double b, double h) { - return b*h/2; -} - -double heronsFormula(double a, double b, double c) { - double s = (a + b + c)/2; - return sqrt(s*(s-a)*(s-b)*(s-c)); -} - -double trigonometry(double a, double b, double angle) { - double theta = angle * M_PI / 180; - return a*b*sin(theta)/2; -} - -int main() { - int selection; - std::cout << "Triangle Area Calculator" << std::endl - << "Which formula do you want to use?" << std::endl - << "1] Basic Formula (given base and height)" << std::endl - << "2] Heron's Formula (given all sides)" << std::endl - << "3] With Trigonometry (given two adjacent sides and the angle between them)" << std::endl - << "(Type 1 / 2 / 3 to select): "; - std::cin >> selection; - - switch (selection) { - case 1: { - double base, height; - std::cout << "Basic Formula:" << std::endl - << "Give me the base of the triangle: "; - std::cin >> base; - - std::cout << "Give me the height of the triangle: "; - std::cin >> height; - - std::cout << "The area of the triangle with a base of " << base - << " and a height of " << height << " is " << basicFormula(base, height); - break; - } - - case 2: { - double a, b, c; - std::cout << "Heron's Formula:" << std::endl - << "Give me all the sides (space separated): "; - std::cin >> a >> b >> c; - - std::cout << "The area of the triangle with sides (" << a << ", " << b << ", " << c << ") is " - << heronsFormula(a, b, c); - break; - } - - case 3: { - double a, b, angle; - std::cout << "Using Trigonometry:" << std::endl - << "Give me the two adjacent sides (space separated): "; - std::cin >> a >> b; - - std::cout << "Give me the angle between them (in degrees): "; - std::cin >> angle; - - std::cout << "The area of the triangle with two adjacent sides (" << a << ", " << b - << ") and an angle of " - << angle << " degrees between them is " << trigonometry(a, b, angle); - break; - } - - default: { - std::cout << "Invalid Choice!"; - break; - } - } - std::cout << std::endl; - - return 0; -} diff --git a/C++/turboC++.cpp b/C++/turboC++.cpp deleted file mode 100644 index 73f1503b1..000000000 --- a/C++/turboC++.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -void main() -{ - cout<<"Hello World"; -} \ No newline at end of file diff --git a/C++/turbosortusingsortf.cpp b/C++/turbosortusingsortf.cpp deleted file mode 100644 index 32aa74683..000000000 --- a/C++/turbosortusingsortf.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -using namespace std; -int main() -{ - long int t; - cin>>t; - long int a[t]; - for(int i = 0; i < t; i++) - cin>> a[i]; - sort(a, a + t); - for(int i = 0; i < t; i++) - cout< -using namespace std; - -int main() { - int N,A[N],i,c; - cin>>N; - i=0; - while(i>A[i]; - i++; - } - c=0; - i=0; - while(i -using namespace std; -int main() -{ - int t, a, b, c; - cin>>t; - while(t--) - { - cin>>a>>b>>c; - if(a + b + c == 180) - cout<<"YES"< -#include -void main() -{ -cout<<"HELLO WORLD\n"; -} diff --git a/C++/yolo.cpp b/C++/yolo.cpp deleted file mode 100644 index ecf011714..000000000 --- a/C++/yolo.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(){ - std::cout<<"yolo\n"; - return 0; -} diff --git a/C/.DS_Store b/C/.DS_Store deleted file mode 100644 index 7c71d6c82..000000000 Binary files a/C/.DS_Store and /dev/null differ diff --git a/C/ABCDE reverse pyramid.c b/C/ABCDE reverse pyramid.c deleted file mode 100644 index fb823e61f..000000000 --- a/C/ABCDE reverse pyramid.c +++ /dev/null @@ -1,28 +0,0 @@ -int main () -{ - int n, j; - printf("Enter n : "); - scanf ("%d", &n); - - for(int i=1; i<=n; i++) - { - for(j=1; j<=(n+1-i); j++) - printf ("%c",'A'+j-1); - - for(int k=1; k<=(2*i-3); k++) - { - if (i != 1) - printf (" "); - } - - if(i == 1) - j -= 1; - - for(; j>1; j--) - { - printf ("%c",'A'+j-1-1); - } - printf ("\n"); - } -printf("Thank you bro"); -} \ No newline at end of file diff --git a/C/AcendingSort.c b/C/AcendingSort.c deleted file mode 100644 index 6108da733..000000000 --- a/C/AcendingSort.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -#define MAX_SIZE 100 // Maximum array size - -int main() -{ - int arr[MAX_SIZE]; - int size; - int i, j, temp; - - /* Input size of array */ - printf("Enter size of array: "); - scanf("%d", &size); - - /* Input elements in array */ - printf("Enter elements in array: "); - for(i=0; i arr[j]) - { - temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - } - } - } - - /* Print the sorted array */ - printf("\nElements of array in ascending order: "); - for(i=0; i -#include -int main() -{ -float a,b,c; -//Addition of two numbers -printf("Enter two numbers for addition"); -scanf("%f %f",&a,&b); -c=a+b; -printf("%f",c); -getch(); -return 0; -} - - - diff --git a/C/ArraySort.c b/C/ArraySort.c deleted file mode 100644 index 3d8625230..000000000 --- a/C/ArraySort.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -main() -{ - int n[100],m,i,temp,r; - printf(" enter the number of values you want to enter : "); - scanf("%d",&m); - for(i=0;in[i+1]) - { - temp=n[i]; - n[i]=n[i+1]; - n[i+1]=temp; - } - } - } - printf("\n Sorted Array is:" ); - for(i=0;i -#include - -struct node -{ - int key; - // These are left and right pointers for instance of this structure - struct node *left, *right; -}; -struct node *root; - -// A utility function to create a new BST node -struct node *newNode(int item) -{ - struct node *temp = (struct node *)malloc(sizeof(struct node)); - temp->key = item; - temp->left = temp->right = NULL; - return temp; -}; - -struct node* search(struct node* curr, int key) -{ - // Base Cases: root is null or key is present at root - if (curr == NULL || curr->key == key) - return curr; - - // Key is greater than root's key - if (curr->key < key) - return search(curr->right, key); - - // Key is smaller than root's key - return search(curr->left, key); -} - -// A utility function to do inorder traversal of BST -void inorder(struct node *curr) -{ - if (curr != NULL) - { - inorder(curr->left); - printf("%d ", curr->key); - inorder(curr->right); - } -} - -/* A utility function to insert a new node with given key in BST */ -struct node* insert(struct node* curr, int key) -{ - /* If the tree is empty, return a new node */ - if (curr == NULL) - return newNode(key); - - /* Otherwise, recur down the tree */ - if (key < curr->key) - curr->left=insert(curr->left, key); - else - curr->right=insert(curr->right, key); - - return curr; -} - -/* Given a non-empty binary search tree, return the node with minimum - key value found in that tree. Note that the entire tree does not - need to be searched. */ -struct node* minValueNode(struct node* curr) -{ - struct node* current = curr; - - /* loop down to find the leftmost leaf */ - while (current->left != NULL) - current = current->left; - - return curr; -} - -/* Given a binary search tree and a key, this function deletes the key - and returns the new root */ -struct node* deleteNode(struct node* curr, int key) -{ - // base case - if (curr == NULL) - return curr; - - // If the key to be deleted is smaller than the root's key, - // then it lies in left subtree - if (key < curr->key) - curr->left = deleteNode(curr->left, key); - - // If the key to be deleted is greater than the root's key, - // then it lies in right subtree - else if (key > curr->key) - curr->right = deleteNode(curr->right, key); - - // if key is same as root's key, then This is the node - // to be deleted - else - { - // node with only one child or no child - if (curr->left == NULL) - { - struct node *temp = curr->right; - free(curr); - return temp; - } - else if (curr->right == NULL) - { - struct node *temp = curr->left; - free(curr); - return temp; - } - - // node with two children: Get the inorder successor (smallest - // in the right subtree) - struct node* temp = minValueNode(curr->right); - - // Copy the inorder successor's content to this node - curr->key = temp->key; - - // Delete the inorder successor - curr->right = deleteNode(curr->right, temp->key); - } - return curr; -} - -int main() -{ - int key,ch; - printf("insert first element:"); - scanf("%d",&key); - root=insert(root,key); - do - { - printf("\n\nOperations on BST"); - printf("\n1. Insert\n2. Delete\n3. Search\n4. Inorder\n0. Exit\n"); - printf("\nEnter Choice 0-4? : "); - scanf("%d", &ch); - switch (ch) - { - case 1: - printf("\nEnter number: "); - scanf("%d", &key); - insert(root,key); - break; - case 2: - printf("\nEnter number: "); - scanf("%d", &key); - deleteNode(root,key); - break; - case 3: - printf("\nEnter number: "); - scanf("%d", &key); - search(root,key); - break; - case 4: - inorder(root); - break; - } - }while (ch != 0); - - return 0; -} diff --git a/C/BonjourMonde.c b/C/BonjourMonde.c deleted file mode 100644 index 229649d64..000000000 --- a/C/BonjourMonde.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int main(){ - printf("\n Bonjour le Monde en C!"); -} \ No newline at end of file diff --git a/C/BubbleSort.c b/C/BubbleSort.c deleted file mode 100644 index bb92ee85b..000000000 --- a/C/BubbleSort.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#define Length 100 //Define your array length here - - -//Decreasing Bubble Sort - -int main() -{ - - int array[Length]; - int i; - int j; - int aux; - - printf("Give program the numbers\n"); - - //Feeding our array - for(i=0; i -void valueswap(int a,int b); -void referenceswap(int *a,int *b); - -int main() -{ -int a,b; -printf("enter the value of a and b to see the diff bw call by value and reference:"); -scanf("%d%d",&a,&b); - -valueswap(a,b); -printf("after call by value the value of a and b is %d and %d\n",a,b); -referenceswap(&a,&b); -printf("\nafter call by reference the value of a and b is %d and %d\n",a,b); -return 0; -} - -void valueswap(int a,int b) -{int c; -c=a; -a=b; -b=c; -} - -void referenceswap(int *a,int *b) -{int c; -c=*a; - -*a=*b; -*b=c; -} diff --git a/C/Caesar Cipher b/C/Caesar Cipher deleted file mode 100644 index 155d02b03..000000000 --- a/C/Caesar Cipher +++ /dev/null @@ -1,89 +0,0 @@ -// to copile -> $ gcc -o cipherfile main.c -// create a link -> $ ln cipherfile decipherfile -// to execute (cipher) -> $ ./cipherfile in.txt out.txt 5 - // in.txt is the original file - // out.txt is the cipher file - // 5 is the key (caesar cipher) -// to execute (decipher) -> $ ./decipherfile cripto.txt out.txt 5 - - -#include -#include -#include - -typedef char byte; - -byte cipher(byte message, byte key) -{ - return message + key; - // avançando na tabela ascii -} - -byte decipher(byte cipher, byte key) -{ - return cipher - key; -} - -int main(int argc, char *argv[]) -{ - FILE *in, *out; - byte (*op)(byte, byte) = NULL; - byte key; - int c; - - if (argc < 4) - { - fprintf(stderr, "Uso: %s \n", argv[0]); - return -1; - } - - in = fopen(argv[1], "r"); - - if(!in) - { - fprintf(stderr, "Erro ao abrir %s para leitura\n", argv[1]); - return -2; - } - - out = fopen(argv[2], "w"); - - if(!out) - { - fprintf(stderr, "Erro ao abrir %s para escrita\n", argv[2]); - fclose(in); - return -3; - } - - if(!strcmp(argv[0], "./cipherfile")) - { - op = cipher; - } - - else if(!strcmp(argv[0], "./decipherfile")) - // se o argv[0] for igual "./decipherfile" ... - { - op = decipher; - } - - else - { - fprintf(stderr, "Operação desconhecida\n"); - fclose(in); - fclose(out); - - return -4; - } - - key = (byte) atoi(argv[3]); - // ^ ascii to int - - while((c = fgetc(in)) != EOF) - { - fputc(op((byte) c, key), out); - } - - fclose(in); - fclose(out); - - return 0; -} diff --git a/C/Chocolate Distribution Problem b/C/Chocolate Distribution Problem deleted file mode 100644 index 892b24591..000000000 --- a/C/Chocolate Distribution Problem +++ /dev/null @@ -1,73 +0,0 @@ -/* -Given an array A[] of N integers where each value represents number of chocolates in a packet. Each packet can have variable number of chocolates. There are m students, the task is to distribute chocolate packets such that : -1. Each student gets one packet. -2. The difference between the number of chocolates given to the students in packet with maximum chocolates and packet with minimum chocolates is minimum. - - - -Examples - -Input : A[] = {3, 4, 1, 9, 56, 7, 9, 12} - m = 5 -Output: Minimum Difference is 6 -We may pick 3,4,7,9,9 and the output -is 9-3 = 6 - - -Input : A[] = {7, 3, 2, 4, 9, 12, 56} - m = 3 -Output: Minimum difference is 2 -We can pick 2, 3 and 4 and get the minimum -difference between maximum and minimum packet -sizes. ie 4-2 = 2 - - - -Input: -The first line of input contains an integer T, denoting the no of test cases. Then T test cases follow. Each test case consists of three lines. The first line of each test case contains an integer N denoting the no of packets. Then in the next line are N space separated values of the array A[] denoting the values of each packet. The third line of each test case contains an integer m denoting the no of students. - -Output: -For each test case in a new line print the required answer . - -Constraints: -1 <=T<= 100 -1 <=N<= 100 -1 <=A[]<= 100 -1 <=m <=N - -Example: -Input: -2 -8 -3 4 1 9 56 7 9 12 -5 -7 -7 3 2 4 9 12 56 -3 -Output: -6*/ - -#include - -int main() { - //code - int t,n,c; - scanf("%d",&t); - while(t>0){ - scanf("%d",&n); - int a[n]; - for(i=0;ia[j+1]){ - temp=a[j+1]; - a[j+1]=a[j]; - a[j]=temp; - } - printf("%d\n",a[c-1]) - t--; - } - return 0; -} diff --git a/C/Converts temp b/C/Converts temp deleted file mode 100644 index 7bd18a021..000000000 --- a/C/Converts temp +++ /dev/null @@ -1,39 +0,0 @@ -#include - -int main() -{ - float celsius, fahrenheit; - char choice; - - printf("Choose the conversion for temperature"); - printf("\n 1.Enter C for Celsius to Fahrenheit "); - printf("\n 2.Enter F for Fahrenheit to Celsius "); - scanf("%c,&choice"); - - if (choice == 'C' || choice =='c' ) - { - printf("Enter temperature in Celsius: "); - scanf("%f", &celsius); - - fahrenheit = (celsius * 9 / 5) + 32; - - printf("The conversion is /n"); - printf("%.5f Celsius = %.5f Fahrenheit", celsius, fahrenheit); - } - else if (choice == 'F' || choice =='f' ) - { - printf("Enter temperature in Fahrenheit: "); - scanf("%f", &Fahrenheit); - - celsius = (fahrenheit − 32) x 5/9 ; - - printf("The conversion is /n"); - printf("%.5f Fahrenheit = %.5f Celsius ", fahrenheit, celsius); - } - else - printf("Wrong entry"); - - - - return 0; -} diff --git a/C/Countriestoyourname.c b/C/Countriestoyourname.c deleted file mode 100644 index 82b4a0245..000000000 --- a/C/Countriestoyourname.c +++ /dev/null @@ -1,91 +0,0 @@ -#include -#include - -// this program is made for fun. Write your name's first character and see wich country you belong to ... - -int main () -{ - printf(" enter your name's first character (upper type) : "); - char name ; - scanf("%c", &name); - if(name == 'A') { -printf("you belong to 'Austria' "); - } - if(name == 'B') { -printf("you belong to 'Belgium' "); - } - if(name == 'C') { -printf("you belong to 'Chad' "); - } - if(name == 'D') { -printf("you belong to 'Denmark' "); - } - if(name == 'E') { -printf("you belong to 'Egypt' "); - } - if(name == 'F') { -printf("you belong to 'Finland' "); - } - if(name == 'G') { -printf("you belong to 'Guinea' "); - } - if(name == 'H') { -printf("you belong to 'Hungary' "); - } - if(name == 'I') { -printf("you belong to 'Iceland' "); - } - if(name == 'J') { -printf("you belong to 'Jamaica' "); - } - if(name == 'K') { -printf("you belong to 'Kenya' "); - } - if(name == 'L') { -printf("you belong to 'Liberia' "); - } - if(name == 'M') { -printf("you belong to 'Mali' "); - } - if(name == 'N') { -printf("you belong to 'Niger' "); - } - if(name == 'O') { -printf("you belong to 'Oman' "); - } - if(name == 'P') { -printf("you belong to 'Philippines' "); - } - if(name == 'Q') { -printf("you belong to 'Qatar' "); - } - if(name == 'R') { -printf("you belong to 'Russia' "); - } - if(name == 'S') { -printf("you belong to 'Spain' "); - } - if(name == 'T') { -printf("you belong to 'Turkey' "); - } - if(name == 'U') { -printf("you belong to 'Uruguay' "); - } - if(name == 'V') { -printf("you belong to 'Venezuela' "); - } - if(name == 'W') { -printf("you belong to 'Kuwait' "); - } - if(name == 'X') { -printf("you belong to 'Luxembourg' "); - } - if(name == 'Y') { -printf("you belong to 'Yemen' "); - } - if(name == 'Z') { -printf("you belong to 'Zimbabwe' "); - } - -return 0 ; -} diff --git a/C/Factorial b/C/Factorial deleted file mode 100644 index 5a4edf9eb..000000000 --- a/C/Factorial +++ /dev/null @@ -1,17 +0,0 @@ -#include -unsigned long long int factorial(unsigned int i) -{ - if(i<=1) - { - return 1; - } - return i*factorial(i-1); -} -int main() - { - int i; - printf("Enter a number = n"); - scanf("%d",&i); - printf("Factorial of %d is %d \n",i,factorial(i)); - return 0; - } diff --git a/C/GCD.c b/C/GCD.c deleted file mode 100644 index ed5bf481b..000000000 --- a/C/GCD.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -int main() -{ - int n1, n2, i, gcd; - printf("Enter two integers: "); - scanf("%d %d", &n1, &n2); - for(i=1; i <= n1 && i <= n2; ++i) - { - if(n1%i==0&&n2%i==0) - { - gcd = i; - } - } - printf("G.C.D = %d",gcd); - return 0; -} diff --git a/C/GCD_Calculate.c b/C/GCD_Calculate.c deleted file mode 100644 index 345848880..000000000 --- a/C/GCD_Calculate.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -int main() -{ - int n1, n2; - printf("Enter two numbers: "); - scanf("%d%d",&n1,&n2); - int num1=n1,num2=n2; - while(n1 != n2) - { - if(n1 > n2) - n1 -= n2; - else - n2 -= n1; - } - printf("gcd of %d and %d = %d",num1,num2,n1); - return 0; -} diff --git a/C/Guess_My_Number.c b/C/Guess_My_Number.c deleted file mode 100644 index 9456ab6d1..000000000 --- a/C/Guess_My_Number.c +++ /dev/null @@ -1,98 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#define MAX_NUMBER 100 -#define MAX_NAME_SIZE 21 -#define MAX_INPUT_SIZE 15 - -/******************************* -Declarations & Global Variables -*******************************/ -void randomNumber(); -void getName(); -void userGuess(); - -char name[MAX_NAME_SIZE]; -int randomNum; - -typedef enum boolean{ - false, - true -} BOOL; - -/****************************** -Functions -*******************************/ -int main(int argc, char const *argv[]) { - - randomNumber(); - - //Only continue if the random number is valid - if(randomNum >=0 && randomNum < MAX_NUMBER){ - - getName(); - userGuess(); - - } else { - printf("Sorry but there seems to be an error. We will work to fix it as soon as possible."); - } -} - -void randomNumber(){ - - //Generate the random number - srand(time(NULL)); - randomNum = rand() % MAX_NUMBER; - - assert(randomNum >= 0 && randomNum < MAX_NUMBER); -} - -void getName(){ - printf("Hello! Welcome to Guess My Number. What is your name?\n"); - - while(fgets(name, MAX_NAME_SIZE, stdin) == NULL){ - printf("Please enter a name under 20 characters.\n"); - } - - assert(name != NULL); - - //Trim the newline character of the name string - name[strcspn(name,"\n")] = 0; - - assert(name != NULL); - - printf("Hi %s, let's get started!\n", name); -} - -void userGuess(){ - char input[MAX_INPUT_SIZE]; - int number; - int numTries = 0; - BOOL checkInput = false; - - assert(numTries == 0); - - printf("I am thinking of a number between 0 & 99. What do you think the number is?\n"); - - while(checkInput == false && fgets(input, MAX_INPUT_SIZE, stdin) != NULL){ - number = atoi(input); - if(number <= 0 || number >= 100) - printf("Please enter a valid number between 0 & 99.\n"); - else { - numTries++; - if(number < randomNum) - printf("That number is too low. Please try again.\n"); - else if(number > randomNum) - printf("That number is too high. Please try again.\n"); - else if(number == randomNum){ - printf("Good Job! You guessed my number in %d tries.\n", numTries); - checkInput = true; - } - } - } - -} diff --git a/C/H-open.c b/C/H-open.c deleted file mode 100644 index 9cfa24f96..000000000 --- a/C/H-open.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("Hello open source"); - return 0; -} diff --git a/C/H33L0_w0rld.c b/C/H33L0_w0rld.c deleted file mode 100644 index 03f4a12cd..000000000 --- a/C/H33L0_w0rld.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - printf("Hello World"); - return 0; - } diff --git a/C/HW b/C/HW deleted file mode 100644 index 2aab572d4..000000000 --- a/C/HW +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - printf("Hello world!\n"); - return 0; -} diff --git a/C/Hell_O.c b/C/Hell_O.c deleted file mode 100644 index 03fb12228..000000000 --- a/C/Hell_O.c +++ /dev/null @@ -1,11 +0,0 @@ -/* -Created by Glauber Magalhães -github.com/glaubermagal -*/ -#include - -int main() -{ - printf("Hello World"); - return 0; -} diff --git a/C/Hello Romania.c b/C/Hello Romania.c deleted file mode 100644 index 2cc859e75..000000000 --- a/C/Hello Romania.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -using namespace std; -main() { - for(int i=0; i<10; i++){ - printf("name \n"); - } -} diff --git a/C/Hello-Everyone.c b/C/Hello-Everyone.c deleted file mode 100644 index 5eebeb5d5..000000000 --- a/C/Hello-Everyone.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -main() -{ - printf("Hello! Everyone!"); -} diff --git a/C/Hello-world.c b/C/Hello-world.c deleted file mode 100644 index ca8751cee..000000000 --- a/C/Hello-world.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -void main() -{ -printf("Hello World!"); - -} diff --git a/C/HelloBrazil.c b/C/HelloBrazil.c deleted file mode 100644 index edf475650..000000000 --- a/C/HelloBrazil.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(){ - printf("Hello from Brazil!"); - return 0; -} diff --git a/C/HelloOpenSource.c b/C/HelloOpenSource.c deleted file mode 100644 index 30dd033fc..000000000 --- a/C/HelloOpenSource.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("Hello open source :)\n"); - return 0; -} diff --git a/C/HelloTaiwan.c b/C/HelloTaiwan.c deleted file mode 100644 index 5c7e99b20..000000000 --- a/C/HelloTaiwan.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -void main() -{ - printf("Hello Taiwan!!!\n"); -} diff --git a/C/HelloWorld.c b/C/HelloWorld.c deleted file mode 100644 index bfa71b82c..000000000 --- a/C/HelloWorld.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#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); - getch(); -} diff --git a/C/HelloWorld.cpp b/C/HelloWorld.cpp deleted file mode 100644 index b8866f1c0..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/C/HelloWorldOctoberFest.c b/C/HelloWorldOctoberFest.c deleted file mode 100644 index 411b99038..000000000 --- a/C/HelloWorldOctoberFest.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - printf("Hello World!\n"); - return 0; -} diff --git a/C/HelloWorldvmsantos.c b/C/HelloWorldvmsantos.c deleted file mode 100644 index a05f0d3a4..000000000 --- a/C/HelloWorldvmsantos.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(){ - printf("Hello, World.\n"); - return 0; -} diff --git a/C/Hello_Hacktoberfest.c b/C/Hello_Hacktoberfest.c deleted file mode 100644 index 319d1ef1d..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_World_TR.c b/C/Hello_World_TR.c deleted file mode 100644 index d6a0faefd..000000000 --- a/C/Hello_World_TR.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -main() -{ - printf("Merhaba Dunya!"); -} diff --git a/C/Hello_World_ptbr.c b/C/Hello_World_ptbr.c deleted file mode 100644 index 16bcfd180..000000000 --- a/C/Hello_World_ptbr.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main(void) -{ - printf("Olá Mundo!"); - - return 0; -} diff --git a/C/Hello__World.c b/C/Hello__World.c deleted file mode 100644 index 812701949..000000000 --- a/C/Hello__World.c +++ /dev/null @@ -1,8 +0,0 @@ - -#include - -int main() -{ - printf("*** Hello World! ***"); - return 0; -} diff --git a/C/Hello_in_C/HWorld b/C/Hello_in_C/HWorld deleted file mode 100644 index 3aef1d71d..000000000 --- a/C/Hello_in_C/HWorld +++ /dev/null @@ -1,9 +0,0 @@ -#include - - -int main(){ - - printf("Hello World!!") - - return 0; -} diff --git a/C/Hello_in_C/Hello world b/C/Hello_in_C/Hello world deleted file mode 100644 index fe8693f87..000000000 --- a/C/Hello_in_C/Hello world +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main() -{ - printf("Hello world\n"); -} diff --git a/C/Hello_in_C/heelo b/C/Hello_in_C/heelo deleted file mode 100644 index 6c3a29587..000000000 --- a/C/Hello_in_C/heelo +++ /dev/null @@ -1 +0,0 @@ -cout<<"hello world" diff --git a/C/Hello_in_C/heelo world b/C/Hello_in_C/heelo world deleted file mode 100644 index 5ff3bd203..000000000 --- a/C/Hello_in_C/heelo world +++ /dev/null @@ -1 +0,0 @@ -printf("hello world"); diff --git a/C/Hello_in_C/hello b/C/Hello_in_C/hello deleted file mode 100644 index 8cde7829c..000000000 --- a/C/Hello_in_C/hello +++ /dev/null @@ -1 +0,0 @@ -print("hello world") diff --git a/C/Hello_in_C/hello.c b/C/Hello_in_C/hello.c deleted file mode 100644 index 096bedd56..000000000 --- a/C/Hello_in_C/hello.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("Hello, World!"); - return 0; -} \ No newline at end of file diff --git a/C/Hello_in_C/palindrome.c b/C/Hello_in_C/palindrome.c deleted file mode 100644 index cb78013d3..000000000 --- a/C/Hello_in_C/palindrome.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -int main() -{ - int n, revInt = 0, rem, origInt; - - printf("Enter an integer: "); - scanf("%d", &n); - - origInt = n; - - while( n!=0 ) - { - rem = n%10; - revInt = revInt*10 + rem; - n /= 10; - } - - // palindrome if orignalInteger and reversedInteger are equal - if (origInt == revInt) - printf("%d is a palindrome.", origInt); - else - printf("%d is not a palindrome.", origInt); - - return 0; -} \ No newline at end of file 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_world_basic.c b/C/Hello_world_basic.c deleted file mode 100644 index 8d91b43a4..000000000 --- a/C/Hello_world_basic.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("Hello World"); - return 0; - } diff --git a/C/Hello_world_by_Selvah.c b/C/Hello_world_by_Selvah.c deleted file mode 100644 index 0c4618fa7..000000000 --- a/C/Hello_world_by_Selvah.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -void main() -{ -clrscr(); -printf("Hello World!); -getch(); -} diff --git a/C/Heloo.c b/C/Heloo.c deleted file mode 100644 index 45fb5b4cd..000000000 --- a/C/Heloo.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -int main() -{ - // printf() displays the string inside quotation - printf("Hello, World!"); - return 0; -} diff --git a/C/IWazHear b/C/IWazHear deleted file mode 100644 index 3b7617c27..000000000 --- a/C/IWazHear +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("Hello, World!"); - return 0; -} diff --git a/C/InplaceMergeSort.c b/C/InplaceMergeSort.c deleted file mode 100644 index 7ab569a01..000000000 --- a/C/InplaceMergeSort.c +++ /dev/null @@ -1,119 +0,0 @@ -#include -#include - -void swap(int * x, int * y ) -{ - int z = *x; - *x = *y; - *y = z; -} - - -void insertionSort(int *arr, int s, int e) -{ - int i, key, j; - for (i = s+1; i < e; i++) - { - key = arr[i]; - j = i-1; - while (j >= 0 && arr[j] > key) - { - arr[j+1] = arr[j]; - j = j-1; - } - arr[j+1] = key; - } -} - - - -void concat(int * arr, int l , int m, int r) -{ - int lh = m-l + 1 , rh = r-m ; - int * brr = malloc(sizeof(int)*lh) , * crr = malloc(sizeof(int)*rh) ; - int i, j = 0, k = l; - - insertionSort(arr, l , m); - - - insertionSort(arr,m+1,rh); - - printf("\n\n\n"); - for(int i = l ; i < lh ; i++ ) - printf("%d",arr[i]); - - printf("\n\n\n"); - for(int i = m+1 ; i < rh ; i++) - printf("%d",arr[i]); - - i=0; - - while( i < lh ) - { - - if( arr[i+l] >= arr[m+1] ) - { - swap(&arr[l+i],&arr[m+1]); - - insertionSort(arr, m+1,rh ); - - } - i++; - } -} - - - - - - - - - - - -void merge(int * arr, int l ,int r ) -{ - - if( r>l ) - { - - int m = (l+r)/2; - merge(arr,l,m); - merge(arr,m+1,r); - - concat(arr,l,m,r); - } - - -} - - - - -int main() -{ - -int * arr = malloc(sizeof(int )); - -int n; -scanf("%d",&n); - -for(int i = 0; i < n ; i ++) -scanf("%d",&arr[i]); - -printf("\n\n"); - -for(int i = 0 ; i < n ; i ++) -printf("%d ",arr[i]); - -merge(arr,0,n-1); - -printf("\n\n"); - -for(int i = 0 ; i < n ; i ++) -printf("%d ",arr[i]); - - -return 0 ; -} diff --git a/C/Insert_and_Delete_with_BubbleSorting b/C/Insert_and_Delete_with_BubbleSorting deleted file mode 100644 index bdef3ddb5..000000000 --- a/C/Insert_and_Delete_with_BubbleSorting +++ /dev/null @@ -1,193 +0,0 @@ -/* Jaako A. Andes \ BSCS - 2A - INSERTION AND DELETION - Copyright 2016 - 2017 */ - -//HEADER FILE -#include -#include - -//Function Prototype -int ID_Option(int x[],int y); -int print(int x[],int y); -int scan(int x[], int y); -int insert(int x[], int y); -int delete(int x[], int y); -int bsort(int x[], int y); -//The code is not Beautiful but it will work. I think? -int main(){ - int arr = 0; int pro = 0; - int count; int safe = 0; - printf("[+]Enter the size of the array\n"); - scanf("%d",&arr); - int array[arr]; - if(arr <= 0){ - printf("\t[!]Must be greater than 1\n"); - return 0; - } - printf("[!]Warning: Entering 0 below is a shortcut to Insert and Delete\n"); - printf("[+]Enter elements to be processed\n"); - scanf("%d",&pro); - if(pro > arr){ - printf("\t[!]Enter within the array range\n"); - return 0; - }else if(pro <= 0){ - ID_Option(array,arr); - return 0; - } - //safe case - for(count = 0; count < arr; count++){ - array[count] = 0; - } - printf("[^]Entering numbers\n"); - for(count = 0; count < pro; count++){ - printf("\t[!]For array[%d] : ", count); - scanf("%d",&safe); - array[count] = safe; - } - printf("\t[*]Finished!\n"); - scan(array, arr); -return 0; -} -int scan(int x[], int y){ - int num = 0; - printf("[!]Print all the numbers\n"); - printf("[+]Are you sure [1]Yes or [2]No?"); - scanf("%d",&num); - if(num == 1){ - print(x,y); - return 0; - }else if(num == 2){ - ID_Option(x,y); - return 0; - }else printf("\t[*]Invalid Input\n"); -} -int print(int x[], int y){ - int cout; - for(cout = 0; cout < y; cout++){ - printf("%d)\tArray[%d] : %d\n", cout+1,cout, x[cout]); - } - ID_Option(x,y); - return 0; -} -int ID_Option(int x[], int y){ - int pot = 0; - printf("[!]Insert, Bubble Sort or Delete Option INVOKED!!!\n"); - printf("\t[1]Insert\n"); - printf("\t[2]Delete\n"); - printf("\t[3]Bubble Sort\n"); - printf("\t[100]Exit {^_^}\n"); - scanf("%d",&pot); - if(pot == 1){ - insert(x,y); - return 0; - }else if(pot == 2){ - delete(x,y); - return 0; - }else if(pot == 100){ - printf("Muchas Gracias!!Hasta la vista"); - return 0; - }else if(pot == 3){ - bsort(x,y); - } - printf("\t[*]Invalid Input\n"); - return 0; -} -int insert(int x[], int y){ - int weed; int cot; int ins; - int pos; int val; int ins1; - printf("[*]INSERT OPTION INVOKED!!\n"); - printf("\t[1]Insert?\n"); - printf("\t[2]Show?\n"); - printf("\t[3]Go back to menu\n"); - printf("\t[100]Exit?\n"); - scanf("%d",&weed); - if(weed == 1){ - ins = y; - printf("[^]Enter the position to be inserted : "); - scanf("%d",&pos); - printf("\n[!]Enter the value: "); - scanf("%d",&val); - printf("\n---INSERTING---\n"); - while(ins >= pos){ - x[ins+1] = x[ins]; - ins = ins - 1; - } - x[pos] = val; - - insert(x,y); - }else if(weed == 2){ - for(cot = 0; cot < y; cot++){ - printf("%d)\tIndex[%d] : %d\n", cot+1,cot, x[cot]); - } - insert(x,y); - }else if(weed == 100){ - return 0; - }else if(weed == 3){ - ID_Option(x,y); - } - -} -int delete(int x[], int y){ - int drugs; int posx; int cotx = 0; - - printf("[*]DELETE OPTION INVOKED!!\n"); - printf("\t[1]Delete?\n"); - printf("\t[2]Show?\n"); - printf("\t[100]Exit?\n"); - scanf("%d",&drugs); - if(drugs == 1){ - printf("[^]Enter the position to be Deleted : "); - scanf("%d",&posx); - printf("\n---DELETING---\n"); - x[posx] = 0; - while(posx < y){ - x[posx] = x[posx+1]; - posx = posx + 1; - } - x[y] = 0; - delete(x,y); - }else if(drugs == 2){ - for(cotx = 0; cotx < y; cotx++){ - printf("%d)\tIndex[%d] : %d\n", cotx+1,cotx, x[cotx]); - } - delete(x,y); - }else if(drugs == 100){ - return 0; - } - -} -int bsort(int x[], int y){ - int pots = 0; int drug = 0; - int co = 0; int temp = 0; - printf("[*]BUBBLE SORT OPTION INVOKED!!\n"); - printf("\t[1]Bubble Sort?\n"); - printf("\t[2]Show?\n"); - printf("\t[100]Exit?\n"); - scanf("%d",&drug); - if(drug == 1){ - printf("\n---MICHAEL BUBbLE SORTING---\n"); - while( pots < y){ - for(co = 0; co < y; co++){ - if(co == y){ - break; - bsort(x,y); - } - if(x[co] >= x[co+1]){ - temp = x[co+1]; - x[co+1] = x[co]; - x[co] = temp; - } - } - pots++; - } - bsort(x,y); - }else if(drug == 2){ - for(co = 0; co < y; co++){ - printf("%d)\tIndex[%d] : %d\n", co+1,co, x[co]); - } - bsort(x,y); - }else if(drug == 100){ - return 0; - } - -} diff --git a/C/Keshavprogramhelloworld.c b/C/Keshavprogramhelloworld.c deleted file mode 100644 index 00a1907e3..000000000 --- a/C/Keshavprogramhelloworld.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - - -int main() -{ - printf("HELLO WORLD"); - return 0; -} diff --git a/C/LIS.c b/C/LIS.c deleted file mode 100644 index bcd351687..000000000 --- a/C/LIS.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Dynamic Programming C++ implementation of LIS problem */ -#include -using namespace std; - -/* lis() returns the length of the longest increasing - subsequence in arr[] of size n */ -int lis( int arr[], int n ) -{ - int lis[n]; - - lis[0] = 1; - - /* Compute optimized LIS values in bottom up manner */ - for (int i = 1; i < n; i++ ) - { - lis[i] = 1; - for (int j = 0; j < i; j++ ) - if ( arr[i] > arr[j] && lis[i] < lis[j] + 1) - lis[i] = lis[j] + 1; - } - - // Return maximum value in lis[] - return *max_element(lis, lis+n); -} - -/* Driver program to test above function */ -int main() -{ - int arr[] = { 10, 22, 9, 33, 21, 50, 41, 60 }; - int n = sizeof(arr)/sizeof(arr[0]); - printf("Length of lis is %d\n", lis( arr, n ) ); - return 0; -} diff --git a/C/LeapYear.c b/C/LeapYear.c deleted file mode 100644 index bffadb970..000000000 --- a/C/LeapYear.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - -int main(){ - int year; - - printf("Enter the year"); - scanf("%d",&year); - - if (((year % 4 == 0) && (year % 100!= 0)) || (year%400 == 0)) - printf("%d is a leap year", year); - else - printf("%d is not a leap year", year); - - - return 0; -} diff --git a/C/LinkedList_CountNodes.c b/C/LinkedList_CountNodes.c deleted file mode 100644 index 3e31ee3c3..000000000 --- a/C/LinkedList_CountNodes.c +++ /dev/null @@ -1,57 +0,0 @@ -#include -using namespace std; -struct node -{ - int data; - node *next; -}; -void node_ins(node **head,int val) -{ - node *temp = new node(); - temp->data=val; - temp->next=NULL; - if((*head) == NULL) - { - (*head) = temp; - return; - } - temp->next=(*head); - (*head)=temp; -} -void display(node *head) -{ - while(head!=NULL) - { - cout<data<<" "; - head=head->next; - } - cout<<"\n"; -} -int len_iter(node* head) -{ - int count = 0; - while(head!=NULL) - { - count++; - head=head->next; - } - return count; -} -int len_rec(node *head) -{ - if(head==NULL) - return 0; - return 1 + len_rec(head->next); -} -int main() -{ - node *head = NULL; - node_ins(&head,5); - node_ins(&head,4); - node_ins(&head,3); - node_ins(&head,2); - node_ins(&head,1); - display(head); - cout<<"iter :"< -#include - -//------------------------------------------------------------------------------------- -// CONSTANTS and TYPES -//------------------------------------------------------------------------------------- - -struct Node { - int data; - struct Node *next; -}; - -struct linkedList { - int size; - struct Node *top; -}; - -typedef struct linkedList *LinkedList; -typedef struct Node *Node; - -//------------------------------------------------------------------------------------- -// PROTOTYPES -//------------------------------------------------------------------------------------- - -LinkedList newList(); -LinkedList addNode(LinkedList list, int value); -int getNode(LinkedList list, int pos); -LinkedList removeNode(LinkedList list, int pos); -void printList(LinkedList list); - -//------------------------------------------------------------------------------------- -// FUNCTIONS -//------------------------------------------------------------------------------------- - -int main(int numParms, char *parms[]){ - - //create a new linked list - LinkedList myList; - myList = newList(); - - //Add test values to list and print it - myList = addNode(myList, 4); - printList(myList); - - myList = addNode(myList, 3); - printList(myList); - - myList = addNode(myList, 1); - myList = addNode(myList, 5); - myList = addNode(myList, 7); - printList(myList); - - myList = removeNode(myList, 3); - myList = removeNode(myList, 2); - myList = removeNode(myList, 1); - printList(myList); - - printf("End of program.\n"); - - return 0; - -} - -LinkedList newList(){ - - LinkedList list; - - //Allocate memory in heap to the list - list = (LinkedList) malloc(sizeof(struct linkedList)); - //Initalize the list by setting the top node to NULL and size to 0 - list -> top = NULL; - list -> size = 0; - - return list; -} - -LinkedList addNode(LinkedList list, int value){ - - Node newNode; - - //Allocate memory in heap to the node - newNode = (Node) malloc(sizeof(Node)); - //Asign value to newNode.data - newNode -> data = value; - //Set the next node for the newNode as the current top of the list - newNode -> next = list -> top; - - //Set the top of the list to newNode and increase the size of the list - list -> top = newNode; - list -> size++; - - return list; -} - -int getNode(LinkedList list, int pos){ - - int entry; - int count; - Node current; - - //Select the the node at the top of the list as our first node - current = list->top; - - //Keep selecting the next node till we get to our desired position - for(count=0; count next; - } - - //Get the value of the node and return it - entry = current -> data; - return entry; - -} - -LinkedList removeNode(LinkedList list, int pos){ - int count; - Node current; - Node previous; - - //Start the search from the top of the list - previous = NULL; - current = list -> top; - //Loop throug the list till we reach the position our node is in. Keep selecting - //the next node while also keeping track of the previous node - for(count=0; count next; - } - - //If the previous node is NULL, we are deleting the element at the top of the list - if(previous == NULL){ - list -> top = current -> next; - } - //Else remove the current element by delinking from the list - else { - previous -> next = current -> next; - } - - //Free the current node from memory - free(current); - - list -> size--; - return list; -} - -void printList(LinkedList list){ - int count; - - //Only print the list if there are 1 or more nodes - if(list->size > 0){ - - printf("Contents of list:\n"); - - for(count=0; countsize; count++){ - printf("Element %d is %d\n", count, getNode(list, count)); - } - - printf("\n"); - - } else { - printf("The list is empty."); - } -} diff --git a/C/Linklist_reverse b/C/Linklist_reverse deleted file mode 100644 index b4de6acf7..000000000 --- a/C/Linklist_reverse +++ /dev/null @@ -1,92 +0,0 @@ -#include -#include - -struct Node { - int data; - struct Node *next; -}; - -typedef struct Node *head; -Node newList(); -Node addNode(Node list, int value); - -struct Node * reverse(struct node *prev,struct node *cur); -{ -if (cur) -{reverse(cur,cur->next); -cur->next=prev; -} -else -{head=prev -} -} - - -int main(int numParms, char *parms[]){ - Node myList; - myList = newList(); - - - myList = addNode(myList, 5); - myList = addNode(myList, 4); - myList = addNode(myList, 3); - myList = addNode(myList, 2); - myList = addNode(myList, 1); - printList(myList); - - head=reverse(NULL,head); - printList(myList); - - printf("End of program.\n"); - - return 0; - -} - -Node newList(){ - - LinkedList list; - list = (LinkedList) malloc(sizeof(struct linkedList)); - - list -> next = NULL; - list -> data = 0; - - return list; -} - -Node addNode(LinkedList list, int value){ - - Node newNode; - - //Allocate memory in heap to the node - newNode = (Node) malloc(sizeof(Node)); - //Asign value to newNode.data - newNode -> data = value; - //Set the next node for the newNode as the current top of the list - newNode -> next = list -> top; - - //Set the top of the list to newNode and increase the size of the list - list -> top = newNode; - list -> size++; - - return list; -} - -void printList(Node list){ - int count; - - //Only print the list if there are 1 or more nodes - if(list->size > 0){ - - printf("Contents of list:\n"); - - for(count=0; countsize; count++){ - printf("Element %d is %d\n", count, getNode(list, count)); - } - - printf("\n"); - - } else { - printf("The list is empty."); - } -} diff --git a/C/Longest Common Sub-sequence.c b/C/Longest Common Sub-sequence.c deleted file mode 100644 index fce8c30c1..000000000 --- a/C/Longest Common Sub-sequence.c +++ /dev/null @@ -1,84 +0,0 @@ -#include -#include -#include - -int m,n,C[20][20]; -char X[20],Y[20],B[20][20]; -int max(int a,int b) -{ - return (a>b)?a:b; -} -void lcs_length(char X[],char Y[]) //This function contains the DP code and creates the table -{ - m=strlen(X); - n=strlen(Y); - int i,j; - for(i=0;i<=m;i++) - { - C[i][0]=0; - } - for(j=0;j<=n;j++) - { - C[0][j]=0; - } - - for(i=1;i<=m;i++) - { - for(j=1;j<=n;j++) - { - if(X[i-1]==Y[j-1]) - { - C[i][j]=C[i-1][j-1]+1; - B[i][j]='d'; - } - else if(C[i-1][j]>=C[i][j-1]) - { - C[i][j]=C[i-1][j]; - B[i][j]='u'; - } - else - { - C[i][j]=C[i][j-1]; - B[i][j]='l'; - } - } - } -} -void print_lcs(int i,int j) //This function prints the actual lcs -{ - if(i==0 || j==0) - return ; - if(B[i][j]=='d') - { - print_lcs(i-1,j-1); - printf("%c",X[i-1]); - } - else if(B[i][j]=='u') - print_lcs(i-1,j); - else - print_lcs(i,j-1); -} -int main() -{ - int i,res,j; - printf("Enter the sequence X\n"); - scanf("%s",X); - - printf("Enter the sequence Y\n"); - scanf("%s",Y); - - lcs_length(X,Y); - printf("Matrix C:\n"); - for(i=0;i<=m;i++) - { - for(j=0;j<=n;j++) - printf("%d ",C[i][j]); - printf("\n"); - } - - res=C[m][n]; - printf("Longest Common Sub-Sequence Length=%d\n",res); - print_lcs(m,n); - return 0; -} - diff --git a/C/Longest Increasing Subsequence.c b/C/Longest Increasing Subsequence.c deleted file mode 100644 index b3c5aca8c..000000000 --- a/C/Longest Increasing Subsequence.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Dynamic Programming C implementation of LIS problem */ -#include -#include - -/* lis() returns the length of the longest increasing - subsequence in arr[] of size n */ -int lis( int arr[], int n ) -{ - int *lis, i, j, max = 0; - lis = (int*) malloc ( sizeof( int ) * n ); - - /* Initialize LIS values for all indexes */ - for (i = 0; i < n; i++ ) - lis[i] = 1; - - /* Compute optimized LIS values in bottom up manner */ - for (i = 1; i < n; i++ ) - for (j = 0; j < i; j++ ) - if ( arr[i] > arr[j] && lis[i] < lis[j] + 1) - lis[i] = lis[j] + 1; - - /* Pick maximum of all LIS values */ - for (i = 0; i < n; i++ ) - if (max < lis[i]) - max = lis[i]; - - /* Free memory to avoid memory leak */ - free(lis); - - return max; -} - -/* Driver program to test above function */ -int main() -{ - int n,i; - scanf("%d", &n); - int arr[n]; - for (i = 0; i < n; i++){ - scanf("%d", &arr[i]); - } - printf("%d \n", lis( arr, n ) ); - return 0; -} diff --git a/C/MAGIC_SQUARE.c b/C/MAGIC_SQUARE.c deleted file mode 100644 index 3159d0fa8..000000000 --- a/C/MAGIC_SQUARE.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -int main() -{ -int n; - -printf("enter the value of n to calculate the n*n magic square:"); -scanf("%d",&n); -int a[n][n]; -int i,j; -for(i=0;i=0) -{ -j=0; -a[i][j]=p; -p++; -i--; -j++; -} - -else if(a[i][j]!=0) -{ -i+=2; -j--; -a[i][j]=p; -p++; -i--;j++; -} - -else -{ -a[i][j]=p; -p++; -i--; -j++; -} - -} - -for(i=0;i -main() -{int a[100][100]={0}; -int i=0,n,p=1,j; -scanf("%d",&n); - -j=n/2; -int g=n*n; -while(p<=g) -{ - if(i==-1&&j==-1) -{i=i+2; -j=j+1; -a[i][j]=p; -p++; -i--; -j--; -} -else if(i==-1) -{i=i+n; -a[i][j]=p; -i--;j--;p++; -} -else if(j==-1) -{j=j+n; -a[i--][j--]=p++; -} -else if(a[i][j]!=0) -{i=i+2; -j++; -a[i][j]=p++; -i--;j--; -} -else -{a[i--][j--]=p++; -} -} -for(i=0;i -#define ll long long - -#ifndef ONLINE_JUDGE - #define gc getchar -#else - #define gc getchar_unlocked -#endif - -int read_int() { - char c = gc(); - while((c < '0' || c > '9') && c != '-') c = gc(); - int ret = 0; - int neg = 1; - if (c == '-') { - neg = -1; - c = gc(); - } - while(c >= '0' && c <= '9') { - ret = 10 * ret + c - 48; - c = gc(); - } - return neg*ret; -} - -int A[100000]; - -int main() { - int N, min, max, i, K; ll res; - - scanf("%d %d\n", &N, &K); - if (K == 0) { - for(i=0;i max) - max = A[i]; - } - for(i=0;i - -int main() -{ - int m, n, p, q, c, d, k, sum = 0; - int first[10][10], second[10][10], multiply[10][10]; - - printf("Enter number of rows and columns of first matrix\n"); - scanf("%d%d", &m, &n); - printf("Enter elements of first matrix\n"); - - for (c = 0; c < m; c++) - for (d = 0; d < n; d++) - scanf("%d", &first[c][d]); - - printf("Enter number of rows and columns of second matrix\n"); - scanf("%d%d", &p, &q); - - if (n != p) - printf("The matrices can't be multiplied with each other.\n"); - else - { - printf("Enter elements of second matrix\n"); - - for (c = 0; c < p; c++) - for (d = 0; d < q; d++) - scanf("%d", &second[c][d]); - - for (c = 0; c < m; c++) { - for (d = 0; d < q; d++) { - for (k = 0; k < p; k++) { - sum = sum + first[c][k]*second[k][d]; - } - - multiply[c][d] = sum; - sum = 0; - } - } - - printf("Product of the matrices:\n"); - - for (c = 0; c < m; c++) { - for (d = 0; d < q; d++) - printf("%d\t", multiply[c][d]); - - printf("\n"); - } - } - - return 0; -} diff --git a/C/Multiplication Table b/C/Multiplication Table deleted file mode 100644 index d8deea418..000000000 --- a/C/Multiplication Table +++ /dev/null @@ -1,18 +0,0 @@ -#include -int main() -{ - unsigned int n, i, range; - - printf("Enter an integer: "); - scanf("%d",&n); - - printf("Enter the range: "); - scanf("%d", &range); - - for(i=1; i <= range; ++i) - { - printf("%d * %d = %d \n", n, i, n*i); - } - - return 0; -} diff --git a/C/Newton Forward Backward Divided Difference.c b/C/Newton Forward Backward Divided Difference.c deleted file mode 100644 index 536e2a916..000000000 --- a/C/Newton Forward Backward Divided Difference.c +++ /dev/null @@ -1,161 +0,0 @@ -#include -#include - -void newton_divided() { - printf("\t\tNewton's Divided Difference\n\n"); - int n,i,n1,j; - printf("Enter n : "); - scanf("%d",&n); - float x[n],y[n],x1,p,ans=0; - printf("Enter Values of X : "); - for(i = 0; i < n; i++) { - scanf("%f",&x[i]); - } - printf("Enter Values of Y : "); - for(i = 0; i < n; i++) { - scanf("%f",&y[i]); - } - printf("Enter Value of X1 : "); - scanf("%f",&x1); - n1 = n-1; - float req[n-1],del[n]; - for(i = 0; i < n; i++) - del[i] = y[i]; - for(j = 0; j < n1; j++) { - printf("\n----- %d divided difference -----\n\n",j+1); - for(i = 0; i < n1-j; i++) { - del[i] = del[i+1] - del[i]; - del[i] /= (x[i+j+1] - x[i]); - printf("Diff[%d] : %.4f\n",j,del[i]); - } - req[j] = del[0]; - - } - printf("\n------------------------------\n"); - ans = y[0]; - for(i = 0; i < n1; i++) { - float m = 1; - for(j = i; j >= 0; j--) { - m *= (x1-x[j]); - } - ans += (m*req[i]); - } - - printf("f(%.2f) = %.4f\n",x1,ans); -} - -void newton_forward() { -printf("\t\tNewton's Forward Difference\n\n"); - int n,i,n1,j; - printf("Enter n : "); - scanf("%d",&n); - float x[n],y[n],x1,p,ans=0; - printf("Enter Values of X : "); - for(i = 0; i < n; i++) { - scanf("%f",&x[i]); - } - printf("Enter Values of Y : "); - for(i = 0; i < n; i++) { - scanf("%f",&y[i]); - } - printf("Enter Value of X1 : "); - scanf("%f",&x1); - n1 = n-1; - float req[n-1],del[n]; - for(i = 0; i < n; i++) - del[i] = y[i]; - for(j = 0; j < n1; j++) { - printf("\n----- %d Forward difference -----\n\n",j+1); - for(i = 0; i < n1-j; i++) { - del[i] = del[i+1] - del[i]; - printf("Diff[%d] : %.4f\n",j,del[i]); - } - req[j] = del[0]; - - } - printf("\n------------------------------\n"); - p = (x1-x[0])/(x[1]-x[0]); - printf("p = %f\n",p); - ans = y[0]; - for(i = 0; i < n1; i++) { - j = i+1; - float m = 1; - m /= fact(j); - while(j) { - m *= (p-j+1); - j--; - } - ans += (m*req[i]); - } - printf("\ny(%f) = %f\n",x1,ans); -} - - -void newton_backward() { -printf("\t\tNewton's Backward Difference\n\n"); - int n,i,n1,j; - printf("Enter n : "); - scanf("%d",&n); - float x[n],y[n],x1,p,ans=0; - printf("Enter Values of X : "); - for(i = 0; i < n; i++) { - scanf("%f",&x[i]); - } - printf("Enter Values of Y : "); - for(i = 0; i < n; i++) { - scanf("%f",&y[i]); - } - printf("Enter Value of X1 : "); - scanf("%f",&x1); - n1 = n-1; - float req[n-1],del[n]; - for(i = 0; i < n; i++) - del[i] = y[i]; - for(j = 0; j < n1; j++) { - printf("\n----- %d Backward difference -----\n\n",j+1); - for(i = 0; i < n1-j; i++) { - del[i] = del[i+1] - del[i]; - printf("Diff[%d] : %.4f\n",j,del[i]); - } - req[j] = del[i-1]; - - } - printf("\n------------------------------\n"); - p = (x1-x[n-1])/(x[1]-x[0]); - printf("p = %f\n",p); - ans = y[n-1]; - for(i = 0; i < n1; i++) { - j = i+1; - float m = 1; - m /= fact(j); - while(j) { - m *= (p+j-1); - j--; - } - ans += (m*req[i]); - } - printf("\ny(%.4f) = %.4f\n",x1,ans); -} - -int fact(int n) { - if(n == 0 || n == 1) - return 1; - return n*fact(n-1); -} - -int main() { - printf("1.Newton Forward Difference\n"); - printf("2.Newton Backward Difference\n"); - printf("3.Newton Divided Difference\n"); - printf("Enter Your Choice : "); - int ch; - scanf("%d",&ch); - switch(ch) { - case 1: newton_forward(); - break; - case 2: newton_backward(); - break; - case 3: newton_divided(); - break; - } -} diff --git a/C/Ola_Mundo_Hacktober.c b/C/Ola_Mundo_Hacktober.c deleted file mode 100644 index 2e2e0a970..000000000 --- a/C/Ola_Mundo_Hacktober.c +++ /dev/null @@ -1,7 +0,0 @@ -//By Carlos Henrique Rorato -#include - -main() -{ - printf("Olá mundo!!! xD"); -} diff --git a/C/PT_HelloWorld b/C/PT_HelloWorld deleted file mode 100644 index bedfd745e..000000000 --- a/C/PT_HelloWorld +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - - -int main() -{ - - //Hello World in Portuguese - - printf("Ola Mundo"); - - - return 0; -} diff --git a/C/Playfair_cipher.c b/C/Playfair_cipher.c deleted file mode 100644 index 1833c5233..000000000 --- a/C/Playfair_cipher.c +++ /dev/null @@ -1,90 +0,0 @@ -//play fair encryption -#include -#include -int main() -{ - char key[26],plain[1000],cipher[1000],ch[1000][2],mat[5][5]; - int temp[26]={0}; - int size,i,j,x=0,y=0,k,index1[2],index2[2],z=0; - printf("Enter your plaintext here\n"); - scanf("%s",plain); - for(i=0;i -#include -#include - -int main(int argc, char* argv[]) -{ - int i,k; - - for(i=0;i<3;i++) - { - if(fork()==0) - { - printf("Soy el hijo de %d (pid: %d)\n", (int) getppid(), (int) getpid()); - printf("Soy el padre de %d (pid: %d)\n", (int) getpid(), (int) getppid()); - - - if(i==0) - { - for(k=0;k<1;k++) - { - if(fork()==0) - { - printf("Soy el hijo de %d (pid: %d)\n", (int) getppid(), (int) getpid()); - - printf("Soy el padre de %d (pid: %d)\n", (int) getpid(), (int) getppid()); - break; - - } - - - } - } - - break; - - - - } - - - - - } - - while(1); - - return 0; -} diff --git a/C/Producer Consumer.c b/C/Producer Consumer.c deleted file mode 100644 index d56b46de6..000000000 --- a/C/Producer Consumer.c +++ /dev/null @@ -1,63 +0,0 @@ -#include /* Symbolic Constants */ - -#include -#include -#include /* POSIX Threads */ - - -#define BUFFER_SIZE 10 -#define BREAK_CONDITION 20 - -typedef struct -{ -int items; -} item; -item buffer[BUFFER_SIZE]; -int countproduced=0; -int countconsumed=0; -int in = 0; -int out = 0; -item *nextproduced; -item *nextconsumed; -void *Consumer(void *arg) -{ - while (1) - { printf("\nConsumer thread"); - while (in == out) {printf("\n\t Buffer Empty");sleep(1);} - - nextconsumed = &buffer[out]; - printf("\n\tConsumed : %d ",++countconsumed); - out = (out + 1) % BUFFER_SIZE; - if(countconsumed==BREAK_CONDITION)break; - } - return NULL; -} - -void *Producer(void *arg) -{ - while (1) - { - printf("\nProducer thread"); - while (((in + 1) % BUFFER_SIZE) == out) {printf("\n\t Buffer Full");sleep(1);} - - nextproduced=malloc(sizeof(item*)); - nextproduced->items=++countproduced; - printf("\n\tProduced : %d ",countproduced); - buffer[in] = *nextproduced; - in = (in + 1) % BUFFER_SIZE; - if(countproduced==BREAK_CONDITION)break; - - } - return NULL; -} - -int main() -{ - pthread_t producer_thread_id, consumer_thread_id; - - pthread_create(&producer_thread_id, NULL, Producer, NULL); - pthread_create(&consumer_thread_id, NULL, Consumer, NULL); - pthread_join(producer_thread_id, NULL); - pthread_join(consumer_thread_id, NULL); - return 0; -} \ No newline at end of file diff --git a/C/Program to reverse a String b/C/Program to reverse a String deleted file mode 100644 index 16834b69b..000000000 --- a/C/Program to reverse a String +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include -void main() -{ - int i, j, k; - char str[100]; - char rev[100]; - printf("Enter a string:\t"); - scanf("%s", str); - printf("The original string is %s\n", str); - for(i = 0; str[i] != '\0'; i++); - { - k = i-1; - } - for(j = 0; j <= i-1; j++) - { - rev[j] = str[k]; - k--; - } - printf("The reverse string is %s\n", rev); - getch(); -} diff --git a/C/Queue_Simple_code b/C/Queue_Simple_code deleted file mode 100644 index ce379191e..000000000 --- a/C/Queue_Simple_code +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @author : JAAKO ANDES - * @course: BSCS - 2A - * - * [+]DEQUEUE - * - */ - - -//HEADER -#include - -//GLOBAL VARIABLES -#define SIZE 50 -int queue[SIZE], front = 0, rear = 0; - -//FUNCTION DECLARATION -void display(); -void enqueue(int no); -void dequeue(); - - -void main() { - int choice = 0, num; - while(choice!=4) { - printf("\tMENU\n "); - printf("\t[1]Enter an ITEM\n"); - printf("\t[2]Delete an ITEM\n"); - printf("\t[3]Display ELEMENTS\n"); - printf("\t[4]Exit\n"); - printf("What art thou choice: "); - scanf("%d", &choice); - if(choice==1) { - printf("Enter an ITEM to insert into the queue:\t"); - scanf("%d", &num); - enqueue(num); } - else if(choice==2) dequeue(); - else if(choice==3) display(); - else if(choice==4) { - printf("The Program is Excited!. Thank you!\n"); - return; } - else - printf("Duh?! Invalid choice!\n"); } -} - - - -void display () { - int i; - if((rear!=0)&&(front!=rear)) { - printf("ITEM in the queue are:\n"); - for(i=front; i -void insertionSortRecursive(int arr[], int n) -{ - if (n <= 1) - return; - insertionSortRecursive( arr, n-1 ); - int last = arr[n-1]; - int j = n-2; - while (j >= 0 && arr[j] > last) - { - arr[j+1] = arr[j]; - j--; - } - arr[j+1] = last; -} -void printArray(int arr[], int n) -{int i; - for (i=0; i < n; i++) - printf("%d ",arr[i]); -} -int main() -{ - int n,i; - printf("Enter the size of array to sort:"); - scanf("%d",&n); - int arr[n]; - printf("Enter the elements of array:"); - for(i=0;i -#include - -// Run the program -int main(int argc, char** argv) { - - // Print out the message! - fprintf(stdout, "Hello from RenFraser!"); - - // End the program. - return 0; -} diff --git a/C/Segmentation.c b/C/Segmentation.c deleted file mode 100644 index 072dbbd6e..000000000 --- a/C/Segmentation.c +++ /dev/null @@ -1,85 +0,0 @@ -#include -#include -struct list -{ - int seg; - int base; - int limit; - struct list *next; -} *p; -void insert(struct list *q,int base,int limit,int seg) -{ - if(p==NULL) - { - p=malloc(sizeof(struct list)); - p->limit=limit; - p->base=base; - p->seg=seg; - p->next=NULL; - } - else - { - while(q->next!=NULL) - { - Q=q->next; - Printf(“yes”) - } - q->next=malloc(sizeof(Struct list)); - q->next ->limit=limit; - q->next ->base=base; - q->next ->seg=seg; - q->next ->next=NULL; - } -} -int find(struct list *q,int seg) -{ - while(q->seg!=seg) - { - q=q->next; - } - return q->limit; -} -int search(struct list *q,int seg) -{ - while(q->seg!=seg) - { - q=q->next; - } - return q->base; -} -int main() -{ - p=NULL; - int seg,offset,limit,base,c,s,physical; - printf("Enter segment table/n"); - printf("Enter -1 as segment value for termination\n”); - do - { - printf(“Enter segment number”); - scanf(“%d”,&seg); - if(seg!=-1) - { - printf(“Enter base value:”); - scanf(“%d”,&base); - printf(“Enter value for limit:”); - scanf(“%d”,&limit); - insert(p,base,lmit,seg); - } - } - while(seg!=-1) - printf(“Enter offset:”); - scanf(“%d”,&offset); - printf(“Enter bsegmentation number:”); - scanf(“%d”,&seg); - c=find(p,seg); - s=search(p,seg); - if(offset - -int main() { - int amount, rate, time, si; - - printf("\nEnter Principal Amount : "); - scanf("%d", &amount); - - printf("\nEnter Rate of Interest : "); - scanf("%d", &rate); - - printf("\nEnter Period of Time : "); - scanf("%d", &time); - - si = (amount * rate * time) / 100; - printf("\nSimple Interest : %d", si); - - return 0; -} diff --git a/C/Simple_Linked-list b/C/Simple_Linked-list deleted file mode 100644 index fbd8d5fd9..000000000 --- a/C/Simple_Linked-list +++ /dev/null @@ -1,97 +0,0 @@ -/*@author: Jaako Andes - BSCS - 2A - Copyright 2016 - 2017 */ - -#include -#include - -struct node_R { - int data_R; - struct node_R *next; -}; - - -void insertFirst (struct node_R** head_R_ref, int new_data_R) { - struct node_R* new_node_R = (struct node_R*)malloc(sizeof(struct node_R)); - new_node_R->data_R = new_data_R; - new_node_R->next = (*head_R_ref); - (*head_R_ref) = new_node_R; -} - -void append(struct node_R** head_R_ref, int new_data_R) { - struct node_R* new_node_R = (struct node_R*)malloc(sizeof(struct node_R)); - struct node_R *last = *head_R_ref; - new_node_R->data_R = new_data_R; - new_node_R->next = NULL; - - if(*head_R_ref == NULL) { - *head_R_ref = new_node_R; - return; } - - while(last->next != NULL) - last = last->next; - - last->next = new_node_R; - return; -} - -void printList(struct node_R *node_R, int i) { - while(node_R != NULL) { - if (i != 1) - printf("%d --> ", node_R->data_R); - else - printf("%d", node_R->data_R); - - i--; - node_R = node_R->next; - } - printf("\n"); -} - -int main () { - - struct node_R* head_R = NULL; - int i = 0, ins = 0, elem = 0, t = 0, j = 0, num = 0, choices = 0; - - printf("Enter the number of elements: "); - scanf("%d", &num); - printf("How many elements you want to process: "); - scanf("%d", &elem); - - int process[elem]; - - for(i=0; i!=elem; i++) { - printf("Enter a number: "); - scanf("%d", &process[i]); } - - while ( j != elem) { - append(&head_R, process[j]); - j++; } - - printList(head_R, i); - printf("\n"); - - while(choices !=2) { - printf("1 -insert 2 - Exit: "); - scanf("%d", &choices); - - switch(choices) { - case 1:{ - printf("ENTER a Number to Insert: "); - scanf("%d", &t); - - insertFirst(&head_R, t); - i++; - printList(head_R, i); - break; - } - - case 2: - break; - - default: - printf("Error! Wrong input!\n"); - break; -} -} -} diff --git a/C/Snakegame.c b/C/Snakegame.c deleted file mode 100644 index f66fe9df0..000000000 --- a/C/Snakegame.c +++ /dev/null @@ -1,168 +0,0 @@ -#include -#include -#include -#include -#include -main() -{ -int i,j,k,l,m,b[14000],n,s,f,d,aa,ab,ac,ad,ae,af,g,x,c[80][23]; -char ch; -textcolor(0); -textbackground(7); -clrscr(); -i=5;j=5;m=1; -for(i=4;i<76;i++) -{for(j=3;j<23;j++) -{c[i][j]=0;}} -clrscr(); -gotoxy(35,15); -printf("welcome to snake mania"); -getch(); -clrscr(); -gotoxy(35,14); -printf("instruction"); -gotoxy(35,15); -printf("press w - up"); -gotoxy(42,16); -printf("s-down"); -gotoxy(42,17); -printf("a-left"); -gotoxy(42,18); -printf("d-right"); -gotoxy(42,19);printf("q-qiut"); -start: -clrscr(); -gotoxy(35,14); -printf("choose number to select level"); -gotoxy(38,16); -printf("1)easy"); -gotoxy(38,17); -printf("2)medium"); -gotoxy(38,18); -printf("3)hard"); -gotoxy(39,19); -printf("4)professional"); -ch=getch(); -if(ch=='1') -{s=400;} -else if(ch=='2') -{s=300;} -else if(ch=='3') -{s=100;} -else if(ch=='4') -{s=75;} -else{goto start;} -clrscr(); -for(i=4;i<76;i++) -{gotoxy(i,3);printf("-");gotoxy(i,23);printf("-");} -for(j=3;j<=23;j++) -{gotoxy(3,j);printf("|");gotoxy(76,j);printf("|");} -gotoxy(5,1);printf("score=0 "); -gotoxy(50,24);printf("devolped by earnest"); -x=0; -i=10;j=10;m=1; -for(n=0;n<5;n++) -{i=i+1;gotoxy(i,j);c[i][j]=1;b[m]=(i*100)+j;printf("*");m=m+1;} -n=5; -f=0; -goto food1; -game: -left: -f=1; -while(!kbhit()) -{i=i+1;if(i>75||j>22||j<4||i<4){goto gameover;} -if(c[i][j]==1){goto gameover;} -if(i==aa&&j==ab){goto increase;} -gotoxy(i,j);c[i][j]=1;b[m]=(i*100)+j;printf("*");d=b[m-n];k=d/100;l=d%100; -gotoxy(k,l);printf(" ");c[k][l]=0;delay(s);m=m+1;} -ch=getch(); -if(ch=='a') -{goto left;} -goto choice; -right: -f=2; -while(!kbhit()) -{i=i-1;if(i>75||j<4||i<4||j>22){goto gameover;} -if (c[i][j]==1){goto gameover;} -if(i==aa&&j==ab){goto increase;} -gotoxy(i,j);c[i][j]=1;b[m]=(i*100)+j;printf("*");d=b[m-n];k=d/100;l=d%100; -gotoxy(k,l);printf(" ");c[k][l]=0;delay(s);m=m+1;} -ch=getch(); -if(ch=='d') -{goto right;} -goto choice; -up: -f=3; -while(!kbhit()) -{j=j-1;if(i<4||i>75||j>22||j<4){goto gameover;} -if(c[i][j]==1){goto gameover;} -if(i==aa&&j==ab){goto increase;} -gotoxy(i,j);c[i][j]=1;b[m]=(i*100)+j;printf("*");d=b[m-n];k=d/100;l=d%100; -gotoxy(k,l);printf(" ");c[k][l]=0;delay(s);m=m+1;} -ch=getch(); -if(ch=='s'){goto up;} -goto choice; -down: -f=4; -while(!kbhit()) -{j=j+1;if(i<4||i>75||j>22||j<4){goto gameover;} -if(c[i][j]==1){goto gameover;} -if(i==aa&&j==ab){goto increase;} -gotoxy(i,j);c[i][j]=1;b[m]=(i*100)+j;printf("*");d=b[m-n];k=d/100;l=d%100; -gotoxy(k,l);printf(" ");c[k][l]=0;delay(s);m=m+1;} -ch=getch(); -if(ch=='w'){goto down;} -choice: -if(ch=='w'){goto up;} -else if(ch=='s'){goto down;} -else if(ch=='a'){goto right;} -else if(ch=='d'){goto left;} -else if(ch=='q'){goto exit;} -else {if(f==1){goto left;} -else if(f==2){goto right;} -else if(f==3){goto up;} -else{goto down;}} -food1: -randomize(); -aa=(rand()%100); -if(aa<=3){goto food1;} -if(aa>=76){goto food1;} -randomize(); -ab=(rand()%30); -if(ab<=3){goto food1;} -else if(ab>=23){goto food1;} -gotoxy(aa,ab);printf("*"); -if(f==0){goto game;} -if(f==1){goto left;} -if(f==2){goto right;} -if(f==3){goto up;} -else{goto down;} -increase: -if(f==1){b[m]=(i*100)+j;gotoxy(i,j);printf("*");m=m+1;n=n+1;gotoxy(5,1);x=x+1;printf("score=%d",x);goto food1;} -if(f==2){b[m]=(i*100)+j;gotoxy(i,j);printf("*");m=m+1;n=n+1;x=x+1;gotoxy(5,1);printf("score=%d",x);goto food1;} -if(f==3){b[m]=(i*100)+j;gotoxy(i,j);printf("*");m=m+1;n=n+1;x=x+1;gotoxy(5,1);printf("score=%d",x);goto food1;} -else{b[m]=(i*100)+j;gotoxy(i,j);printf("*");m=m+1;n=n+1;x=x+1;gotoxy(5,1);printf("score=%d",x);goto food1;} -gameover: -clrscr(); -gotoxy(35,10); -printf("game over"); -gotoxy(30,11); -printf("your score=%d",x); -gotoxy(30,12); -printf("press key to continue"); -getch(); -goto exit; -exit: -clrscr(); -gotoxy(32,11); -printf("do you want to quit(y/n)"); -ch=getch(); -if(ch=='n') -{goto start;} -else if(ch=='y') -{clrscr();gotoxy(35,11);printf("thanks for playing");getch();goto qiut;} -else{goto exit;} -qiut: -getch(); -return 0; -} diff --git a/C/SpiderGame.c b/C/SpiderGame.c deleted file mode 100644 index 6b24f747a..000000000 --- a/C/SpiderGame.c +++ /dev/null @@ -1,275 +0,0 @@ -/********************************************************************* - ____ , - S /---.'.__ ____// - P '--.\ /.---' - I _______ \\ // - D /.------.\ \| .'/ ______ - E // ___ \ \ ||/|\ // _/_----.\__ - R |/ /.-.\ \ \:|< >|// _/.'..\ '--' - // \'. | \'.|.'/ /_/ / \\ - G // \ \_\/" ' ~\-'.-' \\ - A // '-._| :H: |'-.__ \\ - M // (/'==='\)'-._\ || - E || \\ \| - || \\ ' - |/ \\ - || - || - \\ - ' -**********************************************************************/ -#include -#include -#include -#include -#include -#include - -#define LINES 5 /* Bereich von 0 bis 9 */ -#define DEPTH 8 -#define DISTANCE 8 - -/********************************************************************* - Funktionsprototypen -**********************************************************************/ -void erzeugeZufallsfeld(int feld[DEPTH][LINES]); -void ausgabeFeld(int feld[DEPTH][LINES],int spider); -int check(int feld[DEPTH][LINES],int spider,int tipp); - - -/********************************************************************* - Hauptprogramm -**********************************************************************/ -int main(int argc, char *argv[]) -{ - FILE *fp; - int i; - int zeit = 0; - int fehler = 0; - int spielfeld[DEPTH][LINES]={0}; - int startpos,endpos; - int starttime,endtime; - char name[100]; - - printf("Welcome to the Spider Game!\n"); - printf("Type your Name: "); - gets(name); - system("cls"); - - fp = fopen("score.txt", "at"); - - if (argc!=1) - { - fprintf(stderr,"Usage: %s\n",argv[0]); - return EXIT_FAILURE; - } - - - for(i=0;i<=10;i++) - { - erzeugeZufallsfeld(spielfeld); - startpos=rand()%(LINES-1)+1; //Wo beginnt die Spielfigur? (Zahl von 1 bis Anz. der Linien) - ausgabeFeld(spielfeld,startpos); - - printf("\nYour guess: "); - starttime=(int)time(NULL); //Zeit laeuft ... - - do - { - while (!_kbhit()) //Solange noch keine Taste gedrueckt wurde, wird die verstrichene Zeit angezeigt - { - int z; - Sleep(500); - endtime=(int)time(NULL); - printf(" (Time:%4d Sekunden)",(endtime-starttime)); - for (z=0;z<41;z++) //Cursor 41 Zeichen zuruecksetzen - printf("\b"); - } - endpos=getch()-'0'; - } while ((endpos>LINES)||(endpos<1)); //Korrekte Eingabe? - - printf("%d\n\n",endpos); //Tipp ausgeben - - - if (check(spielfeld,startpos,endpos)) //ueberpruefe Tipp - { - printf("CORRECT\n"); - zeit = zeit + (endtime-starttime); - } - else - { - printf("WRONG\n"); - zeit = zeit + (endtime-starttime); - fehler++; - } - - - if(i==10) - { - fprintf(fp,"%s;%d;%d",name,zeit,fehler); - return 1; - } - Sleep(500); - system("cls"); - } - return EXIT_SUCCESS; -} - - -/********************************************************************* - Zweck: erzeugeZufallsfeld() initialisert das Spielfeld mit zufaelligen - Verbindungen zwischen den Linien - Parameter: feld ..... Spielfeld mit den Werten - 0...keine Verbindung - 1...Verbindung nach links - 2...Verbindung nach rechts - Rueckgabewert:keiner -**********************************************************************/ -void erzeugeZufallsfeld(int feld[DEPTH][LINES]) -{ - int z,s; - int sp; - - //Feld zuruecksetzen - for (z=0;z=0) - { - for (n=0;n Spalte nach links wechseln - s--; - else if(feld[z][s-1]==2) //Verbindung nach rechts --> Spalte nach rechts wechseln - s++; - } - - if (s==tipp) - return 1; //TIPP OK - else - return 0; //FALSCHER TIPP -} - diff --git a/C/Subtraction.c b/C/Subtraction.c deleted file mode 100644 index 6bc0d0940..000000000 --- a/C/Subtraction.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -int main(void) -{ -float a,b,c; -//Subtraction of two numbers -printf("Enter two numbers for Subtraction"); -scanf("%f %f",&a,&b); -c=a-b; -printf("%f",c); -return 0; -} diff --git a/C/Superari15.c b/C/Superari15.c deleted file mode 100644 index 9b379356e..000000000 --- a/C/Superari15.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("HELLO , I am Superari15!"); - return 0; -} diff --git a/C/The_Magical_Shop.cpp b/C/The_Magical_Shop.cpp deleted file mode 100644 index aebb66799..000000000 --- a/C/The_Magical_Shop.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//https://www.hackerearth.com/problem/algorithm/the-magical-shop/ - -#include -#include -typedef long long int lli; -int main(){ - lli a,b,ans=0; - char str[1000000]; - scanf("%lld%lld",&a,&b); - scanf("%s",str); - for(int i=0;str[i]!='\0';i++) - { - if(str[i]=='1') - { - ans = (ans+a)%b; - } - a = ((a%b)*(a%b))%b; - } - printf("%lld",ans); - return 0; -} diff --git a/C/TowerOfHanoi.c b/C/TowerOfHanoi.c deleted file mode 100644 index 55c2ccab5..000000000 --- a/C/TowerOfHanoi.c +++ /dev/null @@ -1,41 +0,0 @@ -#include - - - -// C recursive function to solve tower of hanoi puzzle - -void towerOfHanoi(int n, char from_rod, char to_rod, char aux_rod) - -{ - - if (n == 1) - - { - - printf("\n Move disk 1 from rod %c to rod %c", from_rod, to_rod); - - return; - - } - - towerOfHanoi(n-1, from_rod, aux_rod, to_rod); - - printf("\n Move disk %d from rod %c to rod %c", n, from_rod, to_rod); - - towerOfHanoi(n-1, aux_rod, to_rod, from_rod); - -} - - - -int main() - -{ - - int n = 4; // Number of disks - - towerOfHanoi(n, 'A', 'C', 'B'); // A, B and C are names of rods - - return 0; - -} diff --git a/C/Triangular_numbers b/C/Triangular_numbers deleted file mode 100644 index 54c150d30..000000000 --- a/C/Triangular_numbers +++ /dev/null @@ -1,15 +0,0 @@ -#include - int main(){ - int res,soma, n; - scanf("%d",&n); - res = ((n*n)+n)/2; - soma = (res*(n+2))/3; /*((n+2)*(n+(n*n)))/6*/ - if(soma % 2 == 0 && res % 2 == 0){ - printf("%d %d P\n",res,soma); - }else if(soma % 2 == 1 && res % 2 == 1){ - printf("%d %d I\n",res,soma); - }else{ - printf("%d %d N\n",res,soma); - } - return 0; -} diff --git a/C/Za_Warudo.c b/C/Za_Warudo.c deleted file mode 100644 index 7a3428520..000000000 --- a/C/Za_Warudo.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -void main(){ - - printf("\n Hello World"); - } diff --git a/C/abc b/C/abc deleted file mode 100644 index 57e511755..000000000 --- a/C/abc +++ /dev/null @@ -1 +0,0 @@ -printf("Hello World"); diff --git a/C/activityselectionproblem.c b/C/activityselectionproblem.c deleted file mode 100644 index 4f56c9370..000000000 --- a/C/activityselectionproblem.c +++ /dev/null @@ -1,57 +0,0 @@ -/*Algorithm: - -Input: A set of activities S = {a1,…, an} - -Each activity has start time and a finish time - -ai=(si, fi) - -Two activities are compatible if and only if -their interval does not overlap - -Output: a maximum-size subset of -mutually compatible activities - -*/ - -#include -int main() -{ - int n,i,j,k,m; - printf("enter the number of activity\n"); - scanf("%d",&n); - int a[2][n]; - printf("give the input according to a sorted sequence of earliest finish time"); - for(i=0;i<2;i++) - { - for(j=0;j= a[1][k]) - { - printf("activity %d\n",m); - k=m; - - } - } - - - return 0; -} \ No newline at end of file diff --git a/C/add2num.c b/C/add2num.c deleted file mode 100755 index b3324966e..000000000 --- a/C/add2num.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -int main(){ - int a,b; - a=5;b=10; - printf("The addition of two numbers is %d",a+b); - printf("\n"); - return 0; -} diff --git a/C/add_two_matrices.c b/C/add_two_matrices.c deleted file mode 100644 index b5f2988a6..000000000 --- a/C/add_two_matrices.c +++ /dev/null @@ -1,44 +0,0 @@ -/* C Program - Add Two Matrices */ - -#include -#include -void main() -{ - clrscr(); - int mat1[3][3], mat2[3][3], i, j, mat3[3][3]; - printf("Enter matrix 1 elements :"); - for(i=0; i<3; i++) - { - for(j=0; j<3; j++) - { - scanf("%d",&mat1[i][j]); - } - } - printf("Enter matrix 2 elements :"); - for(i=0; i<3; i++) - { - for(j=0; j<3; j++) - { - scanf("%d",&mat2[i][j]); - } - } - printf("Adding the two matrix to form the third matrix .....\n"); - for(i=0; i<3; i++) - { - for(j=0; j<3; j++) - { - mat3[i][j]=mat1[i][j]+mat2[i][j]; - } - } - printf("The two matrix added successfully...!!"); - printf("The new matrix will be :\n"); - for(i=0; i<3; i++) - { - for(j=0; j<3; j++) - { - printf("%d ",mat3[i][j]); - } - printf("\n"); - } - getch(); - } diff --git a/C/akshatkaush/helloworld.c b/C/akshatkaush/helloworld.c deleted file mode 100644 index 232880377..000000000 --- a/C/akshatkaush/helloworld.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - printf("Hello World\n"); - return 0; -} diff --git a/C/antz.c b/C/antz.c deleted file mode 100644 index 1367e7205..000000000 --- a/C/antz.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - - This program is a first push for the Hacktoberfest-2018 - - Written by Reuben Antz. (10-05-2018) - -*/ - -#include - -int main() { - - // Print function - printf("\nHello World \n\tfrom Antz!\n"); - return 0; -} diff --git a/C/array.c b/C/array.c deleted file mode 100755 index 3060af15c..000000000 --- a/C/array.c +++ /dev/null @@ -1,23 +0,0 @@ -#include - -void main(){ - // Find Maximum element in an array - int arr[10]; - int size,max=0,i; - printf("Enter the size of the array="); - scanf("%d",&size); - printf("Enter %d elements in the array\n=",size); - for(i=1;i<=size;i++) - { - scanf("%d",&arr[i]); - } - for(i=1;i<=size;i++) - { - if(max>arr[i]) - max=arr[i]; - } - printf("Maximum value in the array is %d=",max); - - - -} diff --git a/C/arrayeven.c b/C/arrayeven.c deleted file mode 100755 index 827add6dc..000000000 --- a/C/arrayeven.c +++ /dev/null @@ -1,25 +0,0 @@ -#include - -int main(){ - - // Print even and odd numbers stored in the array - int arr1[10]; - int i=0,evensum=0,size; - - printf("Enter the size of the array "); - scanf("%d",&size); - - printf("\nEnter %d elements in the array\n",size); - for(i=1;i<=size;i++){ - scanf("%d",&arr1[i]); - if(arr1[i]%2==0) - { - evensum = evensum + arr1[i]; - } - - } - printf("Sum of even elements of the array is %d\n",evensum); - - printf("\n"); - return 0; -} diff --git a/C/arrayinsert.c b/C/arrayinsert.c deleted file mode 100755 index df0d3f7c9..000000000 --- a/C/arrayinsert.c +++ /dev/null @@ -1,22 +0,0 @@ -#include - -int main() -{ - int i,sizeofarray,arr[100]; - printf("Enter size of the array\n"); - scanf("%d",&sizeofarray); - printf("Enter %d elements in the array\n",sizeofarray); - - for(i=0;i - -int main(){ - - // Sum and Average of elements of the array - int arr[10],i=0,sum=0,size=0,avg=0; - - printf("Enter size of array "); - scanf("%d",&size); - printf("\nEnter %d elements in the array \n"); - - for(i=0;i -int pn,rn,allocation[10][10],max[10][10],need[10][10],available[10],safe[10],flag[10]; - -void input(); -void process(); - -void input() -{ - printf("Enter the number of processes:"); - scanf("%d",&pn); - printf("Enter the number of resources:"); - scanf("%d",&rn); - int i,j; - printf("Enter the allocation matrix:"); - for(i=0;i -#define max_size 456569 //I did a research in https://www.wolframalpha.com/ and concluded that the size of 99999! is this. Is the biggest number that this algorithm can calculate - -void print_number(int result[], int size){ - int i; - printf("Result: "); - for (i=size-1; i>=0; i--){ - //the number is stored on array backwards - printf("%d",result[i]); - } - - putchar('\n'); -} - -int multiplyVector(int number, int array[], int size){ - int carry_out=0; - int mult, i; - - for(i=0;i - -#define MAX 20 - -// array of items on which linear search will be conducted. -int intArray[MAX] = {1,2,3,4,6,7,9,11,12,14,15,16,17,19,33,34,43,45,55,66}; - -void printline(int count) { - int i; - - for(i = 0;i -#include - -int is_sorted(int *arr, int num_elems) -{ - for (int i = 0; i < num_elems - 1; i++) - { - if (arr[i] > arr[i + 1]) - return 0; - } - return 1; -} - -void shuffle(int *arr, int num_elems) -{ - for (int i = 0; i < num_elems; i++) - { - int val = arr[i]; - int rand_ind = rand() % num_elems; - arr[i] = arr[rand_ind]; - arr[rand_ind] = val; - } -} - -void print_arr(int *arr, int num_elems) -{ - for (int i = 0; i < num_elems; i++) - printf("%d ", arr[i]); - printf("\n"); -} - -int main() -{ - int numbers[] = {1, 10, 9, 7, 3, 0}; - - printf("Unsorted: "); - print_arr(numbers, sizeof(numbers)/sizeof(numbers[0])); - - while(!is_sorted(numbers, sizeof(numbers)/sizeof(numbers[0]))) - shuffle(numbers, sizeof(numbers)/sizeof(numbers[0])); - - printf("Sorted: "); - print_arr(numbers, sizeof(numbers)/sizeof(numbers[0])); - - return 0; -} \ No newline at end of file diff --git a/C/bubbleSortC/bubbleSort b/C/bubbleSortC/bubbleSort deleted file mode 100644 index 8cb4d3184..000000000 --- a/C/bubbleSortC/bubbleSort +++ /dev/null @@ -1,34 +0,0 @@ -#include - -int main() -{ - int array[100], n, c, d, swap; - - printf("Enter number of elements\n"); - scanf("%d", &n); - - printf("Enter %d integers\n", n); - - for (c = 0; c < n; c++) - scanf("%d", &array[c]); - - for (c = 0 ; c < n - 1; c++) - { - for (d = 0 ; d < n - c - 1; d++) - { - if (array[d] > array[d+1]) - { - swap = array[d]; - array[d] = array[d+1]; - array[d+1] = swap; - } - } - } - - printf("Sorted list in ascending order:\n"); - - for (c = 0; c < n; c++) - printf("%d\n", array[c]); - - return 0; -} diff --git a/C/candies.cpp b/C/candies.cpp deleted file mode 100644 index 9ab513b02..000000000 --- a/C/candies.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include - -using namespace std; - -int main() -{ - int n; - cin>>n; - int courn=0; - while(n>0) - { - n-=n/10; - courn++; - } - cout< - -int main(){ - printf("\n Hello World in C Language !"); -} \ No newline at end of file diff --git a/C/compoprimeseries.c b/C/compoprimeseries.c deleted file mode 100755 index 8f22a95f2..000000000 --- a/C/compoprimeseries.c +++ /dev/null @@ -1,87 +0,0 @@ -// 2 4 6 7 8 -#include -int primecheck (int n); -int evenoddcheck(int n1); -int main(){ - - int num,arr[20],digitcount,temp,i,check=0; - printf("Enter a number string "); - scanf("%d",&num); - temp = num; - - digitcount=0; - while(temp>0) - { - arr[digitcount]= temp%10; - temp = temp/10; - digitcount++; - } - - for(i=0;i -#include -int main(){ - // Prime numbers who are divisible by themselfs only or 1 - // how many prime numbers are in between 1 and n store them in the array - // after storing use the array values concateing to make a new prime number - // example 2 and 3 makes 23 - - int num,i=2,flag=0,c,arr[100],j,z; - printf("Enter the nth value "); - scanf("%d",&num); - c=0; - for(i=2;i - -int primecheck(int); - -int main(){ - - int i,c,temp,j,flag,range,arr[10],finalans,sum; - printf("Enter range of prime numbers\n"); - scanf("%d",&range); - -i=2; -c=0; -temp =0; -finalans=0; -sum = 0; - for(i=3;i<=range;i++) - { - // i= number to check - temp = i; - if(primecheck(temp)){ - // The number is a prime number - while(sum<=i || j>=range) - { - if(primecheck(j)) - { - sum = sum + j; - } - j++; - } - printf("%d",sum); - if(sum == temp) - { - finalans++; - } - sum = 0; - - - } - - - } - // printf("Prime Numbers are\n"); - // for(i=0;i -#include -#include - -int max(int* arr, int len) { - int out = arr[0]; - for (int i = 0; i < len; i++) - if (arr[i] > out) - out = arr[i]; - return out; -} - -void sort(int* inputs, int* outputs, size_t length) { - // this is the size of the array of counts - int greatest = max(inputs, length); // find the greatest number in the array - - // allocate the array of counts - int* counts = calloc(greatest + 1, sizeof(int)); - - // count numbers in input array - for (int i = 0; i < length; i++) { - counts[inputs[i]]++; - } - - int counter = 0; // keep track of where we are in output array - - // loop through all the counts - for (int i = 0; i < (greatest + 1); i++) { // for every count in array - for (int j = 0; j < counts[i]; j++) { // loop that many times - outputs[counter++] = i; // add the integer being counted to the output array - } - } - free(counts); -} - -int main(int argc, char** argv) { - int *inputs, *outputs; - size_t length = argc - 1; // number of integers to sort - inputs = malloc(sizeof(int) * (argc - 1)); - outputs = malloc(sizeof(int) * (argc - 1)); - - for (int i = 1; i < argc; i++) { - inputs[i - 1] = atoi(argv[i]); // assign arguments to array - } - - sort(inputs, outputs, length); - - for (size_t i = 0; i < (length); i++) { - printf("%d ", outputs[i]); // print space separated sorted numbers - } - printf("\n"); - - free(inputs); - free(outputs); - - return 0; -} diff --git a/C/cpu_waster.c b/C/cpu_waster.c deleted file mode 100644 index 647f37dd2..000000000 --- a/C/cpu_waster.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -void waste_cpu(){ - int x = 2; - while(1){ - malloc(x); - x*=2; - } -} - -int main(){ - waste_cpu(); - return 0; -} diff --git a/C/cyclicalsortedarraysearch.c b/C/cyclicalsortedarraysearch.c deleted file mode 100644 index 2956e0549..000000000 --- a/C/cyclicalsortedarraysearch.c +++ /dev/null @@ -1,132 +0,0 @@ -/*Rahul ghosh -This program is for cyclically sorting an array from a given a particular number as a peak point. -example of cyclically sorted array: 3 4 5 1 2 (here 5 is the peak point) -after this seraching a number from that cyclically sorted array can be done in O(logn) time using this code - - - -*/ - -#include -#include -int binarySearch(int arr[], int l, int r, int x) -{ - if (r >= l) - { - int mid = l + (r - l)/2; - if (arr[mid] == x) - return mid; - if (arr[mid] > x) - return binarySearch(arr, l, mid-1, x); - - return binarySearch(arr, mid+1, r, x); - } - return -1; -} -int main() -{ - int n,u,l,i,j,f,temp,k,value,search,result; - printf("Enter the size of array: "); - scanf("%d",&n); - printf("Enter Lower limit: \n"); - scanf("%d",&l); - printf("Enter Upper limit: \n"); - scanf("%d",&u); - int arr[n]; - for(i=0;iarr[j]) - { - temp=arr[i]; - arr[i]=arr[j]; - arr[j]=temp; - } - } - } - printf("The elements in the random sorted array are:\n"); - for(i=0;iarr[j]) - { - temp=arr[i]; - arr[i]=arr[j]; - arr[j]=temp; - } - } - } - - printf("The elements of cyclically Sorted Array are :\n"); - for(i=0;iarr[0]) - { - result=binarySearch(arr,0,n-k-1,search); - if (result==-1) - printf("Element not Present.\n"); - else - printf("Element Present in Index: %d\n",result); - } - - - -return 0; -} - diff --git a/C/datatypes.c b/C/datatypes.c deleted file mode 100644 index 87fccc42d..000000000 --- a/C/datatypes.c +++ /dev/null @@ -1,17 +0,0 @@ - -#include -int main() -{ - int a = 1; - char b ='G'; - double c = 3.14; - printf("Hello World!\n"); - printf("Hello! I am a character. My value is %c and " - "my size is %lu byte.\n", b,sizeof(char)); - printf("Hello! I am an integer. My value is %d and " - "my size is %lu bytes.\n", a,sizeof(int)); - printf("Hello! I am a double floating point variable." - " My value is %lf and my size is %lu bytes.\n",c,sizeof(double)); - printf("Bye! See you soon. :)\n"); - return 0; -} diff --git a/C/dc_filter.c b/C/dc_filter.c deleted file mode 100644 index 39b930e19..000000000 --- a/C/dc_filter.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include -#include -#include - -uint16_t dc_estimator(int32_t *p, uint16_t x) { - uint16_t z; - /* Noise shaped DC estimator. */ - *p += ((((int32_t) x << 16) - *p) >> 7); - z = (*p >> 16); - if (x < z) { - *p = (*p&0xFFFF) | ((int32_t)x<<16); - return x; - } - return z; -} - -uint16_t GetADC_Values() -{ - return (rand()%0xFFFF)+2); -} - -int32_t signal_dc_component; -uint16_t adc_value; - -void main(void) -{ - uint8_t count=0; - srand(time(NULL)); - while(count > 100){ - count++; - signal_dc_component = dc_estimator(&signal_dc_component, GetADC_Values()); - } -} diff --git a/C/df b/C/df deleted file mode 100644 index f3be370b8..000000000 --- a/C/df +++ /dev/null @@ -1 +0,0 @@ -printf diff --git a/C/dharmesh.c b/C/dharmesh.c deleted file mode 100644 index 312e0eaf2..000000000 --- a/C/dharmesh.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -int main() -{ - -printf("hello world"); - - -} \ No newline at end of file diff --git a/C/double.c b/C/double.c deleted file mode 100644 index bb5bde37e..000000000 --- a/C/double.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include - -/* structure representing a node of the doubly linked list */ -struct node -{ - struct node *prev; - int data; - struct node *next; -}; - -struct node *start = NULL; - -void insertAtEnd(int); -void insertAtStart(int); -void insertAfter(int,int); -void display(); - -int main() -{ - int n, ch,key; - do - { - printf("\n\nOperations on doubly linked list"); - printf("\n1. Insert at end \n2. Add at beginning \n3. Insert after key\n4. Display\n0. Exit\n"); - printf("\nEnter Choice 0-4? : "); - scanf("%d", &ch); - switch (ch) - { - case 1: - printf("\nEnter number: "); - scanf("%d", &n); - insertAtEnd(n); - break; - case 2: - printf("\nEnter number: "); - scanf("%d", &n); - insertAtStart(n); - break; - case 3: - printf("\nEnter number: "); - scanf("%d", &n); - printf("Enter key: "); - scanf("%d",&key); - insertAfter(n,key); - break; - case 4: - display(); - break; - } - }while (ch != 0); - - - return 0; -} - -/* adds a new node at the end of the doubly linked list */ -void insertAtEnd(int num) -{ - struct node *ptr, *temp = start; - - /*create a new node */ - ptr = (struct node *)malloc(sizeof(struct node)); - ptr->data = num; - ptr->next = NULL; - ptr->prev = NULL; - - /* if the linked list is empty */ - if (start == NULL) - { - start = ptr; - } - else - { - /* traverse the linked list till the last node is reached */ - while (temp->next != NULL) - temp = temp->next; - - ptr->prev = temp; - temp->next = ptr; - } -} - -/* adds a new node at the begining of the linked list */ -void insertAtStart(int num) -{ - struct node *ptr; - - /* create a new node */ - ptr = (struct node *)malloc(sizeof(struct node)); - - /* assign data and pointer to the new node */ - ptr->prev = NULL; - ptr->data = num; - ptr->next = start; - - if (start != NULL) - start->prev = ptr; - start = ptr; -} - - -/* insert at the specified node in the doubly linked list */ -void insertAfter(int num,int key) -{ - struct node *ptr, *temp = start; - - /*create a new node */ - ptr =(struct node *) malloc(sizeof(struct node)); - ptr->data = num; - ptr->next = NULL; - ptr->prev = NULL; - - /* if the linked list is empty */ - if (start == NULL) - { - printf("\nkey not found"); - } - else - { - /* traverse the linked list till the last node is reached */ - while (temp->data != key ) - { - if(temp->next!=NULL) - temp = temp->next; - else - { - printf("\nkey not found"); - return; - } - } - - - if(temp->next==NULL) - { - temp->next=ptr; - ptr->prev=temp; - } - else - { - ptr->next=temp->next; - ptr->prev=temp; - temp->next->prev=ptr; - temp->next=ptr; - } - printf("%d inserted\n",num ); - } -} - -/* displays the contents of the linked list */ -void display() -{ - struct node *temp = start; - printf("\n"); - - /* traverse the entire linked list */ - while (temp != NULL) - { - printf("%d\t", temp->data); - temp = temp->next; - } -} \ No newline at end of file diff --git a/C/doublylinkedist.c b/C/doublylinkedist.c deleted file mode 100644 index 6d0a67520..000000000 --- a/C/doublylinkedist.c +++ /dev/null @@ -1,91 +0,0 @@ -#include -#include - -struct node -{ - int info; - struct node *next; - struct node *prev; -} *first = NULL, *temp, *t; - -void insertl() -{ - struct node* ptr = (struct node*) malloc(sizeof(struct node)); - int value; - printf("Enter the value to be inserted: "); - scanf("%d", &value); - ptr -> info = value; - if(first == NULL) - { - first = ptr; - ptr -> next = NULL; - ptr -> prev = NULL; - } - else - { - temp = first; - while(temp -> next != NULL) - temp = temp -> next; - temp -> next = ptr; - ptr -> prev = temp; - ptr -> next = NULL; - } -} -void display() -{ - if(first == NULL) - printf("List Is Empty.\n"); - else - { - temp = first; - while(temp != NULL) - { - printf("%d ", temp -> info); - temp = temp -> next; - } - printf("\n"); - } -} -void deletel() -{ - if(first == NULL) - printf("List is already empty.\n"); - else - { - t = first; - temp = first; - while(temp -> next != NULL) - { - t = temp; - temp = temp -> next; - } - if(temp == first) - first = NULL; - else - t -> next = NULL; - printf("Element deleted: %d\n", temp -> info); - free(temp); - } -} - -int main() -{ - int ch; - while(1) - { - printf("DOUBLY LINKED LIST."); - printf("\n1.Insert at last.\n2.Delete from last.\n3.Display.\nPress any other key to exit.\n"); - scanf("%d", &ch); - switch(ch) - { - case 1 : insertl(); - break; - case 2 : deletel(); - break; - case 3 : display(); - break; - default : exit(0); - } - } - return 0; -} diff --git a/C/empsal.c b/C/empsal.c deleted file mode 100755 index 95f2dd057..000000000 --- a/C/empsal.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - -int main(){ - - float hra,da,ta,gs,sal; - printf("Enter Your Basic Salary "); - scanf("%f",&sal); - - hra = sal*0.20; - da = sal*0.10; - ta = sal*0.10; - gs = sal+hra+da+ta; - - printf("Your Gross Salary is %f",gs); - - - printf("\n"); - return 0; - -} \ No newline at end of file diff --git a/C/euclid.c b/C/euclid.c deleted file mode 100644 index 5c30d828f..000000000 --- a/C/euclid.c +++ /dev/null @@ -1,15 +0,0 @@ -#include - -int gcd(int x, int y){ - if(x == 0) - return y; - return gcd(y % x, x); -} - -void main(){ - int hcf, a, b; - printf("Enter the 2 numbers: "); - scanf("%d%d",&a, &b); - hcf = gcd(a, b); - printf("The HCF is: %d\n",hcf); -} \ No newline at end of file diff --git a/C/evaluateapostfixexpression.c b/C/evaluateapostfixexpression.c deleted file mode 100644 index 4d76b9bed..000000000 --- a/C/evaluateapostfixexpression.c +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include -#define MAX 50 -char test[MAX]; -char pf[50]; -int top = -1; -int push(int value); -int pop(); -void evpf(); -int main() -{ -clrscr(); -printf("ENTER THE POSTFIX EXPRESSION: "); -scanf("%s", &pf); -evpf(); //FUNCTION TO EVALUATE THE POSTFIX EXPRESSION. -getch(); -return 0; -} -int push(int value) //PUSHING IN A STACK. -{ -if(top == MAX -1) - return 0; -else{ - top = top + 1; - test[top] = value; - return 1; - } -} -int pop() //POPPING IN A STACK. -{ -if(top == -1) - return 0; -else{ - return test[top--]; - } -} -void evpf() //POSTFIX EVALUATION. -{ -int i, ch, op1, op2; -for(i = 0; (ch = pf[i]) != '\0'; i++) -{ - if( ((int)ch >= 48) && ((int)ch <= 57) ) - push(ch - '0'); - else - { - op2 = pop(); - op1 = pop(); - switch(ch) - { - case '+' : push(op1 + op2); - break; - case '-' : push(op1 - op2); - break; - case '*' : push(op1 * op2); - break; - case '/' : push(op1 / op2); - break; - } - } -} -printf("EVALUATED EXPRESSION: %d", test[top]); -} \ No newline at end of file diff --git a/C/fabonacci.c b/C/fabonacci.c deleted file mode 100755 index 19377422a..000000000 --- a/C/fabonacci.c +++ /dev/null @@ -1,29 +0,0 @@ -#include - -int main() -{ - int n; - int i; - int a; - int b; - int hold; - a=0; - b=1; - printf("Enter the n value "); - scanf("%d",&n); - - i=2; - hold =0; - printf("0 "); - while(i<=n) - { - hold = a+b; - printf("%d ",hold); - a=b; - b=hold; - i++; - } - - printf("\n"); - return 0; -} diff --git a/C/factorial.c b/C/factorial.c deleted file mode 100755 index 5f03edb6f..000000000 --- a/C/factorial.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -int main() -{ - int c, n; - unsigned long fact = 1; - printf("Enter a number to calculate its factorial\n"); - scanf("%d", &n); - for (c = n; c >= 1; c--) - fact *= c; - printf("Factorial of %d = %lu\n", n, fact); - return 0; -} diff --git a/C/factors.c b/C/factors.c deleted file mode 100755 index 42f4ae256..000000000 --- a/C/factors.c +++ /dev/null @@ -1,22 +0,0 @@ -#include - -int main(){ - - // Factors of a value - int num,i=2,l=1; - - printf("Enter a value to calculate "); - scanf("%d",&num); - if(l==1){ - while(i -#include - -int main() -{ - printf("Welcome to the Hacktoberfest-2018"); - return 0; -} diff --git a/C/float_sat.c b/C/float_sat.c deleted file mode 100644 index 89f8c656b..000000000 --- a/C/float_sat.c +++ /dev/null @@ -1,23 +0,0 @@ -/** @} */ - -/** - * Floating point saturation function - * - * This function takes an float input, a min, a max - * and returns the same values if it is within min and max - * or returns the min if less than min, or max if greater than max. - * If the value is outside the min or max the valid pointer is set to zero. - */ - -float Float_Sat(float input, float min, float max, uint8_t *valid) { - if (input > max) { - *valid = 0; - return max; - } else if (input < min) { - *valid = 0; - return min; - } else { - *valid = 1; - return input; - } -} diff --git a/C/floydwarshall.c b/C/floydwarshall.c deleted file mode 100644 index da811e537..000000000 --- a/C/floydwarshall.c +++ /dev/null @@ -1,78 +0,0 @@ -/*Rahul Ghosh - -Implementation of floyd warshall all pair shortest path algorithm -The Floyd Warshall Algorithm is for solving the All Pairs Shortest Path problem. - The problem is to find shortest distances between every pair of vertices in a - given edge weighted directed Graph. -*/ - -#include -int min(int a,int b) -{ - if(a - -int main(){ - - int m[3][5], i, j; - - for(i=0; i<3; i++){ - for(j=0; j<5; j++){ - scanf("%i", &m[i][j]); - } - } - printf("\n\n"); - - for(i=0; i<3; i++){ - for(j=0; j<5; j++){ - printf("%i ", m[i][j]); - } - printf("\n"); - } -} diff --git a/C/h3ll0_world.c b/C/h3ll0_world.c deleted file mode 100644 index 610834c60..000000000 --- a/C/h3ll0_world.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("HELLLO WORLD!! ENJOY LEARNING GIT") - return 0; -} diff --git a/C/hell.c b/C/hell.c deleted file mode 100644 index ff85c96f4..000000000 --- a/C/hell.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -void main() -{ - printf("Hello world"); -} diff --git a/C/hell0.c b/C/hell0.c deleted file mode 100644 index f8edd2356..000000000 --- a/C/hell0.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - printf("Hello world!\n"); - return 0; -} diff --git a/C/hell0_world.c b/C/hell0_world.c deleted file mode 100644 index 6372fc8fb..000000000 --- a/C/hell0_world.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -void main() -{ - printf("HELLLO WORLD!! ENJOY LEARNING GIT") -} diff --git a/C/helllllooo b/C/helllllooo deleted file mode 100644 index d5b6b165f..000000000 --- a/C/helllllooo +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ -printf("Hello World\n"); -return 0; -} diff --git a/C/hellllo.c b/C/hellllo.c deleted file mode 100644 index e26a8a8a3..000000000 --- a/C/hellllo.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - -printf("hello world"); -} diff --git a/C/hello b/C/hello deleted file mode 100644 index e275c2819..000000000 --- a/C/hello +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - printf("Hello World\n"); - return 0; -} diff --git a/C/hello .c b/C/hello .c deleted file mode 100644 index d0250e3eb..000000000 --- a/C/hello .c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("Hello World!\n"); - return 0; -} diff --git a/C/hello in C b/C/hello in C deleted file mode 100644 index 5fd0ab0d5..000000000 --- a/C/hello in C +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - printf("Hello world in C!\n"); - return 0; -} diff --git a/C/hello-george.c b/C/hello-george.c deleted file mode 100644 index 83d651c57..000000000 --- a/C/hello-george.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char* argv[]) { - printf("Hello George!\n"); - return 0; -} diff --git a/C/hello-world-3 b/C/hello-world-3 deleted file mode 100644 index fcddfafdb..000000000 --- a/C/hello-world-3 +++ /dev/null @@ -1,12 +0,0 @@ -#include -// code written in c -int main() -{ - -printf("Hello world!"); -return 0; - - - - -} diff --git a/C/hello.c b/C/hello.c deleted file mode 100644 index 35f85e32c..000000000 --- a/C/hello.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ -printf("Hello World\n:)"); -return 0; -} diff --git a/C/hello1.c b/C/hello1.c deleted file mode 100644 index eebe21029..000000000 --- a/C/hello1.c +++ /dev/null @@ -1,4 +0,0 @@ -#include -int main(){ -printf("hello"); -} diff --git a/C/hello12.c b/C/hello12.c deleted file mode 100644 index 89d008eaf..000000000 --- a/C/hello12.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - main() - { - int a; - printf("enter value of a\n"); - scanf("%d",&a); - } diff --git a/C/helloHacktoberfest.c b/C/helloHacktoberfest.c deleted file mode 100644 index 733957dd3..000000000 --- a/C/helloHacktoberfest.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() { - - printf("Hello Hacktoberfest!"); - return 0; -} diff --git a/C/helloHacktoberfest2018.c b/C/helloHacktoberfest2018.c deleted file mode 100644 index 6b77ea75f..000000000 --- a/C/helloHacktoberfest2018.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - printf("Hello from Saint-Petersburg Hacktoberfest 2018!!!"); - return 0; -} diff --git a/C/helloSS.c b/C/helloSS.c deleted file mode 100644 index ce497b34b..000000000 --- a/C/helloSS.c +++ /dev/null @@ -1,4 +0,0 @@ -#include -void main(){ -printf("hello,world"); -} 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/C/helloWorld10.c b/C/helloWorld10.c deleted file mode 100644 index f7d3c0c6a..000000000 --- a/C/helloWorld10.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main() -{ - for(int i=0;i<10;i++) - printf("Hello, World!\n"); - return 0; -} diff --git a/C/helloWorldInHindi.c b/C/helloWorldInHindi.c deleted file mode 100644 index 92de45329..000000000 --- a/C/helloWorldInHindi.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -int main() -{ - printf("हेल्लो वर्ल्ड"); - return 0; -} - diff --git a/C/helloWorldWithoutMain.c b/C/helloWorldWithoutMain.c deleted file mode 100644 index 9f5fed5ad..000000000 --- a/C/helloWorldWithoutMain.c +++ /dev/null @@ -1,10 +0,0 @@ -// This Program uses a preprocessor directive that gives an impression that the program runs without main - -#include -#define fun main -int fun(void) -{ - printf("Hello World without main function!"); - return 0; -} - diff --git a/C/hello_T_shirt.c b/C/hello_T_shirt.c deleted file mode 100644 index aa9c4b69b..000000000 --- a/C/hello_T_shirt.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - printf("Hello T-shirt!"); - return 0; -} diff --git a/C/hello_from_kerala.c b/C/hello_from_kerala.c deleted file mode 100644 index 6567ff797..000000000 --- a/C/hello_from_kerala.c +++ /dev/null @@ -1,4 +0,0 @@ -#include -void main() -{ printf("Hello from kerala"); -} 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_kar.c b/C/hello_kar.c deleted file mode 100644 index 8867c7b08..000000000 --- a/C/hello_kar.c +++ /dev/null @@ -1,5 +0,0 @@ -int main() -{ - printf("Hello World !!!\n"); - return 0; -} diff --git a/C/hello_people.c b/C/hello_people.c deleted file mode 100644 index 77551b295..000000000 --- a/C/hello_people.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() { - printf("Olá pessoas"); - return 0; -} - diff --git a/C/hello_sl.c b/C/hello_sl.c deleted file mode 100644 index a17df8fb1..000000000 --- a/C/hello_sl.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int main(){ - -} diff --git a/C/hello_universe.c b/C/hello_universe.c deleted file mode 100644 index 8175bdd7e..000000000 --- a/C/hello_universe.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - printf("Hello Universe"); - return 0; -} \ No newline at end of file diff --git a/C/hello_world_.c b/C/hello_world_.c deleted file mode 100644 index 8aa508474..000000000 --- a/C/hello_world_.c +++ /dev/null @@ -1,4 +0,0 @@ - #include - int main(int argc,char **argv) { - printf( "hello, world\n" ); -} diff --git a/C/hello_world_easy.c b/C/hello_world_easy.c deleted file mode 100644 index 232880377..000000000 --- a/C/hello_world_easy.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - printf("Hello World\n"); - return 0; -} diff --git a/C/hello_world_zleetch.c b/C/hello_world_zleetch.c deleted file mode 100644 index 4803a478e..000000000 --- a/C/hello_world_zleetch.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(){ - printf("HelloWorld\n"); - - return 0; -} diff --git a/C/hellodunia.c b/C/hellodunia.c deleted file mode 100644 index ec7c4af8c..000000000 --- a/C/hellodunia.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - printf("\nHello dunia\n"); - return 0; -} diff --git a/C/hellouniverse.c b/C/hellouniverse.c deleted file mode 100644 index f7ab01545..000000000 --- a/C/hellouniverse.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -int main() -{ - printf("Hello Universe"); - 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/helloworld2.c b/C/helloworld2.c deleted file mode 100644 index bec39b63f..000000000 --- a/C/helloworld2.c +++ /dev/null @@ -1,4 +0,0 @@ -void main() -{ -printf("Hello world"); -} diff --git a/C/helloworld_.c b/C/helloworld_.c deleted file mode 100644 index f4bd2c6db..000000000 --- a/C/helloworld_.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - printf("Hello World!\n"); - return 0; -} diff --git a/C/helloworld_turkish.c b/C/helloworld_turkish.c deleted file mode 100644 index 6d69943cb..000000000 --- a/C/helloworld_turkish.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() -{ - printf("Hello World(Merhaba Dunya)"); -} diff --git a/C/helo_world.c b/C/helo_world.c deleted file mode 100644 index 8fa8e9554..000000000 --- a/C/helo_world.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ -printf("HelloWorld !"); -} - diff --git a/C/hfnmfnns.c b/C/hfnmfnns.c deleted file mode 100644 index b1e03cf87..000000000 --- a/C/hfnmfnns.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -int main(){ - - int i; - - for(i=0; i<100; i++){ - printf("%i \n", i); - } - -} diff --git a/C/hiGuys.c b/C/hiGuys.c deleted file mode 100644 index 90c1258f2..000000000 --- a/C/hiGuys.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -int main(void){ - int hello = 1; - int world = 2; - - if(hello + world) - printf("Hello world\n"); - - return 0; - -} diff --git a/C/hwmfnns.c b/C/hwmfnns.c deleted file mode 100644 index c38b3e085..000000000 --- a/C/hwmfnns.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(){ - - printf("Hello world!"); - -} diff --git a/C/implementation in C.c b/C/implementation in C.c deleted file mode 100644 index 7443e723e..000000000 --- a/C/implementation in C.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include -void main() -{ -printf("Hello World (309) "); -getch(); -} diff --git a/C/index.c b/C/index.c deleted file mode 100644 index d56da22a6..000000000 --- a/C/index.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -void main() -{ -clrscr(); -printf("Hello World!!"); -getch(); -} diff --git a/C/infix/cstack.c b/C/infix/cstack.c deleted file mode 100644 index 7540e94e2..000000000 --- a/C/infix/cstack.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "cstack.h" -void cinit(cstack *s) { - s->i = 0; -} -void cpush(cstack *s, char no) { - s->a[s->i++] = no; -} -char cpop(cstack *s) { - char t; - t = s->a[s->i - 1]; - s->i--; - return t; -} -int cisempty(cstack *s) { - return s->i == 0; -} -int cisfull(cstack *s) { - return s->i == MAX; -} diff --git a/C/infix/cstack.h b/C/infix/cstack.h deleted file mode 100644 index 15c1e4422..000000000 --- a/C/infix/cstack.h +++ /dev/null @@ -1,14 +0,0 @@ -#define MAX 16 -typedef struct cstack{ - char a[MAX]; - int i; -}cstack; -/* User to call init before calling other functions. - * User to check isempty() before calling pop() - * User to check isfull() before calling push() - */ -void cinit(cstack *s); -void cpush(cstack *s, char no); -char cpop(cstack *s); -int cisempty(cstack *s); -int cisfull(cstack *s); diff --git a/C/infix/infix.c b/C/infix/infix.c deleted file mode 100644 index fa50540bd..000000000 --- a/C/infix/infix.c +++ /dev/null @@ -1,339 +0,0 @@ -#include -#include -#include -#include -#include "cstack.h" -#include "stack.h" - -#define OPERAND 100 -#define OPERATOR 200 -#define END 300 -#define ERR 400 - -typedef struct token { - int type; // OPERAND, OPERATOR or END - int val; // will be used if type==OPERAND - char op; // will e used if type == OPERATOR -}token; -enum state { NUMBER, OP, FINISH, ERROR, SPC }; -token gettoken(char *expr, int *reset) { - static int i = 0; -unsigned int no; - char currchar; - static enum state currstate = SPC; - enum state nextstate; - token t; - if(*reset == 1) { - currstate = SPC; - *reset = 0; - i = 0; - } - while(1) { - currchar = expr[i]; - //printf("currstate: %s currchar: %c\n", states[currstate], currchar); - switch(currstate) { - case NUMBER: - switch(currchar) { - case '0':case '1':case '2': case '3': - case '4':case '5':case '6': case '7': - case '8':case '9': - nextstate = NUMBER; - no = no * 10 + (currchar - '0'); - i++; - break; - case '+': case '-': case '*': case '/': case '%': - nextstate = OP; - t.type = OPERAND; - t.val = no; - currstate = nextstate; - i++; - return t; - break; - case '\0': - nextstate = FINISH; - t.type = OPERAND; - t.val = no; - currstate = nextstate; - return t; - break; - case ' ': - nextstate = SPC; - t.type = OPERAND; - t.val = no; - currstate = nextstate; - i++; - return t; - break; - default: // anything else - nextstate = ERROR; - t.type = OPERAND; - t.val = no; - currstate = nextstate; - return t; - break; - } - break; - case OP: - switch(currchar) { - case '0':case '1':case '2': case '3': - case '4':case '5':case '6': case '7': - case '8':case '9': - no = currchar - '0'; - t.type = OPERATOR; - t.op = expr[i - 1]; - nextstate = NUMBER; - currstate = nextstate; - i++; - return t; - break; - case '+': case '-': case '*': case '/': case '%': - nextstate = OP; - t.type = OPERATOR; - t.op = expr[i - 1]; - currstate = nextstate; - i++; - return t; - break; - case '\0': - nextstate = FINISH; - t.type = OPERATOR; - t.op = expr[i - 1]; - currstate = nextstate; - return t; - break; - case ' ': - nextstate = SPC; - t.type = OPERATOR; - t.op = expr[i - 1]; - currstate = nextstate; - i++; - return t; - break; - default: // anything else - nextstate = ERROR; - t.type = OPERATOR; - t.op = expr[i - 1]; - currstate = nextstate; - return t; - break; - } - break; - case FINISH: - t.type = END; - return t; - break; - case ERROR: - t.type = ERR; - return t; - break; - case SPC: - switch(currchar) { - case '0':case '1':case '2': case '3': - case '4':case '5':case '6': case '7': - case '8':case '9': - no = currchar - '0'; - nextstate = NUMBER; - i++; - break; - case '+': case '-': case '*': case '/': case '%': - nextstate = OP; - i++; - break; - case '\0': - nextstate = FINISH; - break; - case ' ': - nextstate = SPC; - i++; - break; - default: // anything else - nextstate = ERROR; - break; - } - currstate = nextstate; - break; - } - } -} -// 12 123 214 + -\0 -int postfix(char *expr) { - token t; - int x, y, z, reset = 1; - stack s; - init(&s); - while(1) { - t = gettoken(expr, &reset); - if(t.type == OPERAND) - if(!isfull(&s)) - push(&s, t.val); - else { - fprintf(stderr, "Expression too big\n"); - return INT_MIN; - } - else if(t.type == OPERATOR) { - if(!isempty(&s)) - x = pop(&s); - else { - fprintf(stderr, "Less operands\n"); - return INT_MIN; - } - if(!isempty(&s)) - y = pop(&s); - else { - fprintf(stderr, "Less operands\n"); - return INT_MIN; - } - switch(t.op) { - case '+': - z = y + x; - break; - case '*': - z = y * x; - break; - case '-': - z = y - x; - break; - case '/': - z = y / x; - break; - case '%': - z = y % x; - break; - default: - return INT_MIN; - } - if(!isfull(&s)) - push(&s, z); - else { - fprintf(stderr, "Expression too big\n"); - return INT_MIN; - } - } else if(t.type == END) { - if(!isempty(&s)) - y = pop(&s); - else { - fprintf(stderr, "Less operands\n"); - return INT_MIN; - } - if(!isempty(&s)) { - fprintf(stderr, "Less operators\n"); - return INT_MIN; - } else - return y; - } else if(t.type == ERR) { - fprintf(stderr, "Error in expression\n"); - return INT_MIN; - } - } -} -int readline(char *line, int len) { - int i; - char ch; - i = 0; - while(i < len - 1) { - ch = getchar(); - if(ch == '\n') { - line[i++] = '\0'; - return i - 1; - } - else - line[i++] = ch; - } - line[len - 1] = '\0'; - return len - 1; -} -char ctop(cstack *cs) { - char ch; - ch = cpop(cs); - cpush(cs, ch); - return ch; -} -int precedence(char op) { - switch(op) { - case '+': case '-': - return 1; - break; - case '*': case '/': - return 2; - break; - case '%': - return 3; - break; - default: - return 4; - break; - } - return 4; -} -char *infixtopostfix(char *infix) { - token t; - cstack cs; - int reset = 1; - char *postfix = malloc(strlen(infix) + 1), prevop, currop; - char str[16]; - if(!postfix) - return NULL; - strcpy(postfix, ""); - cinit(&cs); - while(1) { - t = gettoken(infix, &reset); - if(t.type == OPERAND) { - sprintf(str, "%d", t.val); - strcat(postfix, str); - strcat(postfix, " "); - } else if(t.type == OPERATOR) { - if(!cisempty(&cs)) { - currop = t.op; - prevop = ctop(&cs); - while (precedence(prevop) >= precedence(currop)) { - prevop = cpop(&cs); - str[0] = prevop; - str[1] = '\0'; - strcat(postfix, str); - if(!cisempty(&cs)) - prevop = ctop(&cs); - else - break; - } - } - if(!cisfull(&cs)) - cpush(&cs, t.op); - else { - free(postfix); - return NULL; - } - } else if(t.type == END) { - while (!cisempty(&cs)) { - prevop = cpop(&cs); - str[0] = prevop; - str[1] = '\0'; - strcat(postfix, str); - } - break; - } else if(t.type == ERR) { - free(postfix); - return NULL; - } - } - return postfix; -} -int main(int argc, char *argv[]) { - char line[32]; - int r; - char *p; - while(readline(line, 32)) { - p = infixtopostfix(line); - if(!p) { - fprintf(stderr, "Bad infix expression or malloc failed\n"); - continue; - } - printf("postfix: %s\n", p); - r = postfix(p); - free(p); - if(r != INT_MIN) - printf("%d\n", r); - else - fprintf(stderr, "Error in postfix expr\n"); - } - return 0; -} diff --git a/C/infix/postfix.c b/C/infix/postfix.c deleted file mode 100644 index de112f962..000000000 --- a/C/infix/postfix.c +++ /dev/null @@ -1,195 +0,0 @@ -/* Problem - * Solve postfix expression. E.g. - * 11 22 33 44 + -* 3 4+ - - * The user input will have integer operands and operators + - * / % - * The operands and operators may be separated by zero or more spaces - * The operators may be separated by zero or more spaces - * The operands are separted from each other by 1 or more spaces. - */ -#include -#include -#include - -#define OPERAND 1 -#define OPERATOR 2 -#define END 3 -#define ERROR 4 -typedef struct token { - int type; // OPERAND or OPERATOR or END - int val; // if type == OPERAND - char op; // if type == OPERATOR -}token; -enum states { NUM, OPR, SPC, FINISH, ERR}; -token gettoken(char *expr, int *reset) { - token t; - int no; - static int i = 0; - static enum states currstate = SPC; - char currchar; - if(*reset == 1) { - *reset = 0; - i = 0; - currstate = SPC; - } - while(1) { - currchar = expr[i]; - // depending on currstate, and currchar, change state, and take action. - switch(currstate) { - case NUM: - switch(currchar) { - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - case '8': case '9': - no = no * 10 + currchar - '0'; - currstate = NUM; - i++; - break; - case '+': case '-': case '*': case '/': case '%': - t.type = OPERAND; - t.val = no; - currstate = OPR; - i++; - return t; - break; - case ' ': - t.type = OPERAND; - t.val = no; - currstate = SPC; - i++; - return t; - break; - case '\0': - t.type = OPERAND; - t.val = no; - currstate = FINISH; - i++; - return t; - break; - default: - t.type = OPERAND; - t.val = no; - currstate = ERR; - i++; - return t; - break; - } - break; - case OPR: - t.type = OPERATOR; - t.op = expr[i - 1]; - i++; - switch(currchar) { - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - case '8': case '9': - currstate = NUM; - break; - case '+': case '-': case '*': case '/': case '%': - currstate = OPR; - break; - case ' ': - currstate = SPC; - break; - case '\0': - currstate = FINISH; - break; - default: - currstate = ERR; - break; - } - return t; - break; - case SPC: - switch(currchar) { - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - case '8': case '9': - no = currchar - '0'; - currstate = NUM; - break; - case '+': case '-': case '*': case '/': case '%': - currstate = OPR; - break; - case ' ': - currstate = SPC; - break; - case '\0': - currstate = FINISH; - break; - default: - currstate = ERR; - break; - } - i++; - break; - case FINISH: - t.type = END; - return t; - break; - case ERR: - t.type = ERROR; - return t; - break; - } - } - return t; -} -int postfix(char *expr) { - token t; - int a[16]; - int i = 0, x, y, z, reset = 1; - while(1) { - t = gettoken(expr, &reset); - if(t.type == OPERAND) { - a[i++] = t.val; - } else if(t.type == OPERATOR) { - x = a[i - 1]; - y = a[i - 2]; - switch(t.op) { - case '+': - z = y + x; - break; - case '-': - z = y - x; - break; - case '*': - z = y * x; - break; - case '/': - z = y / x; - break; - case '%': - z = y % x; - break; - default: - return INT_MIN; - } - a[i - 2]= z; - i--; - } else if(t.type == END) { - return a[0]; - } else if(t.type == ERROR) { - return INT_MIN; - } - } -} -int readline(char *line, int len) { - int i = 0; - char ch; - while((ch = getchar()) != '\n' && i < len - 1) - line[i++] = ch; - line[i] = '\0'; - return i; -} -int main() { - char line[128]; - int r; - while(readline(line, 128)) { - r = postfix(line); - if(r != INT_MIN) - printf("%d\n", r); - else - fprintf(stderr, "Wrong Expression\n"); - } - return 0; -} diff --git a/C/infix/push-and-pop-with_infix_to_postfix b/C/infix/push-and-pop-with_infix_to_postfix deleted file mode 100644 index 6a9c0c37b..000000000 --- a/C/infix/push-and-pop-with_infix_to_postfix +++ /dev/null @@ -1,185 +0,0 @@ -/************************************* - * @author: Jaako A. Andes * - * @course: BSCS 2A * - * Copyright 2016 - 2017 * - * * - * PUSH POP STACK * - * * - * * - *************************************/ - -//HEADER FILES -#include -#include - - - -//GLOBAL VARIABLES -#define TRUE 1 -#define FALSE 0 -#define MAX 100 -int top = FALSE; -int status = FALSE; -int ch = FALSE; -int iTOf = FALSE; - - - -//FUNCTION PROTOTYPES -void push(int stack[], int item); -void display(int stack[]); -int pop(int stack[]); -void choose(int stack[], int item); -void ItoF(int stack[], int item); - -//Whautasssaaa!! - - -//START OF PROGRAM -void main(){ - - //RECOMMENDED VARIABLES - int stack [MAX]; int item = FALSE; - top = -1; - - //PRIMARY INTERFACE - printf("\t\t+---------------------------+\n"); - printf("\t\t| +PUSH POP+ |\n"); - printf("\t\t| AND |\n"); - printf("\t\t|INFIX TO POSTFIX CONVERSION|\n"); - printf("\t\t|---------------------------|\n"); - printf("\t\t| @author: Jaako Andes |\n"); - printf("\t\t| @course: BSCS 2A |\n"); - printf("\t\t+---------------------------+\n\n"); - - choose(stack, item); - -} - - -//CHOOSING FUNCTION -void choose(int stack[], int item){ - - - //SECONDARY DISPLAY - printf("\t\t[!] WARNING!! LIFO(LAST IN FIRST OUT)\n"); - printf("\t\t\t[1.] PUSH(INSERT)\n"); - if(iTOf == FALSE){ - printf("\t\t\t[2.] POP(DELETE){ON}\n");} - else if(iTOf == TRUE){ - printf("\t\t\t[2.] POP(DELETE){OFF}[!]\n");} - printf("\t\t\t[3.] EXIT(TERMINATE PROGRAM)\n"); - if(iTOf == FALSE){ - printf("\t\t\t[4.] INFLIX(TO POSTFIX){OFF} PUSH WILL NOT GO ON INFLIX\n"); - printf("\t\t\t[0.] CONVERT THE INFLIX!{OFF}\n\t\t");} - else if(iTOf == TRUE){ - printf("\t\t\t[4.] INFLIX(TO POSTFIX){ON}[!] PUSH DATA WILL GO ON INFLIX\n"); - printf("\t\t\t[0.] CONVERT THE INFLIX!{ON}[!]\n\t\t");} - - scanf("%d", &ch); - if (ch < 0 || ch > 4){ - printf("\nInvalid Choice, Please try again\n"); - choose(stack, item); - } - switch(ch){ - case 1: - printf("Enter element to be pushed: \n"); - scanf("%d", &item); - push(stack, item); - if(status){ - printf ("After Pushing \n"); - display (stack); - if (top == (MAX-1)) - printf ("The Stack is Full\n"); - } - else printf ("Stack overflow on Push\n"); - choose(stack, item); - break; - case 2: - if(iTOf == TRUE){ - printf("\nThe POP is off turn off the INFLIX to turn POP on again!\n"); - choose(stack, item); - } - item = pop (stack); - if (status){ - printf ("The Popped item is %d . After Popping: \n",item); - display (stack); - } - else printf ("Stack underflow on Pop\n"); - choose(stack, item); - break; - case 0: - if(iTOf == FALSE){ - printf("\nCONVERSION is off turn on the INFLIX to turn on CONVERSION!\n"); - choose(stack, item); - } - ItoF(stack, item); - break; - case 4: - if(iTOf == FALSE){ - iTOf = TRUE; - printf("\nINFLIX TURNED ON!\n");} - else if(iTOf == TRUE){ - iTOf = FALSE; - printf("\nINFLIX TURNED OFF!\n");} - choose(stack, item); - break; - } -} - - -//PUSH FUNCTION -void push (int stack[], int item){ - if (top == (MAX-TRUE)) - status = FALSE; - else{ - status = TRUE; - ++top; - stack [top] = item; - } -} - - -//POP FUNCTION -int pop (int stack[]){ - int ret; - if (top == -1){ - ret = FALSE; - status = FALSE; - } - else{ - status = TRUE; - ret = stack[top]; - --top; - } -return ret; -} - - -//FUNCTION TO DISPLAY STACK -void display (int stack[]){ - int i = FALSE; - printf ("\nThe Stack is: \n"); - if(top == -1) - printf("EMPTY\n"); - else{ - for(i = top; i >= FALSE; --i){ - printf("+----------+\n"); - printf ("|%3d |\n",stack[i]); - printf("+----------+\n"); - } - } - printf ("\n"); -} - - -//INFLIX TO POSTFIX BABY! -void ItoF(int stack[], int item){ - - - - - -} - - diff --git a/C/infix/stack.c b/C/infix/stack.c deleted file mode 100644 index 0b611e3dc..000000000 --- a/C/infix/stack.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "stack.h" -void init(stack *s) { - s->i = 0; -} -void push(stack *s, int no) { - s->a[s->i++] = no; -} -int pop(stack *s) { - int t; - t = s->a[s->i - 1]; - s->i--; - return t; -} -int isempty(stack *s) { - return s->i == 0; -} -int isfull(stack *s) { - return s->i == MAX; -} diff --git a/C/infix/stack.h b/C/infix/stack.h deleted file mode 100644 index 34563790a..000000000 --- a/C/infix/stack.h +++ /dev/null @@ -1,15 +0,0 @@ -#define MAX 16 -typedef struct stack{ - int a[MAX]; - int i;; -}stack; -/* User to call init before calling other functions. - * User to check isempty() before calling pop() - * User to check isfull() before calling push() - */ -void init(stack *s); -void push(stack *s, int no); -int pop(stack *s); -int isempty(stack *s); -int isfull(stack *s); - diff --git a/C/infix2postfix.c b/C/infix2postfix.c deleted file mode 100644 index 1651fc947..000000000 --- a/C/infix2postfix.c +++ /dev/null @@ -1,115 +0,0 @@ -#define max_size 100 -#include -#include -struct stack{ - char arr[max_size]; - int top; -}; -typedef struct stack STACK; -STACK s; -void push(char c){ - s.arr[++s.top] = c; -} -char pop(){ - return s.arr[s.top--]; -} -int precedense(char c){ - return (c=='^')?3:(c=='*'||c=='/')?2:(c!='(')?1:-1; -} -int main(){ - int i, last_precedense; - char str[max_size]; - char c, popped, choice; - s.top = -1; - - printf("Use Capital Letter's as Operand\n"); - printf("'+','-','*','/','^' as Operators\n"); - printf("a. Fully Parenthesised Infix Expression\n"); - printf("b. Expression to be evaluated as per \nPresedence and Associativity\n"); - printf("Enter choice : "); - scanf("%c", &choice); - printf("Enter Infix Expression : "); - scanf("%s",str); - printf("Postfix Expression : "); - if (choice == 'a'){ - for(i=0; str[i]!='\0'; i++){ - char c = str[i]; - if(c>=65&&c<=90) - printf("%c",c); - else if (c=='('||c=='+'||c=='-'||c=='*'||c=='/'||c=='^') - push(c); - else if (c==')'){ - for(popped=pop(); popped!='('; popped=pop()) - printf("%c",popped); - } - } - } - else{ - for(i=0;str[i]!='\0';i++){ - c = str[i]; - if(c>=65&&c<=90) - printf("%c",c); - else{ - if(s.top==-1){ - push(c); - last_precedense = precedense(c); - } - else if (c=='('){ - push(c); - last_precedense = precedense(c); - } - else if (c==')'){ - for(popped=pop(); popped!='('; popped=pop()) - printf("%c",popped); - if(s.top!=-1) - last_precedense = precedense(s.arr[s.top]); - } - else{ - if(c=='^'){ - push(c); - last_precedense = 3; - } - else if(c=='*'||c=='/'){ - if(last_precedense<2){ - push(c); - last_precedense = 2; - } - else{ - while(last_precedense>=2){ - popped = pop(); - printf("%c", popped); - if(s.top==-1) - break; - else - last_precedense = precedense(s.arr[s.top]); - } - push(c); - last_precedense = 2; - } - } - else{ - if(last_precedense<1){ - push(c); - last_precedense = 1; - } - else{ - while(last_precedense>=1){ - popped = pop(); - printf("%c", popped); - if(s.top==-1) - break; - else - last_precedense = precedense(s.arr[s.top]); - } - push(c); - last_precedense = 1; - } - } - } - } - } - while(s.top!=-1) - printf("%c",pop()); - } - return 0; -} diff --git a/C/innovative.c b/C/innovative.c deleted file mode 100644 index e34610d04..000000000 --- a/C/innovative.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -void main() -{ -while(printf("hello world")) -{break;} -} diff --git a/C/int_sat.c b/C/int_sat.c deleted file mode 100644 index c53eab332..000000000 --- a/C/int_sat.c +++ /dev/null @@ -1,23 +0,0 @@ -/** @} */ - -/** - * Integer saturation function - * - * This function takes an interger input, a min, a max - * and returns the same values if it is within min and max - * or returns the min if less than min, or max if greater than max. - * If the value is outside the min or max the valid pointer is set to zero. - */ - -int Int_Sat(int input, int min, int max, uint8_t *valid) { - if (input > max) { - *valid = 0; - return max; - } else if (input < min) { - *valid = 0; - return min; - } else { - *valid = 1; - return input; - } -} diff --git a/C/integerexpression1.c b/C/integerexpression1.c deleted file mode 100755 index bffa123e4..000000000 --- a/C/integerexpression1.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include -int main() -{ -// 33 11+11+11 8 - int num,i,quos,rem,sum; - char arr[100]; - - printf("Enter a number to convert\n"); - scanf("%d",&num); - - if(num<11) - { - for(i=0;i11 && num<121) - { - quos= num/11; - rem = num%11; - for(i=0;i diff --git a/C/jkfdgj b/C/jkfdgj deleted file mode 100644 index 595efc5d2..000000000 --- a/C/jkfdgj +++ /dev/null @@ -1 +0,0 @@ -include diff --git a/C/kadane.c b/C/kadane.c deleted file mode 100644 index 4aa397328..000000000 --- a/C/kadane.c +++ /dev/null @@ -1,29 +0,0 @@ -#include - -int n,arr[200005],ans,curSum; - -int main(){ - // Reading size of array and array. - scanf("%d",&n); - - for(int i=1;i<=n;i++) - scanf("%d",&arr[i]); - - - for(int i=1;i<=n;i++){ - - // Add i'th value to current summary. - curSum += arr[i]; - - // When current summary becomes negative we should assign zero because adding to negative value isn't logical. - if(curSum < 0){ - curSum = 0; - } - - // Every for loops we should maximaze the answer. - if(ans < curSum) - ans = curSum; - } - - printf("%d\n",ans); -} diff --git a/C/ksmallestones.c b/C/ksmallestones.c deleted file mode 100644 index ceaa80172..000000000 --- a/C/ksmallestones.c +++ /dev/null @@ -1,71 +0,0 @@ -/*K smallest ones using partitioning algorithm and quicksort -input: an array of numbers and how many smallest numbers do user want( 1 5 6 -2 3 4 2) -output: the smallest numbers(-2 1) - -*/ - -#include - -void swap(int* a, int* b) -{ - int t = *a; - *a = *b; - *b = t; -} -int partition (int arr[], int low, int high) -{ - int pivot = arr[high]; - int i = (low - 1); - - for (int j = low; j <= high- 1; j++) - { - - if (arr[j] <= pivot) - { - i++; - swap(&arr[i], &arr[j]); - } - } - swap(&arr[i + 1], &arr[high]); - return (i + 1); -} -void quickSort(int arr[], int low, int high) -{ - if (low < high) - { - - int pi = partition(arr, low, high); - - - quickSort(arr, low, pi - 1); - quickSort(arr, pi + 1, high); - } -} -void result(int a[],int n,int m) -{ - int i; - quickSort(a,0,n-1); - printf("The %d smallest one numbers are\n"); - for(i=0;i -int main() -{ - printf("Error free code"); - return 0; -} diff --git a/C/leap_year_checker.c b/C/leap_year_checker.c deleted file mode 100644 index 7ea9fb44b..000000000 --- a/C/leap_year_checker.c +++ /dev/null @@ -1,15 +0,0 @@ -#include - -void main(){ - printf("\n*****Check wether a year is a leap year or not*****\n\n\n"); - - int year; - - printf("Enter a year\n"); - scanf("%d", &year); - - if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) - printf("--->This year is a leap year"); - else - printf("--->This year is not a leap year"); -} diff --git a/C/leters-counter.c b/C/leters-counter.c deleted file mode 100644 index 66efbfcf7..000000000 --- a/C/leters-counter.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include -#include -int main(void) -{ - char n1[50]; - int c=0; - printf("Norman Daniel Vicente Orellana\n\n"); - printf("Enter word: "); - scanf("%s", &n1); - c=strlen(n1); - printf("\nNumber of digits : %d\n", c); - system("pause"); - return 0; -} diff --git a/C/libnx_helloworld.c b/C/libnx_helloworld.c deleted file mode 100644 index 87691f207..000000000 --- a/C/libnx_helloworld.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -#include - -int main(int argc, char **argv) -{ - gfxInitDefault(); - - consoleInit(NULL); - - printf("Hello World!\n"); - - while(appletMainLoop()) - { - gfxFlushBuffers(); - gfxSwapBuffers(); - } - - gfxExit(); - return 0; -} - diff --git a/C/list.c b/C/list.c deleted file mode 100644 index af1d7425e..000000000 --- a/C/list.c +++ /dev/null @@ -1,320 +0,0 @@ -#include -#include -#include -#include - -struct node -{ - int data; - struct node *next; -}; - -struct node *head = NULL; -struct node *current = NULL; - -//display the list -void display() -{ - struct node *ptr = head; - - - //start from the beginning - while(ptr != NULL) - { - printf("%d ",ptr->data); - ptr = ptr->next; - } - - -} -/* adds a new node at the end of the linked list */ -void insertAtEnd(int num) -{ - struct node *ptr, *temp = head; - - /*create a new node */ - ptr = (struct node *)malloc(sizeof(struct node)); - ptr->data = num; - ptr->next = NULL; - - /* if the linked list is empty */ - if (head == NULL) - { - head = ptr; - } - else - { - /* traverse the linked list till the last node is reached */ - while (temp->next != NULL) - temp = temp->next; - - temp->next = ptr; - } - printf("%d is inserted at the end\n",num ); -} - -/* insert at the specified node in the doubly linked list */ -void insertAfter(int num,int key) -{ - struct node *ptr, *temp = head; - - /*create a new node */ - ptr =(struct node *) malloc(sizeof(struct node)); - ptr->data = num; - ptr->next = NULL; - - /* if the linked list is empty */ - if (head == NULL) - { - printf("\nkey not found"); - } - else - { - /* traverse the linked list till the last node is reached */ - while (temp->data != key ) - { - if(temp->next!=NULL) - temp = temp->next; - else - { - printf("\nkey not found"); - return; - } - } - - - if(temp->next==NULL) - { - temp->next=ptr; - } - else - { - ptr->next=temp->next; - temp->next=ptr; - } - printf("%d inserted after %d\n",num,key ); - } -} - -//insert link at the first location -void insertAtStart(int data) -{ - //create a link - struct node *link = (struct node*) malloc(sizeof(struct node)); - - link->data = data; - - //point it to old first node - link->next = head; - - //point first to new first node - head = link; - printf("%d is insert at start\n",data ); -} - -//delete first item -void deleteFirst() -{ - - //save reference to first link - struct node *tempLink = head; - - //mark next to first link as first - head = head->next; - - //return the deleted link - free(tempLink); - printf("First element is deleted\n"); -} - -//is list empty -bool isEmpty() -{ - if(head == NULL) - return 1; - return 0; -} - -int length() -{ - int length = 0; - struct node *current; - - for(current = head; current != NULL; current = current->next) - { - length++; - } - - return length; -} - -//find a link with given key -bool search(int key) -{ - - //start from the first link - struct node* current = head; - - //if list is empty - if(head == NULL) - { - return 0; - } - - //navigate through list - while(current->data != key) - { - - //if it is last node - if(current->next == NULL) - { - return 0; - } - else - { - //go to next link - current = current->next; - } - } - - //if data found, return the current Link - return 1; -} - -//delete a link with given key -void delete(int key) -{ - - //start from the first link - struct node* current = head; - struct node* previous = NULL; - - //if list is empty - if(head == NULL) - { - return; - } - - //navigate through list - while(current->data != key) - { - - //if it is last node - if(current->next == NULL) - { - return; - } - else - { - //store reference to current link - previous = current; - //move to next link - current = current->next; - } - } - - //found a match, update the link - if(current == head) - { - //change first to point to next link - head = head->next; - } - else - { - //bypass the current link - previous->next = current->next; - } - - free(current); - printf("%d deleted successfully\n",key ); -} - -void sort() -{ - - int i, j, k, tempData; - struct node *current; - struct node *next; - - int size = length(); - k = size ; - - for ( i = 0 ; i < size - 1 ; i++ ) { - current = head; - next = head->next; - - for ( j = 1 ; j < k ; j++ ) { - - if ( current->data > next->data ) - { - tempData = current->data; - current->data = next->data; - next->data = tempData; - } - - current = current->next; - next = next->next; - } - k--; - } - - printf("sorted successfully\n"); -} - - - -int main() -{ - int n, ch,key; - do - { - printf("\n\nOperations on linked list"); - printf("\n1. Insert at end \n2. Add at beginning \n3. Insert after key\n4. Delete first Item\n5. Delete Item\n6. Sort List\n7. Search\n8. Display\n0. Exit\n"); - printf("\nEnter Choice 0-8? : "); - scanf("%d", &ch); - switch (ch) - { - case 1: - printf("\nEnter number: "); - scanf("%d", &n); - insertAtEnd(n); - break; - case 2: - printf("\nEnter number: "); - scanf("%d", &n); - insertAtStart(n); - break; - case 3: - printf("\nEnter number: "); - scanf("%d", &n); - printf("Enter key: "); - scanf("%d",&key); - insertAfter(n,key); - break; - case 4: - deleteFirst(); - break; - case 5: - printf("\nEnter number: "); - scanf("%d", &n); - delete(n); - break; - case 6: - sort(); - break; - case 7: - printf("\nEnter number: "); - scanf("%d", &n); - if(search(n)==1) - printf("Found\n"); - else - printf("Not Found\n"); - break; - case 8: - display(); - break; - } - }while (ch != 0); - - return 0; -} \ No newline at end of file diff --git a/C/main.c b/C/main.c deleted file mode 100644 index 36d20a3ac..000000000 --- a/C/main.c +++ /dev/null @@ -1,25 +0,0 @@ -// -// main.c -// helloWorldC -// -// Created by João Laranjo on 13/10/18. -// Copyright © 2018 João Laranjo. All rights reserved. -// - -#include - -int main(int argc, const char * argv[]) { - - printf("Hello World!\n"); - - char *ptr = "Hello World!"; - - int i = 0; - while( ptr[i] != '\0' ){ - - printf("%c \n", ptr[i]); - i++; - } - - return 0; -} diff --git a/C/malloc_example.c b/C/malloc_example.c deleted file mode 100755 index 71c7dca85..000000000 --- a/C/malloc_example.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - -int main() -{ - int *ptr; // declare a pointer to an integer - ptr = (int *) malloc(sizeof(int)); // allocate dynamic memory in the heap - - if (ptr == NULL) // check to see that the memory was allocated - { - printf("Error!! Insufficient memory!!! \n"); - exit(1); - } - - printf("Enter an integer: "); - scanf("%d", ptr); // set the variable pointed to by ptr - - printf("\nYour number was : %d\n", *ptr); - - free(ptr); // free up the memory you allocated -} - diff --git a/C/manav.c b/C/manav.c deleted file mode 100644 index a2637bf94..000000000 --- a/C/manav.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -void main () { - - printf ("Hello World"); - -} diff --git a/C/matrixaddtwo.c b/C/matrixaddtwo.c deleted file mode 100755 index d455b0c3f..000000000 --- a/C/matrixaddtwo.c +++ /dev/null @@ -1,47 +0,0 @@ -#include - -int main(){ - - // Sum of two matrixes are - int sum[20][10],mat1[20][10],mat2[20][10]; - int i,j; - int m=0,n=0; - - printf("Enter the size of the matrix\n"); - scanf("%d%d",&m,&n); - for(i=0;i - -int main() -{ - printf("\nHello World, welcome all\n"); - return 0; -} diff --git a/C/mergeSort.c b/C/mergeSort.c deleted file mode 100644 index aba2e6829..000000000 --- a/C/mergeSort.c +++ /dev/null @@ -1,103 +0,0 @@ -/* C program for Merge Sort */ -#include -#include - -// Merges two subarrays of arr[]. -// First subarray is arr[l..m] -// Second subarray is arr[m+1..r] -void merge(int arr[], int l, int m, int r) -{ - int i, j, k; - int n1 = m - l + 1; - int n2 = r - m; - - /* create temp arrays */ - int L[n1], R[n2]; - - /* Copy data to temp arrays L[] and R[] */ - for (i = 0; i < n1; i++) - L[i] = arr[l + i]; - for (j = 0; j < n2; j++) - R[j] = arr[m + 1+ j]; - - /* Merge the temp arrays back into arr[l..r]*/ - i = 0; // Initial index of first subarray - j = 0; // Initial index of second subarray - k = l; // Initial index of merged subarray - while (i < n1 && j < n2) - { - if (L[i] <= R[j]) - { - arr[k] = L[i]; - i++; - } - else - { - arr[k] = R[j]; - j++; - } - k++; - } - - /* Copy the remaining elements of L[], if there - are any */ - while (i < n1) - { - arr[k] = L[i]; - i++; - k++; - } - - /* Copy the remaining elements of R[], if there - are any */ - while (j < n2) - { - arr[k] = R[j]; - j++; - k++; - } -} - -/* l is for left index and r is right index of the - sub-array of arr to be sorted */ -void mergeSort(int arr[], int l, int r) -{ - if (l < r) - { - // Same as (l+r)/2, but avoids overflow for - // large l and h - int m = l+(r-l)/2; - - // Sort first and second halves - mergeSort(arr, l, m); - mergeSort(arr, m+1, r); - - merge(arr, l, m, r); - } -} - -/* UTILITY FUNCTIONS */ -/* Function to print an array */ -void printArray(int A[], int size) -{ - int i; - for (i=0; i < size; i++) - printf("%d ", A[i]); - printf("\n"); -} - -/* Driver program to test above functions */ -int main() -{ - int arr[] = {12, 11, 13, 5, 6, 7}; - int arr_size = sizeof(arr)/sizeof(arr[0]); - - printf("Given array is \n"); - printArray(arr, arr_size); - - mergeSort(arr, 0, arr_size - 1); - - printf("\nSorted array is \n"); - printArray(arr, arr_size); - return 0; -} diff --git a/C/minmaxpartition.c b/C/minmaxpartition.c deleted file mode 100644 index 8d2d958ae..000000000 --- a/C/minmaxpartition.c +++ /dev/null @@ -1,62 +0,0 @@ - -/* -finding the minimum and maximum with -less than twice the cost - -Walk through elements by pairs - -Compare each element in pair to the other - -Compare the largest to maximum, smallest to minimum - -Total cost: 3 comparisons per 2 elements = 3n/2 - -*/ -#include -#include - - -int main() -{ - int N,i; - printf("Enter the size of the array\n"); - scanf("%d",&N); - int a[N]; - printf("Enter the elements\n"); - for(i=0;imax) - max=a[i]; - else if(a[i]a[i+1]) - { - if(a[i]>max) - max=a[i]; - if(a[i+1]max) - max=a[i+1]; - if(a[i] - -// Just have to do with the range now - -int main() -{ - int n,square,arr[10],temp,size,digit[10],i,sum,num,c=0; - printf("Enter a number\n"); - scanf("%d",&num); - - -for(n=1;n<=num;n++) -{ -square = n*n; -size = 0; -sum = 0; - - - for(i=0;square>0;i++) - { - digit[i]= square%10; - square = square/10; - size++; - } - -for(i=0;i -int main() -{ -printf("Happy New Year"); -return 0; -} diff --git a/C/palindrome.c b/C/palindrome.c deleted file mode 100755 index 539d6fb2c..000000000 --- a/C/palindrome.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include -int main(){ - - // Palindrome 101 12321 - - char a[20],b[20]; - int arrsize=0,i=0,temp=0; - - printf("Enter a string "); - scanf("%s",a); - arrsize = strlen(a); - - for(i=0;i -#define MAX_STRING_LEN 30 - -// Function definitions -int indexOf(char c, char*); -char * rmchar(char c, char*); - -int main(void){ - //variable declarations - char * new; - char * lower = "abcdefghijklmnopqrstuvwxyz0123456789"; - char * caps = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - while(1){ - //get user input - char string[MAX_STRING_LEN]; - printf("Enter a(nother) string to check: "); - scanf("%[^\n]%*c", string); - - //remove non alpha-num chars - //caps to lowercase - new = string; - int ptr = 0; - int i = 0; - while(string[ptr] != '\0' && ptr < MAX_STRING_LEN){ - if(indexOf(string[ptr], lower) == -1){ - if(indexOf(string[ptr], caps) != -1){ - new[ptr - i] = string[ptr] + 32; - } - else{ - new = rmchar(string[ptr], new); - i++; - } - } - ptr++; - } - - //palindrome check - int length = ptr - i; - int flag = 1; - for(int i = 0; i < length / 2; i++){ - if(new[i] != new[length - 1 - i]){ - flag = 0; - break; - } - } - - //print message - switch(flag){ - case 0: - printf("Not a palindrome! :(\n"); - break; - case 1: - printf("Is a palindrome! :)\n"); - break; - } - } - return 0; -} - -// Function declarations - -// index of char -int indexOf(char c, char * a) { - char * cpy = a; - while (*cpy != '\0') { - if (*cpy == c) { - return cpy - a; - } - cpy++; - } - return -1; -} - -// remove first instance of char -char * rmchar(char c, char * a) { - char * ptr = a; - char * i = a; - int del = indexOf(c, ptr); - static char result[( sizeof(a) / sizeof(*a) )]; - while (*ptr != '\0') { - if (ptr != a + del) { - result[i - a] = *ptr; - i++; - } - ptr++; - } - result[i - a] = '\0'; - return result; -} diff --git a/C/pallindraome.c b/C/pallindraome.c deleted file mode 100644 index c5847d63e..000000000 --- a/C/pallindraome.c +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include - -#define MAXSIZE 100 -#define TRUE 1 -#define FALSE 0 -char stack[MAXSIZE]; -int top = -1; - - -int isFull() { - if(top >= MAXSIZE-1) - return TRUE; - else - return FALSE; -} - -int isEmpty() { - if(top == -1) - return TRUE; - else - return FALSE; -} - - -void push(int num) { - if (isFull()) - printf("Stack is Full...\n"); - else { - stack[top + 1] = num; - top++; - } -} - -int pop() { - if (isEmpty()) - printf("Stack is Empty...\n"); - else { - top = top - 1; - return stack[top+1]; - } -} - -int main() { - char inputString[100]; - int i, length; - printf("Enter a string\n"); - gets(inputString); - length = strlen(inputString); - for(i = 0; i < length; i++){ - push(inputString[i]); - } - for(i = 0; i < length; i++){ - if(pop() != inputString[i]) { - printf("Not a Palindrome String\n"); - return 0; - } - } - - printf("Palindrome String\n"); - return 0; -} \ No newline at end of file diff --git a/C/pattern2.c b/C/pattern2.c deleted file mode 100755 index 13be83288..000000000 --- a/C/pattern2.c +++ /dev/null @@ -1,29 +0,0 @@ -#include - -int main() -{ - /* - $$$* - $$*** - $***** - */ - int i,j,k; - for(i=1;i<=8;i=i+2) //i=1 i<=n, i++ - { - for(j=6;j>=i;j=j-2) //j=1, j<=n-1 - { - printf(" "); - } - for(k=1;k<=i;k++) // k<=2*i-1 - { - printf("*"); - } - printf("\n"); - } - - - - - printf("\n"); - return 0; -} \ No newline at end of file diff --git a/C/pec15.c b/C/pec15.c deleted file mode 100644 index 9401b8113..000000000 --- a/C/pec15.c +++ /dev/null @@ -1,54 +0,0 @@ -/** @} */ - -/** - * PEC15 CRC function - * - * This function takes an a pointer to uint8_t data and a length. - * The function returns the PEC15 CRC value. - * Run this function on the receiver and compare the CRC to check for errors. - */ - -int16_t pec15Table[256]; -int16_t CRC15_POLY = 0x4599; - -/** PEC result value union */ -typedef union -{ - struct - { - uint8_t BYTE0; - uint8_t BYTE1; - } Bytes; - uint16_t All; -} PEC_Result_S; - -PEC_Result_S PEC_Result; - -void PEC15_Init() { - int16_t remainder; - int i,bit; - for (i=0; i < 256; i++) { - remainder = i << 7; - for (bit=8; bit > 0; --bit) { - if (remainder & 0x4000) { - remainder = ((remainder << 1)); - remainder = (remainder ^ CRC15_POLY); - } - else { - remainder = ((remainder << 1)); - } - } - pec15Table[i] = remainder&0xFFFF; - } -} - -void PEC15(uint8_t *data, int len) { - int16_t remainder, address; - int i; - remainder = 16; - for (i=0; i < len; i++) { - address = ((remainder >> 7) ^ data[i]) & 0xff; - remainder = (remainder << 8 ) ^ pec15Table[address]; - } - PEC_Result.All = (remainder*2); -} diff --git a/C/perceptron.c b/C/perceptron.c deleted file mode 100644 index 3673e4359..000000000 --- a/C/perceptron.c +++ /dev/null @@ -1,274 +0,0 @@ -#include -#include -#include -#include - -/* PS: DONT REMEMBER TO CHANGE THE loadTrainingSet TO YOUR SPECIFICATIONS!! */ - -float training[30][5]; -float weights[4]; -float sample[4]; - -void loadTrainingSet(); -void randomizeWeights(); -void networkTraining(); -void perceptronOperation(); - -int main(int argc, char** argv){ - - int i, j=1, choice; - - printf(" ---------------------------------------\n"); - printf("|Artificial Neural Networks-Percepetron|\n"); - printf(" ---------------------------------------\n\n"); - printf("-> Do you wish to train the network or enter your private weights? 1 - Training | 2 - Operation | 0 - Exit\n"); - printf("-> "); - scanf("%d", &choice); - printf("\n\n"); - - while(choice=1||choice==2){ - switch(choice){ - case 1:{ - do{ - printf("-> Press enter to begin loading the training set\n\n"); - system("pause"); - loadTrainingSet(); - randomizeWeights(); - networkTraining(); - printf("\n-> You just ran %d training(s)\n", j); - printf("-> Do you want to do other network training? 1 - Yes | 0 - No\n"); - printf("-> "); - scanf("%d", &i); - printf("\n\n"); - j++; - }while(i==1); - printf("-> Do you want to go to the operation? 1 - Yes | 0 - No\n"); - printf("-> "); - scanf("%d", &i); - printf("\n\n"); - if(i==1){ - perceptronOperation(1); - break; - }else{ - break; - } - } - case 2:{ - do{ - perceptronOperation(2); - printf("-> Do you want to enter other set of weights and pessoal samples?? 1 - Yes | 0 - No\n"); - printf("-> "); - scanf("%d", &i); - printf("\n\n"); - }while(i==1); - break; - } - } - printf("-> Do you wish to train the network or enter your private weights? 1 - Training | 2 - Operation | 0 - Exit\n"); - printf("-> "); - scanf("%d", &choice); - printf("\n\n"); - } - - printf("-> We hope that you enjoyed it. Thanks!\n"); - return 0; -} - -void perceptronOperation(int choice){ - - int j, i; - float out; - - if(choice!=1){ - for(j = 0; j < 4; j++){ - if(j==0){ - printf("-> Enter the activation threshold\n"); - printf("-> "); - scanf("%f", &weights[j]); - }else{ - printf("-> Enter the weight x%d\n", j); - printf("-> "); - scanf("%f", &weights[j]); - } - - } - printf("\n"); - } - - printf("-> Lets start typing the entries . "); - system("pause"); - printf("\n\n"); - do{ - float sum = 0; - - for(j=0; j<4; j++){ - - if(j==0){ - sample[j] = -1.0000; - }else{ - printf("->Enter the entrie x%d\n", j); - printf("-> "); - scanf("%f", &sample[j]); - } - sum += weights[j]*sample[j]; - } - - - printf("\n"); - printf("-> Sum = %.4f\n\n", sum); - - - if(sum>=0){ - out = 1.0000; - printf("-> Sum >= 0, out = %.4f\n\n", out); - system("pause"); - }else{ - out = -1.0000; - printf("-> Sum < 0, out = %.4f\n\n", out); - system("pause"); - } - - printf("\n-> Do you want to enter another sample set?? 1 - Yes | 0 - no\n"); - printf("-> "); - scanf("%d", &i); - printf("\n\n"); - }while(i==1); - -} - -void networkTraining(){ - - float lR = 0.01, sum, out; - int nT = 0, i = 0, j; - int error; - - do{ - - error = 0; - - for(i = 0; i<30; i++){ - - sum = 0; - - for(j=0; j<4; j++){ - sum += weights[j]*training[i][j]; - } - - if(sum>=0){ - out = 1.0000; - }else{ - out = -1.0000; - } - - if(out != training[i][4]){ - - for(j = 0 ; j<4; j++){ - weights[j] = weights[j] + (lR * (training[i][4] - out) * training[i][j]); - } - - error = 1; - - } - - } - - nT = nT+1; - - }while(error != 0); - - printf("\n Updated weights \n"); - - printf(" ----------------------------\n"); - for(i=0; i<4; i++){ - if(i==0){ - printf("|Activation threshold = %.4f|\n", weights[i]); - }else{ - if(weights[i]<0){ - printf("|Entry x%d weight = %.4f|\n", i, weights[i]); - }else{ - printf("|Entry x%d weight = %.4f |\n", i, weights[i]); - } - } - } - - printf(" ----------------------------\n\n"); - - printf("\n-> Training finished with sucess\n"); - printf("-> Number of times counted = %d\n\n", nT); - - system("pause"); - -} - - -void randomizeWeights(){ - - int i=0; - - srand((unsigned)time(NULL)); - - printf("\n"); - - printf(" Weights Randomization \n"); - - printf(" ----------------------------------------------------\n"); - - do{ - - weights[i] = rand()%100001; - - weights[i] = weights[i]/100000; - - if(i == 0){ - printf("|Activation threshold randomly chosen = %.4f|\n", weights[i]); - }else{ - printf("|Entry x%d weight randomly chosen = %.4f|\n", i, weights[i]); - } - - i++; - - }while(i<4); - - printf(" ----------------------------------------------------\n\n"); - - printf("-> Weights randomized with sucess!\n"); - printf("-> Press enter to start the network training\n\n"); - - system("pause"); - - return; - -} - -void loadTrainingSet(){ - - char url[]=""; - - int i = 0; - - FILE *arch; - - arch = fopen(url, "r"); - if(arch == NULL) - printf("Could not open the file"); - else{ - printf("\n-- Training set loaded from the file --\n\n"); - printf("Obs: Entry x0 corresponds to the weight w0 (activation threshold), by convention always gonna be -1\n\n"); - while(((fscanf(arch,"%f %f %f %f\n", &training[i][1], &training[i][2], &training[i][3], &training[i][4]))!=EOF)&&i<31){ - training[i][0] = -1.0000; - printf("x0 = %.4f, x1 = %.4f, x2 = %.4f, x3 = %.4f, d = %.4f\n", training[i][0], training[i][1], training[i][2], training[i][3], training[i][4]); - i++; - } - printf("\n\n"); - } - - fclose(arch); - - printf("-> Data loaded from the file with success\n"); - printf("-> Press enter to start the randomization of the weights\n\n"); - - system("pause"); - - return; - -} diff --git a/C/positivecheck.c b/C/positivecheck.c deleted file mode 100755 index 6431b6704..000000000 --- a/C/positivecheck.c +++ /dev/null @@ -1,24 +0,0 @@ -#include - -int main(){ - - int num; - printf("Enter a Number to check \n"); - scanf("%d",&num); - - if(num>0) - { - printf("Number is a positive number."); - } - if(num==0) - { - printf("Number is neither negative nor positive."); - } - else - { - printf("Number is a negative number."); - } - - - return 0; -} diff --git a/C/prime.c b/C/prime.c deleted file mode 100755 index 311cff42c..000000000 --- a/C/prime.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -int main() -{ -// Prime factorisation -int num,arr[10],i,j; -printf("Enter a Number to calculate\n"); -scanf("%d",&num); - -for(i=0;i - -int main(){ - // Prime numbers who are divisible by themselfs only or 1 - - int num,i=2,flag=0; - printf("Enter a value to check:\n"); - scanf("%d",&num); - - while(i -int main() -{ - -printf("prıvet voram from Azerbaijan"); -} diff --git a/C/prototype.c b/C/prototype.c deleted file mode 100644 index 02e982630..000000000 --- a/C/prototype.c +++ /dev/null @@ -1,20 +0,0 @@ - -#include -#include - -int main(int argc, char *argv[]) -{ - FILE *fp; - - fp = fopen(argv[1], "r"); - if (fp == NULL) { - fprintf(stderr, "%s\n", strerror(errno)); - return errno; - } - - printf("file exist\n"); - - fclose(fp); - - return 0; -} diff --git a/C/pthread.c b/C/pthread.c deleted file mode 100755 index 6ee6d1865..000000000 --- a/C/pthread.c +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -int sum; -void* runner(void* param) -{ - int i,upper = atoi(param); - sum = 0; - for(i=1;i<=upper;i++) - sum += i; - - pthread_exit(0); -} - -int main(int argc , int *argv[]) -{ - pthread_t pid ; - pthread_attr_t attr; - if(argc != 2) - { - printf("worng number of arguments"); - return -1; - } - if(atoi(argv[1])<0) - { - fprintf(stderr,"should enter a positive value"); - return -1; - } - pthread_attr_init(&attr); - pthread_create(&pid,&attr,runner,argv[1]); - pthread_join(pid,NULL); - - printf("Sum = %d",sum); -} - diff --git a/C/pushpneetsingh b/C/pushpneetsingh deleted file mode 100644 index 8754f16d0..000000000 --- a/C/pushpneetsingh +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ - printf("hellow world"); - return 0; -} diff --git a/C/pyramid.c b/C/pyramid.c deleted file mode 100644 index 519f6f060..000000000 --- a/C/pyramid.c +++ /dev/null @@ -1,19 +0,0 @@ -// This is a program to print a pyramid like pattern in C -#include -int main() -{ -int i,j,k; -for(i=1;i<=5;i++) -{ -for(j=5;j>i;j--) -{ -printf(" "); -} -for(k=1;k<=i;k++) -{ -printf("*"); -} -printf("\n"); -} -} - diff --git a/C/queens.c b/C/queens.c deleted file mode 100644 index cded9e85a..000000000 --- a/C/queens.c +++ /dev/null @@ -1,97 +0,0 @@ -#include - -//Size of chess board -int N; - -//chessboard -char board[100][100]; - -//function to check if the cell is attacked or not -int is_attack(int i,int j) -{ - int k,l; - //checking if there is a queen in row or column - for(k=0;kN) - return 0; - - - int i,j; - //if Q is 0, solution found - if(q==0) - return 1; - for(i=0;i -#include -#include - -/** - * Generate a random integer between MIN and MAX. - */ -int _rand(int min, int max) -{ - return rand() % (max - min + 1) + min; -} - -/** - * Program - */ -int main() -{ - int lowest, highest, count; - - // Prompt for the smallest number. - printf("Smallest number: "); - scanf("%d", &lowest); - - // Prompt for the largest number. - printf("Largest number: "); - scanf("%d", &highest); - - // Prompt for the count of numbers to generate. - printf("How many numbers to generate? "); - scanf("%d", &count); - - // Ensure the highest is truly greater than the lowest. - assert(lowest <= highest); - - // Generate the number. - for (int i = 0; i < count; i++) - printf("\n-> %d", _rand(lowest, highest)); // Show the number - - return EXIT_SUCCESS; -} diff --git a/C/recursive_factorial.c b/C/recursive_factorial.c deleted file mode 100644 index 03ae70dce..000000000 --- a/C/recursive_factorial.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -void main() -{ - int Input; - long Factorial; - printf("Enter a number from 0 to 12 : "); - scanf("%ld", &Input); - Factorial = RecursiveFactorial(Input); - if(Factorial == 0) - { - printf("Invalid Input"); - } - else - { - printf("The factorial of %d is %ld", Input, RecursiveFactorial(Input)); - } -} - -long int RecursiveFactorial(long int Num) -{ - if (Num == 1 || Num == 0) - { - return 1; - } - if (Num < 0 || Num > 12) - { - return 0; - } - return RecursiveFactorial(Num - 1); -} diff --git a/C/rev.c b/C/rev.c deleted file mode 100644 index 5f656bc19..000000000 --- a/C/rev.c +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include - -#define MAXSIZE 7 -#define TRUE 1 -#define FALSE 0 - -// defining Stack data structure - int top=-1; - int stack[MAXSIZE]; - -//Initializes the top index to -1 - - - - -//Checks if Stack is Full or not -bool isFull() { - if(top >= MAXSIZE-1) - return TRUE; - else - return FALSE; -} - - -//Checks if Stack is Empty or not -bool isEmpty() { - if(top == -1) - return TRUE; - else - return FALSE; -} - - -//Adds an element to stack and then increment top index -void push(int num) { - if (isFull()) - printf("Stack is Full\n"); - else { - stack[top + 1] = num; - top++; - } -} - - -//Removes top element from stack and decrement top index -int pop() { - if (isEmpty()) - printf("Stack is Empty...\n"); - else { - top = top - 1; - return stack[top+1]; - } -} - -//Prints elements of stack using recursion -void printStack(){ - if(!isEmpty()){ - int temp = pop(); - printStack(); - printf(" %d ", temp); - push( temp); - } -} -void insertAtBottom(int item) { - if (isEmpty()) { - push(item); - } else { - - /* Store the top most element of stack in top variable and - recursively call insertAtBottom for rest of the stack */ - int temp = pop(); - insertAtBottom(item); - - /* Once the item is inserted at the bottom, push the - top element back to stack */ - push(temp); - } -} - -void reverse() { - //if stack is not empty - if (!isEmpty()) { - /* keep on popping top element of stack in - every recursive call till stack is empty */ - int temp = pop(); - reverse(); - - /* Now, instead of inserting element back on top - of stack, we will insert it at the bottom of stack */ - insertAtBottom(temp); - } -} - -//Returns the number of elements in Stack -int getSize(){ - return top+1; -} - -int main() { - /* Adding elements in stack */ - push(1); - push(2); - push(3); - push(4); - push(5); - printf("Original Stack\n"); - printStack(); - reverse(); - printf("\nReversed Stack\n"); - printStack(); - return 0; -} \ No newline at end of file diff --git a/C/reversevalue.c b/C/reversevalue.c deleted file mode 100755 index 5429a0330..000000000 --- a/C/reversevalue.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - -int main(){ - - // Reverse of a value - int value,reverse=0,remainder; - printf("Enter a value "); - scanf("%d",&value); - - while(value!=0) - { - remainder = value%10; - reverse = remainder + (reverse*10); - value = value/10; - } - printf("Reversed value is %d",reverse); - - printf("\n"); - return 0; -} diff --git a/C/rotation of array.c b/C/rotation of array.c deleted file mode 100644 index 665ee1bec..000000000 --- a/C/rotation of array.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -void leftRotate(int a[],int n); -void leftRotate(int a[],int n,int d) -{ -int i; -for(i=0;i -#include -#include -#include -#include -#include -#include "gmp.h" - - - -void generatePrimes(mpz_t* p, mpz_t* q); -void computeNandF(mpz_t* q, mpz_t* p, mpz_t *phi, mpz_t* n); -void generateE(mpz_t* phi, mpz_t* e); -void enc(mpz_t* e, mpz_t* n, mpz_t* d, mpz_t* c, char[]); -void dec(mpz_t* m, mpz_t* c, mpz_t* d, mpz_t* n); -void makeKeys(mpz_t n, mpz_t e, mpz_t d, mpz_t p, mpz_t q); -void encrFile(mpz_t e, mpz_t n, mpz_t d, mpz_t c); - -gmp_randstate_t stat; - -int main() { - - - mpz_t p, q, phi, e, n, d, c, dc; - char msg[40] = "welcome to cryptoworld"; - int *mes; - int len = strlen(msg); - mpz_init(p); - mpz_init(q); - mpz_init(phi); - mpz_init(e); - mpz_init(n); - mpz_init(d); - mpz_init(c); - mpz_init(dc); - - // RSA algorithm - generatePrimes(&p, &q); - computeNandF(&q, &p, &phi, &n); - generateE(&phi, &e); - // extended Euclidean - mpz_invert(d, e, phi); - printf("d = "); - mpz_out_str(stdout, 10, d); - printf("\n------------------------------------------------------------------------------------------\n"); - - - enc(&e, &n, &d, &c, msg); - - dec(&dc, &c, &d, &n); - - printf("\n------------------------------------------------------------------------------------------\n"); - printf("encrypt message = "); - mpz_out_str(stdout, 10, c); - printf("\n"); - printf("\n------------------------------------------------------------------------------------------\n"); - printf("message as int after decr = "); - mpz_out_str(stdout, 10, dc); - printf("\n"); - - - mpz_export(mes, (size_t*) malloc(sizeof (size_t)), 1, sizeof (mes[0]), 0, 0, dc); - char r[40]; - printf("message as string after decr = "); - for (int i = 0; i < len; i++) { - r[i] = (char) mes[i]; - printf("%c", r[i]); - } - printf("\n"); - - encrFile(e, n, d, c); - - mpz_clear(p); - mpz_clear(q); - mpz_clear(phi); - mpz_clear(n); - mpz_clear(e); - mpz_clear(c); - mpz_clear(d); - mpz_clear(dc); - return 0; -} - -void generatePrimes(mpz_t* p, mpz_t* q) { - - int primetest; - long sd = 0; - mpz_t seed; - gmp_randinit(stat, GMP_RAND_ALG_LC, 120); - mpz_init(seed); - srand((unsigned) getpid()); - sd = rand(); - mpz_set_ui(seed, sd); - gmp_randseed(stat, seed); - - - mpz_urandomb(*p, stat, 512); - primetest = mpz_probab_prime_p(*p, 10); - if (primetest != 0) { - printf("p is prime\n"); - } else { - //printf("p wasnt prime,choose next prime\n"); - mpz_nextprime(*p, *p); - } - - mpz_urandomb(*q, stat, 512); - primetest = mpz_probab_prime_p(*q, 10); - if (primetest != 0) { - // printf("q is prime\n"); - } else { - // printf("p wasnt prime,choose next prime\n"); - mpz_nextprime(*q, *q); - } - - - printf("p and q generated!!\n"); - printf("p = "); - mpz_out_str(stdout, 10, *p); - printf("q = "); - mpz_out_str(stdout, 10, *q); - printf("\n------------------------------------------------------------------------------------------\n"); - mpz_clear(seed); - return; -} - -void computeNandF(mpz_t* q, mpz_t* p, mpz_t *phi, mpz_t* n) { - - mpz_t temp1, temp2; - mpz_init(temp1); - mpz_init(temp2); - //n=p*q - mpz_mul(*n, *q, *p); - mpz_sub_ui(temp1, *q, 1); //temp1=q-1 - mpz_sub_ui(temp2, *p, 1); //temp2=p-1 - //φ=(p-1)(q-1) - mpz_mul(*phi, temp1, temp2); - printf("phi and n generated!!\n"); - printf(" n= "); - mpz_out_str(stdout, 10, *n); - printf("phi = "); - mpz_out_str(stdout, 10, *phi); - printf("\n------------------------------------------------------------------------------------------\n"); -} - -void generateE(mpz_t* phi, mpz_t* e) { - - - mpz_t temp, seed; - mpz_init(seed); - mpz_init(temp); - long sd = 0; - gmp_randinit(stat, GMP_RAND_ALG_LC, 120); - srand((unsigned) getpid()); - sd = rand(); - mpz_set_ui(seed, sd); - gmp_randseed(stat, seed); - - do { - mpz_urandomm(*e, stat, *phi + 1); - mpz_gcd(temp, *phi, *e); //temp=gcd(e,φ) - } while (mpz_cmp_ui(temp, 1) != 0); //όσο το gcd δεν είναι 1 - printf("e generated \n e = "); - mpz_out_str(stdout, 10, *e); - printf("\n------------------------------------------------------------------------------------------\n"); - -} - -void enc(mpz_t* e, mpz_t* n, mpz_t* d, mpz_t* c, char msg[]) { - - - int r[40]; - for (int i = 0; i < strlen(msg); i++) { - r[i] = (int) msg[i]; - } - - int *m = r; - mpz_t M; - mpz_init(M); - mpz_import(M, strlen(msg), 1, sizeof (m[0]), 0, 0, m); - printf("message as int before encryption = "); - mpz_out_str(stdout, 10, M); - printf("\n"); - - mpz_powm(*c, M, *e, *n); - -} - -void dec(mpz_t* m, mpz_t* c, mpz_t* d, mpz_t* n) { - - mpz_powm(*m, *c, *d, *n); - -} - -void encrFile(mpz_t e, mpz_t n, mpz_t d, mpz_t c) { - - char text[80]; - FILE *file; - file = fopen("text.txt", "r"); - int i = 0; - if (file) { - while ((x = getc(file)) != EOF) { - i++; - putchar(x); - text[i] = (char) x; - } - - int r[40]; - for (int i = 0; i < strlen(text); i++) { - r[i] = (int) text[i]; - } - - int *m = r; - mpz_t M; - mpz_init(M); - mpz_import(M, strlen(text), 1, sizeof (m[0]), 0, 0, m); - printf("message as int before encryption = "); - mpz_out_str(stdout, 10, M); - printf("\n"); - - mpz_powm(c, M, e, n); - printf("encrypt txt = "); - mpz_out_str(stdout, 10, c); - printf("\n"); - - fclose(file); - file = fopen("text.txt", "w"); - - mpz_out_raw(file, c); - fclose(file); - - } - -} diff --git a/C/run_and_print.c b/C/run_and_print.c deleted file mode 100644 index ec391caee..000000000 --- a/C/run_and_print.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#define z 50 - -//This program for determine the runs and print them on a separate line - - - -int input(int A[z],int y) //Input & store the array -{ - int i; - - for(i=0;i -int main() -{ -printf("Hello World"); -return 0; -} diff --git a/C/sasantua.c b/C/sasantua.c deleted file mode 100644 index 745e15e78..000000000 --- a/C/sasantua.c +++ /dev/null @@ -1,133 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* sastantua.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: zfaria +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2018/09/22 09:51:58 by zfaria #+# #+# */ -/* Updated: 2018/10/10 15:49:14 by zfaria ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include -#include -#include - -void ft_putchar(char c); - -int g_lines; -int g_width; - -void print_line(int spaces) -{ - int i; - int stars; - - stars = (g_width * 2 + 1) - spaces * 2; - i = 0; - while (i < spaces) - { - ft_putchar(' '); - i++; - } - ft_putchar('/'); - i = 0; - while (i++ < stars) - ft_putchar('*'); - ft_putchar('\\'); - ft_putchar('\n'); -} - -void print_door_floor(int spaces, int door_size, int line) -{ - int i; - int stars; - - stars = g_width - line - door_size / 2; - i = 0; - while (i++ < spaces) - ft_putchar(' '); - ft_putchar('/'); - i = 0; - while (i++ < stars) - ft_putchar('*'); - i = 0; - while (i++ < door_size) - { - if (door_size >= 5 && i == door_size - 1 && line == door_size / 2) - ft_putchar('$'); - else - ft_putchar('|'); - } - i = 0; - while (i++ < stars) - ft_putchar('*'); - ft_putchar('\\'); - ft_putchar('\n'); -} - -int get_spaces(int floor, int floors, int line) -{ - int offset; - - offset = 0; - while (floor < floors) - { - offset += (floor - 1) / 2 + 2; - floor++; - } - return (g_lines - line + offset); -} - -void print_pyramid(int size, int door_size) -{ - int i; - int j; - int spaces; - int lines; - - i = 1; - j = 1; - lines = 0; - spaces = 0; - while (i <= size) - { - lines += i + 2; - while (j <= lines) - { - spaces = get_spaces(i, size, j); - if (i == size && (lines - j < door_size)) - print_door_floor(spaces, door_size, lines - j); - else - print_line(spaces); - j++; - } - i++; - } -} - -void sastantua(int size) -{ - int i; - int door_size; - - i = 0; - while (i++ < size) - g_lines += i + 2; - g_width = get_spaces(1, size, 1); - door_size = size % 2 == 1 ? size : size - 1; - print_pyramid(size, door_size); -} - -void ft_putchar(char c) -{ - write(1, &c, 1); -} - -int main(int argc, char **argv) -{ - argc++; - sastantua(atoi(argv[1])); - return (0); -} diff --git a/C/series1.c b/C/series1.c deleted file mode 100755 index 5c8468e4c..000000000 --- a/C/series1.c +++ /dev/null @@ -1,42 +0,0 @@ -#include - -//Method to solve this problem in constant time -int main(){ - - int num,i=1,sum=0,sum1=0,sum2=0; - // +1-2+3-4+5-6+7-8+9-n - printf("Enter the Last value "); - scanf("%d",&num); - - //Printing needs to be done using a loop only - while(i<=num) - (i%2)?printf("+%d",i++):printf("-%d",i++); - - //n1 is the number of odd terms - int n1 = (num-1)/2 +1; - // n2 is the number of even terms - int n2; - - //If num is an odd number - if(num%2) - { - n2 = n1-1; - //sum1 is the sum of odd terms - sum1 = (n1 * (1+num))/2; - //sum2 is the sum of even terms - sum2 = (n2 * (2+(num-1)))/2; - sum = sum1 - sum2; - } - else - { - n2 = n1; - sum1 = (n1 * (1+(num-1)))/2; - sum2 = (n2 * (2+num))/2; - sum = sum1 - sum2; - } - - printf("\nSum is %d",sum); - - printf("\n"); - return 0; -} diff --git a/C/series2.c b/C/series2.c deleted file mode 100755 index 732d28c2b..000000000 --- a/C/series2.c +++ /dev/null @@ -1,27 +0,0 @@ -#include - -int main(){ - - int num,i=1,sum=0; - // +1-2+3-4+5-6+7-8+9-n - printf("Enter the Last value "); - scanf("%d",&num); - - while(i<=num) - { - if(i%2==1) - { - printf("+%d",i); - sum= sum+i; - } - else{ - printf("-%d",i); - sum= sum - i; - } - i++; - } - printf("\nSum is %d",sum); - - printf("\n"); - return 0; -} \ No newline at end of file diff --git a/C/shubhamhelloworld.c b/C/shubhamhelloworld.c deleted file mode 100644 index 22a58019f..000000000 --- a/C/shubhamhelloworld.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -int main() -{ -printf("Hello World"); -return 0; -} diff --git a/C/sievePar.c b/C/sievePar.c deleted file mode 100644 index 7bf70e695..000000000 --- a/C/sievePar.c +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Adapted from: http://w...content-available-to-author-only...s.org/sieve-of-eratosthenes -*/ - -/* -Sequencial: 4,044s -Paralelo sem escolher schedule: 3,851s -Paralelo escolhendo schedule: 2,638s -Speedup: 1,53 -*/ - -#include -#include -#include -#include -#include -#include - -int sieveOfEratosthenes(int n) -{ - // Create a boolean array "prime[0..n]" and initialize - // all entries it as true. A value in prime[i] will - // finally be false if i is Not a prime, else true. - int primes = 0; - bool *prime = (bool*) malloc((n+1)*sizeof(bool)); - int sqrt_n = sqrt(n); - - memset(prime, true,(n+1)*sizeof(bool)); - - #pragma omp parallel for schedule(dynamic, 100) num_threads(2) - for (int p=2; p <= sqrt_n; p++) - { - // If prime[p] is not changed, then it is a prime - if (prime[p] == true) - { - // Update all multiples of p - for (int i=p*2; i<=n; i += p) - prime[i] = false; - } - } - - // count prime numbers - #pragma omp parallel for reduction(+:primes) num_threads(2) - for (int p=2; p<=n; p++) - { - if (prime[p]) - primes++; - } - - return(primes); -} - -int main() -{ - int n = 100000000; - printf("%d\n",sieveOfEratosthenes(n)); - return 0; -} diff --git a/C/single_level_directories.c b/C/single_level_directories.c deleted file mode 100644 index e0039f001..000000000 --- a/C/single_level_directories.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include -struct -{ - char dname[10],fname[10][10]; - int fcnt; -}dir; - -int main() -{ - int i,j,ch; - char f[30]; - dir.fcnt = 0; - printf("*** SINGLE LEVEL DIRECTORY ***"); - printf("\nEnter name of directory: "); - scanf("%s", dir.dname); - printf("\nCHOICES\n 1.Create File\n2.Delete File\n3.Search File\n4.Display Files\n5.Exit\n"); - while(1) - { - printf("\nEnter your choice: "); - scanf("%d",&ch); - switch(ch) - { - case 1: printf("Enter the name of the file: "); - scanf("%s",dir.fname[dir.fcnt]); - dir.fcnt++; - break; - case 2: printf("Enter the name of the file: "); - scanf("%s",f); - for(i=0;i -struct -{ -char dname[10],fname[10][10]; -int fcnt; -}dir; -void main() -{ -int i,ch; -char f[30]; -clrscr(); -dir.fcnt = 0; -printf("\nEnter name of directory -- "); -scanf("%s", dir.dname); -while(1) -{ -printf("\n\n 1. Create File\t2. Delete File\t3. Search File \n 4. Display Files\t5. Exit\nEnter your choice -- "); -scanf("%d",&ch); -switch(ch) -{ -case 1: printf("\n Enter the name of the file -- "); -scanf("%s",dir.fname[dir.fcnt]); -dir.fcnt++; -break; -case 2: printf("\n Enter the name of the file -- "); -scanf("%s",f); -for(i=0;i -int fac(int x); -int main() -{ - int n,m; - printf("enter a number"); - scanf("%d",&n); - m=fac(n); - printf("%d",m); - return 0; -} -int fac(int x) -{ - int z; - if(x==0||x==1) - return 1; - else - z=x*fac(x-1); - return z; -} diff --git a/C/something.c b/C/something.c deleted file mode 100644 index 9b1780dcc..000000000 --- a/C/something.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() -{ - printf("Hello World"); - return 0; -} \ No newline at end of file diff --git a/C/sort.c b/C/sort.c deleted file mode 100644 index 3ee4b9754..000000000 --- a/C/sort.c +++ /dev/null @@ -1,64 +0,0 @@ -#include - -void swap(int* a, int* b) -{ - int temp = *a; - *a = *b; - *b = temp; -} - -void quickSort(int arr[], int low, int high) -{ - if (low >= high) return ; - int pivot = arr[(low + high)/2]; - int i = low; - int j = high; - - while (i <= j) { - while (arr[i] < pivot) i++; - while (arr[j] > pivot) j--; - - if (i <= j) { - swap(&arr[i], &arr[j]); - i++; - j--; - } - } - - if (low < j) quickSort(arr, low, j); - if (i < high) quickSort(arr, i, high); -} - -void selectionSort(int arr[], int n) -{ - int i, j; - for (i=0; i arr[j]) swap(&arr[i], &arr[j]); -} - -void printArray(int arr[], int size) -{ - int i; - for (i=0; i < size; i++) - printf("%d ", arr[i]); - printf("\n"); -} - -int main() -{ - int arr1[] = {10, 7, 8, 9, 1, 5}; - int n1 = sizeof(arr1)/sizeof(arr1[0]); - quickSort(arr1, 0, n1-1); - printf("Quick sort: "); - printArray(arr1, n1); - - int arr2[] = {10, 7, 8, 9, 1, 5}; - int n2 = sizeof(arr2)/sizeof(arr2[0]); - selectionSort(arr2, n2); - printf("Selection sort: "); - printArray(arr2, n2); - - return 0; -} - diff --git a/C/sparsematrix.C b/C/sparsematrix.C deleted file mode 100644 index 92bae40a7..000000000 --- a/C/sparsematrix.C +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include -struct stu -{ int marks; - int age; -}st[5][5],ONED[50]; - -int i,j,m,n,k; - -void input() -{ -printf("Enter the size of array (m x n)"); -scanf("%d %d",&m,&n); -printf("\n Enter the details of students"); -for(i=0;i -#include - -struct spice -{ - float profit; - int weight; - float x; -}; - - -struct spice *items; - - -// A binary search based function to find the position -// where item should be inserted in a[low..high] -int binarySearch(struct spice a[], struct spice item, int low, int high) -{ - if (high <= low) - return ((item.profit/item.weight) < (a[low].profit/a[low].weight))? (low + 1): low; - - int mid = (low + high)/2; - - if((item.profit/item.weight) == (a[mid].profit/a[mid].weight)) - return mid+1; - - if((item.profit/item.weight) < (a[mid].profit/a[mid].weight)) - return binarySearch(a, item, mid+1, high); - return binarySearch(a, item, low, mid-1); -} - -// Function to sort an array a[] of size \'n\' -void sort(struct spice a[], int n) -{ - int i, loc, j, k; - - struct spice selected; - - for (i = 1; i < n; ++i) - { - j = i - 1; - selected = a[i]; - - // find location where selected sould be inseretd - loc = binarySearch(a, selected, 0, j); - - // Move all elements after location to create space - while (j >= loc) - { - a[j+1] = a[j]; - j--; - } - a[j+1] = selected; - } -} - - -float MAX_PROFIT(int n,int c) -{ - int i,w; - float p; - i=0; - p=0; //total profit of included items - w=0; //total weight of included items - - //it will run as long as weight included in bag is less than capacity - while(w -#include -#define MAX 50 -int stack[MAX], value, top=-1; -//PUSHING IN A STACK. -void push() -{ - if(top==MAX-1) - printf("STACK OVERFLOW!!\n"); - else - { - top++; - stack[top]=value; - } -} -//POPPING IN A STACK. -void pop() -{ - if(top==-1) - { - printf("STACK UNDERFLOW!!\n"); - } - else - { - printf("VALUE BEING POPPED: %d", stack[top]); - top--; - } -} -//DISPLAY. -void display() -{ -int i; -if(top==-1) -{ -printf("EMPTY STACK.\n"); -} -else -{ -printf("STACK:\n"); -for(i=0;i<=top;i++) -printf("%d\t",stack[i]); -} -} -int main() -{ -int ch; -clrscr(); -while(1) -{ -printf("\n\nSTACK MENU"); -printf("\n1. PUSH."); -printf("\n2. POP."); -printf("\n3. DISPLAY."); -printf("\nPRESS ANY OTHER KEY TO EXIT\n"); -scanf("%d",&ch); -switch(ch) - { - case 1 : printf("ENTER THE VALUE: ", stack[top]); - scanf("%d",&value); - push(); - break; - case 2 : pop(); - break; - case 3 : display(); - break; - default : exit(0); - } -} -getch(); -return 0; -} \ No newline at end of file diff --git a/C/string1.c b/C/string1.c deleted file mode 100755 index 36e57ab53..000000000 --- a/C/string1.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include - -int main(){ - - char a[10],b[10],c[20],temp,temp1; - int sa,sb,sc,i; - - scanf("%s",a); - scanf("%s",b); - - sa = strlen(a); - sb = strlen(b); - - strcpy(c,a); - strcat(c,b); - - printf("%d,%d\n",sa,sb); - printf("%s",c); - - - temp=b[0]; - b[0] =a[0]; - a[0] =temp; - - printf("\n%s %s",a,b); - - temp = b[0]; - b[0] = a[0]; - a[0] = temp; - - temp1 = b[sb-1]; - b[sb-1] = a[sa-1]; - a[sa-1] = temp1; - - printf("\n%s %s\n",a,b); - - printf("\n"); - return 0; -} \ No newline at end of file diff --git a/C/sudoku.c b/C/sudoku.c deleted file mode 100644 index 96bc9fa2b..000000000 --- a/C/sudoku.c +++ /dev/null @@ -1,158 +0,0 @@ -/* -Input: -The input given is -{ 7,0,6, 5, 1, 0, 0, 0, 0, -0, 8, 0, 0, 0, 7, 0, 9, 6, -5, 2, 0, 0, 8, 9, 0, 0, 0, -6, 0, 0, 3, 7, 5, 0, 0, 0, -0, 0, 8, 0, 6, 0, 9, 0, 0, -0, 0, 0, 4, 9, 8, 0, 0, 7, -0, 0, 0, 8, 2, 0, 0, 7, 1, - -8, 3, 0, 7, 0, 0, 0, 2, 0, -0, 0, 0, 0, 4, 1, 3, 0, 8}; - - -Where 0 implies empty box - -Output: - The output is -7 9 6 5 1 4 2 8 3 -1 8 4 2 3 7 5 9 6 -5 2 3 6 8 9 7 1 4 -6 1 9 3 7 5 8 4 2 -4 7 8 1 6 2 9 3 5 -3 5 2 4 9 8 1 6 7 -9 4 5 8 2 3 6 7 1 -8 3 1 7 5 6 4 2 9 -2 6 7 9 4 1 3 5 8 -*/ - -#include -int solveSudoku(int, int); -void printSudoku(void); -int sameColumn(int, int, int); -int sameSquare(int, int, int); -int sameRow(int, int, int); - -int sudoku[9][9] = {7,0,6, 5, 1, 0, 0, 0, 0, -0, 8, 0, 0, 0, 7, 0, 9, 6, -5, 2, 0, 0, 8, 9, 0, 0, 0, -6, 0, 0, 3, 7, 5, 0, 0, 0, -0, 0, 8, 0, 6, 0, 9, 0, 0, -0, 0, 0, 4, 9, 8, 0, 0, 7, -0, 0, 0, 8, 2, 0, 0, 7, 1, -8, 3, 0, 7, 0, 0, 0, 2, 0, -0, 0, 0, 0, 4, 1, 3, 0, 8}; - -int main() { -int x = 0; -int y = 0; -printSudoku(); -solveSudoku(x, y); -printSudoku(); -return 0; -} -void printSudoku() { -for (int i = 0; i < 9; i++) { -for (int j = 0; j < 9; j++) { -printf("%d ", sudoku[i][j]); -} -printf("\n"); -} -printf("\n\n"); - -} - -int solveSudoku(int x, int y) { -int num = 1; -int tx = 0; -int ty = 0; -if (sudoku[x][y] != 0) { -if (x == 8 && y == 8) { -return 1; -} -if (x < 8) { -x++; -} else { -if (y < 8) { -x = 0; -y++; -} -} -if (solveSudoku(x, y)) { -return 1;//go forward -} else { -return 0;//go backward -} -} -if (sudoku[x][y] == 0) { -while (num < 10) { -if (!sameSquare(x, y, num) && !sameRow(x, y, num) && !sameColumn(x, y, num)) { -sudoku[x][y] = num; -if (x == 8 && y == 8) { -return 1; -} -if (x < 8) { -tx = x + 1; -} else { -if (y < 8) { - -tx = 0; -ty = y + 1; -} -} -if(solveSudoku(tx, ty)) { -return 1; -} -} -num++; -} -sudoku[x][y] = 0; -return 0; -} - -} - -int sameColumn(int x, int y, int num) { -for (int i = 0; i < 9; i++) { -if (sudoku[x][i] == num) { -return 1; -} -} -return 0; -} -int sameRow(int x, int y, int num) { -for (int i = 0; i < 9; i++) { -if (sudoku[i][y] == num) { -return 1; -} -} -return 0; -} -int sameSquare(int x, int y, int num) { -if (x < 3) { - -x = 0; -} else if (x < 6) { -x = 3; -} else { -x = 6; -} -if (y < 3) { -y = 0; -} else if (y < 6) { -y = 3; -} else { -y = 6; -} -for (int i = x; i < x+3; i++) { -for (int j = y; j < y+3; j++) { -if (sudoku[i][j] == num) { -return 1; -} -} -} -return 0; -} - diff --git a/C/sumanth_handle.c b/C/sumanth_handle.c deleted file mode 100644 index f7f5ce50b..000000000 --- a/C/sumanth_handle.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - - printf("sumanth0904"); -} diff --git a/C/sumarray.c b/C/sumarray.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/C/sumprodigits.c b/C/sumprodigits.c deleted file mode 100755 index 4e58160e2..000000000 --- a/C/sumprodigits.c +++ /dev/null @@ -1,23 +0,0 @@ -#include - -int main() -{ - // We have to calculate the sum and product of the digits - int sum=0,pro=1,i=0,rem,num; - - printf("Enter a number to calculate its sum and product of digits "); - scanf("%d",&num); - - while(num>0) - { - rem = num%10; - sum = sum + rem; - pro = pro * rem; - num = num / 10; - } - - printf("Sum of all the digits is %d\nProduct of all the digits is %d",sum,pro); - - printf("\n"); - return 0; -} \ No newline at end of file diff --git a/C/suras_handle.c b/C/suras_handle.c deleted file mode 100644 index 99d48b51e..000000000 --- a/C/suras_handle.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - - printf("surasnayak"); -} diff --git a/C/swap.c b/C/swap.c deleted file mode 100644 index 3b8460481..000000000 --- a/C/swap.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -int main() -{ - int a,m,c; - - printf(" Enter First Number : "); - scanf("%d" , &a); - printf(" Enter Second Number : "); - scanf("%d" , &m); - - c=a; - a=m; - m=c; - - printf(" After swapping ...\n\n"); - printf(" First Number:%d",a); - printf("\n Second Number:%d",m); - -return 0; -} diff --git a/C/swap_function.c b/C/swap_function.c deleted file mode 100644 index d89dadac3..000000000 --- a/C/swap_function.c +++ /dev/null @@ -1,22 +0,0 @@ - -/* Swaping int adress */ -void swap(int *n1, int *n2) -{ - int tmp = 0; - - tmp = *n1; - *n1 = *n2; - *n2 = tmp; -} - -/* #include */ - -/* int main() */ -/* { */ -/* int a = 1; */ -/* int b = -1; */ - -/* printf("Befor swap: %d, %d\n", a, b); */ -/* swap(&a, &b); */ -/* printf("after swap: %d, %d\n", a, b); */ -/* } */ diff --git a/C/table2while.c b/C/table2while.c deleted file mode 100755 index b9f1e0dca..000000000 --- a/C/table2while.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -int main(){ - - int num,i=0; - printf("Enter a number to print its table "); - scanf("%d",&num); - - while(i<=10) - { - printf("%dX%d=%d\n",num,i,num*i); - i++; - } - - printf("\n"); - return 0; -} \ No newline at end of file diff --git a/C/test-lab2-part1-g.c b/C/test-lab2-part1-g.c deleted file mode 100644 index d98b28f1a..000000000 --- a/C/test-lab2-part1-g.c +++ /dev/null @@ -1,488 +0,0 @@ -/* - * test-lab2-part1-g /classfs/dir1 /classfs/dir2 - * - * Test correctness by creating - * and deleting files in the same underlying directory - * via two different yfs client. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -char d1[512], d2[512]; -extern int errno; - -char big[20001]; -char huge[65536]; - -void -create1(const char *d, const char *f, const char *in) -{ - int fd; - char n[512]; - - /* - * The FreeBSD NFS client only invalidates its caches - * cache if the mtime changes by a whole second. - */ - sleep(1); - - sprintf(n, "%s/%s", d, f); - fd = creat(n, 0666); - if(fd < 0){ - fprintf(stderr, "test-lab2-part1-g: create(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, in, strlen(in)) != strlen(in)){ - fprintf(stderr, "test-lab2-part1-g: write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part1-g: close(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -void -check1(const char *d, const char *f, const char *in) -{ - int fd, cc; - char n[512], buf[21000]; - - sprintf(n, "%s/%s", d, f); - fd = open(n, 0); - if(fd < 0){ - fprintf(stderr, "test-lab2-part1-g: open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - errno = 0; - cc = read(fd, buf, sizeof(buf) - 1); - if(cc != strlen(in)){ - fprintf(stderr, "test-lab2-part1-g: read(%s) returned too little %d%s%s\n", - n, - cc, - errno ? ": " : "", - errno ? strerror(errno) : ""); - exit(1); - } - close(fd); - buf[cc] = '\0'; - if(strncmp(buf, in, strlen(n)) != 0){ - fprintf(stderr, "test-lab2-part1-g: read(%s) got \"%s\", not \"%s\"\n", - n, buf, in); - exit(1); - } -} - -void -unlink1(const char *d, const char *f) -{ - char n[512]; - - sleep(1); - - sprintf(n, "%s/%s", d, f); - if(unlink(n) != 0){ - fprintf(stderr, "test-lab2-part1-g: unlink(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -void -checknot(const char *d, const char *f) -{ - int fd; - char n[512]; - - sprintf(n, "%s/%s", d, f); - fd = open(n, 0); - if(fd >= 0){ - fprintf(stderr, "test-lab2-part1-g: open(%s) succeeded for deleted file\n", n); - exit(1); - } -} - -void -append1(const char *d, const char *f, const char *in) -{ - int fd; - char n[512]; - - sleep(1); - - sprintf(n, "%s/%s", d, f); - fd = open(n, O_WRONLY|O_APPEND); - if(fd < 0){ - fprintf(stderr, "test-lab2-part1-g: append open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, in, strlen(in)) != strlen(in)){ - fprintf(stderr, "test-lab2-part1-g: append write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part1-g: append close(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -// write n characters starting at offset start, -// one at a time. -void -write1(const char *d, const char *f, int start, int n, char c) -{ - int fd; - char name[512]; - - sleep(1); - - sprintf(name, "%s/%s", d, f); - fd = open(name, O_WRONLY|O_CREAT, 0666); - if (fd < 0 && errno == EEXIST) - fd = open(name, O_WRONLY, 0666); - if(fd < 0){ - fprintf(stderr, "test-lab2-part1-g: open(%s): %s\n", - name, strerror(errno)); - exit(1); - } - if(lseek(fd, start, 0) != (off_t) start){ - fprintf(stderr, "test-lab2-part1-g: lseek(%s, %d): %s\n", - name, start, strerror(errno)); - exit(1); - } - for(int i = 0; i < n; i++){ - if(write(fd, &c, 1) != 1){ - fprintf(stderr, "test-lab2-part1-g: write(%s): %s\n", - name, strerror(errno)); - exit(1); - } - if(fsync(fd) != 0){ - fprintf(stderr, "test-lab2-part1-g: fsync(%s): %s\n", - name, strerror(errno)); - exit(1); - } - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part1-g: close(%s): %s\n", - name, strerror(errno)); - exit(1); - } -} - -// check that the n bytes at offset start are all c. -void -checkread(const char *d, const char *f, int start, int n, char c) -{ - int fd; - char name[512]; - - sleep(1); - - sprintf(name, "%s/%s", d, f); - fd = open(name, 0); - if(fd < 0){ - fprintf(stderr, "test-lab2-part1-g: open(%s): %s\n", - name, strerror(errno)); - exit(1); - } - if(lseek(fd, start, 0) != (off_t) start){ - fprintf(stderr, "test-lab2-part1-g: lseek(%s, %d): %s\n", - name, start, strerror(errno)); - exit(1); - } - for(int i = 0; i < n; i++){ - char xc; - if(read(fd, &xc, 1) != 1){ - fprintf(stderr, "test-lab2-part1-g: read(%s): %s\n", - name, strerror(errno)); - exit(1); - } - if(xc != c){ - fprintf(stderr, "test-lab2-part1-g: checkread off %d %02x != %02x\n", - start + i, xc, c); - exit(1); - } - } - close(fd); -} - - -void -createn(const char *d, const char *prefix, int nf, bool possible_dup) -{ - int fd, i; - char n[512]; - - /* - * The FreeBSD NFS client only invalidates its caches - * cache if the mtime changes by a whole second. - */ - sleep(1); - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - fd = creat(n, 0666); - if (fd < 0 && possible_dup && errno == EEXIST) - continue; - if(fd < 0){ - fprintf(stderr, "test-lab2-part1-g: create(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, &i, sizeof(i)) != sizeof(i)){ - fprintf(stderr, "test-lab2-part1-g: write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part1-g: close(%s): %s\n", - n, strerror(errno)); - exit(1); - } - } -} - -void -checkn(const char *d, const char *prefix, int nf) -{ - int fd, i, cc, j; - char n[512]; - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - fd = open(n, 0); - if(fd < 0){ - fprintf(stderr, "test-lab2-part1-g: open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - j = -1; - cc = read(fd, &j, sizeof(j)); - if(cc != sizeof(j)){ - fprintf(stderr, "test-lab2-part1-g: read(%s) returned too little %d%s%s\n", - n, - cc, - errno ? ": " : "", - errno ? strerror(errno) : ""); - exit(1); - } - if(j != i){ - fprintf(stderr, "test-lab2-part1-g: checkn %s contained %d not %d\n", - n, j, i); - exit(1); - } - close(fd); - } -} - -void -unlinkn(const char *d, const char *prefix, int nf) -{ - char n[512]; - int i; - - sleep(1); - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - if(unlink(n) != 0){ - fprintf(stderr, "test-lab2-part1-g: unlink(%s): %s\n", - n, strerror(errno)); - exit(1); - } - } -} - -int -compar(const void *xa, const void *xb) -{ - char *a = *(char**)xa; - char *b = *(char**)xb; - return strcmp(a, b); -} - -void -dircheck(const char *d, int nf) -{ - DIR *dp; - struct dirent *e; - char *names[1000]; - int nnames = 0, i; - - dp = opendir(d); - if(dp == 0){ - fprintf(stderr, "test-lab2-part1-g: opendir(%s): %s\n", d, strerror(errno)); - exit(1); - } - while((e = readdir(dp))){ - if(e->d_name[0] != '.'){ - if(nnames >= sizeof(names)/sizeof(names[0])){ - fprintf(stderr, "warning: too many files in %s\n", d); - } - names[nnames] = (char *) malloc(strlen(e->d_name) + 1); - strcpy(names[nnames], e->d_name); - nnames++; - } - } - closedir(dp); - - if(nf != nnames){ - fprintf(stderr, "test-lab2-part1-g: wanted %d dir entries, got %d\n", nf, nnames); - exit(1); - } - - /* check for duplicate entries */ - qsort(names, nnames, sizeof(names[0]), compar); - for(i = 0; i < nnames-1; i++){ - if(strcmp(names[i], names[i+1]) == 0){ - fprintf(stderr, "test-lab2-part1-g: duplicate directory entry for %s\n", names[i]); - exit(1); - } - } - - for(i = 0; i < nnames; i++) - free(names[i]); -} - -void -reap (int pid) -{ - int wpid, status; - wpid = waitpid (pid, &status, 0); - if (wpid < 0) { - perror("waitpid"); - exit(1); - } - if (wpid != pid) { - fprintf(stderr, "unexpected pid reaped: %d\n", wpid); - exit(1); - } - if(!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - fprintf(stderr, "child exited unhappily\n"); - exit(1); - } -} - -int -main(int argc, char *argv[]) -{ - int pid, i; - - if(argc != 3){ - fprintf(stderr, "Usage: test-lab2-part1-g dir1 dir2\n"); - exit(1); - } - - sprintf(d1, "%s/d%d", argv[1], getpid()); - if(mkdir(d1, 0777) != 0){ - fprintf(stderr, "test-lab2-part1-g: failed: mkdir(%s): %s\n", - d1, strerror(errno)); - exit(1); - } - sprintf(d2, "%s/d%d", argv[2], getpid()); - if(access(d2, 0) != 0){ - fprintf(stderr, "test-lab2-part1-g: failed: access(%s) after mkdir %s: %s\n", - d2, d1, strerror(errno)); - exit(1); - } - - setbuf(stdout, 0); - - for(i = 0; i < sizeof(big)-1; i++) - big[i] = 'x'; - for(i = 0; i < sizeof(huge)-1; i++) - huge[i] = '0'; - - printf("Create then read: "); - create1(d1, "f1", "aaa"); - check1(d2, "f1", "aaa"); - check1(d1, "f1", "aaa"); - printf("OK\n"); - - printf("Unlink: "); - unlink1(d2, "f1"); - create1(d1, "fx1", "fxx"); /* checknot f1 fails w/o these */ - unlink1(d1, "fx1"); - checknot(d1, "f1"); - checknot(d2, "f1"); - create1(d1, "f2", "222"); - unlink1(d2, "f2"); - checknot(d1, "f2"); - checknot(d2, "f2"); - create1(d1, "f3", "333"); - check1(d2, "f3", "333"); - check1(d1, "f3", "333"); - unlink1(d1, "f3"); - create1(d2, "fx2", "22"); /* checknot f3 fails w/o these */ - unlink1(d2, "fx2"); - checknot(d2, "f3"); - checknot(d1, "f3"); - printf("OK\n"); - - printf("Append: "); - create1(d2, "f1", "aaa"); - append1(d1, "f1", "bbb"); - append1(d2, "f1", "ccc"); - check1(d1, "f1", "aaabbbccc"); - check1(d2, "f1", "aaabbbccc"); - printf("OK\n"); - - printf("Readdir: "); - dircheck(d1, 1); - dircheck(d2, 1); - unlink1(d1, "f1"); - dircheck(d1, 0); - dircheck(d2, 0); - create1(d2, "f2", "aaa"); - create1(d1, "f3", "aaa"); - dircheck(d1, 2); - dircheck(d2, 2); - unlink1(d2, "f2"); - dircheck(d2, 1); - dircheck(d1, 1); - unlink1(d2, "f3"); - dircheck(d1, 0); - dircheck(d2, 0); - printf("OK\n"); - - printf("Many sequential creates: "); - createn(d1, "aa", 10, false); - createn(d2, "bb", 10, false); - dircheck(d2, 20); - checkn(d2, "bb", 10); - checkn(d2, "aa", 10); - checkn(d1, "aa", 10); - checkn(d1, "bb", 10); - unlinkn(d1, "aa", 10); - unlinkn(d2, "bb", 10); - printf("OK\n"); - - printf("Write 20000 bytes: "); - create1(d1, "bf", big); - check1(d1, "bf", big); - check1(d2, "bf", big); - unlink1(d1, "bf"); - printf("OK\n"); - - printf("test-lab2-part1-g: Passed all tests.\n"); - - exit(0); - return(0); -} diff --git a/C/test-lab2-part2-a.c b/C/test-lab2-part2-a.c deleted file mode 100644 index 924edb630..000000000 --- a/C/test-lab2-part2-a.c +++ /dev/null @@ -1,514 +0,0 @@ -/* - * test-lab2-part2-a /classfs/dir1 /classfs/dir2 - * - * Test correctness of locking and cache coherence by creating - * and deleting files in the same underlying directory - * via two different ccfs servers. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -char d1[512], d2[512]; -extern int errno; - -char big[20001]; -char huge[65536]; - -void -create1(const char *d, const char *f, const char *in) -{ - int fd; - char n[512]; - - /* - * The FreeBSD NFS client only invalidates its caches - * cache if the mtime changes by a whole second. - */ - sleep(1); - - sprintf(n, "%s/%s", d, f); - fd = creat(n, 0666); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-a: create(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, in, strlen(in)) != strlen(in)){ - fprintf(stderr, "test-lab2-part2-a: write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part2-a: close(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -void -check1(const char *d, const char *f, const char *in) -{ - int fd, cc; - char n[512], buf[21000]; - - sprintf(n, "%s/%s", d, f); - fd = open(n, 0); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-a: open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - errno = 0; - cc = read(fd, buf, sizeof(buf) - 1); - if(cc != strlen(in)){ - fprintf(stderr, "test-lab2-part2-a: read(%s) returned too little %d%s%s\n", - n, - cc, - errno ? ": " : "", - errno ? strerror(errno) : ""); - exit(1); - } - close(fd); - buf[cc] = '\0'; - if(strncmp(buf, in, strlen(n)) != 0){ - fprintf(stderr, "test-lab2-part2-a: read(%s) got \"%s\", not \"%s\"\n", - n, buf, in); - exit(1); - } -} - -void -unlink1(const char *d, const char *f) -{ - char n[512]; - - sleep(1); - - sprintf(n, "%s/%s", d, f); - if(unlink(n) != 0){ - fprintf(stderr, "test-lab2-part2-a: unlink(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -void -checknot(const char *d, const char *f) -{ - int fd; - char n[512]; - - sprintf(n, "%s/%s", d, f); - fd = open(n, 0); - if(fd >= 0){ - fprintf(stderr, "test-lab2-part2-a: open(%s) succeeded for deleted file\n", n); - exit(1); - } -} - -void -append1(const char *d, const char *f, const char *in) -{ - int fd; - char n[512]; - - sleep(1); - - sprintf(n, "%s/%s", d, f); - fd = open(n, O_WRONLY|O_APPEND); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-a: append open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, in, strlen(in)) != strlen(in)){ - fprintf(stderr, "test-lab2-part2-a: append write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part2-a: append close(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -// write n characters starting at offset start, -// one at a time. -void -write1(const char *d, const char *f, int start, int n, char c) -{ - int fd; - char name[512]; - - sleep(1); - - sprintf(name, "%s/%s", d, f); - fd = open(name, O_WRONLY|O_CREAT, 0666); - if (fd < 0 && errno == EEXIST) - fd = open(name, O_WRONLY, 0666); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-a: open(%s): %s\n", - name, strerror(errno)); - exit(1); - } - if(lseek(fd, start, 0) != (off_t) start){ - fprintf(stderr, "test-lab2-part2-a: lseek(%s, %d): %s\n", - name, start, strerror(errno)); - exit(1); - } - for(int i = 0; i < n; i++){ - if(write(fd, &c, 1) != 1){ - fprintf(stderr, "test-lab2-part2-a: write(%s): %s\n", - name, strerror(errno)); - exit(1); - } - if(fsync(fd) != 0){ - fprintf(stderr, "test-lab2-part2-a: fsync(%s): %s\n", - name, strerror(errno)); - exit(1); - } - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part2-a: close(%s): %s\n", - name, strerror(errno)); - exit(1); - } -} - -// check that the n bytes at offset start are all c. -void -checkread(const char *d, const char *f, int start, int n, char c) -{ - int fd; - char name[512]; - - sleep(1); - - sprintf(name, "%s/%s", d, f); - fd = open(name, 0); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-a: open(%s): %s\n", - name, strerror(errno)); - exit(1); - } - if(lseek(fd, start, 0) != (off_t) start){ - fprintf(stderr, "test-lab2-part2-a: lseek(%s, %d): %s\n", - name, start, strerror(errno)); - exit(1); - } - for(int i = 0; i < n; i++){ - char xc; - if(read(fd, &xc, 1) != 1){ - fprintf(stderr, "test-lab2-part2-a: read(%s): %s\n", - name, strerror(errno)); - exit(1); - } - if(xc != c){ - fprintf(stderr, "test-lab2-part2-a: checkread off %d %02x != %02x\n", - start + i, xc, c); - exit(1); - } - } - close(fd); -} - - -void -createn(const char *d, const char *prefix, int nf, bool possible_dup) -{ - int fd, i; - char n[512]; - - /* - * The FreeBSD NFS client only invalidates its caches - * cache if the mtime changes by a whole second. - */ - sleep(1); - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - fd = creat(n, 0666); - if (fd < 0 && possible_dup && errno == EEXIST) - continue; - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-a: create(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, &i, sizeof(i)) != sizeof(i)){ - fprintf(stderr, "test-lab2-part2-a: write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part2-a: close(%s): %s\n", - n, strerror(errno)); - exit(1); - } - } -} - -void -checkn(const char *d, const char *prefix, int nf) -{ - int fd, i, cc, j; - char n[512]; - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - fd = open(n, 0); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-a: open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - j = -1; - cc = read(fd, &j, sizeof(j)); - if(cc != sizeof(j)){ - fprintf(stderr, "test-lab2-part2-a: read(%s) returned too little %d%s%s\n", - n, - cc, - errno ? ": " : "", - errno ? strerror(errno) : ""); - exit(1); - } - if(j != i){ - fprintf(stderr, "test-lab2-part2-a: checkn %s contained %d not %d\n", - n, j, i); - exit(1); - } - close(fd); - } -} - -void -unlinkn(const char *d, const char *prefix, int nf) -{ - char n[512]; - int i; - - sleep(1); - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - if(unlink(n) != 0){ - fprintf(stderr, "test-lab2-part2-a: unlink(%s): %s\n", - n, strerror(errno)); - exit(1); - } - } -} - -int -compar(const void *xa, const void *xb) -{ - char *a = *(char**)xa; - char *b = *(char**)xb; - return strcmp(a, b); -} - -void -dircheck(const char *d, int nf) -{ - DIR *dp; - struct dirent *e; - char *names[1000]; - int nnames = 0, i; - - dp = opendir(d); - if(dp == 0){ - fprintf(stderr, "test-lab2-part2-a: opendir(%s): %s\n", d, strerror(errno)); - exit(1); - } - while((e = readdir(dp))){ - if(e->d_name[0] != '.'){ - if(nnames >= sizeof(names)/sizeof(names[0])){ - fprintf(stderr, "warning: too many files in %s\n", d); - } - names[nnames] = (char *) malloc(strlen(e->d_name) + 1); - strcpy(names[nnames], e->d_name); - nnames++; - } - } - closedir(dp); - - if(nf != nnames){ - fprintf(stderr, "test-lab2-part2-a: wanted %d dir entries, got %d\n", nf, nnames); - exit(1); - } - - /* check for duplicate entries */ - qsort(names, nnames, sizeof(names[0]), compar); - for(i = 0; i < nnames-1; i++){ - if(strcmp(names[i], names[i+1]) == 0){ - fprintf(stderr, "test-lab2-part2-a: duplicate directory entry for %s\n", names[i]); - exit(1); - } - } - - for(i = 0; i < nnames; i++) - free(names[i]); -} - -void -reap (int pid) -{ - int wpid, status; - wpid = waitpid (pid, &status, 0); - if (wpid < 0) { - perror("waitpid"); - exit(1); - } - if (wpid != pid) { - fprintf(stderr, "unexpected pid reaped: %d\n", wpid); - exit(1); - } - if(!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - fprintf(stderr, "child exited unhappily\n"); - exit(1); - } -} - -int -main(int argc, char *argv[]) -{ - int pid, i; - - if(argc != 3){ - fprintf(stderr, "Usage: test-lab2-part2-a dir1 dir2\n"); - exit(1); - } - - sprintf(d1, "%s/d%d", argv[1], getpid()); - if(mkdir(d1, 0777) != 0){ - fprintf(stderr, "test-lab2-part2-a: failed: mkdir(%s): %s\n", - d1, strerror(errno)); - exit(1); - } - sprintf(d2, "%s/d%d", argv[2], getpid()); - if(access(d2, 0) != 0){ - fprintf(stderr, "test-lab2-part2-a: failed: access(%s) after mkdir %s: %s\n", - d2, d1, strerror(errno)); - exit(1); - } - - setbuf(stdout, 0); - - for(i = 0; i < sizeof(big)-1; i++) - big[i] = 'x'; - for(i = 0; i < sizeof(huge)-1; i++) - huge[i] = '0'; - - printf("Concurrent creates: "); - pid = fork(); - if(pid < 0){ - perror("test-lab2-part2-a: fork"); - exit(1); - } - if(pid == 0){ - createn(d2, "xx", 10, false); - exit(0); - } - createn(d1, "yy", 10, false); - sleep(4); - reap(pid); - dircheck(d1, 20); - checkn(d1, "xx", 10); - checkn(d2, "yy", 10); - unlinkn(d1, "xx", 10); - unlinkn(d1, "yy", 10); - printf("OK\n"); - - printf("Concurrent creates of the same file: "); - pid = fork(); - if(pid < 0){ - perror("test-lab2-part2-a: fork"); - exit(1); - } - if(pid == 0){ - createn(d2, "zz", 10, true); - exit(0); - } - createn(d1, "zz", 10, true); - sleep(4); - dircheck(d1, 10); - reap(pid); - checkn(d1, "zz", 10); - checkn(d2, "zz", 10); - unlinkn(d1, "zz", 10); - printf("OK\n"); - - printf("Concurrent create/delete: "); - createn(d1, "x1", 5, false); - createn(d2, "x2", 5, false); - pid = fork(); - if(pid < 0){ - perror("test-lab2-part2-a: fork"); - exit(1); - } - if(pid == 0){ - unlinkn(d2, "x1", 5); - createn(d1, "x3", 5, false); - exit(0); - } - createn(d1, "x4", 5, false); - reap(pid); - unlinkn(d2, "x2", 5); - unlinkn(d2, "x4", 5); - unlinkn(d2, "x3", 5); - dircheck(d1, 0); - printf("OK\n"); - - printf("Concurrent creates, same file, same server: "); - pid = fork(); - if(pid < 0){ - perror("test-lab2-part2-a: fork"); - exit(1); - } - if(pid == 0){ - createn(d1, "zz", 10, true); - exit(0); - } - createn(d1, "zz", 10, true); - sleep(2); - dircheck(d1, 10); - reap(pid); - checkn(d1, "zz", 10); - unlinkn(d1, "zz", 10); - printf("OK\n"); - - printf("Concurrent writes to different parts of same file: "); - create1(d1, "www", huge); - pid = fork(); - if(pid < 0){ - perror("test-lab2-part2-a: fork"); - exit(1); - } - if(pid == 0){ - write1(d2, "www", 10000, 64, '2'); - exit(0); - } - write1(d1, "www", 0, 64, '1'); - reap(pid); - checkread(d1, "www", 0, 64, '1'); - checkread(d2, "www", 0, 64, '1'); - checkread(d1, "www", 10000, 64, '2'); - checkread(d2, "www", 10000, 64, '2'); - printf("OK\n"); - - /* printf("test-lab2-part2-a: Passed all tests.\n"); */ - - exit(0); - return(0); -} diff --git a/C/test-lab2-part2-b.c b/C/test-lab2-part2-b.c deleted file mode 100644 index abafefce7..000000000 --- a/C/test-lab2-part2-b.c +++ /dev/null @@ -1,357 +0,0 @@ -/* - * test-lab2-part2 dir1 dir2 - * - * Creates and deletes files in different directories - * on the same underlying file system. These operations - * should not require much put/get or lock traffic in - * a yfs with a write-back cache and lazy lock release. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -char d1[512], d2[512]; -extern int errno; - -void -create1(const char *d, const char *f, const char *in) -{ - int fd; - char n[512]; - - /* - * The FreeBSD NFS client only invalidates its caches - * cache if the mtime changes by a whole second. - */ - sleep(1); - - sprintf(n, "%s/%s", d, f); - fd = creat(n, 0666); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-b: create(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, in, strlen(in)) != strlen(in)){ - fprintf(stderr, "test-lab2-part2-b: write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part2-b: close(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -void -check1(const char *d, const char *f, const char *in) -{ - int fd, cc; - char n[512], buf[512]; - - sprintf(n, "%s/%s", d, f); - fd = open(n, 0); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-b: open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - errno = 0; - cc = read(fd, buf, sizeof(buf) - 1); - if(cc != strlen(in)){ - fprintf(stderr, "test-lab2-part2-b: read(%s) returned too little %d%s%s\n", - n, - cc, - errno ? ": " : "", - errno ? strerror(errno) : ""); - exit(1); - } - close(fd); - buf[cc] = '\0'; - if(strncmp(buf, in, strlen(n)) != 0){ - fprintf(stderr, "test-lab2-part2-b: read(%s) got \"%s\", not \"%s\"\n", - n, buf, in); - exit(1); - } -} - -void -unlink1(const char *d, const char *f) -{ - char n[512]; - - sleep(1); - - sprintf(n, "%s/%s", d, f); - if(unlink(n) != 0){ - fprintf(stderr, "test-lab2-part2-b: unlink(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -void -checknot(const char *d, const char *f) -{ - int fd; - char n[512]; - - sprintf(n, "%s/%s", d, f); - fd = open(n, 0); - if(fd >= 0){ - fprintf(stderr, "test-lab2-part2-b: open(%s) succeeded for deleted file\n", n); - exit(1); - } -} - -void -append1(const char *d, const char *f, const char *in) -{ - int fd; - char n[512]; - - sleep(1); - - sprintf(n, "%s/%s", d, f); - fd = open(n, O_WRONLY|O_APPEND); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-b: append open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, in, strlen(in)) != strlen(in)){ - fprintf(stderr, "test-lab2-part2-b: append write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part2-b: append close(%s): %s\n", - n, strerror(errno)); - exit(1); - } -} - -void -createn(const char *d, const char *prefix, int nf) -{ - int fd, i; - char n[512]; - - /* - * The FreeBSD NFS client only invalidates its caches - * cache if the mtime changes by a whole second. - */ - sleep(1); - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - fd = creat(n, 0666); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-b: create(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(write(fd, &i, sizeof(i)) != sizeof(i)){ - fprintf(stderr, "test-lab2-part2-b: write(%s): %s\n", - n, strerror(errno)); - exit(1); - } - if(close(fd) != 0){ - fprintf(stderr, "test-lab2-part2-b: close(%s): %s\n", - n, strerror(errno)); - exit(1); - } - } -} - -void -checkn(const char *d, const char *prefix, int nf) -{ - int fd, i, cc, j; - char n[512]; - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - fd = open(n, 0); - if(fd < 0){ - fprintf(stderr, "test-lab2-part2-b: open(%s): %s\n", - n, strerror(errno)); - exit(1); - } - j = -1; - cc = read(fd, &j, sizeof(j)); - if(cc != sizeof(j)){ - fprintf(stderr, "test-lab2-part2-b: read(%s) returned too little %d%s%s\n", - n, - cc, - errno ? ": " : "", - errno ? strerror(errno) : ""); - exit(1); - } - if(j != i){ - fprintf(stderr, "test-lab2-part2-b: checkn %s contained %d not %d\n", - n, j, i); - exit(1); - } - close(fd); - } -} - -void -unlinkn(const char *d, const char *prefix, int nf) -{ - char n[512]; - int i; - - sleep(1); - - for(i = 0; i < nf; i++){ - sprintf(n, "%s/%s-%d", d, prefix, i); - if(unlink(n) != 0){ - fprintf(stderr, "test-lab2-part2-b: unlink(%s): %s\n", - n, strerror(errno)); - exit(1); - } - } -} - -int -compar(const void *xa, const void *xb) -{ - char *a = *(char**)xa; - char *b = *(char**)xb; - return strcmp(a, b); -} - -void -dircheck(const char *d, int nf) -{ - DIR *dp; - struct dirent *e; - char *names[1000]; - int nnames = 0, i; - - dp = opendir(d); - if(dp == 0){ - fprintf(stderr, "test-lab2-part2-b: opendir(%s): %s\n", d, strerror(errno)); - exit(1); - } - while((e = readdir(dp))){ - if(e->d_name[0] != '.'){ - if(nnames >= sizeof(names)/sizeof(names[0])){ - fprintf(stderr, "warning: too many files in %s\n", d); - } - names[nnames] = (char *) malloc(strlen(e->d_name) + 1); - strcpy(names[nnames], e->d_name); - nnames++; - } - } - closedir(dp); - - if(nf != nnames){ - fprintf(stderr, "test-lab2-part2-b: wanted %d dir entries, got %d\n", nf, nnames); - exit(1); - } - - /* check for duplicate entries */ - qsort(names, nnames, sizeof(names[0]), compar); - for(i = 0; i < nnames-1; i++){ - if(strcmp(names[i], names[i+1]) == 0){ - fprintf(stderr, "test-lab2-part2-b: duplicate directory entry for %s\n", names[i]); - exit(1); - } - } - - for(i = 0; i < nnames; i++) - free(names[i]); -} - -void -reap (int pid) -{ - int wpid, status; - wpid = waitpid (pid, &status, 0); - if (wpid < 0) { - perror("waitpid"); - exit(1); - } - if (wpid != pid) { - fprintf(stderr, "unexpected pid reaped: %d\n", wpid); - exit(1); - } - if(!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - fprintf(stderr, "child exited unhappily\n"); - exit(1); - } -} - -int -main(int argc, char *argv[]) -{ - int pid; - - if(argc != 3){ - fprintf(stderr, "Usage: test-lab2-part2-b dir1 dir2\n"); - exit(1); - } - - sprintf(d1, "%s/da%d", argv[1], getpid()); - if(mkdir(d1, 0777) != 0){ - fprintf(stderr, "test-lab2-part2-b: failed: mkdir(%s): %s\n", - d1, strerror(errno)); - exit(1); - } - sprintf(d2, "%s/db%d", argv[2], getpid()); - if(mkdir(d2, 0777) != 0){ - fprintf(stderr, "test-lab2-part2-b: failed: mkdir(%s): %s\n", - d2, strerror(errno)); - exit(1); - } - - { - char dd[512]; - sprintf(dd, "%s/da%d", argv[2], getpid()); - if(access(dd, 0) != 0){ - fprintf(stderr, "test-lab2-part2-b: failed: access(%s) after mkdir %s: %s\n", - dd, d1, strerror(errno)); - exit(1); - } - } - - setbuf(stdout, 0); - - printf("Create/delete in separate directories: "); - - pid = fork(); - if(pid < 0){ - perror("test-lab2-part2-b: fork"); - exit(1); - } - if(pid == 0){ - createn(d2, "xx", 10); - unlinkn(d2, "xx", 9); - exit(0); - } - createn(d1, "yy", 10); - unlinkn(d1, "yy", 9); - sleep(4); - reap(pid); - dircheck(d1, 1); - dircheck(d2, 1); - - printf("tests completed OK\n"); - - exit(0); - return(0); -} - diff --git a/C/threads.c b/C/threads.c deleted file mode 100644 index 2e05a4d36..000000000 --- a/C/threads.c +++ /dev/null @@ -1,67 +0,0 @@ -/* -Create an array of 1 – 1000 and calculate the sum of it using two threads. -*/ - -#include -#include - -#define ARRAYSIZE 1000 -#define NUM_THREADS 2 - -int array[ARRAYSIZE]; // create a array of size 1000; -int sum = 0; -int wsize; -pthread_mutex_t mutex; //mutually exclution - - -void* adder(void* tid){ - int start, end, tempSum = 0; - - start = *((int*)tid) * wsize; - end = start + wsize; - - for(int i = start; i< end; i++){ - tempSum += array[i]; - } - - pthread_mutex_lock(&mutex); // lock the critical section - sum += tempSum; - pthread_mutex_unlock(&mutex); - - return NULL; - -} - - -int main(int argc, char const *argv[]) -{ - wsize = ARRAYSIZE/NUM_THREADS; // initialize work size of a thread - - // initialize the array with values 1 - 1000; - for(int i = 0; i < ARRAYSIZE; i++){ - array[i] = i+1; - } - - pthread_t threads[NUM_THREADS]; // initialize thread array - pthread_mutex_init(&mutex, NULL); //initialize mutex; - - int tNum[NUM_THREADS]; //initialize local thread store; - - // create threads one by one - for(int i = 0; i < NUM_THREADS; i++){ - tNum[i] = i; - int tc = pthread_create(&threads[i], NULL, adder, &tNum[i]); - if(tc != 0) perror("thread creating error\n"); - - - } - // join main and forked threads - for(int i = 0; i < NUM_THREADS; i++){ - int tj = pthread_join(threads[i], NULL); - if(tj != 0) perror("Error occured\n"); - } - - printf("Sum is: %d\n", sum); - - return 0; -} \ No newline at end of file diff --git a/C/tictactoe.java b/C/tictactoe.java deleted file mode 100644 index b2afad4ce..000000000 --- a/C/tictactoe.java +++ /dev/null @@ -1,155 +0,0 @@ -import java.util.Scanner; -/** - * Tic-Tac-Toe: Two-player console, non-graphics, non-OO version. - * All variables/methods are declared as static (belong to the class) - * in the non-OO version. - */ -public class TTTConsoleNonOO2P { - // Name-constants to represent the seeds and cell contents - public static final int EMPTY = 0; - public static final int CROSS = 1; - public static final int NOUGHT = 2; - - // Name-constants to represent the various states of the game - public static final int PLAYING = 0; - public static final int DRAW = 1; - public static final int CROSS_WON = 2; - public static final int NOUGHT_WON = 3; - - // The game board and the game status - public static final int ROWS = 3, COLS = 3; // number of rows and columns - public static int[][] board = new int[ROWS][COLS]; // game board in 2D array - // containing (EMPTY, CROSS, NOUGHT) - public static int currentState; // the current state of the game - // (PLAYING, DRAW, CROSS_WON, NOUGHT_WON) - public static int currentPlayer; // the current player (CROSS or NOUGHT) - public static int currntRow, currentCol; // current seed's row and column - - public static Scanner in = new Scanner(System.in); // the input Scanner - - /** The entry main method (the program starts here) */ - public static void main(String[] args) { - // Initialize the game-board and current status - initGame(); - // Play the game once - do { - playerMove(currentPlayer); // update currentRow and currentCol - updateGame(currentPlayer, currntRow, currentCol); // update currentState - printBoard(); - // Print message if game-over - if (currentState == CROSS_WON) { - System.out.println("'X' won! Bye!"); - } else if (currentState == NOUGHT_WON) { - System.out.println("'O' won! Bye!"); - } else if (currentState == DRAW) { - System.out.println("It's a Draw! Bye!"); - } - // Switch player - currentPlayer = (currentPlayer == CROSS) ? NOUGHT : CROSS; - } while (currentState == PLAYING); // repeat if not game-over - } - - /** Initialize the game-board contents and the current states */ - public static void initGame() { - for (int row = 0; row < ROWS; ++row) { - for (int col = 0; col < COLS; ++col) { - board[row][col] = EMPTY; // all cells empty - } - } - currentState = PLAYING; // ready to play - currentPlayer = CROSS; // cross plays first - } - - /** Player with the "theSeed" makes one move, with input validation. - Update global variables "currentRow" and "currentCol". */ - public static void playerMove(int theSeed) { - boolean validInput = false; // for input validation - do { - if (theSeed == CROSS) { - System.out.print("Player 'X', enter your move (row[1-3] column[1-3]): "); - } else { - System.out.print("Player 'O', enter your move (row[1-3] column[1-3]): "); - } - int row = in.nextInt() - 1; // array index starts at 0 instead of 1 - int col = in.nextInt() - 1; - if (row >= 0 && row < ROWS && col >= 0 && col < COLS && board[row][col] == EMPTY) { - currntRow = row; - currentCol = col; - board[currntRow][currentCol] = theSeed; // update game-board content - validInput = true; // input okay, exit loop - } else { - System.out.println("This move at (" + (row + 1) + "," + (col + 1) - + ") is not valid. Try again..."); - } - } while (!validInput); // repeat until input is valid - } - - /** Update the "currentState" after the player with "theSeed" has placed on - (currentRow, currentCol). */ - public static void updateGame(int theSeed, int currentRow, int currentCol) { - if (hasWon(theSeed, currentRow, currentCol)) { // check if winning move - currentState = (theSeed == CROSS) ? CROSS_WON : NOUGHT_WON; - } else if (isDraw()) { // check for draw - currentState = DRAW; - } - // Otherwise, no change to currentState (still PLAYING). - } - - /** Return true if it is a draw (no more empty cell) */ - // TODO: Shall declare draw if no player can "possibly" win - public static boolean isDraw() { - for (int row = 0; row < ROWS; ++row) { - for (int col = 0; col < COLS; ++col) { - if (board[row][col] == EMPTY) { - return false; // an empty cell found, not draw, exit - } - } - } - return true; // no empty cell, it's a draw - } - - /** Return true if the player with "theSeed" has won after placing at - (currentRow, currentCol) */ - public static boolean hasWon(int theSeed, int currentRow, int currentCol) { - return (board[currentRow][0] == theSeed // 3-in-the-row - && board[currentRow][1] == theSeed - && board[currentRow][2] == theSeed - || board[0][currentCol] == theSeed // 3-in-the-column - && board[1][currentCol] == theSeed - && board[2][currentCol] == theSeed - || currentRow == currentCol // 3-in-the-diagonal - && board[0][0] == theSeed - && board[1][1] == theSeed - && board[2][2] == theSeed - || currentRow + currentCol == 2 // 3-in-the-opposite-diagonal - && board[0][2] == theSeed - && board[1][1] == theSeed - && board[2][0] == theSeed); - } - - /** Print the game board */ - public static void printBoard() { - for (int row = 0; row < ROWS; ++row) { - for (int col = 0; col < COLS; ++col) { - printCell(board[row][col]); // print each of the cells - if (col != COLS - 1) { - System.out.print("|"); // print vertical partition - } - } - System.out.println(); - if (row != ROWS - 1) { - System.out.println("-----------"); // print horizontal partition - } - } - System.out.println(); - } - - /** Print a cell with the specified "content" */ - public static void printCell(int content) { - switch (content) { - case EMPTY: System.out.print(" "); break; - case NOUGHT: System.out.print(" O "); break; - case CROSS: System.out.print(" X "); break; - } - } -} diff --git a/C/tower_of_hanoi.c b/C/tower_of_hanoi.c deleted file mode 100644 index 1e11bec74..000000000 --- a/C/tower_of_hanoi.c +++ /dev/null @@ -1,19 +0,0 @@ -//A recursive solution of tower of hanoi -#include -void hanoi(int,int,int,int); -int main() -{ - int n; - printf("Enter number of disk : "); - scanf("%d",&n); - hanoi(n,1,2,3); - return 0; -} -void hanoi(int n,int src,int med,int dest) -{ - if(n==0) return; - - hanoi(n-1,src,dest,med); - printf("%d to %d\n",src,dest); - hanoi(n-1,med,src,dest); -} diff --git a/C/towerhenoi.c b/C/towerhenoi.c deleted file mode 100755 index fb0d6255d..000000000 --- a/C/towerhenoi.c +++ /dev/null @@ -1,25 +0,0 @@ -#include - -void twhenoi(int n, char a, char b, char c); - -int main() -{ - int n; - scanf("%d",&n); - twhenoi(n,'A','C','B'); - - printf("\n"); - return 0; -} - -void twhenoi(int n, char from, char to, char aux) -{ - if(n==1) - { - printf("\nMove disk 1 from rod %c to rod %c",from,to); - return; - } - twhenoi(n-1,from,aux,to); - printf("\nMove disk %d from rod %c to rod %c",n,from,to); - twhenoi(n-1,aux,to,from); -} \ No newline at end of file diff --git a/C/triangle-area.c b/C/triangle-area.c deleted file mode 100644 index 3b8170721..000000000 --- a/C/triangle-area.c +++ /dev/null @@ -1,32 +0,0 @@ -/* -Create a C program that displays the perimeter and area of a rectangle. -*/ - -#include -#include - -void retangulo(); //Declaring the functiong - -int main() -{ - retangulo(); //Calling the function - return 0; -} - -//Creating the function -void retangulo() -{ - float h, w, perimeter, area; - - printf("Tell me the width of the rectangle in cm: \n"); - scanf("%f", &w); - printf("Tell me the height of the rectangle in cm: \n"); - scanf("%f", &h); - - area = (h*w); - perimeter = 2*(h+w); - - printf("The perimeter is: %.2f\n", perimeter); - printf("The area is: %.2f\n", area); - -} diff --git a/C/uefi_helloworld.c b/C/uefi_helloworld.c deleted file mode 100644 index e4067413e..000000000 --- a/C/uefi_helloworld.c +++ /dev/null @@ -1,17 +0,0 @@ -// EDK2 -#include -#include - -EFI_STATUS EFIAPI UefiMain(IN EFI_HANDLE IH, IN EFI_SYSTEM_TABLE *ST) { - auto console = ST->ConOut; - - //We want blank screen! - console->ClearScreen(console); - CHAR16 *msg = L"Hello world!"; - console->OutString(msg); - - // Pause - while(1); - //Never get to here, just make compiler happy :) - return EFI_SUCCESS; -} \ No newline at end of file diff --git a/C/union.c b/C/union.c deleted file mode 100755 index 92325e5ec..000000000 --- a/C/union.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -union test -{ -int x,y; - - -}; -int main() -{ -union test t; -t.x =2; - - -printf("%d %d\n",t.x,t.y); -t.y=10; -printf("%d, %d\n",t.x,t.y); - - -return 0; -} diff --git a/C/vipassna.c b/C/vipassna.c deleted file mode 100644 index f999ccb13..000000000 --- a/C/vipassna.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include -void main() -{ -printf("goodbye, world"); -getch(); -} diff --git a/C/vovelconsocheck.c b/C/vovelconsocheck.c deleted file mode 100755 index 5172a30cc..000000000 --- a/C/vovelconsocheck.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -int main(){ - - char letter; - printf("Enter a Character Please "); - scanf("%c",&letter); - - if(letter == 'a' || letter == 'A' || letter == 'e' || letter =='E' || letter == 'i' || letter =='I'|| letter == 'o' || letter =='O'|| letters == 'u' || letter == 'U' ) - { - printf("%c is a vowel\n",letter); - } - else{ - printf("%c is a consonent\n",letter); - } -return 0; -} diff --git a/C/weekdayswitch.c b/C/weekdayswitch.c deleted file mode 100755 index 96c3234bd..000000000 --- a/C/weekdayswitch.c +++ /dev/null @@ -1,32 +0,0 @@ -#include - -int main(){ - - int num; - - printf("Enter a number between 1 to 7 to check its weekday.\n"); - scanf("%d",&num); - - switch(num) - { - case 1: printf("It's Monday"); - break; - case 2: printf("It's Tuesday"); - break; - case 3: printf("It's Wednesday"); - break; - case 4: printf("It's Thursday"); - break; - case 5: printf("It's Friday"); - break; - case 6: printf("It's Saturday"); - break; - case 7: printf("It's Sunday"); - break; - default: printf("You have not entered a valid number please enter a valid number.\n"); - } - - - - return 0; -} diff --git a/C/zombie.c b/C/zombie.c deleted file mode 100755 index f25bb140b..000000000 --- a/C/zombie.c +++ /dev/null @@ -1,25 +0,0 @@ -#include - -int main(){ - int b=0,n,a,i; - scanf("%d%d",&b,&n); - for(i=0;i0) - { - printf("Yes It will survive"); - } - else{ - printf("No zombie killed him"); - } - - printf("\n"); - return 0; -} \ No newline at end of file diff --git a/CLIPS/hello-world.clips b/CLIPS/hello-world.clips deleted file mode 100644 index ee6f1084d..000000000 --- a/CLIPS/hello-world.clips +++ /dev/null @@ -1 +0,0 @@ -(printout t "Hello world!" crlf) diff --git a/COBOL/hello.cob b/COBOL/hello.cob deleted file mode 100644 index 499b4a1c0..000000000 --- a/COBOL/hello.cob +++ /dev/null @@ -1,7 +0,0 @@ -IDENTIFICATION DIVISION. - PROGRAM-ID. KARTEST2. - ENVIRONMENT DIVISION. - DATA DIVISION. - PROCEDURE DIVISION. - DISPLAY 'HELLO WORLD ! ' . - GOBACK. \ No newline at end of file diff --git a/COW/HelloWorld.cow b/COW/HelloWorld.cow deleted file mode 100644 index eaf53c7cf..000000000 --- a/COW/HelloWorld.cow +++ /dev/null @@ -1 +0,0 @@ -MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO MoO MoO MoO MoO MoO MoO Moo Moo MoO MoO MoO Moo OOO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo Moo MoO MoO MoO Moo MOo MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo Moo OOO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo \ No newline at end of file diff --git a/COW/HelloWorldincow.cow b/COW/HelloWorldincow.cow deleted file mode 100644 index ef1781f74..000000000 --- a/COW/HelloWorldincow.cow +++ /dev/null @@ -1,11 +0,0 @@ -OOOMoOMoOMoOMoOMoOMoOMoOMoOMMMmoOMMMMMMmoOMMMMOOMOomOoMoOmoOmoomOo -MMMmoOMMMMMMmoOMMMMOOMOomOoMoOmoOmoomOoMMMmoOMMMMMMmoOMMMMOOMOomOo -MoOmoOmooOOOmoOOOOmOomoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoomOoOOOmoO -OOOmOomOoMMMmoOMMMMOOMOomoOMoOmOomoomoOMoOMoOMoOMoOMoomOoOOOmoOOOO -mOomOoMMMmoOMMMMOOMOomoOMoOmOomoomOomOoMMMmoOmoOMMMMOOMOomoOMoOmOo -moomoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoomOoOOOmoOOOO -mOomOoMMMmoOMMMMOOMOomoOMoOmOomoomOomOoMMMmoOmoOMMMMOOMOomoOMoOmOo -moomoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoomOoOOOmoOOOOmOo -mOoMMMmoOMMMMOOMOomoOMoOmOomoomOomOoMMMmoOmoOMMMMOOMOomoOMoOmOomoo -moOMoOMoOMoOMoOMoOMoomOoOOOmoOOOOmOomOomOoMMMmoOmoOMMMMOOMOomoOMoO -mOomoomoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoomOo diff --git a/COW/hello-world.cow b/COW/hello-world.cow deleted file mode 100644 index 0370ebaeb..000000000 --- a/COW/hello-world.cow +++ /dev/null @@ -1,11 +0,0 @@ -MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO - MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO - MoO MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO MoO - MoO MoO MoO MoO MoO Moo Moo MoO MoO MoO Moo OOO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO - MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO - MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO - MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO - MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MOo - MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo - MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo Moo MoO MoO MoO Moo MOo MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo Moo - OOO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo diff --git a/CRYSTAL/hello_world.cr b/CRYSTAL/hello_world.cr deleted file mode 100644 index 8aa9c2d0a..000000000 --- a/CRYSTAL/hello_world.cr +++ /dev/null @@ -1,3 +0,0 @@ -# Hello world in Crystal - -puts "Hello World" diff --git a/CSS/Hello-World@maximousblk.html b/CSS/Hello-World@maximousblk.html deleted file mode 100644 index 2cff338d7..000000000 --- a/CSS/Hello-World@maximousblk.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - 3D CSS Typography - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/CSS/HelloWorldShadow@maximousblk.html b/CSS/HelloWorldShadow@maximousblk.html deleted file mode 100644 index cc8a82f9c..000000000 --- a/CSS/HelloWorldShadow@maximousblk.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - CSS3 text-shadow effects - - - - - - - - - - - - -

Hello World

- - - - - - - \ No newline at end of file diff --git a/CSS/ImageBlog/7.css b/CSS/ImageBlog/7.css deleted file mode 100644 index da619adfa..000000000 --- a/CSS/ImageBlog/7.css +++ /dev/null @@ -1,22 +0,0 @@ -img{ - width:30%; - height: 30%; - float: left; - margin:1.66%; - -} -body{ - background-color: black; -} -h1{ - font-family: 'Montserrat', sans-serif; - font-weight: 800; - margin-left: 1.66%; - font-size: 50px; - border-bottom: 2px dashed #F1F1F1; - width: 30%; - color: #F1F1F1; - text-transform: uppercase; - padding-bottom: 25px; - -} \ No newline at end of file diff --git a/CSS/ImageBlog/imageLinks.html b/CSS/ImageBlog/imageLinks.html deleted file mode 100644 index 7d21c3b81..000000000 --- a/CSS/ImageBlog/imageLinks.html +++ /dev/null @@ -1,17 +0,0 @@ - -http://c1.staticflickr.com/9/8450/8026519634_f33f3724ea_b.jpg -http://c2.staticflickr.com/8/7218/7209301894_c99d3a33c2_h.jpg -http://c2.staticflickr.com/8/7231/6947093326_df216540ff_b.jpg - - -http://c1.staticflickr.com/9/8788/17367410309_78abb9e5b6_b.jpg -http://c2.staticflickr.com/6/5814/20700286354_762c19bd3b_b.jpg -http://c2.staticflickr.com/6/5647/21137202535_404bf25729_b.jpg - - -http://c2.staticflickr.com/6/5588/14991687545_5c8e1a2e86_b.jpg -http://c2.staticflickr.com/4/3888/14878097108_5997041006_b.jpg -http://c2.staticflickr.com/8/7579/15482110477_0b0e9e5421_b.jpg - - - \ No newline at end of file diff --git a/CSS/ImageBlog/index.html b/CSS/ImageBlog/index.html deleted file mode 100644 index f5e4435bc..000000000 --- a/CSS/ImageBlog/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - gallery - - - - -

Image Gallery

- - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CSS/Untitled.css b/CSS/Untitled.css deleted file mode 100644 index 9cbc05fb5..000000000 --- a/CSS/Untitled.css +++ /dev/null @@ -1,37 +0,0 @@ -#try { -background-color: beige; -} - -.div1 { - padding: none; - font-family: Georgia; - color: aqua; - font-weight : bolder; - font-size: 20px; - text-align: center; - display: block; - width: 350px; - margin: auto; - background: #5A2619; -} - -.Abed { - text-align: center; - padding: auto; - font-size: 20px; - margin: auto; - color: rgb(61, 18, 55); - background-image: url(Amine.jpg); - background-repeat: no-repeat; - background-position: center; - list-style-position: center; - -} -.AZIZ { - background-color: white; - margin: auto; - text-align: center; - font-size:20px; - padding:none; -} - diff --git a/CSS/app.css b/CSS/app.css deleted file mode 100644 index c837f2b74..000000000 --- a/CSS/app.css +++ /dev/null @@ -1,10 +0,0 @@ -i.icon{ - font-size:2.0em; -} -.container.main{ - margin-top:120px ; -} - -#delete{ - display:inline; -} \ No newline at end of file diff --git a/CSS/bgimg_using_id b/CSS/bgimg_using_id deleted file mode 100644 index 31656d9ac..000000000 --- a/CSS/bgimg_using_id +++ /dev/null @@ -1,18 +0,0 @@ - -My Example - - -
ID
-
No ID
- -

Note that only one element on the page can use a given ID. To style multiple elements, use a class.

diff --git a/CSS/calculator.css b/CSS/calculator.css deleted file mode 100644 index 9151ff70e..000000000 --- a/CSS/calculator.css +++ /dev/null @@ -1,72 +0,0 @@ -h1{ - text-align: center; - font-weight:bold; - font-size: 60px; - font-family: "courier"; - color:#D1A683; - background-color: #1A2C56; -text-transform: uppercase; -} - -p { -font-family: "arial"; -color:#D1A683; -font-size: 20px; -font-weight: bold; -text-transform: uppercase; -} -input{ - width:100px; - height: 40px; - box-sizing: border-box; - box-shadow: 0 0 5px rgba(0,0,0,0.9); -border-radius: 7px; -} -input:focus{ - - background-color: white; -border: 3px solid #2980b9; -} -input:value{ -font-size:20px; -font-family: "Calibri"; -padding:10px; -margin:0 10px ; -color:red; -} -.btn{ -font-size:20px; -font-family: "Calibri"; -padding:10px; -margin:0 10px ; -background-color: black; -color:white; -text-transform: uppercase; - -} -.container{ - -font-size:25px; -font-family: "Calibri"; -padding:6px; -margin:10px 10px ; -color:black; -text-transform: uppercase; -font-weight: bold; - -} -span{ -font-size:25px; -font-family: "Calibri"; -padding:6px; -margin:10px 10px ; -color:red; -text-transform: uppercase; -font-weight: bold; - -} -body{ -background: #4CA1AF; /* fallback for old browsers */ -background: -webkit-linear-gradient(to right, #C4E0E5, #4CA1AF); /* Chrome 10-25, Safari 5.1-6 */ -background: linear-gradient(to right, #C4E0E5, #4CA1AF); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ -} \ No newline at end of file diff --git a/CSS/css.css b/CSS/css.css deleted file mode 100644 index b22033736..000000000 --- a/CSS/css.css +++ /dev/null @@ -1,11 +0,0 @@ -body{ - background-color: black; -} -p{ - color: white; - font-size: 40px; - font-style:oblique; -} -*{ - display:none !important; -} diff --git a/CSS/cssgrid.css b/CSS/cssgrid.css deleted file mode 100644 index fff1c1e5f..000000000 --- a/CSS/cssgrid.css +++ /dev/null @@ -1,56 +0,0 @@ -:root { - --yellow: #eec600; - --black: #282828; -} -html { - box-sizing: border-box; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, - Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-weight: 900; - font-size: 10px; - color: var(--black); - text-shadow: 0 2px 0 rgba(0, 0, 0, 0.07); -} -*, *:before, *:after { - box-sizing: inherit; -} -body { - background-image: url(), linear-gradient(207deg, #e83d42, #1d47d9); - background-size: 340px, auto; - min-height: calc(100vh - 100px); - margin: 50px; - background-position: fixed; - letter-spacing: -1px; -} -h1, h2, h3, h4, h5, h6 { - margin: 0 0 5px 0; -} -.item { - display: grid; - justify-content: center; - align-items: center; - border: 5px solid rgba(0, 0, 0, 0.03); - border-radius: 3px; - font-size: 35px; - background-color: var(--yellow); -} -.item p { - margin: 0 0 5px 0; -} -.container { - display: grid; - grid-gap: 20px; - grid-template-columns: repeat(4, 1fr); -} -.logo { - grid-column: span 2; - order: 2; -} -.nav { - grid-column: span 8; - order: 1; -} -.content { - grid-column: 1 / -1; - order: 3; -} diff --git a/CSS/cssgrid.html b/CSS/cssgrid.html deleted file mode 100644 index 91c7c26b3..000000000 --- a/CSS/cssgrid.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - CSS Grid - - -
-
1
-
2
-
3
-
4
-
CSS Grid is fun
-
6
-
7
-
8
-
9
-
10
-
- - diff --git a/CSS/flex, BEM/index.html b/CSS/flex, BEM/index.html deleted file mode 100644 index 9d188ee26..000000000 --- a/CSS/flex, BEM/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - peanutcoder - - - - -
-
- -
-
- John Doe -
-
- Frontend developer -
-
- available -
- -
- - \ No newline at end of file diff --git a/CSS/flex, BEM/main.css b/CSS/flex, BEM/main.css deleted file mode 100644 index 3bc5b2a43..000000000 --- a/CSS/flex, BEM/main.css +++ /dev/null @@ -1,45 +0,0 @@ -body { - height: 100vh; - width: 100vw; - display: flex; - align-items: center; - justify-content: center; - background: linear-gradient(135deg, #43CBFF 10%, #9708CC 100%); - } - - .profile { - width: 250px; - background: #fff; - padding: 40px 20px; - border-radius: 10px; - display: flex; - flex-direction: column; - align-items: center; - } - .profile__image { - width: 100px; - height: 100px; - overflow: hidden; - } - .profile__image img { - max-width: 100%; - } - .profile__name { - font-size: 22px; - padding-top: 10px; - } - .profile__position { - padding-top: 10px; - padding-bottom: 10px; - } - .profile__status { - padding: 5px 10px; - border: 1px solid; - border-radius: 15px; - color: #333; - } - .profile__status--active { - color: #fff; - background-color: #30d837; - } - \ No newline at end of file diff --git a/CSS/floating-notification.html b/CSS/floating-notification.html deleted file mode 100644 index 5ae2b5457..000000000 --- a/CSS/floating-notification.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - Floating Notification - - - -
-
- Notification -
-
- - \ No newline at end of file diff --git a/CSS/hello-world.css b/CSS/hello-world.css deleted file mode 100644 index 2e3cd45e7..000000000 --- a/CSS/hello-world.css +++ /dev/null @@ -1,5 +0,0 @@ -/* To try it, just go to about:blank and add the style */ - -body:after { - content: "Hello world"; -} diff --git a/CSS/hello.css b/CSS/hello.css deleted file mode 100644 index 129390783..000000000 --- a/CSS/hello.css +++ /dev/null @@ -1,15 +0,0 @@ -body{ - background-color: aqua; - top: 0px; -} - -body:after { - content: "Hello world!"; - font-weight: bold; - position: absolute; - top: 50vh; - left: 0; - right: 0; - text-align: center; - color: #fff; -} diff --git a/CSS/index.html b/CSS/index.html deleted file mode 100644 index d06dd2796..000000000 --- a/CSS/index.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - hello CSS world - - - - - - \ No newline at end of file diff --git a/CSS/push-button.css b/CSS/push-button.css deleted file mode 100644 index a925ebbfc..000000000 --- a/CSS/push-button.css +++ /dev/null @@ -1,51 +0,0 @@ -.btn, .btn:link, .btn:visited { - text-transform: uppercase; - text-decoration: none; - padding: 1.5rem 4rem; - display: inline-block; - border-radius: 10rem; - transition: all .2s; - position: relative; - font-size: 1.6rem; - border: none; - cursor: pointer; - -} - -.btn:hover { -transform: translateY(-0.3rem); -box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2); -} - -.btn:hover::after { - transform: scaleX(1.4) scaleY(1.6); - opacity: 0; -} - -.btn:active, .btn:focus { -outline: none; -transform: translateY(-0.1rem); -box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.2); -} - -.btn--green { -background-color: #55c57a; -color: #fff; -} - -.btn--green::after { - background-color: #55c57a; -} - -.btn::after { -content: ""; -display: inline-block; -height: 100%; -width: 100%; -border-radius: 10rem; -position: absolute; -top: 0; -left: 0; -z-index: -1; -transition: all .4s; -} \ No newline at end of file diff --git a/CSS/redvans-helloWorld-css.html b/CSS/redvans-helloWorld-css.html deleted file mode 100644 index ce6ad0b4e..000000000 --- a/CSS/redvans-helloWorld-css.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - Redvans Hello Hacktober Fest CSS - - - - -
h
-
- Hello CSS World! -
hover me !
-
- - \ No newline at end of file diff --git a/CSS/robotAnimation.html b/CSS/robotAnimation.html deleted file mode 100644 index 33485eaeb..000000000 --- a/CSS/robotAnimation.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - RoboPage - - - - - -

Robot Friend

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - \ No newline at end of file diff --git a/CSharp/Math/Math.sln b/CSharp/Math/Math.sln deleted file mode 100644 index 640717079..000000000 --- a/CSharp/Math/Math.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2016 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Math", "Math\Math.csproj", "{C5F7D287-6065-41DB-9536-EE13941350B2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C5F7D287-6065-41DB-9536-EE13941350B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C5F7D287-6065-41DB-9536-EE13941350B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C5F7D287-6065-41DB-9536-EE13941350B2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C5F7D287-6065-41DB-9536-EE13941350B2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {77D3A693-0B2B-4161-A33D-2457E89B5E0E} - EndGlobalSection -EndGlobal diff --git a/CSharp/Math/Math/Math.csproj b/CSharp/Math/Math/Math.csproj deleted file mode 100644 index 23df6047f..000000000 --- a/CSharp/Math/Math/Math.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - netcoreapp2.1 - - - diff --git a/CSharp/Math/Math/Program.cs b/CSharp/Math/Math/Program.cs deleted file mode 100644 index ae0bc2206..000000000 --- a/CSharp/Math/Math/Program.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace Math -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Multiplication tables 1-10"); - - for (int i = 1; i <= 10; i++) { - Console.WriteLine($"Table {i}"); - Console.WriteLine(); - - for (int j = 0; j < 10; j++) { - Console.WriteLine($"{i} x {j} = ({i*j})"); - } - - Console.WriteLine(); - } - - Console.ReadKey(); - } - } -} diff --git a/CSharp/OctaneDownloader-master/LICENSE b/CSharp/OctaneDownloader-master/LICENSE deleted file mode 100644 index 2697eac5b..000000000 --- a/CSharp/OctaneDownloader-master/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Greg James - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/CSharp/OctaneDownloader-master/OctaneDownloadEngine.sln b/CSharp/OctaneDownloader-master/OctaneDownloadEngine.sln deleted file mode 100644 index 6e67b567f..000000000 --- a/CSharp/OctaneDownloader-master/OctaneDownloadEngine.sln +++ /dev/null @@ -1,81 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2026 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OctaneEngine", "OctaneEngine\OctaneEngine.csproj", "{8058F2AA-7DB9-4FDF-9548-003BB35BABD7}" - ProjectSection(ProjectDependencies) = postProject - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075} = {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OctaneTester", "OctaneTester\OctaneTester.csproj", "{2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}" - ProjectSection(ProjectDependencies) = postProject - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7} = {8058F2AA-7DB9-4FDF-9548-003BB35BABD7} - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075} = {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp", "cpp\cpp.vcxproj", "{F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Debug|Win32.ActiveCfg = Debug|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Debug|x64.ActiveCfg = Debug|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Debug|x64.Build.0 = Debug|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Release|Any CPU.Build.0 = Release|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Release|Win32.ActiveCfg = Release|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Release|x64.ActiveCfg = Release|Any CPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7}.Release|x64.Build.0 = Release|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Debug|Win32.ActiveCfg = Debug|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Debug|x64.ActiveCfg = Debug|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Debug|x64.Build.0 = Debug|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Release|Any CPU.Build.0 = Release|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Release|Win32.ActiveCfg = Release|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Release|x64.ActiveCfg = Release|Any CPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7}.Release|x64.Build.0 = Release|Any CPU - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Debug|Any CPU.ActiveCfg = Release|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Debug|Any CPU.Build.0 = Release|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Debug|Win32.Build.0 = Debug|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Debug|x64.ActiveCfg = Debug|x64 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Debug|x64.Build.0 = Debug|x64 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Release|Any CPU.ActiveCfg = Release|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Release|Mixed Platforms.Build.0 = Release|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Release|Win32.ActiveCfg = Release|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Release|Win32.Build.0 = Release|Win32 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Release|x64.ActiveCfg = Release|x64 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {5A28E9BA-FF92-43E7-9553-26253E483DD7} - EndGlobalSection -EndGlobal diff --git a/CSharp/OctaneDownloader-master/OctaneEngine/Engine.cs b/CSharp/OctaneDownloader-master/OctaneEngine/Engine.cs deleted file mode 100644 index c62cdba4a..000000000 --- a/CSharp/OctaneDownloader-master/OctaneEngine/Engine.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using System.Collections.Concurrent; -using System.Threading; - -namespace OctaneDownloadEngine -{ - public class OctaneEngine - { - public delegate void FileSizeChanged(long current, long total); - - struct EventPublisher - { - private long total; - private long current; - - public event FileSizeChanged valueChanged; - - - public long CurrentValue - { - set - { - this.current = value; - this.valueChanged(current, total); - } - } - public long TotalSize - { - set - { - this.total = value; - } - } - } - public OctaneEngine() - { - ServicePointManager.DefaultConnectionLimit = 10000; - } - - public void SplitDownloadArray(string URL, double Parts, string fileout, Action callback) - { - try - { - Parallel.Invoke(() => DownloadByteArray(URL, Parts, fileout, callback)); - } - catch (Exception ex) - { - Console.Error.WriteLine(ex); - throw; - } - } - - internal async void DownloadByteArray(string URL, double Parts, string FileOut, Action callback) - { - var responseLength = WebRequest.Create(URL).GetResponse().ContentLength; - var partSize = (long)Math.Floor(responseLength / Parts); - - Console.WriteLine(responseLength.ToString(CultureInfo.InvariantCulture) + " TOTAL SIZE"); - Console.WriteLine(partSize.ToString(CultureInfo.InvariantCulture) + " PART SIZE" + "\n"); - - var previous = 0; - - var bar = new tqdm(); - bar.set_theme_basic(); - - var ms = new MemoryStream(); - try - { - ms.SetLength(responseLength); - - ConcurrentQueue, int, int>> asyncTasks = new ConcurrentQueue, int, int>>(); - - // GetResponseAsync deadlocks for some reason so switched to HttpClient instead - HttpClient client = new HttpClient() { MaxResponseContentBufferSize = 1000000000 }; - - for (int i = (int)partSize; i < responseLength + partSize; i = i + (int)partSize) - { - var previous2 = previous; - var i2 = (int)i; - - - client.DefaultRequestHeaders.Range = new RangeHeaderValue(previous2, i2); - byte[] urlContents = await client.GetByteArrayAsync(URL); - - // start each download task and keep track of them for later - //Console.WriteLine("start {0},{1}", previous2, i2); - - bar.progress((int)i, (int)i + (int)(responseLength+partSize)); - var downloadTask = client.GetByteArrayAsync(URL); - asyncTasks.Enqueue(new Tuple, int, int>(downloadTask, previous2, i2)); - previous = i2; - } - - // now that all the downloads are started, we can await the results - // loop through looking for a completed task in case they complete out of order - while(asyncTasks.Count > 0) - { - Parallel.ForEach(asyncTasks, async (task, state) => - { - // as each task completes write the data to the file - if (task.Item1.IsCompleted) - { - var array = await task.Item1; - - //Console.WriteLine("write to file {0},{1}", task.Item2, task.Item3); - - lock (ms) - { - ms.Position = task.Item2; - ms.Write(array, 0, array.Length); - asyncTasks.TryDequeue(out task); - } - - } - }); - } - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - } - finally - { - ms.Flush(); - ms.Close(); - bar.finish(); - if (callback != null) - { - callback(ms.ToArray()); - } - } - } - } -} \ No newline at end of file diff --git a/CSharp/OctaneDownloader-master/OctaneEngine/OctaneEngine.csproj b/CSharp/OctaneDownloader-master/OctaneEngine/OctaneEngine.csproj deleted file mode 100644 index 9d77d1091..000000000 --- a/CSharp/OctaneDownloader-master/OctaneEngine/OctaneEngine.csproj +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Debug - AnyCPU - {8058F2AA-7DB9-4FDF-9548-003BB35BABD7} - Library - Properties - OctaneDownloadEngine - OctaneEngine - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CSharp/OctaneDownloader-master/OctaneEngine/Properties/AssemblyInfo.cs b/CSharp/OctaneDownloader-master/OctaneEngine/Properties/AssemblyInfo.cs deleted file mode 100644 index b6d0e2a60..000000000 --- a/CSharp/OctaneDownloader-master/OctaneEngine/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OctaneEngine")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OctaneDownloadEngine")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c61640b5-6b86-4750-852a-569c2336cb94")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CSharp/OctaneDownloader-master/OctaneEngine/SWIGTYPE_p_std__string.cs b/CSharp/OctaneDownloader-master/OctaneEngine/SWIGTYPE_p_std__string.cs deleted file mode 100644 index 58741150b..000000000 --- a/CSharp/OctaneDownloader-master/OctaneEngine/SWIGTYPE_p_std__string.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.12 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - - -public class SWIGTYPE_p_std__string { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal SWIGTYPE_p_std__string(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - protected SWIGTYPE_p_std__string() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_std__string obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} diff --git a/CSharp/OctaneDownloader-master/OctaneEngine/cpp.cs b/CSharp/OctaneDownloader-master/OctaneEngine/cpp.cs deleted file mode 100644 index 79a9bb457..000000000 --- a/CSharp/OctaneDownloader-master/OctaneEngine/cpp.cs +++ /dev/null @@ -1,13 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.12 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - - -public class cpp { -} diff --git a/CSharp/OctaneDownloader-master/OctaneEngine/cppPINVOKE.cs b/CSharp/OctaneDownloader-master/OctaneEngine/cppPINVOKE.cs deleted file mode 100644 index a5de34031..000000000 --- a/CSharp/OctaneDownloader-master/OctaneEngine/cppPINVOKE.cs +++ /dev/null @@ -1,225 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.12 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - - -class cppPINVOKE { - - protected class SWIGExceptionHelper { - - public delegate void ExceptionDelegate(string message); - public delegate void ExceptionArgumentDelegate(string message, string paramName); - - static ExceptionDelegate applicationDelegate = new ExceptionDelegate(SetPendingApplicationException); - static ExceptionDelegate arithmeticDelegate = new ExceptionDelegate(SetPendingArithmeticException); - static ExceptionDelegate divideByZeroDelegate = new ExceptionDelegate(SetPendingDivideByZeroException); - static ExceptionDelegate indexOutOfRangeDelegate = new ExceptionDelegate(SetPendingIndexOutOfRangeException); - static ExceptionDelegate invalidCastDelegate = new ExceptionDelegate(SetPendingInvalidCastException); - static ExceptionDelegate invalidOperationDelegate = new ExceptionDelegate(SetPendingInvalidOperationException); - static ExceptionDelegate ioDelegate = new ExceptionDelegate(SetPendingIOException); - static ExceptionDelegate nullReferenceDelegate = new ExceptionDelegate(SetPendingNullReferenceException); - static ExceptionDelegate outOfMemoryDelegate = new ExceptionDelegate(SetPendingOutOfMemoryException); - static ExceptionDelegate overflowDelegate = new ExceptionDelegate(SetPendingOverflowException); - static ExceptionDelegate systemDelegate = new ExceptionDelegate(SetPendingSystemException); - - static ExceptionArgumentDelegate argumentDelegate = new ExceptionArgumentDelegate(SetPendingArgumentException); - static ExceptionArgumentDelegate argumentNullDelegate = new ExceptionArgumentDelegate(SetPendingArgumentNullException); - static ExceptionArgumentDelegate argumentOutOfRangeDelegate = new ExceptionArgumentDelegate(SetPendingArgumentOutOfRangeException); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="SWIGRegisterExceptionCallbacks_cpp")] - public static extern void SWIGRegisterExceptionCallbacks_cpp( - ExceptionDelegate applicationDelegate, - ExceptionDelegate arithmeticDelegate, - ExceptionDelegate divideByZeroDelegate, - ExceptionDelegate indexOutOfRangeDelegate, - ExceptionDelegate invalidCastDelegate, - ExceptionDelegate invalidOperationDelegate, - ExceptionDelegate ioDelegate, - ExceptionDelegate nullReferenceDelegate, - ExceptionDelegate outOfMemoryDelegate, - ExceptionDelegate overflowDelegate, - ExceptionDelegate systemExceptionDelegate); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="SWIGRegisterExceptionArgumentCallbacks_cpp")] - public static extern void SWIGRegisterExceptionCallbacksArgument_cpp( - ExceptionArgumentDelegate argumentDelegate, - ExceptionArgumentDelegate argumentNullDelegate, - ExceptionArgumentDelegate argumentOutOfRangeDelegate); - - static void SetPendingApplicationException(string message) { - SWIGPendingException.Set(new global::System.ApplicationException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingArithmeticException(string message) { - SWIGPendingException.Set(new global::System.ArithmeticException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingDivideByZeroException(string message) { - SWIGPendingException.Set(new global::System.DivideByZeroException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingIndexOutOfRangeException(string message) { - SWIGPendingException.Set(new global::System.IndexOutOfRangeException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingInvalidCastException(string message) { - SWIGPendingException.Set(new global::System.InvalidCastException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingInvalidOperationException(string message) { - SWIGPendingException.Set(new global::System.InvalidOperationException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingIOException(string message) { - SWIGPendingException.Set(new global::System.IO.IOException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingNullReferenceException(string message) { - SWIGPendingException.Set(new global::System.NullReferenceException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingOutOfMemoryException(string message) { - SWIGPendingException.Set(new global::System.OutOfMemoryException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingOverflowException(string message) { - SWIGPendingException.Set(new global::System.OverflowException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingSystemException(string message) { - SWIGPendingException.Set(new global::System.SystemException(message, SWIGPendingException.Retrieve())); - } - - static void SetPendingArgumentException(string message, string paramName) { - SWIGPendingException.Set(new global::System.ArgumentException(message, paramName, SWIGPendingException.Retrieve())); - } - static void SetPendingArgumentNullException(string message, string paramName) { - global::System.Exception e = SWIGPendingException.Retrieve(); - if (e != null) message = message + " Inner Exception: " + e.Message; - SWIGPendingException.Set(new global::System.ArgumentNullException(paramName, message)); - } - static void SetPendingArgumentOutOfRangeException(string message, string paramName) { - global::System.Exception e = SWIGPendingException.Retrieve(); - if (e != null) message = message + " Inner Exception: " + e.Message; - SWIGPendingException.Set(new global::System.ArgumentOutOfRangeException(paramName, message)); - } - - static SWIGExceptionHelper() { - SWIGRegisterExceptionCallbacks_cpp( - applicationDelegate, - arithmeticDelegate, - divideByZeroDelegate, - indexOutOfRangeDelegate, - invalidCastDelegate, - invalidOperationDelegate, - ioDelegate, - nullReferenceDelegate, - outOfMemoryDelegate, - overflowDelegate, - systemDelegate); - - SWIGRegisterExceptionCallbacksArgument_cpp( - argumentDelegate, - argumentNullDelegate, - argumentOutOfRangeDelegate); - } - } - - protected static SWIGExceptionHelper swigExceptionHelper = new SWIGExceptionHelper(); - - public class SWIGPendingException { - [global::System.ThreadStatic] - private static global::System.Exception pendingException = null; - private static int numExceptionsPending = 0; - - public static bool Pending { - get { - bool pending = false; - if (numExceptionsPending > 0) - if (pendingException != null) - pending = true; - return pending; - } - } - - public static void Set(global::System.Exception e) { - if (pendingException != null) - throw new global::System.ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e); - pendingException = e; - lock(typeof(cppPINVOKE)) { - numExceptionsPending++; - } - } - - public static global::System.Exception Retrieve() { - global::System.Exception e = null; - if (numExceptionsPending > 0) { - if (pendingException != null) { - e = pendingException; - pendingException = null; - lock(typeof(cppPINVOKE)) { - numExceptionsPending--; - } - } - } - return e; - } - } - - - protected class SWIGStringHelper { - - public delegate string SWIGStringDelegate(string message); - static SWIGStringDelegate stringDelegate = new SWIGStringDelegate(CreateString); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="SWIGRegisterStringCallback_cpp")] - public static extern void SWIGRegisterStringCallback_cpp(SWIGStringDelegate stringDelegate); - - static string CreateString(string cString) { - return cString; - } - - static SWIGStringHelper() { - SWIGRegisterStringCallback_cpp(stringDelegate); - } - } - - static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper(); - - - static cppPINVOKE() { - } - - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_new_tqdm")] - public static extern global::System.IntPtr new_tqdm(); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_reset")] - public static extern void tqdm_reset(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_set_theme_line")] - public static extern void tqdm_set_theme_line(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_set_theme_circle")] - public static extern void tqdm_set_theme_circle(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_set_theme_braille")] - public static extern void tqdm_set_theme_braille(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_set_theme_braille_spin")] - public static extern void tqdm_set_theme_braille_spin(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_set_theme_basic")] - public static extern void tqdm_set_theme_basic(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_set_label")] - public static extern void tqdm_set_label(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_disable_colors")] - public static extern void tqdm_disable_colors(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_finish")] - public static extern void tqdm_finish(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_tqdm_progress")] - public static extern void tqdm_progress(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3); - - [global::System.Runtime.InteropServices.DllImport("cpp", EntryPoint="CSharp_delete_tqdm")] - public static extern void delete_tqdm(global::System.Runtime.InteropServices.HandleRef jarg1); -} diff --git a/CSharp/OctaneDownloader-master/OctaneEngine/tqdm.cs b/CSharp/OctaneDownloader-master/OctaneEngine/tqdm.cs deleted file mode 100644 index 9fdc8cb73..000000000 --- a/CSharp/OctaneDownloader-master/OctaneEngine/tqdm.cs +++ /dev/null @@ -1,86 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.12 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - - -public class tqdm : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal tqdm(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(tqdm obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~tqdm() { - Dispose(); - } - - public virtual void Dispose() { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - cppPINVOKE.delete_tqdm(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public tqdm() : this(cppPINVOKE.new_tqdm(), true) { - } - - public void reset() { - cppPINVOKE.tqdm_reset(swigCPtr); - } - - public void set_theme_line() { - cppPINVOKE.tqdm_set_theme_line(swigCPtr); - } - - public void set_theme_circle() { - cppPINVOKE.tqdm_set_theme_circle(swigCPtr); - } - - public void set_theme_braille() { - cppPINVOKE.tqdm_set_theme_braille(swigCPtr); - } - - public void set_theme_braille_spin() { - cppPINVOKE.tqdm_set_theme_braille_spin(swigCPtr); - } - - public void set_theme_basic() { - cppPINVOKE.tqdm_set_theme_basic(swigCPtr); - } - - public void set_label(SWIGTYPE_p_std__string label_) { - cppPINVOKE.tqdm_set_label(swigCPtr, SWIGTYPE_p_std__string.getCPtr(label_)); - if (cppPINVOKE.SWIGPendingException.Pending) throw cppPINVOKE.SWIGPendingException.Retrieve(); - } - - public void disable_colors() { - cppPINVOKE.tqdm_disable_colors(swigCPtr); - } - - public void finish() { - cppPINVOKE.tqdm_finish(swigCPtr); - } - - public void progress(int curr, int tot) { - cppPINVOKE.tqdm_progress(swigCPtr, curr, tot); - } - -} diff --git a/CSharp/OctaneDownloader-master/OctaneEngine/tqdmPINVOKE.cs b/CSharp/OctaneDownloader-master/OctaneEngine/tqdmPINVOKE.cs deleted file mode 100644 index f1e91da59..000000000 --- a/CSharp/OctaneDownloader-master/OctaneEngine/tqdmPINVOKE.cs +++ /dev/null @@ -1,189 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.12 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - - -class tqdmPINVOKE { - - protected class SWIGExceptionHelper { - - public delegate void ExceptionDelegate(string message); - public delegate void ExceptionArgumentDelegate(string message, string paramName); - - static ExceptionDelegate applicationDelegate = new ExceptionDelegate(SetPendingApplicationException); - static ExceptionDelegate arithmeticDelegate = new ExceptionDelegate(SetPendingArithmeticException); - static ExceptionDelegate divideByZeroDelegate = new ExceptionDelegate(SetPendingDivideByZeroException); - static ExceptionDelegate indexOutOfRangeDelegate = new ExceptionDelegate(SetPendingIndexOutOfRangeException); - static ExceptionDelegate invalidCastDelegate = new ExceptionDelegate(SetPendingInvalidCastException); - static ExceptionDelegate invalidOperationDelegate = new ExceptionDelegate(SetPendingInvalidOperationException); - static ExceptionDelegate ioDelegate = new ExceptionDelegate(SetPendingIOException); - static ExceptionDelegate nullReferenceDelegate = new ExceptionDelegate(SetPendingNullReferenceException); - static ExceptionDelegate outOfMemoryDelegate = new ExceptionDelegate(SetPendingOutOfMemoryException); - static ExceptionDelegate overflowDelegate = new ExceptionDelegate(SetPendingOverflowException); - static ExceptionDelegate systemDelegate = new ExceptionDelegate(SetPendingSystemException); - - static ExceptionArgumentDelegate argumentDelegate = new ExceptionArgumentDelegate(SetPendingArgumentException); - static ExceptionArgumentDelegate argumentNullDelegate = new ExceptionArgumentDelegate(SetPendingArgumentNullException); - static ExceptionArgumentDelegate argumentOutOfRangeDelegate = new ExceptionArgumentDelegate(SetPendingArgumentOutOfRangeException); - - [global::System.Runtime.InteropServices.DllImport("tqdm", EntryPoint="SWIGRegisterExceptionCallbacks_tqdm")] - public static extern void SWIGRegisterExceptionCallbacks_tqdm( - ExceptionDelegate applicationDelegate, - ExceptionDelegate arithmeticDelegate, - ExceptionDelegate divideByZeroDelegate, - ExceptionDelegate indexOutOfRangeDelegate, - ExceptionDelegate invalidCastDelegate, - ExceptionDelegate invalidOperationDelegate, - ExceptionDelegate ioDelegate, - ExceptionDelegate nullReferenceDelegate, - ExceptionDelegate outOfMemoryDelegate, - ExceptionDelegate overflowDelegate, - ExceptionDelegate systemExceptionDelegate); - - [global::System.Runtime.InteropServices.DllImport("tqdm", EntryPoint="SWIGRegisterExceptionArgumentCallbacks_tqdm")] - public static extern void SWIGRegisterExceptionCallbacksArgument_tqdm( - ExceptionArgumentDelegate argumentDelegate, - ExceptionArgumentDelegate argumentNullDelegate, - ExceptionArgumentDelegate argumentOutOfRangeDelegate); - - static void SetPendingApplicationException(string message) { - SWIGPendingException.Set(new global::System.ApplicationException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingArithmeticException(string message) { - SWIGPendingException.Set(new global::System.ArithmeticException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingDivideByZeroException(string message) { - SWIGPendingException.Set(new global::System.DivideByZeroException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingIndexOutOfRangeException(string message) { - SWIGPendingException.Set(new global::System.IndexOutOfRangeException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingInvalidCastException(string message) { - SWIGPendingException.Set(new global::System.InvalidCastException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingInvalidOperationException(string message) { - SWIGPendingException.Set(new global::System.InvalidOperationException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingIOException(string message) { - SWIGPendingException.Set(new global::System.IO.IOException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingNullReferenceException(string message) { - SWIGPendingException.Set(new global::System.NullReferenceException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingOutOfMemoryException(string message) { - SWIGPendingException.Set(new global::System.OutOfMemoryException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingOverflowException(string message) { - SWIGPendingException.Set(new global::System.OverflowException(message, SWIGPendingException.Retrieve())); - } - static void SetPendingSystemException(string message) { - SWIGPendingException.Set(new global::System.SystemException(message, SWIGPendingException.Retrieve())); - } - - static void SetPendingArgumentException(string message, string paramName) { - SWIGPendingException.Set(new global::System.ArgumentException(message, paramName, SWIGPendingException.Retrieve())); - } - static void SetPendingArgumentNullException(string message, string paramName) { - global::System.Exception e = SWIGPendingException.Retrieve(); - if (e != null) message = message + " Inner Exception: " + e.Message; - SWIGPendingException.Set(new global::System.ArgumentNullException(paramName, message)); - } - static void SetPendingArgumentOutOfRangeException(string message, string paramName) { - global::System.Exception e = SWIGPendingException.Retrieve(); - if (e != null) message = message + " Inner Exception: " + e.Message; - SWIGPendingException.Set(new global::System.ArgumentOutOfRangeException(paramName, message)); - } - - static SWIGExceptionHelper() { - SWIGRegisterExceptionCallbacks_tqdm( - applicationDelegate, - arithmeticDelegate, - divideByZeroDelegate, - indexOutOfRangeDelegate, - invalidCastDelegate, - invalidOperationDelegate, - ioDelegate, - nullReferenceDelegate, - outOfMemoryDelegate, - overflowDelegate, - systemDelegate); - - SWIGRegisterExceptionCallbacksArgument_tqdm( - argumentDelegate, - argumentNullDelegate, - argumentOutOfRangeDelegate); - } - } - - protected static SWIGExceptionHelper swigExceptionHelper = new SWIGExceptionHelper(); - - public class SWIGPendingException { - [global::System.ThreadStatic] - private static global::System.Exception pendingException = null; - private static int numExceptionsPending = 0; - - public static bool Pending { - get { - bool pending = false; - if (numExceptionsPending > 0) - if (pendingException != null) - pending = true; - return pending; - } - } - - public static void Set(global::System.Exception e) { - if (pendingException != null) - throw new global::System.ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e); - pendingException = e; - lock(typeof(tqdmPINVOKE)) { - numExceptionsPending++; - } - } - - public static global::System.Exception Retrieve() { - global::System.Exception e = null; - if (numExceptionsPending > 0) { - if (pendingException != null) { - e = pendingException; - pendingException = null; - lock(typeof(tqdmPINVOKE)) { - numExceptionsPending--; - } - } - } - return e; - } - } - - - protected class SWIGStringHelper { - - public delegate string SWIGStringDelegate(string message); - static SWIGStringDelegate stringDelegate = new SWIGStringDelegate(CreateString); - - [global::System.Runtime.InteropServices.DllImport("tqdm", EntryPoint="SWIGRegisterStringCallback_tqdm")] - public static extern void SWIGRegisterStringCallback_tqdm(SWIGStringDelegate stringDelegate); - - static string CreateString(string cString) { - return cString; - } - - static SWIGStringHelper() { - SWIGRegisterStringCallback_tqdm(stringDelegate); - } - } - - static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper(); - - - static tqdmPINVOKE() { - } - -} diff --git a/CSharp/OctaneDownloader-master/OctaneTester/App.config b/CSharp/OctaneDownloader-master/OctaneTester/App.config deleted file mode 100644 index e7c59336d..000000000 --- a/CSharp/OctaneDownloader-master/OctaneTester/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/CSharp/OctaneDownloader-master/OctaneTester/Itzikgur-My-Seven-Downloads-1 (1).ico b/CSharp/OctaneDownloader-master/OctaneTester/Itzikgur-My-Seven-Downloads-1 (1).ico deleted file mode 100644 index 7b59182df..000000000 Binary files a/CSharp/OctaneDownloader-master/OctaneTester/Itzikgur-My-Seven-Downloads-1 (1).ico and /dev/null differ diff --git a/CSharp/OctaneDownloader-master/OctaneTester/OctaneTester.csproj b/CSharp/OctaneDownloader-master/OctaneTester/OctaneTester.csproj deleted file mode 100644 index 17e5f2c82..000000000 --- a/CSharp/OctaneDownloader-master/OctaneTester/OctaneTester.csproj +++ /dev/null @@ -1,113 +0,0 @@ - - - - - Debug - AnyCPU - {2A12EE1E-CA94-44C9-9B38-2144CBEAFCA7} - Exe - Properties - OctaneDownloadEngine - OctaneDownloadEngine - v4.6.1 - 512 - false - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - - AnyCPU - true - full - true - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - true - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - - - Itzikgur-My-Seven-Downloads-1 %281%29.ico - - - false - - - - ..\OctaneEngine\bin\Debug\OctaneEngine.dll - - - - - - - - - - - - - - - - - Always - - - - - - False - Microsoft .NET Framework 4.5 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - \ No newline at end of file diff --git a/CSharp/OctaneDownloader-master/OctaneTester/Packages.dgml b/CSharp/OctaneDownloader-master/OctaneTester/Packages.dgml deleted file mode 100644 index 07e97ea86..000000000 --- a/CSharp/OctaneDownloader-master/OctaneTester/Packages.dgml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/CSharp/OctaneDownloader-master/OctaneTester/Program.cs b/CSharp/OctaneDownloader-master/OctaneTester/Program.cs deleted file mode 100644 index 11b54f7ca..000000000 --- a/CSharp/OctaneDownloader-master/OctaneTester/Program.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using OctaneDownloadEngine; -using System.IO; - -namespace OctaneDownloadEngine -{ - class Program - { - static void Main() - { - var Engine = new OctaneEngine(); - - Engine.SplitDownloadArray("http://www.hdwallpapers.in/walls/tree_snake_hd-wide.jpg", 8, "image.jpg", (x) => { - File.WriteAllBytes("image.jpg", x); - Console.WriteLine("Done!"); - }); - - Console.ReadLine(); - } - } -} \ No newline at end of file diff --git a/CSharp/OctaneDownloader-master/OctaneTester/Properties/AssemblyInfo.cs b/CSharp/OctaneDownloader-master/OctaneTester/Properties/AssemblyInfo.cs deleted file mode 100644 index 92b34965f..000000000 --- a/CSharp/OctaneDownloader-master/OctaneTester/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OctaneDownloadEngine")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OctaneDownloadEngine")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("615dcfbf-68d2-4493-b157-d2d507f90584")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CSharp/OctaneDownloader-master/OctaneTester/cpp.dll b/CSharp/OctaneDownloader-master/OctaneTester/cpp.dll deleted file mode 100644 index 703a667ce..000000000 Binary files a/CSharp/OctaneDownloader-master/OctaneTester/cpp.dll and /dev/null differ diff --git a/CSharp/OctaneDownloader-master/README.md b/CSharp/OctaneDownloader-master/README.md deleted file mode 100644 index 431ce1a4b..000000000 --- a/CSharp/OctaneDownloader-master/README.md +++ /dev/null @@ -1,29 +0,0 @@ -![alt tag](https://image.ibb.co/h2tK8v/Untitled_1.png) - - -A high Performance C# file downloader that splits files into different parts and downloads each part asyncrounously. Made as a replacement to Microsoft's WebClient.Wanna see the library in action? Check out [Octane YouTube Extractor](https://github.com/gregyjames/OCTANE-YoutubeExtractor) - -The progress bar was implemented using my csharp-wrapper for [cpptqdm](https://github.com/aminnj/cpptqdm). It can be found [here](https://github.com/gregyjames/csharp-tqdm) - -# License -The MIT License (MIT) - -Copyright (c) 2015 Greg James - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/CSharp/OctaneDownloader-master/cpp/cpp.vcxproj b/CSharp/OctaneDownloader-master/cpp/cpp.vcxproj deleted file mode 100644 index 951966949..000000000 --- a/CSharp/OctaneDownloader-master/cpp/cpp.vcxproj +++ /dev/null @@ -1,158 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - 15.0 - {F7F3D0F5-94B8-49C4-9F81-5C6E741D9075} - Win32Proj - cpp - 10.0.17134.0 - - - - DynamicLibrary - true - v141 - Unicode - - - DynamicLibrary - false - v141 - true - Unicode - - - DynamicLibrary - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - NotUsing - Level3 - Disabled - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - NotUsing - TurnOffAllWarnings - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - NotUsing - TurnOffAllWarnings - MaxSpeed - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - NotUsing - TurnOffAllWarnings - MaxSpeed - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - \ No newline at end of file diff --git a/CSharp/OctaneDownloader-master/cpp/cpp.vcxproj.filters b/CSharp/OctaneDownloader-master/cpp/cpp.vcxproj.filters deleted file mode 100644 index cd3767df5..000000000 --- a/CSharp/OctaneDownloader-master/cpp/cpp.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/CSharp/OctaneDownloader-master/cpp/tqdm.h b/CSharp/OctaneDownloader-master/cpp/tqdm.h deleted file mode 100644 index 8188627bd..000000000 --- a/CSharp/OctaneDownloader-master/cpp/tqdm.h +++ /dev/null @@ -1,184 +0,0 @@ -#ifndef TQDM_H -#define TQDM_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class tqdm { - private: - // time, iteration counters and deques for rate calculations - std::chrono::time_point t_first = std::chrono::system_clock::now(); - std::chrono::time_point t_old = std::chrono::system_clock::now(); - int n_old = 0; - std::vector deq_t; - std::vector deq_n; - int nupdates = 0; - int total_ = 0; - int period = 1; - unsigned int smoothing = 50; - bool use_ema = true; - float alpha_ema = 0.1; - - std::vector bars = {" ", "▏", "▎", "▍", "▋", "▋", "▊", "▉", "▉"}; - bool in_screen = (system("test $STY >nul 2>&1") == 0); - bool in_tmux = (system("test $TMUX >nul 2>&1") == 0); - bool is_tty = _isatty(1); - bool use_colors = true; - bool color_transition = true; - int width = 40; - - std::string right_pad = "▏"; - std::string label = ""; - - void hsv_to_rgb(float h, float s, float v, int& r, int& g, int& b) { - if (s < 1e-6) { - v *= 255.; - r = v; g = v; b = v; - } - int i = (int)(h*6.0); - float f = (h*6.)-i; - int p = (int)(255.0*(v*(1.-s))); - int q = (int)(255.0*(v*(1.-s*f))); - int t = (int)(255.0*(v*(1.-s*(1.-f)))); - v *= 255; - i %= 6; - int vi = (int)v; - if (i == 0) { r = vi; g = t; b = p; } - else if (i == 1) { r = q; g = vi; b = p; } - else if (i == 2) { r = p; g = vi; b = t; } - else if (i == 3) { r = p; g = q; b = vi; } - else if (i == 4) { r = t; g = p; b = vi; } - else if (i == 5) { r = vi; g = p; b = q; } - } - - public: - tqdm() { - if (in_screen) { - set_theme_basic(); - color_transition = false; - } else if (in_tmux) { - color_transition = false; - } - } - - void reset() { - t_first = std::chrono::system_clock::now(); - t_old = std::chrono::system_clock::now(); - n_old = 0; - deq_t.clear(); - deq_n.clear(); - period = 1; - nupdates = 0; - total_ = 0; - label = ""; - } - - void set_theme_line() { bars = {"─", "─", "─", "╾", "╾", "╾", "╾", "━", "═"}; } - void set_theme_circle() { bars = {" ", "◓", "◑", "◒", "◐", "◓", "◑", "◒", "#"}; } - void set_theme_braille() { bars = {" ", "⡀", "⡄", "⡆", "⡇", "⡏", "⡟", "⡿", "⣿" }; } - void set_theme_braille_spin() { bars = {" ", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠇", "⠿" }; } - void set_theme_basic() { - bars = {" ", " ", " ", " ", " ", " ", " ", " ", "#"}; - right_pad = "|"; - } - void set_label(std::string label_) { label = label_; } - void disable_colors() { - color_transition = false; - use_colors = false; - } - - void finish() { - progress(total_,total_); - printf("\n"); - fflush(stdout); - } - void progress( int curr, int tot) { - if(is_tty && (curr%period == 0)) { - total_ = tot; - nupdates++; - auto now = std::chrono::system_clock::now(); - double dt = ((std::chrono::duration)(now - t_old)).count(); - double dt_tot = ((std::chrono::duration)(now - t_first)).count(); - int dn = curr - n_old; - n_old = curr; - t_old = now; - if (deq_n.size() >= smoothing) deq_n.erase(deq_n.begin()); - if (deq_t.size() >= smoothing) deq_t.erase(deq_t.begin()); - deq_t.push_back(dt); - deq_n.push_back(dn); - - double avgrate = 0.; - if (use_ema) { - avgrate = deq_n[0] / deq_t[0]; - for (unsigned int i = 1; i < deq_t.size(); i++) { - double r = 1.0*deq_n[i]/deq_t[i]; - avgrate = alpha_ema*r + (1.0-alpha_ema)*avgrate; - } - } else { - double dtsum = std::accumulate(deq_t.begin(),deq_t.end(),0.); - int dnsum = std::accumulate(deq_n.begin(),deq_n.end(),0.); - avgrate = dnsum/dtsum; - } - - // learn an appropriate period length to avoid spamming stdout - // and slowing down the loop, shoot for ~25Hz and smooth over 3 seconds - if (nupdates > 10) { - period = (int)( std::min(std::max((1.0/25)*curr/dt_tot,1.0), 5e5)); - smoothing = 25*3; - } - double peta = (tot-curr)/avgrate; - double pct = (double)curr/(tot*0.01); - if( ( tot - curr ) <= period ) { - pct = 100.0; - avgrate = tot/dt_tot; - curr = tot; - peta = 0; - } - - double fills = ((double)curr / tot * width); - int ifills = (int)fills; - - printf("\015 "); - if (use_colors) { - if (color_transition) { - // red (hue=0) to green (hue=1/3) - int r = 255, g = 255, b = 255; - hsv_to_rgb(0.0+0.01*pct/3,0.65,1.0, r,g,b); - printf("\033[38;2;%d;%d;%dm ", r, g, b); - } else { - printf("\033[32m "); - } - } - for (int i = 0; i < ifills; i++) std::cout << bars[8]; - if (!in_screen and (curr != tot)) printf("%s",bars[(int)(8.0*(fills-ifills))]); - for (int i = 0; i < width-ifills-1; i++) std::cout << bars[0]; - printf("%s ", right_pad.c_str()); - if (use_colors) printf("\033[1m\033[31m"); - printf("%4.1f%% ", pct); - if (use_colors) printf("\033[34m"); - - std::string unit = "Hz"; - double div = 1.; - if (avgrate > 1e6) { - unit = "MHz"; div = 1.0e6; - } else if (avgrate > 1e3) { - unit = "kHz"; div = 1.0e3; - } - printf("[%4d/%4d | %3.1f %s | %.0fs<%.0fs] ", curr,tot, avgrate/div, unit.c_str(), dt_tot, peta); - printf("%s ", label.c_str()); - if (use_colors) printf("\033[0m\033[32m\033[0m\015 "); - - if( ( tot - curr ) > period ) fflush(stdout); - - } - } -}; -#endif diff --git a/CSharp/OctaneDownloader-master/cpp/tqdm_wrap.cxx b/CSharp/OctaneDownloader-master/cpp/tqdm_wrap.cxx deleted file mode 100644 index 339d284f3..000000000 --- a/CSharp/OctaneDownloader-master/cpp/tqdm_wrap.cxx +++ /dev/null @@ -1,422 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - - -#ifndef SWIGCSHARP -#define SWIGCSHARP -#endif - - - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - - -#include -#include -#include - - -/* Support for throwing C# exceptions from C/C++. There are two types: - * Exceptions that take a message and ArgumentExceptions that take a message and a parameter name. */ -typedef enum { - SWIG_CSharpApplicationException, - SWIG_CSharpArithmeticException, - SWIG_CSharpDivideByZeroException, - SWIG_CSharpIndexOutOfRangeException, - SWIG_CSharpInvalidCastException, - SWIG_CSharpInvalidOperationException, - SWIG_CSharpIOException, - SWIG_CSharpNullReferenceException, - SWIG_CSharpOutOfMemoryException, - SWIG_CSharpOverflowException, - SWIG_CSharpSystemException -} SWIG_CSharpExceptionCodes; - -typedef enum { - SWIG_CSharpArgumentException, - SWIG_CSharpArgumentNullException, - SWIG_CSharpArgumentOutOfRangeException -} SWIG_CSharpExceptionArgumentCodes; - -typedef void (SWIGSTDCALL* SWIG_CSharpExceptionCallback_t)(const char *); -typedef void (SWIGSTDCALL* SWIG_CSharpExceptionArgumentCallback_t)(const char *, const char *); - -typedef struct { - SWIG_CSharpExceptionCodes code; - SWIG_CSharpExceptionCallback_t callback; -} SWIG_CSharpException_t; - -typedef struct { - SWIG_CSharpExceptionArgumentCodes code; - SWIG_CSharpExceptionArgumentCallback_t callback; -} SWIG_CSharpExceptionArgument_t; - -static SWIG_CSharpException_t SWIG_csharp_exceptions[] = { - { SWIG_CSharpApplicationException, NULL }, - { SWIG_CSharpArithmeticException, NULL }, - { SWIG_CSharpDivideByZeroException, NULL }, - { SWIG_CSharpIndexOutOfRangeException, NULL }, - { SWIG_CSharpInvalidCastException, NULL }, - { SWIG_CSharpInvalidOperationException, NULL }, - { SWIG_CSharpIOException, NULL }, - { SWIG_CSharpNullReferenceException, NULL }, - { SWIG_CSharpOutOfMemoryException, NULL }, - { SWIG_CSharpOverflowException, NULL }, - { SWIG_CSharpSystemException, NULL } -}; - -static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = { - { SWIG_CSharpArgumentException, NULL }, - { SWIG_CSharpArgumentNullException, NULL }, - { SWIG_CSharpArgumentOutOfRangeException, NULL } -}; - -static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) { - SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback; - if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) { - callback = SWIG_csharp_exceptions[code].callback; - } - callback(msg); -} - -static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) { - SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback; - if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) { - callback = SWIG_csharp_exceptions_argument[code].callback; - } - callback(msg, param_name); -} - - -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionCallbacks_cpp( - SWIG_CSharpExceptionCallback_t applicationCallback, - SWIG_CSharpExceptionCallback_t arithmeticCallback, - SWIG_CSharpExceptionCallback_t divideByZeroCallback, - SWIG_CSharpExceptionCallback_t indexOutOfRangeCallback, - SWIG_CSharpExceptionCallback_t invalidCastCallback, - SWIG_CSharpExceptionCallback_t invalidOperationCallback, - SWIG_CSharpExceptionCallback_t ioCallback, - SWIG_CSharpExceptionCallback_t nullReferenceCallback, - SWIG_CSharpExceptionCallback_t outOfMemoryCallback, - SWIG_CSharpExceptionCallback_t overflowCallback, - SWIG_CSharpExceptionCallback_t systemCallback) { - SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback = applicationCallback; - SWIG_csharp_exceptions[SWIG_CSharpArithmeticException].callback = arithmeticCallback; - SWIG_csharp_exceptions[SWIG_CSharpDivideByZeroException].callback = divideByZeroCallback; - SWIG_csharp_exceptions[SWIG_CSharpIndexOutOfRangeException].callback = indexOutOfRangeCallback; - SWIG_csharp_exceptions[SWIG_CSharpInvalidCastException].callback = invalidCastCallback; - SWIG_csharp_exceptions[SWIG_CSharpInvalidOperationException].callback = invalidOperationCallback; - SWIG_csharp_exceptions[SWIG_CSharpIOException].callback = ioCallback; - SWIG_csharp_exceptions[SWIG_CSharpNullReferenceException].callback = nullReferenceCallback; - SWIG_csharp_exceptions[SWIG_CSharpOutOfMemoryException].callback = outOfMemoryCallback; - SWIG_csharp_exceptions[SWIG_CSharpOverflowException].callback = overflowCallback; - SWIG_csharp_exceptions[SWIG_CSharpSystemException].callback = systemCallback; -} - -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_cpp( - SWIG_CSharpExceptionArgumentCallback_t argumentCallback, - SWIG_CSharpExceptionArgumentCallback_t argumentNullCallback, - SWIG_CSharpExceptionArgumentCallback_t argumentOutOfRangeCallback) { - SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback = argumentCallback; - SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentNullException].callback = argumentNullCallback; - SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentOutOfRangeException].callback = argumentOutOfRangeCallback; -} - - -/* Callback for returning strings to C# without leaking memory */ -typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *); -static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL; - - -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_cpp(SWIG_CSharpStringHelperCallback callback) { - SWIG_csharp_string_callback = callback; -} - - -/* Contract support */ - -#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else - - - #include "tqdm.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_tqdm() { - void * jresult ; - tqdm *result = 0 ; - - result = (tqdm *)new tqdm(); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_reset(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - (arg1)->reset(); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_set_theme_line(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - (arg1)->set_theme_line(); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_set_theme_circle(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - (arg1)->set_theme_circle(); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_set_theme_braille(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - (arg1)->set_theme_braille(); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_set_theme_braille_spin(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - (arg1)->set_theme_braille_spin(); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_set_theme_basic(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - (arg1)->set_theme_basic(); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_set_label(void * jarg1, void * jarg2) { - tqdm *arg1 = (tqdm *) 0 ; - std::string arg2 ; - std::string *argp2 ; - - arg1 = (tqdm *)jarg1; - argp2 = (std::string *)jarg2; - if (!argp2) { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null std::string", 0); - return ; - } - arg2 = *argp2; - (arg1)->set_label(arg2); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_disable_colors(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - (arg1)->disable_colors(); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_finish(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - (arg1)->finish(); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_tqdm_progress(void * jarg1, int jarg2, int jarg3) { - tqdm *arg1 = (tqdm *) 0 ; - int arg2 ; - int arg3 ; - - arg1 = (tqdm *)jarg1; - arg2 = (int)jarg2; - arg3 = (int)jarg3; - (arg1)->progress(arg2,arg3); -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_delete_tqdm(void * jarg1) { - tqdm *arg1 = (tqdm *) 0 ; - - arg1 = (tqdm *)jarg1; - delete arg1; -} - - -#ifdef __cplusplus -} -#endif - diff --git a/CSharp/SendEmail.sln b/CSharp/SendEmail.sln deleted file mode 100644 index 4e6bb236e..000000000 --- a/CSharp/SendEmail.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27428.2027 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SendEmail", "SendEmail\SendEmail.csproj", "{E8A67468-A30B-4D47-8F59-F2788B0E31FA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E8A67468-A30B-4D47-8F59-F2788B0E31FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E8A67468-A30B-4D47-8F59-F2788B0E31FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E8A67468-A30B-4D47-8F59-F2788B0E31FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E8A67468-A30B-4D47-8F59-F2788B0E31FA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {3A01266A-8E65-438D-9B37-80F476072A8A} - EndGlobalSection -EndGlobal diff --git a/CSharp/SendEmail/App.config b/CSharp/SendEmail/App.config deleted file mode 100644 index 731f6de6c..000000000 --- a/CSharp/SendEmail/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/CSharp/SendEmail/Program.cs b/CSharp/SendEmail/Program.cs deleted file mode 100644 index ca3e506e5..000000000 --- a/CSharp/SendEmail/Program.cs +++ /dev/null @@ -1,190 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using static System.Net.Mime.MediaTypeNames; -using SendEmail; -using System.IO; - -namespace SendEmail -{ - - class Program - { - - static void Main(string[] args) - { - if (File.Exists("email_configration_data.txt")) - { - bool fileInfo = check_config_file(); - if(fileInfo == true) - { - edite_email_config(); - } - else - { - - String user_input; - Console.WriteLine("|-------------------------------------------|"); - Console.WriteLine("| SEND EMAILS |"); - Console.WriteLine("|-------------------------------------------|"); - Console.WriteLine("| |"); - Console.WriteLine("| SEND EMAIL -> 1 |"); - Console.WriteLine("| CHANGE EMAIL CONFIG -> 2 |"); - Console.WriteLine("| EXIT -> 3 |"); - Console.WriteLine("| |"); - Console.WriteLine("|-------------------------------------------|"); - Console.Write(" ENTER YOUR CHOICE -> "); - user_input = Console.ReadLine(); - decision(user_input); - } - } - else - { - var myFile = File.Create("email_configration_data.txt"); - myFile.Close(); - Console.Clear(); - Main(args); - } - } - - static void decision(String choice) - { - String[] args = new String[0]; - switch (choice) - { - case "1": - if(new_email_body() == true) - { - Console.WriteLine("| Email sent successfully |"); - Send_email_again(); - } - else - { - Console.WriteLine("| Email sent unsuccessfully |"); - Send_email_again(); - } - break; - case "2": - edite_email_config(); - break; - case "3": - Console.Write(" ARE YOU SURE ? (Y)es -> "); - String exit_choice = Console.ReadLine(); - if(exit_choice == "Y" || exit_choice == "y") - { - Environment.Exit(0); - } - else - { - Console.Clear(); - Main(args); - } - break; - default: - Console.Clear(); - Main(args); - break; - } - } - - private static Boolean new_email_body() - { - Console.WriteLine("| |"); - Console.WriteLine("|-------------------------------------------|"); - Console.WriteLine("| |"); - - Console.Write(" Subject -> "); - String to_subject = Console.ReadLine(); - Console.WriteLine("|-------------------------------------------|"); - - Console.Write(" To -> "); - String to_email = Console.ReadLine(); - Console.WriteLine("|-------------------------------------------|"); - - Console.Write(" Body -> "); - String to_body = Console.ReadLine(); - Console.WriteLine("|-------------------------------------------|"); - - if(send_email.Send_new_mail(to_email, to_subject, to_body) == true) - { - return true; - } - else - { - return false; - } - } - private static void Send_email_again() - { - String[] args = new String[0]; - Console.WriteLine("| |"); - Console.WriteLine("|-------------------------------------------|"); - Console.WriteLine("| |"); - Console.Write(" SEND EMAIL AGAIN (Y)es / (N)o "); - String exit_choice = Console.ReadLine(); - if (exit_choice == "Y" || exit_choice == "y") - { - Console.Clear(); - new_email_body(); - } - else - { - Console.Clear(); - Main(args); - } - } - - private static Boolean check_config_file() - { - if(new FileInfo("email_configration_data.txt").Length == 0) - { - return true; - } - else - { - return false; - } - } - - private static void edite_email_config() - { - String[] args = new String[0]; - Console.WriteLine("|-------------------------------------------|"); - Console.WriteLine("| ENTER YOUR EMAIL CONFIGRATION DETAILS |"); - Console.WriteLine("|-------------------------------------------|"); - Console.WriteLine("| |"); - Console.Write(" Enter SMTP server address -> "); - String smtp_server_add = Console.ReadLine(); - Console.WriteLine("|-------------------------------------------|"); - Console.Write(" Enter SMTP port -> "); - String smtp_server_port = Console.ReadLine(); - Console.WriteLine("|-------------------------------------------|"); - Console.Write(" Your Email -> "); - String your_email = Console.ReadLine(); - Console.WriteLine("|-------------------------------------------|"); - Console.Write(" Your Password -> "); - String your_password = Console.ReadLine(); - Console.WriteLine("|-------------------------------------------|"); - Console.Write(" All set ? (Y)es (N) -> "); - String exit_choice = Console.ReadLine(); - if (exit_choice == "Y" || exit_choice == "y") - { - bool config_create = email_config.save_config(smtp_server_add, smtp_server_port, your_email, your_password); - if(config_create == true) - { - Console.WriteLine("|-------------------------------------------|"); - Console.WriteLine("| Config Save Successful. press any key |"); - Console.WriteLine("|-------------------------------------------|"); - Console.ReadKey(); - Console.Clear(); - Main(args); - } - } - else - { - } - } - } -} diff --git a/CSharp/SendEmail/Properties/AssemblyInfo.cs b/CSharp/SendEmail/Properties/AssemblyInfo.cs deleted file mode 100644 index d4d424f70..000000000 --- a/CSharp/SendEmail/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SendEmail")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SendEmail")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e8a67468-a30b-4d47-8f59-f2788b0e31fa")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CSharp/SendEmail/SendEmail.csproj b/CSharp/SendEmail/SendEmail.csproj deleted file mode 100644 index b962564ce..000000000 --- a/CSharp/SendEmail/SendEmail.csproj +++ /dev/null @@ -1,95 +0,0 @@ - - - - - Debug - AnyCPU - {E8A67468-A30B-4D47-8F59-F2788B0E31FA} - Exe - SendEmail - SendEmail - v4.6.1 - 512 - true - false - C:\Users\Burn%27s hand\Desktop\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 1 - 1.0.0.%2a - false - true - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - A51D89E0847B7407586F736847329BC6868A340D - - - SendEmail_TemporaryKey.pfx - - - true - - - true - - - - - - - - - - - - - - - - - - - - - - - - False - Microsoft .NET Framework 4.6.1 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - \ No newline at end of file diff --git a/CSharp/SendEmail/SendEmail.csproj.user b/CSharp/SendEmail/SendEmail.csproj.user deleted file mode 100644 index dcff565d6..000000000 --- a/CSharp/SendEmail/SendEmail.csproj.user +++ /dev/null @@ -1,17 +0,0 @@ - - - - ProjectFiles - - - - - - - en-US - false - - - false - - \ No newline at end of file diff --git a/CSharp/SendEmail/SendEmail_TemporaryKey.pfx b/CSharp/SendEmail/SendEmail_TemporaryKey.pfx deleted file mode 100644 index 1a99360a9..000000000 Binary files a/CSharp/SendEmail/SendEmail_TemporaryKey.pfx and /dev/null differ diff --git a/CSharp/SendEmail/bin/Debug/SendEmail.application b/CSharp/SendEmail/bin/Debug/SendEmail.application deleted file mode 100644 index bf3f5c8f1..000000000 --- a/CSharp/SendEmail/bin/Debug/SendEmail.application +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - Fk3gv6jozrcAkD3BiOFMlEs/lL7ci815bkO8qg46zlY= - - - - \ No newline at end of file diff --git a/CSharp/SendEmail/bin/Debug/SendEmail.exe.config b/CSharp/SendEmail/bin/Debug/SendEmail.exe.config deleted file mode 100644 index 731f6de6c..000000000 --- a/CSharp/SendEmail/bin/Debug/SendEmail.exe.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/CSharp/SendEmail/bin/Debug/SendEmail.exe.manifest b/CSharp/SendEmail/bin/Debug/SendEmail.exe.manifest deleted file mode 100644 index b8a22a823..000000000 --- a/CSharp/SendEmail/bin/Debug/SendEmail.exe.manifest +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - snJDaeSfH7bXHSzlyre/6oO3FoZ1/4LRzsuL7lI9vgg= - - - - - - - - - - rl5/qDc7Jz+tB+BIbOv9iMGPlRe6YJwrjmU09dnlPcs= - - - \ No newline at end of file diff --git a/CSharp/SendEmail/bin/Debug/SendEmail.pdb b/CSharp/SendEmail/bin/Debug/SendEmail.pdb deleted file mode 100644 index 3fab2718a..000000000 Binary files a/CSharp/SendEmail/bin/Debug/SendEmail.pdb and /dev/null differ diff --git a/CSharp/SendEmail/bin/Debug/email_configration_data.txt b/CSharp/SendEmail/bin/Debug/email_configration_data.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/CSharp/SendEmail/email_config.cs b/CSharp/SendEmail/email_config.cs deleted file mode 100644 index 28dae73f8..000000000 --- a/CSharp/SendEmail/email_config.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SendEmail -{ - class email_config - { - public static Boolean save_config(String smtp_server_address,String smtp_port,String yourEmail,String yourPassword) - { - String config_file_data = smtp_server_address + "[" + smtp_port + "[" + yourEmail + "[" + yourPassword; - String config_file_name = "email_configration_data.txt"; - File.WriteAllText(config_file_name, config_file_data); - return true; - } - } -} diff --git a/CSharp/SendEmail/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/CSharp/SendEmail/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache deleted file mode 100644 index a1088df29..000000000 Binary files a/CSharp/SendEmail/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ diff --git a/CSharp/SendEmail/obj/Debug/SendEmail.application b/CSharp/SendEmail/obj/Debug/SendEmail.application deleted file mode 100644 index bf3f5c8f1..000000000 --- a/CSharp/SendEmail/obj/Debug/SendEmail.application +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - Fk3gv6jozrcAkD3BiOFMlEs/lL7ci815bkO8qg46zlY= - - - - \ No newline at end of file diff --git a/CSharp/SendEmail/obj/Debug/SendEmail.csproj.CoreCompileInputs.cache b/CSharp/SendEmail/obj/Debug/SendEmail.csproj.CoreCompileInputs.cache deleted file mode 100644 index 3fc53b31d..000000000 --- a/CSharp/SendEmail/obj/Debug/SendEmail.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -3a89d57eb01de524f295dd55e3543ef9cf2d5d6b diff --git a/CSharp/SendEmail/obj/Debug/SendEmail.csproj.FileListAbsolute.txt b/CSharp/SendEmail/obj/Debug/SendEmail.csproj.FileListAbsolute.txt deleted file mode 100644 index d8c4d4f03..000000000 --- a/CSharp/SendEmail/obj/Debug/SendEmail.csproj.FileListAbsolute.txt +++ /dev/null @@ -1,11 +0,0 @@ -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\bin\Debug\SendEmail.exe.config -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\bin\Debug\SendEmail.exe -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\bin\Debug\SendEmail.pdb -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\obj\Debug\SendEmail.csprojResolveAssemblyReference.cache -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\obj\Debug\SendEmail.csproj.CoreCompileInputs.cache -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\obj\Debug\SendEmail.exe -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\obj\Debug\SendEmail.pdb -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\bin\Debug\SendEmail.exe.manifest -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\bin\Debug\SendEmail.application -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\obj\Debug\SendEmail.exe.manifest -C:\Users\Burn's hand\Desktop\EmailApplication\SendEmail\SendEmail\obj\Debug\SendEmail.application diff --git a/CSharp/SendEmail/obj/Debug/SendEmail.csprojAssemblyReference.cache b/CSharp/SendEmail/obj/Debug/SendEmail.csprojAssemblyReference.cache deleted file mode 100644 index 8508bd601..000000000 Binary files a/CSharp/SendEmail/obj/Debug/SendEmail.csprojAssemblyReference.cache and /dev/null differ diff --git a/CSharp/SendEmail/obj/Debug/SendEmail.csprojResolveAssemblyReference.cache b/CSharp/SendEmail/obj/Debug/SendEmail.csprojResolveAssemblyReference.cache deleted file mode 100644 index b3091966e..000000000 Binary files a/CSharp/SendEmail/obj/Debug/SendEmail.csprojResolveAssemblyReference.cache and /dev/null differ diff --git a/CSharp/SendEmail/obj/Debug/SendEmail.exe.manifest b/CSharp/SendEmail/obj/Debug/SendEmail.exe.manifest deleted file mode 100644 index b8a22a823..000000000 --- a/CSharp/SendEmail/obj/Debug/SendEmail.exe.manifest +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - snJDaeSfH7bXHSzlyre/6oO3FoZ1/4LRzsuL7lI9vgg= - - - - - - - - - - rl5/qDc7Jz+tB+BIbOv9iMGPlRe6YJwrjmU09dnlPcs= - - - \ No newline at end of file diff --git a/CSharp/SendEmail/obj/Debug/SendEmail.pdb b/CSharp/SendEmail/obj/Debug/SendEmail.pdb deleted file mode 100644 index 3fab2718a..000000000 Binary files a/CSharp/SendEmail/obj/Debug/SendEmail.pdb and /dev/null differ diff --git a/CSharp/SendEmail/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/CSharp/SendEmail/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/CSharp/SendEmail/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/CSharp/SendEmail/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/CSharp/SendEmail/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/CSharp/SendEmail/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/CSharp/SendEmail/send_email.cs b/CSharp/SendEmail/send_email.cs deleted file mode 100644 index c30c13ca9..000000000 --- a/CSharp/SendEmail/send_email.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Net.Mail; -using System.Text; -using System.Threading.Tasks; - -namespace SendEmail -{ - class send_email - { - public static Boolean Send_new_mail(String to,String subject,String body) - { - var email_information = File.ReadAllText("email_configration_data.txt"); - var config_splits = email_information.Split('['); - - string smtp_address = config_splits[0]; - string smtp_port = config_splits[1]; - string your_email = config_splits[2]; - string your_password = config_splits[3]; - - try { - SmtpClient client = new SmtpClient(smtp_address, Convert.ToInt32(smtp_port)); - client.EnableSsl = true; - client.Timeout = 10000; - client.DeliveryMethod = SmtpDeliveryMethod.Network; - client.UseDefaultCredentials = false; - client.Credentials = new NetworkCredential(your_email, your_password); - MailMessage stuml = new MailMessage(); - stuml.To.Add(to); - stuml.From = new MailAddress(your_email); - stuml.Subject = (subject); - stuml.Body = (body); - client.Send(stuml); - if(stuml.IsBodyHtml == true) - { - return true; - } - else - { - return false; - } - } - catch(Exception ex) - { - Console.WriteLine(ex); - } - return false; - } - } -} diff --git a/CUDA/HelloWorld.cu b/CUDA/HelloWorld.cu deleted file mode 100644 index 83983f61f..000000000 --- a/CUDA/HelloWorld.cu +++ /dev/null @@ -1,47 +0,0 @@ -// This is the REAL "hello world" for CUDA! -// It takes the string "Hello ", prints it, then passes it to CUDA -// with an array of offsets. Then the offsets are added in parallel -// to produce the string "World!" -// By Ingemar Ragnemalm 2010 - -// nvcc hello-world.cu -L /usr/local/cuda/lib -lcudart -o hello-world - -#include - -const int N = 16; -const int blocksize = 16; - -__global__ -void hello(char *a, int *b) -{ - a[threadIdx.x] += b[threadIdx.x]; -} - -int main() -{ - char a[N] = "Hello \0\0\0\0\0\0"; - int b[N] = {15, 10, 6, 0, -11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - - char *ad; - int *bd; - const int csize = N*sizeof(char); - const int isize = N*sizeof(int); - - printf("%s", a); - - cudaMalloc( (void**)&ad, csize ); - cudaMalloc( (void**)&bd, isize ); - cudaMemcpy( ad, a, csize, cudaMemcpyHostToDevice ); - cudaMemcpy( bd, b, isize, cudaMemcpyHostToDevice ); - - dim3 dimBlock( blocksize, 1 ); - dim3 dimGrid( 1, 1 ); - hello<<>>(ad, bd); - cudaMemcpy( a, ad, csize, cudaMemcpyDeviceToHost ); - cudaFree( ad ); - cudaFree( bd ); - - printf("%s\n", a); - sleep(1); - return EXIT_SUCCESS; -} diff --git a/Calculatrice/bin/calcul/calcuul$1.class b/Calculatrice/bin/calcul/calcuul$1.class deleted file mode 100644 index 987a74108..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$1.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$10.class b/Calculatrice/bin/calcul/calcuul$10.class deleted file mode 100644 index a708e09d4..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$10.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$11.class b/Calculatrice/bin/calcul/calcuul$11.class deleted file mode 100644 index cf759f854..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$11.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$12.class b/Calculatrice/bin/calcul/calcuul$12.class deleted file mode 100644 index b099373aa..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$12.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$13.class b/Calculatrice/bin/calcul/calcuul$13.class deleted file mode 100644 index 490fb4195..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$13.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$14.class b/Calculatrice/bin/calcul/calcuul$14.class deleted file mode 100644 index fb8f3110a..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$14.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$15.class b/Calculatrice/bin/calcul/calcuul$15.class deleted file mode 100644 index 2008520bd..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$15.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$16.class b/Calculatrice/bin/calcul/calcuul$16.class deleted file mode 100644 index 80e946ccf..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$16.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$17.class b/Calculatrice/bin/calcul/calcuul$17.class deleted file mode 100644 index 4a5256d15..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$17.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$18.class b/Calculatrice/bin/calcul/calcuul$18.class deleted file mode 100644 index 3640db23e..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$18.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$2.class b/Calculatrice/bin/calcul/calcuul$2.class deleted file mode 100644 index d9cf277bc..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$2.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$3.class b/Calculatrice/bin/calcul/calcuul$3.class deleted file mode 100644 index 4536f7349..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$3.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$4.class b/Calculatrice/bin/calcul/calcuul$4.class deleted file mode 100644 index 10d136028..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$4.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$5.class b/Calculatrice/bin/calcul/calcuul$5.class deleted file mode 100644 index 33dcc9b5b..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$5.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$6.class b/Calculatrice/bin/calcul/calcuul$6.class deleted file mode 100644 index 511e0a04f..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$6.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$7.class b/Calculatrice/bin/calcul/calcuul$7.class deleted file mode 100644 index 0b008f00b..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$7.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$8.class b/Calculatrice/bin/calcul/calcuul$8.class deleted file mode 100644 index d9a4c93aa..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$8.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul$9.class b/Calculatrice/bin/calcul/calcuul$9.class deleted file mode 100644 index a360d42f7..000000000 Binary files a/Calculatrice/bin/calcul/calcuul$9.class and /dev/null differ diff --git a/Calculatrice/bin/calcul/calcuul.class b/Calculatrice/bin/calcul/calcuul.class deleted file mode 100644 index 9b6f084ca..000000000 Binary files a/Calculatrice/bin/calcul/calcuul.class and /dev/null differ diff --git a/Calculatrice/src/calcul/calcuul.java b/Calculatrice/src/calcul/calcuul.java deleted file mode 100644 index 529fe328d..000000000 --- a/Calculatrice/src/calcul/calcuul.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package calcul; - -/** - * - * @author pc - */ -public class calcuul extends javax.swing.JFrame { - private double x,y; - private String op; - private boolean eg=false; - private boolean ver=false; - - - /** - * Creates new form NewJFrame - */ - public calcuul() { - initComponents(); - jTextField1.setText("0"); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - jTextField1 = new javax.swing.JTextField(); - jButton13 = new javax.swing.JButton(); - jButton14 = new javax.swing.JButton(); - jButton15 = new javax.swing.JButton(); - jButton16 = new javax.swing.JButton(); - jButton17 = new javax.swing.JButton(); - jButton18 = new javax.swing.JButton(); - jButton19 = new javax.swing.JButton(); - jButton20 = new javax.swing.JButton(); - jButton21 = new javax.swing.JButton(); - jButton22 = new javax.swing.JButton(); - jButton23 = new javax.swing.JButton(); - jButton24 = new javax.swing.JButton(); - jButton25 = new javax.swing.JButton(); - jButton26 = new javax.swing.JButton(); - jButton27 = new javax.swing.JButton(); - jButton28 = new javax.swing.JButton(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - jTextField1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jTextField1ActionPerformed(evt); - } - }); - - jButton13.setText("1"); - jButton13.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton13ActionPerformed(evt); - } - }); - - jButton14.setText("0"); - jButton14.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton14ActionPerformed(evt); - } - }); - - jButton15.setText("4"); - jButton15.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton15ActionPerformed(evt); - } - }); - - jButton16.setText("*"); - jButton16.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton16ActionPerformed(evt); - } - }); - - jButton17.setText("+"); - jButton17.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton17ActionPerformed(evt); - } - }); - - jButton18.setText("-"); - jButton18.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton18ActionPerformed(evt); - } - }); - - jButton19.setText("6"); - jButton19.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton19ActionPerformed(evt); - } - }); - - jButton20.setText("3"); - jButton20.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton20ActionPerformed(evt); - } - }); - - jButton21.setText("="); - jButton21.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton21ActionPerformed(evt); - } - }); - - jButton22.setText("5"); - jButton22.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton22ActionPerformed(evt); - } - }); - - jButton23.setText("2"); - jButton23.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton23ActionPerformed(evt); - } - }); - - jButton24.setText("7"); - jButton24.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton24ActionPerformed(evt); - } - }); - - jButton25.setText("/"); - jButton25.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton25ActionPerformed(evt); - } - }); - - jButton26.setText("."); - jButton26.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton26ActionPerformed(evt); - } - }); - - jButton27.setText("8"); - jButton27.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton27ActionPerformed(evt); - } - }); - - jButton28.setText("9"); - jButton28.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton28ActionPerformed(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 318, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 11, Short.MAX_VALUE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton14, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(jButton26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton27, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE) - .addComponent(jButton22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addGroup(layout.createSequentialGroup() - .addComponent(jButton21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jButton18, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(jButton20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jButton17, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(jButton28, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jButton25, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(jButton19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jButton16, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)))) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(11, 11, 11) - .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(23, 23, 23) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton24, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton28, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton25, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton27, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(6, 6, 6) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton22, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton16, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton19, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(6, 6, 6) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton23, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton17, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton20, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(6, 6, 6) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton18, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton21, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton26, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))) - ); - - pack(); - }// //GEN-END:initComponents - - private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jTextField1ActionPerformed - - private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed - - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"7"); - }else{ - jTextField1.setText("7"); - eg=false; - } - }//GEN-LAST:event_jButton24ActionPerformed - - private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed - x=Double.parseDouble(jTextField1.getText()); - jTextField1.setText(""); - op="/"; - }//GEN-LAST:event_jButton25ActionPerformed - - private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed - if(ver==false){ - jTextField1.setText(jTextField1.getText()+"."); - ver=true; - } - }//GEN-LAST:event_jButton26ActionPerformed - - private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"8"); - }else{ - jTextField1.setText("8"); - eg=false; - } - }//GEN-LAST:event_jButton27ActionPerformed - - private void jButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton28ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"9"); - }else{ - jTextField1.setText("9"); - eg=false; - } - }//GEN-LAST:event_jButton28ActionPerformed - - private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed -x=Double.parseDouble(jTextField1.getText()); - jTextField1.setText(""); - op="+"; - }//GEN-LAST:event_jButton17ActionPerformed - - private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed - - x=Double.parseDouble(jTextField1.getText()); - jTextField1.setText(""); - op="-"; - }//GEN-LAST:event_jButton18ActionPerformed - - private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton20ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"3"); - }else{ - jTextField1.setText("3"); - eg=false; - } - }//GEN-LAST:event_jButton20ActionPerformed - - private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"4"); - }else{ - jTextField1.setText("4"); - eg=false; - } - }//GEN-LAST:event_jButton15ActionPerformed - - private void jButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton22ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"5"); - }else{ - jTextField1.setText("5"); - eg=false; - } - }//GEN-LAST:event_jButton22ActionPerformed - - private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"6"); - }else{ - jTextField1.setText("6"); - eg=false; - } - }//GEN-LAST:event_jButton19ActionPerformed - - private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"1"); - }else{ - jTextField1.setText("1"); - eg=false; - } - }//GEN-LAST:event_jButton13ActionPerformed - - private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"2"); - }else{ - jTextField1.setText("2"); - eg=false; - } - }//GEN-LAST:event_jButton23ActionPerformed - - private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed - if(eg==false){ - jTextField1.setText(jTextField1.getText()+"0"); - }else{ - jTextField1.setText("0"); - eg=false; - } - }//GEN-LAST:event_jButton14ActionPerformed - - private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed - x=Double.parseDouble(jTextField1.getText()); - jTextField1.setText(""); - op="*"; - }//GEN-LAST:event_jButton16ActionPerformed - - private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed - if(eg==false){ - y=Double.parseDouble(jTextField1.getText()); - if(op.equals("+")) - jTextField1.setText(""+(x+y)); - if(op.equals("-")) - jTextField1.setText(""+(x-y)); - if(op.equals("*")) - jTextField1.setText(""+(x*y)); - if(op.equals("/")){ - if(y!=0){ - jTextField1.setText(""+(x+y)); - }else{ - jTextField1.setText("err"); - } - } - eg=true; - } - }//GEN-LAST:event_jButton21ActionPerformed - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(calcuul.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(calcuul.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(calcuul.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(calcuul.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new calcuul().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton jButton13; - private javax.swing.JButton jButton14; - private javax.swing.JButton jButton15; - private javax.swing.JButton jButton16; - private javax.swing.JButton jButton17; - private javax.swing.JButton jButton18; - private javax.swing.JButton jButton19; - private javax.swing.JButton jButton20; - private javax.swing.JButton jButton21; - private javax.swing.JButton jButton22; - private javax.swing.JButton jButton23; - private javax.swing.JButton jButton24; - private javax.swing.JButton jButton25; - private javax.swing.JButton jButton26; - private javax.swing.JButton jButton27; - private javax.swing.JButton jButton28; - private javax.swing.JTextField jTextField1; - // End of variables declaration//GEN-END:variables -} \ No newline at end of file diff --git a/Camel/camel-splitter b/Camel/camel-splitter deleted file mode 160000 index c7dd5d0a7..000000000 --- a/Camel/camel-splitter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c7dd5d0a733f4e4c636b846efe194d089f62f213 diff --git a/Caml/hello.ml b/Caml/hello.ml deleted file mode 100644 index 9eb1cbf02..000000000 --- a/Caml/hello.ml +++ /dev/null @@ -1,6 +0,0 @@ -(* - to compile run: camlc -o ./a.out ./hello.ml - to run: ./a.out -*) - -print_endline "Hello World!"; flush std_out;; diff --git a/Caml/hello_world_graphics.ml b/Caml/hello_world_graphics.ml deleted file mode 100644 index c682b3c46..000000000 --- a/Caml/hello_world_graphics.ml +++ /dev/null @@ -1,15 +0,0 @@ - -(* Implementation of the Hello World! using the graphics library of Caml *) -(* Lozul, Hacktoberfest 2018 *) - -(* Load library *) -#load "graphics.cma" ;; (* Load the graphics library *) -open Graphics ;; (* Open the module *) -open_graph "300x300" ;; (* 300w x 300h window *) - -let hello = "Hello World!";; -let window_width = size_x () and window_height = size_y ();; -let text_width = match (text_size hello) with (a,b) -> a;; - -moveto ((window_width / 2) - (text_width / 2)) (window_height / 2);; -draw_string hello;; \ No newline at end of file diff --git a/Ceylon/main.ceylon b/Ceylon/main.ceylon deleted file mode 100644 index 391ae07a4..000000000 --- a/Ceylon/main.ceylon +++ /dev/null @@ -1,3 +0,0 @@ -shared void run() { - print("Hello world!"); -} diff --git a/Chapel/hello_world.chpl b/Chapel/hello_world.chpl deleted file mode 100644 index 759705ec1..000000000 --- a/Chapel/hello_world.chpl +++ /dev/null @@ -1 +0,0 @@ -writeln("Hello, world!"); diff --git a/Chef/hello.txt b/Chef/hello.txt deleted file mode 100644 index 3369d80eb..000000000 --- a/Chef/hello.txt +++ /dev/null @@ -1,24 +0,0 @@ -Ingredients. -72 g haricot beans -101 eggs -108 g lard -111 cups oil -32 zucchinis -119 ml water -114 g red salmon -100 g dijon mustard -33 potatoes - -Method. -Put potatoes into the mixing bowl. -Put dijon mustard into the mixing bowl. -Put lard into the mixing bowl. -Put red salmon into the mixing bowl. -Put oil into the mixing bowl. Put water into the mixing bowl. -Put zucchinis into the mixing bowl. Put oil into the mixing bowl. -Put lard into the mixing bowl. Put lard into the mixing bowl. -Put eggs into the mixing bowl. Put haricot beans into the mixing bowl. -Liquefy contents of the mixing bowl. -Pour contents of the mixing bowl into the baking dish. - -Serves 1. \ No newline at end of file diff --git a/CherryBlossom/hello.cb b/CherryBlossom/hello.cb deleted file mode 100644 index 067c211be..000000000 --- a/CherryBlossom/hello.cb +++ /dev/null @@ -1,67 +0,0 @@ -beautiful jasmine -your lovely fragrance heals me -every morning - -remembering you, -dreaming of your lovely smile, -when will you come here? - -floating butterflies -sunshine and summer flowers -a lovely morning - -blossoming hillside -on a fragrant summer day -blooming, flowering. - -I can remember -my happy dreams of summer -it was beautiful - -flying doves, sunrays -beauty flying in sunshine -rain in the valley. - -snow falls in moonlight, -returns to the mountainside. -lovely, beautiful. - -view from mountaintop -is a beautiful painting, -in summer sunshine. - -the fragrant flowers -and the pretty butterflies -spring by singing creek. - -beautiful morning -butterflies by riverside -floating in sunshine. - -such a lovely sight, -the valley waterfall is -in the spring sunshine. - -sunrays and sunshine, -the butterflies and flowers -loving the new spring. - -the pretty flowers -are dreaming of a summer -with the smiling sun. - -music from heaven, -is melodious and sweet, -dreamy and happy. - -the river is cold -and misty in the moonlight, -in the autumn chill. - -winter riverside, -lonely, icy, and chilly -darkening evening - -the lonely winter, -barren riverside ahead -a dreaming poet diff --git a/Chicken/HelloWorld.chicken b/Chicken/HelloWorld.chicken deleted file mode 100644 index 0131cdde4..000000000 --- a/Chicken/HelloWorld.chicken +++ /dev/null @@ -1,2 +0,0 @@ -chicken^chicken= 0x0 -brawk~ `hello world` diff --git a/Clojure/Hello-World.clj b/Clojure/Hello-World.clj deleted file mode 100644 index 8fa32c310..000000000 --- a/Clojure/Hello-World.clj +++ /dev/null @@ -1 +0,0 @@ -(prn "Hello World") diff --git a/Clojure/hello.clj b/Clojure/hello.clj deleted file mode 100644 index 540f56b2d..000000000 --- a/Clojure/hello.clj +++ /dev/null @@ -1,4 +0,0 @@ -(ns hacktoberfest.hello) - -(defn -main [] - (println "Hello World")) diff --git a/Clojure/macros.clj b/Clojure/macros.clj deleted file mode 100644 index 6e01856a5..000000000 --- a/Clojure/macros.clj +++ /dev/null @@ -1,64 +0,0 @@ -(ns com.mrmccue.macros - ^{:author "Ethan McCue" - :email "emccue@live.com" - :doc "A collection of useful macros to extend base clojure"} - (:require [clojure.core.strint :refer [<<]] - [clojure.java.io :as io])) - -(defmacro oops [msg] - (when (not (string? msg)) - (oops "Argument to 'oops' must be a string literal")) - `(throw (IllegalArgumentException. ^String (<< ~msg)))) - -;; ---------------------------------------------------------------------------- -(defmacro m - "Expands out a series of variables to a map where - the name of the variable is the key under which the variable - goes - Ex. (m a b c) => {:a a, :b b, :c c} - (m) => {}" - [& vars] - (doseq [name vars] - (when (not (symbol? name)) - (oops "Every element passed to the 'm' macro must be a symbol. -Element ~{name} is not a symbol"))) - - (into {} - (for [name vars] - [(keyword name) name]))) - - -;; ---------------------------------------------------------------------------- -(declare - ^{:doc "Dummy variable to resolve the | symbol in cursive"} - |) - -;; ---------------------------------------------------------------------------- -(defmacro m+ - "Like m, but will allow for custom rebinding of some symbols - Ex. (m+ a b c) => {:a a, :b b, :c c} - (m+) => {} - (m+ a b | :cat c) => {:a a, :b b, :cat c} - (m+ a b | c d :f some-var) => {:a a, :b b, c d, :f some-var}" - [& vars] - (let [number-of-dividers (count (filter #(= % '|) vars))] - (when (not (or (= number-of-dividers 0) - (= number-of-dividers 1))) - (oops "There should only be either 1 or 0 of the divider symbol '| - passed to the 'm+' macro. Found ~{number-of-dividers} occurrences"))) - - (let [[symbols map-bindings-plus-divider] (split-with #(not= % '|) vars) - map-bindings (rest map-bindings-plus-divider)] - (doseq [name symbols] - (when (not (symbol? name)) - (oops "Every element passed to the 'm+' macro before -a divider must be a symbol. -Element ~{name} is not a symbol"))) - - (when (not (even? (count map-bindings))) - (oops "Uneven number of map bindings passed to the 'm+' macro")) - - (merge (into {} - (for [name symbols] - [(keyword name) name])) - (apply hash-map map-bindings)))) diff --git a/Clojure/sieve.clj b/Clojure/sieve.clj deleted file mode 100644 index 1623d99a1..000000000 --- a/Clojure/sieve.clj +++ /dev/null @@ -1,11 +0,0 @@ -(defn sieve [limit] - (loop [candidates (range 2 (* limit limit)) current 2] - (if (>= current limit) - candidates - (let [multiples - (set (map - #(* current %) - (range 2 (/ (* limit limit) current)))) - updated (vec (remove multiples candidates))] - (recur updated (first (drop-while #(<= % current) updated))))))) - diff --git a/ClojureScript/hello.cljs b/ClojureScript/hello.cljs deleted file mode 100644 index 631b8d377..000000000 --- a/ClojureScript/hello.cljs +++ /dev/null @@ -1,6 +0,0 @@ -(ns hacktoberfest.hello) - -(defn hello-world [] - (js/console.log "Hello World")) - -(hello-world) diff --git a/Cobra/helloworld.cobra b/Cobra/helloworld.cobra deleted file mode 100644 index f77a78afb..000000000 --- a/Cobra/helloworld.cobra +++ /dev/null @@ -1 +0,0 @@ -print 'Hello, World!!' diff --git a/Coconut/hello.coco b/Coconut/hello.coco deleted file mode 100644 index 9a6fcc280..000000000 --- a/Coconut/hello.coco +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/env coconut -greet = (thing -> "Hello, {}!".format(thing) - |> print) - -greet('World') diff --git a/CodeForJava/Hello.java b/CodeForJava/Hello.java deleted file mode 100644 index f16047e46..000000000 --- a/CodeForJava/Hello.java +++ /dev/null @@ -1,13 +0,0 @@ -class Hello{ - public static void main(String args[]) - { - System.out.println("Hello Hacktoberfest 2018"); - - String a = "Hello"; - String b = "Hacktoberfest"; - String c = "2018"; - String d = " "; - - System.out.println(a+d+b+d+c); - } -} diff --git a/CoffeeScript/HelloNewWorld.coffee b/CoffeeScript/HelloNewWorld.coffee deleted file mode 100644 index 352826562..000000000 --- a/CoffeeScript/HelloNewWorld.coffee +++ /dev/null @@ -1 +0,0 @@ -alert "Hello, World!" diff --git a/CoffeeScript/HelloWorld.coffee b/CoffeeScript/HelloWorld.coffee deleted file mode 100644 index eb81fb31b..000000000 --- a/CoffeeScript/HelloWorld.coffee +++ /dev/null @@ -1 +0,0 @@ -console.log 'Hello World!' \ No newline at end of file diff --git a/CoffeeScript/hello-functions-coffee b/CoffeeScript/hello-functions-coffee deleted file mode 100644 index bd7e54b3c..000000000 --- a/CoffeeScript/hello-functions-coffee +++ /dev/null @@ -1 +0,0 @@ -do (-> -> do do do -> do -> do do do do do do do do do do do do -> -> -> -> -> do do do do -> -> -> do do -> -> -> -> -> -> -> -> -> -> -> -> do (do -> -> do -> do -> do do -> -> -> console.log.apply 0, do -> [do -> [do do do -> -> do do -> -> -> 'Hello, world!', do -> do -> [] + [[] + [[]], [[]] + +[]][+[]]][+[]]])())() diff --git a/CoffeeScript/hello-scramble.coffee b/CoffeeScript/hello-scramble.coffee deleted file mode 100644 index 9107c8d5c..000000000 --- a/CoffeeScript/hello-scramble.coffee +++ /dev/null @@ -1 +0,0 @@ -console.log do main = (hello = 'Hello, world!'.split '') -> ([hello[i], hello[j]] = [hello[j], hello[i]] for i in [hello.length-1..1] when (j = Math.floor Math.random() * (i + 1))?) and hello.join '' diff --git a/CoffeeScript/hello-world-backwards.coffee b/CoffeeScript/hello-world-backwards.coffee deleted file mode 100644 index 72c958ca3..000000000 --- a/CoffeeScript/hello-world-backwards.coffee +++ /dev/null @@ -1 +0,0 @@ -Reflect.apply console.log, {}, [do r = ((str = 'Hello, world!') -> if str.length is 0 then str else "#{r str.substr 1}#{str[0]}")] diff --git a/CoffeeScript/hello-world.ja.coffee b/CoffeeScript/hello-world.ja.coffee deleted file mode 100644 index af31f977f..000000000 --- a/CoffeeScript/hello-world.ja.coffee +++ /dev/null @@ -1 +0,0 @@ -console.log 'こんにちは、世界さん〜!' diff --git a/CoffeeScript/hello-world.ru.coffee b/CoffeeScript/hello-world.ru.coffee deleted file mode 100644 index 4958b73c7..000000000 --- a/CoffeeScript/hello-world.ru.coffee +++ /dev/null @@ -1 +0,0 @@ -console.log 'Привет, мир!' diff --git a/CoffeeScript/hello_world.coffee b/CoffeeScript/hello_world.coffee deleted file mode 100644 index 9e03a93ca..000000000 --- a/CoffeeScript/hello_world.coffee +++ /dev/null @@ -1 +0,0 @@ -console.log "hello, world" diff --git a/CoffeeScript/helloworld.th.coffee b/CoffeeScript/helloworld.th.coffee deleted file mode 100644 index 340dace2d..000000000 --- a/CoffeeScript/helloworld.th.coffee +++ /dev/null @@ -1 +0,0 @@ -console.log 'สวัสดี ชาวโลก' diff --git a/CoffeeScript/ytsearcher-example.coffee b/CoffeeScript/ytsearcher-example.coffee deleted file mode 100644 index 59eb16fc3..000000000 --- a/CoffeeScript/ytsearcher-example.coffee +++ /dev/null @@ -1,10 +0,0 @@ -{ YTSearcher } = require 'ytsearcher' -search = new YTSearcher '[Redacted YouTube API Key]' - -search.search 'oHg5SJYRHA0', type: 'video' - .then (searchResult) -> - result = searchResult.first - console.log result - console.log "You just got #{result.title}" - process.exit 0 - .catch console.error diff --git a/Common Lisp/helloworld.lisp b/Common Lisp/helloworld.lisp deleted file mode 100644 index 7d7fd6608..000000000 --- a/Common Lisp/helloworld.lisp +++ /dev/null @@ -1 +0,0 @@ -(format t "Hello, World!") diff --git a/Cool/hello-world.cl b/Cool/hello-world.cl deleted file mode 100644 index b13583691..000000000 --- a/Cool/hello-world.cl +++ /dev/null @@ -1,9 +0,0 @@ --- Cool stands for Classroom Object Oriented Language. --- It is a programming language designed for use in an undergraduate --- compiler course project. - -class Main inherits IO { - main() : Object { - out_string("Hello, world!\n") - }; -}; diff --git a/Cpp/Amount of capital and small b/Cpp/Amount of capital and small deleted file mode 100644 index ef44f5619..000000000 --- a/Cpp/Amount of capital and small +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -using namespace std; -int main(){ -string s; -int ans = 0; -int ban = 0; -cin >> s; - for (int i = 0 ; i < s.size() ; i ++ ){ - if ( (int) s [i] > 96 ){ - ans++; - } - if ( (int) s [i] < 96 ){ - ban++; - } -} -cout << ans << " "; -cout << ban; -return 0; -} diff --git a/Cpp/BANK.CPP b/Cpp/BANK.CPP deleted file mode 100644 index 8e75542a9..000000000 --- a/Cpp/BANK.CPP +++ /dev/null @@ -1,2161 +0,0 @@ -/* The United Bank makes certain computerized facilities in their bank to - implement customer records and their daily daily transaction records. - The bank keeps certain information as follow: - - INITIAL.dat: - acc_no : Account number - name : Name of the Accountee - address : Address of the accountee - balance : Initial balance of the account - - When the any customer will be create an account, the bank will - keep the above fields in their INITIAL.dat file as master account holder. - - BANKING.dat: - acc_no : Account number - type : Transaction type by Cash/Cheque - dd,mm,yy : Date of transaction - tran : Transaction for Deposit or Withdraw - interest : Interest rate - amout : Transaction amount - balance : Current balance after transaction - - While inputing the data record the following validation will check: - - the account numbers will generate automatically - - the name, address should not blank - - transaction date will be the system date/current date - - initial deposit for any account not less that Rs. 500/- - - Daily transaction will be entered either the word Cash/Cheque - and 'D' for deposit and 'W' for withdraw - - Write a menu driven program for making a daily transaction process for the - displaying folloing menu options. - - 1. Open New Account - 2. List of Accounts - 3. See Individual Account - 4. Daily Transaction - 5. Monthly Report - 6. Edit Account - In the edit account menu the following processing will occur: - 1. Modify Account - 2. Close Account - 0. Quit - - The following will be the report format as - - Report-1: - Accounts List in Bank - ===================== Date:10/10/1998 - ======================================================================= - Accno# Name Address Balance - ======================================================================= - 1 Mr. Sangram 12, E-Block, Rohini 5600 - 2 Mr. Vikas 234, Vinus Appts. Rohini 12000 - -- -------- --------- ----- - -- -------- --------- ----- - ======================================================================= - Total Balance in Bank is: ------ - - Report-2: - - Account No. 1 Mr. Sangram Date:11/10/1998 - 12, E-Block, Rohini - - Global Report of Account - ======================================================================== - Date Particular Deposit Withdraw Balance - ======================================================================== - 1-10-1998 INITIAL 2000 2000 - 2-10-1998 CASH 3000 5000 - 8-10-1998 CHEQUE 4000 9000 - 9-10-1998 CASH 3400 5600 - ======================================================================== - Total->: 9000 3400 5600 - - Report-3: - - Account No. 1 Mr. Sangram Date:11/10/1998 - 12, E-Block, Rohini - - Statement Month: 10/01/1999 - ======================================================================== - Date Particular Deposit Withdraw Balance - ======================================================================== - 1-10-1998 INITIAL 2000 2000 - 2-10-1998 CASH 3000 5000 - 8-10-1998 CHEQUE 4000 9000 - 9-10-1998 CASH 3400 5600 - ======================================================================== - Total->: 9000 3400 5600 - -This project is developed using C++ class concepts and having number of different -user defined function (UDFs) as follows: - -line_hor(.....) - -This function passes four parameters including three integer and one character to -draw different lines to design the screen beautiful. The character parameter draw the -ASCII character line-by-line on screen. So, for horizontal line draw this function is usefull. - -line_ver(.....) - -The DRAW_VER(.....) function is helpful for drawing vertical lines on screen to design -either menu or program forms for data entry, modify, display, delete etc.. - -box(.....) - -This function creates different size of boxes on the screen according to the respective -parameters. Out of all the parameters they draw boxes till the limit you want. - -main_menu(.....) - -This is the main screening menu which will display your 6 different prompts and having different activities. -Each prompt is connected with different functions to perform the respective purposes. Out of all the options -the last one produces another sub-menu for modifying and deleting existing account informations. - -While handling the main menu you can press any selective number to perform the operation or press 0 (Zero) to exit from -the main menu. But it is also helpful in almost all menus that, you can press 0 (zero) to exit from the respective menu. - -edit_menu(.....) - -This is one of the sub function which is connected from the main_menu() function to perform the modification and deletion operation -on banking account data from INITIAL.dat and BANKING.dat data file. - -All the the ways the menus are perform the operation according to the account number (accno) except -the "Open New Account" of main_menu() function because, the "Open New Account" form automatically creates -the account number after a brief search to the existing account numbers. -Basically, the numbers are generating automatically, like your 1, 2, 3 ... respectively. - -add_to_file(...) - -The function add_to_file is used to append new account details into the INITIAL.dat file. This function receives all the fields as paramenter way -from the new_account() function and adds in the data file. - -display_list() - -This function is used to display all the account data in the screen. Which displays the accountno#, name, address and -their respective balance amount in bank. Also show the total bank balance in the screen. All the records are extracted from -INITIAL.dat data file. - -delete_account() - -This function is used to delete the account details from INITIAL.dat data file. This is a copy method which -transfers all the records except deleted accno#. And on the same way the records are reversed from the TEMP.dat file -to the original data file INITIAL.dat. - -update_balance() - -When there is a fresh transaction happens on an existing account either deposit (D) or withdraw (W), then the respective balance has to updated -in the INITIAL.dat data file. While the transactions complete, the balance amount is overwritten in the -data file. This technique occurs by locating the position in the data file only. - -modify() - -When there is any modification occurs to the accounts name and address or to the balance amount, the simultaneously it becomes modified in the -INITIAL.dat data file through the modify_account() function. This process highly depends on the key field account number. - -last_accno() - -When a new record has to append into the data file, it has to create an automatic accno#. This process happens when we know the last account number. To -know the last account number by using the last_accno() function. After finding the last account no. it returns the last account value into the new_account() function -for generating next account number. - -found_account() - -To do any operation: either for modification, deletion, report(s) or updation, every time the found_account() function first checks the account which is entered by the -user is their in the INITIAL.dat data file or not. If it is their then a true value is returned else a false value is returned. While depending the value further process can -occurs. - -*return_name() - -When any reports are occur, on top of the report the account name is displayed. This function returns the name of the account holder and displays in appropriate report. - -*return_address() - -When any reports are occur, on top of the report the account address is displayed. This function returns the address of the account holder and displays in appropriate report. - -give_balance() - -While daily transaction is occurs, the last balance is always required to update the INITIAL.dat data file. So, to know the last balance at the time of -daily transaction the give_balance function returns the value to the transaction() function. - -recordno() - -Either for new_account, update account, or modify account, or modify balance the recordno() function finds the -record position of existing account no. in the data files, where the transacted record can over written. - -display() - -The function is used to display the account details from either INITIAL.dat or BANKING.dat data file. While the modify() function actives, the accno parameter searches this -account details from the respective file to display on the screen before modify. - -modify_account() - -This function is used to modify the existing accounts name and address at the existing location. To modify the account it first searches the accounts location and over written at the same location -using seekg() function. - -new_account() - -This function is used to create a new account of a customer after entering all the details of the same. In this screen the automatic account number is created and a propr validations are their into name, address, and initial deposit. -After entering all the informations related to the customer, the records are appended in the INITIAL.dat and BANKING.dat data file by useing a function add_to_file of both class initial and account. - -close_account() - -On the same way like delete_account() function, the close_account() function also closes all the transaction record in BANKING.dat data file. -After closing the account there is no transaction records are in the data files. - -display_account() - -This function is used to display all the transaction includeing the initial deposit in the screen. This is a global report to display -all the transaction records in the screen. It shows all the deposits and withdraw column and date wise balance also. - -transaction() - -The transaction() function provides a screen for making daily transaction. While transaction it show the balance amount, and then eiter a transaction for deposit(D) or withdraw(W) on either CASH or CHEQUE. -Then the transacted record is updated in the INITIAL.dat and BANKING.dat data file. Also the same funcitons used two important function update_balance() and add_to_file to update balance in INITIAL.dat data file and -the transacted record in BANKING.dat data file. - -clear() - -The function is used to clear the screen from a specified row and column position. - -month_report() - -Like any other banking transaction, when a customer want his monthly report this function helps to generate the report on the screen. -When you enter a date an account number, it searches all the transaction of the previous month of the enter date and extracts a previous balance (B/F...) amount -first on the screen and then the entered months all the transaction on the screen. Finally shows the current balance amount also. - -add_to_file() - -This function is used to append new record into the BANKING.dat data file. While the function actives, it passed all the fields as parameter into the function and -appends as a fresh record into the file. - -delete_account() - -This function is used to delete the account from the BANKING.dat data file. This is a copy method to delete the account from file. - -no_of_days() - -This function is used to find total number of years, months and days between two days. - -box_for_display() - -This function is used to display the heading of the report as: - - Date Particular Deposit Withdraw Balance - - */ - - -// Declaration of header files -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -typedef char option[15]; -const int ROW = 10,COL = 10; - -int scan; // To hold the special characters for moving the prompt in menu -int ascii; - -// To display the main menu options -option a[]= { - "NewAccount", - "ListofAccounts", - "IndAccount", - "DailyTrans", - "MonthlyReport", - "EditAccount", - "Exit"}; - -// Displays the modify menu options -option b[] = { - "Modify Account", - "Closeaccount", - "Quit" - }; - -// Function used to do screening -class main_menu -{ - int i,done; - - public: - void normalvideo(int x,int y,char *str); - void reversevideo(int x,int y,char *str); - void box(int x1,int y1,int x2,int y2); - char menu(); - void control_menu(); - char e_menu(); - void edit_menu(); - void help(void); -}; - -/* Class member functions for drawing boxes */ -class shape -{ - public: - void line_hor(int, int, int, char); - void line_ver(int, int, int, char); - void box(int, int, int, int, char); -}; - - -// Class contains the initial deposit of customers -class initial -{ - public: - void add_to_file(int, char t_name[30], char t_address[30], float); // For initial deposits in customers account - void display_list(void); // Displaying customers account list - void delete_account(int); // Deleting customers account - void update_balance(int, char t_name[30], char t_address[30], float); // For updating the customer account - void modify(void); // To modify the customer account information - int last_accno(void); // To know the last account number - int found_account(int); // To found the account is in "INITIAL.dat" or not - - char *return_name(int); // Function for validation entry of customer name - char *return_address(int); // Function for validation entry of customer address - float give_balance(int); // To print the balance amount of a particular customer - int recordno(int); - void display(int); // To display the customer account - - private: - void modify_account(int, char t_name[30], char t_address[30]); // Function to modify the customer account - int accno; - char name[30], address[30]; - float balance; -}; - -// Class contains the customers daily transaction entry - -class account -{ - public: - void new_account(void); // Function to create a new account - void close_account(void); // Function to close an account - void display_account(void); // Function to display the accounts - void transaction(void); // To display the transaction process - void clear(int, int); // Function to perform a clear screen function - void month_report(void); // Function to list monthWise transaction report - - private: - void add_to_file(int, int, int, int, char, char t_type[10], float, float, float); // Function to add transaction records - void delete_account(int); // Function to delete a transaction record - int no_of_days(int, int, int, int, int, int); // Function to find the total days - float calculate_interest(int, float); // Function for calculating interest of an account - void display(int); // Function to display a transaction account - void box_for_display(int); // Function for displaying box - int accno; - char type[10]; // Account type as Cheque or Cash - int dd, mm, yy; // To store the system date/ Enter date - char tran; // As the account type is Deposit or Withdraw - float interest, amount, balance; -}; - -// Function to displays all the menu prompt messages from the pointer array of option a[] -void main_menu::normalvideo(int x,int y,char *str) -{ - gotoxy(x,y); - cprintf("%s",str); -} - -// Function to move the cursor on the menu prompt with a reverse video color -void main_menu::reversevideo(int x,int y,char *str) -{ - textcolor(5+143); - textbackground(WHITE); - gotoxy(x,y); - cprintf("%s",str); - textcolor(GREEN); - textbackground(BLACK); -} - -void main_menu::box(int x1,int y1,int x2,int y2) -{ - for(int col=x1;col :". If you will press 'y' then - the respective information will be modified other wise will return to main menu. - While deleting any account, you have to enter the account no. and will display the name and address of that - particular accountee and will display a prompt as "Close this account?? ". If you will press 'y' then all the transactions from "BANKING.dat" file - and initial deposit from "INITIAL.dat" file will be delete the information of the entered account number. */ - -void main_menu::edit_menu() -{ - - char choice; - account a; - - do - { - choice = e_menu(); - clrscr(); - switch (choice) - { - case '1': - box(3, 1, 75, 24); - box(5, 2, 73, 23); - initial ini; - _setcursortype(_NORMALCURSOR); - ini.modify(); - break; - - case '2': - box(3, 1, 75, 24); - box(5, 2, 73, 23); - account a; - _setcursortype(_NORMALCURSOR); - a.close_account(); - break; - case '3': - return; - } - } while (choice != 6); -} - -/* Function to draw horizontal line - This public function draws one horizontal line at a time */ -void shape::line_hor(int column1, int column2, int row, char c) -{ - for (column1; column1 <= column2; column1++) - { - gotoxy(column1, row); - cout << c; - } -} - -/* Function to draw vertical line - This public function draws one vertical line at a time */ -void shape::line_ver(int row1, int row2, int column, char c) -{ - for (row1; row1 <= row2; row1++) - { - gotoxy(column, row1); - cout << c; - } -} - -/* Function for drawing box - This function draws a box for menus */ -void shape::box(int column1, int row1, int column2, int row2, char c) -{ - char ch = 218; - char c1, c2, c3, c4; - char l1 = 196, l2 = 179; - if (c == ch) - { - c1 = 218; - c2 = 191; - c3 = 217; - c4 = 217; - l1 = 196; - l2 = 179; - } - else - { - c1 = c; - c2 = c; - c3 = c; - c4 = c; - l1 = c; - c2 = c; - } - gotoxy(column1, row1); - cout << c1; - gotoxy(column2, row1); - cout << c2; - gotoxy(column1, row2); - cout << c3; - gotoxy(column2, row2); - cout << c4; - column1++; - column2--; - line_hor(column1, column2, row1, l1); //Horizontal line - line_hor(column1, column2, row2, l1); - column1--; - column2++; - row1++; - row2--; - line_ver(row1, row2, column1, l2); // Vertical line - line_ver(row1, row2, column2, l2); -} - - -/* Function to display help about this project - This help function is the first screen output display to know about the menu options and about the - banking project */ -void main_menu::help(void) -{ - clrscr(); - - setbkcolor(7); - settextstyle(7,HORIZ_DIR,5); - outtextxy(70,20,"Welcome to Banking Project"); - settextstyle(2,HORIZ_DIR,5); - outtextxy(60,100, "This project your can keep record of daily banking transaction"); - delay(2); - outtextxy(60,130, "This program is capable of holding any no. of account."); - delay(2); - outtextxy(60,160, "-In first option you can open new account"); - delay(2); - outtextxy(60,190, "-In second option you can see the list of all the accounts"); - delay(2); - outtextxy(60,220,"-In third option you can see all the transaction of individual account"); - delay(2); - outtextxy(60,250, "-Through fourth optiion you can do banking transactions"); - delay(2); - outtextxy(60,280, "(Deposit/Withdraw)"); - delay(2); - outtextxy(60,310, "-In fifth option you can take monthWise individual account report"); - delay(2); - outtextxy(60,340,"-In sixth option you can modify or delete any account"); - delay(2); - outtextxy(60,370, "Note-: Opening amount should not less that Rs. 500/-"); - delay(2); - outtextxy(60,400, "-And last option is Quit (Exit to Window)"); - delay(2); - - settextstyle(7,HORIZ_DIR,4); - outtextxy(80,420,"Press any key to continue..."); - getch(); - -} - -/* Function for modifying the existing accounts - The modify() function is used to modify an existing account for its address part only - While modifying, a prompt is always displays as "Do you want to save change " means - if you will press 'y' then the current memory information will change with existing information - otherWise the previous information remain intact in your data file. - While entering the name and address their is a proper validation and a blank check facility is there, - to prevent mistake and mishandling of data etc.. */ -void initial::modify(void) -{ - clrscr(); - int j; - char t_acc[10]; - int t, t_accno; - gotoxy(17, 1); - cout << "<0>=Exit"; - gotoxy(5,5); - cout << "Enter the account no. "; - gets(t_acc); - t = atoi(t_acc); - t_accno = t; - if (t_accno == 0) - return; - clrscr(); - if (!found_account(t_accno)) - { - gotoxy(5, 5); - cout << "\7Account not found"; - getch(); - return; - } - gotoxy(71, 1); - cout << "<0>=Exit"; - textbackground(WHITE); - gotoxy(3, 3); - for (j = 1; j<= 76; j++) - cprintf(" "); - textbackground(BLACK); - textcolor(BLACK+BLINK); - textbackground(WHITE); - gotoxy(30, 3); - cprintf("Modify Account Screen"); - textcolor(LIGHTGRAY); - textbackground(BLACK); - int d1, m1, y1; - struct date d; // For extracting system date - getdate(&d); - d1 = d.da_day; - m1 = d.da_mon; - y1 = d.da_year; - gotoxy(4, 2); - cout << "Date: " << d1 << "/" << m1 << "/" << y1; - char ch; - display(t_accno); - account a; - do - { - a.clear(5, 13); - gotoxy(5, 13); - cout << "Modify this account : "; - ch = getche(); - if (ch == '0') - return; - ch = toupper(ch); - }while (ch != 'N' && ch != 'Y'); - if (ch == 'N') - return; - int modified = 0, valid; - char t_name[30], t_address[30]; - gotoxy(5, 15); - cout << "Name : "; - gotoxy(5, 16); - cout << "Address : "; - - do - { - a.clear(15, 15); - a.clear(5, 23); - gotoxy(5, 23); - cout << "Enter Name or Press Enter for No Change"; - valid = 1; - gotoxy(15, 15); - gets(t_name); - strupr(t_name); - if (t_name[0] == '0') - return; - if (strlen(t_name) > 25) - { - valid = 0; - gotoxy(5, 23); - cprintf("\7Name should not greater than 25"); - getch(); - } - } while (!valid); - - do - { - a.clear(15, 16); - a.clear(5, 23); - gotoxy(5, 23); - cout << "Enter Address or press enter for no Change"; - valid = 1; - gotoxy(15, 16); - gets(t_address); - strupr(t_address); - if (t_address[0] == '0') - return; - if (strlen(t_address) > 25) - { - valid = 0; - gotoxy(5, 23); - cprintf("\7Address should not greater than 25"); - getch(); - } - }while (!valid); - - if (strlen(t_address) > 0) - modified = 1; - if (!modified) - return; - // clears the screen at 23rd row and from 5th column - a.clear(5,23); - - do - { - a.clear(5, 23); - gotoxy(5, 18); - cout << "Do you want to save Changes : "; - ch = getche(); - if (ch == '0') - return; - ch = toupper(ch); - }while (ch != 'N' && ch != 'Y'); - - if (ch == 'N') - return; - - // Passes the parameter to add in data file - modify_account(t_accno, t_name, t_address); - gotoxy(5, 21); - cout << "\7Record modified"; - gotoxy(5, 23); - cout << "Press any key to continue..."; - getch(); -} - -/* Function for displaying an account when modified - This display() function is used to display all the account holders account no, name, address, and - balance amount at screen. - Here the fstream object is declared to read the data from "INITIAL.dat" data file in input mode only. - Whenever there is record in data file, the read() statement will read the records linearly till end-of-file. */ - -void initial::display(int t_accno) -{ - fstream file; - file.open("INITIAL.dat", ios::in); - file.seekg(0, ios::beg); - - // Displays the record contents matching with t_accno from INITIAL.dat data file - while (file.read((char *)this, sizeof(initial))) - { - if (t_accno == accno) - { - gotoxy(8, 5); - cout << "Account no. " << accno; - gotoxy(10, 8); - cout << "Name : "; - puts(name); - gotoxy(10, 9); - cout << "Address : "; - puts(address); - gotoxy(10, 10); - cout << "Balance : " << setw(15) // setwidth - << setprecision(2) // set position of decimal point - << setiosflags(ios::left) // set left justified output - << setiosflags(ios::showpoint) // always show decimal point - << setiosflags(ios::fixed) // set fixed notation for display - << balance; - break; - } - } - file.close(); -} - -/* Function for updating the modified account into INITIAL.dat file - This function modify_account() receives number parameters such as, account number, name, address etc, and - will overWrite at the existing place in the "INITIAL.dat" data file. - The main logic of the function is that, it uses a function called seekp(location), which means that - when a particular record is tends to modify, first we have to know the record position according to data file. - Once we find the position (location) then, a single value is decremented from its original location and overwritten - by the same ofstream command write into the data file. */ - -void initial::modify_account(int t_accno, char t_name[30], char t_address[30]) -{ - int recno; - recno = recordno(t_accno); - fstream file; - file.open("INITIAL.dat", ios::out|ios::ate); - strcpy(name, t_name); - strcpy(address, t_address); - int location; - // finds the position in data file - - location = (recno-1) * sizeof(initial); - file.seekp(location); - - // Overwrites the modified record into INITIAL.dat data file - file.write((char *)this, sizeof(initial)); - file.close(); - return; -} - -/* Function to find the last account number - This is an interesting function who is creating the account number automatically. - At the first memoment when there is no record, the new account number is created as 1. - If any account number is there then, the file will travel all the records - and store the last account number with a variable count. At that state the function return the same value - the called program for automatic code generation. */ -int initial::last_accno(void) -{ - fstream file; - file.open("INITIAL.dat", ios::in); - file.seekg(0, ios::beg); - int count = 0; - - // Founds the last account no. - while (file.read((char *)this, sizeof(initial))) - count = accno; - file.close(); - return count; -} -/* This function add_to_file() is used to create new/fresh record in the data file, and the parameters - is the actual value which will be write into the "INITIAL.dat" file. Every time when any account - makes transaction for either Withdraw (W) or Deposit (D) the balance amount will modified in the data file*/ - -void initial::add_to_file(int t_accno, char t_name[30], char t_address[30], float t_balance) -{ - accno = t_accno; - strcpy(name, t_name); - strcpy(address, t_address); - balance = t_balance; - fstream file; - - // Appends new account record with the balance into INITIAL.dat data file - file.open("INITIAL.dat", ios::out|ios::app); - file.write((char *)this, sizeof(initial)); - file.close(); -} -// Function for deleting a account from INITIAL.dat file -// This function is used to delete any account from data file. By this function -void initial::delete_account(int t_accno) -{ - fstream file; - file.open("INITIAL.dat", ios::in); - fstream temp; - temp.open("TEMP.dat", ios::out); - file.seekg(0,ios::beg); - - // Uses a copy method to delete the account from INTITAL.dat data file - while (!file.eof()) - { - file.read((char *)this, sizeof(initial)); - if (file.eof()) - break; - if (accno != t_accno) - temp.write((char *)this, sizeof(initial)); - } - file.close(); - temp.close(); - file.open("INITIAL.dat", ios::out); - temp.open("TEMP.dat", ios::in); - temp.seekg(0, ios::beg); - - // Copy the TEMP.dat contents into INTITAL.dat data file - while (!temp.eof()) - { - temp.read((char *)this, sizeof(initial)); - if (temp.eof()) - break; - if (accno != t_accno) - file.write((char *)this, sizeof(initial)); - } - file.close(); - temp.close(); -} - -/* Function for add an account details of daily tranaction into BANKING.dat file. -By using the parameters the information of daily transaction appended into "BANKING.dat" -data file including amount transaction and the current balance value. */ -void account::add_to_file(int t_accno, int d1, int m1, int y1, char t_tran, char t_type[10], float t_interest, float t_amount, float t_balance) -{ - fstream file; - file.open("BANKING.dat", ios::app); - accno = t_accno; - getch(); - dd = d1; - mm = m1; - yy = y1; - tran = t_tran; - strcpy(type, t_type); - interest = t_interest; - amount = t_amount; - balance = t_balance; - - // Appends the transaction record into BANKING.dat data file - file.write((char *)this, sizeof(account)); - file.close(); -} -/* Function for deleting an account from BANKING.dat file. This is a copy method like, when the user will input any acccount no, - the same account no. will checked in the "BANKING.dat" file, if the account no. matched in your data file then, it will remain in - your data file otherwise other remaining records will transferred into "TEMP.dat" data file. So, your new "TEMP.dat" file holds all - the records execept inputed account no. On the same way make copy of all the "TEMP.dat" records back into your "BANKING.dat" file - for restoring that your data file deletes the matched account no. */ - -void account::delete_account(int t_accno) -{ - fstream file; - file.open("BANKING.dat", ios::in); // Open to read records - fstream temp; - temp.open("TEMP.dat", ios::out); // Open to write records - file.seekg(0, ios::beg); // Positioned from begining of the file - - // Uses the copy method for deleting the transaction record from BANKING.dat data file - while (!file.eof()) - { - file.read((char *)this, sizeof(account)); - if (file.eof()) - break; - if (accno != t_accno) - temp.write((char *)this, sizeof(account)); - } - file.close(); - temp.close(); - file.open("BANKING.dat", ios::out); - temp.open("TEMP.dat", ios::in); - temp.seekg(0, ios::beg); - - // Uses copy method to transfer the record from TEMP.dat file to BANKING.dat data file - while (!temp.eof()) - { - temp.read((char *)this, sizeof(account)); - if (temp.eof()) - break; - if (accno != t_accno) - file.write((char *)this, sizeof(account)); - } - file.close(); - temp.close(); -} - -/* Function for displaying an account from "INITIAL.dat". This function shows all account holders - data records and their respective current balance amount at screen. Thus, the bank will be a position to know - that there is a particular sum is available in bank. Thus, the total balance in bank can easily realised or status - of the bank can known in the management */ -void initial::display_list(void) -{ - clrscr(); - int flag; - float t_bal = 0.0; - fstream file; - gotoxy(25,2); - - cout << "Accounts List in Bank"; - gotoxy(25, 3); - cout << "====================="; - int d1, m1, y1; - struct date d; // For extracting system date - getdate(&d); - d1 = d.da_day; - m1 = d.da_mon; - y1 = d.da_year; - gotoxy(62, 3); - cout << "Date: " << d1 << "/" << m1 << "/" << y1; - gotoxy(1, 4); - for (int j = 1; j <= 79; j++) - cout << "="; - - gotoxy(1, 5); - cout << "Accno#"; - gotoxy(10,5); - cout << "Name"; - gotoxy(30,5); - cout << "Address"; - gotoxy(65,5); - cout << "Balance"; - gotoxy(1, 6); - for (j = 1; j <= 79; j++) - cout << "="; - file.open("INITIAL.dat", ios::in); - file.seekg(0,ios::beg); - int row = 7; - - // Reads all the records to display on the screen - while (file.read((char *)this, sizeof(initial))) - { - flag = 0; - delay(2); - gotoxy(3, row); - cout << accno; - gotoxy(10, row); - puts(name); - gotoxy(30, row); - puts(address); - gotoxy(65, row); - - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << balance; - t_bal = t_bal + balance; - row++; - if (row > 23) - { - flag = 1; - row = 6; - gotoxy(4, 24); - cout << "Press any key to continue.... "; - getch(); - clrscr(); - } - } - - gotoxy(1, row); - for (j = 1; j <= 79; j++) - cout << "="; - row++; - gotoxy(3, row); - cout << "Total Balance in Bank is : "; - gotoxy(65, row); - - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << t_bal; - - file.close(); - if (!flag) - { - gotoxy(4, 24); - cout << "Press any key to continue..."; - getch(); - } -} - -/* Function for clearing specified row and column. By using this function you can clear from a specified row and column - from your screen. Here the function utilizes two parameter for clearing the row and column. */ -void account::clear(int col, int row) -{ - for (int j = col; j <= 79; j++) - { - gotoxy(j, row); - cout << " "; - } -} - -/* Function to found an account for display account function. This function is used to found any account -in the "INITIAL.dat" data file, where the file is searched from the beginning position and search -wheather the entered account exist or not. If exist then the found variable will return a value 1 or return 0 as -the parameter */ -int initial::found_account(int t_accno) -{ - fstream file; - file.open("INITIAL.dat", ios::in); - file.seekg(0, ios::beg); - int found = 0; - - // Searches the specified record in INITIAL.dat data file - while (file.read((char *)this, sizeof(initial))) - { - if (accno == t_accno) - { - found = 1; - break; - } - } - file.close(); - return found; -} - -/* Function for return name of the account holder from INITIAL.dat. This function -basically used to return only name of the account holder if the account in the "INITIAL.dat" -data file. When the name will returned it may simply display / modify at other functions */ -char *initial::return_name(int t_accno) -{ - fstream file; - file.open("INITIAL.dat", ios::in); - file.seekg(0, ios::beg); - char t_name[30]; - - // Return the name to display at report screen if found - while (file.read((char *)this, sizeof(initial))) - { - if (accno == t_accno) - { - strcpy(t_name, name); - break; - } - } - file.close(); - return t_name; -} - -/* Function for return address of the account holder from INITIAL.dat. This function -basically used to return only address of the account holder if the account in the "INITIAL.dat" -data file. When the address will returned it may simply display / modify at other functions */ -char *initial::return_address(int t_accno) -{ - fstream file; - file.open("INITIAL.dat", ios::in); - file.seekg(0, ios::beg); - char t_address[30]; - - // Return the address to display at report screen if found - while (file.read((char *)this, sizeof(initial))) - { - if (accno == t_accno) - { - strcpy(t_address, address); - break; - } - } - file.close(); - return t_address; -} - -/* Function for display account details as: This function displays the heading and the account no. name, address and current date -on the screen with other function like display_account(), month_report() etc.. Also the same function returns the account holders -name and address by using two pointer type function like return_name() and return_address(). */ -void account::box_for_display(int t_accno) -{ - int d1, m1, y1; - struct date d; - getdate(&d); - d1 = d.da_day; - m1 = d.da_mon; - y1 = d.da_year; - gotoxy(63, 2); - cout << "Date: " << d1 << "/" << m1 << "/" << y1; - gotoxy(4, 2); - cout << "Account No. " << t_accno; - - initial ini; - - char t_name[30]; - strcpy(t_name, ini.return_name(t_accno)); - - char t_address[30]; - strcpy(t_address, ini.return_address(t_accno)); - - gotoxy(25, 2); - cout << t_name; - gotoxy(25, 3); - cout << t_address; - gotoxy(4, 5); - cout << "Global Report of Account"; - textbackground(WHITE); - textcolor(BLACK); - textbackground(WHITE); - gotoxy(1, 6); - for (int i = 1; i <=79; i++) - cout << "="; - gotoxy(4, 7); - cprintf("Date Particular Deposit Withdraw Balance"); - gotoxy(1, 8); - for (i = 1; i <=79; i++) - cout << "="; - textcolor(LIGHTGRAY); - textbackground(BLACK); -} - -/* Function for display an account from BANKING.dat file. This is a function who displays - all the transaction of any account on screen. And the function show the account no. name, and address - through the function box_for_display(). Also through this function it shows the total deposit, total withdraw - and current balance amount globally. */ -void account::display_account(void) -{ - clrscr(); - char t_acc[10]; - int j; - int tamt = 0, damt = 0, wamt = 0; - int t, t_accno; - gotoxy(71, 1); - cout << "<0>=Exit"; - gotoxy(5, 5); - cout << "Enter account no. "; - gets(t_acc); - t = atoi(t_acc); - t_accno = t; - if (t_accno == 0) - return; - clrscr(); - initial ini; - if (!ini.found_account(t_accno)) - { - gotoxy(5, 5); - cout << "\7Account not found"; - getch(); - return; - } - - // Display the heading from this function - box_for_display(t_accno); - - int row = 9, flag; - fstream file; - file.open("BANKING.dat", ios::in); - while (file.read((char *)this, sizeof(account))) - { - if (accno == t_accno) - { - flag = 0; - delay(2); - gotoxy(4, row); - cout << dd << "-" << mm << "-" << yy; - gotoxy(16, row); - puts(type); - if (tran == 'D') - { - damt = damt + amount; - tamt = tamt + amount; - gotoxy(30, row); - } - else - { - wamt = wamt + amount; - tamt = tamt - amount; - gotoxy(42, row); - } - - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << amount; - - gotoxy(66, row); - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << balance; - - row++; - if (row > 23) - { - flag = 1; - row = 7; - gotoxy(4, 24); - cout << "Press any key to continue"; - getch(); - clrscr(); - box_for_display(t_accno); - } - } - } - file.close(); - gotoxy(1, row); - for (j = 1; j <= 79; j++) - cout << "="; - row++; - gotoxy(4, row); - cout << "Total-->:"; - gotoxy(30, row); - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << damt; - gotoxy(42, row); - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << wamt; - gotoxy(66, row); - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << tamt; - if (!flag) - { - gotoxy(4, 24); - cout << "Press any key to continue..."; - getch(); - } -} - -/* Function to list monthWise transaction report. This is a monthwise status report for any -account, and the user has to feed only any date of any month and the account no. When the date -and account no. entered the function will check all the transactions of previous month of your entered date -and find the previous balance in the variable pre_balance, which will be the "B/F ......" amount for reporting month. -Then, from that period all remaining transactions of the same entered month will display on your screen. */ - -void account::month_report(void) -{ - - int dd1, mm1, yy1; - clrscr(); - gotoxy(10, 5); - cout << "Enter any date of a month "; - gotoxy(38, 5); - cin >> dd1; - gotoxy(40, 5); - cout << "-"; - gotoxy(41, 5); - cin >> mm1; - gotoxy(43, 5); - cout << "-"; - gotoxy(44, 5); - cin >> yy1; - clrscr(); - char t_acc[10]; - int j; - int tamt = 0, damt = 0, wamt = 0; - int t, t_accno; - gotoxy(71, 1); - cout << "<0>=Exit"; - gotoxy(5, 5); - cout << "Enter account no. "; - gets(t_acc); - t = atoi(t_acc); - t_accno = t; - if (t_accno == 0) - return; - clrscr(); - initial ini; - if (!ini.found_account(t_accno)) - { - gotoxy(5, 5); - cout << "\7Account not found"; - getch(); - return; - } - box_for_display(t_accno); - gotoxy(4, 5); - cout << "Statement Month: " << dd1 << "/" << mm1 << "/" << yy1; - getch(); - - int row = 9, flag; - fstream file; - file.open("BANKING.dat", ios::in); - float pre_balance = 0.0; // Previous balance amount - - // The loop finds the last months balance - while (file.read((char *)this, sizeof(account))) - { - // Checks the account no. and till the previous month and till current year - if ((accno == t_accno) && ((mm < mm1 && yy <= yy1) || (mm1 < mm && yy < yy1))) - { - pre_balance = balance; - } - } - - file.close(); - file.open("BANKING.dat", ios::in); - gotoxy(54, row); - - cout << "B/F .... " << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << pre_balance; - row++; - - // The loop displays the current months transaction after previous month - while (file.read((char *)this, sizeof(account))) - { - if ((accno == t_accno) && (mm1 == mm && yy1 <= yy)) - { - flag = 0; - delay(2); - gotoxy(4, row); - cout << dd << "-" << mm << "-" << yy; - gotoxy(16, row); - puts(type); - if (tran == 'D') - { - damt = damt + amount; - tamt = tamt + amount; - gotoxy(30, row); - } - else - { - wamt = wamt + amount; - tamt = tamt - amount; - gotoxy(42, row); - } - - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << amount; - - gotoxy(66, row); - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << balance; - row++; - - // If row increases 23 then the next screen continues - if (row > 23) - { - flag = 1; - row = 7; - gotoxy(4, 24); - cout << "Press any key to continue"; - getch(); - clrscr(); - box_for_display(t_accno); - } - } - } - file.close(); - gotoxy(1, row); - for (j = 1; j <= 79; j++) - cout << "="; - row++; - - gotoxy(4, row); - cout << "Total-->:"; - gotoxy(30, row); - - // Deposited amount - cout << setw(15) // setwidth - << setprecision(2) // set position of decimal point - << setiosflags(ios::left) // set left justified output - << setiosflags(ios::showpoint) // always show decimal point - << setiosflags(ios::fixed) // set fixed notation for display - << damt; - - gotoxy(42, row); - // Withdraw amount - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << wamt; - - gotoxy(66, row); - tamt = tamt + pre_balance; - // Balance amount - cout << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << tamt; - - if (!flag) - { - gotoxy(4, 24); - cout << "Press any key to continue..."; - getch(); - } - -} - -/* Function for creating new account for new customer. This is a very important function -which used to create new account with all the details of the customer. This function used number -member function like last_accno(), add_to_file(), delete_account etc. The last_accno() function will create -a automatic account no. after checking from the "INITIAL.dat" file. Here the account numbers started from 1 onwards if it is the -first record. -Also in this function the validation checking occurs to the name, address, verifying person and initial deposit amount. At the time of validation checking -the name and address should not blank and not more than the specified length. And the initial deposit amount not less than Rs. 500/-. */ - -void account::new_account(void) -{ - char ch; - int i, valid; - clrscr(); - initial ini; - - shape s; - s.box(2, 1, 79, 25, 218); - s.box(25, 2, 54, 4, 219); - - gotoxy(65, 2); - cout << "<0>=Exit"; - gotoxy(3,3); - for (i = 1; i<= 76; i++) - cprintf(" "); - textbackground(BLACK); - textcolor(BLACK+BLINK); - textbackground(WHITE); - gotoxy(30, 3); - cprintf("Open New Account"); - textcolor(LIGHTGRAY); - textbackground(BLACK); - int d1, m1, y1; - struct date d; // For extracting system date - getdate(&d); - d1 = d.da_day; - m1 = d.da_mon; - y1 = d.da_year; - int t_accno; - t_accno = ini.last_accno(); - t_accno++; - - // Appends and deletes a false record to create primary position in data files - if (t_accno == 1) - { - ini.add_to_file(t_accno, "abc", "xyz", 1.1); - ini.delete_account(t_accno); - add_to_file(t_accno, 1, 1, 1997, 'D', "INITIAL", 1.1, 1.1, 1.1); - delete_account(t_accno); - } - char t_name[30], t[10], t_address[30]; - float t_bal = 0.0, t_balance = 0.0; - gotoxy(5, 6); - cout << "Date: " << d1 << '/' << m1 << '/' << y1; - gotoxy(5, 8); - cout << "Account No # " << t_accno; - gotoxy(5, 10); - cout << "Name : "; - gotoxy(5, 11); - cout << "Address : "; - gotoxy(5, 12); - cout << "Name of verifying Person : "; - gotoxy(5, 14); - cout << "Initial Deposit : "; - - do - { - clear(15, 10); - clear(5, 23); - gotoxy(5, 23); - cout << "Enter Name of the Person"; - valid = 1; - gotoxy(15, 10); - gets(t_name); - strupr(t_name); - if (t_name[0] == '0') - return; - if (strlen(t_name) == 0 || strlen(t_name) > 25) - { - valid = 0; - gotoxy(5, 23); - cprintf("\7Name should not greater than 25"); - getch(); - } - }while (!valid); - - do - { - clear(25, 15); - clear(5, 23); - gotoxy(5, 23); - cout << "Enter Address of the Person "; - valid = 1; - gotoxy(15, 11); - gets(t_address); - strupr(t_address); - if (t_address[0] == '0') - return; - if (strlen(t_address) == 0 || strlen(t_address) > 25) - { - valid = 0; - gotoxy(5, 23); - cprintf("\7Address should not greater than 25"); - getch(); - } - }while (!valid); - - do - { - char vari[30]; - clear(13, 12); - clear(5, 23); - gotoxy(5, 23); - cout << "Enter name of the varifying Person "; - valid = 1; - gotoxy(31, 12); - gets(vari); - strupr(vari); - if (vari[0] == '0') - return; - if (strlen(vari) == 0 || strlen(vari) > 25) - { - valid = 0; - gotoxy(5, 23); - cprintf("Should not blank or greater than 25"); - getch(); - } - }while (!valid); - - do - { - clear(13, 12); - clear(5, 23); - gotoxy(5, 23); - cout << "Enter initial amount to be deposit "; - valid = 1; - gotoxy(23, 14); - gets(t); - t_bal = atof(t); - t_balance = t_bal; - if (t[0] == '0') - { - valid = 0; - gotoxy(5, 23); - cprintf("\7Should not less than 500"); - getch(); - } - }while (!valid); - clear(5, 23); - - do - { - clear(5, 17); - valid = 1; - gotoxy(5, 17); - cout << "Do you want to save the record : "; - ch = getche(); - if (ch == '0') - return; - ch = toupper(ch); - }while (ch != 'N' && ch != 'Y'); - - if (ch == 'N') - return; - float t_amount, t_interest; - t_amount = t_balance; - t_interest = 0.0; - char t_tran, t_type[10]; - t_tran = 'D'; - strcpy(t_type, "INITIAL"); - - // Appends the records contents into both INITIAL.dat and BANKING.dat data files - ini.add_to_file(t_accno, t_name, t_address, t_balance); - add_to_file(t_accno, d1, m1, y1, t_tran, t_type, t_interest, t_amount, t_balance); -} - -/* Function for returning balance amount of an account. This function returns the balance amount of any account -to know the current balance from "INITIAL.dat" data file. */ - -float initial::give_balance(int t_accno) -{ - fstream file; - file.open("INITIAL.dat", ios::in); - file.seekg(0, ios::beg); - float t_balance; - - // Gives the last balance of an individual account - while (file.read((char *)this, sizeof(initial))) - { - if (accno == t_accno) - { - t_balance = balance; - break; - } - } - file.close(); - return t_balance; -} - -/* Function for returning the record no. for updating balance - This function check the position of the account number for updating new balance amount - into either "INITIAL.dat" or "BANKING.dat" data files. */ -int initial::recordno(int t_accno) -{ - fstream file; - file.open("INITIAL.dat", ios::in); - file.seekg(0, ios::beg); - int count = 0; - - // Finds the record position in INITIAL.dat data file - while (file.read((char *)this, sizeof(initial))) - { - count++; - if (t_accno == accno) - break; - } - file.close(); - return count; -} -/* Function for updating the balance for the given account no. - This function is used to update the balance after making any transaction in "INITIAL.dat" data file. - While updating balance in "INITIAL.dat" data file, all the fields will transfer into at the specified - position in the file, because with random file handling when we update any record the size of the record becomes - over write at the same place. So, all the fields including balance amount will write into the same position in - "INITIAL.dat" data file. Here this function uses a function seekp(), which searches the location in the data file - where the record will be write. */ - -void initial::update_balance(int t_accno, char t_name[30], char t_address[30], float t_balance) -{ - int recno; - recno = recordno(t_accno); - fstream file; - file.open("INITIAL.dat", ios::out|ios::ate); - strcpy(name, t_name); - strcpy(address, t_address); - balance = t_balance; - int location; - location = (recno-1) * sizeof(initial); // Find the location in file - file.seekp(location); // Searches the insertion position in data file - - // Updates the balance amount in INITIAL.dat data file - file.write((char *)this, sizeof(initial)); - file.close(); -} - -/* Function to return no. days between two dates. - The function calculates total number of days between two date. And the function passes parameters as related to date (day, month, year). */ - -int account::no_of_days(int d1, int m1, int y1, int d2, int m2, int y2) -{ - static int month[] = {31, 28, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30}; - int days = 0; - while (d1 != d2 || m1 != m2 || y1 != y2) - { - days++; - d1++; - if (d1 > month[m1-1]) - { - d1 = 1; - m1++; - } - if (m1 > m2) - { - m1 = 1; - y1++; - } - } - return days; -} - -/* Function for calculates interest -This function calculate the interest of any account accouding to the account no. and balance from "BANKING.data" data file -Before calculate the interest, the funcation also finds total number of days and then find the interest. */ - -float account::calculate_interest(int t_accno, float t_balance) -{ - fstream file; - file.open("BANKING.dat", ios::in); - file.seekg(0, ios::beg); - int d1, m1, y1, days; - while (file.read((char *)this, sizeof(account))) - { - if (accno == t_accno) - { - d1 = dd; - m1 = mm; - y1 = yy; - break; - } - } - int d2, m2, y2; - struct date d; - getdate(&d); - d2 = d.da_day; - m2 = d.da_mon; - y2 = d.da_year; - float t_interest = 0.0; - if ((y2 < y1) || (y2 == y1 && m2 < m1) || (y2 == y1 && m2 == m1) && (d2 < d1)) - return t_interest; - days = no_of_days(d1, m1, y1, d2, m2, y2); - int months = 0; - if (days > 30) - { - months = days / 30; - t_interest = ((t_balance*2)/100 * months); - } - file.close(); - return t_interest; -} - -/* Function for making daily transaction (Deposit 'D'/Withdraw 'W'. - This is the function used to make daily transaction either for Deposit(D) or for Withdraw(W). When the screen appears - the user has to press the account no. and either for deposit or withdraw and then either Cash or Cheque. While screening - the same screen also shows the previous balance for deposit or withdraw. After the final entry, it speaks "Save Transaction ?" and if yes. - then the transaction data saved in "BANKING.dat" data file and the current balance updated in the "INITIAL.dat" data file. */ - -void account::transaction(void) -{ - clrscr(); - char t_acc[10]; - int t, t_accno, valid; - gotoxy(71,1); - cout << "<0>=Exit"; - gotoxy(5, 5); - cout << "Enter the account no. "; - gets(t_acc); - t = atoi(t_acc); - t_accno = t; - if (t_accno == 0) - return; - clrscr(); - initial ini; - if (!ini.found_account(t_accno)) - { - gotoxy(5, 5); - cout << "\7Account not found"; - getch(); - return; - } - gotoxy(71, 1); - cout << "<0>=Exit"; - gotoxy(3, 3); - for (int i = 1; i <= 76; i++) - cprintf(" "); - textbackground(BLACK); - textcolor(BLACK+BLINK); - textbackground(WHITE); - gotoxy(29, 3); - cprintf ("Transaction in Account"); - textcolor(LIGHTGRAY); - textbackground(BLACK); - int d1, m1, y1; - struct date d; - getdate(&d); - d1 = d.da_day; - m1 = d.da_mon; - y1 = d.da_year; - gotoxy(5, 6); - cout << "Date: " << d1 << "/" << m1 << "/" << y1; - gotoxy(5, 8); - cout << "Accnount no. " << t_accno; - char t_name[30]; - char t_address[30]; - float t_balance; - strcpy(t_name, ini.return_name(t_accno)); - strcpy(t_address, ini.return_address(t_accno)); - t_balance = ini.give_balance(t_accno); - gotoxy(27, 11); - cout << "Name : " << t_name; - gotoxy(27, 12); - cout << "Address : " << t_address; - - gotoxy(5, 15); - cout << "Last balance Rs. " << setw(15) - << setprecision(2) - << setiosflags(ios::left) - << setiosflags(ios::showpoint) - << setiosflags(ios::fixed) - << t_balance; - - char t_tran, t_type[10], tm[10]; - float t_amount, t_amt; - - do - { - clear(5, 10); - valid = 1; - gotoxy(5, 10); - cout << "Deposit or Withdraw (D/W) : "; - t_tran = getch(); - if (t_tran == '0') - return; - t_tran = toupper(t_tran); - }while (t_tran != 'D' && t_tran != 'W'); - - do - { - clear(5, 19); - clear(5, 23); - gotoxy(5, 23); - cout << "Enter Transaction by Cash or Cheque "; - valid = 1; - gotoxy(5, 19); - cout << "Cash/Cheque : "; - gets(t_type); - strupr(t_type); - if (t_type[0] == '0') - return; - if (strcmp(t_type, "CASH") && strcmp(t_type, "CHEQUE")) - { - valid = 0; - gotoxy(5, 23); - cprintf("\7Enter correctly"); - getch(); - } - }while (!valid); - - do - { - clear(5, 21); - clear(5, 23); - gotoxy(5, 23); - cout << "Enter Amount for Transaction "; - valid = 1; - gotoxy(5, 21); - cout << "Amount Rs. "; - gets(tm); - t_amt = atof(tm); - t_amount = t_amt; - if (tm[0] == '0') - return; - if ((t_tran == 'W' && t_amount > t_balance) || (t_amount < 1)) - { - valid = 0; - gotoxy(5, 23); - cprintf("\7Invalid Data entered"); - getch(); - } - }while (!valid); - - char ch; - clear(5, 23); - do - { - clear(20, 23); - valid = 1; - gotoxy(40, 20); - cout << "Save Transaction : "; - ch = getche(); - if (ch == '0') - return; - ch = toupper(ch); - }while (ch != 'N' && ch != 'Y'); - if (ch == 'N') - return; - float t_interest; - - t_interest = calculate_interest(t_accno, t_balance); - - if (t_tran == 'D') - t_balance = t_balance + t_amount + t_interest; - else - t_balance = (t_balance - t_amount) + t_interest; - - // Modified records are updated in data bases. - ini.update_balance(t_accno, t_name, t_address, t_balance); - add_to_file(t_accno, d1, m1, y1, t_tran, t_type, t_interest, t_amount, t_balance); -} - -/* Function for closing any account after inputing account number. -When any account holder interested to close his/her account then this function helps to close -the account completely, means all the transactions from the "BANKING.dat" and "INITIAL.dat" file deletes -the particular record information. The function also uses no. of other functions which fullfill the the total -close_account procedure as well. */ - -void account::close_account(void) -{ - clrscr(); - char t_acc[10]; - int t, t_accno; - gotoxy(71, 1); - cout << "<0>=Exit"; - gotoxy(5, 5); - cout << "Enter the account no. "; - gets(t_acc); - t = atoi(t_acc); - t_accno = t; - if (t_accno == 0) - return; - clrscr(); - initial ini; - if (!ini.found_account(t_accno)) - { - gotoxy(5, 5); - cout << "\7Account not found "; - getch(); - return; - } - gotoxy(71, 1); - cout << "<0>=Exit"; - gotoxy(3, 3); - textbackground(WHITE); - for (int i = 1; i <= 76; i++) - cprintf(" "); - textbackground(BLACK); - textcolor(BLACK+BLINK); - textbackground(WHITE); - gotoxy(30, 3); - cprintf("Close account screen"); - textcolor(LIGHTGRAY); - textbackground(BLACK); - int d1, m1, y1; - struct date d; - getdate(&d); - d1 = d.da_day; - m1 = d.da_mon; - y1 = d.da_year; - gotoxy(5, 6); - cout << "Date: " << d1 << "/" << m1 << "/" << y1; - char ch; - ini. display(t_accno); - do - { - clear(5, 15); - gotoxy(5, 15); - cout << "Close this account -using namespace std; -int main() -{ - cout<<"Hello World"; - return 0; -} \ No newline at end of file diff --git a/Cpp/HellWorldTaiwan.cpp b/Cpp/HellWorldTaiwan.cpp deleted file mode 100644 index 6f78631c1..000000000 --- a/Cpp/HellWorldTaiwan.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -using namespace std; -int main(void){ - cout << "Hell World Taiwan" << endl; - cout << "Taiwan is a danger place!!!!!" << endl; - -} diff --git a/Cpp/HelloWorld.cpp b/Cpp/HelloWorld.cpp deleted file mode 100644 index f2eca999c..000000000 --- a/Cpp/HelloWorld.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -using namespace std; - -int main() -{ - cout <<"Hello World"<< endl; - - return 0; -} diff --git a/Cpp/Is it square? b/Cpp/Is it square? deleted file mode 100644 index 798a10098..000000000 --- a/Cpp/Is it square? +++ /dev/null @@ -1,18 +0,0 @@ -#include - -#include -using namespace std; - -int main(){ - int n; - cin >> n; - double x = sqrt (n); - int y = x; - if (y * y == n){ - cout << "Yes"; - } - else { - cout << "No"; - } - return 0; -} diff --git a/Cpp/calculator.py.txt b/Cpp/calculator.py.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/Cpp/islands.cpp b/Cpp/islands.cpp deleted file mode 100644 index e726e03f3..000000000 --- a/Cpp/islands.cpp +++ /dev/null @@ -1,82 +0,0 @@ -//https://www.geeksforgeeks.org/find-number-of-islands/ -#include -using namespace std; -vector print(int** edges,int n,int sv,bool* visited,vector ans) -{ - ans.push_back(sv); - visited[sv]=true; - for(int i=1;i<=n;i++) - { - if(i==sv) - continue; - - if(edges[sv][i]==1) - { - if(visited[i]) - continue; - print(edges,n,i,visited,ans); - } - } - return ans; -} -int main() -{ - int n,e; - cin>>n>>e; - int** edges=new int*[n+1]; - - for(int i=1;i<=n;i++) - { - edges[i]=new int[n]; - for(int j=1;j<=n;j++) - edges[i][j]=0; - } - - int u[100],v[100]; - - for(int i=0;i>u[i]; - - - for(int i=0;i>v[i]; - - for(int i=0;i vec; - - for(int i=1;i<=n;i++) - { - if(!visited[i]) - { - c++; - vector ans=print(edges,n,i,visited,vec); - } - } - - cout< -using namespace std; -int main() -{ - cout << "Hello World!" << endl; - return 0; -} - -output: Hello World! diff --git a/Cpp/scientific_calculator.cpp b/Cpp/scientific_calculator.cpp deleted file mode 100644 index d16c0a2cb..000000000 --- a/Cpp/scientific_calculator.cpp +++ /dev/null @@ -1,192 +0,0 @@ -#include -#include -#include -#include -#include -using namespace std; -int main () -{ - char letter; - char letter1; - char letter2; - char letter3; - char letter4; - int a,b; - double a1,b1; - int result; - double result1; - cout<<"\n\n\n ***************** SCIENTIFIC CALCULATOR ****************** \n\n\n"; - do - { - cout<<"\t 1 : Arithmetic Operations \n"; - cout<<"\t 2 : Trigonometric Functions \n"; - cout<<"\t 3 : Logarithmic Functions \n"; - cout<<"\t 4 : Power Functions \n"; - cout<<"\t 5 : Exit... \n"; - letter = getche(); - switch(letter) - { - case '1': - { - cout<<"\n\n"; - cout<<"\t1 : Addition \n"; - cout<<"\t2 : Subtraction \n"; - cout<<"\t3 : Multipilication \n"; - cout<<"\t4 : Division \n\n"; - letter1 = getche(); - switch(letter1) - { - case '1': - { - cout<<"\n\nEnter first number..."; - cin>>a; - cout<<"Enter an other number..."; - cin>>b; - result=a+b; - cout<<"\n\nResult = "<>a; - cout<<"Enter an other number..."; - cin>>b; - result=a-b; - cout<<"\n\nResult = "<>a; - cout<<"Enter an other number..."; - cin>>b; - result=a*b; - cout<<"\n\nResult = "<>a; - cout<<"Enter an other number..."; - cin>>b; - if(a!=0) - { - result=a/b; - cout<<"\n\nResult = "<>a1; - result1=(sin(a1)); - cout<<"\n\nResult = "<>a1; - result1=(cos(a1)); - cout<<"\n\nResult = "<>a1; - result1=(tan(a1)); - cout<<"\n\nResult = "<>a1; - result1=log(a1); - cout<<"\n\n Result = "<>a1; - result1= log10(a1); - cout<<"\n\n Result = "<>a1; - cout<<"Enter power..."; - cin>>b1; - result1=pow(a1,b1); - cout<<"\n\nResult = "<>a; - result1=sqrt(a); - cout<<"\n\nResult = "< -using namespace std; - -#define ll long long -#define pb push_back -#define pll pair -#define vll vector -#define vpll vector -#define mp make_pair -#define endl "\n" -#define all(x) x.begin(), x.end() -#define fastio ios::sync_with_stdio(false); cin.tie(0); -#define T int tt; cin>>tt; while(tt--) - -int main() -{ - fastio; - string hello = "Hello ,",world = "World"!; - cout< -using namespace std; -int main() -{ - cout<<"Namaste Duniya\n"; - return 0; -} \ No newline at end of file diff --git a/Crystal/hello_world.cr b/Crystal/hello_world.cr deleted file mode 100644 index 8aa9c2d0a..000000000 --- a/Crystal/hello_world.cr +++ /dev/null @@ -1,3 +0,0 @@ -# Hello world in Crystal - -puts "Hello World" 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/D/HelloWorld.d b/D/HelloWorld.d deleted file mode 100644 index 38e9169a1..000000000 --- a/D/HelloWorld.d +++ /dev/null @@ -1,5 +0,0 @@ -import std.stdio; - -void main(string[] args) { - writeln("Hello World!"); -} diff --git a/D/HolaMundo-Peru.d b/D/HolaMundo-Peru.d deleted file mode 100644 index e12c960fb..000000000 --- a/D/HolaMundo-Peru.d +++ /dev/null @@ -1,5 +0,0 @@ -import std.stdio; - -void main(string[] args) { - writeln("Hola Mundo Bateria Fina :3 "); -} diff --git a/D3JS/d1.html b/D3JS/d1.html deleted file mode 100644 index 1eb2320a3..000000000 --- a/D3JS/d1.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/D3JS/d2.html b/D3JS/d2.html deleted file mode 100644 index d53c8b03c..000000000 --- a/D3JS/d2.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - -

Hacktober 2018

- - - - - diff --git a/DBase/helloworld.dbf b/DBase/helloworld.dbf deleted file mode 100644 index 8992efd6f..000000000 --- a/DBase/helloworld.dbf +++ /dev/null @@ -1 +0,0 @@ -? "Hello World" \ No newline at end of file diff --git a/DOG/hello_world b/DOG/hello_world deleted file mode 100644 index 773588a84..000000000 --- a/DOG/hello_world +++ /dev/null @@ -1,2 +0,0 @@ -// this is the portion of code that barks -bark "Hello world!\n" diff --git a/Dart/Fibonacci.dart b/Dart/Fibonacci.dart deleted file mode 100644 index cd4dd398c..000000000 --- a/Dart/Fibonacci.dart +++ /dev/null @@ -1,23 +0,0 @@ -int Fibonacci(int number){ - if (number < 2) { - return number; - } - - return Fibonacci(number - 2) + Fibonacci(number - 1); -} - -void main() { - print("Input sequence number to find Fibonacci number: "); - String inputLine = stdin.readLineSync(); - - int number; - - try { - number = int.parse(inputLine); - } on FormatException { - print("You need to input the number."); - return; - } - - print("fib($number) = ${fib(number)}"); -} diff --git a/Dart/HelloDart.dart b/Dart/HelloDart.dart deleted file mode 100644 index d63ec95f6..000000000 --- a/Dart/HelloDart.dart +++ /dev/null @@ -1,3 +0,0 @@ -void main(){ - print('Hello Dart !'); -} diff --git a/Dart/HelloWorld.dart b/Dart/HelloWorld.dart deleted file mode 100644 index 67fa24d1f..000000000 --- a/Dart/HelloWorld.dart +++ /dev/null @@ -1,4 +0,0 @@ -void main(){ - print('Hello World !!'); - print("First Try"); -} diff --git a/Dart/HelloWorlddart.dart b/Dart/HelloWorlddart.dart deleted file mode 100644 index e8d437bcb..000000000 --- a/Dart/HelloWorlddart.dart +++ /dev/null @@ -1,3 +0,0 @@ -void main(){ - print('Hello World This is Manik learning how this works!!'); -} diff --git a/Dart/async_example.dart b/Dart/async_example.dart deleted file mode 100644 index 7cb5065bc..000000000 --- a/Dart/async_example.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'dart:async'; - - -/// Simple dart program showcasing the asynchornous nature of dart - -/// Prints the passed message after a fixed delay -/// enclosing parametes within {} makes them optional and named -void lazy_print({message = 'Hello,World!', wait = false}) async { - /// Dart 2.0 no longer requires new keyword, - /// so we can write Duration... instead of new Duration... - const waitDuration = Duration(milliseconds: 300); - if(wait) { - await Future.delayed(waitDuration); - } else { - Future.delayed(waitDuration); - } - print(message); -} - -void main() async { - await lazy_print(); - lazy_print(message: 'Hello 1'); - lazy_print(message: 'Hello 2', wait: true); - lazy_print(message: 'Hello 3'); -} - -/* Output - * - * Hello,World! - * Hello 1 - * Hello 3 - * Hello 2 - */ diff --git a/Dart/comments.dart b/Dart/comments.dart deleted file mode 100644 index 613d9ef5a..000000000 --- a/Dart/comments.dart +++ /dev/null @@ -1,9 +0,0 @@ -void main(){ - // This is a normal, one-line comment. - -/// This is a documentation comment, used to document libraries, -/// classes, and their members. Tools like IDEs and dartdoc treat -/// doc comments specially. - -/* Comments like these are also supported. */ -} diff --git a/Dart/exceptions.dart b/Dart/exceptions.dart deleted file mode 100644 index 8704fae18..000000000 --- a/Dart/exceptions.dart +++ /dev/null @@ -1,6 +0,0 @@ -void main(){ - x = 0 - if (x == 0) { - throw StateError('Exception thrown.'); - } -} diff --git a/Dart/for-loop.dart b/Dart/for-loop.dart deleted file mode 100644 index a084bb702..000000000 --- a/Dart/for-loop.dart +++ /dev/null @@ -1,5 +0,0 @@ -void main() { - for (int i = 0; i < 5; i++) { - print('hello world ${i + 0}'); - } -} diff --git a/Dart/hello-world.ru.dart b/Dart/hello-world.ru.dart deleted file mode 100644 index 8e361efe4..000000000 --- a/Dart/hello-world.ru.dart +++ /dev/null @@ -1,3 +0,0 @@ -void main(){ - print('Привет, мир!'); -} diff --git a/Dart/imports.dart b/Dart/imports.dart deleted file mode 100644 index 2f86eba27..000000000 --- a/Dart/imports.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Importing core libraries -import 'dart:async'; -import 'dart:math'; - -// Importing libraries from external packages -import 'package:test/test.dart'; - -// Importing files -import 'path/to/my_other_file.dart'; -import '../lib/samples/spacecraft.dart'; - -void main(){ - // This is a normal, one-line comment. - -/// This is a documentation comment, used to document libraries, -/// classes, and their members. Tools like IDEs and dartdoc treat -/// doc comments specially. - -/* Comments like these are also supported. */ -} diff --git a/Deep_Learning/Overview.md b/Deep_Learning/Overview.md deleted file mode 100644 index 659e276ef..000000000 --- a/Deep_Learning/Overview.md +++ /dev/null @@ -1 +0,0 @@ -# Major Libraries in Deep Learning with proper examples diff --git a/Deep_Learning/PyTorch/Neural_nets/dynamic_net.ipynb b/Deep_Learning/PyTorch/Neural_nets/dynamic_net.ipynb deleted file mode 100644 index fe0cfc69f..000000000 --- a/Deep_Learning/PyTorch/Neural_nets/dynamic_net.ipynb +++ /dev/null @@ -1,54 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\nPyTorch: Control Flow + Weight Sharing\n--------------------------------------\n\nTo showcase the power of PyTorch dynamic graphs, we will implement a very strange\nmodel: a fully-connected ReLU network that on each forward pass randomly chooses\na number between 1 and 4 and has that many hidden layers, reusing the same\nweights multiple times to compute the innermost hidden layers.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "import random\nimport torch\n\n\nclass DynamicNet(torch.nn.Module):\n def __init__(self, D_in, H, D_out):\n \"\"\"\n In the constructor we construct three nn.Linear instances that we will use\n in the forward pass.\n \"\"\"\n super(DynamicNet, self).__init__()\n self.input_linear = torch.nn.Linear(D_in, H)\n self.middle_linear = torch.nn.Linear(H, H)\n self.output_linear = torch.nn.Linear(H, D_out)\n\n def forward(self, x):\n \"\"\"\n For the forward pass of the model, we randomly choose either 0, 1, 2, or 3\n and reuse the middle_linear Module that many times to compute hidden layer\n representations.\n\n Since each forward pass builds a dynamic computation graph, we can use normal\n Python control-flow operators like loops or conditional statements when\n defining the forward pass of the model.\n\n Here we also see that it is perfectly safe to reuse the same Module many\n times when defining a computational graph. This is a big improvement from Lua\n Torch, where each Module could be used only once.\n \"\"\"\n h_relu = self.input_linear(x).clamp(min=0)\n for _ in range(random.randint(0, 3)):\n h_relu = self.middle_linear(h_relu).clamp(min=0)\n y_pred = self.output_linear(h_relu)\n return y_pred\n\n\n# N is batch size; D_in is input dimension;\n# H is hidden dimension; D_out is output dimension.\nN, D_in, H, D_out = 64, 1000, 100, 10\n\n# Create random Tensors to hold inputs and outputs\nx = torch.randn(N, D_in)\ny = torch.randn(N, D_out)\n\n# Construct our model by instantiating the class defined above\nmodel = DynamicNet(D_in, H, D_out)\n\n# Construct our loss function and an Optimizer. Training this strange model with\n# vanilla stochastic gradient descent is tough, so we use momentum\ncriterion = torch.nn.MSELoss(reduction='sum')\noptimizer = torch.optim.SGD(model.parameters(), lr=1e-4, momentum=0.9)\nfor t in range(500):\n # Forward pass: Compute predicted y by passing x to the model\n y_pred = model(x)\n\n # Compute and print loss\n loss = criterion(y_pred, y)\n print(t, loss.item())\n\n # Zero gradients, perform a backward pass, and update the weights.\n optimizer.zero_grad()\n loss.backward()\n optimizer.step()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/Deep_Learning/PyTorch/Neural_nets/two_layer_net_module.ipynb b/Deep_Learning/PyTorch/Neural_nets/two_layer_net_module.ipynb deleted file mode 100644 index 4b0d4ac9a..000000000 --- a/Deep_Learning/PyTorch/Neural_nets/two_layer_net_module.ipynb +++ /dev/null @@ -1,54 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\nPyTorch: Custom nn Modules\n--------------------------\n\nA fully-connected ReLU network with one hidden layer, trained to predict y from x\nby minimizing squared Euclidean distance.\n\nThis implementation defines the model as a custom Module subclass. Whenever you\nwant a model more complex than a simple sequence of existing Modules you will\nneed to define your model this way.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "import torch\n\n\nclass TwoLayerNet(torch.nn.Module):\n def __init__(self, D_in, H, D_out):\n \"\"\"\n In the constructor we instantiate two nn.Linear modules and assign them as\n member variables.\n \"\"\"\n super(TwoLayerNet, self).__init__()\n self.linear1 = torch.nn.Linear(D_in, H)\n self.linear2 = torch.nn.Linear(H, D_out)\n\n def forward(self, x):\n \"\"\"\n In the forward function we accept a Tensor of input data and we must return\n a Tensor of output data. We can use Modules defined in the constructor as\n well as arbitrary operators on Tensors.\n \"\"\"\n h_relu = self.linear1(x).clamp(min=0)\n y_pred = self.linear2(h_relu)\n return y_pred\n\n\n# N is batch size; D_in is input dimension;\n# H is hidden dimension; D_out is output dimension.\nN, D_in, H, D_out = 64, 1000, 100, 10\n\n# Create random Tensors to hold inputs and outputs\nx = torch.randn(N, D_in)\ny = torch.randn(N, D_out)\n\n# Construct our model by instantiating the class defined above\nmodel = TwoLayerNet(D_in, H, D_out)\n\n# Construct our loss function and an Optimizer. The call to model.parameters()\n# in the SGD constructor will contain the learnable parameters of the two\n# nn.Linear modules which are members of the model.\ncriterion = torch.nn.MSELoss(reduction='sum')\noptimizer = torch.optim.SGD(model.parameters(), lr=1e-4)\nfor t in range(500):\n # Forward pass: Compute predicted y by passing x to the model\n y_pred = model(x)\n\n # Compute and print loss\n loss = criterion(y_pred, y)\n print(t, loss.item())\n\n # Zero gradients, perform a backward pass, and update the weights.\n optimizer.zero_grad()\n loss.backward()\n optimizer.step()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/Deep_Learning/PyTorch/Neural_nets/two_layer_net_nn.ipynb b/Deep_Learning/PyTorch/Neural_nets/two_layer_net_nn.ipynb deleted file mode 100644 index c0807c9bf..000000000 --- a/Deep_Learning/PyTorch/Neural_nets/two_layer_net_nn.ipynb +++ /dev/null @@ -1,54 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\nPyTorch: nn\n-----------\n\nA fully-connected ReLU network with one hidden layer, trained to predict y from x\nby minimizing squared Euclidean distance.\n\nThis implementation uses the nn package from PyTorch to build the network.\nPyTorch autograd makes it easy to define computational graphs and take gradients,\nbut raw autograd can be a bit too low-level for defining complex neural networks;\nthis is where the nn package can help. The nn package defines a set of Modules,\nwhich you can think of as a neural network layer that has produces output from\ninput and may have some trainable weights.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "import torch\n\n# N is batch size; D_in is input dimension;\n# H is hidden dimension; D_out is output dimension.\nN, D_in, H, D_out = 64, 1000, 100, 10\n\n# Create random Tensors to hold inputs and outputs\nx = torch.randn(N, D_in)\ny = torch.randn(N, D_out)\n\n# Use the nn package to define our model as a sequence of layers. nn.Sequential\n# is a Module which contains other Modules, and applies them in sequence to\n# produce its output. Each Linear Module computes output from input using a\n# linear function, and holds internal Tensors for its weight and bias.\nmodel = torch.nn.Sequential(\n torch.nn.Linear(D_in, H),\n torch.nn.ReLU(),\n torch.nn.Linear(H, D_out),\n)\n\n# The nn package also contains definitions of popular loss functions; in this\n# case we will use Mean Squared Error (MSE) as our loss function.\nloss_fn = torch.nn.MSELoss(reduction='sum')\n\nlearning_rate = 1e-4\nfor t in range(500):\n # Forward pass: compute predicted y by passing x to the model. Module objects\n # override the __call__ operator so you can call them like functions. When\n # doing so you pass a Tensor of input data to the Module and it produces\n # a Tensor of output data.\n y_pred = model(x)\n\n # Compute and print loss. We pass Tensors containing the predicted and true\n # values of y, and the loss function returns a Tensor containing the\n # loss.\n loss = loss_fn(y_pred, y)\n print(t, loss.item())\n\n # Zero the gradients before running the backward pass.\n model.zero_grad()\n\n # Backward pass: compute gradient of the loss with respect to all the learnable\n # parameters of the model. Internally, the parameters of each Module are stored\n # in Tensors with requires_grad=True, so this call will compute gradients for\n # all learnable parameters in the model.\n loss.backward()\n\n # Update the weights using gradient descent. Each parameter is a Tensor, so\n # we can access its gradients like we did before.\n with torch.no_grad():\n for param in model.parameters():\n param -= learning_rate * param.grad" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/Deep_Learning/PyTorch/Neural_nets/two_layer_net_optim.ipynb b/Deep_Learning/PyTorch/Neural_nets/two_layer_net_optim.ipynb deleted file mode 100644 index 24f2091e1..000000000 --- a/Deep_Learning/PyTorch/Neural_nets/two_layer_net_optim.ipynb +++ /dev/null @@ -1,54 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\nPyTorch: optim\n--------------\n\nA fully-connected ReLU network with one hidden layer, trained to predict y from x\nby minimizing squared Euclidean distance.\n\nThis implementation uses the nn package from PyTorch to build the network.\n\nRather than manually updating the weights of the model as we have been doing,\nwe use the optim package to define an Optimizer that will update the weights\nfor us. The optim package defines many optimization algorithms that are commonly\nused for deep learning, including SGD+momentum, RMSProp, Adam, etc.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "import torch\n\n# N is batch size; D_in is input dimension;\n# H is hidden dimension; D_out is output dimension.\nN, D_in, H, D_out = 64, 1000, 100, 10\n\n# Create random Tensors to hold inputs and outputs\nx = torch.randn(N, D_in)\ny = torch.randn(N, D_out)\n\n# Use the nn package to define our model and loss function.\nmodel = torch.nn.Sequential(\n torch.nn.Linear(D_in, H),\n torch.nn.ReLU(),\n torch.nn.Linear(H, D_out),\n)\nloss_fn = torch.nn.MSELoss(reduction='sum')\n\n# Use the optim package to define an Optimizer that will update the weights of\n# the model for us. Here we will use Adam; the optim package contains many other\n# optimization algoriths. The first argument to the Adam constructor tells the\n# optimizer which Tensors it should update.\nlearning_rate = 1e-4\noptimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)\nfor t in range(500):\n # Forward pass: compute predicted y by passing x to the model.\n y_pred = model(x)\n\n # Compute and print loss.\n loss = loss_fn(y_pred, y)\n print(t, loss.item())\n\n # Before the backward pass, use the optimizer object to zero all of the\n # gradients for the variables it will update (which are the learnable\n # weights of the model). This is because by default, gradients are\n # accumulated in buffers( i.e, not overwritten) whenever .backward()\n # is called. Checkout docs of torch.autograd.backward for more details.\n optimizer.zero_grad()\n\n # Backward pass: compute gradient of the loss with respect to model\n # parameters\n loss.backward()\n\n # Calling the step function on an Optimizer makes an update to its\n # parameters\n optimizer.step()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/Deep_Learning/PyTorch/PyTorch.md b/Deep_Learning/PyTorch/PyTorch.md deleted file mode 100644 index ec9852dc4..000000000 --- a/Deep_Learning/PyTorch/PyTorch.md +++ /dev/null @@ -1,8 +0,0 @@ -At its core, PyTorch provides two main features: - - - An n-dimensional Tensor, similar to numpy but can run on GPUs - - Automatic differentiation for building and training neural networks - -Pytorch uses dynamic computation graphs, as opossed to tensorflow (although tensorflow has now introduced eager execution, which provides similar functionality to dynamic graphs in pytorch), where a computation graph must be specified in advance. - -We will use a fully-connected ReLU network as our running example. The network will have a single hidden layer, and will be trained with gradient descent to fit random data by minimizing the Euclidean distance between the network output and the true output. diff --git a/Deep_Learning/PyTorch/Tensorfloww_static_graphs/tf_two_layer_net.ipynb b/Deep_Learning/PyTorch/Tensorfloww_static_graphs/tf_two_layer_net.ipynb deleted file mode 100644 index 337993c0e..000000000 --- a/Deep_Learning/PyTorch/Tensorfloww_static_graphs/tf_two_layer_net.ipynb +++ /dev/null @@ -1,54 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\nTensorFlow: Static Graphs\n-------------------------\n\nA fully-connected ReLU network with one hidden layer and no biases, trained to\npredict y from x by minimizing squared Euclidean distance.\n\nThis implementation uses basic TensorFlow operations to set up a computational\ngraph, then executes the graph many times to actually train the network.\n\nOne of the main differences between TensorFlow and PyTorch is that TensorFlow\nuses static computational graphs while PyTorch uses dynamic computational\ngraphs.\n\nIn TensorFlow we first set up the computational graph, then execute the same\ngraph many times.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "import tensorflow as tf\nimport numpy as np\n\n# First we set up the computational graph:\n\n# N is batch size; D_in is input dimension;\n# H is hidden dimension; D_out is output dimension.\nN, D_in, H, D_out = 64, 1000, 100, 10\n\n# Create placeholders for the input and target data; these will be filled\n# with real data when we execute the graph.\nx = tf.placeholder(tf.float32, shape=(None, D_in))\ny = tf.placeholder(tf.float32, shape=(None, D_out))\n\n# Create Variables for the weights and initialize them with random data.\n# A TensorFlow Variable persists its value across executions of the graph.\nw1 = tf.Variable(tf.random_normal((D_in, H)))\nw2 = tf.Variable(tf.random_normal((H, D_out)))\n\n# Forward pass: Compute the predicted y using operations on TensorFlow Tensors.\n# Note that this code does not actually perform any numeric operations; it\n# merely sets up the computational graph that we will later execute.\nh = tf.matmul(x, w1)\nh_relu = tf.maximum(h, tf.zeros(1))\ny_pred = tf.matmul(h_relu, w2)\n\n# Compute loss using operations on TensorFlow Tensors\nloss = tf.reduce_sum((y - y_pred) ** 2.0)\n\n# Compute gradient of the loss with respect to w1 and w2.\ngrad_w1, grad_w2 = tf.gradients(loss, [w1, w2])\n\n# Update the weights using gradient descent. To actually update the weights\n# we need to evaluate new_w1 and new_w2 when executing the graph. Note that\n# in TensorFlow the the act of updating the value of the weights is part of\n# the computational graph; in PyTorch this happens outside the computational\n# graph.\nlearning_rate = 1e-6\nnew_w1 = w1.assign(w1 - learning_rate * grad_w1)\nnew_w2 = w2.assign(w2 - learning_rate * grad_w2)\n\n# Now we have built our computational graph, so we enter a TensorFlow session to\n# actually execute the graph.\nwith tf.Session() as sess:\n # Run the graph once to initialize the Variables w1 and w2.\n sess.run(tf.global_variables_initializer())\n\n # Create numpy arrays holding the actual data for the inputs x and targets\n # y\n x_value = np.random.randn(N, D_in)\n y_value = np.random.randn(N, D_out)\n for _ in range(500):\n # Execute the graph many times. Each time it executes we want to bind\n # x_value to x and y_value to y, specified with the feed_dict argument.\n # Each time we execute the graph we want to compute the values for loss,\n # new_w1, and new_w2; the values of these Tensors are returned as numpy\n # arrays.\n loss_value, _, _ = sess.run([loss, new_w1, new_w2],\n feed_dict={x: x_value, y: y_value})\n print(loss_value)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/Deep_Learning/PyTorch/Tensors/two_layer_net_numpy.ipynb b/Deep_Learning/PyTorch/Tensors/two_layer_net_numpy.ipynb deleted file mode 100644 index 6715e7b90..000000000 --- a/Deep_Learning/PyTorch/Tensors/two_layer_net_numpy.ipynb +++ /dev/null @@ -1,100 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "Warm-up: numpy\n", - "--------------\n", - "\n", - "A fully-connected ReLU network with one hidden layer and no biases, trained to\n", - "predict y from x using Euclidean error.\n", - "\n", - "This implementation uses numpy to manually compute the forward pass, loss, and\n", - "backward pass.\n", - "\n", - "A numpy array is a generic n-dimensional array; it does not know anything about\n", - "deep learning or gradients or computational graphs, and is just a way to perform\n", - "generic numeric computations.\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "import numpy as np\n", - "\n", - "# N is batch size; D_in is input dimension;\n", - "# H is hidden dimension; D_out is output dimension.\n", - "N, D_in, H, D_out = 64, 1000, 100, 10\n", - "\n", - "# Create random input and output data\n", - "x = np.random.randn(N, D_in)\n", - "y = np.random.randn(N, D_out)\n", - "\n", - "# Randomly initialize weights\n", - "w1 = np.random.randn(D_in, H)\n", - "w2 = np.random.randn(H, D_out)\n", - "\n", - "learning_rate = 1e-6\n", - "for t in range(500):\n", - " # Forward pass: compute predicted y\n", - " h = x.dot(w1)\n", - " h_relu = np.maximum(h, 0)\n", - " y_pred = h_relu.dot(w2)\n", - "\n", - " # Compute and print loss\n", - " loss = np.square(y_pred - y).sum()\n", - " print(t, loss)\n", - "\n", - " # Backprop to compute gradients of w1 and w2 with respect to loss\n", - " grad_y_pred = 2.0 * (y_pred - y)\n", - " grad_w2 = h_relu.T.dot(grad_y_pred)\n", - " grad_h_relu = grad_y_pred.dot(w2.T)\n", - " grad_h = grad_h_relu.copy()\n", - " grad_h[h < 0] = 0\n", - " grad_w1 = x.T.dot(grad_h)\n", - "\n", - " # Update weights\n", - " w1 -= learning_rate * grad_w1\n", - " w2 -= learning_rate * grad_w2" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.5" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/Deep_Learning/PyTorch/Tensors/two_layer_net_tensor.ipynb b/Deep_Learning/PyTorch/Tensors/two_layer_net_tensor.ipynb deleted file mode 100644 index a3d8bf31d..000000000 --- a/Deep_Learning/PyTorch/Tensors/two_layer_net_tensor.ipynb +++ /dev/null @@ -1,627 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "PyTorch: Tensors\n", - "----------------\n", - "\n", - "A fully-connected ReLU network with one hidden layer and no biases, trained to\n", - "predict y from x by minimizing squared Euclidean distance.\n", - "\n", - "This implementation uses PyTorch tensors to manually compute the forward pass,\n", - "loss, and backward pass.\n", - "\n", - "A PyTorch Tensor is basically the same as a numpy array: it does not know\n", - "anything about deep learning or computational graphs or gradients, and is just\n", - "a generic n-dimensional array to be used for arbitrary numeric computation.\n", - "\n", - "The biggest difference between a numpy array and a PyTorch Tensor is that\n", - "a PyTorch Tensor can run on either CPU or GPU. To run operations on the GPU,\n", - "just cast the Tensor to a cuda datatype.\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0 46134944.0\n", - "1 57460364.0\n", - "2 79499288.0\n", - "3 82400768.0\n", - "4 47455252.0\n", - "5 13316391.0\n", - "6 3532003.75\n", - "7 1936640.75\n", - "8 1486554.5\n", - "9 1215765.875\n", - "10 1011070.3125\n", - "11 849523.6875\n", - "12 719553.8125\n", - "13 613963.0625\n", - "14 527411.8125\n", - "15 455556.375\n", - "16 395657.5625\n", - "17 345363.15625\n", - "18 302815.84375\n", - "19 266607.65625\n", - "20 235631.53125\n", - "21 208977.6875\n", - "22 185929.671875\n", - "23 165893.203125\n", - "24 148412.578125\n", - "25 133116.703125\n", - "26 119680.4453125\n", - "27 107837.8828125\n", - "28 97372.5546875\n", - "29 88092.96875\n", - "30 79819.5390625\n", - "31 72447.8515625\n", - "32 65863.78125\n", - "33 59967.94921875\n", - "34 54672.49609375\n", - "35 49921.56640625\n", - "36 45643.0625\n", - "37 41780.83984375\n", - "38 38288.11328125\n", - "39 35121.23828125\n", - "40 32251.611328125\n", - "41 29644.619140625\n", - "42 27277.041015625\n", - "43 25120.974609375\n", - "44 23159.6015625\n", - "45 21368.3203125\n", - "46 19731.291015625\n", - "47 18233.240234375\n", - "48 16861.095703125\n", - "49 15603.6728515625\n", - "50 14449.1904296875\n", - "51 13389.19921875\n", - "52 12414.0263671875\n", - "53 11516.07421875\n", - "54 10688.1845703125\n", - "55 9925.158203125\n", - "56 9221.197265625\n", - "57 8571.1162109375\n", - "58 7970.8037109375\n", - "59 7416.07373046875\n", - "60 6902.6640625\n", - "61 6427.44287109375\n", - "62 5987.8720703125\n", - "63 5580.67529296875\n", - "64 5203.4560546875\n", - "65 4853.6484375\n", - "66 4529.04150390625\n", - "67 4227.56201171875\n", - "68 3947.63330078125\n", - "69 3687.520751953125\n", - "70 3445.82763671875\n", - "71 3220.99560546875\n", - "72 3011.706787109375\n", - "73 2816.990478515625\n", - "74 2635.59912109375\n", - "75 2466.58544921875\n", - "76 2309.212646484375\n", - "77 2162.4580078125\n", - "78 2025.578125\n", - "79 1897.8492431640625\n", - "80 1778.64794921875\n", - "81 1667.38525390625\n", - "82 1563.5120849609375\n", - "83 1466.5469970703125\n", - "84 1375.83251953125\n", - "85 1291.0194091796875\n", - "86 1211.724853515625\n", - "87 1137.581298828125\n", - "88 1068.252685546875\n", - "89 1003.3689575195312\n", - "90 942.6181030273438\n", - "91 885.7120971679688\n", - "92 832.4153442382812\n", - "93 782.4793701171875\n", - "94 735.7323608398438\n", - "95 691.920166015625\n", - "96 650.802001953125\n", - "97 612.2900390625\n", - "98 576.1707763671875\n", - "99 542.2844848632812\n", - "100 510.5238952636719\n", - "101 480.6846618652344\n", - "102 452.66595458984375\n", - "103 426.3569030761719\n", - "104 401.6367492675781\n", - "105 378.438720703125\n", - "106 356.63726806640625\n", - "107 336.1439514160156\n", - "108 316.876953125\n", - "109 298.7604675292969\n", - "110 281.7230529785156\n", - "111 265.7139587402344\n", - "112 250.6428985595703\n", - "113 236.46115112304688\n", - "114 223.1178436279297\n", - "115 210.55682373046875\n", - "116 198.7382049560547\n", - "117 187.60995483398438\n", - "118 177.12210083007812\n", - "119 167.24468994140625\n", - "120 157.940185546875\n", - "121 149.17880249023438\n", - "122 140.92626953125\n", - "123 133.137939453125\n", - "124 125.79610443115234\n", - "125 118.87541961669922\n", - "126 112.35067749023438\n", - "127 106.20299530029297\n", - "128 100.40233612060547\n", - "129 94.92619323730469\n", - "130 89.75846862792969\n", - "131 84.88232421875\n", - "132 80.28369140625\n", - "133 75.94284057617188\n", - "134 71.84441375732422\n", - "135 67.9716796875\n", - "136 64.3161849975586\n", - "137 60.86455535888672\n", - "138 57.605247497558594\n", - "139 54.52400207519531\n", - "140 51.61252212524414\n", - "141 48.862186431884766\n", - "142 46.26447677612305\n", - "143 43.8110237121582\n", - "144 41.4887580871582\n", - "145 39.29368591308594\n", - "146 37.218177795410156\n", - "147 35.25564193725586\n", - "148 33.4016227722168\n", - "149 31.64725112915039\n", - "150 29.986482620239258\n", - "151 28.415699005126953\n", - "152 26.929861068725586\n", - "153 25.52570343017578\n", - "154 24.195369720458984\n", - "155 22.935338973999023\n", - "156 21.743589401245117\n", - "157 20.615650177001953\n", - "158 19.548967361450195\n", - "159 18.537443161010742\n", - "160 17.579673767089844\n", - "161 16.672386169433594\n", - "162 15.813304901123047\n", - "163 15.001274108886719\n", - "164 14.231243133544922\n", - "165 13.500845909118652\n", - "166 12.810018539428711\n", - "167 12.154451370239258\n", - "168 11.53420352935791\n", - "169 10.94616985321045\n", - "170 10.388667106628418\n", - "171 9.859720230102539\n", - "172 9.358848571777344\n", - "173 8.884313583374023\n", - "174 8.43433952331543\n", - "175 8.007356643676758\n", - "176 7.602439880371094\n", - "177 7.218470573425293\n", - "178 6.855043888092041\n", - "179 6.509774208068848\n", - "180 6.1822099685668945\n", - "181 5.87138032913208\n", - "182 5.577250003814697\n", - "183 5.297930717468262\n", - "184 5.0324296951293945\n", - "185 4.780702590942383\n", - "186 4.541521072387695\n", - "187 4.315029144287109\n", - "188 4.100238800048828\n", - "189 3.8959176540374756\n", - "190 3.702241897583008\n", - "191 3.5181379318237305\n", - "192 3.3435733318328857\n", - "193 3.177859306335449\n", - "194 3.020261526107788\n", - "195 2.8707683086395264\n", - "196 2.7290351390838623\n", - "197 2.5941085815429688\n", - "198 2.4662528038024902\n", - "199 2.344609022140503\n", - "200 2.229156970977783\n", - "201 2.119307279586792\n", - "202 2.0152149200439453\n", - "203 1.9163856506347656\n", - "204 1.8222546577453613\n", - "205 1.7330255508422852\n", - "206 1.6480449438095093\n", - "207 1.5674768686294556\n", - "208 1.4909861087799072\n", - "209 1.4180586338043213\n", - "210 1.348749041557312\n", - "211 1.2829924821853638\n", - "212 1.2204855680465698\n", - "213 1.1611720323562622\n", - "214 1.1046056747436523\n", - "215 1.0507982969284058\n", - "216 0.9997614026069641\n", - "217 0.9514849781990051\n", - "218 0.9052664637565613\n", - "219 0.8612989783287048\n", - "220 0.8196222186088562\n", - "221 0.7800432443618774\n", - "222 0.7422901391983032\n", - "223 0.7064404487609863\n", - "224 0.6723177433013916\n", - "225 0.6398481726646423\n", - "226 0.6090221405029297\n", - "227 0.5797426104545593\n", - "228 0.5518299341201782\n", - "229 0.5252854824066162\n", - "230 0.499989777803421\n", - "231 0.47603800892829895\n", - "232 0.45322272181510925\n", - "233 0.43146374821662903\n", - "234 0.41076090931892395\n", - "235 0.3911289572715759\n", - "236 0.3724077641963959\n", - "237 0.35459721088409424\n", - "238 0.33761656284332275\n", - "239 0.3214614987373352\n", - "240 0.30613192915916443\n", - "241 0.2915632426738739\n", - "242 0.277641236782074\n", - "243 0.26436522603034973\n", - "244 0.25177717208862305\n", - "245 0.23983660340309143\n", - "246 0.22839613258838654\n", - "247 0.21757668256759644\n", - "248 0.20718342065811157\n", - "249 0.1973351389169693\n", - "250 0.18798182904720306\n", - "251 0.17907781898975372\n", - "252 0.17062640190124512\n", - "253 0.1625092476606369\n", - "254 0.1548222154378891\n", - "255 0.147463858127594\n", - "256 0.14048545062541962\n", - "257 0.13384349644184113\n", - "258 0.12749668955802917\n", - "259 0.12151357531547546\n", - "260 0.11574731022119522\n", - "261 0.11029430478811264\n", - "262 0.10508234053850174\n", - "263 0.10013126581907272\n", - "264 0.09543919563293457\n", - "265 0.0909620001912117\n", - "266 0.08666064590215683\n", - "267 0.08257129788398743\n", - "268 0.07868614047765732\n", - "269 0.07501170784235\n", - "270 0.07146603614091873\n", - "271 0.06812036782503128\n", - "272 0.06491313129663467\n", - "273 0.06188228726387024\n", - "274 0.05896516889333725\n", - "275 0.05622951313853264\n", - "276 0.053561609238386154\n", - "277 0.051065851002931595\n", - "278 0.04869140312075615\n", - "279 0.0464194230735302\n", - "280 0.04425720497965813\n", - "281 0.04216751456260681\n", - "282 0.04021061956882477\n", - "283 0.03833138197660446\n", - "284 0.036541495472192764\n", - "285 0.034847963601350784\n", - "286 0.03323427587747574\n", - "287 0.03168566897511482\n", - "288 0.03021395578980446\n", - "289 0.028797069564461708\n", - "290 0.027452098205685616\n", - "291 0.026195108890533447\n", - "292 0.02496657893061638\n", - "293 0.023832404986023903\n", - "294 0.022726567462086678\n", - "295 0.021679185330867767\n", - "296 0.020669274032115936\n", - "297 0.019713766872882843\n", - "298 0.01880607195198536\n", - "299 0.01794842816889286\n", - "300 0.017114339396357536\n", - "301 0.016326861456036568\n", - "302 0.015581785701215267\n", - "303 0.01486970391124487\n", - "304 0.01418535690754652\n", - "305 0.013537462800741196\n", - "306 0.012925979681313038\n", - "307 0.012335522100329399\n", - "308 0.011769683100283146\n", - "309 0.011228851974010468\n", - "310 0.01072690449655056\n", - "311 0.010238624177873135\n", - "312 0.00977693684399128\n", - "313 0.009335578419268131\n", - "314 0.008913042955100536\n", - "315 0.008518161252140999\n", - "316 0.008132176473736763\n", - "317 0.00777484942227602\n", - "318 0.007426148746162653\n", - "319 0.007105142809450626\n", - "320 0.006788628175854683\n", - "321 0.006492163985967636\n", - "322 0.006205549463629723\n", - "323 0.00593147287145257\n", - "324 0.005676237866282463\n", - "325 0.005423582158982754\n", - "326 0.005192779004573822\n", - "327 0.0049638510681688786\n", - "328 0.00474355136975646\n", - "329 0.004543071612715721\n", - "330 0.004349815659224987\n", - "331 0.004159421194344759\n", - "332 0.003987166564911604\n", - "333 0.0038169927429407835\n", - "334 0.0036512187216430902\n", - "335 0.003499199403449893\n", - "336 0.0033549892250448465\n", - "337 0.0032119620591402054\n", - "338 0.003082623239606619\n", - "339 0.002952797571197152\n", - "340 0.002833811566233635\n", - "341 0.0027178602758795023\n", - "342 0.0026050135493278503\n", - "343 0.0024982134345918894\n", - "344 0.0023991717025637627\n", - "345 0.002299664542078972\n", - "346 0.00220795557834208\n", - "347 0.0021220091730356216\n", - "348 0.0020380967762321234\n", - "349 0.001955779967829585\n", - "350 0.0018815030343830585\n", - "351 0.001811097958125174\n", - "352 0.001740089152008295\n", - "353 0.0016736893448978662\n", - "354 0.001613614964298904\n", - "355 0.001551387133076787\n", - "356 0.0014938311651349068\n", - "357 0.0014382549561560154\n", - "358 0.0013827761868014932\n", - "359 0.0013344032922759652\n", - "360 0.0012847743928432465\n", - "361 0.0012382962740957737\n", - "362 0.0011942567070946097\n", - "363 0.001150230411440134\n", - "364 0.0011109525803476572\n", - "365 0.0010717019904404879\n", - "366 0.0010357858845964074\n", - "367 0.0010005872463807464\n", - "368 0.0009663058444857597\n", - "369 0.000931935734115541\n", - "370 0.000899412261787802\n", - "371 0.0008693799027241766\n", - "372 0.0008413456962443888\n", - "373 0.000813318241853267\n", - "374 0.0007865186198614538\n", - "375 0.0007611456094309688\n", - "376 0.0007376243593171239\n", - "377 0.00071304029552266\n", - "378 0.000690392917022109\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "379 0.0006691119051538408\n", - "380 0.0006492964457720518\n", - "381 0.0006278865039348602\n", - "382 0.0006077482248656452\n", - "383 0.0005886572762392461\n", - "384 0.0005716768791899085\n", - "385 0.0005563989980146289\n", - "386 0.0005396514316089451\n", - "387 0.0005232192925177515\n", - "388 0.0005074329674243927\n", - "389 0.0004926634137518704\n", - "390 0.0004800721362698823\n", - "391 0.00046602587099187076\n", - "392 0.0004530635487753898\n", - "393 0.0004402756749186665\n", - "394 0.0004286105395294726\n", - "395 0.00041670826612971723\n", - "396 0.00040480101597495377\n", - "397 0.00039359580841846764\n", - "398 0.000383266102289781\n", - "399 0.00037291436456143856\n", - "400 0.0003637511981651187\n", - "401 0.00035427979310043156\n", - "402 0.000344447122188285\n", - "403 0.000334419310092926\n", - "404 0.0003267258871346712\n", - "405 0.0003183324879501015\n", - "406 0.00030969135696068406\n", - "407 0.000302841974189505\n", - "408 0.0002950388006865978\n", - "409 0.0002879663370549679\n", - "410 0.00028056485462002456\n", - "411 0.00027359212981536984\n", - "412 0.0002662852348294109\n", - "413 0.0002599635918159038\n", - "414 0.000253837468335405\n", - "415 0.000247338495682925\n", - "416 0.00024181186745408922\n", - "417 0.00023581297136843204\n", - "418 0.00023066106950864196\n", - "419 0.00022549688583239913\n", - "420 0.0002207355573773384\n", - "421 0.00021616918093059212\n", - "422 0.00021116997231729329\n", - "423 0.00020621625299099833\n", - "424 0.0002011843753280118\n", - "425 0.00019694559159688652\n", - "426 0.0001925438700709492\n", - "427 0.00018810205801855773\n", - "428 0.0001845043443609029\n", - "429 0.00018080048903357238\n", - "430 0.00017635773110669106\n", - "431 0.00017272062541451305\n", - "432 0.0001691813813522458\n", - "433 0.00016605324344709516\n", - "434 0.00016305025201290846\n", - "435 0.00015994060959201306\n", - "436 0.00015631361748091877\n", - "437 0.00015298204380087554\n", - "438 0.00014936871593818069\n", - "439 0.0001464094821130857\n", - "440 0.00014378750347532332\n", - "441 0.00014101873966865242\n", - "442 0.00013779447181150317\n", - "443 0.000135313966893591\n", - "444 0.00013289017078932375\n", - "445 0.000129999389173463\n", - "446 0.00012764916755259037\n", - "447 0.0001249919005203992\n", - "448 0.00012262021482456475\n", - "449 0.0001204937943839468\n", - "450 0.0001180861218017526\n", - "451 0.00011590029316721484\n", - "452 0.00011431611346779391\n", - "453 0.00011241528409300372\n", - "454 0.00011033231567125767\n", - "455 0.00010816961003001779\n", - "456 0.00010613662743708119\n", - "457 0.00010434586874907836\n", - "458 0.00010239905532216653\n", - "459 0.00010051558638224378\n", - "460 9.842441068030894e-05\n", - "461 9.705071715870872e-05\n", - "462 9.563216735841706e-05\n", - "463 9.379690163768828e-05\n", - "464 9.198878979077563e-05\n", - "465 9.050449443748221e-05\n", - "466 8.896682993508875e-05\n", - "467 8.754420559853315e-05\n", - "468 8.629292278783396e-05\n", - "469 8.489016181556508e-05\n", - "470 8.325700764544308e-05\n", - "471 8.172524394467473e-05\n", - "472 8.044155401876196e-05\n", - "473 7.961880328366533e-05\n", - "474 7.846155494917184e-05\n", - "475 7.69493926782161e-05\n", - "476 7.58289170335047e-05\n", - "477 7.460139022441581e-05\n", - "478 7.347288192249835e-05\n", - "479 7.209775503724813e-05\n", - "480 7.156695210142061e-05\n", - "481 7.060146890580654e-05\n", - "482 6.949321686988696e-05\n", - "483 6.849101919215173e-05\n", - "484 6.735910574207082e-05\n", - "485 6.630790448980406e-05\n", - "486 6.529498932650313e-05\n", - "487 6.436433613998815e-05\n", - "488 6.352978380164132e-05\n", - "489 6.294357444858178e-05\n", - "490 6.19951169937849e-05\n", - "491 6.114062125561759e-05\n", - "492 6.026210030540824e-05\n", - "493 5.922796844970435e-05\n", - "494 5.842299651703797e-05\n", - "495 5.7755412854021415e-05\n", - "496 5.696465814253315e-05\n", - "497 5.6217606470454484e-05\n", - "498 5.556367977987975e-05\n", - "499 5.491319461725652e-05\n" - ] - } - ], - "source": [ - "import torch\n", - "\n", - "\n", - "dtype = torch.float\n", - "device = torch.device(\"cpu\")\n", - "# dtype = torch.device(\"cuda:0\") # Uncomment this to run on GPU\n", - "\n", - "# N is batch size; D_in is input dimension;\n", - "# H is hidden dimension; D_out is output dimension.\n", - "N, D_in, H, D_out = 64, 1000, 100, 10\n", - "\n", - "# Create random input and output data\n", - "x = torch.randn(N, D_in, device=device, dtype=dtype)\n", - "y = torch.randn(N, D_out, device=device, dtype=dtype)\n", - "\n", - "# Randomly initialize weights\n", - "w1 = torch.randn(D_in, H, device=device, dtype=dtype)\n", - "w2 = torch.randn(H, D_out, device=device, dtype=dtype)\n", - "\n", - "learning_rate = 1e-6\n", - "for t in range(500):\n", - " # Forward pass: compute predicted y\n", - " h = x.mm(w1)\n", - " h_relu = h.clamp(min=0)\n", - " y_pred = h_relu.mm(w2)\n", - "\n", - " # Compute and print loss\n", - " loss = (y_pred - y).pow(2).sum().item()\n", - " print(t, loss)\n", - "\n", - " # Backprop to compute gradients of w1 and w2 with respect to loss\n", - " grad_y_pred = 2.0 * (y_pred - y)\n", - " grad_w2 = h_relu.t().mm(grad_y_pred)\n", - " grad_h_relu = grad_y_pred.mm(w2.t())\n", - " grad_h = grad_h_relu.clone()\n", - " grad_h[h < 0] = 0\n", - " grad_w1 = x.t().mm(grad_h)\n", - "\n", - " # Update weights using gradient descent\n", - " w1 -= learning_rate * grad_w1\n", - " w2 -= learning_rate * grad_w2" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.5" - } - }, - "nbformat": 4, - "nbformat_minor": 1 -} diff --git a/Deep_Learning/Tensorflow/Eager_execution.ipynb b/Deep_Learning/Tensorflow/Eager_execution.ipynb deleted file mode 100644 index cdec853c2..000000000 --- a/Deep_Learning/Tensorflow/Eager_execution.ipynb +++ /dev/null @@ -1,1163 +0,0 @@ -{ - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "name": "Eager Execution: Dev Summit 2018", - "version": "0.3.2", - "views": {}, - "default_view": {}, - "provenance": [], - "collapsed_sections": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - } - }, - "cells": [ - { - "metadata": { - "id": "p-esxQ2Ah4ab", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "##### Copyright 2018 The TensorFlow Authors.\n", - "\n", - "Licensed under the Apache License, Version 2.0 (the \"License\");" - ] - }, - { - "metadata": { - "id": "Xqp-XvX5h7Ff", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", - "# you may not use this file except in compliance with the License.\n", - "# You may obtain a copy of the License at\n", - "#\n", - "# https://www.apache.org/licenses/LICENSE-2.0\n", - "#\n", - "# Unless required by applicable law or agreed to in writing, software\n", - "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", - "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", - "# See the License for the specific language governing permissions and\n", - "# limitations under the License." - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "g7nGs4mzVUHP", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "# Eager execution\n", - "\n", - "Note: you can run **[this notebook, live in Google Colab](https://colab.research.google.com/github/tensorflow/models/blob/master/samples/outreach/demos/eager_execution.ipynb)** with zero setup. \n", - "\n", - "**TensorFlow Dev Summit, 2018.**\n", - "\n", - "This interactive notebook demonstrates **eager execution**, TensorFlow's imperative, NumPy-like front-end for machine learning.\n", - "\n", - "> ![alt text](https://lh3.googleusercontent.com/QOvy0clmg7siaVKzwmSPAjicWWNQ0OeyaB16plDjSJMf35WD3vLjF6mz4CGrhSHw60HnlZPJjkyDCBzw5XOI0oBGSewyYw=s688)\n", - "\n", - "**Table of Contents.**\n", - "1. _Enabling eager execution!_\n", - "2. _A NumPy-like library for numerical computation and machine learning. Case study: Fitting a huber regression_.\n", - "3. _Neural networks. Case study: Training a multi-layer RNN._\n", - "4. _Exercises: Batching; debugging._\n", - "5. _Further reading_" - ] - }, - { - "metadata": { - "id": "ZVKfj5ttVkqz", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "# 1. Enabling eager execution!\n", - "\n", - "A single function call is all you need to enable eager execution: `tf.enable_eager_execution()`. You should invoke this function before calling into any other TensorFlow APIs --- the simplest way to satisfy this requirement is to make `tf.enable_eager_execution()` the first line of your `main` function.\n" - ] - }, - { - "metadata": { - "id": "C783D4QKVlK1", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "!pip install -q -U tf-nightly\n", - "\n", - "import tensorflow as tf\n", - "\n", - "tf.enable_eager_execution()" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "trrHQBM1VnD0", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "# 2. A NumPy-like library for numerical computation and machine learning\n", - "Enabling eager execution transforms TensorFlow into an **imperative** library for numerical computation, automatic differentiation, and machine learning. When executing eagerly, _TensorFlow no longer behaves like a dataflow graph engine_: Tensors are backed by NumPy arrays (goodbye, placeholders!), and TensorFlow operations execute *immediately* via Python (goodbye, sessions!)." - ] - }, - { - "metadata": { - "id": "MLUSuZuccgmF", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Numpy-like usage\n", - "\n", - "Tensors are backed by numpy arrays, which are accessible via their `.numpy()`\n", - "method." - ] - }, - { - "metadata": { - "id": "lzrktlC0cPi1", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "A = tf.constant([[2.0, 0.0], [0.0, 3.0]])" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "F5oDeGhYcX6c", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "import numpy as np\n", - "\n", - "print(\"Tensors are backed by NumPy arrays, which are accessible through their \"\n", - " \"`.numpy()` method:\\n\", A)\n", - "assert(type(A.numpy()) == np.ndarray)\n", - "print(\"\\nOperations (like `tf.matmul(A, A)`) execute \"\n", - " \"immediately (no more Sessions!):\\n\", tf.matmul(A, A))" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "SRCTcyCocvBq", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "Tensors behave similarly to NumPy arrays, but they don't behave exactly the\n", - "same. \n", - "\n", - "For example, the equals operator on Tensors compares objects. Use\n", - "`tf.equal` to compare values." - ] - }, - { - "metadata": { - "id": "OgBX6BJdcZ8w", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "print(\"\\nTensors behave like NumPy arrays: you can iterate over them and \"\n", - " \"supply them as inputs to most functions that expect NumPy arrays:\")\n", - "for i, row in enumerate(A):\n", - " for j, entry in enumerate(row):\n", - " print(\"A[%d, %d]^2 == %d\" % (i, j, np.square(entry)))" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "Q-o-XayRdAEi", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Variables and Gradients\n", - "\n", - "Create variables with `tf.contrib.eager.Variable`, and use `tf.GradientTape`\n", - "to compute gradients with respect to them." - ] - }, - { - "metadata": { - "id": "PGAqOzqzccwd", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "import tensorflow.contrib.eager as tfe\n", - "w = tfe.Variable(3.0)\n", - "with tf.GradientTape() as tape:\n", - " loss = w ** 2\n", - "dw, = tape.gradient(loss, [w])\n", - "print(\"\\nYou can use `tf.GradientTape` to compute the gradient of a \"\n", - " \"computation with respect to a list of `tf.contrib.eager.Variable`s;\\n\"\n", - " \"for example, `tape.gradient(loss, [w])`, where `loss` = w ** 2 and \"\n", - " \"`w` == 3.0, yields`\", dw,\"`.\")" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "gZFXrVTKdFnl", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### GPU usage\n", - "Eager execution lets you offload computation to hardware accelerators like\n", - "GPUs, if you have any available." - ] - }, - { - "metadata": { - "id": "ER-Hsk3RVmX9", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - }, - "cellView": "both" - }, - "cell_type": "code", - "source": [ - "if tf.test.is_gpu_available():\n", - " with tf.device(tf.test.gpu_device_name()):\n", - " B = tf.constant([[2.0, 0.0], [0.0, 3.0]])\n", - " print(tf.matmul(B, B))" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "JQ8kQT99VqDk", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "## Fitting a Huber regression\n", - "\n", - "If you come from a scientific or numerical computing background, eager execution should feel natural to you. Not only does it stand on its own as an accelerator-compatible library for numerical computation, it also interoperates with popular Python packages like NumPy and Matplotlib. To demonstrate this fact, in this section, we fit and evaluate a regression using a [Huber regression](https://en.wikipedia.org/wiki/Huber_loss), writing our code in a NumPy-like way and making use of Python control flow." - ] - }, - { - "metadata": { - "id": "6dXt0WfBK9-7", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Data generation\n", - "\n", - "Our dataset for this example has many outliers — least-squares would be a poor choice." - ] - }, - { - "metadata": { - "id": "Il1zLdgjVslU", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - }, - "cellView": "code" - }, - "cell_type": "code", - "source": [ - "import matplotlib.pyplot as plt\n", - "\n", - "def gen_regression_data(num_examples=1000, p=0.2):\n", - " X = tf.random_uniform(shape=(num_examples,), maxval=50)\n", - " w_star = tf.random_uniform(shape=(), maxval=10)\n", - " b_star = tf.random_uniform(shape=(), maxval=10)\n", - " noise = tf.random_normal(shape=(num_examples,), mean=0.0, stddev=10.0)\n", - " # With probability 1 - p, y := y * -1.\n", - " sign = 2 * np.random.binomial(1, 1 - p, size=(num_examples,)) - 1\n", - " # You can freely mix Tensors and NumPy arrays in your computations:\n", - " # `sign` is a NumPy array, but the other symbols below are Tensors.\n", - " Y = sign * (w_star * X + b_star + noise) \n", - " return X, Y\n", - "\n", - "X, Y = gen_regression_data()\n", - "plt.plot(X, Y, \"go\") # You can plot Tensors!\n", - "plt.title(\"Observed data\")\n", - "plt.show()" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "sYumjOrdMRFM", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Huber loss\n", - "The Huber loss function is piecewise function that is quadratic for small inputs and linear otherwise; for that reason, using a Huber loss gives considerably less weight to outliers than least-squares does. When eager execution is enabled, we can implement the Huber function in the natural way, using **Python control flow**." - ] - }, - { - "metadata": { - "id": "anflUCeaVtK8", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "def huber_loss(y, y_hat, m=1.0):\n", - " # Enabling eager execution lets you use Python control flow.\n", - " delta = tf.abs(y - y_hat)\n", - " return delta ** 2 if delta <= m else m * (2 * delta - m)" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "0_OALYGwM7ma", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### A simple class for regressions\n", - "\n", - "The next cell encapsulates a linear regression model in a Python class and defines a\n", - "function that fits the model using a stochastic optimizer." - ] - }, - { - "metadata": { - "id": "-90due2RVuDF", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - }, - "cellView": "code" - }, - "cell_type": "code", - "source": [ - "import time\n", - "\n", - "from google.colab import widgets\n", - "import tensorflow.contrib.eager as tfe # Needed to create tfe.Variable objects.\n", - "\n", - "\n", - "class Regression(object):\n", - " def __init__(self, loss_fn):\n", - " super(Regression, self).__init__()\n", - " self.w = tfe.Variable(0.0)\n", - " self.b = tfe.Variable(0.0)\n", - " self.variables = [self.w, self.b]\n", - " self.loss_fn = loss_fn\n", - " \n", - " def predict(self, x):\n", - " return x * self.w + self.b\n", - " \n", - "def regress(model, optimizer, dataset, epochs=5, log_every=1, num_examples=1000):\n", - " plot = log_every is not None\n", - " if plot:\n", - " # Colab provides several widgets for interactive visualization.\n", - " tb = widgets.TabBar([str(i) for i in range(epochs) if i % log_every == 0])\n", - " X, Y = dataset.batch(num_examples).make_one_shot_iterator().get_next()\n", - " X = tf.reshape(X, (num_examples,))\n", - " Y = tf.reshape(Y, (num_examples,))\n", - " \n", - " for epoch in range(epochs):\n", - " iterator = dataset.make_one_shot_iterator()\n", - " epoch_loss = 0.0\n", - " start = time.time()\n", - " for x_i, y_i in iterator:\n", - " batch_loss_fn = lambda: model.loss_fn(y_i, model.predict(x_i)) \n", - " optimizer.minimize(batch_loss_fn, var_list=model.variables)\n", - " epoch_loss += batch_loss_fn()\n", - " duration = time.time() - start\n", - " if plot and epoch % log_every == 0:\n", - " with tb.output_to(str(epoch)):\n", - " print(\"Epoch %d took %0.2f seconds, resulting in a loss of %0.4f.\" % (\n", - " epoch, duration, epoch_loss))\n", - " plt.plot(X, Y, \"go\", label=\"data\")\n", - " plt.plot(X, model.predict(X), \"b\", label=\"regression\")\n", - " plt.legend()" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "Z8WdS6LQNc5K", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "Run the following cell to fit the model! Note that enabling eager execution makes it\n", - "easy to visualize your model while training it, using familiar tools like Matplotlib." - ] - }, - { - "metadata": { - "id": "_qRc30945Z3p", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "huber_regression = Regression(huber_loss)\n", - "dataset = tf.data.Dataset.from_tensor_slices((X, Y))\n", - "regress(huber_regression,\n", - " optimizer=tf.train.GradientDescentOptimizer(learning_rate=0.0001),\n", - " dataset=dataset)" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "5icvQghlN8Fd", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "## Debugging and profiling" - ] - }, - { - "metadata": { - "id": "55qmgvjgQocz", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Enabling eager execution lets you debug your code on-the-fly; use `pdb` and print statements to your heart's content.\n", - "\n", - "Check out exercise 2 towards the bottom of this notebook for a hands-on look at how eager simplifies model debugging." - ] - }, - { - "metadata": { - "id": "DNHJpCyNVwA9", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "import pdb\n", - "\n", - "def buggy_loss(y, y_hat):\n", - " pdb.set_trace()\n", - " huber_loss(y, y_hat)\n", - " \n", - "print(\"Type 'exit' to stop the debugger, or 's' to step into `huber_loss` and \"\n", - " \"'n' to step through it.\")\n", - "try:\n", - " buggy_loss(1.0, 2.0)\n", - "except:\n", - " pass" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "mvI3ljk-vJ_h", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Leverage the Python profiler to dig into the relative costs of training your model.\n", - "\n", - "If you run the below cell, you'll see that most of the time is spent computing gradients and binary operations, which is sensible considering our loss function." - ] - }, - { - "metadata": { - "id": "ZUlywNxYsapf", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "import cProfile\n", - "import pstats\n", - "\n", - "huber_regression = Regression(huber_loss)\n", - "cProfile.run(\n", - " \"regress(model=huber_regression, \"\n", - " \"optimizer=tf.train.GradientDescentOptimizer(learning_rate=0.001), \"\n", - " \"dataset=dataset, log_every=None)\", \"prof\")\n", - "pstats.Stats(\"prof\").strip_dirs().sort_stats(\"cumulative\").print_stats(10)\n", - "print(\"Most of the time is spent during backpropagation and binary operations.\")" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "5AeTwwPobkaJ", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "# 3. Neural networks\n", - "\n", - "While eager execution can certainly be used as a library for numerical computation, it shines as a library for deep learning: TensorFlow provides a suite of tools for deep learning research and development, most of which are compatible with eager execution. In this section, we put some of these tools to use to build _RNNColorbot_, an RNN that takes as input names of colors and predicts their corresponding RGB tuples. " - ] - }, - { - "metadata": { - "id": "6IcmEQ-jpTMO", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "## Constructing a data pipeline\n", - "\n", - "**[`tf.data`](https://www.tensorflow.org/api_guides/python/reading_data#_tf_data_API) is TensorFlow's canonical API for constructing input pipelines.** `tf.data` lets you easily construct multi-stage pipelines that supply data to your networks during training and inference. The following cells defines methods that download and format the data needed for RNNColorbot; the details aren't important (read them in the privacy of your own home if you so wish), but make sure to run the cells before proceeding." - ] - }, - { - "metadata": { - "id": "dcUC3Ma8bjgY", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - }, - "cellView": "code" - }, - "cell_type": "code", - "source": [ - "import os\n", - "import six\n", - "from six.moves import urllib\n", - "\n", - "\n", - "def parse(line):\n", - " \"\"\"Parse a line from the colors dataset.\"\"\"\n", - " # `items` is a list [color_name, r, g, b].\n", - " items = tf.string_split([line], \",\").values\n", - " rgb = tf.string_to_number(items[1:], out_type=tf.float32) / 255.\n", - " color_name = items[0]\n", - " chars = tf.one_hot(tf.decode_raw(color_name, tf.uint8), depth=256)\n", - " length = tf.cast(tf.shape(chars)[0], dtype=tf.int64)\n", - " return rgb, chars, length\n", - "\n", - "def load_dataset(data_dir, url, batch_size):\n", - " \"\"\"Loads the colors data at path into a PaddedDataset.\"\"\"\n", - " path = tf.keras.utils.get_file(os.path.basename(url), url, cache_dir=data_dir)\n", - " dataset = tf.data.TextLineDataset(path).skip(1).map(parse).shuffle(\n", - " buffer_size=10000).padded_batch(batch_size,\n", - " padded_shapes=([None], [None, None], []))\n", - " return dataset, path" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "KBPJAQPUlh5M", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "train_url = \"https://raw.githubusercontent.com/random-forests/tensorflow-workshop/master/extras/colorbot/data/train.csv\"\n", - "test_url = \"https://raw.githubusercontent.com/random-forests/tensorflow-workshop/master/extras/colorbot/data/test.csv\"\n", - "data_dir = \"/tmp/rnn/data\"\n", - "\n", - "train_data, train_path = load_dataset(data_dir, train_url, batch_size=64)\n", - "eval_data, _ = load_dataset(data_dir, test_url, batch_size=64)" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "w9ftJ4LUoVYo", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "import pandas\n", - "pandas.read_csv(train_path).head(10)" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "ynzm5mfnlmS8", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "colors, one_hot_chars, lengths = tfe.Iterator(train_data).next()\n", - "colors[:10].numpy()" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "S39jq-2QoA5e", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "## Defining and training a neural network" - ] - }, - { - "metadata": { - "id": "9fycJOqm8vkt", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "TensorFlow packages several APIs for creating neural networks in a modular fashion. **The canonical way to define neural networks in TensorFlow is to encapsulate your model in a class that inherits from `tf.keras.Model`**. You should think of `tf.keras.Model` as a container of **[object-oriented layers](https://www.tensorflow.org/api_docs/python/tf/layers)**, TensorFlow's building blocks for constructing neural networks (*e.g.*, `tf.layers.Dense`, `tf.layers.Conv2D`). Every `Layer` object that is set as an attribute of a `Model` is automatically tracked by the latter, letting you access `Layer`-contained variables by invoking `Model`'s `.variables()` method. Most important, **inheriting from `tf.keras.Model` makes it easy to checkpoint your model and to subsequently restore it** --- more on that later. \n", - "\n", - "The following cell exemplifies our high-level neural network APIs. Note that `RNNColorbot` encapsulates only the model definition and prediction generation logic. The loss, training, and evaluation functions exist outside the class definition: conceptually, the model doesn't need know how to train and benchmark itself." - ] - }, - { - "metadata": { - "id": "NlKcdvT9leQ2", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - }, - "cellView": "code" - }, - "cell_type": "code", - "source": [ - "class RNNColorbot(tf.keras.Model):\n", - " \"\"\"Multi-layer RNN that predicts RGB tuples given color names.\n", - " \"\"\"\n", - "\n", - " def __init__(self):\n", - " super(RNNColorbot, self).__init__()\n", - " self.keep_prob = 0.5\n", - " self.lower_cell = tf.contrib.rnn.LSTMBlockCell(256)\n", - " self.upper_cell = tf.contrib.rnn.LSTMBlockCell(128)\n", - " self.relu = tf.layers.Dense(3, activation=tf.nn.relu, name=\"relu\")\n", - "\n", - " def call(self, inputs, training=False):\n", - " \"\"\"Generates RGB tuples from `inputs`, a tuple (`chars`, `sequence_length`).\n", - " \"\"\"\n", - " (chars, sequence_length) = inputs\n", - " chars = tf.transpose(chars, [1, 0, 2]) # make `chars` time-major\n", - " batch_size = int(chars.shape[1])\n", - " for cell in [self.lower_cell, self.upper_cell]:\n", - " outputs = []\n", - " state = cell.zero_state(batch_size, tf.float32)\n", - " for ch in chars:\n", - " output, state = cell(ch, state)\n", - " outputs.append(output)\n", - " chars = outputs\n", - " if training:\n", - " chars = tf.nn.dropout(chars, self.keep_prob)\n", - " batch_range = [i for i in range(batch_size)]\n", - " indices = tf.stack([sequence_length - 1, batch_range], axis=1)\n", - " hidden_states = tf.gather_nd(chars, indices)\n", - " return self.relu(hidden_states)\n", - "\n", - "\n", - "def loss_fn(labels, predictions):\n", - " return tf.reduce_mean((predictions - labels) ** 2)\n", - "\n", - "def train_one_epoch(model, optimizer, train_data, log_every=10):\n", - " iterator = tfe.Iterator(train_data)\n", - " for batch,(labels, chars, sequence_length) in enumerate(iterator):\n", - " with tf.GradientTape() as tape:\n", - " predictions = model((chars, sequence_length), training=True)\n", - " loss = loss_fn(labels, predictions)\n", - " variables = model.variables\n", - " grad = tape.gradient(loss, variables)\n", - " optimizer.apply_gradients([(g, v) for g, v in zip(grad, variables)])\n", - " if log_every and batch % log_every == 0:\n", - " print(\"train/batch #%d\\tloss: %.6f\" % (batch, loss))\n", - " batch += 1\n", - " \n", - "def test(model, eval_data):\n", - " total_loss = 0.0\n", - " iterator = eval_data.make_one_shot_iterator()\n", - " for labels, chars, sequence_length in tfe.Iterator(eval_data):\n", - " predictions = model((chars, sequence_length), training=False)\n", - " total_loss += loss_fn(labels, predictions)\n", - " print(\"eval/loss: %.6f\\n\" % total_loss)" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "xG1FxnhD62N3", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "The next cell **trains** our `RNNColorbot`, **restoring and saving checkpoints** of the learned variables along the way. Thanks to checkpointing, every run of the below cell will resume training from wherever the previous run left off. For more on checkpointing, take a look at our [user guide](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/eager/python/g3doc/guide.md#checkpointing-trained-variables)." - ] - }, - { - "metadata": { - "id": "W7wLw3nZsqKQ", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "model = RNNColorbot()\n", - "optimizer = tf.train.AdamOptimizer(learning_rate=.01)\n", - "\n", - "# Create a `Checkpoint` for saving and restoring state; the keywords\n", - "# supplied `Checkpoint`'s constructor are the names of the objects to be saved\n", - "# and restored, and their corresponding values are the actual objects. Note\n", - "# that we're saving `optimizer` in addition to `model`, since `AdamOptimizer`\n", - "# maintains state.\n", - "import tensorflow.contrib.eager as tfe\n", - "checkpoint = tfe.Checkpoint(model=model, optimizer=optimizer)\n", - "checkpoint_prefix = \"/tmp/rnn/ckpt\"\n", - "# The next line loads the most recent checkpoint, if any.\n", - "checkpoint.restore(tf.train.latest_checkpoint(\"/tmp/rnn\"))\n", - "for epoch in range(4):\n", - " train_one_epoch(model, optimizer, train_data)\n", - " test(model, eval_data)\n", - " checkpoint.save(checkpoint_prefix)\n", - "print(\"Colorbot is ready to generate colors!\")" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "1HdJk37R1xz9", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Paint me a color, Colorbot!\n", - "\n", - "We can interact with RNNColorbot in a natural way; no need to thread NumPy arrays into placeholders through feed dicts.\n", - "So go ahead and ask RNNColorbot to paint you some colors. If they're not to your liking, re-run the previous cell to resume training from where we left off, and then re-run the next one for updated results." - ] - }, - { - "metadata": { - "id": "LXAYjopasyWr", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "tb = widgets.TabBar([\"RNN Colorbot\"])\n", - "while True:\n", - " with tb.output_to(0):\n", - " try:\n", - " color_name = six.moves.input(\n", - " \"Give me a color name (or press 'enter' to exit): \")\n", - " except (EOFError, KeyboardInterrupt):\n", - " break\n", - " if not color_name:\n", - " break\n", - " _, chars, length = parse(color_name)\n", - " preds, = model((np.expand_dims(chars, 0), np.expand_dims(length, 0)),\n", - " training=False)\n", - " clipped_preds = tuple(min(float(p), 1.0) for p in preds)\n", - " rgb = tuple(int(p * 255) for p in clipped_preds)\n", - " with tb.output_to(0):\n", - " tb.clear_tab()\n", - " print(\"Predicted RGB tuple:\", rgb)\n", - " plt.imshow([[clipped_preds]])\n", - " plt.title(color_name)\n", - " plt.show()" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "aJopbdYiXXQM", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "# 4. Exercises" - ] - }, - { - "metadata": { - "id": "Nt2bZ3SNq0bl", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Exercise 1: Batching\n", - "\n", - "Executing operations eagerly incurs small overheads; these overheads become neglible when amortized over batched operations. In this exercise, we explore the relationship between batching and performance by revisiting our Huber regression example." - ] - }, - { - "metadata": { - "id": "U5NR8vOY-4Xx", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "# Our original implementation of `huber_loss` is not compatible with non-scalar\n", - "# data. Your task is to fix that. For your convenience, the original\n", - "# implementation is reproduced below.\n", - "#\n", - "# def huber_loss(y, y_hat, m=1.0):\n", - "# delta = tf.abs(y - y_hat)\n", - "# return delta ** 2 if delta <= m else m * (2 * delta - m)\n", - "#\n", - "def batched_huber_loss(y, y_hat, m=1.0):\n", - " # TODO: Uncomment out the below code and replace `...` with your solution.\n", - " # Hint: Tensors are immutable.\n", - " # Hint: `tf.where` might be useful.\n", - " delta = tf.abs(y - y_hat)\n", - " # ...\n", - " # ...\n", - " # return ...\n", - " \n", - "regression = Regression(batched_huber_loss)\n", - "\n", - "num_epochs = 4\n", - "batch_sizes = [1, 10, 20, 100, 200, 500, 1000]\n", - "times = []\n", - "\n", - "X, Y = gen_regression_data(num_examples=1000)\n", - "dataset = tf.data.Dataset.from_tensor_slices((X, Y))\n", - "optimizer = tf.train.GradientDescentOptimizer(learning_rate=0.0001)\n", - "for size in batch_sizes:\n", - " batched_dataset = dataset.batch(size)\n", - " start = time.time()\n", - " regress(model=regression, optimizer=optimizer, dataset=batched_dataset,\n", - " epochs=num_epochs, log_every=None)\n", - " end = time.time()\n", - " times.append((end - start) / num_epochs)\n", - " regression.w.assign(0.0)\n", - " regression.b.assign(0.0)\n", - " \n", - "plt.figure()\n", - "plt.plot(batch_sizes, times, \"bo\")\n", - "plt.xlabel(\"batch size\")\n", - "plt.ylabel(\"time (seconds)\")\n", - "plt.semilogx()\n", - "plt.semilogy()\n", - "plt.title(\"Time per Epoch vs. Batch Size\")\n", - "plt.show()" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "-aH9GM4G-c56", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "#### Solution" - ] - }, - { - "metadata": { - "id": "MqqhJplCBxNC", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "def batched_huber_loss(y, y_hat, m=1.0):\n", - " delta = tf.abs(y - y_hat)\n", - " quadratic = delta ** 2\n", - " linear = m * (2 * delta - m)\n", - " return tf.reduce_mean(tf.where(delta <= m, quadratic, linear))\n", - " \n", - "regression = Regression(batched_huber_loss)\n", - "\n", - "num_epochs = 4\n", - "batch_sizes = [2, 10, 20, 100, 200, 500, 1000]\n", - "times = []\n", - "\n", - "X, Y = gen_regression_data(num_examples=1000)\n", - "dataset = tf.data.Dataset.from_tensor_slices((X, Y))\n", - "optimizer = tf.train.GradientDescentOptimizer(learning_rate=0.0001)\n", - "for size in batch_sizes:\n", - " batched_dataset = dataset.batch(size)\n", - " start = time.time()\n", - " regress(model=regression, optimizer=optimizer, dataset=batched_dataset,\n", - " epochs=num_epochs, log_every=None)\n", - " end = time.time()\n", - " times.append((end - start) / num_epochs)\n", - " regression.w.assign(0.0)\n", - " regression.b.assign(0.0)\n", - " \n", - "plt.figure()\n", - "plt.plot(batch_sizes, times, \"bo\")\n", - "plt.xlabel(\"batch size\")\n", - "plt.ylabel(\"time (seconds)\")\n", - "plt.semilogx()\n", - "plt.semilogy()\n", - "plt.title(\"Time per Epoch vs. Batch Size\")\n", - "plt.show()" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "YbL8CZNp-pvH", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "### Exercise 2: Model Debugging\n", - "\n", - "We've heard you loud and clear: TensorFlow programs that construct and execute graphs are difficult to debug. By design, enabling eager execution vastly simplifies the process of debugging TensorFlow programs. Once eager execution is enabled, you can step through your models using `pdb` and bisect them with `print` statements. The best way to understand the extent to which eager execution simplifies debugging is to debug a model yourself. `BuggyModel` below has two bugs lurking in it. Execute the following cell, read the error message, and go hunt some bugs!\n", - "\n", - "*Hint: As is often the case with TensorFlow programs, both bugs are related to the shapes of Tensors.*\n", - "\n", - "*Hint: You might find `tf.layers.flatten` useful.*" - ] - }, - { - "metadata": { - "id": "Aa9HIamW-m3t", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } - }, - "cell_type": "code", - "source": [ - "class BuggyModel(tf.keras.Model):\n", - " def __init__(self):\n", - " super(BuggyModel, self).__init__()\n", - " self._input_shape = [-1, 28, 28, 1]\n", - " self.conv = tf.layers.Conv2D(filters=32, kernel_size=5, padding=\"same\",\n", - " data_format=\"channels_last\")\n", - " self.fc = tf.layers.Dense(10)\n", - " self.max_pool2d = tf.layers.MaxPooling2D(\n", - " (2, 2), (2, 2), padding=\"same\", data_format=\"channels_last\")\n", - " \n", - " def call(self, inputs):\n", - " y = inputs\n", - " y = self.conv(y)\n", - " y = self.max_pool2d(y)\n", - " return self.fc(y)\n", - " \n", - "buggy_model = BuggyModel()\n", - "inputs = tf.random_normal(shape=(100, 28, 28))\n", - "outputs = buggy_model(inputs)\n", - "assert outputs.shape == (100, 10), \"invalid output shape: %s\" % outputs.shape" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "ja8aFOnYsKez", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "#### Solution" - ] - }, - { - "metadata": { - "id": "J7z8JbrRltzV", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - }, - "cellView": "code" - }, - "cell_type": "code", - "source": [ - "class BuggyModel(tf.keras.Model):\n", - " def __init__(self):\n", - " super(BuggyModel, self).__init__()\n", - " self._input_shape = [-1, 28, 28, 1]\n", - " self.conv = tf.layers.Conv2D(filters=32, kernel_size=5, padding=\"same\",\n", - " data_format=\"channels_last\")\n", - " self.fc = tf.layers.Dense(10)\n", - " self.max_pool2d = tf.layers.MaxPooling2D(\n", - " (2, 2), (2, 2), padding=\"same\", data_format=\"channels_last\")\n", - " \n", - " def call(self, inputs):\n", - " y = tf.reshape(inputs, self._input_shape)\n", - " y = self.conv(y)\n", - " y = self.max_pool2d(y)\n", - " y = tf.layers.flatten(y)\n", - " return self.fc(y)\n", - " \n", - "buggy_model = BuggyModel()\n", - "inputs = tf.random_normal(shape=(100, 28, 28))\n", - "outputs = buggy_model(inputs)\n", - "assert outputs.shape == (100, 10), \"invalid output shape: %s\" % outputs.shape" - ], - "execution_count": 0, - "outputs": [] - }, - { - "metadata": { - "id": "G-Ubr-Gfturc", - "colab_type": "text" - }, - "cell_type": "markdown", - "source": [ - "# 5. Further reading\n", - "\n", - "If you'd like to learn more about eager execution, consider reading ...\n", - "\n", - "\n", - "\n", - "* our [user guide](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/eager/python/g3doc/guide.md);\n", - "* our [collection of example models](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/eager/python/examples), which includes a convolutional model for [MNIST](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/eager/python/examples/mnist) classification, a [GAN](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/eager/python/examples/gan), a [recursive neural network](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/eager/python/examples/spinn), and more;\n", - "* [this advanced notebook](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/contrib/autograph/examples/notebooks/dev_summit_2018_demo.ipynb), which explains how to build and execute graphs while eager execution is enabled and how to call into eager execution while constructing a graph, and which also introduces Autograph, a source-code translation tool that automatically generates graph-construction code from dynamic eager code.\n", - "\n", - "\n" - ] - } - ] -} diff --git a/Deep_Learning/Tensorflow/MNIST_text_classification.ipynb b/Deep_Learning/Tensorflow/MNIST_text_classification.ipynb deleted file mode 100644 index 4f46a1174..000000000 --- a/Deep_Learning/Tensorflow/MNIST_text_classification.ipynb +++ /dev/null @@ -1 +0,0 @@ -{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Copy of basic-text-classification.ipynb","version":"0.3.2","views":{},"default_view":{},"provenance":[{"file_id":"https://github.com/tensorflow/models/blob/master/samples/core/tutorials/keras/basic_text_classification.ipynb","timestamp":1531493783397}],"collapsed_sections":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"accelerator":"GPU"},"cells":[{"metadata":{"id":"Ic4_occAAiAT","colab_type":"text"},"cell_type":"markdown","source":["##### Copyright 2018 The TensorFlow Authors."]},{"metadata":{"id":"ioaprt5q5US7","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}},"cellView":"form"},"cell_type":"code","source":["#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n","# you may not use this file except in compliance with the License.\n","# You may obtain a copy of the License at\n","#\n","# https://www.apache.org/licenses/LICENSE-2.0\n","#\n","# Unless required by applicable law or agreed to in writing, software\n","# distributed under the License is distributed on an \"AS IS\" BASIS,\n","# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n","# See the License for the specific language governing permissions and\n","# limitations under the License."],"execution_count":0,"outputs":[]},{"metadata":{"id":"yCl0eTNH5RS3","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}},"cellView":"form"},"cell_type":"code","source":["#@title MIT License\n","#\n","# Copyright (c) 2017 François Chollet\n","#\n","# Permission is hereby granted, free of charge, to any person obtaining a\n","# copy of this software and associated documentation files (the \"Software\"),\n","# to deal in the Software without restriction, including without limitation\n","# the rights to use, copy, modify, merge, publish, distribute, sublicense,\n","# and/or sell copies of the Software, and to permit persons to whom the\n","# Software is furnished to do so, subject to the following conditions:\n","#\n","# The above copyright notice and this permission notice shall be included in\n","# all copies or substantial portions of the Software.\n","#\n","# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n","# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n","# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n","# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n","# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n","# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n","# DEALINGS IN THE SOFTWARE."],"execution_count":0,"outputs":[]},{"metadata":{"id":"ItXfxkxvosLH","colab_type":"text"},"cell_type":"markdown","source":["# Classify movie reviews: binary classification"]},{"metadata":{"id":"hKY4XMc9o8iB","colab_type":"text"},"cell_type":"markdown","source":["
\n","\n"," Run in Google Colab \n","\n","View source on GitHub
"]},{"metadata":{"id":"Eg62Pmz3o83v","colab_type":"text"},"cell_type":"markdown","source":["\n","This notebook classifies movie reviews as *positive* or *negative* using the text of the review. This is an example of binary—or two-class—classification, an important and widely applicable kind of machine learning problem. \n","\n","We'll use the [IMDB dataset](https://www.tensorflow.org/api_docs/python/tf/keras/datasets/imdb) that contains the text of 50,000 movie reviews from the [Internet Movie Database](https://www.imdb.com/). These are split into 25,000 reviews for training and 25,000 reviews for testing. The training and testing sets are *balanced*, meaning they contain an equal number of positive and negative reviews. \n","\n","This notebook uses [tf.keras](https://www.tensorflow.org/guide/keras), a high-level API to build and train models in TensorFlow."]},{"metadata":{"id":"2ew7HTbPpCJH","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["import tensorflow as tf\n","from tensorflow import keras\n","\n","import numpy as np\n","\n","print(tf.__version__)"],"execution_count":0,"outputs":[]},{"metadata":{"id":"iAsKG535pHep","colab_type":"text"},"cell_type":"markdown","source":["## Download the IMDB dataset\n","\n","The IMDB dataset comes packaged with TensorFlow. It has already been preprocessed such that the reviews (sequences of words) have been converted to sequences of integers, where each integer represents a specific word in a dictionary.\n","\n","The following code downloads the IMDB dataset to your machine (or uses a cached copy if you've already downloaded it):"]},{"metadata":{"id":"zXXx5Oc3pOmN","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["imdb = keras.datasets.imdb\n","\n","(train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=10000)"],"execution_count":0,"outputs":[]},{"metadata":{"id":"odr-KlzO-lkL","colab_type":"text"},"cell_type":"markdown","source":["The argument `num_words=10000` keeps the top 10,000 most frequently occurring words in the training data. The rare words are discarded to keep the size of the data managable."]},{"metadata":{"id":"l50X3GfjpU4r","colab_type":"text"},"cell_type":"markdown","source":["## Explore the data \n","\n","Let's take a moment to understand the format of the data. The dataset comes preprocessed: each example is an array of integers representing the words of the movie review. Each label is an integer value of either 0 or 1, where 0 is a negative review and 1 is a positive review."]},{"metadata":{"id":"y8qCnve_-lkO","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["print(\"Training entries: {}, labels: {}\".format(len(train_data), len(train_labels)))"],"execution_count":0,"outputs":[]},{"metadata":{"id":"RnKvHWW4-lkW","colab_type":"text"},"cell_type":"markdown","source":["The text of reviews have been converted to integers, where each integer represents a specific word in a dictionary. Here's what the first review looks like:"]},{"metadata":{"id":"QtTS4kpEpjbi","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["print(train_data[0])"],"execution_count":0,"outputs":[]},{"metadata":{"id":"hIE4l_72x7DP","colab_type":"text"},"cell_type":"markdown","source":["Movie reviews may be different lengths. The below code shows the number of words in the first and second reviews. Since inputs to a neural network must be the same length, we'll need to resolve this later."]},{"metadata":{"id":"X-6Ii9Pfx6Nr","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["len(train_data[0]), len(train_data[1])"],"execution_count":0,"outputs":[]},{"metadata":{"id":"4wJg2FiYpuoX","colab_type":"text"},"cell_type":"markdown","source":["### Convert the integers back to words\n","\n","It may be useful to know how to convert integers back to text. Here, we'll create a helper function to query a dictionary object that contains the integer to string mapping:"]},{"metadata":{"id":"tr5s_1alpzop","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["# A dictionary mapping words to an integer index\n","word_index = imdb.get_word_index()\n","\n","# The first indices are reserved\n","word_index = {k:(v+3) for k,v in word_index.items()} \n","word_index[\"\"] = 0\n","word_index[\"\"] = 1\n","word_index[\"\"] = 2 # unknown\n","word_index[\"\"] = 3\n","\n","reverse_word_index = dict([(value, key) for (key, value) in word_index.items()])\n","\n","def decode_review(text):\n"," return ' '.join([reverse_word_index.get(i, '?') for i in text])"],"execution_count":0,"outputs":[]},{"metadata":{"id":"U3CNRvEZVppl","colab_type":"text"},"cell_type":"markdown","source":["Now we can use the `decode_review` function to display the text for the first review:"]},{"metadata":{"id":"s_OqxmH6-lkn","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["decode_review(train_data[0])"],"execution_count":0,"outputs":[]},{"metadata":{"id":"lFP_XKVRp4_S","colab_type":"text"},"cell_type":"markdown","source":["## Prepare the data\n","\n","The reviews—the arrays of integers—must be converted to tensors before fed into the neural network. This conversion can be done a couple ways:\n","\n","* One-hot-encode the arrays to convert them into vectors of 0s and 1s. For example, the sequence [3, 5] would become a 10,000-dimensional vector that is all zeros except for indices 3 and 5, which are ones. Then, make this the first layer in our network—a Dense layer—that can handle floating point vector data. This approach is memory intensive, though, requiring a `num_words * num_reviews` size matrix.\n","\n","* Alternatively, we can pad the arrays so they all have the same length, then create an integer tensor of shape `num_examples * max_length`. We can use an embedding layer capable of handing this shape as the first layer in our network.\n","\n","In this tutorial, we willl use the second approach. \n","\n","Since the movie reviews must be the same length, we will use the [pad_sequences](https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/sequence/pad_sequences) function to standardize the lengths:"]},{"metadata":{"id":"2jQv-omsHurp","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["train_data = keras.preprocessing.sequence.pad_sequences(train_data,\n"," value=word_index[\"\"],\n"," padding='post',\n"," maxlen=256)\n","\n","test_data = keras.preprocessing.sequence.pad_sequences(test_data,\n"," value=word_index[\"\"],\n"," padding='post',\n"," maxlen=256)"],"execution_count":0,"outputs":[]},{"metadata":{"id":"VO5MBpyQdipD","colab_type":"text"},"cell_type":"markdown","source":["Let's look at the length of the examples now:"]},{"metadata":{"id":"USSSBnkE-lky","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["len(train_data[0]), len(train_data[1])"],"execution_count":0,"outputs":[]},{"metadata":{"id":"QJoxZGyfjT5V","colab_type":"text"},"cell_type":"markdown","source":["And inspect the (now padded) first review:"]},{"metadata":{"id":"TG8X9cqi-lk9","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["print(train_data[0])"],"execution_count":0,"outputs":[]},{"metadata":{"id":"LLC02j2g-llC","colab_type":"text"},"cell_type":"markdown","source":["## Build the model\n","\n","The neural network is created by stacking layers—this requires two main architectural decisions:\n","\n","* How many layers to use in the model?\n","* How many *hidden units* to use for each layer?\n","\n","In this example, the input data consists of array of word-indices. The labels to predict are either 0 or 1. Let's build a model for this problem:"]},{"metadata":{"id":"xpKOoWgu-llD","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["# input shape is the vocabulary count used for the movie reviews (10,000 words)\n","vocab_size = 10000\n","\n","model = keras.Sequential()\n","model.add(keras.layers.Embedding(vocab_size, 16))\n","model.add(keras.layers.GlobalAveragePooling1D())\n","model.add(keras.layers.Dense(16, activation=tf.nn.relu))\n","model.add(keras.layers.Dense(1, activation=tf.nn.sigmoid))\n","\n","model.summary()"],"execution_count":0,"outputs":[]},{"metadata":{"id":"6PbKQ6mucuKL","colab_type":"text"},"cell_type":"markdown","source":["The layers are stacked sequentially to build the classifier:\n","\n","1. The first layer is an `Embedding` layer. This layer takes the integer-encoded vocabulary and looks up the embedding vector for each word-index. These vectors are learned as the model trains. The vectors add a dimension to the output array. The resulting dimensions are: `(batch, sequence, embedding)`.\n","2. Next, a `GlobalAveragePooling1D` layer returns a fixed-length output vector for each example by averaging over the sequence dimension. This allows the model can handle input of variable length, in the simplest way possible.\n","3. This fixed-length output vector is piped through a fully-connected (`Dense`) layer with 16 hidden units.\n","4. The last layer is densely connected with a single output node. Using the `sigmoid` activation function, this value is a float between 0 and 1, representing a probabilty, or confidence level."]},{"metadata":{"id":"0XMwnDOp-llH","colab_type":"text"},"cell_type":"markdown","source":["### Hidden units\n","\n","The above model has two intermediate or \"hidden\" layers, between the input and output. The number of outputs (units, nodes , or neurons) is the dimension of the representational space for the layer. In other words, the amount of freedom the network is allowed when learning an internal representation.\n","\n","If a model has more hidden units (a higher-dimensional representation space), and/or more layers, then the network can learn more complex representations. However, it makes the network more computationally expensive and may lead to learning unwanted patterns—patterns that improve performance on training data but not on the test data. This is called *overfitting*, and we'll explore it later."]},{"metadata":{"id":"L4EqVWg4-llM","colab_type":"text"},"cell_type":"markdown","source":["### Loss function and optimizer\n","\n","A model need a loss function and an optimizer for training. Since this is a binary classification problem and the model outputs of a probability (a single-unit layer with a sigmoid activation), we'll use the `binary_crossentropy` loss function. \n","\n","This isn't the only choice of loss function, you could, for instance, choose `mean_squared_error`. But, generally, `binary_crossentropy` is better for dealing with out probabilities—it measures the \"distance\" between probability distributions, or in our case, between the ground-truth distribution and the predictions.\n","\n","Later, when we are exploring regression problems (say, to predict the price of a house), we will see how to use another loss function called mean squared error.\n","\n","Now, configure the model to use an optimizer and a loss function:"]},{"metadata":{"id":"Mr0GP-cQ-llN","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["model.compile(optimizer=tf.train.AdamOptimizer(),\n"," loss='binary_crossentropy',\n"," metrics=['accuracy'])"],"execution_count":0,"outputs":[]},{"metadata":{"id":"hCWYwkug-llQ","colab_type":"text"},"cell_type":"markdown","source":["## Create a validation set\n","\n","When training, we want to check the accuracy of the model on data it hasn't seen before. Create a *validation set* by setting apart 10,000 examples from the original training data. (Why not use the testing set now? Our goal is to develop and tune our model using only the training data, then use the test data just once to evaluate our accuracy)."]},{"metadata":{"id":"-NpcXY9--llS","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["x_val = train_data[:10000]\n","partial_x_train = train_data[10000:]\n","\n","y_val = train_labels[:10000]\n","partial_y_train = train_labels[10000:]"],"execution_count":0,"outputs":[]},{"metadata":{"id":"35jv_fzP-llU","colab_type":"text"},"cell_type":"markdown","source":["## Train the model\n","\n","Train the model for 20 epochs in mini-batches of 512 samples. This is 20 iterations over all samples in the `x_train` and `y_train` tensors. While training, monitor the model's loss and accuracy on the 10,000 samples from the validation set:"]},{"metadata":{"id":"tXSGrjWZ-llW","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["history = model.fit(partial_x_train,\n"," partial_y_train,\n"," epochs=40,\n"," batch_size=512,\n"," validation_data=(x_val, y_val),\n"," verbose=1)"],"execution_count":0,"outputs":[]},{"metadata":{"id":"9EEGuDVuzb5r","colab_type":"text"},"cell_type":"markdown","source":["## Evaluate the model\n","\n","And let's see how the model performs. Two values will be returned. Loss (a number which represents our error, lower values are better), and accuracy."]},{"metadata":{"id":"zOMKywn4zReN","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["results = model.evaluate(test_data, test_labels)\n","\n","print(results)"],"execution_count":0,"outputs":[]},{"metadata":{"id":"z1iEXVTR0Z2t","colab_type":"text"},"cell_type":"markdown","source":["This fairly naive approach achieves an accuracy of about 87%. WIth more advanced approaches, the model should get closer to 95%."]},{"metadata":{"id":"5KggXVeL-llZ","colab_type":"text"},"cell_type":"markdown","source":["## Create a graph of accuracy and loss over time\n","\n","`model.fit()` returns a `History` object that contains a dictionary with everything that happened during training:"]},{"metadata":{"id":"VcvSXvhp-llb","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["history_dict = history.history\n","history_dict.keys()"],"execution_count":0,"outputs":[]},{"metadata":{"id":"nRKsqL40-lle","colab_type":"text"},"cell_type":"markdown","source":["There are four entries: one for each monitored metric during training and validation. We can use these to plot the training and validation loss for comparison, as well as the training and validation accuracy:"]},{"metadata":{"id":"nGoYf2Js-lle","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["import matplotlib.pyplot as plt\n","\n","acc = history.history['acc']\n","val_acc = history.history['val_acc']\n","loss = history.history['loss']\n","val_loss = history.history['val_loss']\n","\n","epochs = range(1, len(acc) + 1)\n","\n","# \"bo\" is for \"blue dot\"\n","plt.plot(epochs, loss, 'bo', label='Training loss')\n","# b is for \"solid blue line\"\n","plt.plot(epochs, val_loss, 'b', label='Validation loss')\n","plt.title('Training and validation loss')\n","plt.xlabel('Epochs')\n","plt.ylabel('Loss')\n","plt.legend()\n","\n","plt.show()"],"execution_count":0,"outputs":[]},{"metadata":{"id":"6hXx-xOv-llh","colab_type":"code","colab":{"autoexec":{"startup":false,"wait_interval":0}}},"cell_type":"code","source":["plt.clf() # clear figure\n","acc_values = history_dict['acc']\n","val_acc_values = history_dict['val_acc']\n","\n","plt.plot(epochs, acc, 'bo', label='Training acc')\n","plt.plot(epochs, val_acc, 'b', label='Validation acc')\n","plt.title('Training and validation accuracy')\n","plt.xlabel('Epochs')\n","plt.ylabel('Accuracy')\n","plt.legend()\n","\n","plt.show()"],"execution_count":0,"outputs":[]},{"metadata":{"id":"oFEmZ5zq-llk","colab_type":"text"},"cell_type":"markdown","source":["\n","In this plot, the dots represent the training loss and accuracy, and the solid lines are the validation loss and accuracy.\n","\n","Notice the training loss *decreases* with each epoch and the training accuracy *increases* with each epoch. This is expected when using a gradient descent optimization—it should minimize the desired quantity on every iteration.\n","\n","This isn't the case for the validation loss and accuracy—they seem to peak after about twenty epochs. This is an example of overfitting: the model performs better on the training data than it does on data it has never seen before. After this point, the model over-optimizes and learns representations *specific* to the training data that do not *generalize* to test data.\n","\n","For this particular case, we could prevent overfitting by simply stopping the training after twenty or so epochs . Later, you'll see how to do this automatically with a callback."]}]} \ No newline at end of file diff --git a/Deep_Learning/Tensorflow/Tensorflow.md b/Deep_Learning/Tensorflow/Tensorflow.md deleted file mode 100644 index 1657dae17..000000000 --- a/Deep_Learning/Tensorflow/Tensorflow.md +++ /dev/null @@ -1 +0,0 @@ -TensorFlow is an open-source machine learning library for research and production. TensorFlow offers APIs for beginners and experts to develop for desktop, mobile, web, and cloud. See notebooks to get started. diff --git a/Deep_Learning/Tensorflow/intro_to_pandas.ipynb b/Deep_Learning/Tensorflow/intro_to_pandas.ipynb deleted file mode 100644 index 6fba6db23..000000000 --- a/Deep_Learning/Tensorflow/intro_to_pandas.ipynb +++ /dev/null @@ -1 +0,0 @@ -{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Copy of intro_to_pandas.ipynb","version":"0.3.2","provenance":[{"file_id":"/v2/external/notebooks/mlcc/intro_to_pandas.ipynb","timestamp":1535749827118}],"private_outputs":true,"collapsed_sections":["JndnmDMp66FL","YHIWvc9Ms-Ll","TJffr5_Jwqvd"]},"kernelspec":{"name":"python3","display_name":"Python 3"},"accelerator":"GPU"},"cells":[{"metadata":{"id":"JndnmDMp66FL","colab_type":"text"},"cell_type":"markdown","source":["#### Copyright 2017 Google LLC."]},{"metadata":{"id":"hMqWDc_m6rUC","colab_type":"code","colab":{},"cellView":"both"},"cell_type":"code","source":["# Licensed under the Apache License, Version 2.0 (the \"License\");\n","# you may not use this file except in compliance with the License.\n","# You may obtain a copy of the License at\n","#\n","# https://www.apache.org/licenses/LICENSE-2.0\n","#\n","# Unless required by applicable law or agreed to in writing, software\n","# distributed under the License is distributed on an \"AS IS\" BASIS,\n","# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n","# See the License for the specific language governing permissions and\n","# limitations under the License."],"execution_count":0,"outputs":[]},{"metadata":{"id":"rHLcriKWLRe4","colab_type":"text"},"cell_type":"markdown","source":["# Quick Introduction to pandas"]},{"metadata":{"id":"QvJBqX8_Bctk","colab_type":"text"},"cell_type":"markdown","source":["**Learning Objectives:**\n"," * Gain an introduction to the `DataFrame` and `Series` data structures of the *pandas* library\n"," * Access and manipulate data within a `DataFrame` and `Series`\n"," * Import CSV data into a *pandas* `DataFrame`\n"," * Reindex a `DataFrame` to shuffle data"]},{"metadata":{"id":"TIFJ83ZTBctl","colab_type":"text"},"cell_type":"markdown","source":["[*pandas*](http://pandas.pydata.org/) is a column-oriented data analysis API. It's a great tool for handling and analyzing input data, and many ML frameworks support *pandas* data structures as inputs.\n","Although a comprehensive introduction to the *pandas* API would span many pages, the core concepts are fairly straightforward, and we'll present them below. For a more complete reference, the [*pandas* docs site](http://pandas.pydata.org/pandas-docs/stable/index.html) contains extensive documentation and many tutorials."]},{"metadata":{"id":"s_JOISVgmn9v","colab_type":"text"},"cell_type":"markdown","source":["## Basic Concepts\n","\n","The following line imports the *pandas* API and prints the API version:"]},{"metadata":{"id":"aSRYu62xUi3g","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"4a9f1f04-d0c2-4b8e-8b3a-daa3a9e61c7b","executionInfo":{"status":"ok","timestamp":1535749695835,"user_tz":-330,"elapsed":3148,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["from __future__ import print_function\n","\n","import pandas as pd\n","pd.__version__"],"execution_count":24,"outputs":[{"output_type":"execute_result","data":{"text/plain":["'0.22.0'"]},"metadata":{"tags":[]},"execution_count":24}]},{"metadata":{"id":"daQreKXIUslr","colab_type":"text"},"cell_type":"markdown","source":["The primary data structures in *pandas* are implemented as two classes:\n","\n"," * **`DataFrame`**, which you can imagine as a relational data table, with rows and named columns.\n"," * **`Series`**, which is a single column. A `DataFrame` contains one or more `Series` and a name for each `Series`.\n","\n","The data frame is a commonly used abstraction for data manipulation. Similar implementations exist in [Spark](https://spark.apache.org/) and [R](https://www.r-project.org/about.html)."]},{"metadata":{"id":"fjnAk1xcU0yc","colab_type":"text"},"cell_type":"markdown","source":["One way to create a `Series` is to construct a `Series` object. For example:"]},{"metadata":{"id":"DFZ42Uq7UFDj","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":86},"outputId":"2cefd759-fc97-437b-e425-090b3178292b","executionInfo":{"status":"ok","timestamp":1535749700310,"user_tz":-330,"elapsed":1237,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["pd.Series(['San Francisco', 'San Jose', 'Sacramento'])"],"execution_count":25,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0 San Francisco\n","1 San Jose\n","2 Sacramento\n","dtype: object"]},"metadata":{"tags":[]},"execution_count":25}]},{"metadata":{"id":"U5ouUp1cU6pC","colab_type":"text"},"cell_type":"markdown","source":["`DataFrame` objects can be created by passing a `dict` mapping `string` column names to their respective `Series`. If the `Series` don't match in length, missing values are filled with special [NA/NaN](http://pandas.pydata.org/pandas-docs/stable/missing_data.html) values. Example:"]},{"metadata":{"id":"avgr6GfiUh8t","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":143},"outputId":"8020b1f5-b770-421c-9345-4b28c9c17efd","executionInfo":{"status":"ok","timestamp":1535749705051,"user_tz":-330,"elapsed":1861,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["city_names = pd.Series(['San Francisco', 'San Jose', 'Sacramento'])\n","population = pd.Series([852469, 1015785, 485199])\n","\n","pd.DataFrame({ 'City name': city_names, 'Population': population })"],"execution_count":27,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
City namePopulation
0San Francisco852469
1San Jose1015785
2Sacramento485199
\n","
"],"text/plain":[" City name Population\n","0 San Francisco 852469\n","1 San Jose 1015785\n","2 Sacramento 485199"]},"metadata":{"tags":[]},"execution_count":27}]},{"metadata":{"id":"oa5wfZT7VHJl","colab_type":"text"},"cell_type":"markdown","source":["But most of the time, you load an entire file into a `DataFrame`. The following example loads a file with California housing data. Run the following cell to load the data and create feature definitions:"]},{"metadata":{"id":"gokRa3nTz-8V","colab_type":"code","colab":{}},"cell_type":"code","source":[""],"execution_count":0,"outputs":[]},{"metadata":{"id":"av6RYOraVG1V","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":320},"outputId":"3d019b6c-ccbf-4413-8e2a-92ef839bc3e0","executionInfo":{"status":"ok","timestamp":1535749711126,"user_tz":-330,"elapsed":1758,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["california_housing_dataframe = pd.read_csv(\"https://download.mlcc.google.com/mledu-datasets/california_housing_train.csv\", sep=\",\")\n","california_housing_dataframe.describe()"],"execution_count":28,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
longitudelatitudehousing_median_agetotal_roomstotal_bedroomspopulationhouseholdsmedian_incomemedian_house_value
count17000.00000017000.00000017000.00000017000.00000017000.00000017000.00000017000.00000017000.00000017000.000000
mean-119.56210835.62522528.5893532643.664412539.4108241429.573941501.2219413.883578207300.912353
std2.0051662.13734012.5869372179.947071421.4994521147.852959384.5208411.908157115983.764387
min-124.35000032.5400001.0000002.0000001.0000003.0000001.0000000.49990014999.000000
25%-121.79000033.93000018.0000001462.000000297.000000790.000000282.0000002.566375119400.000000
50%-118.49000034.25000029.0000002127.000000434.0000001167.000000409.0000003.544600180400.000000
75%-118.00000037.72000037.0000003151.250000648.2500001721.000000605.2500004.767000265000.000000
max-114.31000041.95000052.00000037937.0000006445.00000035682.0000006082.00000015.000100500001.000000
\n","
"],"text/plain":[" longitude latitude housing_median_age total_rooms \\\n","count 17000.000000 17000.000000 17000.000000 17000.000000 \n","mean -119.562108 35.625225 28.589353 2643.664412 \n","std 2.005166 2.137340 12.586937 2179.947071 \n","min -124.350000 32.540000 1.000000 2.000000 \n","25% -121.790000 33.930000 18.000000 1462.000000 \n","50% -118.490000 34.250000 29.000000 2127.000000 \n","75% -118.000000 37.720000 37.000000 3151.250000 \n","max -114.310000 41.950000 52.000000 37937.000000 \n","\n"," total_bedrooms population households median_income \\\n","count 17000.000000 17000.000000 17000.000000 17000.000000 \n","mean 539.410824 1429.573941 501.221941 3.883578 \n","std 421.499452 1147.852959 384.520841 1.908157 \n","min 1.000000 3.000000 1.000000 0.499900 \n","25% 297.000000 790.000000 282.000000 2.566375 \n","50% 434.000000 1167.000000 409.000000 3.544600 \n","75% 648.250000 1721.000000 605.250000 4.767000 \n","max 6445.000000 35682.000000 6082.000000 15.000100 \n","\n"," median_house_value \n","count 17000.000000 \n","mean 207300.912353 \n","std 115983.764387 \n","min 14999.000000 \n","25% 119400.000000 \n","50% 180400.000000 \n","75% 265000.000000 \n","max 500001.000000 "]},"metadata":{"tags":[]},"execution_count":28}]},{"metadata":{"id":"WrkBjfz5kEQu","colab_type":"text"},"cell_type":"markdown","source":["The example above used `DataFrame.describe` to show interesting statistics about a `DataFrame`. Another useful function is `DataFrame.head`, which displays the first few records of a `DataFrame`:"]},{"metadata":{"id":"s3ND3bgOkB5k","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":206},"outputId":"a2fa0985-9e42-4f38-da9d-efb1cb82e5c9","executionInfo":{"status":"ok","timestamp":1535749715110,"user_tz":-330,"elapsed":1826,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["california_housing_dataframe.head()"],"execution_count":30,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
longitudelatitudehousing_median_agetotal_roomstotal_bedroomspopulationhouseholdsmedian_incomemedian_house_value
0-114.3134.1915.05612.01283.01015.0472.01.493666900.0
1-114.4734.4019.07650.01901.01129.0463.01.820080100.0
2-114.5633.6917.0720.0174.0333.0117.01.650985700.0
3-114.5733.6414.01501.0337.0515.0226.03.191773400.0
4-114.5733.5720.01454.0326.0624.0262.01.925065500.0
\n","
"],"text/plain":[" longitude latitude housing_median_age total_rooms total_bedrooms \\\n","0 -114.31 34.19 15.0 5612.0 1283.0 \n","1 -114.47 34.40 19.0 7650.0 1901.0 \n","2 -114.56 33.69 17.0 720.0 174.0 \n","3 -114.57 33.64 14.0 1501.0 337.0 \n","4 -114.57 33.57 20.0 1454.0 326.0 \n","\n"," population households median_income median_house_value \n","0 1015.0 472.0 1.4936 66900.0 \n","1 1129.0 463.0 1.8200 80100.0 \n","2 333.0 117.0 1.6509 85700.0 \n","3 515.0 226.0 3.1917 73400.0 \n","4 624.0 262.0 1.9250 65500.0 "]},"metadata":{"tags":[]},"execution_count":30}]},{"metadata":{"id":"w9-Es5Y6laGd","colab_type":"text"},"cell_type":"markdown","source":["Another powerful feature of *pandas* is graphing. For example, `DataFrame.hist` lets you quickly study the distribution of values in a column:"]},{"metadata":{"id":"nqndFVXVlbPN","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":397},"outputId":"18468cf1-1ac1-4efb-b6e3-7df343f65a21","executionInfo":{"status":"ok","timestamp":1535749727787,"user_tz":-330,"elapsed":1970,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["california_housing_dataframe.hist('housing_median_age')"],"execution_count":34,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([[]],\n"," dtype=object)"]},"metadata":{"tags":[]},"execution_count":34},{"output_type":"display_data","data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAeoAAAFZCAYAAABXM2zhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3X1UlHX+//HXMDAH0UEEGTfLarf0\naEmaa5l4U0Iokp7IVRPWdU3q6Iqtlql499WTlajRmmZZmunRU7GNtofcAjJxyyRanT0uuu0p2VOr\neTejKCqgSPP7o9Os/FRguP1Az8dfcTEz1+d6H+3pdQ1zYfF6vV4BAAAjBTT3AgAAwPURagAADEao\nAQAwGKEGAMBghBoAAIMRagAADEaogVo6cuSI7rjjjkbdxz//+U+lpKQ06j4a0h133KEjR47o448/\n1ty5c5t7OUCrZOFz1EDtHDlyREOHDtW//vWv5l6KMe644w7l5ubqpptuau6lAK0WZ9SAn5xOp0aO\nHKn7779f27dv1w8//KA//elPio+PV3x8vNLS0lRaWipJiomJ0d69e33P/enry5cva/78+Ro2bJji\n4uI0bdo0nT9/XgUFBYqLi5MkrV69Ws8++6xSU1MVGxur0aNH6+TJk5KkgwcPaujQoRo6dKheeeUV\njRw5UgUFBdWue/Xq1Vq0aJEmT56sgQMHatasWcrLy9OoUaM0cOBA5eXlSZIuXbqk5557TsOGDVNM\nTIzWrl3re42//e1viouL0/Dhw7V+/Xrf9m3btmnixImSJI/Ho5SUFMXHxysmJkZvvfVWleN/9913\nNXr0aA0cOFDp6ek1zrusrEwzZszwrWfZsmW+71U3hx07dmjkyJGKjY3VpEmTdPr06Rr3BZiIUAN+\n+OGHH1RRUaEPPvhAc+fO1cqVK/XRRx/p008/1bZt2/TXv/5VJSUl2rhxY7Wvs3v3bh05ckTZ2dnK\nzc3V7bffrn/84x9XPS47O1vz5s3Tjh07FBERoa1bt0qSFi5cqIkTJyo3N1ft2rXTt99+W6v179q1\nSy+88II++OADZWdn+9Y9ZcoUrVu3TpK0bt06HTp0SB988IG2b9+unJwc5eXlqbKyUvPnz9eiRYv0\n0UcfKSAgQJWVlVft47XXXtNNN92k7Oxsbdq0SRkZGTp27Jjv+3//+9+VmZmprVu3asuWLTp+/Hi1\na37nnXd04cIFZWdn6/3339e2bdt8//i53hwOHz6s2bNnKyMjQ5988on69eunxYsX12pGgGkINeAH\nr9erxMREST9e9j1+/Lh27dqlxMREhYSEyGq1atSoUfr888+rfZ3w8HAVFRXp448/9p0xDho06KrH\n9e3bVzfeeKMsFot69OihY8eOqby8XAcPHtSIESMkSb/97W9V23ew7r77bkVERKhDhw6KjIzU4MGD\nJUndunXzna3n5eUpOTlZNptNISEhevjhh5Wbm6tvv/1Wly5d0sCBAyVJjzzyyDX3sWDBAi1cuFCS\n1KVLF0VGRurIkSO+748cOVJWq1WdOnVSRERElYhfy6RJk/Tqq6/KYrGoffv26tq1q44cOVLtHD79\n9FPde++96tatmyRp3Lhx2rlz5zX/YQGYLrC5FwC0JFarVW3atJEkBQQE6IcfftDp06fVvn1732Pa\nt2+vU6dOVfs6d911lxYsWKDNmzdrzpw5iomJ0aJFi656nN1ur7LvyspKnT17VhaLRaGhoZKkoKAg\nRURE1Gr9bdu2rfJ6ISEhVY5Fks6dO6elS5fqpZdekvTjpfC77rpLZ8+eVbt27aoc57UUFhb6zqID\nAgLkdrt9ry2pymv8dEzV+fbbb5Wenq7//Oc/CggI0PHjxzVq1Khq53Du3Dnt3btX8fHxVfZ75syZ\nWs8KMAWhBuqpY8eOOnPmjO/rM2fOqGPHjpKqBlCSzp496/vvn97TPnPmjObNm6c333xT0dHRNe6v\nXbt28nq9KisrU5s2bXT58uUGff/V4XBo0qRJGjJkSJXtRUVFOn/+vO/r6+1z1qxZ+v3vf6+kpCRZ\nLJZrXinwx7PPPqs777xTa9askdVq1bhx4yRVPweHw6Ho6GitWrWqXvsGTMClb6CeHnjgAWVlZams\nrEyXL1+W0+nU/fffL0mKjIzUv//9b0nShx9+qIsXL0qStm7dqjVr1kiSwsLC9Ktf/arW+2vbtq1u\nu+02ffTRR5KkzMxMWSyWBjue2NhYvffee6qsrJTX69Wrr76qTz/9VDfffLOsVqvvh7W2bdt2zf2e\nOnVKPXv2lMVi0fvvv6+ysjLfD9fVxalTp9SjRw9ZrVZ9/vnn+u6771RaWlrtHAYOHKi9e/fq8OHD\nkn782Ntzzz1X5zUAzYlQA/UUHx+vwYMHa9SoURoxYoR+8YtfaMKECZKkqVOnauPGjRoxYoSKiop0\n++23S/oxhj/9xPLw4cN16NAhPfbYY7Xe56JFi7R27Vo99NBDKi0tVadOnRos1snJyercubMeeugh\nxcfHq6ioSL/+9a8VFBSkJUuWaN68eRo+fLgsFovv0vmVpk+frtTUVI0cOVKlpaV69NFHtXDhQv33\nv/+t03r+8Ic/aNmyZRoxYoS+/PJLTZs2TatXr9a+ffuuOweHw6ElS5YoNTVVw4cP17PPPquEhIT6\njgZoFnyOGmihvF6vL8733XefNm7cqO7duzfzqpoec0Brxxk10AL98Y9/9H2cKj8/X16vV7feemvz\nLqoZMAf8HHBGDbRARUVFmjt3rs6ePaugoCDNmjVLN910k1JTU6/5+Ntuu833nrhpioqK6rzua83h\np58PAFoLQg0AgMG49A0AgMEINQAABjPyhidu9zm/Ht+hQ4iKi+v+Oc2fO+ZXd8yufphf3TG7+jFt\nfpGR9ut+r1WcUQcGWpt7CS0a86s7Zlc/zK/umF39tKT5tYpQAwDQWhFqAAAMRqgBADBYjT9MVlZW\nprS0NJ06dUoXL17U1KlT1b17d82ePVuVlZWKjIzUihUrZLPZlJWVpU2bNikgIEBjx47VmDFjVFFR\nobS0NB09elRWq1VLly5Vly5dmuLYAABo8Wo8o87Ly1PPnj21ZcsWrVy5Uunp6Vq1apWSk5P19ttv\n65ZbbpHT6VRpaanWrFmjjRs3avPmzdq0aZPOnDmj7du3KzQ0VO+8846mTJmijIyMpjguAABahRpD\nnZCQoCeeeEKSdOzYMXXq1EkFBQWKjY2VJA0ZMkT5+fnav3+/oqKiZLfbFRwcrD59+sjlcik/P19x\ncXGSpOjoaLlcrkY8HAAAWpdaf4563LhxOn78uNauXavHHntMNptNkhQRESG32y2Px6Pw8HDf48PD\nw6/aHhAQIIvFokuXLvmeDwAArq/WoX733Xf11VdfadasWbry9uDXu1W4v9uv1KFDiN+fcavuw+Ko\nGfOrO2ZXP8yv7phd/bSU+dUY6gMHDigiIkI33HCDevToocrKSrVt21bl5eUKDg7WiRMn5HA45HA4\n5PF4fM87efKkevfuLYfDIbfbre7du6uiokJer7fGs2l/7xYTGWn3+25m+B/mV3fMrn6YX90xu/ox\nbX71ujPZ3r17tWHDBkmSx+NRaWmpoqOjlZOTI0nKzc3VoEGD1KtXLxUWFqqkpEQXLlyQy+VS3759\nNWDAAGVnZ0v68QfT+vXr1xDHBADAz0KNZ9Tjxo3T/PnzlZycrPLycv3f//2fevbsqTlz5igzM1Od\nO3dWYmKigoKCNHPmTKWkpMhisSg1NVV2u10JCQnas2ePkpKSZLPZlJ6e3hTHBQBAq2Dk76P293KE\naZcwWhrmV3fMrn6YX90xu/oxbX7VXfo28rdnAcC1TErf2dxLqNGGtJjmXgJaGW4hCgCAwQg1AAAG\nI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCA\nwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMA\nYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QA\nABiMUAMAYDBCDQCAwQg1AAAGC6zNg5YvX659+/bp8uXLmjx5snbu3KmDBw8qLCxMkpSSkqIHHnhA\nWVlZ2rRpkwICAjR27FiNGTNGFRUVSktL09GjR2W1WrV06VJ16dKlUQ8KAIDWosZQf/HFF/rmm2+U\nmZmp4uJiPfLII7rvvvv09NNPa8iQIb7HlZaWas2aNXI6nQoKCtLo0aMVFxenvLw8hYaGKiMjQ7t3\n71ZGRoZWrlzZqAcFAEBrUeOl73vuuUcvv/yyJCk0NFRlZWWqrKy86nH79+9XVFSU7Ha7goOD1adP\nH7lcLuXn5ysuLk6SFB0dLZfL1cCHAABA61VjqK1Wq0JCQiRJTqdTgwcPltVq1ZYtWzRhwgQ99dRT\nOn36tDwej8LDw33PCw8Pl9vtrrI9ICBAFotFly5daqTDAQCgdanVe9SStGPHDjmdTm3YsEEHDhxQ\nWFiYevTooTfeeEOvvPKK7r777iqP93q913yd622/UocOIQoMtNZ2aZKkyEi7X49HVcyv7phd/bS2\n+TXl8bS22TW1ljK/WoX6s88+09q1a7V+/XrZ7Xb179/f972YmBgtXrxYw4YNk8fj8W0/efKkevfu\nLYfDIbfbre7du6uiokJer1c2m63a/RUXl/p1EJGRdrnd5/x6Dv6H+dUds6uf1ji/pjqe1ji7pmTa\n/Kr7R0ONl77PnTun5cuX6/XXX/f9lPeTTz6pw4cPS5IKCgrUtWtX9erVS4WFhSopKdGFCxfkcrnU\nt29fDRgwQNnZ2ZKkvLw89evXryGOCQCAn4Uaz6g//PBDFRcXa8aMGb5to0aN0owZM9SmTRuFhIRo\n6dKlCg4O1syZM5WSkiKLxaLU1FTZ7XYlJCRoz549SkpKks1mU3p6eqMeEAAArYnFW5s3jZuYv5cj\nTLuE0dIwv7pjdvXj7/wmpe9sxNU0jA1pMU2yH/7s1Y9p86vXpW8AANB8CDUAAAYj1AAAGIxQAwBg\nMEINAIDBCDUAAAYj1AAAGIxQAwBgMEINAIDBCDUAAAYj1AAAGIxQAwBgMEINAIDBCDUAAAYj1AAA\nGIxQAwBgMEINAIDBCDUAAAYj1AAAGIxQAwBgMEINAIDBCDUAAAYLbO4FAA1lUvrO5l5CtTakxTT3\nEgC0QJxRAwBgMEINAIDBCDUAAAYj1AAAGIxQAwBgMEINAIDBCDUAAAYj1AAAGIxQAwBgMEINAIDB\nCDUAAAYj1AAAGIxQAwBgMEINAIDBCDUAAAbj91EDTcT035ct8TuzARNxRg0AgMFqdUa9fPly7du3\nT5cvX9bkyZMVFRWl2bNnq7KyUpGRkVqxYoVsNpuysrK0adMmBQQEaOzYsRozZowqKiqUlpamo0eP\nymq1aunSperSpUtjHxcAAK1CjaH+4osv9M033ygzM1PFxcV65JFH1L9/fyUnJ2v48OF66aWX5HQ6\nlZiYqDVr1sjpdCooKEijR49WXFyc8vLyFBoaqoyMDO3evVsZGRlauXJlUxwbAAAtXo2Xvu+55x69\n/PLLkqTQ0FCVlZWpoKBAsbGxkqQhQ4YoPz9f+/fvV1RUlOx2u4KDg9WnTx+5XC7l5+crLi5OkhQd\nHS2Xy9WIhwMAQOtS4xm11WpVSEiIJMnpdGrw4MHavXu3bDabJCkiIkJut1sej0fh4eG+54WHh1+1\nPSAgQBaLRZcuXfI9/1o6dAhRYKDVrwOJjLT79XhUxfwgNc+fg9b2Z68pj6e1za6ptZT51fqnvnfs\n2CGn06kNGzZo6NChvu1er/eaj/d3+5WKi0truyxJPw7b7T7n13PwP8wPP2nqPwet8c9eUx1Pa5xd\nUzJtftX9o6FWP/X92Wefae3atVq3bp3sdrtCQkJUXl4uSTpx4oQcDoccDoc8Ho/vOSdPnvRtd7vd\nkqSKigp5vd5qz6YBAMD/1Bjqc+fOafny5Xr99dcVFhYm6cf3mnNyciRJubm5GjRokHr16qXCwkKV\nlJTowoULcrlc6tu3rwYMGKDs7GxJUl5envr169eIhwMAQOtS46XvDz/8UMXFxZoxY4ZvW3p6uhYs\nWKDMzEx17txZiYmJCgoK0syZM5WSkiKLxaLU1FTZ7XYlJCRoz549SkpKks1mU3p6eqMeEAAArUmN\noX700Uf16KOPXrX9rbfeumpbfHy84uPjq2z76bPTAADAf9xCFIBPS7jNKfBzwy1EAQAwGKEGAMBg\nhBoAAIMRagAADEaoAQAwGKEGAMBghBoAAIMRagAADEaoAQAwGHcmQ61wxyoAaB6cUQMAYDBCDQCA\nwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMA\nYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABgssLkXAADAlSal72zuJdRoQ1pM\nk+2LM2oAAAxGqAEAMBihBgDAYIQaAACDEWoAAAxGqAEAMBihBgDAYLX6HPXXX3+tqVOnauLEiRo/\nfrzS0tJ08OBBhYWFSZJSUlL0wAMPKCsrS5s2bVJAQIDGjh2rMWPGqKKiQmlpaTp69KisVquWLl2q\nLl26NOpBAUBz4TPAaGg1hrq0tFRLlixR//79q2x/+umnNWTIkCqPW7NmjZxOp4KCgjR69GjFxcUp\nLy9PoaGhysjI0O7du5WRkaGVK1c2/JEAANAK1Xjp22azad26dXI4HNU+bv/+/YqKipLdbldwcLD6\n9Okjl8ul/Px8xcXFSZKio6PlcrkaZuUAAPwM1BjqwMBABQcHX7V9y5YtmjBhgp566imdPn1aHo9H\n4eHhvu+Hh4fL7XZX2R4QECCLxaJLly414CEAANB61ele3w8//LDCwsLUo0cPvfHGG3rllVd09913\nV3mM1+u95nOvt/1KHTqEKDDQ6teaIiPtfj0eVTE/4OeDv+/115QzrFOor3y/OiYmRosXL9awYcPk\n8Xh820+ePKnevXvL4XDI7Xare/fuqqiokNfrlc1mq/b1i4tL/VpPZKRdbvc5/w4CPswP+Hnh73v9\nNfQMqwt/nT6e9eSTT+rw4cOSpIKCAnXt2lW9evVSYWGhSkpKdOHCBblcLvXt21cDBgxQdna2JCkv\nL0/9+vWryy4BAPhZqvGM+sCBA1q2bJm+//57BQYGKicnR+PHj9eMGTPUpk0bhYSEaOnSpQoODtbM\nmTOVkpIii8Wi1NRU2e12JSQkaM+ePUpKSpLNZlN6enpTHBcAAK1CjaHu2bOnNm/efNX2YcOGXbUt\nPj5e8fHxVbb99NlpAADgP+5MBgCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMA\nYDBCDQCAwQg1AAAGI9QAABiMUAMAYLA6/T5qAEDLNSl9Z3MvAX7gjBoAAIMRagAADEaoAQAwGKEG\nAMBghBoAAIMRagAADEaoAQAwGKEGAMBghBoAAIMRagAADEaoAQAwGKEGAMBghBoAAIMRagAADEao\nAQAwGKEGAMBghBoAAIMRagAADEaoAQAwGKEGAMBghBoAAIMRagAADEaoAQAwGKEGAMBghBoAAIMR\nagAADFarUH/99dd68MEHtWXLFknSsWPH9Lvf/U7JycmaPn26Ll26JEnKysrSb37zG40ZM0bvvfee\nJKmiokIzZ85UUlKSxo8fr8OHDzfSoQAA0PrUGOrS0lItWbJE/fv3921btWqVkpOT9fbbb+uWW26R\n0+lUaWmp1qxZo40bN2rz5s3atGmTzpw5o+3btys0NFTvvPOOpkyZooyMjEY9IAAAWpMaQ22z2bRu\n3To5HA7ftoKCAsXGxkqShgwZovz8fO3fv19RUVGy2+0KDg5Wnz595HK5lJ+fr7i4OElSdHS0XC5X\nIx0KAACtT42hDgwMVHBwcJVtZWVlstlskqSIiAi53W55PB6Fh4f7HhMeHn7V9oCAAFksFt+lcgAA\nUL3A+r6A1+ttkO1X6tAhRIGBVr/WERlp9+vxqIr5AUDtNeX/M+sU6pCQEJWXlys4OFgnTpyQw+GQ\nw+GQx+PxPebkyZPq3bu3HA6H3G63unfvroqKCnm9Xt/Z+PUUF5f6tZ7ISLvc7nN1ORSI+QGAvxr6\n/5nVhb9OH8+Kjo5WTk6OJCk3N1eDBg1Sr169VFhYqJKSEl24cEEul0t9+/bVgAEDlJ2dLUnKy8tT\nv3796rJLAAB+lmo8oz5w4ICWLVum77//XoGBgcrJydGLL76otLQ0ZWZmqnPnzkpMTFRQUJBmzpyp\nlJQUWSwWpaamym63KyEhQXv27FFSUpJsNpvS09Ob4rgAAGgVLN7avGncxPy9pMCl2/qpzfwmpe9s\notUAgPk2pMU06Os1+KVvAADQNOr9U99oGJyxAgCuhTNqAAAMRqgBADAYoQYAwGCEGgAAgxFqAAAM\nRqgBADAYoQYAwGCEGgAAgxFqAAAMRqgBADAYoQYAwGCEGgAAgxFqAAAMRqgBADAYoQYAwGCEGgAA\ngxFqAAAMRqgBADAYoQYAwGCEGgAAgxFqAAAMRqgBADAYoQYAwGCEGgAAgxFqAAAMRqgBADAYoQYA\nwGCEGgAAgxFqAAAMRqgBADAYoQYAwGCEGgAAgxFqAAAMFtjcC2gKk9J3NvcSAACoE86oAQAwGKEG\nAMBghBoAAIMRagAADFanHyYrKCjQ9OnT1bVrV0lSt27d9Pjjj2v27NmqrKxUZGSkVqxYIZvNpqys\nLG3atEkBAQEaO3asxowZ06AHAABAa1bnn/q+9957tWrVKt/Xc+fOVXJysoYPH66XXnpJTqdTiYmJ\nWrNmjZxOp4KCgjR69GjFxcUpLCysQRYPAEBr12CXvgsKChQbGytJGjJkiPLz87V//35FRUXJbrcr\nODhYffr0kcvlaqhdAgDQ6tX5jPrQoUOaMmWKzp49q2nTpqmsrEw2m02SFBERIbfbLY/Ho/DwcN9z\nwsPD5Xa7a3ztDh1CFBho9Ws9kZF2/w4AAIA6asrm1CnUt956q6ZNm6bhw4fr8OHDmjBhgiorK33f\n93q913ze9bb//4qLS/1aT2SkXW73Ob+eAwBAXTV0c6oLf50ufXfq1EkJCQmyWCy6+eab1bFjR509\ne1bl5eWSpBMnTsjhcMjhcMjj8fied/LkSTkcjrrsEgCAn6U6hTorK0tvvvmmJMntduvUqVMaNWqU\ncnJyJEm5ubkaNGiQevXqpcLCQpWUlOjChQtyuVzq27dvw60eAIBWrk6XvmNiYvTMM8/ok08+UUVF\nhRYvXqwePXpozpw5yszMVOfOnZWYmKigoCDNnDlTKSkpslgsSk1Nld3Oe8kAANSWxVvbN46bkL/X\n/mt6j5pfygEAaEgb0mIa9PUa/D1qAADQNAg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiM\nUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAG\nI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCA\nwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABiMUAMAYDBCDQCAwQg1AAAGI9QAABgssCl2\n8sILL2j//v2yWCyaN2+e7rrrrqbYLQAALV6jh/rLL7/Ud999p8zMTBUVFWnevHnKzMxs7N0CANAq\nNPql7/z8fD344IOSpNtuu01nz57V+fPnG3u3AAC0Co0eao/How4dOvi+Dg8Pl9vtbuzdAgDQKjTJ\ne9RX8nq9NT4mMtLu9+tW95wPMh72+/UAADBBo59ROxwOeTwe39cnT55UZGRkY+8WAIBWodFDPWDA\nAOXk5EiSDh48KIfDoXbt2jX2bgEAaBUa/dJ3nz59dOedd2rcuHGyWCxatGhRY+8SAIBWw+KtzZvG\nAACgWXBnMgAADEaoAQAwWJN/PKuhcXtS/3399deaOnWqJk6cqPHjx+vYsWOaPXu2KisrFRkZqRUr\nVshmszX3Mo20fPly7du3T5cvX9bkyZMVFRXF7GqhrKxMaWlpOnXqlC5evKipU6eqe/fuzM5P5eXl\nGjFihKZOnar+/fszv1oqKCjQ9OnT1bVrV0lSt27d9Pjjj7eY+bXoM+orb0/6/PPP6/nnn2/uJRmv\ntLRUS5YsUf/+/X3bVq1apeTkZL399tu65ZZb5HQ6m3GF5vriiy/0zTffKDMzU+vXr9cLL7zA7Gop\nLy9PPXv21JYtW7Ry5Uqlp6czuzp47bXX1L59e0n8vfXXvffeq82bN2vz5s1auHBhi5pfiw41tyf1\nn81m07p16+RwOHzbCgoKFBsbK0kaMmSI8vPzm2t5Rrvnnnv08ssvS5JCQ0NVVlbG7GopISFBTzzx\nhCTp2LFj6tSpE7PzU1FRkQ4dOqQHHnhAEn9v66slza9Fh5rbk/ovMDBQwcHBVbaVlZX5LvlEREQw\nw+uwWq0KCQmRJDmdTg0ePJjZ+WncuHF65plnNG/ePGbnp2XLliktLc33NfPzz6FDhzRlyhQlJSXp\n888/b1Hza/HvUV+JT5rVHzOs2Y4dO+R0OrVhwwYNHTrUt53Z1ezdd9/VV199pVmzZlWZF7Or3l/+\n8hf17t1bXbp0ueb3mV/1br31Vk2bNk3Dhw/X4cOHNWHCBFVWVvq+b/r8WnSouT1pwwgJCVF5ebmC\ng4N14sSJKpfFUdVnn32mtWvXav369bLb7cyulg4cOKCIiAjdcMMN6tGjhyorK9W2bVtmV0u7du3S\n4cOHtWvXLh0/flw2m40/e37o1KmTEhISJEk333yzOnbsqMLCwhYzvxZ96ZvbkzaM6Oho3xxzc3M1\naNCgZl6Rmc6dO6fly5fr9ddfV1hYmCRmV1t79+7Vhg0bJP34llVpaSmz88PKlSu1detW/fnPf9aY\nMWM0depU5ueHrKwsvfnmm5Ikt9utU6dOadSoUS1mfi3+zmQvvvii9u7d67s9affu3Zt7SUY7cOCA\nli1bpu+//16BgYHq1KmTXnytKYqYAAAArElEQVTxRaWlpenixYvq3Lmzli5dqqCgoOZeqnEyMzO1\nevVq/fKXv/RtS09P14IFC5hdDcrLyzV//nwdO3ZM5eXlmjZtmnr27Kk5c+YwOz+tXr1aN954owYO\nHMj8aun8+fN65plnVFJSooqKCk2bNk09evRoMfNr8aEGAKA1a9GXvgEAaO0INQAABiPUAAAYjFAD\nAGAwQg0AgMEINQAABiPUAAAYjFADAGCw/wdkB5RjykY3PgAAAABJRU5ErkJggg==\n","text/plain":[""]},"metadata":{"tags":[]}}]},{"metadata":{"id":"XtYZ7114n3b-","colab_type":"text"},"cell_type":"markdown","source":["## Accessing Data\n","\n","You can access `DataFrame` data using familiar Python dict/list operations:"]},{"metadata":{"id":"_TFm7-looBFF","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":104},"outputId":"170b78ff-eadd-4f67-ef0a-1d11f6caf36b","executionInfo":{"status":"ok","timestamp":1535749729440,"user_tz":-330,"elapsed":1343,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["cities = pd.DataFrame({ 'City name': city_names, 'Population': population })\n","print(type(cities['City name']))\n","cities['City name']"],"execution_count":35,"outputs":[{"output_type":"stream","text":["\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/plain":["0 San Francisco\n","1 San Jose\n","2 Sacramento\n","Name: City name, dtype: object"]},"metadata":{"tags":[]},"execution_count":35}]},{"metadata":{"id":"V5L6xacLoxyv","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":52},"outputId":"afe3ad6b-4fd3-41cf-98c4-82babf3e76d6","executionInfo":{"status":"ok","timestamp":1535749733610,"user_tz":-330,"elapsed":1746,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["print(type(cities['City name'][1]))\n","cities['City name'][1]"],"execution_count":37,"outputs":[{"output_type":"stream","text":["\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/plain":["'San Jose'"]},"metadata":{"tags":[]},"execution_count":37}]},{"metadata":{"id":"gcYX1tBPugZl","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":129},"outputId":"640a01cf-1a7d-4696-e7d9-01d3ed478dce","executionInfo":{"status":"ok","timestamp":1535749735612,"user_tz":-330,"elapsed":1708,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["print(type(cities[0:2]))\n","cities[0:2]"],"execution_count":38,"outputs":[{"output_type":"stream","text":["\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
City namePopulation
0San Francisco852469
1San Jose1015785
\n","
"],"text/plain":[" City name Population\n","0 San Francisco 852469\n","1 San Jose 1015785"]},"metadata":{"tags":[]},"execution_count":38}]},{"metadata":{"id":"65g1ZdGVjXsQ","colab_type":"text"},"cell_type":"markdown","source":["In addition, *pandas* provides an extremely rich API for advanced [indexing and selection](http://pandas.pydata.org/pandas-docs/stable/indexing.html) that is too extensive to be covered here."]},{"metadata":{"id":"RM1iaD-ka3Y1","colab_type":"text"},"cell_type":"markdown","source":["## Manipulating Data\n","\n","You may apply Python's basic arithmetic operations to `Series`. For example:"]},{"metadata":{"id":"XWmyCFJ5bOv-","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":86},"outputId":"92666e04-b27f-407a-fb07-859d2f16ad20","executionInfo":{"status":"ok","timestamp":1535749737620,"user_tz":-330,"elapsed":1766,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["population / 1000."],"execution_count":39,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0 852.469\n","1 1015.785\n","2 485.199\n","dtype: float64"]},"metadata":{"tags":[]},"execution_count":39}]},{"metadata":{"id":"TQzIVnbnmWGM","colab_type":"text"},"cell_type":"markdown","source":["[NumPy](http://www.numpy.org/) is a popular toolkit for scientific computing. *pandas* `Series` can be used as arguments to most NumPy functions:"]},{"metadata":{"id":"ko6pLK6JmkYP","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":86},"outputId":"2278bb5a-915d-42a9-f411-33d21f91a354","executionInfo":{"status":"ok","timestamp":1535749743249,"user_tz":-330,"elapsed":807,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["import numpy as np\n","\n","np.log(population)"],"execution_count":42,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0 13.655892\n","1 13.831172\n","2 13.092314\n","dtype: float64"]},"metadata":{"tags":[]},"execution_count":42}]},{"metadata":{"id":"xmxFuQmurr6d","colab_type":"text"},"cell_type":"markdown","source":["For more complex single-column transformations, you can use `Series.apply`. Like the Python [map function](https://docs.python.org/2/library/functions.html#map), \n","`Series.apply` accepts as an argument a [lambda function](https://docs.python.org/2/tutorial/controlflow.html#lambda-expressions), which is applied to each value.\n","\n","The example below creates a new `Series` that indicates whether `population` is over one million:"]},{"metadata":{"id":"Fc1DvPAbstjI","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":86},"outputId":"c611787c-0967-483a-e909-9f6e311278bd","executionInfo":{"status":"ok","timestamp":1535749757204,"user_tz":-330,"elapsed":1925,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["population.apply(lambda val: val > 1000000)"],"execution_count":48,"outputs":[{"output_type":"execute_result","data":{"text/plain":["0 False\n","1 True\n","2 False\n","dtype: bool"]},"metadata":{"tags":[]},"execution_count":48}]},{"metadata":{"id":"ZeYYLoV9b9fB","colab_type":"text"},"cell_type":"markdown","source":["\n","Modifying `DataFrames` is also straightforward. For example, the following code adds two `Series` to an existing `DataFrame`:"]},{"metadata":{"id":"0gCEX99Hb8LR","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":143},"outputId":"2cfda973-a044-476e-99f7-45f82924ff35","executionInfo":{"status":"ok","timestamp":1535749758905,"user_tz":-330,"elapsed":1137,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["cities['Area square miles'] = pd.Series([46.87, 176.53, 97.92])\n","cities['Population density'] = cities['Population'] / cities['Area square miles']\n","cities"],"execution_count":49,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
City namePopulationArea square milesPopulation density
0San Francisco85246946.8718187.945381
1San Jose1015785176.535754.177760
2Sacramento48519997.924955.055147
\n","
"],"text/plain":[" City name Population Area square miles Population density\n","0 San Francisco 852469 46.87 18187.945381\n","1 San Jose 1015785 176.53 5754.177760\n","2 Sacramento 485199 97.92 4955.055147"]},"metadata":{"tags":[]},"execution_count":49}]},{"metadata":{"id":"6qh63m-ayb-c","colab_type":"text"},"cell_type":"markdown","source":["## Exercise #1\n","\n","Modify the `cities` table by adding a new boolean column that is True if and only if *both* of the following are True:\n","\n"," * The city is named after a saint.\n"," * The city has an area greater than 50 square miles.\n","\n","**Note:** Boolean `Series` are combined using the bitwise, rather than the traditional boolean, operators. For example, when performing *logical and*, use `&` instead of `and`.\n","\n","**Hint:** \"San\" in Spanish means \"saint.\""]},{"metadata":{"id":"zCOn8ftSyddH","colab_type":"code","colab":{}},"cell_type":"code","source":["# Your code here"],"execution_count":0,"outputs":[]},{"metadata":{"id":"YHIWvc9Ms-Ll","colab_type":"text"},"cell_type":"markdown","source":["### Solution\n","\n","Click below for a solution."]},{"metadata":{"id":"T5OlrqtdtCIb","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":143},"outputId":"6b742882-60f4-45ee-fb96-0fc91a311e9c","executionInfo":{"status":"ok","timestamp":1535749762379,"user_tz":-330,"elapsed":1236,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["cities['Is wide and has saint name'] = (cities['Area square miles'] > 50) & cities['City name'].apply(lambda name: name.startswith('San'))\n","cities"],"execution_count":51,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
City namePopulationArea square milesPopulation densityIs wide and has saint name
0San Francisco85246946.8718187.945381False
1San Jose1015785176.535754.177760True
2Sacramento48519997.924955.055147False
\n","
"],"text/plain":[" City name Population Area square miles Population density \\\n","0 San Francisco 852469 46.87 18187.945381 \n","1 San Jose 1015785 176.53 5754.177760 \n","2 Sacramento 485199 97.92 4955.055147 \n","\n"," Is wide and has saint name \n","0 False \n","1 True \n","2 False "]},"metadata":{"tags":[]},"execution_count":51}]},{"metadata":{"id":"f-xAOJeMiXFB","colab_type":"text"},"cell_type":"markdown","source":["## Indexes\n","Both `Series` and `DataFrame` objects also define an `index` property that assigns an identifier value to each `Series` item or `DataFrame` row. \n","\n","By default, at construction, *pandas* assigns index values that reflect the ordering of the source data. Once created, the index values are stable; that is, they do not change when data is reordered."]},{"metadata":{"id":"2684gsWNinq9","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"4f3427da-42ff-4c34-f61e-e88492efda06","executionInfo":{"status":"ok","timestamp":1535749764570,"user_tz":-330,"elapsed":1613,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["city_names.index"],"execution_count":52,"outputs":[{"output_type":"execute_result","data":{"text/plain":["RangeIndex(start=0, stop=3, step=1)"]},"metadata":{"tags":[]},"execution_count":52}]},{"metadata":{"id":"F_qPe2TBjfWd","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"582cce33-6717-4b1e-ebdd-bc25a4b4b847","executionInfo":{"status":"ok","timestamp":1535749767041,"user_tz":-330,"elapsed":2203,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["cities.index"],"execution_count":53,"outputs":[{"output_type":"execute_result","data":{"text/plain":["RangeIndex(start=0, stop=3, step=1)"]},"metadata":{"tags":[]},"execution_count":53}]},{"metadata":{"id":"hp2oWY9Slo_h","colab_type":"text"},"cell_type":"markdown","source":["Call `DataFrame.reindex` to manually reorder the rows. For example, the following has the same effect as sorting by city name:"]},{"metadata":{"id":"sN0zUzSAj-U1","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":143},"outputId":"b4277e62-f228-43bd-ee8b-e7af911b6706","executionInfo":{"status":"ok","timestamp":1535749768741,"user_tz":-330,"elapsed":1444,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["cities.reindex([2, 0, 1])"],"execution_count":54,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
City namePopulationArea square milesPopulation densityIs wide and has saint name
2Sacramento48519997.924955.055147False
0San Francisco85246946.8718187.945381False
1San Jose1015785176.535754.177760True
\n","
"],"text/plain":[" City name Population Area square miles Population density \\\n","2 Sacramento 485199 97.92 4955.055147 \n","0 San Francisco 852469 46.87 18187.945381 \n","1 San Jose 1015785 176.53 5754.177760 \n","\n"," Is wide and has saint name \n","2 False \n","0 False \n","1 True "]},"metadata":{"tags":[]},"execution_count":54}]},{"metadata":{"id":"-GQFz8NZuS06","colab_type":"text"},"cell_type":"markdown","source":["Reindexing is a great way to shuffle (randomize) a `DataFrame`. In the example below, we take the index, which is array-like, and pass it to NumPy's `random.permutation` function, which shuffles its values in place. Calling `reindex` with this shuffled array causes the `DataFrame` rows to be shuffled in the same way.\n","Try running the following cell multiple times!"]},{"metadata":{"id":"aw2q5hoLzAJk","colab_type":"text"},"cell_type":"markdown","source":[""]},{"metadata":{"id":"FfB52qEbzB-I","colab_type":"text"},"cell_type":"markdown","source":[""]},{"metadata":{"id":"mF8GC0k8uYhz","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":143},"outputId":"b32f7078-cf25-4645-ff54-fe4082b1d2c9","executionInfo":{"status":"ok","timestamp":1535749770986,"user_tz":-330,"elapsed":1927,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["cities.reindex(np.random.permutation(cities.index))"],"execution_count":55,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
City namePopulationArea square milesPopulation densityIs wide and has saint name
0San Francisco85246946.8718187.945381False
2Sacramento48519997.924955.055147False
1San Jose1015785176.535754.177760True
\n","
"],"text/plain":[" City name Population Area square miles Population density \\\n","0 San Francisco 852469 46.87 18187.945381 \n","2 Sacramento 485199 97.92 4955.055147 \n","1 San Jose 1015785 176.53 5754.177760 \n","\n"," Is wide and has saint name \n","0 False \n","2 False \n","1 True "]},"metadata":{"tags":[]},"execution_count":55}]},{"metadata":{"id":"fSso35fQmGKb","colab_type":"text"},"cell_type":"markdown","source":["For more information, see the [Index documentation](http://pandas.pydata.org/pandas-docs/stable/indexing.html#index-objects)."]},{"metadata":{"id":"8UngIdVhz8C0","colab_type":"text"},"cell_type":"markdown","source":["## Exercise #2\n","\n","The `reindex` method allows index values that are not in the original `DataFrame`'s index values. Try it and see what happens if you use such values! Why do you think this is allowed?"]},{"metadata":{"id":"PN55GrDX0jzO","colab_type":"code","colab":{}},"cell_type":"code","source":["# Your code here"],"execution_count":0,"outputs":[]},{"metadata":{"id":"TJffr5_Jwqvd","colab_type":"text"},"cell_type":"markdown","source":["### Solution\n","\n","Click below for the solution."]},{"metadata":{"id":"8oSvi2QWwuDH","colab_type":"text"},"cell_type":"markdown","source":["If your `reindex` input array includes values not in the original `DataFrame` index values, `reindex` will add new rows for these \"missing\" indices and populate all corresponding columns with `NaN` values:"]},{"metadata":{"id":"yBdkucKCwy4x","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":175},"outputId":"edd84a2b-6169-429e-e50f-c45396e1e695","executionInfo":{"status":"ok","timestamp":1535749778164,"user_tz":-330,"elapsed":1125,"user":{"displayName":"","photoUrl":"","userId":""}}},"cell_type":"code","source":["cities.reindex([0, 4, 5, 2])"],"execution_count":57,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
City namePopulationArea square milesPopulation densityIs wide and has saint name
0San Francisco852469.046.8718187.945381False
4NaNNaNNaNNaNNaN
5NaNNaNNaNNaNNaN
2Sacramento485199.097.924955.055147False
\n","
"],"text/plain":[" City name Population Area square miles Population density \\\n","0 San Francisco 852469.0 46.87 18187.945381 \n","4 NaN NaN NaN NaN \n","5 NaN NaN NaN NaN \n","2 Sacramento 485199.0 97.92 4955.055147 \n","\n"," Is wide and has saint name \n","0 False \n","4 NaN \n","5 NaN \n","2 False "]},"metadata":{"tags":[]},"execution_count":57}]},{"metadata":{"id":"2l82PhPbwz7g","colab_type":"text"},"cell_type":"markdown","source":["This behavior is desirable because indexes are often strings pulled from the actual data (see the [*pandas* reindex\n","documentation](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.reindex.html) for an example\n","in which the index values are browser names).\n","\n","In this case, allowing \"missing\" indices makes it easy to reindex using an external list, as you don't have to worry about\n","sanitizing the input."]},{"metadata":{"id":"bi2X3slFzIe0","colab_type":"code","colab":{}},"cell_type":"code","source":[""],"execution_count":0,"outputs":[]}]} \ No newline at end of file diff --git a/Deep_Learning/Tensorflow/tensorflow_starters.ipynb b/Deep_Learning/Tensorflow/tensorflow_starters.ipynb deleted file mode 100644 index 75682fdf6..000000000 --- a/Deep_Learning/Tensorflow/tensorflow_starters.ipynb +++ /dev/null @@ -1,3060 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import tensorflow as tf\n", - "import numpy as np\n", - "sess = tf.Session()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Contants,Sequences,Variables" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[2 6]\n", - " [3 8]]\n" - ] - } - ], - "source": [ - "'''Ordinary multiplication'''\n", - "a = tf.constant([1,2],name = 'a')\n", - "b = tf.constant([[2,3],\n", - " [3,4]],name = 'b')\n", - "mul = tf.multiply(a,b,name = 'mul_a_b')\n", - "print(sess.run(mul))" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[0. 0. 0.]\n", - " [0. 0. 0.]]\n" - ] - } - ], - "source": [ - "'''Array of Zeros'''\n", - "zeros = tf.zeros([2,3],name = 'zeros')\n", - "print(sess.run(zeros))" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[[0 0]\n", - " [0 0]]\n", - "\n", - " [[0 0]\n", - " [0 0]]]\n" - ] - } - ], - "source": [ - "'''Array like zeros'''\n", - "zeros_arr = tf.zeros_like([[[2,3],[2,5]],[[2,3],[2,5]]])\n", - "print(sess.run(zeros_arr))" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[1. 1. 1.]\n", - " [1. 1. 1.]]\n" - ] - } - ], - "source": [ - "'''Array of Ones'''\n", - "ones = tf.ones([2,3],name = 'zeros')\n", - "print(sess.run(ones))" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[[1 1]\n", - " [1 1]]\n", - "\n", - " [[1 1]\n", - " [1 1]]]\n" - ] - } - ], - "source": [ - "'''Array like zeros'''\n", - "ones_arr = tf.ones_like([[[2,3],[2,5]],[[2,3],[2,5]]])\n", - "print(sess.run(ones_arr))" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[8 8 8]\n", - " [8 8 8]]\n" - ] - } - ], - "source": [ - "'''Array fill with values'''\n", - "print(sess.run(tf.fill([2,3],8,name = 'fill')))" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.]\n" - ] - } - ], - "source": [ - "'''lin_space same as numpy.lin_space'''\n", - "print(sess.run(tf.lin_space(1.0,10.0,10)))" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[0 1 2 3 4 5 6 7 8 9]\n" - ] - } - ], - "source": [ - "'''Range series of numbers (tf.range is not iteratable)'''\n", - "print(sess.run(tf.range(10)))" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Random Normal :\n", - "\n", - " [[ 0.09564512 -0.10350969 -1.1021149 ]\n", - " [-0.9217262 -0.967303 -1.0380869 ]] \n", - "\n", - "Truncated Normal :\n", - "\n", - " [[-1.0762316 1.2072049 -1.314476 ]\n", - " [-0.224624 -0.1711784 0.40481213]] \n", - "\n", - "Random Uniform :\n", - "\n", - " [[0.67683935 0.8793528 0.807096 ]\n", - " [0.51124835 0.19003403 0.44432235]] \n", - "\n", - "Multinomial :\n", - "\n", - " [[0 0 1 0 1]] \n", - "\n", - "Random gamma :\n", - "\n", - " [[3.2937136e-01 9.8255903e-01]\n", - " [1.9852357e-01 6.0273296e-01]\n", - " [1.3587641e-04 3.0830362e+00]\n", - " [8.6551440e-01 2.8537309e+00]\n", - " [2.8570890e-02 2.8294182e+00]\n", - " [1.2997401e+00 4.8229086e-01]\n", - " [5.5289965e-02 9.8756862e-01]\n", - " [9.2332935e-01 2.7380536e+00]\n", - " [3.1426895e-01 3.3073347e+00]\n", - " [1.3895403e-01 4.8749343e-01]] \n", - "\n" - ] - } - ], - "source": [ - "'''Random generated constants'''\n", - "print('Random Normal :\\n\\n',sess.run( tf.random_normal([2,3])),'\\n')\n", - "print('Truncated Normal :\\n\\n',sess.run( tf.truncated_normal([2,3]) ),'\\n')\n", - "print('Random Uniform :\\n\\n',sess.run( tf.random_uniform([2,3]) ),'\\n')\n", - "'''## Random crop is a image function ##'''\n", - "# print('Random Crop :\\n\\n',sess.run( tf.random_crop(image,[256,256,3]) ),'\\n')\n", - "print('Multinomial :\\n\\n',sess.run( tf.multinomial(tf.log([[10., 10.]]), 5) ),'\\n')\n", - "print('Random gamma :\\n\\n',sess.run( tf.random_gamma([10],[.5,1.5]) ),'\\n')" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'To set a graph-level seed'" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "'''To set a graph-level seed'''\n", - "# tf.set_random_seed()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Arithametic operations" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "25\n" - ] - } - ], - "source": [ - "'''Absolute value (|x|)'''\n", - "print(sess.run(tf.abs(-25)))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "-25\n" - ] - } - ], - "source": [ - "'''Negative (-)'''\n", - "print(sess.run(tf.negative(25)))" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "-1 \n", - " 1\n" - ] - } - ], - "source": [ - "'''Sign(+ -)'''\n", - "print(sess.run(tf.sign(-25)),'\\n',sess.run(tf.sign(25)))" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0.2\n" - ] - } - ], - "source": [ - "'''Reciprocal (1/x)'''\n", - "x = tf.constant(5,dtype= tf.float32)\n", - "print(sess.run(tf.reciprocal(x)))" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "625\n" - ] - } - ], - "source": [ - "'''Square (x^2)'''\n", - "print(sess.run(tf.square(25)))" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0.4472136\n" - ] - } - ], - "source": [ - "'''Reciprocal of square root (y = 1/sqrt(x))'''\n", - "x = tf.constant(5,dtype= tf.float32)\n", - "print(sess.run(tf.rsqrt(x)))" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "25\n" - ] - } - ], - "source": [ - "'''Power (y^x)'''\n", - "print(sess.run(tf.pow(5,2)))" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "22026.465\n" - ] - } - ], - "source": [ - "'''Exponential (y = e^x)'''\n", - "x = tf.constant(10,dtype= tf.float32)\n", - "print(sess.run(tf.exp(x)))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Divsion method" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[0 1]\n", - " [1 1]]\n", - "[[0 1]\n", - " [1 1]]\n", - "[[0 1]\n", - " [1 1]]\n", - "[[0 1]\n", - " [1 1]]\n", - "\n", - "True division\n", - "\n", - "[[0.5 1. ]\n", - " [1. 1.5]]\n", - "[[0.5 1. ]\n", - " [1. 1.5]]\n" - ] - } - ], - "source": [ - "a = tf.constant([2,2],name = 'a')\n", - "b = tf.constant([[1,2],[2,3]],name = 'b')\n", - "print(sess.run(tf.div(b, a)))\n", - "print(sess.run(tf.floordiv(b, a)))\n", - "# print(sess.run(tf.realdiv(c, d)))# Error: only works for real values\n", - "print(sess.run(tf.truncatediv(b, a)))\n", - "print(sess.run(tf.floor_div(b, a)))\n", - "print('\\nTrue division\\n')\n", - "print(sess.run(tf.truediv(b, a)))\n", - "print(sess.run(tf.divide(b, a)))\n", - "print(sess.run(tf.tensordot(a, b, 1)))" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0\n", - "1\n" - ] - } - ], - "source": [ - "'''scalar are treated as the 0 -d tensors'''\n", - "t_o = 2\n", - "print(sess.run(tf.zeros_like(t_o)))\n", - "print(sess.run(tf.ones_like(t_o)))" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[b'' b'' b'']\n" - ] - } - ], - "source": [ - "'''Arrays are treated as 1 -d array'''\n", - "t_1 = ['a','b','c']\n", - "print(sess.run(tf.zeros_like(t_1)))\n", - "#print(sess.run(tf.ones_like(t_1))) #TypeError: Expected string, got 1 of type 'int' instead." - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[False False False]\n", - " [False False False]\n", - " [False False False]] \n", - "\n", - "[[ True True True]\n", - " [ True True True]\n", - " [ True True True]] \n", - "\n", - "[[ True True False]\n", - " [False False False]\n", - " [ True False True]] \n", - "\n" - ] - } - ], - "source": [ - "t_3 = [[True,True,False],\n", - " [False,False,False],\n", - " [True,False,True]]\n", - "print(sess.run(tf.zeros_like(t_3)),'\\n')\n", - "print(sess.run(tf.ones_like(t_3)),'\\n')\n", - "print(sess.run(tf.constant(t_3)),'\\n')" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\n" - ] - }, - { - "data": { - "text/plain": [ - "'So in certain cases like complex number we should declare explicitly'" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "'''Tensorflow uses the numpy datatypes'''\n", - "a = tf.zeros([2, 3], np.int32)\n", - "print(type(a))\n", - "a_np = sess.run(a)\n", - "print(type(a_np))\n", - "'''We should specify the datatypes for certain declartions because the tensorflow default takes the python datatypes'''\n", - "'''So in certain cases like complex number we should declare explicitly'''" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "node {\n", - " name: \"a\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\001\\000\\000\\000\\002\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"b\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\003\\000\\000\\000\\003\\000\\000\\000\\004\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"mul_a_b\"\n", - " op: \"Mul\"\n", - " input: \"a\"\n", - " input: \"b\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " float_val: 0.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_like/tensor\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\003\\000\\000\\000\\002\\000\\000\\000\\005\\000\\000\\000\\002\\000\\000\\000\\003\\000\\000\\000\\002\\000\\000\\000\\005\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_like\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " int_val: 0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_1\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " float_val: 1.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like/tensor\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\003\\000\\000\\000\\002\\000\\000\\000\\005\\000\\000\\000\\002\\000\\000\\000\\003\\000\\000\\000\\002\\000\\000\\000\\005\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like/Shape\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\002\\000\\000\\000\\002\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like/Const\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 1\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like\"\n", - " op: \"Fill\"\n", - " input: \"ones_like/Shape\"\n", - " input: \"ones_like/Const\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"index_type\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"fill/dims\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\003\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"fill/value\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 8\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"fill\"\n", - " op: \"Fill\"\n", - " input: \"fill/dims\"\n", - " input: \"fill/value\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"index_type\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"LinSpace/start\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 1.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"LinSpace/stop\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 10.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"LinSpace/num\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 10\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"LinSpace\"\n", - " op: \"LinSpace\"\n", - " input: \"LinSpace/start\"\n", - " input: \"LinSpace/stop\"\n", - " input: \"LinSpace/num\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"Tidx\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"range/start\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"range/limit\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 10\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"range/delta\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 1\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"range\"\n", - " op: \"Range\"\n", - " input: \"range/start\"\n", - " input: \"range/limit\"\n", - " input: \"range/delta\"\n", - " attr {\n", - " key: \"Tidx\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_normal/shape\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\003\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_normal/mean\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 0.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_normal/stddev\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 1.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_normal/RandomStandardNormal\"\n", - " op: \"RandomStandardNormal\"\n", - " input: \"random_normal/shape\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed2\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_normal/mul\"\n", - " op: \"Mul\"\n", - " input: \"random_normal/RandomStandardNormal\"\n", - " input: \"random_normal/stddev\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_normal\"\n", - " op: \"Add\"\n", - " input: \"random_normal/mul\"\n", - " input: \"random_normal/mean\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truncated_normal/shape\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\003\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truncated_normal/mean\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 0.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truncated_normal/stddev\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 1.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truncated_normal/TruncatedNormal\"\n", - " op: \"TruncatedNormal\"\n", - " input: \"truncated_normal/shape\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed2\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truncated_normal/mul\"\n", - " op: \"Mul\"\n", - " input: \"truncated_normal/TruncatedNormal\"\n", - " input: \"truncated_normal/stddev\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truncated_normal\"\n", - " op: \"Add\"\n", - " input: \"truncated_normal/mul\"\n", - " input: \"truncated_normal/mean\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_uniform/shape\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\003\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_uniform/min\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 0.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_uniform/max\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 1.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_uniform/RandomUniform\"\n", - " op: \"RandomUniform\"\n", - " input: \"random_uniform/shape\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed2\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_uniform/sub\"\n", - " op: \"Sub\"\n", - " input: \"random_uniform/max\"\n", - " input: \"random_uniform/min\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_uniform/mul\"\n", - " op: \"Mul\"\n", - " input: \"random_uniform/RandomUniform\"\n", - " input: \"random_uniform/sub\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_uniform\"\n", - " op: \"Add\"\n", - " input: \"random_uniform/mul\"\n", - " input: \"random_uniform/min\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Log/x\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " dim {\n", - " size: 1\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\000\\000 A\\000\\000 A\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Log\"\n", - " op: \"Log\"\n", - " input: \"Log/x\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"multinomial/Multinomial/num_samples\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 5\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"multinomial/Multinomial\"\n", - " op: \"Multinomial\"\n", - " input: \"Log\"\n", - " input: \"multinomial/Multinomial/num_samples\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"output_dtype\"\n", - " value {\n", - " type: DT_INT64\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed2\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/shape\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 1\n", - " }\n", - " }\n", - " int_val: 10\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/alpha\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\000\\000\\000?\\000\\000\\300?\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/beta\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 1.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/zeros_like\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 0.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/add\"\n", - " op: \"Add\"\n", - " input: \"random_gamma/alpha\"\n", - " input: \"random_gamma/zeros_like\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/RandomGamma\"\n", - " op: \"RandomGamma\"\n", - " input: \"random_gamma/shape\"\n", - " input: \"random_gamma/add\"\n", - " attr {\n", - " key: \"S\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - " attr {\n", - " key: \"seed2\"\n", - " value {\n", - " i: 0\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/truediv\"\n", - " op: \"RealDiv\"\n", - " input: \"random_gamma/RandomGamma\"\n", - " input: \"random_gamma/beta\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/Maximum/x\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 1.1754943508222875e-38\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"random_gamma/Maximum\"\n", - " op: \"Maximum\"\n", - " input: \"random_gamma/Maximum/x\"\n", - " input: \"random_gamma/truediv\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Abs/x\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: -25\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Abs\"\n", - " op: \"Abs\"\n", - " input: \"Abs/x\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Neg/x\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 25\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Neg\"\n", - " op: \"Neg\"\n", - " input: \"Neg/x\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Sign/x\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: -25\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Sign\"\n", - " op: \"Sign\"\n", - " input: \"Sign/x\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Sign_1/x\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 25\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Sign_1\"\n", - " op: \"Sign\"\n", - " input: \"Sign_1/x\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Const\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 5.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Reciprocal\"\n", - " op: \"Reciprocal\"\n", - " input: \"Const\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Square/x\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 25\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Square\"\n", - " op: \"Square\"\n", - " input: \"Square/x\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Const_1\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 5.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Rsqrt\"\n", - " op: \"Rsqrt\"\n", - " input: \"Const_1\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Pow/x\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 5\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Pow/y\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 2\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Pow\"\n", - " op: \"Pow\"\n", - " input: \"Pow/x\"\n", - " input: \"Pow/y\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Const_2\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_FLOAT\n", - " tensor_shape {\n", - " }\n", - " float_val: 10.0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Exp\"\n", - " op: \"Exp\"\n", - " input: \"Const_2\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_FLOAT\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"a_1\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\002\\000\\000\\000\\002\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"b_1\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\001\\000\\000\\000\\002\\000\\000\\000\\002\\000\\000\\000\\003\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"div\"\n", - " op: \"FloorDiv\"\n", - " input: \"b_1\"\n", - " input: \"a_1\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"floordiv\"\n", - " op: \"FloorDiv\"\n", - " input: \"b_1\"\n", - " input: \"a_1\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"TruncateDiv\"\n", - " op: \"TruncateDiv\"\n", - " input: \"b_1\"\n", - " input: \"a_1\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"FloorDiv\"\n", - " op: \"FloorDiv\"\n", - " input: \"b_1\"\n", - " input: \"a_1\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truediv/Cast\"\n", - " op: \"Cast\"\n", - " input: \"b_1\"\n", - " attr {\n", - " key: \"DstT\"\n", - " value {\n", - " type: DT_DOUBLE\n", - " }\n", - " }\n", - " attr {\n", - " key: \"SrcT\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truediv/Cast_1\"\n", - " op: \"Cast\"\n", - " input: \"a_1\"\n", - " attr {\n", - " key: \"DstT\"\n", - " value {\n", - " type: DT_DOUBLE\n", - " }\n", - " }\n", - " attr {\n", - " key: \"SrcT\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truediv\"\n", - " op: \"RealDiv\"\n", - " input: \"truediv/Cast\"\n", - " input: \"truediv/Cast_1\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_DOUBLE\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truediv_1/Cast\"\n", - " op: \"Cast\"\n", - " input: \"b_1\"\n", - " attr {\n", - " key: \"DstT\"\n", - " value {\n", - " type: DT_DOUBLE\n", - " }\n", - " }\n", - " attr {\n", - " key: \"SrcT\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truediv_1/Cast_1\"\n", - " op: \"Cast\"\n", - " input: \"a_1\"\n", - " attr {\n", - " key: \"DstT\"\n", - " value {\n", - " type: DT_DOUBLE\n", - " }\n", - " }\n", - " attr {\n", - " key: \"SrcT\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"truediv_1\"\n", - " op: \"RealDiv\"\n", - " input: \"truediv_1/Cast\"\n", - " input: \"truediv_1/Cast_1\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_DOUBLE\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_like_1/tensor\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 2\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_like_1\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like_1/tensor\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 2\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like_1/Shape\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " }\n", - " }\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like_1/Const\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " }\n", - " int_val: 1\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like_1\"\n", - " op: \"Fill\"\n", - " input: \"ones_like_1/Shape\"\n", - " input: \"ones_like_1/Const\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"index_type\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_like_2/tensor\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_STRING\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_STRING\n", - " tensor_shape {\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " string_val: \"a\"\n", - " string_val: \"b\"\n", - " string_val: \"c\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_like_2\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_STRING\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_STRING\n", - " tensor_shape {\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " string_val: \"\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_like_3/tensor\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_BOOL\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_BOOL\n", - " tensor_shape {\n", - " dim {\n", - " size: 3\n", - " }\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " bool_val: true\n", - " bool_val: true\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: true\n", - " bool_val: false\n", - " bool_val: true\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_like_3\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_BOOL\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_BOOL\n", - " tensor_shape {\n", - " dim {\n", - " size: 3\n", - " }\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " bool_val: false\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like_2/tensor\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_BOOL\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_BOOL\n", - " tensor_shape {\n", - " dim {\n", - " size: 3\n", - " }\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " bool_val: true\n", - " bool_val: true\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: true\n", - " bool_val: false\n", - " bool_val: true\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like_2/Shape\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " }\n", - " tensor_content: \"\\003\\000\\000\\000\\003\\000\\000\\000\"\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like_2/Const\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_BOOL\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_BOOL\n", - " tensor_shape {\n", - " }\n", - " bool_val: true\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"ones_like_2\"\n", - " op: \"Fill\"\n", - " input: \"ones_like_2/Shape\"\n", - " input: \"ones_like_2/Const\"\n", - " attr {\n", - " key: \"T\"\n", - " value {\n", - " type: DT_BOOL\n", - " }\n", - " }\n", - " attr {\n", - " key: \"index_type\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"Const_3\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_BOOL\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_BOOL\n", - " tensor_shape {\n", - " dim {\n", - " size: 3\n", - " }\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " bool_val: true\n", - " bool_val: true\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: false\n", - " bool_val: true\n", - " bool_val: false\n", - " bool_val: true\n", - " }\n", - " }\n", - " }\n", - "}\n", - "node {\n", - " name: \"zeros_2\"\n", - " op: \"Const\"\n", - " attr {\n", - " key: \"dtype\"\n", - " value {\n", - " type: DT_INT32\n", - " }\n", - " }\n", - " attr {\n", - " key: \"value\"\n", - " value {\n", - " tensor {\n", - " dtype: DT_INT32\n", - " tensor_shape {\n", - " dim {\n", - " size: 2\n", - " }\n", - " dim {\n", - " size: 3\n", - " }\n", - " }\n", - " int_val: 0\n", - " }\n", - " }\n", - " }\n", - "}\n", - "versions {\n", - " producer: 26\n", - "}\n", - "\n" - ] - }, - { - "data": { - "text/plain": [ - "'This makes loading graphs expensive when constants are big'" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "'''Get graph definition from session'''\n", - "print(sess.graph.as_graph_def())\n", - "'''we can see that the constants as stored in tensor contants so for defining constant there is a after effect of'''\n", - "'''This makes loading graphs expensive when constants are big'''" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Variables" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2 \n", - "\n", - "[2 3] \n", - "\n", - "[[0. 0. 0. ... 0. 0. 0.]\n", - " [0. 0. 0. ... 0. 0. 0.]\n", - " [0. 0. 0. ... 0. 0. 0.]\n", - " ...\n", - " [0. 0. 0. ... 0. 0. 0.]\n", - " [0. 0. 0. ... 0. 0. 0.]\n", - " [0. 0. 0. ... 0. 0. 0.]] \n", - "\n" - ] - }, - { - "data": { - "text/plain": [ - "'The tf.Variables contains many ops'" - ] - }, - "execution_count": 26, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "'''Ordinary Variable initialization'''\n", - "a = tf.Variable(2,name= 'scalar' )\n", - "b = tf.Variable([2,3],name= 'matrix' )\n", - "c = tf.Variable(tf.zeros([800,10]))\n", - "sess.run(a.initializer)\n", - "sess.run(b.initializer)\n", - "sess.run(c.initializer)\n", - "\n", - "print(sess.run(a),'\\n')\n", - "print(sess.run(b),'\\n')\n", - "print(sess.run(c),'\\n')\n", - "'''The tf.Variables contains many ops'''" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2\n", - "[[0 1]\n", - " [2 3]]\n", - "[[0. 0. 0. ... 0. 0. 0.]\n", - " [0. 0. 0. ... 0. 0. 0.]\n", - " [0. 0. 0. ... 0. 0. 0.]\n", - " ...\n", - " [0. 0. 0. ... 0. 0. 0.]\n", - " [0. 0. 0. ... 0. 0. 0.]\n", - " [0. 0. 0. ... 0. 0. 0.]]\n" - ] - }, - { - "data": { - "text/plain": [ - "'This variables cannot be reinitialized'" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "'''Variable initializer with get variables'''\n", - "s = tf.get_variable(\"scalar\", initializer=tf.constant(2)) \n", - "m = tf.get_variable(\"matrix\", initializer=tf.constant([[0, 1], [2, 3]]))\n", - "W = tf.get_variable(\"big_matrix\", shape=(784, 10), initializer=tf.zeros_initializer())\n", - "sess.run(tf.global_variables_initializer())\n", - "#sess.run(tf.variables_initializer([s, m])) #->needed variable initialization\n", - "# sess.run(W.initializer) #-> single variable initializer then to get data do W.eval()\n", - "print(sess.run(s))\n", - "print(sess.run(m))\n", - "print(sess.run(W))\n", - "'''This variables cannot be reinitialized'''" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "100\n" - ] - } - ], - "source": [ - "'''tf.assign'''\n", - "W = tf.Variable(10)\n", - "assign_op = W.assign(100)\n", - "with tf.Session() as sess:\n", - " sess.run(W.initializer)\n", - " sess.run(assign_op)\n", - " print(W.eval())" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1000\n", - "100000\n", - "10000000\n", - "1000000000\n", - "1215752192\n" - ] - } - ], - "source": [ - "'''tf.assign'''\n", - "W = tf.Variable(10)\n", - "assign_op = W.assign(100 * W)\n", - "with tf.Session() as sess:\n", - " sess.run(W.initializer)\n", - " print(sess.run(assign_op))\n", - " print(sess.run(assign_op))\n", - " print(sess.run(assign_op))\n", - " print(sess.run(assign_op))\n", - " print(sess.run(assign_op))\n", - "# print(W.eval())" - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "20\n", - "30\n", - "28\n" - ] - } - ], - "source": [ - "'''assign_add and assign_sub'''\n", - "my_var = tf.Variable(10)\n", - "with tf.Session() as sess:\n", - " sess.run(my_var.initializer)\n", - " print(sess.run(my_var.assign_add(10))) # >> 20\n", - " print(sess.run(my_var.assign_add(10))) # >> 30\n", - " print(sess.run(my_var.assign_sub(2))) # >> 18" - ] - }, - { - "cell_type": "code", - "execution_count": 60, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "4\n" - ] - } - ], - "source": [ - "'''Control dependencies'''\n", - "a = tf.Variable(2,name= 'scalar' )\n", - "b = tf.Variable(2,name= 'scalar' )\n", - "sess = tf.Session() \n", - "sess.run(a.initializer)\n", - "sess.run(b.initializer)\n", - "g = tf.get_default_graph()\n", - "with g.control_dependencies([a,b]):\n", - " d = tf.add(a,b)\n", - " print(sess.run(d))\n", - " '''This will be executed after the a and b is executed'''" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Placeholders" - ] - }, - { - "cell_type": "code", - "execution_count": 68, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[6. 6. 6.]\n" - ] - } - ], - "source": [ - "'''Placeholder are used so that we can assign unknown values'''\n", - "a = tf.placeholder(tf.float32,name='a')\n", - "b = tf.Variable([5,5,5],name = 'b',dtype = tf.float32)\n", - "c = tf.add(a,b)\n", - "sess.run(a.initializer)\n", - "with tf.Session() as sess:\n", - " sess.run(b.initializer)\n", - " print(sess.run(c,feed_dict={a: [1,1,1]})) # we provide values for palceholder using the feed dict\n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": 70, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 70, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "'''check if the tensor is feedable'''\n", - "g = tf.get_default_graph()\n", - "g.is_feedable(a)" - ] - }, - { - "cell_type": "code", - "execution_count": 74, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "25\n", - "10\n" - ] - } - ], - "source": [ - "'''we can override the operation by giving the feed dict value'''\n", - "a = tf.add(2,3)\n", - "b = tf.multiply(a,5)\n", - "with tf.Session() as sess:\n", - " print(sess.run(b))\n", - " print(sess.run(b,feed_dict={a:2}))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Lazy loading \n", - "`Defer creating/initializing an object \n", - "until it is needed\n", - "`" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### `Normal loading`" - ] - }, - { - "cell_type": "code", - "execution_count": 77, - "metadata": {}, - "outputs": [], - "source": [ - "x = tf.Variable(10, name='x')\n", - "y = tf.Variable(20, name='y')\n", - "z = tf.add(x, y)\n", - "writer = tf.summary.FileWriter('tmp/graph/normal_loading', tf.get_default_graph())\n", - "with tf.Session() as sess:\n", - " sess.run(tf.global_variables_initializer())\n", - " for _ in range(10):\n", - " sess.run(z)\n", - "writer.close()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### `Lazy loading`" - ] - }, - { - "cell_type": "code", - "execution_count": 78, - "metadata": {}, - "outputs": [], - "source": [ - "x = tf.Variable(10, name='x')\n", - "y = tf.Variable(20, name='y')\n", - "\n", - "writer = tf.summary.FileWriter('tmp/graph/lazy_loading', tf.get_default_graph())\n", - "with tf.Session() as sess:\n", - " sess.run(tf.global_variables_initializer())\n", - " for _ in range(10):\n", - " sess.run(tf.add(x, y)) # someone decides to be clever to save one line of code\n", - "writer.close()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Thus both execute correctly thus then the change comes when you run with a million\n", - "iteration loop of session run in lazy loading the graph get heavy and it will have a \n", - "huge load The actual thing what is happening behind scene is the in lazy loading node \n", - "for add increases with run so we will get so many nodes if get go look at the \n", - "```python\n", - "tf.get_default_graph().as_graph_def() \n", - "``` \n", - "we can see that" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### MatMultiplication" - ] - }, - { - "cell_type": "code", - "execution_count": 81, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[ 8 11]\n", - " [16 23]]\n" - ] - } - ], - "source": [ - "'''Ordinary MatMul-tiplication'''\n", - "mat_a = tf.constant([[1,2],\n", - " [5,2]],name = 'mat_a')\n", - "mat_b = tf.constant([[2,3],\n", - " [3,4]],name = 'mat_b')\n", - "mat_mul = tf.matmul(mat_a,mat_b,name = 'matmul_a_b')\n", - "sess = tf.Session()\n", - "print(sess.run(mat_mul))" - ] - }, - { - "cell_type": "code", - "execution_count": 82, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 82, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "x = tf.constant(5,dtype=tf.float64)\n", - "x + tf.cast(tf.equal(x, 0), x.dtype)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.5" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/Deep_Learning/Tensorflow/tf_estimators.ipynb b/Deep_Learning/Tensorflow/tf_estimators.ipynb deleted file mode 100644 index 902666c30..000000000 Binary files a/Deep_Learning/Tensorflow/tf_estimators.ipynb and /dev/null differ diff --git a/Delphi/HelloWorld.pas b/Delphi/HelloWorld.pas deleted file mode 100644 index 2a3111c70..000000000 --- a/Delphi/HelloWorld.pas +++ /dev/null @@ -1,8 +0,0 @@ -program HelloWorld; - -{$APPTYPE CONSOLE} - -begin - WriteLn('Hello World'); - ReadLn; -end. diff --git a/Django/HelloWorld/HelloWorld/Template/index.html b/Django/HelloWorld/HelloWorld/Template/index.html deleted file mode 100644 index cd7f85366..000000000 --- a/Django/HelloWorld/HelloWorld/Template/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - Hacktober - - - -

Hello from Django Community !!

Welcome To Hacktober Fest

- - - diff --git a/Django/HelloWorld/HelloWorld/settings.py b/Django/HelloWorld/HelloWorld/settings.py deleted file mode 100644 index b38d4aef2..000000000 --- a/Django/HelloWorld/HelloWorld/settings.py +++ /dev/null @@ -1,122 +0,0 @@ -""" -Django settings for HelloWorld project. - -Generated by 'django-admin startproject' using Django 1.11.11. - -For more information on this file, see -https://docs.djangoproject.com/en/1.11/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.11/ref/settings/ -""" - -import os - -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '@7zw8q3d%1vhc*f=$gm7^t#7)7g)n)dxhs5dfd^9%5*v!m#ea0' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', -] - -MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -] - -ROOT_URLCONF = 'HelloWorld.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [ - os.path.join(__file__, '../Template'), - ], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'HelloWorld.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/1.11/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } -} - - -# Password validation -# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - - -# Internationalization -# https://docs.djangoproject.com/en/1.11/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.11/howto/static-files/ - -STATIC_URL = '/static/' diff --git a/Django/HelloWorld/HelloWorld/urls.py b/Django/HelloWorld/HelloWorld/urls.py deleted file mode 100644 index e45dfb113..000000000 --- a/Django/HelloWorld/HelloWorld/urls.py +++ /dev/null @@ -1,25 +0,0 @@ -"""HelloWorld URL Configuration - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/1.11/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.conf.urls import url, include - 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) -""" -from django.conf.urls import url -from django.contrib import admin -from django.views.generic import TemplateView - - -urlpatterns = [ - # url(r'^admin/', admin.site.urls), - url(r'^$',TemplateView.as_view(template_name='index.html'),name='home'), - -] diff --git a/Django/HelloWorld/HelloWorld/wsgi.py b/Django/HelloWorld/HelloWorld/wsgi.py deleted file mode 100644 index ef7a9d203..000000000 --- a/Django/HelloWorld/HelloWorld/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for HelloWorld project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HelloWorld.settings") - -application = get_wsgi_application() diff --git a/Django/HelloWorld/db.sqlite3 b/Django/HelloWorld/db.sqlite3 deleted file mode 100644 index a07dc2043..000000000 Binary files a/Django/HelloWorld/db.sqlite3 and /dev/null differ diff --git a/Django/HelloWorld/manage.py b/Django/HelloWorld/manage.py deleted file mode 100644 index 401e822aa..000000000 --- a/Django/HelloWorld/manage.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 -import os -import sys - -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HelloWorld.settings") - try: - from django.core.management import execute_from_command_line - except ImportError: - # The above import may fail for some other reason. Ensure that the - # issue is really that Django is missing to avoid masking other - # exceptions on Python 2. - try: - import django - except ImportError: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) - raise - execute_from_command_line(sys.argv) diff --git a/Django/README.md b/Django/README.md deleted file mode 100644 index 070a3bbce..000000000 --- a/Django/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## DJango 1.9 - -run python3 manage.py runserver and browse to 127.0.0.1:8000/ diff --git a/Docker/hello-world.dockerfile b/Docker/hello-world.dockerfile deleted file mode 100644 index 09c9d6bbb..000000000 --- a/Docker/hello-world.dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# Steps to run (must have Docker installed!) -# Build the image using: -# $ docker build -f hello-world.dockerfile -t hello-world . -# Run the image using: -# $ docker run --rm hello-world -# --rm deletes the container once the program runs -# so that it doesn't take up precious disk space! -# -f specifies this dockerfile and -t gives the image -# a name - - -# Pulls the latest bash image from Docker Hub -FROM bash:latest - -LABEL author="Alberto Franco @afranco07" - -# Runs the command `$ echo Hello, world!` -CMD [ "echo", "Hello, world!" ] - -# To delete image: -# docker rmi hello-world - diff --git a/Docker/hello_word_docker.dockerfile b/Docker/hello_word_docker.dockerfile deleted file mode 100644 index 8f78ff2f1..000000000 --- a/Docker/hello_word_docker.dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM bash:latest - -CMD [ "echo", "Hello, world!" ] diff --git a/DoubleFuck/hello_world b/DoubleFuck/hello_world deleted file mode 100644 index e970026ab..000000000 --- a/DoubleFuck/hello_world +++ /dev/null @@ -1,2 +0,0 @@ -v++++++++++[-///////v//////////v////v///v////////^^^^>+++++++++++<]//:v/:///////::///:v////:v//: -v///////:>+.+++.------.--------. diff --git a/ECMAScript/index.html b/ECMAScript/index.html deleted file mode 100644 index 166cc89a2..000000000 --- a/ECMAScript/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - Hello World - Maleesha - - - - - - - \ No newline at end of file diff --git a/ECMAScript/index.js b/ECMAScript/index.js deleted file mode 100644 index 449494363..000000000 --- a/ECMAScript/index.js +++ /dev/null @@ -1,4 +0,0 @@ -const helloWorld = () => { - console.log("Hello World..!"); -} -helloWorld(); \ No newline at end of file diff --git a/EDSAC/README.txt b/EDSAC/README.txt deleted file mode 100644 index 867f59ee3..000000000 --- a/EDSAC/README.txt +++ /dev/null @@ -1,12 +0,0 @@ -*********************************************************************************** -* HELLO WORLD written in EDSAC - Initial Orders 2. -* -* Code is gathered from Computherphile, courtesy of University of Nottingham. -* https://www.youtube.com/watch?v=rf6oFSEdbKI -*********************************************************************************** - -Required: An EDSAC simulator. ( https://www.youtube.com/watch?v=lXJ-tYqPARg ) - -You can get the simulator here: http://bit.ly/c_EDSACSim - -More about EDSAC: https://www.youtube.com/watch?v=nc2q4OOK6K8 diff --git a/EDSAC/helloworld b/EDSAC/helloworld deleted file mode 100644 index c2e32ea41..000000000 --- a/EDSAC/helloworld +++ /dev/null @@ -1,33 +0,0 @@ -T64K -GK -ZF -O16@ -O17@ -O18@ -O19@ -O20@ -O21@ -O22@ -O23@ -O24@ -O25@ -O26@ -O27@ -O28@ -O29@ -ZF -*F -HF -EF -LF -LF -OF -!F -WF -OF -RF -LF -DF -@F -&F -EZPF diff --git a/EJS/README.md b/EJS/README.md deleted file mode 100644 index 94df6631f..000000000 --- a/EJS/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# EJS - -## Install Dependency -npm install - -## Run -npm start diff --git a/EJS/index.js b/EJS/index.js deleted file mode 100644 index c0e6576d7..000000000 --- a/EJS/index.js +++ /dev/null @@ -1,13 +0,0 @@ -const express = require('express'); -const app = express(); -var port = 3000 || process.env.PORT; - -app.set('view engine', 'ejs'); - -app.get("/", (req, res) => { - res.render('index.ejs'); -}); - -app.listen(port, function() { - console.log('running on port ${port}'); -} diff --git a/EJS/package.json b/EJS/package.json deleted file mode 100644 index 207cf8d69..000000000 --- a/EJS/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "embededjs", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "start": "node index.js" - }, - "author": "anish", - "license": "ISC", - "dependencies": { - "ejs": "^2.6.1", - "express": "^4.16.3" - } -} diff --git a/EJS/views/index.ejs b/EJS/views/index.ejs deleted file mode 100644 index 9a1eb8d21..000000000 --- a/EJS/views/index.ejs +++ /dev/null @@ -1 +0,0 @@ -

Hello World

\ No newline at end of file diff --git a/EPL/README.md b/EPL/README.md deleted file mode 100644 index 90fcc0f1c..000000000 --- a/EPL/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Easy Programming Language - -**Easy Programming Language** (**EPL**, [Chinese](https://en.wikipedia.org/wiki/Chinese_language): 易语言) is a Chinese [programming language](https://en.wikipedia.org/wiki/Programming_language), featuring a full Chinese environment. Its community may be the largest of all [non-English-based programming languages](https://en.wikipedia.org/wiki/Non-English-based_programming_languages). EPL is somewhat popular in China, considering the difficulties of adopting English for most Chinese speakers. - -## External links - -- [EPL homepage](https://web.archive.org/web/20150916172034/http://epl.eyuyan.com/) at archive.org - - - -## ScreenShots - -- The form editor - -![](screenshots/screenshot1.png) - -- The source code editor - - ![](screenshots/screenshot2.png) - - The code text in file `你好世界.e` : - - ``` - .版本 2 - - .程序集 窗口程序集_启动窗口 - - .子程序 _打招呼_被单击 - - - 信息框 (“你好,世界!”, 0, , ) - - - ``` - - - -- debugging - - ![](screenshots/screenshot3.png) \ No newline at end of file diff --git a/EPL/screenshots/screenshot1.png b/EPL/screenshots/screenshot1.png deleted file mode 100644 index deb8e3f68..000000000 Binary files a/EPL/screenshots/screenshot1.png and /dev/null differ diff --git a/EPL/screenshots/screenshot2.png b/EPL/screenshots/screenshot2.png deleted file mode 100644 index 92cc4a9b5..000000000 Binary files a/EPL/screenshots/screenshot2.png and /dev/null differ diff --git a/EPL/screenshots/screenshot3.png b/EPL/screenshots/screenshot3.png deleted file mode 100644 index 8358fe5a4..000000000 Binary files a/EPL/screenshots/screenshot3.png and /dev/null differ diff --git "a/EPL/\344\275\240\345\245\275\344\270\226\347\225\214.e" "b/EPL/\344\275\240\345\245\275\344\270\226\347\225\214.e" deleted file mode 100644 index bbe7bdaf7..000000000 Binary files "a/EPL/\344\275\240\345\245\275\344\270\226\347\225\214.e" and /dev/null differ diff --git a/Efene/hello_efene.fn b/Efene/hello_efene.fn deleted file mode 100644 index 0bce347b6..000000000 --- a/Efene/hello_efene.fn +++ /dev/null @@ -1,5 +0,0 @@ - -fn main @public case _Args: - io.format("Hello World\n") - erlang.halt(0) -end diff --git a/Egison/hello-world.egi b/Egison/hello-world.egi deleted file mode 100644 index d37cfa70e..000000000 --- a/Egison/hello-world.egi +++ /dev/null @@ -1,3 +0,0 @@ -(define $main - (lambda [$args] - (write "Hello, world!\n"))) diff --git a/Eiffel/hello_world.xhtml b/Eiffel/hello_world.xhtml deleted file mode 100644 index 435fa92bf..000000000 --- a/Eiffel/hello_world.xhtml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - Hello World! - - - -

Hello World!

- - diff --git a/Electron/app.js b/Electron/app.js deleted file mode 100644 index 4b6a52638..000000000 --- a/Electron/app.js +++ /dev/null @@ -1,18 +0,0 @@ -const { app, BrowserWindow } = require('electron'); -const url = require('url'); -const path = require('path'); - -let mainWindow; - -app.on('ready', () => { - mainWindow = new BrowserWindow({}); - mainWindow.loadURL( - url.format({ - pathname: path.join(__dirname, 'index.html'), - protocol: 'file:', - slashes: true - }) - ); -}); - -process.env['APP_PATH'] = app.getAppPath(); diff --git a/Electron/index.html b/Electron/index.html deleted file mode 100644 index e212f0950..000000000 --- a/Electron/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - Hello World - - - - -

Hello World

- - - \ No newline at end of file diff --git a/Elixir/HelloWorld.ex b/Elixir/HelloWorld.ex deleted file mode 100644 index 8c984b8ec..000000000 --- a/Elixir/HelloWorld.ex +++ /dev/null @@ -1,31 +0,0 @@ -defmodule SayHello do - @moduledoc """ - A SayHello module that simply prints hello world. - """ - - @doc """ - English implementation of an hello world. - - ## Examples - - iex> SayHello.in_english - Hello World! - :ok - """ - def in_english do - IO.puts "Hello World!" - end - - @doc """ - Italian implementation of an hello world. - - ## Examples - - iex> SayHello.in_italian - Ciao Mondo! - :ok - """ - def in_english do - IO.puts "Ciao Mondo!" - end -end diff --git a/Elixir/fibonacci.ex b/Elixir/fibonacci.ex deleted file mode 100644 index 7e102112f..000000000 --- a/Elixir/fibonacci.ex +++ /dev/null @@ -1,17 +0,0 @@ -defmodule Fibonacci do - - def get_fibonacci(number) when is_integer(number) and number >= 0 do - calculate_fibonacci(number) |> IO.inspect - end - - def get_fibonacci(_number) do - IO.inspect("Enter a positive integer!") - end - - def calculate_fibonacci(number) when number in 0..1, do: 1 - - def calculate_fibonacci(number) do - calculate_fibonacci(number - 1) + calculate_fibonacci(number - 2) - end -end - diff --git a/Elixir/fizzbuzz.ex b/Elixir/fizzbuzz.ex deleted file mode 100644 index bec9f4491..000000000 --- a/Elixir/fizzbuzz.ex +++ /dev/null @@ -1,12 +0,0 @@ -defmodule FizzBuzz do - def to(max) do - 1..max |> Enum.each fn(n) -> - case {rem(n, 3) === 0, rem(n, 5) === 0} do - {true, true} -> IO.puts "#{n} FizzBuzz" - {true, false} -> IO.puts "#{n} Fizz" - {false, true} -> IO.puts "#{n} Bazz" - _ -> IO.puts n - end - end - end -end diff --git a/Elixir/is_it_prime.ex b/Elixir/is_it_prime.ex deleted file mode 100644 index f4fb0819e..000000000 --- a/Elixir/is_it_prime.ex +++ /dev/null @@ -1,18 +0,0 @@ -defmodule PrimeNumbers do - - def print_possible_prime(number) when number == 2 do - IO.inspect(" #{number} is prime") - end - def print_possible_prime(number) do - case fermat_little_thm(number) - 1 do - 0 -> IO.inspect("#{number} is prime") - _ -> IO.inspect("#{number} is not a prime") - end - end - - def fermat_little_thm(number) do - :math.pow(2, number - 1) - |> round - |> rem(number) - end -end diff --git a/Elixir/jelixir.ex b/Elixir/jelixir.ex deleted file mode 100644 index edfe8ed35..000000000 --- a/Elixir/jelixir.ex +++ /dev/null @@ -1,5 +0,0 @@ -defmodule printhandle do - def in_english do - IO.puts "JBAhire" - end -end diff --git a/Elixir/sort.ex b/Elixir/sort.ex deleted file mode 100644 index 30955d156..000000000 --- a/Elixir/sort.ex +++ /dev/null @@ -1,54 +0,0 @@ -defmodule Sort do - # insert element at right place in list - defp _insert(element, []), do: [element] - defp _insert(element, [head | tail]) when element <= head do - [element, head | tail] - end - defp _insert(element, [head|tail]) do - [head|_insert(element, tail)] - end - # use insert to do an insertion sort - def isort(l), do: isort(l,[]) - def isort([], sorted), do: sorted - def isort([head|rest], sorted) do - isort(rest, _insert(head, sorted)) - end - - # merge sort - def merge([], y), do: y - def merge(x, []), do: x - def merge([xh|xt]=x, [yh|yt]=y) when xh > yh, do: [yh | merge(x,yt)] - def merge([xh|xt]=x, y), do: [xh | merge(xt, y)] - - def msort([]), do: [] - def msort([x]), do: [x] - def msort(l) do - {left, right} = msplit(l,[],[]) - merge(msort(left), msort(right)) - end - - def msplit([], left, right), do: {left, right} - def msplit([head|tail], left, right) do - msplit(tail, [head | right], left) - end - - # quicksort - def qsort([]), do: [] - def qsort([p|l]) do - {left, right} = qsplit(p, l, [], []) - small = qsort(left) - large = qsort(right) - append(small, [p|large]) - end - - def qsplit(_, [], small, large), do: {small, large} - def qsplit(p, [h|t], small, large) do - cond do - h <= p -> qsplit(p, t, [h|small], large) - true -> qsplit(p, t, small, [h|large]) - end - end - - def append([], back), do: back - def append([h|t], back), do: [h|append(t,back)] -end diff --git a/Elm/ELM 2/Hello.elm b/Elm/ELM 2/Hello.elm deleted file mode 100755 index 1108cb95f..000000000 --- a/Elm/ELM 2/Hello.elm +++ /dev/null @@ -1,7 +0,0 @@ -module Hello exposing (..) - -import Html exposing (text) - - -main = - text "Hello" \ No newline at end of file diff --git a/Elm/ELM 2/Info.txt b/Elm/ELM 2/Info.txt deleted file mode 100755 index 42feada30..000000000 --- a/Elm/ELM 2/Info.txt +++ /dev/null @@ -1,8 +0,0 @@ - - -Elm uses type inference to detect corner cases and give friendly hints. -For example, what if someone provides invalid inputs? NoRedInk switched to Elm about two years ago, -and 250k+ lines later, -they still have not had to scramble to fix a confusing runtime exception in production. - -GO HERE : https://elm-lang.org/ \ No newline at end of file diff --git a/Elm/hello.elm b/Elm/hello.elm deleted file mode 100644 index 73d915863..000000000 --- a/Elm/hello.elm +++ /dev/null @@ -1,7 +0,0 @@ -module Hello exposing (..) - -import Html exposing (text) - -main: Html msg -main = - text "Hello" diff --git a/Emmental/glarotech.emmental b/Emmental/glarotech.emmental deleted file mode 100644 index cf8d71536..000000000 --- a/Emmental/glarotech.emmental +++ /dev/null @@ -1 +0,0 @@ -#0#104#99#101#116#111#114#97#108#71............... diff --git a/Emojicode/fizzbuzz.emojic b/Emojicode/fizzbuzz.emojic deleted file mode 100644 index 25c8a4e1b..000000000 --- a/Emojicode/fizzbuzz.emojic +++ /dev/null @@ -1,16 +0,0 @@ -🏁 🍇 - 🔂 i 🆕⏩⏭ 1 101 1❗️ 🍇 - ↪️ i 🚮 15 🙌 0 🍇 - 😀 🔤Fizz Buzz🔤❗️ - 🍉 - 🙅↪️ i 🚮 3 🙌 0 🍇 - 😀 🔤Fizz🔤❗️ - 🍉 - 🙅↪️ i 🚮 5 🙌 0 🍇 - 😀 🔤Buzz🔤❗️ - 🍉 - 🙅 🍇 - 😀 🔡 i 10 ❗️ ❗️ - 🍉 - 🍉 -🍉 diff --git a/Emojicode/helloworld.emojic b/Emojicode/helloworld.emojic deleted file mode 100644 index 7a2e1ed5b..000000000 --- a/Emojicode/helloworld.emojic +++ /dev/null @@ -1,6 +0,0 @@ -🐇 🐼 🍇 - 🐇🐖 🏁 ➡️ 🚂 🍇 - 😀 🔤Hello, world!🔤 - 🍎 0 - 🍉 -🍉 \ No newline at end of file diff --git a/Emojicode/helloworld_ca.emojic b/Emojicode/helloworld_ca.emojic deleted file mode 100644 index 5b4360529..000000000 --- a/Emojicode/helloworld_ca.emojic +++ /dev/null @@ -1,3 +0,0 @@ -🏁 🍇 - 😀 🔤Hey from Canada!🔤❗️ -🍉 diff --git a/Emojicode/sum.emojic b/Emojicode/sum.emojic deleted file mode 100644 index e526525f4..000000000 --- a/Emojicode/sum.emojic +++ /dev/null @@ -1,6 +0,0 @@ -🏁🍇 - 🍦a 1 - 🍦b 2 - 🍦sum ➕ a b - 😀🔡 sum 10 -🍉 diff --git a/English/HelloWorld.txt b/English/HelloWorld.txt deleted file mode 100644 index 4b5fa6370..000000000 --- a/English/HelloWorld.txt +++ /dev/null @@ -1 +0,0 @@ -hello, world diff --git a/Erlang/helloworld.erl b/Erlang/helloworld.erl deleted file mode 100644 index d027171d6..000000000 --- a/Erlang/helloworld.erl +++ /dev/null @@ -1,4 +0,0 @@ --module(hello). - -export([hello_world/0]). - - hello_world() -> io:fwrite("hello, world\n"). \ No newline at end of file diff --git a/Eta/Main.hs b/Eta/Main.hs deleted file mode 100644 index c891f91cd..000000000 --- a/Eta/Main.hs +++ /dev/null @@ -1,2 +0,0 @@ -main :: IO () -main = putStrLn "Hello World" diff --git a/Expressjs/axiosToDo.js b/Expressjs/axiosToDo.js deleted file mode 100644 index 2e4b61e8e..000000000 --- a/Expressjs/axiosToDo.js +++ /dev/null @@ -1,14 +0,0 @@ -let express = require("express"); -let axios = require("axios"); - -let app = express(); - -app.get("/todo", (req, res) => { - return axios - .get("https://jsonplaceholder.typicode.com/todos/1") - .then(response => res.send(response.data)) - .catch(err => res.send(err)); -}); - -const PORT = process.env.PORT || 3000; -app.listen(PORT, console.log(`Server has started on port ${PORT}`)); diff --git a/Expressjs/index.js b/Expressjs/index.js deleted file mode 100644 index b5cec582a..000000000 --- a/Expressjs/index.js +++ /dev/null @@ -1,9 +0,0 @@ -const app = require('express')(); - -app.get('/', (req, res)=>{ - res.send("Hello, World!"); -}) - -app.listen(3000, ()=>{ - console.log("Listening on port 3000"); -}) \ No newline at end of file diff --git a/F#/CiaoMondo.fs b/F#/CiaoMondo.fs deleted file mode 100644 index 00bd88976..000000000 --- a/F#/CiaoMondo.fs +++ /dev/null @@ -1,8 +0,0 @@ -// Impara F# a: http://fsharp.org, davvero, e figo -// Per del aiuto, guarda il guido passo-passo. -// Sinceremente, casaTassoni -[] -let main argv = - printfn "Ciao, Mondo" - 0 // inserisci un codigo di uscita che sia un numero intero - diff --git a/F#/Program.fs b/F#/Program.fs deleted file mode 100644 index 345dc43df..000000000 --- a/F#/Program.fs +++ /dev/null @@ -1,8 +0,0 @@ -// Learn more about F# at http://fsharp.org -// See the 'F# Tutorial' project for more help. -// anshul-negi -[] -let main argv = - printfn "Hello World" //hello world in f# - Console.ReadLine() |> ignore - 0 // return an integer exit code diff --git a/F/HelloWorld.fs b/F/HelloWorld.fs deleted file mode 100644 index e4d98ec60..000000000 --- a/F/HelloWorld.fs +++ /dev/null @@ -1,7 +0,0 @@ -open System - -[] -let main argv = - printfn "Hello World" - Console.ReadLine() |> ignore - 0 diff --git a/FALSE/prime.f b/FALSE/prime.f deleted file mode 100644 index c55ea650b..000000000 --- a/FALSE/prime.f +++ /dev/null @@ -1 +0,0 @@ -99 9[1-$][
$@$@$@$@
/*=[1-$$[%
1-$@]?0[
$.' ,
]?]?]# diff --git a/FLEX/arithmetic_exp.l b/FLEX/arithmetic_exp.l deleted file mode 100644 index ce0e4fd76..000000000 --- a/FLEX/arithmetic_exp.l +++ /dev/null @@ -1,39 +0,0 @@ - -%{ -#include -#include -int c,d,bo=0,bc=0; -%} - -operand [a-zA-Z0-9]+ -operator [+\-\/\*] - -%% - -{operator} {d++;printf("%s is an operator \n",yytext);} - -{operand} {c++;printf("%s is an operand \n",yytext);} - -"(" {if(bc<=bo)bo++;} - -")" {bc++;} - -\n { - if(bo==bc && c>d) - { - printf("valid exp\n"); - c = 0; - d = 0; - } - else - { - printf("invalid exp\n"); - c = 0; - d = 0; - } - } -%% - -void main(){ - yylex(); -} \ No newline at end of file diff --git a/FLEX/identifiers.l b/FLEX/identifiers.l deleted file mode 100644 index 24fe491ce..000000000 --- a/FLEX/identifiers.l +++ /dev/null @@ -1,17 +0,0 @@ -/* This program identifies identifiers. */ -%{ - #include -%} -letters [a-zA-Z] -digits [0-9] -identifiers {letters}({letters}*{digits}*)* -nonidentifiers ({digits}{letters}*) -%% -{identifiers} {printf("%s is an identifier\n",yytext);} -{nonidentifiers} {printf("%s is not an identifier\n",yytext);} -%% -int main() -{ - yylex(); - return 0; -} diff --git a/FLEX/indentation.l b/FLEX/indentation.l deleted file mode 100644 index 9894ad804..000000000 --- a/FLEX/indentation.l +++ /dev/null @@ -1,35 +0,0 @@ -%{ -int k = 0; -int b = 1; -int len = 0; -%} - -%% - -[ ]* { - if(b == 1) - { - len = strlen(yytext); - if(len > k) - { - k = len; - b = 0; - } - } -} - -\n { - b = 1; -} - -. {} - -%% - -int main() -{ - yyin = fopen("text.c", "r"); - yylex(); - printf("Maximum Indentation = %d\n", k); - return 0; -} \ No newline at end of file diff --git a/FLEX/special_char.l b/FLEX/special_char.l deleted file mode 100644 index acdff04dc..000000000 --- a/FLEX/special_char.l +++ /dev/null @@ -1,20 +0,0 @@ -/* This program removes special characters from a file. It takes "spchar.txt" as input and stores the output in "wspchar.txt". */ -%{ - #include - FILE *sp,*wsp; -%} - -%% -[a-zA-Z ] {fprintf(wsp,"%s",yytext);} -. {fprintf(wsp,"");} -%% - -int main() -{ - sp=fopen("spchar.txt","r"); - wsp=fopen("wspchar.txt","w+"); - yyin=sp; - yyout=wsp; - yylex(); - return 0; -} diff --git a/FLEX/vowels.l b/FLEX/vowels.l deleted file mode 100644 index f353a5737..000000000 --- a/FLEX/vowels.l +++ /dev/null @@ -1,20 +0,0 @@ -/* This program removes vowels from a file. It takes "vowels.txt" as input and stores the output in "wvowels.txt". */ -%{ - #include - FILE *vow,*wvow; -%} -vowels a|e|i|o|u|A|E|I|O|U -%% -{vowels} {fprintf(wvow,"");} -. {fprintf(wvow,"%s",yytext);} -%% -int yywrap(){} -int main() -{ - vow=fopen("vowels.txt","r"); - yyin=vow; - wvow=fopen("wvowels.txt","w+"); - yyout=wvow; - yylex(); - return 0; -} diff --git a/FSharp/fsharp-hello-world.sln b/FSharp/fsharp-hello-world.sln deleted file mode 100644 index c7b3aec84..000000000 --- a/FSharp/fsharp-hello-world.sln +++ /dev/null @@ -1,16 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fsharp-hello-world", "fsharp-hello-world\fsharp-hello-world.fsproj", "{6ED2BD69-B429-465B-8741-E4ABCAED861C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6ED2BD69-B429-465B-8741-E4ABCAED861C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6ED2BD69-B429-465B-8741-E4ABCAED861C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6ED2BD69-B429-465B-8741-E4ABCAED861C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6ED2BD69-B429-465B-8741-E4ABCAED861C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/FSharp/fsharp-hello-world/Program.fs b/FSharp/fsharp-hello-world/Program.fs deleted file mode 100644 index ef5a8a8c9..000000000 --- a/FSharp/fsharp-hello-world/Program.fs +++ /dev/null @@ -1,6 +0,0 @@ -open System - -[] -let main argv = - printfn "Hello World from F#!" - 0 // return an integer exit code diff --git a/FSharp/fsharp-hello-world/fsharp-hello-world.fsproj b/FSharp/fsharp-hello-world/fsharp-hello-world.fsproj deleted file mode 100644 index e464a35c7..000000000 --- a/FSharp/fsharp-hello-world/fsharp-hello-world.fsproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - Exe - netcoreapp2.1 - fsharp_hello_world - - - - - - - diff --git a/Factor/hello.factor b/Factor/hello.factor deleted file mode 100644 index 8cb3f6978..000000000 --- a/Factor/hello.factor +++ /dev/null @@ -1,6 +0,0 @@ -USE: io -IN: examples.hello - -: hello-world ( -- ) "Hello world!" print ; - -MAIN: hello-world diff --git a/Fantom/HelloWorld.fan b/Fantom/HelloWorld.fan deleted file mode 100644 index e16ece157..000000000 --- a/Fantom/HelloWorld.fan +++ /dev/null @@ -1,7 +0,0 @@ -class HelloWorld -{ - static Void main() - { - echo("Hello, World!") - } -} diff --git a/Faust/helloWorld.dsp b/Faust/helloWorld.dsp deleted file mode 100644 index b9d428426..000000000 --- a/Faust/helloWorld.dsp +++ /dev/null @@ -1 +0,0 @@ -process = +; \ No newline at end of file diff --git a/Fetlang/hello.fet b/Fetlang/hello.fet deleted file mode 100644 index 34df170cc..000000000 --- a/Fetlang/hello.fet +++ /dev/null @@ -1 +0,0 @@ -Make slave scream "Hello, world" diff --git a/FiM++/helloWorld.txt b/FiM++/helloWorld.txt deleted file mode 100644 index 24a1faaac..000000000 --- a/FiM++/helloWorld.txt +++ /dev/null @@ -1,7 +0,0 @@ -Dear Princess Celestia: Hello World! - -Today I learned something simple. -I said “Hello World!”! -That's all about something simple! - -Your faithful student, Twilight Sparkle. diff --git a/Fish/hello_world.fish b/Fish/hello_world.fish deleted file mode 100644 index d65eec6cd..000000000 --- a/Fish/hello_world.fish +++ /dev/null @@ -1,2 +0,0 @@ -"Hello world!"r\ - o;!?l< \ No newline at end of file diff --git a/Flow/Readme.md b/Flow/Readme.md deleted file mode 100644 index a138e1e28..000000000 --- a/Flow/Readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# [Flow](https://flow.org/en/) -Like typescript. \ No newline at end of file diff --git a/Flow/flow.js b/Flow/flow.js deleted file mode 100644 index 079cf9774..000000000 --- a/Flow/flow.js +++ /dev/null @@ -1,3 +0,0 @@ -// @flow -const greeting: string = "hello world" -console.log(greeting) \ No newline at end of file diff --git a/Forth/helloworld.fth b/Forth/helloworld.fth deleted file mode 100755 index 2e37bc725..000000000 --- a/Forth/helloworld.fth +++ /dev/null @@ -1,2 +0,0 @@ -\ hello world forth program. -.( Hello World!) CR diff --git a/Fortran/helloworld.f b/Fortran/helloworld.f deleted file mode 100644 index 8e3293563..000000000 --- a/Fortran/helloworld.f +++ /dev/null @@ -1,3 +0,0 @@ -program hello -print *,"Hello World!" -end program hello diff --git a/Fortress/HelloWorld.fss b/Fortress/HelloWorld.fss deleted file mode 100644 index e2ee79a29..000000000 --- a/Fortress/HelloWorld.fss +++ /dev/null @@ -1,13 +0,0 @@ -(****************************************************************************** - - A "Hello World!" example in the Fortress programming language. - - ******************************************************************************) - -component hello -export Executable - -run() = println("Hello World!") - -end - diff --git a/Foxpro/helloworld.prg b/Foxpro/helloworld.prg deleted file mode 100644 index 4be4af4d4..000000000 --- a/Foxpro/helloworld.prg +++ /dev/null @@ -1,2 +0,0 @@ -*Hello World in Foxpro -@5,5 say ("Hello World!") diff --git a/From India/Namaste Duniya.py b/From India/Namaste Duniya.py deleted file mode 100644 index 8be56ee6c..000000000 --- a/From India/Namaste Duniya.py +++ /dev/null @@ -1 +0,0 @@ -print("Namaste Duniya form India") diff --git a/GDScript/endless_hello_printer.gd b/GDScript/endless_hello_printer.gd deleted file mode 100644 index bfa45e984..000000000 --- a/GDScript/endless_hello_printer.gd +++ /dev/null @@ -1,7 +0,0 @@ -extends Node - -func _process(delta): - print("Hello World!") - - if Input.is_action_just_pressed("ui_accept"): - set_process(false) diff --git a/GDScript/hello.gd b/GDScript/hello.gd deleted file mode 100644 index cdb40da0d..000000000 --- a/GDScript/hello.gd +++ /dev/null @@ -1,5 +0,0 @@ -extends 'Node' - -func _ready(): - print('Hello World!') - diff --git a/GDScript/hello_in_childNode.gd b/GDScript/hello_in_childNode.gd deleted file mode 100644 index c9420db9a..000000000 --- a/GDScript/hello_in_childNode.gd +++ /dev/null @@ -1,6 +0,0 @@ -extends Node - -onready var childNode_label = $Label - -func _ready(): - childNode_label.text = "Hello World!" diff --git a/GDScript/hello_printer.gd b/GDScript/hello_printer.gd deleted file mode 100644 index 9cf998ada..000000000 --- a/GDScript/hello_printer.gd +++ /dev/null @@ -1,5 +0,0 @@ -extends Node - -func _process(delta): - if Input.is_action_just_pressed("ui_accept"): #when user presses "ui_accept" button (the default is spacebar) - print("Hello World! This is made with GD Script #godot") diff --git a/GDScript/random_hello_printer.gd b/GDScript/random_hello_printer.gd deleted file mode 100644 index 1ea5ddae3..000000000 --- a/GDScript/random_hello_printer.gd +++ /dev/null @@ -1,11 +0,0 @@ -extends Node - -var random_number = 0 - -func _ready(): - random_number = rand_range(0, 100) - - if random_number > 50: - print("Hello World!") - else: - print("Hi World!") diff --git a/GDScript/timed_hello_printer.gd b/GDScript/timed_hello_printer.gd deleted file mode 100644 index d0fcb5635..000000000 --- a/GDScript/timed_hello_printer.gd +++ /dev/null @@ -1,12 +0,0 @@ -extends Node - -var timer = 0 -var printed_count = 0 - -func _process(delta): - timer += 100 * delta - - if timer >= 200: - printed_count += 1 - print("Hello World! Printed " + str(printed_count) + "time(s)") - timer = 0 diff --git a/GLSL-Frag/hello.frag b/GLSL-Frag/hello.frag deleted file mode 100644 index c397570ce..000000000 --- a/GLSL-Frag/hello.frag +++ /dev/null @@ -1,20 +0,0 @@ -#version 300 es -// See readme.md for info and example - -precision mediump float; -out vec4 outColor; -void main() { - int x = int(gl_PointCoord.x * 19.0); - int y = int(gl_PointCoord.y * 5.0); - bool colored = false; - switch(x) { - case 0: case 2: case 4: case 8: case 12: case 16: case 18: - colored = true; break; - case 1: colored = y == 2; break; - case 5: case 6: colored = y % 2 == 0; break; - case 9: case 10: case 13: case 14: - colored = y == 4; break; - case 17: colored = y % 4 == 0; break; - } - outColor = colored? vec4(0.1, 0.3, 0.5, 1.0) : vec4(0.0, 0.0, 0.0, 0.0); -} diff --git a/GLSL-Frag/readme.md b/GLSL-Frag/readme.md deleted file mode 100644 index 374622545..000000000 --- a/GLSL-Frag/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -# GLSL Fragment Shader - -This is an example GLSL Fragment Shader to make `HELLO` pixel art. -Only tested using WebGL2, see on [fiddle](https://jsfiddle.net/zvcnm4rq/57/). diff --git a/GML/Hello-World.gml b/GML/Hello-World.gml deleted file mode 100644 index 8d1d8b9c4..000000000 --- a/GML/Hello-World.gml +++ /dev/null @@ -1,37 +0,0 @@ -//see it in your browser: -//https://yal.cc/r/gml/ - - -global.text_angle = 1; - -#define step -//Nothing here - -#define draw -draw_hello_world(1,room_width / 2, room_height / 2,0); - -#define draw_hello_world -var xops = 0; -var ypos = 0; -var txt_angle = global.text_angle; - -var String = "Hello, World!" -var TextSize = argument0; -var XPos = argument1; -var YPos = argument2; -var Color = argument3; -draw_set_color(Color); -var strlen = string_length(String); -var i = 0; -var lengthx = 0; -var lengthy = 0; -var color = Color; -while(i < strlen){ - draw_set_color(color); - draw_text_transformed(XPos + lengthx + (cos(txt_angle)*1.5), YPos + lengthy+(sin(txt_angle)*1.5), string_char_at(String,i+1),TextSize, TextSize, 0); - lengthx += string_width(string_char_at(String,i+1)); - - txt_angle -= 1; - i++; -} -global.text_angle -= 0.35 diff --git a/GML/README.md b/GML/README.md deleted file mode 100644 index 94e6c1d7a..000000000 --- a/GML/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## What it does: - -* Displays "Hello World" in wavy text - -## What did I use: - -* GML(Gamemakers' Language) -* You can try it out online at: https://yal.cc/r/gml/ -* or download Gamemaker Studio(1x) at: http://www.yoyogames.com/ diff --git a/GNU Make/Makefile b/GNU Make/Makefile deleted file mode 100644 index af366684b..000000000 --- a/GNU Make/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -input=/home/piyush/Desktop/codes/input.txt -output=/home/piyush/Desktop/codes/output.txt -flags=-Warray-bounds -std=c++17 -g - -all:${name} - $ ./${name} <${input} >${output} - - -${name}:${name}.cpp - $ g++ ${flags} -o $@ $^ \ No newline at end of file diff --git a/GNU Make/hello world.mk b/GNU Make/hello world.mk deleted file mode 100644 index 3f0ca8258..000000000 --- a/GNU Make/hello world.mk +++ /dev/null @@ -1,2 +0,0 @@ -all : - @echo "Hello World" \ No newline at end of file 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/BubbleSort.go b/GO/BubbleSort.go deleted file mode 100644 index 777c8f946..000000000 --- a/GO/BubbleSort.go +++ /dev/null @@ -1,25 +0,0 @@ -package main -import "fmt" - -func main() { - - x := []int{ - 48, 96, 86, 68, - 57, 82, 63, 70, - 37, 34, 83, 27, - 19, 97, 9, 17, - } - end := len(x) - 1 - for { - if end == 0 { - break - } - for i := 0; i < len(x)-1; i++ { - if x[i] > x[i+1] { - x[i], x[i+1] = x[i+1], x[i] - } - } - end -= 1 - } - fmt.Println(x) -} diff --git a/GO/Go_calculator.go b/GO/Go_calculator.go deleted file mode 100644 index 02a034f2b..000000000 --- a/GO/Go_calculator.go +++ /dev/null @@ -1,64 +0,0 @@ - -package main - -//importing fmt package for basic functions -import "fmt" - -//declaration of variables -var num1 float32 -var num2 float32 -var operator string - - -//declaration of functions -func add(a float32, b float32)float32{ - return a+b -} - -func substract(a float32, b float32)float32{ - return a-b -} - -func multiply(a float32, b float32)float32{ - return a*b -} - -func divide(a float32, b float32)float32{ - return a/b -} - -//main function -func main(){ - - -fmt.Print("Enter No 1: ") -fmt.Scanln(&num1) - -fmt.Print("Enter No 2: ") -fmt.Scanln(&num2) - -fmt.Print("Enter operator: ") -fmt.Scanln(&operator) - -if (operator == "+"){ - fmt.Print("Your answer is: ") - fmt.Println(add(num1,num2)) - fmt.Println("\n") - -}else if (operator == "-"){ - fmt.Print("Your answer is: ") - fmt.Println(substract(num1,num2)) - fmt.Println("\n") - -}else if (operator == "*"){ - fmt.Print("Your answer is: ") - fmt.Println(multiply(num1,num2)) - fmt.Println("\n") - -}else if (operator == "/"){ - fmt.Print("Your answer is: ") - fmt.Println(divide(num1,num2)) - fmt.Println("\n") -} - -} diff --git a/GO/HelloWorld-ioef b/GO/HelloWorld-ioef deleted file mode 100644 index 51fc69b9d..000000000 --- a/GO/HelloWorld-ioef +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("Hello, I am Efthimis") - } diff --git a/GO/ImportCSV.go b/GO/ImportCSV.go deleted file mode 100644 index 78e586d96..000000000 --- a/GO/ImportCSV.go +++ /dev/null @@ -1,37 +0,0 @@ -package migration - -import ( - "bufio" - "encoding/csv" - "fmt" - "io" - "log" - "os" -) - -func ImportAMPDealerDB(filepath string) error{ - if _, err := os.Stat(filepath); !os.IsNotExist(err){ - csvFile, err := os.Open(filepath) - defer csvFile.Close() - - reader := csv.NewReader(bufio.NewReader(csvFile)) - - if err != nil { - fmt.Println(err) - } - - for { - cols, err := reader.Read() - - if err == io.EOF { - break - } else if err != nil { - log.Fatal(err) - } - //Work through csv file data here - - } - - } - return nil -} diff --git a/GO/butterfly/butterfly.go b/GO/butterfly/butterfly.go deleted file mode 100644 index 35aa1259a..000000000 --- a/GO/butterfly/butterfly.go +++ /dev/null @@ -1,35 +0,0 @@ -package butterfly - -import "fmt" - -func butterfly() { - var e int - fmt.Scanf("Enter size of butterfly : %d", &e) - - for i := 0; i < e*2-1; i++ { - for j := 0; j < e*2; j++ { - if i < e { // upper half - if i >= j { - fmt.Print("*") - } else { - if i >= 2*e-j-1 { - fmt.Print("*") - } else { - fmt.Print("_") - } - } - } else { //lower half - if i < 2*e-j-1 { - fmt.Print("*") - } else { - if i < j { - fmt.Print("*") - } else { - fmt.Print("_") - } - } - } - } - fmt.Println() - } -} diff --git a/GO/factorial/factorial.go b/GO/factorial/factorial.go deleted file mode 100644 index 436944c05..000000000 --- a/GO/factorial/factorial.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import "fmt" - -// Recursive implementation of Factorial -func factRec(n int) int { - if n <= 1 { - return 1 - } - return n * factRec(n-1) -} - -// Iterative implementation of Factorial -func factIter(n int) int { - answer := 1 - for i := 2; i <= n; i++ { - answer = answer * i - } - return answer -} - -// Tail recursion implementation of factorial -func factTailRec(n int) int { - return factTail(n, 1) -} - -func factTail(n int, current int) int { - if n <= 1 { - return current - } - return factTail(n-1, current*n) -} - -func main() { - fmt.Println(factIter(5)) - fmt.Println(factRec(5)) - fmt.Println(factTailRec(5)) -} diff --git a/GO/floodfill/floodfill.go b/GO/floodfill/floodfill.go deleted file mode 100644 index b49af824a..000000000 --- a/GO/floodfill/floodfill.go +++ /dev/null @@ -1,88 +0,0 @@ -package main - -import ( - "bufio" - "fmt" - "os" -) - -func fill(grids [][]byte, row int, col int, rowSize int, colSize int) { - // sanity checks - if row < 0 || col < 0 || row >= rowSize || col >= colSize { - return - } - if grids[row][col] == '*' || grids[row][col] == '#' { - return - } - - grids[row][col] = '#' - - fill(grids, row+1, col, rowSize, colSize) - fill(grids, row-1, col, rowSize, colSize) - fill(grids, row, col+1, rowSize, colSize) - fill(grids, row, col-1, rowSize, colSize) -} - -// Sample Input/Output -// Enter row and column size: -// 7 8 -// Enter grids, use '#' as wall: -// ######## -// #......# -// ###..... -// .##..### -// .##.#### -// ##...#.# -// #####..# -// Enter x and y positions of filling (0-indexed): -// 1 1 - -// After flood fill: - -// ######## -// ######## -// ######## -// .####### -// .####### -// ######.# -// #####..# - -func main() { - var rowSize, colSize int - fmt.Println("Enter row and column size:") - _, err := fmt.Scanf("%d %d", &rowSize, &colSize) - if err != nil { - panic(err) - } - - reader := bufio.NewReader(os.Stdin) - reader.ReadString('\n') - fmt.Println("Enter grids, use '#' as wall: ") - grids := make([][]byte, rowSize) - - for i := 0; i < rowSize; i++ { - grids[i], err = reader.ReadBytes('\n') - if err != nil { - panic(err) - } - - grids[i] = grids[i][:len(grids[i])-2] - if len(grids[i]) != colSize { - fmt.Println("Number of characters in a line doesn't match column size") - return - } - } - - fmt.Println("Enter x and y positions of filling (0-indexed):") - var row, col int - _, err = fmt.Scanf("%d %d", &row, &col) - if err != nil { - panic(err) - } - fill(grids, row, col, rowSize, colSize) - fmt.Println("\nAfter flood fill:\n") - for i := 0; i < rowSize; i++ { - fmt.Println(string(grids[i])) - } - -} diff --git a/GO/gotut.go b/GO/gotut.go deleted file mode 100644 index d6f5ad8db..000000000 --- a/GO/gotut.go +++ /dev/null @@ -1,49 +0,0 @@ -package main - -import ( - "encoding/xml" - "fmt" - "io/ioutil" - "net/http" -) - -type SitemapIndex struct { - Locations []string `xml:"sitemap>loc"` -} - -type News struct { - Titles []string `xml:"url>news>title"` - Keywords []string `xml:"url>news>keywords"` - Locations []string `xml:"url>loc"` -} - -type NewsMap struct { - Keyword string - Location string -} - -func main() { - var s SitemapIndex - var n News - news_map := make(map[string]NewsMap) - - resp, _ := http.Get("https://www.washingtonpost.com/news-sitemap-index.xml") - bytes, _ := ioutil.ReadAll(resp.Body) - xml.Unmarshal(bytes, &s) - - //index, value - for _, Location := range s.Locations { - resp, _ := http.Get(Location) - bytes, _ := ioutil.ReadAll(resp.Body) - xml.Unmarshal(bytes, &n) - for index, _ := range n.Keywords { - news_map[n.Titles[index]] = NewsMap{n.Keywords[index], n.Locations[index]} - } - } - for index, data := range news_map { - fmt.Println("\n\n\n", index) - fmt.Println("\n", data.Keyword) - fmt.Println("\n", data.Location) - } - -} diff --git a/GO/hangman/Makefile b/GO/hangman/Makefile deleted file mode 100644 index 3bd3a83d7..000000000 --- a/GO/hangman/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -PACKAGES:=$(shell go list ./... | sed -n '1!p' | grep -v /vendor/) - -default: run - -run: - go run main.go - -depends: - glide up - -test: - echo "mode: count" > coverage-all.out - touch coverage.out - $(foreach pkg,$(PACKAGES), \ - go test -p=1 -cover -covermode=count -coverprofile=coverage.out ${pkg}; \ - tail -n +2 coverage.out >> coverage-all.out;) - rm coverage.out - diff --git a/GO/hangman/README.md b/GO/hangman/README.md deleted file mode 100644 index 6bf88a3b3..000000000 --- a/GO/hangman/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Hangman game in Go - -## Requirements for development: -- Glide (https://glide.sh/) -- Make (https://www.gnu.org/software/make/) - -## Usage: -To install dependencies, type `make depends` (make sure your GOPATH is set) - -To run from source, in terminal type `make` - -To run tests, type `make test` diff --git a/GO/hangman/daos/leaderboard.go b/GO/hangman/daos/leaderboard.go deleted file mode 100644 index 4aad04724..000000000 --- a/GO/hangman/daos/leaderboard.go +++ /dev/null @@ -1,197 +0,0 @@ -package daos - -import ( - "database/sql" - "fmt" - - _ "github.com/mattn/go-sqlite3" -) - -// Passes Database struct pointer. In multi-user case should pass only transactions. -type Leaderboard struct { - Database *sql.DB -} - -type LeaderboardBoardData struct { - ID int - Word string - Guesses string - Points int - Finished int -} - -const ( - GameWon = iota - GameLost - GameInProgress -) - -// SQL statements. -const ( - createTable string = "CREATE TABLE IF NOT EXISTS leaderboard (id INTEGER PRIMARY KEY, word TEXT, guesses []INTEGER, points INTEGER, finished INTEGER)" - insertGame string = "INSERT INTO leaderboard (word, guesses, points, finished) VALUES (?, ?, ?, ?)" - updateGame string = "UPDATE leaderboard SET guesses=?, points=?, finished=? WHERE id=?" - getLeaderboard string = "SELECT * FROM leaderboard ORDER BY points DESC" - getLeaderboardFinished string = "SELECT * FROM leaderboard WHERE finished < 2 ORDER BY points DESC" - getLeaderboardUnfinished string = "SELECT * FROM leaderboard WHERE finished = 2 ORDER BY id DESC" - resumeGame string = "SELECT word, guesses FROM leaderboard WHERE id=?" - getLastGameID string = "SELECT id FROM leaderboard WHERE finished = ? ORDER BY id DESC LIMIT 1" -) - -func (l *Leaderboard) InitBoard() int { - l.Database, _ = sql.Open("sqlite3", "./leaderboard.db") - statement, _ := l.Database.Prepare(createTable) - statement.Exec() - return l.GetLastGameID() -} - -func (l *Leaderboard) GetLastGameID() int { - var id int - row, err := l.Database.Prepare(getLastGameID) - if err != nil { - panic(err) - } - err = row.QueryRow(GameInProgress).Scan(&id) - if err != nil { - return 0 - } - return id -} - -func (l *Leaderboard) ResumeGame(id int) (string, []rune) { - var oneRow LeaderboardBoardData - var runes []rune - row, err := l.Database.Prepare(resumeGame) - if err != nil { - panic(err) - } - defer row.Close() - - err = row.QueryRow(id).Scan(&oneRow.Word, &oneRow.Guesses) - if err != nil { - panic(err) - } - - for _, c := range oneRow.Guesses { - runes = append(runes, c) - } - - return oneRow.Word, runes -} - -func (l *Leaderboard) GetBoard() []LeaderboardBoardData { - var oneRow LeaderboardBoardData - var fullBoard []LeaderboardBoardData - rows, _ := l.Database.Query(getLeaderboard) - for rows.Next() { - rows.Scan(&oneRow.ID, &oneRow.Word, &oneRow.Guesses, &oneRow.Points, &oneRow.Finished) - fullBoard = append(fullBoard, oneRow) - } - return fullBoard -} - -func (l *Leaderboard) GetBoardFinished() []LeaderboardBoardData { - var oneRow LeaderboardBoardData - var fullBoard []LeaderboardBoardData - rows, _ := l.Database.Query(getLeaderboardFinished) - for rows.Next() { - rows.Scan(&oneRow.ID, &oneRow.Word, &oneRow.Guesses, &oneRow.Points, &oneRow.Finished) - fullBoard = append(fullBoard, oneRow) - } - return fullBoard -} - -func (l *Leaderboard) GetBoardUnfinished() []LeaderboardBoardData { - var oneRow LeaderboardBoardData - var fullBoard []LeaderboardBoardData - rows, _ := l.Database.Query(getLeaderboardUnfinished) - for rows.Next() { - rows.Scan(&oneRow.ID, &oneRow.Word, &oneRow.Guesses, &oneRow.Points, &oneRow.Finished) - fullBoard = append(fullBoard, oneRow) - } - return fullBoard -} - -func (l *Leaderboard) InsertGame(word string, guesses []rune) int { - var newRow LeaderboardBoardData - newRow.Word = word - newRow.Guesses = string(guesses) - newRow.Finished = isFinished(word, guesses) - newRow.Points = calculatePoints(word, guesses, newRow.Finished) - statement, _ := l.Database.Prepare(insertGame) - result, err := statement.Exec(newRow.Word, newRow.Guesses, newRow.Points, newRow.Finished) - if err != nil { - fmt.Println(err) - } - lastID, _ := result.LastInsertId() - return int(lastID) -} - -func (l *Leaderboard) UpdateGame(word string, guesses []rune, id int) { - var newRow LeaderboardBoardData - newRow.Guesses = string(guesses) - newRow.Finished = isFinished(word, guesses) - newRow.Points = calculatePoints(word, guesses, newRow.Finished) - statement, _ := l.Database.Prepare(updateGame) - _, err := statement.Exec(newRow.Guesses, newRow.Points, newRow.Finished, id) - if err != nil { - fmt.Println(err) - } -} - -func calculatePoints(word string, guesses []rune, finished int) int { - switch finished { - case GameWon: - points := len(word) * 10 - - for i := range guesses { - penalty := 5 - for _, c := range word { - if guesses[i] == c { - penalty = 0 - break - } - } - points = points - penalty - } - - return points - default: - return 0 - } -} - -func isFinished(word string, guesses []rune) int { - wordGuessed := true - for _, c := range word { - printing := '_' - for i := range guesses { - if guesses[i] == c { - printing = c - break - } - } - if printing == '_' { - wordGuessed = false - } - - } - if wordGuessed { - return GameWon - } - - var correctGuesses int - for i := range guesses { - for _, c := range word { - if guesses[i] == c { - correctGuesses++ - break - } - } - } - if mistakes := len(guesses) - correctGuesses; mistakes >= 6 { - return GameLost - } - - return GameInProgress -} diff --git a/GO/hangman/daos/leaderboard_test.go b/GO/hangman/daos/leaderboard_test.go deleted file mode 100644 index e02757338..000000000 --- a/GO/hangman/daos/leaderboard_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package daos - -import ( - "testing" - - "github.com/magiconair/properties/assert" -) - -func Test_calculatePoints(t *testing.T) { - tests := []struct { - Tag, Word string - Guesses []rune - ExpPoints int - }{ - {"t1", "MILK", []rune{'K', 'D', 'H', 'R', 'L'}, 10}, - {"t2", "ROAD", []rune{'K', 'M', 'H', 'Q', 'L'}, -10}, - {"t3", "CALCULATOR", []rune{'T', 'D', 'A', 'S', 'O', 'P'}, 70}, - } - - for _, test := range tests { - newPoints := calculatePoints(test.Word, test.Guesses) - assert.Equal(t, test.ExpPoints, newPoints) - } -} - -func Test_isFinished(t *testing.T) { - tests := []struct { - Tag, Word string - Guesses []rune - ExpFinished int - }{ - {"t1", "MILK", []rune{'K', 'D', 'H', 'R', 'L', 'I', 'M'}, GameWon}, - {"t2", "ROAD", []rune{'K', 'M', 'H', 'Q', 'L', 'Z'}, GameLost}, - {"t3", "CALCULATOR", []rune{'T', 'D', 'A', 'S', 'O', 'P'}, GameInProgress}, - } - - for _, test := range tests { - newFinished := isFinished(test.Word, test.Guesses) - assert.Equal(t, test.ExpFinished, newFinished) - } -} diff --git a/GO/hangman/events/events.go b/GO/hangman/events/events.go deleted file mode 100644 index 04a3e73e9..000000000 --- a/GO/hangman/events/events.go +++ /dev/null @@ -1,71 +0,0 @@ -package events - -import ( - "unicode" - - "github.com/hitchnsmile/go-hangman/screens" - termbox "github.com/nsf/termbox-go" -) - -// Listens to all keystrokes and acts accordingly -func EventHandler(event chan termbox.Event, h *screens.Switch) { - for { - select { - case e := <-event: - if e.Type == termbox.EventKey { - switch { - case e.Key == termbox.KeyEsc || e.Key == termbox.KeyCtrlC: - return - case e.Key == termbox.KeyF2: - if h.CurrentState == screens.GameLeaderboard { - h.LeaderboardState.Board = screens.ShowLeaderboard - h.Leaderboard() - } - case e.Key == termbox.KeyF3: - if h.CurrentState == screens.GameLeaderboard { - h.LeaderboardState.Board = screens.ShowLeaderboardFinished - h.Leaderboard() - } - case e.Key == termbox.KeyF4: - if h.CurrentState == screens.GameLeaderboard { - h.LeaderboardState.Board = screens.ShowLeaderboardUnfinished - h.Leaderboard() - } - case e.Key == termbox.KeyBackspace2 || e.Key == termbox.KeyBackspace: - h.ShowMenu() - case e.Key == termbox.KeyArrowDown: - if h.CurrentState == screens.GameMenu { - h.MenuDown() - } else if h.CurrentState == screens.GameLeaderboard { - h.LeaderboardDown() - } - case e.Key == termbox.KeyArrowUp: - if h.CurrentState == screens.GameMenu { - h.MenuUp() - } else if h.CurrentState == screens.GameLeaderboard { - h.LeaderboardUp() - } - case e.Key == termbox.KeyEnter: - if h.CurrentState == screens.GameMenu { - h.MenuEnter(h.MenuState) - } else if h.CurrentState == screens.GameLeaderboard { - h.GameID = h.LeaderboardState.SelectedID - h.MenuEnter(screens.MenuContinueLastGame) - } - case e.Ch > 0: - if h.CurrentState == screens.GameStarted { - if unicode.IsLetter(e.Ch) { - h.AddGuess(e.Ch) - } - } - } - } - default: - } - } -} - -// not really doing anything. Added just to have something easy to test in this package -func defaultLog() string { - return "Something went wrong" -} diff --git a/GO/hangman/events/events_test.go b/GO/hangman/events/events_test.go deleted file mode 100644 index 16610d265..000000000 --- a/GO/hangman/events/events_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package events - -import ( - "testing" - - "github.com/magiconair/properties/assert" -) - -func Test_defaultLog(t *testing.T) { - tests := []struct { - Tag, ExpString string - }{ - {"t1", "Something went wrong"}, - } - for _, test := range tests { - newString := defaultLog() - assert.Equal(t, test.ExpString, newString) - } -} diff --git a/GO/hangman/glide.lock b/GO/hangman/glide.lock deleted file mode 100644 index 95292f2d2..000000000 --- a/GO/hangman/glide.lock +++ /dev/null @@ -1,18 +0,0 @@ -hash: 9b17fc06409989b8a79cb2919ed43f867f7904306e329a1b9687b3dbf02a8974 -updated: 2017-10-05T21:09:36.24276294Z -imports: -- name: github.com/mattn/go-runewidth - version: 9e777a8366cce605130a531d2cd6363d07ad7317 -- name: github.com/mattn/go-sqlite3 - version: ca5e3819723d8eeaf170ad510e7da1d6d2e94a08 -- name: github.com/nsf/termbox-go - version: d51f2f6d6ccb97dd83ed04ae2f79c34234851f39 -- name: golang.org/x/net - version: 57efc9c3d9f91fb3277f8da1cff370539c4d3dc5 - subpackages: - - context -testImports: -- name: github.com/magiconair/properties - version: 8d7837e64d3c1ee4e54a880c5a920ab4316fc90a - subpackages: - - assert diff --git a/GO/hangman/glide.yaml b/GO/hangman/glide.yaml deleted file mode 100644 index 4a5e3a12c..000000000 --- a/GO/hangman/glide.yaml +++ /dev/null @@ -1,7 +0,0 @@ -package: github.com/hitchnsmile/go-hangman -import: -- package: github.com/nsf/termbox-go -- package: github.com/mattn/go-sqlite3 - version: ^1.2.0 -- package: github.com/mattn/go-runewidth - version: ^0.0.2 diff --git a/GO/hangman/main.go b/GO/hangman/main.go deleted file mode 100644 index dae52c205..000000000 --- a/GO/hangman/main.go +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import ( - "github.com/hitchnsmile/go-hangman/events" - "github.com/hitchnsmile/go-hangman/screens" - termbox "github.com/nsf/termbox-go" -) - -func main() { - // refer to Switch in screens/handler.go - var h screens.Switch - - // termbox used to manipulate cells in terminal and distinguish keystrokes - err := termbox.Init() - if err != nil { - panic(err) - } - defer termbox.Close() - - // creating channel for all events (keystrokes) and listening for it - event := make(chan termbox.Event) - go func() { - for { - event <- termbox.PollEvent() - } - }() - - // Initializing session with assigning last game ID to it for quick "continue previous" experience - h.GameID = h.DB.InitBoard() - - // Instantly shows menu - h.ShowMenu() - - // Handles all keystrokes - events.EventHandler(event, &h) -} diff --git a/GO/hangman/screens/game.go b/GO/hangman/screens/game.go deleted file mode 100644 index a6528e057..000000000 --- a/GO/hangman/screens/game.go +++ /dev/null @@ -1,142 +0,0 @@ -package screens - -import ( - "fmt" - "math/rand" - "strings" - "time" - "unicode" - - termbox "github.com/nsf/termbox-go" -) - -const ( - NewGame = iota - Mistake1 - Mistake2 - Mistake3 - Mistake4 - Mistake5 - GameOver -) - -var hangmanPaint = [7][9]string{ - {" _______", " |/ |", " | ", " | ", " | ", " | ", " |", " ___|___"}, - {" _______", " |/ |", " | (_)", " | ", " | ", " | ", " |", " ___|___"}, - {" _______", " |/ |", " | (_)", " | |", " | |", " | ", " |", " ___|___"}, - {" _______", " |/ |", " | (_)", " | \\|", " | |", " | ", " |", " ___|___"}, - {" _______", " |/ |", " | (_)", " | \\|/", " | |", " | ", " |", " ___|___"}, - {" _______", " |/ |", " | (_)", " | \\|/", " | |", " | / ", " |", " ___|___"}, - {" _______", " |/ |", " | (_)", " | \\|/", " | |", " | / \\", " |", " ___|___"}, -} - -var gameText = "Try to guess this word. Good luck!" -var gameGuesses = "Already guessed: " -var gameWonText = "YOU WON! CONGRATULATIONS!" -var gameOverText = "GAME OVER, YOU LOST!" - -func (s *Switch) NewGame() { - s.GoalWord = getWord() - s.Guesses = s.Guesses[:0] - s.CurrentState = GameStarted - s.GameID = s.DB.InsertGame(s.GoalWord, s.Guesses) - s.ShowGame() -} - -func (s *Switch) ShowGame() { - if s.GameID == 0 { - s.NewGame() - return - } - termbox.Clear(termbox.ColorWhite, termbox.ColorBlack) - s.GoalWord, s.Guesses = s.DB.ResumeGame(s.GameID) - fmt.Println(s.GoalWord, s.Guesses, s.GameID) - s.CurrentState = renderGame(s.GoalWord, s.Guesses) - termbox.Sync() -} - -func (s *Switch) AddGuess(c rune) { - if s.CurrentState == GameFinished { - return - } - - c = unicode.ToUpper(c) - for i := range s.Guesses { - if s.Guesses[i] == c { - return - } - } - s.Guesses = append(s.Guesses, c) - s.DB.UpdateGame(s.GoalWord, s.Guesses, s.GameID) - s.ShowGame() -} - -func renderGame(word string, guesses []rune) GameState { - var mistakes int - var correctGuesses int - - for i := range guesses { - for _, c := range word { - if guesses[i] == c { - correctGuesses++ - break - } - } - printSimpleText(gameGuesses, 20, 5) - termbox.SetCell(i+5, 21, guesses[i], termbox.ColorWhite, termbox.ColorBlack) - } - mistakes = len(guesses) - correctGuesses - - if mistakes >= GameOver { - mistakes = GameOver - printSimpleText(gameOverText, 2, 5) - printSimpleText("Correct word: "+word, 4, 5) - printHangman(mistakes) - return GameFinished - } else { - wordGuessed := true - for j, c := range word { - printing := '_' - for i := range guesses { - if guesses[i] == c { - printing = c - break - } - } - if printing == '_' { - wordGuessed = false - } - - termbox.SetCell(j+5, 6, printing, termbox.ColorWhite, termbox.ColorBlack) - } - if wordGuessed { - printSimpleText(gameWonText, 2, 5) - printHangman(mistakes) - return GameFinished - } else { - printSimpleText(gameText, 2, 5) - printHangman(mistakes) - return GameStarted - } - - } - -} - -func printSimpleText(text string, yPosition, xPosition int) { - for j, c := range text { - termbox.SetCell(j+xPosition, yPosition, c, termbox.ColorWhite, termbox.ColorBlack) - } -} - -func printHangman(mistakes int) { - for i := range hangmanPaint[mistakes] { - printSimpleText(hangmanPaint[mistakes][i], i+10, 5) - } -} - -func getWord() string { - rand.Seed(time.Now().UTC().UnixNano()) - randomWord := WordsList[rand.Intn(len(WordsList))] - return strings.ToUpper(randomWord) -} diff --git a/GO/hangman/screens/game_test.go b/GO/hangman/screens/game_test.go deleted file mode 100644 index 0ff774ae8..000000000 --- a/GO/hangman/screens/game_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package screens - -import ( - "testing" - - "github.com/magiconair/properties/assert" -) - -func Test_getWord(t *testing.T) { - tests := []struct { - Tag string - ExpExistence bool - }{ - {"t1", true}, - } - - for _, test := range tests { - var exists bool = false - newWord := getWord() - if newWord != "" { - exists = true - } - assert.Equal(t, test.ExpExistence, exists) - } -} - -func Test_renderGame(t *testing.T) { - tests := []struct { - Tag, Word string - Guesses []rune - ExpState GameState - }{ - {"t1", "MILK", []rune{'K', 'D', 'H', 'R', 'L'}, GameStarted}, - {"t2", "DUNK", []rune{'V', 'D', 'X', 'W'}, GameStarted}, - {"t3", "COFFEE", []rune{'K', 'D', 'H', 'R', 'L', 'P'}, GameFinished}, - {"t4", "GAME", []rune{'K', 'D', 'G', 'A', 'E', 'M'}, GameFinished}, - } - - for _, test := range tests { - newState := renderGame(test.Word, test.Guesses) - assert.Equal(t, test.ExpState, newState) - } -} diff --git a/GO/hangman/screens/handler.go b/GO/hangman/screens/handler.go deleted file mode 100644 index 150bc78f3..000000000 --- a/GO/hangman/screens/handler.go +++ /dev/null @@ -1,28 +0,0 @@ -package screens - -import "github.com/hitchnsmile/go-hangman/daos" - -type GameState int - -const ( - GameMenu GameState = iota - GameStarted - GameFinished - GameLeaderboard -) - -// Main struct of whole game. It acts as a session of a player. After small adjustments, can be easily used for multi-user/multiplayer cases -type Switch struct { - CurrentState GameState - MenuState MenuState - LeaderboardState struct { - Board LeaderboardStates - Selection int - SelectedID int - } - GameID int - GoalWord string - Guesses []rune - Screen [][]int - DB daos.Leaderboard -} diff --git a/GO/hangman/screens/leaderboard.go b/GO/hangman/screens/leaderboard.go deleted file mode 100644 index 373ea98bf..000000000 --- a/GO/hangman/screens/leaderboard.go +++ /dev/null @@ -1,185 +0,0 @@ -package screens - -import ( - "fmt" - - "github.com/hitchnsmile/go-hangman/daos" - _ "github.com/mattn/go-sqlite3" - termbox "github.com/nsf/termbox-go" -) - -type LeaderboardStates int - -const ( - ShowLeaderboard LeaderboardStates = iota - ShowLeaderboardFinished - ShowLeaderboardUnfinished -) - -const ( - leaderboardTitle = "LEADERBOARD" - leaderboardSubtitle = "Choose game you wish to continue" - leaderboardInstructions = "F2: Show all games | F3: Show completed games | F4: Show games in progress | Navigate with arrow Keys" -) - -var leaderboardTableHeader = []string{"PLACE", "POINTS", "WORD", "GUESSSES", "STATUS"} - -type LeaderboardBoard struct { - ID int - Place string - Word string - Guesses string - Points string - Finished string -} - -func (s *Switch) Leaderboard() { - var boardRaw []daos.LeaderboardBoardData - s.CurrentState = GameLeaderboard - - switch s.LeaderboardState.Board { - case ShowLeaderboard: - boardRaw = s.DB.GetBoard() - case ShowLeaderboardFinished: - boardRaw = s.DB.GetBoardFinished() - case ShowLeaderboardUnfinished: - boardRaw = s.DB.GetBoardUnfinished() - } - - if len(boardRaw) == 0 { - s.LeaderboardState.Selection = 0 - } else if s.LeaderboardState.Selection > len(boardRaw)-1 { - s.LeaderboardState.Selection = len(boardRaw) - 1 - } else { - s.LeaderboardState.SelectedID = boardRaw[s.LeaderboardState.Selection].ID - } - - termbox.Clear(termbox.ColorWhite, termbox.ColorBlack) - boardData := convertToPreparedResponse(boardRaw) - drawBoard(boardData, s.LeaderboardState.Selection) - termbox.Sync() -} - -// Handles leaderboard navigation -func (s *Switch) LeaderboardDown() { - s.LeaderboardState.Selection++ - s.Leaderboard() -} - -func (s *Switch) LeaderboardUp() { - if s.LeaderboardState.Selection > 0 { - s.LeaderboardState.Selection-- - } - s.Leaderboard() -} - -func drawBoard(data []LeaderboardBoard, selected int) { - printSimpleText(leaderboardTitle, 2, 5) - printSimpleText(leaderboardSubtitle, 3, 5) - printSimpleText(leaderboardInstructions, 4, 5) - drawTable(6, 5, selected, data) -} - -func drawTable(y, x, selected int, rows []LeaderboardBoard) { - newPosition := x - for i := 0; i < len(leaderboardTableHeader); i++ { - maxPosition := newPosition - - if lastPosition := printTableElement(newPosition, y, leaderboardTableHeader[i]); lastPosition > maxPosition { - maxPosition = lastPosition - } - - // Ugly switch. But more secure than an additional loop. Problem in LeaderboardBoard struct. Should be fixed. - switch leaderboardTableHeader[i] { - case leaderboardTableHeader[0]: - for j := range rows { - if lastPosition := printTableElement(newPosition, y+j+1, rows[j].Place); lastPosition > maxPosition { - maxPosition = lastPosition - } - if j == selected { - printTableElement(x-1, y+j+1, "*") - } - } - case leaderboardTableHeader[1]: - for j := range rows { - if lastPosition := printTableElement(newPosition, y+j+1, rows[j].Points); lastPosition > maxPosition { - maxPosition = lastPosition - } - } - case leaderboardTableHeader[2]: - for j := range rows { - if lastPosition := printTableElement(newPosition, y+j+1, rows[j].Word); lastPosition > maxPosition { - maxPosition = lastPosition - } - } - case leaderboardTableHeader[3]: - for j := range rows { - if lastPosition := printTableElement(newPosition, y+j+1, rows[j].Guesses); lastPosition > maxPosition { - maxPosition = lastPosition - } - } - case leaderboardTableHeader[4]: - for j := range rows { - if lastPosition := printTableElement(newPosition, y+j+1, rows[j].Finished); lastPosition > maxPosition { - maxPosition = lastPosition - } - } - } - - newPosition = maxPosition + 1 - } -} - -func printTableElement(x, y int, text string) int { - for _, c := range text { - termbox.SetCell(x, y, c, termbox.ColorWhite, termbox.ColorBlack) - x++ - } - return x -} - -func convertToPreparedResponse(raw []daos.LeaderboardBoardData) []LeaderboardBoard { - var response []LeaderboardBoard - for i := range raw { - var tempResp LeaderboardBoard - tempResp.ID = raw[i].ID - tempResp.Place = fmt.Sprintf("%d. ", i+1) - tempResp.Word = convertCurrentWord(raw[i].Word, raw[i].Guesses) - tempResp.Points = fmt.Sprint(raw[i].Points) - tempResp.Guesses = raw[i].Guesses - tempResp.Finished = finishedStatus(raw[i].Finished) - response = append(response, tempResp) - } - return response -} - -func finishedStatus(finished int) string { - switch finished { - case daos.GameWon: - return "COMPLETED" - case daos.GameLost: - return "FAILED" - case daos.GameInProgress: - return "IN PROGRESS" - } - return "" -} - -func convertCurrentWord(word string, guesses string) string { - newWord := "" - for _, c := range word { - needToChange := true - for _, g := range guesses { - if c == g { - needToChange = false - } - } - if needToChange { - newWord = newWord + "_" - } else { - newWord = newWord + string(c) - } - } - - return newWord -} diff --git a/GO/hangman/screens/leaderboard_test.go b/GO/hangman/screens/leaderboard_test.go deleted file mode 100644 index 1e271719e..000000000 --- a/GO/hangman/screens/leaderboard_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package screens - -import ( - "testing" - - "github.com/hitchnsmile/go-hangman/daos" - "github.com/magiconair/properties/assert" -) - -func Test_convertCurrentWord(t *testing.T) { - tests := []struct { - Tag, Word, Guesses, ExpWord string - }{ - {"t1", "MILK", "IGDKL", "_ILK"}, - {"t2", "CURRENT", "DMSNX", "_____N_"}, - {"t3", "TRAIN", "", "_____"}, - {"t4", "TRANSLINE", "TSANLRI", "TRANSLIN_"}, - {"t5", "TRAFFIC", "FCIRTA", "TRAFFIC"}, - } - - for _, test := range tests { - newWord := convertCurrentWord(test.Word, test.Guesses) - assert.Equal(t, test.ExpWord, newWord) - } -} - -func Test_finishedStatus(t *testing.T) { - tests := []struct { - Tag string - FinishedStatus int - ExpFinished string - }{ - {"t1", daos.GameWon, "COMPLETED"}, - {"t2", daos.GameLost, "FAILED"}, - {"t3", daos.GameInProgress, "IN PROGRESS"}, - {"t4", 3, ""}, - } - - for _, test := range tests { - status := finishedStatus(test.FinishedStatus) - assert.Equal(t, test.ExpFinished, status) - } -} - -func Test_printTableElement(t *testing.T) { - tests := []struct { - Tag string - X, Y int - Text string - ExpX int - }{ - {"t1", 3, 5, "COLD", 7}, - {"t1", 6, 1, "COW", 9}, - {"t1", 8, 9, "TRACTOR", 15}, - {"t1", 53, 15, "SLEEP", 58}, - } - - for _, test := range tests { - newPosition := printTableElement(test.X, test.Y, test.Text) - assert.Equal(t, test.ExpX, newPosition) - } -} - -func Test_convertToPreparedResponse(t *testing.T) { - tests := []struct { - Tag string - Input []daos.LeaderboardBoardData - ExpOutput []LeaderboardBoard - }{ - { - "t1", - []daos.LeaderboardBoardData{daos.LeaderboardBoardData{ID: 4, Word: "TRAINING", Guesses: "DCVRE", Points: 40, Finished: 0}}, - []LeaderboardBoard{LeaderboardBoard{ID: 4, Word: "_R______", Guesses: "DCVRE", Points: "40", Finished: "COMPLETED", Place: "1. "}}, - }, - { - "t2", - []daos.LeaderboardBoardData{ - daos.LeaderboardBoardData{ID: 4, Word: "TRAINING", Guesses: "DCVRE", Points: 40, Finished: 0}, - daos.LeaderboardBoardData{ID: 5, Word: "CAMERA", Guesses: "QWERTXZ", Points: 20, Finished: 1}, - daos.LeaderboardBoardData{ID: 7, Word: "MODULE", Guesses: "FHDBS", Points: 20, Finished: 2}, - daos.LeaderboardBoardData{ID: 3, Word: "TABLE", Guesses: "KMHABC", Points: 0, Finished: 2}, - daos.LeaderboardBoardData{ID: 6, Word: "LAPTOP", Guesses: "DCVXRE", Points: 0, Finished: 1}, - }, - []LeaderboardBoard{ - LeaderboardBoard{ID: 4, Word: "_R______", Guesses: "DCVRE", Points: "40", Finished: "COMPLETED", Place: "1. "}, - LeaderboardBoard{ID: 5, Word: "___ER_", Guesses: "QWERTXZ", Points: "20", Finished: "FAILED", Place: "2. "}, - LeaderboardBoard{ID: 7, Word: "__D___", Guesses: "FHDBS", Points: "20", Finished: "IN PROGRESS", Place: "3. "}, - LeaderboardBoard{ID: 3, Word: "_AB__", Guesses: "KMHABC", Points: "0", Finished: "IN PROGRESS", Place: "4. "}, - LeaderboardBoard{ID: 6, Word: "______", Guesses: "DCVXRE", Points: "0", Finished: "FAILED", Place: "5. "}, - }, - }, - } - - for _, test := range tests { - newResponse := convertToPreparedResponse(test.Input) - assert.Equal(t, test.ExpOutput, newResponse) - } -} diff --git a/GO/hangman/screens/menu.go b/GO/hangman/screens/menu.go deleted file mode 100644 index 158f5d2df..000000000 --- a/GO/hangman/screens/menu.go +++ /dev/null @@ -1,75 +0,0 @@ -package screens - -import ( - termbox "github.com/nsf/termbox-go" -) - -type MenuState int - -const ( - MenuNewGame MenuState = iota - MenuContinueLastGame - MenuLeaderboard -) - -var menuTexts = [3]string{ - "1) Start a New Game", - "2) Continue Last Game", - "3) Leaderboard", -} - -var introText = "Welcome to Hangman game! To continue, please select action:" -var introSubtext = "Navigate with arrow keys and press Enter to select. Use backspace to go back after selection." - -func (s *Switch) ShowMenu() { - s.CurrentState = GameMenu - termbox.Clear(termbox.ColorWhite, termbox.ColorBlack) - - renderMenu(s.MenuState) - - termbox.Sync() -} - -// MenuUp, MenuDown and MenuEnter handles navigation in menu -func (s *Switch) MenuUp() { - if s.MenuState > 0 { - s.MenuState = s.MenuState - 1 - } - s.ShowMenu() -} - -func (s *Switch) MenuDown() { - if s.MenuState < 2 { - s.MenuState = s.MenuState + 1 - } - s.ShowMenu() -} - -func (s *Switch) MenuEnter(selectedLine MenuState) { - switch selectedLine { - case MenuNewGame: - s.NewGame() - case MenuContinueLastGame: - s.ShowGame() - case MenuLeaderboard: - s.CurrentState = GameLeaderboard - s.Leaderboard() - } -} - -func renderMenu(selectedLine MenuState) { - printSimpleText(introText, 2, 5) - printSimpleText(introSubtext, 3, 5) - - for i := 0; i < len(menuTexts); i++ { - fg := termbox.ColorWhite - bg := termbox.ColorBlack - if i == int(selectedLine) { - fg = termbox.ColorBlack - bg = termbox.ColorWhite - } - for j, c := range menuTexts[i] { - termbox.SetCell(j+10, i+5, c, fg, bg) - } - } -} diff --git a/GO/hangman/screens/words.go b/GO/hangman/screens/words.go deleted file mode 100644 index ee5ee700d..000000000 --- a/GO/hangman/screens/words.go +++ /dev/null @@ -1,5 +0,0 @@ -package screens - -// Just lots of words to play with. Could be as an offline words and if there's internet connection - grab from some much bigger vocabulary API. - -var WordsList = []string{"aback", "abaft", "abandoned", "abashed", "aberrant", "abhorrent", "abiding", "abject", "ablaze", "able", "abnormal", "aboard", "aboriginal", "abortive", "abounding", "abrasive", "abrupt", "absent", "absorbed", "absorbing", "abstracted", "absurd", "abundant", "abusive", "acceptable", "accessible", "accidental", "accurate", "acid", "acidic", "acoustic", "acrid", "actually", "ad hoc", "adamant", "adaptable", "addicted", "adhesive", "adjoining", "adorable", "adventurous", "afraid", "aggressive", "agonizing", "agreeable", "ahead", "ajar", "alcoholic", "alert", "alike", "alive", "alleged", "alluring", "aloof", "amazing", "ambiguous", "ambitious", "amuck", "amused", "amusing", "ancient", "angry", "animated", "annoyed", "annoying", "anxious", "apathetic", "aquatic", "aromatic", "arrogant", "ashamed", "aspiring", "assorted", "astonishing", "attractive", "auspicious", "automatic", "available", "average", "awake", "aware", "awesome", "awful", "axiomatic", "bad", "barbarous", "bashful", "bawdy", "beautiful", "befitting", "belligerent", "beneficial", "bent", "berserk", "best", "better", "bewildered", "big", "billowy", "bite-sized", "bitter", "bizarre", "black", "black-and-white", "bloody", "blue", "blue-eyed", "blushing", "boiling", "boorish", "bored", "boring", "bouncy", "boundless", "brainy", "brash", "brave", "brawny", "breakable", "breezy", "brief", "bright", "bright", "broad", "broken", "brown", "bumpy", "burly", "bustling", "busy", "cagey", "calculating", "callous", "calm", "capable", "capricious", "careful", "careless", "caring", "cautious", "ceaseless", "certain", "changeable", "charming", "cheap", "cheerful", "chemical", "chief", "childlike", "chilly", "chivalrous", "chubby", "chunky", "clammy", "classy", "clean", "clear", "clever", "cloistered", "cloudy", "closed", "clumsy", "cluttered", "coherent", "cold", "colorful", "colossal", "combative", "comfortable", "common", "complete", "complex", "concerned", "condemned", "confused", "conscious", "cooing", "cool", "cooperative", "coordinated", "courageous", "cowardly", "crabby", "craven", "crazy", "creepy", "crooked", "crowded", "cruel", "cuddly", "cultured", "cumbersome", "curious", "curly", "curved", "curvy", "cut", "cute", "cute", "cynical", "daffy", "daily", "damaged", "damaging", "damp", "dangerous", "dapper", "dark", "dashing", "dazzling", "dead", "deadpan", "deafening", "dear", "debonair", "decisive", "decorous", "deep", "deeply", "defeated", "defective", "defiant", "delicate", "delicious", "delightful", "demonic", "delirious", "dependent", "depressed", "deranged", "descriptive", "deserted", "detailed", "determined", "devilish", "didactic", "different", "difficult", "diligent", "direful", "dirty", "disagreeable", "disastrous", "discreet", "disgusted", "disgusting", "disillusioned", "dispensable", "distinct", "disturbed", "divergent", "dizzy", "domineering", "doubtful", "drab", "draconian", "dramatic", "dreary", "drunk", "dry", "dull", "dusty", "dusty", "dynamic", "dysfunctional", "eager", "early", "earsplitting", "earthy", "easy", "eatable", "economic", "educated", "efficacious", "efficient", "eight", "elastic", "elated", "elderly", "electric", "elegant", "elfin", "elite", "embarrassed", "eminent", "empty", "enchanted", "enchanting", "encouraging", "endurable", "energetic", "enormous", "entertaining", "enthusiastic", "envious", "equable", "equal", "erect", "erratic", "ethereal", "evanescent", "evasive", "even", "excellent", "excited", "exciting", "exclusive", "exotic", "expensive", "extra-large", "extra-small", "exuberant", "exultant", "fabulous", "faded", "faint", "fair", "faithful", "fallacious", "false", "familiar", "famous", "fanatical", "fancy", "fantastic", "far", "far-flung", "fascinated", "fast", "fat", "faulty", "fearful", "fearless", "feeble", "feigned", "female", "fertile", "festive", "few", "fierce", "filthy", "fine", "finicky", "first", "five", "fixed", "flagrant", "flaky", "flashy", "flat", "flawless", "flimsy", "flippant", "flowery", "fluffy", "fluttering", "foamy", "foolish", "foregoing", "forgetful", "fortunate", "four", "frail", "fragile", "frantic", "free", "freezing", "frequent", "fresh", "fretful", "friendly", "frightened", "frightening", "full", "fumbling", "functional", "funny", "furry", "furtive", "future", "futuristic", "fuzzy", "gabby", "gainful", "gamy", "gaping", "garrulous", "gaudy", "general", "gentle", "giant", "giddy", "gifted", "gigantic", "glamorous", "gleaming", "glib", "glistening", "glorious", "glossy", "godly", "good", "goofy", "gorgeous", "graceful", "grandiose", "grateful", "gratis", "gray", "greasy", "great", "greedy", "green", "grey", "grieving", "groovy", "grotesque", "grouchy", "grubby", "gruesome", "grumpy", "guarded", "guiltless", "gullible", "gusty", "guttural", "habitual", "half", "hallowed", "halting", "handsome", "handsomely", "handy", "hanging", "hapless", "happy", "hard", "hard-to-find", "harmonious", "harsh", "hateful", "heady", "healthy", "heartbreaking", "heavenly", "heavy", "hellish", "helpful", "helpless", "hesitant", "hideous", "high", "highfalutin", "high-pitched", "hilarious", "hissing", "historical", "holistic", "hollow", "homeless", "homely", "honorable", "horrible", "hospitable", "hot", "huge", "hulking", "humdrum", "humorous", "hungry", "hurried", "hurt", "hushed", "husky", "hypnotic", "hysterical", "icky", "icy", "idiotic", "ignorant", "ill", "illegal", "ill-fated", "ill-informed", "illustrious", "imaginary", "immense", "imminent", "impartial", "imperfect", "impolite", "important", "imported", "impossible", "incandescent", "incompetent", "inconclusive", "industrious", "incredible", "inexpensive", "infamous", "innate", "innocent", "inquisitive", "insidious", "instinctive", "intelligent", "interesting", "internal", "invincible", "irate", "irritating", "itchy", "jaded", "jagged", "jazzy", "jealous", "jittery", "jobless", "jolly", "joyous", "judicious", "juicy", "jumbled", "jumpy", "juvenile", "kaput", "keen", "kind", "kindhearted", "kindly", "knotty", "knowing", "knowledgeable", "known", "labored", "lackadaisical", "lacking", "lame", "lamentable", "languid", "large", "last", "late", "laughable", "lavish", "lazy", "lean", "learned", "left", "legal", "lethal", "level", "lewd", "light", "like", "likeable", "limping", "literate", "little", "lively", "lively", "living", "lonely", "long", "longing", "long-term", "loose", "lopsided", "loud", "loutish", "lovely", "loving", "low", "lowly", "lucky", "ludicrous", "lumpy", "lush", "luxuriant", "lying", "lyrical", "macabre", "macho", "maddening", "madly", "magenta", "magical", "magnificent", "majestic", "makeshift", "male", "malicious", "mammoth", "maniacal", "many", "marked", "massive", "married", "marvelous", "material", "materialistic", "mature", "mean", "measly", "meaty", "medical", "meek", "mellow", "melodic", "melted", "merciful", "mere", "messy", "mighty", "military", "milky", "mindless", "miniature", "minor", "miscreant", "misty", "mixed", "moaning", "modern", "moldy", "momentous", "motionless", "mountainous", "muddled", "mundane", "murky", "mushy", "mute", "mysterious", "naive", "nappy", "narrow", "nasty", "natural", "naughty", "nauseating", "near", "neat", "nebulous", "necessary", "needless", "needy", "neighborly", "nervous", "new", "next", "nice", "nifty", "nimble", "nine", "nippy", "noiseless", "noisy", "nonchalant", "nondescript", "nonstop", "normal", "nostalgic", "nosy", "noxious", "null", "numberless", "numerous", "nutritious", "nutty", "oafish", "obedient", "obeisant", "obese", "obnoxious", "obscene", "obsequious", "observant", "obsolete", "obtainable", "oceanic", "odd", "offbeat", "old", "old-fashioned", "omniscient", "one", "onerous", "open", "opposite", "optimal", "orange", "ordinary", "organic", "ossified", "outgoing", "outrageous", "outstanding", "oval", "overconfident", "overjoyed", "overrated", "overt", "overwrought", "painful", "painstaking", "pale", "paltry", "panicky", "panoramic", "parallel", "parched", "parsimonious", "past", "pastoral", "pathetic", "peaceful", "penitent", "perfect", "periodic", "permissible", "perpetual", "petite", "petite", "phobic", "physical", "picayune", "pink", "piquant", "placid", "plain", "plant", "plastic", "plausible", "pleasant", "plucky", "pointless", "poised", "polite", "political", "poor", "possessive", "possible", "powerful", "precious", "premium", "present", "pretty", "previous", "pricey", "prickly", "private", "probable", "productive", "profuse", "protective", "proud", "psychedelic", "psychotic", "public", "puffy", "pumped", "puny", "purple", "purring", "pushy", "puzzled", "puzzling", "quack", "quaint", "quarrelsome", "questionable", "quick", "quickest", "quiet", "quirky", "quixotic", "quizzical", "rabid", "racial", "ragged", "rainy", "rambunctious", "rampant", "rapid", "rare", "raspy", "ratty", "ready", "real", "rebel", "receptive", "recondite", "red", "redundant", "reflective", "regular", "relieved", "remarkable", "reminiscent", "repulsive", "resolute", "resonant", "responsible", "rhetorical", "rich", "right", "righteous", "rightful", "rigid", "ripe", "ritzy", "roasted", "robust", "romantic", "roomy", "rotten", "rough", "round", "royal", "ruddy", "rude", "rural", "rustic", "ruthless", "sable", "sad", "safe", "salty", "same", "sassy", "satisfying", "savory", "scandalous", "scarce", "scared", "scary", "scattered", "scientific", "scintillating", "scrawny", "screeching", "second", "second-hand", "secret", "secretive", "sedate", "seemly", "selective", "selfish", "separate", "serious", "shaggy", "shaky", "shallow", "sharp", "shiny", "shivering", "shocking", "short", "shrill", "shut", "shy", "sick", "silent", "silent", "silky", "silly", "simple", "simplistic", "sincere", "six", "skillful", "skinny", "sleepy", "slim", "slimy", "slippery", "sloppy", "slow", "small", "smart", "smelly", "smiling", "smoggy", "smooth", "sneaky", "snobbish", "snotty", "soft", "soggy", "solid", "somber", "sophisticated", "sordid", "sore", "sore", "sour", "sparkling", "special", "spectacular", "spicy", "spiffy", "spiky", "spiritual", "spiteful", "splendid", "spooky", "spotless", "spotted", "spotty", "spurious", "squalid", "square", "squealing", "squeamish", "staking", "stale", "standing", "statuesque", "steadfast", "steady", "steep", "stereotyped", "sticky", "stiff", "stimulating", "stingy", "stormy", "straight", "strange", "striped", "strong", "stupendous", "stupid", "sturdy", "subdued", "subsequent", "substantial", "successful", "succinct", "sudden", "sulky", "super", "superb", "superficial", "supreme", "swanky", "sweet", "sweltering", "swift", "symptomatic", "synonymous", "taboo", "tacit", "tacky", "talented", "tall", "tame", "tan", "tangible", "tangy", "tart", "tasteful", "tasteless", "tasty", "tawdry", "tearful", "tedious", "teeny", "teeny-tiny", "telling", "temporary", "ten", "tender", "tense", "tense", "tenuous", "terrible", "terrific", "tested", "testy", "thankful", "therapeutic", "thick", "thin", "thinkable", "third", "thirsty", "thirsty", "thoughtful", "thoughtless", "threatening", "three", "thundering", "tidy", "tight", "tightfisted", "tiny", "tired", "tiresome", "toothsome", "torpid", "tough", "towering", "tranquil", "trashy", "tremendous", "tricky", "trite", "troubled", "truculent", "true", "truthful", "two", "typical", "ubiquitous", "ugliest", "ugly", "ultra", "unable", "unaccountable", "unadvised", "unarmed", "unbecoming", "unbiased", "uncovered", "understood", "undesirable", "unequal", "unequaled", "uneven", "unhealthy", "uninterested", "unique", "unkempt", "unknown", "unnatural", "unruly", "unsightly", "unsuitable", "untidy", "unused", "unusual", "unwieldy", "unwritten", "upbeat", "uppity", "upset", "uptight", "used", "useful", "useless", "utopian", "utter", "uttermost", "vacuous", "vagabond", "vague", "valuable", "various", "vast", "vengeful", "venomous", "verdant", "versed", "victorious", "vigorous", "violent", "violet", "vivacious", "voiceless", "volatile", "voracious", "vulgar", "wacky", "waggish", "waiting", "wakeful", "wandering", "wanting", "warlike", "warm", "wary", "wasteful", "watery", "weak", "wealthy", "weary", "well-groomed", "well-made", "well-off", "well-to-do", "wet", "whimsical", "whispering", "white", "whole", "wholesale", "wicked", "wide", "wide-eyed", "wiggly", "wild", "willing", "windy", "wiry", "wise", "wistful", "witty", "woebegone", "womanly", "wonderful", "wooden", "woozy", "workable", "worried", "worthless", "wrathful", "wretched", "wrong", "wry", "yellow", "yielding", "young", "youthful", "yummy", "zany", "zealous", "zesty", "zippy", "zonked", "account", "achiever", "acoustics", "act", "action", "activity", "actor", "addition", "adjustment", "advertisement", "advice", "aftermath", "afternoon", "afterthought", "agreement", "air", "airplane", "airport", "alarm", "amount", "amusement", "anger", "angle", "animal", "ants", "apparatus", "apparel", "appliance", "approval", "arch", "argument", "arithmetic", "arm", "army", "art", "attack", "attraction", "aunt", "authority", "babies", "baby", "back", "badge", "bag", "bait", "balance", "ball", "base", "baseball", "basin", "basket", "basketball", "bat", "bath", "battle", "bead", "bear", "bed", "bedroom", "beds", "bee", "beef", "beginner", "behavior", "belief", "believe", "bell", "bells", "berry", "bike", "bikes", "bird", "birds", "birth", "birthday", "bit", "bite", "blade", "blood", "blow", "board", "boat", "bomb", "bone", "book", "books", "boot", "border", "bottle", "boundary", "box", "boy", "brake", "branch", "brass", "breath", "brick", "bridge", "brother", "bubble", "bucket", "building", "bulb", "burst", "bushes", "business", "butter", "button", "cabbage", "cable", "cactus", "cake", "cakes", "calculator", "calendar", "camera", "camp", "can", "cannon", "canvas", "cap", "caption", "car", "card", "care", "carpenter", "carriage", "cars", "cart", "cast", "cat", "cats", "cattle", "cause", "cave", "celery", "cellar", "cemetery", "cent", "chalk", "chance", "change", "channel", "cheese", "cherries", "cherry", "chess", "chicken", "chickens", "children", "chin", "church", "circle", "clam", "class", "cloth", "clover", "club", "coach", "coal", "coast", "coat", "cobweb", "coil", "collar", "color", "committee", "company", "comparison", "competition", "condition", "connection", "control", "cook", "copper", "corn", "cough", "country", "cover", "cow", "cows", "crack", "cracker", "crate", "crayon", "cream", "creator", "creature", "credit", "crib", "crime", "crook", "crow", "crowd", "crown", "cub", "cup", "current", "curtain", "curve", "cushion", "dad", "daughter", "day", "death", "debt", "decision", "deer", "degree", "design", "desire", "desk", "destruction", "detail", "development", "digestion", "dime", "dinner", "dinosaurs", "direction", "dirt", "discovery", "discussion", "distance", "distribution", "division", "dock", "doctor", "dog", "dogs", "doll", "dolls", "donkey", "door", "downtown", "drain", "drawer", "dress", "drink", "driving", "drop", "duck", "ducks", "dust", "ear", "earth", "earthquake", "edge", "education", "effect", "egg", "eggnog", "eggs", "elbow", "end", "engine", "error", "event", "example", "exchange", "existence", "expansion", "experience", "expert", "eye", "eyes", "face", "fact", "fairies", "fall", "fang", "farm", "fear", "feeling", "field", "finger", "finger", "fire", "fireman", "fish", "flag", "flame", "flavor", "flesh", "flight", "flock", "floor", "flower", "flowers", "fly", "fog", "fold", "food", "foot", "force", "fork", "form", "fowl", "frame", "friction", "friend", "friends", "frog", "frogs", "front", "fruit", "fuel", "furniture", "gate", "geese", "ghost", "giants", "giraffe", "girl", "girls", "glass", "glove", "gold", "government", "governor", "grade", "grain", "grandfather", "grandmother", "grape", "grass", "grip", "ground", "group", "growth", "guide", "guitar", "gun", "hair", "haircut", "hall", "hammer", "hand", "hands", "harbor", "harmony", "hat", "hate", "head", "health", "heat", "hill", "history", "hobbies", "hole", "holiday", "home", "honey", "hook", "hope", "horn", "horse", "horses", "hose", "hospital", "hot", "hour", "house", "houses", "humor", "hydrant", "ice", "icicle", "idea", "impulse", "income", "increase", "industry", "ink", "insect", "instrument", "insurance", "interest", "invention", "iron", "island", "jail", "jam", "jar", "jeans", "jelly", "jellyfish", "jewel", "join", "judge", "juice", "jump", "kettle", "key", "kick", "kiss", "kittens", "kitty", "knee", "knife", "knot", "knowledge", "laborer", "lace", "ladybug", "lake", "lamp", "land", "language", "laugh", "leather", "leg", "legs", "letter", "letters", "lettuce", "level", "library", "limit", "line", "linen", "lip", "liquid", "loaf", "lock", "locket", "look", "loss", "love", "low", "lumber", "lunch", "lunchroom", "machine", "magic", "maid", "mailbox", "man", "marble", "mark", "market", "mask", "mass", "match", "meal", "measure", "meat", "meeting", "memory", "men", "metal", "mice", "middle", "milk", "mind", "mine", "minister", "mint", "minute", "mist", "mitten", "mom", "money", "monkey", "month", "moon", "morning", "mother", "motion", "mountain", "mouth", "move", "muscle", "name", "nation", "neck", "need", "needle", "nerve", "nest", "night", "noise", "north", "nose", "note", "notebook", "number", "nut", "oatmeal", "observation", "ocean", "offer", "office", "oil", "orange", "oranges", "order", "oven", "page", "pail", "pan", "pancake", "paper", "parcel", "part", "partner", "party", "passenger", "payment", "peace", "pear", "pen", "pencil", "person", "pest", "pet", "pets", "pickle", "picture", "pie", "pies", "pig", "pigs", "pin", "pipe", "pizzas", "place", "plane", "planes", "plant", "plantation", "plants", "plastic", "plate", "play", "playground", "pleasure", "plot", "plough", "pocket", "point", "poison", "pollution", "popcorn", "porter", "position", "pot", "potato", "powder", "power", "price", "produce", "profit", "property", "prose", "protest", "pull", "pump", "punishment", "purpose", "push", "quarter", "quartz", "queen", "question", "quicksand", "quiet", "quill", "quilt", "quince", "quiver", "rabbit", "rabbits", "rail", "railway", "rain", "rainstorm", "rake", "range", "rat", "rate", "ray", "reaction", "reading", "reason", "receipt", "recess", "record", "regret", "relation", "religion", "representative", "request", "respect", "rest", "reward", "rhythm", "rice", "riddle", "rifle", "ring", "rings", "river", "road", "robin", "rock", "rod", "roll", "roof", "room", "root", "rose", "route", "rub", "rule", "run", "sack", "sail", "salt", "sand", "scale", "scarecrow", "scarf", "scene", "scent", "school", "science", "scissors", "screw", "sea", "seashore", "seat", "secretary", "seed", "selection", "self", "sense", "servant", "shade", "shake", "shame", "shape", "sheep", "sheet", "shelf", "ship", "shirt", "shock", "shoe", "shoes", "shop", "show", "side", "sidewalk", "sign", "silk", "silver", "sink", "sister", "sisters", "size", "skate", "skin", "skirt", "sky", "slave", "sleep", "sleet", "slip", "slope", "smash", "smell", "smile", "smoke", "snail", "snails", "snake", "snakes", "sneeze", "snow", "soap", "society", "sock", "soda", "sofa", "son", "song", "songs", "sort", "sound", "soup", "space", "spade", "spark", "spiders", "sponge", "spoon", "spot", "spring", "spy", "square", "squirrel", "stage", "stamp", "star", "start", "statement", "station", "steam", "steel", "stem", "step", "stew", "stick", "sticks", "stitch", "stocking", "stomach", "stone", "stop", "store", "story", "stove", "stranger", "straw", "stream", "street", "stretch", "string", "structure", "substance", "sugar", "suggestion", "suit", "summer", "sun", "support", "surprise", "sweater", "swim", "swing", "system", "table", "tail", "talk", "tank", "taste", "tax", "teaching", "team", "teeth", "temper", "tendency", "tent", "territory", "test", "texture", "theory", "thing", "things", "thought", "thread", "thrill", "throat", "throne", "thumb", "thunder", "ticket", "tiger", "time", "tin", "title", "toad", "toe", "toes", "tomatoes", "tongue", "tooth", "toothbrush", "toothpaste", "top", "touch", "town", "toy", "toys", "trade", "trail", "train", "trains", "tramp", "transport", "tray", "treatment", "tree", "trees", "trick", "trip", "trouble", "trousers", "truck", "trucks", "tub", "turkey", "turn", "twig", "twist", "umbrella", "uncle", "underwear", "unit", "use", "vacation", "value", "van", "vase", "vegetable", "veil", "vein", "verse", "vessel", "vest", "view", "visitor", "voice", "volcano", "volleyball", "voyage", "walk", "wall", "war", "wash", "waste", "watch", "water", "wave", "waves", "wax", "way", "wealth", "weather", "week", "weight", "wheel", "whip", "whistle", "wilderness", "wind", "window", "wine", "wing", "winter", "wire", "wish", "woman", "women", "wood", "wool", "word", "work", "worm", "wound", "wren", "wrench", "wrist", "writer", "writing", "yak", "yam", "yard", "yarn", "year", "yoke", "zebra", "zephyr", "zinc", "zipper", "zoo", "accept", "add", "admire", "admit", "advise", "afford", "agree", "alert", "allow", "amuse", "analyse", "announce", "annoy", "answer", "apologise", "appear", "applaud", "appreciate", "approve", "argue", "arrange", "arrest", "arrive", "ask", "attach", "attack", "attempt", "attend", "attract", "avoid", "back", "bake", "balance", "ban", "bang", "bare", "bat", "bathe", "battle", "beam", "beg", "behave", "belong", "bleach", "bless", "blind", "blink", "blot", "blush", "boast", "boil", "bolt", "bomb", "book", "bore", "borrow", "bounce", "bow", "box", "brake", "branch", "breathe", "bruise", "brush", "bubble", "bump", "burn", "bury", "buzz", "calculate", "call", "camp", "care", "carry", "carve", "cause", "challenge", "change", "charge", "chase", "cheat", "check", "cheer", "chew", "choke", "chop", "claim", "clap", "clean", "clear", "clip", "close", "coach", "coil", "collect", "colour", "comb", "command", "communicate", "compare", "compete", "complain", "complete", "concentrate", "concern", "confess", "confuse", "connect", "consider", "consist", "contain", "continue", "copy", "correct", "cough", "count", "cover", "crack", "crash", "crawl", "cross", "crush", "cry", "cure", "curl", "curve", "cycle", "dam", "damage", "dance", "dare", "decay", "deceive", "decide", "decorate", "delay", "delight", "deliver", "depend", "describe", "desert", "deserve", "destroy", "detect", "develop", "disagree", "disappear", "disapprove", "disarm", "discover", "dislike", "divide", "double", "doubt", "drag", "drain", "dream", "dress", "drip", "drop", "drown", "drum", "dry", "dust", "earn", "educate", "embarrass", "employ", "empty", "encourage", "end", "enjoy", "enter", "entertain", "escape", "examine", "excite", "excuse", "exercise", "exist", "expand", "expect", "explain", "explode", "extend", "face", "fade", "fail", "fancy", "fasten", "fax", "fear", "fence", "fetch", "file", "fill", "film", "fire", "fit", "fix", "flap", "flash", "float", "flood", "flow", "flower", "fold", "follow", "fool", "force", "form", "found", "frame", "frighten", "fry", "gather", "gaze", "glow", "glue", "grab", "grate", "grease", "greet", "grin", "grip", "groan", "guarantee", "guard", "guess", "guide", "hammer", "hand", "handle", "hang", "happen", "harass", "harm", "hate", "haunt", "head", "heal", "heap", "heat", "help", "hook", "hop", "hope", "hover", "hug", "hum", "hunt", "hurry", "identify", "ignore", "imagine", "impress", "improve", "include", "increase", "influence", "inform", "inject", "injure", "instruct", "intend", "interest", "interfere", "interrupt", "introduce", "invent", "invite", "irritate", "itch", "jail", "jam", "jog", "join", "joke", "judge", "juggle", "jump", "kick", "kill", "kiss", "kneel", "knit", "knock", "knot", "label", "land", "last", "laugh", "launch", "learn", "level", "license", "lick", "lie", "lighten", "like", "list", "listen", "live", "load", "lock", "long", "look", "love", "man", "manage", "march", "mark", "marry", "match", "mate", "matter", "measure", "meddle", "melt", "memorise", "mend", "mess up", "milk", "mine", "miss", "mix", "moan", "moor", "mourn", "move", "muddle", "mug", "multiply", "murder", "nail", "name", "need", "nest", "nod", "note", "notice", "number", "obey", "object", "observe", "obtain", "occur", "offend", "offer", "open", "order", "overflow", "owe", "own", "pack", "paddle", "paint", "park", "part", "pass", "paste", "pat", "pause", "peck", "pedal", "peel", "peep", "perform", "permit", "phone", "pick", "pinch", "pine", "place", "plan", "plant", "play", "please", "plug", "point", "poke", "polish", "pop", "possess", "post", "pour", "practise", "pray", "preach", "precede", "prefer", "prepare", "present", "preserve", "press", "pretend", "prevent", "prick", "print", "produce", "program", "promise", "protect", "provide", "pull", "pump", "punch", "puncture", "punish", "push", "question", "queue", "race", "radiate", "rain", "raise", "reach", "realise", "receive", "recognise", "record", "reduce", "reflect", "refuse", "regret", "reign", "reject", "rejoice", "relax", "release", "rely", "remain", "remember", "remind", "remove", "repair", "repeat", "replace", "reply", "report", "reproduce", "request", "rescue", "retire", "return", "rhyme", "rinse", "risk", "rob", "rock", "roll", "rot", "rub", "ruin", "rule", "rush", "sack", "sail", "satisfy", "save", "saw", "scare", "scatter", "scold", "scorch", "scrape", "scratch", "scream", "screw", "scribble", "scrub", "seal", "search", "separate", "serve", "settle", "shade", "share", "shave", "shelter", "shiver", "shock", "shop", "shrug", "sigh", "sign", "signal", "sin", "sip", "ski", "skip", "slap", "slip", "slow", "smash", "smell", "smile", "smoke", "snatch", "sneeze", "sniff", "snore", "snow", "soak", "soothe", "sound", "spare", "spark", "sparkle", "spell", "spill", "spoil", "spot", "spray", "sprout", "squash", "squeak", "squeal", "squeeze", "stain", "stamp", "stare", "start", "stay", "steer", "step", "stir", "stitch", "stop", "store", "strap", "strengthen", "stretch", "strip", "stroke", "stuff", "subtract", "succeed", "suck", "suffer", "suggest", "suit", "supply", "support", "suppose", "surprise", "surround", "suspect", "suspend", "switch", "talk", "tame", "tap", "taste", "tease", "telephone", "tempt", "terrify", "test", "thank", "thaw", "tick", "tickle", "tie", "time", "tip", "tire", "touch", "tour", "tow", "trace", "trade", "train", "transport", "trap", "travel", "treat", "tremble", "trick", "trip", "trot", "trouble", "trust", "try", "tug", "tumble", "turn", "twist", "type", "undress", "unfasten", "unite", "unlock", "unpack", "untidy", "use", "vanish", "visit", "wail", "wait", "walk", "wander", "want", "warm", "warn", "wash", "waste", "watch", "water", "wave", "weigh", "welcome", "whine", "whip", "whirl", "whisper", "whistle", "wink", "wipe", "wish", "wobble", "wonder", "work", "worry", "wrap", "wreck", "wrestle", "wriggle", "x-ray", "yawn", "yell", "zip", "zoom"} diff --git a/GO/hello.go b/GO/hello.go deleted file mode 100644 index fc35865d2..000000000 --- a/GO/hello.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Prinln("Hello") -} \ No newline at end of file diff --git a/GO/hellow.go b/GO/hellow.go deleted file mode 100644 index 996476b50..000000000 --- a/GO/hellow.go +++ /dev/null @@ -1,14 +0,0 @@ -package main - -import ( - "fmt" -) - -func main() { - var str = "こんにちは世界" - var lenstr = len(str) / 3 - for i := 0; i < lenstr; i++ { - fmt.Println(string([]rune(str)[i])) - } - -} diff --git a/GO/helloworld b/GO/helloworld deleted file mode 100644 index e6b60e9c4..000000000 --- a/GO/helloworld +++ /dev/null @@ -1,11 +0,0 @@ -package main - - - -import "fmt" - - - -func main() { - fmt.Println("hello world") -} diff --git a/GO/helloworld.go b/GO/helloworld.go deleted file mode 100644 index f2482c1f3..000000000 --- a/GO/helloworld.go +++ /dev/null @@ -1,5 +0,0 @@ -package main -import "fmt" -func main() { - fmt.Println("hello world") -} diff --git a/GO/helloworld_without_imports.go b/GO/helloworld_without_imports.go deleted file mode 100644 index 9745a8a4e..000000000 --- a/GO/helloworld_without_imports.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - print("Hello world!") -} diff --git a/GO/quick_sort.go b/GO/quick_sort.go deleted file mode 100644 index c4418da80..000000000 --- a/GO/quick_sort.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "fmt" -) - -func QuickSort(arr []int, low int, high int) { - - if low < high { - mid := partition(arr, low, high) - QuickSort(arr, low, mid-1) - QuickSort(arr, mid+1, high) - } - -} - -func partition(arr []int, low int, high int) int { - - pivot := arr[high] - i := low - 1 - for j := low; j <= high-1; j++ { - if arr[j] <= pivot { - i++ - temp := arr[i] - arr[i] = arr[j] - arr[j] = temp - } - } - temp := arr[i+1] - arr[i+1] = arr[high] - arr[high] = temp - return (i + 1) -} - -func main() { - - var arr = []int{1, 9, 5, 4, 7, 6, 8} - - fmt.Println(arr) - QuickSort(arr, 0, len(arr)-1) - fmt.Println(arr) - -} diff --git a/GO/sieve-prime-algorithm.go b/GO/sieve-prime-algorithm.go deleted file mode 100644 index 25e7b25f7..000000000 --- a/GO/sieve-prime-algorithm.go +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import "fmt" - -func generate(ch chan int) { - for i := 2 ; ; i++ { - ch <- i - } -} - -func filter(in chan int,out chan int,prime int) { - for ;; { - num := <-in - if num %prime != 0 { - out <- num - } - } -} - -func main() { - ch := make(chan int) - go generate(ch) - // for test - for i:= 0; i < 1000; i++ { - //for ;; { - prime := <-ch - fmt.Print(prime, " ,") - ch1 := make(chan int) - go filter(ch,ch1,prime) - ch = ch1 - } -} diff --git a/GO/sieve_of_eratosthenes b/GO/sieve_of_eratosthenes deleted file mode 100644 index 7fc230434..000000000 --- a/GO/sieve_of_eratosthenes +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "fmt" -) - -func sieve_of_eratosthenes(n int) { - - prime := make([]bool, n+1) - - for i := 0; i < n+1; i++ { - prime[i] = true - } - - for p := 2; p*p <= n; p++ { - - if prime[p] == true { - - for i := p * 2; i <= n; i += p { - prime[i] = false - } - } - } - - for q := 2; q <= n; q++ { - - if prime[q] == true { - fmt.Printf(" %v", q) - } - } -} - -func main() { - - a := 30 - sieve_of_eratosthenes(a) - -} diff --git a/GO/sqrt.go b/GO/sqrt.go deleted file mode 100644 index 7aa340e70..000000000 --- a/GO/sqrt.go +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" -) - -func Abs(number float64) float64 { - if number < 0 { - return -number - } - return number -} - -func Sqrt(number float64) (result float64) { - result, previousResult, iteration := 1.0, 0.0, 0 - for ; iteration < 100 && Abs(result-previousResult) > 1e-7; iteration++ { - previousResult = result - result -= (result*result - number) / (2 * result) - } - return -} - -func main() { - var num float64 - fmt.Print("Input a number, and we'll calculate its square root: ") - fmt.Scanln(&num) - fmt.Printf("The square root of %f is: %f\n", num, Sqrt(num)) -} diff --git a/GO/variadicFunction.go b/GO/variadicFunction.go deleted file mode 100644 index 6042080a9..000000000 --- a/GO/variadicFunction.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import "fmt" - -func multiplication(nums ...int) { - fmt.Print(nums, " ") - total := 0 - for i, num := range nums { - if i == 0 { - total = num - } - total = total * num - } - fmt.Println(total) -} - -func main() { - multiplication(1, 2) - multiplication(1, 2, 3) - nums := []int{1, 2, 3, 4} - multiplication(nums...) -} diff --git a/Glass/hello.glass b/Glass/hello.glass deleted file mode 100644 index c00425663..000000000 --- a/Glass/hello.glass +++ /dev/null @@ -1,8 +0,0 @@ -{M - [m - (_o) O ! - "Hello World!" - (_o) o . - ? - ] -} diff --git a/Golang/HelloWorld.go b/Golang/HelloWorld.go deleted file mode 100644 index 24f9ee2c1..000000000 --- a/Golang/HelloWorld.go +++ /dev/null @@ -1,5 +0,0 @@ -package main -import "fmt" -func main() { - fmt.Println("Hey, Hello Go. I started learning you") -} diff --git a/Golang/add_2_num.go b/Golang/add_2_num.go deleted file mode 100644 index 196a88c53..000000000 --- a/Golang/add_2_num.go +++ /dev/null @@ -1,24 +0,0 @@ -// Naming this your main package, if this isn't named main, code won't run -package main - -// Importing the relevant packages -import "fmt" - -//defining sum function -func Sum(x int, y int) int { - return x + y - -} - -func main() { - - var a int = 3 // Explicit type decalaration - b := 5 // Implicit type declaration - - fmt.Print("Enter 2 numbers: ") - fmt.Scanf("%d %d", &a, &b) // Same as C - - sum := Sum(a, b) - - fmt.Printf("Sum: %d\n",sum); -} diff --git a/Golang/animated_hello.go b/Golang/animated_hello.go deleted file mode 100644 index 150e13a2c..000000000 --- a/Golang/animated_hello.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - "fmt" - "time" -) - -const chars = "Hello, world!" - -func main() { - for _, c := range chars { - fmt.Print(string(c)) - time.Sleep(50 * time.Millisecond) - } - fmt.Println() -} diff --git a/Golang/antz.go b/Golang/antz.go deleted file mode 100644 index 97503e92a..000000000 --- a/Golang/antz.go +++ /dev/null @@ -1,7 +0,0 @@ -package main -import "fmt" - - -func main(){ - fmt.Println("Hello World") -} \ No newline at end of file diff --git a/Golang/arrays.go b/Golang/arrays.go deleted file mode 100644 index 8086ba27c..000000000 --- a/Golang/arrays.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import "fmt" - -func main() { - - var a [5]int - fmt.Println("emp:", a) - - a[4] = 100 - fmt.Println("set:", a) - fmt.Println("get:", a[4]) - fmt.Println("len:", len(a)) - - b := [5]int{10,20,30,40,50} - fmt.Println("dcl:", b) - - var twoD [2][3]int - for i :=0; i < 2; i++ { - for j :=0; j<3; j++ { - twoD[i][j] = i+j - } - } - fmt.Println("2d matrix:", twoD) -} diff --git a/Golang/binarySearchTree.go b/Golang/binarySearchTree.go deleted file mode 100644 index 245f5b3ac..000000000 --- a/Golang/binarySearchTree.go +++ /dev/null @@ -1,227 +0,0 @@ -// Package binarysearchtree creates a ItemBinarySearchTree data structure for the Item type -package binarysearchtree - -import ( - "fmt" - "sync" - - "github.com/cheekybits/genny/generic" -) - -// Item the type of the binary search tree -type Item generic.Type - -// Node a single node that composes the tree -type Node struct { - key int - value Item - left *Node //left - right *Node //right -} - -// ItemBinarySearchTree the binary search tree of Items -type ItemBinarySearchTree struct { - root *Node - lock sync.RWMutex -} - -// Insert inserts the Item t in the tree -func (bst *ItemBinarySearchTree) Insert(key int, value Item) { - bst.lock.Lock() - defer bst.lock.Unlock() - n := &Node{key, value, nil, nil} - if bst.root == nil { - bst.root = n - } else { - insertNode(bst.root, n) - } -} - -// internal function to find the correct place for a node in a tree -func insertNode(node, newNode *Node) { - if newNode.key < node.key { - if node.left == nil { - node.left = newNode - } else { - insertNode(node.left, newNode) - } - } else { - if node.right == nil { - node.right = newNode - } else { - insertNode(node.right, newNode) - } - } -} - -// InOrderTraverse visits all nodes with in-order traversing -func (bst *ItemBinarySearchTree) InOrderTraverse(f func(Item)) { - bst.lock.RLock() - defer bst.lock.RUnlock() - inOrderTraverse(bst.root, f) -} - -// internal recursive function to traverse in order -func inOrderTraverse(n *Node, f func(Item)) { - if n != nil { - inOrderTraverse(n.left, f) - f(n.value) - inOrderTraverse(n.right, f) - } -} - -// PreOrderTraverse visits all nodes with pre-order traversing -func (bst *ItemBinarySearchTree) PreOrderTraverse(f func(Item)) { - bst.lock.Lock() - defer bst.lock.Unlock() - preOrderTraverse(bst.root, f) -} - -// internal recursive function to traverse pre order -func preOrderTraverse(n *Node, f func(Item)) { - if n != nil { - f(n.value) - preOrderTraverse(n.left, f) - preOrderTraverse(n.right, f) - } -} - -// PostOrderTraverse visits all nodes with post-order traversing -func (bst *ItemBinarySearchTree) PostOrderTraverse(f func(Item)) { - bst.lock.Lock() - defer bst.lock.Unlock() - postOrderTraverse(bst.root, f) -} - -// internal recursive function to traverse post order -func postOrderTraverse(n *Node, f func(Item)) { - if n != nil { - postOrderTraverse(n.left, f) - postOrderTraverse(n.right, f) - f(n.value) - } -} - -// Min returns the Item with min value stored in the tree -func (bst *ItemBinarySearchTree) Min() *Item { - bst.lock.RLock() - defer bst.lock.RUnlock() - n := bst.root - if n == nil { - return nil - } - for { - if n.left == nil { - return &n.value - } - n = n.left - } -} - -// Max returns the Item with max value stored in the tree -func (bst *ItemBinarySearchTree) Max() *Item { - bst.lock.RLock() - defer bst.lock.RUnlock() - n := bst.root - if n == nil { - return nil - } - for { - if n.right == nil { - return &n.value - } - n = n.right - } -} - -// Search returns true if the Item t exists in the tree -func (bst *ItemBinarySearchTree) Search(key int) bool { - bst.lock.RLock() - defer bst.lock.RUnlock() - return search(bst.root, key) -} - -// internal recursive function to search an item in the tree -func search(n *Node, key int) bool { - if n == nil { - return false - } - if key < n.key { - return search(n.left, key) - } - if key > n.key { - return search(n.right, key) - } - return true -} - -// Remove removes the Item with key `key` from the tree -func (bst *ItemBinarySearchTree) Remove(key int) { - bst.lock.Lock() - defer bst.lock.Unlock() - remove(bst.root, key) -} - -// internal recursive function to remove an item -func remove(node *Node, key int) *Node { - if node == nil { - return nil - } - if key < node.key { - node.left = remove(node.left, key) - return node - } - if key > node.key { - node.right = remove(node.right, key) - return node - } - // key == node.key - if node.left == nil && node.right == nil { - node = nil - return nil - } - if node.left == nil { - node = node.right - return node - } - if node.right == nil { - node = node.left - return node - } - leftmostrightside := node.right - for { - //find smallest value on the right side - if leftmostrightside != nil && leftmostrightside.left != nil { - leftmostrightside = leftmostrightside.left - } else { - break - } - } - node.key, node.value = leftmostrightside.key, leftmostrightside.value - node.right = remove(node.right, node.key) - return node -} - -// String prints a visual representation of the tree -func (bst *ItemBinarySearchTree) String() { - bst.lock.Lock() - defer bst.lock.Unlock() - fmt.Println("------------------------------------------------") - stringify(bst.root, 0) - fmt.Println("------------------------------------------------") -} - -// internal recursive function to print a tree -func stringify(n *Node, level int) { - if n != nil { - format := "" - for i := 0; i < level; i++ { - format += " " - } - format += "---[ " - level++ - stringify(n.left, level) - fmt.Printf(format+"%d\n", n.key) - stringify(n.right, level) - } -} \ No newline at end of file diff --git a/Golang/cartesian-product-without-recursion.go b/Golang/cartesian-product-without-recursion.go deleted file mode 100644 index 438b20731..000000000 --- a/Golang/cartesian-product-without-recursion.go +++ /dev/null @@ -1,54 +0,0 @@ -package main - -import ( - "fmt" - "strings" -) - -func main() { - groups := []([]string){ - {"A1", "A2"}, - {"B1", "B2", "B3"}, - {"C1", "C2"}, - } - - combNum := 1 - for _, group := range groups { - combNum *= len(group) - } - - result := getEmptyArray(combNum, len(groups)) - pattern := combNum / len(groups[0]) - for i := 0; i < len(groups); i++ { - groupIndex, patterAcum := 0, 0 - for u := 0; u < combNum; u++ { - if patterAcum == pattern { - if groupIndex < len(groups[i])-1 { - groupIndex++ - patterAcum = 0 - } else { - groupIndex = 0 - patterAcum = 0 - } - } - result[u][i] = groups[i][groupIndex] - patterAcum++ - } - if pattern > 1 { - pattern /= len(groups[i+1]) - } - } - - // Print - for _, column := range result { - fmt.Println(strings.Join(column, " | ")) - } -} - -func getEmptyArray(rows, columns int) [][]string { - result := make([][]string, rows) - for i := range result { - result[i] = make([]string, columns) - } - return result -} diff --git a/Golang/channel_helloworld.go b/Golang/channel_helloworld.go deleted file mode 100644 index 9b44942fe..000000000 --- a/Golang/channel_helloworld.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - "fmt" -) - -func sampleChannel(word string) <-chan string { - newWord := make(chan string) - go func() { newWord <- word + " World." }() - return newWord -} - -func main() { - a := sampleChannel("Hello") - fmt.Println(<-a) -} diff --git a/Golang/channels.go b/Golang/channels.go deleted file mode 100644 index d5a0e48a0..000000000 --- a/Golang/channels.go +++ /dev/null @@ -1,13 +0,0 @@ -package main - -import "fmt" - -func main() { - - messages := make(chan string) - - go func() { messages <- "ping" } () - - msg := <-messages - fmt.Println(msg) -} diff --git a/Golang/closures.go b/Golang/closures.go deleted file mode 100644 index a0c458d46..000000000 --- a/Golang/closures.go +++ /dev/null @@ -1,24 +0,0 @@ - -package main - -import "fmt" - -func intSeq() func() int { - i := 0 - return func() int { - i += 1 - return i - } -} - -func main() { - - nextInt := intSeq() - - fmt.Println(nextInt()) - fmt.Println(nextInt()) - fmt.Println(nextInt()) - - newInts := intSeq() - fmt.Println(newInts()) -} diff --git a/Golang/errors.go b/Golang/errors.go deleted file mode 100644 index 8536190a3..000000000 --- a/Golang/errors.go +++ /dev/null @@ -1,63 +0,0 @@ -// In Go it's idiomatic to communicate errors via an -// explicit, separate return value. This contrasts with -// the exceptions used in languages like Java and Ruby and -// the overloaded single result / error value sometimes -// used in C. Go's approach makes it easy to see which -package main - -import "errors" -import "fmt" - -func f1(arg int) (int, error) { - if arg == 42 { - - return -1, errors.New("can't work with 42") - - } - - - return arg + 3, nil -} - -type argError struct { - arg int - prob string -} - -func (e *argError) Error() string { - return fmt.Sprintf("%d - %s", e.arg, e.prob) -} - -func f2(arg int) (int, error) { - if arg == 42 { - - return -1, &argError{arg, "can't work with it"} - } - return arg + 3, nil -} - -func main() { - - - for _, i := range []int{7, 42} { - if r, e := f1(i); e != nil { - fmt.Println("f1 failed:", e) - } else { - fmt.Println("f1 worked:", r) - } - } - for _, i := range []int{7, 42} { - if r, e := f2(i); e != nil { - fmt.Println("f2 failed:", e) - } else { - fmt.Println("f2 worked:", r) - } - } - - _, e := f2(42) - if ae, ok := e.(*argError); ok { - fmt.Println(ae.arg) - fmt.Println(ae.prob) - } -} - diff --git a/Golang/fizzbuzz.go b/Golang/fizzbuzz.go deleted file mode 100644 index eef593d61..000000000 --- a/Golang/fizzbuzz.go +++ /dev/null @@ -1,20 +0,0 @@ -package main - -import "fmt" - -func main() { - for i := 1; i <= 100; i++ { - result := "" - if i%3 == 0 { - result += "Fizz" - } - if i%5 == 0 { - result += "Buzz" - } - if result != "" { - fmt.Println(result) - continue - } - fmt.Println(i) - } -} diff --git a/Golang/for.go b/Golang/for.go deleted file mode 100644 index 02dd1b424..000000000 --- a/Golang/for.go +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import "fmt" - -func main() { - - i := 1 - for i <= 10 { - fmt.Println(i%4) - i = i+1 - } - - for n:=0; n<=10; n++ { - if n%3 == 0 { - continue - } - fmt.Println(n) - } - - for { - fmt.Println("loop") - break - } -} diff --git a/Golang/graph.go b/Golang/graph.go deleted file mode 100644 index 4b540f289..000000000 --- a/Golang/graph.go +++ /dev/null @@ -1,62 +0,0 @@ -// Package graph creates a ItemGraph data structure for the Item type -package graph - -import ( - "fmt" - "sync" - - "github.com/cheekybits/genny/generic" -) - -// Item the type of the binary search tree -type Item generic.Type - -// Node a single node that composes the tree -type Node struct { - value Item -} - -func (n *Node) String() string { - return fmt.Sprintf("%v", n.value) -} - -// ItemGraph the Items graph -type ItemGraph struct { - nodes []*Node - edges map[Node][]*Node - lock sync.RWMutex -} - -// AddNode adds a node to the graph -func (g *ItemGraph) AddNode(n *Node) { - g.lock.Lock() - g.nodes = append(g.nodes, n) - g.lock.Unlock() -} - -// AddEdge adds an edge to the graph -func (g *ItemGraph) AddEdge(n1, n2 *Node) { - g.lock.Lock() - if g.edges == nil { - g.edges = make(map[Node][]*Node) - } - g.edges[*n1] = append(g.edges[*n1], n2) - g.edges[*n2] = append(g.edges[*n2], n1) - g.lock.Unlock() -} - -// AddEdge adds an edge to the graph -func (g *ItemGraph) String() { - g.lock.RLock() - s := "" - for i := 0; i < len(g.nodes); i++ { - s += g.nodes[i].String() + " -> " - near := g.edges[*g.nodes[i]] - for j := 0; j < len(near); j++ { - s += near[j].String() + " " - } - s += "\n" - } - fmt.Println(s) - g.lock.RUnlock() -} diff --git a/Golang/guessingGame.go b/Golang/guessingGame.go deleted file mode 100644 index b265a6966..000000000 --- a/Golang/guessingGame.go +++ /dev/null @@ -1,46 +0,0 @@ -package main - -import ( - "fmt" - "math/rand" -) - -func generateRandomNumber() int { - randomInt := rand.Intn(101) - if randomInt != 0 { - return randomInt - } - return generateRandomNumber() -} - -func main() { - fmt.Println("********************************************") - fmt.Println("******** HERE IS YOUR GUESSING GAME ********") - fmt.Println("********************************************") - fmt.Println() - fmt.Println("Rules: You got 3 tries to guess the correct number") - fmt.Println("Guess the correct number which is between 1 to 100") - answer := generateRandomNumber() - tries := 3 - for i := tries; i >= 0; i-- { - var guess int - fmt.Println() - - if i == 0 { - fmt.Println("Sorry, you lost") - break - } - - fmt.Println(i, "trie(s) remaining.") - fmt.Scanf("%d", &guess) - - if guess > answer { - fmt.Println("Your guess is more than expected.") - } else if guess < answer { - fmt.Println("Your guess is low than expected.") - } else { - fmt.Println("Congratulations! You gussed it.") - break - } - } -} diff --git a/Golang/hello-world.ru.go b/Golang/hello-world.ru.go deleted file mode 100644 index 88891ab4f..000000000 --- a/Golang/hello-world.ru.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("Привет, мир!") -} diff --git a/Golang/hello.go b/Golang/hello.go deleted file mode 100644 index f2482c1f3..000000000 --- a/Golang/hello.go +++ /dev/null @@ -1,5 +0,0 @@ -package main -import "fmt" -func main() { - fmt.Println("hello world") -} diff --git a/Golang/helloFromRTP.go b/Golang/helloFromRTP.go deleted file mode 100644 index 0fffb5674..000000000 --- a/Golang/helloFromRTP.go +++ /dev/null @@ -1,9 +0,0 @@ -package main - -import ( - "fmt" -) - -func main() { - fmt.Println("Hello, Hacktoberfest!") -} diff --git a/Golang/hello_from_Russia.go b/Golang/hello_from_Russia.go deleted file mode 100644 index 2c0396e3a..000000000 --- a/Golang/hello_from_Russia.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("Привет, мир! Из России с любовью! :)") -} diff --git a/Golang/hello_from_the_other_side b/Golang/hello_from_the_other_side deleted file mode 100644 index 1ca33407b..000000000 --- a/Golang/hello_from_the_other_side +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("hello from the other side") -} diff --git a/Golang/hello_from_the_other_side.go b/Golang/hello_from_the_other_side.go deleted file mode 100644 index 1ca33407b..000000000 --- a/Golang/hello_from_the_other_side.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("hello from the other side") -} diff --git a/Golang/hello_jflayhart.go b/Golang/hello_jflayhart.go deleted file mode 100644 index 5f03c7235..000000000 --- a/Golang/hello_jflayhart.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("Go World! Oh, and hello.") -} diff --git a/Golang/helloearth.go b/Golang/helloearth.go deleted file mode 100644 index ca74f3ca3..000000000 --- a/Golang/helloearth.go +++ /dev/null @@ -1,8 +0,0 @@ -package main - - -import "fmt" - -func main() { - fmt.Println("hello earth!!!!") -} diff --git a/Golang/helloname.go b/Golang/helloname.go deleted file mode 100644 index 9fa991868..000000000 --- a/Golang/helloname.go +++ /dev/null @@ -1,12 +0,0 @@ -package main - -import "os" -import "fmt" - -func main() { - if len(os.Args) < 2 { - fmt.Println("You did not pass a name"); - os.Exit(1); - } - fmt.Printf("Hello %s\n", os.Args[1]) -} \ No newline at end of file diff --git a/Golang/helloword-no-import.go b/Golang/helloword-no-import.go deleted file mode 100644 index 9fb85d747..000000000 --- a/Golang/helloword-no-import.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - 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/Golang/helloworld1.go b/Golang/helloworld1.go deleted file mode 100644 index ea627c27b..000000000 --- a/Golang/helloworld1.go +++ /dev/null @@ -1,8 +0,0 @@ -package main - - -import "fmt" - -func main() { - fmt.Println("Hey, Hello Go. I started loving you") -} \ No newline at end of file diff --git a/Golang/holamundo.go b/Golang/holamundo.go deleted file mode 100644 index 04173a36a..000000000 --- a/Golang/holamundo.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("¡Hola mundo!") -} diff --git a/Golang/httpexample.go b/Golang/httpexample.go deleted file mode 100644 index 1151334d8..000000000 --- a/Golang/httpexample.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "fmt" - "net/http" - "strings" -) - -func sayHello(w http.ResponseWriter, r *http.Request) { - message := r.URL.Path - message = strings.TrimPrefix(message, "/") - message = "Hello " + message - w.Write([]byte(message)) -} -func main() { - fmt.Println("Started on port 8080") - http.HandleFunc("/", sayHello) - if err := http.ListenAndServe(":8080", nil); err != nil { - panic(err) - } -} diff --git a/Golang/if-else.go b/Golang/if-else.go deleted file mode 100644 index 37fcd6390..000000000 --- a/Golang/if-else.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import "fmt" - -func main() { - - n := 15 - if n%2 == 0 { - fmt.Println(n, "is even") - } else { - fmt.Println(n, "is odd") - } - - if num:= 99; num<0 { - fmt.Println(num, "is negetive") - } else if num < 10 { - fmt.Println(num, "is a single digit number") - } else { - fmt.Println(num, "has more than one digit") - } -} diff --git a/Golang/linkedList.go b/Golang/linkedList.go deleted file mode 100644 index 1aa286de7..000000000 --- a/Golang/linkedList.go +++ /dev/null @@ -1,158 +0,0 @@ -// Package linkedlist creates a ItemLinkedList data structure for the Item type -package linkedlist - -import ( - "fmt" - "sync" - - "github.com/cheekybits/genny/generic" -) - -// Item the type of the linked list -type Item generic.Type - -// Node a single node that composes the list -type Node struct { - content Item - next *Node -} - -// ItemLinkedList the linked list of Items -type ItemLinkedList struct { - head *Node - size int - lock sync.RWMutex -} - -// Append adds an Item to the end of the linked list -func (ll *ItemLinkedList) Append(t Item) { - ll.lock.Lock() - node := Node{t, nil} - if ll.head == nil { - ll.head = &node - } else { - last := ll.head - for { - if last.next == nil { - break - } - last = last.next - } - last.next = &node - } - ll.size++ - ll.lock.Unlock() -} - -// Insert adds an Item at position i -func (ll *ItemLinkedList) Insert(i int, t Item) error { - ll.lock.Lock() - defer ll.lock.Unlock() - if i < 0 || i > ll.size { - return fmt.Errorf("Index out of bounds") - } - addNode := Node{t, nil} - if i == 0 { - addNode.next = ll.head - ll.head = &addNode - return nil - } - node := ll.head - j := 0 - for j < i-2 { - j++ - node = node.next - } - addNode.next = node.next - node.next = &addNode - ll.size++ - return nil -} - -// RemoveAt removes a node at position i -func (ll *ItemLinkedList) RemoveAt(i int) (*Item, error) { - ll.lock.Lock() - defer ll.lock.Unlock() - if i < 0 || i > ll.size { - return nil, fmt.Errorf("Index out of bounds") - } - node := ll.head - j := 0 - for j < i-1 { - j++ - node = node.next - } - remove := node.next - node.next = remove.next - ll.size-- - return &remove.content, nil -} - -// IndexOf returns the position of the Item t -func (ll *ItemLinkedList) IndexOf(t Item) int { - ll.lock.RLock() - defer ll.lock.RUnlock() - node := ll.head - j := 0 - for { - if node.content == t { - return j - } - if node.next == nil { - return -1 - } - node = node.next - j++ - } -} - -// IsEmpty returns true if the list is empty -func (ll *ItemLinkedList) IsEmpty() bool { - ll.lock.RLock() - defer ll.lock.RUnlock() - if ll.head == nil { - return true - } - return false -} - -// Size returns the linked list size -func (ll *ItemLinkedList) Size() int { - ll.lock.RLock() - defer ll.lock.RUnlock() - size := 1 - last := ll.head - for { - if last == nil || last.next == nil { - break - } - last = last.next - size++ - } - return size -} - -// Insert adds an Item at position i -func (ll *ItemLinkedList) String() { - ll.lock.RLock() - defer ll.lock.RUnlock() - node := ll.head - j := 0 - for { - if node == nil { - break - } - j++ - fmt.Print(node.content) - fmt.Print(" ") - node = node.next - } - fmt.Println() -} - -// Head returns a pointer to the first node of the list -func (ll *ItemLinkedList) Head() *Node { - ll.lock.RLock() - defer ll.lock.RUnlock() - return ll.head -} diff --git a/Golang/main.go b/Golang/main.go deleted file mode 100644 index 91e7378c4..000000000 --- a/Golang/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("Hello World") -} diff --git a/Golang/pigeonhole_sort b/Golang/pigeonhole_sort deleted file mode 100644 index 62e8663c3..000000000 --- a/Golang/pigeonhole_sort +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import "fmt" - -func pigeonhole_sort(arr []int) []int { - max := arr[0] - min := arr[0] - - for i := 0; i < len(arr); i++ { - if arr[i] < min { - min = arr[i] - } - if arr[i] > max { - max = arr[i] - } - } - - rang := int(max - min + 1) - - holes := make([]int, rang) - - for i := 0; i < len(arr); i++ { - holes[arr[i]-min] += arr[i] - } - - return holes -} - -func main() { - arr := []int{323, 23, 21, 3123, 1} - hole := pigeonhole_sort(arr) - - for i := 0; i < len(hole); i++ { - if hole[i] > 0 { - fmt.Println(hole[i]) - } - } - -} diff --git a/Golang/queue.go b/Golang/queue.go deleted file mode 100644 index 3fe2ad3b4..000000000 --- a/Golang/queue.go +++ /dev/null @@ -1,57 +0,0 @@ -// Package queue creates a ItemQueue data structure for the Item type -package queue - -import ( - "sync" - - "github.com/cheekybits/genny/generic" -) - -// Item the type of the queue -type Item generic.Type - -// ItemQueue the queue of Items -type ItemQueue struct { - items []Item - lock sync.RWMutex -} - -// New creates a new ItemQueue -func (s *ItemQueue) New() *ItemQueue { - s.items = []Item{} - return s -} - -// Enqueue adds an Item to the end of the queue -func (s *ItemQueue) Enqueue(t Item) { - s.lock.Lock() - s.items = append(s.items, t) - s.lock.Unlock() -} - -// Dequeue removes an Item from the start of the queue -func (s *ItemQueue) Dequeue() *Item { - s.lock.Lock() - item := s.items[0] - s.items = s.items[1:len(s.items)] - s.lock.Unlock() - return &item -} - -// Front returns the item next in the queue, without removing it -func (s *ItemQueue) Front() *Item { - s.lock.RLock() - item := s.items[0] - s.lock.RUnlock() - return &item -} - -// IsEmpty returns true if the queue is empty -func (s *ItemQueue) IsEmpty() bool { - return len(s.items) == 0 -} - -// Size returns the number of Items in the queue -func (s *ItemQueue) Size() int { - return len(s.items) -} \ No newline at end of file diff --git a/Golang/quick sort b/Golang/quick sort deleted file mode 100644 index fb916d6a9..000000000 --- a/Golang/quick sort +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "fmt" - "math/rand" -) - -const max = 100 - -func partition(arr []int, low, high int) int { - pivotIndex := low + rand.Int()%(high-low+1) - pivot := arr[pivotIndex] - arr[pivotIndex], arr[high] = arr[high], arr[pivotIndex] - for j := low; j < high; j++ { - if arr[j] < pivot { - arr[j], arr[low] = arr[low], arr[j] - low++ - } - } - - arr[low], arr[high] = arr[high], arr[low] - return low -} - -func quickSort(arr []int, low, high int) { - if low > high { - return - } - pi := partition(arr, low, high) - quickSort(arr, low, pi-1) - quickSort(arr, pi+1, high) -} - -func main() { - arr := []int{79, 10, 73, 1, 68, 56, 3} - quickSort(arr, 0, len(arr)-1) - fmt.Println(arr) -} diff --git a/Golang/quicksort.go b/Golang/quicksort.go deleted file mode 100644 index 0661e2576..000000000 --- a/Golang/quicksort.go +++ /dev/null @@ -1,35 +0,0 @@ -package main - -import ( - "fmt" -) - -func partition(a []int, lo, hi int) int { - p := a[hi] - for j := lo; j < hi; j++ { - if a[j] < p { - a[j], a[lo] = a[lo], a[j] - lo++ - } - } - - a[lo], a[hi] = a[hi], a[lo] - return lo -} - -func quickSort(a []int, lo, hi int) { - if lo > hi { - return - } - - p := partition(a, lo, hi) - quickSort(a, lo, p-1) - quickSort(a, p+1, hi) -} - -func main() { - list := []int{55, 90, 74, 20, 16, 46, 43, 59, 2, 99, 79, 10, 73, 1, 68, 56, 3, 87, 40, 78, 14, 18, 51, 24, 57, 89, 4, 62, 53, 23, 93, 41, 95, 84, 88} - - quickSort(list, 0, len(list)-1) - fmt.Println(list) -} \ No newline at end of file diff --git a/Golang/set.go b/Golang/set.go deleted file mode 100644 index 52997031b..000000000 --- a/Golang/set.go +++ /dev/null @@ -1,58 +0,0 @@ -// Package set creates a ItemSet data structure for the Item type -package set - -import "github.com/cheekybits/genny/generic" - -// Item the type of the Set -type Item generic.Type - -// ItemSet the set of Items -type ItemSet struct { - items map[Item]bool -} - -// Add adds a new element to the Set. Returns a pointer to the Set. -func (s *ItemSet) Add(t Item) *ItemSet { - if s.items == nil { - s.items = make(map[Item]bool) - } - _, ok := s.items[t] - if !ok { - s.items[t] = true - } - return s -} - -// Clear removes all elements from the Set -func (s *ItemSet) Clear() { - s.items = make(map[Item]bool) -} - -// Delete removes the Item from the Set and returns Has(Item) -func (s *ItemSet) Delete(item Item) bool { - _, ok := s.items[item] - if ok { - delete(s.items, item) - } - return ok -} - -// Has returns true if the Set contains the Item -func (s *ItemSet) Has(item Item) bool { - _, ok := s.items[item] - return ok -} - -// Items returns the Item(s) stored -func (s *ItemSet) Items() []Item { - items := []Item{} - for i := range s.items { - items = append(items, i) - } - return items -} - -// Size returns the size of the set -func (s *ItemSet) Size() int { - return len(s.items) -} \ No newline at end of file diff --git a/Golang/shell_sort b/Golang/shell_sort deleted file mode 100644 index 97e5b0d01..000000000 --- a/Golang/shell_sort +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import ( - "fmt" -) - -func shell_sort(arr []int, n int) { - var j int - for gap := (n / 2); gap > 0; gap /= 2 { - for i := gap; i < n; i++ { - temp := arr[i] - for j = i; j >= gap && temp < arr[j-gap]; j -= gap { - arr[j] = arr[j-gap] - } - arr[j] = temp - } - } -} - -func main() { - arr := []int{1322, 54, 5454, 7656, 45465, 467, 65417, 8645, 49841, 51, 618643, 1346413168, 1168798, 431645168, 46, 9790000987, 65451946} - shell_sort(arr, len(arr)) - fmt.Println(arr) -} diff --git a/Golang/slices.go b/Golang/slices.go deleted file mode 100644 index d44ac39a7..000000000 --- a/Golang/slices.go +++ /dev/null @@ -1,7 +0,0 @@ -package main -import "fmt" -func main () { - primes := [6]int{2,3,5,7,11,13} - var s []int = primes[1:4] - fmt.Println(s) -} \ No newline at end of file diff --git a/Golang/sort-by-func.go b/Golang/sort-by-func.go deleted file mode 100644 index 62b44aeaa..000000000 --- a/Golang/sort-by-func.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import "sort" -import "fmt" - -type ByLength []string - -func (s ByLength) Len() int { - return len(s) -} - -func (s ByLength) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s ByLength) Less(i, j int) bool { - return len(s[i]) < len(s[j]) -} - -func main() { - - fruits := []string{"peach", "banana", "kiwi"} - sort.Sort(ByLength(fruits)) - fmt.Println(fruits) - -} diff --git a/Golang/sorting.go b/Golang/sorting.go deleted file mode 100644 index 4c6024b66..000000000 --- a/Golang/sorting.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import "fmt" -import "sort" - -func main() { - - strs := []string{"c", "a", "b"} - sort.Strings(strs) - fmt.Println("Sorted Strings:", strs) - - ints := []int{7, 2, 5} - sort.Ints(ints) - fmt.Println("Sorted Integers:", ints) - - s := sort.IntsAreSorted(ints) - fmt.Println("Sorted:", s) -} diff --git a/Golang/stack.go b/Golang/stack.go deleted file mode 100644 index 9b1f1070a..000000000 --- a/Golang/stack.go +++ /dev/null @@ -1,39 +0,0 @@ -// Package stack creates a ItemStack data structure for the Item type -package stack - -import ( - "sync" - - "github.com/cheekybits/genny/generic" -) - -// Item the type of the stack -type Item generic.Type - -// ItemStack the stack of Items -type ItemStack struct { - items []Item - lock sync.RWMutex -} - -// New creates a new ItemStack -func (s *ItemStack) New() *ItemStack { - s.items = []Item{} - return s -} - -// Push adds an Item to the top of the stack -func (s *ItemStack) Push(t Item) { - s.lock.Lock() - s.items = append(s.items, t) - s.lock.Unlock() -} - -// Pop removes an Item from the top of the stack -func (s *ItemStack) Pop() *Item { - s.lock.Lock() - item := s.items[len(s.items)-1] - s.items = s.items[0 : len(s.items)-1] - s.lock.Unlock() - return &item -} \ No newline at end of file diff --git a/Golang/stooge_sort b/Golang/stooge_sort deleted file mode 100644 index 90f606c77..000000000 --- a/Golang/stooge_sort +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import "fmt" - -func stooge_sort(arr []int, l, r int) { - if arr[l] > arr[r] { - arr[l], arr[r] = arr[r], arr[l] - } - - if (r - l) >= 2 { - mid := (r - l + 1) / 3 - stooge_sort(arr, l, r-mid) - stooge_sort(arr, l+mid, r) - stooge_sort(arr, l, r-mid) - - } -} - -func main() { - arr := []int{234,1,5,6547,8678,9879} - stooge_sort(arr, 0, len(arr)-1) - fmt.Println(arr) -} diff --git a/Golang/switch.go b/Golang/switch.go deleted file mode 100644 index 27d991954..000000000 --- a/Golang/switch.go +++ /dev/null @@ -1,59 +0,0 @@ -package main - -import "fmt" -import "time" - -func main() { - - // Here's a basic `switch`. - i := 2 - fmt.Print("Write ", i, " as ") - switch i { - case 1: - fmt.Println("one") - case 2: - fmt.Println("two") - case 3: - fmt.Println("three") - } - - // You can use commas to separate multiple expressions - // in the same `case` statement. We use the optional - // `default` case in this example as well. - switch time.Now().Weekday() { - case time.Saturday, time.Sunday: - fmt.Println("It's the weekend") - default: - fmt.Println("It's a weekday") - } - - // `switch` without an expression is an alternate way - // to express if/else logic. Here we also show how the - // `case` expressions can be non-constants. - t := time.Now() - switch { - case t.Hour() < 12: - fmt.Println("It's before noon") - default: - fmt.Println("It's after noon") - } - - // A type `switch` compares types instead of values. You - // can use this to discover the the type of an interface - // value. In this example, the variable `t` will have the - // type corresponding to its clause. - whatAmI := func(i interface{}) { - switch t := i.(type) { - case bool: - fmt.Println("I'm a bool") - case int: - fmt.Println("I'm an int") - default: - fmt.Printf("Don't know type %T\n", t) - } - } - whatAmI(true) - whatAmI(1) - whatAmI("hey") -} - diff --git a/Golang/timeouts.go b/Golang/timeouts.go deleted file mode 100644 index df3c61954..000000000 --- a/Golang/timeouts.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import "time" -import "fmt" - -func main() { - - c1 := make(chan string, 1) - - go func() { - time.Sleep(time.Second * 2) - c1 <- "result 1" - }() - - select { - case res := <-c1: - fmt.Println(res) - case <-time.After(time.Second * 1): - fmt.Println("timeout 1") - } - - c2 := make(chan string, 1) - go func() { - time.Sleep(time.Second * 2) - c2 <- "result 2" - }() - select { - case res := <-c2: - fmt.Println(res) - case <-time.After(time.Second * 2): - fmt.Println("timeout 2") - } -} diff --git a/Golang/timers.go b/Golang/timers.go deleted file mode 100644 index f16e580c8..000000000 --- a/Golang/timers.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import "time" -import "fmt" - -func main() { - - timer1 := time.NewTimer(time.Second * 2) - - <-timer1.C - fmt.Println("Timer 1 expired") - - timer2 := time.NewTimer(time.Second) - go func() { - <-timer2.C - fmt.Println("Timer 2 expired") - } () - stop2 := timer2.Stop() - if stop2 { - fmt.Println("Timer 2 Stopped") - } -} diff --git a/Golang/variables.go b/Golang/variables.go deleted file mode 100644 index 97c46f314..000000000 --- a/Golang/variables.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import "fmt" - -func main() { - - var a string = "first" - fmt.Println(a) - - var b,c int = 1, 2 - fmt.Println(b,c) - - var d = true - fmt.Println(d) - - var e int - fmt.Println(e) - - f := "last" - fmt.Println(f) -} diff --git a/GolfScript/helloworld.gs b/GolfScript/helloworld.gs deleted file mode 100644 index 224e2ccfd..000000000 --- a/GolfScript/helloworld.gs +++ /dev/null @@ -1 +0,0 @@ -Print "Hello world!" \ No newline at end of file diff --git a/Gradle/.gradle/4.10.2/fileChanges/last-build.bin b/Gradle/.gradle/4.10.2/fileChanges/last-build.bin deleted file mode 100644 index f76dd238a..000000000 Binary files a/Gradle/.gradle/4.10.2/fileChanges/last-build.bin and /dev/null differ diff --git a/Gradle/.gradle/4.10.2/fileHashes/fileHashes.bin b/Gradle/.gradle/4.10.2/fileHashes/fileHashes.bin deleted file mode 100644 index 272f234c2..000000000 Binary files a/Gradle/.gradle/4.10.2/fileHashes/fileHashes.bin and /dev/null differ diff --git a/Gradle/.gradle/4.10.2/fileHashes/fileHashes.lock b/Gradle/.gradle/4.10.2/fileHashes/fileHashes.lock deleted file mode 100644 index 475c7c593..000000000 Binary files a/Gradle/.gradle/4.10.2/fileHashes/fileHashes.lock and /dev/null differ diff --git a/Gradle/.gradle/4.10.2/gc.properties b/Gradle/.gradle/4.10.2/gc.properties deleted file mode 100644 index e69de29bb..000000000 diff --git a/Gradle/.gradle/4.6/fileChanges/last-build.bin b/Gradle/.gradle/4.6/fileChanges/last-build.bin deleted file mode 100644 index f76dd238a..000000000 Binary files a/Gradle/.gradle/4.6/fileChanges/last-build.bin and /dev/null differ diff --git a/Gradle/.gradle/4.6/fileHashes/fileHashes.bin b/Gradle/.gradle/4.6/fileHashes/fileHashes.bin deleted file mode 100644 index 2f5d40ac6..000000000 Binary files a/Gradle/.gradle/4.6/fileHashes/fileHashes.bin and /dev/null differ diff --git a/Gradle/.gradle/4.6/fileHashes/fileHashes.lock b/Gradle/.gradle/4.6/fileHashes/fileHashes.lock deleted file mode 100644 index 6bcf1911e..000000000 Binary files a/Gradle/.gradle/4.6/fileHashes/fileHashes.lock and /dev/null differ diff --git a/Gradle/.gradle/vcs-1/gc.properties b/Gradle/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29bb..000000000 diff --git a/Gradle/.gradle/vcsWorkingDirs/gc.properties b/Gradle/.gradle/vcsWorkingDirs/gc.properties deleted file mode 100644 index e69de29bb..000000000 diff --git a/Gradle/.project b/Gradle/.project deleted file mode 100644 index 1c3d3a96c..000000000 --- a/Gradle/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Gradle - Project Gradle created by Buildship. - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/Gradle/.settings/org.eclipse.buildship.core.prefs b/Gradle/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 985028a85..000000000 --- a/Gradle/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -auto.sync=false -build.scans.enabled=false -connection.gradle.distribution=GRADLE_DISTRIBUTION(LOCAL_INSTALLATION(C\:\\Program Files\\Android\\Android Studio\\gradle\\gradle-4.6)) -connection.project.dir= -eclipse.preferences.version=1 -gradle.user.home= -offline.mode=false -override.workspace.settings=true diff --git a/Gradle/build.gradle b/Gradle/build.gradle deleted file mode 100644 index 1c4ef2fb6..000000000 --- a/Gradle/build.gradle +++ /dev/null @@ -1,5 +0,0 @@ -task hello { - dolast { - println 'Hello world!' - } -} diff --git a/GraphQL/.gitignore b/GraphQL/.gitignore deleted file mode 100644 index b512c09d4..000000000 --- a/GraphQL/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/GraphQL/GraphQLAPI/.gitignore b/GraphQL/GraphQLAPI/.gitignore deleted file mode 100644 index 22fbdbe40..000000000 --- a/GraphQL/GraphQLAPI/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -yarn.lock -package-lock.json diff --git a/GraphQL/GraphQLAPI/hello-world-graphql.js b/GraphQL/GraphQLAPI/hello-world-graphql.js deleted file mode 100644 index 930328738..000000000 --- a/GraphQL/GraphQLAPI/hello-world-graphql.js +++ /dev/null @@ -1,32 +0,0 @@ -const express = require('express') -const expressGraphql = require('express-graphql') -const app = express() -const { makeExecutableSchema } = require('graphql-tools') - -const typeDefs = ` - type Query { - helloWorld: String - } -` - -const resolvers = { - Query: { - helloWorld: () => { - return 'Hello World!' - } - } -} - -const schema = makeExecutableSchema({ - typeDefs, - resolvers -}) - -app.use('/', expressGraphql({ - schema, - graphiql: false -})) - -app.listen(8080, () => { - console.log('\nListening on http://localhost:8080') -}) diff --git a/GraphQL/GraphQLAPI/package.json b/GraphQL/GraphQLAPI/package.json deleted file mode 100644 index 9e2ea0f06..000000000 --- a/GraphQL/GraphQLAPI/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "graphql-api", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "express": "^4.16.3", - "express-graphql": "^0.6.12", - "graphql": "^0.13.2", - "graphql-tools": "^3.0.5" - } -} diff --git a/GraphQL/hello-world-graphql.ts b/GraphQL/hello-world-graphql.ts deleted file mode 100644 index fa5ef07fd..000000000 --- a/GraphQL/hello-world-graphql.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { GraphQLServer } from 'graphql-yoga'; - -const typeDefs = ` - type Query { - greet: String - } -` - -const resolvers = { - Query: { - greet: () => 'hello world' - } -} - -const server = new GraphQLServer({typeDefs, resolvers}) -server.start(() => console.log('⚡️ Waiting to greet you at http://localhost:4000')) \ No newline at end of file diff --git a/GraphQL/package.json b/GraphQL/package.json deleted file mode 100644 index 3e08bfab5..000000000 --- a/GraphQL/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "grapqhl", - "version": "1.0.0", - "description": "", - "main": "hello-world-graphql.ts", - "scripts": { - "start": "ts-node hello-world-graphql.ts" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "graphql-yoga": "^1.16.2" - }, - "devDependencies": { - "ts-node": "^7.0.1", - "typescript": "^3.1.2" - } -} diff --git a/GraphQL/yarn.lock b/GraphQL/yarn.lock deleted file mode 100644 index 30e4090d3..000000000 --- a/GraphQL/yarn.lock +++ /dev/null @@ -1,901 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/runtime@^7.0.0-beta.40": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.2.tgz#81c89935f4647706fc54541145e6b4ecfef4b8e3" - dependencies: - regenerator-runtime "^0.12.0" - -"@types/body-parser@*": - version "1.17.0" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.0.tgz#9f5c9d9bd04bb54be32d5eb9fc0d8c974e6cf58c" - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/connect@*": - version "3.4.32" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.32.tgz#aa0e9616b9435ccad02bc52b5b454ffc2c70ba28" - dependencies: - "@types/node" "*" - -"@types/cors@^2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.4.tgz#50991a759a29c0b89492751008c6af7a7c8267b0" - dependencies: - "@types/express" "*" - -"@types/events@*": - version "1.2.0" - resolved "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" - -"@types/express-serve-static-core@*": - version "4.16.0" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz#fdfe777594ddc1fe8eb8eccce52e261b496e43e7" - dependencies: - "@types/events" "*" - "@types/node" "*" - "@types/range-parser" "*" - -"@types/express@*", "@types/express@^4.11.1": - version "4.16.0" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.16.0.tgz#6d8bc42ccaa6f35cf29a2b7c3333cb47b5a32a19" - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "*" - "@types/serve-static" "*" - -"@types/graphql-deduplicator@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/graphql-deduplicator/-/graphql-deduplicator-2.0.0.tgz#9e577b8f3feb3d067b0ca756f4a1fb356d533922" - -"@types/graphql@^0.13.0": - version "0.13.4" - resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.13.4.tgz#55ae9c29f0fd6b85ee536f5c72b4769d5c5e06b1" - -"@types/mime@*": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" - -"@types/node@*": - version "10.11.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.11.7.tgz#0e75ca9357d646ca754016ca1d68a127ad7e7300" - -"@types/range-parser@*": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.2.tgz#fa8e1ad1d474688a757140c91de6dace6f4abc8d" - -"@types/serve-static@*": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.2.tgz#f5ac4d7a6420a99a6a45af4719f4dcd8cd907a48" - dependencies: - "@types/express-serve-static-core" "*" - "@types/mime" "*" - -"@types/zen-observable@^0.5.3": - version "0.5.4" - resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.5.4.tgz#b863a4191e525206819e008097ebf0fb2e3a1cdc" - -accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -apollo-cache-control@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/apollo-cache-control/-/apollo-cache-control-0.1.1.tgz#173d14ceb3eb9e7cb53de7eb8b61bee6159d4171" - dependencies: - graphql-extensions "^0.0.x" - -apollo-link@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.3.tgz#9bd8d5fe1d88d31dc91dae9ecc22474d451fb70d" - dependencies: - apollo-utilities "^1.0.0" - zen-observable-ts "^0.8.10" - -apollo-server-core@^1.3.6, apollo-server-core@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-1.4.0.tgz#4faff7f110bfdd6c3f47008302ae24140f94c592" - dependencies: - apollo-cache-control "^0.1.0" - apollo-tracing "^0.1.0" - graphql-extensions "^0.0.x" - -apollo-server-express@^1.3.6: - version "1.4.0" - resolved "https://registry.yarnpkg.com/apollo-server-express/-/apollo-server-express-1.4.0.tgz#7d7c58d6d6f9892b83fe575669093bb66738b125" - dependencies: - apollo-server-core "^1.4.0" - apollo-server-module-graphiql "^1.4.0" - -apollo-server-lambda@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/apollo-server-lambda/-/apollo-server-lambda-1.3.6.tgz#bdaac37f143c6798e40b8ae75580ba673cea260e" - dependencies: - apollo-server-core "^1.3.6" - apollo-server-module-graphiql "^1.3.4" - -apollo-server-module-graphiql@^1.3.4, apollo-server-module-graphiql@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/apollo-server-module-graphiql/-/apollo-server-module-graphiql-1.4.0.tgz#c559efa285578820709f1769bb85d3b3eed3d8ec" - -apollo-tracing@^0.1.0: - version "0.1.4" - resolved "http://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.1.4.tgz#5b8ae1b01526b160ee6e552a7f131923a9aedcc7" - dependencies: - graphql-extensions "~0.0.9" - -apollo-upload-server@^5.0.0: - version "5.0.0" - resolved "http://registry.npmjs.org/apollo-upload-server/-/apollo-upload-server-5.0.0.tgz#c953b523608313966e0c8444637f4ae8ef77d5bc" - dependencies: - "@babel/runtime" "^7.0.0-beta.40" - busboy "^0.2.14" - object-path "^0.11.4" - -apollo-utilities@^1.0.0, apollo-utilities@^1.0.1: - version "1.0.21" - resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.21.tgz#cb8b5779fe275850b16046ff8373f4af2de90765" - dependencies: - fast-json-stable-stringify "^2.0.0" - fclone "^1.0.11" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - dependencies: - sprintf-js "~1.0.2" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - -arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - -aws-lambda@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/aws-lambda/-/aws-lambda-0.1.2.tgz#19b1585075df31679597b976a5f1def61f12ccee" - dependencies: - aws-sdk "^*" - commander "^2.5.0" - dotenv "^0.4.0" - -aws-sdk@^*: - version "2.332.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.332.0.tgz#e0d13154fecf817cea841db91a5008e342fc7b41" - dependencies: - buffer "4.9.1" - events "1.1.1" - ieee754 "1.1.8" - jmespath "0.15.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - uuid "3.1.0" - xml2js "0.4.19" - -backo2@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -base64-js@^1.0.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - -body-parser-graphql@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/body-parser-graphql/-/body-parser-graphql-1.1.0.tgz#80a80353c7cb623562fd375750dfe018d75f0f7c" - dependencies: - body-parser "^1.18.2" - -body-parser@1.18.3, body-parser@^1.18.2: - version "1.18.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "~1.6.3" - iconv-lite "0.4.23" - on-finished "~2.3.0" - qs "6.5.2" - raw-body "2.3.3" - type-is "~1.6.16" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -buffer-from@^1.0.0, buffer-from@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - -buffer@4.9.1: - version "4.9.1" - resolved "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -busboy@^0.2.14: - version "0.2.14" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453" - dependencies: - dicer "0.2.5" - readable-stream "1.1.x" - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - -commander@^2.5.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - -core-js@^2.5.3: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -cors@^2.8.4: - version "2.8.4" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.4.tgz#2bd381f2eb201020105cd50ea59da63090694686" - dependencies: - object-assign "^4" - vary "^1" - -cross-fetch@2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.2.tgz#a47ff4f7fc712daba8f6a695a11c948440d45723" - dependencies: - node-fetch "2.1.2" - whatwg-fetch "2.0.4" - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - -deprecated-decorator@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - -dicer@0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.2.5.tgz#5996c086bb33218c812c090bddc09cd12facb70f" - dependencies: - readable-stream "1.1.x" - streamsearch "0.1.2" - -diff@^3.1.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - -dotenv@^0.4.0: - version "0.4.0" - resolved "http://registry.npmjs.org/dotenv/-/dotenv-0.4.0.tgz#f6fb351363c2d92207245c737802c9ab5ae1495a" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - -eventemitter3@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" - -events@1.1.1: - version "1.1.1" - resolved "http://registry.npmjs.org/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -express@^4.16.3: - version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" - dependencies: - accepts "~1.3.5" - array-flatten "1.1.1" - body-parser "1.18.3" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.1" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.4" - qs "6.5.2" - range-parser "~1.2.0" - safe-buffer "5.1.2" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" - utils-merge "1.0.1" - vary "~1.1.2" - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - -fclone@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fclone/-/fclone-1.0.11.tgz#10e85da38bfea7fc599341c296ee1d77266ee640" - -finalhandler@1.1.1: - version "1.1.1" - resolved "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" - unpipe "~1.0.0" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - -graphql-config@2.0.0: - version "2.0.0" - resolved "http://registry.npmjs.org/graphql-config/-/graphql-config-2.0.0.tgz#daf69091055c6f675d63893a2d14c48f3fec3327" - dependencies: - graphql-import "^0.4.0" - graphql-request "^1.4.0" - js-yaml "^3.10.0" - lodash "^4.17.4" - minimatch "^3.0.4" - -graphql-deduplicator@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/graphql-deduplicator/-/graphql-deduplicator-2.0.1.tgz#20c6b39e3a6f096b46dfc8491432818739c0ee37" - -graphql-extensions@^0.0.x, graphql-extensions@~0.0.9: - version "0.0.10" - resolved "http://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.0.10.tgz#34bdb2546d43f6a5bc89ab23c295ec0466c6843d" - dependencies: - core-js "^2.5.3" - source-map-support "^0.5.1" - -graphql-import@^0.4.0: - version "0.4.5" - resolved "http://registry.npmjs.org/graphql-import/-/graphql-import-0.4.5.tgz#e2f18c28d335733f46df8e0733d8deb1c6e2a645" - dependencies: - lodash "^4.17.4" - -graphql-import@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/graphql-import/-/graphql-import-0.6.0.tgz#c00cb8a269ceea263e062922c8c81a2272d1ffcb" - dependencies: - lodash "^4.17.4" - -graphql-middleware@1.6.6: - version "1.6.6" - resolved "https://registry.yarnpkg.com/graphql-middleware/-/graphql-middleware-1.6.6.tgz#f40f4e836ced479df718dbc1869ea4cd3b64027b" - dependencies: - graphql-tools "^3.0.5" - -graphql-playground-html@1.5.5: - version "1.5.5" - resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.5.5.tgz#e2aca543eb66b435ead495b45244b2604d6b2d48" - dependencies: - graphql-config "2.0.0" - -graphql-playground-html@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.6.0.tgz#6ec4d54325ab2e5352506fdb89eb37c3fc718bf8" - dependencies: - graphql-config "2.0.0" - -graphql-playground-middleware-express@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/graphql-playground-middleware-express/-/graphql-playground-middleware-express-1.7.2.tgz#5f7bf3683494fe17893d1b54bbecee5e222c2e78" - dependencies: - graphql-playground-html "1.6.0" - -graphql-playground-middleware-lambda@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/graphql-playground-middleware-lambda/-/graphql-playground-middleware-lambda-1.6.1.tgz#e0f1944558136dd3975570c92c702d6009cc779c" - dependencies: - graphql-playground-html "1.5.5" - -graphql-request@^1.4.0: - version "1.8.2" - resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-1.8.2.tgz#398d10ae15c585676741bde3fc01d5ca948f8fbe" - dependencies: - cross-fetch "2.2.2" - -graphql-subscriptions@^0.5.8: - version "0.5.8" - resolved "http://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.5.8.tgz#13a6143c546bce390404657dc73ca501def30aa7" - dependencies: - iterall "^1.2.1" - -graphql-tools@^3.0.0, graphql-tools@^3.0.5: - version "3.1.1" - resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-3.1.1.tgz#d593358f01e7c8b1671a17b70ddb034dea9dbc50" - dependencies: - apollo-link "^1.2.2" - apollo-utilities "^1.0.1" - deprecated-decorator "^0.1.6" - iterall "^1.1.3" - uuid "^3.1.0" - -graphql-yoga@^1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/graphql-yoga/-/graphql-yoga-1.16.2.tgz#083293a9cecab6283e883c5a482c5c920fa66585" - dependencies: - "@types/cors" "^2.8.4" - "@types/express" "^4.11.1" - "@types/graphql" "^0.13.0" - "@types/graphql-deduplicator" "^2.0.0" - "@types/zen-observable" "^0.5.3" - apollo-server-express "^1.3.6" - apollo-server-lambda "1.3.6" - apollo-upload-server "^5.0.0" - aws-lambda "^0.1.2" - body-parser-graphql "1.1.0" - cors "^2.8.4" - express "^4.16.3" - graphql "^0.11.0 || ^0.12.0 || ^0.13.0" - graphql-deduplicator "^2.0.1" - graphql-import "^0.6.0" - graphql-middleware "1.6.6" - graphql-playground-middleware-express "1.7.2" - graphql-playground-middleware-lambda "1.6.1" - graphql-subscriptions "^0.5.8" - graphql-tools "^3.0.0" - subscriptions-transport-ws "^0.9.8" - -"graphql@^0.11.0 || ^0.12.0 || ^0.13.0": - version "0.13.2" - resolved "http://registry.npmjs.org/graphql/-/graphql-0.13.2.tgz#4c740ae3c222823e7004096f832e7b93b2108270" - dependencies: - iterall "^1.2.1" - -http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: - version "1.6.3" - resolved "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -iconv-lite@0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - -inherits@2.0.3, inherits@~2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -ipaddr.js@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - -isarray@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -iterall@^1.1.3, iterall@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7" - -jmespath@0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" - -js-yaml@^3.10.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -lodash@^4.17.4: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - -make-error@^1.1.1: - version "1.3.5" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - -mime-db@~1.36.0: - version "1.36.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397" - -mime-types@~2.1.18: - version "2.1.20" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19" - dependencies: - mime-db "~1.36.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.2.0: - version "1.2.0" - resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -mkdirp@^0.5.1: - version "0.5.1" - resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - -node-fetch@2.1.2: - version "2.1.2" - resolved "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" - -object-assign@^4: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object-path@^0.11.4: - version "0.11.4" - resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.4.tgz#370ae752fbf37de3ea70a861c23bba8915691949" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - dependencies: - ee-first "1.1.1" - -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - -proxy-addr@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.8.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -qs@6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - -raw-body@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" - dependencies: - bytes "3.0.0" - http-errors "1.6.3" - iconv-lite "0.4.23" - unpipe "1.0.0" - -readable-stream@1.1.x: - version "1.1.14" - resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" - -safe-buffer@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - -sax@1.2.1: - version "1.2.1" - resolved "http://registry.npmjs.org/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" - -sax@>=0.6.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - -source-map-support@^0.5.1, source-map-support@^0.5.6: - version "0.5.9" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - -streamsearch@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -subscriptions-transport-ws@^0.9.8: - version "0.9.15" - resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.15.tgz#68a8b7ba0037d8c489fb2f5a102d1494db297d0d" - dependencies: - backo2 "^1.0.2" - eventemitter3 "^3.1.0" - iterall "^1.2.1" - symbol-observable "^1.0.4" - ws "^5.2.0" - -symbol-observable@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - -ts-node@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" - dependencies: - arrify "^1.0.0" - buffer-from "^1.1.0" - diff "^3.1.0" - make-error "^1.1.1" - minimist "^1.2.0" - mkdirp "^0.5.1" - source-map-support "^0.5.6" - yn "^2.0.0" - -type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - dependencies: - media-typer "0.3.0" - mime-types "~2.1.18" - -typescript@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.2.tgz#c03a5d16f30bb60ad8bb6fe8e7cb212eedeec950" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - -url@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - -uuid@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" - -uuid@^3.1.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - -whatwg-fetch@2.0.4: - version "2.0.4" - resolved "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - -ws@^5.2.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - dependencies: - async-limiter "~1.0.0" - -xml2js@0.4.19: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - dependencies: - sax ">=0.6.0" - xmlbuilder "~9.0.1" - -xmlbuilder@~9.0.1: - version "9.0.7" - resolved "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - -yn@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" - -zen-observable-ts@^0.8.10: - version "0.8.10" - resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.10.tgz#18e2ce1c89fe026e9621fd83cc05168228fce829" - dependencies: - zen-observable "^0.8.0" - -zen-observable@^0.8.0: - version "0.8.9" - resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.9.tgz#0475c760ff0eda046bbdfa4dc3f95d392807ac53" diff --git a/Grass/HelloWord.gs b/Grass/HelloWord.gs deleted file mode 100644 index a90740cb1..000000000 --- a/Grass/HelloWord.gs +++ /dev/null @@ -1,4 +0,0 @@ -wWWwwww; -wWWwwww; -wWwwWvWvwvwWvwVwv; -wvwvwvwvWWWWwwwvW \ No newline at end of file diff --git a/Groovy/Main.groovy b/Groovy/Main.groovy deleted file mode 100644 index 380fdc01e..000000000 --- a/Groovy/Main.groovy +++ /dev/null @@ -1 +0,0 @@ -print "Hello World\n"; \ No newline at end of file diff --git a/Groovy/Repeated_HelloWorld.groovy b/Groovy/Repeated_HelloWorld.groovy deleted file mode 100644 index 42ca45e60..000000000 --- a/Groovy/Repeated_HelloWorld.groovy +++ /dev/null @@ -1,5 +0,0 @@ -// caution: this application will display hello world forever until exit command is executed -while (true) { - // display hello world - println "hello world!" -} \ No newline at end of file diff --git a/Groovy/com/hello/HelloWorldGroovyClass.groovy b/Groovy/com/hello/HelloWorldGroovyClass.groovy deleted file mode 100644 index 8505a8a12..000000000 --- a/Groovy/com/hello/HelloWorldGroovyClass.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package com.hello - -class HelloWorldGroovyClass { - - static main(args) { - println "Hello World"; - } - -} diff --git a/Groovy/hello.groovy b/Groovy/hello.groovy deleted file mode 100644 index 73fad44b2..000000000 --- a/Groovy/hello.groovy +++ /dev/null @@ -1 +0,0 @@ -println "Hello World!" diff --git a/HQ9/hello_world b/HQ9/hello_world deleted file mode 100644 index a9edc74f3..000000000 --- a/HQ9/hello_world +++ /dev/null @@ -1 +0,0 @@ -H diff --git a/Hack/Hello-World-with-Special-Function.php b/Hack/Hello-World-with-Special-Function.php deleted file mode 100644 index 301283123..000000000 --- a/Hack/Hello-World-with-Special-Function.php +++ /dev/null @@ -1,32 +0,0 @@ -map($in ==> $this->wrap($in))); - - // This is not allowed because inst_meth() can not access private methods - // var_dump($vec->map(inst_meth($this, 'wrap'))); - } - - private function wrap(string $in): string { - return '|[x]| '.$in.' |[x]|'; - } -} - -function main() { - (new Hello())->dump(); -} - -main(); - -// Output -// ---------- -// object(HH\Vector)#4 (2) { -// [0]=> -// string(17) "|[x]| Hello |[x]|" -// [1]=> -// string(23) "|[x]| Blue_World! |[x]|" -// } diff --git a/Hack/Hello-world-using-Operator.php b/Hack/Hello-world-using-Operator.php deleted file mode 100644 index e10a2532d..000000000 --- a/Hack/Hello-world-using-Operator.php +++ /dev/null @@ -1,7 +0,0 @@ - 'Hello '.$user; -echo $greeting(); - -// Output -// Hello World diff --git a/Hack/helloworld.php b/Hack/helloworld.php deleted file mode 100644 index e0705acf4..000000000 --- a/Hack/helloworld.php +++ /dev/null @@ -1,2 +0,0 @@ -"; }; - D820ABA520DCC84800A9B105 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - D820ABA820DCC84800A9B105 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - D820ABAA20DCC84800A9B105 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - D820ABAD20DCC84800A9B105 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - D820ABAF20DCC84800A9B105 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D820ABB420DCC84800A9B105 /* Hangman-GameTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Hangman-GameTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - D820ABB820DCC84800A9B105 /* Hangman_GameTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Hangman_GameTests.swift; sourceTree = ""; }; - D820ABBA20DCC84800A9B105 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D820ABBF20DCC84800A9B105 /* Hangman-GameUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Hangman-GameUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - D820ABC320DCC84800A9B105 /* Hangman_GameUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Hangman_GameUITests.swift; sourceTree = ""; }; - D820ABC520DCC84800A9B105 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D820AB9D20DCC84800A9B105 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D820ABB120DCC84800A9B105 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D820ABBC20DCC84800A9B105 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - D820AB9720DCC84800A9B105 = { - isa = PBXGroup; - children = ( - D820ABA220DCC84800A9B105 /* Hangman-Game */, - D820ABB720DCC84800A9B105 /* Hangman-GameTests */, - D820ABC220DCC84800A9B105 /* Hangman-GameUITests */, - D820ABA120DCC84800A9B105 /* Products */, - ); - sourceTree = ""; - }; - D820ABA120DCC84800A9B105 /* Products */ = { - isa = PBXGroup; - children = ( - D820ABA020DCC84800A9B105 /* Hangman-Game.app */, - D820ABB420DCC84800A9B105 /* Hangman-GameTests.xctest */, - D820ABBF20DCC84800A9B105 /* Hangman-GameUITests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - D820ABA220DCC84800A9B105 /* Hangman-Game */ = { - isa = PBXGroup; - children = ( - D820ABA320DCC84800A9B105 /* AppDelegate.swift */, - D820ABA520DCC84800A9B105 /* ViewController.swift */, - D820ABA720DCC84800A9B105 /* Main.storyboard */, - D820ABAA20DCC84800A9B105 /* Assets.xcassets */, - D820ABAC20DCC84800A9B105 /* LaunchScreen.storyboard */, - D820ABAF20DCC84800A9B105 /* Info.plist */, - ); - path = "Hangman-Game"; - sourceTree = ""; - }; - D820ABB720DCC84800A9B105 /* Hangman-GameTests */ = { - isa = PBXGroup; - children = ( - D820ABB820DCC84800A9B105 /* Hangman_GameTests.swift */, - D820ABBA20DCC84800A9B105 /* Info.plist */, - ); - path = "Hangman-GameTests"; - sourceTree = ""; - }; - D820ABC220DCC84800A9B105 /* Hangman-GameUITests */ = { - isa = PBXGroup; - children = ( - D820ABC320DCC84800A9B105 /* Hangman_GameUITests.swift */, - D820ABC520DCC84800A9B105 /* Info.plist */, - ); - path = "Hangman-GameUITests"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - D820AB9F20DCC84800A9B105 /* Hangman-Game */ = { - isa = PBXNativeTarget; - buildConfigurationList = D820ABC820DCC84800A9B105 /* Build configuration list for PBXNativeTarget "Hangman-Game" */; - buildPhases = ( - D820AB9C20DCC84800A9B105 /* Sources */, - D820AB9D20DCC84800A9B105 /* Frameworks */, - D820AB9E20DCC84800A9B105 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Hangman-Game"; - productName = "Hangman-Game"; - productReference = D820ABA020DCC84800A9B105 /* Hangman-Game.app */; - productType = "com.apple.product-type.application"; - }; - D820ABB320DCC84800A9B105 /* Hangman-GameTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = D820ABCB20DCC84800A9B105 /* Build configuration list for PBXNativeTarget "Hangman-GameTests" */; - buildPhases = ( - D820ABB020DCC84800A9B105 /* Sources */, - D820ABB120DCC84800A9B105 /* Frameworks */, - D820ABB220DCC84800A9B105 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - D820ABB620DCC84800A9B105 /* PBXTargetDependency */, - ); - name = "Hangman-GameTests"; - productName = "Hangman-GameTests"; - productReference = D820ABB420DCC84800A9B105 /* Hangman-GameTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - D820ABBE20DCC84800A9B105 /* Hangman-GameUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = D820ABCE20DCC84800A9B105 /* Build configuration list for PBXNativeTarget "Hangman-GameUITests" */; - buildPhases = ( - D820ABBB20DCC84800A9B105 /* Sources */, - D820ABBC20DCC84800A9B105 /* Frameworks */, - D820ABBD20DCC84800A9B105 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - D820ABC120DCC84800A9B105 /* PBXTargetDependency */, - ); - name = "Hangman-GameUITests"; - productName = "Hangman-GameUITests"; - productReference = D820ABBF20DCC84800A9B105 /* Hangman-GameUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D820AB9820DCC84800A9B105 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; - ORGANIZATIONNAME = "Sohardh Chobera"; - TargetAttributes = { - D820AB9F20DCC84800A9B105 = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - }; - D820ABB320DCC84800A9B105 = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - TestTargetID = D820AB9F20DCC84800A9B105; - }; - D820ABBE20DCC84800A9B105 = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - TestTargetID = D820AB9F20DCC84800A9B105; - }; - }; - }; - buildConfigurationList = D820AB9B20DCC84800A9B105 /* Build configuration list for PBXProject "Hangman-Game" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = D820AB9720DCC84800A9B105; - productRefGroup = D820ABA120DCC84800A9B105 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D820AB9F20DCC84800A9B105 /* Hangman-Game */, - D820ABB320DCC84800A9B105 /* Hangman-GameTests */, - D820ABBE20DCC84800A9B105 /* Hangman-GameUITests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - D820AB9E20DCC84800A9B105 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D820ABAE20DCC84800A9B105 /* LaunchScreen.storyboard in Resources */, - D820ABAB20DCC84800A9B105 /* Assets.xcassets in Resources */, - D820ABA920DCC84800A9B105 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D820ABB220DCC84800A9B105 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D820ABBD20DCC84800A9B105 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - D820AB9C20DCC84800A9B105 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D820ABA620DCC84800A9B105 /* ViewController.swift in Sources */, - D820ABA420DCC84800A9B105 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D820ABB020DCC84800A9B105 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D820ABB920DCC84800A9B105 /* Hangman_GameTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D820ABBB20DCC84800A9B105 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D820ABC420DCC84800A9B105 /* Hangman_GameUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - D820ABB620DCC84800A9B105 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D820AB9F20DCC84800A9B105 /* Hangman-Game */; - targetProxy = D820ABB520DCC84800A9B105 /* PBXContainerItemProxy */; - }; - D820ABC120DCC84800A9B105 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D820AB9F20DCC84800A9B105 /* Hangman-Game */; - targetProxy = D820ABC020DCC84800A9B105 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - D820ABA720DCC84800A9B105 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - D820ABA820DCC84800A9B105 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - D820ABAC20DCC84800A9B105 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - D820ABAD20DCC84800A9B105 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - D820ABC620DCC84800A9B105 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - D820ABC720DCC84800A9B105 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - D820ABC920DCC84800A9B105 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 676USJR49S; - INFOPLIST_FILE = "Hangman-Game/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "Sohardh.Hangman-Game"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - D820ABCA20DCC84800A9B105 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 676USJR49S; - INFOPLIST_FILE = "Hangman-Game/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "Sohardh.Hangman-Game"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - D820ABCC20DCC84800A9B105 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 676USJR49S; - INFOPLIST_FILE = "Hangman-GameTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "Sohardh.Hangman-GameTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Hangman-Game.app/Hangman-Game"; - }; - name = Debug; - }; - D820ABCD20DCC84800A9B105 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 676USJR49S; - INFOPLIST_FILE = "Hangman-GameTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "Sohardh.Hangman-GameTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Hangman-Game.app/Hangman-Game"; - }; - name = Release; - }; - D820ABCF20DCC84800A9B105 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 676USJR49S; - INFOPLIST_FILE = "Hangman-GameUITests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "Sohardh.Hangman-GameUITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = "Hangman-Game"; - }; - name = Debug; - }; - D820ABD020DCC84800A9B105 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 676USJR49S; - INFOPLIST_FILE = "Hangman-GameUITests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "Sohardh.Hangman-GameUITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = "Hangman-Game"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - D820AB9B20DCC84800A9B105 /* Build configuration list for PBXProject "Hangman-Game" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D820ABC620DCC84800A9B105 /* Debug */, - D820ABC720DCC84800A9B105 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D820ABC820DCC84800A9B105 /* Build configuration list for PBXNativeTarget "Hangman-Game" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D820ABC920DCC84800A9B105 /* Debug */, - D820ABCA20DCC84800A9B105 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D820ABCB20DCC84800A9B105 /* Build configuration list for PBXNativeTarget "Hangman-GameTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D820ABCC20DCC84800A9B105 /* Debug */, - D820ABCD20DCC84800A9B105 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D820ABCE20DCC84800A9B105 /* Build configuration list for PBXNativeTarget "Hangman-GameUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D820ABCF20DCC84800A9B105 /* Debug */, - D820ABD020DCC84800A9B105 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D820AB9820DCC84800A9B105 /* Project object */; -} diff --git a/Hangman-Game/Hangman-Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Hangman-Game/Hangman-Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 5b1c8c6a1..000000000 --- a/Hangman-Game/Hangman-Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Hangman-Game/Hangman-Game.xcodeproj/project.xcworkspace/xcuserdata/sohardhchobera.xcuserdatad/UserInterfaceState.xcuserstate b/Hangman-Game/Hangman-Game.xcodeproj/project.xcworkspace/xcuserdata/sohardhchobera.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index ad527cb52..000000000 Binary files a/Hangman-Game/Hangman-Game.xcodeproj/project.xcworkspace/xcuserdata/sohardhchobera.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Hangman-Game/Hangman-Game.xcodeproj/xcuserdata/sohardhchobera.xcuserdatad/xcschemes/xcschememanagement.plist b/Hangman-Game/Hangman-Game.xcodeproj/xcuserdata/sohardhchobera.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 54d6e4682..000000000 --- a/Hangman-Game/Hangman-Game.xcodeproj/xcuserdata/sohardhchobera.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - Hangman-Game.xcscheme - - orderHint - 0 - - - - diff --git a/Hangman-Game/Hangman-Game/AppDelegate.swift b/Hangman-Game/Hangman-Game/AppDelegate.swift deleted file mode 100644 index e8ec0dc64..000000000 --- a/Hangman-Game/Hangman-Game/AppDelegate.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// AppDelegate.swift -// Hangman-Game -// -// Created by Sohardh Chobera on 22/06/18. -// Copyright © 2018 Sohardh Chobera. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - -} - diff --git a/Hangman-Game/Hangman-Game/Assets.xcassets/AppIcon.appiconset/Contents.json b/Hangman-Game/Hangman-Game/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d8db8d65f..000000000 --- a/Hangman-Game/Hangman-Game/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Hangman-Game/Hangman-Game/Base.lproj/LaunchScreen.storyboard b/Hangman-Game/Hangman-Game/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f83f6fd58..000000000 --- a/Hangman-Game/Hangman-Game/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Hangman-Game/Hangman-Game/Base.lproj/Main.storyboard b/Hangman-Game/Hangman-Game/Base.lproj/Main.storyboard deleted file mode 100644 index d6aee5646..000000000 --- a/Hangman-Game/Hangman-Game/Base.lproj/Main.storyboard +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Hangman-Game/Hangman-Game/Info.plist b/Hangman-Game/Hangman-Game/Info.plist deleted file mode 100644 index 16be3b681..000000000 --- a/Hangman-Game/Hangman-Game/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Hangman-Game/Hangman-Game/ViewController.swift b/Hangman-Game/Hangman-Game/ViewController.swift deleted file mode 100644 index 6d7473b95..000000000 --- a/Hangman-Game/Hangman-Game/ViewController.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// ViewController.swift -// Hangman-Game -// -// Created by Sohardh Chobera on 22/06/18. -// Copyright © 2018 Sohardh Chobera. All rights reserved. -// -// -// create arrays to hold the words and hints (need wordtoGuess and wordAsUnderscores varibales) : DONE -// need some way to randomise which word is selected, then select the word and the hint and display them -// need a way to keep track of number of guesses being used -// need a way to guess a letter and process whether it is or not in the wordToGuess -// if correct, display updated wordAsUnderscores, if incorrect, decreement number of guesses, and letter to letter bank and display letters guessed -// lose game if we run out of guesses -// win game if we guess every letter before running out of guesses(if wordAsUnderscores contains no more underscores, then we win) - - -import UIKit - -class ViewController: UIViewController,UITextFieldDelegate { - - @IBOutlet weak var hintLabel: UILabel! - @IBOutlet weak var wordToGuessLabel: UILabel! - @IBOutlet weak var remainingGuessesLabel: UILabel! - @IBOutlet weak var inputTextField: UITextField! - @IBOutlet weak var letterBankLabel: UILabel! - - let LIST_OF_WORDS : [String] = ["hello","goodbye","sohardh","hangman","coffee"] - let LIST_OF_HINTS : [String] = ["greeting","farewell","chobera","letter guessing game","a good way to wake up"] - - var wordToGuess :String! - var wordAsUnderscores : String! = "" - let MAX_NUMBER_OF_GUESSES : Int = 5 - var guessesRemaning : Int! - var oldRandomNumber :Int = 0 - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - inputTextField.delegate = self - //inputTextField.becomeFirstResponder() - } - - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - - @IBAction func chooseNewWordAction(_ sender: UIButton) { - reset() - let index = chooseRandomNumber() - wordToGuess = LIST_OF_WORDS[index] - let hint = LIST_OF_HINTS[index] - hintLabel.text = "Hint : \(hint), \(wordToGuess.count) letters" - - //wordToGuessLabel.text = wordToGuess - - for _ in 1 ... wordToGuess.count { - wordAsUnderscores.append("_") - } - print(wordAsUnderscores.count) - wordToGuessLabel.text = wordAsUnderscores - - - } - - func reset(){ - guessesRemaning = MAX_NUMBER_OF_GUESSES - remainingGuessesLabel.text = " \(guessesRemaning!) guesses left" - wordAsUnderscores = "" - } - - func chooseRandomNumber() ->Int { - var newRandomNumber : Int = Int(arc4random_uniform(UInt32(LIST_OF_WORDS.count))) - print(newRandomNumber) - if (newRandomNumber == oldRandomNumber){ - newRandomNumber = chooseRandomNumber() - } else { - oldRandomNumber = newRandomNumber - } - return newRandomNumber - } - - func textFieldShouldReturn(_ textField: UITextField) -> Bool { - textField.resignFirstResponder() - return true - } - - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { - - let allowedCharacters = NSCharacterSet.letters - let startinglength = textField.text?.count ?? 0 - let lengthToAdd = string.count - let lengthToReplace = range.length - let newLength = startinglength + lengthToAdd - lengthToReplace - - if string.isEmpty { - return true - } else if(newLength == 1) { - if let _ = string.rangeOfCharacter(from: allowedCharacters, options: .caseInsensitive){ - return true - } - } - return false - } - - func textFieldDidEndEditing(_ textField: UITextField) { - guard let letterGuessed = textField.text else {return} - if wordToGuess.contains(letterGuessed){ - processCorrectGuess(letterGuessed : letterGuessed) - } else { - processIncorrectGuess() - } - } - //hello - func processCorrectGuess(letterGuessed : String){ - let characterGuessed = Character(letterGuessed) - for index in wordToGuess.indices { - if wordToGuess[index] == characterGuessed{ - let endIndex = wordToGuess.index(after: index) - let charRange = index.. - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Hangman-Game/Hangman-GameUITests/Hangman_GameUITests.swift b/Hangman-Game/Hangman-GameUITests/Hangman_GameUITests.swift deleted file mode 100644 index 8a3e9f064..000000000 --- a/Hangman-Game/Hangman-GameUITests/Hangman_GameUITests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Hangman_GameUITests.swift -// Hangman-GameUITests -// -// Created by Sohardh Chobera on 22/06/18. -// Copyright © 2018 Sohardh Chobera. All rights reserved. -// - -import XCTest - -class Hangman_GameUITests: XCTestCase { - - override func setUp() { - super.setUp() - - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. - XCUIApplication().launch() - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // Use recording to get started writing UI tests. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - -} diff --git a/Hangman-Game/Hangman-GameUITests/Info.plist b/Hangman-Game/Hangman-GameUITests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/Hangman-Game/Hangman-GameUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Harbour/hello.prg b/Harbour/hello.prg deleted file mode 100644 index 525bd083d..000000000 --- a/Harbour/hello.prg +++ /dev/null @@ -1,5 +0,0 @@ -PROCEDURE Main() - - ? "Hello, world!" - - RETURN \ No newline at end of file diff --git a/Harbour/readme.md b/Harbour/readme.md deleted file mode 100644 index bd64a1d6a..000000000 --- a/Harbour/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# Build file -```bat -hbrun hello.prg -``` -## About -Harbour is a compiler for the xBase superset language often referred to as Clipper (the language that is implemented by the compiler CA-Clipper) - -## Ref -https://harbour.github.io/ \ No newline at end of file diff --git a/Haskell/concatenate.hs b/Haskell/concatenate.hs deleted file mode 100644 index 85698a64e..000000000 --- a/Haskell/concatenate.hs +++ /dev/null @@ -1,6 +0,0 @@ -concatenate :: [Int] -> [Int] -> [Int] -concatenate x [] = x -concatenate [] x = x -concatenate (x:xs) (y:ys) - | x < y = [x] ++ concatenate xs ([y] ++ ys) - | otherwise = [y] ++ concatenate ([x] ++ xs) ys \ No newline at end of file diff --git a/Haskell/decimalToBinary.hs b/Haskell/decimalToBinary.hs deleted file mode 100644 index d06552ec1..000000000 --- a/Haskell/decimalToBinary.hs +++ /dev/null @@ -1,4 +0,0 @@ -decimalToBinary :: Int -> [Int] -decimalToBinary 0 = [0] -decimalToBinary 1 = [1] -decimalToBinary n = decimalToBinary (n `div` 2) ++ [(n `mod` 2)] \ No newline at end of file diff --git a/Haskell/dynamic_programming.hs b/Haskell/dynamic_programming.hs deleted file mode 100644 index 458bf989d..000000000 --- a/Haskell/dynamic_programming.hs +++ /dev/null @@ -1,6 +0,0 @@ -coinRow :: [Integer] -> Integer -coinRow cs = fs !! (length cs) - where fs = 0 : head cs : zipWith (max) (zipWith (+) (tail cs) fs) fs - -fib n = fibs !! n - where fibs = 0 : 1 : zipWith (+) fibs (drop 1 fibs) diff --git a/Haskell/factorial.hs b/Haskell/factorial.hs deleted file mode 100644 index e2da3c4cb..000000000 --- a/Haskell/factorial.hs +++ /dev/null @@ -1 +0,0 @@ -let fac n = if n == 0 then 1 else n * fac (n-1) diff --git a/Haskell/fibonacci.hs b/Haskell/fibonacci.hs deleted file mode 100644 index 589067a57..000000000 --- a/Haskell/fibonacci.hs +++ /dev/null @@ -1,7 +0,0 @@ ---Naive approach -fib 0 = 0 -fib 1 = 1 -fib n = fib (n-1) + fib (n-2) - ---Better -fib2 = 0 : 1 : zipWith (+) fib2 (tail fib2) diff --git a/Haskell/fizzbuzz.hs b/Haskell/fizzbuzz.hs deleted file mode 100644 index e0c6b8757..000000000 --- a/Haskell/fizzbuzz.hs +++ /dev/null @@ -1,8 +0,0 @@ -fizzbuzz :: Int -> String -fizzbuzz n - | n `mod` 15 == 0 = "FizzBuzz" - | n `mod` 3 == 0 = "Fizz" - | n `mod` 5 == 0 = "Buzz" - | otherwise = show n - -main = mapM (putStrLn . fizzbuzz) [1..50] diff --git a/Haskell/hello-world.hs b/Haskell/hello-world.hs deleted file mode 100644 index ab80cfa7e..000000000 --- a/Haskell/hello-world.hs +++ /dev/null @@ -1,5 +0,0 @@ -import System.IO - -main = do - putStrLn "Hello, world!" - diff --git a/Haskell/hello.hs b/Haskell/hello.hs deleted file mode 100644 index 0872ac9db..000000000 --- a/Haskell/hello.hs +++ /dev/null @@ -1 +0,0 @@ -main = putStrLn "Hello, world!" diff --git a/Haskell/hello_world_from_indonesia.hs b/Haskell/hello_world_from_indonesia.hs deleted file mode 100644 index 146fe1f27..000000000 --- a/Haskell/hello_world_from_indonesia.hs +++ /dev/null @@ -1 +0,0 @@ -main = putStrLn "Hello,World! From Indonesia." diff --git a/Haskell/linearize.hs b/Haskell/linearize.hs deleted file mode 100644 index d06057672..000000000 --- a/Haskell/linearize.hs +++ /dev/null @@ -1,4 +0,0 @@ -linearize :: [[Int]] -> [Int] -linearize [] = [] -linearize [x] = x -linearize (x:xs) = linearize [x] ++ linearize xs \ No newline at end of file diff --git a/Haskell/moneyChange.hs b/Haskell/moneyChange.hs deleted file mode 100644 index 428737206..000000000 --- a/Haskell/moneyChange.hs +++ /dev/null @@ -1,8 +0,0 @@ -moneyChange :: Int -> [Int] -moneyChange x - | x >= 100 = moneyChange (x-100) ++ [100] - | x >= 50 = moneyChange (x-50) ++ [50] - | x >= 10 = moneyChange (x-10) ++ [10] - | x >= 5 = moneyChange (x-5) ++ [5] - | x >= 1 = moneyChange (x-1) ++ [1] - | otherwise = [] \ No newline at end of file diff --git a/Haskell/palindrome.hs b/Haskell/palindrome.hs deleted file mode 100644 index 4974618e0..000000000 --- a/Haskell/palindrome.hs +++ /dev/null @@ -1,7 +0,0 @@ -palindrome :: [Int] -> Bool -palindrome [] = False -palindrome x = x == reversed x - -reversed :: [Int] -> [Int] -reversed [] = [] -reversed (x:xs) = reversed xs ++ [x] \ No newline at end of file diff --git a/Haskell/prime.hs b/Haskell/prime.hs deleted file mode 100644 index b36ca732a..000000000 --- a/Haskell/prime.hs +++ /dev/null @@ -1,10 +0,0 @@ -prime :: Int -> Bool -prime 0 = False -prime 1 = False -prime n = checkPrime n (n `div` 2) - -checkPrime :: Int -> Int -> Bool -checkPrime _ 1 = True -checkPrime num x - | (num `mod` x == 0) = False - | otherwise = checkPrime num (x-1) \ No newline at end of file diff --git a/Haskell/quick_sort.hs b/Haskell/quick_sort.hs deleted file mode 100644 index 4ac4804c5..000000000 --- a/Haskell/quick_sort.hs +++ /dev/null @@ -1,11 +0,0 @@ -main = do - input <- getContents - let numbers = map read (words input) :: [Integer] - print $ quicksort numbers - -quicksort:: (Ord a) => [a] -> [a] -quicksort [] = [] -quicksort (x:xs) = - let lesser = quicksort filter (= x) xs - in lesser ++ [x] ++ greater diff --git a/Haskell/replace.hs b/Haskell/replace.hs deleted file mode 100644 index 6d5a759ac..000000000 --- a/Haskell/replace.hs +++ /dev/null @@ -1,5 +0,0 @@ -replace :: Int -> Int -> [Int] -> [Int] -replace _ _ [] = [] -replace a b (x:xs) - | a == x = b : replace a b xs - | otherwise = x : replace a b xs \ No newline at end of file diff --git a/Haskell/tree.hs b/Haskell/tree.hs deleted file mode 100644 index 6560cf973..000000000 --- a/Haskell/tree.hs +++ /dev/null @@ -1,23 +0,0 @@ -data Tree a = Leaf | Node a (Tree a) (Tree a) deriving (Show) - -insertNode :: (Ord a) => a -> Tree a -> Tree a -insertNode x Leaf = Node x Leaf Leaf -insertNode x (Node a left rigth) - | x < a = Node a (insertNode x left) rigth - | x > a = Node a left (insertNode x rigth) - | otherwise = Node a left rigth - -makeTree :: (Foldable t, Ord a) => t a -> Tree a -makeTree = foldl (\acc x -> insertNode x acc) Leaf - -preOrder :: Tree t -> [t] -preOrder Leaf = [] -preOrder (Node x left rigth) = [x] ++ preOrder left ++ preOrder rigth - -inOrder :: Tree t -> [t] -inOrder Leaf = [] -inOrder (Node x left rigth) = inOrder left ++ [x] ++ inOrder rigth - -postOrder :: Tree t -> [t] -postOrder Leaf = [] -postOrder (Node x left rigth) = postOrder left ++ postOrder rigth ++ [x] \ No newline at end of file diff --git a/Haxe/HelloWorld.hx b/Haxe/HelloWorld.hx deleted file mode 100644 index b5eaf9dad..000000000 --- a/Haxe/HelloWorld.hx +++ /dev/null @@ -1,5 +0,0 @@ -class HelloWorld { - static public function main():Void { - trace("Hello World."); - } -} diff --git a/Haxe/OpenFL/HelloWorld.hxproj b/Haxe/OpenFL/HelloWorld.hxproj deleted file mode 100644 index 6d131be6b..000000000 --- a/Haxe/OpenFL/HelloWorld.hxproj +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "$(CompilerPath)/haxelib" run lime build "$(OutputFile)" $(TargetBuild) -$(BuildConfig) -Dfdb - - - - - - - - \ No newline at end of file diff --git a/Haxe/OpenFL/assets/openfl.svg b/Haxe/OpenFL/assets/openfl.svg deleted file mode 100644 index 934b6464e..000000000 --- a/Haxe/OpenFL/assets/openfl.svg +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Haxe/OpenFL/project.xml b/Haxe/OpenFL/project.xml deleted file mode 100644 index 331b8a160..000000000 --- a/Haxe/OpenFL/project.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Haxe/OpenFL/src/Main.hx b/Haxe/OpenFL/src/Main.hx deleted file mode 100644 index ac28b846f..000000000 --- a/Haxe/OpenFL/src/Main.hx +++ /dev/null @@ -1,20 +0,0 @@ -package; - -import openfl.display.Sprite; - -/** - * ... - * @author AVL - */ -class Main extends Sprite -{ - public function new() - { - super(); - - var img = new openfl.text.TextField(); - img.text = "Hello World!"; - img.textColor = 0xffffff; - addChild(img); - } -} diff --git a/Hello world python/Hello world.pyo b/Hello world python/Hello world.pyo deleted file mode 100644 index fa32d20b6..000000000 --- a/Hello world python/Hello world.pyo +++ /dev/null @@ -1,2 +0,0 @@ -print ('Hello World!!!!') -print ('Hi there') diff --git a/Hello world python/Nqueen.py b/Hello world python/Nqueen.py deleted file mode 100644 index 1efaa3c1d..000000000 --- a/Hello world python/Nqueen.py +++ /dev/null @@ -1,238 +0,0 @@ -from random import randint - -import matplotlib as mpl -import matplotlib.pyplot as plt - - -import numpy as np - -from sympy import * - - - -def check_row(x,y): - return x != y - -def check_col(x,y): - return x != y - -def check_diagonal(r1,r2,c1,c2): - return abs(r1-r2) != abs(c1-c2) - -def get_num(board, col, n): - lst = [] - for v in range(n): - num_attack = 0 - #print(v) - - for i in range(n): - if not check_row(board[i],v): - num_attack += 1 - #print(num_attack) - - for j in range(n): - if not check_diagonal(v, board[j],col, j) and (not (v == board[j] and col == j)): - #print(str(v) + " " + str(col) + " "+ str(board[j]) + " "+str(j)) - num_attack += 1 - #print(num_attack) - lst.append(num_attack) - - return lst - - - -def genetic_algorithm(population): - p = 0.2 - - new_popultion = [] - n = len(population) - while(True): - for i in range(n): - x = population[randint(0,n-1)] - y = population[randint(0,n-1)] - while x == y: - y = population[randint(0,n-1)] - - child = reproduce(x,y) - if rand(0,1) <= p: - mutate(child) - - new_popultion.append(child) - population = new_popultion - ch = check(population) - if check != None: - return ch - -def check(population): - m = len(population) - for i in range(m): - board = population[i] - n = len(board) - temp = n - sum = 0 - while temp != 0: - sum += (temp - 1) - temp -= 1 - - count = 0 - for i in range(n): - for j in range(i+1,n): - if (check_row(board[i], board[j]) and check_col(i,j) and check_diagonal(board[i], board[j],i,j)): - count += 1 - - if count == sum: - print('successful') - print('the result is') - return board - return None -def reproduce(x,y): - center = randint(0,len(x)-1) - #print(center) - new = [x[i] for i in range(center)] - new += [y[j] for j in range(center, len(x))] - - return new - -def mutate(x): - row = randint(0,len(x)-1) - col = randint(0,len(x)-1) - x[col] = row - return x - -def generate_random_board(n): - board = [] - #board = [randint(0, n - 1) for i in range(n)] - #how(board) - while(len(board) < n): - x = randint(0, n - 1) - if x not in board: - board.append(x) - #print(board) - return board - -def max_attack(board): - lst = [] - n = len(board) - for i in range(n): - count = 0 - for j in range(i+1,n): - if not check_row(board[i],board[j]): - count += 1 - if not check_diagonal(board[i],board[j], i, j): - count += 1 - - lst.append(count) - return lst - - -def apply_nqueens(n): - board = generate_random_board(n) - #show(board) - sum = 0 - temp = n - while temp != 0: - sum += (temp - 1) - temp -= 1 - #print(sum) - #print (sum) - test = [] - while(True): - count = 0 - - for i in range(n): - for j in range(i+1,n): - if (check_row(board[i], board[j]) and check_col(i,j) and check_diagonal(board[i], board[j],i,j)): - count += 1 - #else: - #print(str(board[i]) + " " + str(i) +" " + str(board[j]) + " " + str(j)) - # print(count) - #break - if count == sum: - print('successful') - print('the result is') - return board - else: - #rand_num = randint(0, 7) - lt = max_attack(board) - _max = max(lt) - for i in range(n): - if _max == lt[i]: - num = i - lst = [] - lst = get_num(board, num,n) - #print(lst) - _min = min(lst) - for i in range(n): - if _min == lst[i]: - c = i - board[num] = c - test.append(count) - if test.count(count) == n * n: - break - - - -def displayBoard(locations, shape): - - r = c = shape - cmap = mpl.colors.ListedColormap(['#f5ecce', '#f5ecce']) - img = mpl.image.imread('three.jpg').astype(np.float) - boxprops = {"facecolor": "#614532", "edgecolor": "none"} - - x, y = np.meshgrid(range(c), range(r)) - plt.matshow(x % 2 ^ y % 2, cmap=cmap) - #plt.axis("off") # eliminate borders from plot - - fig = plt.gcf() - fig.set_size_inches([r, c]) - scale = 0.6*fig.get_dpi() / max(img.shape) - ax = plt.gca() - word = ['one.jpg', 'two.jpg', 'three.jpg', 'four.png', 'five.jpg','six.jpg'] - i = 0 - for dim in locations: - print(y) - print(x) - img = mpl.image.imread(word[i]).astype(np.float) - scale = 0.6*fig.get_dpi() / max(img.shape) - i += 1 - box = mpl.offsetbox.OffsetImage(img, zoom=scale) - ab = mpl.offsetbox.AnnotationBbox(box, (dim[1],dim[0]), bboxprops=boxprops) - ax.add_artist(ab) - - plt.show() - return fig - - -def show(board): - """Display a chessboard with queens drawn in the locations specified by an - assignment - - Parameters - ---------- - assignment : dict(sympy.Symbol: Integer) - A dictionary mapping CSP variables to row assignment of each queen - - """ - size = len(board) - locations = [(i, board[i]) for i in range(size)] - displayBoard(locations, size) - - -location = [(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1)] -size = 3 -displayBoard(location, size) - -""" -arr1 = [0,1,2,3,4,5,6,7] -arr2 = [7,6,5,4,3,2,1,0] -print(reproduce(arr1,arr2)) - for i in range(10): - x = apply_nqueens(4) - if x != None: - show(x) -popu = [] -for i in range(4): - popu.append(generate_random_board) - -print(popu) -""" \ No newline at end of file diff --git a/Hello world python/ashu-helloWorld b/Hello world python/ashu-helloWorld deleted file mode 100644 index 665c637a3..000000000 --- a/Hello world python/ashu-helloWorld +++ /dev/null @@ -1 +0,0 @@ -print("hello world!") diff --git a/Hello world python/hello.py b/Hello world python/hello.py deleted file mode 100644 index 184b8668e..000000000 --- a/Hello world python/hello.py +++ /dev/null @@ -1 +0,0 @@ -print("Hello World!!") diff --git a/Hello world python/helloRandom.py b/Hello world python/helloRandom.py deleted file mode 100644 index 212c2b117..000000000 --- a/Hello world python/helloRandom.py +++ /dev/null @@ -1,11 +0,0 @@ -print ("Hello World?") -import random -helloWorld = random.randint(1,2) -randomChoice = 0 -while randomChoice < 1 or randomChoice > 2: - randomChoice = int(input("Choose 1 or 2: ")) -print ("You chose number ", randomChoice) -if randomChoice == helloWorld: - print ("Hello World!") -else: - print ("Hi World.") diff --git a/Hello world python/helloWorld.py b/Hello world python/helloWorld.py deleted file mode 100644 index f301245e2..000000000 --- a/Hello world python/helloWorld.py +++ /dev/null @@ -1 +0,0 @@ -print("Hello World!") 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/Hello world python/hi5.py b/Hello world python/hi5.py deleted file mode 100644 index 37af07e3b..000000000 --- a/Hello world python/hi5.py +++ /dev/null @@ -1,3 +0,0 @@ -for i in range(5): - print("hi") - diff --git a/Hello world python/python says hello b/Hello world python/python says hello deleted file mode 100644 index 35ababf65..000000000 --- a/Hello world python/python says hello +++ /dev/null @@ -1 +0,0 @@ -print('this is amazing isn't it') diff --git a/Hello world python/queen.png b/Hello world python/queen.png deleted file mode 100644 index eda88c6db..000000000 Binary files a/Hello world python/queen.png and /dev/null differ diff --git a/Hindi/hello_world_hindi.txt b/Hindi/hello_world_hindi.txt deleted file mode 100644 index 09b8e8f69..000000000 --- a/Hindi/hello_world_hindi.txt +++ /dev/null @@ -1 +0,0 @@ -नमस्ते दुनिया \ No newline at end of file diff --git a/HolyC/HelloWorld.holyc b/HolyC/HelloWorld.holyc deleted file mode 100644 index a5251ff65..000000000 --- a/HolyC/HelloWorld.holyc +++ /dev/null @@ -1,5 +0,0 @@ -U0 Main() -{ - "Hello World!"; -} -Main; diff --git a/HolyC/schbebsi.holyc b/HolyC/schbebsi.holyc deleted file mode 100644 index 8bb69e3f0..000000000 --- a/HolyC/schbebsi.holyc +++ /dev/null @@ -1,5 +0,0 @@ -U0 Main() -{ - "Hello Schbebsi"; -} -Main; diff --git a/Html/Bouncing_Ball.html b/Html/Bouncing_Ball.html index dbe5689e8..71c0c0bff 100644 --- a/Html/Bouncing_Ball.html +++ b/Html/Bouncing_Ball.html @@ -1,38 +1,38 @@ - - - - BOUNCING BALLl - - - -
- - + + + + BOUNCING BALLl + + + +
+ + diff --git a/Html/Clock.html b/Html/Clock.html index 9203015cc..e9dec480a 100644 --- a/Html/Clock.html +++ b/Html/Clock.html @@ -1,42 +1,42 @@ - - - - -
- - + + + + +
+ + diff --git a/html/Hello-World_xavier vick-west b/Html/Hello-World_xavier vick-west similarity index 100% rename from html/Hello-World_xavier vick-west rename to Html/Hello-World_xavier vick-west diff --git a/Html/Hello-world.html b/Html/Hello-world.html deleted file mode 100644 index e88765c34..000000000 --- a/Html/Hello-world.html +++ /dev/null @@ -1,10 +0,0 @@ - - - HELLO WORLD - - -

- Hello World by Juan V. -

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

Hello World!

-
-

Welcome for coding

- orange - - -
-

Hacktoberfest 2018

-
- diff --git a/Html/Hello_world.html b/Html/Hello_world.html deleted file mode 100644 index 68f5415ea..000000000 --- a/Html/Hello_world.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Hello World - - - -

Hello World

-

Hello World...!

- - - diff --git a/Html/Rainbow.html b/Html/Rainbow.html index bfbfb1191..007b87a71 100644 --- a/Html/Rainbow.html +++ b/Html/Rainbow.html @@ -1,54 +1,54 @@ - - -

Rainbow!

- + + +

Rainbow!

+ \ No newline at end of file diff --git a/Html/RandomEventGenerator.html b/Html/RandomEventGenerator.html index 9fc2b7d77..733752f21 100644 --- a/Html/RandomEventGenerator.html +++ b/Html/RandomEventGenerator.html @@ -1,106 +1,106 @@ - - - - Random Event Generator - - - - -
- - - -
-
- Result -
- - A silly interface to make you pick a random event generated by the system. Try Alt+1, Alt+2 and Alt+3. - -
- + + + + Random Event Generator + + + + +
+ + + +
+
+ Result +
+ + A silly interface to make you pick a random event generated by the system. Try Alt+1, Alt+2 and Alt+3. + +
+ \ No newline at end of file diff --git a/Html/assign3_st.html b/Html/assign3_st.html index 8631bdcd4..d5119d2a9 100644 --- a/Html/assign3_st.html +++ b/Html/assign3_st.html @@ -1,105 +1,105 @@ - - - - -August 2018 - - - -

AUGUST 2018

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +August 2018 + + + +

AUGUST 2018

+
MONTUEWEDTHUFRISATSUN
12345
6789101112
1314 1516171819
20212223242526
2728293031
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Html/hacktober.html b/Html/hacktober.html index 1f1be5d79..d5607948b 100644 --- a/Html/hacktober.html +++ b/Html/hacktober.html @@ -1,34 +1,34 @@ - - - - - contribute to hacktoberfest 2018 - - - - - -
- -
-
-
-

Hacktoberfest 2018

-

Im join in hacktoberfest 2018 :)

-

Get Started Now >

- -
- - - -
-
- -
-
-
- - - - - + + + + + contribute to hacktoberfest 2018 + + + + + +
+ +
+
+
+

Hacktoberfest 2018

+

Im join in hacktoberfest 2018 :)

+

Get Started Now >

+ +
+ + + +
+
+ +
+
+
+ + + + + diff --git a/Html/hacktoberfest.html b/Html/hacktoberfest.html index bfcfaed47..4f5d9f253 100644 --- a/Html/hacktoberfest.html +++ b/Html/hacktoberfest.html @@ -1,35 +1,35 @@ - - - - - - Hacktoberfest - - -

Hello World!

-
-

Welcome Hacktoberfest!

-

Let's Coding!

- + + + + + + Hacktoberfest + + +

Hello World!

+
+

Welcome Hacktoberfest!

+

Let's Coding!

+ \ No newline at end of file diff --git a/html/header.html b/Html/header.html similarity index 100% rename from html/header.html rename to Html/header.html diff --git a/Html/hello-world.html b/Html/hello-world.html index abc822ea6..e88765c34 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/hello-world2.html b/Html/hello-world2.html index b0bbd68a9..540eb3107 100644 --- a/Html/hello-world2.html +++ b/Html/hello-world2.html @@ -1,3 +1,3 @@ -

- Hello World by Juan V. +

+ Hello World by Juan V.

\ No newline at end of file diff --git a/Html/hello-world3.html b/Html/hello-world3.html index 15cdf9392..4fa4255f7 100644 --- a/Html/hello-world3.html +++ b/Html/hello-world3.html @@ -1,6 +1,6 @@ -

- Hello world -

-
- By Juan V. +

+ Hello world +

+
+ By Juan V.
\ No newline at end of file diff --git a/Html/hello-world5.html b/Html/hello-world5.html index e3b57caf1..110eba925 100644 --- a/Html/hello-world5.html +++ b/Html/hello-world5.html @@ -1,24 +1,24 @@ -

- Hello world -

- -
- By Juan V. -
- \ No newline at end of file diff --git a/Html/hello.html b/Html/hello.html index 238b63e07..33c05d0b0 100644 --- a/Html/hello.html +++ b/Html/hello.html @@ -1,10 +1,10 @@ - - - - HACKTOBERFEST - - -

Welcome to Hacktoberfest

-

HELLO WORLD!

- - + + + + HACKTOBERFEST + + +

Welcome to Hacktoberfest

+

HELLO WORLD!

+ + diff --git a/html/hello_html.html b/Html/hello_html.html similarity index 100% rename from html/hello_html.html rename to Html/hello_html.html diff --git a/html/hello_world.html b/Html/hello_world.html similarity index 94% rename from html/hello_world.html rename to Html/hello_world.html index b362e3034..07a97bb92 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/just12.html b/Html/just12.html similarity index 94% rename from html/just12.html rename to Html/just12.html index 33690d491..e1829857d 100644 --- a/html/just12.html +++ b/Html/just12.html @@ -1,11 +1,11 @@ - - - - just12 - - - - -

hellow world

- - + + + + just12 + + + + +

hellow world

+ + diff --git a/Html/lbl.html b/Html/lbl.html index bfc50200d..ad272fe7c 100644 --- a/Html/lbl.html +++ b/Html/lbl.html @@ -1,139 +1,139 @@ - - - - - - - - '18 - - - - - - - - - - - - - - -
Made with LOVE by
-
- L - B -
-
Mritunjay           Tushar
-
- - - - + + + + + + + + '18 + + + + + + + + + + + + + + +
Made with LOVE by
+
+ L + B +
+
Mritunjay           Tushar
+
+ + + + diff --git a/Html/simpleBootstrap/bootstrap.html b/Html/simpleBootstrap/bootstrap.html index 98e7dd2d1..2eec14d3e 100644 --- a/Html/simpleBootstrap/bootstrap.html +++ b/Html/simpleBootstrap/bootstrap.html @@ -1,36 +1,36 @@ - - - - Bootstrap Assignment - - - - - - - - - - -
-

Know More About Earth!

-
- -
-
-
-

The Earth’s rotation is gradually slowing.

-

This deceleration is happening almost imperceptibly, at approximately 17 milliseconds per hundred years, although the rate at which it occurs is not perfectly uniform. This has the effect of lengthening our days, but it happens so slowly that it could be as much as 140 million years before the length of a day will have increased to 25 hours.

-
-
-

The Earth was once believed to be the centre of the universe.

-

Due to the apparent movements of the Sun and planets in relation to their viewpoint, ancient scientists insisted that the Earth remained static, whilst other celestial bodies travelled in circular orbits around it. Eventually, the view that the Sun was at the centre of the universe was postulated by Copernicus, though this is also not the case.

-
-
-

Earth is the only planet not named after a god.

-

The other seven planets in our solar system are all named after Roman gods or goddesses. Although only Mercury, Venus, Mars, Jupiter and Saturn were named during ancient times, because they were visible to the naked eye, the Roman method of naming planets was retained after the discovery of Uranus and Neptune.

-
-
-
- - + + + + Bootstrap Assignment + + + + + + + + + + +
+

Know More About Earth!

+
+ +
+
+
+

The Earth’s rotation is gradually slowing.

+

This deceleration is happening almost imperceptibly, at approximately 17 milliseconds per hundred years, although the rate at which it occurs is not perfectly uniform. This has the effect of lengthening our days, but it happens so slowly that it could be as much as 140 million years before the length of a day will have increased to 25 hours.

+
+
+

The Earth was once believed to be the centre of the universe.

+

Due to the apparent movements of the Sun and planets in relation to their viewpoint, ancient scientists insisted that the Earth remained static, whilst other celestial bodies travelled in circular orbits around it. Eventually, the view that the Sun was at the centre of the universe was postulated by Copernicus, though this is also not the case.

+
+
+

Earth is the only planet not named after a god.

+

The other seven planets in our solar system are all named after Roman gods or goddesses. Although only Mercury, Venus, Mars, Jupiter and Saturn were named during ancient times, because they were visible to the naked eye, the Roman method of naming planets was retained after the discovery of Uranus and Neptune.

+
+
+
+ + diff --git a/Html/vidit-Hello-World/vidit-hello.css b/Html/vidit-Hello-World/vidit-hello.css new file mode 100644 index 000000000..319e40231 --- /dev/null +++ b/Html/vidit-Hello-World/vidit-hello.css @@ -0,0 +1,57 @@ +body { + background-color: lightcoral; +} + +.header { + width:100%; + height:100px; + position: relative; + top:40%; +} + +.container { + display: inline-block; + height:50px; + position: absolute; + top: 20px; + left: 42%; +} + + +.msg { + font-size: 25px; +} +button { + width: 200px; + height:50px; + background-color: aquamarine; + border: none; + border-top-left-radius: 10px; + border-bottom-right-radius: 10px; + box-shadow: 0 10px darkgoldenrod; + color:white; + cursor: pointer; + +} + +button:active { + position: relative; + top:7px; + box-shadow: none; + color: rebeccapurple; + font-weight: bold; + +} +#btn { + font-size: 25px; + font-family: cursive; +} +#hello { + font-size: 50px; + font-family: cursive; + color: blueviolet; + font-style: oblique; + font-weight: bold; + text-align: center; + text-decoration: underline brown; +} diff --git a/Html/vidit-Hello-World/vidit-hello.html b/Html/vidit-Hello-World/vidit-hello.html new file mode 100644 index 000000000..c77fd7bb3 --- /dev/null +++ b/Html/vidit-Hello-World/vidit-hello.html @@ -0,0 +1,22 @@ + + + Hello-World + + + + +

+
+ +
+ + + +
+
+ + + + + + \ No newline at end of file diff --git a/Html/vidit-Hello-World/vidit-hello.js b/Html/vidit-Hello-World/vidit-hello.js new file mode 100644 index 000000000..c5c3d18a4 --- /dev/null +++ b/Html/vidit-Hello-World/vidit-hello.js @@ -0,0 +1,6 @@ +document.getElementById("btn").onclick = function() { + document.getElementById("btn").innerHTML = "Button Clicked"; + document.getElementById("hello").innerHTML = "Hello-World"; + document.getElementById("body").style.backgroundColor = "lightgreen"; + +} \ No newline at end of file diff --git a/Html/webeditor.html b/Html/webeditor.html index 44f026761..d2d13edd6 100644 --- a/Html/webeditor.html +++ b/Html/webeditor.html @@ -1,28 +1,28 @@ - - - - Web Text Editor - - - -
    -

    Press tab and start typing...

    -
    -
- + + + + Web Text Editor + + + +
    +

    Press tab and start typing...

    +
    +
+ \ No newline at end of file diff --git a/Hy/hello.hy b/Hy/hello.hy deleted file mode 100644 index 852580296..000000000 --- a/Hy/hello.hy +++ /dev/null @@ -1,6 +0,0 @@ -#! /usr/bin/env hy -(defn greet [thing] - (-> (.format "Hello, {}!" thing) - (print))) - -(greet "World") diff --git a/Hypercard/HelloWorld b/Hypercard/HelloWorld deleted file mode 100644 index 29297172a..000000000 --- a/Hypercard/HelloWorld +++ /dev/null @@ -1,8 +0,0 @@ -// Step 1 - Create a new button. -// Step 2 - Edit button script. - -on mouseUp - answer "Hello World." with "OK" -end mouseUp - -// Step 3 - Click the button. \ No newline at end of file diff --git a/IDL/hw.pro b/IDL/hw.pro deleted file mode 100644 index 702782b76..000000000 --- a/IDL/hw.pro +++ /dev/null @@ -1,12 +0,0 @@ -; IDL - Interactive Data Language -; https://www.harrisgeospatial.com/docs/using_idl_home.html - -; Run the IDL interpreter, then call the program: -; $ idl -; IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc. -; IDL> @hw -; Hello, World! -; CTRL+D to exit. - -PRINT, 'Hello, World!' - diff --git a/INTERCAL/helloWorld.i b/INTERCAL/helloWorld.i deleted file mode 100644 index a385a60a1..000000000 --- a/INTERCAL/helloWorld.i +++ /dev/null @@ -1,16 +0,0 @@ -DO ,1 <- #13 -PLEASE DO ,1 SUB #1 <- #238 -DO ,1 SUB #2 <- #108 -DO ,1 SUB #3 <- #112 -DO ,1 SUB #4 <- #0 -DO ,1 SUB #5 <- #64 -DO ,1 SUB #6 <- #194 -DO ,1 SUB #7 <- #48 -PLEASE DO ,1 SUB #8 <- #22 -DO ,1 SUB #9 <- #248 -DO ,1 SUB #10 <- #168 -DO ,1 SUB #11 <- #24 -DO ,1 SUB #12 <- #16 -DO ,1 SUB #13 <- #162 -PLEASE READ OUT ,1 -PLEASE GIVE UP diff --git a/IO/hello.io b/IO/hello.io deleted file mode 100644 index 6a8643719..000000000 --- a/IO/hello.io +++ /dev/null @@ -1 +0,0 @@ - "Hello, world!" println diff --git a/Idris/Hello idris b/Idris/Hello idris deleted file mode 100644 index b14df6442..000000000 --- a/Idris/Hello idris +++ /dev/null @@ -1 +0,0 @@ -Hi diff --git a/Idris/hello.idr b/Idris/hello.idr deleted file mode 100644 index 535135564..000000000 --- a/Idris/hello.idr +++ /dev/null @@ -1,12 +0,0 @@ -{- -HOW TO: -1) install cabal and idris -2) run: -$ idris hello.idr -o hello -$ ./hello --} - -module Main - -main : IO () -main = putStrLn "Hello world" diff --git a/ImageBlog/7.css b/ImageBlog/7.css deleted file mode 100644 index da619adfa..000000000 --- a/ImageBlog/7.css +++ /dev/null @@ -1,22 +0,0 @@ -img{ - width:30%; - height: 30%; - float: left; - margin:1.66%; - -} -body{ - background-color: black; -} -h1{ - font-family: 'Montserrat', sans-serif; - font-weight: 800; - margin-left: 1.66%; - font-size: 50px; - border-bottom: 2px dashed #F1F1F1; - width: 30%; - color: #F1F1F1; - text-transform: uppercase; - padding-bottom: 25px; - -} \ No newline at end of file diff --git a/ImageBlog/imageLinks.html b/ImageBlog/imageLinks.html deleted file mode 100644 index 7d21c3b81..000000000 --- a/ImageBlog/imageLinks.html +++ /dev/null @@ -1,17 +0,0 @@ - -http://c1.staticflickr.com/9/8450/8026519634_f33f3724ea_b.jpg -http://c2.staticflickr.com/8/7218/7209301894_c99d3a33c2_h.jpg -http://c2.staticflickr.com/8/7231/6947093326_df216540ff_b.jpg - - -http://c1.staticflickr.com/9/8788/17367410309_78abb9e5b6_b.jpg -http://c2.staticflickr.com/6/5814/20700286354_762c19bd3b_b.jpg -http://c2.staticflickr.com/6/5647/21137202535_404bf25729_b.jpg - - -http://c2.staticflickr.com/6/5588/14991687545_5c8e1a2e86_b.jpg -http://c2.staticflickr.com/4/3888/14878097108_5997041006_b.jpg -http://c2.staticflickr.com/8/7579/15482110477_0b0e9e5421_b.jpg - - - \ No newline at end of file diff --git a/ImageBlog/index.html b/ImageBlog/index.html deleted file mode 100644 index f5e4435bc..000000000 --- a/ImageBlog/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - gallery - - - - -

Image Gallery

- - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ImageFuck/Hello_World.png b/ImageFuck/Hello_World.png deleted file mode 100644 index 6ee4266cf..000000000 Binary files a/ImageFuck/Hello_World.png and /dev/null differ diff --git a/Inspec/hello.txt b/Inspec/hello.txt deleted file mode 100644 index 980a0d5f1..000000000 --- a/Inspec/hello.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World! diff --git a/Inspec/hello_spec.rb b/Inspec/hello_spec.rb deleted file mode 100644 index 8b3bb92a1..000000000 --- a/Inspec/hello_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -# -# Thanks to http://www.anniehedgie.com/inspec-basics-1 -# inspec exec hello_spec.rb -# -control 'world-1.0' do # A unique ID for control - impact 1.0 # Just how critical is - title 'Hello World' # Readable by a human - desc "Text should include the words 'hello world'." # Optional description - describe file('hello.txt') do # The actual test - its('content') { should match 'Hello World' } # - end # -end diff --git a/J#/helloworld.jsl b/J#/helloworld.jsl deleted file mode 100644 index 10769f9e8..000000000 --- a/J#/helloworld.jsl +++ /dev/null @@ -1,9 +0,0 @@ -package HelloWorld; - -public class HelloWorld -{ - public static void main(String[] args) - { - System.Console.Write("Hello World!"); - } -} diff --git a/J/HelloWorld.ijs b/J/HelloWorld.ijs deleted file mode 100644 index 173041485..000000000 --- a/J/HelloWorld.ijs +++ /dev/null @@ -1,2 +0,0 @@ -h=.'Hello World' -h diff --git a/JADE/helloWord.jade b/JADE/helloWord.jade deleted file mode 100644 index c908a851d..000000000 --- a/JADE/helloWord.jade +++ /dev/null @@ -1,5 +0,0 @@ -helloWorld(); - -begin - app.msgBox("Hello, World!", "Hello, World!", MsgBox_OK_Only + MsgBox_Information_Icon); -end; diff --git a/JS/helloworld.js b/JS/helloworld.js deleted file mode 100644 index eb065f93f..000000000 --- a/JS/helloworld.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Hello, World!'); diff --git a/JS/index.js b/JS/index.js deleted file mode 100644 index eb065f93f..000000000 --- a/JS/index.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Hello, World!'); diff --git a/JSON/Laptops.json b/JSON/Laptops.json deleted file mode 100644 index 65f713654..000000000 --- a/JSON/Laptops.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "laptops": [ - { - "manafacturer": "Dell", - "model": "Vostro 5568", - "CPU": "Intel i5", - "GPU": "Nvidia 940MX", - "RAM": "8GB", - "HDD": "1TB", - "SSD": null - }, - { - "manafacturer": "HP", - "model": "Pavilion g4", - "CPU": "AMD A4", - "GPU": null, - "RAM": "6GB", - "HDD": "500GB", - "SSD": null - } - ] -} diff --git a/JSON/hello-world.json b/JSON/hello-world.json deleted file mode 100644 index 7244ff234..000000000 --- a/JSON/hello-world.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "greeting": "Hello World!", - "greets": "Hello World!", -} diff --git a/JSON/helloWorld.json b/JSON/helloWorld.json deleted file mode 100644 index e186f1d4a..000000000 --- a/JSON/helloWorld.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "value": "Hello World!", - "visits": 2 -} diff --git a/JSON/hello_world.json b/JSON/hello_world.json deleted file mode 100644 index 4ef7d254a..000000000 --- a/JSON/hello_world.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - status: 'OK', - _route: {url: '/api/v1/demo', - data: { - _id: '5bc59757f463a62fec91eb3b', - message: 'Hello world' - } - -} diff --git a/JSP/helloworld.jsp b/JSP/helloworld.jsp deleted file mode 100644 index ea12194e4..000000000 --- a/JSP/helloworld.jsp +++ /dev/null @@ -1,12 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> - - - - -JSP - Hello World Tutorial - Programmer Gate - - -

<%= "Hello World!" %>

- - diff --git a/Java/1HelloWorld.java b/Java/1HelloWorld.java deleted file mode 100644 index f50bd4e6c..000000000 --- a/Java/1HelloWorld.java +++ /dev/null @@ -1,8 +0,0 @@ -public class HelloWorld { - - public static void main(String[] args) { - - System.out.println("Hello World"); - - - } diff --git a/Java/A.class b/Java/A.class deleted file mode 100644 index 0fc7cf63b..000000000 --- a/Java/A.class +++ /dev/null @@ -1,5 +0,0 @@ -class A { - public static void main(String args[]){ - System.out.println("Hello World"); - } -} diff --git a/Java/Andriod b/Java/Andriod deleted file mode 100644 index b56f29f98..000000000 --- a/Java/Andriod +++ /dev/null @@ -1,62 +0,0 @@ -package com.example.mithil.justjava; - -import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.view.View; -import android.widget.TextView; -import java.text.NumberFormat; -/** - * This app displays an order form to order coffee. - */ -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - } - - /** - * This method is called when the order button is clicked. - */ - int quantity = 2; - - public void submitOrder(View view) { - //int noOfCoffees = 2; - display(quantity); - displayPrice(quantity * 5); - } - - /** - * This method displays the given quantity value on the screen. - */ - - private void display(int number) { - TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view); - quantityTextView.setText("" + number); - } - - /** - * This method displays the given price on the screen. - */ - private void displayPrice(int number) { - TextView priceTextView = (TextView) findViewById(R.id.price_text_view); - priceTextView.setText(NumberFormat.getCurrencyInstance().format(number)); - } - - public void increment(View view) { - // int quantity = 2; - quantity = quantity + 1; - display(quantity); - submitOrder(view); - } - - public void decrement(View view) { - //int quantity = 2; - quantity = quantity - 1; - if (quantity < 0) - quantity = 0; - display(quantity); - submitOrder(view); - } -} diff --git a/Java/AreaOfShapes.java b/Java/AreaOfShapes.java deleted file mode 100644 index 1a9098673..000000000 --- a/Java/AreaOfShapes.java +++ /dev/null @@ -1,100 +0,0 @@ -import java.util.Scanner; -import static java.lang.System; -public class AreaOfShapes -{ - static Scanner scan = new Scanner(System.in); - public static void main(String[] args) - { - //print list of shapes - out.println("Pick your shape: \n1. Square\n2. Rectangle\n3. Circle\n4. Triangle\n5. Kite\n6. Parallelogram\n7. Rhombus\n8. Trapezoid"); - - //get user's shape until they give an int between 1 and 8 - int shape; - boolean good = false; - do - { - out.print("Enter a number between 1 and 9: "); - shape = scan.nextInt(); - if (shape > 0 && shape < 10) - { - good = true; - } - } - while (!good); - //declare variables for each area equation - double length, width, di1, di2, base, radius, height, biggerBase, smallerBase; - - //switch and case for each shape - switch (shape) - { - case 1: - //Square - out.print("Enter the length of one side: "); - length = scan.nextDouble(); - out.println("Area: " + (length * length)); - break; - case 2: - //Rectangle - out.print("Enter the length: "); - length = scan.nextDouble(); - out.print("Enter the width: "); - width = scan.nextDouble(); - out.println("Area: " + (length * width)); - break; - case 3: - //Circle - out.print("Enter the radius: "); - radius = scan.nextDouble(); - out.println("Area: " + ((radius * radius) * Math.PI)); - break; - case 4: - //Triangle - out.print("Enter the base: "); - base = scan.nextDouble(); - out.print("Enter the height: "); - height = scan.nextDouble(); - out.println((base * height) / 2); - break; - case 5: - //Kite - out.print("Enter the length of the first diagonal: "); - di1 = scan.nextDouble(); - out.print("Enther the length of the second diagonal: "); - di2 = scan.nextDouble(); - out.println((di1 * di2) / 2); - break; - case 6: - //Parallelogram - out.print("Enter the base: "); - base = scan.nextDouble(); - out.print("Enther the height: "); - height = scan.nextDouble(); - out.println(base * height); - break; - case 7: - //Rhombus - out.print("Enter the length of the first diagonal: "); - di1 = scan.nextDouble(); - out.print("Enther the length of the second diagonal: "); - di2 = scan.nextDouble(); - out.println((di1 * di2) / 2); - break; - case 8: - //Trapezoid - out.print("Enter the length of the bigger base: "); - biggerBase = scan.nextDouble(); - out.print("Enter the length of the smaller bse: "); - smallerBase = scan.nextDouble(); - out.print("Enter the height: "); - height = scan.nextDouble(); - out.println(((biggerBase * smallerBase) * height) / 2); - break; - case 9: - //Cube - out.print("Enter the length of one side: "); - length = scan.nextDouble(); - out.println("Surface Area: " + 6(length * length)); - break; - } - } -} diff --git a/Java/Armstrong b/Java/Armstrong deleted file mode 100644 index 82e5bc2e4..000000000 --- a/Java/Armstrong +++ /dev/null @@ -1,96 +0,0 @@ -/* Problem Statement: Program to print armstrong number and check whether armstrong number or not */ -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -public class ArmstrongNumber -{ - static void printArmstrong(int user_input) - { - int temp = user_input; - int num, rem, qub, sum; - System.out.println("First "+ temp +" armstrong numbers are - "); - - for(int i = 1; i <= temp; i++) - { - num = i; - sum = 0; - - while(num > 0) - { - rem = num % 10; - qub = rem * rem * rem; - sum = sum + qub; - num = num / 10; - } - - if(sum == i) - { - System.out.print(" "+sum); - } - } - System.out.println(); - } - - static void checkArmstrong(int user_input) - { - int temp = user_input; - int sum = 0, rem; - - while( temp != 0 ) - { - rem = temp % 10; - sum = sum + rem * rem * rem; - temp = temp / 10; - } - - if(user_input == sum) - System.out.println(user_input +" is an Armstrong Number."); - else - System.out.println(user_input +" is not an Armstrong Number."); - } - public static void main(String[] args) throws NumberFormatException, IOException - { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - int choice; - String ans; - do - { - System.out.println("Armstrong Numbers!"); - System.out.println("Press 1: Print Armstrong Numbers"); - System.out.println("Press 2: Check Armstrong Number"); - System.out.println("Press 3: Quit"); - System.out.print(": "); - choice = Integer.parseInt(br.readLine()); - - switch(choice) - { - case 1: - System.out.println("How many armstrong numbers you want?"); - int num = Integer.parseInt(br.readLine()); - printArmstrong(num); - break; - - case 2: - System.out.print("Enter number for armstrong check: "); - int check = Integer.parseInt(br.readLine()); - checkArmstrong(check); - break; - - case 3: - System.exit(0); - break; - - default: - System.out.println("Wrong choice entered!! Please try again.."); - break; - } - - System.out.println("Do you want to continue?"); - System.out.print("(Y/N): "); - ans = br.readLine(); - } - while(ans.toLowerCase().equals("y")); - } - -} diff --git a/Java/ArraySum b/Java/ArraySum deleted file mode 100644 index 42425b979..000000000 --- a/Java/ArraySum +++ /dev/null @@ -1,45 +0,0 @@ -import java.io.*; -import java.math.*; -import java.text.*; -import java.util.*; -import java.util.regex.*; - -public class Solution { - - /* - * Complete the simpleArraySum function below. - */ - static int simpleArraySum(int[] ar) { - /* - * Write your code here. - */ - int sum = 0; - for(int x : ar) - sum+=x; - return sum; - } - - private static final Scanner scanner = new Scanner(System.in); - - public static void main(String[] args) throws IOException { - BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH"))); - - int arCount = Integer.parseInt(scanner.nextLine().trim()); - - int[] ar = new int[arCount]; - - String[] arItems = scanner.nextLine().split(" "); - - for (int arItr = 0; arItr < arCount; arItr++) { - int arItem = Integer.parseInt(arItems[arItr].trim()); - ar[arItr] = arItem; - } - - int result = simpleArraySum(ar); - - bufferedWriter.write(String.valueOf(result)); - bufferedWriter.newLine(); - - bufferedWriter.close(); - } -} diff --git a/Java/AutomorphicNumber b/Java/AutomorphicNumber deleted file mode 100644 index ee9989b29..000000000 --- a/Java/AutomorphicNumber +++ /dev/null @@ -1,23 +0,0 @@ -public class Automorph -{ -public void Automorph(int n) -{ -int c=0,p,k=0;c=0; -double r; -int m=n; -p=m*m; - -while(n!=0) -{ -k=n/10; -c=c+1; -n=k; -} -//return(c); -r=p%(Math.pow(10,c)); -if(m==r) -System.out.println(m+ " is an automorphic number "); -else -System.out.println(m+ " is not an automorphic number "); -} -} diff --git a/Java/BalancedBrackets b/Java/BalancedBrackets deleted file mode 100644 index 8cb3b33b6..000000000 --- a/Java/BalancedBrackets +++ /dev/null @@ -1,33 +0,0 @@ -public static boolean checkBalanced(String exp) { - Stack st = new Stack<>(); - for(int i=0;i=amt) - { - balance=balance-amt; - } - else - { - System.out.println("Less Balance..Transaction Failed.."); - } - } - - //method to search an account number - boolean search(String acn) - { - if(accno.equals(acn)) - { - showAccount(); - return(true); - } - return(false); - } -} - -class ExBank -{ - public static void main(String arg[]) - { - Scanner KB=new Scanner(System.in); - - //create initial accounts - System.out.print("How Many Customer U Want to Input : "); - int n=KB.nextInt(); - Bank C[]=new Bank[n]; - for(int i=0;iarry[size-1] || findarry[mid]) - { - low=mid; - } - else - { - high=mid; - } - } - } - -} diff --git a/Java/BinaryToBase10.java b/Java/BinaryToBase10.java deleted file mode 100644 index 04d9a5b91..000000000 --- a/Java/BinaryToBase10.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.io.*; -import java.util.*; - -public class BinaryToBase10 { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - int baseTen = scanner.nextInt(); - scanner.close(); - - int count=0, maxOfOne=0, baseToBinary=0; - - while(baseTen>=1){ - int binary = baseTen%2; - if(binary==1){ - count++; - maxOfOne=count; - if(maxOfOne>baseToBinary){ - baseToBinary=maxOfOne; - } - } else if(binary==0){ - count=0; - } - baseTen=baseTen/2; - } - System.out.print(baseToBinary); - } -} diff --git a/Java/BonjourJava.java b/Java/BonjourJava.java deleted file mode 100644 index 7c2d64433..000000000 --- a/Java/BonjourJava.java +++ /dev/null @@ -1,6 +0,0 @@ -public class BonjourJava { - - public static void main(String[] args) { - System.out.println("Bonjour Java"); - } -} \ No newline at end of file diff --git a/Java/BrazilianHelloWorld.java b/Java/BrazilianHelloWorld.java deleted file mode 100644 index b71537548..000000000 --- a/Java/BrazilianHelloWorld.java +++ /dev/null @@ -1,5 +0,0 @@ -public class BrazilianHelloWorld{ -public static void main(String[] args) { - System.out.println("Olá Mundo!!!!"); - } -} diff --git a/Java/BruteForceHelloWorld.java b/Java/BruteForceHelloWorld.java deleted file mode 100644 index f9a62a507..000000000 --- a/Java/BruteForceHelloWorld.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.github.draylar; - -import java.util.Random; - -public class BruteForceHelloWorld { - - private static String possibleChars = "abcdefghijklmnopqrstuvwxyz ,!"; - private static Random random = new Random(); - - public static void main(String[] args) { - String helloWorld = "hello, world!"; - int totalAttemptCount = 0; - - // iterate over each character of hello world - for(int i = 0; i < helloWorld.length(); i++) { - do { - totalAttemptCount++; - } while (helloWorld.charAt(i) != getRandomCharacter()); - } - - logGuessCount(totalAttemptCount); - } - - - public static char getRandomCharacter() { - return possibleChars.charAt(random.nextInt(29)); - } - - - public static void logGuessCount(int totalAttemptCounts) { - System.out.println("Total character guesses: " + totalAttemptCounts); - } -} diff --git a/Java/BubbleSort.java b/Java/BubbleSort.java deleted file mode 100644 index 8bf660b44..000000000 --- a/Java/BubbleSort.java +++ /dev/null @@ -1,56 +0,0 @@ -import java.util.Scanner; - -public class BubbleSort { - public static int[] takeInput() - { - Scanner s = new Scanner(System.in); - System.out.println("Enter the number of elements in the array"); - int n=s.nextInt(); - System.out.println("Enter the array Elements"); - int input[]=new int [n]; - for(int i=0;iarr[j+1]) - { - int temp=arr[j]; - arr[j]=arr[j+1]; - arr[j+1]=temp; - flag = 1; - } - } - if(flag==0) - return; - } - } - - public static void main(String[] args) { - int input[]=takeInput(); - printArray(input); - bubbleSort(input); - System.out.println(); - printArray(input); - - } - -} diff --git a/Java/Bubble__Sort.java b/Java/Bubble__Sort.java deleted file mode 100644 index db4976396..000000000 --- a/Java/Bubble__Sort.java +++ /dev/null @@ -1,16 +0,0 @@ -class BubbleSort -{ - void bubbleSort(int arr[]) - { - int n = arr.length; - for (int i = 0; i < n-1; i++) - for (int j = 0; j < n-i-1; j++) - if (arr[j] > arr[j+1]) - { - // swap temp and arr[i] - int temp = arr[j]; - arr[j] = arr[j+1]; - arr[j+1] = temp; - } - } -} diff --git a/Java/BubblesortVn.java b/Java/BubblesortVn.java deleted file mode 100644 index 203a3b195..000000000 --- a/Java/BubblesortVn.java +++ /dev/null @@ -1,56 +0,0 @@ -import java.util.Scanner; - -public class BubbleSort { - public static int[] takeInput() - { - Scanner s = new Scanner(System.in); - System.out.println("Enter the number of elements in the array"); - int n=s.nextInt(); - System.out.println("Enter the array Elements"); - int input[]=new int [n]; - for(int i=0;iarr[j+1]) - { - int temp=arr[j]; - arr[j]=arr[j+1]; - arr[j+1]=temp; - flag = 1; - } - } - if(flag==0) - return; - } - } - - public static void main(String[] args) { - int input[]=takeInput(); - printArray(input); - bubbleSort(input); - System.out.println(); - printArray(input); - - } - -} diff --git a/Java/Calculator/Calculator.java b/Java/Calculator/Calculator.java deleted file mode 100644 index 54e816ef0..000000000 --- a/Java/Calculator/Calculator.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.company; - -public class Calculator { - private double number1, number2; - private double result; - - public Calculator(double number1, double number2) { - this.number1 = number1; - this.number2 = number2; - } - - public Calculator() { - } - - // Method Addition -// public int addition(int number1, int number2) { -// return number1 + number2; -// } - - public void addition(double number1, double number2) { - this.result = number1 + number2; - } - - // Method Subtraction - public void subtraction(double number1, double number2) { - this.result = number1 - number2; - } - - // Method Multiplication - public int multiplication(double number1, double number2) { - return number1 * number2; - } - - // Method Diffusion - public double division(double number1, double number2) { - if (number2 == 0) { - System.out.println("Fehler, durch 0 teilen nicht möglich!"); - return 0; - } else { - return (double) number1 / (double) number2; - } - } - - public int getNumber1() { - return number1; - } -// Inserting the number 1 - public void setNumber1(double number1) { - this.number1 = number1; - } -// getting number 2 - public int getNumber2() { - return number2; - } - - public void setNumber2(double number2) { - this.number2 = number2; - } - - public double getResult() { - return result; - } - - public void setResult(double result) { - this.result = result; - } -} -// My changes diff --git a/Java/Calculator/Main.java b/Java/Calculator/Main.java deleted file mode 100644 index 91c8250a7..000000000 --- a/Java/Calculator/Main.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.util.Scanner; -import static java.lang.System; -package com.company; - -public class Main { - static Scanner in = new Scanner(System.in); - public static void main(String[] args) { - int a,b; - out.println("Enter First digit"); - a = in.nextInt(); - out.println("Enter Second digt"); - b = in.nextInt(); - out.println("You entered integer " + a+" and "+ b); - // Erzeugung des Taschenrechners mit dem Standard-Konstruktor - Calculator calc = new Calculator(); - // Addition - calc.addition(a,b); - out.println("Addition : "+calc.getResult()); - // Subtraction - calc.subtraction(a,b); - out.println("Subtraction : "+calc.getResult()); - // Multiplication - out.println("Multiplication : "+calc.multiplication(a,b)); - // Division | Nicht durch null teilen, abfangen durch ==0, abfangen durch Exception wäre Zielführend - out.println("Division : "+calc.division(a,b)); - } -} diff --git a/Java/Chat.java b/Java/Chat.java deleted file mode 100644 index 016528243..000000000 --- a/Java/Chat.java +++ /dev/null @@ -1,72 +0,0 @@ -import java.util.*; -import java.io.*; -import java.net.*; -class chat{ -final static String end="end"; -static boolean quit=false; -static String name; - public static void main(String args[]) throws Exception{ - - try{ - InetAddress ip=InetAddress.getByName(args[0]); - int port=Integer.parseInt(args[1]); - MulticastSocket socket=new MulticastSocket(port); - socket.joinGroup(ip); - System.out.println("Enter your name:"); - Scanner sc=new Scanner(System.in); - name=sc.nextLine(); - NewThread t=new NewThread(socket,ip,port); - - System.out.println("Type message:"); - - while(true){ - String msg=sc.nextLine(); - String data=name+": "+msg; - try{ - if(msg.equals(end)){ - System.out.println("bbyee..."); - quit=true; - String leaved=name+" leaved the chat\n"; - byte buf[]=leaved.getBytes(); - DatagramPacket dp=new DatagramPacket(buf,buf.length,ip,port); - socket.send(dp); - socket.leaveGroup(ip); - socket.close(); - break; - }else{ - - byte buf[]=data.getBytes(); - DatagramPacket dp=new DatagramPacket(buf,buf.length,ip,port); - socket.send(dp);} - }catch(Exception e){System.out.println(e);} - } - } - catch(Exception e){System.out.println(e);} - } - -} -class NewThread implements Runnable{ - Thread t; - private MulticastSocket socket; - private int port; - private InetAddress ip; - NewThread(MulticastSocket s,InetAddress i,int p){ - t=new Thread(this); - this.socket=s; - this.ip=i; - this.port=p; - t.start(); - } - public void run(){ - while(!chat.quit){ - try{ - byte buf[]=new byte[1024]; - DatagramPacket dp=new DatagramPacket(buf,buf.length,ip,port); - socket.receive(dp); - String msg= new String(dp.getData(),0,dp.getLength()); - if(!msg.startsWith(chat.name)) - System.out.println(msg); - }catch(Exception e){System.out.println(e);} - } - } -} diff --git a/Java/CheckKthBit.java b/Java/CheckKthBit.java deleted file mode 100644 index ac271d363..000000000 --- a/Java/CheckKthBit.java +++ /dev/null @@ -1,31 +0,0 @@ -import java.util.Scanner; - -public class CheckKthBit { - public static void main(String args[]) { - - Scanner s = new Scanner(System.in); - System.out.println("Enter number to check for bit manipulation!);"); - - int num = s.nextInt(); - System.out.println("Enter bit to be checked! );"); - int k = s.nextInt(); - int bm = 1 << k; - - // Check if 5th bit is set or not? - - System.out.println("Original number " + Integer.toBinaryString(num)); - - // turn the bit off - num = num & (~bm); - System.out.println("Turning bit off " + Integer.toBinaryString(num)); - - // turn the bit on - num = num | (bm); - System.out.println("Turning bit on " + Integer.toBinaryString(num)); - - //toggle - - System.out.println("Toggling " + k + "th bit! " + Integer.toBinaryString(num^k)); - - } -} diff --git a/Java/ChristmasTree.java b/Java/ChristmasTree.java deleted file mode 100644 index 5d092be36..000000000 --- a/Java/ChristmasTree.java +++ /dev/null @@ -1,31 +0,0 @@ -import java.util.Scanner; - -public class ChristmasTree { - - public static void main(String[] args) { - - // Scanner für Eingabe und Zuweisung Größenvariable - Scanner input = new Scanner(System.in); - System.out.println("Wie groß soll dein Baum sein?"); - int christmasTreeSize = input.nextInt(); - // Schleife für Zeilenwechsel (Höhe) des Baums, Stamm kommt später - for (int i = 1; i <= christmasTreeSize; i++) { - // "degenerierende" Schleife für Leerzeichen zu Beginn - for (int a = (christmasTreeSize - i) - 1; a >= 0; a--) { - System.out.print(' '); - } - // Schleife für Sterne - for (int b = 1; b < (2 * i); b++) { - System.out.print('*'); - } - System.out.println(); - } - // Schleife für Leerzeichen vor Stamm und sysout Stamm - for (int c = 1; c < christmasTreeSize; c++) { - System.out.print(' '); - } - System.out.println('I'); - } - -} - diff --git a/Java/Cloneeskimo.java b/Java/Cloneeskimo.java deleted file mode 100644 index 14a054a43..000000000 --- a/Java/Cloneeskimo.java +++ /dev/null @@ -1,5 +0,0 @@ -public class Cloneeskimo { - public static void main(String[] args){ - System.out.println("Cloneeskimo!"); - } -} \ No newline at end of file diff --git a/Java/ConditionalOperator.java b/Java/ConditionalOperator.java deleted file mode 100755 index 4dbf62758..000000000 --- a/Java/ConditionalOperator.java +++ /dev/null @@ -1,18 +0,0 @@ -import java.util.Scanner; - - - -public class ConditionalOperator{ - - public static void main(String[] args) { - - Scanner scan = new Scanner(System.in); - int a,b,max=0; - a = scan.nextInt(); - b = scan.nextInt(); - max = a>b?a:b; - System.out.println("Max is : "+max); - - } - -} \ No newline at end of file diff --git a/Java/CountM.java b/Java/CountM.java deleted file mode 100644 index 9cc775d75..000000000 --- a/Java/CountM.java +++ /dev/null @@ -1,71 +0,0 @@ -import java.util.*; -import java.io.*; - -public class Atividade1 -{ - static int ContarMaiusculas (String x) - { - int cont=0; - for(int y=0;y='A' && x.charAt(y)<='Z') - cont++; - } - return cont; - } - - static boolean Palindromo (String x) - { - boolean teste=true; - int cont1=0; - int tam=x.length(); - System.out.println(tam); - for(int y=0;y - - - - - - - - - - - - \ No newline at end of file diff --git a/Java/DesignPatternHelloWorld/src/Main.java b/Java/DesignPatternHelloWorld/src/Main.java deleted file mode 100644 index b56369c3b..000000000 --- a/Java/DesignPatternHelloWorld/src/Main.java +++ /dev/null @@ -1,31 +0,0 @@ -public class Main { - - public static void main(String[] args) { - - PrintH letterHobject =new PrintH(); - PrintE letterEobject =new PrintE(); - PrintL letterLobject =new PrintL(); - PrintO letterOobject =new PrintO(); - PrintW letterWobject =new PrintW(); - PrintR letterRobject =new PrintR(); - PrintD letterDobject =new PrintD(); - PrintSpace space = new PrintSpace(); - - letterHobject.printLetterH(); - letterEobject.printLetterE(); - letterLobject.printLetterL(); - letterLobject.printLetterL(); - letterOobject.printLetterO(); - space.printSpace(); - letterWobject.printLetterW(); - letterOobject.printLetterO(); - letterRobject.printLetterR(); - letterLobject.printLetterL(); - letterDobject.printLetterD(); - } - } - - - - - diff --git a/Java/DesignPatternHelloWorld/src/PrintD.java b/Java/DesignPatternHelloWorld/src/PrintD.java deleted file mode 100644 index 9ae7981b1..000000000 --- a/Java/DesignPatternHelloWorld/src/PrintD.java +++ /dev/null @@ -1,49 +0,0 @@ -public class PrintD { - public void printLetterD() { - int x, y, z, v, w; - - for (z = 0; z < 7; z++) { - System.out.print("8"); - } - System.out.println("b."); - - for (z = 0; z < 8; z++) { - System.out.print("8"); - if (z == 2) { - for (x = 3; x < 6; x++) { - System.out.print(" "); - } - } - } - System.out.println(); - - for (v = 0; v < 3; v++) { - for (x = 0; x < 3; x++) { - System.out.print("8"); - } - for (y = 0; y < 5; y++) { - System.out.print(" "); - } - for (w = 0; w < 3; w++) { - System.out.print("8"); - - } - System.out.println(); - } - - - for (z = 0; z < 8; z++) { - System.out.print("8"); - if (z == 2) { - for (x = 3; x < 6; x++) { - System.out.print(" "); - } - } - } - System.out.println(); - for (z = 0; z < 7; z++) { - System.out.print("8"); - } - System.out.println("P'"); - } -} diff --git a/Java/DesignPatternHelloWorld/src/PrintE.java b/Java/DesignPatternHelloWorld/src/PrintE.java deleted file mode 100644 index c64ee889a..000000000 --- a/Java/DesignPatternHelloWorld/src/PrintE.java +++ /dev/null @@ -1,48 +0,0 @@ -public class PrintE { - - public void printLetterE() { - int x, y, z, v, w; - - for (x = 0; x < 10; x++) { - System.out.print("8"); - - } - if (x == 10) { - System.out.println(); - for (z = 0; z < 2; z++) { - for (y = 0; y < 3; y++) { - System.out.print("8"); - - } - System.out.println(); - } - if (z == 2) { - - for (x = 0; x < 8; x++) { - System.out.print("8"); - } - if (x == 8) { - //System.out.println(); - System.out.println(); - for (z = 0; z < 2; z++) { - for (y = 0; y < 3; y++) { - System.out.print("8"); - - } - System.out.println(); - } - } - } - if (z == 2) { - - for (x = 0; x < 10; x++) { - System.out.print("8"); - } - - } - } - System.out.println(); - System.out.println(); - } - -} diff --git a/Java/DesignPatternHelloWorld/src/PrintH.java b/Java/DesignPatternHelloWorld/src/PrintH.java deleted file mode 100644 index 0d16cdff7..000000000 --- a/Java/DesignPatternHelloWorld/src/PrintH.java +++ /dev/null @@ -1,39 +0,0 @@ -public class PrintH { - public void printLetterH(){ - int x,y,z,v,w; - for (z = 0; z < 3; z++) { - for (x = 0; x < 3; x++) { - System.out.print("8"); - } - for (y = 0; y < 4; y++) { - System.out.print(" "); - } - for (w = 0; w < 3; w++) { - System.out.print("8"); - - } - System.out.println(); - } - if (z == 3) { - for (v = 0; v < 10; v++) { - System.out.print("8"); - } - System.out.println(); - } - for (z = 0; z < 3; z++) { - for (x = 0; x < 3; x++) { - System.out.print("8"); - } - for (y = 0; y < 4; y++) { - System.out.print(" "); - } - for (w = 0; w < 3; w++) { - System.out.print("8"); - - } - System.out.println(); - - } - System.out.println(); - } -} diff --git a/Java/DesignPatternHelloWorld/src/PrintL.java b/Java/DesignPatternHelloWorld/src/PrintL.java deleted file mode 100644 index 717ad5211..000000000 --- a/Java/DesignPatternHelloWorld/src/PrintL.java +++ /dev/null @@ -1,19 +0,0 @@ -public class PrintL { - public void printLetterL() { - int x, y, z; - for (z = 0; z < 6; z++) { - System.out.println(); - for (x = 0; x < 3; x++) { - System.out.print("8"); - } - } - if (z == 6) { - System.out.println(); - for (y = 0; y < 10; y++) { - System.out.print("8"); - } - } - System.out.println(); - System.out.println(); - } -} diff --git a/Java/DesignPatternHelloWorld/src/PrintO.java b/Java/DesignPatternHelloWorld/src/PrintO.java deleted file mode 100644 index be371a197..000000000 --- a/Java/DesignPatternHelloWorld/src/PrintO.java +++ /dev/null @@ -1,27 +0,0 @@ -public class PrintO { - public void printLetterO() { - int x, y, z, w; - - System.out.println(" .d88888b. "); - System.out.println("d88P\" \"Y88b "); - for (z = 0; z < 3; z++) { - for (x = 0; x < 3; x++) { - System.out.print("8"); - } - - for (y = 0; y < 5; y++) { - System.out.print(" "); - } - for (w = 0; w < 3; w++) { - System.out.print("8"); - } - System.out.println(); - } - if (z == 3) { - System.out.println("Y88b. .d88P"); - System.out.println(" \"Y88888P\""); - } - System.out.println(); - System.out.println(); - } -} diff --git a/Java/DesignPatternHelloWorld/src/PrintR.java b/Java/DesignPatternHelloWorld/src/PrintR.java deleted file mode 100644 index befd07ab3..000000000 --- a/Java/DesignPatternHelloWorld/src/PrintR.java +++ /dev/null @@ -1,90 +0,0 @@ -public class PrintR { - public void printLetterR() { - int x, y, z, v, w; - - for (x = 0; x < 7; x++) { - System.out.print("8"); - } - System.out.println("b."); - - for (x = 0; x < 10; x++) { - System.out.print("8"); - if (x == 2) { - for (x = 3; x < 6; x++) { - System.out.print(" "); - if (x == 5) { - System.out.print("Y"); - } - - } - - } - } - System.out.println(); - - for (x = 0; x < 11; x++) { - System.out.print("8"); - if (x == 2) { - for (x = 3; x < 7; x++) { - System.out.print(" "); - - } - - } - - } - System.out.println(); - for (x = 0; x < 10; x++) { - System.out.print("8"); - if (x == 2) { - for (x = 3; x < 6; x++) { - System.out.print(" "); - if (x == 5) { - System.out.print("d"); - } - - } - - } - } - System.out.println(); - - for (x = 0; x < 7; x++) { - System.out.print("8"); - } - System.out.print("P"); - System.out.println("'"); - - for (x = 0; x < 7; x++) { - System.out.print("8"); - if (x == 2) { - System.out.print(" "); - - } - - } - System.out.println(); - for (x = 0; x < 7; x++) { - System.out.print("8"); - if (x == 2) { - System.out.print(" "); - - } - - } - - System.out.println(); - for (x = 0; x < 7; x++) { - System.out.print("8"); - if (x == 2) { - System.out.print(" "); - - } - - } - - - System.out.println(); - System.out.println(); - } -} diff --git a/Java/DesignPatternHelloWorld/src/PrintSpace.java b/Java/DesignPatternHelloWorld/src/PrintSpace.java deleted file mode 100644 index 341ee116b..000000000 --- a/Java/DesignPatternHelloWorld/src/PrintSpace.java +++ /dev/null @@ -1,8 +0,0 @@ -public class PrintSpace { - public void printSpace(){ - - System.out.println(); - System.out.println(); - - } -} diff --git a/Java/DesignPatternHelloWorld/src/PrintW.java b/Java/DesignPatternHelloWorld/src/PrintW.java deleted file mode 100644 index b721f07ca..000000000 --- a/Java/DesignPatternHelloWorld/src/PrintW.java +++ /dev/null @@ -1,97 +0,0 @@ -public class PrintW { - public void printLetterW() { - int x, y; - for (x = 0; x < 3; x++) { - System.out.print("8"); - } - for (y = 0; y < 7; y++) { - System.out.print(" "); - } - for (x = 0; x < 3; x++) { - System.out.print("8"); - } - - System.out.println(); - - for (x = 0; x < 12; x++) { - System.out.print("8"); - if (x == 2) { - for (y = 2; x < 8; x++) { - System.out.print(" "); - if (x == 4) { - System.out.print("o"); - } - } - } - - } - System.out.println(); - - for (x = 0; x < 10; x++) { - System.out.print("8"); - if (x == 2) { - for (y = 2; x < 6; x++) { - System.out.print(" "); - if (x == 3) { - System.out.print("d8b"); - } - } - } - } - - System.out.println(); - - for (x = 0; x < 8; x++) { - System.out.print("8"); - if (x == 2) { - for (y = 2; x < 4; x++) { - System.out.print(" "); - if (x == 2) { - System.out.print("d888b"); - } - } - } - } - System.out.println(); - - for (x = 0; x < 11; x++) { - System.out.print("8"); - if (x == 2) { - System.out.print("d"); - } - if (x == 7) { - System.out.print("b"); - } - } - - System.out.println(); - - for (x = 0; x < 10; x++) { - System.out.print("8"); - if (x == 4) { - System.out.print("P"); - - System.out.print(" "); - - System.out.print("Y"); - } - } - - System.out.println(); - - for (x = 0; x < 8; x++) { - System.out.print("8"); - if (x == 3) { - System.out.print("P"); - - System.out.print(" "); - - System.out.print("Y"); - } - - } - - System.out.println(); - System.out.println(); - } -} diff --git a/Java/Dynamic Programing/Assembly Line Scheduling/.classpath b/Java/Dynamic Programing/Assembly Line Scheduling/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Assembly Line Scheduling/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Assembly Line Scheduling/.project b/Java/Dynamic Programing/Assembly Line Scheduling/.project deleted file mode 100644 index f83c25cec..000000000 --- a/Java/Dynamic Programing/Assembly Line Scheduling/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Assembly Line Scheduling - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Assembly Line Scheduling/src/AssemblyLineScheduling.java b/Java/Dynamic Programing/Assembly Line Scheduling/src/AssemblyLineScheduling.java deleted file mode 100644 index 5d1a9c04d..000000000 --- a/Java/Dynamic Programing/Assembly Line Scheduling/src/AssemblyLineScheduling.java +++ /dev/null @@ -1,73 +0,0 @@ - -/*A car factory has two assembly lines, each with n stations. - * A station is denoted by Si,j where i is either 1 or 2 and indicates the assembly line the station is on, - * and j indicates the number of the station. The time taken per station is denoted by ai,j. - * Each station is dedicated to some sort of work like engine fitting, body fitting, painting and so on. - * So, a car chassis must pass through each of the n stations in order before exiting the factory. - * The parallel stations of the two assembly lines perform the same task. After it passes through station Si,j, - * it will continue to station Si,j+1 unless it decides to transfer to the other line. - * Continuing on the same line incurs no extra cost, but transferring from line i at station j 1 - * to station j on the other line takes time ti,j. Each assembly line takes an entry time ei and exit time xi - * which may be different for the two lines. Give an algorithm for computing the minimum time it will take to build a car chassis.*/ - -import java.util.*; - -public class AssemblyLineScheduling { - - public AssemblyLineScheduling() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of stations in each assembly : "); - int n = s.nextInt(); - - int a[][] = new int[2][n]; // time to service a car in same assembly line - int t[][] = new int[2][n]; // time to change the station form assembly line A to B or vice versa - int T1[] = new int[n]; - int T2[] = new int[n]; - - System.out.println("Enter the entry time for assembly 1 and 2 :"); - int entry1 = s.nextInt(); - int entry2 = s.nextInt(); - - System.out.println("Enter the exit time for assembly 1 and 2 :"); - int exit1 = s.nextInt(); - int exit2 = s.nextInt(); - - int minsum = Integer.MAX_VALUE; - - System.out.println("Enter the service time for both the assemblies, A then B : "); - - for (int j = 0; j < a[0].length; j++) { - for (int i = 0; i < 2; i++) { - a[i][j] = s.nextInt(); - } - } - - System.out.println("Enter the swap time for both the assemblies, A then B : "); - - for (int j = 0; j < t[0].length; j++) { - for (int i = 0; i < 2; i++) { - t[i][j] = s.nextInt(); - } - } - - - T1[0] = entry1 + a[0][0]+t[0][0]; - T2[0] = entry2 + a[1][0]+t[1][0]; - - for(int i = 1 ; i < n ; i++) - { - T1[i] = Math.min((a[0][i] + T1[i-1]) , (t[1][i] + T2[i-1] + a[0][i])); - T2[i] = Math.min((a[1][i] + T2[i-1]) , (t[0][i] + T1[i-1] + a[1][i])); - } - - System.out.println("Minimum value = " + Math.min(T1[T1.length-1]+exit1 , T2[T2.length-1]+exit2)); - - } - -} diff --git a/Java/Dynamic Programing/Bells Number/.classpath b/Java/Dynamic Programing/Bells Number/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Bells Number/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Bells Number/.project b/Java/Dynamic Programing/Bells Number/.project deleted file mode 100644 index e4e66eeb7..000000000 --- a/Java/Dynamic Programing/Bells Number/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Bells Number - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Bells Number/src/BellsNumber.java b/Java/Dynamic Programing/Bells Number/src/BellsNumber.java deleted file mode 100644 index 9e9b8585c..000000000 --- a/Java/Dynamic Programing/Bells Number/src/BellsNumber.java +++ /dev/null @@ -1,49 +0,0 @@ -import java.util.*; - -public class BellsNumber { - - public BellsNumber() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - Scanner s = new Scanner(System.in); - System.out.println("Enter the nth bell number you need : "); - int n = s.nextInt(); - - int DPgrid[][] = new int[n][n]; - - - int bellnumber = bellNumber(DPgrid , n); - System.out.println("The nth bell's number = " + bellnumber); - - - } - - private static int bellNumber(int[][] dPgrid, int n) { - // TODO Auto-generated method stub - - dPgrid[0][0] = 1; - for(int i = 1 ; i < n ; i++) - { - dPgrid[i][0] = dPgrid[i-1][i-1]; - for(int j = 1 ; j <= i ; j++) - { - dPgrid[i][j] = dPgrid[i-1][j-1] + dPgrid[i][j-1]; - } - } - - for(int i = 0 ; i < n ; i++) - { - for(int j = 0 ; j < n ; j++) - { - System.out.print(dPgrid[i][j] + "\t"); - } - System.out.println(); - } - - return dPgrid[n-1][n-1]; - } - -} diff --git a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/.classpath b/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/.project b/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/.project deleted file mode 100644 index aea40b820..000000000 --- a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Longest Bitonic Subsequence - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/.classpath b/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/.classpath deleted file mode 100644 index 3f3893aff..000000000 --- a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/.project b/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/.project deleted file mode 100644 index e63cd589f..000000000 --- a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Bitonic Subsequence(LIS LDS)_src - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/LBS.java b/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/LBS.java deleted file mode 100644 index acea316f6..000000000 --- a/Java/Dynamic Programing/Bitonic Subsequence(LIS LDS)/src/LBS.java +++ /dev/null @@ -1,93 +0,0 @@ -import java.util.*; - -public class LBS { - - public LBS() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of elements : "); - int n = s.nextInt(); - - int arr[] = new int[n]; - System.out.println("Enter the elements of array :"); - for (int i = 0; i < n; i++) { - arr[i] = s.nextInt(); - } - - // first find the longest increasing subsequence from left to right - - int lis[] = findLIS(arr, n); - - // now find the longest decreasing subsequence from right to left - System.out.println(); - - int lds[] = findLDS(arr, n); - - int max = lis[0] + lds[0] - 1; - for(int i = 1 ; i < n ; i++) - { - if(max < (lis[i] + lds[i] - 1)) - max = lis[i] + lds[i] - 1; - } - - System.out.println(max); - - } - - - private static int[] findLDS(int[] arr, int n) { - // TODO Auto-generated method stub - - int lds[] = new int[n]; - for (int i = 0; i < n; i++) - { - lds[i] = 1; - } - - for (int i = n - 2; i >= 0; i--) { - for (int j = n - 2; j > i; j--) { - if (arr[i] > arr[j] && lds[i] < lds[j] + 1) { - lds[i] = lds[j] + 1; - } - } - } - - - for (int i = 0; i < n; i++) { - System.out.print(lds[i ]+ "\t"); - } - - return lds; - } - - private static int[] findLIS(int[] arr, int n) { - // TODO Auto-generated method stub - int lis[] = new int[n]; - for (int i = 0; i < n; i++) { - lis[i] = 1; - } - for (int i = 1; i < n; i++) { - for (int j = 0; j < i; j++) { - if (arr[j] < arr[i] && lis[i] < lis[j] + 1) { - lis[i] = lis[j] + 1; - } - } - } - - for (int i = 0; i < n; i++) { - System.out.print(lis[i] + "\t"); - } - return lis; - } - -} - - - - - diff --git a/Java/Dynamic Programing/Box Stacking/BoxStacking.java b/Java/Dynamic Programing/Box Stacking/BoxStacking.java deleted file mode 100644 index de5a290db..000000000 --- a/Java/Dynamic Programing/Box Stacking/BoxStacking.java +++ /dev/null @@ -1,89 +0,0 @@ -import java.util.*; - -class Box{ - int length; - int breadth; - int height; - - public Box(int l , int b , int h) - { - length = l; - breadth = b; - height = h; - } -} -public class BoxStacking{ - public static void main(String args[]) - { - Scanner s = new Scanner(System.in); - System.out.println("Enter the number of boxes :"); - int n = s.nextInt(); - - Box boxes[] = new Box[n]; - for(int i = 0 ; i < n ;i++){ - System.out.println("Enter l, b, h"); - boxes[i] = new Box(s.nextInt() , s.nextInt() , s.nextInt()); - } - - //now create a new array of boxes which stores all the variations of lxbxh - Box box[] = new Box[3*n]; - int size = box.length; - int j = 0; - - for(int i = 0 ; i < n ; i++) - { - box[j++] = new Box(Math.max(boxes[i].breadth , boxes[i].height) , Math.min(boxes[i].breadth , boxes[i].height) , boxes[i].length); - box[j++] = new Box(Math.max(boxes[i].length , boxes[i].height) , Math.min(boxes[i].length , boxes[i].height) , boxes[i].breadth); - box[j++] = new Box(Math.max(boxes[i].breadth , boxes[i].length) , Math.min(boxes[i].breadth , boxes[i].length) , boxes[i].height); - } - - //sorting according to the height of every box - - Arrays.sort(box , new Comparator(){ - @Override - public int compare(Box h1 , Box h2) - { - return Integer.compare((h2.length * h2.breadth) , (h1.length * h1.breadth)); - } - }); - - for(int i = 0 ; i < size ; i++){ - System.out.print(box[i].length + "\t"); - System.out.print(box[i].breadth + "\t"); - System.out.print(box[i].height + "\t"); - - System.out.println(); - } - - //now apply longest increasing subsequence - - int T[] = new int[size]; - int maxheight = Integer.MIN_VALUE; - - for(int i = 0 ; i < size ; i++) - { - T[i] = box[i].height; - } - - int i = 1; - j = 0; - - for(i = 1 ; i < size ; i++) - { - for(j = 0 ;j < i ; j++) - { - if((box[j].length > box[i].length) && (box[j].breadth > box[i].breadth)) - { - if(T[j] + box[i].height > T[i]) - { - T[i] = T[j] + box[i].height; - maxheight = Math.max(maxheight , T[i]); - } - } - } - } - - - System.out.println(T[size-1]); - } -} \ No newline at end of file diff --git a/Java/Dynamic Programing/Catalan Number/.classpath b/Java/Dynamic Programing/Catalan Number/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Catalan Number/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Catalan Number/.project b/Java/Dynamic Programing/Catalan Number/.project deleted file mode 100644 index b54987a92..000000000 --- a/Java/Dynamic Programing/Catalan Number/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Catalan Number - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Catalan Number/src/CatalanNumber.java b/Java/Dynamic Programing/Catalan Number/src/CatalanNumber.java deleted file mode 100644 index 27bfe1e56..000000000 --- a/Java/Dynamic Programing/Catalan Number/src/CatalanNumber.java +++ /dev/null @@ -1,34 +0,0 @@ -import java.util.*; -public class CatalanNumber { - - public CatalanNumber() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - - Scanner s = new Scanner(System.in); - System.out.println("Enter the index for catalan's number : "); - int n = s.nextInt(); - - System.out.println("the ith catalan's number = " + catalanNumber(n)); - - } - - private static int catalanNumber(int n) { - // TODO Auto-generated method stub - int count = 0; - if(n == 0 || n == 1) - return 1; - - for(int i = 1 ; i <= n ; i++) - { - count = count + (catalanNumber(i-1) * catalanNumber(n-i)); - } - - - return count; - } - -} diff --git a/Java/Dynamic Programing/Change Making Problems/.classpath b/Java/Dynamic Programing/Change Making Problems/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Change Making Problems/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Change Making Problems/.project b/Java/Dynamic Programing/Change Making Problems/.project deleted file mode 100644 index 53b964096..000000000 --- a/Java/Dynamic Programing/Change Making Problems/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - DPCoinChange - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Change Making Problems/bin/.classpath b/Java/Dynamic Programing/Change Making Problems/bin/.classpath deleted file mode 100644 index 3f3893aff..000000000 --- a/Java/Dynamic Programing/Change Making Problems/bin/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Change Making Problems/bin/.project b/Java/Dynamic Programing/Change Making Problems/bin/.project deleted file mode 100644 index 4f0f15f10..000000000 --- a/Java/Dynamic Programing/Change Making Problems/bin/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Change Making Problems_src - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Change Making Problems/src/.classpath b/Java/Dynamic Programing/Change Making Problems/src/.classpath deleted file mode 100644 index 3f3893aff..000000000 --- a/Java/Dynamic Programing/Change Making Problems/src/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Change Making Problems/src/.project b/Java/Dynamic Programing/Change Making Problems/src/.project deleted file mode 100644 index 4f0f15f10..000000000 --- a/Java/Dynamic Programing/Change Making Problems/src/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Change Making Problems_src - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Change Making Problems/src/DPCoinChange.java b/Java/Dynamic Programing/Change Making Problems/src/DPCoinChange.java deleted file mode 100644 index c2d817536..000000000 --- a/Java/Dynamic Programing/Change Making Problems/src/DPCoinChange.java +++ /dev/null @@ -1,100 +0,0 @@ -import java.util.*; - -public class DPCoinChange { - - static ArrayList str = new ArrayList(); - - public DPCoinChange() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - - Scanner s = new Scanner(System.in); - - - System.out.println("Enter the Amount to have a change : "); - int amount = s.nextInt(); - System.out.println("Enter the number of denominations required : "); - int items = s.nextInt(); - - int deno[] = new int[items+1]; - - System.out.println("Enter the denominaitons : "); - deno[0] = 0; - for(int i = 1 ; i <= items ; i++) - { - deno[i] = s.nextInt(); - } - - // now the table for DP approach have rows = Amount and Columns = items(denominations) - - int DPchange[][] = new int[amount+1][items+1]; - - for(int i = 0 ; i <= amount ; i++) - { - for(int j = 1 ; j <= items ; j++) - { - if(i == 0) - DPchange[i][j] = 0; - else if(deno[j] == 1) - DPchange[i][j] = i; - else - { - DPchange[i][j] = DPchange[i][j-1]; - if(i >= deno[j] && DPchange[i][j] > (1+DPchange[i-deno[j]][j])) - DPchange[i][j] = (1+DPchange[i-deno[j]][j]); - } - } - } - - int printonce = 1; - for(int i = 0 ; i <= amount ; i++) - { - System.out.print("\t"); - if(printonce == 1) { - for(int j = 0 ; j <= items ; j++) - { - System.out.print(deno[j] + "\t"); - } - printonce = 0; - } - System.out.println(); - System.out.print(i + "\t"); - for(int j = 0 ; j <= items ; j++) - { - System.out.print(DPchange[i][j] + "\t"); - } - System.out.println(); - } - - System.out.println("The numbers of coins required = " + DPchange[amount][items]); - - backTrack(DPchange, amount, deno , deno.length-1 , ""); - - for(String backtrack : str) - { - System.out.println(backtrack); - } - - } - - - - private static void backTrack(int[][] dPchange, int i, int[] deno , int j , String s) { - // TODO Auto-generated method stub - // amount = i; - // coins = j - - if (dPchange[i][j] != 0) { - if (dPchange[i][j] == dPchange[i][j - 1]) { - backTrack(dPchange, i, deno, j - 1, s); - } else if (i >= deno[j] && dPchange[i][j] >= (1 + dPchange[i - deno[j]][j])) { - s = deno[j] + " " + s; - backTrack(dPchange, i - deno[j], deno, j, s); - } - } - - str.add(s); - } -} diff --git a/Java/Dynamic Programing/Cuting Rod Murali sir/.classpath b/Java/Dynamic Programing/Cuting Rod Murali sir/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Cuting Rod Murali sir/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Cuting Rod Murali sir/.project b/Java/Dynamic Programing/Cuting Rod Murali sir/.project deleted file mode 100644 index 99fd712bb..000000000 --- a/Java/Dynamic Programing/Cuting Rod Murali sir/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - RodCuttingMurli - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Cuting Rod Murali sir/src/RodCutting.java b/Java/Dynamic Programing/Cuting Rod Murali sir/src/RodCutting.java deleted file mode 100644 index a4c7f9f33..000000000 --- a/Java/Dynamic Programing/Cuting Rod Murali sir/src/RodCutting.java +++ /dev/null @@ -1,78 +0,0 @@ -/*Rod Cutting problem by murali sir - * - * you have a rod of length 100. Now say you have to cut the rod at point 80 90 95 - * such that if you cut the rod of length l then the cost of length l will get added to the whole price - * - * Example : say you have a rod of length 100 then you break the rod at point 80, then you have 2 rods of length 80 and 20. - * Now the price of cutting it is 100, - * After this there is no way to cut the rod 80 - * now you must cut the rod of length 20 at point 90 or at point 95 - * if you cut the rod at point 90 then cost = cost + 20; - * next you have to cut the the rod at point 95 the cost = 100 + 20 + 10; - * if you cut the rod at point 95 then still the cost = cost + 20; - * next you have to cut the rod at point 90 then the cost = 100 + 20 + 15; - * - * so the minimum is 130 - * not the 135 - * */ - -import java.util.*; - -public class RodCutting { - - public static void main(String[] args) { - - Scanner s = new Scanner(System.in); - - System.out.println("Enter the length of rod :"); - int n = s.nextInt(); - - System.out.println("Enter the position to cut the rod :"); - int cuts = s.nextInt(); - - int cut[] = new int[cuts]; - int max = 0; - for(int i = 0 ; i < cuts ; i++) - { - cut[i] = s.nextInt(); - max = max + cut[i]; - } - - int DPgrid[][] = new int[cuts][cuts]; - - for(int i = 0 ; i < cuts ; i++) - { - DPgrid[i][i] = 0; - } - - int temp = 0; - int min_cost = max; - for(int i = 0 ; i < cuts ; i++) - { - for(int l = 0 ; l < i ; l++) - { - int j = l + i; - for(int k = i ; k < j ; k++) - { - min_cost = Math.min(min_cost , DPgrid[i][k] + DPgrid[k][j]); - } - DPgrid[i][j] = cut[j] - cut[i] + min_cost; - } - } - - - for(int i = 0 ; i < cuts ; i++) - { - System.out.println(); - for(int j = 0 ; j < cuts ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - } - - private static int min(int max, int temp) { - // TODO Auto-generated method stub - return (max < temp ? max : temp); - } -} diff --git a/Java/Dynamic Programing/Edit Distance/.classpath b/Java/Dynamic Programing/Edit Distance/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Edit Distance/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Edit Distance/.project b/Java/Dynamic Programing/Edit Distance/.project deleted file mode 100644 index 136e1e547..000000000 --- a/Java/Dynamic Programing/Edit Distance/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - EditDistance - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Edit Distance/src/EditDistance.java b/Java/Dynamic Programing/Edit Distance/src/EditDistance.java deleted file mode 100644 index 66eebbad6..000000000 --- a/Java/Dynamic Programing/Edit Distance/src/EditDistance.java +++ /dev/null @@ -1,84 +0,0 @@ -/* Edit Distance : Given two strings A of length m and B of length n, transform A into B with a minimum number of operations of the following types: - * Delete a character from A - * Insert a character into A - * Change some character in A into a new character. - * The minimal number of such operations required to transform A into B is called the edit distance between A and B. - * */ - -//Solution : if i have to transform A -> B then we need A number of Rows and B number of Columns - -import java.util.*; - -public class EditDistance { - - public EditDistance() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the first String A : "); - String s1 = s.next(); - char s11[] = s1.toCharArray(); - char A[] = new char[s11.length + 1]; - - A[0] = '0'; - for(int i = 1 ; i < A.length ; i++) - { - A[i] = s11[i-1]; - } - - - System.out.println("Enter the second String B :"); - String s2 = s.next(); - char s22[] = s2.toCharArray(); - char B[] = new char[s22.length + 1]; - - B[0] = '0'; - for(int i = 1 ; i < B.length ; i++) - { - B[i] = s22[i-1]; - } - - int DPgrid[][] = new int[A.length+1][B.length+1]; - - //Initial conditions - DPgrid[0][0] = 0; - for(int i = 1 ; i <= A.length ; i++) - { - DPgrid[i][0] = DPgrid[i-1][0] + 1; - } - for(int j = 1 ; j <= B.length ; j++) - { - DPgrid[0][j] = DPgrid[0][j-1] + 1; - } - - int maxval=0; - - for(int i = 1 ; i < A.length ; i++) - { - for(int j = 1 ; j < B.length ; j++) - { - if(A[i] == B[j]) - { - DPgrid[i][j] = DPgrid[i-1][j-1]; - } - else - { - maxval = findmin(DPgrid[i-1][j] , DPgrid[i][j-1] , DPgrid[i-1][j-1]); - DPgrid[i][j] = maxval+1; - - } - } - } - System.out.println("the number of edit operations required = " + DPgrid[A.length-1][B.length-1]); - - } - - public static int findmin(int a , int b , int c) - { - return (a - - - - - diff --git a/Java/Dynamic Programing/EditDistance paligdrome/.project b/Java/Dynamic Programing/EditDistance paligdrome/.project deleted file mode 100644 index 4e58643d6..000000000 --- a/Java/Dynamic Programing/EditDistance paligdrome/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - EditDistancePalingdrom - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/EditDistance paligdrome/src/EditDistancePaligdorm.java b/Java/Dynamic Programing/EditDistance paligdrome/src/EditDistancePaligdorm.java deleted file mode 100644 index 93a961e1e..000000000 --- a/Java/Dynamic Programing/EditDistance paligdrome/src/EditDistancePaligdorm.java +++ /dev/null @@ -1,55 +0,0 @@ -import java.util.Scanner; - -public class EditDistancePaligdorm { - static String seq; - - - static int longestPalindrome(int ii,int dd,int rr) { - int m = seq.length(); - - int[][] table = new int[m][m]; - - for (int i = 0; i < m; i++) { - table[i][i] = 0; - } - for (int i = 0; i < m - 1; i++) { - if (seq.charAt(i) == seq.charAt(i + 1)) table[i][i + 1] = 0; - else - { - table[i][i+1] = Math.min(Math.min(ii, dd), rr); - } - } - - for (int d = 2; d < m; d++) { - for (int i = 0; i <= m - 1 - d; i++) { - int j = i + d; - if (seq.charAt(i) == seq.charAt(j)) table[i][j] = table[i + 1][j - 1]; - else { - int Icost = Math.min(table[i + 1][j] + ii, table[i][j - 1]+ii); - int Dcost = Math.min(table[i + 1][j] + dd, table[i][j - 1] + dd); - int Recost = table[i + 1][j - 1] + rr; - table[i][j] = Math.min(Math.min(Icost, Dcost), Recost); - } - } - } - for (int i = 0; i < m; i++) { - for (int j = 0; j < m; j++) { - System.out.print(table[i][j] + " "); - } - System.out.println(); - } - return table[0][m - 1]; - } - - public static void main(String []args){ - Scanner sc = new Scanner(System.in); - System.out.println("enter sequence"); - seq = sc.next(); - - int ii = sc.nextInt(); - int dd = sc.nextInt(); - int rr = sc.nextInt(); - System.out.println(" Cost to make palindrome is:"+ longestPalindrome(ii,dd,rr)); - } - -} \ No newline at end of file diff --git a/Java/Dynamic Programing/Egg Dropping/.classpath b/Java/Dynamic Programing/Egg Dropping/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Egg Dropping/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Egg Dropping/.project b/Java/Dynamic Programing/Egg Dropping/.project deleted file mode 100644 index 11f737207..000000000 --- a/Java/Dynamic Programing/Egg Dropping/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - EggDroping - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Egg Dropping/src/EggDroping.java b/Java/Dynamic Programing/Egg Dropping/src/EggDroping.java deleted file mode 100644 index 99f5ef836..000000000 --- a/Java/Dynamic Programing/Egg Dropping/src/EggDroping.java +++ /dev/null @@ -1,84 +0,0 @@ -/*-------------------------------------------------Problem : EggDrop------------------------------------- - * - * The following is a description of the instance of this famous puzzle involving n=2 eggs and a building with k=36 floors. - -Suppose that we wish to know which stories in a 36-story building are safe to drop eggs from, and which will cause the eggs to break on landing. We make a few assumptions: - -..An egg that survives a fall can be used again. -..A broken egg must be discarded. -..The effect of a fall is the same for all eggs. -..If an egg breaks when dropped, then it would break if dropped from a higher floor. -..If an egg survives a fall then it would survive a shorter fall. -..It is not ruled out that the first-floor windows break eggs, nor is it ruled out that the 36th-floor do not cause an egg to break. - -If only one egg is available and we wish to be sure of obtaining the right result, the experiment can be carried out in only one way. Drop the egg from the first-floor window; if it survives, drop it from the second floor window. Continue upward until it breaks. In the worst case, this method may require 36 droppings. Suppose 2 eggs are available. What is the least number of egg-droppings that is guaranteed to work in all cases? -The problem is not actually to find the critical floor, but merely to decide floors from which eggs should be dropped so that total number of trials are minimized. - * */ -import java.util.*; -public class EggDroping { - - public EggDroping() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of floors in a building : "); - int n = s.nextInt(); - int egg = 4; - - int DPgrid[][] = new int[egg+1][n+1]; - - // if you have k eggs and you are on 0th floor then 0 trials and for 1st floor you need only 1 trial - for(int i = 1 ; i <= egg ; i++) - { - DPgrid[i][0] = 0; - DPgrid[i][1] = 1; - } - - // if you have only 1 egg the for every floor you required n number's of trials - - for(int i = 1 ; i <= n ; i++) - { - DPgrid[1][i] = i; - } - int trial = 0; - - for(int i = 2 ; i <= egg ; i++) - { - for(int j = 2 ; j <= n ; j++) - { - DPgrid[i][j] = Integer.MAX_VALUE; - for(int k = 1 ; k <= j ; k++) - { - trial = 1 + max(DPgrid[i-1][k-1] , DPgrid[i][j-k]); - if(DPgrid[i][j] > trial) - DPgrid[i][j] = trial; - } - } - } - - int printonce = 1; - for(int i = 0 ; i <= egg ; i++) - { - System.out.print("\t"); - - System.out.println(); - System.out.print(i + "\t"); - for(int j = 0 ; j <= n ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - System.out.println(); - } - - System.out.println("The number of attemps to find the broken eggs = " + DPgrid[egg][n]); - s.close(); - } - - private static int max(int i, int j) { - return ((i>j) ? i : j); - } - -} diff --git a/Java/Dynamic Programing/Job Scheduling with Maximum Profit/JobScheduling.java b/Java/Dynamic Programing/Job Scheduling with Maximum Profit/JobScheduling.java deleted file mode 100644 index e73cc7967..000000000 --- a/Java/Dynamic Programing/Job Scheduling with Maximum Profit/JobScheduling.java +++ /dev/null @@ -1,59 +0,0 @@ -import java.util.*; - -class Job{ - int start; - int end; - int profit; - - public Job(int s , int e , int p) - { - start = s; - end = e; - profit = p; - } - -} - -public class JobScheduling{ - public static void main(String args[]) - { - Scanner s = new Scanner(System.in); - System.out.println("Enter the number of jobs "); - int n = s.nextInt(); - - Job jobs[] = new Job[n]; - //assumption is we are taking the jobs in sorted order of start time - for(int i = 0 ; i < n ; i++) - { - System.out.println("Enter start time, end time and Profit"); - jobs[i] = new Job(s.nextInt() , s.nextInt() , s.nextInt()); - } - - int T[] = new int[n]; - for(int i = 0 ; i < n; i++) - { - T[i] = jobs[i].profit; - } - - int Maxval = Integer.MIN_VALUE; - for(int i = 1; i < n ; i++) - { - for(int j = 0 ; j < i ; j++) - { - if(jobs[j].end <= jobs[i].start) - { - T[i] = Math.max(T[i] , T[j] + jobs[i].profit); - Maxval = Math.max(Maxval , T[i]); - } - } - } - - /*for(int i = 0 ; i < n ; i++) - { - System.out.print(T[i] + "\t"); - }*/ - - System.out.println("The highest profit = " + Maxval); - - } -} \ No newline at end of file diff --git a/Java/Dynamic Programing/KnapsackDP/.classpath b/Java/Dynamic Programing/KnapsackDP/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/KnapsackDP/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/KnapsackDP/.project b/Java/Dynamic Programing/KnapsackDP/.project deleted file mode 100644 index ec4303faa..000000000 --- a/Java/Dynamic Programing/KnapsackDP/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - KnapsackDP - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/KnapsackDP/src/DPKnapsack.java b/Java/Dynamic Programing/KnapsackDP/src/DPKnapsack.java deleted file mode 100644 index 4fcbd3879..000000000 --- a/Java/Dynamic Programing/KnapsackDP/src/DPKnapsack.java +++ /dev/null @@ -1,113 +0,0 @@ -import java.util.*; - -public class DPKnapsack { - - static ArrayList str = new ArrayList(); - - public DPKnapsack() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of item's you have : "); - int items = s.nextInt(); - - System.out.println("Enter the Weight of Knapsack : "); - int W = s.nextInt(); - - int p[] = new int[items + 1]; - int w[] = new int[items + 1]; - int DPgrid[][] = new int[items + 1][W + 1]; - - for(int i = 0 ; i <= items ; i++) - { - if(i == 0) - { - p[i] = 0; - w[i] = 0; - } - else { - System.out.println("Enter Profit : "); - p[i] = s.nextInt(); - System.out.println("Enter Weight : "); - w[i] = s.nextInt(); - } - } - - for(int i = 0 ; i <= items ; i++) - { - DPgrid[i][0] = 0; - } - - for(int i = 0 ; i <= W ; i++) - { - DPgrid[0][i] = 0; - } - - int profit = 0; - for(int i = 1 ; i <= items ; i++) - { - for(int j = 1 ; j <= W ; j++) - { - //if i pick the item then profit will become profit = profit of w1 + profit of (i-1 , W-j) - - - if(i == 1) - { - if(j >= w[i]) - DPgrid[i][j] = p[i]; - else - DPgrid[i][j] = 0; - } - else - { - DPgrid[i][j] = DPgrid[i-1][j]; - - if(w[i] <= j && (p[i] + (DPgrid[i-1][j-w[i]]) > DPgrid[i][j])) - { - DPgrid[i][j] = (p[i] + DPgrid[i-1][j-w[i]]); - profit = profit + (DPgrid[i][j]); - } - } - - } - } - - for(int i = 0 ; i <= items ; i++) - { - System.out.println(); - for(int j = 0 ; j <= W ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - System.out.println("The maximum profit = " + DPgrid[items][W]); - backTrack(DPgrid , items , w , p , W , ""); - - for(String item : str) - { - System.out.println(item); - } - - } - - private static void backTrack(int[][] dPgrid, int i, int[] w, int[] p, int j, String s) { - // TODO Auto-generated method stub - // items = i - // weight = j - - if (dPgrid[i][j] != 0) { - if (dPgrid[i][j] == dPgrid[i - 1][j]) { - backTrack(dPgrid, i - 1, w, p, j, s); - } else if (w[i] <= j && (p[i] + (dPgrid[i - 1][j - w[i]]) >= dPgrid[i][j])) { - s = w[i] + " " + s; - backTrack(dPgrid, i - 1, w, p, j - w[i], s); - } - } - - str.add(s); - } -} diff --git a/Java/Dynamic Programing/Largest Rectangle with 1's in a Matrix/LargestRectangleof1s.java b/Java/Dynamic Programing/Largest Rectangle with 1's in a Matrix/LargestRectangleof1s.java deleted file mode 100644 index 63312449e..000000000 --- a/Java/Dynamic Programing/Largest Rectangle with 1's in a Matrix/LargestRectangleof1s.java +++ /dev/null @@ -1,86 +0,0 @@ -import java.util.*; - -public class LargestRectangleof1s{ - - public static void main(String args[]) - { - Scanner s = new Scanner(System.in); - System.out.println("Enter the size of matrix in rows and columns format :"); - - int row = s.nextInt(); - int col = s.nextInt(); - int area = 0; - int maxarea = 0; - - System.out.println("Enter the 1 and 0 in matrix :"); - int m[][] = new int[row][col]; - for(int i = 0 ; i < row ; i++) - { - for(int j = 0 ; j < col ; j++) - { - m[i][j] = s.nextInt(); - } - } - - // create a temp array of size equals to columns; - - int T[] = new int[col]; - - for(int i = 0 ; i < row ; i++) - { - for(int j = 0 ; j < col ; j++) - { - if(m[i][j] == 0) - T[j] = 0; - else - T[j] += m[i][j]; - - System.out.print(T[j] + "\t"); - } - area = findAreaHistogram(T); - maxarea = Math.max(area , maxarea); - System.out.println("Area = " + area); - System.out.println("MaxArea = " + maxarea); - } - - System.out.println("the maximum area of all 1's = " + maxarea); - } - - public static int findAreaHistogram(int a[]) - { - Stack s = new Stack<>(); - int i = 0; - int n = a.length; - int area = 0; - int maxarea = 0; - - while(i < n) - { - if(s.isEmpty() || a[s.peek()] <= a[i]) - s.push(i++); - else - { - int top = s.pop(); - if(s.isEmpty()) - area = a[top] * i; - else - area = a[top] * (i - s.peek() - 1); - - maxarea = Math.max(maxarea , area); - } - } - - while(!s.isEmpty()) - { - int top = s.pop(); - if(s.isEmpty()) - area = a[top] * i; - else - area = a[top] * (i - s.peek() - 1); - - maxarea = Math.max(maxarea , area); - } - - return maxarea; - } -} \ No newline at end of file diff --git a/Java/Dynamic Programing/Largest Sum Rectangle in Matrix/LargestSuminMatrix.java b/Java/Dynamic Programing/Largest Sum Rectangle in Matrix/LargestSuminMatrix.java deleted file mode 100644 index 9703af53e..000000000 --- a/Java/Dynamic Programing/Largest Sum Rectangle in Matrix/LargestSuminMatrix.java +++ /dev/null @@ -1,116 +0,0 @@ -import java.util.*; - -public class LargestSuminMatrix{ - public static void main(String args[]) - { - Scanner s = new Scanner(System.in); - System.out.println("Enter the size of matrix in n x m format:"); - int n = s.nextInt(); - int m = s.nextInt(); - - System.out.println("Enter the elements of matrix :"); - int mat[][] = new int[n][m]; - for(int i = 0 ; i < n ; i++) - { - for(int j = 0 ; j < m ; j++) - { - mat[i][j] = s.nextInt(); - } - } - - //initial variables - int l = 0; - int r = 0; - int currentSum = 0; - int maxSum = 0; - int left= 0; - int right = 0; - int up = 0; - int down = 0; - - int T[] = new int[m]; - - while(r < m) - { - while(l <= r && r < m) - { - for(int i = 0 ; i < n ; i++) - { - T[i] = T[i] + mat[i][r]; - } - int kadane[] = arraySumUsingKadane(T); - - currentSum = kadane[2]; - if(currentSum > maxSum) - { - maxSum = currentSum; - left = l; - right = r; - up = kadane[0]; - down = kadane[1]; - } - r++; - } - l++; - r = l; - Arrays.fill(T , 0); - } - - System.out.println("Current Sum = " + currentSum); - System.out.println("Maximum Sum = " + maxSum); - - System.out.println("The maximum Sub Matrix is ="); - - for(int i = left ; i <= right ; i++) - { - for(int j = up ; j <= down ; j++) - { - System.out.print(mat[i][j] + "\t"); - } - System.out.println(); - } - - } - - public static int[] arraySumUsingKadane(int[] a) - { - int n = a.length; - int currentSum = 0; - int maxstart = -1; - int maxend = -1; - int currentStart = -1; - int maxSum = Integer.MIN_VALUE; - - for(int i = 0 ; i < n ; i++) - { - currentSum += a[i]; - - if(currentSum < 0) - { - currentSum = 0; - currentStart = i+1; - } - - if(currentSum > maxSum) - { - maxstart = currentStart; - maxend = i; - maxSum = currentSum; - } - } - - /* This is to find the sum only, here you need the start and end position as well - for(int i = 0 ; i < n ; i++) - { - currentSum = Math.max(a[i] , currentSum + a[i]); - maxSum = Math.max(maxSum , currentSum); - } - */ - - int arr[] = new int[3]; - arr[0] = maxstart; // this represent the startint point of Array; - arr[1] = maxend; // this represent the ending point of Array; - arr[2] = maxSum; // this represent the maximum Sum of Array; - return arr; - } -} \ No newline at end of file diff --git a/Java/Dynamic Programing/Longest Common Subsequence/.classpath b/Java/Dynamic Programing/Longest Common Subsequence/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Longest Common Subsequence/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Longest Common Subsequence/.project b/Java/Dynamic Programing/Longest Common Subsequence/.project deleted file mode 100644 index 0e31fc47a..000000000 --- a/Java/Dynamic Programing/Longest Common Subsequence/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LongestCommonSubsequence - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Longest Common Subsequence/src/DPlongestSubsequence.java b/Java/Dynamic Programing/Longest Common Subsequence/src/DPlongestSubsequence.java deleted file mode 100644 index c11c5cc87..000000000 --- a/Java/Dynamic Programing/Longest Common Subsequence/src/DPlongestSubsequence.java +++ /dev/null @@ -1,99 +0,0 @@ -import java.util.*; -public class DPlongestSubsequence { - - static ArrayList str = new ArrayList(); - - public DPlongestSubsequence() { - // TODO Auto-generated constructor stub - } - - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the first String : "); - String s1 = s.next(); - char ch1[] = s1.toCharArray(); - - System.out.println("Enter the second String : "); - String s2 = s.next(); - char ch2[] = s2.toCharArray(); - - int DPgrid[][] = new int[ch1.length+1][ch2.length+1]; - - for(int i = 0 ; i <= ch2.length ; i++) - { - DPgrid[0][i] = 0; - } - - for(int i = 0 ; i <= ch1.length ; i++) - { - DPgrid[i][0] = 0; - } - - for(int i = 1 ; i < DPgrid.length ; i++) - { - for(int j = 1; j < DPgrid[0].length ; j++) - { - if(ch1[i-1] == ch2[j-1]) - { - DPgrid[i][j] = 1 + DPgrid[i-1][j-1]; - } - else { - DPgrid[i][j] = DPgrid[i-1][j]; - - if(DPgrid[i][j] < DPgrid[i][j-1]) - { - DPgrid[i][j] = DPgrid[i][j-1]; - } - } - } - } - - - for(int i = 0 ; i <= ch1.length ; i++) - { - System.out.println(); - for(int j = 0 ; j <= ch2.length ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - System.out.println(); - System.out.println("The maximum profit = " + DPgrid[ch1.length][ch2.length]); - - backTrack(DPgrid, ch1 , ch2 , ch1.length , ch2.length , ""); - - for(String i : str) - { - if(i.length() == DPgrid[ch1.length][ch2.length]) - System.out.println(i); - } - } - - - private static void backTrack(int[][] dPgrid, char[] ch1, char[] ch2, int n, int m, String s) { - - // ArrayList> mystr = new ArrayList>(); - - if (dPgrid[n][m] != 0) { - - if ((dPgrid[n][m] == dPgrid[n - 1][m]) && (dPgrid[n][m] == dPgrid[n][m - 1])) { - backTrack(dPgrid, ch1, ch2, n - 1, m, s); - backTrack(dPgrid, ch1, ch2, n, m - 1, s); - } - else if (dPgrid[n][m] == dPgrid[n - 1][m]) { - backTrack(dPgrid, ch1, ch2, n - 1, m, s); - } - else if (dPgrid[n][m] == dPgrid[n][m - 1]) { - backTrack(dPgrid, ch1, ch2, n, m - 1, s); - } - else { - s = ch1[n - 1] + s; - backTrack(dPgrid, ch1, ch2, n - 1, m - 1, s); - } - } - if(!str.contains(s)) - str.add(s); - } -} diff --git a/Java/Dynamic Programing/Longest Common Substring/.classpath b/Java/Dynamic Programing/Longest Common Substring/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Longest Common Substring/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Longest Common Substring/.project b/Java/Dynamic Programing/Longest Common Substring/.project deleted file mode 100644 index 0b7137aac..000000000 --- a/Java/Dynamic Programing/Longest Common Substring/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LongestCommonSubstirng - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Longest Common Substring/src/LongestCommonSubstring.java b/Java/Dynamic Programing/Longest Common Substring/src/LongestCommonSubstring.java deleted file mode 100644 index 58f602131..000000000 --- a/Java/Dynamic Programing/Longest Common Substring/src/LongestCommonSubstring.java +++ /dev/null @@ -1,73 +0,0 @@ - -import java.util.*; -public class LongestCommonSubstring { - - public LongestCommonSubstring() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the first String : "); - String s1 = s.nextLine(); - char A[] = s1.toCharArray(); - - System.out.println("Enter the second String : "); - String s2 = s.nextLine(); - char B[] = s2.toCharArray(); - - int DPgrid [][] = new int[A.length][B.length]; - - if(A[0] == B[0]) - DPgrid[0][0] = 1; - - for(int i = 1 ; i < A.length ; i++) - { - if(A[i] == B[0]) - DPgrid[i][0] = 1; - } - - for(int j = 1 ; j < B.length ; j++) - { - if(A[0] == B[j]) - DPgrid[0][j] = 1; - } - - for(int i = 1 ; i < A.length ; i++) - { - for(int j = 1 ; j < B.length ; j++) - { - if(A[i] == B[j]) - DPgrid[i][j] = DPgrid[i-1][j-1] + 1; - else - DPgrid[i][j] = 0; - } - } - - - int max = 0; - - for(int i = 0 ; i < A.length ; i++) - { - for(int j = 0 ; j < B.length ; j++) - { - if(max < DPgrid[i][j]) - max = DPgrid[i][j]; - } - } - - System.out.print("The length of maximum common substring = " + max); - - for(int i = 0 ; i < A.length ; i++) - { - System.out.println(); - for(int j = 0 ; j < B.length ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - } - -} diff --git a/Java/Dynamic Programing/Longest Common Substring/src/n3,java.txt b/Java/Dynamic Programing/Longest Common Substring/src/n3,java.txt deleted file mode 100644 index de7c91b76..000000000 --- a/Java/Dynamic Programing/Longest Common Substring/src/n3,java.txt +++ /dev/null @@ -1,94 +0,0 @@ -import java.util.Scanner; - -public class n3 { - - static int min; - static int result; - static int X; - int go = 0; - - public static void main(String args[]) throws Exception { - { - Scanner sc = new Scanner(System.in); - // sc = new Scanner(new FileInputStream("input.txt")); - - int T = sc.nextInt(); - for (int tc = 0; tc < T; tc++) { - - - - int N = sc.nextInt(); - min = sc.nextInt(); - - result = Integer.MAX_VALUE; - - int m[][] = new int[N][N]; - for (int i = 0; i < N; i++) { - for (int j = 0; j < 3; j++) { - m[i][j] = sc.nextInt(); - } - } - - n3 game = new n3(); - game.start(m, N); - System.out.println(result); - - } - } - } - - private void start(int[][] m, int N) { - - int x = min; - compute(m, -1, 0, 0, N); - // compute(m, -1, 0, -x, N); - compute(m, -1, 1, 0, N); - compute(m, -1, 2, 0, N); - - } - - private boolean isSafe(int[][] m, int row, int col, int N) { - - if (row >= 0 && col >= 0 && row < N && col < 3) { - return true; - } - - return false; - } - - private void compute(int[][] m, int x, int y, int value, int N) { - // System.out.println(value + " " + x + " " + y); - - if (go == 1) { - return; - } - - if (x == N - 1 && value >= min) { - if (value < result) { - result = value; - } - - if (value == min) { - result = min; - go = 1; - } - return; - } - - if (isSafe(m, x + 1, y - 1, N)) { - compute(m, x + 1, y - 1, value + m[x + 1][y - 1], N); - compute(m, x + 1, y - 1, value - m[x + 1][y - 1], N); - } - - if (isSafe(m, x + 1, y, N)) { - compute(m, x + 1, y, value + m[x + 1][y], N); - compute(m, x + 1, y, value - m[x + 1][y], N); - } - - if (isSafe(m, x + 1, y + 1, N)) { - compute(m, x + 1, y + 1, value + m[x + 1][y + 1], N); - compute(m, x + 1, y + 1, value - m[x + 1][y + 1], N); - } - - } -} \ No newline at end of file diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V-3/.classpath b/Java/Dynamic Programing/Longest Increasing SubSequence V-3/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V-3/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V-3/.project b/Java/Dynamic Programing/Longest Increasing SubSequence V-3/.project deleted file mode 100644 index 4d978dbed..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V-3/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LISubsequenceV3 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V-3/src/LISubsequenceV3.java b/Java/Dynamic Programing/Longest Increasing SubSequence V-3/src/LISubsequenceV3.java deleted file mode 100644 index 749d62c80..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V-3/src/LISubsequenceV3.java +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.*; -public class LISubsequenceV3 { - - public LISubsequenceV3() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of elements you have :"); - int n = s.nextInt(); - - int arr[] = new int[n]; - System.out.println("Enter the numbers for LIS :"); - for(int i = 0; i < n ; i++) - { - arr[i] = s.nextInt(); - } - - ArrayList arrList = new ArrayList(); - - for(int i = 0 ; i < n ; i++) - { - - } - - } - -} diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V1/.classpath b/Java/Dynamic Programing/Longest Increasing SubSequence V1/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V1/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V1/.project b/Java/Dynamic Programing/Longest Increasing SubSequence V1/.project deleted file mode 100644 index d931b12ce..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V1/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LISubsequencev1 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V1/src/LISubsequenceV1.java b/Java/Dynamic Programing/Longest Increasing SubSequence V1/src/LISubsequenceV1.java deleted file mode 100644 index 31b8a8146..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V1/src/LISubsequenceV1.java +++ /dev/null @@ -1,47 +0,0 @@ -import java.util.*; -public class LISubsequenceV1 { - - public LISubsequenceV1() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the length of string : "); - int n = s.nextInt(); - - int num[] = new int[n]; - int numval[] = new int[n]; - - System.out.println("Enter the numbers : "); - for(int i = 0 ; i < n ; i++) - { - num[i] = s.nextInt(); - numval[i] = 1; - } - - // using single array of length n, with 2 variables i and j - - for(int i = 1 ; i < n ; i++) - { - for(int j = 0 ; j < i ; j++) - { - if(num[j] < num[i] && numval[i] < numval[j] + 1) - numval[i] = numval[j] + 1; - } - } - - int max = 0 ; - for(int i = 0 ; i < n ; i++) - { - if(max < numval[i]) - max = numval[i]; - } - - System.out.println("The length of Longest increasing subsequence is : " + max); - - - } - -} diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V2/.classpath b/Java/Dynamic Programing/Longest Increasing SubSequence V2/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V2/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V2/.project b/Java/Dynamic Programing/Longest Increasing SubSequence V2/.project deleted file mode 100644 index 7175b9b95..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V2/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LISubsequenceV2 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Longest Increasing SubSequence V2/src/LISubsequenceV2.java b/Java/Dynamic Programing/Longest Increasing SubSequence V2/src/LISubsequenceV2.java deleted file mode 100644 index cbc9be2dc..000000000 --- a/Java/Dynamic Programing/Longest Increasing SubSequence V2/src/LISubsequenceV2.java +++ /dev/null @@ -1,72 +0,0 @@ -import java.util.*; - -public class LISubsequenceV2 { - - public LISubsequenceV2() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of elements : "); - int n = s.nextInt(); - - int arr[] = new int[n+1]; - int sortarr[] = new int[n+1]; - - System.out.println("Enter the numbers :"); - for(int i = 0 ; i <= n ; i++) - { - if(i == 0) - arr[i] = 0; - else - arr[i] = s.nextInt(); - - sortarr[i] = arr[i]; - } - - - Arrays.sort(sortarr); - - - - int DPgrid[][] = new int[n+1][n+1]; - - for(int i = 0 ; i <= n ; i++) - { - for(int j = 0 ; j <= n ; j++) - { - if(i == 0 && j == 0) - DPgrid[i][j] = 0; - else if(i == 0 && j != 0) - DPgrid[i][j] = 0; - else if(i != 0 && j == 0) - DPgrid[i][j] = 0; - else { - if(arr[i] == sortarr[j]) - DPgrid[i][j] = DPgrid[i-1][j-1] + 1; - else - { - DPgrid[i][j] = DPgrid[i][j-1]; - if(DPgrid[i-1][j] > DPgrid[i][j-1]) - DPgrid[i][j] = DPgrid[i-1][j]; - } - } - } - } - - System.out.println("The length of Longest Common Subsequence is = " + DPgrid[n][n]); - - for(int i = 0 ; i < DPgrid.length ; i++) - { - System.out.println(); - for(int j = 0 ; j < DPgrid[0].length ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - } - -} diff --git a/Java/Dynamic Programing/Longest Palindrome Substring/.classpath b/Java/Dynamic Programing/Longest Palindrome Substring/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Longest Palindrome Substring/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Longest Palindrome Substring/.project b/Java/Dynamic Programing/Longest Palindrome Substring/.project deleted file mode 100644 index e0dbe46f5..000000000 --- a/Java/Dynamic Programing/Longest Palindrome Substring/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LongestPlaindromeSubstring - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Longest Palindrome Substring/src/LongestPalindromeSubstring.java b/Java/Dynamic Programing/Longest Palindrome Substring/src/LongestPalindromeSubstring.java deleted file mode 100644 index 6e39350be..000000000 --- a/Java/Dynamic Programing/Longest Palindrome Substring/src/LongestPalindromeSubstring.java +++ /dev/null @@ -1,78 +0,0 @@ -import java.util.*; - -public class LongestPalindromeSubstring { - - public LongestPalindromeSubstring() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - - Scanner s = new Scanner(System.in); - - System.out.println("Enter the String : "); - String s1 = s.nextLine(); - char A[] = s1.toCharArray(); - - StringBuilder s2 = new StringBuilder(); - s2.append(s1); - s2 = s2.reverse(); - System.out.println("Input String : " + s1); - System.out.println("String after reverse : " + s2); - - char B[] = s2.toString().toCharArray(); - - int DPgrid [][] = new int[A.length][B.length]; - - if(A[0] == B[0]) - DPgrid[0][0] = 1; - - for(int i = 1 ; i < A.length ; i++) - { - if(A[i] == B[0]) - DPgrid[i][0] = 1; - } - - for(int j = 1 ; j < B.length ; j++) - { - if(A[0] == B[j]) - DPgrid[0][j] = 1; - } - - for(int i = 1 ; i < A.length ; i++) - { - for(int j = 1 ; j < B.length ; j++) - { - if(A[i] == B[j]) - DPgrid[i][j] = DPgrid[i-1][j-1] + 1; - else - DPgrid[i][j] = 0; - } - } - - - int max = 0; - - for(int i = 0 ; i < A.length ; i++) - { - for(int j = 0 ; j < B.length ; j++) - { - if(max < DPgrid[i][j]) - max = DPgrid[i][j]; - } - } - - System.out.print("The length of maximum common substring = " + max); - - for(int i = 0 ; i < A.length ; i++) - { - System.out.println(); - for(int j = 0 ; j < B.length ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - } - -} diff --git a/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/.classpath b/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/.project b/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/.project deleted file mode 100644 index 269cb8814..000000000 --- a/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LongestPalindromeSubsequenceV2 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/src/LPSubsequenceV2.java b/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/src/LPSubsequenceV2.java deleted file mode 100644 index 31ab710ea..000000000 --- a/Java/Dynamic Programing/Longest Plaindrome SubSequence V2/src/LPSubsequenceV2.java +++ /dev/null @@ -1,58 +0,0 @@ - -//Solution : Reverse the string and find the longest common subsequence, you will get the Longest Palindrome SubSequence - -import java.util.*; - -public class LPSubsequenceV2 { - - public LPSubsequenceV2() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the String : "); - String s1 = s.nextLine(); - char ch1[] = s1.toCharArray(); - - StringBuilder s2 = new StringBuilder(); - s2.append(s1); - s2 = s2.reverse(); - System.out.println("Input String : " + s1); - System.out.println("String after reverse : " + s2); - - char ch2[] = s2.toString().toCharArray(); - - int DPgrid[][] = new int[ch1.length + 1][ch2.length + 1]; - - for (int i = 0; i < ch1.length; i++) { - DPgrid[0][i] = 0; - } - - for (int i = 0; i < ch2.length; i++) { - DPgrid[i][0] = 0; - } - - for (int i = 1; i < DPgrid.length; i++) { - for (int j = 1; j < DPgrid[0].length; j++) { - if (ch1[j - 1] == ch2[i - 1]) { - DPgrid[i][j] = 1 + DPgrid[i - 1][j - 1]; - } else { - DPgrid[i][j] = DPgrid[i - 1][j]; - - if (DPgrid[i][j] < DPgrid[i][j - 1]) { - DPgrid[i][j] = DPgrid[i][j - 1]; - } - } - } - } - - for (int i = 0; i <= ch1.length; i++) { - System.out.println(); - for (int j = 0; j <= ch2.length; j++) { - System.out.print(DPgrid[i][j] + "\t"); - } - } - } -} diff --git a/Java/Dynamic Programing/Longest Subsequence Palindrome/.classpath b/Java/Dynamic Programing/Longest Subsequence Palindrome/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Longest Subsequence Palindrome/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Longest Subsequence Palindrome/.project b/Java/Dynamic Programing/Longest Subsequence Palindrome/.project deleted file mode 100644 index 49a7c771b..000000000 --- a/Java/Dynamic Programing/Longest Subsequence Palindrome/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Longest Subsequence Palindrome - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Longest Subsequence Palindrome/src/DPpalindrome.java b/Java/Dynamic Programing/Longest Subsequence Palindrome/src/DPpalindrome.java deleted file mode 100644 index ea666157e..000000000 --- a/Java/Dynamic Programing/Longest Subsequence Palindrome/src/DPpalindrome.java +++ /dev/null @@ -1,66 +0,0 @@ -import java.util.*; -public class DPpalindrome { - - public DPpalindrome() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - - Scanner s = new Scanner(System.in); - - System.out.println("Enter the string : "); - String str = s.next(); - - char ch[] = str.toCharArray(); - - int DPgrid[][] = new int[ch.length][ch.length]; - - for(int i = 0 ; i < ch.length ; i++) - { - DPgrid[i][i] = 1; - - if(i != ch.length-1) - { - if(ch[i] == ch[i+1]) - DPgrid[i][i+1] = 2; - else - DPgrid[i][i+1] = 1; - } - } - - - for(int l = 2 ; l < DPgrid.length ; l++) - { - for(int i = 0 ; i < DPgrid[0].length - l ; i++) - { - int j = l+i; - if(ch[i] == ch[j]) - { - DPgrid[i][j] = 2 + DPgrid[i+1][j-1]; - } - else - { - DPgrid[i][j] = DPgrid[i][j-1]; - - if(DPgrid[i][j] < DPgrid[i+1][j]) - DPgrid[i][j] = DPgrid[i+1][j]; - } - } - } - - for(int i = 0 ; i < DPgrid.length ; i++) - { - System.out.println(); - for(int j = 0 ; j < DPgrid.length ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - System.out.println("The maximum profit = " + DPgrid[0][DPgrid.length - 1]); - - } - - -} diff --git a/Java/Dynamic Programing/MatrixChainMultiplication/MatrixChainMult.java b/Java/Dynamic Programing/MatrixChainMultiplication/MatrixChainMult.java deleted file mode 100644 index ddbc32913..000000000 --- a/Java/Dynamic Programing/MatrixChainMultiplication/MatrixChainMult.java +++ /dev/null @@ -1,52 +0,0 @@ -import java.util.*; - -public class MatrixChainMult -{ - public static void main(String args[]) - { - Scanner s = new Scanner(System.in); - System.out.println("Enter the size of array : "); - int n = s.nextInt(); - - int arr[] = new int[n]; - for(int i = 0 ; i < n ; i++) - { - arr[i] = s.nextInt(); - } - - int grid[][] = new int[n][n]; - - for(int i = 0 ; i < n ; i++) - { - grid[i][i] = 0; - } - - int temp = 0; - - //now l here denotes the length of matrix multiplication - for(int l = 2; l < n ; l++) - { - for(int i = 0 ; i < n-l ; i++) - { - int j = i + l; - grid[i][j] = Integer.MAX_VALUE; - for(int k = i+1 ; k < j ; k++) - { - temp = (grid[i][k] + grid[k][j]) + (arr[i] * arr[k] * arr[j]); //here we have to take the minimum value of temp - - if(temp < grid[i][j]) - grid[i][j] = temp; - } - } - } - - for(int i = 0 ; i < n ; i++) - { - for(int j = 0 ; j < n ; j++) - { - System.out.print(grid[i][j] + "\t"); - } - System.out.println(); - } - } -} \ No newline at end of file diff --git a/Java/Dynamic Programing/MatrixChainMultiplication/new 3.txt b/Java/Dynamic Programing/MatrixChainMultiplication/new 3.txt deleted file mode 100644 index e8f35c2be..000000000 --- a/Java/Dynamic Programing/MatrixChainMultiplication/new 3.txt +++ /dev/null @@ -1,49 +0,0 @@ -import java.util.*; - -class Box{ - int length; - int breadth; - int height; - - public Box(int l , int b , int h) - { - length = l; - breadth = b; - height = h; - } -} -public class { - public static void main(String args[]) - { - Scanner s = new Scanner(System.in); - System.out.println("Enter the number of boxes :"); - int n = s.nextInt(); - - Box boxes[] = new Box[n]; - for(int i = 0 ; i < n ;i++){ - System.out.println("Enter l, b, h"); - boxes[i] = new Box(s.nextInt() , s.nextInt() , s.nextInt()); - } - - //now create a new array of boxes which stores all the variations of lxbxh - Box box[] = new Box[3*n]; - int size = box.length; - int j = 0; - - for(int i = 0 ; i < n ; i++) - { - box[j++] = new Box(boxes[i].length , boxes[i].breadth , boxes[i].height); - box[j++] = new Box(boxes[i].length , boxes[i].height , boxes[i].breadth); - box[j++] = new Box(boxes[i].breadth , boxes[i].height , boxes[i].length); - } - - for(int i = 0 ; i < size ; i++){ - if(i % 3 == 0) - System.out.println(); - - System.out.print(box[i] + "\t"); - } - - - } -} \ No newline at end of file diff --git a/Java/Dynamic Programing/MatrixLeftRight/.classpath b/Java/Dynamic Programing/MatrixLeftRight/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/MatrixLeftRight/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/MatrixLeftRight/.project b/Java/Dynamic Programing/MatrixLeftRight/.project deleted file mode 100644 index c7eea5d71..000000000 --- a/Java/Dynamic Programing/MatrixLeftRight/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - MatrixLeftRight - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/MatrixLeftRight/src/MatrisLeftRight.java b/Java/Dynamic Programing/MatrixLeftRight/src/MatrisLeftRight.java deleted file mode 100644 index 69f2032df..000000000 --- a/Java/Dynamic Programing/MatrixLeftRight/src/MatrisLeftRight.java +++ /dev/null @@ -1,79 +0,0 @@ -/*Problem - * Give a matrix with n rows and n columns. In each cell there are a number of apples. - * we start from the upper-left corner of the matrix. We can go down or right one cell. - * Finally, we need to arrive at the bottom right corner. - * Find the maximum number of apples that we can collect. When we pass through a cell, we collect all the apples left there. - * */ - -import java.util.*; - -public class MatrisLeftRight { - - public MatrisLeftRight() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - - Scanner s = new Scanner(System.in); - System.out.println("Enter the size of nxn matrix : "); - int n = s.nextInt(); - - int DPMatrix[][] = new int[n][n]; - System.out.println("Enter the values in matrix in increasing order from left to right and top to bottom : "); - for(int i = 0 ; i < n ; i++) - { - for(int j = 0 ; j < n ; j++) - { - DPMatrix[i][j] = s.nextInt(); - } - } - - - - int DPgrid[][] = new int[n+1][n+1]; - - for(int i = 0 ; i <= n ; i++) - { - for(int j = 0 ; j <= n ; j++) - { - if(i == 0 && j != 0) - DPgrid[i][j] = 0; - else if(i != 0 && j == 0) - DPgrid[i][j] = 0; - else if(i == 0 && j == 0) - DPgrid[i][j] = 0; - else - DPgrid[i][j] = DPMatrix[i-1][j-1]; - } - } - - for(int i = 1 ; i <= n ; i++) - { - for(int j = 1 ; j <= n ; j++) - { - if(DPgrid[i][j-1] > DPgrid[i-1][j]) - DPgrid[i][j] = DPgrid[i][j-1] + DPgrid[i][j]; - else - DPgrid[i][j] = DPgrid[i-1][j] + DPgrid[i][j]; - - } - } - - - for(int i = 0 ; i <= n ; i++) - { - System.out.println(); - for(int j = 0 ; j <= n ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - System.out.println("The maximum apple we can pick up are = " + DPgrid[n][n]); - } -} - -/*Similar Problem can be done if we can select the diagonal element as well.*/ - - diff --git a/Java/Dynamic Programing/Maximum Length Chain of Pairs/.classpath b/Java/Dynamic Programing/Maximum Length Chain of Pairs/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Maximum Length Chain of Pairs/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Maximum Length Chain of Pairs/.project b/Java/Dynamic Programing/Maximum Length Chain of Pairs/.project deleted file mode 100644 index cea964ecd..000000000 --- a/Java/Dynamic Programing/Maximum Length Chain of Pairs/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Maximum Length Chain of Pairs - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Maximum Length Chain of Pairs/src/MaximumLengthChainofPairs.java b/Java/Dynamic Programing/Maximum Length Chain of Pairs/src/MaximumLengthChainofPairs.java deleted file mode 100644 index 56478fc0d..000000000 --- a/Java/Dynamic Programing/Maximum Length Chain of Pairs/src/MaximumLengthChainofPairs.java +++ /dev/null @@ -1,72 +0,0 @@ -import java.util.*; -public class MaximumLengthChainofPairs { - - public MaximumLengthChainofPairs() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - - Scanner s = new Scanner(System.in); - - System.out.println("Enter the numbers of pairs :"); - int n = s.nextInt(); - - int arr[][] = new int[n][2]; - - System.out.println("enter the n number of pairs :"); - - for (int j = 0; j < n; j++) { - for (int i = 0; i < 2; i++) { - arr[j][i] = s.nextInt(); - } - } - - - for (int j = 0; j < n; j++) { - for (int i = 0; i < 2; i++) { - System.out.print(arr[j][i] + "\t"); - } - System.out.println(); - } - - System.out.println("The maximum length of increasing pair = " +findMaxLengthofPair(arr , n)); - - - - } - - private static int findMaxLengthofPair(int[][] arr, int n) { - // TODO Auto-generated method stub - - int Maxval[] = new int[n]; - - for(int i = 0; i < n ; i++) - { - Maxval[i] = 1; - } - - for(int i = 1 ; i < n ; i++) - { - for(int j = 0 ; j < i ; j++) - { - if(arr[j][1] < arr[i][0] && (Maxval[i] < Maxval[j] + 1)) - { - Maxval[i] = Maxval[j] + 1; - } - } - } - - int max = Integer.MIN_VALUE; - for(int i = 0 ; i < n ; i++) - { - if(max < Maxval[i]) - { - max = Maxval[i]; - } - } - return max; - } - -} diff --git a/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/.classpath b/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/.project b/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/.project deleted file mode 100644 index cda065bcd..000000000 --- a/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Maximum1sMatrix - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/src/Maximum1sMatrix.java b/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/src/Maximum1sMatrix.java deleted file mode 100644 index 19a1b01a2..000000000 --- a/Java/Dynamic Programing/Maximum Size Square Matrix with all 1's/src/Maximum1sMatrix.java +++ /dev/null @@ -1,94 +0,0 @@ -/*Problem : Maximum size square sub-matrix with all 1's - * Given a matrix with 0's and 1's, give an algorith for finding the maximum size square sub-matrix with all 1s. - * For Example consider the binary matrix below - * - * 0 1 1 0 1 - * 1 1 0 1 0 - * 0 1 1 1 0 - * 1 1 1 1 0 - * 1 1 1 1 1 - * 0 0 0 0 0 - * - * SubMatrix - * - * 1 1 1 - * 1 1 1 - * 1 1 1 - * - * */ - -import java.util.*; -public class Maximum1sMatrix { - - public Maximum1sMatrix() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - - - Scanner s = new Scanner(System.in); - System.out.println("Enter the size of nxn matrix : "); - int n = s.nextInt(); - - int DPMatrix[][] = new int[n][n]; - System.out.println("Enter the values in matrix in increasing order from left to right and top to bottom : "); - for(int i = 0 ; i < n ; i++) - { - for(int j = 0 ; j < n ; j++) - { - DPMatrix[i][j] = s.nextInt(); - } - } - - int DPgrid[][] = new int[n][n]; - - for(int i = 0 ; i < n ; i++) - { - for(int j = 0 ; j < n ; j++) - { - if(i == 0 && j != 0 ) - DPgrid[i][j] = DPMatrix[i][j]; - else if(i != 0 && j == 0) - DPgrid[i][j] = DPMatrix[i][j]; - else if( i == 0 && j == 0) - DPgrid[i][j] = DPMatrix[i][j]; - else if(DPMatrix[i][j] != 0) - { - DPgrid[i][j] = minValue(DPgrid[i-1][j-1] , DPgrid[i-1][j] , DPgrid[i][j-1]) + 1; - } - else - DPgrid[i][j] = 0; - } - } - - for(int i = 0 ; i < n ; i++) - { - System.out.println(); - for(int j = 0 ; j < n ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - int max = 0; - - for(int i = 0 ; i < n ; i++) - { - for(int j = 0 ; j < n ; j++) - { - if(max < DPgrid[i][j]) - max = DPgrid[i][j]; - } - } - - System.out.println("The size of maximum sub matrix of all 1's : " + max); - - } - - private static int minValue(int a, int b, int c) { - - return (a - - - - - diff --git a/Java/Dynamic Programing/Maximum Sum Increasing Subsequence/.project b/Java/Dynamic Programing/Maximum Sum Increasing Subsequence/.project deleted file mode 100644 index 7033217dc..000000000 --- a/Java/Dynamic Programing/Maximum Sum Increasing Subsequence/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Maximum Sum Increasing Subsequence - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Maximum Sum Increasing Subsequence/src/MaximumSumIncreasingSubsequence.java b/Java/Dynamic Programing/Maximum Sum Increasing Subsequence/src/MaximumSumIncreasingSubsequence.java deleted file mode 100644 index 574ddfbdc..000000000 --- a/Java/Dynamic Programing/Maximum Sum Increasing Subsequence/src/MaximumSumIncreasingSubsequence.java +++ /dev/null @@ -1,49 +0,0 @@ -import java.util.*; -public class MaximumSumIncreasingSubsequence { - - public MaximumSumIncreasingSubsequence() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - Scanner s = new Scanner(System.in); - - System.out.println("Enter the length of string : "); - int n = s.nextInt(); - - int num[] = new int[n]; - int sumval[] = new int[n]; - - System.out.println("Enter the numbers : "); - for(int i = 0 ; i < n ; i++) - { - num[i] = s.nextInt(); - } - - // using single array of length n, with 2 variables i and j - sumval[0] = num[0]; - - for(int i = 1 ; i < n ; i++) - { - sumval[i] = num[i]; - for(int j = 0 ; j < i ; j++) - { - if(num[j] < num[i] && sumval[i] < sumval[j] + sumval[i]) - sumval[i] = sumval[j] + num[i]; - } - } - - int max = 0 ; - for(int i = 0 ; i < n ; i++) - { - System.out.print(sumval[i] + "\t"); - if(max < sumval[i]) - max = sumval[i]; - } - - System.out.println("The length of Longest increasing subsequence is : " + max); - - } - -} diff --git a/Java/Dynamic Programing/Minimum number of jumps to reach end/.classpath b/Java/Dynamic Programing/Minimum number of jumps to reach end/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Minimum number of jumps to reach end/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Minimum number of jumps to reach end/.project b/Java/Dynamic Programing/Minimum number of jumps to reach end/.project deleted file mode 100644 index ee739f554..000000000 --- a/Java/Dynamic Programing/Minimum number of jumps to reach end/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Minimum number of jumps to reach end - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Minimum number of jumps to reach end/src/Solution.java b/Java/Dynamic Programing/Minimum number of jumps to reach end/src/Solution.java deleted file mode 100644 index 37c743309..000000000 --- a/Java/Dynamic Programing/Minimum number of jumps to reach end/src/Solution.java +++ /dev/null @@ -1,61 +0,0 @@ -import java.util.*; -public class Solution { - - public Solution() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - - Scanner s = new Scanner(System.in); - System.out.println("Enter the size of array : "); - int n = s.nextInt(); - - System.out.println("Enter the array elements : "); - int arr[] = new int[n]; - int jumps[] = new int[n]; - int pre[] = new int[n]; - - for(int i = 0 ; i < n ; i++) - { - arr[i] = s.nextInt(); - } - - int numberofjumps = get_jumps(arr , jumps , pre); - System.out.println(); - System.out.println("The min number of jumps = " + numberofjumps); - } - - private static int get_jumps(int[] arr, int[] jumps, int pre[]) { - - jumps[0] = 0; - pre[0] = 0; - if(arr[0] == 0) - { - return -1; - } - - for(int i = 1 ; i < arr.length ; i++) - { - jumps[i] = Integer.MAX_VALUE; - for(int j = 0 ; j <= i ; j++) - { - if(arr[j] >= i-j) - { - jumps[i] = Math.min(jumps[i] , jumps[j] + 1); - pre[i] = j; - break; - } - } - } - - - for(int i = 0 ; i < pre.length; i++) - { - System.out.print(pre[i] + "\t"); - } - return jumps[jumps.length-1]; - } - -} diff --git a/Java/Dynamic Programing/Partision Sum of given array/.classpath b/Java/Dynamic Programing/Partision Sum of given array/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Partision Sum of given array/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Partision Sum of given array/.project b/Java/Dynamic Programing/Partision Sum of given array/.project deleted file mode 100644 index ab5cea3b7..000000000 --- a/Java/Dynamic Programing/Partision Sum of given array/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Partision Sum - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Partision Sum of given array/src/PartisionSum.java b/Java/Dynamic Programing/Partision Sum of given array/src/PartisionSum.java deleted file mode 100644 index 3fb38077f..000000000 --- a/Java/Dynamic Programing/Partision Sum of given array/src/PartisionSum.java +++ /dev/null @@ -1,73 +0,0 @@ -import java.util.Scanner; - -public class PartisionSum { - - public PartisionSum() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - Scanner s = new Scanner(System.in); - - int sum = 0; - System.out.println("Enter the number of item you have : "); - int items = s.nextInt(); - - int maxval = 0; - System.out.println("Enter the items :"); - int item[] = new int[items + 1]; - - for (int i = 0; i <= items; i++) { - if (i == 0) - item[i] = 0; - else - item[i] = s.nextInt(); - - sum = sum + item[i]; - } - - - if ((sum % 2) == 0) { - - sum = sum/2; - boolean DPgrid[][] = new boolean[items + 1][sum + 1]; - - for (int i = 0; i <= sum; i++) { - DPgrid[0][i] = false; - } - - for (int i = 0; i <= items; i++) { - DPgrid[i][0] = true; - } - - for (int i = 1; i <= items; i++) { - for (int j = 1; j <= sum; j++) { - DPgrid[i][j] = (DPgrid[i - 1][j]); - - if (item[i] <= j) { - if (DPgrid[i][j] == false) - DPgrid[i][j] = (DPgrid[i - 1][j - item[i]]); - } - } - } - - for (int i = 0; i <= items; i++) { - System.out.println(); - for (int j = 0; j <= sum; j++) { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - if (DPgrid[items][sum] == true) - System.out.println("The subset sum of given number is possible!"); - else - System.out.println("The subset sum of given number is not possible!"); - } - - else - System.out.println("The subset sum of given number is not possible !"); - - } - -} diff --git a/Java/Dynamic Programing/SubsetSum Problem/.classpath b/Java/Dynamic Programing/SubsetSum Problem/.classpath deleted file mode 100644 index 51a8bbad8..000000000 --- a/Java/Dynamic Programing/SubsetSum Problem/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/SubsetSum Problem/.project b/Java/Dynamic Programing/SubsetSum Problem/.project deleted file mode 100644 index 365205125..000000000 --- a/Java/Dynamic Programing/SubsetSum Problem/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - SubsetSum - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/SubsetSum Problem/.settings/org.eclipse.jdt.core.prefs b/Java/Dynamic Programing/SubsetSum Problem/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a2153707..000000000 --- a/Java/Dynamic Programing/SubsetSum Problem/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Java/Dynamic Programing/SubsetSum Problem/src/SubsetSum.java b/Java/Dynamic Programing/SubsetSum Problem/src/SubsetSum.java deleted file mode 100644 index 3b50ce83a..000000000 --- a/Java/Dynamic Programing/SubsetSum Problem/src/SubsetSum.java +++ /dev/null @@ -1,72 +0,0 @@ -import java.util.*; - -public class SubsetSum { - - public SubsetSum() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the Sum you want : "); - int sum = s.nextInt(); - System.out.println("Enter the number of item you have : "); - int items = s.nextInt(); - - System.out.println("Enter the items :"); - int item[] = new int[items+1]; - - for(int i = 0 ; i <= items ; i++) - { - if(i == 0) - item[i] = 0; - else - item[i] = s.nextInt(); - } - - boolean DPgrid[][] = new boolean[items+1][sum+1]; - - - - for(int i = 0 ; i <= sum ; i++) - { - DPgrid[0][i] = false; - } - - for(int i = 0 ; i <= items ; i++) - { - DPgrid[i][0] = true; - } - - for(int i = 1 ; i <= items ; i++) - { - for(int j = 1 ; j <= sum ; j++) - { - DPgrid[i][j] = (DPgrid[i-1][j]); - - if(item[i] <= j) - { - if(DPgrid[i][j] == false) - DPgrid[i][j] = (DPgrid[i-1][j-item[i]]); - } - } - } - - - for(int i = 0 ; i <= items ; i++) - { - System.out.println(); - for(int j = 0 ; j <= sum ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - if(DPgrid[items][sum] == true) - System.out.println("The subset sum of given number is possible!"); - else - System.out.println("The subset sum of given number is not possible!"); - - } -} diff --git a/Java/Dynamic Programing/Tiling Problem/.classpath b/Java/Dynamic Programing/Tiling Problem/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Tiling Problem/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Tiling Problem/.project b/Java/Dynamic Programing/Tiling Problem/.project deleted file mode 100644 index 2ba623f49..000000000 --- a/Java/Dynamic Programing/Tiling Problem/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Tiling - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Tiling Problem/src/Tiling.java b/Java/Dynamic Programing/Tiling Problem/src/Tiling.java deleted file mode 100644 index 96d9a3ec3..000000000 --- a/Java/Dynamic Programing/Tiling Problem/src/Tiling.java +++ /dev/null @@ -1,35 +0,0 @@ -//--------------------------------------Problem------------------------------------ -/*Tiling : Assume that we use dominoes measuring 2x1 to tile an infinite strip of height 2. -How many ways can one tile a 2xn strip of square cells with 1x2 dominoes ? - -Solution : It's a similar problem like a fibonacci series .*/ - - -import java.util.*; -public class Tiling { - - public Tiling() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - - Scanner s = new Scanner(System.in); - - System.out.println("Enter the size of strip : "); - int n = s.nextInt(); - - int a = 1; - int b = 2; - int sum = 0; - for(int i = 2 ; i < n ; i++) - { - sum = a+b; - a = b; - b = sum; - } - - System.out.println(sum); - } - -} diff --git a/Java/Dynamic Programing/Ugly Number/.classpath b/Java/Dynamic Programing/Ugly Number/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/Ugly Number/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/Ugly Number/.project b/Java/Dynamic Programing/Ugly Number/.project deleted file mode 100644 index 222872d66..000000000 --- a/Java/Dynamic Programing/Ugly Number/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Ugly Numbers - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/Ugly Number/src/UglyNumber.java b/Java/Dynamic Programing/Ugly Number/src/UglyNumber.java deleted file mode 100644 index 8cc71e4c5..000000000 --- a/Java/Dynamic Programing/Ugly Number/src/UglyNumber.java +++ /dev/null @@ -1,48 +0,0 @@ - -public class UglyNumber { - - public UglyNumber() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - - int ugly[] = new int[150]; - - int i2 = 0, i3 = 0, i5 = 0; - - int next_ugly, next_ugly2 , next_ugly3 , next_ugly5; - - ugly[0] = 1; - System.out.println(ugly[0]); - for(int i = 1 ; i < 150 ; i++) - { - next_ugly2 = ugly[i2] * 2; - next_ugly3 = ugly[i3] * 3; - next_ugly5 = ugly[i5] * 5; - - ugly[i] = min(next_ugly2 , next_ugly3 , next_ugly5); - next_ugly = ugly[i]; - - if(next_ugly == next_ugly2) - { - i2 = i2 + 1; - } - if(next_ugly == next_ugly3) - { - i3 = i3 + 1; - } - if(next_ugly == next_ugly5) - { - i5 = i5 + 1; - } - System.out.println(ugly[i]); - } - } - - private static int min(int next_ugly2, int next_ugly3, int next_ugly5) { - return ((next_ugly2 < next_ugly3) ? (next_ugly2 < next_ugly5) ? next_ugly2 : next_ugly5 : (next_ugly3 < next_ugly5) ? next_ugly3 : next_ugly5) ; - } - -} diff --git a/Java/Dynamic Programing/rod cutting/.classpath b/Java/Dynamic Programing/rod cutting/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Dynamic Programing/rod cutting/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Dynamic Programing/rod cutting/.project b/Java/Dynamic Programing/rod cutting/.project deleted file mode 100644 index 9f96cc343..000000000 --- a/Java/Dynamic Programing/rod cutting/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - CuttingRod - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Dynamic Programing/rod cutting/src/CuttingRod.java b/Java/Dynamic Programing/rod cutting/src/CuttingRod.java deleted file mode 100644 index 837f100b9..000000000 --- a/Java/Dynamic Programing/rod cutting/src/CuttingRod.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. - * Determine the maximum value obtainable by cutting up the rod and selling the pieces. - * For example, if length of the rod is 8 and the values of different pieces are given as following, - * then the maximum obtainable value is 22 (by cutting in two pieces of lengths 2 and 6) - - -length | 1 2 3 4 5 6 7 8 --------------------------------------------- -price | 1 5 8 9 10 17 17 20 -And if the prices are as following, then the maximum obtainable value is 24 (by cutting in eight pieces of length 1) - -length | 1 2 3 4 5 6 7 8 --------------------------------------------- -price | 3 5 8 9 10 17 17 20 - - * - * solution - * - * - * */ -import java.util.*; -public class CuttingRod { - - public CuttingRod() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - - Scanner s = new Scanner(System.in); - - System.out.println("Enter the Size of rod "); - int n = s.nextInt(); - - int price[] = new int[n]; - - for(int i = 0 ; i < n ; i++) - { - price[i] = s.nextInt(); - } - - int val[] = new int[n]; - int tempval = 0; - val[0] = price[0]; - for(int i = 1 ; i < n ; i++) - { - val[i] = price[i]; - for(int j = 0 ; j < i ; j++) - { - tempval = val[j] + val[i-j-1]; - - if(tempval > val[i]) - { - val[i] = tempval; - } - } - } - - for(int i = 0 ; i < n ; i++) - { - System.out.print(" " + val[i]); - } - - System.out.println("The maximum price by cutting the rod is = " + val[n-1]); - } -/* - private static int max(int i, int j) { - // TODO Auto-generated method stub - return (i>j ? i : j); - } -*/ -} diff --git a/Java/FaceDetection.java b/Java/FaceDetection.java deleted file mode 100644 index d7065211e..000000000 --- a/Java/FaceDetection.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * - * PROGRAM FOR DETECTING FACES FROM GIVEN IMAGE USING OPENCV - * - * - */ - - -import org.opencv.core.Core; -import java.lang.String; -import org.opencv.core.Mat; -import org.opencv.core.MatOfRect; -import org.opencv.core.Point; -import org.opencv.core.Rect; -import org.opencv.core.Scalar; -import org.opencv.imgcodecs.Imgcodecs; -import org.opencv.imgproc.Imgproc; -import org.opencv.objdetect.CascadeClassifier; - -class FaceDetector -{ - public static void main(String[] args) - { - - // For proper execution of native libraries - // Core.NATIVE_LIBRARY_NAME must be loaded before - // calling any of the opencv methods - System.loadLibrary("opencv"); - - // Face detector creation by loading source cascade xml file - // using CascadeClassifier. - // the file can be downloade from - // https://github.com/opencv/opencv/blob/master/data/haarcascades/ - // haarcascade_frontalface_alt.xml - // and must be placed in same directory of the source java file - CascadeClassifier faceDetector = new CascadeClassifier(); - faceDetector.load("/home/hawkeye/haarcascade_frontalface_alt.xml"); - - // Input image - Mat image = Imgcodecs.imread("/home/hawkeye/1.jpg"); - - // Detecting faces - MatOfRect faceDetections = new MatOfRect(); - faceDetector.detectMultiScale(image, faceDetections); - - // Creating a rectangular box showing faces detected - for (Rect rect : faceDetections.toArray()) - { - Imgproc.rectangle(image, new Point(rect.x, rect.y), - new Point(rect.x + rect.width, rect.y + rect.height), - new Scalar(0, 255, 0)); - } - - // Saving the output image - String filename = "face1.png"; - Imgcodecs.imwrite("/home/hawkeye/Pictures/"+filename, image); - } -} diff --git a/Java/Fib.java b/Java/Fib.java deleted file mode 100644 index a603d85f9..000000000 --- a/Java/Fib.java +++ /dev/null @@ -1,17 +0,0 @@ - -public class Fib { - - public static int fibonacci(int n) { - if(n == 0) - return 0; - else if(n == 1) - return 1; - else - return fibonacci(n - 1) + fibonacci(n - 2); - } - - public static void main(String[] args) { - System.out.println("7th element "+fibonacci(7)); - System.out.println("20th element "+fibonacci(20)); - } -} diff --git a/Java/FibonacciStream.java b/Java/FibonacciStream.java deleted file mode 100644 index ea18c65ea..000000000 --- a/Java/FibonacciStream.java +++ /dev/null @@ -1,22 +0,0 @@ -import java.util.Scanner; -import java.util.stream.Stream; -import java.math.BigInteger; - -/** - * The FibonacciStream class prints out n terms of the fibonacci using java - * stream api. - */ -public class FibonacciStream { - - public static void main(String[] args) { - System.out.print("Enter number of terms: "); - Scanner scan = new Scanner(System.in); - int limit = scan.nextInt(); - - Stream.iterate(new BigInteger[] - { BigInteger.ONE, BigInteger.ONE }, - p -> new BigInteger[] { p[1], p[0].add(p[1]) }) - .limit(limit) - .forEach(p->System.out.println(p[0])); - } -} diff --git a/Java/FibonaciRekursi.java b/Java/FibonaciRekursi.java deleted file mode 100644 index e463df37a..000000000 --- a/Java/FibonaciRekursi.java +++ /dev/null @@ -1,17 +0,0 @@ -package kik; -public class FibonaciRekursi { - public static int fib(int x){ - if (x<=0 || x<=1){ - return x; - } - else{ - return fib(x-2)+fib(x-1); - } - } - public static void main(String[]args){ - int n=10; - for (int i=0;i Numbers = new ArrayList<>(); - // Operators - ArrayList Operators = new ArrayList<>(); - - public GuiSwing() { // Construction - super(); - setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - int frameWidth = 330; - int frameHeight = 400; - setSize(frameWidth, frameHeight); - Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); - int x = (d.width - getSize().width) / 2; - int y = (d.height - getSize().height) / 2; - setLocation(x, y); - setTitle("Calculator"); - setResizable(false); - setFocusable(true); - Container cp = getContentPane(); - cp.setLayout(null); - addKeyListener(new KeyAdapter() { - public void keyPressed(KeyEvent evt) { - if (isInteger(Character.toString(evt.getKeyChar())) == true) { - jNumberButtonClick(Character.toString(evt.getKeyChar())); - } else if (Character.toString(evt.getKeyChar()).equals("+") || - Character.toString(evt.getKeyChar()).equals("-") || - Character.toString(evt.getKeyChar()).equals("*") || - Character.toString(evt.getKeyChar()).equals("/")) { - - operatorButtonClick(Character.toString(evt.getKeyChar())); - } - - - } - - }); - getRootPane().setDefaultButton(Solve); - - output.setBounds(0, 25, 330, 70); - output.setText(" "); - output.setOpaque(true); - output.setBackground(Color.WHITE); - output.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 20)); - cp.add(output); - - lastCalc.setBounds(0, 0, 330, 20); - lastCalc.setText(" "); - lastCalc.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 10)); - cp.add(lastCalc); - - - for (int i = 0;i < NumButtons.length;i++ ) { - int invertedI = NumButtons.length - i-1; - JButton temp = new JButton(); - temp.setBounds(px, py, 75, 50); - temp.setText(Integer.toString(invertedI)); - temp.setBorderPainted(false); - temp.setFocusPainted(false); - temp.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 20)); - temp.setBackground(Color.WHITE); - temp.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent evt) { - jNumberButtonClick(temp.getText()); - } - }); - NumButtons[i] = temp; - cp.add(temp); - px += deltapx; - if (invertedI == 7 || invertedI == 4 || invertedI == 1) { - py += deltapy; - px = 5; - if (invertedI == 1) { - px += deltapx; - } - } - } - - - Solve.setBounds(px, py, 75, 50); - Solve.setText("="); - Solve.setFocusPainted(false); - Solve.setBorderPainted(false); - Solve.setBackground(Color.LIGHT_GRAY); - Solve.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 20)); - Solve.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent evt) { - Solve(); - } - }); - Solve.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - Solve(); - } - }); - cp.add(Solve); - - px += deltapx; - - Plus.setBounds(px, py, 75, 50); - Plus.setText("+"); - Plus.setFocusPainted(false); - Plus.setBorderPainted(false); - Plus.setBackground(Color.LIGHT_GRAY); - Plus.setFont(new Font("Arial", Font.PLAIN, 24)); - Plus.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent evt) { - operatorButtonClick("+"); - } - }); - cp.add(Plus); - - py -= deltapy; - - Minus.setBounds(px, py, 75, 50); - Minus.setText("-"); - Minus.setFocusPainted(false); - Minus.setBorderPainted(false); - Minus.setBackground(Color.LIGHT_GRAY); - Minus.setFont(new Font("Arial", Font.PLAIN, 24)); - Minus.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent evt) { - operatorButtonClick("-"); - } - }); - cp.add(Minus); - - py -= deltapy; - - Times.setBounds(px, py, 75, 50); - Times.setText("x"); - Times.setFocusPainted(false); - Times.setBorderPainted(false); - Times.setBackground(Color.LIGHT_GRAY); - Times.setFont(new Font("Arial", Font.PLAIN, 24)); - Times.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent evt) { - operatorButtonClick("x"); - } - }); - cp.add(Times); - - py -= deltapy; - - Divided.setBounds(px, py, 75, 50); - Divided.setText("�"); - Divided.setFocusPainted(false); - Divided.setBorderPainted(false); - Divided.setBackground(Color.LIGHT_GRAY); - Divided.setFont(new Font("Arial", Font.PLAIN, 24)); - Divided.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent evt) { - operatorButtonClick("�"); - } - }); - cp.add(Divided); - - py -= deltapy; - - Clear.setBounds(px, py, 75, 50); - Clear.setText("C"); - Clear.setFocusPainted(false); - Clear.setBorderPainted(false); - Clear.setBackground(Color.LIGHT_GRAY); - Clear.setFont(new Font("Arial", Font.PLAIN, 20)); - Clear.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent evt) { - openNumber = ""; - Numbers.clear(); - Operators.clear(); - lastCalc.setText(lastCalc.getText() + " = " +output.getText()); - output.setText(" "); - } - }); - cp.add(Clear); - - px -= deltapx; - - Modulo.setBounds(px, py, 75, 50); - Modulo.setText("%"); - Modulo.setFocusPainted(false); - Modulo.setBorderPainted(false); - Modulo.setBackground(Color.LIGHT_GRAY); - Modulo.setFont(new Font("Arial", Font.PLAIN, 16)); - Modulo.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - operatorButtonClick("%"); - } - }); - cp.add(Modulo); - - px -= deltapx; - - badWritter.setBounds(px, py, 75, 50); - badWritter.setText("<"); - badWritter.setFocusPainted(false); - badWritter.setBorderPainted(false); - badWritter.setBackground(Color.LIGHT_GRAY); - badWritter.setFont(new Font("Arial", Font.PLAIN, 16)); - badWritter.addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent evt) { - // Delete last char/num - if (!openNumber.equals("")) { - openNumber.substring(openNumber.length()-1); - String text = output.getText(); // get the Output text - text = text.substring(0, text.length() - 1); - output.setText(text); - - } else if(Operators.size() > 0) { - Operators.remove(Operators.size() - 1); - String text = output.getText(); - text = text.substring(0,text.length() - 3); // space operator space " + " - output.setText(text); - } - } - }); - cp.add(badWritter); - - - setVisible(true); - } - - private String openNumber = ""; - int result = 0; - private void Solve() { - if (Numbers.size() > 0) { - Numbers.add(Integer.parseInt(openNumber)); - - System.out.println(Numbers); - System.out.println(Operators); - - if (Numbers.size() == Operators.size()) { - System.out.println("gea"); - Operators.remove(Operators.size() - 1); - } - - lastCalc.setText(output.getText()); - - - openNumber = ""; // Reset OpenNum - result = Numbers.get(0); - for (int i = 1; i < Numbers.size(); i++) { - int num = Numbers.get(i); - if (i-1 < Operators.size()) { - result = applyOperator(result,num,i-1); - } - } - output.setText(" "+Integer.toString(result)); - Numbers.clear(); - Operators.clear(); - openNumber += Integer.toString(result); - result = 0; - } - } - - private int applyOperator(int numBefore,int num,int i) { - int newNum = numBefore; - switch (Operators.get(i)) { - case "+": - newNum += num; - break; - case "-": - newNum -= num; - break; - case "x": - newNum *= num; - break; - case "�": - newNum /= num; - break; - case "%": - newNum %= num; - break; - } - return newNum; - } - - public static boolean isInteger(String s) { - boolean isValidInteger = false; - try - { - Integer.parseInt(s); - - isValidInteger = true; - } - catch (NumberFormatException ex) - { - } - - return isValidInteger; - } - - public void jNumberButtonClick(String PNewNum) { - if (!(openNumber.equals("") && PNewNum.equals("0"))) { - openNumber += PNewNum; - updateOutput(PNewNum); - } - } - - public void operatorButtonClick(String value) { - if (!openNumber.equals("")) { - Numbers.add(Integer.parseInt(openNumber)); - if (Numbers.size() > 0) { // If a number exist - String valueToAdd = " " + value + " "; - openNumber = ""; // Reset OpenNum - - Operators.add(value); - updateOutput(valueToAdd); - } - } - } - - private void updateOutput(String valueToAdd) { - String oldText = output.getText(); - String newText = oldText + valueToAdd; - output.setText(newText); - } - - -} diff --git a/Java/GenericMergeSort b/Java/GenericMergeSort deleted file mode 100644 index 58228341d..000000000 --- a/Java/GenericMergeSort +++ /dev/null @@ -1,104 +0,0 @@ -import java.util.Arrays; // Only used for test -import java.util.Comparator; - -public class MergeSort { - - public static > void sort(T[] arr) { - sort(arr, Comparator.naturalOrder()); - } - - public static void sort(T[] arr, Comparator comparator) { - sortRange(arr, 0, arr.length, comparator); - } - - private static void sortRange(T[] arr, int from, int to, Comparator comparator) { - if (to - from > 1) { - int middle = (from + to) / 2; - sortRange(arr, from, middle, comparator); - sortRange(arr, middle, to, comparator); - mergeRange(arr, from, middle, to, comparator); - } - } - - private static void mergeRange(T[] arr, int from, int middle, int to, Comparator comparator) { - int leftSize = middle - from; - int rightSize = to - middle; - - Object[] left = new Object[leftSize]; - Object[] right = new Object[rightSize]; - - for (int i = 0; i < leftSize; i++) { - left[i] = arr[i + from]; - } - - for (int i = 0; i < rightSize; i++) { - right[i] = arr[i + middle]; - } - - int leftTaken = 0; - int rightTaken = 0; - - for (int k = from; k < to; k++) { - // All in the left array is taken - append the right - if (leftTaken == leftSize) { - for (int i = 0; i < rightSize - rightTaken; i++) { - arr[k + i] = (T) right[rightTaken + i]; - } - return; - } - - // All in the right array is taken - append the left - if (rightTaken == rightSize) { - for (int i = 0; i < leftSize - leftTaken; i++) { - arr[k + i] = (T) left[leftTaken + i]; - } - return; - } - - // Find the smallest element, and add it - if (comparator.compare((T) left[leftTaken], (T) right[rightTaken]) <= 0) { - arr[k] = (T) left[leftTaken]; - leftTaken++; - } else { - arr[k] = (T) right[rightTaken]; - rightTaken++; - } - } - } - - - public static void main(String[] args) { - // Testing sort giving class Integer that has a compareTo method - Integer[] test = new Integer[]{5, 2, 24, 8, 1, 36, 42, 80, 20, 56}; - sort(test); - System.out.println(Arrays.deepToString(test)); - - System.out.println(); - - // Testing sort giving class Dog that does not have a compareTo method - // Also testing if the sort is stable - Dog[] test2 = new Dog[]{ - new Dog("Carl", 3), - new Dog("Wuffer", 4), - new Dog("Carl", 4), - new Dog("Irena", 2) - }; - sort(test2, (dog1, dog2) -> (dog1.name.compareTo(dog2.name))); - System.out.println(Arrays.deepToString(test2)); - } - - private static class Dog { - String name; - int age; - - Dog(String name, int age) { - this.name = name; - this.age = age; - } - - public String toString() { - return name + " " + age; - } - } - -} diff --git a/Java/GenericQuickSort b/Java/GenericQuickSort deleted file mode 100644 index c27f45c8c..000000000 --- a/Java/GenericQuickSort +++ /dev/null @@ -1,77 +0,0 @@ -import java.util.Arrays; // Only used for testing -import java.util.Comparator; -import java.util.Random; - -public class QuickSort { - - public static > void sort(T[] arr) { - sort(arr, Comparator.naturalOrder()); - } - - public static void sort(T[] arr, Comparator comparator) { - sortRange(arr, 0, arr.length, comparator); - } - - private static void sortRange(T[] arr, int from, int to, Comparator comparator) { - if (to - from > 1) { - int randomPivot = new Random().nextInt(to - from) + from; - swap(arr, randomPivot, to - 1); - - T pivot = arr[to - 1]; - int middle = from; - - for (int i = from; i < to - 1; i++) { - if (comparator.compare(arr[i], pivot) < 0) { - swap(arr, middle, i); - middle++; - } - } - - swap(arr, middle, to - 1); - - sortRange(arr, from, middle, comparator); - sortRange(arr, middle + 1, to, comparator); - } - } - - private static void swap(T[] arr, int i, int j) { - T temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - } - - - public static void main(String[] args) { - // Testing sort giving class Integer that has a compareTo method - Integer[] test = new Integer[]{5, 2, 24, 8, 1, 36, 42, 80, 20, 56}; - sort(test); - System.out.println(Arrays.deepToString(test)); - - System.out.println(); - - // Testing sort giving class Dog that does not have a compareTo method - Dog[] test2 = new Dog[]{ - new Dog("Carl", 3), - new Dog("Wuffer", 4), - new Dog("Carl", 4), - new Dog("Irena", 2) - }; - sort(test2, (dog1, dog2) -> (dog1.name.compareTo(dog2.name))); - System.out.println(Arrays.deepToString(test2)); - } - - private static class Dog { - String name; - int age; - - Dog(String name, int age) { - this.name = name; - this.age = age; - } - - public String toString() { - return name + " " + age; - } - } - -} diff --git a/Java/GithubHandle.java b/Java/GithubHandle.java deleted file mode 100644 index c343d3467..000000000 --- a/Java/GithubHandle.java +++ /dev/null @@ -1,6 +0,0 @@ -class GithubHandle -{ - public static void main(String[] args){ - System.out.println("Github User: RitvijSrivastava!"); - } -} diff --git a/Java/Greedy Problems/Fractional Knapsack/.classpath b/Java/Greedy Problems/Fractional Knapsack/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Greedy Problems/Fractional Knapsack/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Greedy Problems/Fractional Knapsack/.project b/Java/Greedy Problems/Fractional Knapsack/.project deleted file mode 100644 index 4a855110b..000000000 --- a/Java/Greedy Problems/Fractional Knapsack/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - FractionalKnapsack - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Greedy Problems/Fractional Knapsack/src/FractionalKnapsack.java b/Java/Greedy Problems/Fractional Knapsack/src/FractionalKnapsack.java deleted file mode 100644 index b7bfac9c4..000000000 --- a/Java/Greedy Problems/Fractional Knapsack/src/FractionalKnapsack.java +++ /dev/null @@ -1,95 +0,0 @@ -import java.util.Arrays; -import java.util.Scanner; - -class Item{ - - float weight; - float profit; - float pwratio; - - public Item(float w , float p , float pw) { - weight = w; - profit = p; - pwratio = pw; - } -} -public class FractionalKnapsack { - - public FractionalKnapsack() { - // TODO Auto-generated constructor stub - } - - public static Item arr_items[]; - public static void main(String[] args) { - - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of item's you have : "); - int items = s.nextInt(); - - arr_items = new Item[items]; - - System.out.println("Enter the Weight of Knapsack : "); - float W = s.nextFloat(); - int p = 0 , w = 0 , count = 0; - for(int i = 0 ; i < items ; i++) - { - System.out.println("Enter Profit : "); - p = s.nextInt(); - System.out.println("Enter Weight : "); - w = s.nextInt(); - - Item item = new Item(w , p , (float)p/w); - arr_items[count] = item; - count++; - item = null; - } - - getMaxProfit(arr_items , W, count); - } - - public static void getMaxProfit(Item[] arr_items , float Weight , int size) - { - float W = Weight; - Item temp; - int weightcount = 0; - - for(int i = 0 ; i < arr_items.length ; i++) - { - for(int j = i+1 ; j < arr_items.length ; j++) - { - if(arr_items[i].pwratio < arr_items[j].pwratio) - { - temp = arr_items[i]; - arr_items[i] = arr_items[j]; - arr_items[j] = temp; - } - } - } - - - float profit = 0; - for(int i = 0 ; i < arr_items.length ; i++) - { - if(W > arr_items[i].weight) { - profit = profit + arr_items[i].profit; - W = W - arr_items[i].weight; - weightcount++; - } - else - { - //W = arr_items[i].weight - W; - profit = profit + (arr_items[i].pwratio * W); - W = 0; - weightcount++; - } - - if(W == 0) - break; - } - - System.out.println("The Maximum Profit = " + profit); - System.out.println("The number of item's user = " + weightcount++); - } - -} diff --git a/Java/Greedy Problems/HuffmanEncoding/.classpath b/Java/Greedy Problems/HuffmanEncoding/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Greedy Problems/HuffmanEncoding/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Greedy Problems/HuffmanEncoding/.project b/Java/Greedy Problems/HuffmanEncoding/.project deleted file mode 100644 index 1ebf845de..000000000 --- a/Java/Greedy Problems/HuffmanEncoding/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Huffman - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Greedy Problems/HuffmanEncoding/bin/.classpath b/Java/Greedy Problems/HuffmanEncoding/bin/.classpath deleted file mode 100644 index 3f3893aff..000000000 --- a/Java/Greedy Problems/HuffmanEncoding/bin/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Greedy Problems/HuffmanEncoding/bin/.project b/Java/Greedy Problems/HuffmanEncoding/bin/.project deleted file mode 100644 index c863344d3..000000000 --- a/Java/Greedy Problems/HuffmanEncoding/bin/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - HuffmanEncoding_src - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Greedy Problems/HuffmanEncoding/src/.classpath b/Java/Greedy Problems/HuffmanEncoding/src/.classpath deleted file mode 100644 index 3f3893aff..000000000 --- a/Java/Greedy Problems/HuffmanEncoding/src/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Greedy Problems/HuffmanEncoding/src/.project b/Java/Greedy Problems/HuffmanEncoding/src/.project deleted file mode 100644 index c863344d3..000000000 --- a/Java/Greedy Problems/HuffmanEncoding/src/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - HuffmanEncoding_src - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Greedy Problems/HuffmanEncoding/src/Huffman.java b/Java/Greedy Problems/HuffmanEncoding/src/Huffman.java deleted file mode 100644 index a04583a6e..000000000 --- a/Java/Greedy Problems/HuffmanEncoding/src/Huffman.java +++ /dev/null @@ -1,290 +0,0 @@ -import java.util.Scanner; - -class Node{ - - Node left; - Node right; - int data; - - - public Node(int data) { - this.data = data; - } -} - -public class Huffman { - - public static Node Heap[]; - public static int frequency[]; - public static String code[]; - public static Node root = null; - - public static void main(String args[]) - { - Scanner s = new Scanner(System.in); - int option = 0 ; - int count = 0; - - do{ - System.out.println("Press 1 to insert !"); - System.out.println("Press 2 to Delete !"); - System.out.println("Press 3 to Sort the data !"); - System.out.println("Press 4 to print Heap !"); - System.out.println("Press 5 to print the Huffman Tree in PreOrder :"); - System.out.println("Press 6 to print the Codes :");; - System.out.println("Press 0 to Exit !"); - - option = s.nextInt(); - - switch(option) - { - case 1 : System.out.println("Enter the key to insert in heap : "); - int key = s.nextInt(); - count++; - createFrequency(key , count , frequency); - Node Keynode = new Node(key); - insert(Keynode , count , Heap); - break; - - case 2 : count--; - Node min = deleteMinKey(Heap , count); - System.out.println("After min deletion the Heap become : "); - showHeap(Heap); - break; - - case 3 : break; - - case 4 : System.out.println("The Heap entries are : "); - showHeap(Heap); - break; - - case 5 : System.out.println("The PreOrder traversal of Huffman Tree :"); - createHuffmanTree(); - break; - - case 6 : System.out.println("The Codes for given frequencies are : "); - createCode("" , root , code); - showCodes(); - break; - - case 0 : break; - } - }while(option != 0); - } - - private static void createCode(String s, Node root, String[] nodecode) { - - if(isLeaf(root)) { - nodecode[searchposition(frequency , root.data)] = s; - } - else if(!isLeaf(root)) - { - createCode(s + '0' , root.left , nodecode); - createCode(s + '1' , root.right , nodecode); - } - } - - public static int searchposition(int []frequency , int key) - { - for(int i = 0 ; i < frequency.length ; i++) - { - if(key == frequency[i]) - { - return i; - } - } - return -1; - } - - public static boolean isLeaf(Node node) - { - if(node.left == null && node.right == null) - return true; - else - return false; - } - - private static void createHuffmanTree() { - - while(Heap.length > 0) - { - int count = Heap.length; - - Node lchild = deleteMinKey(Heap , --count); - Node rchild = deleteMinKey(Heap , --count); - - - Node parent = new Node(0); - parent.data = lchild.data + rchild.data; - - if(lchild.data < rchild.data) - { - parent.left = lchild; - parent.right = rchild; - } - else - { - parent.left = rchild; - parent.right = lchild; - } - insert( parent , count+1, Heap); - - root = parent; - - if(Heap.length == 1) - break; - } - - showPreOrder(root); - } - - private static void showPreOrder(Node root) { - - if(root != null) { - System.out.print(root.data + " "); - showPreOrder(root.left); - showPreOrder(root.right); - } - - } - - public static void showCodes() - { - System.out.println("frequency \t code"); - for(int i = 0 ; i < frequency.length ; i++) - { - System.out.println(frequency[i] + " \t \t" + code[i]); - } - } - - public static void createFrequency(int key , int count, int[] f) { - frequency = new int[count]; - code = new String[count]; - - for(int i = 0; i < count-1 ; i++ ) - { - frequency[i] = f[i]; - } - frequency[count-1] = key; - } - - private static void insert(Node node, int count, Node[] tempheap) { - // TODO Auto-generated method stub - - Heap = new Node[count]; - - for(int i = 0; i < count-1 ; i++ ) - { - Heap[i] = tempheap[i]; - } - - Heap[count-1] = node; - - buildHeap(Heap); - } - - public static void buildHeap(Node[] build_heap) - { - - int child = build_heap.length - 1; - int parent = (child - 1)/2; - Node temp = null; - - while(parent >= 0) - { - if(build_heap[parent].data > build_heap[child].data) - { - temp = build_heap[parent]; - build_heap[parent]= build_heap[child]; - build_heap[child] = temp; - } - - if(parent != 0) - { - child = parent; - parent = (child - 1)/2; - } - else { - parent = -1; - } - temp = null; - } - } - - public static Node deleteMinKey(Node[] heap , int count) - { - - Node min = heap[0]; - - Node temp = heap[0]; - heap[0] = heap[heap.length - 1]; - heap[heap.length - 1] = temp; - - Heap = new Node[count]; - - for(int i = 0; i < Heap.length ; i++) - { - Heap[i] = heap[i]; - } - - heapify(Heap); - - return min; - } - - public static void heapify(Node[] heap) - { - int parent = 0; - int lchild = (2*parent) + 1; - int rchild = (2*parent) + 2; - int len = heap.length - 1; - - while((parent <= len) || (parent <= len-1)) - { - if(lchild >= len) { - if(len == 1) - { - if(heap[lchild].data < heap[parent].data) { - Node temp = heap[lchild]; - heap[lchild] = heap[parent]; - heap[parent] = temp; - - break; - } - else - break; - } - else - break; - } - - else { - int small_child = (heap[lchild].data > heap[rchild].data) ? rchild : lchild; - - if(heap[small_child].data < heap[parent].data) - { - Node temp = heap[small_child]; - heap[small_child] = heap[parent]; - heap[parent] = temp; - - parent = small_child; - lchild = (2*parent) + 1; - rchild = (2*parent) + 2; - - } - else - break; - } - - } - } - - public static void showHeap(Node[] heap) { - - for(int i = 0; i < heap.length ; i++) - { - System.out.println(heap[i].data); - } - } - -} diff --git a/Java/Greedy Problems/Job Scheduling for multiple machines/.classpath b/Java/Greedy Problems/Job Scheduling for multiple machines/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Greedy Problems/Job Scheduling for multiple machines/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Greedy Problems/Job Scheduling for multiple machines/.project b/Java/Greedy Problems/Job Scheduling for multiple machines/.project deleted file mode 100644 index 35aee27aa..000000000 --- a/Java/Greedy Problems/Job Scheduling for multiple machines/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - JobScheduling_Machines - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Greedy Problems/Job Scheduling for multiple machines/src/JobScheduling.java b/Java/Greedy Problems/Job Scheduling for multiple machines/src/JobScheduling.java deleted file mode 100644 index 74d25698b..000000000 --- a/Java/Greedy Problems/Job Scheduling for multiple machines/src/JobScheduling.java +++ /dev/null @@ -1,166 +0,0 @@ -import java.util.*; - -public class JobScheduling { - - public static int EndHeap[]; - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of jobs you have : "); - int jobs = s.nextInt(); - - - //using 2D array such that row 0 - indicates Start time of jobs and row 1 - indicates End time of jobs - int startendTime[][] = new int[2][jobs]; - - for(int i = 0 ; i < jobs ; i++) - { - System.out.println("Enter Start time : "); - startendTime[0][i] = s.nextInt(); - System.out.println("Enter End time : "); - startendTime[1][i] = s.nextInt(); - } - - int tempstart = 0 , tempend = 0; - - //Sort according to start time in ascending order - for(int i = 0 ; i < startendTime[0].length ; i++) - { - for(int j = i+1 ; j < startendTime[0].length ; j++) - { - if(startendTime[0][i] > startendTime[0][j]) - { - tempstart = startendTime[1][i]; - tempend = startendTime[0][i]; - startendTime[1][i] = startendTime[1][j]; - startendTime[0][i] = startendTime[0][j]; - startendTime[1][j] = tempstart; - startendTime[0][j] = tempend; - } - } - } - - - //find the time for last process - /* - int findlast = 0; - - for(int i = 0 ; i < startendTime[1].length ; i++) - { - if(findlast < startendTime[1][i]) - findlast = startendTime[1][i]; - } - - // - - int DPgrid[][] = new int[jobs][findlast+1]; - int count = 0, depth = 0 ; - for(int i = 0 ; i < jobs ; i++) - { - for(int j = 0 ; j <= findlast ; j++) - { - if(startendTime[0][i] < j && startendTime[1][i] >= j) - { - DPgrid[i][j] = 1; - } - else - DPgrid[i][j] = 0; - } - } - - - for(int i = 0 ; i < jobs ; i++) - { - System.out.println(); - for(int j = 0 ; j <= findlast ; j++) - { - System.out.print(DPgrid[i][j] + "\t"); - } - } - - for(int j = 0 ; j <= findlast ; j++) - { - for(int i = 0 ; i < jobs ; i++) - { - if(DPgrid[i][j] == 1) - count++; - } - if(depth < count) - depth = count; - - count = 0; - } - */ - - for(int i = 0 ; i < startendTime[0].length ; i++) - { - if(EndHeap == null) - insert(startendTime[0][i] , startendTime[1][i] , 0 , EndHeap); - else - insert(startendTime[0][i] , startendTime[1][i] , EndHeap.length , EndHeap); - } - - System.out.println("The number of machines required = " + EndHeap.length); - } - - - private static void insert(int start, int end, int countnode, int[] tempheap) { - // TODO Auto-generated method stub - int i = 0; - if(countnode == 0) - countnode++; - else { - for(i = 0 ; i < EndHeap.length ; i++) - { - if(tempheap[i] <= start) { - tempheap[i] = end; - break; - } - } - - if(i == EndHeap.length) - countnode++; - } - EndHeap = new int[countnode]; - - for(int j = 0; j < countnode-1 ; j++ ) - { - EndHeap[j] = tempheap[j]; - } - - EndHeap[countnode-1] = end; - - buildHeap(EndHeap); - } - - public static void buildHeap(int[] build_heap) - { - - int child = build_heap.length - 1; - int parent = (child - 1)/2; - int temp = 0; - - while(parent >= 0) - { - if(build_heap[parent] > build_heap[child]) - { - temp = build_heap[parent]; - build_heap[parent]= build_heap[child]; - build_heap[child] = temp; - } - - if(parent != 0) - { - child = parent; - parent = (child - 1)/2; - } - else { - parent = -1; - } - temp = 0; - } - } -} - - diff --git a/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.classpath b/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.classpath deleted file mode 100644 index 51a8bbad8..000000000 --- a/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.project b/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.project deleted file mode 100644 index 3821974f9..000000000 --- a/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - JobScheduler - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.settings/org.eclipse.jdt.core.prefs b/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a2153707..000000000 --- a/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/src/JobScheduler.java b/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/src/JobScheduler.java deleted file mode 100644 index 12e5aa4b5..000000000 --- a/Java/Greedy Problems/Job Scheduling on single machine/JobScheduler/src/JobScheduler.java +++ /dev/null @@ -1,80 +0,0 @@ -import java.util.*; - -public class JobScheduler { - - public JobScheduler() { - // TODO Auto-generated constructor stub - } - - public static void main(String[] args) { - Scanner s = new Scanner(System.in); - - System.out.println("Enter the number of jobs you have : "); - int jobs = s.nextInt(); - - int startendTime[][] = new int[2][jobs]; - - for(int i = 0 ; i < jobs ; i++) - { - System.out.println("Enter Start time : "); - startendTime[0][i] = s.nextInt(); - System.out.println("Enter End time : "); - startendTime[1][i] = s.nextInt(); - } - - int tempstart = 0 , tempend = 0; - for(int i = 0 ; i < startendTime[1].length ; i++) - { - for(int j = i+1 ; j < startendTime[1].length ; j++) - { - if(startendTime[1][i] > startendTime[1][j]) - { - tempstart = startendTime[1][i]; - tempend = startendTime[0][i]; - startendTime[1][i] = startendTime[1][j]; - startendTime[0][i] = startendTime[0][j]; - startendTime[1][j] = tempstart; - startendTime[0][j] = tempend; - } - } - } - - int firstStart = startendTime[0][0]; - int firstEnd = startendTime[1][0]; - - for(int j = 1 ; j < jobs ; j++) - { - if(startendTime[1][j] != 0) - { - if((firstEnd > startendTime[0][j]) && (startendTime[1][j] > firstStart)) - { - startendTime[1][j] = 0; - startendTime[0][j] = 0; - } - else { - firstStart = startendTime[0][j]; - firstEnd = startendTime[1][j]; - } - /*if((startendTime[0][i] < startendTime[1][j]) && (startendTime[1][i] > startendTime[0][j])) - { - startendTime[1][j] = 0; - startendTime[0][j] = 0; - }*/ - } - } - - - int count = 0; - for(int i = 0 ; i < jobs ; i++) - { - if(startendTime[1][i] != 0 && startendTime[0][i] != 0) - { - count++; - System.out.println("The start time = " + startendTime[0][i]); - System.out.println("The end time = " + startendTime[1][i]); - } - } - - System.out.println("The number of jobs are : " + count); - } -} diff --git a/Java/Greedy Problems/Older Huffman Code/.classpath b/Java/Greedy Problems/Older Huffman Code/.classpath deleted file mode 100644 index fb5011632..000000000 --- a/Java/Greedy Problems/Older Huffman Code/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Greedy Problems/Older Huffman Code/.project b/Java/Greedy Problems/Older Huffman Code/.project deleted file mode 100644 index 138f6d430..000000000 --- a/Java/Greedy Problems/Older Huffman Code/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - HuffManCoding - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Greedy Problems/Older Huffman Code/src/.classpath b/Java/Greedy Problems/Older Huffman Code/src/.classpath deleted file mode 100644 index 3f3893aff..000000000 --- a/Java/Greedy Problems/Older Huffman Code/src/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Java/Greedy Problems/Older Huffman Code/src/.project b/Java/Greedy Problems/Older Huffman Code/src/.project deleted file mode 100644 index 0f6f6a765..000000000 --- a/Java/Greedy Problems/Older Huffman Code/src/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - src - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Java/Greedy Problems/Older Huffman Code/src/HuffManEncoding.java b/Java/Greedy Problems/Older Huffman Code/src/HuffManEncoding.java deleted file mode 100644 index 8247f6b6d..000000000 --- a/Java/Greedy Problems/Older Huffman Code/src/HuffManEncoding.java +++ /dev/null @@ -1,290 +0,0 @@ -import java.util.Scanner; - -class Node{ - - Node left; - Node right; - int data; - - - public Node(int data) { - this.data = data; - } -} - -public class HuffManEncoding { - - public static Node Heap[]; - public static int frequency[]; - public static String code[]; - public static Node root = null; - - public static void main(String args[]) - { - Scanner s = new Scanner(System.in); - int option = 0 ; - int count = 0; - - do{ - System.out.println("Press 1 to insert !"); - System.out.println("Press 2 to Delete !"); - System.out.println("Press 3 to Sort the data !"); - System.out.println("Press 4 to print Heap !"); - System.out.println("Press 5 to print the Huffman Tree in PreOrder :"); - System.out.println("Press 6 to print the Codes :");; - System.out.println("Press 0 to Exit !"); - - option = s.nextInt(); - - switch(option) - { - case 1 : System.out.println("Enter the key to insert in heap : "); - int key = s.nextInt(); - count++; - createFrequency(key , count , frequency); - Node Keynode = new Node(key); - insert(Keynode , count , Heap); - break; - - case 2 : count--; - Node min = deleteMinKey(Heap , count); - System.out.println("After min deletion the Heap become : "); - showHeap(Heap); - break; - - case 3 : break; - - case 4 : System.out.println("The Heap entries are : "); - showHeap(Heap); - break; - - case 5 : System.out.println("The PreOrder traversal of Huffman Tree :"); - createHuffmanTree(); - break; - - case 6 : System.out.println("The Codes for given frequencies are : "); - createCode("" , root , code); - showCodes(); - break; - - case 0 : break; - } - }while(option != 0); - } - - private static void createCode(String s, Node root, String[] nodecode) { - - if(isLeaf(root)) { - nodecode[searchposition(frequency , root.data)] = s; - } - else if(!isLeaf(root)) - { - createCode(s + '0' , root.left , nodecode); - createCode(s + '1' , root.right , nodecode); - } - } - - public static int searchposition(int []frequency , int key) - { - for(int i = 0 ; i < frequency.length ; i++) - { - if(key == frequency[i]) - { - return i; - } - } - return -1; - } - - public static boolean isLeaf(Node node) - { - if(node.left == null && node.right == null) - return true; - else - return false; - } - - private static void createHuffmanTree() { - - while(Heap.length > 0) - { - int count = Heap.length; - - Node lchild = deleteMinKey(Heap , --count); - Node rchild = deleteMinKey(Heap , --count); - - - Node parent = new Node(0); - parent.data = lchild.data + rchild.data; - - if(lchild.data < rchild.data) - { - parent.left = lchild; - parent.right = rchild; - } - else - { - parent.left = rchild; - parent.right = lchild; - } - insert( parent , count+1, Heap); - - root = parent; - - if(Heap.length == 1) - break; - } - - showPreOrder(root); - } - - private static void showPreOrder(Node root) { - - if(root != null) { - System.out.print(root.data + " "); - showPreOrder(root.left); - showPreOrder(root.right); - } - - } - - public static void showCodes() - { - System.out.println("frequency \t code"); - for(int i = 0 ; i < frequency.length ; i++) - { - System.out.println(frequency[i] + " \t " + code[i]); - } - } - - public static void createFrequency(int key , int count, int[] f) { - frequency = new int[count]; - code = new String[count]; - - for(int i = 0; i < count-1 ; i++ ) - { - frequency[i] = f[i]; - } - frequency[count-1] = key; - } - - private static void insert(Node node, int count, Node[] tempheap) { - // TODO Auto-generated method stub - - Heap = new Node[count]; - - for(int i = 0; i < count-1 ; i++ ) - { - Heap[i] = tempheap[i]; - } - - Heap[count-1] = node; - - buildHeap(Heap); - } - - public static void buildHeap(Node[] build_heap) - { - - int child = build_heap.length - 1; - int parent = (child - 1)/2; - Node temp = null; - - while(parent >= 0) - { - if(build_heap[parent].data > build_heap[child].data) - { - temp = build_heap[parent]; - build_heap[parent]= build_heap[child]; - build_heap[child] = temp; - } - - if(parent != 0) - { - child = parent; - parent = (child - 1)/2; - } - else { - parent = -1; - } - temp = null; - } - } - - public static Node deleteMinKey(Node[] heap , int count) - { - - Node min = heap[0]; - - Node temp = heap[0]; - heap[0] = heap[heap.length - 1]; - heap[heap.length - 1] = temp; - - Heap = new Node[count]; - - for(int i = 0; i < Heap.length ; i++) - { - Heap[i] = heap[i]; - } - - heapify(Heap); - - return min; - } - - public static void heapify(Node[] heap) - { - int parent = 0; - int lchild = (2*parent) + 1; - int rchild = (2*parent) + 2; - int len = heap.length - 1; - - while((parent <= len) || (parent <= len-1)) - { - if(lchild >= len) { - if(len == 1) - { - if(heap[lchild].data < heap[parent].data) { - Node temp = heap[lchild]; - heap[lchild] = heap[parent]; - heap[parent] = temp; - - break; - } - else - break; - } - else - break; - } - - else { - int small_child = (heap[lchild].data > heap[rchild].data) ? rchild : lchild; - - if(heap[small_child].data < heap[parent].data) - { - Node temp = heap[small_child]; - heap[small_child] = heap[parent]; - heap[parent] = temp; - - parent = small_child; - lchild = (2*parent) + 1; - rchild = (2*parent) + 2; - - } - else - break; - } - - } - } - - public static void showHeap(Node[] heap) { - - for(int i = 0; i < heap.length ; i++) - { - System.out.println(heap[i].data); - } - } - -} diff --git a/Java/GreetingsPlanet.java b/Java/GreetingsPlanet.java deleted file mode 100644 index 7096edf5b..000000000 --- a/Java/GreetingsPlanet.java +++ /dev/null @@ -1,15 +0,0 @@ -import javax.swing.JOptionPane; -public class GreetingsPlanet() { - public static void main(String[] args) { - - JOptionPane.showMessageDialog(null , "Greetings, the earth is flat"); - int question = Integer.parseInt(JOptionPane.showInputDialog("splace one if you you agree with the statement"+ - "\n place two if not")); - if(question == 1){ - JOptionPane.showMessageDialog(null , "you know the true. lol :)"); - } - else{ - JOptionPane.showMessageDialog(null , "you life is a lie. xd"); - } - } -} diff --git a/Java/GridFrame.java b/Java/GridFrame.java deleted file mode 100644 index a9aab54c5..000000000 --- a/Java/GridFrame.java +++ /dev/null @@ -1,130 +0,0 @@ -import java.awt.EventQueue; -import java.awt.Graphics; -import java.awt.GridLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import javax.swing.*; - -/** - * Classe GridFrame crea una crea una griglia di bottoni in base ai argomenti - passati dalla linea di commmando, altrimenti usando dei valori di default che - sono 10 righe e 10 colonne - * - * @author Fadil Smajilbasic - */ -public class GridFrame extends JFrame implements ActionListener { - - /** - * Varaibile rows definisce quante righe deve avere la griglia - */ - private int rows; - /** - * Varaibile columns definisce quante colonne deve avere la griglia - */ - private int columns; - - /** - * Metodo setter per la variabile rows se il valore non è valido viene - * impostato a 10 - * - * @param rows il numero di righe da impostare - */ - public void setRows(int rows) { - if (rows > 0) { - this.rows = rows; - } else { - this.rows = 10; - } - - } - - /** - * Metodo setter per la variabile columns se il valore non è valido viene - * impostato a 10 - * - * @param columns rows il numero di colonne da impostare - */ - public void setColmuns(int columns) { - if (columns > 0) { - this.columns = columns; - - } else { - this.columns = 10; - } - } - - /** - * Metodo costruttore vuoto che richiama il secondo costruttore con i - * parametri 10 e 10 - */ - public GridFrame() { - this(10, 10); - } - - /** - * Metodo costruttore principale che imposta il layout del contenitore, crea - * e aggiunge i bottoni al contenitore - * - * @param rows il numero di righe della griglia - * @param columns il numero di colonne della griglia - */ - public GridFrame(int rows, int columns) { - this.setDefaultCloseOperation(EXIT_ON_CLOSE); - - setRows(rows); - setColmuns(columns); - - this.setLayout(new GridLayout(this.rows, this.columns)); - for (int i = 0; i < this.rows; i++) { - for (int j = 0; j < this.columns; j++) { - JButton grid = new JButton(j + ":" + i); - grid.addActionListener(this); - this.getContentPane().add(grid); - } - } - pack(); - setSize(900, 900); - this.setVisible(true); - } - - /** - * Il medodo paint è responsabile per il disegno della applicazione - * - * @param g il contesto grafico - */ - @Override - public void paint(Graphics g) { - super.paint(g); - } - - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - if (args.length == 2) { - try { - new GridFrame(Integer.parseInt(args[0]), - Integer.parseInt(args[1]) - ); - } catch (NumberFormatException e) { - new GridFrame(); - } - } else { - new GridFrame(); - } - } - }); - } - - /** - * Metodo actionPerformed è un metodo della interafccia ActionListener viene - * chiamato quando un azione viene compiuta su un componente - * - * @param e Un evento che indica che un'azione è stata compiuta da un - * componente - */ - @Override - public void actionPerformed(ActionEvent e) { - System.out.println("Button clicked: " + ((JButton) e.getSource()).getText()); - } - -} diff --git a/Java/HWorld b/Java/HWorld deleted file mode 100644 index 68edd449f..000000000 --- a/Java/HWorld +++ /dev/null @@ -1,7 +0,0 @@ -public class Hwolrd{ - public static void main(String args[]) { - int loops = 100; - for(int i = 0; i < loops; i++) - System.out.println("Hello World"); - } -} diff --git a/Java/HacktoberfestJavaHelloWorld.java b/Java/HacktoberfestJavaHelloWorld.java deleted file mode 100644 index 545f320d8..000000000 --- a/Java/HacktoberfestJavaHelloWorld.java +++ /dev/null @@ -1,12 +0,0 @@ - -package hacktoberfest.java.helloworld; - -public class HacktoberfestJavaHelloWorld { - - public static void main(String[] args) { - - System.out.println("Hello World"); - - } - -} diff --git a/Java/HallaVarlden.java b/Java/HallaVarlden.java deleted file mode 100644 index b522efb65..000000000 --- a/Java/HallaVarlden.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HallaVarlden{ - public static void main(String[] args) { - System.out.println("Hallå världen!"); - } -} \ No newline at end of file diff --git a/Java/HarmonicNumber.java b/Java/HarmonicNumber.java deleted file mode 100644 index 79c5fcbb4..000000000 --- a/Java/HarmonicNumber.java +++ /dev/null @@ -1,20 +0,0 @@ -import java.util.Scanner; - - -public class HarmonicNumber { - public static void main(String args[]) { - double harmonic = 0; - Scanner input = new Scanner(System.in); - System.out.print("Enter the nth number for the harmonic number: "); - int n = input.nextInt(); - System.out.println("The Harmonic number is " + harmonic(n)); - } - - public static double harmonic(int n) { - if (n > 1) { - return (1.0 / n) + harmonic(n - 1); - } else { - return 1.0; - } - } -} diff --git a/Java/Heapsort.java b/Java/Heapsort.java deleted file mode 100644 index 46edf6152..000000000 --- a/Java/Heapsort.java +++ /dev/null @@ -1,75 +0,0 @@ - -// Java program for implementation of Heap Sort -public class HeapSort -{ - public void sort(int arr[]) - { - int n = arr.length; - - // Build heap (rearrange array) - for (int i = n / 2 - 1; i >= 0; i--) - heapify(arr, n, i); - - // One by one extract an element from heap - for (int i=n-1; i>=0; i--) - { - // Move current root to end - int temp = arr[0]; - arr[0] = arr[i]; - arr[i] = temp; - - // call max heapify on the reduced heap - heapify(arr, i, 0); - } - } - - // To heapify a subtree rooted with node i which is - // an index in arr[]. n is size of heap - void heapify(int arr[], int n, int i) - { - int largest = i; // Initialize largest as root - int l = 2*i + 1; // left = 2*i + 1 - int r = 2*i + 2; // right = 2*i + 2 - - // If left child is larger than root - if (l < n && arr[l] > arr[largest]) - largest = l; - - // If right child is larger than largest so far - if (r < n && arr[r] > arr[largest]) - largest = r; - - // If largest is not root - if (largest != i) - { - int swap = arr[i]; - arr[i] = arr[largest]; - arr[largest] = swap; - - // Recursively heapify the affected sub-tree - heapify(arr, n, largest); - } - } - - /* A utility function to print array of size n */ - static void printArray(int arr[]) - { - int n = arr.length; - for (int i=0; i (n - j + 1)) - System.out.print(" "); - else - System.out.print("*"); - - // Right part of pattern - if ((i + n) > j) - System.out.print(" "); - else - System.out.print("*"); - } - - System.out.println(""); - } - } - -} diff --git a/Java/HelloWorld/HelloWorld.java b/Java/HelloWorld/HelloWorld.java deleted file mode 100644 index 6c8fcb07d..000000000 --- a/Java/HelloWorld/HelloWorld.java +++ /dev/null @@ -1,10 +0,0 @@ -public class HelloWorld { - - public static void main(String[] args) { - //This is a simple java program that will print Hello World on the screen - //This is part of my open source contribution to this project - System.out.println("Hello World"); - System.out.println("Open Source is interesting, learning how to use Git for collaboration among team members"); - System.out.println("Thanks Hacktoberfest, Digital Ocean, Github, Twillio"); - - } diff --git a/Java/HelloWorld/hello_world.java b/Java/HelloWorld/hello_world.java deleted file mode 100644 index 43deacbfd..000000000 --- a/Java/HelloWorld/hello_world.java +++ /dev/null @@ -1,7 +0,0 @@ -package sahil; - -public class hello_world { - public static void main(String[] args) { - System.out.println("Hello World!!!!"); - } -} diff --git a/Java/HelloWorld111.java b/Java/HelloWorld111.java deleted file mode 100644 index 25ad13fdf..000000000 --- a/Java/HelloWorld111.java +++ /dev/null @@ -1,8 +0,0 @@ -public class HelloWorld { - - public static void main(String[] args) { - - System.out.println("Hello World !!!"); - } - -} diff --git a/Java/HelloWorld123 b/Java/HelloWorld123 deleted file mode 100644 index d5614da7b..000000000 --- a/Java/HelloWorld123 +++ /dev/null @@ -1,7 +0,0 @@ -public class HelloWorld -{ - public static void main(String[] args) - { - System.out.println("Hello, World!"); - } -} diff --git a/Java/HelloWorld123.java b/Java/HelloWorld123.java deleted file mode 100644 index 6d50415da..000000000 --- a/Java/HelloWorld123.java +++ /dev/null @@ -1,8 +0,0 @@ -public class HelloWorld { - - public static void main(String[] args) { - // Prints "Hello, World" to the terminal window. - System.out.println("Hello, World"); - } - -} diff --git a/Java/HelloWorldArabic.java b/Java/HelloWorldArabic.java deleted file mode 100644 index 5babfe67b..000000000 --- a/Java/HelloWorldArabic.java +++ /dev/null @@ -1,7 +0,0 @@ - -public class HelloWorldArabic { - public static void main(String []Args) - { - System.out.println("مرحبا بالعالم"); - } -} diff --git a/Java/HelloWorldArkTrevelyan b/Java/HelloWorldArkTrevelyan deleted file mode 100644 index 44cded46d..000000000 --- a/Java/HelloWorldArkTrevelyan +++ /dev/null @@ -1,9 +0,0 @@ -public class HelloWorldArkTrevelyan{ - - public static void main(String[] args){ - - System.out.println("Hello, World"); - - } - -} diff --git a/Java/HelloWorldEndrikLelo.java b/Java/HelloWorldEndrikLelo.java deleted file mode 100644 index 9b3981186..000000000 --- a/Java/HelloWorldEndrikLelo.java +++ /dev/null @@ -1,8 +0,0 @@ -// Author: Endrik Lelo -// github: https://github.com/EndrikLelo -public class HelloWorldEndrikLelo{ - - public static void main(String[] args){ - System.out.println("Hello World"); - } -} diff --git a/Java/HelloWorldFr.java b/Java/HelloWorldFr.java deleted file mode 100644 index 9ef21b1ea..000000000 --- a/Java/HelloWorldFr.java +++ /dev/null @@ -1,7 +0,0 @@ -public class HelloWorldFr -{ - public static void main(String[] args) - { - System.out.println("Bonjour, tout le monde."); - } -} diff --git a/Java/HelloWorldHF.java b/Java/HelloWorldHF.java deleted file mode 100644 index 9757974ee..000000000 --- a/Java/HelloWorldHF.java +++ /dev/null @@ -1,7 +0,0 @@ -public class HelloWorld { - public static void main(String[] args) { - - System.out.println("Hello World!"); - - } -} diff --git a/Java/HelloWorldHacktoberfest2018.java b/Java/HelloWorldHacktoberfest2018.java deleted file mode 100644 index 91a62147c..000000000 --- a/Java/HelloWorldHacktoberfest2018.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorldHacktoberfest2018 { - public static void main(String[] args) { - System.out.println("hello world"); - } -} diff --git a/Java/HelloWorldInID.java b/Java/HelloWorldInID.java deleted file mode 100644 index 6723c28a0..000000000 --- a/Java/HelloWorldInID.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorldInID{ - public static void main(String[] args){ - System.out.println("Halo Dunia!"); - } -} diff --git a/Java/HelloWorldInsideOfAPublicStaticVoidMain.java b/Java/HelloWorldInsideOfAPublicStaticVoidMain.java deleted file mode 100644 index 01987a057..000000000 --- a/Java/HelloWorldInsideOfAPublicStaticVoidMain.java +++ /dev/null @@ -1,6 +0,0 @@ -public class HelloWorldInsideOfAPublicStaticVoidMain -{ - public static void main(String[] args) { - System.out.println("Hello World!"); - } -} diff --git a/Java/HelloWorldJava b/Java/HelloWorldJava deleted file mode 100644 index d1573d94d..000000000 --- a/Java/HelloWorldJava +++ /dev/null @@ -1,6 +0,0 @@ -public class HelloWorldJava{ - - public static void main(String args[]){ - System.out.println("Hello World , Welcome to Hacktoberfest 2018 !"); - } -} diff --git a/Java/HelloWorldJava.Java b/Java/HelloWorldJava.Java deleted file mode 100644 index c80779997..000000000 --- a/Java/HelloWorldJava.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/HelloWorldKen.java b/Java/HelloWorldKen.java deleted file mode 100644 index 4f04ca2f4..000000000 --- a/Java/HelloWorldKen.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorldKen{ - public static void main(String args[]){ - System.out.print("Hello Worldd!!!!"); - } -} diff --git a/Java/HelloWorldMcauliffeM.java b/Java/HelloWorldMcauliffeM.java deleted file mode 100644 index 0451fdf92..000000000 --- a/Java/HelloWorldMcauliffeM.java +++ /dev/null @@ -1,9 +0,0 @@ -public class HelloWorldMcauliffeM { - - public static void main(String[] args){ - - System.out.println("\"Hello, World\" \n\t -Matt McAuliffe"); - - } - -} \ No newline at end of file diff --git a/Java/HelloWorldMys.java b/Java/HelloWorldMys.java deleted file mode 100644 index d9a5a47f7..000000000 --- a/Java/HelloWorldMys.java +++ /dev/null @@ -1,7 +0,0 @@ -public class HelloWorldMys{ - public static void main(String[] args){ - // Malay translation - System.out.println("Halo Dunia!"); - - } -} diff --git a/Java/HelloWorldPrachee.java b/Java/HelloWorldPrachee.java deleted file mode 100644 index 2fa9b1e04..000000000 --- a/Java/HelloWorldPrachee.java +++ /dev/null @@ -1,7 +0,0 @@ -class HelloWorldPrachee -{ - public static void main(String args[]) - { - System.out.println("Hello World!!"); - } -} \ No newline at end of file diff --git a/Java/HelloWorldRehan.java.txt b/Java/HelloWorldRehan.java.txt deleted file mode 100644 index 0559a195a..000000000 --- a/Java/HelloWorldRehan.java.txt +++ /dev/null @@ -1,5 +0,0 @@ -class HelloWorldRehan{ - public static void main(String args[]){ - System.out.println("Hello world"); - } -} \ No newline at end of file diff --git a/Java/HelloWorldSB.java b/Java/HelloWorldSB.java deleted file mode 100644 index b6dc6ce1d..000000000 --- a/Java/HelloWorldSB.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorldSB{ - public static void main(String[] args){ - System.out.println("Hello, World!"); - } -} \ No newline at end of file diff --git a/Java/HelloWorldSk.java b/Java/HelloWorldSk.java deleted file mode 100644 index 6930732a6..000000000 --- a/Java/HelloWorldSk.java +++ /dev/null @@ -1,13 +0,0 @@ -import javax.swing.JOptionPane; -class HelloWorldSk{ - public static void main(String args[]){ - int hello = Integer.parseInt(JOptionPane.showInputDialog("splace one if you want to be greeted, place two if not")); - if(hello == 1){ - JOptionPane.showMessageDialog(null , "hello world"); - } - else{ - // will no be greeted - System.out.println("will no be greeted"); - } - } -} diff --git a/Java/HelloWorldT.java b/Java/HelloWorldT.java deleted file mode 100644 index e4c262175..000000000 --- a/Java/HelloWorldT.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/HelloWorldTharindu.java b/Java/HelloWorldTharindu.java deleted file mode 100644 index 4952756da..000000000 --- a/Java/HelloWorldTharindu.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorldTharindu{ - public static void main(String[] args) { - System.out.println("Hello World..!"); - } -} diff --git a/Java/HelloWorldUA.java b/Java/HelloWorldUA.java deleted file mode 100644 index ff628b6a1..000000000 --- a/Java/HelloWorldUA.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello World from Ukraine"); - } -} diff --git a/Java/HelloWorldWithASmile.java b/Java/HelloWorldWithASmile.java deleted file mode 100644 index 081376e6b..000000000 --- a/Java/HelloWorldWithASmile.java +++ /dev/null @@ -1,7 +0,0 @@ -package tyrex9000; - -public class HelloWorldWithASmile{ - public static void main(String[] args){ - System.out.print("Hello World :D"); - } -} diff --git a/Java/HelloWorldWithGreeter/src/Greeter.java b/Java/HelloWorldWithGreeter/src/Greeter.java deleted file mode 100644 index 65f118ff3..000000000 --- a/Java/HelloWorldWithGreeter/src/Greeter.java +++ /dev/null @@ -1,5 +0,0 @@ -public class Greeter { - public String createGreeting(String name) { - return new StringBuilder("Hello, ").append(name).toString(); - } -} diff --git a/Java/HelloWorldWithGreeter/src/HelloWorld.java b/Java/HelloWorldWithGreeter/src/HelloWorld.java deleted file mode 100644 index 70907f360..000000000 --- a/Java/HelloWorldWithGreeter/src/HelloWorld.java +++ /dev/null @@ -1,10 +0,0 @@ -public class HelloWorld { - public static void main(String[] args) { - if(args.length == 0) { - System.out.println("No name to greet"); - } else { - final String greeting = new Greeter().createGreeting(args[0]); - System.out.println(greeting); - } - } -} diff --git a/Java/HelloWorldZephi b/Java/HelloWorldZephi deleted file mode 100644 index cb81067c7..000000000 --- a/Java/HelloWorldZephi +++ /dev/null @@ -1,7 +0,0 @@ -public class HelloWorld { - - public static void main(String[] args) { - System.out.println("Hello, World from Argentina!"); - } - -} diff --git a/Java/HelloWorlrdBy.java b/Java/HelloWorlrdBy.java deleted file mode 100644 index 41dbee563..000000000 --- a/Java/HelloWorlrdBy.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorlrdBy { - public static void main(String[] args) { - System.out.println("Добрый дзень."); - } -} diff --git a/Java/HelloWrld b/Java/HelloWrld deleted file mode 100644 index 3c07a445a..000000000 --- a/Java/HelloWrld +++ /dev/null @@ -1,7 +0,0 @@ -public class HelloWrld { - public static void main(String[] args) { - - System.out.println("Hello World!"); - - } -} diff --git a/Java/Hello_Open_Source.java b/Java/Hello_Open_Source.java deleted file mode 100644 index 8bbda7c7c..000000000 --- a/Java/Hello_Open_Source.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloOpenSourceWorld { - public static void main(String[] args) { - System.out.println("Hello Open Source World"); - } -} diff --git a/Java/Hello_World_Applet.java b/Java/Hello_World_Applet.java deleted file mode 100644 index 444ed7690..000000000 --- a/Java/Hello_World_Applet.java +++ /dev/null @@ -1,96 +0,0 @@ -import java.awt.*; -import javax.swing.*; -@SuppressWarnings("serial") -public class AboutMeApplet extends JApplet { - static String Heading = "Hello World"; -/** - * Called by the browser or applet viewer to inform this JApplet that it - * has been loaded into the system. It is always called before the first - * time that the start method is called. - */ - public void init() - { - // this is a workaround for a security conflict with some browsers - // including some versions of Netscape & Internet Explorer which do - // not allow access to the AWT system event queue which JApplets do - // on startup to check access. May not be necessary with your browser. - JRootPane rootPane = this.getRootPane(); - rootPane.putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE); - - // provide any initialisation necessary for your JApplet - } - - /** - * Called by the browser or applet viewer to inform this JApplet that it - * should start its execution. It is called after the init method and - * each time the JApplet is revisited in a Web page. - */ - public void start() - { - // provide any code requred to run each time - // web page is visited - } - - /** - * Called by the browser or applet viewer to inform this JApplet that - * it should stop its execution. It is called when the Web page that - * contains this JApplet has been replaced by another page, and also - * just before the JApplet is to be destroyed. - */ - public void stop() - { - // provide any code that needs to be run when page - // is replaced by another page or before JApplet is destroyed - } - - /** - * Paint method for applet. - * - * @param g the Graphics object for this applet - */ - public void paint(Graphics g) - { - // simple text displayed on applet - g.setColor(Color.CYAN); - g.fillRect(0, 0, 400, 200); - g.setColor(Color.black); - g.drawString(Heading, 20, 20); - g.setColor(Color.WHITE); - g.drawString("Hello World!", 20, 40); - } - - /** - * Returns information about this applet. - * An applet should override this method to return a String containing - * information about the author, version, and copyright of the JApplet. - * - * @return a String representation of information about this JApplet - */ - public String getAppletInfo() - { - // provide information about the applet - return "Title: \nAuthor: \nA simple applet example description. "; - } - - - /** - * Returns parameter information about this JApplet. - * Returns information about the parameters than are understood by this JApplet. - * An applet should override this method to return an array of Strings - * describing these parameters. - * Each element of the array should be a set of three Strings containing - * the name, the type, and a description. - * - * @return a String[] representation of parameter information about this JApplet - */ - public String[][] getParameterInfo() - { - // provide parameter information about the applet - String paramInfo[][] = { - {"firstParameter", "1-10", "description of first parameter"}, - {"status", "boolean", "description of second parameter"}, - {"images", "url", "description of third parameter"} - }; - return paramInfo; - } -} diff --git a/Java/Hello_world_fun.java b/Java/Hello_world_fun.java deleted file mode 100644 index fc1acebce..000000000 --- a/Java/Hello_world_fun.java +++ /dev/null @@ -1,9 +0,0 @@ -package kik; -public class Hello_world_fun { - public static void main (String []args) { - show(); - } - static void show() { - System.out.println("Hello world!"); - } -} \ No newline at end of file diff --git a/Java/HellowX.java b/Java/HellowX.java deleted file mode 100644 index 6298e4454..000000000 --- a/Java/HellowX.java +++ /dev/null @@ -1,7 +0,0 @@ -public class HellowX { - public static void main(String[] args) { - String subject = args.length > 0 ? args[0] : "World"; - - System.out.println(String.format("Hellow %s!", subject)); - } -} diff --git a/Java/Helloword!.java b/Java/Helloword!.java deleted file mode 100644 index 59fbf7402..000000000 --- a/Java/Helloword!.java +++ /dev/null @@ -1,8 +0,0 @@ -public class HelloWorld { - - public static void main(String[] a) { - - System.out.println("Hello, World"); - } - -} diff --git a/Java/Helloworld.java b/Java/Helloworld.java deleted file mode 100644 index 512bfe501..000000000 --- a/Java/Helloworld.java +++ /dev/null @@ -1,9 +0,0 @@ -public class HelloWorld { - - public static void main(String[] args) { - - System.out.println("Hello World !!"); - - // Prints "Hello World !!" to the terminal window. - } - diff --git a/Java/Helloworld_malayalam.java b/Java/Helloworld_malayalam.java deleted file mode 100644 index f052a95e2..000000000 --- a/Java/Helloworld_malayalam.java +++ /dev/null @@ -1,8 +0,0 @@ - -public class Helloworld_malayalam { - - public static void main(String ...args) { - System.out.println("ഹലോ ലോകം"); - System.out.println("Hello Malaysia"); - } -} diff --git a/Java/Henlo_Doge.java b/Java/Henlo_Doge.java deleted file mode 100644 index a6d6ca34a..000000000 --- a/Java/Henlo_Doge.java +++ /dev/null @@ -1,5 +0,0 @@ -class Henlo_Doge { - public static void main(String[] args) { - System.out.println("Henlo Wolrd, Doge. WoW"); - } -} diff --git a/Java/HollowDiamondPattern.java b/Java/HollowDiamondPattern.java deleted file mode 100644 index 6b1dd3188..000000000 --- a/Java/HollowDiamondPattern.java +++ /dev/null @@ -1,63 +0,0 @@ -import java.util.Scanner; - -public class HollowDiamondPattern { - public static void hollowDiamond(int n){ - int ts,space,row=1,col=1; - - while(row<=n) - { - ts=n-row; - for(space=1;space<=ts;space++) - { - System.out.print(" "); - } - - int val=row-1; - System.out.print('*'); - for(int i=1;i<=2*val-1;i++) - System.out.print(' '); - - if(val!=0) - System.out.print('*'); - - System.out.println(); - - row++; - } - - row=n-1; - int k=0; - int j=0; - while(row>0) - { - k++; - for(j=0;j - - - - - - - - - - \ No newline at end of file diff --git a/Java/Java Threads/src/lk/ijse/slash/Demo.java b/Java/Java Threads/src/lk/ijse/slash/Demo.java deleted file mode 100755 index a8868f80e..000000000 --- a/Java/Java Threads/src/lk/ijse/slash/Demo.java +++ /dev/null @@ -1,25 +0,0 @@ -package lk.ijse.dep; - -public class Demo { - public static void main(String[] args) { -// new Thread(()->{ -// System.out.println("My Thread"); -// }).start(); -// -// try{ -// Thread.sleep(100); -// } catch (InterruptedException e) { -// e.printStackTrace(); -// } -// System.out.println("Main Thread"); - - MyThread myThread = new MyThread(); - myThread.setName("Sashika"); - myThread.start(); - - Thread.currentThread().setName("Harsha"); - System.out.println(Thread.currentThread().getName()); - - } - -} diff --git a/Java/Java Threads/src/lk/ijse/slash/MyThread.java b/Java/Java Threads/src/lk/ijse/slash/MyThread.java deleted file mode 100755 index 598f2e519..000000000 --- a/Java/Java Threads/src/lk/ijse/slash/MyThread.java +++ /dev/null @@ -1,10 +0,0 @@ -package lk.ijse.dep; - -public class MyThread extends Thread{ - @Override - public void run() { - - while (true) - System.out.println("My Thread"); - } -} diff --git a/Java/JavaHelloWorld.java b/Java/JavaHelloWorld.java deleted file mode 100644 index 7d1ef6da6..000000000 --- a/Java/JavaHelloWorld.java +++ /dev/null @@ -1,5 +0,0 @@ -class JavaHelloWorld{ - public static void main(String[] args) { - System.out.println("Hello World"); - } -} \ No newline at end of file diff --git a/Java/KMP_Search/question.txt b/Java/KMP_Search/question.txt deleted file mode 100644 index a44cdb63f..000000000 --- a/Java/KMP_Search/question.txt +++ /dev/null @@ -1,31 +0,0 @@ -Two arrays A and B are given of the same length N. - -You can perform the following type of operations: -1. You can rotate the whole array A. -2. You can rotate the elements of A which are only at the odd positions. -3. You can rotate the elements of A which are only at the even positions. -You can perform these operations as many time as you want . -You have to tell whether array B can be generated by array A after applying given operations on A. - -Note: N is obliged to be evenly divisible by 2. - -Input format : - -First line: a single integer T denoting the number of test cases. - -The first line of each test case contains a single integer N denoting the size of the array. -The second line of each test case contains N space separated integers denoting the array A. -The third line of each test case contains N space separated integers denoting the array B. - -Output format : - -For each test case print "Yes" if Array B can be generated by array A after applying given operations on A otherwise "No" in -New Line (without quotes). - -Constraints : -1≤T≤10 -1≤N≤10^5 -1≤A[i]≤10^9 - -Explanation : -Here rotation means cyclic shifting . diff --git a/Java/KMP_Search/test.java b/Java/KMP_Search/test.java deleted file mode 100644 index 6f52d3789..000000000 --- a/Java/KMP_Search/test.java +++ /dev/null @@ -1,157 +0,0 @@ - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.util.StringTokenizer; - -public class test -{ - static class FastReader - { - BufferedReader br; - StringTokenizer st; - - public FastReader() - { - br =new BufferedReader(new InputStreamReader(System.in)); - } - - String next() - { - while (st==null || (!st.hasMoreElements())) - { - try - { - st =new StringTokenizer(br.readLine()); - } - catch(IOException e) - { - e.printStackTrace(); - } - - } - return st.nextToken(); - } - - int nextInt() - { - return Integer.parseInt(next()); - } - }//END OF USER-DEFINED CLASS FOR FAST INPUT - - static int N ; - - /*KMP Search function implements the concept of searching a pattern string in the given String with O(N) time-complexity .The given - function just searches for the first occurence of the given 'pat' Pattern string in the given 'str' String , as soon as we get the - first occurence ,it raises the flag and breaks the process .If the pattern does not occur in the given string ,then the flag is not - raised and the process terminates in its usual way .*/ - - public static boolean KMP_search(String[] pat , String[] str) - { - String[] arr =new String[ ((3*N)/2) + 1 ]; - - int i ,j ,k ; j =0;k =0; boolean res =false; - - for(i =0;i0) && (arr[i].equals(arr[j]) == false)) - j =F[j - 1]; - - if(arr[i].equals(arr[j]) == true) - F[i] =j + 1; - else - F[i] =j; - - if(F[i] == (N/2)){ - res =true; break; - } - } - return res; - }//END OF KMP_SEARCH FUNCTION - - public static void main(String[] args) - { - FastReader fr =new FastReader(); //Object of Fast Input Class - - PrintWriter op =new PrintWriter(System.out); //Object of Fast Output Class - - int T =fr.nextInt(); //Number of test-cases - - int i ,j ,k ; //Temporary variables - - String[] evA ,odA ,evB ,odB ; //Even and Odd parts of Equal Length Strings A and B - - while(T-- > 0) - { - N =fr.nextInt(); //Length of Strings A and B - - evA =new String[ N/2 ]; odA =new String[ N/2 ]; j =0;k =0; - - for(i =0;i= 0 ) { - cmax += arr[i]; - ce++; - } - else { - cs = i; ce=i; - cmax = arr[i]; - } - - if(cmax>omax) { - os = cs; - oe = ce; - omax = cmax; - } - } - - System.out.println("Index from " +os +" to "+ oe); - System.out.println("Max subarray sum : "+omax); - -} - -} diff --git a/Java/LargestNumber.java b/Java/LargestNumber.java deleted file mode 100644 index f3c249060..000000000 --- a/Java/LargestNumber.java +++ /dev/null @@ -1,49 +0,0 @@ - -import java.util.Scanner; - -public class LargestNumber { - - public static void main(String[] args) { - - int[] nums; - - boolean exit = false; - - do { - - Scanner scanner = new Scanner(System.in); - - System.out.println("Enter the amount of numbers you want to compare: "); - - nums = new int[n]; - - for (int i = 0; i < n; i ++) { - System.out.println("Enter a number: "); - if (scanner.hasNextInt()) { - nums[i] = scanner.nextInt(); - } else { - exit = true; - break; - } - } - - if(exit) { - System.out.println("Invalid input. Program terminated."); - break; - } - - int m = nums[0]; - - for (int u = 1; u < n; u++){ - if (m < nums[u]){ - m = nums[u]; - } - } - - System.out.println("The largest number is: " + m); - - } while(!exit); - - } - -} diff --git a/Java/LeapYear.java b/Java/LeapYear.java deleted file mode 100755 index d46d856c6..000000000 --- a/Java/LeapYear.java +++ /dev/null @@ -1,19 +0,0 @@ -import java.util.Scanner; - -public class LeapYear{ - - public static void main(String[] args) { - - Scanner scan = new Scanner(System.in); - System.out.print("Enter a Year : "); - int year = scan.nextInt(); - - if (year % 4 == 0 && year % 100 != 0) { - System.out.println("A leap year"); - } else if (year % 400 == 0) { - System.out.println("A leap year"); - } else { - System.out.println("Not a leap year"); - } - } -} diff --git a/Java/LinkedListRecursion.java b/Java/LinkedListRecursion.java deleted file mode 100644 index 423db96f0..000000000 --- a/Java/LinkedListRecursion.java +++ /dev/null @@ -1,76 +0,0 @@ -import java.util.Collections; -import java.util.LinkedList; -import java.util.Random; -import java.util.Scanner; - -public class LinkedListRecursion { - public static void main(String Args[]) { - LinkedList ordered = new LinkedList(); - LinkedList unordered = new LinkedList(); - Scanner input = new Scanner(System.in); - int x, y, num; - System.out.print("Enter num of integers: "); - num = input.nextInt(); - if (num <= 0) { - System.out.println("Wrong input! goodbye"); - } else { - System.out.print("Enter the range: \nx= "); - x = input.nextInt(); - System.out.print("y= "); - y = input.nextInt(); - if (x < y) { - int temp = x; - x = y; - y = temp; - } - Random rand = new Random(); - for (int i = 0; i < num; i++) { - int value = y + rand.nextInt(x - y) + 1; - unordered.add(value); - } - System.out.print("Elements of unorder list: "); - for (int i = 0; i < unordered.size(); i++) { - System.out.print(unordered.get(i) + " "); - } - System.out.println("\nThe max is: " + findMax(unordered, unordered.get(--num), 0)); - System.out.print("The min is: " + findMin(unordered, unordered.get(--num), 0)); - ordered = unordered; - Collections.sort(ordered); - System.out.print("\nElements of ordered list: "); - for (int i = 0; i < unordered.size(); i++) { - System.out.print(ordered.get(i) + " "); - } - } - - } - - public static int findMax(LinkedList list, int max, int size) { - - if ((size + 1 > list.size())) { - return max; - } - - else { - int newMax = list.get(size); - if (max < newMax) { - return findMax(list, newMax, size + 1); - } else - return findMax(list, max, size + 1); - } - } - - public static int findMin(LinkedList list, int min, int size) { - - if ((size + 1 > list.size())) { - return min; - } - - else { - int newMin = list.get(size); - if (min > newMin) { - return findMin(list, newMin, size + 1); - } else - return findMin(list, min, 1 + size); - } - } -} diff --git a/Java/LongestCommonSubsequence.java b/Java/LongestCommonSubsequence.java deleted file mode 100644 index 4ac08fdf4..000000000 --- a/Java/LongestCommonSubsequence.java +++ /dev/null @@ -1,48 +0,0 @@ -// LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. For example, “abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, .. etc are subsequences of “abcdefg”. So a string of length n has 2^n different possible subsequences. - -public class LongestCommonSubsequence -{ - - /* Returns length of LCS for X[0..m-1], Y[0..n-1] */ - int lcs( char[] X, char[] Y, int m, int n ) - { - int L[][] = new int[m+1][n+1]; - - - for (int i=0; i<=m; i++) - { - for (int j=0; j<=n; j++) - { - if (i == 0 || j == 0) - L[i][j] = 0; - else if (X[i-1] == Y[j-1]) - L[i][j] = L[i-1][j-1] + 1; - else - L[i][j] = max(L[i-1][j], L[i][j-1]); - } - } - return L[m][n]; - } - - /* Utility function to get max of 2 integers */ - int max(int a, int b) - { - return (a > b)? a : b; - } - - public static void main(String[] args) - { - LongestCommonSubsequence lcs = new LongestCommonSubsequence(); - String s1 = "AGGTAB"; - String s2 = "GXTXAYB"; - - char[] X=s1.toCharArray(); - char[] Y=s2.toCharArray(); - int m = X.length; - int n = Y.length; - - System.out.println("Length of LCS is" + " " + - lcs.lcs( X, Y, m, n ) ); - } - -} \ No newline at end of file diff --git a/Java/LongestIncreasingSubsequence.java b/Java/LongestIncreasingSubsequence.java deleted file mode 100644 index bf8023dd2..000000000 --- a/Java/LongestIncreasingSubsequence.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * The program finds the length of the Longest subsequence (may not be - * continuous) such that the subsequence is in increasing order - */ -public class LongestIncreasingSubsequence { - public static void main(String args[]) { - int arr[] = { 1, 4, 2, 10, 8 }; - int lisLength = findLongestIncSubLength(arr); - System.out.println("Longest Increasing Subsequence Length is : "+lisLength); - - } - - static int findLongestIncSubLength(int arr[]) { - int length = arr.length; - int dp[] = new int[length]; - int i, j, max = 0; - - // Initialize Longest Increasing Subsequence values - for (i = 0; i < length; i++) { - dp[i] = 1; - } - - for (i = 1; i < length; i++) { - for (j = 0; j < i; j++) { - if (arr[i] > arr[j] && dp[i] < dp[j] + 1) { - dp[i] = dp[j] + 1; - } - } - } - max = findMax(dp); - return max; - } - - public static int findMax(int arr[]) { - int length = arr.length; - int max = 0; - for (int i = 0; i < length; i++) { - if (max < arr[i]) { - max = arr[i]; - } - } - return max; - } -} diff --git a/Java/LongestSubstring b/Java/LongestSubstring deleted file mode 100644 index 4e2b99188..000000000 --- a/Java/LongestSubstring +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.HashMap; -import java.util.HashSet; - -public class LongestSubstr { - //longest substring without repeating character - public static void main(String[] args) { - System.out.println(longsubstr("javaconceptoftheday")); - } - public static String longsubstr(String str){ - int longlength=0; - String longest=null; - HashMap hmap=new HashMap<>(); - for (int i = 0; i longlength){ - longlength=hmap.size(); - longest=hmap.keySet().toString(); - } - } - System.out.println(longlength); - return longest; - } -} diff --git a/Java/Lopa.java b/Java/Lopa.java deleted file mode 100644 index 7d4f5f8f5..000000000 --- a/Java/Lopa.java +++ /dev/null @@ -1,9 +0,0 @@ -//the hello world programm -//7.october at gita -class Lopa -{ - public static void main(String a[]) - { - System.out.prinln("Hello World"); - } -} \ No newline at end of file diff --git a/Java/Lopamudra.java b/Java/Lopamudra.java deleted file mode 100644 index 6ea208958..000000000 --- a/Java/Lopamudra.java +++ /dev/null @@ -1,9 +0,0 @@ -//the hello world programm -//7.october at gita -class Lopamudra -{ - public static void main(String a[]) - { - System.out.prinln("Hello World"); - } -} \ No newline at end of file diff --git a/Java/MagicSquare.java b/Java/MagicSquare.java deleted file mode 100644 index ae9a3267b..000000000 --- a/Java/MagicSquare.java +++ /dev/null @@ -1,38 +0,0 @@ -import java.util.*; -class MagicSquare { - public static void main(String[] args) { - Scanner scan = new Scanner(System.in); - System.out.println("Welcome to Magic Square !"); - System.out.println("Enter size. (size is odd number only.)"); - int n = scan.nextInt(); - int[][] m = new int[n+1][n+1]; - int r = 1; - int c = n / 2 + 1; - m[r][c] = 1; - int n2 = n * n ; - for (int k = 2; k <= n2; k++) { - if (r == 1 && c == n) { - r = 2; - } else if (r ==1) { - r = n; - c++; - } else if (c == n) { - r--; - c = 1; - } else if (m[r-1][c+1] > 0) { - r++; - } else { - r--; - c++; - } - m[r][c] = k; - } - for (int i = 1; i <= n; i++) { - for (int j = 1; j <= n; j++) { - System.out.print(m[i][j] + " "); - } - System.out.println(" "); - } - System.out.println("========== Program Terminated =========="); - } -} diff --git a/Java/MathMethods.java b/Java/MathMethods.java deleted file mode 100644 index dfee96e2a..000000000 --- a/Java/MathMethods.java +++ /dev/null @@ -1,453 +0,0 @@ -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -class MathMethods { - - static int binaryStringToInteger(String binary) { - int decimal = 0; - for (int i = binary.length() - 1; i >= 0; i--) { - decimal += Character.getNumericValue(binary.charAt(i)) * Math.pow(2, binary.length() - i); - } - - return decimal; - } - - static boolean isPentagonal(long number) { - - for (long i = 1; i < number / 2; i++) { - if (i * (3 * i - 1) == 2 * number) { - return true; - } - } - - return false; - } - - static String intToBinary(int number) { - StringBuilder binaryBuilder = new StringBuilder(); - String binaryString; - int newRemainder; - - while (number != 0) { - newRemainder = number % 2; - number = number / 2; - binaryBuilder.insert(0, String.valueOf(newRemainder)); - } - - binaryString = binaryBuilder.toString(); - - return binaryString; - } - - static boolean stringIsPalindrome(String string) { - boolean isPalindrome = true; - - /*if (string.length() % 2 == 0) {*/ - for (int i = 0; i < string.length() / 2; i++) { - if (string.charAt(i) != string.charAt(string.length() - 1 - i)) { - isPalindrome = false; - break; - } - } - /*} else { - - }*/ - - return isPalindrome; - } - - static boolean isPrimeWithEven(long numberPrime) { - boolean prime = true; - long i = 1; - - if (numberPrime == 1) { - prime = false; - } else { - while (prime && i < (int) Math.sqrt(numberPrime)) { - i++; - if (numberPrime % i == 0) - prime = false; - } - } - - return prime; - } - - static boolean isPrime(long numberPrime) { - boolean prime = true; - long i = 1; - - while (prime && i < (int) Math.sqrt(numberPrime)) { - i += 2; - if (numberPrime % i == 0) - prime = false; - } - - return prime; - } - - static long isDivisor(long number) { - long i = 1; - boolean prime = false; - - while (i < number / 2 && !prime) { - i = i + 2; - if (number % i == 0) { - System.out.println("I check if " + i + " is prime"); - prime = isPrime(i); - } - } - - return i; - } - - static boolean isPandigitalNoZero(int numberPan) { - String stringPan = String.valueOf(numberPan); - return isPanNoZero(stringPan); - } - - static boolean isPandigitalNoZero(String stringPan) { - return isPanNoZero(stringPan); - } - - static boolean isPandigital(int numberPan) { - String stringPan = String.valueOf(numberPan); - return isPan(stringPan); - } - - static boolean isPandigital(long numberPan) { - String stringPan = String.valueOf(numberPan); - return isPan(stringPan); - } - - static boolean isPandigital(String stringPan) { - return isPan(stringPan); - } - - static boolean isPanToNNoZero(String stringPan) { - boolean isPan = true; - - for (int i = 1; i <= stringPan.length(); i++) { - if (stringPan.contains(Integer.toString(i))) { - isPan = false; - } - } - - isPan = panExcludeZero(stringPan, isPan); - - return isPan; - } - - private static boolean panExcludeZero(String stringPan, boolean isPan) { - if (stringPan.contains("0")) { - isPan = false; - } else if (isPan) { - for (int i = 0; i < stringPan.length(); i++) { - for (int j = i + 1; j < stringPan.length(); j++) { - if (stringPan.charAt(i) == stringPan.charAt(j)) { - isPan = false; - break; - } - } - } - } - return isPan; - } - - private static boolean isPanNoZero(String stringPan) { - boolean isPan = true; - - for (int i = 9; i > stringPan.length(); i--) { - if (stringPan.contains(Integer.toString(i))) { - isPan = false; - } - } - - isPan = panExcludeZero(stringPan, isPan); - - return isPan; - } - - private static boolean isPan(String stringPan) { - boolean isPan = true; - - for (int i = 0; i < stringPan.length(); i++) { - if (stringPan.contains(Integer.toString(i))) { - isPan = false; - } - } - - return isPan; - } - - /** - * Put all permutations in a list of strings - * - * @param string What to permutate - * @param permutations Add all permutations here - */ - static void getPermutations(String string, List permutations) { - int[] c = new int[string.length()]; - - permutations.add(string); - - int i = 0; - while (i < string.length()) { - if (c[i] < i) { - if (i % 2 == 0) { - string = switchChars(string, 0, i); - } else { - string = switchChars(string, c[i], i); - } - permutations.add(string); - c[i] += 1; - i = 0; - } else { - c[i] = 0; - i++; - } - } - } - - /** - * Put all permutations in a list of longs - * - * @param number What to permutate - * @param permutations Add all permutations here - */ - static void getPermutations(Long number, List permutations) { - String string = String.valueOf(number); - int[] c = new int[string.length()]; - - permutations.add(number); - - int i = 0; - while (i < string.length()) { - if (c[i] < i) { - if (i % 2 == 0) { - string = switchChars(string, 0, i); - } else { - string = switchChars(string, c[i], i); - } - permutations.add(Long.valueOf(string)); - c[i] += 1; - i = 0; - } else { - c[i] = 0; - i++; - } - } - } - - /** - * Checks if a list already contains a permutation of number - * - * @param number What to permutate - * @param target Add all permutations here - */ - private static boolean containsPermutation(Long number, Set target) { - - if (target.contains(number)) { - return true; - } - - List permutations = new ArrayList<>(); - getPermutations(number, permutations); - for (Long numbers : permutations) { - if (target.contains(numbers)) { - return true; - } - } - - return false; - } - - static Set getOnePermutation(Long maxValue) { - Set candidates = new HashSet<>(); - - //Füllt candidates mit unpermutierten Startwerten - for(long i = 1; i <= maxValue; i++) { - if (!MathMethods.containsPermutation(i, candidates)) { - candidates.add(i); - } - } - - return candidates; - } - - /**Put all permutations in a list of longs - * - * @param number What to permutate - * @param permutations Add all permutations here - */ - static void getPermutationPrimes(Long number, List permutations) { - String string = String.valueOf(number); - int[] c = new int[string.length()]; - - if (isPrimeWithEven(number)) { - permutations.add(number); - } - - int i = 0; - while (i < string.length()) { - if (c[i] < i) { - if (i % 2 == 0) { - string = switchChars(string, 0, i); - } else { - string = switchChars(string, c[i], i); - } - if (isPrimeWithEven(Long.valueOf(string))) { - permutations.add(Long.valueOf(string)); - } - c[i] += 1; - i = 0; - } else { - c[i] = 0; - i++; - } - } - } - - private static String switchChars(String string, int firstPartner, int secondPartner) { - String newString; - char firstChar; - char secondChar; - - char[] charArray = string.toCharArray(); - firstChar = charArray[firstPartner]; - secondChar = charArray[secondPartner]; - charArray[firstPartner] = secondChar; - charArray[secondPartner] = firstChar; - - newString = new String(charArray); - - return newString; - } - - //Sum of digits - static long sumOfDigits(long number) { - long sumOfDigits = 0; - - String numberString = String.valueOf(number); - - for (int i = 0; i < numberString.length(); i++) { - sumOfDigits += Character.getNumericValue(numberString.charAt(i)); - } - - return sumOfDigits; - } - - //Sum of digits - static BigDecimal sumOfDigits(BigDecimal number) { - BigDecimal sumOfDigits = new BigDecimal(0); - - String numberString = String.valueOf(number); - - for (int i = 0; i < numberString.length(); i++) { - sumOfDigits = sumOfDigits.add(new BigDecimal(Character.getNumericValue(numberString.charAt(i)))); - } - - return sumOfDigits; - } - - /** Calculate factorials of digits and sum them up - * - * @param number input number to get sum of factorials - * @return sum of factorials - */ - static BigDecimal sumOfFactorials(long number) { - BigDecimal sumOfFactorials = new BigDecimal(0); - String numberString = String.valueOf(number); - - for (int i = 0; i < numberString.length(); i++) { - long nextDigit = Character.getNumericValue(numberString.charAt(i)); - BigDecimal nextDigitFactorial = facultyBigDecimal(nextDigit); - sumOfFactorials = sumOfFactorials.add(nextDigitFactorial); - } - - return sumOfFactorials; - } - - /** Calculate factorials of digits and sum them up - * - * @param number input number to get sum of factorials - * @return sum of factorials - */ - static BigDecimal sumOfFactorials(BigDecimal number) { - BigDecimal sumOfFactorials = new BigDecimal(0); - String numberString = String.valueOf(number); - - for (int i = 0; i < numberString.length(); i++) { - long nextDigit = Character.getNumericValue(numberString.charAt(i)); - BigDecimal nextDigitFactorial = facultyBigDecimal(nextDigit); - sumOfFactorials = sumOfFactorials.add(nextDigitFactorial); - } - - return sumOfFactorials; - } - - /** Calculate factorials of digits and sum them up - * - * @param numberString input number to get sum of factorials - * @return sum of factorials - */ - static BigDecimal sumOfFactorials(String numberString) { - BigDecimal sumOfFactorials = new BigDecimal(0); - - for (int i = 0; i < numberString.length(); i++) { - long nextDigit = Character.getNumericValue(numberString.charAt(i)); - BigDecimal nextDigitFactorial = facultyBigDecimal(nextDigit); - sumOfFactorials = sumOfFactorials.add(nextDigitFactorial); - } - - return sumOfFactorials; - } - - /**Get faculty of a given number as a string - * - * @param number - * @return - */ - static String facultyString(long number) { - BigDecimal faculty = new BigDecimal(1); - - for (long n = 1; n <= number; n++) { - faculty = faculty.multiply(BigDecimal.valueOf(n)); - } - - return String.valueOf(faculty); - } - - /**Get faculty of a given number as a long - * - * @param number - * @return - */ - static long facultyLong(long number) { - BigDecimal faculty = new BigDecimal(1); - - for (long n = 1; n <= number; n++) { - faculty = faculty.multiply(BigDecimal.valueOf(n)); - } - - return Long.valueOf(String.valueOf(faculty)); - } - - /**Get faculty of a given number as a BigDecimal - * - * @param number - * @return - */ - static BigDecimal facultyBigDecimal(long number) { - BigDecimal faculty = new BigDecimal(1); - - for (long n = 1; n <= number; n++) { - faculty = faculty.multiply(BigDecimal.valueOf(n)); - } - - return faculty; - } -} diff --git a/Java/Mathematics/BigIntegerGCD.java b/Java/Mathematics/BigIntegerGCD.java deleted file mode 100644 index d86afab88..000000000 --- a/Java/Mathematics/BigIntegerGCD.java +++ /dev/null @@ -1,11 +0,0 @@ -import java.util.Scanner; -import java.math.BigInteger; - -public class GCD { - public static void main(String args[]) { - Scanner in=new Scanner(System.in); - String num1=in.next(); - String num2=in.next(); - System.out.println((new BigInteger(num1)).gcd(new BigInteger(num2))); - } -} diff --git a/Java/Mathematics/EuclidGCD.java b/Java/Mathematics/EuclidGCD.java deleted file mode 100644 index 2c9b22696..000000000 --- a/Java/Mathematics/EuclidGCD.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Mathematics; - -/** - * - * @author sohai - */ -public class EuclidGCD { - - public static int gcd(int a , int b) { - if(b>0) - { - return gcd(b,a%b); - } - else - { - return a; - } - } - - - - public static int extended_euclid(int a, int b ,int x ,int y) - { - if(a==0) - { - x=0; - y=1; - return b; - } - int x1=1, y1=1 ; - int gcd = extended_euclid(b%a, a, x1, y1); - x= y1-(b/a)*x1; - y=x1; - return gcd; - } - - - - public static void main(String[] args) { - System.out.println(gcd(14,12)); - System.out.println(extended_euclid(14, 12, 1, 1)); - // System.out.println( x + " " + y ); - } - -} diff --git a/Java/Mathematics/Exponent.java b/Java/Mathematics/Exponent.java deleted file mode 100644 index 9ea7b9192..000000000 --- a/Java/Mathematics/Exponent.java +++ /dev/null @@ -1,53 +0,0 @@ - -package Mathematics; - -public class Exponent { - -public static int fastExponent(int base , int exponent) -{ - int x; - - if(exponent == 0) - { - return 1; - } - - else if(exponent == 1 ) - { - return base; - } - else - { - x=fastExponent(base ,exponent/2); - if(exponent%2==0) - { - return x*x; - } - else - return x*base*x; - } -} - -public static int iterativeExponent(int base , int exponent) -{ - int res=1; - - while(exponent > 0) - { - if((exponent & 1) == 1) - res=res*base; - exponent = exponent >> 1; - base= base * base; - } - return res; -} - - -public static void main(String args[]) -{ - System.out.println(fastExponent(3, 5)); - System.out.println(iterativeExponent(3, 5)); -} - - -} diff --git a/Java/Mathematics/GetGCD b/Java/Mathematics/GetGCD deleted file mode 100644 index c2e77e2ab..000000000 --- a/Java/Mathematics/GetGCD +++ /dev/null @@ -1,11 +0,0 @@ -public class GCD{ - public static void main(String[] args) { - System.out.println(getGCD(12,76)); - } - public static int getGCD(int a,int b){ - if(b==0){ - return a; - } - return getGCD(b,a%b); - } -} diff --git a/Java/Mathematics/JaggedNumber.java b/Java/Mathematics/JaggedNumber.java deleted file mode 100644 index 20cdefe2a..000000000 --- a/Java/Mathematics/JaggedNumber.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Mathematics; - -/** - * - * @author sohai - */ -public class JaggedNumber { - - - static int smallestPrime(int n) - { - for(int p=2; p*p <=n ; p++) - if(n % p == 0) - return p; - return n; - } - - - static void findJagged(int n) - { - int i=1; - int count = 1; - while(count <= n) - { - if(smallestPrime(i)>=i*2) - System.out.print(i + " "); - count+=1; - i+=1; - } - } - - public static void main(String args[]) - { - findJagged(100); - } -} - - - diff --git a/Java/Mathematics/KrugalNumber.java b/Java/Mathematics/KrugalNumber.java deleted file mode 100644 index 7ebf70747..000000000 --- a/Java/Mathematics/KrugalNumber.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Mathematics; - -/** - * - * @author sohai - */ -public class KrugalNumber { - - boolean isFrugal(int n) - { - int t=n; - int s=0,k=0,p; - - for(int i = 2; i * i <=n; i++) - { - k=0;p=0; - if(n%i==0) - { - p=i; - while(n>0 && n%i==0) - { - k++; - n=n/i; - } - } - s=s+digitcount(p); - if(k>1) - s+=digitcount(k); - } - - return digitcount(t)>s; - } - - - int digitcount(int n) - { - int c=0; - while(n>0) - { - c++; - n/=10; - } - return c; - } - - - - -} diff --git a/Java/Mathematics/LCM.java b/Java/Mathematics/LCM.java deleted file mode 100644 index 48fa0d7ec..000000000 --- a/Java/Mathematics/LCM.java +++ /dev/null @@ -1,19 +0,0 @@ -package Mathematics; - -import static Mathematics.EuclidGCD.gcd; - -/** - * Calculates lowest common multiple for given integer numbers - */ -public class LCM { - public static void main(String[] args) { - System.out.println(lcm(2, 5)); - System.out.println(lcm(15, 3)); - System.out.println(lcm(75, 10)); - } - - public static int lcm(int a, int b) { - return a * b / gcd(a, b); - } - -} diff --git a/Java/Mathematics/LemoilsConjecutive.java b/Java/Mathematics/LemoilsConjecutive.java deleted file mode 100644 index d7c61db3a..000000000 --- a/Java/Mathematics/LemoilsConjecutive.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Mathematics; -import Prime.*; -/** - * - * @author sohai - */ - -// LemoilsConjecutive(n) = odd prime + even -public class LemoilsConjecutive { - - static boolean isPrime(int n) - { - if(n==1) - return false; - for(int i=2 ; i*i<=n ; i++) - if(n%i==0) - return false; - return true; - } - - static void checklc(int n) - { - for(int i=1 ; i<=n/2; i++) - { - int var =n-i*2; - if(isPrime(i)&&isPrime(var)) - System.out.println( "2*" + i + "+" + var); - } - - } - public static void main(String[] args) { - - checklc(7); - - } - - - - -} diff --git a/Java/Mathematics/ModularExponent.java b/Java/Mathematics/ModularExponent.java deleted file mode 100644 index b25afc0f6..000000000 --- a/Java/Mathematics/ModularExponent.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Mathematics; - -/** - * - * @author sohai - */ -public class ModularExponent { - -static int fun(int b, int e, int p) -{ - int res = 1; - b = b % p; - while(e > 1){ - if((e & 1)==1) - res = (res * b) %p; - e= e>>1; - b=(b*b)%p; - } - return res; -} - - public static void main(String[] args) { - System.out.print(fun(2,2,1)); - } - -} \ No newline at end of file diff --git a/Java/Mathematics/PSmoothNumber.java b/Java/Mathematics/PSmoothNumber.java deleted file mode 100644 index ceba82191..000000000 --- a/Java/Mathematics/PSmoothNumber.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Mathematics; - -import java.util.Scanner; - -/** - * - * @author sohai - */ -public class PSmoothNumber { - - - static boolean[] smooth = new boolean[1000]; - -static int maxPrime(int n) -{ - int max=0; - for(int p = 2; p * p <=n ; p++) - while(n % p == 0){ - if(p > max) - max=p; - n = n / p; - } - if( n > 1 && n > max) - max = n; - return max; -} - -static void checkSmooth(int n,int p) -{ - for(int i= 1; i<=n ;i++) - if(maxPrime(i) <= p) - smooth[i]=true; -} - -static void printsmooth( int start , int end) -{ - for(int i = start ; i<= end ; i++) - { - if(smooth[i]) - System.out.print(i + " "); - } -} - public static void main(String[] args) { - - checkSmooth(100, 8); - printsmooth(20, 30); - printsmooth(40, 60); - - - } - -} diff --git a/Java/Mathematics/PotenciaRecursiva.java b/Java/Mathematics/PotenciaRecursiva.java deleted file mode 100644 index 2b7f0c906..000000000 --- a/Java/Mathematics/PotenciaRecursiva.java +++ /dev/null @@ -1,34 +0,0 @@ -public class PotenciaRecursiva { - - public static double potencia(int base, int expoente) { - - if (base == 0 && expoente == 0) { throw new IllegalArgumentException("indeterminação 0^0!"); } - if (base == 0 && expoente < 0) { throw new IllegalArgumentException("indeterminação, divisão por zero!"); } - - if (base == 0) { return 0; } - if (expoente == 0) { return 1; } - - if (ehNegativo(expoente)) { - double b = potencia(base, -expoente); - return 1 / b; - } - - if (ehPar(expoente)) { - double baseElevadaAMetadeDoExpoente = potencia(base, expoente / 2); - return baseElevadaAMetadeDoExpoente * baseElevadaAMetadeDoExpoente; - } - else { - return potencia(base, expoente - 1) * base; - } - - } - - private static boolean ehPar(int numero) { - return numero % 2 == 0; - } - - private static boolean ehNegativo(int numero) { - return numero < 0; - } - -} diff --git a/Java/Mathematics/Prime.java b/Java/Mathematics/Prime.java deleted file mode 100644 index 0514f7d2d..000000000 --- a/Java/Mathematics/Prime.java +++ /dev/null @@ -1,21 +0,0 @@ -// Checks is an input from the user is prime -// Considers all numbers less than 2 as non-prime. -public static boolean isPrime (int x){ - - if (x < 2){ - return false; - } - - for(int i = 2; i < x/2; i++){ - - if ( x % i == 0){ - - return false; - - } - - } - - return true; - -} diff --git a/Java/Mathematics/StormerNumber.java b/Java/Mathematics/StormerNumber.java deleted file mode 100644 index f3e3ffab0..000000000 --- a/Java/Mathematics/StormerNumber.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Mathematics; - -/** - * - * @author sohai - */ -public class StormerNumber { - - - static int maxPrime(int n) - { - int max = 0; - - for(int p = 2; p * p <=n ; p++) - while(n % p == 0){ - if(p > max) - max=p; - n = n / p; - } - if( n > 1 && n > max) - max = n; - return max; - } - - - - static void sm(int n) - { - int i=1,lhs; - int count = 0; - while(count <=14) - { - lhs=i*i+1; - if(maxPrime(lhs)>=2*i) - System.out.print(i + " "); - count+=1; - i+=1; - } - } - - - public static void main(String args[]) - { - sm(14); - } - - -} diff --git a/Java/Mathematics/SubsetCalculation.java b/Java/Mathematics/SubsetCalculation.java deleted file mode 100644 index b13e8ed2b..000000000 --- a/Java/Mathematics/SubsetCalculation.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Mathematics; - -/** - * - * @author sohai - */ -public class SubsetCalculation { - - - public static int power(int num, int pow) - { - int result=1; - while(pow !=0) - { - result *=num; - --pow; - } - return result; -} - - - public static int subsetCalculation(int n) { - if(n>1) - return (n*(n+1)/2)* power(2,n-1); - else - return 0; - } - -//(n*(n-1)/2)2^n-1 - public static void main(String[] args) { - System.out.print(subsetCalculation(3)); - System.out.print(power(3,2)); - } - - -} \ No newline at end of file diff --git a/Java/MatrixOperations.java b/Java/MatrixOperations.java deleted file mode 100644 index 087687fb1..000000000 --- a/Java/MatrixOperations.java +++ /dev/null @@ -1,135 +0,0 @@ -//Matrix Operations - Addition, Subtraction, Multiplication and Transpose of 2 matrices - -import java.util.Scanner; - -public class MatrixOperations { - public static void main(String[] args) { - int r1, c1, r2, c2; - Scanner sc = new Scanner(System.in); - System.out.print("Enter the number of rows for 1st matrix: "); - r1 = sc.nextInt(); - System.out.print("\nEnter the number of columns for 1st matrix: "); - c1 = sc.nextInt(); - int[][] a = new int[r1][c1]; - System.out.println("\nEnter the elements of 1st matrix:\n"); - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c1; j++) { - a[i][j] = sc.nextInt(); - } - } - System.out.print("\nEnter the number of rows for 2nd matrix: "); - r2 = sc.nextInt(); - System.out.print("\nEnter the number of columns for 2nd matrix: "); - c2 = sc.nextInt(); - int[][] b = new int[r2][c2]; - System.out.println("\nEnter the elements of 2nd matrix:\n"); - for (int i = 0; i < r2; i++) { - for (int j = 0; j < c2; j++) { - b[i][j] = sc.nextInt(); - } - } - System.out.println("\nThe elements of the first matrix are:\n"); - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c1; j++) { - System.out.print(a[i][j] + "\t"); - } - System.out.println(); - } - System.out.println("\nThe elements of the second matrix are:\n"); - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c2; j++) { - System.out.print(b[i][j] + "\t"); - } - System.out.println(); - } - int[][] c = new int[r1][c1]; - if (r1 == r2 && c1 == c2) { - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c1; j++) { - c[i][j] = a[i][j] + b[i][j]; - } - } - System.out.println("\nThe addition of the matrices are \n"); - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c1; j++) { - System.out.print(c[i][j] + "\t"); - } - System.out.println(); - } - } else { - System.out.println("\nDimensions are wrong!\n"); - } - int[][] d = new int[r1][c1]; - if (r1 == r2 && c1 == c2) { - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c1; j++) { - d[i][j] = a[i][j] - b[i][j]; - } - } - System.out.println("\nThe subtraction of the matrices are \n"); - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c1; j++) { - System.out.print(d[i][j] + "\t"); - } - System.out.println(); - } - } else { - System.out.println("\nDimensions are wrong!\n"); - } - int[][] m = new int[r1][c2]; - if (c1 == r2) { - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c2; j++) { - for (int k = 0; k < c1; k++) { - m[i][j] = 0; - m[i][j] = m[i][j] + (a[i][k] * b[k][j]); - } - } - } - System.out.println("\nThe multiplication of the matrices are\n"); - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c2; j++) { - System.out.print(m[i][j] + "\t"); - } - System.out.println(); - } - } else { - System.out.println("\nMatrix multiplication is not possible\n"); - } - int[][] at = new int[r1][c1]; - if (r1 == c1) { - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c1; j++) { - at[j][i] = a[i][j]; - } - } - System.out.println("\nThe transpose of first matrix is\n"); - for (int i = 0; i < r1; i++) { - for (int j = 0; j < c1; j++) { - System.out.print(at[i][j] + "\t"); - } - System.out.println(); - } - } else { - System.out.println("\nThe transpose of first matrix is not possible.\n"); - } - int[][] bt = new int[r2][c2]; - if (r2 == c2) { - for (int i = 0; i < r2; i++) { - for (int j = 0; j < c2; j++) { - bt[j][i] = b[i][j]; - } - } - System.out.println("\nThe transpose of second matrix is \n"); - for (int i = 0; i < r2; i++) { - for (int j = 0; j < c2; j++) { - System.out.print(bt[i][j] + "\t"); - } - System.out.println(); - } - } else { - System.out.println("\nThe transpose of B is not possible.\n"); - } - sc.close(); - } -} 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; ib?a:b; - - System.out.println("Addition is : "+sum); - System.out.println("Subtraction is : "+sub); - System.out.println("Multiplication is : "+mul); - System.out.println("Division is : "+div); - System.out.println("Modulas is : "+mod); - - System.out.println("\nRelational Operations are\n=================================="); - - System.out.println("A is greater then b : "+(a>b)); - System.out.println("A is smaller then b : "+(a=b)); - System.out.println("A is smaller or equal to b : "+(a<=b)); - System.out.println("A is equal to b : "+(a==b)); - System.out.println("A is not equal to b : "+(a!=b)); - - System.out.println("\nLogical Operators are\n======================================"); - - System.out.println("A is larger then b and b is smaller then A : "+(a>b && bb || b n < 0 ) - .count(); - System.out.println( String.format( "This array contains %s negative numbers.", howMany ) ); - } -} diff --git a/Java/Notepad/Notepad.java b/Java/Notepad/Notepad.java deleted file mode 100644 index 2dccc4a53..000000000 --- a/Java/Notepad/Notepad.java +++ /dev/null @@ -1,175 +0,0 @@ -import java.awt.*; -import javax.swing.*; -import java.awt.event.*; -import java.io.*; -import java.awt.datatransfer.*; - -public class Notepad extends JFrame implements ActionListener, WindowListener { - - JTextArea jta=new JTextArea(); - File fnameContainer; - - public Notepad(){ - - Font fnt=new Font("Arial",Font.PLAIN,15); - Container con=getContentPane(); - - JMenuBar jmb=new JMenuBar(); - JMenu jmfile = new JMenu("File"); - JMenu jmedit = new JMenu("Edit"); - JMenu jmhelp = new JMenu("Help"); - - con.setLayout(new BorderLayout()); - //trying to add scrollbar - JScrollPane sbrText = new JScrollPane(jta); - sbrText.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); - sbrText.setVisible(true); - - - jta.setFont(fnt); - jta.setLineWrap(true); - jta.setWrapStyleWord(true); - - con.add(sbrText); - - createMenuItem(jmfile,"New"); - createMenuItem(jmfile,"Open"); - createMenuItem(jmfile,"Save"); - jmfile.addSeparator(); - createMenuItem(jmfile,"Exit"); - - createMenuItem(jmedit,"Cut"); - createMenuItem(jmedit,"Copy"); - createMenuItem(jmedit,"Paste"); - - createMenuItem(jmhelp,"About Notepad"); - - jmb.add(jmfile); - jmb.add(jmedit); - jmb.add(jmhelp); - - setJMenuBar(jmb); - setIconImage(Toolkit.getDefaultToolkit().getImage("notepad.gif")); - addWindowListener(this); - setSize(500,500); - setTitle("Untitled.txt - Notepad"); - - setVisible(true); - - } - - public void createMenuItem(JMenu jm,String txt){ - JMenuItem jmi=new JMenuItem(txt); - jmi.addActionListener(this); - jm.add(jmi); - } - - public void actionPerformed(ActionEvent e){ - JFileChooser jfc=new JFileChooser(); - - if(e.getActionCommand().equals("New")){ - //new - this.setTitle("Untitled.txt - Notepad"); - jta.setText(""); - fnameContainer=null; - }else if(e.getActionCommand().equals("Open")){ - //open - int ret=jfc.showDialog(null,"Open"); - - if(ret == JFileChooser.APPROVE_OPTION) - { - try{ - File fyl=jfc.getSelectedFile(); - OpenFile(fyl.getAbsolutePath()); - this.setTitle(fyl.getName()+ " - Notepad"); - fnameContainer=fyl; - }catch(IOException ers){} - } - - }else if(e.getActionCommand().equals("Save")){ - //save - if(fnameContainer != null){ - jfc.setCurrentDirectory(fnameContainer); - jfc.setSelectedFile(fnameContainer); - } - else { - //jfc.setCurrentDirectory(new File(".")); - jfc.setSelectedFile(new File("Untitled.txt")); - } - - int ret=jfc.showSaveDialog(null); - - if(ret == JFileChooser.APPROVE_OPTION){ - try{ - - File fyl=jfc.getSelectedFile(); - SaveFile(fyl.getAbsolutePath()); - this.setTitle(fyl.getName()+ " - Notepad"); - fnameContainer=fyl; - - }catch(Exception ers2){} - } - - }else if(e.getActionCommand().equals("Exit")){ - //exit - Exiting(); - }else if(e.getActionCommand().equals("Copy")){ - //copy - jta.copy(); - }else if(e.getActionCommand().equals("Paste")){ - //paste - jta.paste(); - }else if(e.getActionCommand().equals("About Notepad")){ - //about - JOptionPane.showMessageDialog(this,"Created by: Ferdinand Silva (http://ferdinandsilva.com)","Notepad",JOptionPane.INFORMATION_MESSAGE); - }else if(e.getActionCommand().equals("Cut")){ - jta.cut(); - } - } - - public void OpenFile(String fname) throws IOException { - //open file code here - BufferedReader d=new BufferedReader(new InputStreamReader(new FileInputStream(fname))); - String l; - //clear the textbox - jta.setText(""); - - setCursor(new Cursor(Cursor.WAIT_CURSOR)); - - while((l=d.readLine())!= null) { - jta.setText(jta.getText()+l+"\r\n"); - } - - setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); - d.close(); - } - - public void SaveFile(String fname) throws IOException { - setCursor(new Cursor(Cursor.WAIT_CURSOR)); - DataOutputStream o=new DataOutputStream(new FileOutputStream(fname)); - o.writeBytes(jta.getText()); - o.close(); - setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); - } - - public void windowDeactivated(WindowEvent e){} - public void windowActivated(WindowEvent e){} - public void windowDeiconified(WindowEvent e){} - public void windowIconified(WindowEvent e){} - public void windowClosed(WindowEvent e){} - - public void windowClosing(WindowEvent e) { - Exiting(); - } - - public void windowOpened(WindowEvent e){} - - public void Exiting() { - System.exit(0); - } - - public static void main (String[] args) { - Notepad notp=new Notepad(); - } - -} diff --git a/Java/Notepad/notepad.gif b/Java/Notepad/notepad.gif deleted file mode 100644 index bc0d0851d..000000000 Binary files a/Java/Notepad/notepad.gif and /dev/null differ diff --git a/Java/Operations.java b/Java/Operations.java deleted file mode 100644 index 51b1f2e22..000000000 --- a/Java/Operations.java +++ /dev/null @@ -1,233 +0,0 @@ -import java.util.Random; -import java.util.Scanner; - -public class Operations { - - public void printAlter(Node start) - { - Node X=start; - System.out.println("Alternate Nodes are:"); - - while(X!=null) - { - System.out.print(X.d+"->"); - if(X.next!=null) - X=X.next.next; - else - break; - } - - System.out.println(); - } - - public void nthFromEnd(Node start, Scanner sc) - { - int l=0; - Node X=start; - while(X!=null) - { - l++; - X=X.next; - } - X=start; - System.out.println("Enter n:"); - int p=sc.nextInt(); - for(int i=1;i"); - start=start.next; - } - System.out.println(start.d); - } - - public Node input(Scanner sc) - { - Random random=new Random(); - Node start; - Node X=new Node(random.nextInt(9)+1); - start=X; - for(int i=2;i<=10;i++) - { - Node Y=new Node(random.nextInt(9)+1); - X.next=Y; - X=Y; - } - X.next=null; - return start; - } - - public void join(Scanner sc) - { - Operations op=new Operations(); - Node start1=op.input(sc); - Node start2=op.input(sc); - Node X=start1; - while(X.next!=null) - X=X.next; - X.next=start2; - System.out.println("Joined Lists:"); - print(start1); - } - - - public static void main(String[] args) { - - - Operations op=new Operations(); - Scanner sc=new Scanner(System.in); - - op.printAlter(op.input(sc)); - op.nthFromEnd(op.input(sc),sc); - op.duplicate(op.input(sc)); - op.join(sc); - op.removeAlter(op.input(sc)); - op.middle(op.input(sc)); - op.swap(op.input(sc),sc); - op.reverse(op.input(sc)); - - } - -} \ No newline at end of file diff --git a/Java/PascalTriangle.java b/Java/PascalTriangle.java deleted file mode 100644 index a0932b84e..000000000 --- a/Java/PascalTriangle.java +++ /dev/null @@ -1,42 +0,0 @@ -import java.util.Scanner; - -public class PascalTriangle { - - public static void main(String[] args){ - - - Scanner scanner= new Scanner(System.in); - System.out.println("Enter number"); - int n=scanner.nextInt(); - - for(int i=0; i= 13 && this.age < 18) { - System.out.println("You are a teenager."); - } else { - System.out.println("You are old."); - } - } - - public void yearPasses() { - this.age += 1; - } - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - int T = sc.nextInt(); - for (int i = 0; i < T; i++) { - int age = sc.nextInt(); - Person p = new Person(age); - p.amIOld(); - for (int j = 0; j < 3; j++) { - p.yearPasses(); - } - p.amIOld(); - System.out.println(); - } - sc.close(); - } -} diff --git a/Java/Power b/Java/Power deleted file mode 100644 index 6d50fec0b..000000000 --- a/Java/Power +++ /dev/null @@ -1,29 +0,0 @@ -# Hello-world -Add any Program in any language you like or add a hello world Program ❣️ if you like give us :star: - -public class Power { - - public static void main(String args[]) - { - Scanner sc=new Scanner(System.in); - int num = 0; - int pow = 0; - int power = 0; - - System.out.print("Enter number: "); - num = sc.nextInt(); - - System.out.print("Enter power: "); - pow = sc.nextInt(); - - System.out.print(power(num,pow)); - } - public static int power(int a, int b) - { - int power = 1; - for(int c=0;c presenters = new ArrayList(Arrays.asList("DigitalOcean","Github","Twilio")); - Collections.shuffle(presenters); - String space = " "; - String presentedMsg = "Hacktoberfest is presented by:"; - for(String s : presenters){ - presentedMsg += space + s; - } - System.out.println(presentedMsg); - - } -} diff --git a/Java/Prime.java b/Java/Prime.java deleted file mode 100644 index b0a35b209..000000000 --- a/Java/Prime.java +++ /dev/null @@ -1,34 +0,0 @@ -import java.util.Scanner; - -class Prime { - public static void main(String[] args) { - // prompt user and get the integer - System.out.print("Enter the integer to validate if it is a prime"); - Scanner scanner = new Scanner(System.in); - int integer = scanner.nextInt(); - - if (isPrime(integer)) { - System.out.println("Prime"); - } else { - System.out.println("Not prime"); - } - } - - /** - * Returns true if argument is a prime number. - */ - public static boolean isPrime(int integer) { - // guard code: anything that is a multiple of 2 is not a prime number - if (integer % 2 == 0) { - return false; - } - - for (int index = 3; index * index < integer; index += 2) { - if (integer % index == 0) { - return false; - } - } - - return true; - } -} diff --git a/Java/PrimeCheck.java b/Java/PrimeCheck.java deleted file mode 100755 index 94b20ec54..000000000 --- a/Java/PrimeCheck.java +++ /dev/null @@ -1,24 +0,0 @@ -import java.util.Scanner; - -public class PrimeCheck{ - - public static void main(String[] args) { - - Scanner scan = new Scanner(System.in); - int value = scan.nextInt(); - if((value > 2 && value % 2 == 0) || value == 1) { - System.out.println("Not a Prime number"); - return ; - } - - for (int i = 3; i <= (int)Math.sqrt(value); i += 2) { - - if (value % i == 0) { - System.out.println("Not a Prime number"); - return ; - } - } - - System.out.println(" Prime number"); - } -} diff --git a/Java/Print Hello_World.java b/Java/Print Hello_World.java deleted file mode 100644 index 6d50415da..000000000 --- a/Java/Print Hello_World.java +++ /dev/null @@ -1,8 +0,0 @@ -public class HelloWorld { - - public static void main(String[] args) { - // Prints "Hello, World" to the terminal window. - System.out.println("Hello, World"); - } - -} diff --git a/Java/ProductOfNumbers.java b/Java/ProductOfNumbers.java deleted file mode 100644 index e53539a01..000000000 --- a/Java/ProductOfNumbers.java +++ /dev/null @@ -1,15 +0,0 @@ -import java.io.*; -import java.util.*; -import java.text.*; -import java.math.*; - -public class Solution { - - public static void main(String[] args) { - Scanner in = new Scanner(System.in); - int n = in.nextInt(); - for(int x=1; x<11; x++){ - int productOfNumbers = x*n; - System.out.println(""+n+" x "+x+" = "+productOfNumbers); - } - } diff --git a/Java/Projet2/bin/Login$1.class b/Java/Projet2/bin/Login$1.class deleted file mode 100644 index 8b458876c..000000000 Binary files a/Java/Projet2/bin/Login$1.class and /dev/null differ diff --git a/Java/Projet2/bin/Login$2.class b/Java/Projet2/bin/Login$2.class deleted file mode 100644 index 36f3036a9..000000000 Binary files a/Java/Projet2/bin/Login$2.class and /dev/null differ diff --git a/Java/Projet2/bin/Login$3.class b/Java/Projet2/bin/Login$3.class deleted file mode 100644 index 179671b8e..000000000 Binary files a/Java/Projet2/bin/Login$3.class and /dev/null differ diff --git a/Java/Projet2/bin/Login.class b/Java/Projet2/bin/Login.class deleted file mode 100644 index cb5c0be07..000000000 Binary files a/Java/Projet2/bin/Login.class and /dev/null differ diff --git a/Java/Projet2/src/Login.java b/Java/Projet2/src/Login.java deleted file mode 100644 index 8e46e162f..000000000 --- a/Java/Projet2/src/Login.java +++ /dev/null @@ -1,110 +0,0 @@ -import java.awt.Color; -import java.awt.EventQueue; - -import javax.swing.JFrame; -import javax.swing.JPanel; -import javax.swing.border.EmptyBorder; -import javax.swing.JLabel; -import javax.swing.SwingConstants; -import javax.swing.JTextField; -import javax.swing.JPasswordField; -import javax.swing.JButton; -import javax.swing.JTextPane; -import javax.swing.JEditorPane; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import javax.swing.JFormattedTextField; -import javax.swing.JTextArea; - -public class Login extends JFrame { - - private JPanel contentPane; - private JTextField userNameField; - private JPasswordField PassField; - /** - * Launch the application. - */ - public static void main(String[] args) { - EventQueue.invokeLater(new Runnable() { - public void run() { - try { - Login frame = new Login(); - frame.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - /** - * Create the frame. - */ - public Login() { - setTitle("\tJlogin"); - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - setBounds(100, 100, 270, 329); - contentPane = new JPanel(); - contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); - setContentPane(contentPane); - contentPane.setLayout(null); - - JLabel userName = new JLabel("UserName"); - userName.setHorizontalAlignment(SwingConstants.CENTER); - userName.setBounds(88, 28, 64, 14); - contentPane.add(userName); - - userNameField = new JTextField(); - userNameField.setBounds(39, 53, 184, 20); - contentPane.add(userNameField); - userNameField.setColumns(10); - - JLabel Password = new JLabel("Password"); - Password.setHorizontalAlignment(SwingConstants.CENTER); - Password.setBounds(88, 98, 64, 14); - contentPane.add(Password); - - PassField = new JPasswordField(); - PassField.setBounds(39, 123, 184, 20); - contentPane.add(PassField); - - JLabel demo = new JLabel("Welcome user !"); - demo.setHorizontalAlignment(SwingConstants.CENTER); - demo.setBounds(39, 218, 184, 14); - contentPane.add(demo); - - JButton btnLogin = new JButton("Login"); - btnLogin.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - String pwd = String.valueOf(PassField.getText()); - - if(userNameField.getText().matches("admin")&& pwd.matches("2018")){ - demo.setText("Welcome " + userNameField.getText() + " !"); - demo.setForeground(new Color(255,0,0)); - - }else{ - demo.setText("Wrong user name or password !"); - } - } - }); - btnLogin.setBounds(39, 173, 89, 23); - contentPane.add(btnLogin); - - JLabel help = new JLabel(""); - help.setHorizontalAlignment(SwingConstants.CENTER); - help.setBounds(39, 243, 184, 14); - contentPane.add(help); - - JButton Help = new JButton("Help"); - Help.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - help.setText("Your Password is 2018"); - } - }); - Help.setBounds(134, 173, 89, 23); - contentPane.add(Help); - - - } - } - diff --git a/Java/Projet2/src/Matrix/Array2D.java b/Java/Projet2/src/Matrix/Array2D.java deleted file mode 100644 index 62a67dd9e..000000000 --- a/Java/Projet2/src/Matrix/Array2D.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package praktikum4; - -/** - * - * @author Human_Error - */ -public class Array2D { - - /** - * @param args the command line arguments - */ - private int[][] MatrikA; - private int[][] MatrikB; - double [][]penjumlahan,perkalian; - int[][] data,hasil; - - public void setMatrikA(int[][] MatrikA){ - this.MatrikA=MatrikA; - MatrikA=null; - } - public int[][] getMatrikA(){ - return MatrikA; - } - public void setMatrikB(int[][] MatrikB){ - this.MatrikB=MatrikB; - MatrikA=null; - } - public int[][] getMatrikB(){ - return MatrikB; - } - public void setData(int[][]data){ - this.data=data; - data=null; - } - - public int[][] getData(){ - return data; - } - public void setPenjumlahan(int[][]data,int [][] a){ - int [][]bar = new int[data.length][data[0].length]; - int i,j; - for(i = 0; i= 0; i--){ - output[ counter[ (array[i] / position) % 10 ] - 1 ] = array[i]; - counter[ ( array[i] / position ) % 10]--; - } - - for(int i = 0; i < n; i++){ - int temp = array[i]; - array[i] = output[i]; - output[i] = temp; - } - - position = position * 10; - } - } - - public String toString(){ - String result = "[ "; - for(int i = 0; i < this.array.length; i++){ - result = result + this.array[i] + "; "; - } - return result + "]" ; - } - - public static void main(String args[]){ - int array[] = new int[10]; - Random random = new Random(); - for(int i = 0; i < 10; i++){ - array[i] = random.nextInt(100); - } - - RadixSort orderedArray = new RadixSort(array); - System.out.println("Array:" + orderedArray.toString()); - orderedArray.sort(2); - - System.out.println("Sorted Array: " + orderedArray.toString()); - } -} \ No newline at end of file diff --git a/Java/RecursiveMethods.java b/Java/RecursiveMethods.java deleted file mode 100644 index 1978f8f43..000000000 --- a/Java/RecursiveMethods.java +++ /dev/null @@ -1,41 +0,0 @@ -public class RecursiveMethods { - - // Calculates Factorial - public static int factorial (int n){ - - if (n == 0 || n == 1){ // Base case - - return 1; - - } else { - - int result = n * factorial(n-1); // recursive step - return result; - } - } - - - // returns the Fibonacci number in the series, starting at index 0 - public static int Fibonacci (int n){ - - if (n == 0 || n == 1){ - return 1; - } else { - return Fibonacci(n-1) + Fibonacci(n-2); - } - - } - - // Prints String x, n times in a line separated by spaces - public static void repeatedPrint(String x, int n){ - - if (n == 0){ - - return; - - } else { - - System.out.print(x + " "); - repeatedPrint(x, n-1); - } - } diff --git a/Java/ReverseString.java b/Java/ReverseString.java deleted file mode 100644 index a1feeefdd..000000000 --- a/Java/ReverseString.java +++ /dev/null @@ -1,17 +0,0 @@ -import java.util.*; - -class ReverseString { - - public static void main(String[] args) { - //Scanner sc = new Scanner(System.in); - //System.out.print("Enter String => "); - //String in = sc.nextLine(); - String in = "abc"; - String [] sp = in.split(""); - String ans = ""; - for (int i = 0; i < sp.length; i++) { - ans = sp[i] + ans; - } - System.out.println(ans); - } -} \ No newline at end of file diff --git a/Java/RotateMatrix b/Java/RotateMatrix deleted file mode 100644 index 06fb138bb..000000000 --- a/Java/RotateMatrix +++ /dev/null @@ -1,31 +0,0 @@ -public class RotateMatrix { - public static void main(String[] args) { - int[][] matrix={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}}; - rotate(matrix); - } - public static void rotate(int[][] matrix){ - if(matrix.length!=matrix[0].length||matrix.length==0){ - System.out.println("Not Possible"); - } - int n=matrix.length; - for (int layer = 0; layer 57) { - throw new IllegalArgumentException("Not a valid number."); - } else { - result += (str.charAt(i) - 48) * Math.pow(10, str.length()-i-1); - } - } - - if (negative) { - return result * (-1); - } - - return result; - } - - public static void main(String[] args) { - while (true) { - try { - out.println(str2Int(sc.nextLine())); - } - catch (IllegalArgumentException e) { - out.println(e); - } - } - } -} diff --git a/Java/Subsequence.java b/Java/Subsequence.java deleted file mode 100644 index 9361e405f..000000000 --- a/Java/Subsequence.java +++ /dev/null @@ -1,20 +0,0 @@ -//Prints subsequence of a string -import java.util.*; -class Solution { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - String str = scanner.nextLine(); - subseq("",str); - } - - public static void subseq(String processed,String unprocessed){ - if(unprocessed.isEmpty()){ - System.out.println(processed); - return; - } - char ch=unprocessed.charAt(0); - unprocessed=unprocessed.substring(1); - subseq(processed+ch,unprocessed); - subseq(processed,unprocessed); - } -} diff --git a/Java/Superari15.java b/Java/Superari15.java deleted file mode 100644 index a64874110..000000000 --- a/Java/Superari15.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Superari -{ - public static void main(String[] args) { - System.out.println("It's SUPERARI15!"); - for(int i=0;i<5;i++) - System.out.println("*"); - } -} diff --git a/Java/Traversematrix.java b/Java/Traversematrix.java deleted file mode 100755 index bce2a2bbe..000000000 --- a/Java/Traversematrix.java +++ /dev/null @@ -1,72 +0,0 @@ -import java.util.Scanner; - -public class Traversematrix{ - -public static void main(String args[]){ - - Scanner scan = new Scanner(System.in); - int value = scan.nextInt(); - boolean iseven = true; - int a[][]= new int[10][10]; - if(value%2==0) - iseven=true; - else - iseven=false; - int i,j; - - int c=1; - int l=1; - int f=0; - -// suppose value =5 -int temp=value; -while(temp>1) -{ - i=value-l;j=f; - while(i>f) - { - a[i][j]=c; - c++; - i--; - } - while(jf) - { - a[i][j]=c; - c++; - j--; - } - -f++; -l++; -temp--; -} -if(iseven != true) -a[value/2][value/2]=c; - -// print the matrix - for(i=0; i count) - { - i++; - if(isUgly(i) == 1) - count++; - } - return i; - } - - /* Driver program to test above - functions */ - public static void main(String args[]) - { - int no = getNthUglyNo(150); - System.out.println("150th ugly " - + "no. is "+ no); - } -} diff --git a/Java/ValidaCPF.java b/Java/ValidaCPF.java deleted file mode 100644 index 6d63565c2..000000000 --- a/Java/ValidaCPF.java +++ /dev/null @@ -1,78 +0,0 @@ -import java.util.Scanner; - -public class ValidaCPF -{ - public static void main(String[] args) - { - Scanner teclado; - teclado = new Scanner(System.in); - int CPF[], i, multiplicador, soma, resto, DV1, DV2; - CPF = new int[11]; - - System.out.println("Entre com o CPF que deseja validar:"); - for (i = 0; i < 11; i++) - { - System.out.print("Informe o " + (i+1) + " dgito do CPF: "); - CPF[i] = teclado.nextInt(); - } - - // clculo do 1 dgito verificador - - multiplicador = 10; - soma = 0; - - for (i = 0; i < 9; i++) - { - soma = soma + multiplicador * CPF[i]; - multiplicador--; - } - - resto = soma % 11; - if (resto < 2) - DV1 = 0; - else - DV1 = 11 - resto; - - // clculo do 2 dgito verificador - - multiplicador = 11; - soma = 0; - - for (i = 0; i < 10; i++) - { - soma = soma + multiplicador * CPF[i]; - multiplicador--; - } - - resto = soma % 11; - if (resto < 2) - DV2 = 0; - else - DV2 = 11 - resto; - - System.out.println(); - - if ((DV1 == CPF[9]) && (DV2 == CPF[10])) - System.out.println("CPF VLIDO!"); - else - System.out.println("CPF INVLIDO!"); - - System.out.print("O CPF "); - for (i = 1; i < 12; i++) - { - System.out.print(CPF[i-1]); - if (i % 9 == 0) - System.out.print("-"); - else - if (i % 3 == 0) - System.out.print("."); - } - - if ((DV1 == CPF[9]) && (DV2 == CPF[10])) - System.out.print(" VLIDO!"); - else - System.out.print(" INVLIDO!"); - - teclado.close(); - } -} diff --git a/Java/VerticalOrderTraversal_Tree.java b/Java/VerticalOrderTraversal_Tree.java deleted file mode 100644 index b8a2991bf..000000000 --- a/Java/VerticalOrderTraversal_Tree.java +++ /dev/null @@ -1,74 +0,0 @@ - -import java.util.Map; -import java.util.TreeMap; -import java.util.Vector; - -class tree{ - - Node root; - - tree(){ - root=null; - } - - -} - -public class VerticalOrderTraversal { - - public static void main(String[] args) { - - tree t= new tree(); - t.root = new Node(1); - t.root.left = new Node(2); - t.root.right = new Node(3); - t.root.left.left = new Node(4); - t.root.left.right = new Node(5); - t.root.right.left = new Node(6); - t.root.right.right = new Node(7); - t.root.right.left.right = new Node(8); - t.root.right.right.right = new Node(9); - - System.out.println("Vertical Order traversal is"); - VO(t.root); - - } - - public static void VO(Node root){ - - TreeMap> m= new TreeMap<>(); - int hd=0; - VerticalOrder(root,hd,m); - for (Map.Entry> entry : m.entrySet()) - { - System.out.println(entry.getValue()); - } - - } - - public static void VerticalOrder(Node root, int hd, TreeMap> m) { - - if(root==null) - return; - - Vector get =m.get(hd); - - if(get==null){ - - get = new Vector<>(); - get.add(root.data); - - } - else{ - get.add(root.data); - } - - m.put(hd,get); - - VerticalOrder(root.left,hd-1,m); - VerticalOrder(root.right,hd+1,m); - - - - } -} diff --git a/Java/abc b/Java/abc deleted file mode 100644 index 4b9716371..000000000 --- a/Java/abc +++ /dev/null @@ -1,5 +0,0 @@ -public class abc{ - public static void main (String [] args){ - System.out.println("jkj"); - } -} diff --git a/Java/abcd b/Java/abcd deleted file mode 100644 index e9afb5beb..000000000 --- a/Java/abcd +++ /dev/null @@ -1,13 +0,0 @@ -import java.util.*; -public class sum -{ -public static void main() -{ -Scanner in=new Scanner(System.in); -int a,b,c=0; -System.out.println("Enter two numbers:"); -a=in.nextInt(); -b=in.nextInt(); -c=a+b; -System.out.println("Sum="+c); -} diff --git a/Java/abstract.java b/Java/abstract.java deleted file mode 100644 index 0aa36f09b..000000000 --- a/Java/abstract.java +++ /dev/null @@ -1,5 +0,0 @@ -abstract class Bike{ - abstract void run(); -} - -//above code line display the abstract class \ No newline at end of file diff --git a/Java/amanhello.java b/Java/amanhello.java deleted file mode 100644 index 01cc668eb..000000000 --- a/Java/amanhello.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Hello -{ - public static void main(String[] args) { - System.out.println("Hello World !!"); - } -} diff --git a/Java/anagrams.java b/Java/anagrams.java deleted file mode 100644 index 55de0bce2..000000000 --- a/Java/anagrams.java +++ /dev/null @@ -1,18 +0,0 @@ -import java.util.Scanner; -import java.util.Arrays; - -public class GCD { - public static void main(String args[]) { - Scanner in=new Scanner(System.in); - String str1=in.next(); - String str2=in.next(); - String ar1[]=str1.split("(?!^)"); - String ar2[]=str2.split("(?!^)"); - Arrays.sort(ar1); - Arrays.sort(ar2); - if(Arrays.equals(ar1,ar2)) - System.out.println("Anagrams"); - else - System.out.println("Not Anagrams"); - } -} diff --git a/Java/binary search java b/Java/binary search java deleted file mode 100644 index e0826c0ad..000000000 --- a/Java/binary search java +++ /dev/null @@ -1,36 +0,0 @@ -Collections.binarysearch() works for objects Collections like ArrayList and LinkedList. -// Java program to demonstrate working of Collections. -// binarySearch() -import java.util.List; -import java.util.ArrayList; -import java.util.Collections; - -public class bianry -{ - public static void main(String[] args) - { - List al = new ArrayList(); - al.add(1); - al.add(2); - al.add(3); - al.add(10); - al.add(20); - - // 10 is present at index 3. - int key = 10; - int res = Collections.binarySearch(al, key); - if (res >= 0) - System.out.println(key + " found at index = " - + res); - else - System.out.println(key + " Not found"); - - key = 15; - res = Collections.binarySearch(al, key); - if (res >= 0) - System.out.println(key + " found at index = " - + res); - else - System.out.println(key + " Not found"); - } -} diff --git a/Java/binarytodecimal.java b/Java/binarytodecimal.java deleted file mode 100755 index b3ea7b4ca..000000000 --- a/Java/binarytodecimal.java +++ /dev/null @@ -1,23 +0,0 @@ -import java.util.Scanner; - -class binarytodecimal -{ - public static void main(String args[]) - { - Scanner s=new Scanner(System.in); - - System.out.println("Enter a binary number:"); - int n=s.nextInt(); - - int decimal=0,p=0; - - while(n!=0) - { - decimal+=((n%10)*Math.pow(2,p)); - n=n/10; - p++; - } - - System.out.println(decimal); - } -} \ No newline at end of file diff --git a/Java/boxunbox.java b/Java/boxunbox.java deleted file mode 100644 index 64f0f56cc..000000000 --- a/Java/boxunbox.java +++ /dev/null @@ -1,16 +0,0 @@ -class Box_unbox -{ - static Integer first=new Integer(12); - static Integer second=3; - static int third=second; - static Integer result=0; - public static void main(String args[]) - { - result=third+second; - System.out.println("result is: "+result); -} - - -} - - \ No newline at end of file diff --git a/Java/bubble-sort.java b/Java/bubble-sort.java deleted file mode 100644 index ee3456a5c..000000000 --- a/Java/bubble-sort.java +++ /dev/null @@ -1,37 +0,0 @@ - -// Java program for implementation of Bubble Sort -class BubbleSort -{ - void bubbleSort(int arr[]) - { - int n = arr.length; - for (int i = 0; i < n-1; i++) - for (int j = 0; j < n-i-1; j++) - if (arr[j] > arr[j+1]) - { - // swap temp and arr[i] - int temp = arr[j]; - arr[j] = arr[j+1]; - arr[j+1] = temp; - } - } - - /* Prints the array */ - void printArray(int arr[]) - { - int n = arr.length; - for (int i=0; i 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/calculator.java b/Java/calculator.java deleted file mode 100644 index 70f7ba93c..000000000 --- a/Java/calculator.java +++ /dev/null @@ -1,51 +0,0 @@ -import javax.script.ScriptEngineManager; -import javax.script.ScriptEngine; -import javax.script.ScriptException; -import java.io.File; -import java.util.Scanner; -import java.lang.Math; - -public class calculator { - - static String problem; - - public static String cal(String st) throws ScriptException { - ScriptEngineManager mgr = new ScriptEngineManager(); - ScriptEngine engine = mgr.getEngineByName("JavaScript"); - return engine.eval(st).toString(); - } - - public static void cal_sin() throws ScriptException { - for (int i = 0; i < problem.length(); i++) { - if (problem.charAt(i) == 's') { - for (int j = i; i < problem.length(); j++) { - if (problem.charAt(j) == ')') { - String str = problem.substring(i + 4, j); - str = cal(str); - double a=Double.parseDouble(str); - a=a*Math.PI/180; - a=Math.sin(a); - str=String.valueOf(a); - problem = problem.substring(0, i) +"("+ str +")"+ problem.substring(j+1); - break; - } - } - } - } - } - - - public static void main(String[] args) throws ScriptException { - while (true) { - System.out.println("please enter:"); - Scanner input = new Scanner(System.in); - problem = input.nextLine(); - cal_sin(); - System.out.println(cal(problem)); - - } - - } - - -} diff --git a/Java/const_chaining.java b/Java/const_chaining.java deleted file mode 100644 index 177699871..000000000 --- a/Java/const_chaining.java +++ /dev/null @@ -1,37 +0,0 @@ -class Const_chain -{ - int no; - String name; - float age; - Const_chain() - { - no=0; - name="default"; - } - - Const_chain(int no,String name) - { - this.no=no; - this.name=name; - } - Const_chain(int no,String name,float age) - { - this(no,name); - this.age=age; - } - void show() - { - System.out.println("no is: "+no+" name is: "+name+" age is: "+age); - } - - public static void main(String... args) - { - Const_chain c=new Const_chain(12,"harsh",18); - c.show(); - - - - } -} - - \ No newline at end of file diff --git a/Java/current_time.java b/Java/current_time.java deleted file mode 100644 index 16f3683db..000000000 --- a/Java/current_time.java +++ /dev/null @@ -1,4 +0,0 @@ -public class CurrentTime{ - public static void main(String args[]) { - System.out.println("The current time is "+java.time.LocalDate.now()); - diff --git a/Java/databaseconnectiveity/Main.java b/Java/databaseconnectiveity/Main.java deleted file mode 100644 index 0824dc1ce..000000000 --- a/Java/databaseconnectiveity/Main.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.company; - -public class Main { - - public static void main(String[] args) { - School student=new School(); - while(student.exitCode!=-1) { - student.choice(); - } - System.out.println("GoodBye"); - } -} diff --git a/Java/databaseconnectiveity/School.java b/Java/databaseconnectiveity/School.java deleted file mode 100644 index 2a6423da6..000000000 --- a/Java/databaseconnectiveity/School.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.company; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.Statement; -import java.util.Scanner; - -class School { - private Connection con; - - { - con = null; - } - - int exitCode=0; - private static Scanner in; - - static { - in = new Scanner(System.in); - } - - private void performOperation(String sql, String action) { - try { - DriverManager.registerDriver(new oracle.jdbc.OracleDriver()); - con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","kevin_admin","admin"); - Statement st = con.createStatement(); - if(action.equals("display")) { - ResultSet rs=st.executeQuery(sql); - System.out.println("RollNo Name GPA"); - while(rs.next()) { - System.out.println(rs.getInt("rollno")+" "+rs.getString("student_name")+" "+rs.getString("gpa")); - } - } else { - int m = st.executeUpdate(sql); - if (m == 1) - System.out.println(action+" successfully : "+sql); - else - System.out.println(action+" failed"); - } - con.close(); - } catch(Exception ex) { - System.err.println(ex); - } - } - - void choice() { - int choice; - System.out.println("Enter 1 to add a new Student\nEnter 2 to update a student's details\nEnter 3 to remove a student\nEnter 4 to display list of student details\nEnter -1 to exit"); - choice=in.nextInt(); - switch(choice) { - case 1: - performOperation(newStudent(),"Insertion"); - break; - case 2: - performOperation(updateStudent(),"Updation"); - break; - case 3: - performOperation(removeStudent(),"Deletion"); - break; - case 4: - performOperation("select * from student","display"); - break; - case -1: - this.exitCode=-1; - break; - default: - System.out.println("Try again"); - } - } - - private String newStudent() { - System.out.println("Enter details of the student\nEnter rollNo"); - int roll=in.nextInt(); - System.out.println("Enter Name"); - String name=in.next(); - System.out.println("Enter GPA of student"); - String gpa=in.next(); - return "insert into student values("+roll+",'"+name+"','"+gpa+"')"; - } - - private String updateStudent() { - System.out.println("Enter the roll of student to be updated"); - int roll=in.nextInt(); - System.out.println("What would you like to update of the student gpa,name?"); - String choice=in.next(); - if(choice.equals("name")) choice="student_name"; - System.out.println("Enter the new value of "+choice); - String newVal=in.next(); - return "update student set "+choice+"='"+newVal+"' where rollno="+roll; - } - - private String removeStudent() { - System.out.println("Enter the rollno of student to be removed"); - int roll=in.nextInt(); - return "delete from student where rollno="+roll; - } -} diff --git a/Java/determinant.java b/Java/determinant.java deleted file mode 100644 index 6dc7b390c..000000000 --- a/Java/determinant.java +++ /dev/null @@ -1,44 +0,0 @@ -public class determinant { - public static int det(int N, int[][] a) { - int[][] T = new int[N - 1][N - 1]; - int k = 0, l = 0, D = 0; - switch (N) { - case 1: { - D = a[0][0]; - break; - } - case 2: - D = a[0][0] * a[1][1] - a[0][1] * a[1][0]; - break; - default: - for (int z = 0; z < N; z++) { - for (int s = 0; s < N; s++) { - - if (s != z) { - - for (int t = 1; t < N; t++) { - T[k][l] = a[t][s]; - k++; - } - l++; - } - k = 0; - - } - l = 0; - - - int M = det(N - 1, T); - D += Math.pow(-1, z) * a[0][z] * M; - } - } - return D; - } - public static void main(String[] args) { - int [][] mat = new int[3][3]; - mat[0][0]=-1;mat[1][0]=2;mat[2][0]=5; - mat[0][1]=1;mat[1][1]=2;mat[2][1]=3; - mat[0][2]=-2;mat[1][2]=8;mat[2][2]=10; - System.out.println(det(mat.length, mat)); - } -} diff --git a/Java/factorial.java b/Java/factorial.java deleted file mode 100644 index baf392923..000000000 --- a/Java/factorial.java +++ /dev/null @@ -1,15 +0,0 @@ -class factorial -{ - void main() - { - Scanner sc=new Scanner(System.in); - int n=sc.nextInt(); - int f=1; - for (int i=2;i<=n;i++) - { - f=f*i; - } - System.out.println(f); - } -} - diff --git a/Java/fgh b/Java/fgh deleted file mode 100644 index 017d7d36b..000000000 --- a/Java/fgh +++ /dev/null @@ -1 +0,0 @@ -import java.util.*; diff --git a/Java/fibonacci.java b/Java/fibonacci.java deleted file mode 100644 index ae4870019..000000000 --- a/Java/fibonacci.java +++ /dev/null @@ -1,35 +0,0 @@ -package day4; - -javax.swing.JOptionPane; - - -public class Fibonacci { - - public static void main(String[] args) { - - int n = Integer.parseInt(JOptionPane.showInputDialog("Enter number of terms :")); - String serie = ""; - - int[] fibonacci = new int[n]; - - fibonacci[0] = 1; - - fibonacci[1] = 1; - - for(int i=2;i to specify Parameter type -class Test -{ - // An object of type T is declared - T obj; - Test(T obj) { this.obj = obj; } // constructor - public T getObject() { return this.obj; } -} - -// Driver class to test above -class Main -{ - public static void main (String[] args) - { - // instance of Integer type - Test iObj = new Test(15); - System.out.println(iObj.getObject()); - - // instance of String type - Test sObj = - new Test("GeeksForGeeks"); - System.out.println(sObj.getObject()); - } -} diff --git a/Java/generics/Customer.java b/Java/generics/Customer.java deleted file mode 100644 index 5434d44be..000000000 --- a/Java/generics/Customer.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package generics; - -/** - * - * @author badhr - */ -public class Customer { - private String id; - public Customer(String id){ - this.id = id; - } - public String getid(){ - return this.id; - } - - @Override - public String toString() { - return "Customer-"+id;//super.toString(); //To change body of generated methods, choose Tools | Templates. - } - -} diff --git a/Java/generics/DynamicStack.java b/Java/generics/DynamicStack.java deleted file mode 100644 index 60483ee0a..000000000 --- a/Java/generics/DynamicStack.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package generics; - -/** - * - * @author badhr - */ -public class DynamicStack { - private Node Top; - public void push(Customer value){ - Node node = new Node(value); - //node.value = value; - //node.nextNode = null; - if(this.Top == null){ - Top = node; - } - else{ - node.nextNode = Top; - Top = node; - } - } - public void pop(){ - Node node = Top.nextNode; - Top = node; - } - public void display(){ - Node temp = Top; - System.out.print("["); - while(temp != null){ - System.out.print(temp.value); - temp = temp.nextNode; - - } - System.out.println("\b]"); - } -} diff --git a/Java/generics/Generics.java b/Java/generics/Generics.java deleted file mode 100644 index 86d886c9e..000000000 --- a/Java/generics/Generics.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package generics; - -/** - * - * @author badhr - */ -public class Generics { - - /** - * @param args the command line arguments - */ - public static void main(String[] args) { - DynamicStack s1 = new DynamicStack(); - s1.push(new Customer("C002")); - s1.push(new Customer("C003")); - s1.push(new Customer("C004")); - s1.display(); - - } - -} diff --git a/Java/generics/Node.java b/Java/generics/Node.java deleted file mode 100644 index e7b8012ab..000000000 --- a/Java/generics/Node.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package generics; - -/** - * - * @author badhr - */ -public class Node { - public Customer value; - public Node nextNode; - public Node(Customer val){ - this.value = val; - this.nextNode = null; - } -} diff --git a/Java/generics/_1_what_and_why_of_generics/CircularBuffer.java b/Java/generics/_1_what_and_why_of_generics/CircularBuffer.java deleted file mode 100644 index 8d8c0ce12..000000000 --- a/Java/generics/_1_what_and_why_of_generics/CircularBuffer.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.monotonic.generics._1_what_and_why_of_generics; - -public class CircularBuffer -{ - private final Object[] buffer; - private int readCursor = 0; - private int writeCursor = 0; - - public CircularBuffer(int size) - { - buffer = new Object[size]; - } - - public boolean offer(Object value) - { - if (buffer[writeCursor] != null) - { - return false; - } - - buffer[writeCursor] = value; - writeCursor = next(writeCursor); - return true; - } - - public Object poll() - { - Object value = buffer[readCursor]; - if (value != null) - { - buffer[readCursor] = null; - readCursor = next(readCursor); - } - return value; - } - - private int next(int index) - { - return (index + 1) % buffer.length; - } -} diff --git a/Java/generics/_1_what_and_why_of_generics/GenericCircularBuffer.java b/Java/generics/_1_what_and_why_of_generics/GenericCircularBuffer.java deleted file mode 100644 index 7ca6d6857..000000000 --- a/Java/generics/_1_what_and_why_of_generics/GenericCircularBuffer.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.monotonic.generics._1_what_and_why_of_generics; - -public class GenericCircularBuffer -{ - private final T[] buffer; - private int readCursor = 0; - private int writeCursor = 0; - - @SuppressWarnings("unchecked") - public GenericCircularBuffer(int size) - { - buffer = (T[]) new Object[size]; - } - - public boolean offer(T value) - { - if (buffer[writeCursor] != null) - { - return false; - } - - buffer[writeCursor] = value; - writeCursor = next(writeCursor); - return true; - } - - @SuppressWarnings("unchecked") - public T poll() - { - T value = buffer[readCursor]; - if (value != null) - { - buffer[readCursor] = null; - readCursor = next(readCursor); - } - return value; - } - - private int next(int index) - { - return (index + 1) % buffer.length; - } -} diff --git a/Java/generics/_1_what_and_why_of_generics/GenericExample.java b/Java/generics/_1_what_and_why_of_generics/GenericExample.java deleted file mode 100644 index af9ac95ac..000000000 --- a/Java/generics/_1_what_and_why_of_generics/GenericExample.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.monotonic.generics._1_what_and_why_of_generics; - -public class GenericExample -{ - public static void main(String[] args) - { - GenericCircularBuffer buffer = new GenericCircularBuffer(10); - - buffer.offer("a"); - buffer.offer("bc"); - buffer.offer("d"); - - //buffer.offer(1); - - //System.out.println(buffer.poll()); - - // Printing buffer - String value = concatenate(buffer); - System.out.println(value); - } - - private static String concatenate(GenericCircularBuffer buffer) - { - StringBuilder result = new StringBuilder(); - - String value; - while ((value = buffer.poll()) != null) - { - result.append(value); - } - - return result.toString(); - } -} diff --git a/Java/generics/_1_what_and_why_of_generics/StringCircularBuffer.java b/Java/generics/_1_what_and_why_of_generics/StringCircularBuffer.java deleted file mode 100644 index 951d8a09c..000000000 --- a/Java/generics/_1_what_and_why_of_generics/StringCircularBuffer.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.monotonic.generics._1_what_and_why_of_generics; - -public class StringCircularBuffer -{ - private final String[] buffer; - private int readCursor = 0; - private int writeCursor = 0; - - public StringCircularBuffer(int size) - { - buffer = new String[size]; - } - - public boolean offer(String value) - { - if (buffer[writeCursor] != null) - { - return false; - } - - buffer[writeCursor] = value; - writeCursor = next(writeCursor); - return true; - } - - public String poll() - { - String value = buffer[readCursor]; - if (value != null) - { - buffer[readCursor] = null; - readCursor = next(readCursor); - } - return value; - } - - private int next(int index) - { - return (index + 1) % buffer.length; - } -} diff --git a/Java/generics/_1_what_and_why_of_generics/TypeSafeExample.java b/Java/generics/_1_what_and_why_of_generics/TypeSafeExample.java deleted file mode 100644 index 355a6ab4e..000000000 --- a/Java/generics/_1_what_and_why_of_generics/TypeSafeExample.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.monotonic.generics._1_what_and_why_of_generics; - -public class TypeSafeExample -{ - public static void main(String[] args) - { - StringCircularBuffer buffer = new StringCircularBuffer(10); - - buffer.offer("a"); - buffer.offer("bc"); - buffer.offer("d"); - - //buffer.offer(1); - - String value = concatenate(buffer); - System.out.println(value); - } - - private static String concatenate(StringCircularBuffer buffer) - { - StringBuilder result = new StringBuilder(); - - String value; - while ((value = buffer.poll()) != null) - { - result.append(value); - } - - return result.toString(); - } -} diff --git a/Java/generics/_1_what_and_why_of_generics/TypeUnsafeExample.java b/Java/generics/_1_what_and_why_of_generics/TypeUnsafeExample.java deleted file mode 100644 index 86db61522..000000000 --- a/Java/generics/_1_what_and_why_of_generics/TypeUnsafeExample.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.monotonic.generics._1_what_and_why_of_generics; - -public class TypeUnsafeExample -{ - public static void main(String[] args) - { - CircularBuffer buffer = new CircularBuffer(10); - - buffer.offer("a"); - buffer.offer("bc"); - buffer.offer("d"); - - buffer.offer(1); - - String value = concatenate(buffer); - System.out.println(value); - } - - private static String concatenate(CircularBuffer buffer) - { - StringBuilder result = new StringBuilder(); - - String value; - while ((value = (String) buffer.poll()) != null) - { - result.append(value); - } - - return result.toString(); - } -} diff --git a/Java/gogators.java b/Java/gogators.java deleted file mode 100644 index db2d3a8d5..000000000 --- a/Java/gogators.java +++ /dev/null @@ -1,8 +0,0 @@ -public class gogators { - public static void main(String[] args) { - System.out.println("Go Gators!"); - System.out.println("CHOMP!"); - System.out.println("CHOMP!"); - } - -} \ No newline at end of file diff --git a/Java/hackit b/Java/hackit deleted file mode 100644 index 21a892c49..000000000 --- a/Java/hackit +++ /dev/null @@ -1 +0,0 @@ -System.out.println("haack it"); diff --git a/Java/hello-from-tucker.java b/Java/hello-from-tucker.java deleted file mode 100644 index 61a80e3a8..000000000 --- a/Java/hello-from-tucker.java +++ /dev/null @@ -1,5 +0,0 @@ -public class hello-from-tucker{ - public static void main(String[] args){ - System.out.println("Hello world!"); - } -} diff --git a/Java/hello-world b/Java/hello-world deleted file mode 100644 index 69d4ac775..000000000 --- a/Java/hello-world +++ /dev/null @@ -1,6 +0,0 @@ -public class new_class -{ - public static void main(String[] args) { - System.out.println("Hello World"); - } -} diff --git a/Java/hello.java b/Java/hello.java deleted file mode 100644 index a1df08674..000000000 --- a/Java/hello.java +++ /dev/null @@ -1,8 +0,0 @@ -public class hello { - - public static void main(String[] args) { - // Prints "Hello, World" to the terminal window. - System.out.println("Hello, World"); - } - -} diff --git a/Java/helloHacktoberfest2018.java b/Java/helloHacktoberfest2018.java deleted file mode 100644 index c7e56f127..000000000 --- a/Java/helloHacktoberfest2018.java +++ /dev/null @@ -1,8 +0,0 @@ -//My first Java expirience - -public class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello Hacktober 2018!!!"); - System.out.println("Russia, Saint-Petersburg"); - } -} diff --git a/Java/helloMundo.java b/Java/helloMundo.java deleted file mode 100644 index be325e16d..000000000 --- a/Java/helloMundo.java +++ /dev/null @@ -1,7 +0,0 @@ -public class helloMundo -{ - public static void main(String [] args) - { - System.out.println("Hello World !"); - } -} diff --git a/Java/helloVasilisWorld.java b/Java/helloVasilisWorld.java deleted file mode 100644 index 7f453c85f..000000000 --- a/Java/helloVasilisWorld.java +++ /dev/null @@ -1,5 +0,0 @@ -public class helloVasilisWorld { - public static void main(String[] args) { - System.out.println("Hello World from Greece!"); - } -} \ No newline at end of file diff --git a/Java/helloWorld.java b/Java/helloWorld.java deleted file mode 100644 index bc448ce6a..000000000 --- a/Java/helloWorld.java +++ /dev/null @@ -1,7 +0,0 @@ -class helloworld -{ - public static void main(String args[]) - { - System.out.println("Hello World from " + args[0]); - } -} diff --git a/Java/hello_hello.java b/Java/hello_hello.java deleted file mode 100644 index eb3f95389..000000000 --- a/Java/hello_hello.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/hello_world b/Java/hello_world deleted file mode 100644 index b02c6484d..000000000 --- a/Java/hello_world +++ /dev/null @@ -1 +0,0 @@ -System.out.println("Hello World"); diff --git a/Java/hello_world_zleetch.java b/Java/hello_world_zleetch.java deleted file mode 100644 index 76338dfb0..000000000 --- a/Java/hello_world_zleetch.java +++ /dev/null @@ -1,5 +0,0 @@ -public class HelloWorldBimo{ - public static void main(String[] args) { - System.out.println("Hello World"); - } -} diff --git a/Java/hellobrazil b/Java/hellobrazil deleted file mode 100644 index 428b0a567..000000000 --- a/Java/hellobrazil +++ /dev/null @@ -1,5 +0,0 @@ -public class Hello{ - public static void main(String args[]){ - System.out.println("Hello World! Bolsonaro 2018"); - } -} diff --git a/Java/hellogayasha.java b/Java/hellogayasha.java deleted file mode 100644 index 9bc1603f8..000000000 --- a/Java/hellogayasha.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/hellooooWorldEasy.java b/Java/hellooooWorldEasy.java deleted file mode 100644 index 766ca9217..000000000 --- a/Java/hellooooWorldEasy.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Simple Hello World ! - * @author joaolaranjo - * - */ - -package hacktoberfest; - -public class hellooooWorldEasy { - - public static void main(String[] args) { - System.out.println("Hello World!"); - - /* - * Another Hello World - */ - String string = "Hello World!"; - - int i = 0; - while ( i != string.length() ) { - System.out.println(string.charAt(i)); - i++; - } - } - -} diff --git a/Java/helloworld.java b/Java/helloworld.java deleted file mode 100644 index bc448ce6a..000000000 --- a/Java/helloworld.java +++ /dev/null @@ -1,7 +0,0 @@ -class helloworld -{ - public static void main(String args[]) - { - System.out.println("Hello World from " + args[0]); - } -} diff --git a/Java/helloworld1.java b/Java/helloworld1.java deleted file mode 100644 index 73f80df29..000000000 --- a/Java/helloworld1.java +++ /dev/null @@ -1,8 +0,0 @@ -public class HelloWorld { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - String name; - System.out.println("Write your name: "); - name = sc.nextLine(); - System.out.println("Hello, " + name + "!" ); diff --git a/Java/helloworld2.java b/Java/helloworld2.java deleted file mode 100644 index 8964032e3..000000000 --- a/Java/helloworld2.java +++ /dev/null @@ -1 +0,0 @@ -class helloworld{public static void main(String args[]){System.out.println("hello world");}} diff --git a/Java/helloworld666 b/Java/helloworld666 deleted file mode 100644 index da2c76679..000000000 --- a/Java/helloworld666 +++ /dev/null @@ -1,8 +0,0 @@ -public class MyFirstApp { - - public static void main (String[] args) { - System.out.print("Я управляю "); - System.out.println("миром!"); - } - -} diff --git a/Java/helloworldjai.java b/Java/helloworldjai.java deleted file mode 100644 index d91609539..000000000 --- a/Java/helloworldjai.java +++ /dev/null @@ -1,7 +0,0 @@ -public class Hello -{ - public static void main(String[] args) - { - System.out.println("Hello, World"); - } -} diff --git a/Java/heyverden/HelloWorld.java b/Java/heyverden/HelloWorld.java deleted file mode 100644 index 30e215567..000000000 --- a/Java/heyverden/HelloWorld.java +++ /dev/null @@ -1,7 +0,0 @@ -package heyverden; - -public class HelloWorld { - public static void main(String[] args) { - System.out.println("Hey Verden"); - } -} diff --git a/Java/hw.java b/Java/hw.java deleted file mode 100644 index f84c80323..000000000 --- a/Java/hw.java +++ /dev/null @@ -1,5 +0,0 @@ -public class MyHw { - public static void main(String[] args) { - System.out.println("Hello World"); - } -} diff --git a/Java/hworld.java b/Java/hworld.java deleted file mode 100644 index 488cf7505..000000000 --- a/Java/hworld.java +++ /dev/null @@ -1,8 +0,0 @@ -import java.util.*; -public class Hworld{ - - public static void main(String args[]){ - - System.out.println(" Hello World "); - } -} diff --git a/Java/initblock.java b/Java/initblock.java deleted file mode 100644 index ddf890e58..000000000 --- a/Java/initblock.java +++ /dev/null @@ -1,36 +0,0 @@ -class Initblock -{ - int no; - String name; - { - System.out.println("First initialisation block"); - } - Initblock() - { - no=0; - name="default"; - } - { - System.out.println("Second initialisation block"); - } - Initblock(int no,String name) - { - this.no=no; - this.name=name; - } - void show() - { - System.out.println("No is: "+no+" name is: "+name); - } - public static void main(String... args) - { - Initblock c1=new Initblock(); - Initblock c2=new Initblock(12,"harsh"); - c1.show(); - c2.show(); - - - } -} - - \ No newline at end of file diff --git a/Java/insertion_sort.java b/Java/insertion_sort.java deleted file mode 100644 index f76be0298..000000000 --- a/Java/insertion_sort.java +++ /dev/null @@ -1,24 +0,0 @@ -import java.util.*; -public class insertion { - public static void main(String args[]) { - Scanner sc=new Scanner(System.in); - int n=sc.nextInt(); - int a[]=new int[n]; - for(int i=0;i0 && temp< a[j-1]) { - a[j]=a[j-1]; - j-=1; - } - a[j]=temp; - } - for(int i=0;i - - - - - - - - - - \ No newline at end of file diff --git a/Java/java-threads/src/lk/ijse/dep/Demo.java b/Java/java-threads/src/lk/ijse/dep/Demo.java deleted file mode 100755 index 4696e7d51..000000000 --- a/Java/java-threads/src/lk/ijse/dep/Demo.java +++ /dev/null @@ -1,15 +0,0 @@ -package lk.ijse.dep; - -public class Demo { - public static void main(String[] args) { - - MyThread myThread = new MyThread(); - myThread.setName("Sashika"); - myThread.start(); - - Thread.currentThread().setName("Sandeepana"); - System.out.println(Thread.currentThread().getName()); - - } - -} diff --git a/Java/java-threads/src/lk/ijse/dep/MyThread.java b/Java/java-threads/src/lk/ijse/dep/MyThread.java deleted file mode 100755 index 598f2e519..000000000 --- a/Java/java-threads/src/lk/ijse/dep/MyThread.java +++ /dev/null @@ -1,10 +0,0 @@ -package lk.ijse.dep; - -public class MyThread extends Thread{ - @Override - public void run() { - - while (true) - System.out.println("My Thread"); - } -} diff --git a/Java/jhdfh b/Java/jhdfh deleted file mode 100644 index b198ccf02..000000000 --- a/Java/jhdfh +++ /dev/null @@ -1 +0,0 @@ -System.out.println("Hello Everyone"); diff --git a/Java/linkedList.java b/Java/linkedList.java deleted file mode 100644 index fa07ea763..000000000 --- a/Java/linkedList.java +++ /dev/null @@ -1,40 +0,0 @@ -import java.util.*; -public class linkedList{ - public static void main(String args[]) { - - /* Linked List Declaration */ - LinkedList linkedlist = new LinkedList(); - - /*add(String Element) is used for adding - * the elements to the linked list*/ - linkedlist.add("Item1"); - linkedlist.add("Item5"); - linkedlist.add("Item3"); - linkedlist.add("Item6"); - linkedlist.add("Item2"); - - /*Display Linked List Content*/ - System.out.println("Linked List Content: " +linkedlist); - - /*Add First and Last Element*/ - linkedlist.addFirst("First Item"); - linkedlist.addLast("Last Item"); - System.out.println("LinkedList Content after addition: " +linkedlist); - - /*This is how to get and set Values*/ - Object firstvar = linkedlist.get(0); - System.out.println("First element: " +firstvar); - linkedlist.set(0, "Changed first item"); - Object firstvar2 = linkedlist.get(0); - System.out.println("First element after update by set method: " +firstvar2); - - /*Remove first and last element*/ - linkedlist.removeFirst(); - linkedlist.removeLast(); - System.out.println("LinkedList after deletion of first and last element: " +linkedlist); - - /* Add to a Position and remove from a position*/ - linkedlist.add(0, "Newly added item"); - linkedlist.remove(2); - System.out.println("Final Content: " +linkedlist); - } \ No newline at end of file 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 0) - { - if((y & 1)==1) - res = (res * x) % p; - y = y >> 1; - x = (x * x) % p; - } - return res; - } - - public static void main(String args[]) - { - int x = 10; - int y = 100000; - int m = 1000000007; - // Gives ans as x^y%m - System.out.println("Power is " + power(x, y, m)); - } - - - } - - diff --git a/Java/myGithubHandle.java b/Java/myGithubHandle.java deleted file mode 100644 index a46eb9622..000000000 --- a/Java/myGithubHandle.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Hello -{ - public static void main(String[] args) { - System.out.println("Hello Github User: svelazquez !! "); - } -} diff --git a/Java/myGithubUsername.java b/Java/myGithubUsername.java deleted file mode 100644 index 0c683ba57..000000000 --- a/Java/myGithubUsername.java +++ /dev/null @@ -1,8 +0,0 @@ -public class myGithubUsername { - - public static void main(String[] args) { - System.out.println("My Username: Nerph"); - System.out.println("My Password: abc123"); - } - -} diff --git a/Java/myJavaPlex.java b/Java/myJavaPlex.java deleted file mode 100644 index 815b809d8..000000000 --- a/Java/myJavaPlex.java +++ /dev/null @@ -1,18 +0,0 @@ -class fib{ - static int fibo(int num){ - int[] fibA = new int[num+2]; - - fibA[0] = 0; - fibA[1] = 1; - - for (int i=2; i<=n ;i++){ - fibA[i] = fibA[i-1] + fibA[i-2]; - } - return fibA[num]; - } - - public static void main(String args[]){ - System.out.println(fibo(15)); - } - -} diff --git a/Java/nth_fibonacci.java b/Java/nth_fibonacci.java deleted file mode 100644 index 152493d5f..000000000 --- a/Java/nth_fibonacci.java +++ /dev/null @@ -1,20 +0,0 @@ -class nth_fibonacci{ - public static void main(String args[]){ - int a = 0,b = 1, c=a+b,i, n; - Scanner sc = new Scanner(System.in); - System.out.println("Enter an integer"); - n = sc.nextInt(); - if(n==1) - System.out.println("0"); - else if(n==2) - System.out.println("1"); - else{ - for(i=2;i= 0 && arr[j] > last) - { - arr[j+1] = arr[j]; - j--; - } - arr[j+1] = last; - } - - // Driver Method - public static void main(String[] args) - { - int arr[] = {12, 11, 13, 5, 6}; - - insertionSortRecursive(arr, arr.length); - - System.out.println(Arrays.toString(arr)); - } -} diff --git a/Java/rockycamacho.java b/Java/rockycamacho.java deleted file mode 100644 index cfd99f74e..000000000 --- a/Java/rockycamacho.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Hello -{ - public static void main(String[] args) { - System.out.println("Hello World"); - } -} diff --git a/Java/rsa/KeyPair.java b/Java/rsa/KeyPair.java deleted file mode 100644 index f45402f57..000000000 --- a/Java/rsa/KeyPair.java +++ /dev/null @@ -1,51 +0,0 @@ -import java.math.BigInteger; -import java.util.Random; - -public class KeyPair { - private BigInteger p; - private BigInteger q; - private BigInteger n; - private BigInteger fi; - private BigInteger e; - private BigInteger d; - private static final int bitLength = 1024; - private int pqBigLength; - private PublicKey publicKey; - private PrivateKey privateKey; - - public KeyPair() { - pqBigLength = bitLength / 2; - do { - //generate p - p = BigInteger.probablePrime(pqBigLength, new Random()); - //generate q - q = BigInteger.probablePrime(pqBigLength, new Random()); - //multiply q and p - n = p.multiply(q); - } while (n.bitLength() != bitLength); - fi = p.subtract(BigInteger.ONE).multiply(q.subtract(BigInteger.ONE)); - e = generatePublicExponent(); - d = e.modInverse(fi); - publicKey = new PublicKey(e, n); - privateKey = new PrivateKey(d, n); - } - - private BigInteger generatePublicExponent() { - while (true) { - Random random = new Random(); - int length = pqBigLength + random.nextInt(fi.bitLength() - pqBigLength); - BigInteger exponent = new BigInteger(length, new Random()); - if (exponent.compareTo(BigInteger.ONE) != 0 - && exponent.compareTo(fi) == -1 - && exponent.gcd(fi).compareTo(BigInteger.ONE) == 0) return exponent; - } - } - - public PublicKey getPublicKey() { - return publicKey; - } - - public PrivateKey getPrivateKey() { - return privateKey; - } -} diff --git a/Java/rsa/Main.java b/Java/rsa/Main.java deleted file mode 100644 index d2028d6a1..000000000 --- a/Java/rsa/Main.java +++ /dev/null @@ -1,9 +0,0 @@ -public class Main { - public static void main(String[] args) { - KeyPair keyPair = new KeyPair(); - System.out.println("N of Public Key: " + keyPair.getPublicKey().getN()); - System.out.println("E of Public Key: " + keyPair.getPublicKey().getE()); - System.out.println("N of Private Key: " + keyPair.getPrivateKey().getN()); - System.out.println("D of Private Key: " + keyPair.getPrivateKey().getD()); - } -} diff --git a/Java/rsa/PrivateKey.java b/Java/rsa/PrivateKey.java deleted file mode 100644 index dacd0a0df..000000000 --- a/Java/rsa/PrivateKey.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.math.BigInteger; - -public class PrivateKey { - private BigInteger d; - private BigInteger n; - - public PrivateKey(BigInteger d, BigInteger n) { - this.d = d; - this.n = n; - } - - public BigInteger getD() { - return d; - } - - public BigInteger getN() { - return n; - } - - public byte[] decrypt(byte[] cipherText) { - return RSAUtils.modPowByte(cipherText, d, n); - } - public byte[] encrypt(byte[] plainText) { - byte[] cipherText = RSAUtils.modPowByte(plainText, d, n); - return cipherText; - } -} diff --git a/Java/rsa/PublicKey.java b/Java/rsa/PublicKey.java deleted file mode 100644 index e477d99a1..000000000 --- a/Java/rsa/PublicKey.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.math.BigInteger; - -public class PublicKey { - private BigInteger e; - private BigInteger n; - - public PublicKey(BigInteger e, BigInteger n) { - this.e = e; - this.n = n; - } - - public BigInteger getE() { - return e; - } - - public BigInteger getN() { - return n; - } - - public byte[] encrypt(byte[] plainText) { - byte[] cipherText = RSAUtils.modPowByte(plainText, e, n); - return cipherText; - } - - public byte[] decrypt(byte[] cipherText) { - return RSAUtils.modPowByte(cipherText, e, n); - } -} diff --git a/Java/rsa/RSAUtils.java b/Java/rsa/RSAUtils.java deleted file mode 100644 index 4c4d7d815..000000000 --- a/Java/rsa/RSAUtils.java +++ /dev/null @@ -1,20 +0,0 @@ -import java.math.BigInteger; - -public class RSAUtils { - public static byte[] modPowByte(byte[] arg, BigInteger e, BigInteger n) { - BigInteger source = new BigInteger(1, arg); - BigInteger result = source.modPow(e, n); - return getBytesWithoutSign(result); - } - - private static byte[] getBytesWithoutSign(BigInteger arg) { - byte[] sourceArray = arg.toByteArray(); - if (sourceArray[0] != 0) { - return sourceArray; - } else { - byte[] withoutSign = new byte[sourceArray.length - 1]; - System.arraycopy(sourceArray, 1, withoutSign, 0, withoutSign.length); - return withoutSign; - } - } -} diff --git a/Java/schbebsi.java b/Java/schbebsi.java deleted file mode 100644 index 30f8127ed..000000000 --- a/Java/schbebsi.java +++ /dev/null @@ -1,7 +0,0 @@ -public class HelloWorld -{ - public static void main(String[] args) - { - System.out.println("Hello schbebsi!"); - } -} diff --git a/Java/semaphore/HRmanager.java b/Java/semaphore/HRmanager.java deleted file mode 100644 index 6bc8c019b..000000000 --- a/Java/semaphore/HRmanager.java +++ /dev/null @@ -1,45 +0,0 @@ -package semaphore; -import java.util.concurrent.Semaphore; - -public class HRmanager { - - public static void main(String[] args) { - - Semaphore QuestionPaperPool =new Semaphore(2); - TechLead techlead1 = new TechLead(QuestionPaperPool,"amit tcl"); - TechLead techlead2 = new TechLead(QuestionPaperPool,"vivek tcl"); - TechLead techlead3 = new TechLead(QuestionPaperPool,"dinesh tcl"); - TechLead techlead4 = new TechLead(QuestionPaperPool,"raghav tcl"); - techlead1.start(); - techlead2.start(); - techlead3.start(); - techlead4.start(); - System.out.println("no work for hr manager"); - } - -} -class TechLead extends Thread { - - Semaphore QuestionPaperPool; - public TechLead(Semaphore QuestionPaperPool,String name){ - super(name); - this.QuestionPaperPool =QuestionPaperPool; - } - @Override - public void run(){ - try { - System.out.println(Thread.currentThread().getName()+"waiting for test question papers"); - //aquiring one ques ppr - QuestionPaperPool.acquire(); - System.out.println(Thread.currentThread().getName()+"acuired test paper"); - System.out.println(Thread.currentThread().getName()+"Conducting test"); - Thread.sleep(3000); - - System.out.println(Thread.currentThread().getName()+"testdone giving back question paper"); - //giving back accuired question paper - QuestionPaperPool.release(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/Java/sergiyHelloWorld/Hello.java b/Java/sergiyHelloWorld/Hello.java deleted file mode 100644 index 463d976c5..000000000 --- a/Java/sergiyHelloWorld/Hello.java +++ /dev/null @@ -1,8 +0,0 @@ -import java.util.stream.Stream; - -public class Hello { - public static void main(String[] args) - { - Stream.of(new String("Hello world!").split("")).forEach(System.out::println); - } -} diff --git a/Java/slider/SlideChanger.java b/Java/slider/SlideChanger.java deleted file mode 100644 index 5f3921cb0..000000000 --- a/Java/slider/SlideChanger.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package slider; - -/** - * - * @author badhr - */ -public interface SlideChanger { - public void ChangeSlider(int value); -} diff --git a/Java/slider/Slider.java b/Java/slider/Slider.java deleted file mode 100644 index f19091121..000000000 --- a/Java/slider/Slider.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package slider; - -/** - * - * @author badhr - */ -public class Slider { - - /** - * @param args the command line arguments - */ - private SlideChanger[] slide = new SlideChanger[10]; - private int pos; - public void addSlider(SlideChanger slideChanger){ - slide[pos++] = slideChanger; - } - public void changeSlider(int val){ - for(int i = 0; i - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/slider/Slider1.java b/Java/slider/Slider1.java deleted file mode 100644 index 6862a1d73..000000000 --- a/Java/slider/Slider1.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package slider; - -/** - * - * @author badhr - */ -public class Slider1 extends javax.swing.JFrame implements SlideChanger{ - - Slider s1 = new Slider(); - /** - * Creates new form Slider1 - */ - public Slider1() { - initComponents(); - setVisible(true); - - s1.addSlider(new Slider1()); - s1.addSlider(new Slider2()); - s1.addSlider(new Slider3()); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - Jslider3 = new javax.swing.JSlider(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - Jslider3.setOrientation(javax.swing.JSlider.VERTICAL); - Jslider3.addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent evt) { - Jslider3StateChanged(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(97, 97, 97) - .addComponent(Jslider3, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(123, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(114, 114, 114) - .addComponent(Jslider3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(86, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - private void Jslider3StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_Jslider3StateChanged - s1.changeSlider(this.Jslider3.getValue()); - }//GEN-LAST:event_Jslider3StateChanged - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(Slider1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(Slider1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(Slider1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(Slider1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new Slider1().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JSlider Jslider3; - // End of variables declaration//GEN-END:variables - - @Override - public void ChangeSlider(int value) { - //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - this.Jslider3.setValue(value); - } -} diff --git a/Java/slider/Slider2.form b/Java/slider/Slider2.form deleted file mode 100644 index 5f198c67c..000000000 --- a/Java/slider/Slider2.form +++ /dev/null @@ -1,53 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/slider/Slider2.java b/Java/slider/Slider2.java deleted file mode 100644 index 4d989ec3d..000000000 --- a/Java/slider/Slider2.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package slider; - -/** - * - * @author badhr - */ -public class Slider2 extends javax.swing.JFrame implements SlideChanger{ - - Slider s1 = new Slider(); - /** - * Creates new form Slider1 - */ - public Slider2() { - initComponents(); - setVisible(true); - - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - Jslider1 = new javax.swing.JSlider(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - Jslider1.setOrientation(javax.swing.JSlider.VERTICAL); - Jslider1.addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent evt) { - Jslider1StateChanged(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(97, 97, 97) - .addComponent(Jslider1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(123, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(114, 114, 114) - .addComponent(Jslider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(86, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - private void Jslider1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_Jslider1StateChanged - s1.changeSlider(this.Jslider1.getValue()); - }//GEN-LAST:event_Jslider1StateChanged - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(Slider2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(Slider2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(Slider2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(Slider2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new Slider2().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JSlider Jslider1; - // End of variables declaration//GEN-END:variables - - @Override - public void ChangeSlider(int value) { - this.Jslider1.setValue(value); - //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } -} diff --git a/Java/slider/Slider3.form b/Java/slider/Slider3.form deleted file mode 100644 index 5f198c67c..000000000 --- a/Java/slider/Slider3.form +++ /dev/null @@ -1,53 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/slider/Slider3.java b/Java/slider/Slider3.java deleted file mode 100644 index 493199448..000000000 --- a/Java/slider/Slider3.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package slider; - -/** - * - * @author badhr - */ -public class Slider3 extends javax.swing.JFrame implements SlideChanger{ - - Slider s1 = new Slider(); - /** - * Creates new form Slider1 - */ - public Slider3() { - initComponents(); - setVisible(true); - - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - Jslider1 = new javax.swing.JSlider(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - Jslider1.setOrientation(javax.swing.JSlider.VERTICAL); - Jslider1.addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent evt) { - Jslider1StateChanged(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(97, 97, 97) - .addComponent(Jslider1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(123, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(114, 114, 114) - .addComponent(Jslider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(86, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - private void Jslider1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_Jslider1StateChanged - s1.changeSlider(this.Jslider1.getValue()); - }//GEN-LAST:event_Jslider1StateChanged - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(Slider3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(Slider3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(Slider3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(Slider3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new Slider3().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JSlider Jslider1; - // End of variables declaration//GEN-END:variables - - @Override - public void ChangeSlider(int value) { - //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - this.Jslider1.setValue(value); - } -} diff --git a/Java/sliderapp/SliderApp.java b/Java/sliderapp/SliderApp.java deleted file mode 100644 index 03d7c6c1f..000000000 --- a/Java/sliderapp/SliderApp.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package sliderapp; - -/** - * - * @author badhr - */ -public class SliderApp { - - /** - * @param args the command line arguments - */ - public static void main(String[] args) { - SliderControl sliderControl = new SliderControl(); - sliderControl.addSlider(new SliderWindow(sliderControl)); - sliderControl.addSlider(new SliderWindow(sliderControl)); - sliderControl.addSlider(new SliderWindow(sliderControl)); - } - -} diff --git a/Java/sliderapp/SliderControl.java b/Java/sliderapp/SliderControl.java deleted file mode 100644 index 3ddb0d591..000000000 --- a/Java/sliderapp/SliderControl.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package sliderapp; - -/** - * - * @author badhr - */ -public class SliderControl { - private SliderObserver[] observer = new SliderObserver[10]; - private int pos,value; - public void addSlider(SliderObserver observer){ - this.observer[pos++] = observer; - } - public void Notify(int value){ - if(this.value != value){ - this.value = value; - this.setValue(value); - } - } - public void setValue(int value){ - for(int i = 0; i - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/sliderapp/SliderWindow.java b/Java/sliderapp/SliderWindow.java deleted file mode 100644 index 7b47912c7..000000000 --- a/Java/sliderapp/SliderWindow.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package sliderapp; - -/** - * - * @author badhr - */ -public class SliderWindow extends javax.swing.JFrame implements SliderObserver{ - - private SliderControl sliderControl; - /** - * Creates new form SliderWindow - */ - public SliderWindow(SliderControl sliderControl) { - initComponents(); - this.sliderControl = sliderControl; - setVisible(true); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - jSlider = new javax.swing.JSlider(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - jSlider.setOrientation(javax.swing.JSlider.VERTICAL); - jSlider.addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent evt) { - jSliderStateChanged(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(221, 221, 221) - .addComponent(jSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(246, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(100, 100, 100) - .addComponent(jSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(130, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - private void jSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSliderStateChanged - this.sliderControl.Notify(this.jSlider.getValue()); - }//GEN-LAST:event_jSliderStateChanged - - /** - * @param args the command line arguments - */ - - - @Override - public void update(int value) { - this.jSlider.setValue(value); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JSlider jSlider; - // End of variables declaration//GEN-END:variables -} diff --git a/Java/src/MainClass.java b/Java/src/MainClass.java deleted file mode 100644 index 7a6f7177d..000000000 --- a/Java/src/MainClass.java +++ /dev/null @@ -1,9 +0,0 @@ - -public class MainClass { - - public static void main(String args[]) { - @SuppressWarnings("unused") - GuiSwing Gui = new GuiSwing(); - } - -} \ No newline at end of file diff --git a/Java/staticInitializer.java b/Java/staticInitializer.java deleted file mode 100644 index fa1a55cff..000000000 --- a/Java/staticInitializer.java +++ /dev/null @@ -1,9 +0,0 @@ -static{ - System.out.println("Hello i'm static initializer \n i'm used to do something before main method execute"); -} - -public static void main(String[] args) { - - //here any thing - //the above static class execute before this main menu we can add that after the main method too. -} \ No newline at end of file diff --git a/Java/superkey.java b/Java/superkey.java deleted file mode 100644 index 96f31993c..000000000 --- a/Java/superkey.java +++ /dev/null @@ -1,33 +0,0 @@ -class Grand -{ - Grand(String x) - { - System.out.println("Grand class constructor"); - } - -} -class Parent extends Grand -{ - Parent(int x) - { - super("harsh"); - System.out.println("Parent class constructor"); - } - -} -class Child extends Parent -{ - Child() - { - super(5); - System.out.println("Child class constructor"); - } - public static void main(String... args) - { - new Child(); - } - -} - - - \ No newline at end of file diff --git a/Java/th.java b/Java/th.java deleted file mode 100644 index aa5a223e3..000000000 --- a/Java/th.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Hello -{ - public static void main(String[] args) { - System.out.println("Hello World..!"); - } -} diff --git a/Java/trailing zeroes b/Java/trailing zeroes deleted file mode 100644 index b250acd72..000000000 --- a/Java/trailing zeroes +++ /dev/null @@ -1,36 +0,0 @@ -public static int findTrailingZeros(int number) { - -int count = 0; - - -if(number < 0){ - -System.out.println("Error: There is no Factorial -for a number less than 0"); - -return -1; //error condition - -} - -if(number == 5){ -return 1; -} - - -/* -start from 5, multiply j by 5 each loop, but -stop iterating when number/j is no longer greater -than 1 -*/ -for ( int j = 5; number/j >= 1; j *= 5 ) -{ -/* -assuming that number/j will just give you the -integer result of the division of number/j and -also truncate: -*/ -count += number / j; -} - -return count; -} diff --git a/Java/vipassna.java b/Java/vipassna.java deleted file mode 100644 index 262f01f16..000000000 --- a/Java/vipassna.java +++ /dev/null @@ -1,18 +0,0 @@ -import java.util.Scanner; - -class AddNumbers -{ - public static void main(String args[]) - { - int x, y, z; - - System.out.println("Enter two integers to calculate their sum"); - Scanner in = new Scanner(System.in); - - x = in.nextInt(); - y = in.nextInt(); - z = x + y; - - System.out.println("Sum of the integers = " + z); - } -} diff --git a/Java/watermeasure/Alarm.form b/Java/watermeasure/Alarm.form deleted file mode 100644 index 5d28e3215..000000000 --- a/Java/watermeasure/Alarm.form +++ /dev/null @@ -1,53 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/watermeasure/Alarm.java b/Java/watermeasure/Alarm.java deleted file mode 100644 index ded829717..000000000 --- a/Java/watermeasure/Alarm.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package watermeasure; - -/** - * - * @author badhr - */ -public class Alarm extends javax.swing.JFrame implements WaterLevelObserver{ - - - /** - * Creates new form Alarm - */ - public Alarm() { - initComponents(); - setVisible(true); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - alarmSwitch = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - alarmSwitch.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N - alarmSwitch.setText("OFF"); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(315, 315, 315) - .addComponent(alarmSwitch) - .addContainerGap(412, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(177, 177, 177) - .addComponent(alarmSwitch) - .addContainerGap(239, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(Alarm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(Alarm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(Alarm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(Alarm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new Alarm().setVisible(true); - } - }); - } - - @Override - public void display(int waterLevel) { - if(waterLevel> 50){ - this.alarmSwitch.setText("ON"); - } - else{ - this.alarmSwitch.setText("OFF"); - } - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JLabel alarmSwitch; - // End of variables declaration//GEN-END:variables -} diff --git a/Java/watermeasure/ControlRoom.java b/Java/watermeasure/ControlRoom.java deleted file mode 100644 index 04bab4d16..000000000 --- a/Java/watermeasure/ControlRoom.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package watermeasure; - -/** - * - * @author badhr - */ -public class ControlRoom { - WaterLevelObserver[] lists = new WaterLevelObserver[10]; - int pos; - int Value; - public void addObserver(WaterLevelObserver waterLevelObserver){ - this.lists[pos++] = waterLevelObserver; - } - public void setWaterLevel(int Value){ - if(this.Value != Value){ - this.Value = Value; - this.Notify(); - } - } - public void Notify(){ - for(int i = 0; i< pos ; i++){ - lists[i].display(Value); - } - } - -} diff --git a/Java/watermeasure/SMSWindow.form b/Java/watermeasure/SMSWindow.form deleted file mode 100644 index c6906e683..000000000 --- a/Java/watermeasure/SMSWindow.form +++ /dev/null @@ -1,47 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/watermeasure/SMSWindow.java b/Java/watermeasure/SMSWindow.java deleted file mode 100644 index bfb45e9d0..000000000 --- a/Java/watermeasure/SMSWindow.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package watermeasure; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author badhr - */ -public class SMSWindow extends javax.swing.JFrame implements WaterLevelObserver { - - /** - * Creates new form SMSWindow - */ - public SMSWindow() { - initComponents(); - setVisible(true); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - smsProgress = new javax.swing.JProgressBar(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(108, 108, 108) - .addComponent(smsProgress, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(141, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(146, 146, 146) - .addComponent(smsProgress, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(201, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(SMSWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(SMSWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(SMSWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(SMSWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new SMSWindow().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JProgressBar smsProgress; - // End of variables declaration//GEN-END:variables - - @Override - public void display(int waterLevel) { - //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - - new Thread(){ - - @Override - public void run() { - for (int i = 0; i < 100; i++) { - smsProgress.setValue(i); - try{Thread.sleep(100);}catch(InterruptedException ex){} - } - - } - - }.start(); - } -} diff --git a/Java/watermeasure/WaterLevelObserver.java b/Java/watermeasure/WaterLevelObserver.java deleted file mode 100644 index 068b4c5ff..000000000 --- a/Java/watermeasure/WaterLevelObserver.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package watermeasure; - -/** - * - * @author badhr - */ -public interface WaterLevelObserver { - public void display(int waterLevel); - - @Override - public boolean equals(Object obj); -} diff --git a/Java/watermeasure/WaterLevelWindow.form b/Java/watermeasure/WaterLevelWindow.form deleted file mode 100644 index cf1a48d12..000000000 --- a/Java/watermeasure/WaterLevelWindow.form +++ /dev/null @@ -1,52 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/watermeasure/WaterLevelWindow.java b/Java/watermeasure/WaterLevelWindow.java deleted file mode 100644 index 2b86b28a1..000000000 --- a/Java/watermeasure/WaterLevelWindow.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package watermeasure; - -/** - * - * @author badhr - */ -public class WaterLevelWindow extends javax.swing.JFrame implements WaterLevelObserver{ - - /** - * Creates new form WaterLevelWindow - */ - public WaterLevelWindow() { - initComponents(); - setVisible(true); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - levelMeter = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - levelMeter.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(125, 125, 125) - .addComponent(levelMeter, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(143, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(106, 106, 106) - .addComponent(levelMeter, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(88, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(WaterLevelWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(WaterLevelWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(WaterLevelWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(WaterLevelWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new WaterLevelWindow().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JLabel levelMeter; - // End of variables declaration//GEN-END:variables - - @Override - public void display(int waterLevel) { - this.levelMeter.setText(""+waterLevel); - } -} diff --git a/Java/watermeasure/WaterMeter.form b/Java/watermeasure/WaterMeter.form deleted file mode 100644 index 7f8b8f93b..000000000 --- a/Java/watermeasure/WaterMeter.form +++ /dev/null @@ -1,53 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/watermeasure/WaterMeter.java b/Java/watermeasure/WaterMeter.java deleted file mode 100644 index 1f79ae28f..000000000 --- a/Java/watermeasure/WaterMeter.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package watermeasure; - -/** - * - * @author badhr - */ -public class WaterMeter extends javax.swing.JFrame{ - - ControlRoom controlRoom = new ControlRoom(); - /** - * Creates new form WaterMeter - */ - public WaterMeter() { - initComponents(); - controlRoom.addObserver(new Alarm()); - controlRoom.addObserver(new SMSWindow()); - controlRoom.addObserver(new WaterLevelWindow()); - setVisible(true); - - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - waterMeter = new javax.swing.JSlider(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - waterMeter.setOrientation(javax.swing.JSlider.VERTICAL); - waterMeter.addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent evt) { - waterMeterStateChanged(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(257, 257, 257) - .addComponent(waterMeter, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(319, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(62, 62, 62) - .addComponent(waterMeter, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(152, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - private void waterMeterStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_waterMeterStateChanged - controlRoom.setWaterLevel(this.waterMeter.getValue()); - }//GEN-LAST:event_waterMeterStateChanged - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - /* Set the Nimbus look and feel */ - // - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(WaterMeter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(WaterMeter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(WaterMeter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(WaterMeter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - // - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new WaterMeter().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JSlider waterMeter; - // End of variables declaration//GEN-END:variables - - -} diff --git a/Java/zeustopher.java b/Java/zeustopher.java deleted file mode 100644 index 4d1744968..000000000 --- a/Java/zeustopher.java +++ /dev/null @@ -1,5 +0,0 @@ -public class Hello { - public static void main(String[] args) { - System.out.println("~~ Hello Hacktoberfest 2018 from Zeustopher ~~"); - } -} diff --git a/JavaFX_Script/HelloWorldApplication.java b/JavaFX_Script/HelloWorldApplication.java deleted file mode 100644 index 7f3ce4efb..000000000 --- a/JavaFX_Script/HelloWorldApplication.java +++ /dev/null @@ -1,19 +0,0 @@ - import javafx.stage.Stage; - import javafx.scene.Scene; - import javafx.scene.text.Text; - import javafx.scene.text.Font; - - Stage { - title: "Hello World" - width: 250 - height: 80 - scene: Scene { - content: Text { - font : Font { - size : 24 - } - x: 10, y: 30 - content: "Hello World" - } - } - } \ No newline at end of file diff --git a/JavaScript/2 PLayer Box Game/README.md b/JavaScript/2 PLayer Box Game/README.md deleted file mode 100644 index d2f940886..000000000 --- a/JavaScript/2 PLayer Box Game/README.md +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/JavaScript/2 PLayer Box Game/gameTestArea.html b/JavaScript/2 PLayer Box Game/gameTestArea.html deleted file mode 100644 index 61a81993d..000000000 --- a/JavaScript/2 PLayer Box Game/gameTestArea.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/JavaScript/AHelloWorldFromEarth.js b/JavaScript/AHelloWorldFromEarth.js deleted file mode 100644 index 98206ce41..000000000 --- a/JavaScript/AHelloWorldFromEarth.js +++ /dev/null @@ -1,12 +0,0 @@ -console.log("H"); -console.log("e"); -console.log("l"); -console.log("l"); -console.log("o"); -console.log(" "); -console.log("W"); -console.log("o"); -console.log("r"); -console.log("l"); -console.log("d"); -console.log("!"); diff --git a/JavaScript/Advance-if.js b/JavaScript/Advance-if.js deleted file mode 100644 index 54eae64ec..000000000 --- a/JavaScript/Advance-if.js +++ /dev/null @@ -1,11 +0,0 @@ -let temp=45 -if(temp <= 32){ - console.log('its is not freezing outside') -} -else if(temp>=110){ - console.log('its is hot outside'); -} -else{ - console.log('go for it. it is preety nice out'); - -} \ No newline at end of file diff --git a/JavaScript/AlertHelloWorld.js b/JavaScript/AlertHelloWorld.js deleted file mode 100644 index 94ae439ef..000000000 --- a/JavaScript/AlertHelloWorld.js +++ /dev/null @@ -1 +0,0 @@ -alert("Hello World"); diff --git a/JavaScript/Archemedian Spiral Fractal/fractal.js b/JavaScript/Archemedian Spiral Fractal/fractal.js deleted file mode 100644 index 4a87ce8b4..000000000 --- a/JavaScript/Archemedian Spiral Fractal/fractal.js +++ /dev/null @@ -1,39 +0,0 @@ -const canvas = document.getElementById('canvas'); -const canvasContext = canvas.getContext('2d'); - -canvasContext.fillStyle = 'black'; // setup -canvasContext.lineWidth = 1; - -// add math methods radians and degree for conversion -Math.radians = function(degrees) { - return degrees * Math.PI / 180; -}; - -/* -function drawLine(x1, y1, x2, y2, brightness) { - canvasContext.moveTo(x1, y1); - canvasContext.lineTo(x2, y2); -}*/ - -function colorSquare(leftX, topY, len) { - canvasContext.strokeRect(leftX, topY, len, len); - console.log('kek'); -} - -function drawFractal(sideLength) { - if (sideLength > 1) { - colorSquare(1, 1, sideLength); - // tan(15°) = deltaY / (sideLength-deltaY); - // --> - const deltaY = 1 / 2 * sideLength - Math.sqrt(3) * sideLength / 6; - const newLength = deltaY / Math.sin(Math.radians(15)); - canvasContext.translate(0, deltaY); - canvasContext.rotate(Math.radians(-15)); - drawFractal(newLength); - } -} - -canvasContext.beginPath(); // draw fractal -drawFractal(598); -canvasContext.closePath(); -canvasContext.stroke(); diff --git a/JavaScript/Archemedian Spiral Fractal/index.html b/JavaScript/Archemedian Spiral Fractal/index.html deleted file mode 100644 index 85629c765..000000000 --- a/JavaScript/Archemedian Spiral Fractal/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/JavaScript/Array_Object_methods/callbacks_and_promises.js b/JavaScript/Array_Object_methods/callbacks_and_promises.js deleted file mode 100644 index 917121190..000000000 --- a/JavaScript/Array_Object_methods/callbacks_and_promises.js +++ /dev/null @@ -1,83 +0,0 @@ -// Demo of callbacks -// 1. callback solution 1 -// 2. promises solution 2 - - -// sample delay - or can use setTimeout -const sleep = (milliseconds) => { - var start = new Date().getTime(); - for (var i = 0; i < 1e7; i++) { - if ((new Date().getTime() - start) > milliseconds){ - break; - } - } - } - - const fetchData = (callback) => { - const person = { - id: 20, - name: "Lenny", - }; - - // simulate 2seconds delay on a network - console.log("Fetching..."); - sleep(3000); - callback(person); - } - - /* solution 1 */ - // callback - called when data is available - const callback = (object) => { - console.log("Your data is here: ", object); - } - - console.log("----- callback -----"); - fetchData(callback); - - // ################################################################ - /* solution 2 */ - // Promises - // no more callback, the async function returns a Promise - - const fetchData2 = () => { - const person = { - id: 20, - name: "Lenny", - }; - - // simulate 2seconds delay on a network with setTimeout - return new Promise((resolve, reject) => { - // simulate 2seconds delay on a network - console.log("Fetching..."); - sleep(3000); - resolve(person); // return response with resolve - // reject if there is any error - }); - } - - console.log("----- promises -----"); - - fetchData2().then(results => { - console.log("Your data is here: ", results); - }); - - - /* - NOTE: - doing this logs the actual Promise itself - console.log("Your data is here: ", fetchData2()); - and Promises can be chained = then().then() - */ - - - //========== SCRATCH section ================// - - // fetch('https://jsonplaceholder.typicode.com/users') - // .then(response => response.json()) - // .then(json => console.log(json)) - - // alternative - - // setTimeout(() => { - // callback(person); // return data - // }, 3000); \ No newline at end of file diff --git a/JavaScript/Array_Object_methods/filter.js b/JavaScript/Array_Object_methods/filter.js deleted file mode 100644 index 23a985fce..000000000 --- a/JavaScript/Array_Object_methods/filter.js +++ /dev/null @@ -1,23 +0,0 @@ -console.log(`=== demo of js Array-object filter() ===`); - -arr = [ - {"name": 'abc', "num": 123}, - {"name": 'def', "num": 456}, - {"name": 'ghi', "num": 789} - ]; - -// orig -console.log(`Orig array: ${JSON.stringify(arr, null, 2)}`); - -console.log("---search---"); -// filter to search an item -var searchString = 'ghi'; -var result = arr.filter(function(item) {return item["name"] === searchString}); - -console.log(`Search 'ghi' result: ${JSON.stringify(result)}`); - - -console.log("---delete---"); -// filter to delete an item -arr = arr.filter(function(item) {return item["name"] !== searchString}); -console.log(`After deleting 'ghi', array: ${JSON.stringify(arr, null, 2)}`); \ No newline at end of file diff --git a/JavaScript/Array_Object_methods/reduce.js b/JavaScript/Array_Object_methods/reduce.js deleted file mode 100644 index 32d9ecd95..000000000 --- a/JavaScript/Array_Object_methods/reduce.js +++ /dev/null @@ -1,17 +0,0 @@ -console.log("Demo of JS reduce()"); -const arr = [{id: 1, age: 27, name: "Lenny"}, {id: 2, age: 30, name: "Jimmy"}, {id: 3, age: 45, name: "Manny"}]; -console.log(`Array: ${JSON.stringify(arr, null, 2)}`); - -const result = arr.reduce((acc, curr) => { - acc[curr.id] = curr; - return acc; - }, {}); - -console.log(`Equivalent object: ${JSON.stringify(result, null, 2)}`); - -const age_sum = arr.reduce((acc, curr) => { - acc += curr.age; - return acc; - }, 0); - -console.log(`Total age: ${JSON.stringify(age_sum, null, 2)}`); diff --git a/JavaScript/AsyncAwaitErrorHandler/index.js b/JavaScript/AsyncAwaitErrorHandler/index.js deleted file mode 100644 index 405d41201..000000000 --- a/JavaScript/AsyncAwaitErrorHandler/index.js +++ /dev/null @@ -1,13 +0,0 @@ -// Utility to handle await error gracefully. -const AsyncAwaitErrorHandler = async (promise) => { - let success; - let failure; - try { - success = await promise; - } catch (e) { - failure = e; - } - return [failure, success]; -}; - -module.exports = AsyncAwaitErrorHandler; \ No newline at end of file diff --git a/JavaScript/AsyncAwaitErrorHandler/test.js b/JavaScript/AsyncAwaitErrorHandler/test.js deleted file mode 100644 index 73e01db01..000000000 --- a/JavaScript/AsyncAwaitErrorHandler/test.js +++ /dev/null @@ -1,39 +0,0 @@ -const AsyncAwaitErrorHandler = require('./index'); -// Test -// Simple divide example - -const asyncDivide = (a, b, time = 0) => { - return new Promise((success, failure) => { - setTimeout(() => { - if (isNaN(a) || isNaN(b)) { - failure(`Dividend and Divisor should be of number type`); - return; - } - if (b === 0) { - failure(`Can't divide by 0`); - } else { - const res = a / b; - success(res) - } - }, time); - }) -} - -const verify = async () => { - const [err0, sum0] = await AsyncAwaitErrorHandler(asyncDivide()); - console.log(err0); - - const [err1, sum1] = await AsyncAwaitErrorHandler(asyncDivide(2, 3)); - console.log(sum1); - - const [err2, sum2] = await AsyncAwaitErrorHandler(asyncDivide('2E', 3)); - console.log(err2); - - const [err3, sum3] = await AsyncAwaitErrorHandler(asyncDivide(3, 0)); - console.log(err3); - - const [err4, sum4] = await AsyncAwaitErrorHandler(asyncDivide(2, 3, 100)); - console.log(sum1); -} - -verify(); \ No newline at end of file diff --git a/JavaScript/Ayzrl.js b/JavaScript/Ayzrl.js deleted file mode 100644 index 91a329f84..000000000 --- a/JavaScript/Ayzrl.js +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello, world"); diff --git a/JavaScript/BST/inOrderTraversal.js b/JavaScript/BST/inOrderTraversal.js deleted file mode 100644 index b57b6bb01..000000000 --- a/JavaScript/BST/inOrderTraversal.js +++ /dev/null @@ -1,7 +0,0 @@ -function inOrder(tree) { // prints contents of tree in numberical order - if (tree) { - inOrder(tree.left); - console.log(tree.val); - inOrder(tree.right); - } -} \ No newline at end of file diff --git a/JavaScript/BST/makeBST.js b/JavaScript/BST/makeBST.js deleted file mode 100644 index dd1bc4fbb..000000000 --- a/JavaScript/BST/makeBST.js +++ /dev/null @@ -1,27 +0,0 @@ -function BST(val) { - this.val = val; - this.left = null; - this.right = null; -} - -BST.prototype.add = function (val) { - let curr = this; - const newNode = new BST(val); - while (curr) { - if (val >= curr.val) { - // traverse right - if (!curr.right) { - curr.right = newNode; - return; // function ends - } - curr = curr.right - } else { - //traverse left - if (!curr.left) { - curr.left = newNode; - return; - } - curr = curr.left; - } - } -} \ No newline at end of file diff --git a/JavaScript/Background_generator/index.html b/JavaScript/Background_generator/index.html deleted file mode 100644 index ee50ce02b..000000000 --- a/JavaScript/Background_generator/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Gradient Background - - - - -

Background Generator

- - -

Current CSS Background

-

- - - \ No newline at end of file diff --git a/JavaScript/Background_generator/script.js b/JavaScript/Background_generator/script.js deleted file mode 100644 index 903548b05..000000000 --- a/JavaScript/Background_generator/script.js +++ /dev/null @@ -1,13 +0,0 @@ -var css = document.querySelector("h3"); -var color1=document.querySelector(".color1"); -var color2=document.querySelector(".color2"); -var body = document.getElementById("gradient"); - -function setGradient(){ - body.style.background = "linear-gradient(to right, " + color1.value +", " + color2.value + ")"; - css.textContent = body.style.background + ";"; -} - -color1.addEventListener("input", setGradient); - -color2.addEventListener("input", setGradient); \ No newline at end of file diff --git a/JavaScript/Background_generator/style.css b/JavaScript/Background_generator/style.css deleted file mode 100644 index 58abf2741..000000000 --- a/JavaScript/Background_generator/style.css +++ /dev/null @@ -1,26 +0,0 @@ -body { - font: 'Raleway', sans-serif; - color: rgba(0,0,0,.5); - text-align: center; - text-transform: uppercase; - letter-spacing: .5em; - top: 15%; - background: linear-gradient(to right, purple , green); /* Standard syntax */ -} - -h1 { - font: 600 3.5em 'Raleway', sans-serif; - color: rgba(0,0,0,.5); - text-align: center; - text-transform: uppercase; - letter-spacing: .5em; - width: 100%; -} - -h3 { - font: 900 1em 'Raleway', sans-serif; - color: rgba(0,0,0,.5); - text-align: center; - text-transform: none; - letter-spacing: 0.01em; -} diff --git a/JavaScript/BonjourMonde/index.html b/JavaScript/BonjourMonde/index.html deleted file mode 100644 index 91424fa26..000000000 --- a/JavaScript/BonjourMonde/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Hello World - Praveen - - -

Clique pour faire afficher l'alerte!

- - - - diff --git a/JavaScript/BonjourMonde/index.js b/JavaScript/BonjourMonde/index.js deleted file mode 100644 index addd39602..000000000 --- a/JavaScript/BonjourMonde/index.js +++ /dev/null @@ -1,4 +0,0 @@ -addEventListener('click', () => { - //prompt a alert while clicking - alert("Bonjour le Monde!"); -}); \ No newline at end of file diff --git a/JavaScript/Colour Guessing Game/colorGame.css b/JavaScript/Colour Guessing Game/colorGame.css deleted file mode 100644 index 7c3f06036..000000000 --- a/JavaScript/Colour Guessing Game/colorGame.css +++ /dev/null @@ -1,78 +0,0 @@ -/* -created during the following course https://www.udemy.com/the-web-developer-bootcamp/ -*/ - -body { - background-color: #232323; - margin: 0; - font-family: "Montserrat", "Avenir"; -} - -.square { - width: 30%; - background: purple; - padding-bottom: 30%; - float: left; - margin: 1.66%; - border-radius: 15%; - transition: background 0.6s; - -webkit-transition: background 0.6s; - -moz-transition: background 0.6s; -} - -#container { - margin: 20px auto; - max-width: 600px; -} - -h1 { - text-align: center; - line-height: 1.1; - font-weight: normal; - color: white; - background: steelblue; - margin: 0; - text-transform: uppercase; - padding: 20px 0; -} - -#colorDisplay { - font-size: 200%; -} - -#message { - display: inline-block; - width: 20%; -} - -#stripe { - background: white; - height: 30px; - text-align: center; - color: black; -} - -.selected { - color: white; - background: steelblue; -} - -button { - border: none; - background: none; - text-transform: uppercase; - height: 100%; - font-weight: 700; - color: steelblue; - letter-spacing: 1px; - font-size: inherit; - transition: all 0.3s; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - outline: none; -} - -button:hover { - color: white; - background: steelblue; -} diff --git a/JavaScript/Colour Guessing Game/colorGame.html b/JavaScript/Colour Guessing Game/colorGame.html deleted file mode 100644 index ab3b42030..000000000 --- a/JavaScript/Colour Guessing Game/colorGame.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Color Game - - - -

- The Great -
- RGB -
- Color Game -

- -
- - - - -
- -
-
-
-
-
-
-
-
- - - - diff --git a/JavaScript/Colour Guessing Game/colorGame.js b/JavaScript/Colour Guessing Game/colorGame.js deleted file mode 100644 index 3473954f9..000000000 --- a/JavaScript/Colour Guessing Game/colorGame.js +++ /dev/null @@ -1,113 +0,0 @@ -//created during the following course https://www.udemy.com/the-web-developer-bootcamp/ - -var numSquares = 6; -var colors = []; -var pickedColor; -var squares = document.querySelectorAll(".square"); -var colorDisplay = document.getElementById("colorDisplay"); -var messageDisplay = document.querySelector("#message"); -var h1 = document.querySelector("h1"); -var resetButton = document.querySelector("#reset"); -var modeButtons = document.querySelectorAll(".mode"); - - -init(); - -function init(){ - setupModeButtons(); - setupSquares(); - reset(); -} - -function setupModeButtons(){ - for(var i = 0; i < modeButtons.length; i++){ - modeButtons[i].addEventListener("click", function(){ - modeButtons[0].classList.remove("selected"); - modeButtons[1].classList.remove("selected"); - this.classList.add("selected"); - this.textContent === "Easy" ? numSquares = 3: numSquares = 6; - reset(); - }); - } -} - -function setupSquares(){ - for(var i = 0; i < squares.length; i++){ - //add click listeners to squares - squares[i].addEventListener("click", function(){ - //grab color of clicked square - var clickedColor = this.style.background; - //compare color to pickedColor - if(clickedColor === pickedColor){ - messageDisplay.textContent = "Correct!"; - resetButton.textContent = "Play Again?" - changeColors(clickedColor); - h1.style.background = clickedColor; - } else { - this.style.background = "#232323"; - messageDisplay.textContent = "Try Again" - } - }); - } -} - - - -function reset(){ - colors = generateRandomColors(numSquares); - //pick a new random color from array - pickedColor = pickColor(); - //change colorDisplay to match picked Color - colorDisplay.textContent = pickedColor; - resetButton.textContent = "New Colors" - messageDisplay.textContent = ""; - //change colors of squares - for(var i = 0; i < squares.length; i++){ - if(colors[i]){ - squares[i].style.display = "block" - squares[i].style.background = colors[i]; - } else { - squares[i].style.display = "none"; - } - } - h1.style.background = "steelblue"; -} - -resetButton.addEventListener("click", function(){ - reset(); -}) - -function changeColors(color){ - //loop through all squares - for(var i = 0; i < squares.length; i++){ - //change each color to match given color - squares[i].style.background = color; - } -} - -function pickColor(){ - var random = Math.floor(Math.random() * colors.length); - return colors[random]; -} - -function generateRandomColors(num){ - //make an array - var arr = [] - //repeat num times - for(var i = 0; i < num; i++){ - //get random color and push into arr - arr.push(randomColor()) - } - //return that array - return arr; -} - -function randomColor(){ - //pick a "red" from 0 - 255 - var r = Math.floor(Math.random() * 256); - //pick a "green" from 0 -255 - var g = Math.floor(Math.random() * 256); - //pick a "blue" from 0 -255 - var b = Math.floor(Math.random() * 256); - return "rgb(" + r + ", " + g + ", " + b + ")"; -} diff --git a/JavaScript/DiamondSquare.js b/JavaScript/DiamondSquare.js deleted file mode 100644 index 58fce9d7b..000000000 --- a/JavaScript/DiamondSquare.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; - -/** - * A Diamond Square implementation operating on flat `Float32Array`. - */ -class DiamondSquare { - - /** - * Creates a heightmap based on parameters passed. - * @param {number} sideLength - Side length of a the resulting grid array. Diamond-Square can only have a size (2^n)+1. - * @param {number} maxHeight - Max height value for the heightmap's values. - * @param {number} roughness - A factor which is used as offset value for the heightmap. Defines the roughness of a heightmap. - * @returns {Float32Array} - A flat `Float32Array` representing a 2D-grid with size `sideLength * sideLength`. - */ - static HeightMap(sideLength, maxHeight, roughness) { - - const n = Math.log(sideLength - 1) / Math.log(2); - if (n < 0 || n % 1 != 0) { - throw "Invalid side length in Diamond Square: Side Length has to be in range of `(2^n) + 1`."; - } - - let gridArray = new Float32Array(sideLength * sideLength); - this._initGrid(gridArray, sideLength, maxHeight); - this._seed(gridArray, sideLength, roughness); - - return gridArray; - } - - /** - * Sets the initial corner values for a Diamond-Square grid. - * @param {Float32Array} gridArray - An `Float32Array` with its values (ideally) set to `0`. - * @param {number} sideLength - Side length of a the resulting grid array. Diamond-Square can only have a size `(2^n)+1`. - * @param {number} maxHeight - Max height value for the heightmap's values. - * @returns {Float32Array} - A flat `Float32Array` representing a 2D-grid with its NW, NE, SE and SW values initialized. - */ - static _initGrid(gridArray, sideLength, maxHeight) { - - gridArray[0] = MathHelper.RandomInt(0, maxHeight); // NW - gridArray[sideLength - 1] = MathHelper.RandomInt(0, maxHeight); // NE - gridArray[sideLength * sideLength - 1] = MathHelper.RandomInt(0, maxHeight); // SE - gridArray[sideLength * sideLength - sideLength] = MathHelper.RandomInt(0, maxHeight); // SW - - return gridArray; - } - - /** - * Performs the Diamond Square (aka. Midpoint displacement) algorithm on a given flat TypedArray. - * @param {Float32Array} gridArray - An (Diamond-Square-initialized) `Float32Array`. - * @param {number} sideLength - Side length of a the resulting grid array. - * @param {number} roughness - A factor which is used as offset value for the heightmap. Defines the roughness of a heightmap. - * @returns {Float32Array} - Returns a ready to use heightmap produced by the Diamond-Square algorithm. - */ - static _seed(gridArray, sideLength, roughness) { - let step = Math.sqrt(gridArray.length) - 1; - let size = Math.sqrt(gridArray.length) - 1; - let currentRoughness = roughness; - - while (step / 2 >= 1) { - let rough = MathHelper.RandomInt(0, currentRoughness); // TODO: WARN: Random function should return float - - let numSquares = (Math.pow(size, 2)) / (Math.pow(step, 2)); - let perRowSquares = Math.floor(Math.sqrt(numSquares)); - for (let i = 0; i < perRowSquares; i++) { - for (let j = 0; j < perRowSquares; j++) { - const nwIndex = this._getNWIndex(i, j, step, sideLength); - const cornerValues = this._getCornerValues(nwIndex, gridArray, sideLength, step); - this._diamondStep(nwIndex, cornerValues, gridArray, sideLength, step); - this._squareStep(nwIndex, cornerValues, gridArray, sideLength, step, rough); - } - } - - currentRoughness /= 2.0; - step /= 2; - } - - return gridArray; - } - - /** - * Performs the Diamond Step by setting the center value for the current step. - * @param {number} nwIndex - North-West index for current step. - * @param {number[]} cornerValues - The corner values for the current step. - * @param {Float32Array} gridArray - Array holding heightmap data. Function will write to this array. - * @param {number} sideLength - Grid's side length. - * @param {number} stepSize - Current step size. - * @returns {Float32Array} - Returns the typed array the function of operating on. - */ - static _diamondStep(nwIndex, cornerValues, gridArray, sideLength, stepSize) { - - // Center point. Calculated from "East - `stepSize / 2`" - gridArray[(((nwIndex + stepSize * sideLength) + stepSize) - (stepSize * sideLength) / 2) - stepSize / 2] - = (cornerValues[0] + cornerValues[1] + cornerValues[2] + cornerValues[3]) / 4; - - return gridArray; - } - - /** - * Performs the Square Step by setting the north, east, south and west values for the current step. - * @param {number} nwIndex - North-West index for current step. - * @param {number[]} cornerValues - The corner values for the current step. - * @param {Float32Array} gridArray - Array holding heightmap data. Function will write to this array. - * @param {number} sideLength - Grid's side length. - * @param {number} stepSize - Current step size. - * @param {number} roughness - Roughness factor for the current step. - * @returns {Float32Array} - Returns the typed array the function of operating on. - */ - static _squareStep(nwIndex, cornerValues, gridArray, sideLength, stepSize, roughness) { - - const average = (cornerValues[0] + cornerValues[1] + cornerValues[2] + cornerValues[3]) / 4; - const value = average + (roughness * MathHelper.RandomInt(-1, 1)); - - // N - gridArray[nwIndex + (stepSize / 2)] = value; - // E - gridArray[((nwIndex + stepSize * sideLength) + stepSize) - (stepSize * sideLength) / 2] = value; - // S - gridArray[(nwIndex + stepSize * sideLength) + stepSize / 2] = value; - // W - gridArray[(nwIndex + stepSize * sideLength) - (stepSize * sideLength) / 2] = value; - - return gridArray; - } - - /** - * Return an array holding the north-west, north-east, south-west and south-east values for the current step. - * @param {number} nwIndex - North-West index for current step. - * @param {Float32Array} gridArray - The corner values for the current step. - * @param {number} sideLength - Grid's side length. - * @param {number} stepSize - Current step size. - * @returns {Float32Array} - Returns the typed array the function of operating on. - */ - static _getCornerValues(nwIndex, gridArray, sideLength, stepSize) { - return [ - gridArray[nwIndex], // NW - gridArray[nwIndex + stepSize], // NE - gridArray[nwIndex + stepSize * sideLength], // SW - gridArray[nwIndex + stepSize + stepSize * sideLength] // SE - ]; - } - - /** - * Returns the array index for the north-west value for the current step. - * @param {number} i - Current row, I guess. - * @param {number} j - Current column, I guess. - * @param {number} stepSize - Current step size. - * @param {number} sideLength - Grid's side length. - * @returns {number} - Returns the index for current north-west value. - */ - static _getNWIndex(i, j, stepSize, sideLength) { - return (i * (stepSize * sideLength)) + j * stepSize; - } - - /** - * Produces an array holding all valid Diamond Square grid sizes up to a passed max value. - * @param {number} max - The maximum amount of iteration sizes to produce. - * @returns {number[]} - Array holding valid Diamond Square grid sizes. - */ - static GenerateIterations(max) { - let iterations = []; - for (let n = 0; n < max; n++) { - iterations.push(Math.pow(2, n) + 1); - } - return iterations; - } - -} - diff --git a/JavaScript/FastandFurious b/JavaScript/FastandFurious deleted file mode 100644 index 1e3efc3ba..000000000 --- a/JavaScript/FastandFurious +++ /dev/null @@ -1,20 +0,0 @@ -var stockCar = { - model: "Tesla", - year: 2018, - automaticTransmission: true, - driver: null, - passengers: [] -}; - -console.log(stockCar); - -function detectingTransmission(obj){ - if(obj.automaticTransmission === true){ - return "Relax kid, it's automatic"; - }else{ - return "Manual process son"; - } -} - -var isAutomaticTransmission = detectingTransmission(stockCar); -console.log(isAutomaticTransmission); diff --git a/JavaScript/Fractal Tree/fractal.html b/JavaScript/Fractal Tree/fractal.html deleted file mode 100644 index 474f5d464..000000000 --- a/JavaScript/Fractal Tree/fractal.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/JavaScript/Fractal Tree/fractal.js b/JavaScript/Fractal Tree/fractal.js deleted file mode 100644 index 9f4e518b3..000000000 --- a/JavaScript/Fractal Tree/fractal.js +++ /dev/null @@ -1,61 +0,0 @@ -/* VERSION 20170925 -TODO------------------------------------------ -----------------------------------------------*/ - -Math.radians = function(degrees){ - return degrees * Math.PI / 180; -}; -Math.degrees = function(radians){ - return radians * 180 / Math.PI; -}; - -var angle = Math.radians(22); -var fps = 30; -var canvas; -var canvasContext; -var stemThickness = 5; - -window.onload = function(){ - canvas = document.getElementById('canvas'); - canvasContext = canvas.getContext('2d'); - constructTree(canvas.height/5); -}; - -function constructTree(l){ - colorRect(0,0,canvas.width,canvas.height,'#333') - canvasContext.translate(canvas.width/2,canvas.height); - branch(l, stemThickness); - - //fix bug(stem is too thin, exactly half the size it is supposed to be) - canvasContext.translate(canvas.width/2+w,canvas.height); //draw a seperate branch - branch(l, stemThickness); -} - -function branch(len, thickness) { - drawLine(0, 0, 0, -len, thickness, '#ddd'); - canvasContext.translate(0, -len); - if (len > 3) { - canvasContext.save(); - canvasContext.rotate(angle); - branch(len * 0.75, thickness-0.75); - canvasContext.restore(); - canvasContext.save(); - canvasContext.rotate(-angle); - branch(len * 0.75, thickness-0.75); - canvasContext.restore(); - } -} - -function drawLine(fromX, fromY, toX, toY, lineThickness, drawColor){ - canvasContext.lineWidth = lineThickness; - canvasContext.strokeStyle = drawColor; - canvasContext.beginPath(); - canvasContext.moveTo(fromX,fromY); - canvasContext.lineTo(toX,toY); - canvasContext.stroke(); -} - -function colorRect(leftX, topY, width, height, drawColor){ - canvasContext.fillStyle = drawColor; - canvasContext.fillRect(leftX, topY, width, height); -} diff --git a/JavaScript/Fractal Tree/fractal_rec2.js b/JavaScript/Fractal Tree/fractal_rec2.js deleted file mode 100644 index f64f139d5..000000000 --- a/JavaScript/Fractal Tree/fractal_rec2.js +++ /dev/null @@ -1,34 +0,0 @@ -//This fractal tree is based on a recursive definition, where it draws a new tree every iteration - -var canvas = document.getElementById('canvas'); -var canvasContext = canvas.getContext('2d'); - -//add math methods radians and degree for conversion -Math.radians = function(degrees){ - return degrees * Math.PI / 180; -}; - -var depth = 9; //tree size (how much you see -> depth) - -function drawLine(x1, y1, x2, y2, brightness){ - canvasContext.moveTo(x1, y1); - canvasContext.lineTo(x2, y2); -} - -function drawTree(x1, y1, angle, depth){ - if (depth !== 0){ - var x2 = x1 + (Math.cos(Math.radians(angle)) * depth * 10.0); //calculate positions of two branches - var y2 = y1 + (Math.sin(Math.radians(angle)) * depth * 10.0); - drawLine(x1, y1, x2, y2, depth); - drawTree(x2, y2, angle - 20, depth - 1); //left tree, reduce depth (visibility) on every iteration - drawTree(x2, y2, angle + 20, depth - 1); //right tree - } -} - -canvasContext.fillStyle = 'black'; //setup -canvasContext.lineWidth = 1; - -canvasContext.beginPath(); //initial tree -drawTree(300, 500, -90, depth); -canvasContext.closePath(); -canvasContext.stroke(); diff --git a/JavaScript/Fractal Tree/index.html b/JavaScript/Fractal Tree/index.html deleted file mode 100644 index 1b1e66e52..000000000 --- a/JavaScript/Fractal Tree/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/JavaScript/GameOfLife/main.css b/JavaScript/GameOfLife/main.css deleted file mode 100644 index 0d8010e9e..000000000 --- a/JavaScript/GameOfLife/main.css +++ /dev/null @@ -1,39 +0,0 @@ -html { - margin: 0; - height: 100%; -} - -body { - font-family: 'Courier New', Courier, monospace; -} - -.main { - display: flex; - margin: 0; - height: 100%; -} - -.menu { - padding: 5px; - width: 300px; - - display: flex; - flex-direction: column; - align-items: center; -} - -.menu h1 { - font-size: 18px; -} - -.slider { - margin: 5px; - width: 100%; - height: 20px; -} - -.control-button { - width: 150px; - height: 30px; - margin-top: 20px; -} \ No newline at end of file diff --git a/JavaScript/GameOfLife/main.html b/JavaScript/GameOfLife/main.html deleted file mode 100644 index f3403c4ad..000000000 --- a/JavaScript/GameOfLife/main.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - Conway's Game of Life - - - - -
- - -
- - Game of Life field - -
-
- - - - \ No newline at end of file diff --git a/JavaScript/GameOfLife/main.js b/JavaScript/GameOfLife/main.js deleted file mode 100644 index 91a0ef84d..000000000 --- a/JavaScript/GameOfLife/main.js +++ /dev/null @@ -1,261 +0,0 @@ -function drawLive(x, y) { - context.fillRect(cellSize * x, cellSize * y, cellSize, cellSize); -} - -function drawDead(x, y) { - context.strokeRect(cellSize * x, cellSize * y, cellSize, cellSize); -} - -function drawField() { - context.clearRect(0, 0, field.width, field.height); - var stateToDraw = running ? currentState : initialState; - stateToDraw.forEach( - (col, x) => col.forEach( - (cell, y) => cell ? drawLive(x, y) : drawDead(x, y) - ) - ); -} - -function handleFieldClick(event) { - if (running && !paused) return; - - var x = Math.floor(event.offsetX / cellSize); - var y = Math.floor(event.offsetY / cellSize); - - if (x >= size || y >= size || x < 0 || y < 0) return; - - var stateToDraw = running ? currentState : initialState; - stateToDraw[x][y] = !stateToDraw[x][y]; - drawField(); -} - -function countAliveAround(x, y) { - var above = y > 0 ? y - 1 : size - 1; - var below = y < size - 1 ? y + 1 : 0; - var right = x < size - 1 ? x + 1 : 0; - var left = x > 0 ? x - 1 : size - 1; - return ( - currentState[left][above] + currentState[x][above] + currentState[right][above] + - currentState[left][y] + currentState[right][y] + - currentState[left][below] + currentState[x][below] + currentState[right][below] - ); -} - -function updateState() { - currentState.forEach( - (col, x) => col.forEach( - (cell, y) => { - var aliveAround = countAliveAround(x, y); - if (cell && (aliveAround === 2 || aliveAround === 3) || - !cell && aliveAround === 3) { - newState[x][y] = true; - } - else newState[x][y] = false; - } - ) - ) - var tmp = currentState; - currentState = newState; - newState = tmp; -} - -function loop() { - if (running && !paused) { - return window.setInterval(() => { - updateState(); - drawField(); - genCount++; - genText.innerHTML = genCount; - // loop(); - }, period * 1000); - } -} - -function abort() { - window.clearInterval(timer); - running = paused = false; - genCount = 0; - drawField(); -} - -function start() { - if (!paused) { - initialState.forEach( - (col, i) => col.forEach( - (elem, j) => currentState[i][j] = elem - ) - ); - } - running = true; - paused = false; - - timer = loop(); -} - -function pause() { - window.clearInterval(timer); - paused = true; -} - -function clear() { - initialState.forEach(col => col.fill(false)); - drawField(); -} - -function onStartClick() { - startPauseButton.value = 'Pause'; - startPauseButton.removeEventListener('click', onStartClick); - startPauseButton.addEventListener('click', onPauseClick); - clearButton.disabled = true; - sizeSlider.disabled = true; - periodSlider.disabled = true; - start(); -} - -function onPauseClick() { - startPauseButton.value = 'Start'; - startPauseButton.removeEventListener('click', onPauseClick); - startPauseButton.addEventListener('click', onStartClick); - periodSlider.disabled = false; - pause(); -} - -function onAbortClick() { - startPauseButton.value = 'Start'; - startPauseButton.removeEventListener('click', onPauseClick); - startPauseButton.addEventListener('click', onStartClick); - clearButton.disabled = false; - sizeSlider.disabled = false; - periodSlider.disabled = false; - genCount = 0; - genText.innerHTML = genCount; - abort(); -} - -function onClearClick() { - if (!running) clear(); -} - -function shrinkStates(diff) { - for (var i = 0; i < diff; i++) { - initialState.pop(); - currentState.pop(); - newState.pop(); - } - for (var i = 0; i < diff; i++) { - initialState.forEach(col => col.pop()); - currentState.forEach(col => col.pop()); - newState.forEach(col => col.pop()); - } -} - -function expandStates(diff) { - for (var i = 0; i < diff; i++) { - initialState.push(new Array(size)); - initialState[initialState.length - 1].fill(false); - currentState.push(new Array(size)); - currentState[currentState.length - 1].fill(false); - newState.push(new Array(size)); - newState[newState.length - 1].fill(false); - } - for (var i = 0; i < diff; i++) { - initialState.forEach(col => col.push(false)); - currentState.forEach(col => col.push(false)); - newState.forEach(col => col.push(false)); - } -} - -function updateStatesSizes(newSize) { - var sizeDiff = newSize - size; - - if (sizeDiff > 0) expandStates(sizeDiff); - else if (sizeDiff < 0) shrinkStates(-sizeDiff); -} - -function updateSize(event) { - if (!event) return; - var newSize = event.target.valueAsNumber; - if (newSize === size) return; - cellSize = field.width / newSize < defaultCellSize - ? Math.floor(field.width / newSize) - : defaultCellSize; - - updateStatesSizes(newSize); - - size = newSize; - sizeText.innerHTML = size; - abort(); - drawField(); -} - -function initializeState() { - newState = new Array(size); - currentState = new Array(size); - initialState = new Array(size); - for (var i = 0; i < size; i++) { - newState[i] = new Array(size); - currentState[i] = new Array(size); - initialState[i] = new Array(size); - } - clear(); - abort(); - drawField(); -} - -var running = false; -var paused = false; - -var timer; - -var field = document.getElementById('field'); -var fieldContainer = document.getElementById('fieldContainer').getBoundingClientRect(); -var maxHeight = window.innerHeight - fieldContainer.y - 25; -var maxWidth = window.innerWidth - fieldContainer.x - fieldContainer.y; -field.width = field.height = maxHeight > maxWidth ? maxWidth : maxHeight; -var context = field.getContext('2d'); -field.addEventListener('click', handleFieldClick); - -var defaultCellSize = 50; -var cellSize = defaultCellSize; - -var genCount = 0; -var genText = document.getElementById('genText'); - -var sizeText = document.getElementById('sizeText'); -var sizeSlider = document.getElementById('sizeSlider'); -var size = Number(sizeSlider.value); - -var periodText = document.getElementById('periodText'); -var periodSlider = document.getElementById('periodSlider'); -var period = Number(periodSlider.value); - -sizeText.innerHTML = size; -// sizeSlider.oninput = () => { -// size = Number(sizeSlider.value); -// sizeText.innerHTML = size; -// updateSize(); -// drawField(); -// }; -sizeSlider.oninput = updateSize; - -periodText.innerHTML = period; -periodSlider.oninput = () => { - period = Number(periodSlider.value); - periodText.innerHTML = period; -}; - -var initialState = new Array(size); -var currentState = new Array(size); -var newState = new Array(size); - -updateSize(); - -var startPauseButton = document.getElementById('startPauseButton'); -var abortButton = document.getElementById('abortButton'); -var clearButton = document.getElementById('clearButton'); - -startPauseButton.addEventListener('click', onStartClick); -abortButton.addEventListener('click', onAbortClick); -clearButton.addEventListener('click', onClearClick); - -initializeState(); \ No newline at end of file diff --git a/JavaScript/Guitar Chord Chart Generator/chart-data.js b/JavaScript/Guitar Chord Chart Generator/chart-data.js deleted file mode 100644 index cb85febb7..000000000 --- a/JavaScript/Guitar Chord Chart Generator/chart-data.js +++ /dev/null @@ -1,752 +0,0 @@ -const chartData = [ -{ - name:' ', - fret :[' '], - finger:[' '] -}, -{ - name:'C', - fret :['x32010','x35553','x3x050','8aa988'], - finger:['032010','012341','010040','134211'] -}, -{ - name:'C#', - fret :['x46664'], - finger:['012341'] -}, -{ - name:'Db', - fret :['x46664'], - finger:['012341'] -}, -{ - name:'D', - fret :['xx0232','xx02xx','x5x77x','x57775'], - finger:['000132','000100','012341'] -}, -{ - name:'Eb', - fret :['x68886','x65343','x6x88x'], - finger:['012341','x43121','010340'] -}, -{ - name:'E', - fret :['022100','x7x99x'], - finger:['023100','010340'] -}, -{ - name:'F', - fret :['133211','xx321x','x87565','x8xaax'], - finger:['134211','003210','x43121','010340'] -}, -{ - name:'F#', - fret :['244322'], - finger:['134211'] -}, -{ - name:'G', - fret :['320033','32000x','355433','xx5433','320003'], - finger:['210034','320000','134211','xx3211','320004'] -}, -{ - name:'G#', - fret :['466544'], - finger:['134211'] -}, -{ - name:'Ab', - fret :['466544'], - finger:['134211'] -}, -{ - name:'A', - fret :['x02220','x07650','577655'], - finger:['001230','003210','134211'] -}, -{ - name:'Bb', - fret :['x13331','xxx336','688766'], - finger:['012341','xxx114','134211'] -}, -{ - name:'B', - fret :['x24442'], - finger:['012341'] -}, -{ - name:'C+', - fret :['x32110'], - finger:['032110'] -}, -{ - name:'CM7', - fret :['x32000','x35453'], - finger:['032000','013241'] -}, -{ - name:'DM7', - fret :['xx0222','x57675'], - finger:['000111','x13241'] -}, -{ - name:'FM7', - fret :['132211','xx3210','1x2210'], - finger:['142311','003210','103420'] -}, -{ - name:'GM7', - fret :['320002','3x0032','3x443x'], - finger:['320001','200031','1x342x'] -}, -{ - name:'AM7', - fret :['x02120'], - finger:['002130'] -}, -{ - name:'BbM7', - fret :['x13231','xxx335'], - finger:['013241','xxx114'] -}, -{ - name:'C7', - fret :['x32310'], - finger:['032410'] -}, -{ - name:'C#7', - fret :['x46464'], - finger:['013141'] -}, -{ - name:'D7', - fret :['xx0212','x57575'], - finger:['000213','013141'] -}, -{ - name:'Eb7', - fret :['x68686'], - finger:['013141'] -}, -{ - name:'E7', - fret :['020100'], - finger:['020100'] -}, -{ - name:'F7', - fret :['131211'], - finger:['131211'] -}, -{ - name:'F#7', - fret :['242322'], - finger:['131211'] -}, -{ - name:'G7', - fret :['320001','353433'], - finger:['320001','131211'] -}, -{ - name:'G#7', - fret :['464544'], - finger:['131211'] -}, -{ - name:'A7', - fret :['x02020','x02223','5x565x'], - finger:['001230','001114','1x243x'] -}, -{ - name:'Bb7', - fret :['x13131'], - finger:['013141'] -}, -{ - name:'B7', - fret :['x24242','x21202'], - finger:['013141','021304'] -}, -{ - name:'Cm', - fret :['x35543'], - finger:['013421'] -}, -{ - name:'C#m', - fret :['x46654','x46650'], - finger:['013421','013420'] -}, -{ - name:'Dm', - fret :['xx0231','x57765'], - finger:['000231','013421'] -}, -{ - name:'Ebm', - fret :['x68876'], - finger:['013421'] -}, -{ - name:'Em', - fret :['022000','022003','x79987','x7x080'], - finger:['023000','012004','013421','x10040'] -}, -{ - name:'Fm', - fret :['133111'], - finger:['134111'] -}, -{ - name:'F#m', - fret :['244222'], - finger:['134111'] -}, -{ - name:'Gm', - fret :['355333','3xx333'], - finger:['134111','100234'] -}, -{ - name:'G#m', - fret :['466444'], - finger:['134111'] -}, -{ - name:'Am', - fret :['x02210','x0x555','577555'], - finger:['002310','000111','134111'] -}, -{ - name:'Bbm', - fret :['x13321'], - finger:['013421'] -}, -{ - name:'Bm', - fret :['x24432','x2xx32'], - finger:['013421','010021'] -}, -{ - name:'Cm7', - fret :['x35343'], - finger:['013121'] -}, -{ - name:'C#m7', - fret :['x46454','x46600'], - finger:['013121','013400'] -}, -{ - name:'Dm7', - fret :['xx0211'], - finger:['000211'] -}, -{ - name:'Ebm7', - fret :['x68676'], - finger:['013121'] -}, -{ - name:'Em7', - fret :['022030','022033','020030'], - finger:['012040','012034','020030'] -}, -{ - name:'Fm7', - fret :['131111'], - finger:['131111'] -}, -{ - name:'F#m7', - fret :['242222','2x222x'], - finger:['131111','102340'] -}, -{ - name:'Gm7', - fret :['353333','3x333x'], - finger:['131111','102340'] -}, -{ - name:'G#m7', - fret :['464444'], - finger:['131111'] -}, -{ - name:'Am7', - fret :['x02010'], - finger:['002010'] -}, -{ - name:'Bbm7', - fret :['x13121'], - finger:['013121'] -}, -{ - name:'Bm7', - fret :['x24232','x2023x'], - finger:['013121','010230'] -}, -{ - name:'Fm9', - fret :['131113'], - finger:['131114'] -}, -{ - name:'F#m9', - fret :['242224'], - finger:['131114'] -}, -{ - name:'G#m9', - fret :['464446'], - finger:['131114'] -}, -{ - name:'Esus', - fret :['022200'], - finger:['023400'] -}, -{ - name:'F#sus', - fret :['244422'], - finger:['123411'] -}, -{ - name:'Gsus', - fret :['3x0013','355533','xx5533'], - finger:['3x0014','123411','xx3411'] -}, -{ - name:'Asus', - fret :['x02230'], - finger:['001230'] -}, -{ - name:'Bsus', - fret :['x24452','x24400'], - finger:['012341','013400'] -}, -{ - name:'Csus2', - fret :['x30033','x3003x'], - finger:['020034','02003x'] -}, -{ - name:'Dsus2', - fret :['xx0230'], - finger:['000340'] -}, -{ - name:'Gsus2', - fret :['300233','30023x'], - finger:['200134','200130'] -}, -{ - name:'Asus2', - fret :['x02200'], - finger:['002300'] -}, -{ - name:'Bbsus2', - fret :['x13311'], - finger:['013411'] -}, -{ - name:'A6', - fret :['x02222'], - finger:['001111'] -}, -{ - name:'Bb6', - fret :['xxx333'], - finger:['xxx111'] -}, -{ - name:'B6', - fret :['xx4444'], - finger:['001111'] -}, -{ - name:'A6sus', - fret :['x02232'], - finger:['001131'] -}, -{ - name:'G6sus2', - fret :['3x0230'], - finger:['200130'] -}, -{ - name:'C(9)', - fret :['x32033','x32030'], - finger:['021034','021030'] -}, -{ - name:'C9', - fret :['x32330','x3x333'], - finger:['021340','010111'] -}, -{ - name:'D9', - fret :['x5455x'], - finger:['021340'] -}, -{ - name:'B7sus2', - fret :['x24222'], - finger:['013111'] -}, -{ - name:'DM7sus2', - fret :['xx0220'], - finger:['000230'] -}, -{ - name:'C5', - fret :['x355xx','8aaxxx'], - finger:['013400','134000'] -}, -{ - name:'C#5', - fret :['x466xx'], - finger:['013400'] -}, -{ - name:'D5', - fret :['x577xx','xx023x'], - finger:['013400','000120'] -}, -{ - name:'E5', - fret :['x799xx','022xxx'], - finger:['013400','023000'] -}, -{ - name:'G5', - fret :['355xxx'], - finger:['134000'] -}, -{ - name:'Bb5', - fret :['x133xx','688xxx'], - finger:['013400','134000'] -}, -{ - name:'B5', - fret :['x244xx'], - finger:['013400'] -}, -{ - name:'G#dim', - fret :['4564xx'], - finger:['1231xx'] -}, -{ - name:'C/E', - fret :['032010','x7555x'], - finger:['032010','031110'] -}, -{ - name:'C/B', - fret :['x22010'], - finger:['034010'] -}, -{ - name:'C/G', - fret :['332010'], - finger:['342010'] -}, -{ - name:'D/C', - fret :['x3023x'], - finger:['030142'] -}, -{ - name:'D/F#', - fret :['2x023x'], - finger:['100230'] -}, -{ - name:'D/B', - fret :['x2023x'], - finger:['010230'] -}, -{ - name:'D/A', - fret :['x00232'], - finger:['000132'] -}, -{ - name:'E/G#', - fret :['4224xx','422100'], - finger:['311400','423100'] -}, -{ - name:'Em/B', - fret :['x22000'], - finger:['023000'] -}, -{ - name:'F/C', - fret :['x3321x'], - finger:['x3421x'] -}, -{ - name:'F/G', - fret :['3332xx'], - finger:['234100'] -}, -{ - name:'G/B', - fret :['x20033'], - finger:['010034'] -}, -{ - name:'A/C#', - fret :['x4222x'], - finger:['031110'] -}, -{ - name:'Bb/C', - fret :['x3333x'], - finger:['012340'] -}, -{ - name:'Bb6/D', - fret :['x53333'], - finger:['031111'] -}, -{ - name:'BbM7/D', - fret :['x53335'], - finger:['031114'] -}, -{ - name:'B/D#', - fret :['x6444x'], - finger:['031110'] -}, -{ - name:'Db/F', - fret :['xx3121'], - finger:['003121'] -}, -{ - name:'Adim', - fret :['x0121x'], - finger:['001320'] -}, -{ - name:'E(9)/B', - fret :['x22102'], - finger:['023104'] -}, -{ - name:'Esus/B', - fret :['x22200'], - finger:['023400'] -}, -{ - name:'Esus', - fret :['022200'], - finger:['023400'] -}, -{ - name:'Bsus2', - fret :['x24422'], - finger:['013411'] -}, -{ - name:'Fdim/B', - fret :['x2310x'], - finger:['023100'] -}, -{ - name:'D7dim', - fret :['x5656x'], - finger:['013240'] -}, -{ - name:'Csus2#5', - fret :['x30110'], - finger:['030110'] -}, -{ - name:'D7/C', - fret :['x3021x'], - finger:['030210'] -}, -{ - name:'F#7/C#', - fret :['x42322'], - finger:['031211'] -}, -{ - name:'G/D', - fret :['x50033','x5543x'], - finger:['040011','034210'] -}, -{ - name:'Gm/D', - fret :['x50333'], - finger:['040111'] -}, -{ - name:'Gsus2/B', - fret :['x2020x'], - finger:['010200'] -}, -{ - name:'Bbdim', - fret :['x1232x','x123xx'], - finger:['012430','012300'] -}, -{ - name:'Em(9)', - fret :['022002'], - finger:['012003'] -}, -{ - name:'Dsus', - fret :['xx0233','x5x070','xx0033'], - finger:['000134','010040','000034'] -}, -{ - name:'G/A', - fret :['x00033'], - finger:['000034'] -}, -{ - name:'G/Bb', - fret :['x10033'], - finger:['010034'] -}, -{ - name:'FM7/C', - fret :['x33210'], - finger:['034210'] -}, -{ - name:'G/E', - fret :['020033'], - finger:['010034'] -}, -{ - name:'Fm/C', - fret :['x33111'], - finger:['034111'] -}, -{ - name:'Fsus2', - fret :['xx301x'], - finger:['003010'] -}, -{ - name:'B7dim', - fret :['x2323x'], - finger:['013240'] -}, -{ - name:'D7/F#', - fret :['2x021x'], - finger:['200310'] -}, -{ - name:'Cm(9)', - fret :['x3103x'], - finger:['021030'] -}, -{ - name:'Eb6', - fret :['x6554x'], - finger:['042310'] -}, -{ - name:'E7/G#', - fret :['420100'], - finger:['420100'] -}, -{ - name:'G#M7', - fret :['4x554x'], - finger:['103420'] -}, -{ - name:'F5', - fret :['133xxx'], - finger:['134000'] -}, -{ - name:'A5', - fret :['577xxx'], - finger:['134000'] -}, -{ - name:'C#M7', - fret :['x46564'], - finger:['013241'] -}, -{ - name:'Csus', - fret :['x3301x'], - finger:['034010'] -}, -{ - name:'F/A', - fret :['x03211'], - finger:['003211'] -}, -{ - name:'D#', - fret :['x68886'], - finger:['012341'] -}, -{ - name:'C#/E#', - fret :['x8666x'], - finger:['031110'] -}, -{ - name:'Bb/D', - fret :['x5333x'], - finger:['031110'] -}, -{ - name:'Bdim', - fret :['x2343x'], - finger:['012430'] -}, -{ - name:'Fm6', - fret :['1x011x'], - finger:['100230'] -}, -{ - name:'Ebdim', - fret :['xx12x2'], - finger:['001203'] -}, -{ - name:'Edim7', - fret :['xx2323'], - finger:['001324'] -}, -{ - name:'Dm(9)/F', - fret :['xx3230'], - finger:['002130'] -}, -{ - name:'G(9)', - fret :['32020x'], - finger:['320100'] -}, -{ - name:'D11', - fret :['xx0010'], - finger:['000010'] -} -]; diff --git a/JavaScript/Guitar Chord Chart Generator/guichart.js b/JavaScript/Guitar Chord Chart Generator/guichart.js deleted file mode 100644 index c4ca2f2a9..000000000 --- a/JavaScript/Guitar Chord Chart Generator/guichart.js +++ /dev/null @@ -1,339 +0,0 @@ -// 20 sep 18 - o.js update -$ = function(selector) { - return (selector.indexOf('.') == 0) ? document.querySelectorAll(selector) : document.querySelector(selector); -}; - -const guichart = { - c: null, - ctx: null, - scale:1, - palette:{ - base:'white', - finger:'white', - open:'black', - nut:'black', - special1:'dodgerblue', - special2:'violet', - fretNum:'black', - fret:'black', - string:'black', - name:'black', - circle:'MidnightBlue', - circleText:'black' - }, - drawNut: function() { - var ctx = this.ctx; - ctx.fillStyle = this.palette.nut; - // ctx.fillStyle = '#bbb'; - ctx.fillRect(this.x-1,this.y-3*this.scale,5*this.stringPadding+2,3*this.scale); - // ctx.fillStyle = '#bbb'; - // ctx.beginPath(); - // ctx.strokeStyle = '#bbb'; - // ctx.lineCap = 'round'; - // ctx.lineWidth = 3*this.scale; - // ctx.moveTo(this.x+1*this.scale,this.y-2*this.scale); - // ctx.lineTo(6*this.stringPadding+this.stringPadding/4,this.y-2*this.scale); - // ctx.stroke(); - - // ctx.lineWidth = 1; - }, - drawString: function() { - var ctx = this.ctx; - ctx.beginPath(); - ctx.strokeStyle = this.palette.string; - ctx.lineWidth = 1*this.scale - // ctx.strokeStyle = '#bbb'; - for (var i=0; i<6; i++) - { - ctx.moveTo(this.x+i*this.stringPadding,this.y); - ctx.lineTo(this.x+i*this.stringPadding,this.y+4*this.fretPadding); - } - ctx.stroke(); - }, - drawFret: function() { - var ctx = this.ctx; - ctx.beginPath() - ctx.strokeStyle = this.palette.fret; - // ctx.strokeStyle = '#bbb'; - for (var i=0; i < 5; i++) - { - ctx.moveTo(this.x,this.y+i*this.fretPadding); - ctx.lineTo(this.x+5*this.stringPadding,this.y+i*this.fretPadding); - } - ctx.stroke(); - }, - calculateFret: function(chord) { - var max = 4; - var min = 1; - chord = chord.split(',') - if (chord.length == 1) - chord = chord[0].split(''); - - chord.forEach((t,i) => { - if (t == 'a') - chord[i] = 10; - }); - for (var i=0,c,once=true; c=chord[i]*1,i < chord.length; i++) - { - if (c > max && once) - { - min = c; - once = false; - } - if (c > max) max = c; - if (c < min) min = c; - } - var fret; - if (max-min <=2 && max > 4) - { - fret = max-2; - if (max-min == 0) - fret -= 1; - } - else - fret = max-3; - - return fret; - }, - drawFretNumber: function(fret) { - var ctx = this.ctx; - if (fret > 1) - { - // ctx.fillStyle = this.palette.fretNum; - ctx.fillStyle = this.palette.fretNum; - // ctx.filter = 'opacity(0.9)'; - ctx.font = 8*this.scale+"px monospace"; - var limit = fret+3; - for (var i=fret,j=0; i < fret+4; i++,j++) - { - ctx.fillText(i,this.x+5*this.stringPadding+this.stringPadding/1.5,this.y+j*this.fretPadding+this.fretPadding/1.6); - } - // ctx.filter = 'opacity(1)'; - } - }, - drawChord: function(c,f) { - var ctx = this.ctx; - // ctx.clearRect(this.x-this.stringPadding,this.y-this.fretPadding+1,8*this.stringPadding+2,5*this.fretPadding+2); - ctx.beginPath(); - this.drawBase(); - var chord = c; - var finger = f; - var fret = this.calculateFret(chord); - this.drawFretNumber(fret); - this.drawString(); - this.drawFret(); - if (fret == 1) this.drawNut(); - chord = chord.split(','); - if (chord.length === 1) - chord = chord[0].split(''); - - finger = finger.split(''); - - var match = f.match(/1/g); - var barMode = false; - if (match !== null && match.length > 1) - { - barMode = true; - col = this.palette.circle; - var from = -1; - var to = -1; - for (var i=0; i0; i--) - if (finger[i] == '1') { to=i;break; } - var jumps = to-from; - } - else - col = this.palette.circle; - - for (i=0,c,f,fonce=false; c=chord[i],f=finger[i],i < chord.length; i++) - { - if (c == ' ' || c == 'x' || c == 0) - { - ctx.font = 10*this.scale+"px monospace"; - ctx.fillStyle = this.palette.open; - // ctx.filter = 'opacity(0.7)'; - if (c == ' ') - ctx.fillText(' ',this.x+i*this.stringPadding-3*this.scale,this.y-5*this.scale-this.fretPadding/10); - else if (c == 0) - { - // ctx.beginPath(); - // ctx.arc(this.x+i*this.stringPadding-3*this.scale,this.y-5*this.scale-this.fretPadding/10,3,0,2*Math.PI); - // ctx.stroke(); - // ctx.fillStyle = col; - // ctx.fill(); - - ctx.fillText('o',this.x+i*this.stringPadding-3*this.scale,this.y-5*this.scale-this.fretPadding/10); - } - else - ctx.fillText('x',this.x+i*this.stringPadding-3*this.scale,this.y-5*this.scale-this.fretPadding/10); - // ctx.filter = 'opacity(1)'; - } - else - { - if (c == 'a') - c = 10; - - if (c >= fret) - { - if (barMode && f == 1 && fonce === false) - { - fonce = true; - ctx.beginPath(); - ctx.strokeStyle = col; - ctx.lineCap = 'round'; - // ctx.shadowBlur = 2; - // ctx.shadowColor = 'black'; - var xx = this.x+from*this.stringPadding; - // var yy = this.y+(8*this.scale)+(c-(fret-1))*this.fretPadding-this.fretPadding/1.25; - var yy = (c-(fret-1))*this.fretPadding+this.y-(this.fretPadding-this.fretPadding/1.5)*1.5; - ctx.moveTo(xx,yy); - // ctx.lineTo(xx+jumps*this.fretPadding/2,yy); - // console.log(xx,jumps) - ctx.lineTo(xx+jumps*this.stringPadding,yy); - // ctx.lineWidth = 15*this.scale; - // ctx.lineWidth = this.fretPadding/1.5; - ctx.lineWidth = this.stringPadding/2.2*2; - ctx.stroke(); - ctx.lineWidth = 1; - // ctx.lineWidth = 0.5; - // ctx.shadowBlur = 0; - - ctx.font = 11*this.scale+"px Cousine"; - ctx.fillStyle = this.palette.finger; - var midd = this.originX + this.stringPadding*(from+1) + ((this.stringPadding*(to+1) - this.stringPadding*from))/2 - this.stringPadding/2.5; - // console.log(from,to) - ctx.fillStyle = this.palette.circleText; - ctx.fillText(f,midd,this.y+(c-(fret-1))*this.fretPadding-this.fretPadding/2+this.stringPadding/5.2); - } - else - { - - if (f == 1 && fonce) continue; - - ctx.beginPath(); - ctx.shadowBlur = 2; - ctx.shadowColor = 'black'; - ctx.arc(this.x+i*this.stringPadding,this.y+(c-(fret-1))*this.fretPadding-this.fretPadding/2,this.stringPadding/2.2,0,2*Math.PI); - // ctx.stroke(); - ctx.fillStyle = col; - ctx.fill(); - ctx.shadowBlur = 0; - - if (f !== undefined) - { - ctx.font = 10*this.scale+"px monospace"; - // ctx.fillStyle = this.palette.finger; - ctx.fillStyle = this.palette.circleText; - // ctx.fillText(f,this.x+i*this.stringPadding-3.2*this.scale,this.y+(c-(fret-1))*this.fretPadding-this.fretPadding/2+this.stringPadding/4.5); - var txtW = ctx.measureText(f).width; - ctx.fillText(f,this.x+i*this.stringPadding-txtW/2,this.y+(c-(fret-1))*this.fretPadding-this.fretPadding/2+txtW/2); - } - } - } - } - } - }, - drawBase: function() { - var c = this.c; - var ctx = this.ctx; - ctx.fillStyle = this.palette.base; - ctx.fillRect(this.x,this.y,(this.stringPadding*5),(this.fretPadding*4)); - }, - drawChordName: function(name) { - var ctx = this.ctx; - // ctx.clearRect(0,this.y+4*this.fretPadding+5,this.c.width,30); - ctx.beginPath(); - // ctx.fillStyle = 'rgba(0,0,0,0)'; - // ctx.fillStyle = 'green'; - // ctx.fillRect(0,this.y+4*this.fretPadding+5,this.c.width,30); - if (name.indexOf('*') > 0) - { - ctx.fillStyle = this.palette.special1; - ctx.fillRect(this.x+6*this.stringPadding-5,this.y+4*this.fretPadding+5,5,5); - if (name.indexOf('**') > 0) - { - ctx.fillStyle = this.palette.special2; - ctx.fillRect(7*this.stringPadding-5,this.y+4*this.fretPadding+10,5,5); - } - name = name.replace(/\*+/,''); - } - ctx.fillStyle = this.palette.name; - ctx.font = 32*this.scale+"px Chathura"; - var txtWidth = ctx.measureText(name).width; - // ctx.fillText(name,this.x+2+((4*this.stringPadding-(name.length-1)*this.stringPadding))/2,this.y+5*this.fretPadding); - // if (name.indexOf('#') > 0) - // { - // name = name.replace('#',''); - // txtWidth = ctx.measureText(name).width; - // // var txtWidth = ctx.measureText(name.slice(0,1)).width; - // var first = ctx.measureText(name.slice(0,1)).width; - // ctx.font = 18*this.scale+"px cousine"; - // ctx.fillText('#',this.x+(5*this.stringPadding-txtWidth)/2+first,this.y+5*this.fretPadding-this.fretPadding/2.2); - // ctx.font = 24*this.scale+"px cousine"; - // } - - ctx.fillText(name,this.x+(5*this.stringPadding-txtWidth)/2,this.y+5*this.fretPadding); - - }, - init: function(chart,canvas,customChart) { - if ($('#chartLimbo') === null) - { - var el = document.createElement('div'); - el.setAttribute('id','chartLimbo'); - el.setAttribute('style','height:0;overflow:hidden;'); - document.body.appendChild(el); - } - - $('#chartLimbo').innerHTML = ''; - - if (canvas === undefined) - { - this.c = $('#guichartCanvas'); - this.ctx = this.c.getContext("2d"); - } - else - { - this.c = canvas; - this.ctx = canvas.getContext("2d"); - } - - var x = 0; - var y = 0; - this.padding = 20*this.scale; - this.stringPadding = 15*this.scale; - // this.fretPadding = 30*this.scale; - // this.fretPadding = 25*this.scale; - this.fretPadding = 23*this.scale; - this.originX = x; - this.originY = y; - this.x = x+this.padding; - this.y = y+this.padding+this.padding/5; - - this.drawBase(); - - if (customChart === undefined) - { - var d = chartData[chart.id]; - var i = chart.type; - this.drawChord(d.fret[i],d.finger[i]); - this.drawChordName(chart.name); - } - else - { - var d = customChart; - this.drawChord(d.fret,d.finger); - this.drawChordName(d.name); - } - - if (canvas === undefined) - { - this.c = $('#guichartCanvas').setAttribute('id',''); - return $('#chartLimbo').childNodes[0]; - } - else - { - return this.ctx; - } - } -}; \ No newline at end of file diff --git a/JavaScript/Guitar Chord Chart Generator/index.html b/JavaScript/Guitar Chord Chart Generator/index.html deleted file mode 100644 index fce4b7503..000000000 --- a/JavaScript/Guitar Chord Chart Generator/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - Guichart - - - - - - - - - - - \ No newline at end of file diff --git a/JavaScript/Harry_Potter/app.js b/JavaScript/Harry_Potter/app.js deleted file mode 100644 index 00081d87d..000000000 --- a/JavaScript/Harry_Potter/app.js +++ /dev/null @@ -1,30 +0,0 @@ -window.addEventListener('DOMContentLoaded',()=>{ - const textDiv = document.getElementById('text'); - const feather = document.querySelector('.feather'); - window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; - const recognition = new SpeechRecognition(); - - recognition.start(); - console.log('started'); - recognition.addEventListener('result',(result)=>{ - console.log('listned'); - console.log(result.results[0][0].transcript); - let listenedWord = result.results[0][0].transcript; - if(listenedWord.toLowerCase() === 'wingardium leviosa' || listenedWord.toLowerCase() === 'float') - { - feather.classList.add('float'); - } - textDiv.innerHTML="Heard:"; - textDiv.innerHTML = textDiv.innerHTML+" "+listenedWord; - }); - - feather.addEventListener('animationstart',()=>{ - - }); - feather.addEventListener('animationend',()=>{ - feather.classList.remove('float'); - recognition.start(); - }); - - recognition.addEventListener('end', recognition.start); -}); \ No newline at end of file diff --git a/JavaScript/Harry_Potter/index.html b/JavaScript/Harry_Potter/index.html deleted file mode 100644 index 1dbe673c5..000000000 --- a/JavaScript/Harry_Potter/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - Harry Potter Spells - - - -
-

Say the magical words "Wingardium Leviosa" or "Float" * needs mic permission

-

Heard:

-
-
-
-
- - - \ No newline at end of file diff --git a/JavaScript/Harry_Potter/style.css b/JavaScript/Harry_Potter/style.css deleted file mode 100644 index cd8b6f841..000000000 --- a/JavaScript/Harry_Potter/style.css +++ /dev/null @@ -1,61 +0,0 @@ -body { - background-color: #33CAF4; - text-shadow: 1px 1px 6px black; - } - - .feather-wrap { - height: 100vh; - width: 100vw; - display: flex; - flex-direction: column; - align-items: center; - margin-top: 50px; - overflow: hidden; - } - .feather-wrap .feather { - position: absolute; - top: 50%; - background-image: url("http://pngimg.com/uploads/feather/feather_PNG12958.png"); - background-size: contain; - background-position: center; - width: 200px; - height: 200px; - overflow: hidden; - } - - .float { - animation: float 3s linear 2 alternate, shake 3s ease-in-out 2 alternate; - } - - @keyframes float { - 0% { - top: 50%; - } - 100% { - top: 20%; - } - } - @keyframes shake { - 0% { - transform: rotateX(0deg) rotateZ(0deg); - } - 50% { - transform: rotateX(30deg) rotateZ(10deg);; - } - 100% { - transform: rotateX(60deg) rotateZ(-5deg);; - } - } - .head { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px 0px 20px 0px; - } - .head h1, .head h2 { - color: #F2F2F2; - } - .head #text { - text-transform: capitalize; - } - diff --git a/JavaScript/Hello-hacktoberfest.js b/JavaScript/Hello-hacktoberfest.js deleted file mode 100644 index 664d074a5..000000000 --- a/JavaScript/Hello-hacktoberfest.js +++ /dev/null @@ -1,2 +0,0 @@ -console.log("Hello World!"); -console.log("Thanks hacktoberfest 2018"); diff --git a/JavaScript/HelloJavascript b/JavaScript/HelloJavascript deleted file mode 100644 index 019c0f4bc..000000000 --- a/JavaScript/HelloJavascript +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello World!"); diff --git a/JavaScript/HelloWorld.js b/JavaScript/HelloWorld.js deleted file mode 100644 index 6c5b8d960..000000000 --- a/JavaScript/HelloWorld.js +++ /dev/null @@ -1,6 +0,0 @@ -master -console.log("Hello World!"); -Var name = "Haylim"; -Var greeting = "Hello world!"; -document.write(greeting + "," + name); -master diff --git a/JavaScript/HelloWorldFromBulgaria.js b/JavaScript/HelloWorldFromBulgaria.js deleted file mode 100644 index 3e7a42f42..000000000 --- a/JavaScript/HelloWorldFromBulgaria.js +++ /dev/null @@ -1,2 +0,0 @@ -const HWBulgaria = () => alert('Hello World from Bulgaria! 🇧🇬'); -HWBulgaria(); diff --git a/JavaScript/HelloWorldFromPhilippines.js b/JavaScript/HelloWorldFromPhilippines.js deleted file mode 100644 index 8370f8d26..000000000 --- a/JavaScript/HelloWorldFromPhilippines.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Hello World from Philippines'); diff --git a/JavaScript/HelloWorldFromSpain.js b/JavaScript/HelloWorldFromSpain.js deleted file mode 100644 index eabd845e9..000000000 --- a/JavaScript/HelloWorldFromSpain.js +++ /dev/null @@ -1 +0,0 @@ -alert("Hola Mundo!"); diff --git a/JavaScript/HelloWorldHausa.js b/JavaScript/HelloWorldHausa.js deleted file mode 100644 index 9310876c3..000000000 --- a/JavaScript/HelloWorldHausa.js +++ /dev/null @@ -1 +0,0 @@ -Const helloHausa = "Alo Duniya"; diff --git a/JavaScript/HelloWorldIndonesia b/JavaScript/HelloWorldIndonesia deleted file mode 100644 index cd54646ed..000000000 --- a/JavaScript/HelloWorldIndonesia +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello World from Indonesia") diff --git a/JavaScript/HelloWorldIndonesia.js b/JavaScript/HelloWorldIndonesia.js deleted file mode 100644 index 123330dbd..000000000 --- a/JavaScript/HelloWorldIndonesia.js +++ /dev/null @@ -1 +0,0 @@ -console.log("Halo Dunia!"); diff --git a/JavaScript/HelloWorldJL b/JavaScript/HelloWorldJL deleted file mode 100644 index 7e2c8770c..000000000 --- a/JavaScript/HelloWorldJL +++ /dev/null @@ -1 +0,0 @@ -console.log('Hello World!') diff --git a/JavaScript/HelloWorldNN.js b/JavaScript/HelloWorldNN.js deleted file mode 100644 index 6a5ba06c6..000000000 --- a/JavaScript/HelloWorldNN.js +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello world!") diff --git a/JavaScript/HelloWorld_SL.js b/JavaScript/HelloWorld_SL.js deleted file mode 100644 index 37cddeae5..000000000 --- a/JavaScript/HelloWorld_SL.js +++ /dev/null @@ -1,7 +0,0 @@ -function hello() { - return console.log("හෙලෝ වර්ල්ඩ්") -} - -var run = hello() - - \ No newline at end of file diff --git a/JavaScript/HelloWorldfromLK b/JavaScript/HelloWorldfromLK deleted file mode 100644 index 7de087735..000000000 --- a/JavaScript/HelloWorldfromLK +++ /dev/null @@ -1,3 +0,0 @@ -console.log('Hello, world from Sri Lanka') - - 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/Hello_World_de.js b/JavaScript/Hello_World_de.js deleted file mode 100644 index cff4bf747..000000000 --- a/JavaScript/Hello_World_de.js +++ /dev/null @@ -1 +0,0 @@ -console.log("Hallo Welt!"); diff --git a/JavaScript/Hello_world.html b/JavaScript/Hello_world.html deleted file mode 100644 index 3abccc5aa..000000000 --- a/JavaScript/Hello_world.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - -

Before the script...

- - - -

...After the script.

-
1234
- - - - diff --git a/JavaScript/HeyThereWorld/index.html b/JavaScript/HeyThereWorld/index.html deleted file mode 100644 index 68103ec88..000000000 --- a/JavaScript/HeyThereWorld/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - Hey There World! - - - - - - diff --git a/JavaScript/HeyThereWorld/js/app.js b/JavaScript/HeyThereWorld/js/app.js deleted file mode 100644 index e36267f48..000000000 --- a/JavaScript/HeyThereWorld/js/app.js +++ /dev/null @@ -1 +0,0 @@ -const helloWorld = () => alert('Hello World!'); diff --git a/JavaScript/HeyWorld.js b/JavaScript/HeyWorld.js deleted file mode 100644 index bd351c3d5..000000000 --- a/JavaScript/HeyWorld.js +++ /dev/null @@ -1,6 +0,0 @@ - -const es6Try = () => { - console.log("Hey World..!"); -} - -console.log(es6Try()); diff --git a/JavaScript/HiWorld.js b/JavaScript/HiWorld.js deleted file mode 100644 index 6381d8ca8..000000000 --- a/JavaScript/HiWorld.js +++ /dev/null @@ -1,28 +0,0 @@ -const letters =[ - "H", - "e", - "l", - "l", - "o", - " ", - "W", - "o", - "r", - "l", - "d", - ",", - " ", - "t", - "o", - " ", - "y", - "o", - "u", - " ", - "a", - "l", - "l" -] - - -console.log(letters.map(letter => letter.toUpperCase()).join(''))..concat('!!!') diff --git a/JavaScript/Instagram 9x9 Grid maker/index.html b/JavaScript/Instagram 9x9 Grid maker/index.html deleted file mode 100644 index 8f34d9914..000000000 --- a/JavaScript/Instagram 9x9 Grid maker/index.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - Insta 9x9 Box - - - - - Select file to make grid 9x9 - - -
- -
- -
- - - - diff --git a/JavaScript/JS-Task-List/app.js b/JavaScript/JS-Task-List/app.js deleted file mode 100644 index c75f27662..000000000 --- a/JavaScript/JS-Task-List/app.js +++ /dev/null @@ -1,130 +0,0 @@ -const form = document.querySelector('#task-form') -const taskList = document.querySelector('.collection') -const clearBtn = document.querySelector('.clear-tasks') -const filter = document.querySelector('#filter') -const taskInput = document.querySelector('#task') - -loadEventListeners() - -function loadEventListeners(){ - document.addEventListener('DOMContentLoaded', getTasks) - form.addEventListener('submit', addTask) - taskList.addEventListener('click', removeTask) - clearBtn.addEventListener('click', clearTasks) - filter.addEventListener('keyup', filterTasks) -} - -function getTasks(){ - let tasks; - if(localStorage.getItem('tasks') === null){ - tasks = [] - }else { - tasks = JSON.parse(localStorage.getItem('tasks')) - } - - tasks.forEach((task) => { - const li = document.createElement('li') - li.className = 'collection-item' - li.appendChild(document.createTextNode(task)) - - const link = document.createElement('a') - link.href = '#' - link.className = 'delete-item secondary-content' - link.innerHTML = '' - - li.appendChild(link) - taskList.appendChild(li) - }) -} - -function addTask(e){ - if(taskInput.value === ''){ - alert('Please, enter a task!') - } else { - const li = document.createElement('li') - li.className = 'collection-item' - li.appendChild(document.createTextNode(taskInput.value)) - - const link = document.createElement('a') - link.href = '#' - link.className = 'delete-item secondary-content' - link.innerHTML = '' - - li.appendChild(link) - taskList.appendChild(li) - - addTaskToLocalStorage(taskInput.value) - - taskInput.value = '' - } - - e.preventDefault() -} - -function addTaskToLocalStorage(task){ - let tasks - if(localStorage.getItem('tasks') === null){ - tasks = [] - }else { - tasks = JSON.parse(localStorage.getItem('tasks')) - } - - tasks.push(task) - - localStorage.setItem('tasks', JSON.stringify(tasks)) -} - - -function removeTask(e){ - if(e.target.parentElement.classList.contains('delete-item')){ - if(confirm('Are you sure of that?')) - e.target.parentElement.parentElement.remove() - removeTaskFromLocalStorage(e.target.parentElement.parentElement) - } - e.preventDefault() -} - -function removeTaskFromLocalStorage(taskItem){ - let tasks - if(localStorage.getItem('tasks') === null){ - tasks = [] - }else { - tasks = JSON.parse(localStorage.getItem('tasks')) - } - - tasks.forEach((task, index) => { - if(taskItem.textContent === task){ - tasks.splice(index, 1) - } - }) - - localStorage.setItem('tasks', JSON.stringify(tasks)) -} - -function clearTasks(e){ - if(confirm('Are you dure of that?')){ - while(taskList.firstChild){ - taskList.removeChild(taskList.firstChild) - clearTasksFromLocalStorage() - } - } - - e.preventDefault() -} - -function clearTasksFromLocalStorage(){ - localStorage.clear() -} - -function filterTasks(e){ - const text = e.target.value.toLowerCase() - - document.querySelectorAll('.collection-item').forEach((task) => { - const item = task.firstChild.textContent - if(item.toLowerCase().indexOf(text) != -1){ - task.style.display = 'block' - } else{ - task.style.display = 'none' - } - }) -} \ No newline at end of file diff --git a/JavaScript/JS-Task-List/index.html b/JavaScript/JS-Task-List/index.html deleted file mode 100644 index 05e159805..000000000 --- a/JavaScript/JS-Task-List/index.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - Task List - - - - - - -
-
-
-
-
- - Task List - -
-
-
- - -
- - -
-
-
-
Tasks
-
- - -
-
    - Clear Tasks -
    -
    -
    -
    -
    - - - - - - \ No newline at end of file diff --git a/JavaScript/JS-hello-world/index.html b/JavaScript/JS-hello-world/index.html deleted file mode 100755 index a34ffd7a5..000000000 --- a/JavaScript/JS-hello-world/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - Hello World - - -

    Hello World

    - - - diff --git a/JavaScript/JS-hello-world/js/eq.js b/JavaScript/JS-hello-world/js/eq.js deleted file mode 100755 index c44c26a43..000000000 --- a/JavaScript/JS-hello-world/js/eq.js +++ /dev/null @@ -1,26 +0,0 @@ -function Equation(a,b,c,l,m,n){ - var x=0,y=0; -this.a=a; -this.b=b; -this.c=c; -this.l=l; -this.m=m; -this.n=n; - -this.countX = function (){ - var x = (this.b*this.n - this.c*this.m) / (this.l*this.b- this.a * this.m); - console.log("X = " +x); - -} -this.countY = function (){ - var y = (this.a * this.n - this.l * this.c) / (this.a* this.m - this.l * this.b); - console.log("Y = " +y); - - -} - -} - -var eq = new Equation(3,3,10,12,1,3,6); -eq.countX(); -eq.countY(); diff --git a/JavaScript/JS-hello-world/js/hello.js b/JavaScript/JS-hello-world/js/hello.js deleted file mode 100644 index 38de0052c..000000000 --- a/JavaScript/JS-hello-world/js/hello.js +++ /dev/null @@ -1 +0,0 @@ -console.log("I love hearthstone!"); diff --git a/JavaScript/JS-hello-world/js/myscript.js b/JavaScript/JS-hello-world/js/myscript.js deleted file mode 100755 index 58b78270d..000000000 --- a/JavaScript/JS-hello-world/js/myscript.js +++ /dev/null @@ -1,198 +0,0 @@ -console.log("Hello World...!"); -// Single Line Comment -/* -Multiline Comment -*/ -// Boolean Data Type -console.log(true); -console.log(false); - -// Number Data Type -console.log(0b10); -console.log(0B10); - -console.log(010); -console.log(011); -console.log(09); - -console.log(1); - -console.log(0xA); -console.log(0XA); - -console.log(1.25); -console.log(1.25e2); -console.log(1.25E2); -console.log(1.25e-2); - -console.log('IJ\tSE'); -console.log("IJ\tSE"); -console.log("IJ'S'E"); -console.log('IJ"S"E'); - -console.log(null); -console.log(undefined); - -var _name = null; -console.log(typeof _name); - -// Object.defineProperty(typeof global === "object" ? global : window, "PI", { -// value: 3.141593, -// enumerable: true, -// writable: false, -// configurable: false -// }); - -var PI = 3.14; - -var myArray = new Array(); -myArray.push(10); -myArray.push("IJSE"); -myArray.push(30); - -console.log(myArray.length); -console.log(myArray.toString()); - -myArray.pop(); -console.log(myArray.toString()); - -myArray.push(40); -console.log(myArray.toString()); - -myArray.splice(1,1); // index,1 -console.log(myArray.toString()); - -myArray.unshift("Suranga"); -console.log(myArray.toString()); - -myArray.shift(); -console.log(myArray.toString()); - -myArray = [10,20,30,40]; -console.log(myArray.toString()); - -var index = myArray.indexOf(20); -console.log("Index of 20 : " + index); - -index = myArray.indexOf(100); -console.log(index); - -myArray = new Array("10,20","IJSE"); -console.log(myArray.toString()); - -var twoDArray = [[10,20],[30,40]]; -console.log(twoDArray[0][1]); - -var twoDArray = new Array(new Array(10,20), new Array(30,40)); -console.log(twoDArray[0][1]); - -var index = twoDArray.indexOf(new Array(10,20)); -console.log(index); // -1 - -// String casting -var myVar = "10"; -console.log(+myVar); -console.log(parseInt(myVar)); - -myVar = "10.25"; -console.log(parseFloat(myVar)); -myVar = 10.25; -console.log("" + myVar); - -// Unary Operators - -// Prefix increment, postfix increment, prefix decrement, postfix decrement -a = 2; -a = a++ + ++a - 2 + a++ + a + a-- + ++a ; -console.log(a); - -var result = void(1+3); -console.log(result); - -a = 2; -result = void (a++); - -console.log(result); - -console.log(typeof a); - -myVar = "10"; - -console.log(myVar === 10); - -myVar = 10; - -result = (myVar < 20) ? "kudai" : "lokui"; - -console.log(result); - -myArray = [10,20,30,40,50]; - -for(var index in myArray){ - console.log(myArray[index]); -} - -for(var property in window){ - console.log(property); -} - -// for(var element of myArray){ -// console.log(element); -// } - -function myFun(){ - console.log("This is void function"); -} - -myFun(); - -function myFun2(){ - return "This is return function"; -} - -result = myFun2(); -console.log(result); - -function printName(name){ - console.log("Name : " + name); -} - -printName("Suranga"); - -function printDetails(){ - console.log(arguments[1]); - for(var index in arguments){ - console.log(arguments[index]); - } -} - -printDetails("Suranga","IJSE"); - -function myMethod(){ - console.log("Method 1"); -} - -function myMethod(name){ - console.log("Method 2"); -} - -function myMethod(name,age){ - console.log("Method 3"); -} - -myMethod(); // Do not try to over load methods in javascript - -function defaultParams(name){ - if (name === undefined) name = "IJSE"; - name = (typeof name === "undefined") ? "IJSE" : undefined; - console.log(name); -} - -defaultParams(); - -function varArgs(){ - for(var index in arguments){ - console.log(arguments[index]); - } -} -varArgs("Suranga","Upul","Ganga","Kaputa"); \ No newline at end of file diff --git a/JavaScript/Lissajous Curve/index.html b/JavaScript/Lissajous Curve/index.html deleted file mode 100644 index c2efa28be..000000000 --- a/JavaScript/Lissajous Curve/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - lissajous curve - - - - - - - - - - diff --git a/JavaScript/Lissajous Curve/main.js b/JavaScript/Lissajous Curve/main.js deleted file mode 100644 index cb9e1dfe3..000000000 --- a/JavaScript/Lissajous Curve/main.js +++ /dev/null @@ -1,74 +0,0 @@ -let w, h; -let margin = 20; - -let history = []; - -let a_slider, b_slider; -let a = 1; -let b = 1; -let t = 0; - -let red_off; -let green_off; -let blue_off; - -function setup() { - w = window.innerWidth; - h = window.innerHeight; - - createCanvas(w, h); - smooth(); - strokeWeight(5); - - a_slider = createSlider(1, 10, 1); - a_slider.position(20, 20); - b_slider = createSlider(1, 10, 1); - b_slider.position(160, 20); - - red_off = random(10); - green_off = random(10); - blue_off = random(10); -} - -function draw() { - background(0); - - if (a != a_slider.value()) { - history = []; - a = a_slider.value(); - } - - if (b != b_slider.value()) { - history = []; - b = b_slider.value(); - } - - let x = (w/2*0.95) * cos(a*t) + w/2; - let y = (h/2*0.95) * sin(b*t) + h/2; - - history.push(createVector(x, y)); - - if (history.length > 100*(a+b)/2) { - history.splice(0, 1); - } - - for (let i = 0; i < history.length; i++) { - let alpha = i/100; - let r = floor(map(noise(red_off), 0, 1, 0, 255)); - let g = floor(map(noise(green_off), 0, 1, 0, 255)); - let b = floor(map(noise(blue_off), 0, 1, 0, 255)); - - let rgba = `rgba(${r},${g},${b},${alpha})`; - - stroke(rgba); - point(history[i].x, history[i].y); - - red_off += 0.00001; - green_off += 0.00001; - blue_off += 0.00001; - } - - //console.log(x, y); - - t+= 0.1/(a+b); -} diff --git a/JavaScript/Mandelbrot Fractal/index.html b/JavaScript/Mandelbrot Fractal/index.html deleted file mode 100644 index a272fda10..000000000 --- a/JavaScript/Mandelbrot Fractal/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - Mandelbrot Fractal JS on the HTML5 Canvas - - - Your browser does not support HTML5 Canvas. - - - - - - \ No newline at end of file diff --git a/JavaScript/Mandelbrot Fractal/mandelbrot.js b/JavaScript/Mandelbrot Fractal/mandelbrot.js deleted file mode 100644 index 4d80ed316..000000000 --- a/JavaScript/Mandelbrot Fractal/mandelbrot.js +++ /dev/null @@ -1,64 +0,0 @@ -var canvas = document.getElementById('canvas'); -var context = canvas.getContext('2d'); -var xr = context.canvas.width; -var yr = context.canvas.height; -var imgd = context.createImageData(xr, yr); -var pix = imgd.data; - -var xmin = -2.0; -var xmax = 1.0; -var ymin = -1.5; -var ymax = 1.5; - -// these are for coloring the image -var mr0 = 0; -var mg0 = 0; -var mb0 = 0; -while (mr0 == mg0 || mr0 == mb0 || mg0 == mb0) { - - mr0 = Math.pow(2, Math.ceil(Math.random() * 3 + 3)); - mg0 = Math.pow(2, Math.ceil(Math.random() * 3 + 3)); - mb0 = Math.pow(2, Math.ceil(Math.random() * 3 + 3)); - - /* - mr0 = Math.pow(2, Math.ceil(Math.random() * 3 + 3)); - mg0 = mr0; - mb0 = mr0; - */ -} -var mr1 = 256 / mr0; -var mg1 = 256 / mg0; -var mb1 = 256 / mb0; - -var maxIt = 256; -var x = 0.0; -var y = 0.0; -var zx = 0.0; -var zx0 = 0.0; -var zy = 0.0; -var zx2 = 0.0; -var zy2 = 0.0; - -for (var ky = 0; ky < yr; ky++) { - y = ymin + (ymax - ymin) * ky / yr; - for (var kx = 0; kx < xr; kx++) { - x = xmin + (xmax - xmin) * kx / xr; - zx = x; - zy = y; - for (var i = 0; i < maxIt; i++) { - zx2 = zx * zx; - zy2 = zy * zy; - if (zx2 + zy2 > 4.0) break; - zx0 = zx2 - zy2 + x; - zy = 2.0 * zx * zy + y; - zx = zx0; - } - var p = (xr * ky + kx) * 4; - pix[p] = i % mr0 * mr1; // red - pix[p + 1] = i % mg0 * mg1; // green - pix[p + 2] = i % mb0 * mb1; // blue - pix[p + 3] = 255; // alpha - } -} - -context.putImageData(imgd, 0, 0); \ No newline at end of file diff --git a/JavaScript/Matrix/index.html b/JavaScript/Matrix/index.html deleted file mode 100644 index 1ff88e23c..000000000 --- a/JavaScript/Matrix/index.html +++ /dev/null @@ -1,5 +0,0 @@ - - Matrix from 1337.me - - - \ No newline at end of file diff --git a/JavaScript/Matrix/matrix.js b/JavaScript/Matrix/matrix.js deleted file mode 100644 index 59f1b45b4..000000000 --- a/JavaScript/Matrix/matrix.js +++ /dev/null @@ -1,43 +0,0 @@ -var c = document.getElementById("c"); -var ctx = c.getContext("2d"); - -function documentHeight() { - return Math.max( - document.documentElement.clientHeight, - document.body.scrollHeight, - document.documentElement.scrollHeight, - document.body.offsetHeight, - document.documentElement.offsetHeight - ); -} - -// c.height = window.innerHeight; -c.height = documentHeight(); -c.width = window.innerWidth; - -var chinese = "田由甲申甴电甶男甸甹町画甼甽甾甿畀畁畂畃畄畅畆畇畈畉畊畋界畍畎畏畐畑"; -chinese = chinese.split(""); - -var font_size = 10; -var columns = c.width/font_size; -var drops = []; -for(var x = 0; x < columns; x++) -drops[x] = 1; - -function draw() { - ctx.fillStyle = "rgba(255, 255, 255, 0.12)"; - ctx.fillRect(0, 0, c.width, c.height); - - ctx.fillStyle = "#93d1e5"; - ctx.font = font_size + "px arial"; - for(var i = 0; i < drops.length; i++) { - var text = chinese[Math.floor(Math.random()*chinese.length)]; - ctx.fillText(text, i*font_size, drops[i]*font_size); - if(drops[i]*font_size > c.height && Math.random() > 0.975) - drops[i] = 0; - - drops[i]++; - } -} - -setInterval(draw, 40); diff --git a/JavaScript/MyDogNamedBella b/JavaScript/MyDogNamedBella deleted file mode 100644 index c09a2d12b..000000000 --- a/JavaScript/MyDogNamedBella +++ /dev/null @@ -1,11 +0,0 @@ -var dog = { - name: "Bella", - age: 2, - vegeterian: false, - color: ["white", "black"], - speak: function(){ - return "bark"; - } -}; - -console.log("My dog " + dog.name + " is " + dog.age + " year old and likes to " + dog.speak() + " at strangers."); diff --git a/JavaScript/Palindrome_Checker.js b/JavaScript/Palindrome_Checker.js deleted file mode 100644 index 5b1a95824..000000000 --- a/JavaScript/Palindrome_Checker.js +++ /dev/null @@ -1,26 +0,0 @@ -/* 1. With built in functions -\W matches any non-word character (equal to [^a-zA-Z0-9_]) -_ matches the character _ literally (case sensitive) -*/ - -function isPalindrome(str) { - return str.replace(/[\W_]/g, '').toLowerCase() === - str.replace(/[\W_]/g, '').toLowerCase().split('').reverse().join(''); -} - -console.log(isPalindrome("racecar")); - -/* -2. With a for loop and straight forward regex -function isPalindrome(str) { - var regex = /[^A-Za-z0-9]/g; - str = str.toLowerCase().replace(regex, ''); - var len = str.length; - for (var i = 0; i < len/2; i++) { - if (str[i] !== str[len - 1 - i]) { - return false; - } - } - return true; - } -*/ diff --git a/JavaScript/Plate.js Hello World/index.html b/JavaScript/Plate.js Hello World/index.html deleted file mode 100644 index 44726f41a..000000000 --- a/JavaScript/Plate.js Hello World/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - Plate.js : Hello World - - - - - - - - [ .box +padding {width:400px;margin:auto;} +center - [ +row +blue +card +padding +round - Hello world! This is plate.js for pre-production HTML scripting. - ] - ] - - - - \ No newline at end of file diff --git a/JavaScript/Plate.js Hello World/plate.js b/JavaScript/Plate.js Hello World/plate.js deleted file mode 100644 index 9ad9a8849..000000000 --- a/JavaScript/Plate.js Hello World/plate.js +++ /dev/null @@ -1,264 +0,0 @@ -// v0.24 - 12 oct 2018 - adding "-" or no w3-row type -// v0.23 - 4 oct 2018 - adding pantry prefix, changed template -// v0.22 - 3 oct 2018 - chaning style to {} -// v0.21 - 28 sep 2018 - padding left -// v0.20 - 24 sep 2018 - added css shorthand : position relative & absolute -// v0.19 - 21 sep 2018 - added pantry & pantry template -// v0.18 - 20 sep 2018 - added important css, global plate html body - -var plate = { - skipTag: ['styl','scri'], - lt: String.fromCharCode(60), - gt: String.fromCharCode(62), - tag: function(t,attr,noClose) { - var finalAtt = ''; - var content, j, cls; - for (var i in attr) - { - content = ''; - cls = ''; - if (attr[i] !== null) - { - switch (i) - { - case 'sty': - content = ' style="'; - for (j=0; j 0) - { - id = m.split('plate-')[1].split('-->')[0]; - plateData = eval('tmp = '+id.split('@ ')[1]); - id = id.split(' @')[0]; - if ($('#plate-'+id) !== null) - { - if (plateData === undefined) - m = plate.cook($('#plate-'+id).innerHTML); - else - m = plate.cook(o.creps('plate-'+id,plateData)); - } - else - console.log('plate template id:'+id+' not found'); - } - else if (isPantry > 0) - { - id = m.split('pantry-')[1].split('-->')[0]; - plateData = eval('tmp = '+id.split('@ ')[1]); - id = id.split(' @')[0]; - if ($('#pantry-'+id) !== null) - { - if (plateData === undefined) - m = plate.cook($('#pantry-'+id).innerHTML); - else - m = plate.cook(o.creps('pantry-'+id,plateData)); - } - else - console.log('pantry id:'+id+' not found'); - } - - return m; - }, - cook: function(meat,slice) { - var useSlice = (slice !== undefined); - var farm = false; - if (meat === undefined) - meat = document.body.innerHTML; - else - farm = true; - - var fonts = []; - var fontStyle = []; - - meat = meat.split('\n'); - var skip = -1; - var m, txt, idx; - for (var i=0; i= 0) - { - if (txt == '/'+this.skipTag[skip].substring(0,3)) - skip = -1; - continue; - } - - idx = this.skipTag.indexOf(txt); - if (idx >= 0) - { - if (m.indexOf('/'+this.skipTag[idx]) < 0) - skip = idx - continue; - } - - meat[i] = this.grill(m,useSlice,fonts,fontStyle); - } - - meat = meat.join('\n'); - - if (fonts.length > 0) - { - document.head.appendChild(o.cel('link',{rel:'stylesheet',href:'https://fonts.googleapis.com/css?family='+fonts.join('|')})); - document.head.appendChild(o.cel('style',{innerHTML:'\n'+fontStyle.join('\n')+'\n'})); - } - - if (farm) - return meat; - else - document.body.innerHTML = meat; - }, - getPantryTemplate: function() { - if ($('#plate-limbo-invisible') === null) - document.body.appendChild(o.cel('div',{id:'plate-limbo-invisible',style:'opacity:0;position:absolute;z-index:-1;'})); - var copy = o.cel('input',{value:"
    "}) - $('#plate-limbo-invisible').appendChild(copy) - copy.select(); - console.log('Pantry template copied. Place pantry file inside folder named "pantry".') - document.execCommand("copy"); - $('#plate-limbo-invisible').removeChild(copy); - }, - pantry: function(food,callback,prefix) { - if (typeof(food) !== 'object') - { - console.log('plate.js : Pantry food type should be array.') - return; - } - plate.pantry.loading = food.length; - window.addEventListener('message',receive); - - if ($('#plate-limbo') === null) - document.body.appendChild(o.cel('div',{id:'plate-limbo',style:'height:0px;overflow:hidden;'})); - - o.for(food,function(i,f) - { - $('#plate-limbo').appendChild(o.cel('iframe',{src:f+'.html'})); - }) - - if (prefix === undefined) - prefix = 'PT-'; - - function receive(e) { - if (e.data.type == 'pantry') - { - var data = e.data.content.replace(/
    MONTUEWEDTHUFRISATSUN
    12345
    6789101112
    1314 1516171819
    20212223242526
    2728293031