上一页 1 2 3 4 5 6 7 8 ··· 14 下一页

2014年2月28日

Choosing Columns and Expressions to Index

摘要: A key is a column or expression on which you can build an index. Follow these guidelines for choosing keys to index:Consider indexing keys that are used frequently inWHEREclauses.Consider indexing keys that are used frequently to join tables in SQL statements. For more information on optimizing join 阅读全文

posted @ 2014-02-28 09:56 Step-BY-Step 阅读(173) 评论(0) 推荐(0) 编辑

Oracle/PLSQL: Creating Functions

摘要: In Oracle, you can create your own functions.译:在ORACLE中,你可以创建你自己的方法。The syntax for a function is:CREATE [OR REPLACE] FUNCTION function_name [ (parameter [,parameter]) ] RETURN return_datatypeIS | AS [declaration_section]BEGIN executable_section[EXCEPTION exception_section]END [function_name];When yo 阅读全文

posted @ 2014-02-28 08:06 Step-BY-Step 阅读(430) 评论(0) 推荐(0) 编辑

Oracle调优总结(经典实践 重要)

摘要: 转载:http://langgufu.iteye.com/blog/1974211Problem Description:1.每个表的结构及主键索引情况2.每个表的count(*)记录是多少3.对于创建索引的列,索引的类型是什么?count(distinct indexcol)的值是多少?4.最后一次对表进行分析是在什么时间,分析后,是否又对相关表做过大的操作5.索引最后一次rebuild,是在什么时间,此后对表的操作类型又是什么状况?索引中浪费的空间是多少?6.这些表的存储情况,表的存储参数,表空间的类型,存储参数等7.执行该SQL语句时,系统等候的资源是什么? Trace SQL语句的执行 阅读全文

posted @ 2014-02-28 03:41 Step-BY-Step 阅读(7056) 评论(0) 推荐(0) 编辑

2014年2月27日

Lua 简单的IO交互 和迷宫代码

摘要: 1 function room1 () 2 print("in room1") 3 local move = io.read() 4 if move == "south" then 5 return room3() 6 elseif move == "east" then 7 return room2() 8 else 9 print("invalid move")10 return room1() -- stay in the same room11 end12 end13 14 ... 阅读全文

posted @ 2014-02-27 08:13 Step-BY-Step 阅读(387) 评论(0) 推荐(0) 编辑

Lua基础 函数(一)

摘要: 转自:http://blog.csdn.net/wzzfeitian/article/details/8653101在Lua中,函数是对语句和表达式进行抽象的主要方法。既可以用来处理一些特殊的工作,也可以用来计算一些值。下面有3个例子,分别将函数当作一条语句;当作表达式(后面两个是一类)。[plain]view plaincopyprint(8*9,9/8)-->721.125a=math.sin(3)+math.cos(10)-->a=-0.69795152101659print(os.date())-->SatMar912:14:082013函数如果带参数,那么就要用(a 阅读全文

posted @ 2014-02-27 02:47 Step-BY-Step 阅读(321) 评论(0) 推荐(0) 编辑

Stateless Iterators

摘要: As the name implies, a stateless iterator is an iterator that does not keep any state by itself. Therefore, we may use the same stateless iterator in multiple loops, avoiding the cost of creating new closures.On each iteration, theforloop calls its iterator function with two arguments: the invariant 阅读全文

posted @ 2014-02-27 02:19 Step-BY-Step 阅读(198) 评论(0) 推荐(0) 编辑

Lua print on the same line

摘要: In Pascal, I havewriteandwriteln. Apparently Lua'sprintis similar towritelnof Pascal. Do we have something similar towriteof Pascal? How can consecutive print commands send their output to the same line?print("Hello")print("World")Output:HelloworldI want to have this:Hello wo 阅读全文

posted @ 2014-02-27 01:58 Step-BY-Step 阅读(263) 评论(0) 推荐(0) 编辑

What is the Best Programming Language to Learn in 2014?

