Friday, December 30, 2011

satellite name list.

http://planet4589.org/space/misc/names.html

Thursday, November 17, 2011

decompress .tar.Z file

zcat filename.Z | tar -xvf -

Friday, November 11, 2011

swift data analysis.

http://www.hp.phys.titech.ac.jp/ymori/xrt_analysis.html
http://www.swift.ac.uk/user_objects/

Tuesday, November 01, 2011

new stellar mass black holes

http://arxiv.org/pdf/1011.1459v2
http://www.eso.org/public/archives/releases/sciencepapers/eso1004/eso1004.pdf
http://arxiv.org/pdf/0802.2716v2

Sunday, October 30, 2011

关于经络.

http://www.zysj.com.cn/lilunshuji/maijuehuibian/690-16-1.html

关于经络.

经络气血多少的歌诀

下面是金元•窦汉卿著的《标幽赋》里面的气血多少的歌诀:

  厥阴太阳,少气多血;

  太阴少阴,少血多气。

  气多血少者,少阳之分;

  气盛血多者,阳明之位。

  手阳明大肠经、足阳明胃经多气多血应记住。少血多气的有六条经,即手少阳三焦经、足少阳胆经、手少阴心经、足少阴肾经、手太阴肺经和足太阴脾经。多血少气的有四条经,即手太阳小肠经、足太阳膀胱经、手厥阴心包经和足厥阴肝经。

Monday, October 10, 2011

latex hyperlink.

use the package \usepackage{hyperref}

use the command \url{........}

Tuesday, September 27, 2011

gawk and shell script

use "gawk" in shell script, and both take argument.


a=$1;
gawk '{print $1}' $a

Thursday, September 08, 2011

remove password for win 7

经本人实践多次有效
以前有个方法好像是用USB启动删掉system32下一个文件但是忘了怎么操作了
最后一次恢复密码是用的chntpw

有些trick 在里面

step 1: 制作ubuntu 的live cd 或者USB 启动盘,具体方法google

step 2: Install the chntpw program
启动进入ubuntu live以后
http://www.howtogeek.com/howto/14369/change-or-reset-windows-pa
但是这个是不work的,好处是他会将一些乱七八糟的dependencies装上
接下来,卸载这个程序,然后从
http://ftp.us.debian.org/debian/pool/main/c/chntpw/
下载chntpw_0.99.5-0+nmu1_i386.deb
直接点击就能安装,0.99.6对我不work, google了一下很多人都有同样的问题
0.99.5我实验了是worked

step 3:
继续follow
http://www.howtogeek.com/howto/14369/change-or-reset-windows-pa

Saturday, August 20, 2011

iphone 3gs cable numbers meaning.

Cable 1 LCD display

Cable 2 Touchscreen sensor and home button

Cable 3 earpice speaker and proximity sensor

4,5,6 are I believe GPS, antenna and camera cables.

That is what I can tell by opening it up.

Wednesday, August 17, 2011

http://www.unixguide.net/linux/faq/06.14.shtml


The Screen Is All Full of Weird Characters Instead of Letters

You probably sent some binary data to your screen by mistake. Type
echo '\033c' to fix it. Many Linux distributions have a command,
reset, that does this.

If that doesn't help, try a direct screen escape command.

echo Ctrl-V Ctrl-O (在屏幕上先敲echo,然后按ctrl-v, 之后ctro-o,然后回车就可以,下同, this one is working on cluster, but the previous is not working on cluster)

This resets the default font of a Linux console. Remember to hold down
the Control key and type the letter, instead of, for example, Ctrl,
then V. The sequence

echo Ctrl-V Esc C

causes a full screen reset. If there's data left on the shell command
line after typing a binary file, press Ctrl-C a few times to restore
the shell command line.

Another possible command is an alias, "sane," that can work with
generic terminals:

$ alias sane='echo -e "\\033c";tput is2; \
> stty sane line 1 rows $LINES columns $COLUMNS'

The alias is enclosed with open quotes (backticks), not single quotes.
The line break is included here for clarity, and is not required.

Make sure that $LINES and $COLUMNS are defined in the environment with
a command similar to this in ~/.cshrc or ~/.bashrc,

$ LINES=25; export $LINES; $COLUMNS=80; export $COLUMNS

using the correct numbers of $LINES and $COLUMNS for the terminal.

