Monday, April 15, 2013

Interesting Search in Google Trends - Travel

Having a sudden thought to check couple of things on travel brands

  1. General Trend
  2. Travel brands popularity in various location
  3. Travel brands popularity vs time
  4. Seasonality 
First things first, what tool I pick. Measuring is never easy, one may consider revenue, website traffic, search volume, etc. I try to see it from the search volume perspective first and instead of general search like "hong kong hotel", I am more aware of user that pinpoint the brand they want to include, e.g. "hong kong hotel agoda". In a simple put, search with brand name included. To keep thing simple, i pick google trends for a fast results. 

But there is some interesting hiccups to note. When you roll over time, China has a lot of sudden on and off, which may due to the power of Golden Wall in China (i.e. Google is not that usable at particular time). Therefore, Chinese brands, including Ctrip and elong are excluded. 

We will focus on
  1. Expedia
  2. Tripadvisor
  3. Agoda
  4. Priceline
  5. Orbitz
General Trend

  • Expedia get the largest share, followed by Priceline and Orbitz. Agoda come last.
  • The big three (Expedia, Priceline, Orbitz) get a declining trend while Agoda get a rising trend. Interesting~
  • Seasonality: Jan, Apr are traditional peaks, Dec is the valley. Seems all the holidays plan and nailed down on Dec and no travel intense during this period.
  • Tripadvisor, though not a OTA, got a strong pick up. But surprisingly, these are not from US. Let's see more details in the breakdown
Expedia

  • Expedia is stronger in N America and Europe and some share in Australia
Priceline
  • Priceline presence overlap Expedia. In comparison, it is weaker in Europe.

Orbitz
  • Orbitz is more in US market

Agoda
  • Though the trend is picking up, Agoda main presence is in S.E. Asia.

Tripadvisor
  • Even Tripadvisor pick and usage is getting very strong, the presence in Europe and Aisa Pacific is strong than that of US.
Interesting Market - US
  • User in US are not very into Tripadvisor



Interesting Market - Japan
  • Agoda is doing OK in Japan but still headed by Expedia. We will include some local OTA in further study next round








Sunday, November 11, 2012

IDEA +

Stay tuned @ ME NEVER STOP

Wednesday, September 7, 2011

When to use $_SESSION vs $_COOKIE


A critical feature in web programming is the ability to seamlessly pass data from one page load to the next. It's used most commonly when dealing with user logins, but also for passing error messages, shopping carts, etc.
Storing data across pages using PHP is done with two variables in the global scope, called $_SESSION and $_COOKIE, and although accomplishing the same end goal, the both go about it in very different ways. The purpose of this article is to give a brief look into the differences between cookies and sessions, when it's better to use one versus the other, and the pros and cons of the two.
The difference is in how each store data. Cookies store data locally in the user's browser, while sessions store data on the webserver.

Session Basics

Sessions are simply server-side cookies each with a corresponding client side cookie that contains only a reference to its server-side counterpart. When a user visits a page, the client sends the reference code to the server, and PHP will then match that reference code to a server-side cookie and load the data in the server's cookie into the $_SESSION superglobal.

Pros

  1. Can store very large amounts of data easily.
  2. Save bandwidth by passing only a reference to the session each pageload. A client-side cookie has to pass all of its data.
  3. Data is stored on the web server. This makes sessions secure, because the data cannot be viewed or edited by the client.

Cons

  1. Ends when the browser is closed unless you've configured php.ini to extend sessions' cookie lifetime. Cannot last forever.

Cookie Basics

Cookie data is sent to the web server every page load. PHP reads and stores the value into the $_COOKIE superglobal. When a cookie is created, you can give it a lifespan. After that lifespan runs out, it will expire.

Pros

  1. Can last as long as the website needs. They will still be there even if the browser is closed and reopened.
  2. Useful for "remember me" logins
  3. Useful for storing temporary user settings. For example, if a user is browsing a paginated list of items, sorted a certain way, the sorting setting can be stored in a cookie.

Cons

  1. Stored in the users filesystem. This means that the user can tamper with it and view it.
  2. Can only store a limited amount of data.
  3. Must pass all data to the webserver each pageload. This takes up more bandwidth.

Cookies in Action

Creating a cookie

The function definition:
bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, int secure]]]]])

Using a cookie

Deleting a cookie

Setting a cookie with no value is the same as deleting it. This will not remove the file from the client computer. To do this, you can set the cookie expiration date to a time in the past, and the browser will take care of it.

Sessions in Action

Creating a session

This must be called near the top of your code before any output. When you call this function, PHP will check to see if the user sent a session cookie. If so, it will load the session data into $_SESSION. If not, it will create a new session file on the server and send the ID back to the client.

Setting a value

Reading a session value

Removing session data

Ending a session

The Bottom Line

Sessions are cookies where the data is stored on the server. Cookies are stored in the users filesystem (typically in their "Temporary Internet Files" folder). Both have their advantages, but on any given day, you'll probably find yourself using sessions much more commonly.

