UITableViewController and UITableViewCell

UITableViewCell 1. Set identifier not the restoration id for UITableCell Identifier !identifier Restoration Id !identifier…

1 minute read

小程序的后端支持

小程序是纯粹的前端,自身没有后端。需要开发对应的服务器端api支持。 后端服务域名需要在小程序的开发管理中进行设置后,才可以访问。 小程序本身不允许访问获取access_token和ticket的URL,必须通过后端服务。使用 wx.addCard wx.openCard - access_token 需要使用小程序关联的公众号的appid和appsecret获取 - api_ticket 使用上面获取的access_token - 7200 秒的限制,需要在服务器端缓存 (redis,memory都可以)。…

1 minute read

fileprivate and private in swift

Original post <http://slashdot.orghttp://stackoverflow.com/questions/39027250/what-is-a-good-example-to-differentiate-between-fileprivate-and-private-in-swift> Quick overview of the access level. !Access Level

1 minute read

Emberjs handle svg action

Sample code: <http://jsbin.com/pebohe/edit?html,js,output> Simply, add {% raw %}{{action “doSomething”}}{% endraw %} to SVG g item.…

1 minute read

add-apt-repository command not found

To fix Error sudo: add-apt-repository: command not found ```shell sudo apt-get install software-properties-common ```

1 minute read

吐槽微信支付,OMG还有这样定义XML的。

最近准备加微信支付的应答网关(处理支付确认通知) 通知参数里看到了神奇的说明,需要看counpon_count 有多少,推断下面的字段。这是多么无语的设计,你让我如何优雅 annotation? 友谊的小船说翻就翻。 代金券或立减优惠使用数量 coupon_count 否 Int 1 代金券或立减优惠使用数量 代金券或立减优惠ID coupon_id_$n 否 String(20)…

1 minute read

阿里云容器服务绑定多个域名到同一端口

部署基于Zuul的Api Gateway,需要把几个域名绑定的Zuul服务上。 可以通过设置 web 路由规则,将多个域名绑定到一个服务的端口 ```yml test: image: XXXX lables: XXXXX aliyub.routing.port_80: http://domain1;http://domain2 不要加分号 ```

1 minute read