Posts

1. Starting with MongoDB, nodejs and mongoose - part I

Some time ago I started to work on a project that included nodejs and mongodb, I decided to write down as I learn for future reference and maybe others could find it useful as well. All source code for this post can be found in this git repository What you will need: 1. Nodejs and npm installed - you can download it from here , if you need to install nodejs on a linux distribution (e.g. Ubuntu, mint), there is a great explanation here 2. MongoDB installed - you can find how to do it here , if you don't want to install mongodb, you can create and use a sandbox db at MongoLab In this post I will assume that you know how to use node and npm and you have your package.json already ready, we will construct a site for locating airports around the world. We will start by adding some of our npm dependencies for this project,  we are going to use: express - this will be our web framework to encapsulate all the web server capabilities and make things easier for us, don't wo

HTC One X - Jelly Bean update - quick review

Image
I just received my Jelly Bean update for my HTC One X and though I would share some quick thoughts about it.  The first thing that caught my eyes when the phone loaded is that they changed all the status color to blue instead of green (see image), I have no idea why they did this but well... There is now a icon in the notification bar for "power saver" feature. The UI seems to run smoother now and is more responsive than it use to be  in the last version (sense 4+) , and there is now a possibility to move from your last home screen to the first when you change home screen with your finger (7 -> 1 in a circle). Another nice addition is the new gallery layout, you can now see images from different sources, also you can sort the events by events and dates: Gallery home page Gallery layout by events Also there is now the option to resume to camera mode once you turned of your phone, when you turn it back on the camera

Things you need from time to time I

Today I needed a list of countries for my drop down list and decided to post it here for future reference and maybe someone else will find this helpful as well: Also I am using this wonderful jQuery plugin to enable search inside the dropdown list:  http://harvesthq.github.com/chosen/ Afghanistan Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bosnia and Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo, The Democratic Republic of The Cook Islands Costa Rica Cote D'ivo

Ext JS 4 Line Chart Themeing

Sometimes using Ext JS 4.1 default chart themeing is not enough, we might want to change the colors, or to have more than the default number which will be repeated once all of them are used. There are currently 7 default themes defined: "Base, Green, Sky, Red, Purple, Blue, Yellow, Category 1-6", In the Base theme all the attributes are predefined, in the color name themes, the colors are calculated by a base color which get stronger or lighter to create the scheme and in the categories the color scheme is predefined by a complete set of colors. For example, category1 is defined as: ['#f0a50a', '#c20024', '#2044ba', '#810065', '#7eae29'] In the following example we are going to create a simple chart with: two axes (Date and Numeric), one line series and using a  default theme: 'Category 2', then we will define a new theme and use it instead: The chart: Ext.create('Ext.chart.Chart', { renderTo: Ext.get