PHP Documentation

  1. PHP Manual: Sessions
  2. PHP Manual: Cookies

Tuesday, September 6, 2011

簡繁體中文對照表

簡繁體中文對照表

IT用語對照表

Programming 相关词汇及用语
原文 简中 繁中 补充说明
abstract 抽象 抽象 简繁相同
algorithm 算法 演算法
application 应用程序 應用程式
argument 参数;引数;自变量 引數
array 数组 陣列 差异大
asynchronous 异步 非同步 差异大
attribute 属性 屬性 简繁相同
boolean 布尔值 布林值
class 类 類別
class library 类库 類別庫
code 代码;源代码 程式碼
comment;annotate 注释 註釋
component 组件 元件 差异大
constant 常量 常數
constructor 构造函数 建構函數;建構子
CSS 样式表 樣式表 简繁相同
data structure 数据结构 資料結構
deadlock 死锁;死结 死結
debug 调试 除錯;偵錯 差异大
delegate 委托 委派
DLL (Dynamic Link Library) 动态链接库文件 組件;動態鏈結程式庫 差异大
Design Pattern 设计模式 設計樣式
distributed 分布式 分散式
encapsulation 封装 封裝 简繁相同
enumerator 枚举 列舉
event 事件 事件 简繁相同
field 字段 欄位
framework 框架 框架 简繁相同
function 函数;函式 函數;函式 简繁相同
generic(s) 泛型 泛型 简繁相同
implement 实现 實作 (interface)
inherit 继承 繼承 简繁相同
instance 实例 實體;執行個體
instantiate 实例化 實體化;具現化
interface 接口 介面 差异大
iterator 迭代器 迭代器 简繁相同
loop 循环 迴圈 差异大
message 消息 訊息
method 方法 方法 简繁相同
namespace 命名空间 命名空間 简繁相同
Object-Oriented 面向对象 物件導向 差异大
object 对象 物件 差异大
operator 运算符 運算子
overload 重载 多載
override 重写 覆寫
paging 分页 分頁 简繁相同
parameter 参数 參數 简繁相同
persistence 持久化 永續 差异大
polymorphism 多态 多型
process 进程 行程;程序 非指商业流程
program 程序 程式
programmer 程序员 程式設計師
programming 编程 程式設計;寫程式
property 属性 屬性 简繁相同
queue 队列 佇列
refactor 重构 重構;重建 简繁相同
reference type 引用类型 參考型別 差异大
reflection 反射 反射 简繁相同
Regular Expression 正则表达式 規則運算式
return 返回 傳回
reuse 复用 重用;複用
serialization 序列化 序列化 简繁相同
source code 源代码 原始碼
static 静态 靜態 简繁相同
string 字符串;字符 字串
strong type 强类型 強型別
struct 結構 結構 简繁相同
synchronization 同步 同步 简繁相同
thread 线程 執行緒 差异大
transaction 事务 交易 差异大
type 类型 型別
value type 值类型 實值型別
variable 变量 變數


Database 相关词汇及用语
原文 简中 繁中 补充说明
access 存取 存取 简繁相同
cluster index 聚集索引;集簇索引 叢集索引
column 列;字段 行 簡繁相反
connection 联机 連線 差异大
data 数据 資料
database 数据库 資料庫
data access 数据访问 資料存取
disconnection 脱机 離線 差异大
index 索引 索引 简繁相同
information 信息;資訊 資訊
mapping 映射
OLTP 联机事务处理 線上交易處理 差异大
primary key 主键 主鍵 简繁相同
query 查询 查詢 简繁相同
record 记录 記錄 简繁相同
relation 联系(一对多) 關聯(一對多)
row 行 列 簡繁相反
save 存储;储存 儲存 簡繁相反
select 提取 選取;撈取
SQL statement SQL语句 SQL陳述式 都称SQL语法
stored procedure 存储过程 預存程序 差异大
table 表;数据表 資料表
transaction 事务 交易 差异大
trigger 触发器 觸發器;觸發程序 简繁相同
type 类型 型別
view 视图 檢視表 差异大


ASP.NET 相关词汇及用语
原文 简中 繁中 补充说明
binding 綁定 繫結 差异大
buffer 缓冲区 緩衝
button 按钮 按鈕 简繁相同
cache 缓存 快取 差异大
Code-behind 后台 後端;程式碼後置
control 控件 控制項
Message Queue 消息队列 訊息佇列
prefix 前缀 前置詞
ViewState 视图状态 檢視狀態


Visual Studio 相关词汇及用语
原文 简中 繁中 补充说明
add 添加 加入
breakpoint 断点 中斷點
copy 复制;拷贝 複製;拷貝 简繁相同
cut 剪切 剪下
item 項 項目
menu 菜單 功能表 差异大
navigate 导航 巡覽
new 增加 新增
paste 粘贴 貼上
project 項目 專案 差异大
solution 解决方案 方案
toolbox 工具箱 工具箱 简繁相同
window 窗口 視窗
? 生成 建置
? 引用 參考 差异大
? 设置 設定
? 列表 清單
? 选项卡 索引標籤 差异大
? 指针 指標
? 窗体;表单 表單


