Yet Another Cache Cleaner
We installed yet another forum on one of our private servers the past week. My job was to set it up the theme, smtp and access roles. So everything went well until I came to the most important requirement of them all:
The newly registered users were supposed to be in a very limited access role and once their identities were confirmed, the admin was to move them to full member access. This all was setup, but whenever I moved a user to full member access the account would still retain limited access of the first role assigned. This became annoying! So after a little googling I found out that there is cache inside YAF’s db; a table called ActiveAccess. When you clear the table manually it resets the cache. There is a Stored Procedure as well “yaf_activeaccess_reset” for easier operation.
So I created a small utility that clears the cache after every four hours. Code Available here:
https://github.com/aliirz/YAFCacheCleaner
Its easy shneezy! Please not that this issue of cache not being cleared up is fixed in YAF version 1.9.6 BETA. But if you are using 1.9.5 Stable you will have to do it manually or show patience for it to clear automatically(trust me, takes a while). Otherwise you can also run the utility i mentioned above.
Hope its helpful 🙂
Setting up a Rails development environment on your PC – the easy way
Hi everyone today I am going to show you how to setup a Ruby on Rails development environment on your Windows PC as I like to call it the easy shneezy way:
Step 1. Head over to http://railsinstaller.org/
Step 2. Download the rails installer kit.
Step 3. Install the kit.
Step 4. Once installed a command prompt will open up for you to enter details for Git setup.
Step 5. Do a barrel roll!
Step 6. All set.
Rails installer is a complete kit that has all you need to start developing rails applications. It contains the following components:
- Ruby 1.9.2-p290
- Rails 3.1.1
- Bundler 1.0.18
- Git 1.7.6
- Sqlite 3.7.3
- TinyTDS 0.4.5
- SQL Server support 3.3.3
- DevKit
Once you are done,you will have a command prompt with ruby on rails in your start menu. Thats it! Now you have a complete ruby on rails dev environement setup on your PC.
Happy Coding.
Untitled
Its not who you are
Omg! Pokeman poem
Desktop within desktop
This happened yesterday. As you can see form the picture there is a skype screen share inside which is a virtual machine, inside which is a teamviewer access of a client.
We are calling this strange phenomena “The Welltime Effect”. Research is still going on as to what caused it 😛
Xyologic
UICheckBox Control – A checkbox control for iOS(obviously)
If you are an iOS developer you must’ve observed that Apple’s UIKit does not contain a control for a check-box and honestly that can be a pain. Yes, Yes I know you are awesome and you can somehow make it work by using the UISwitch but would it not be nice to have your very own checkbox control inside your app? I thought so too, so after some Googling and some reading I made this UICheckbox control(Unofficial but it sounds cooler with UI doesn’t it?)
Here is the code:
UICheckbox.h
#import <Foundation/Foundation.h>
@interface UICheckBox : UIButton {
BOOL checked;
}
@property (nonatomic, assign) BOOL checked;
-(IBAction)checkBoxClicked;
@end
UICheckbox.m
#import “UICheckBox.h”@implementation UICheckBox@synthesize checked;-(id)initWithFrame:(CGRect)frame{if(self == [super initWithFrame:frame]){self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;[self setImage:[UIImage imageNamed:@”checkbox_not_ticked.png”] forState:UIControlStateNormal];[self addTarget:self action:@selector(checkBoxClicked) forControlEvents:UIControlEventTouchUpInside];}return self;}-(IBAction)checkBoxClicked{if(self.checked == NO){self.checked = YES;[self setImage:[UIImage imageNamed:@”checkbox_ticked.png”] forState:UIControlStateNormal];}else{self.checked = NO;[self setImage:[UIImage imageNamed:@”checkbox_not_ticked.png”] forState:UIControlStateNormal];}}-(void) dealloc{[super dealloc];}@end
You can use any images you want to represent your checkbox(go ahead add some eye-candy). The images I used are uploaded below:
So you see how simple and flexible Cocoa is in allowing you to make your own UI elements. You can use this checkbox in your Custom UITableViewCell etc. Ciao!
HTML 5 and CSS3 – getting on with it Part 1

