a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
calculatePadding :: Int -> Int | |
calculatePadding = ceiling . log . fromIntegral | |
Defaulting the following constraint(s) to type ‘Double’ | |
(RealFrac b0) | |
arising from a use of ‘ceiling’ at src/Cat/Decorators.hs:21:22-28 | |
(Num b0) | |
arising from a use of ‘fromIntegral’ | |
at src/Cat/Decorators.hs:21:38-49 |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
module Main where | |
import System.Environment | |
import System.IO (hFlush, stdout) | |
ask :: (Show a, Read b) => a -> IO b | |
ask question = do | |
putStr $ show question | |
hFlush stdout | |
answer <- getLine |
module Scraper::BookingCom | |
class RoomBot < BotBase | |
include Scraper::ScrapingCommon | |
HTTP_RESPONSE_VALIDATORS = [ | |
:nil_response, :status_404, :status_200, :html, | |
->(url, resp) { raise(CustomExceptions::InvalidUrlError, url) if resp.uri.path.include?("searchresults") } | |
] | |
def scrape |
module Scraper::BookingCom | |
class RoomBot < BotBase | |
include Scraper::ScrapingCommon | |
HTTP_RESPONSE_VALIDATORS = [ | |
:nil_response, :status_404, :status_200, :html, | |
->(url, resp) { raise(CustomExceptions::InvalidUrlError, url) if resp.uri.path.include?("searchresults") } | |
] | |
def scrape |
#include <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
vector<string> text; | |
string word; | |
while (cin >> word) { |
#include <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
vector<string> text; | |
string word; | |
while (cin >> word) { |
total = 0 | |
next_order = 10 | |
length = 1 | |
while True: | |
result_of_power = 0 | |
base = 1 | |
list_of_powers = [] | |
while result_of_power < next_order: | |
result_of_power = base**length | |
list_of_powers.append(result_of_power) |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <thread> | |
#include <mutex> | |
#include <algorithm> | |
#include <iomanip> | |
using namespace std; | |
const long limit = 1500000; |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <thread> | |
#include <mutex> | |
#include <algorithm> | |
#include <iomanip> | |
using namespace std; | |
const long limit = 1500000; |