Wednesday, December 12, 2012

Mac OS X 下用 iTunes 截取音乐任意部分的方法

右击进入歌曲 显示简介->选项,里面有“起始时间”和“停止时间”两个选择,填入你刚才记录的时间段。选中歌曲,右击选择“转换所选内容为ACC”。就可以完成音乐截...
Read more ...

Tuesday, December 11, 2012

Mac OS X 下直接从视频中提取音频文件

找到并右键点击需要进行操作的视频文件 在弹出的右键菜单中选择“编码所选视频文件”(Encode Selected Video Files) 在弹出的“编码媒体”(Encode Media)对话框的“Setting”下拉菜单中选择“Audio Only” 选择好目标文件的路径后点击“Continue”即...
Read more ...

Problem with printing PDFs from Safari

Problem: When I view a PDF in Safari it looks good. When I go to print it either the preview is totally blank or one page that I was viewing at the time previews and the print dialog box shows the additional 8 pages but they are all blank. I'm baffled. If I use Chrome and go from its interface to preview it works perfectly. Thank you for any guidance. Solution: Go to /Library/Internet Plug-InsMove the Adobe PDF plugin to...
Read more ...

Thursday, December 6, 2012

iTunes 播放 ape flac

APE是Monkey's Audio,一种无损压缩格式。这种格式的压缩比远低于其他音频格式,但能够做到真正无损,同时其开放源码的特性,也获得了不少音乐发烧友的青睐。在现有不少无损压缩方案中,APE是一种有着突出性能的格式,令人满意的压缩比以及飞快的压缩速度,在国内应用比较广泛,成为了不少朋友私下交流发烧音乐的选择之一。 由于其无损压缩的特性,造就了APE音乐CD级的音质输出,同时接近原文件一半大小的压缩比,也减少了存储空间的占用,而通过MP3这种目前主流的播放器来表现,则更为人性化。      具体表现在:  1.高压缩比:APE的压缩比大约在55.50%,接近源文件的一半大小。  2.编码速度快:编码速度考验用户的耐心,同FLAC(国内目前只有台电T19支持FLAC无损压缩音频格式)一样,APE有着超快的编码速度,这在目前众多的音频编码标准中具备了同FLAC相同的速度优势。  3.平台的广泛支持:音频压缩不但需要硬件的支持,也需要的软件的支持,因此能够被更广泛的平台支持,也就意味着被更多用户使用。FLAC与APE在这方面做的都非常出色,能够兼容所有系统平台,现在无论您是Windows用户还是众多版本的Linux用户,哪怕您是Mac...
Read more ...

Sunday, November 11, 2012

彻底关闭win8的休眠和睡眠功能

右键cmd,以管理员权限运行 powercfg -h off 命令来关闭休眠. 关闭睡眠 输入 gpedit.msc (组策略) 计算机设置-管理模板-系统-电源管理 电源管理-睡眠设置 将“睡眠时允许待机(S1-S3)(接通电源)”设置为“已禁用” 将“睡眠时允许待机(S1-S3)(使用电池)”设置为“已禁用” 重启...
Read more ...

Thursday, November 8, 2012

MAC下德语助手无限使用

找到文件 /Users/xxx/Library/Preferences/com.eusoft.dehelper.plist xxx为用户名 用xcode打开,也可以用PlistEdi Pro 打开。 找到 MAIN_TimesLeft 这个就是使用次数,把它修改位10000000就行了。 这样就可以长期使用了。不过如果你方便买正版的话还是花点...
Read more ...

Tuesday, October 16, 2012

Print plot in MATLAB in Mac OS X

If you receive an error when using the File-> Print option in Mac OS X in MATLAB. Problem sending file to output device, system returned error :lpr: The printer or class was not found. ... Just follow the steps. 1. In Safari, navigate to http://localhost:6312. Click on the “Administration” tab, and then “Edit Configuration File”3. At the top of the editable block of text, add these lines:Printcap /etc/printcapPrintcapFormat...
Read more ...

