快乐着飞舞着

---Nothing to do is doing nothing
随笔 - 93, 文章 - 5, 评论 - 56, 引用 - 0
数据加载中……

2012年1月15日

使用 Any Video Converter 转换 x264 MKV 不能播放

原因是 mencode 转换为x264 到mkv和MP4时没有带上默认的 global_header, 而 mkv和mp4默认是需要 global_header ,参见https://wiki.archlinux.org/index.php/MEncoder


Single-pass x264 (very high-quality)

mencoder original_video.avi -oac copy -ovc x264 -x264encopts preset=veryslow:tune=film:crf=15:frameref=15:fast_pskip=0:threads=auto -sub original_video.srt -subfont-text-scale 3 -o output_video.avi
  • The following example uses the option -of lavf to mux the output into a Matroska container which is autodetected from the output file extension .mkv
mencoder original_video.avi -oac copy -of lavf -ovc x264 -x264encopts preset=veryslow:tune=film:crf=15:frameref=15:fast_pskip=0:global_header:threads=auto -sub original_video.srt -subfont-text-scale 3 -o output_video.mkv
  • global_header writes global video headers to extradata, or in front of keyframes and is typically required for .mp4 and .mkv containers.


解决办法 在 Any Video Converter 的x264 options 里加上:global_header

posted @ 2012-01-15 00:05 快乐着飞舞着 阅读(330) | 评论 (0)编辑 收藏

2011年8月2日

【转载】Change location of Google Desktop Search index files.

http://www.iyulan.com/uchome/space.php?uid=3&do=blog&id=102

We talked about Finder earlier. Google Desktop is a great tool for keeping a comprehensive index of your desktop. So comprehensive that it create GBs of index file on your precious C: drive. As you know, keeping your C: drive full is sure way for a dead slow machine.  We have always wondered why Google have not given an option to set the location for the index files. But there is a way to change the location of the bloaty search index files.

posted @ 2011-08-02 11:34 快乐着飞舞着 阅读(267) | 评论 (0)编辑 收藏

2011年6月30日

How to do android emma coverage test in your own ant scipts

1.  emma taskdef    <!-- Emma configuration -->
    <property name="emma.dir" value="${android.sdk.root}/tools/lib" />
    
<path id="emma.lib.dir">
        
<pathelement location="${emma.dir}/emma.jar" />
        
<pathelement location="${emma.dir}/emma_ant.jar" />
    
</path>
    
<taskdef resource="emma_ant.properties" classpathref="emma.lib.dir" />
    
<!-- End of emma configuration -->

2.     <!-- - - - - - - - - - - - - - - - - - 
          target: emma-instrument                      
         - - - - - - - - - - - - - - - - - 
-->
    
<target name="emma.instrument" if="enable.emma.on.test">
        
<property name="emma.enabled" value="true" />
        
<echo>Instrumenting classes from ${project.base.dir}/${android.project.dir}/bin,${project.base.dir}/${android.project.dir}/libs/sup-client.jar</echo>
        
<!-- It only instruments class files, not any external libs -->
        
<emma enabled="${emma.enabled}">
            
<instr mode="overwrite"
                   instrpath
="${project.base.dir}/${android.project.dir}/bin,${project.base.dir}/${android.project.dir}/libs/sup-client.jar"
                   outdir
="${project.base.dir}/${android.project.dir}/bin">
            
</instr>
            
<!-- TODO: exclusion filters on R*.class and allowing custom exclusion from
                         user defined file 
-->
        
</emma>
        
<echo>Copy emma. to project libs</echo>
        
<copy todir="${project.base.dir}/${android.project.dir}/libs" overwrite="true">
             
<fileset dir="${emma.dir}" includes="emma_device.jar"/>
        
</copy>
        
    
</target>
333
    <!-- Convert this project's .class files into .dex files. -->
    
<target name="dex" depends="android-javac">
        
<antcall target="emma.instrument"></antcall>
        
<condition property="dx.extra.args" value="--no-locals" else="">
            
<istrue value="${enable.emma.on.test}"/>
        
</condition>
        
<echo>Converting compiled files and external libraries into dex file </echo>
        
<apply executable="${dx}" failonerror="true" parallel="true">
            
