- First
- Explain
- Second
- Second Explain
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
发信人: zhaowei2008 (zhaowei), 信区: JobHunting | |
标 题: 问个题目: 从1-n 中找出k, 使得 k=a^2 +b^2 (a b 为整数) | |
发信站: BBS 未名空间站 (Sun Feb 23 15:31:23 2014, 美东) | |
问个题目: 从1-n 中找出k, 使得 k=a^2 +b^2 (a b 为整数) | |
有好的算法吗? | |
(defn find-k [n] |
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
(* Variations of Fizzbuzz in OCaml, translated from the Rust version in | |
"FizzBuzz Revisited" by Lindsey Kuper: | |
http://composition.al/blog/2013/03/02/fizzbuzz-revisited/ *) | |
(* The FizzBuzz test proposed by Imran Ghory: | |
http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/ *) | |
(* and made famous by Jeff Atwood: | |
http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html *) | |
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
define({ | |
initFullFormAjaxUpload: function() { | |
// Once the FormData instance is ready and we know | |
// where to send the data, the code is the same | |
// for both variants of this technique | |
function sendXHRequest(formData, uri) { | |
var xhr = new XMLHttpRequest(); |
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
(* test data *) | |
let answer = Div (Div (Con 1972, Con 2), Con 23);; (* 42 *) | |
let error = Div(Con 1, Con 0);; (* Exception: Division_by_zero. *) | |
(* term type *) | |
type term = Con of int | Div of term * term ;; |
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
(* test data *) | |
let answer = Div (Div (Con 1972, Con 2), Con 23);; (* 42 *) | |
let error = Div(Con 1, Con 0);; (* Exception: Division_by_zero. *) | |
(* term type *) | |
type term = Con of int | Div of term * term ;; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
(* term type *) | |
type term = Con of int | Div of term * term ;; | |
(* test data *) | |
let answer = Div (Div (Con 1972, Con 2), Con 23);; (* 42 *) | |
let error = Div(Con 1, Con 0);; (* Exception: Division_by_zero. *) |
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
use v5.12; | |
use IO::Scalar; | |
use Encode qw/decode/; | |
use LWP::Simple; | |
use Mojo::DOM; | |
use Email::Stuffer; | |
my $data; | |
## Open a handle on a string, and append to it: |
OlderNewer