Monday, October 8, 2012

Run MATLAB script in terminal

Just type command like following. matlab -nojvm -nodesktop -r "run <the-script>.m"matlab -nojvm -nodesktop -r "<the-script>"matlab -nojvm -nodesktop -r "run <the/path>/<the-script>...
Read more ...

MATLAB runtime_error solution

When you running MATLAB, if you encountered an error like this: terminate called after throwing an instance of 'std::runtime_error'  what():  locale::facet::_S_create_c_locale name not valid It is easy to solve just by setting environmental variable LC_ALL="en_US.utf8" bash: export LC_ALL="en_US.utf8" csh: setenv LC_ALL "en_US.utf8" It is better to add this to your bash or csh profile. e.g. .bshrc .cshrc .b...
Read more ...

Thursday, October 4, 2012

如何删除Mac App Store中别人帐号已购应用程序的更新提示

如果安装了别人破解的应用程序,Mac App Store 提示应用程序有更新,会需要输入别人的AppleID信息。如果要清除提示。1. 在Mac App Store中安装一个免费的App,然后在“应用程序”中找到这个App,右击 –> “显示包内容”–> 进入文件夹“Contents”–> 拷贝“_CodeSignature”,“_MASReceipt”。2. 在“应用程序”中找到那个破解的App,右击 –> “显示包内容”–> 进入文件夹“Contents”,把刚才拷贝的“_CodeSignature”,“_MASReceipt”粘贴进来覆盖原...
Read more ...

Friday, September 14, 2012

Hackintosh T420

1. U盘制作 参看这里,首先下载X-Flash。 然后将X-Flash复制到桌面,双击打开安装程序,使其在桌面展开。最后将格式化成HFS+日志系统的U盘拖入X-Flash图标即可。最后可以美化一下,右击U盘点 get info 然后把安装程序里面的狮子图标拖动到U盘信息的左上角。 当然,最后需要替换OSIstall。 替换 mac安装盘目录System/Library/PrivateFrameworks/Install.framework/Frameworks/OSInstall.framework/Versions/A/里的osinstall。 替换mac安装盘目录System/Installation/Packages 里的 osinstall.mpkg 2....
Read more ...

Install TEX/LATEX in Mac OS X

1. Install MacTex based on Texlive. Download MacTex from here. or you can also install from MacPorts. sudo port install texlive sudo port install texlive-latex-extra You can see the list of  texlive ports here. Around 99% of the packages are included in texlive-latex-extra. 2. Use Emacs as an editor. You can down emacs...
Read more ...

Add Color to the Terminal in Mac OS X

This post is from here. Adding colorized ls output to the Terminal in Mac OS X is a good way to make navigating around the command line a bit easier on the eyes. We’ll cover a customizable setting, and you can get a preview of color ls output by typing “ls -G” at the command line. The preview with ls -G will depend on the Terminals color...
Read more ...

Make an alias in Mac OS X shell

