02 2015 档案
摘要:1:打开nodejs官网http://nodejs.org/ 下载安装版。2:安装完成后,打开cmd输入node -v 查看是否安装成功:3:安装express,通过全局安装方式进行安装:安装完成后输入:express -V 测试一下是否安装成功,提示'express' 不是内部或外部命令,也不是可...
阅读全文
摘要:工具-》模板-》展开Java选中Java类-》在编辑器中打开修改如下:package ${package};/** * @author ${user} * @date ${date} ${time} */public class ${name} {}(1)Java类package ${package...
阅读全文
摘要:protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ...
阅读全文
摘要:下载界面:http://maven.apache.org/download.cgi当前下载:apache-maven-3.2.5-bin.zip解压到:/usr/lib/jvm/apache-maven-3.2.5修改配置文件:y@y:~$ sudo vim /etc/profile#Maven3e...
阅读全文
摘要:Item4:Enforce noninstantiability with a private constructor通过构造私有化,禁止对象被实例化。public class UtilClass { private UtilClass(){ //防止类内的函数调用构造函...
阅读全文
摘要:Item3:Enforce the singleton property with a private constructor or an enum type采用枚举类型(ENUM)实现单例模式。public enum Elvis { INSTANCE; public void ...
阅读全文
摘要:Item2:Consider a builder when faced with many constructor parameters当构造方法有多个参数时,可以考虑使用builder方式进行处理。实例代码:public class NutritionFacts { private fina...
阅读全文
摘要:SQL> set autotraceUsage: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]SQL> set autotrace onSP2-0618: Cannot find the Session Ide...
阅读全文
摘要:SQL> conn scott/tigerERROR:ORA-28002: the password will expire within 1 daysConnected.SQL> conn /as sysdbaConnected.SQL> alter user scott identified b...
阅读全文
摘要://声明是Android应用程序apply plugin: 'com.android.application'android { //编译SDK版本 compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig {...
阅读全文
摘要:错误信息如下图所示:重启AndroidStudio问题解决。
阅读全文
摘要:1:将工程中的所有文件增加到git暂存区:y@y:testapp$ git add .2:推送报以下错误:y@y:android_test$ git push origin master Counting objects: 42, done.Delta compression using up to...
阅读全文
摘要:gitosis是Git下的权限管理工具,通过一个特殊的仓库(gitosis-admin.git)对Git权限进行管理。1:服务端安装并配置gitosis(1)通过以下方式获取到安装包root@wz:/home/git# git clone https://github.com/res0nat0r/g...
阅读全文
摘要:Meld是一款跨平台的文件比较合并工具使用Python开发,具体内容参照官网:http://meldmerge.org/注意以下环境要求:RequirementsPython 2.7 (Python 3 not yet supported)GTK+ 3.6 (3.12 in development)...
阅读全文
摘要:-- tanslate(str,from_str,to_str)-- 将str中的from_str替换成to_strselect translate('hello','e','o') tfrom dual;-- instr(str,des_str)-- 可以实现like功能select instr(...
阅读全文
摘要:可以参考Express官网关于路由一节:http://expressjs.com/guide/routing.html1:通过使用GET、POST方式定义主页路由,app.js:var express = require('express');var app = express();app.get(...
阅读全文
摘要:Error: /home/y/my_note/nodejs/myapp/views/index.jade:20 18| -list=[{name:'zhangsan',age:25,email:'zhangsan@123.com'}] 19| -e...
阅读全文
摘要:修改.bashrc文件:原来: 59 #修改终端提示颜色 60 color_prompt=yes 61 62 if [ "$color_prompt" = yes ]; then 63 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m...
阅读全文
摘要:1:首先将apk程序解压;2:将classes.dex反编译为jar包:$ ./dex2jar/dex2jar.sh classes.dex 将生成一个新的文件classes_dex2jar.jar3:利用jd-gui工具打开反编译后的classes_dex2jar.jar文件,工具将自动转化为ja...
阅读全文
摘要:AngularJS中不仅内置了许多指令,而且开发人员也可以通过自定义指令来完成特殊操作,指令创建成功后可以到处复用。Web应用中的分页处理最为常见,我们可以将分页模块编写成一个可以复用的Angular指令,在使用时无需考虑指令的内部实现细节,像使用普通HTML元素一样简单。1:index.html ...
阅读全文
摘要:1:ng-selected用在标签上面,ng-options用在 Selected City Code: {{ city.code }} 2:city.name作为用户选择时看到的值,用户选择的时city对象,通过c...
阅读全文
摘要:自定义一个用户Email长度超过12个字符后值截取前12个然后添加“...”显示。例如:index.html TODO supply a title ...
阅读全文
摘要:filter用于关键字过滤操作,orderBy用于排序操作,运行界面如下:点击标题Name与Email实现排序功能,输入框中输入关键字进行过滤,同时实现根据关键字进行过滤后进行排序操作:ng-repeat="user in users | filter:keyword | orderBy:sortF...
阅读全文
摘要:ng-repeat-start与ng-repeat-end时AngularJS(1.2.x)扩展的,使用这两个指令可以灵活控制遍历形式。例如:index.html {{user.name}} ...
阅读全文
摘要:效果如下图所示:使用表格显示用户信息,当点击某条用户信息时,在其下方展开一行进行展示。index.html TODO supply a title ...
阅读全文
摘要:AngualrJS 提供了指令ng-bind-html 用于绑定包含HTML标签的文档,使用方式:...测试案例:index.html index.jsvar myApp = angular.module('myApp',...
阅读全文