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
-module(rr_db, [Server, PhotoRoot]). | |
-define(MIME_TYPE, "application/json"). | |
-compile(export_all). | |
init() -> | |
inets:start(), | |
inets:start(httpc, [{profile, database}]). | |
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
-module(testproj_test_controller, [Req]). | |
-compile(export_all). | |
csv('GET', []) -> | |
{stream, fun | |
(first_line) -> | |
{output, "var1,var2,var3\n", 0}; | |
(100) -> | |
done; | |
(N) when is_integer(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
evenodd(List) -> evenodd(List, [], []). | |
evenodd([Even, Odd|Rest], Evens, Odds) -> | |
evenodd(Rest, [Even|Evens], [Odd|Odds]); | |
evenodd([Even], Evens, Odds) -> | |
evenodd([], [Even|Evens], Odds); | |
evenodd([], Evens, Odds) -> | |
{lists:reverse(Evens), lists:reverse(Odds)}. |
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
defmodule CheckDigit do | |
import Enum | |
@doc """ | |
Determine if a sequence of digits is valid, assuming the last digit is | |
a Luhn checksum. (http://en.wikipedia.org/wiki/Luhn_algorithm) | |
""" | |
def valid?(numbers) when is_list(numbers) do |
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
fold_down(Acc) when Acc bsr 16 > 0 -> | |
fold_down((Acc band 16#FFFF) + (Acc bsr 16)); | |
fold_down(Acc) -> Acc. |
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
{ | |
"metadata": { | |
"language": "Julia", | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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 <errno.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <math.h> | |
#include "readstat_sas.h" | |
#include "readstat_iconv.h" | |
#include "readstat_convert.h" | |
#include "readstat_io.h" |
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 <Rcpp.h> | |
using namespace Rcpp; | |
#include "readstat.h" | |
#include "haven_types.h" | |
class LabelSet { | |
std::vector<std::string> labels_; | |
std::vector<std::string> values_s_; | |
std::vector<int> values_i_; | |
std::vector<double> values_d_; |