Skip to content

Chris' Laboratory

chrislee.kr – Personal blog as bookshelves

Menu
  • Home
  • Github
  • Contact Me
Menu

Category: Javascript

Workerbox (Service Worker)로 사이트 로딩 속도 향상 시키기

Posted on 02/03/201903/03/2019 by Chris Lee

Service Worker: 웹페이지와 별개로 브라우저가 백그라운드에서 실행시키는 자바스크립트 코드. 푸쉬, 동기화, 오프라인 모드 지원 https://developers.google.com/web/fundamentals/primers/service-workers/ Workerbox: 구글에서 제공하는 자바스크립트 라이브러리로써 웹앱의 오프라인 지원을 쉽게 할 수 있도록 해줌. https://developers.google.com/web/tools/workbox/ Workerbox 설치 법: Step 1/2: In the bottom of your website, add following Javascript code snippet: Step 2/2: Create service-workers.js and add following snippet:

Continue reading

Javascript project devtools

Posted on 14/10/201814/10/2018 by Chris Lee

Javascript project development tools Babel: https://babeljs.io/docs/en/ Javascript compiler – Transform syntax, Polyfill features and so on $ babel -o dist/package.js dist/package.js Standard: https://standardjs.com/ Javascript style guide, linter and formatter $ standard src/*.js Rollup: https://github.com/rollup/rollup Javascript module bundler $ rollup src/main.js –format iife –name “SamplePackage” –file dist/package.js UglifyJS: https://www.npmjs.com/package/uglify-js Javascript parser, minifier, compressor and beautifier $ uglifyjs dist/package.js -c -m…

Continue reading

WebSocket Sample

Posted on 17/09/201510/09/2016 by Chris Lee

The sample process Send event to Web Socket for getting order id Web Socket connects MySQL orders table and get next order id Send event back to client with message and next order id Sample Environment Node.js Modules: mysql, socket.io PHP MySQL Filename: serverfile.js // Open port 3000 var io = require(‘socket.io’).listen(3000); // Load mysql…

Continue reading

Javascript Skill Test

Posted on 28/06/201411/09/2016 by Chris Lee

Found this test from the internet (Download: JavaScript_Skill_Test-blank) Tried to solve without using Google. FAILED. With help from Google, solved questions. There was someone’s solution for exact same questions; I resisted a lot to not see his solution. Some questions are referred  to understand what question was.  If I get this test in the interview without…

Continue reading

Detect when scroll is reached end of scroll

Posted on 18/02/201410/09/2016 by Chris Lee

Using jQuery, determine that user has been scrolled until the end of element. Reference: http://stackoverflow.com/questions/6271237/detecting-when-user-scrolls-to-bottom-of-div-with-jquery $(‘.scrollable’).bind(‘scroll’, function(){ if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) { alert(‘end reached’); } });    

Continue reading

SQLite – could not prepare statement (1 too many SQL variables)

Posted on 02/05/2013 by Chris Lee

During development for SQLite, I have got this error could not prepare statement (1 too many SQL variables) Accroding to this article, this error is because of SQLite limitation, which cannot put variables more than 999 variables. After I reduce the amount of variables, it worked very well.    

Continue reading

Bootstrap Modal Remote Example

Posted on 26/03/201310/09/2016 by Chris Lee

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>

Continue reading

Draw Polygons in Google Maps and Determine whether an Address is in Polygons

Posted on 21/03/201321/03/2013 by Chris Lee

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…

Continue reading

Prototype Ajax.Request modifying header

Posted on 30/04/201111/09/2016 by Chris Lee

new Ajax.Request({ajax-url}, { method:’get’, requestHeaders: { “Accept”: ‘application/json’ , “User-Agent”: {custom-user-agent} }, onCreate: function(){}, onComplete: function(){}, onSuccess: function(data){}, onFailure: function(){} });   Point: “User-Agent”: {custom-user-agent} ex) Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (FM Scene 4.6.1)

Continue reading

[jQuery] defaultChecked VS checked

Posted on 11/04/201130/04/2011 by Chris Lee

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…

