## Adding model library in Cadence spectre2

To selecting device simulation model in Cadence Spectre for Cadence Affirma, here is how.

## Deleting all FreeSurfer original files in surf folder

by Forrest Sheng Bao http://fsbao.net

I need to delete, or purge, all original files in FreeSurfer's $subject/surf folder - because i only need my result files in that folder but not original ones. Here is a Shell script that i hope to help others, who also need to do the same. Please replace SUBJECT by the subject ID. I assume you have already setup $SUBJECTD_DIR environment variable. You may also replace $D by a real path. You can also embed the script below into a loop block so you can process many surf folders at once. #!/bin/sh$D=$SUBJECTS_DIR/SUBJECTID/surf echo$D
rm $D/rh.smoothwm.C.crv rm$D/ rh.smoothwm.FI.crv
rm $D/rh.smoothwm.H.crv rm$D/rh.smoothwm.K1.crv
rm $D/rh.smoothwm.K2.crv rm$D/rh.smoothwm.K.crv


## Font matters, on papers and webpages

by Forrest Sheng Bao http://fsbao.net

Kindle does not like Modern Serif fonts!

I just got a Kindle 3 from a friend. I tried to read some PDF papers on it. But the experience was horrible! It took me longer than normal to recognize letters in words. They are so blur and dim to my eyes. Since those papers are written by myself, I thought that changing font type or size may help. So I studied fonts today, to the best of my time allowance and brain power.

So a flash card about fonts

• There are 4 major types of fonts, Serif, Sans-Serif, typewritter and handwritten.

## Money, killing the fun part of a startup

“Being the richest man in the cemetery doesn’t matter to me … Going to bed at night saying we’ve done something wonderful… that’s what matters to me.” -Steve Jobs said in an interview with The Wall Street Journal, May 25, 1993

by Forrest Sheng Bao http://fsbao.net

I am interested in startups. I have a couple [of] ideas and energetic friends who may join me if I begin. But I never take any action.

The reason is very simple, a startup will soon lose its fun part when people start thinking about monetization.

## Meaning of #domain declaration in answer set programming

by Forrest Sheng Bao http://fsbao.net

I just notice that a weight constraint acts oddly'' for variables declared in #domain declaration in answer set programming (ASP). My grounder and solver are lparse and smodels.

Here is a demo program:

const n=2.
step(0..n).

#domain step(S).
block(a). block(b).

#domain block(B).

1{put(X,S):block(X)}1 :- step(S), S < n . % rule 1

1{gen(B,S)}1 :- step(S), S < n .          % rule 2


I thought I should get one and only one put/2 and gen/2 literal, respectively, for each S, because the lower and upper bounds are both 1. But this is what I got:

Stable Model: put(a,0) put(a,1) gen(b,0) gen(b,1) gen(a,0) gen(a,1) step(0) step(1) step(2) block(b) block(a)