This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://www.reddit.com/r/dailyprogrammer/comments/3kx6oh/20150914_challenge_232_easy_palindromes/ | |
$lines = 2 | |
$counter = 0 | |
$text = "" | |
while($counter -lt $lines) { | |
$temp = Read-Host "Enter text" | |
$temp = $temp.ToCharArray() | |
foreach($letter in $temp) { | |
$letter = [string]$letter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -ne 2 ]]; then | |
echo "Please submit 2 arguments: server name and port number" | |
else | |
total=0 | |
success=0 | |
while true; do | |
total=$((total+1)) | |
result=$(nmap -Pn -p $2 $1 | grep "/tcp") | |
echo -n $result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Reddit Daily Programmer 236. | |
#https://www.reddit.com/r/dailyprogrammer/comments/3ofsyb/20151012_challenge_236_easy_random_bag_system/ | |
#Initialize the array with all pieces. | |
$pieces = New-Object System.Collections.ArrayList | |
$counter = 0 | |
$result = "" | |
#Pick the pieces. | |
while($counter -lt 50) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Reddit Daily Programmer #235 | |
#https://www.reddit.com/r/dailyprogrammer/comments/3nkanm/20151005_challenge_235_easy_ruthaaron_pairs/ | |
#Function to figure out the factors. | |
function GetFactors { | |
param([int] $number) | |
$results = @() | |
$counter = 2 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://www.reddit.com/r/dailyprogrammer/comments/3pcb3i/20151019_challenge_237_easy_broken_keyboard/ | |
#Import the list of words. | |
$wordList = Get-Content -Path .\word.txt #http://norvig.com/ngrams/enable1.txt | |
#Get the first part of input, which is an integer. | |
$numbers = Read-Host "Enter the number of combinations to check" | |
$counter = 0 | |
$checkArray = @() | |
#Loop through them to get all of the input. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://www.reddit.com/r/dailyprogrammer/comments/3q9vpn/20151026_challenge_238_easy_consonants_and_vowels/ | |
#Create random "words" based on a defined input pattern. | |
#Define the alphabet. | |
$consonants= "b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z" | |
$vowels = "a","e","i","o","u" | |
#Get input from the user. | |
$userInput = Read-Host "Enter the pattern" | |
$goodInput = $true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://www.reddit.com/r/dailyprogrammer/comments/3qjnil/20151028_challenge_238_intermediate_fallout/ | |
#Reddit Daily Programmer 238 - Intermediate | |
#Get the desired difficulty from the user. | |
$needDifficulty = $true | |
while($needDifficulty) { | |
Write-Host "How difficult would you like the game to be?" | |
$difficulty = Read-Host "Enter a value (1 - 5)" | |
#Validate the input by making sure it's a number. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace GameOfThrees | |
{ | |
class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
namespace Typoglycemia | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
//https://www.reddit.com/r/dailyprogrammer/comments/3uuhdk/20151130_challenge_243_easy_abundant_and/ | |
//Reddit Daily Programmer Easy Challenge #243 - Abundant and Deficient Numbers | |
namespace AbunDef | |
{ | |
class Program | |
{ |