標籤

二元樹 (1) 字串常數池 (1) 投資 (3) 每月損益 (37) 例外處理 (1) 泛型 (2) 股票 (15) 指標 (5) 英文 (8) 基本資料型別 (1) 期貨 (1) 程式交易 (10) 量化投資 (5) 亂亂寫 (3) 概念 (3) 資料結構 (3) 演算法 (3) 數學 (3) 轉型 (1) AMA (1) ArrayList (1) assert (1) BeautifulSoup (1) C/C++ (8) casting (1) ClassCastException (1) classpath (1) Collection (4) Comparable (1) comparTo() (1) constructor (1) database (3) Debian (1) Dropbox (2) EA (2) enum (1) equals() (2) exception (3) extends (1) ffmpeg (1) final (1) Git (1) HashMap (1) HashSet (1) hasNext() (1) HTS (3) instanceof (1) IS-A (1) Iterator (1) JAVA (43) length (1) Linux (31) List (1) Mac (6) Map (1) ML (2) MT4 (6) MySQL (2) next() (1) NullPointerException (1) Number (1) Numpy (2) OpenCart (1) OpenCV (3) OSX (1) overloading (1) overriding (3) pandas (2) PHP (8) PriorityQueue (1) Python (11) Queue (1) random() (1) reverse() (1) Samba (1) SCJP (21) sqrt() (1) synchronized (1) talib (1) ufw (1) uTorrent (1) var-args (2) VHF (1) vim (2) Yhoo知識+ (4)
顯示具有 Mac 標籤的文章。 顯示所有文章
顯示具有 Mac 標籤的文章。 顯示所有文章

2019年7月14日 星期日

ISO to USB on MAC

diskutil list   #列出磁碟

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *120.0 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS 未命名 1                119.7 GB   disk2s2

/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *7.8 GB     disk3

   1:                 DOS_FAT_32                         7.8 GB     disk3s1

我要把/dev/disk2裡的iso檔dd到/dev/disk3,先在命令列退出/dev/disk3

$ diskutil unmountDisk /dev/disk3
Unmount of all volumes on disk3 was successful

再來輸出ISO檔到USB:dd if=<檔案名稱> of=<裝置檔案名稱> bs=4m; sync

$sudo dd if=/Volumes/120g/debian-10.0.0-amd64-DVD-1.iso of=/dev/disk3 bs=4m; sync

  • bs=4M 告訴 dd 每次讀寫 4 MiB 區塊來增加效能; 原來的預設值是 512 位元組,相較之下會很慢
  • sync 是用來確定指令結束之前所有的寫入都已完成。

參考1 2

2019年7月13日 星期六

2014年4月27日 星期日

Installing HTTrack on a Mac (Mac OS X)

http://forum.httrack.com/readmsg/15816/15608/index.html?q=httrack+mac

 
To compile httrack on your Mac, you first of all need to install Apple
developer Tools (X-Code). Either download it from
<http://developer.apple.com/tools/download/> or perhaps the Developer Tools are
on your Mac OS X install DVD. 

Then download the newest souce code of HTTrack from
<http://debian.httrack.com/dists/unstable/main/source> (if you want the newest
beta-version). Currently the archive name of the newest version is
httrack_3.41.20.orig.tar.gz. Unpack it using Finder (dobble click the
downloaded file).

Now start the application Terminal (found in /Applications/Utilities/ or by
searching for it with Spotlight). Terminal provides a command line interface.

(1) Type cd <path to httrack folder> (replacing <path...> with the actual path
e.g. Desktop/httrack-3.41.20). 
(2) Type ./configure (plus optionally --prefix=<path you where you want to
install HTTrack> if you for example do not have administrator priviledges to
your Mac).   
(3) Type make (compiles the source to executable commands)
(4) Type make install (the installer puts the files where you told it to by
using --prefix=... of per default in the folder /usr/local/)

Now you can archive with HTTrack by typing /usr/local/bin/httrack <url to
archive> -O ~/<name of local archive folder> -n -j

The above options (i.e. -n -j) are just a couple of the most usefull options
to use. For more options I advice you to read the HTTrack documentation. It is
also often very usefull to add web adresses that the crawler should not
archive and some that it should. This is done simply by adding to the URLs
with a leading - or + (e.g. httrack <http://www.httrack.com/> -O
~/070208_httrack_com -n -j -http://www.httrack.com/page/*
+http://www.httrack.com/page/7/*). 

Please report how the instructions above has helped you or how they did not.
:-)

Kind regards,

2012年7月6日 星期五

2011年11月26日 星期六

111102_在Mac編譯C語言及執行

1. 打開終端機
2. 輸入 gcc xxx.c  (編譯)
3. 輸入 ./a.out  (執行)

或是

make

或是

make clean