Finally, the output of "stty -g" can be used to create a shell script
that will reset the terminal:

1. Save the output of "stty -g" to a file. In this example, the file
is named "termset.":

$ stty -g >termset

The output of "stty -g" (the contents of "termset") will look
something like:

500:5:bd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:73

2. Edit "termset" to become a shell script; adding an interpreter and
"stty" command:

#!/bin/bash
stty 500:5:bd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:73

3. Add executable permissions to "termset" and use as a shell script:

$ chmod +x termset
$ ./termset

[Floyd L. Davidson, Bernhard Gabler]

Tuesday, August 16, 2011

email exploder.

An email exploder is a single email address which siultaneously sends email to a number of locations determined by a file which contains a list of valid email addresses.

中文应该就是群发.

Saturday, August 13, 2011

how to make pretty figure in matlab

http://automatica.dei.unipd.it/tl_files/utenti/varagnolo/matlab/HowToMakePrettyFiguresWithMatlab.pdf

Friday, August 12, 2011

open file browser from terminal in linux.

http://ubuntuforums.org/showthread.php?t=1576086


open file browser from terminal in linux

xdg-open .
nautilus .

these two commands are equivalent.

Thursday, August 11, 2011

map the middle click to keyboad.

http://linuxaleph.blogspot.com/2008/11/mapping-middle-click-to-keyboard-key.html


typically it is already set: shift+ insert in linux.

Wednesday, August 10, 2011

分割大文件.

error code 0的问题为文件太大. http://forums.macrumors.com/showthread.php?t=399322

mac 中分割大文件: 在terminal中用如下命令

http://www.mac-forums.com/forums/switcher-hangout/72806-how-split-large-files.html

split -b2047m inputfilename

合并用
cat x* >completefilename



fat32 最大单个文件是4GB
http://en.wikipedia.org/wiki/File_Allocation_Table

nfts 最大单个文件是16TB

mac : 8 EB

http://support.apple.com/kb/HT2422

Sunday, June 05, 2011

随想。

每个追逐自己梦想的人都让人感动。李娜是这样,中华达人中的那些平凡的人们都样是。在这一点上,大家没有差别。

Friday, June 03, 2011

reduce the top margin in pdf file.

crop the proper region you want in acrobat pro, then print it to a new pdf file.

One can also change some control numbers inside the pdf file, there are some numbers about the crop, changing those numbers has the same function as the tool crop. The rest procedures are the same.


The tool "touch up" in acrobat pro can easily move the selected objects, which is very convenient to reduce the top margin blanks.

Thursday, June 02, 2011

matlab solve function examples.

http://homepages.ulb.ac.be/~dgonze/INFO/matlab.html

Solving equations

To solve equations symbolically
eq1=sprintf('a-(b+1)*x+x^2*y');
eq2=sprintf('b*x-x^2*y');

sol=solve(eq1,eq2,'x','y');

sol.x
sol.y

To solve equations numerically
a=2;
b=5.2;

eq1=sprintf('%d-(%d+1)*x+x^2*y',a,b);
eq2=sprintf('%d*x-x^2*y',b);

sol=solve(eq1,eq2,'x','y');

sol.x
sol.y

Selecting real solutions
eq1=sprintf('2/(1+Y^4)-X=0');
eq2=sprintf('2/(1+X^4)-Y=0');

sol=solve(eq1,eq2,'X','Y');

sol.X
sol.Y

x=eval(sol.X)
y=eval(sol.Y)

k=find(imag(x)==0);

sol=[x(k) y(k)]

Tuesday, May 31, 2011

useful linux command.

http://www.phototour.minneapolis.mn.us/linux/commands

Monday, May 30, 2011

style and bibtex files in texshop

http://politics.as.nyu.edu/object/latex_texshop_mac

How to Install Style and BiBTeX Style files

Create the following folder ~/Library/texmf/tex/latex/misc
Place any style files (*.sty) in this folder.
Create the following folder ~/Library/texmf/bibtex/bst
Place any BiBTeX style files (*.bst) in this folder.
Where should I put my bibliographic database files?

Create the following folder ~/Library/texmf/bibtex/bib
Place any bibliographic database files (*.bib) in this folder.

Thursday, May 26, 2011

how to generate postscript file in texshop on mac

http://email.esm.psu.edu/pipermail/macosx-tex/2006-November/025541.html

