This file contains 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
VERSION 5.00 | |
Begin VB.Form Form1 | |
Caption = "Form1" | |
ClientHeight = 6615 | |
ClientLeft = 60 | |
ClientTop = 345 | |
ClientWidth = 9375 | |
LinkTopic = "Form1" | |
ScaleHeight = 441 | |
ScaleMode = 3 'Pixel |
This file contains 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
<?php | |
/** | |
* Given an array of numbers (of 24 bits/hours), | |
* where each bit of the number is equal to 1 hour, | |
* validates if the corresponding hour and day is on. | |
* | |
* @param $days Array of ~24 bits numbers. | |
* @param $day Number from 0 to 7 | |
* @param $hour 0 to 23 |
This file contains 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 fareEstimator(ride_time, ride_distance, cost_per_minute, cost_per_mile): | |
estimations = [] | |
for i, rtime in enumerate(ride_time): | |
rdist = ride_distance[i] | |
permin = cost_per_minute[i] | |
permile = cost_per_mile[i] | |
est = (rtime * permin) + (permile * rdist) | |
estimations.append(est) | |
return estimations |
This file contains 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
# CodeFights perfectCity | |
def perfectCity(departure, destination): | |
import math | |
sx, sy = departure | |
tx, ty = destination | |
distances = [] | |
for i in [math.floor, math.ceil]: | |
x = sx |
This file contains 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
while (true) { | |
console.log("je"); | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Mi fondo se mueve!</title> | |
<script type="text/javascript"> | |
window.onload = function() { | |
document.onmousemove = function(e) { | |
var x = -(e.clientX/10); | |
var y = -(e.clientY/10); | |
this.body.style.backgroundPosition = x + 'px ' + y + 'px'; |
This file contains 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
from __future__ import print_function | |
import sys | |
import math | |
import time | |
db = [] | |
with open("./lonlat", 'rb') as fi: | |
for l in fi: |
This file contains 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
from binascii import hexlify | |
from os import urandom | |
from wsgiref.simple_server import make_server | |
def app(environ, start_response): | |
start_response('200 OK', [('Content-Type', 'text/plain')]) | |
return [hexlify(urandom(16))] | |
make_server('', 8000, app).serve_forever() |
This file contains 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
<?php | |
$url = curl_init("http://teamlod.es/imga/imgur.php"); | |
curl_setopt($url, CURLOPT_RETURNTRANSFER, 1); | |
echo curl_exec($url) |
This file contains 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
class NBTParser(object): | |
END = 0 | |
BYTE = 1 | |
COMPOUND = 10 | |
SHORT = 2 | |
INT = 3 | |
LONG = 4 | |
FLOAT = 5 | |
DOUBLE = 6 | |
BYTE_ARRAY = 7 |
NewerOlder