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
function readFoodAndPutInCalendar() { | |
var foods = readFoods(); | |
for (var i = 0; i < foods.length; i++) { | |
if (isThisANewFood(foods[i])){ | |
putFoodInGCalendar(foods[i]); | |
putFoodInTimetree(foods[i]); | |
} | |
} | |
} |
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
# This gnuplot script generates a surface plot with a rasterized png part. It uses the following external utilities | |
# sed | |
# pdflatex | |
# The final output is output_base.'.pdf' | |
output_base='tan' | |
# Rendering the surface plot can be heavy, so here is a switch to not to do that part (rendersurf==1 -> surface will be rendered) | |
rendersurf=1 |
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
function outer_product(A,B) result(AB) | |
double precision, intent(in) :: A(:),B(:) | |
double precision, allocatable :: AB(:,:) | |
integer :: nA,nB | |
nA=size(A) | |
nB=size(B) | |
allocate(AB(nA,nB)) | |
AB = spread(source = A, dim = 2, ncopies = nB) * & | |
spread(source = B, dim = 1, ncopies = nA) | |
end function outer_product |
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
(defun permute-cyclic (first second third point-start point-end) | |
(interactive "sFirst \nsSecond \nsThird \nr") | |
(replace-string first "%" nil point-start point-end) | |
(replace-string second first nil point-start point-end) | |
(replace-string third second nil point-start point-end) | |
(replace-string "%" third nil point-start point-end) | |
) |