LAWU

主页:http://astroman.lamost.org

修复grub

双系统,想把ubuntu干掉,直接装在winsows里。把数据导出后用分区魔术师删除linux分区。删除完重启电脑,问题来了。提示
  1. grub loading … error 22
无法进入系统,
解决办法
  1. 1. 从Windows安装盘上启动系统。
  2. 2. 启动时,按R进行系统修复。安装可能会要你选择你要修复的操作系统。如果你安装了不止一个Windows拷贝,要确保选择有问题的那个拷贝。
  3. 3. 这时,恢复控制台就会载入,然后根据要求输入本地管理员密码。(尝试一下直接回车)
  4. 4. 密码通过后,进入一个命令环境,输入FIXMBR,然后按回车。
  5. 5.输入FIXBOOT命令在系统分区中写入一个新的引导区。确保指定要修复的硬盘驱动器盘符(如FIXBOOT C:)。

搞定!

Ubuntu配置ip

最近台里要求换ip,本以为可以像windows下那样打开 系统——首选项——网络连接,然后就直接更改ip地址。没想到这招不好使了。只好在终端里更改。
更改步骤:

  1. sudo vi /etc/network/interfaces里面的内容一般是(大都大同小异)
  2. auto lo iface lo inet loopback
  3. auto eth0
  4. iface eth0 inet static
  5. address 192.168.54.151
  6. netmask 255.255.128.0
  7. gateway 192.168.0.1

复制代码
其中,address,netmask,gateway分别为本机ip地址、子网掩码、网关,按要求更改即可。保存退出。
然后重启网络
sudo ./etc/init.d/networking restart

提示OK,重启成功!

论坛附件无法正常下载问题

最近论坛上的一个问题困扰我好长时间,问题是“在论坛中上传了附件,比如PDF,RAR等格式的,在下载的时候却无法正常下载,也就是下载下来的附件大小为0kb。”

问题解决方法:在上传的DISCUZ论坛文件中找到attachment.php,用记事本打开后找到代码行:// read local file’s function: 1=fread 2=readfile 3=fpassthru 4=fpassthru+multiple
$readmod = 2; 然后把readmod=改为以上提供的数字,用4可以下载。

感谢宇宙驿站里的quanling cui 同好,感谢他提供的解决方法!

Thirty Meter Telescope Site Testing

As part of the conceptual and preliminary design processes of the Thirty Meter Telescope (TMT), the TMT site testing team has spent the last five years measuring the atmospheric properties of five candidate mountains in North and South America with an unprecedented array of instrumentation. The site testing period was preceded by several years of analyses selecting the five candidates, Cerros Tolar, Armazones and Tolonchar in northern Chile; San Pedro M´artir in Baja California, Mexico and the 13 North (13N) site on Mauna Kea, Hawaii. Site testing was concluded by the selection of two remaining sites for further consideration, Armazones and Mauna Kea 13N. It showed that all five candidates  are excellent sites for an extremely large astronomical observatory and that none of the sites stands out as the obvious and only logical choice based on its combined properties. This is the first article in a series discussing the TMT site testing project.
Over the last eight years, the Thirty Meter Telescope and its precursor projects have invested considerable resources into identifying the best possible candidate sites for TMT. The work began by considering as complete a list as feasible of all potentially interesting sites on Earth. This list was first narrowed down to three regions in the western hemisphere,
northern Chile, southwestern North America, and Hawaii based on existing information from previous site testing work and general knowledge about the atmosphere. Through analyses of cloud cover and precipitable water vapor using satellite data, five candidate sites were selected for in-situ testing, namely Cerros Tolar, Armazones and Tolonchar in northern Chile; San Pedro M´artir in northern Baja California, Mexico and Mauna Kea 13N, Hawaii.
TMT then began an extensive on-site testing effort for which we equipped each of the five candidate sites with a large array of  instrumentation for analyzing atmospheric properties, with a special emphasis on turbulence and turbulence profiles. All equipment was calibrated
and characterized carefully before deployment to the candidate sites, where it operated for 2.5 to 5 years. The results show that all candidate sites are excellent and are clearly among the best ground-based telescope sites on Earth. They also show that not a single site is perfect or is the best (or worst) in all parameters. This is, of course, a welcome outcome, as
it means that the selection of candidate sites was successful and that the final site selection can safely also take into account other considerations, without compromising the expected scientific output of TMT.
Based on the site testing data and on other technical and programmatic considerations, the TMT Project selected two sites for further consideration, one in the northern hemisphere,one in the southern hemisphere. They are Cerro Armazones and Mauna Kea 13N.

让我们拭目以待!

文章来源:http://arxiv.org/PS_cache/arxiv/pdf/0904/0904.1183v1.pdf

一个cheke gmail脚本的修改

周末闲来无事,弄了会儿conky。在ubuntu桌面上显示系统信息、天气预报、未读邮件等等。
网上有好多安装方法,在此不多介绍。说一下其中的一个cheke gmail 的 脚本
代码是这样的:
#!/bin/bash
gmail_login="***"
gmail_password="***"
dane="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - 
https://${gmail_login}{gmail_password}@mail.google.com/mail/feed/atom 
--no-check-certificate | grep 'fullcount' 
| sed -e 's/.*<fullcount>//;s/</fullcount>.*//' 2>/dev/null)"
if [ -z "$dane" ]; then
echo "Error"
else
echo "$dane"
fi

很怪异,脚本没错,在其他的机器上都可以正常运行,在我的机器上就搞不定。系统版本、bash版本也都一样。哪儿错了?到现在也没明白。
只好在此基础上修改一下,出来想要的结果才是王道。(方法得益于同组师兄)
修改后是这样的:

#!/bin/bash
gmail_login="***"
gmail_password="***"
dane1="$(wget https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom 
--no-check-certificate | grep 'fullcount' 
| sed -e 's/.*<fullcount>//;s/</fullcount>.*//' 2>/dev/null)"
dane="$(more atom |grep 'fullcount' |sed -e 's/.*<fullcount>//;s/</fullcount>.*//')"
if [ -z "$dane" ]; then
echo "Error"
else
echo "$dane"
fi
rm atom*

原理:先通过wget下载一个atom文件,再用more或cat去读此文件中的所需要的信息然后输出,最后删除生成的文件。搞定!

其实说白了就是把原先的程序断行运行,可为什么不断行就运行不通了呢?麻烦谁知道谁告诉我。

porno izle