Java EE核心框架实战 (9) 更多

  • 第215页 6.10 在服务端获取Json字符串 解析方式2
    415错误需要参考文章: http://blog.csdn.net/yixiaoping/article/details/45281721 重要配置: spring 4.x要配 jackson2.x jackson-annotations-2.6.2.jar jackson-core-2.6.2.jar jackson-databind-2.6.2.jar s...
  • 第213页 6.10 在服务端获取Json字符串
    方式1: @RequestMapping(value="/getJSONString") public String getJSONString(@RequestParam("jsonString") String jsonString){ ObjectMapper om = new ObjectMapper(); try { @SuppressWarnings("rawtypes")...
  • 第210页 6.9.1 配置字符编码过滤器
    <filter> <filter-name>encodingFilter</filter-name> <filter-class> org.springframework.web.filter.CharacterEncodingFilter </filter-class> <init-param> <param-n...
  • 第197页 6.2.8 spring 更加方便的参数获取
    Url中同名的参数将要自动传递给控制层方法中同名的参数,并且不再需要@RequestParam("username")注解。 指定请求路径与请求方法: @RequestMapping(value = "/login", method = RequestMethod.POST) 控制层重定向...
  • 第196页 6.2 Spring MVC的第一个登录测试
    Web.xml配置: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance " xmlns=" http://java.sun.com/xml/ns/javaee " xsi:schemaLocation=" http:...
  • 第58页 struts.xml文件
    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" " http://struts.apache.org/dtds/struts-2.1.dtd "> <st...
  • 第55页 struts2的web.xml文件
    <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance " xmlns=" http://java.sun.com/xml/ns/javaee " xsi:schemaLocation=" http://java.sun.com...
  • 第3页 mybatis-config.xml
    <?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" " http://mybatis.org/dtd/mybatis-3-config.dtd "> <configuration> <env...
  • 第12页 userinfoMapping.xml
    <?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" " http://mybatis.org/dtd/mybatis-3-mapper.dtd "> <mapper namespace="com.byhard.myb...

Learn More, Study Less (3)

  • 第97页 Speed Reading
    Using a Pointer 用手指阅读跟随阅读,保证速度。 Practice Reading 三分钟阅读多少字,三分钟理解多少内容。 Active Reading 边读边记录 Mastering Speed Reading
  • 第69页 Information Structure
    Arbitrary Information(特定信息?) Arbitrary information is a set of facts, dates, definitions or rules that have no logical grouping. Methods to Use With Arbitrary Information Linking Pegging Compr...
  • 第59页 The Test Phase
    Acquire Test - Have I seen/listened to the idea before? Understand Test - Do I get (at a surface level) what this idea means? Explore Test - Do I understand where this idea comes from, what it is r...

Professional JavaScript for Web Developers (63) 更多

  • 第614页 ERROR HANDLING
    The try-catch Statement try{ window.someFunction(); }catch(error) { alert(error.message); } The finally Clause: function testFinally(){ try { return 2; } catch (error){ return 1; } finally { retu...
  • 第542页 RICH TEXT EDITING
    Using contenteditable <div class=”editable” id=”richedit” contenteditable></div> Rich Text Selections getSelection(); Rich Text in Forms EventUtil.addHandler(form, “submit”, funct...
  • 第540页 FORM SERIALIZATION
    ➤ Field names and values are URL-encoded and delimited using an ampersand. ➤ Disabled fields aren’t sent at all. ➤ A check box or radio field is sent only if it is checked. ➤ Butto...
  • 第534页 SCRIPTING SELECT BOXES
    <select> and <option> HTMLSelectElement,HTMLOptionElement add(newOption, relOption) — Adds a new <option> element to the control before the related option. multiple — A Boolean...
  • 第520页 SCRIPTING TEXT BOXES
    <input type=”text” size=”25” maxlength=”50” value=”initial value”> <textarea rows=”25” cols=”5”>initial value</textarea> var textbox = document.forms[0].elements[“tex...
  • 第511页 Scripting Forms
    FORM BASICS HTMLFormElement acceptCharset — The character sets that the server can process; equivalent to the HTML accept-charset attribute. action — The URL to send the request to; equivalent to...
  • 第500页 MEMORY AND PERFORMANCE
    Event Delegation <ul id=”myLinks”> <li id=”goSomewhere”>Go somewhere</li> <li id=”doSomething”>Do something</li> <li id=”sayHi”>Say hi</li> </ul...
  • 第459页 Mouse and Wheel Events
    click — Fires when the user clicks the primary mouse button (typically the left button) or when the user presses the Enter key. dblclick — Fires when the user double-clicks the primary mouse butt...
  • 第458页 Focus Events
    Focus events are fi red when elements of a page receive or lose focus. document.hasFocus() and document.activeElement blur — Fires when an element has lost focus. This event does not bubble and...
  • 第451页 EVENT TYPES
    User interface (UI) events are general browser events that may have some interaction with the BOM. Focus events are fired when an element gains or loses focus. Mouse events are fired when the m...
  • 第442页 THE EVENT OBJECT
    This object contains basic information such as the element that caused the event, the type of event that occurred, and any other data that may be relevant to the particular event. The DOM Event Obj...
  • 第434页 EVENT HANDLERS
    HTML Event Handlers' <input type=”button” value=”Click Me” onclick=”alert(‘Clicked’)” /> <input type=”button” value=”Click Me” onclick=”alert(&quot;Clicked&quot;)” /&...
  • 第396页 Working with Style Sheets
    var supportsDOM2StyleSheets = document.implementation.hasFeature(“StyleSheets”, “2.0”); disabled — A Boolean value indicating if the style sheet is disabled. href — The URL ...
  • 第392页 DOM Style Properties and Methods
    cssText — As described previously, provides access to the CSS code of the style ttribute. length — The number of CSS properties applied to the element. parentRule — The CSSRule object representi...
  • 第350页 Manipulating Tables
    The <table> element adds the following: caption — Pointer to the <caption> element (if it exists). tBodies — An HTMLCollection of <tbody> elements. tFoot — Pointer to the <t...
  • 第349页 Dynamic Styles
    加载样式文件: function loadStyles(url){ var link = document.createElement(“link”); link.rel = “stylesheet”; link.type = “text/css”; link.href = url; var head = document.getElementsByTagName(...
  • 第346页 Dynamic Scripts
    external JavaScript file: function loadScript(url){ var script = document.createElement(“script”); script.type = “text/javascript”; script.src = url; document.body.appendChild(script); } load...
  • 第341页 Dom Types
  • 第337页 The Text Type
    nodeType is 3. nodeName is “#text”. nodeValue is text contained in the node. parentNode is an Element. Child nodes are not supported. appendData(text) — Appends text to the end of the node. dele...
  • 第326页 The Element Type
    nodeType is 1. nodeName is the element’s tag name. nodeValue is null. parentNode may be a Document or Element. Child nodes may be Element, Text, Comment, ProcessingInstruction, CDATASection, or En...
  • 第316页 The Document Type
    nodeType is 9. nodeName is “#document”. nodeValue is null. parentNode is null. ownerDocument is null. Child nodes may be a DocumentType (maximum of one), Element (maximum of one), ProcessingInstr...
  • 第310页 HIERARCHY OF NODES
    The Node Type Node.ELEMENT_NODE (1) Node.ATTRIBUTE_NODE (2) Node.TEXT_NODE (3) Node.CDATA_SECTION_NODE (4) Node.ENTITY_REFERENCE_NODE (5) Node.ENTITY_NODE (6) Node.PROCESSING_INSTRUCTION_NODE (7) N...
  • 第275页 The Complete Script
    The Complete Script var client = function(){ //rendering engines var engine = { ie: 0, gecko: 0, webkit: 0, khtml: 0, opera: 0, //complete version ver: null }; //browsers var browser = { //browsers...
  • 第271页 CAPABILITY DETECTION
    能力检测:比如判断是否支持函数:document.getElementById function getElement(id){ if (document.getElementById){ return document.getElementById(id); } else if (document.all){ return document.all[id];...
  • 第265页 THE SCREEN OBJECT
    window.resizeTo(screen.availWidth, screen.availHeight); THE HISTORY OBJECT Because history is a property of window, each browser window, tab, and frame has its own history object relating specifi...
  • 第259页 THE NAVIGATOR OBJECT
    浏览器属性: Detecting Plug-ins 查找插件,插件属性: name description filename length 比如: //plugin detection - doesn’t work in Internet Explorer function hasPlugin(name){ name = name.toLowerCase...
  • 第255页 THE LOCATION OBJECT
    window.location & document.location 指向同一个对象 属性: hash "#content" host " http://www.byhard.com:80 " hostname " http://www.byhard.com " href ...
  • 第253页 System Dialogs
    alert(); confirm();返回boolean值,点击ok(确定)的返回true, cancel(取消)返回false。 if(confirm("Are you sure")) { alert("I am glad."); } else { alert("I am sorry."); } prompt();让用户输入数据参数...
  • 第251页 Intervals and Timeouts
    setTimeout()表示指定的毫秒数后调用函数或计算表达式,相当于定时任务。 两个参数:1执行的代码段,2,执行代码前所等待的时间(毫秒); //avoid! setTimeout(“alert(‘Hello world!’) “, 1000); //preferre...
  • 第247页 Navigating and Opening Windows
    window.open(); 四个参数: the URL to load, the window target, a string of features, and a Boolean value indicating that the new page should take the place of the currently loaded page in the browse...
  • 第244页 Window Position
    var leftPos = (typeof window.screenLeft == “number”) ? window.screenLeft : window.screenX; var topPos = (typeof window.screenTop == “number”) ? window.screenTop : window.screenY; //move the win...
  • 第239页 THE WINDOW OBJECT
    var age = 29; function sayAge(){ alert(this.age); } alert(window.age); //29 sayAge(); //29 window.sayAge(); //29 global变量不能通过delete删除: var age = 29; window.color = “re...
  • 第217页 Function Expressions
    sayHi(); //error – function doesn’t exist yet var sayHi = function(){ alert(“Hi!”); }; 条件声明函数: //this is okay var sayHi; if(condition){ sayHi = function(){ alert(“Hi!”); }; } else {...
  • 第180页 OBJECT CREATION
    The Factory Pattern function createPerson(name, age, job){ var o = new Object(); o.name = name; o.age = age; o.job = job; o.sayName = function(){ alert(this.name); }; return o; } var person1 = crea...
  • 第173页 UNDERSTANDING OBJECTS
    ECMAScript objects as hash tables: nothing more than a grouping of name-value pairs where the value may be data or a function. var person = new Object(); person.name = “Nicholas”; person.age = 29...
  • 第165页 SINGLETON BUILT-IN OBJECTS
    The Math Object The min() and max() Methods var max = Math.max(3, 54, 32, 16); alert(max); //54 var min = Math.min(3, 54, 32, 16); alert(min); //3 var values = [1, 2, 3, 4, 5, 6, 7, 8]; var m...
  • 第161页 SINGLETON BUILT-IN OBJECTS
    The Global Object URI-Encoding Methods encodeURI() & encodeURIComponent() 比如: var uri = “ http://www.wrox.com/illegal value.htm#start”; //” http://www.wrox.com/illegal%20value.htm#start...
  • 第146页 PRIMITIVE WRAPPER TYPES
    原类型对应的引用类型:Boolean, Number, String. Three special reference types are designed to ease interaction with primitive values: the Boolean type, the Number type, and the String type. var s1 =...
  • 第141页 THE FUNCTION TYPE
    Function Internals Two special objects exist inside a function: arguments and this. the arguments object also has a property named callee, which is a pointer to the function that owns the arguments...
  • 第136页 THE FUNCTION TYPE
    js中函数实际上是object. Each function is an instance of the Function type that has properties and methods just like any other reference type. Because functions are objects, function names are simpl...
  • 第134页 THE REGEXP TYPE
    RegExp Constructor Properties input $_ lastMatch $& lastParen $+ leftContext $` multiline $* rightContext $’ var text = “this has been a short summer”; var pattern = /(.)hort/g; /* * Note: O...
  • 第132页 THE REGEXP TYPE
    RegExp Instance Methods var text = “mom and dad and baby”; var pattern = /mom( and dad( and baby)?)?/gi; var matches = pattern.exec(text); alert(matches.index); //0 alert(matches.input); //...
  • 第128页 THE REGEXP TYPE
    var expression = /pattern/flags; The pattern part of the expression can be any simple or complicated regular expression, including character classes, quantifiers, grouping, lookaheads, and backre...
  • 第122页 THE DATE TYPE
    var now = new Date(); Date.parse(); Date.UTC(); Date.parse()接受下面的时间格式: month/date/year (such as 6/13/2004) month_name date, year (such as January 12, 2004) day_of_week month_name date yea...
  • 第121页 The array type
    Reduction Methods var values = [1,2,3,4,5]; var sum = values.reduce(function(prev, cur, index, array){ return prev + cur; }); alert(sum); //15 var values = [1,2,3,4,5]; var sum = values.reduceRight...
  • 第118页 THE ARRAY TYPE
    Location Methods indexOf(), lastIndexOf(); 两个方法都可以接受两个参数,第一个参数表示要查找的元素,第二个可选参数,表示从哪里开始查找。indexOf()表示从前往后找,lastIndexOf()表示从后往前找。如果都未...
  • 第112页 The Array Type
    Stack Methods 堆栈方法 后入先出(lifo),堆栈操作。pop, push是Array自带的方法。 var colors = new Array(); //create an array var count = colors.push(“red”, “green”); /...
  • 第106页 THE ARRAY TYPE
    js中的array是有序数组,可以存储任何类型的数据。 数组创建: var colors = new Array(); 如果知道数组长度: var colors = new Array(20); 也可直接定义数组元素进行创建: var colors = new Array(“red”, “...
  • 第104页 THE OBJECT TYPE
    var person = new Object(); person.name = “Nicholas”; person.age = 29; object literal notation: var person = { name : “Nicholas”, age : 29 }; 这样写也允许的: var person = { “name” : “Nichola...
  • 第96页 GARBAGE COLLECTION
    Mark-and-Sweep 未标记表示变量在上下文中被引用,如果仍是标记的,表示准备删除的变量。 Reference Counting 引用计数,如果引用计数数量为0,表示变量无法被访问,可以被删除。 但会碰到循环引用的问题。 Perfo...
  • 第90页 EXECUTION CONTEXT AND SCOPE
    var color = “blue”; function changeColor(){ if (color === “blue”){ color = “red”; } else { color = “blue”; } } changeColor(); Scope Chain Augmentation The catch block in a try-catch stateme...
  • 第85页 PRIMITIVE AND REFERENCE VALUES
    Five primitive types:Undefined, Null, Boolean, Number, and String. 能过值访问。 Reference values are objects stored in memory. 与其它编程语言不同,js不允许直接访问内存,事实上访问的是对象的引用,...
  • 第78页 FUNCTIONS
    Strict mode places several restrictions on functions: No function can be named eval or arguments. No named parameter can be named eval or arguments. No two named parameters can have the same name. ...
  • 第69页 STATEMENTS
    The if Statement The do-while Statement The while Statement The for Statement for (;;) { //infinite loop doSomething(); } The for-in Statement for (property in expression) statement fo...
  • 第65页 Operators
    Equal and Not Equal EXPRESSION VALUE null == undefined true “NaN” == NaN false 5 == NaN false NaN == NaN false NaN != NaN true false == 0 true true == 1 true true == 2 false undefined == 0 false ...
  • 第60页 Operators
    Multiplicative Operators 如数值类型的变量,需隐式转换成数值类型,使用Number()转换函数。 Multiply If the operands are numbers, regular arithmetic multiplication is performed, meaning that two positi...
  • 第46页 OPERATORS
    Unary Operators ++,-- ➤ When used on a string that is a valid representation of a number, convert to a number and apply the change. The variable is changed from a string to a number. ➤ When u...
  • 第41页 DATA TYEPES
    Character Literals var text="\u03a3"; alert(text.length) //1 Converting to a String var age = 11; var ageAsString = age.toString(); //the string “11” var found = true; var foundAsString = foun...
  • 第39页 DATA TYPES
    Number Conversions Number() //can be used on any data type; parseInt() //converting strings to numbers. parseFloat() //converting strings to numbers. var num1 = Number(“Hello world!”); //...
  • 第35页 DATA TYPES
    The Number Type 0开头表示八进制,如果解析不正确,会默认成10进制数。比如: var octalNum1 = 070; //octal for 56 var octalNum2 = 079; //invalid octal - interpreted as 79 var octalNum3 = 08; ...
  • 第31页 DATA TYPES
    The typeof Operator Note that because typeof is an operator and not a function, no parentheses are required (although they can be used). The Undefined Type var message; alert(message == undefined...
  • 第28页 KEYWORDS AND RESERVED WORDS
    Keywords: break do instanceof typeof case else new var catch finally return void continue ...
  • 第26页 SYNTAX
    Case-sensitivity Identifiers The first character must be a letter, an underscore (_), or a dollar sign ($). All other characters may be letters, underscores, dollar signs, or numbers. Strict Mo...

Objective-C Programming (3)

  • 第157页 24 Callbacks
    • T a r g e t - a c t i o n : Before the wait begins, you say “When x happens, send this particular message to that particular object.” The object receiving the message is the target. The sele...
  • 第81页 More messages
    Sending messages to nil When Objective-C was designed, it was decided that sending a message to nil would be OK; it just wouldn’ t do anything at al l . Thus , thi s code i s completely legal : Do...
  • 第75页 12 Objects
    However, often you need a way to create a pointer without knowing exactly what kind of object the pointer will refer to. For this case, we use the type id to mean “a pointer to some kind of Object...

Android in Action (9) 更多

<前页 1 2 3 4 后页>