Create the directory in the repository. Check it out somewhere (NOT in your local working directory). Move the .svn directory to your local working directory. Add all folders an files. Commit.
Create the directory in the repository. Check it out somewhere (NOT in your local working directory). Move the .svn directory to your local working directory. Add all folders an files. Commit.
In iOS events bubble up from child to parent view by default, but in Android you have to explicitly say so. For example if we have a parentview that adds a childview that has a button in it. After clicking the button, the childview fires a "logout" event on the button. The parent view listens […]
An easy way to let Backbone work with Promises in Titanium: Get the bluebird Promise library. Now you can add a fetchAsPromise to the Backbone.Model.Prototype and Backbone.Collection.prototype objects: Backbone.Model.prototype.fetchAsPromise = function(options) { var me = this; return new Promise(function(resolve, reject) { options.success = resolve; options.error = reject; me.fetch(options); }); }; The same can be done […]
It can be very challenging to work with dates and times across different timezones. In this post I explain some of the things I do to make this work. I focus on Javascript, PHP, MySQL and SQLite development. MySQL The most important action first - put the connection session in UTC mode: set time_zone = […]
TiShadow enables you to test faster on multiple devices at once. This is a step by step article to use it. If you want to use it on Android Genymotion emulators, you first have to install Google Apps on these emulators. TiShadow consists of 3 elements: The server that pushes apps and updates to the […]
Some things regarding Node.js installation and setup: When installing Node.js with the installer, it will install the npm inside the Node.js location. So if you've set another prefix, you have to delete the npm packages from within the Node.js location, so they won't shadow the one in the prefix location. The npm prefix variable is […]
Te find the sqlite location for your iOS simulator, you first have to know the simulators uid. To see all available simulators and their device UIDS: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl list The sqlite location is: ~/Library/Developer/CoreSimulator/Devices/<device-id>/data/Containers/Data/Application/<application-id>/Library/Private Documents/<db>.sql Unfortunately it's (as far as I know) not possible to get the application id. If you know the name of the […]
Using Backbone in Titanium Alloy is a very powerful mechanism but it can backfire on you if you don't take into account how it works. Remove event listeners from singletons A common pattern is to create a singleton when a window opens and attach a change event handler to the model so the views will update when […]
The mcrypt functions return a binary string, so you can store it in a VARBINARY or BLOB field or as VARCHAR or TEXT if you first base64 encode it. When using the CBC (Cipher Block Chaining) mode, the input is divided into blocks of X bytes. The last block is then padded with NULL bytes […]
I wanted to query a database on the onCreate method, but I ran into issues when doing this from another thread. First I tried to do it with the View.post() method, but it seems like the View is not always attached to the window, so the run() method of the Runnable was never called. Another […]