Seems that the Chi2 will represant some info of the Significant but which depends on the floating paramaters. An other possible is using the negative likelihood distribution to move the margin of the to no signal yield and then find out the fitting result. More information: http://www-cdf.fnal.gov/physics/statistics/statistics_faq.html#iptn3...
--卢亮 混沌年代里的Linux之路 大约在5、6年前,Linux在中国还被认为是“黑客带来的一件礼物”,也就是那个时候,当中国Linux中文化的先驱之一方汉找到了金山公司,希望金山软件能够支持Linux。可以想象,在那个Linux仍然属于专家和黑客的爱好的年代,金山当然不会同意这样一个请求,金山甚至对这样的要求感觉到幼稚。...
#!/bin/sh # Author Liang # Modified at June 14 2004 # rm mp3.list html.list link.list mp3topsong.html wget http://list.mp3.baidu.com/topso/mp3topsong.html cat mp3topsong.html | tr \" \\n | grep htm$ >html.list CC=1 for VAL in `cat html.list` do #wget http://list.mp3.baidu.com/topso/$VAL -O $CC.html cat $CC.html | tr \" \\n | grep mp3\$ | grep http | head -1 >> mp3.list echo -ne "$CC " >> link.list cat $CC.html | tr \" \\n | grep mp3\$ | grep http | head -1 >> link.list CC=`expr $CC + 1` done CC=1 for VAL in `cat mp3.list` do echo $CC wget $VAL -O $CC.mp3 echo $VAL CC=`expr $CC + 1` done more mp3topsong.html | sed "s/target=_blank/\\n/g" | grep ^\> | grep href | cut -f1 -d\ |grep ^[0-9] > name.l ist CC=1 while [ $CC -le 600 ] do NAME=`grep ^$CC' ' name.list | gawk '{print $2}'` LINK=`grep ^$CC' ' link.list | gawk '{print $2}'` echo $NAME $LINK CC=`expr $CC + 1` done...
For the Design of Booso.com, fix several problems whit the help of Nio and Chedong, Url rewrite: Design the link of this kind: http://booso.com/cgi-bin/booso.cgi?gmail to http://booso.com/gmail and keep all the others as usural: RewriteEngine On RewriteRule !^/$ - [C] RewriteRule !^/index.html$ - [C] RewriteRule !^/archives/howto.html$ - [C] RewriteRule !^/img/.* - [C] RewriteRule !^/cgi\-bin.* - [C] RewriteRule ^/?(.*) /usr/local/apache2/cgi-bin/booso.cgi?link=$1 RewriteLogLevel 9 Options ExecCGI AddHandler cgi-script .cgi And this will work. After that I found that the query name in Chinese will not work under Internet Explore but works find under mozilla and conqueror. Chedong suggest fix the problem of Url encoding. Url encoding: In Cgi: use CGI (); NewQuery=CGI::escape($URL); This will work. For other system, Php: PHP Example: <? $Text = "foo<b>bar"; $URL = "foo<b>bar.html"; echo HTMLSpecialChars($Text), "<BR>"; echo "<A HREF=\"", rawurlencode($URL), "\">link</A>"; ?> Note that PHP also has a strip_tags() function that will remove all HTML tags from a string. Using this function in a manner such as: echo strip_tags($Text); will strip all HTML from the input. However, if you use it in the form: echo strip_tags($Text, "<B>"); which only allows the "<B>" tag through, you are still often vulnerable to users inserting script code. By design, this function does not strip attributes from the tags. This means it is often possible to include things such as JavaScript event attributes. An example of a tag that would be allowed by the above strip_tags() call is: <B onmouseover="document.location='http://www.cert.org/'"> Some clients accept such attributes on tags that are otherwise benign. Apache Module Example: char *Text = "foo<b>bar"; char *URL = "foo<b>bar.html"; ap_rvputs(r, ap_escape_html(r->pool, Text), "<BR>", NULL); ap_rvputs(r, "<A HREF=\"", ap_escape_uri(r->pool, URL), "\">link</A>", NULL); mod_perl Example: $Text = "foo<b>bar"; $URL = "foo<b>bar.html"; $r->print(Apache::Util::escape_html($Text), "<BR>"); $r->print("<A HREF=\"", Apache::Util::escape_uri($URL), "\">link</A>"); This uses the same functions as in the Apache Module Example, called from Perl instead of directly from C. For a single code, encode url is here: perl -p -e 's/([^\w\-\.\@])/$1 eq "\n" ? "\n":sprintf("%%%2.2x",ord($1))/eg' decode : perl -p -e 's/%(..)/pack("c", hex($1))/eg' Other info: http://www.hk8.org/old_web/linux/cgi/ch02_01.htm...
All Alexa toolbar send request to data.alexa.com 80, here I give a short script to access data.alexa.com and get the XML output from alexa. Simulate the alexa toolbar: #!/usr/bin/expect spawn telnet data.alexa.com 80 expect -re "Escape" sleep 1 send "GET /data/TCaX/0+qO000fV?cli=10&dat=snba&ver=7.0&cdt=alx_vw%3D20%26wid%3D31472%26act%3D00000000000%26ss%3D1024x768%26bw %3D639%26t%3D0%26ttl%3D4907%26vis%3D1%26rq%3D23&url=http://blog.wespoke.com/ HTTP/1.1\n" send "Accept: */*\n " send "Accept-Encoding: gzip, deflate \n" send "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; Alexa Toolbar) \n" send "Host: data.alexa.com \n" send "\n" send "\n" interact Output from Data.alexa.com: Alexa.xml...
The white noise can be a flat or other distribution, here I simulate a flat white noise + a gaussian signal. Using the scan method and unbined maximun likelihood fit to find out the max significance on a pure white noise. #!/bin/sh NUMOFDATA=1000 TIMES=10 COUNT=0 STEP=5 echo 10000 >log.data echo 10000 >log.img GenShell() { echo "#!/bin/sh" echo echo "root echo echo echo 'gSystem->Load("libRooFitCore.so") ;' echo 'gSystem->Load("libRooFitModels.so") ;' echo 'RooRealVar mass("mass","mass",0 , 100 , "Gev/c^{2}") ; ' echo 'RooRealVar mean("#mu","#mu",0, 5,"Gev/c^{2}") ;' echo 'RooRealVar sigma("#sigma","#sigma",3, "Gev/c^{2}") ;' echo 'RooRealVar gausFrac("Gaussian Fraction","Gaussian Fraction",0 , 1 ) ;' echo 'RooGaussian g("g", "Gaussian", mass, mean , sigma );' echo 'RooPolynomial p("p", "Polynominal", mass);' echo 'RooAddPdf model("model", "Gaussian + Polynominal",RooArgList(g,p),gausFrac);' echo 'gausFrac.setVal(0.0);' echo echo echo 10000 >log.img while [ $COUNT -lt $TIMES ] do echo "RooDataSet *data=model.generate(mass, $NUMOFDATA);" echo 'data.write("generate.data");' echo echo MASS=0 MAS2=0 while [ $MAS2 -le 95 ] do MAS2=`expr $MASS + $STEP` #echo "mean.setVal( $MASS, $MAS2 );" echo "mean.setFitRange( $MASS, $MAS2 );" echo 'RooFitResult *fs = model.fitTo(*data, "rq");' echo 'fs->Print("v");' echo 'RooPlot *frame=mass.frame();' echo 'data->plotOn(frame);' echo 'model.paramOn(frame, data);' echo 'model.plotOn(frame);' echo 'model.plotOn(frame,Components(p), LineStyle(kDashed));' echo 'frame->Draw();' echo 'TCanvas *c = new TCanvas;' echo 'TH1F *h = new TH1F( );' echo 'frame->Draw();' echo 'TImage *img = TImage::Create();' echo 'img->FromPad(c);' echo 'img->WriteImage("canvas.png");' echo 'delete h;' echo 'delete img;' echo 'delete c;' echo '.!./move.sh img' MASS=`expr $MASS + $STEP` echo echo done echo echo '.!./move.sh data' COUNT=`expr $COUNT + 1` echo echo done echo '.q' echo echo echo "EOF" } GenShell > ./poloynamial.root chmod 755 poloynamial.root ./poloynamial.root > output.data mv 100* data...
SSH is the descendant of rsh and rlogin, which are non-encrypted programs for remote shell logins. Rsh and rlogin, like telnet, have a long lineage but now are outdated and insecure. However, these programs evolved a surprising number of nifty features over two decades of UNIX development, and the best of them made their way into SSH. Following are the 11 tricks I have found useful for squeezing the most power out of SSH. Installation and Versions...