Archive
.NET C# Cheatsheet
CodeIgniter 2.0.1 Undefined property core/Model.php
If you upgraded to CodeIgniter 2.0.1 from 1.7.2 you might encounter on some pages the following error:
A PHP Error was encountered Severity: NoticeMessage: Undefined property: MyStats::$db Filename: core/Model.php Line Number: 50
This is easily fixed by editing the Model.php file in the system directory.
Form not submitted when pressing enter in input box
To keep things clean it’s a great idea to make a common button style that can be reused across your site. But already there is a problem if you try to style an html submit button, that styled button can only be used within an html form which might not fit all your scenarios.
Therefore a common way around that is to instead style an anchor tag which can be used in any context. Although this is great for style reuse it creates problems such as the default html form submit behavior to dissapear and the need of some extra javascript actions to submit the form action. Such behavior as hitting enter from an input box usually submits the form but if no submit button is present in the form it won’t get submitted.
Making an image seamlessly title in both x and y axis
When web designing it is quite common to require a picture to seamlessly tile in the x or y direction. The CSS feature repeat-x repeat-y could then be used on such image. This would allow for instance to have a reasonably small background image fill the entire background of the browser region as it repeats with no apparent seam.
This is easily achieved with the Adobe Photoshop Offset Feature.

