Skip to content

Commit d67a54c

Browse files
authored
Merge branch 'master' into powershell-strong-pw
2 parents 273ffde + 191286e commit d67a54c

24 files changed

+101
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,4 @@ Module.symvers
253253
Mkfile.old
254254
dkms.conf
255255
/.vs
256+
.Rproj.user

CONTRIBUTORS.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,11 @@ Place: Nigeria </br>
445445
Coding Experience: Python and javaScript. </br>
446446
Email: [email protected] </br>
447447

448+
Name: [Roger Seekell](https://github.com/rpstester) <br />
449+
Place: Earth<br />
450+
Coding Experience: C++, C#, Java, PowerShell<br />
451+
Email: [email protected]<br />
452+
448453
Name: [Abhay yadav](https://github.com/predator21x) </br>
449454
place: India. </br>
450455
Coding Experience: a newbie in this field. Programming language: C, python. </br>
@@ -455,7 +460,12 @@ Place: India </br>
455460
Coding Experience: C and python. </br>
456461
Email: [email protected] </br>
457462

458-
Name: [Sazeim Saheem](https://github.com/ZombieChibiXD) </br>
463+
Name: [Isak Rabin](https://github.com/sgirabin)
464+
Place: Singapore
465+
Coding Experience: Java
466+
467+
468+
Name: [Zombie Chibi XD](https://github.com/ZombieChibiXD) </br>
459469
Place: Bali, Indonesia </br>
460470
Field Experience: System Administrator, Junior web developer, beta-tester, and debugger </br>
461471
Coding Experience: 3 years of learning & coding experience in C++, Java, Javascript/NodeJS, PHP, Vue.js, Laravel Framework, GoLang and python. </br>
@@ -465,4 +475,14 @@ Name: [Oyvind Nilsen](https://github.com/turbosnute) </br>
465475
Place: Trondheim, Norway </br>
466476
Field Experience: System Admin </br>
467477
Coding Experience: 10 years of Powershell scripting. Also some experience with Java, Js, PHP, Python and C#. </br>
468-
Email: [email protected] </br>
478+
Email: [email protected] </br>
479+
480+
Name: [Jay](https://github.com/TacticalTechJay) </br>
481+
Place: Milky Way Galaxy </br>
482+
Coding Experience: Semi-noob in JS. </br>
483+
Email: [email protected] </br>
484+
485+
Name: [David](https://github.com/Xander1233) </br>
486+
Place: Frankfurt, Germany </br>
487+
Coding Experience: TS, JS/NodeJS, Java, C, C++, C#, Assembly, React
488+
Email: [email protected] </br>

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Have some fun with coding every once in a while, and see how you can abuse the s
88
### Contributing
99
Anyone can contribute to this repo by opening a PR, your contribution will be open-source on Github. Don't know what to make? Try coding something that logs "Hello, world!" to the console!
1010

11-
### Hacktoberfest 2019
11+
### Hacktoberfest 2021
1212
Celebrate [Hacktoberfest](https://hacktoberfest.digitalocean.com/) together with a diverse community of developers from around the world!
1313

1414
### PRs not marked as spam will be counted towards **4** PRs in the month of October for your **free Hacktoberfest T-Shirt!**

coffeescript/wzhouwzhou_add.coffee

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add = (a, b) -> a + b
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
subtract = (a, b) -> +a - +b
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <iostream>
2+
#include <string>
3+
4+
bool isPalindrome(std::string input) { return input == std::string(input.rbegin(), input.rend()); }
5+
6+
int main()
7+
{
8+
std::string input = "able was I ere I saw elba" ;
9+
//std::cout << "Input : ";
10+
//getline (std::cin, input);
11+
std::cout << "It is " << (isPalindrome(input) ? "" : "not ") << "a palindrome";
12+
}
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const map = (arr, cb) => {
2+
let i = arr.length, result = Array(i);
3+
while (i--) result[i] = cb(arr[i], i, arr);
4+
return result;
5+
};

java/sgirabin_Max2Digit.java

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
class Max2Digit {
4+
5+
public static int max(int a, int b) {
6+
return Math.max(a,b);
7+
}
8+
9+
public static void main(String[] args) {
10+
System.out.println(Max2Digit.max(5,10));
11+
}
12+
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const collatz = x => x <= 1 ? x : collatz((x % 2) === 0 ? x / 2 : x * 3 + 1);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// This will check if a number is 0 or smaller and then converts it. If 0, to 1. If n < 0, to -n
2+
const convert = (n) => { return (-(~(n ^ 0))) < 0 ? (-(~(n ^ 0))) != -1 ? (-(-(~(n ^ 0)))) + 1 : (-(-(~(n ^ 0)))) : (-(~(n ^ 0))) != 1 ? (-(~(n ^ 0))) - 1 : (-(~(n ^ 0))); }

javascript/rpxs_add.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const add = (a, b) => a + b;

javascript/rpxs_subtract.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const subtract = (a, b) => a - b
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const values = [1, 2, 3, 4, 5, 1, 1, 1, 3];
2+
3+
const unique = [void(0)].map((e, i, arr) => new Set(values).forEach(v => arr.push(v)) || arr)[0].slice(1);

javascript/vetlix_deepflat_array.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const deepFlat = arr => arr.flat(Infinity);

javascript/vetlix_empty_array.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const empty = arr => arr.length = 0;

javascript/wzhouwzhou_check_brackets.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/tacticaltechjay_coinFlip.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Math.floor(Math.random() * 2) === 1 ? console.log('Heads!') : console.log('Tails!')

nodejs/wzhouwzhou_delay.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(t = 1000) && Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, t)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
(Invoke-WebRequest "http://api.open-notify.org/astros.json" | ConvertFrom-Json).people
2+
#note, I got the idea from PowerShell.com a while ago, but I cannot find it now.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[elemento**2 for elemento in range(11) if elemento%2==0]

python/mirandars_parity-test.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
par = lambda x:True if x%2==0 else False
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#Consider the program that takes in a string and a list of numbers.
2+
#It will prepend the string to each of the numbers and return a string of this new list separated by commas.
3+
#For example, foo('$', range(5)) would return '$0, $1, $2, $3, $4'.
4+
#A naive coder will do this-
5+
#
6+
#def foo(string, numbers):
7+
# output = ''
8+
# for i in range(len(numbers)):
9+
# if i > 0:
10+
# output += ', '
11+
# output += string + str(numbers[i])
12+
# return output
13+
#
14+
# Here is an elegant way with Output $0, $1, $2, $3, $4-
15+
16+
def foo(string, numbers): return ', '.join(map(lambda s,n:s+str(n), [string for i in numbers], numbers))

python/unique/RaInta_unique_array.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
list1 = [1,10,7,1,4]
2+
3+
[x for idx, x in enumerate(list1) if x not in list1[:idx]]

r/prime/KKulma_find-prime-number.R

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
is.prime <- function(n) n == 2L || all(n %% 2L:ceiling(sqrt(n)) != 0)
2+
3+
# test
4+
test_vec <- 0:10
5+
sapply(test_vec, is.prime)

0 commit comments

Comments
 (0)