<arg value="--dex" />
            
<arg value="${dx.extra.args}" />
            
<arg value="--output=${project.base.dir}/${android.project.dir}/bin/classes.dex" />
            
<arg path="${project.base.dir}/${android.project.dir}/bin" />
            
<fileset dir="${project.base.dir}/${android.project.dir}/libs">
                
<include name="**/*.jar"/>
            
</fileset>
        
</apply>
    
</target>


44

<target name="run-tests"
                description
="Runs tests from the package defined in test.package property">
        
<property name="reports.dir" value="${reports.out.dir}/reports"/>
        
<property name="device.reports.dir" value="/data/data/${manifest.package}/files/reports/"/>
        
<echo>Running tests</echo>
        
<exec executable="${adb}" failonerror="true">
            
<arg value="shell" />
            
<arg value="am" />
            
<arg value="instrument" />
            
<arg value="-w" />
            
<arg value="-e" />
            
<arg value="coverage" />
            
<arg value="true" />
            
<arg value="-e" />
            
<arg value="coverageFile" />
            
<arg value="${device.reports.dir}coverage.ec" />
            
<arg value="-e" />
            
<arg value="junitOutputDirectory" />
            
<arg value="${device.reports.dir}" />
            
<arg value="-e" />
            
<arg value="junitSplitLevel" />
            
<arg value="class" />
            
<arg value="-e" />
            
<arg value="package" />
            
<arg value="${test.target.package}" />
            
<arg value="${manifest.package}/${test.runner}" />
        
</exec>

        
<echo>Downloading XML test reports</echo>
        
<mkdir dir="${reports.dir}"/>
        
<exec executable="${adb}" failonerror="true">
            
<arg value="pull" />
            
<arg value="${device.reports.dir}/" />
            
<arg value="${reports.dir}" />
        
</exec>
        
<exec executable="${adb}" failonerror="true">
            
<arg value="pull" />
            
<arg value="${device.reports.dir}/" />
            
<arg value="${reports.dir}" />
        
</exec>
    
</target>

555

        <antcall target="reinstall">
            
<param name="android.project.dir" value="end2end_rdb_mbs"/>
            
<param name="android.app.name" value="end2end_rdb_mbs"/>
            
<param name="project.base.dir" value="${project.home}/android_mbs"/>
            
<param name="enable.emma.on.test" value="true"/>
        
</antcall>

666

        <antcall target="run-tests">
            
<param name="android.project.dir" value="end2end_rdb_mbs"/>
            
<param name="android.app.name" value="end2end_rdb_mbs"/>
            
<param name="project.base.dir" value="${project.home}/android_mbs"/>
            
<param name="manifest.package" value="end2end.test"/>
            
<param name="test.target.package" value="end2end.test.rest.mbs.android"/>
            
<param name="test.runner" value="pl.polidea.instrumentation.PolideaInstrumentationTestRunner"/>
            
<param name="enable.emma.on.test" value="true"/>
        
</antcall>

posted @ 2011-06-30 15:59 快乐着飞舞着 阅读(1876) | 评论 (0)编辑 收藏

2010年1月4日

Notes 8.5 更改邮件图片标题

Actions->Tools->Preferences-> Mail(Tab)-> LetterHead
不知道 IBM的UE是怎么做的 , Tab 上面放Tab 为什么不都集成到 File->Preferences 下面呢?

真是奇怪!

暂时还没有找到自定义图片的方法.

posted @ 2010-01-04 11:17 快乐着飞舞着 阅读(477) | 评论 (1)编辑 收藏

2009年2月4日

Gmail mobile app 认证问题。

年后使用gmail mobile app的时候碰到如下的错误:
Sorry, the Gmail mobile app will not work on your phone. Your phone doesn’t have the appropriate certificate to communicate with Gmail . Try accessing Gmail on your mobile browser at http://m.gmail.com.“ when running Gmail for mobile application.

