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
@echo off | |
title Windows Shutdown Helper | |
echo ########################### | |
echo # Windows Shutdown Helper # | |
echo ########################### | |
set /p hours= "Hours to shutdown: " | |
set /a seconds= (%hours% * 60 * 60) |
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
import java.sql.*; | |
public class DBGuy { | |
private Connection c = null; | |
public DBGuy() { | |
try { | |
Class.forName("org.postgresql.Driver"); | |
c = DriverManager | |
.getConnection("jdbc:postgresql://localhost:5432/testdb", |
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
/* | |
This is the implementation of the FBullCowGame header. | |
*/ | |
#pragma once | |
#include "FBullCowGame.h" | |
#include <map> | |
#define TMap std::map | |
FBullCowGame::FBullCowGame() {Reset();} |
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
"Reads a random message from a file and prints it" | |
from random import randint | |
with open("antichamber.txt") as file: | |
messages = file.readlines() | |
file_title = messages[0].replace("\n","") | |
random_number = randint(1, len(messages)-1) | |
random_message = messages[random_number].replace("\n","") |
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
def input_float(msg): | |
while True: | |
try: | |
return float(input(msg)) | |
except ValueError: | |
print("The input value is not a float.") | |
def input_int(msg): | |
while True: |
NewerOlder