Sum of Digits
Description:
Given a positive integer, find the sum of its constituent digits.
Input sample:
The first argument will be a text file containing positive integers, one per line. e.g.
// | |
// main.c | |
// StructuredObjects | |
// | |
// Created by john salyer on 12/4/12. | |
// Copyright (c) 2012 Josef Salyer. All rights reserved. | |
// | |
#include <stdio.h> | |
//#include <stdbool.h> //this is what you use if you are just using C, but we're not |
Sum of Digits
Description:
Given a positive integer, find the sum of its constituent digits.
Input sample:
The first argument will be a text file containing positive integers, one per line. e.g.
Description:
The sentence 'A quick brown fox jumps over the lazy dog' contains every single letter in the alphabet. Such sentences are called pangrams. You are to write a program, which takes a sentence, and returns all the letters it is missing (which prevent it from being a pangram). You should ignore the case of the letters in sentence, and your return should be all lower case letters, in alphabetical order. You should also ignore all non US-ASCII characters.In case the input sentence is already a pangram, print out the string NULL
Input sample:
Your program should accept as its first argument a filename. This file will contain several text strings, one per line. Ignore all empty lines. eg.
A quick brown fox jumps over the lazy dog
A slow yellow fox crawls under the proactive dog
10:9a:dd:b9:83:3e Hernan | |
7C:6D:62:D2:E4:0D Hernan's iPad | |
90:27:e4:fb:3a:7c Frederico | |
Frank | |
https://github.com/moredip/Frank | |
http://blog.thepete.net/2010/07/frank-automated-acceptance-tests-for.html | |
http://vimeo.com/21860134 |
[ | |
{ | |
"id":"184061 l aa", | |
"versions": | |
[ | |
{ | |
"category":"Program Logo", | |
"file":"p184061_l_h3_aa.jpg", | |
"uri":"h3/AllPhotos/184061/p184061_l_h3_aa.jpg", | |
"type":"h3", |
if (module === require.main) { | |
inspect = function(obj) { | |
return sys.debug(sys.inspect(obj, 5)); | |
}; | |
debugcb = function(err, results) { | |
inspect(err); | |
return inspect(results); | |
}; | |
for (i=0;i<=100;i++) { | |
exports.upcomingEpisodesInLineup("DISH770", "183931", debugcb) |
client = http.createClient( 443, "go.urbanairship.com", true ); | |
request = client.request( "GET", "/api/device_tokens/", { 'Host': "go.urbanairship.com", 'Authorization' : MASTERAUTH } ); | |
request.end(); | |
return request.on('error', function(e){ console.log("request error: " + e.stack ); }); | |
return request.on('close', function() { console.log("CLOSED"); }); | |
return request.on('response', function(response) { | |
sys.debug("RESPONSE"); | |
return response.on('data', function(chunk) { | |
sys.debug("GOT DATA"); |
m = function () { | |
var events = [this._id]; | |
this.tags.forEach( function (z) { | |
emit( z, {count:1, events: events} ); | |
}); | |
} | |
r = function (key, values) { | |
var total = 0; | |
events = []; |
m = function () { | |
var events = [this._id]; | |
if (this.tags) { | |
this.tags.forEach( function (z) { | |
emit( z, {count:1, events: events} ); | |
}); | |
} | |
} | |
r = function (key, values) { |