顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

2011年11月25日 星期五

Eclipse on Ubuntu(64bit)


Eclipse - no Java (JRE) / (JDK) … no virtual machine

Stack Overflow answer:
You can:
reference that exact JRE path in your eclipse.ini.
copying any JRE of your in your /jre directory
In both cases, no PATH to update.

eclipse.ini VM setup in Linux: reference

Eclipse cannot find adb

Stack Overflow answer
Problem was that the executables were made for 32-bit architecture and i was running amd64. Easily solved, just had to install the ia32-libs package.
Linux下无法使用adb,PacketTracer等软件的问题(转载)

Connect to your Samba server from Linux

Connect to your Samba server from Linux

The graphical method

Using the command line

Samba is a very powerful tool that not only can share files with Windows machines, but with Linux machines as well.

2010年12月5日 星期日

popen

C: Run a System Command and Get Output?
You want the "popen" function. Here's an example of running the command "ls /etc" and outputing to the console.

popen(3) - Linux man page
The popen() function opens a process by creating a pipe, forking, and invoking the shell. Since a pipe is by definition unidirectional, the type argument may specify only reading or writing, not both; the resulting stream is correspondingly read-only or write-only.

Advanced Bash-Scripting Guide: I/O Redirection

C programming - capturing information sent to stdout
藍森林-自由軟件 關於open()

2010年7月6日 星期二

Linux下使用C/C 訪問數據庫——SQL Server篇

Linux下使用C/C 訪問數據庫——SQL Server篇
http://www.linux521.com/2009/system/200904/1938.html

linux下連接SQL SERVER
http://blog.chinaunix.net/u2/71813/showart_1355662.html

just a note, for future reference

2009年4月30日 星期四

Install Ubuntu inside Windows

Some may ask why you need to install the new one, wasn't the old version worked fine? I must confess that I just want to try the latest version: Ubuntu 9.04.

The original 7.10 version had no good support on ATI graphic cards and I installed a open source driver fglrx.

After online updates to 8.04 and 8.10, the old driver could not work well. It ran in only Ubuntu low-graphic mode. At that time I thought it may be okay to continue and I kept on updating to 9.04.

However, after rebooting to finish updating, I couldn't even see the login menu.

Since I have driver problem, CD-ROM problem, I need to install by some other method. My computer had dual OS and I can use this advantage.

First I fixed the MBR to boot from Windows XP only. Later I delete the Ubuntu partition and formatted as NTFS drive.

Login to Windows and put the Ubuntu 9.04 CD to the external CD-ROM. Select Install inside Windows in the Ubuntu CD menu and set essential parameters. After the data all copied to your disk, you can reboot the system. Now the Windows Boot Manager will be shown and you can choose Ubuntu to finish the installation.

If you want to uninstall the Ubuntu, you can remove it from Windows Add/Remove Programs. It it easy, isn't it.

Reference from:
永遠的真田幸村: 超簡單!Windows下用wubi安裝Linux (Ubuntu 8.04 Hardy Heron)
OSWikiHK (Open Source Wiki Hong Kong, 香港開源維基): 使用 Wubi 在 Windows 安裝 Ubuntu/Kubuntu/Xubuntu 9.04 (Jaunty Jackalope)
重灌狂人: Wubi 免分割硬碟、3個步驟「無痛安裝」Ubuntu作業系統(v8.04.1最新版)

Ubuntu 正體中文站 討論區 - 筆電安裝ATI的Drvier失敗,而且變成low-graphics mode
阿駕零零壹 © 學習筆記: 讓 Ubuntu 8.10 正確辨識 ATi 顯卡
蹲在地上劃圈圈: ubuntu 8.10 -- 更換 GDM 這鬼東西的解析度

Fix Windows MBR

Using MbrFix is the simplest way to fix it.
Download MbrFix then open console.
(Start->Execute->cmd)
Change folder to MbrFix folder.
MbrFix /drive 0 fixmbr

If this method is not working, please check the following reference.

cnet download - MbrFix
CoffeeCat's IT Blog - 在Windows下删除Linux系统的方法(附修复MBR的工具下载)
Age of Engineer - 在Windows XP SP2下修復MBR
daqi's blog - 卸载ubuntu的正确方法