1. nano ~/.bash_profile add you alias like following alias l='ls -lah' then run source ~/.bash_profile in terminal. 2. nano /etc/profile (for a normal user) nano ~/.profile (for a root/su do) Add your alias like so to the file:alias aliasname='mycommand /path/path'(notice no space between equal sign and ') Load/reload your profile with:. /etc/profile...or for root/superuser do:. ~/.prof...
Read more ...

Thursday, August 30, 2012

The ps Command

This post is from here. The ps (i.e., process status) command is used to provide information about the currently running processes, including their process identification numbers (PIDs). A process, also referred to as a task, is an executing (i.e., running) instance of a program. Every process is assigned a unique PID by the system. The basic syntax of ps is ps [options] When...
Read more ...

Monday, August 13, 2012

Friday, August 10, 2012

Mac OS X 下修改机器名和主机名

This post is from here. 修改主机名和计算机名 sudo scutil --set HostName NewName sudo scutil --set ComputerName NewName 修改终端提示符 vi ~/.profile 添加 export PS1="[\u@\h \W]\$...
Read more ...

Wednesday, August 1, 2012

Ubuntu下WebQQ桌面化

This post is from here. sudo add-apt-repository ppa:loneowais/fogger sudo apt-get update sudo apt-get install  fogger 然后可以搜索 fogger 打开程序,添加WEBQQ即可。 但是中文提示可能是乱码。 可以参考这里修改: 修改方式如下: 打开终端执行: sudo vim /opt/extras.Ubuntu.com/fogger/fogger/AppWindow.py  (vim不熟悉可以使用gedit,前面带行号) 22 import re         #22行加上该句 252...
Read more ...

Wednesday, July 25, 2012

配置 Ubuntu 12.04

首先安装 ubuntu-restricted-extras sudo apt-get install ubuntu-restricted-extras >> qq sudo add-apt-repository ppa:lainme/libqq sudo apt-get update sudo apt-get install libqq-pidgin empathy 里面就有qq了。 或者看这里。 >> stardict sudo apt-get install stardict 词典。 >> trash click here. >> Ubuntu在顶部面板显示系统状态条 click here. >> ubuntu tweak click here. >> mac...
Read more ...

use byobu instead of terminal in ubuntu

sudo apt-get install byobu byobu-tmux press F9 to get help. ...
Read more ...

PPT in shell

Download tpp from here. tar zxvf tpp-1.3.1.tar.gz We have to install ruby firstly. sudo apt-get install ruby ruby-dev and we also need ncurses-ruby. tar jxf ncurses-ruby-1.3.0.tar.bz2 cd ncurses-ruby-1.3.0 ruby extconf.rb If we get error like this, checking for unistd.h... yes checking for locale.h......
Read more ...

Friday, July 20, 2012

德语 zu 的用法

This post is from here. um…zu的目的不定式结构 um…zu的目的不定式结构在句中作目的状语,意为“为了……”。目的不定式结构中不能出现主语,其动作主体应该同主句主语一致。目的不定式结构可放在句首、句中或句末,并用逗号将前后句分开。提问用wozu,warum或zu welchem Zweck, mit welcher AbsichtViele Deutsche fahren gern mit dem Fahrrad, um gesund zu bleiben.Wozu fahren viele Deutsche gern Fahrrad?注意:1. zu位于动词不定式之前,如动词是分离动词,则zu位于两者之间,并连写,例如:ich gehe zum Bahnhof, um meine Großmutter abzuholen.2. 目的不定式结构放在句首,主句用反语序,也就是,紧跟的是可变位动词;目的不定式结构放在主句后,主句用正语序:Um...
Read more ...

view pdf in chromium

In command line: sudo cp path/to/libpdf.so /usr/lib/chromium-browser/ you can install a chrome and find it in path /opt/google/chrome/ and you can also download from the following link...
Read more ...

Wednesday, July 11, 2012

How to Add a Network Printer in Linux

This post is from here. >> Install the CUPS application through your distribution's graphical package manager or command-line tools. >> Open the CUPS Web interface by typing "http://localhost:631" into a browser window. >> Click "Add Printer" under the "Administration" section. >> Choose a suitable...
Read more ...

28 个 Unix/Linux 的命令行神器

This post is from here. 下面是Kristóf Kovács收集的28个Unix/Linux下的28个命令行下的工具(原文链接),有一些是大家熟悉的,有一些是非常有用的,有一些是不为人知的。这些工具都非常不错,希望每个人都知道。本篇文章还在Hacker News上被讨论,你可以过去看看。我以作者的原文中加入了官网链接和一些说明。 dstat & sar iostat, vmstat, ifstat 三合一的工具,用来查看系统性能(我在《性能调优攻略》中提到过那三个xxstat工具)。 官方网站:http://dag.wieers.com/rpm/packages/dstat/ 你可以这样使用: 1 alias dstat='dstat...
Read more ...