1年1月1日14 题以前答案一般没啥区别,略过…… #15 #(* % 2) adereth’s solution: * 2 #16 format "Hello, %s!" adereth’s solution: #(str "Hello, " % "!") #17 '(6 7 8) adereth’s solution: [6 7 8] #18 '(6 7) adereth’s solution: '(6 7) #19 #(peek (vec %)) adereth’s solution: (comp first reverse) #20 #(nth (reverse %) 1) adereth’s solution: (comp second reverse) #21 (fn getn [ary n] (if (= n 0) (first ary) (getn (rest ary) (dec n)))) adereth’s solution: #(first (drop %2 %1)) #22 #(reduce (fn [a b] (inc a)) 0 %) adereth’s solution: (fn [sequence] (reduce (fn [acc v] (inc acc)) 0 sequence)) #23 #(reduce (fn [rs ls] (cons ls rs)) [] %) adereth’s solution: (fn [s] (loop [result [] s s] (if (seq s) (recur (concat [(first s)]……
阅读全文
1年1月1日Android 开发学习 准备工作 安装 JDK,Gradle,Android SDK 等; 首先装 SDKMan,先别急去一个个下载,这里介绍就是安装其他开发工具的工具: 这是专为开发人员准备的安装工具!网速好的话,一句话搞定: curl -s "https://get.sdkman.io" | bash 安装 Gradle,点击看一下最新的命令,本文书写时还是 3.0 版本,如下: sdk install gradle……
阅读全文
1年1月1日基础 I18n 官方文档如此{:target="_blank"},目前的解决方案似乎很麻烦。 Angular 2 Components: Inputs and Outputs{:target="_blank"} The impure AsyncPipe{:target="_blank"} Angular2 管道(pipes){:target="_blank"} [Angular 2] Build a select dropdown with *ngFor in Angular 2{:target="_blank"} JavaScript Array Methods Reference{:target="_blank"} JavaScript Modules: A Beginner’s Guide{:target="_blank"} 问题……
阅读全文
1年1月1日相关框架 JHipster JHipster is a development platform to generate, develop and deploy Spring Boot + Angular Web applications and Spring microservices. 问题 在 AngularJS 的 controller 中: $scope.pageTitle = dbData.getTitle();,已知该标题从数据库中取出后不会被修改和变化,如下在模板中的写法最好的方式是:【A】 A. <h1 ng-bind="::pageTitle"></h1> B. <h1><%=pageTitle%></h1> C. <h1>\{\{::pageTitle\}\}</h1> D. <h1>\{\{pageTitle\}\}</h1> E. <h1 ng-bind="pageTitle"></h1> 修改 model 数据后,自动更新界面上的显示内容,或者在界面上修改内容,更新 model……
阅读全文
1年1月1日回归 Blog 有一段时间没有更新Blog了,有些时候用Lofter,因为方便而且容易分享,而技术、思路的收集则用Evernote,本来用得还挺好的,但Evernote加了限制,只能支持两个客户端什么的,于是转用有道云笔记,有道云笔记升级到2.x版,结果里面的查询太烂了,查到关键字在某些文……
阅读全文
1年1月1日情况背景 使用 Backbone 开发 Web App 之后,特别是较大型的项目,会发现因为缺少一些关键的功能(如:双向绑定等)代码越来越多且复杂,从而导致后期扩展和更新越来越困难,因此从基本框架层面需要考虑改善,以便使整个框架更有条理,更易组织,更易扩展、复用、重构等…… 目前可以想到的有三个方向: 在 Backbone 基础上结合……
阅读全文
1年1月1日DB, SQL 技术相关 Presto(中文站)是一个运行在多台服务器上的分布式系统。……
阅读全文
1年1月1日DevOps技术相关 相关链接 Ansible中文权威指南 所有重复的IT工作可以被自动化并分享给其他组员。 Choosing a deployment tool - ansible vs puppet vs chef vs salt 相关观点 Puppet is a similar tool to Chef Vagrant is a tool for developers and a toy for admins, you can quickly stand up a development environment with vagrant, e.g. I want to develop an android app, grab an IDE from vagrant, I think it will be overtaken by Docker soon. 我现在使用的是阿里容器服务: https://cs.console.aliyun.com ,配合阿里的虚拟……
阅读全文
1年1月1日示例代码如下: $('#ff').form({ url:$(this).attr(""action""), onSubmit:function(){ return $(this).form('validate'); }, success:function(data){ alert(data); } }); 其中url的值是取的form中的action属性,故需注意填写form的相应属性,当然也可以为’/controller_name/action_name’。……
阅读全文
1年1月1日原文摘抄自:https://groups.google.com/d/msg/play-framework/-/iQLX-uLwHWsJ (可能因墙访问不了……我是在邮件列表中收集的) 需求和问题 原问及简单翻译说明如下: Given a simple action:【简单给一个action如下:】 :::java public static void testAction() { session.put("worked",……
阅读全文