2009年4月28日 星期二

Ubuntu upgrade commands

Here's some common commands to upgrade the Ubuntu system.
# update the package list from the source
sudo apt-get update

# upgrade the installed packages on the system
sudo apt-get upgrade

# install some new packages
sudo apt-get install [package name, one or many]

# remove packages that no longer needed
sudo apt-get autoremove

# upgrade the update manager
sudo aptitude install update-manager-core

# update to latest release
# -c: check if new release distribution available
# -d: check if upgrading is possible
sudo update-manager -d -c

Hong Kong Linux User Group - 升級 Ubuntu/Kubuntu/Edubuntu/Xubuntu

2009年3月11日 星期三

Python Time and date

PLEAC-Python : Dates and Times
#python
import time
import datetime

#only date
today = datetime.date.today()

#now time, including date and time
now = datetime.datetime.now()

#UTC now time, including date and time
utcnow = datetime.datetime.utcnow()

#ctime() standard time output string
print now.ctime()
#Thu Feb 26 17:50:55 2009

#strftime() (string-format time) format the output string
print now.strftime("%A %B %d %I:%M:%S %p %Y")
#Thursday Febuary 14 05:50:55 PM 2009


For more example, please read Dates and Times
datetime — Basic date and time types

2009年3月2日 星期一

Ubuntu user directory mapping

You can change your own directory mapping if you don't like the default folders.(Maybe it was named by system which you were not satisfied.)

  $ vi ~/.config/user-dirs.dirs
# find the follow
XDG_DESKTOP_DIR="$HOME/Desktop"
#modify the path to your folder
XDG_DESKTOP_DIR="$HOME"


You can change your own directory mapping for the rest of folders in the file. After you modify the file, restart your GNOME session.(Press Ctrl + Alt + Backspace)

Reference:
lzy's 543 - [教學]將 ubuntu 7.10 Gutsy 的桌面資料夾等中文路徑改成英文路徑方法
Nelson - [教學] 將 Ubuntu 7.10 的桌面資料夾等中文路徑改成英文路徑

2009年2月19日 星期四

messenger in ubuntu

Pidgin

aMsn
Written in tcl/tk
aMSN - 替代Windows Live Messenger的開源軟件
  $ sudo apt-get install amsn

emesene
Written in Python and Gtk+, need Ubuntu 8.04 or later.
[推薦]輕巧好用的msn client...emesene...
  $ sudo vi /etc/apt/sources.list
deb http://apt.emesene.org/ ./
deb-src http://apt.emesene.org/ ./
  $ sudo apt-get update
  $ sudo apt-get install emesene

Galaxium
玩物尚誌 - Linux下的超棒MSN Client - Galaxium
designed for the GNOME desktop
  $ sudo vi /etc/apt/sources.list
deb http://ppa.launchpad.net/galaxium/ubuntu hardy main
deb-src http://ppa.launchpad.net/galaxium/ubuntu hardy main
  $ sudo apt-get update
  $ sudo apt-get install galaxium

2009年2月16日 星期一

Ubuntu 8.10 破音問題

灌了Lazybuntu裡頭建議的影音播放軟體後
聲音就沒正常過= = 感覺是設定的問題
上網找了幾個解決方法 目前有效的是第一個!

Ubuntu 8.10下播放MP3音效輸出產生破音的解決[圖文]
如果你在使用Ubuntu8.10的過程中,也有被破音困擾過,那就試試下面介紹的方法。
雙擊通知欄區域的喇叭圖標,試著把PCM調到70%左右,測試啟動音樂,沒破音了吧,就這麼簡單。

Ubuntu audio problem
If you heard a lot of noises playing audios, try to adjust your Sound Setting. Set PCM to about 70% as the figure shown, then try to test again. The noises should be disappeared. This method is useful to me, or you may try the following steps.


Ubuntu音效問題 - U型遊樂園
  $ cd /etc/init.d
  $ sudo gedit soundstartfix
#!/bin/bash
kill $(lsof -t /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*)
sudo modprobe -r snd-hda-intel && sudo modprobe snd-hda-intel model=auto
  $ sudo update-rc.d soundstartfix defaults
  $ sudo chmod +x soundstartfix
Powered By Blogger