If you want to make a promise to someone, there is a new website that might help you send your promise/message across in a way that your loved ones will remember and can actually keep with them.
The website is called Bank of Promises.
Here is a brief from the site itself :-
About the Bank :-
The Bank of Promises allows you to send an alternative to, and hybrid of, a greeting card (birthday, Christmas, Valentines etc) and a gift – it’s a card with a Promise Note included.
About the Note:-
The Promise Notes are a similar size, and have a similar look and feel, to bank notes but instead of stating “One Pound”, they state “One Promise”. Each Promise Note is printed with a unique serial number so that no two are ever alike.
And for those who are interested, yes, I have been involved in developing this website and I have thoroughly enjoyed working on it. This is basically a phase 1 of a much larger plan but for now, its out there and ready for people to send out promises to each other. Please feel free to spread the word across.
Although Search engine Spiders are a good thing (e.g. GoogleBot, YahooSlurp etc) as if they dont spider your website, you will probably not appear on search results, but at the same time, they also cause a lot of un-necessary management to be done on the developer side of things. Here are a few of the things I have noticed :-
1) They cause a lot of un-necessary active sessions created on the server if you have session management turned on (which most sites do).
2) There is a growing number of bots and its really hard to tell which ones to block and which ones not.
3) You do want the major search engines to spider you but you don’t necessarily want every search engine to spider you and it becomes hard to maintain this list (for a developer).
Apart form the above, another major problem is when someone intentionally tries to download/crawl your website using a custom written script or using a site downloader and in this case, the Browser/Referrer is mostly spoofed as someting they are not. These crawlers most probably do not even respect the existence of a robots.txt file.
My question is, apart from checking the name of the bot and restricting their session to like a few seconds , what other checks do people put in place to solve these hurdles ?
I had to re-install ColdFusion 9 on my MacOS today and having installed CF approx. a million times before, I thought it would only take few minutes.
Here is what I did :-
1) Went to /Applications/ -> Moved existing “ColdFusion 9″ folder to Trash.
2) Ran the CF Installer and everything went well. But finally, the installer got stuck at “Installing WebServer Connectors” – I waited a few minutes but then gave up.
3) Repeat Steps 1 and 2.
4) I then decided to try the installation with the in-built webserver. That worked, but I could not load any pages at all in browser. Basically, Apache was not working.
5) I opened Terminal. Ran the command “sudo apachectl start” – It says “Already running”. At this point, I was wondering whats wrong.
6) Ran the command “sudo apachectl restart” and it appeared as if it got restarted. No changes.
7) Did some Search and ran this command. “sudo apachectl configtest” to make sure the Apache config was fine. Turns out it was throwing this error.
httpd: Syntax error on line 241 of /private/etc/apache2/httpd.conf: /private/etc/apache2/httpd.conf:241: <Files> was not closed.
I think this surely must have been done by the CF Installer. I opened the httpd.conf file and sure enough, it was broken.
<Files "rsrc">
Order allow,deny
Deny from all
Satisfy All
<DirectoryMatch ".*\.\.namedfork">
Order allow,deny
Deny from all
Satisfy All
</DirectoryMatch>
Once I fixed this by closing the </Files> tag, Apache and CF both started working again.
Anyone else seen this before? I have seen this first time and its hard to believe that CF Installer actually messes up the Apache Config file.
I have been using jQuery tabs in several places in one of my websites. And most of the tabs I have are setup as AJAX tabs. ie they are fetching data only when they are clicked on. This has been working fine in all other browsers except in IE8. IE8 doesnt show the latest content within a tab. If I go and delete a data row or add a data row, IE8 will keep on showing the old dataset. At first, I thought, this must be a case of telling IE8 not to cache anything. So, I added the following 2 meta tags in the page.
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
I thought that should fix it, but it didn’t. I was still having the same issues. I then started looking into jQuery docs to see if some attribute I could use. Sure enough, there is a “cache:false” option you can pass in on your tabs. So, I did this next.
$("#tabs").tabs({
cache:false
,spinner: ''
});
Unfortunately, that didnt solve it as well. Then, my last option was to just add some random number to the URL so IE8 identifies it as a different URL and gets new data. So, I did this :-
<li><a href="url/rows?randomseed=<cfoutput>#randrange(1,10000)#</cfoutput>" id="favorites"><span>Favorites</span></a></li>
And that solved my issue. So, I guess jQuery cache:false is not doing something right here.
I just wanted to share my experience here and see if anyone has any different thoughts.
I was assigned a task, recently, whereby I was given a list of about 100 domain names and I had to create all those websites on a fresh installation of IIS 6.0. Naturally, I started looking for some kind of tool that would do this for me. After spending some time on search and asking a few people, I realized , there is no such tool (correct me if I am wrong here).
So, I thought of writing a little ColdFusion script that would do this for me. Turns out it wasnt that bad at all and it worked like a charm. More »
If you are a Flex developer, you would have come across this issue several times. If you are using the <mx:Label> control and the size of your text is bigger than the size of the container, you will see a cut off version of the text because by default, the Label control does not allow multiline text.
So, here is what I wrote quickly to achieve this functionality.
package components
{
import mx.core.UITextField;
import flash.text.TextFieldAutoSize;
import mx.controls.Label;
import flash.display.DisplayObject;
public class MultiLineLabel extends Label
{
override protected function createChildren() : void
{
// Create a UITextField to display the label.
if (!textField)
{
textField = new UITextField();
textField.styleName = this;
addChild(DisplayObject(textField));
}
super.createChildren();
textField.multiline = true;
textField.wordWrap = true;
textField.autoSize = TextFieldAutoSize.LEFT;
}
}
}
The code overrides the createChildren() method and creates a new instance of UITextField which has multiline and wordwrap turned on.
I had been using the super jQuery Validator plugin in one of my projects. And everything was working fine, except in IE8. Isnt that typical of IE? Anyways, the problem was that I was using the validator plugin quite heavily and one of the forms simply refused to work in IE8. I did not try in IE6 but I would assume the problem would be the same in IE6 as well. I tried all kinds of things, like validating my Javascript code and going over it line by line and making sure there are no bugs that I missed.
None of that worked. After about a million WTF’s and approx. 6.5 hours of time wasted, I found this out. http://www.seodenver.com/jquery-validator-annoyances/
The solution is to use jquery.validator.min.js instead of jquery.validator.pack.js (which I was using). As soon as I changed the .pack.js file to .min.js file, everything started working. I would think its something to do with the the encoding of the JS etc. But I am glad I found the solution, finally.
I just wanted to blog about it so someone else can save some time with this little tip.
I was working on a client’s server, in the process of making a site live. I restored the database from a test version of the database and copied over the codebase. Everthing was exactly the same as the test site. Still, all the date related queries were throwing this error.
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
I tried looking at my code, I tried running the same query in Query Analyzer (which was not throwing errors) and I tried setting the database DATEFORMAT to dmy. But none of the above fixed the code. It got a bit frustrating when suddenly it struck to me that the only difference in the 2 databases is the SQL user that I created for live database. So I compare the 2 users’ properties. and sure enough, one of them had the default Language as ‘English’ and the other one had ‘British English’ . So, changing the default language for the SQL user solved my problem.
A very small fix but took me about 3 hours to figure this one out. I hope it helps someone out.
If you are using Flex and want to have a TabBar control that aligns vertically instead of the default “horizontal” behaviour , then you can simply use the “direction” property on the control and make it vertical. You can see an example of that below . Notice how the tabs are now vertically aligned but the borders are still on top, left and right. And see how the cornerradius is still on the top left and top right corners. More »
I came across a nice tip while reading this article. If you want to get the number of rows in a table , you would normally do a select count(*) from tbl query, which does a table scan and can be a little time consuming query if the table has millions of rows.
This little query gives you all the counts for every table in your database, pretty quickly and instantly. More »