วันจันทร์ที่ 18 มีนาคม พ.ศ. 2556

Install wget in Mac OS X Without Homebrew or MacPorts


These information copied from http://osxdaily.com/2012/05/22/install-wget-mac-os-x/
-----------------------------------------------------------------------------------------------------------------------
The command line tool wget lets you retrieve a group of files from FTP and HTTP protocols, it’s a very useful utility for web developers and powerusers to have around because it lets you do things like perform quick and dirty site backups and even mirror websites locally.
This approach is going to build and install wget in OS X from source, this means you’ll need Xcode and the Unix dev tools (free @ Mac App Store) installed, but it has the benefit of eliminating the need of a package manager like Homebrew or MacPorts.
Assuming you have Xcode and the command line tools installed, launch Terminal and enter the following commands:
First, use curl to download the latest wget source:
curl -O http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz
Next we use tar to uncompress the files you just downloaded:
tar -xzf wget-1.13.4.tar.gz
Use cd to change to the directory:
cd wget-1.13.4
Configure with the appropriate –with-ssl flag to prevent a “GNUTLS not available” error:
./configure --with-ssl=openssl
Build the source:
make
Install wget, it ends up in /usr/local/bin/:
sudo make install
Confirm everything worked by running wget:
wget --help
Clean up by removing wget source files when finished:
cd .. && rm -rf wget*
You’re all set, enjoy wget in Mac OS X.

วันพฤหัสบดีที่ 20 ธันวาคม พ.ศ. 2555

การติดตั้งไทยเลเทกซ์บนระบบปฏิบัติการวินโดวส์ (Thai Latex installation on Windows System)

1. ลงผีดำผีขาว (Ghostscript viewer) เพื่ออ่านไฟล์ .ps และ .pdf
2. ลง acrobat reader เพื่ออ่านไฟล์ .pdf (ถ้ามีแล้วไม่ต้องลง)
3. ลงโปรแกรม Miktex 2.7 หรือ 2.8 คือมองหาคำว่า setup.exe
4. ลงโปรแกรม text editor ที่เป็น freeware แนะนำ texmaker
5. ลงโปรแกรมวาดรูปแบบเวกเตอร์และเป็น freeware แนะนำ inkscape
6. ในซีดี ให้เลือก copy2c แล้วก้อปไปวางในไดรฟ์ C โฟลเดอร์ไหนมีอยู่แล้วก็ให้ก๊อบเฉพาะไฟลืที่ยังไม่มีไปใส่
7.ไปที่ start>programs>miktexXXX>เลือก settings
8. กดปุ่ม refresh FNDB เพื่อปรับฐานข้อมูลประมาณ 3 ครั้ง
9. เลือก tab Roots ตรง Miktex Options
10. กดปุ่ม Add ไปหาไฟล์ที่พึ่งก๊อปปี้ลงไปในไดรฟ์ C ที่ชื่อว่า localtexmf
11. หลังจากแอ็ดเสร็จจะโชว์ข้อความว่ามีทั้ง miktexXXX และ localtexmf อยู่ในไดรฟ์ที่ต้องการ
12. ติดตั้ง swath setup

ทดสอบรัน latex โดยพิมพ์
\documentclass[...]{...}
\usepackage[english,thai]{babel}
\usepackage{thswitch}
\begin{document}
...
\end{document}

วันศุกร์ที่ 17 สิงหาคม พ.ศ. 2555

AIPS Memos for those are newbies

RUN
1. Run file ใช้คำสั่งใน cshell ก่อนว่า setenv RUNFIL /directory/ที่ไฟล์รันอยู่
2. จากนั้นใช้ชุดคำสั่ง  run 'ชื่อไฟล์รันนามสกุล hexadecimal AIPS user number' เช่น 123  ก็จะเป็น 03F เป็นต้น
3. list ตามด้วยชุดฟังก์ชันที่เขียนไว้ใน runfile นั้น ๆ

วันอาทิตย์ที่ 3 มิถุนายน พ.ศ. 2555

Installing Latex on a Mac


  1. Go to http://www.tug.org/mactex/
  2. Download the MacTex Package (admin rights may be required)
  3. Once the download is finished load the disk image (if it doesn't happen automatically) and run the installer (MacTeX-2010.mpkg) contained within.
I am using \texmaker for creating a tex file on Mac. Hope you enjoy!
Thai latex installation will publish soon or later :-)

วันศุกร์ที่ 9 ธันวาคม พ.ศ. 2554

UBUNTU 11.10 login with no effect

apt-get install gnome-panel ควรแก้ปัญหานี้ได้ สำหรับผู้ที่ไม่ชอบ effect ใด ๆ สำหรับการล็อกอินและเรียกใช้งาน terminal ทั่วไป

AIPS no TV but TEKSRV & MSGSRV work (solved troubleshooting)

