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 <math.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/time.h> | |
| extern double drand48(); | |
| int Z; | |
| int M; | |
| int sizeLattice; | |
| int 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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "math" | |
| "strconv" | |
| ) | |
| func main(){ | |
| // figures out which number is the bound |
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
| package main | |
| import "fmt" | |
| // fibonacci is a function that returns | |
| // a function that returns an int. | |
| func fibonacci() func() int { | |
| fib0 := 1 | |
| fib1 := 1 | |
| return func() int { |
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
| #out = `find . -name "*.htm*" | xargs file -i` | |
| out = (ARGV.size > 0 ? `file -i #{ARGV[0]}/*.htm*` : `file -i *.htm*`) | |
| out.split("\n").each do |l| | |
| l =~ /(.*):(.*)charset=(.*)/ | |
| filename = "#{$1}" | |
| charset = "#{$3}" | |
| charset = "windows-1252" if charset == "unknown-8bit" | |
| if (charset!= "binary" && charset != "us-ascii" && charset != "utf-8") | |
| succ = system("iconv -f #{charset} -t utf-8 #{filename} -o #{filename}.tmp") | |
| if !succ |
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
| # `sed -i 's/<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>/ | |
| #<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\n | |
| # <meta http-equiv="Content-Type" content="text\/html; charset=UTF-8"\/>/g' #{filename}` | |
| #out = `find . -name "*.htm*" | xargs file -i` | |
| if ARGV.size > 0 | |
| out = `file -i #{ARGV[0]}/*.htm*` | |
| else | |
| out = `file -i *.htm*` |
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
| function a = lsa(fun,x,d,a1,varargin) | |
| % a = lsa(fun,x,d,a1) | |
| % | |
| % Implementation of Line Search Algorithm with Strong Wolfe conditions | |
| % as found J. Nocedal, S. Wright, Numerical Optimization, 1999 edition | |
| % Algorithm 3.2 on page 59 | |
| % | |
| % Output arguments: | |
| % a : final stepsize | |
| % |
NewerOlder