The world is changing and so is the Web. With HTML 5 a lot of new elements have been added to the Markup.
This series of posts are here to help us get to know what changes does HTML 5 bring to the game and how do we use and benefit from it. So lets get on with it. For part 1 of this series I am going to focus on the Semantic Tags which are absolutely basic parts of the HTML Document and explain the differences HTML 5 has brought to them:
The DocType Tag
Yes, its that strange piece of text on the top of a HTML Document and Developers like me have never been able to memorize it. We just copy paste it. This is what it looks like:
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
Now that’s hard to remember i know, so html 5 has made it easy for us:
<!DOCTYPE html>
The Header Tag
Yes, its a new tag in HTML 5. The specification describes it as “A group of introductory or navigational aid”. Normally this is how we used to create a header section:
<div id=”header”>
<h1>This is a header/h1>
</div>
HTML 5 has made this even simple, by introducing a header tag:
<header>
<h1This is the new header</h1>
</header>
The Nav Tag
Another new addition is a nav tag. This tag is described as “A section of the page that links to other pages on the site or to other sections of that particular page”. Now we all remember how we used to create a bunch of navigational links inside an unordered list:
<div id=”navigation”>
<ul>
<li>Home</li>
<li>About/li>
<li>Work</li>
<li>Shop</li>
<li>Contact</li>
</ul>
</div>
HTML 5 introduces a nav tag to make this job more easier and html markup more readable:
<nav>
<ul>
<li>Home</li>
<li>About/li>
<li>Work</li>
<li>Shop</li>
<li>Contact</li>
</ul>
</nav>
The Section Tag
Just like the newly added nav and header tags, the section tag is used to divide the content into sections. It is described as “A grouping of content based around a theme”. Now sections are equivalent to what we would make from a div to represent different sections of our website for example:
<div id=”acc-news”>
<h2>ACC Basketball
News</h2>
<h3>UNC Beats Duke in
Champsionship Game!</h3>
<p>The Blue Devils are routed
by the Tarheels at Cameron
Indoor Stadium.</p>
</div>
So HTML 5 gives us a new tag to more conveniently organize the above markup:
<section>
<header>
<h1>ACC Basketball News</h1>
</header>
<h2>UNC Beats Duke in Championship Game!
</h2>
<p>The Blue Devils are routed by the Tarheels
at Cameron Indoor Stadium.</p>
</section>
The Article Tag
The Article tag can be used to divide the contents of a section in HTML 5. It is defined as “An independent, self-contained composition”. For example the markup in the previous heading can be re-written as:
<section>
<header>
<h1>ACC Basketball
News</h1>
</header>
<article>
<header>
<h1>UNC Beats Duke In
Championship Game!
</h1>
</header>
<p>The Blue Devils are
routed by the Tarheels at
Cameron Indoor
Stadium.</p>
</article>
</section>
Now there are some interesting things to note here. See how the header tag is inside a section. Yes, this means you can add as many header tags inside your markup as you like. As you can see we have the news inside an article. This gives you a rough idea about how the article tags are used.
The Aside Tag
The aside tag is described as “Content related to an article but not critical to its understanding”. The content inside the aside tag could be just some meta-data, some text thats not really important enough, example:
<article>
<header>
<h1>UNC Beats Duke In
Championship Game</h1>
</header>
<p>The Blue Devils are routed by
the Tarheels at Cameron Indoor
Stadium.</p>
<aside>
<p>Former Duke Players Cry at
Game’s End</p>
</aside>
</article>
The Footer Tag
Just like the header tag, the footer tag is used at the end of a section. Its a special tag for what we would normally create from a div at the bottom of our web page. It is described as “Includes information that closes out a particular section.” We used to make a footer this way:
<div id=”footer”>
<h3>Talk to Me Goose</h3>
<p>© 2011 Maverick &
Goose Ventures.</p>
</div>
And now with HTML 5:
<footer>
<h3>Talk to Me Goose</h3>
<p>© 2011 Maverick &
Goose Ventures.</p>
</footer>
You see, how easy and fun HTML 5 is. Offcourse there are some compatibility issues(same old story) I will be back with more posts on that, we will look at the canvas tag and finally some CSS3. Until then take care y’all I hope this post is helpful.





