微信给公众平台提供了素材管理的接口,通过这一系列接口可以上传,接收以及管理图片,视频等多媒体文件。其中又分为临时和永久两种类型。永久素材有总量的限制,临时素材微信服务器只给保存3天。 最近V秘刚好有个同微信用户互动的场景,为用户美化微信拍摄的小视频。V秘后台服务器收到用户发送过来小视频(微信将其认做临时素材),将其美化处理后,再将美化的视频上传为临时素材,最终美化后的视频作为视频类型的客服消息被推送给用户。整个流程很简洁,用户发送小视频后,就坐等观看美化后的小视频了。 然而最终经过V秘开发团队的实践及测试,得出的结论是, ##微信公众平台的临时素材不能用!绝对的鸡肋! 公众平台上传素材的API以及使用已有素材发送视频消息API都很健 …
Read More随着AngularJS等前端MVC框架的流行,AJAX的异步请求数据结合H5的push state等特性,极大的改善了网站的用户体验和页面加载性能。这类网站应用通常只有一个入口页面,通过应用内路由到不同的页面,所以俗称单页面(signle page application)应用。页面URL看起来如下, 网站首页 http://mysite.com/#/index 商品列表页 http://mysite.com/#/goods/list 商品详情页 http://mysite.com/#/goods/skuid 网站关于页 http://mysite.com/#/about 对浏览器而言,上面几个地址都是访问的网站**/目录,每 …
Read More最近在提交前端代码后,前端代码的自动发布老是失败。失败的原因多是编译Docker镜像时在执行COPY语句拷贝文件到镜像文件系统时,扔出了'No space left on device'这个错误。这个错误根据描述非常好理解,就是docker文件系统所在磁盘没有了空间。 但是通过df -h命令,该磁盘至少还有3,4个G的剩余空间。而前端镜像的文件大小最多也不超过300M。在该磁盘通过touch,cp仍然可以创建文件。 所以这个问题非常奇怪,为什么docker或者操作系统抱怨磁盘没有了空间?在磁盘仍然剩余数个G的情况下? 再通过相关的查找后,docker的这个issue给了我启发。Linux文件系统的inode在耗尽后,该文件系统将不能 …
Read MoreRecently I wrote a Linux like initd script to start/stop my web application. The script works well when running it in shell of linux. The web application will run in background by daemon. However I found both daemon and web application(java) exited immediately if I started the script in Jenkins as a shell step of build …
Read MoreAfter uninstalling some applications from my Mac OSX, I found the applications that depends on JRE totally does not work. I noticed below symptoms, Eclipse Mars can not be launched, even though I specified the launching vm to another one(
java -version
still work). The SWT native library failed to resolve the …
Read MoreJenkins supports ssh authentication in CLI. Below is a command to verify that I am authenticated: 1 2java -jar jenkins-cli.jar -s http://myserver/jenkins who-am-i 3 4 Authenticated as: myuser 5 Authorities: 6 authenticated However you still would meet permission error when running groovy script in CLI. 1 2java -jar …
Read MoreThe index has a field named 'create_time' that is the timestamp of document created time. The query string can boost the latest created document like below, {!boost b=recip(ms(NOW,create_time),3.16e-11,0.08,0.05)}name:keyword There is another field named 'important' that indicates whether the document is important or …
Read MoreIt's a common and ugly problem when using non-ascii characters in Django. The general solution is below, put # -- coding: utf-8 -- at beginning of every python source files that are using utf-8 characters declare every string variable as unicode, such as str_var = u'中文字符' add a unicode method in your model classes …
Read MoreI installed both Zend CE and zend debugger of Eclipse on my Mac. Both of them work well in Mac lion. However they don't work any more after I upgraded my Mac to mountain lion. After some investigation I found some extensions of Zend PHP can't be loaded due to shared library dependency can't be found in mountain lion. …
Read MoreI had two monitors for my workstation. One is 22' and the another is 17'. I used the small one as a extend desktop. Today I get a another 23' monitor to replace the small one. However the resolution of the 23' monitor can't be changed after pluging it in. It always used the resolution matching the 17' one. Both …
Read More