google拼音支持Lua开发插件
2010-04-10 23:16
821 查看
下载最新版本的谷歌拼音,就可以通过lua来扩展它的功能了。
api的帮助信息在这里能看到
http://www.google.com/ime/pinyin/api.html
安装完以后,在 c:/Documents and Settings/All Users/Application Data/Google/Google Pinyin 2/Extensions 可以找到一个base.lua,里面代码写的比较清楚了。
比如这个计算模式。
function Compute(input)
local expr = "return " .. _AddMathKeyword(input)
local func = loadstring(expr)
if func == nil then
return "-- 未完整表达式 --"
end
local ret = func()
if ret == math.huge then -- div/0
return "-- 计算错误 --"
end
if ret ~= ret then
-- We rely on the property that NaN is the only value not equal to itself.
return "-- 计算错误 --"
end
return ret
end
ime.register_command("js", "Compute", "计算模式", "none", "输入表达式,例如3*log(4+2)")
相关文章推荐
- google app engine支持https(ssl)的开发环境配置
- 如何在支持java开发的eclipse上面下载支持java web开发的插件
- VS (Visual Studio) 魔兽插件开发工具 AddOn Studio for WOW 1.0 含有LUA编辑
- Google 发布 Eclipse 插件.支持GWT 和 APP
- 【安卓】google gsp 开发使用为了支持5.0以上的设备
- Nginx之lua插件开发
- [Phonegap+Sencha Touch] 移动开发31 使phonegap的inappbrowser插件支持通过手机返回键进行历史记录后退
- LUA插件开发——wireshark插件开发
- ios--插件开发--借助wax框架使用lua开发原生iPhone App
- 用lua为wireshark开发的一个smpp+自定义解析插件
- Google 发布 Eclipse 插件.支持GWT 和 APP
- Eclipse的Lua开发插件 LDT地址
- wireshark插件开发 - Lua插件解析
- 【wireshark】插件开发(二):Lua插件开发介绍
- AndroidNDK初步开发之安装eclipse插件支持jni开发(一)
- 修改BabeLua插件支持VS2017
- 关于如何把支持VS2015的插件BabeLua改成支持VS2017
- 记一个同时支持模糊匹配和静态推导的Atom语法补全插件的开发过程: 序