Share,learn,discuss and spread software in professional astronomy

Download files from remote server using command-line: wget

This example shows how to download NYU VAGC galaxy and sky catalogue for SDSS DR7.

We want all the files from  http://sdss.physics.nyu.edu/datasweep/dr7 with the names *gal*.fits, *sky*.fits

比ubuntu还要易用?——当Linux Mint进军个人桌面

Linux Mint在操作系统观察网站DistroWatch上脱颖而出已经有段时间了,近日无聊,下载来玩玩,然后决定,自己的笔记本以后就用它了。

虽然自己一直以来都用的fedora,而Linux Mint属ubuntu的变种,两者的软件管理一个用rpm和yum,一个用dpkg和apt-get,切换起来会有些不适应;但Linux Mint提供的诱惑太多了,扼要罗列如下(Linux Mint 7 Gloria):

折腾笔记:在itanium2服务器上安装gnuplot及octave的故事

在服务器上处理大数据,前一阶段一直把数据整理好了再传到本地用Matlab画图分析。最近希望更高效些,直接在服务器上可视化,于是开始折腾。此处记录折腾过程中的点滴经验,备忘并供参考。

  • step 1: 开启服务器的本地图形显示。

只要两边操作系统的ssh不是太老,这一步很简单

ssh -X user@host

Openmp并行域内的子函数并行化

看下面这段代码:

#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
 
void para_print()
{
	//automatic vars in a routine called within an omp region is private implicitly
	int i,tid;
	/*if you need shared vars inside omp function call, use static vars;
	* the side effect is static vars keeps its previous value 
        * if not reset a initial value during each call*/
	static int j;
	#pragma omp single
	{
	printf("tid: i,j\n");
	j=10;
	}
	#pragma omp for 
	for(i=0;i<5;i++)
	{
	tid=omp_get_thread_num();
	#pragma omp critical
	{
		j++;

免费的正版瑞星/诺顿杀毒软件

由Google提供的软件包中的杀毒软件,简体中文版软件包提供瑞星,繁体中文和英文版提供诺顿(Norton Security Scan),并且google承诺这些软件始终免费。同时提供的还有反间谍软件Spyware Doctor入门版。

下载地址:

简体中文版:瑞星

http://pack.google.com/intl/zh-cn/pack_installer.html

繁体中文版:诺顿

http://pack.google.com/intl/zh-tw/pack_installer.html?hl=zh-tw

英文版:Norton Security Scan

http://pack.google.com/intl/en/pack_installer.html?hl=en

微软出了新的命令行终端Windows Power Shell

前两天安装更新时发现有个Windows Power Shell可选,就装上了;今天无事打开来把玩了一下,像模像样的。常用的linux终端命令基本都可用,比如ls,pwd,cd等等,还可以使用..表示上级目录;用惯了linux的人,用windows自带的cmd会很不适应,甚至无从下手;而用这个PowerShell应该不会再感觉那么陌生了。

试着输入help,列出了130多条命令和诸多别名。输入help+命令名会有具体的帮助信息。

如何在C中抑制库函数的标准输出

在自己的程序中调用编译好的库函数时,如果库函数会输出一些提示信息(比如初始化信息、版本信息或者警告信息)而你又不喜欢这些信息,并且你希望保留另外一些函数的标准输出,可以在编程调用时这样做:

通过结构体实现C可变参数函数

通常C语言中实现可变参数函数的方法,要利用<stdarg.h>的库函数,比如

http://c-faq-chn.sourceforge.net/ccfaq/node261.html

看上去比较繁琐。

今天忽然想到可以借助结构体实现这样的功能。首先根据所有可能用到的参数定义一个结构体,比如

struct par_all
{
int var_i;
int var_j;
float var_x;
float var_y;
char *var_c;
char *var_d;
...
} myparam;

然后定义函数

IDL不支持ia64架构的Linux?

参看此处

http://www.ittvis.com/forum/message.asp?fmid=4311

当前似乎只支持x86以及AMD "Opteron" 'x86_64'.

组里的itanium处理器下的sgi服务器上idl就无法运行。

ia64使用的是和ia32(即x86)以及x86-64(intel 64,amd 64)不兼容的指令系统,主要用在itanium处理器。参见

http://www.cnblogs.com/cy163/archive/2008/05/02/1179877.html

http://en.wikipedia.org/wiki/Ia32

 

Linking Error: hidden symbol ... is referenced by DSO

The following error was reported when I was trying to install the k-correction and photo-z package from http://cosmo.nyu.edu/~mb144/kcorrect/

on a sgi altix 64-bit server with gnu-linux system:

/usr/bin/ld: /opt/kcorrect/bin/k_test_filter: hidden symbol `__modsi3' in /usr/lib/gcc-lib/ia64-redhat-linux/3.2.3/libgcc.a(__modsi3.oS) is referenced by DSO
collect2: ld returned 1 exit status
make[1]: *** [/opt/kcorrect/bin/k_test_filter] Error 1

while it passes without problem on my local ubuntu 8.10 system.

聚合内容