IT 通用词汇
原文 简中 繁中 补充说明
bit ? 位元
Byte 字节 位元組 差异大
CD 光盘 光碟
computer 计算机 電腦
CPU 处理器 處理器 简繁相同
create 创建 建立
default 默认 預設 差异大
download 下载 下載 简繁相同
drive 磁盘 磁碟
emulator 仿真器;模拟器 模擬器
file 文件 檔案
flash 闪存 快閃記憶體;簡短留言
folder 文件夹 資料夾
HD (Hard Disk) 硬盘 硬碟
hyperlink 链接 超連結
Internet 互联网;因特网 網際網路
LAN 局域网 區域網路
Memory 内存 記憶體 差异大
monitor;screen 屏幕 螢幕
mouse 鼠标 滑鼠
network 网络 網路 简繁相同
on-line 在线 線上
Operating System 操作系统 作業系統
partition;sector 扇区 磁區
path 目录 目錄;路徑 简繁相同
plug-in 插件;外掛 外掛
performance 性能 效能
print 打印 列印
project 工程;项目 專案 差异大
project management 项目管理 專案管理 差异大
protocol 协议 協定
read-only 只读 唯讀
register 注册 註冊
Registry 注册表 機碼;暫存器 差异大
ROM 只读存储器 唯讀記憶體
save 存储;储存 儲存 簡繁相反
scalability 可扩展性 可擴充性
scroll bar 滚动条 捲軸
server 服务器 伺服器
software 软件 軟體
tuning 优化 最佳化
upload 上载 上傳
WAN 广域网 廣域網路
? 短信;短讯 簡訊
? 界面 介面 如:UI,不是指OOP编程的interface


日常用语
原文 简中 繁中 补充说明
于 於
after 后 後
conflict 冲突 衝突
example 示例 範例
inside 里 裡
lose 丢失 遺失
standard 规范 規範
定制 制定 簡繁相反
兼容性 相容性 

兩岸IT相關用語的對照表


兩岸IT相關用語的對照表

在兩岸閱讀IT與互聯網相關內容時,會在詞彙上抓不到味,現在將繁簡中文與英文單詞列出對照表,把兩岸簡體繁體的IT常用詞彙做一個對照,希望對大家有幫助,來源 三十而慄
简体中文 繁體中文 English
互联网 網路,網際網路 Internet
(簡體也稱网络)    
带宽 頻寬 Bandwidth
软件硬件 軟體硬體 Software Hardware
服务器 伺服器 Server
笔记本 筆記型電腦 Notebook PC
上网本 小筆電 Netbook
台式机 桌上型電腦 Desktop PC
光驱 光碟機 CDROM
硬盘 硬碟 Hard Drive Disk
内存 記憶體 RAM, Memory
刻录光盘 燒錄光碟 Burn CD
鼠标 滑鼠 Mouse
打印机 印表機 Printer
激光 雷射 Laser
屏幕 螢幕 Monitor
(同理:看影片時,會用到全屏/全螢幕)  
智能手机 智慧型手機 Smart Phone
数码相机 數位相機 Digital Camera
摄像头 網路攝影機 Webcam
U盘(优盘) 隨身碟 Flash Disk
     
知识产权 智慧財產權 Intellectual Property
数字娱乐 數位娛樂 Digital Entertainment
(同理:数字版权/數位出版等)
社交网站 社群網站 Social Network
(如:Facebook)    
社会媒体 社群媒體 Social Media
博客 部落格 Blog
论坛 討論區 Forum
在线游戏 線上遊戲 Online Game
讯息产业 資訊產業 IT Industry
(同理:讯息工程/資訊工程,讯息管理/資訊管理等)
网站运营 網站營運 Website Operation
网络营销 網路行銷 Internet Marketing
关键词 關鍵字 Keyword
搜索引擎 搜尋引擎 Search Engine
文件管理 檔案管理 File Management
(簡體也稱文档)    
数据库 資料庫 Database
优化 最佳化 Optimization
文本 純文字檔 Text File
     
程序 程式 Program
程序报错 系統出錯 System Error
系统设置 系統設定 Setting
连接超时 伺服器沒有響應 Timeout
查找 查詢 Searching
卸载 移除 Uninstall
拷贝 複製 Copy
视频 視訊 Video
音频 語音 Voice
短信 簡訊 Message
(同理:彩信/多媒體簡訊/SMS)  
在线离线 上線下線 Online Offline
(用於MSN,QQ等即時通訊)
掉线 斷線 Drop
(非人為的)    
重启电脑 重開機 Restart, Reboot
个人形象 個人造型 Photo, Avatar
(用於MSN、QQ或者論壇、SNS,簡體也用個人頭像)
联系人 聯絡人 Contacts
     
首席执行官 執行長 CEO
首席运营官 營運長 COO