Saturday, December 13, 2014

The new Android Studio and intel HAXM

Hola! It's been a long time since I have blogged anything. Well, let's not make any promises, I actually just wanted to document some stuff I was doing, so might as well do it here and try to stop being a lazy ass.

The new Android Studio is really cool, and I decided to try it out since I have not touched ADT eclipse for a long time anyways. But right now, http://developer.android.com/ looks like this: 



That is so not cool Google. It's bad!! So that's why I am here actually, wasting time, waiting for the page to come back alive so I can continue with their tutorials. Trying to learn something shouldn't be this hard! Trying to get in on the #HourOfCode and sh*t. heh heh.


So I had previously used the old Android Studio, and it kept saying it couldn't find the SDK, so I was pretty miffed and left it for a while. Then I tried redownloading the Android Studio again, and pow wow, there was a new snazzy Android Studio. 


I like it, I do, but the emulator was super duper slow.. :( So after some googling, found out about the Intel HAXM thingy to help make it faster. 


Or you could use the SDK Manager to install it, but apparently it LIES! It will say that it is apparently installed:

But it really isn't, it's just downloaded, so you would have to search high and low for it. So don't bother, just download from the link above. Once you have downloaded it, double-click to install and if you hit a popup that says something about virtualization, then you would have to enable it in your BIOS.

So restart your computer(annoying - I know.) and get into the BIOS and look for "Virtualization Technology", and enable it. Then once you are back in Windows, then try installing the HAXM again. 

After installing that, I found I had to restart Android studio as well, and even then, it was a bit better, but still had issues. I restarted the virtual device several times, but it seemed to be getting worse. 

I found that apparently my device did not stop properly, and so I had to clear the locks on it. To do that, I removed all .lock files:



Another thing that helped, was to wipe the user data before I ran the virtual device:


As you can see, it says that the size on disk is 1 gigantous GB! When I started, it was only about 700 MB. So clean your disks people, it helps. After that, it was much smoother. Of course I haven't tested enough, but hopefully it stays this way. Subsequent deployment of apps was pretty fast.

Ahh, the page is back alive!

Friday, October 26, 2012

Joomla and Akeeba

So there I am, having installed joomla (both versions 2.5 and 3), and trying to get Akeeba Subscriptions to work. It is an awesome product, I don't mean it's not, just that somehow I couldn't get it to work, my users were not being added to the subscribed groups. I read and re-read the documentation several times, and followed the instructions, but still it's not working, until now, when I changed one of the configurations on access levels.

It was really frustrating, and I didn't want to email Akeeba over this as it seemed like IT WORKED FOR EVERYONE. So I thought it must be something I was doing wrong! And it was, but thought it would have been good if there was a more detailed documentation. Maybe it's just me or the new generation syndrome, everything needs to be spelt out hurhur. Anyway, for all the rest of the lazy bums like me, if you are having a similar problem with the user groups ACL in joomla for Akeeba, here's a visual mini tutorial.It is similar to what is described in the documentation given in the Akeeba documentation, but with a little of my addons.

This article assumes you are fairly familiar with Joomla.

1. Under User Manager: User Groups, create a user group called Subscribers

2. Click on Viewing Access Levels and click New to create a new viewing access level.
      a. Fill in the level title as Premium Content
      b. Select the user group that you have previously created, Subscribers.
      c. Click Save and close


3. Once you have done the above, you can go ahead to set your selected content to the the View Access Level Premium Content. An example is shown below:

4. Now we will move on to creating the subscription levels in Akeeba. Go to the Akeeba component and select Setup>Subscription Levels. Click New. To keep it simple, I will just be creating a free subscription.


5. Now comes the part that I had been tearing my hair over. As you can see later, it was really a very minor thing I missed out on. Note the circled part, leave it as PUBLIC. I went on and changed it to something else and hence it didn't work. Go to Extensions > Plugin Manager, click on the Akeeba Subscriptions - Joomla! Usergroups Integration. 

6. Add a subscription link to your menu. You can choose to select multiple types of subscriptions

And that's it! Now you can try to login as a user and test your subscription to see if it works. 
Hope this helps someone out there, and thanks to Akeeba for creating an awesome product!


Tuesday, July 19, 2011

Working with JavaScript frameworks

Currently working on extjs4 for a project at work. I have to admit that though extjs4 is pretty, the documentation really drives me nuts. I had contemplated dropping down to extjs3 as the tutorials seem to be more common, but in terms of the pretty factor, extjs3 can't compare. Also, the code required to do something similar in extjs 3 vs extjs4 is quite different in some cases. As in less lines of code. I love that sort of thing.


I guess I will try to document the problems I face here, and perhaps later will write a mini tutorial(maybe contribute to the examples in sencha?) We'll see.


Some quirks here:


- When passing my data as json, I had to remove the quotes from the data that I meant as numbers, in particular for my case, float. And how I did that was to force the type in my php code before I spat out the data. Not sure why that behaviour, but this caused me a lot of trouble in my chart. I just couldn't get the points to map correctly until I did that.


-  When using the type 'Time' for my chart, I have to define my fields in the model as
fields: [{name: 'date', type: 'Date'}, {name: 'close',type:'float'}]
vs just 
fields: ['date', 'close']  (This worked for my other models.)


So the above is what I can remember offhand, Will add to it when I have time again.

Friday, June 10, 2011

Another of my nonsense drawing... 
Well I know in my last post I said that I would write more about my development with Android... I did do up a couple of apps, but well, documentation, have not really gotten down to it :p

Anyways, I'd just like to really say wow about Audacity. I know its been around for a long time, but have not really used it... till lately when I needed it for a small project. It's just way cool and really kudos to those who have contributed to that project. I'm not an expert in sound, but the folks at Audacity have made it so easy to use. Do try it out if you need some kind of a sound editor. http://audacity.sourceforge.net/

I've also been using this other software called MediaCoder ( http://www.mediacoderhq.com/ ). Been using it to convert formats and also to extract the sound from videos. Pretty cool.

Tuesday, April 26, 2011

So I've gotten my hands dirty on the android phone, and think I might be writing a little tutorial on it. I used phonegap, jquerymobile, html5, and eclipse as the IDE. Also been messing around with Mr Android drawings :D well till later when I have the time to write the tutorial!

Thursday, March 25, 2010

Introducing my little giraffe... inkscaped!


Been playing around with inkscape as mentioned earlier, and I quite like this tutorial as it was pretty simple.





So after the tutorial, I followed it as closely as I could (although I did use some different techniques), and this is the result..


Well I improvised a bit for the eyes lol

And here is my first little inkscaped version of my little soft toy giraffe. Her name is 'YoYoYo'. Yes, that's not a joke. :)




There's still room for improvement of course, and it took me too damn long to do it too :p And I know, it's a giraffe, but hey why is the neck so short, and what happened to the leggys??? Well, my soft toy really looks like that... take it as an alien giraffe? Hopefully I will continue to have inspiration!


Friday, March 19, 2010

swirly whirly

I made some swirlies using inkscape, and there you have it, a header for my blog. Been a long time since I used Inkscape properly, and that's my first proper attempt with the swirlies :D