as regards standard LaTeX, typesetting in TeX & Ghostscript
mode in TeXShop should produce both a dvi file and a pdf file. In
that case, TeX produces a dvi file, from which dvips produces a ps
file, from which Ghostscript (called through the ps2pdf script)
produces a pdf file. At the end of the process the ps file is erased
(unless "Save Posctscript File" is checked in TeXShop's Engine pref),
while the dvi and pdf files are kept.

Thursday, March 10, 2011

different time system.

http://cxc.harvard.edu/contrib/arots/time/time_tutorial.html

CHandra, XMM-Newton, and RXTE all have used the TT (Terrestrial Time) system.
###############

Chandra FITS Tables

The time stamps presented by Chandra FITS tables as generated by XFF will be in TT.

It has been agreed that the Spacecraft Clock Seconds (SCCS), or Mission Elapsed Time (MET), will represent true elapsed seconds since January 1, 1998, at 0h0m0s TT, which corresponds to MJD = 50814.0 (TT). At this time, the leapsecond value (TT - UTC) was 63.184 s. Hence:

MJD (Jan 1, 1998, 0h TT) = 50814.0 (TT) = 50813.999268703704 (UTC)

Raw time stamps in the FITS tables created by XFF will be on this (SCCS or MET) time system. However, FITS times are to be taken as the sum of a Time value and the values of the MJDREF and TIMEZERO keywords.

The TIMEZERO keyword will provide a nominal clock correction that ensures an absolute accuracy of TBD (nominally 1) ms for the time stamps. The exact value of the tolerance will be based on experience in orbit; the goal is to provide reasonably accurate absolute time with a minimum effort.

###########################

http://heasarc.nasa.gov/docs/xte/abc/time_tutorial.html#systems

RXTE FITS Tables

The time stamps presented by RXTE FITS tables as generated by XFF are in TT.

It has been agreed that the Spacecraft Clock Seconds (SCCS), or Mission Elapsed Time (MET), will represent true elapsed seconds since January 1, 1994, at 0h0m0s UTC, which corresponds to MJD = 49353.0 (UTC).

Raw time stamps in the FITS tables created by XFF will be on this (SCCS or MET) time system. However, FITS times are to be taken as the sum of a Time value and the values of the MJDREF and TIMEZERO keywords. The MJDREF keyword will incorporate the transformation from UTC, via TAI, to TT (equaling an offset of 60.184 s). Thus, for January 1, 1994, at 0h UTC:

MJD (Jan 1, 1994, 0h UTC) = 49353.0 (UTC) = 49353.000696574074 (TT)

The TIMEZERO keyword will provide a nominal clock correction that ensures an absolute accuracy of 60 µs for the time stamps. The goal is to provide reasonably accurate absolute time with a minimum effort. Generically, the value of TIMEZERO may be described as "the fractional part of UTCF".

[UTCF is an institutional dinosaur that can be found in the telemetry. Its purpose is to provide a conversion to UTC: when the sum of SCCS and UTCF is divided by 86400, the integer part of the result provides the number of UTC days since January 1, 1993, at 0h UTC, while the fractional part indicates the current UTC. Thus, UTCF is the sum of the number of seconds in 1993 (31,536,001) and the clock correction, minus the number of leap seconds since January 1, 1993.]

Saturday, February 19, 2011

ads output format.

%A, %T, %J, %V, %p, %Y %(X)

ads customized reference output

Wednesday, February 16, 2011

customized .bst file for bibtex.

(1)download the package custom-bib,
http://www.ctan.org/tex-archive/macros/latex/contrib/custom-bib/

(2) then run the command below to generate the customized bst file.

latex makebst

Thursday, February 10, 2011

names of stars.

http://www.wwnorton.com/college/astronomy/astro21/sandt/starnames.html


The next great, widely used star list to appear after the BD was the Henry Draper Catalogue of stellar spectra, compiled by Annie J. Cannon at Harvard from 1911 to 1915 and published from 1918 to 1924. It includes 225,300 stars numbered in simple order of right ascension. More were added later in the Henry Draper Extension; these bear HDE numbers. Any star with an HD or HDE designation is guaranteed to have had its spectrum measured.

Monday, February 07, 2011

\renewcommand\refname{References and Notes}


\newenvironment{sciabstract}{%
\begin{quote} \bf}
{\end{quote}}


\makeatletter

\renewcommand\@biblabel[1]{{S#1.}}
\renewcommand\citeleft{(}
\renewcommand\citeright{)}
\renewcommand\citeform[1]{S#1}
\makeatother

\newcounter{lastnote}
\newenvironment{scilastnote}{%
\setcounter{lastnote}{\value{enumiv}}%
\addtocounter{lastnote}{+1}%
\begin{list}%
{S\arabic{lastnote}.}
{\setlength{\leftmargin}{.4in}}
{\setlength{\labelsep}{.5em}}}
{\end{list}}

Thursday, February 03, 2011

how to rotate all the pdf pages in mac preview.

(1) select all the pages in preview (in thumbnail mode)

(2) command+r (means right) or command l (mean left)

(3) save the file, and it is done.

Sunday, January 30, 2011

read chinese on nook color.

http://bbs.padbbs.net/thread-4163-1-1.html

思路及详细方法见HIPDA上xzzr发的帖子
http://www.hi-pda.com/forum/viewthread.php?tid=581164

1. 需要calibre转换EPUB,并添加CSS
2. 简单改变CSS的方法见下面的链接:
http://www.hi-pda.com/forum/viewthread.php?tid=651239&highlight=NOOK%2B%D0%C2%CA%D6
3. 无论用何种方法,记得读书时需要把【text--Publisher Defaults】设置为ON才可以。

CSS见下:

@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: normal;
font-style: normal;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: bold;
font-style: normal;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: normal;
font-style: italic;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: bold;
font-style: italic;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
body { font-family: "DroidFont", serif;
line-height: 1.4;}



###########################
http://www.mobileread.com/forums/showthread.php?t=75191

@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: normal;
font-style: normal;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: bold;
font-style: normal;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: normal;
font-style: italic;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: bold;
font-style: italic;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
body { font-family: "DroidFont", serif;}

Tuesday, January 25, 2011

decompress script

tar xvf $1
find ./ -name '*.gz' > temp.txt
gawk '{print "gunzip", $1}' temp.txt > temp2.txt
source temp2.txt
rm temp.txt temp2.txt

insert a word in each inside vim.

The command:

:%s/^/foo: /
...inserts foo: at the beginning of each line.

For a range you can use line numbers:

:10,20s/^/foo: /
...will do it for line 10 to 20.

My preferred way to do it for a range of lines is this: move the cursor to the first line of the range, then enter ma to set the marker a to the current line. Move to the end of the range and enter

:'a,.s/^/foo: /

Sunday, January 23, 2011

matlab label question.

Create a multiline label for the x-axis using a multiline cell array:
xlabel({'first line';'second line'})



Create a bold label for the y-axis that contains a single quote:
ylabel('George''s Popularity','fontsize',12,'fontweight','b')



##############


Subject:

How do I obtain bold formatted mathematical expressions in MATLAB using LaTeX?

Problem Description:

I want to place mathematical expressions in bold format on my plot. I have tried to use the {\bf} and {\textbf} declarations, but I receive an error and the expression does not get displayed. I am using the following commands to obtain the bold mathematical expressions:
text('position',[0.5 0.5],'Interpreter','latex','String','$\bf{\alpha}$')
This gives me the following error:
Warning: Unable to interpret TeX string. Undefined control sequence.
The following command uses {\textbf} instead of {\bf}
text('position',[0.5 0.5],'Interpreter','latex','String','$\textbf{\alpha}$')
but this results in the following error:
Warning: Unable to interpret TeX string. Missing $ inserted.

Solution:

The problem with the above two statements is that they are trying to mix Text mode and Math mode in LaTeX. One way to obtain bold fonts in Math mode is to use the {\boldmath} declaration. The following statement demonstrates the use of{ \boldmath}:


text('position',[0.5 0.5],'Interpreter','latex','String','{\boldmath$\alpha$}')
It is important to note that these commands should not be used in math mode. Thus, a complicated mathematical expression, where only certain symbols are desired in bold font, may be obtained by entering and exiting Math mode as required. Following is an example:

Saturday, January 15, 2011

combine pdf files with gs in linux

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf

http://www.linux.com/archive/feed/36815

Tuesday, January 11, 2011

money transfer client review.

http://cashsteer.com/services/money_transfer_networks/xoom/