直接使用手机上的浏览器登录m.gmail.com 时有 “认证链中无可信认证”错误。
Google 之,
下面一片文章给了启示。
http://blog.csdn.net/dogfish/archive/2008/10/16/3084865.aspx
但是Moto的E2不能够认出.cer 文件,需要手动安装证书,具体步骤如下(其他moto手机安装步骤可能类似):
1. 下载https://www.verisign.com/cgi-bin/support/rootcert/getrootcert.cer,可以通过手机浏览器直接下载或者用电脑下载传到手机上。
2. 打开手机浏览器(移动梦网) -> 信息->认证->选项->添加 浏览到你下载的cer文件,然后关闭浏览器。

这样gmail mobile app 和 手机浏览器就都可以登录gmail了。


posted @ 2009-02-04 21:34 快乐着飞舞着 阅读(179) | 评论 (0)编辑 收藏

2008年10月8日

BindingSource in C#

     摘要: DataBinding in C#   阅读全文

posted @ 2008-10-08 11:12 快乐着飞舞着 阅读(900) | 评论 (0)编辑 收藏

2007年11月30日

Framework VS Library

A library is about reusable functionalities, but a framework is about reusable behaviors.
A library is something you call/inherit from your code, but framework is something that calls your code or provide services for your code.
A library is a collection of components and classes, where framwork is how abstract classes and components interact with each others.

I can explain the framework by this definition:
Framework is an abstract design that embodies how the application works, and it has "hooks" where you can "inject" your module, or component.

http://techembassy.blogspot.com/2006/05/library-vs-framework.html

posted @ 2007-11-30 14:08 快乐着飞舞着 阅读(319) | 评论 (0)编辑 收藏

2007年10月22日

笔试整理

power of 2
sizeof(void*)

Array List 。
calloc malloc
heap sort
在n个数中 第m大的
广度优先遍历
兄弟节点。

求两个数组 的交集 。
n的排列问题 。

字符串 逆序

posted @ 2007-10-22 15:06 快乐着飞舞着 阅读(235) | 评论 (0)编辑 收藏

2007年8月29日

转载 Virtual PC 2007虚拟机中安装ubuntu的问题

本人在Virtual PC 2007虚拟机中安装ubuntu是,出现屏幕拉长的现象,去图像模糊不清,不能继续安装,经过调查发现,原来在显示配置文件中有一处对虚拟机不太合适。经过调整,问题得以解决。如下所示。
1.在开始安装画面,用F4键调整分辨率为800*600*16。
2.在出现安装画面拉长时,按下ctrl+alt+f1,进入文本模式,输入:LANG=C sudo vi /etc/X11/xorg.conf ,编辑DefaultDepth 24为DefaultDepth 16。
3.保存后退出,按下ctrl+alt+f7回到图像安装模式,按下ctrl+alt+backspace重起图像安装窗体。就可以进入正常图像安装模式。以后按照自己的要求安装就可以了。 Very Happy Very Happy
有不明白或其他问题,欢迎大家探讨。
Laughing

原文地址 http://forum.ubuntu.org.cn/post-403315.html

posted @ 2007-08-29 14:54 快乐着飞舞着 阅读(1241) | 评论 (0)编辑 收藏

2007年7月1日

C# 调用 java webservice 的问题

Technorati 标记: , , ,

前一段时间一直被一个 c#调用 Java web service的问题困扰。

http://www.cnitblog.com/reene/archive/2007/06/29/29217.html

在网上一直找不到答案,后来在国外的一个论坛上有人提醒可能是命名空间的原因,摸索以后终于顺利解决这个问题。特别把它记下以后方便。

问题:

如果用c#调用java 的 webservice 时,发现调用返回值为基本类型(如 xsd:string xsd:int)的服务能过正常返回,而调用返回复杂类型如自定义对象时却返回 null,同时抓包发现服务器段明明已经正常答复soap消息。 就需要考虑命名空间的问题。

在我碰到的问题中,由于我把用来返回结果的bean 单独放到一个 xxx.xxx.bean 包中,而把webservice 的文件放在 xxx.xxx.service包中,在用wtp生成 webservice 服务时就把它们放到不同的命名空间中去了。

解决方案:

把用来的bean文件放置到与service同一个package中,这样用wtp lomboz之类工具生成时就直接会在一个命名空间中。

posted @ 2007-07-01 15:19 快乐着飞舞着 阅读(5303) | 评论 (3)编辑 收藏

Clicky