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 errVSstep(A, y0, t0, tf) | |
errors = []; | |
range = 1:20; | |
h = (tf-t0)./2.^range; | |
for i=range | |
[approx, err] = eulerint(A,y0,t0,tf,2^i); | |
errors = [errors, norm(err)]; | |
end |
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
/* | |
* AppController.j | |
* NewApplication | |
* | |
* Created by You on July 5, 2009. | |
* Copyright 2009, Your Company All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> | |
@import "FileUpload.j" |
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 bvp( N ) | |
r0 = 0.02; %m | |
h = 20; %W/m^2*K | |
k = 14; %W/m*K | |
TA = 20; %degrees C | |
T0 = 100; %degrees C | |
L = 0.1; %m | |
a = @(x) -1./(L-x/2); |
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 unew = burger(u,d,dt,bdry) | |
N = length(u); | |
dx = 1/(N); | |
sup = d*dt/dx^2; | |
main = 1*ones(N,1)-u*dt/dx-2*d*dt/dx^2*ones(N,1); |
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 supportsBoxShadow() { | |
var s = document.body.style; | |
return s.WebkitBoxShadow !== undefined || s.MozBoxShadow !== undefined || s.boxShadow !== undefined; | |
} | |
function frame_pictures(){ | |
// Exit if we don't have boxshadow support at all and fall back on wp-caption | |
if(!supportsBoxShadow()) return; | |
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
<div class="year-archive"> | |
<h2>2006</h2> | |
<ul> | |
<?php wp_get_archives('year=2006&show_post_count=true'); ?> | |
</ul> | |
</div> | |
<div class="year-archive"> | |
<h2>2007</h2> | |
<ul> | |
<?php wp_get_archives('year=2007&show_post_count=true'); ?> |
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 [coords, dof, ndof, edof, nelm, ex, ey] = geometry(gridsize) | |
if nargin==0 | |
gridsize = 5; | |
end | |
b12 = @(y) .120 - y; | |
b16 = @(y) y - .020; | |
coords = []; | |
for y = 0:gridsize:.070; | |
for x = 0:gridsize:.100; | |
if(y < .010) |
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
(ns svd.core | |
(:use | |
clojure.contrib.combinatorics) | |
(:require | |
[clojure.contrib.duck-streams :as ds] | |
[clojure.contrib.str-utils :as str])) | |
(defn wordlist [] | |
(set (map #(re-find #"[^/]*" %) (ds/read-lines "sv_se.dic")))) |
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
def init_wordlist() | |
@wordlist = {} | |
file = File.new("sv_SE.dic", "r") | |
while content = file.gets | |
@wordlist[content.split("/")[0]] = 1 | |
end | |
file.close | |
end |
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
(ns textemplate.core | |
(:use fleet)) | |
(spit "output/test.tex" ((fleet [number] (slurp "test.tex.fleet")) 25)) | |
(.. Runtime (getRuntime) (exec "pdflatex --output-directory=output output/test.tex")) |
OlderNewer