摘要: It’s been a year since I revealedthe best languages to learn in 2013. Once again, I’ve examined the data produced byJobs Tractorwho analyzed more than 45,000 developer jobs advertised on Twitter during the past twelve months. The results:Java8,731PHP8,238Objective-C5,859Java for Android4,312SQL3,553 阅读全文

posted @ 2014-02-27 01:51 Step-BY-Step 阅读(424) 评论(0) 推荐(0) 编辑

2014年2月26日

Using command-line Subversion to access project source files

摘要: Help indexAbout source code version control with Software Configuration Management (Subversion)Using command-line svn to access project source filesGetting started with SubversionWorking with files in the SVN repositoryContributing your changes to the SVN repositoryWorking with the repositoryGetting 阅读全文

posted @ 2014-02-26 08:56 Step-BY-Step 阅读(556) 评论(0) 推荐(0) 编辑

Lua 代码编写技巧

摘要: 1.克隆表u = {unpack(table)} 一般克隆长度较小的表2.判断表是否为空if next(t) == nil then.. 判断该表是否为空,包括t={}的情况3.插入表使用t[#t + 1] = value,会比table.insert看起来更加简洁且效果更高4.使用更加简洁的表达形式x = x or "Boyaa" 代替 if x == false or or x = nil then x = "Boyaa" end 阅读全文

posted @ 2014-02-26 08:14 Step-BY-Step 阅读(249) 评论(0) 推荐(0) 编辑

lua语言入门之Sublime Text设置lua的Build System

摘要: 转自:http://blog.csdn.net/wangbin_jxust/article/details/8911956最近开始学习LUA语言,使用Sublime Text作为编辑器,不得不说,对于编辑脚本语言来说,Sublime Text已经很强大了。1.点击工具栏,Tool->Build System->New Build System我这里已经添加过lua的Build System了,所以能看到已经勾选lua选项了。2.在新建的脚本文件中添加以下代码{ "cmd": ["lua", "$file"], " 阅读全文

posted @ 2014-02-26 08:12 Step-BY-Step 阅读(1841) 评论(0) 推荐(0) 编辑

理解lua 语言中的点、冒号与self

摘要: 转载自:http://blog.csdn.net/wangbin_jxust/article/details/12170233lua编程中,经常遇到函数的定义和调用,有时候用点号调用,有时候用冒号调用,这里简单的说明一下原理。[javascript]view plaincopyprint?girl={money=200}functiongirl.goToMarket(girl,someMoney)girl.money=girl.money-someMoneyendgirl.goToMarket(girl,100)print(girl.money)可以看出,这里进行了方法的点号定义和点号调用。[ 阅读全文

posted @ 2014-02-26 06:24 Step-BY-Step 阅读(311) 评论(0) 推荐(0) 编辑

2014年2月25日

Installing Lua in Mac

摘要: Lua is distributed in source form. You need to build it before using it. Building Lua should be straightforward because Lua is implemented in pure ANSI C and compiles unmodified in all known platforms that have an ANSI C compiler. Lua also compiles unmodified as C++. The instructions given below for 阅读全文

posted @ 2014-02-25 09:39 Step-BY-Step 阅读(403) 评论(2) 推荐(0) 编辑

2014年2月22日

MonthPicker

摘要: 可以只选择MMM-yyyy的样式,而不需要确定day。http://lucianocosta.info/jquery.mtz.monthpicker/ 阅读全文

posted @ 2014-02-22 08:35 Step-BY-Step 阅读(524) 评论(0) 推荐(0) 编辑

java.util.ResourceBundle

摘要: 转载自:http://lavasoft.blog.51cto.com/62575/184605这个类提供软件国际化的捷径。通过此类,可以使您所编写的程序可以: 轻松地本地化或翻译成不同的语言 一次处理多个语言环境 以后可以轻松地进行修改,支持更多的语言环境说的简单点,这个类的作用就是读取资源属性文件(properties),然后根据.properties文件的名称信息(本地化信息),匹配当前系统的国别语言信息(也可以程序指定),然后获取相应的properties文件的内容。使用这个类,要注意的一点是,这个properties文件的名字是有规范的:一般的命名规范是:自定义名_语言代码_国别代码. 阅读全文

posted @ 2014-02-22 08:03 Step-BY-Step 阅读(153) 评论(0) 推荐(0) 编辑

2014年2月20日

Linux操作系统下三种配置环境变量的方法

摘要: 1.修改/etc/profile文件如果你的计算机仅仅作为开发使用时推荐使用这种方法,因为所有用户的shell都有权使用这些环境变量,可能会给系统带来安全性问题。(1)用文本编辑器打开/etc/profile(2)在profile文件末尾加入:JAVA_HOME=/usr/share/jdk1.5.0_05PATH=$JAVA_HOME/bin:$PATHCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport JAVA_HOMEexport PATHexport CLASSPATH(3)重新登录注解:a. 你要将 /us 阅读全文

posted @ 2014-02-20 14:35 Step-BY-Step 阅读(169) 评论(0) 推荐(0) 编辑

1. what is Lua?

摘要: glue languageLua is a proven, robust language, small. 阅读全文

posted @ 2014-02-20 14:21 Step-BY-Step 阅读(139) 评论(0) 推荐(0) 编辑

2014年2月14日

2> How Struts 2 Works

摘要: The first thing we should consider is that the workflow of figure 1.4 still obeys the sim- pler MVC view of the framework that we saw earlier. In the figure, the FilterDispatcher has already done its controller work by selecting the appropriate action to handle the request. The figure demonstrates w 阅读全文

posted @ 2014-02-14 03:09 Step-BY-Step 阅读(308) 评论(0) 推荐(0) 编辑

2014年2月13日

1> Strut2 Mapping to MVC

摘要: CONTROLLER—FILTERDISPATCHERWe’ll start with the controller. It seems to make more sense to start there when talkingabout web applications. In fact, the MVC variant used in Struts is often referred to as a front controller MVC. This means that the controller is out front and is the first component to 阅读全文

posted @ 2014-02-13 09:25 Step-BY-Step 阅读(168) 评论(0) 推荐(0) 编辑

structs spring hibernate 三者之间有什么关系?

摘要: 现在开发流行MVC模式,structs在C(控制器)中使用;hibernate在M(模型)中被使用;至于 spring ,最大的作用在于,structs、hibernate的对象,由于在各个层之间相互调用,自己维护不够效率、会产生疏漏,所以,spring 提供一个容器(IOC),structs、hibernate的对象交由spring管理即可。另外,spring还有一个作用,AOP是切面编程,就是不同地方的相同代码,spring提取出来,进行统一的使用。总之,spring就是把开发中共性的问题,抽取出来,统一的调用。MVC中的V(视图),可以用JSP、structs、ExtJs、JQuery等 阅读全文

posted @ 2014-02-13 07:38 Step-BY-Step 阅读(854) 评论(0) 推荐(1) 编辑

脚本语言的定义

摘要: 脚本语言(Script languages,scripting programming languages,scripting languages)是为了缩短传统的编写-编译-链接-运行(edit-compile-link-run)过程而创建的计算机编程语言。此命名起源于一个脚本“screenplay”,每次运行都会使对话框逐字重复。早期的脚本语言经常被称为批处理语言或工作控制语言。一个脚本通常是解释运行而非编译。虽然许多脚本语言都超越了计算机简单任务自动化的领域,成熟到可以编写精巧的程序,但仍然还是被称为脚本。几乎所有计算机系统的各个层次都有一种脚本语言。包括操作系统层,如计算机游戏,网络应 阅读全文

posted @ 2014-02-13 02:39 Step-BY-Step 阅读(750) 评论(0) 推荐(0) 编辑

[转载]Java学习这七年

摘要: 从2005那会做自动化测试开始接触Java开始,至今近7年。今天正好项目结束,趁机整理下思路,确定后续方向。前三个年头基本上集中于Java基础的学习,包括设计模式,从完全不懂,到看的懂但似乎又不懂,到融汇贯通(也许还有欠缺,因为每次再翻一遍还是会有收获);由于没有研究过任何流行的框架,Struts,Spring, Hibernet等,也从没有尝试去研究过,所以那段时间时不时有SSH的兄弟用吃惊甚至略有嘲讽的口气跟我说“我是搞J2EE的,J2SE我没搞过。”;不过那时我一直秉承任何框架都是java写出来的,所谓万丈高楼平地起,所以一直也没有动力去学习那些时兴的玩意,当然工作中也确实不需要用到它们 阅读全文

posted @ 2014-02-13 01:31 Step-BY-Step 阅读(184) 评论(0) 推荐(0) 编辑

一个Java程序员应该掌握的10项技能

摘要: 1、语法:必须比较熟悉,在写代码的时候IDE的编辑器对某一行报错应该能够根据报错信息知道是什么样的语法错误并且知道任何修正。 2、命令:必须熟悉JDK带的一些常用命令及其常用选项,命令至少需要熟悉:appletviewer、HtmlConverter、jar、java、javac、javadoc、javap、javaw、native2ascii、serialver,如果这些命令你没有全部使用过,那么你对java实际上还很不了解。 3、工具:必须至少熟练使用一种IDE的开发工具,例如Eclipse、Netbeans、JBuilder、Jdeveloper、IDEA、JCreator或者Works 阅读全文

posted @ 2014-02-13 01:28 Step-BY-Step 阅读(295) 评论(0) 推荐(0) 编辑

2014年2月12日

Spring @ Component 的作用

摘要: 1、@controller 控制器(注入服务) 2、@service 服务(注入dao) 3、@repository dao(实现dao访问) 4、@component (把普通pojo实例化到spring容器中,相当于配置文件中的) @Component,@Service,@Controller,@Repository注解的类,并把这些类纳入进spring容器中管理。下面写这个是引入component的扫描组件其中base-package为需要扫描的包(含所有子包) 1、@Service用于标注业务层组件 2、@Controller用于标注控制层组件(如struts中的action) 3、@ 阅读全文

posted @ 2014-02-12 09:59 Step-BY-Step 阅读(605) 评论(0) 推荐(0) 编辑

[转载]Spring Web MVC Framework

摘要: Required Configuration You need to map requests that you want the DispatcherServlet to handle, by using a URL mapping in the web.xml file. The following is an example to show declaration and mapping for HelloWebDispatcherServlet example: Spring MVC Application HelloWeb org.... 阅读全文

posted @ 2014-02-12 09:54 Step-BY-Step 阅读(275) 评论(0) 推荐(0) 编辑

[转载]Spring Java Based Configuration

摘要: @Configuration & @Bean AnnotationsAnnotating a class with the @Configuration indicates that the class can be used by the Spring IoC container as a source of bean definitions. The @Bean annotation tells Spring that a method annotated with @Bean will return an object that should be registered as a 阅读全文

posted @ 2014-02-12 09:43 Step-BY-Step 阅读(344) 评论(0) 推荐(0) 编辑

[转载]Spring Annotation Based Configuration

摘要: Annotation injection is performed before XML injection, thus the latter configuration will override the former for properties wired through both approaches. Annotation wiring is not turned on in the Spring container by default. So, before we can use annotation-based wiring, we will need to enable it 阅读全文

posted @ 2014-02-12 09:22 Step-BY-Step 阅读(374) 评论(0) 推荐(0) 编辑

[转载]Spring Beans Auto-Wiring

摘要: Autowiring ModesYou have learnt how to declare beans using the element and inject with using and elements in XML configuration file. The Spring container can autowire relationships between collaborating beans without using and elements which helps cut down on the amount of XML configuration yo... 阅读全文

posted @ 2014-02-12 08:56 Step-BY-Step 阅读(410) 评论(0) 推荐(0) 编辑

[转载]Spring Bean Definition Inheritance

摘要: Following is the configuration file Beans.xml where we defined "helloWorld" bean which has two properties message1 and message2. Next "helloIndia" bean has been defined as a child of "helloWorld" bean by using parent attribute. The child bean inherits message2 property 阅读全文

posted @ 2014-02-12 08:09 Step-BY-Step 阅读(326) 评论(0) 推荐(0) 编辑

[转载]Spring Bean Configuration Inheritance

摘要: 转自:http://www.mkyong.com/spring/spring-bean-configuration-inheritance/In Spring, the inheritance is supported in bean configuration for a bean to share common values, properties or configurations.A child bean or inherited bean can inherit its parent bean configurations, properties and some attribute 阅读全文

posted @ 2014-02-12 08:02 Step-BY-Step 阅读(254) 评论(0) 推荐(0) 编辑

[转载]Spring Autowire自动装配介绍

摘要: 转自:http://www.cnblogs.com/zhishan/p/3190757.html在应用中,我们常常使用标签为JavaBean注入它依赖的对象。但是对于一个大型的系统,这个操作将会耗费我们大量的资源,我们不得不花费大量的时间和精力用于创建和维护系统中的标签。实际上,这种方式也会在另一种形式上增加了应用程序的复杂性,那么如何解决这个问题呢?Spring为我们提供了一个自动装配的机制,尽管这种机制不是很完善,但是在应用中结合标签还是可以大大的减少我们的劳动强度。前面提到过,在定义Bean时,标签有一个autowire属性,我们可以通过指定它来让容器为受管JavaBean自动注入依赖对 阅读全文

posted @ 2014-02-12 08:01 Step-BY-Step 阅读(152) 评论(0) 推荐(0) 编辑

2014年2月11日

Root resource classes

摘要: OverviewA root resource class is the entry point into a JAX-RS implemented RESTful Web service. It is decorated with a@Paththat specifies the root URI of the resources implemented by the service. Its methods either directly implement operations on the resource or provide access to sub-resources.Requ 阅读全文

posted @ 2014-02-11 02:42 Step-BY-Step 阅读(576) 评论(0) 推荐(0) 编辑

2014年2月8日

web.xml文件的作用

摘要: 每个javaEE工程中都有web.xml文件,那么它的作用是什么呢?它是每个web.xml工程都必须的吗?一个web中可以没有web.xml文件,也就是说,web.xml文件并不是web工程必须的。web.xml文件是用来初始化配置信息:比如Welcome页面、servlet、servlet-mapping、filter、listener、启动加载级别等。当你的web工程没用到这些时,你可以不用web.xml文件来配置你的Application。每个xml文件都有定义它书写规则的Schema文件,也就是说javaEE的定义web.xml所对应的xml Schema文件中定义了多少种标签元素,w 阅读全文

posted @ 2014-02-08 07:48 Step-BY-Step 阅读(221) 评论(0) 推荐(0) 编辑

2014年2月6日

Mac OS X 快捷键(完整篇) 转载

摘要: 转载自:http://www.nooidea.com/2011/01/mac-os-x-keyboard-shortcuts.html快捷键是通过按下键盘上的组合键来调用 Mac OS X 功能的一种方式。要使用快捷键或组合键,您可以同时按修饰键和字符键。例如,同时按下 Command 键(标有符号的按键)和“c”键会将当前选中的任何内容(文本、图形等等)拷贝至夹纸板。这也称作 Command-C 组合键(或快捷键)。许多组合键中都包含修饰键。修饰键将改变 Mac OS X 对其他按键或鼠标点按动作的解释方式。修饰键包括 Command、Control、Option、Shift、Caps Lo 阅读全文

posted @ 2014-02-06 07:43 Step-BY-Step 阅读(1252) 评论(0) 推荐(0) 编辑

Eclipse快捷键大全(转载)

摘要: Ctrl+1快速修复(最经典的快捷键,就不用多说了)Ctrl+D:删除当前行Ctrl+Alt+↓复制当前行到下一行(复制增加)Ctrl+Alt+↑复制当前行到上一行(复制增加)Alt+↓当前行和下面一行交互位置(特别实用,可以省去先剪切,再粘贴了)Alt+↑当前行和上面一行交互位置(同上)Alt+←前一个编辑的页面Alt+→下一个编辑的页面(当然是针对上面那条来说了)Alt+Enter显示当前选择资源(工程,or文件or文件)的属性Shift+Enter在当前行的下一行插入空行(这时鼠标可以在当前行的任一位置,不一定是最后)Shift+Ctrl+Enter在当前行插入空行(原理同上条)Ctrl 阅读全文

posted @ 2014-02-06 07:40 Step-BY-Step 阅读(214) 评论(0) 推荐(0) 编辑

mac os 下如何清除/切换svn eclipse插件的用户

摘要: 以mac os x为例(Unix/Linux类似),1、打开命令行窗口,即用户的根目录(用户的home目录)$ ls -al...drwxr-xr-x 6 linxyz staff 204 2 15 15:55 .subversion...$cd .subversion/auth/$rm -r -f -d *2、重启eclipse/myeclipse,提交或者更新svn文件,就会提示输入用户名和密码了。 阅读全文

posted @ 2014-02-06 07:39 Step-BY-Step 阅读(374) 评论(0) 推荐(0) 编辑

2014年1月8日

N-Queens II

摘要: Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions. 1 public class Solution { 2 int result = 0; 3 public int totalNQueens(int n) { 4 // Start typing your Java solution below 5 // DO NOT write main() funct... 阅读全文

posted @ 2014-01-08 05:43 Step-BY-Step 阅读(176) 评论(0) 推荐(0) 编辑

接口是永远不能被实例化的

摘要: 1)public interface Handler{ public void Hello(); } 2) import Handler; public class OtherParser{ Handler handler; ...... 一定有某个类实现了这个接口,并且在类路径中可以找到!接口是永远不能被实例化的,而2中只是对接口做引用,并没有被实例化。 接口可以看成是高度抽象的抽象类,它描述的事物们所共有的方法(方法签名),也就是规定除了该接口的方法的调用参数与规则,仅仅而已,它的使用必须依赖于实现类。 例如: public class MyHandler implements Ha... 阅读全文

posted @ 2014-01-08 04:42 Step-BY-Step 阅读(356) 评论(0) 推荐(0) 编辑

2014年1月7日

Chpater 10: Sorting

摘要: Internal Sort:Bubble O(n2)Selection O(n2)Insertion O(n2)Shell O(nlogn)Merge O(nlogn)Heap O(nlogn)Quick Sort O(nlogn)Tree Sort(BST) O(nlogn)Linear Sorting:Counting Sort O(n)BUcket Sort O(n)Radix Sort O(n)External Sorting:K chunks of data need to be sorted and a K... 阅读全文

posted @ 2014-01-07 02:49 Step-BY-Step 阅读(177) 评论(0) 推荐(0) 编辑

2014年1月4日

Java 理论和实践: 了解泛型

摘要: 转载自 :http://www.ibm.com/developerworks/cn/java/j-jtp01255.html表面上看起来,无论语法还是应用的环境(比如容器类),泛型类型(或者泛型)都类似于 C++ 中的模板。但是这种相似性仅限于表面,Java 语言中的泛型基本上完全在编译器中实现,由编译器执行类型检查和类型推断,然后生成普通的非泛型的字节码。这种实现技术称为擦除(erasure)(编译器使用泛型类型信息保证类型安全,然后在生成字节码之前将其清除),这项技术有一些奇怪,并且有时会带来一些令人迷惑的后果。虽然范型是 Java 类走向类型安全的一大步,但是在学习使用泛型的过程中几乎肯 阅读全文

posted @ 2014-01-04 03:22 Step-BY-Step 阅读(194) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 14 下一页

导航