风火家人开发记要

技术总结精华贴

Year: 2012

原创, 支付方式

CCBILL API Custom Price non-recurringCCBILL API开发自定义价格 non-recurring

CCBILL API Custom Price If it shows “Payment Option:$5.00(USD) for 30 days (non-recurring)” And What you want is “Payment Option: $5.00(USD)”. First Of cause you need one accound of CCBILL, and create one sub account.(as 0001) Log in https:# admin.ccbill.com(replace # to //) Add the url when you pay success or failed. You may connect to the support or email them, ask some test card number Here is some infomation they email me: Please use the following steps to create a transaction test account for the purpose of testing your CCBill setup and sign-up form: Please log into the Admin Portal and go to Account Info–>Transaction Test Settings. Select “Create New User” and provide a valid IP range and e-mail address that will be used during testing. Go to your CCBill join form and fill it out. You can make up information with the exception of the card number and e-mail address. Please make sure that the card expiration date you select is somewhere in the future. Once you select “submit” on the join form the test transaction will be processed. Below is a list of test transaction numbers to use. If you have any questions please contact our 24

查看全文
Javascript, 原创

如何使用 Grease Monkey 创建自定义用户脚本代码Grease Monkey Custom code

如何使用 Grease Monkey 创建自定义用户脚本代码 Grease Monkey 是做什么的? • 调整Gmail让Google Reader内嵌,因而提供RSS新闻订阅的选项。 • 当线上浏览某本书时同时显示对手网站同本书价钱。 • 去除来自某些站的广告,包括弹出视窗与Google文字广告。 • 改变网页的版面,包括原本该网页作者未考虑到的元素大小与浏览器画面大小。 • 自动完成表单。 • 浏览某些布告栏网站自动过滤特定的发帖人。 • 增删网页上的某些功能。 • 让使用者从某些视频站点如Google Video以及YouTube存下FLV视频档案。 • 从现行网页找寻任何RSS新闻订阅,并将它们显示在可扩展、漂浮于网页上的面板里。 下面我来写个简单的Grease Monkey 自定义代码 1. 启用Grease Monkey; 2. 新建用户脚本; 3. 填写名字,命名空间,描述,应用到的网页 4. 填写好上面信息点击确认就会弹出,请先选择您喜欢用的文本编辑器,您可以使用editplus,Notepad,Dreamweaver等等 5. 打开后您会看到一些注释信息,这些信息就是我们刚才配置的内容 例子: // ==UserScript== // @name abc // @namespace www.google.com.hk // @description abc // @include http://www.google.com.hk // ==/UserScript== 6. 下面就可以自定义脚本了, 很多人喜欢使用jquery,如果你也想用jquery来做,来加个判断把 下面的代码是参考12306的脚本来做的, function withjQuery(callback, safe){ if(typeof(jQuery) == “undefined”) { var script = document.createElement(“script”); script.type = “text/javascript”; script.src = “https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”; if(safe) { var cb = document.createElement(“script”); cb.type = “text/javascript”; cb.textContent = “jQuery.noConflict();(” + callback.toString() + “)(jQuery, window);”; script.addEventListener(‘load’, function() { document.head.appendChild(cb); }); } else { var dollar = undefined; if(typeof($) != “undefined”) dollar = $; script.addEventListener(‘load’, function() { jQuery.noConflict(); $ = dollar; callback(jQuery, window); }); } document.head.appendChild(script); } else { setTimeout(function() { //Firefox supports callback(jQuery, typeof unsafeWindow === “undefined” ? window : unsafeWindow); }, 30); } } 使用的时候呢 withjQuery(function($, window){ //这里填写你使用的代码吧 }, true); 在来一个我们在使用jquery的时候跟网站上本身的jquery冲突的方法 (function(){ //这里将jquery的代码直接粘贴过来(比如 jquery-1.7.1的代码), //接下来是你自己的代码(记得使用jQuery(),而不是 $()) })(); 好了,这样就可以完成,您可以使用hello world 来看是否执行哦, 希望能对您有所帮助如何使用 Grease Monkey 创建自定义用户脚本代码 How to use Grease Monkey to create custom user script code What is Grease Monkey ? • adjust Gmail, Google Reader embedded, thus providing the option of the RSS news feed. • when browsing

查看全文
其他, 原创

facebook邀请好友加入应用使用fb:fbml标签无效解决方案