After I installed UBUNTU 11.10 in Samsung Laptop RC418 core i5 and NVIDIA optimus graphic inside. I tried to install AIPS software and found that TV wouldn't work properly as shown below;
----------------------------------------------------------------------------------------------
START_AIPS: I am GUESSING you are at a workstation called localhost
START_AIPS: Starting TV servers on localhost asynchronously
START_AIPS:  - with Internet Sockets...
START_AIPS: Starting TPMON daemons on LOCALHOST asynchronously...
DADEVS.PL: This program is untested under Perl version 5.012
Starting up 31DEC11 AIPS with normal priority
XASERVERS: Start TV LOCK daemon TVSERV on localhost
XASERVERS: Start XAS on localhost, DISPLAY :0
XASERVERS: Start graphics server TEKSRV on localhost, DISPLAY :0
XASERVERS: Start message server MSGSRV on localhost, DISPLAY :0
TVSERVER: Starting AIPS TV locking, Inet domain
STARTPMON: [LOCALHOST] Starting TPMON1 with output SUPPRESSED
Begin the one true AIPS number 1 (release of 31DEC11) at priority =   0
ZVTPO3 bind (INET): Address family not supported by protocol
XAS: ** TrueColor FOUND!!!
XAS: ***  Using shared memory option for speed ***
XAS: Using screen width 1356 height 668,
     max grey level 8191 in 16 grey-scale memories
MakeLink: bind error (INET): Address family not supported by protocol
TVSERVER told to shut down by XAS
XAS: Quitting NOW.
AIPS 1: You are assigned TV device/server   1
AIPS 1: You are assigned graphics device/server   1
----------------------------------------------------------------------------------------

therefore I have tried to solve the problem by using the command;
aips tv=local
before starting aips software.
It should be work and show the messages somethings like this;
-------------------------------------------------------------------------------------------
START_AIPS: Starting TV servers on localhost asynchronously
START_AIPS:  - WITH Unix Sockets as requested...
START_AIPS: Starting TPMON daemons on LOCALHOST asynchronously...
Starting up 31DEC11 AIPS with normal priority
Begin the one true AIPS number 1 (release of 31DEC11) at priority =   0
AIPS 1: You are not on a local TV device, welcome stranger
AIPS 1: You are assigned TV device/server   2
AIPS 1: You are assigned graphics device/server   2
AIPS 1: Enter user ID number
?AIPS_TEK_HOLD=
do NO
DADEVS.PL: This program is untested under Perl version 5.012
UNIXSERVERS: Start TV LOCK daemon TVSRV1 on localhost
UNIXSERVERS: Start XAS1 on localhost, DISPLAY :0
UNIXSERVERS: Start graphics server TKSRV1 on localhost, display :0
UNIXSERVERS: Start message server MSSRV1 on localhost, display :0
TVSERVER: Starting AIPS TV locking, Unix (local) domain
STARTPMON: [LOCALHOST] Starting TPMON1 with output SUPPRESSED
ZVTPO3 bind (INET): Address family not supported by protocol
XAS: ** TrueColor FOUND!!!
XAS: ***  Using shared memory option for speed ***
XAS: Using screen width 1356 height 668,
     max grey level 8191 in 16 grey-scale memories

AIPS 1: Enter user ID number
?

วันพุธที่ 17 สิงหาคม พ.ศ. 2554

Installation Starlink via UBUNTU Natty (ติดตั้ง Starlink บน Ubuntu 11.04)

You can install Starlink in Ubuntu using the following procedure. Ensure that you have at least 1.3 GB of free space on your root partition.
These instructions have been tested with Natty's version which was work properly.
  1. Download the most recent version of Starlink from the project download page. Most users should download the 32-bit Linux glibc 2.5 package.
  2. Once the download has completed, open a Terminal (Applications -> Accessories -> Terminal).
  3. Change to the root directory by typing the following:
    • cd /
  4. Unpack the archive in the root directory:
    • sudo tar -xvzf ~/Linux-32bit-glibc2_5.tar.gz
    • If you did not download the archive to your Home directory, replace ~/ with the path to the download directory.
    • A new top-level directory should have been created, called /star. This contains all of the Starlink applications and documentation.
  5. Open your .bashrc file for editing:
    • gedit ~/.bashrc
  6. Add the following lines to the end of your .bashrc and then save the file:
    • # source the starlink profile so we get the starlink env vars source /star/etc/profile
  7. Install the following packages (which are required by some of the Starlink software):
    • csh
  8. Log-out and then log back in again, or type source /star/etc/profile to set the environment variables required for the Starlink software to run.
  9. Open a Terminal and start the program you wish to use (for example, type gaia to start the GAIA image analysis application).

Starlink applications
The following is a short list of some of the major applications included with Starlink, and the commands required to run them:
  • GAIA - Graphical Astronomy and Image Analysis Tool: gaia
  • PHOTOM - Photometry package: /star/bin/photom/photom
  • PERIOD - Time-series analysis package: /star/bin/period/period