Reference: http://twitter.github.com/bootstrap/javascript.html#modals Reference: http://jsfiddle.net/mmfansler/cp67J/ <a data-target=”#myModal” role=”button” class=”btn” data-toggle=”modal”>Launch demo modal</a> <div class=”modal fade hide” id=”myModal” tabindex=”-1″ role=”dialog” aria-labelledby=”myModalLabel” aria-hidden=”true” data-remote=”/mmfansler/aQ3Ge/show/”> <div class=”modal-header”> <button type=”button” class=”close” data-dismiss=”modal” aria-hidden=”true”>×</button> <h3 id=”myModalLabel”>Modal header</h3> </div> <div class=”modal-body”> <p>One fine body…</p> </div> <div class=”modal-footer”> <button class=”btn” data-dismiss=”modal” aria-hidden=”true”>Close</button> <button class=”btn btn-primary”>Save changes</button> </div> </div>
Category: Frameworks
Draw Polygons in Google Maps and Determine whether an Address is in Polygons
Draw Polygons in Google Maps and Determine whether an Address is in Polygons This sample source code uses Google Maps Javascript API V3 to draw polygons in Google Maps. (Refer https://google-developers.appspot.com/maps/documentation/javascript/examples/drawing-tools) The address auto-complete uses Google Places Javascript library. (Refer https://developers.google.com/maps/documentation/javascript/places#places_autocomplete) The server-side code will retrieve address’ latitude and longitude using Google Gecoding API. (Refer…
HTML5 Application Cache
A BEGINNER’S GUIDE TO USING THE APPLICATION CACHE – Reference: http://www.html5rocks.com/en/tutorials/appcache/beginner/ ……………………………………………… Using the cache interface gives your application three advantages: Offline browsing – users can navigate your full site when they’re offline Speed – cached resources are local, and therefore load faster. Reduced server load – the browser will only download resources from…
MongoDB Library for Codeigniter
Codeigniter MongoDB Library Reference & Download: https://github.com/alexbilbie/codeigniter-mongodb-library/tree/v2 Using with CodeIgniter: Add the file Mongo_db.php to your /application/libraries folder. Add the file mongodb.php to your /application/config folder. Update the config file.
Media Queries to handle all device’s screens
To cover all screen resolution including portrait and landscape screens. Found from stuff & nonsense (http://www.stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/) /* Smartphones (portrait and landscape) ———– */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* Styles */ } /* Smartphones (landscape) ———– */ @media only screen and (min-width : 321px) { /* Styles…
Image related websites
Sencha Touch – Ajax JSON with multiple roots
I have JSON result that contains multiple roots. Most example JSONReader source codes are dealing with one root. According to cnelissen from Sencha Forum, using below code will make it working: var store1 = new Ext.data.Store({ url: ‘/path/to/json-data.php’, method: ‘POST’, autoLoad: true, reader: new Ext.data.JsonReader({ root: ‘root1’, fields: [‘field1’, ‘field2’, ‘field3’] }), listeners: { ‘load’:…
Sencha Touch Ext.Router.draw refresh issue
Sencha Touch 1.1.1 In my ‘route.js’ for Ext.Router.draw, I have custom route “map.connect” like: Ext.Router.draw(function(map) { map.connect(‘s/:specialName’, { controller: ‘Special’, action: ‘index’ }); map.connect(‘:controller/:action’); }); The URL I used is like this “http://localhost/m/#s/am-i-right-3023”, which contains dash(-) in the URL. If I refresh the browser with the URL, application is not reloading the page properly….
Sencha Touch Related Links
Loading Sencha Touch controllers and views dynamically http://www.onlinesolutionsdevelopment.com/blog/web-development/javascript/loading-sencha-touch-controllers-and-view-files-dynamically/ Dynamic Sencha Touch Forms – Part 1 – Enabling/Disabling Fields based on form selections http://www.swarmonline.com/2011/01/dynamic-sencha-touch-forms-part-1-enablingdisabling-fields-based-on-form-selections/ Mobile Chat with Sencha Touch + node.js + socket.io https://github.com/mrsunshine/Mobile-Chat-with-Sencha-Touch—node.js—socket.io- One of sample code – worth to refer http://pastebin.com/uF50X67Y DOWNLOAD: sencha_sample Sencha Touch 1.x: Examples and Showcases…
네이버에서 실시간 환율 정보 받기 (Get real-time currency information from Naver)
업데이트 버젼 (Updated Version): https://chrislee.kr/wp/2020/11/21/%ec%8b%a4%ec%8b%9c%ea%b0%84-%ed%99%98%ec%9c%a8-%eb%b0%9b%ec%95%84%ec%98%a4%ea%b8%b0-get-real-time-currency-information/ 실시간 환율 정보를 받기 위해 자료를 찾아보는 중, 네이버 환율 API를 발견하였다. ( [출처] 네이버 환율정보 api 이용한 php 위젯 개발 하기 |작성자 usback]) http://www.naver.com/include/timesquare/widget/exchange.xml 여기서 의문점은 저 블로그에서 xml 주소를 열어보면, xml 정보가 보이지만 저 주소를 복사 한 뒤 볼려고 하면, 퍼미션 에러가 난다. 결론은 저 xml은 레퍼러 체크를…
Codeigniter 2.0 – CSRF Enabled
References: jQuery axaj for Codeigniter 2: http://kevinphillips.co.nz/news/jquery-axaj-codeigniter-2 CSRF Protection in CodeIgniter 2.0: A closer look: http://www.beheist.com/index.php/en/blog/csrf-protection-in-codeigniter-2-0-a-closer-look AJAX with CSRF Protection in Codeigniter 2.0: http://aymsystems.com/ajax-csrf-protection-codeigniter-20
Developing a website based on Adobe Flex
Since I decided to learn how to develop a website based on Adobe flex, I will gather many useful resources as much as I can. 1. Live Flex 3 training videos created by Mike Lively of Northern Kentucky University Live Flex 3 Training Part 1 (Building a Website) – http://www.youtube.com/watch?v=xrjmImF0CKE Live Flex 3 Training Part…
Nothing can overcome ‘Permission Denied’ error to get location.href
Except Adobe Air? Adobe Air Web Browser: http://www.lucentminds.com/archives/adobe-air-web-browser.html All I need was an URL, man.
PHP Proxy Script
Quoted from http://phpproxies.com/ Proxy Scripts Glype Glype is new, released just in January 2009, but it has already been downloaded 15,000 times. PHP Web Proxy This script is used for many different proxy sites, download it through SourceForge. PHPProxy Freshmeat.net’s script can turn your web host’s server into a proxy server in no time. If…
unserialize() [function.unserialize]: Error at offset 00000 of 0000 bytes
If serialize string contains ‘&’, then the error occurs when unserialize the string. unserialize() [function.unserialize]: Error at offset 00000 of 0000 bytes Simply change ‘&’ to ‘&’, by replacing it. $string = str_replace(‘&’, ‘&’, $string); $test_array = unserialize($string);
CSS Custom Fonts for all browsers
Use Font Squirrel to create compatible fontface: http://www.fontsquirrel.com/fontface/generator Confirmed working in IE, Chrome, Firefox 1. Upload font file and get zip file 2. Copy CSS code to your code 3. Done Not compatible for IE: From Symphony of dot net: http://symphony-of-dot-net.blogspot.com/2010/03/making-css-custom-font-works-with-ie.html @font-face { font-family: my_font; src: url(‘my_font.eot’); src: local(my_font), url(‘my_font.ttf’) format(‘opentype’); } p…
Only show Paging Toolbar when appropriate
One of Sencha User, Joel, pointed out one of problems in Sencha Touch ListPagingPlugin that display ‘Load more…’ message even if a result gave less rows than paging size. Below code he suggested will fix the problem: Ext.override(Ext.plugins.ListPagingPlugin, { onListUpdate : function() { if (this.list.store && this.list.store.data.length < (this.list.store.currentPage * this.list.store.pageSize)) { if (!this.rendered) {…
HTML Purifier
HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier will not only remove all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist, it will also make sure your documents are standards compliant, something only achievable with a comprehensive knowledge of W3C’s specifications. Tired of using…
Upgrade to Codeigniter 2.0
$this->input->xss_clean(); In codeigniter 2.0, you will need to modify $this->input->xss_clean() to $this->secuirty->xss_clean(). Otherwise, it won’t work. Of course, don’t forget to load ‘security’ library before you use the function. extends Controller or extends Model You will need to change class Test extends Controller to class Test extends CI_Controller And class Test extends Model to class…
Does wordpress run ‘crontab’ for scheduled cron jobs?
Does wordpress run ‘crontab’ for scheduled cron jobs? Answer is no. According to Codex document, scheduled tasks are executed by visitors. It means that if visitors are not accessing your blog, it won’t be executed. However, it won’t be matter for public blogs or websites due to search engine robots, which are working hearty to…
[jQuery] defaultChecked VS checked
jQuery defaultchecked VS checked Situation: I have checkbox elements on div(‘#dialog-a’) for a dialog. When an user clicks a button, then jQuery will bring the dialog with html code of div(‘#dialog-a’). Once, the user set checkbox and click “Close” button in the dialog, “Close” function supposes to set checkbox as “checked” in div(‘#dialog-a’). I use…
CSS floats: container does not stretch to fit floated contents
Original Article: http://www.mikepadgett.com/technology/technical/alternative-to-the-pie-clearfix-hack/ Here’s a quick resolution to an almost ungooglable problem.” This article was formerly titled “Alternative to the PIE clearfix hack” but has since been rewritten. Getting this problem? Example: Left Left Left Left Right Right Right Right <div style=”background: red; padding: 2%; border: 1px solid #000;”> <div style=”border: 1px solid #000000; background: #e2e2e2;…
Google Analytics에서 jQuery AJAX 호출들을 추적가능하도록 만들기
원본 글: http://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/ The code This code will automatically log all jQuery AJAX requests in our application, including those using $.ajax(), $.get(), or $.post(). This will also work for any jQuery plugins using AJAX requests (e.g. lightbox plugins, etc.), as well as for all Rails 3 remote links and forms(provided we’re using the jQuery UJS driver). In the page layout…