Continue reading

Google Analytics에서 jQuery AJAX 호출들을 추적가능하도록 만들기

Posted on 25/01/201109/04/2011 by Chris Lee

원본 글: 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…

Continue reading

jQuery UI – Operation Aborted

Posted on 17/12/201009/04/2011 by Chris Lee

Reference: Why do I receive an “Operation aborted” error message when I visit a Web page in Internet Explorer? – http://support.microsoft.com/kb/927917#more_information When use jQuery code, the Internet Explorer 7.0 in Windows Vista causes “Operation aborted” error. To resolve this problem, jQuery code must be wrapped by $(document).ready(function() {});

Continue reading

[Javascript] Iframe dynamic resize for all browsers

Posted on 17/08/201009/04/2011 by Chris Lee

Iframe dynamic resize for all browsers [code] <script type=”text/javascript”> $(document).ready(function() { var i = setInterval(function(start){ resize_ifrm(); }, 20, new Date); $(“#tabs”).tabs(); }); function resize_ifrm(){ $(‘#ifrm_report’, parent.document.body).height($(‘#ifrm_report’, parent.document.body).contents().find(‘body’).height() + 30) } </script> [/code]

Continue reading

Categories

  • Adobe Flex (2)
  • Android (20)
  • Angular (ngx) (3)
  • Arduino (2)
  • Codeigniter (6)
  • CSS (5)
  • Django (2)
  • Docker (5)
  • E-Commerce (6)
  • Finance (2)
  • General Documents (15)
  • Google App Engine (5)
  • Helm (1)
  • iPhone (13)
  • Javascript (13)
  • Kubernetes (2)
  • Linux (13)
  • Magento (8)
  • Marketing (3)
  • MongoDB (4)
  • MS-SQL (1)
  • MySQL (6)
  • Node.js (6)
  • PHP (17)
  • Platforms (1)
  • Raspberry Pi (5)
  • React Native (4)
  • React.js/Next.js (2)
  • Samsung Smart TV (4)
  • Security (17)
  • Sencha Touch (4)
  • Server (31)
  • SVN (7)
  • Terraform (1)
  • Tools (7)
  • Uncategorized (1)
  • VirtualBox (1)
  • Vue.js (1)
  • Web Development (7)
  • WordPress (4)
  • Yii2 (3)

Search

Recent Posts

  • Gitlab Helm upgrade failed to register Gitlab runner 403 Forbidden
  • Run docker-dind and docker in Kubernetes cluster
  • Next.js Tutorial – Setting up your database in your local development environment
  • helm list error stream ID 3; INTERNAL_ERROR
  • Bootstrapping Kubernetes cluster with kubeadm

Recent Comments

  • Vadim on Alpine – Plugin caching_sha2_password could not be loaded
  • Andris on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Obayed on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Ari on How to install memcache.so/memcached.so for MAMP Pro (Mac)
  • Mida ali on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins

Tags

1 ajax amazon android android-addpart browser chrislee-kr codeigniter codeigniter-tcpdf com-apple-net-racoon CSS CSS history hack delpaigmail-com entity-addpart-double exception-printing-is-disabled-by-default-for-security-reasons ext-plugins-listpagingplugin ext-plugins-listpagingplugin-example f iphone javascript jquery-defaultchecked jquery-samsung-smart-tv listpagingplugin mac magento-exception-printing-is-disabled-by-default-for-security-reasons magento-sample-data-exception-printing-is-disabled-by-default-for-security-reasons nu-vot null-core-errors-confignotfound-config-mk9engine-ini php samsung-smart-tv-jquery samsung-smart-tv-sdk-ajax samsung-smart-tv-sdk-jquery samsung-tv-sdk samsung-tv-sdk-jquery samsung tv sencha-smart-tv sencha-touch-list-paging smart-tv-jquery sqlite subversion svn tcedook tcpdf-codeigniter uilinebreakmodecharacterwrap-is-deprecated unknown-column-link-area

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 Chris' Laboratory | Powered by Minimalist Blog WordPress Theme
 

Loading Comments...