使用 fb:fbml 标签无效,需要在页面中加入这样一段代码 <div id=”fb-root”></div> <script type=”text/javascript”> window.fbAsyncInit = function() { FB.init({ appId : “YOUR_APP_ID”, channelUrl : “//YOUR_DOMAIN.COM/channel.html”, status : true, cookie : true, xfbml : true }); // Additional initialization code here }; // Load the SDK Asynchronously (function(d){ var js, id = ‘facebook-jssdk’, ref = d.getElementsByTagName(‘script’)[0]; if (d.getElementById(id)) {return;} js = d.createElement(‘script’); js.id = id; js.async = true; js.src = “//connect.facebook.net/en_US/all.js”; ref.parentNode.insertBefore(js, ref); }(document)); </ script> 这里面提到的url不要加http或者https,系统会根据当前协议自动补齐的。 上面代码使用的是 javascript SDK ,摘自 http://developers.facebook.com/docs/reference/javascript/ 这样就可以在html中使用fb:fbml标签了 下面例子是邀请好友加入应用 <fb:serverFbml style=”width: 755px;”> <script type=”text/fbml”> <fb:fbml> <fb:request-form action=”<URL for post invite action, see fb:request-form docs for details>” method=”POST” invite=”true” type=”XFBML” content=”This is a test invitation from XFBML test app <fb:req-choice url=”see fb:req-choice docs for details.” label=”Ignore the Facebook test app!” /> “> </fb:request-form> <fb:multi-friend-selector showborder=”false” actiontext=”Invite your friends to use Facebook.” /> </fb:fbml> </script> </fb:serverFbml> 通过上面的的js调用就可以正常显示上面fb代码了,希望对你有所帮助。 (774)

查看全文
Mysql, 原创,

多次安装wamp后Mysql无法启动解决方案Not first time to install wamp, Mysql cannot be started

如果不是首次安装wamp或着mysql,可能会遇到安装后无法启动的问题。我是由于升级wamp,升级后无法启动mysql服务。 下面是我的解决方法: 1.准备升级网站的时候首先备份mysql,如果因为安装mysql的路径不同,可能会导致mysql的数据无法使用,这个一定要先做。 2.卸载旧版的wamp或者mysql。(尝试安装新版wamp看是否成功,一般是mysql无法启动了)。 4.下面的方法是关键:删除mysql注册表 msyql安装到最后一步start service错误解决方法 1,到控制面板里面先把MySQL删除. 2.到c盘C:\Program Files目录下把MySQL目录删除. 3.如果在其他盘还有设置目录也要删除.空目录也要删除 4.到regedit把注册表 1. HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Applications/MySQL 2. HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Applications/MySQL 3. HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Applications/MySQL 有的话,全部删除! (技巧:用F3循环查找“MySQL”) 5.如果任务管理器里有关MySQL内容也删除 通过上面的步骤一般都可以正常安装和启动mysql了。希望能对你有所帮助。If you are not the first time to install wamp or mysql,you may come across this problem,mysql unable to start up. I wanted to update wamp to the latest, and found that mysql server cannot be stated. This is my resolvent: 1.If you want to update your wamp or mysql ,you need first to backup mysql data first,or you may find some of data in database cannot be use. 2.uninstall older wamp or mysql.(you can try to install wamp to see it wether success or not.) 3.this below is the most impotent:delete mysql register mysql server cannot be start 1)  to Control Panel to delete Mysql 2) delete Mysql File in c:\Program Files 3) If there are  Mysql Files On Other disk,alse delete 4). Start->cmd->regedit  delete these (1). HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Applications/MySQL (2). HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Applications/MySQL (3). HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Applications/MySQL you can use F3 to find MySQL 5.If there is mysql in Task Manager,alse delete. Use this,you can install now,hope it can help you. (1103)

查看全文
CMS, 原创

使用kayako 4.0 创建 模块出现 SWIFT_Module::RetrieveSetupDatabaseObjectUse Kayako 4.0 to create modules shows SWIFT_Module::RetrieveSetupDatabaseObject

[User Error]: #0 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/modules/core/admin/class.Controller_Module.php(181): SWIFT_Module::RetrieveSetupDatabaseObject(‘customer’) #1 [internal function]: Controller_Module->Install(‘customer’) #2 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/library/MVC/class.SWIFT_Controller.php(335): call_user_func_array(Array, Array) #3 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/library/Module/class.SWIFT_Module.php(164): SWIFT_Controller::Load(Object(SWIFT_Interface), Object(SWIFT_Module), Object(SWIFT_Router), false) #4 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/library/class.SWIFT.php(765): SWIFT_Module->ExecuteController() #5 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/library/class.SWIFT.php(919): SWIFT->Initialize() #6 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/swift.php(154): SWIFT::GetInstance() #7 /home/daniel/customer.topcmm.com/htdocs/helpdesk/admin/index.php(28): require_once(‘/home/daniel/cu…’) #8 {main} Invalid data provided (library/class.SWIFT.php:768) 出现这个问题是因为 文件名不能出现大写,如下例子 如果你的配置文件名是这样的 class.SWIFT_SetupDatabase_Customer.php 就会出现这个错误,将此文件名称改为 class.SWIFT_SetupDatabase_customer.php 就是将Customer -> customer 这样这个错误就消失了. 不知道对你们有没有帮助呢 [User Error]: #0 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/modules/core/admin/class.Controller_Module.php(181): SWIFT_Module::RetrieveSetupDatabaseObject(‘customer’) #1 [internal function]: Controller_Module->Install(‘customer’) #2 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/library/MVC/class.SWIFT_Controller.php(335): call_user_func_array(Array, Array) #3 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/library/Module/class.SWIFT_Module.php(164): SWIFT_Controller::Load(Object(SWIFT_Interface), Object(SWIFT_Module), Object(SWIFT_Router), false) #4 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/library/class.SWIFT.php(765): SWIFT_Module->ExecuteController() #5 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/library/class.SWIFT.php(919): SWIFT->Initialize() #6 /home/daniel/customer.topcmm.com/htdocs/helpdesk/__swift/swift.php(154): SWIFT::GetInstance() #7 /home/daniel/customer.topcmm.com/htdocs/helpdesk/admin/index.php(28): require_once(‘/home/daniel/cu…’) #8 {main} Invalid data provided (library/class.SWIFT.php:768) This problem occurs because the File name should not write by uppercase,For Example If your file name is  class.SWIFT_SetupDatabase_Customer.php ,it occurs,Change name to  class.SWIFT_SetupDatabase_customer.php ,It would be OK. just change Customer to customer ,problem disappear.Does it help you? (2478)

查看全文