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; | |
namespace ComplexExercise | |
{ | |
public struct Complex | |
{ | |
public double Real | |
{ | |
get; | |
set; |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.Title = "c188h"; | |
new Program().Run(); | |
} | |
char[,] GetGrid(out int width, out int height) | |
{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Challenge #188 [Easy] Solution (Box Plot Generator)</title> | |
<style> | |
body { | |
text-align: center; | |
} | |
.input-region { |
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
# calculates the angular frequency from a planet's period. the angular | |
# frequency (omega) of a time period p is such that a function like | |
# sin(omega * t) has a period p with respect to t | |
def omega(p) | |
p.clone.merge({omega: (2 * Math::PI / p[:period])}) | |
end | |
# calculates the position of a planet from its radius and a given time t | |
# by finding its angle from the starting position (omega * t) and then | |
# finding the co-ordinates at that angle on a circle describing its orbit |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#define PR "%.12lg\n" | |
/* creates a new polynomial with the given degree */ | |
double * polynomial_new(int degree) | |
{ | |
double * terms = malloc(sizeof(double) * (degree + 1)); |
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
class Program | |
{ | |
static Random random = new Random(); | |
static void Main(string[] args) | |
{ | |
InputData data = GetInput(); | |
int sampleSize = 1024; | |
Bitmap chart = new Bitmap(data.SimulationTime, sampleSize); |
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
Lorem ipsum dolor sit felis, eleifend lacinia dictumst. Donec elementum Aliquam euismod massa vel | |
amet, consectetur diam facilisis egestas. risus laoreet, molestie magna consequat semper. | |
adipiscing elit. Ut at Nullam varius eu diam ut dui vel, volutpat dui. Sed porttitor aliquet | |
pharetra sapien, id iaculis. Duis viverra Aenean facilisis mollis elit, ut porttitor ipsum | |
sodales ipsum. Vivamus imperdiet leo quis accumsan. Nullam eu imperdiet non. | |
eleifend molestie tortor, condimentum. Ut tincidunt vehicula diam. Vivamus at Pellentesque tincidunt | |
vel pretium tortor ullamcorper velit, nec nunc eros. Proin sodales felis, sit amet | |
venenatis nec. Nam in sodales velit. Nulla pharetra, orci non congue pulvinar libero facilisis | |
metus vitae nulla aliquam porttitor mi enim, nec porta, massa metus eleifend. Donec vitae | |
fringilla at vel metus. blandit tellus rutrum finibus est, aliquam viverra tu |
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
4 25 1 | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut at pharetra sapien, id sodales ipsum. Vivamus eleifend molestie tortor, vel pretium tortor venenatis nec. Nam in metus vitae nulla aliquam fringilla at vel metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dignissim mauris a velit facilisis ullamcorper. Ut vitae consectetur purus, eu auctor quam. Donec aliquet, urna non egestas faucibus, mauris velit vestibulum quam, eget porttitor eros dui non eros. Aliquam fringilla, mi et suscipit lacinia, libero ligula consequat quam, id facilisis neque augue eget metus. Mauris dignissim quis ex eget euismod. Nunc vitae lectus turpis. Vivamus tincidunt, est sollicitudin varius blandit, sapien quam molestie mi, eget volutpat dui mauris nec dui. Praesent tincidunt lectus ut leo tincidunt, quis consectetur sapien ultricies. Nunc erat risus, mollis in ultrices ac, posuere sit amet velit. Pellentesque semper tempus sapien id tempor. Suspendisse vitae condimentum mauris, quis imperdiet nisl. | |
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
#!/usr/bin/env ruby | |
# /r/DailyProgrammer Challenge 182e: The Column Conundrum | |
words = [] | |
columns, column_width, space_width = gets.chomp.split(' ').map {|s| s.to_i} | |
while (line = gets; line != nil && line.chomp.length > 0) | |
words += line.chomp.split(' ') | |
end |
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
Vehicle M655 LLN broke the speed limit by 0.43 mph. | |
Vehicle U721 MXB broke the speed limit by 0.28 mph. | |
Vehicle H732 SKY broke the speed limit by 3.88 mph. | |
Vehicle 12 SM broke the speed limit by 0.98 mph. | |
Vehicle U398 NYO broke the speed limit by 6.53 mph. | |
Vehicle T626 OHU broke the speed limit by 2.14 mph. | |
Vehicle L247 TXV broke the speed limit by 4.53 mph. | |
Vehicle M362 XNK broke the speed limit by 6.77 mph. | |
Vehicle D953 ICB broke the speed limit by 3.83 mph. | |
Vehicle B766 PYQ broke the speed limit by 4.13 mph. |