Clean your SQL Server database!
Here are some lines of code that can help clean your database from test data so you can start over with a fresh canvas. /* Disable constraints and triggers (if any) */ exec sp_MSforeachtable ‘ALTER TABLE ? NOCHECK CONSTRAINT ALL’ exec sp_MSforeachtable ‘ALTER TABLE ? DISABLE TRIGGER ALL’ /*Perform delete operation on all table for [...]
Unable to cast object of type ‘ Issue
I came across this error: System.InvalidCastException: Unable to cast object of type ‘<TakeIterator>d__3a`1[Class]‘ to type ‘System.Collections.Generic.List`1[Class]‘. This occured when trying to use the Take extension (list.Take(n)) from a generic list of objects. The problem is when you use the Take extension, it returns a new sequence ( IEnumerable). I got around this issue by using: [...]
www.checkoutchristchurch.co.nz live!
www.checkoutchristchurch.co.nz is now live! this site loads in my personal photos of christchurch from flickr and loads in my tweets + all tweets that have the keyword “christchurch”. It uses jquery for scrolling through the thumbnails using your mouse wheel and various jquery plugins for twitter and flickr. Check it out! List of JQuer plugins [...]
JFactory::getDate() doesn’t automatically add offset
By default, calling JFactory::getDate() doesn’t automatically apply the timezone offset. The default date/time is GMT. By using the following code, you can set the offset from the global joomla configuration file <?php $thisJApp = &JFactory::getApplication(); $thisJDate = JFactory::getDate(); $thisJDate ->setOffset($thisJApp ->getCfg(‘offset’)); echo $thisJDate->toFormat(“%A %d %b %Y”); ?> If you want to set the date from [...]


