
Javascript Patterns curl and libcurl Learning JavaScript Design Patterns Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language. One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve. Design patterns also provide us a common vocabulary to describe solutions. This can be significantly simpler than describing syntax and semantics when we're attempting to convey a way of structuring a solution in code form to others. In this book we will explore applying both classical and modern design patterns to the JavaScript programming language. Target Audience This book is targeted at professional developers wishing to improve their knowledge of design patterns and how they can be applied to the JavaScript programming language. Acknowledgments Credits Reading We already use patterns everyday
Design Patterns | Object Oriented Design JSPatterns.com Collecting all the cheat sheets Basic JavaScript Part 10: The Module Pattern Here are the links to the previous installments: The module pattern is quite popular in the JavaScript community as is heavily applied by many JavaScript developers. There’s also the CommonJS initiative, which defines a specification for a common set of JavaScript API’s that are organized using self-contained modules. These specifications are supported by a growing community as they provide the foundation for the modules that are built into Node.js and numerous other open-source JavaScript libraries. This pattern has become so widespread because it’s an excellent way to package and organize an independent, self-containing piece of JavaScript code. First we define a namespace called media. We can use the download method of our module like so … media.podcast.download('the first episode'); … which outputs what we expect: Downloading the first episode of Astronomy podcastFile extension is of type mp3 The way we implemented the module pattern here has at least one major downside. Happy coding!
XD blog 2015-08-24 Open the notebook with a different browser I was looking for an easy to launch the notebook server with a different browser than the default one. I created a batch file (for Windows but easily adaptable to Linux): set PATH=%PATH%;C:\Python34_x64;C:\Python34_x64\Scripts set PYTHONPATH=<extra_path>;%PYTHONPATH%set BROWSER="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" jupyter-notebook --notebook-dir=<your_folder_for_notebooks> --port=XXXX The notebook opens on Chrome with the following url 2015-05-17 Notebook to slides Notebooks can be converted into slides with nbconvert. The trick is if you have many notebooks to convert, it is unlikely you are going to open all of them to tag each slide and subslide. 2015-05-10 Notebook on Github Github now renders notebooks and do not show the raw text by default: Features ou modèle. 2015-04-24 Use javascript tools in your notebook This is a reason why I do like notebooks. 2015-03-26 Drawing in a notebook
Adequately Good - JavaScript Module Pattern: In-Depth - by Ben Cherry The module pattern is a common JavaScript coding pattern. It's generally well understood, but there are a number of advanced uses that have not gotten a lot of attention. In this article, I'll review the basics and cover some truly remarkable advanced topics, including one which I think is original. The Basics We'll start out with a simple overview of the module pattern, which has been well-known since Eric Miraglia (of YUI) first blogged about it three years ago. Anonymous Closures This is the fundamental construct that makes it all possible, and really is the single . (function () { // ... all vars and functions are in this scope only // still maintains access to all globals }()); Notice the () around the anonymous function. Global Import JavaScript has a feature known as . Luckily, our anonymous function provides an easy alternative. (function ($, YAHOO) { // now have access to globals jQuery (as $) and YAHOO in this code }(jQuery, YAHOO)); Module Export Advanced Patterns Augmentation