Monthly Archives: July 2012

禁止google搜索结果的自动跳转

google搜索出来的结果,不是直接链接到各个网站上去,而是要先到google自己的网站上,然后redirect到目标网站上。

这么做可以获取用户对搜索结果的使用情况,以便做各种改进和跟踪,我等屁民本没啥意见。可是在GFW内,一旦google.com被block了,搜索的结果也就变成全部不可用了,非常麻烦

chrome可以用extention: Undirect

firefox可以用plugin: google-no-tracking-url

禁止windows里打开下载exe文件的提示

windows很贴心,可是这个确实非常烦。

Disable Windows 7’s “Open File – Security Warning” dialog for exe on local drive?

In the start menu enter gpedit.msc. Then go to User Configuration -> Administrative Templates -> Windows Components -> Attachment Manager and Add “*.exe” to the “Inclusion list for moderate risk file types” setting. 

基于图像技术的自动化测试工具SIKULI

http://sikuli.org/

挺好玩的一个项目

在新版本的firefox里使用google toolbar

google toolbar非常好用,但是google自己居然不在维护了,估计是跟 chrome竞争导致的吧。不过看到一片文章,可以修改google toolbar的安装文件,使得firefox可以继续使用旧的插件。

http://www.itsabhik.com/tech/how-to-enable-google-toolbar-in-firefox-10-11-12-13.html

步骤如下:

首先,找到firefox的profile的目录

1. Press “Windows key + R” to open the Run box (or, you can click “Start → Run…” on Windows 2000/XP)
2. In the Run box, type in %APPDATA%
3. Click OK. A Windows Explorer window will appear.
4. In this window, choose Mozilla → Firefox → Profiles.

修改profile里面的安装文件

  1. xxxxx.default > Extensions and look for the directory where the Google Toolbar is installed. Mine is located at {3112ca9c-de6d-4884-a869-9855de68056c} directory.
  2. There should be a file called install.rdf in that folder. Open it in a text editor like Notepad or Notepad++ (free and open source).
  3. Now you need to change the maxversion to 14. Find this line
    1
    <em:maxVersion>4.0.*</em:maxVersion>

    around line number 17 and change it to

    1
    <em:maxVersion>14.*</em:maxVersion>

    Save the file and close the editor.

  4. Restart the Firefox and the Google Toolbar should be back and working with the latest versions of firefox (Firefox 11, Firefox 12, Firefox 13 and Firefox 14).

UI测试的一些讨论

这里有一片文章,叫做:

How to implement UI testing without shooting yourself in the foot

http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/

作者是明显不认同做UI automation testing的,但是很多人都愿意这么做,所以作者也给出了几条做UI automation testing的原则。

Things to remember

To avoid shooting yourself in the foot with UI tests, remember these things:

* Think about UI test automation at three levels: business rules, user interface workflow and technical activity
* Even if the user interface workflow automation gets implemented in plain text, make sure to put one level of abstraction above it and describe business rules directly. Don’t describe rules as workflows (unless they genuinely deal with workflow decisions – and even then it’s often good to describe individual decisions as state machines).
* Even if the user interface workflow automation gets implemented in code, make sure to separate technical activities required to fulfil a step into a separate layer. Reuse these step definitions to get stability and easy maintenance later.
* Beware of programming in plain text.

Blake Krikorian has joined the board of directors of FreeWheel

Krikorian most recently served as chairman and CEO of Sling Media, acquired by EchoStar in 2007. He is also a director of Amazon.com and is an active angel investor.

FreeWheel’s products manage revenue rights management and business operations. Its Monetization Rights Management (MRM) system helps service providers manage ad placements across multiple devices. Its Revenue & Payments Management (RPM) system manages the business relationships among service providers, advertisers, ad agencies and other business partners.

Among the company’s customers are 21 of the top 25 U.S. cable networks (including ESPN, Discovery, MTV and CNN) and broadcast networks such as ABC, NBC and Fox.

Krikorian said: “I’m looking forward to helping FreeWheel expand and deepen its partnerships with the leading content and media distribution players around the world. This tidal wave of live, on-demand and simulcast programming on digital platforms provides an opportunity for these companies to not only maintain, but also significantly grow their business. What excites me is that this is no longer a future hope. The opportunity is here and now.”

input控件的禁用

Readonly

readonly 属性规定输入字段为只读。

只读字段是不能修改的。不过,用户仍然可以使用 tab 键切换到该字段,还可以选中或拷贝其文本。

readonly 属性可以防止用户对值进行修改,直到满足某些条件为止(比如选中了一个复选框)。然后,需要使用 JavaScript 消除 readonly 值,将输入字段切换到可编辑状态。

readonly 属性可与 <input type=”text”> 或 <input type=”password”> 配合使用。

 

disabled

disabled 属性规定应该禁用 input 元素。

被禁用的 input 元素既不可用,也不可点击。可以设置 disabled 属性,直到满足某些其他的条件为止(比如选择了一个复选框等等)。然后,就需要通过 JavaScript 来删除 disabled 值,将 input 元素的值切换为可用。

=============

通过表单提交,拥有disabled属性的表单元素处理页面是获取不到其值的,而readonly则可以

FreeWheel spins for Disney, ABC TV to manage ads across all digital channels

http://www.rapidtvnews.com/index.php/2012070322834/freewheel-spins-for-disney-abc-tv-to-manage-ads-across-all-digital-channels.html

The digital media team at Disney/ABC Television Group has engaged FreeWheel to manage its advertising and monetise its content across digital channels including video, display, and mobile formats.

The video technology firm will oversee advertising across ABC.com, ABCFamily.com, and ABCNews.com and ABC follows ESPN as the second Walt Disney business unit to sign on with FreeWheel.

Specifically, ABC is deploying FreeWheel’s flagship product, Monetization Rights Management (MRM) to manage advertising sales rights, forecast advertising inventory, deliver yield-optimised ads, and monitor campaign performance on behalf of advertisers and partners. MRM will be used to manage advertising across a multiplicity of partners and devices, and will serve all video, mobile, and display (banner) formats. The technology will also allow ABC.com, ABC Family, ABC News, and Disney-owned TV stations to offer sponsorships and exclusivities and potentially monetise fast-changing news content, manage advertising with local affiliates, and successfully deliver monetised content across devices and partners.

“FreeWheel’s focus on the television and entertainment industry allows the company to build technology that is uniquely suited to our needs,” explained Skarpi Hedinsson, SVP, Technology & Video Platforms, Digital Media, Disney/ABC Television Group. “MRM is a critical piece of technology that will allow us to scale in the increasingly complex world of entertainment content.”

Mac编译环境的搭建

1. Install XCode from app store

It’s a free App, but you should have apple ID to install it.

Default Compiler for XCode:
Default: gcc-4.0 on Mac OS X 10.4 and 10.5
Default: gcc-4.2 with Xcode 3.2 on Mac OS X 10.6
Default: llvm-gcc-4.2 with Xcode 4.0 and 4.1 on Mac OS X 10.6 and 10.7
Default: clang with Xcode 4.2 on Mac OS X 10.6 and 10.7

We need GCC!

2. Install XCode command line tools

Xcode 4.3 does not include a fully working set of command line tools by default. Nothing will build without it, despite the fact that xcode-select and which make may return correct values.

You must open Xcode, go to Preferences, and download this component from the Downloads section. You will require an Apple ID to download the component.

3. Install GCCtools for OSX

https://github.com/kennethreitz/osx-gcc-installer

4. Install macports

http://www.macports.org/install.php

Download PKG from the above URL, and install macports

You can use “port” to install necessary libraries later.

$ port search zlib
$ sudo port install zlib