JavaScript Default operator
26Jun10
this.init(wrapper, handle, options || {});
ใน input parameters ของ function สามารถเขียนแบบนี้ได้ เรียกว่าการใช้ trusty กับ falsy
var A = 0, B = NaN, C = 1, D = "hi"; var RESULT = ( A || B || C || D ); alert("Result = " + RESULT); RESULT = ( D && C && B && A ); alert("Result = " + RESULT);
ถ้าเอามาต่อกันด้วย or operator จะหาอันที่เป็น true จากซ้ายไปขวาอันไหนที่ให้เป็น true อันแรกก็จะเป็นค่านั้น
แต่ถ้าเอามาต่อด้วย and operator จะหาอันที่เป็น false อันแรกจากซ้ายไปขวา ถ้าเจอ false อันไหนก็เป็นค่านั้น
http://www.learn-javascript-tutorial.com/AdvancedTechniques.cfm
Filed under: JS | Leave a Comment
JS APIs
- finding elements by class -> document.getElementsByClassName(‘section’)
- finding elements by CSS syntax
- web storage -> window.localStorage[‘value’] = area.value;
- web SQL database
- openDatabase
- db.transaction(function(tx){tx.executeSql(sqlinside)});
- Application Cache API
- Web Workers
- Web Sockets
- new WebSocket
- onopen
- postMessage
- onmessage
- onclose
- Drag and drop -> text can be drag and transfer between element
- Geolocation
HTML
- New semantic tags
- header
- hgroup
- nav
- section
- article
- header
- aside
- footer
- New link relation (rel)
- icon
- pingback
- prefetch
- archives
- external
- license
- nofollow
- tag
- Microdata -> enhance search results by marking up web pages with microformats, RDFa or Microdata
- ARIA attributes ???
- New form field types
- range
- search
- placeholder
- color
- number
- tel
- Audio + Video
- Canvas
- Canvas 3D
- SVG
CSS
Filed under: Programming, Technology | Leave a Comment
Data Mining Resources
27May10
After doing some researches, i come up with these books,
Introduction to data mining
http://www-users.cs.umn.edu/~kumar/dmbook/index.php
and Programming collective intelligence
Filed under: Programming, Technology | Leave a Comment
WebSocket HTML5 Note
26May10
a single-socket full-duplex -> full-duplex real-time communication on the web
web socket the message sent by the server is the same message delivered to the browser
Filed under: Programming, Technology | Leave a Comment