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-Ins
Move the Adobe PDF plugin to the Trash.
Quit then relaunch Safari.
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 OS的忠实FANS,都无需担心无法使用FLAC或APE。

  4.开源特性:同FLAC一样,APE具备开源特性,这意味着任何组织或个人都可以免费使用这种压缩技术,任何组织或个人都可以修改和发布基于这两种技术的新产品,这给众多MP3厂商降低成本提供了有力保障,且消费者也能够以相对低廉的价格购买到只有世界级MP3(例如:iPod支持ALAC)才支持的无损压缩音频、CD级的音质表现!

  5.资源的广泛性:庞大的网路资源,决定了APE的普及度,用户只需通过网路搜索引擎,即可找到数量众多的APE下载资源,无论您使用BT还是讯雷皆可轻松获取APE资源。

       和APE一起的CUE文件有什么用?
       通常我们下载的APE文件有两种:一种是下载一张专辑中有好几个APE文件一个文件一首歌,就和我们平时听的MP3文件一样。还有一种是一张专辑只有单个APE文件,并且附有一个CUE文件。其实这个CUE文件很小,但是非常有用,它记录着这个大的APE文件中的音乐的段落,音乐的名称以及作者专辑等内容。对于第一种APE,您就可以像播放MP3一样,将所有的APE文件全加到千千静听中,进行播放就行了。对于第二种APE,如果只把APE文件加到播放器中,你就会发现一整张专辑成了一首歌。所以对于第二种APE,你要将APE带的CUE文件利用Foobar、千千静听打,这些播放软件就会自动依照CUE中的内容,将指定的APE文件分段后在播放列表中出现。如果你想把这个APE文件还原成CD的话,也要利用到这个CUE文件。

然后打开偏好设置,进行如下设置。
点 import settings


然后去网上寻找一款可以加载虚拟CD的软件比如DAEMTOOLS,先点击挂载,选择想要挂在的文件,选择以CUE后缀结尾的文件。接着会自动跳出虚拟CD,ITUNES 会自动跳出,询问你是否需要导入CD。导入后还可以自己添加专辑图片。选中全部音乐然后get info,在artwork中添加相应图片即可。

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:631
2. 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/printcap
PrintcapFormat BSD # For Snow Leopard only


4. Click “Save Changes”. It may take 30 seconds or longer for these changes to go into effect.
5. Restart MATLAB.
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>.m"
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
.bash_profile
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. FakeSMC设定参看这里。

3. HD3000可参看这里。
HD3000花屏还可以试试添加EDID,以及display注入。参看这里。

4. 电源管理补丁

5. HD3000 集显的机器 显卡id0126 按道理能够直驱的。
但是-v时出现
SNB Framebuffer did not show up
然后跳2下可以进入系统,但是显卡没驱动不能改分辨率,显示显存64M。

如果出现以上情况可以试试,查看
/System/Library/Extensions/AppleIntelSNBGraphicsFB.kext/Contents/info.plist
找到如下内容
01168086 01268086
在前面添加 0x
然后修复权限,重建缓存试试。
我的改过之后就成功驱动了。

6. RTC补丁解决BIOS重置
终端输入

sudo perl -pi -e 's|\x75\x30\x89\xd8|\xeb\x30\x89\xd8|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

7. 解决 Transcript Offline - Buffer Pool Allocate [181000] failed
1. 打开 AppleIntelSNBGraphicsFB 里面 info 文件,将“FBCControl”-“Compression”的值改为‘1’,将“FeatureControl”里面的"FBC"的值改为‘1’,将“FBClientController”栏全部内容删除;

2. 打开 AppleIntelHD3000Graphics 里面 info 文件,IOKitPersonalities 下面Gen6 下面 VRAMMethod 和 VRAMOverride 两项删除。保存后修复权限重建缓存,重启错误解决。


8. 解决smc更新提示
以我的本本为例,和MacBook Pro 8,1的配置比较接近,SMBIOS.plist为MacBook Pro 8,1

到http://support.apple.com/kb/HT1237?locale=zh_CN去查看你对应机型的SMC版本和Boot Rom版本并记下来

1、将你的SMBIOS.plist里面的SMbiosversion字段的值的前面部分修改成和Boot Rom版本一致。比如的MacBook Pro 8,1最新的的Boot Rom版本是MBP81.88Z.0047.B27,则修改SMbiosversion字段的值为MBP81.88Z.0047.B27.1104221557;

2、将你的FakeSMC.kext里面的Info.plist的REV值修改成和SMC版本一致,方法参考【變色龍系列三】FakeSMC.kext 設定說明【08/05】。比如MacBook Pro 8,1最新的SMC版本是1.68f98,则rev值为AWgPAACY。

修改好之后保存重启,这两个更新就不在了,其他机型以此类推。
相关dsdt ssdt 以及驱动:

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 for mac from here.
or install from macports:
sudo port install emacs-app +fullscreen

If you want to use emacs to edit tex file, you have to install auctex or aquamacs.
For installing aquamacs, you can see here.

I am using auctex.

2.1 Download auctex from here.

2.2 Install

./configure --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp --with-texmf-dir=/usr/local/texlive/texmf-local

instead this by: (if you used macports)
./configure --with-emacs=/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs --with-lispdir=/Applications/MacPorts/Emacs.app/Contents/Resources/site-lisp --with-texmf-dir=/usr/local/texlive/texmf-local


in OS X 10.11, if u installed the texlive via macports, the texmf-local location is changed to
/opt/local/share/texmf-local

make

sudo make install

Before do this, maybe you have to install make
go to Xcode Preferences, install Command Line Tools in Downloads.

2.3 load auctex
edit your ~/.emacs
put following in.

(setenv "PATH" (concat "/usr/texbin:/usr/local/bin:" (getenv "PATH")))
(setq exec-path (append '("/usr/texbin" "/usr/local/bin") exec-path))
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)

P.S.
If you want to swap CTRL and CAPS LOCK

Go into System Preferences, Enter the Keyboard & Mouse preference pane, In the Keyboard tab, click Modifier Keys... Swap the actions for Caps Lock and Control.

If you want to use option as META

In the menu bar, click Terminal, Click Preferences... Under the Settings tab, go to the Keyboard tab, Check the box labeled Use option as meta key.

Read more ...