Archive

Archive for January, 2009

How to create gtalk bot?

January 15, 2009 ppshein Leave a comment

I’m cool today that I can create my own gtalk bot with Coldfusion and PHP. It’s kinda easy that you don’t effort to do much of coding and.

Go this site: http://www.imified.com/

And create one account and following the steps they mention.

Categories: Uncategorized Tags: ,

IIS status Code

January 14, 2009 ppshein Leave a comment

If you’re being web-developer using Microsoft platform, you must know the status code of IIS. Here you go.

http://support.microsoft.com/kb/318380/

Categories: Informations Tags: ,

ASP.NET ajaxtoolkit control

January 12, 2009 ppshein Leave a comment

I thought, asp.net is complicated to implement for web feature with ajax technology. When I visited one website showing about ASP.NET ajax control, what I thought is quite funny. Because we can implement all what we want in Web development with ASP.NET AjaxToolKit.

You can learn how to use this toolkit in this website.

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/

Categories: ASP.NET #C, Ajax Tags: ,

press enter key to form submit

January 6, 2009 ppshein Leave a comment

I’m now writing Dictionary program, based on Web2.0 with Asp.net. In asp.net, we gotta use these asp.net control which support us more performance to SQL and performance. But, to control these are really complicated and it gives serveral times to manage to control.

In our project, there is only one input textbox in welcome page. At first, whenever user type one word in this and press Enter Key, I want to run click even of “search” button. But, whenever I type word and press enter, it cannot run click event of search button. So, I was out of shape of this one day. Today, I keep on searching and then I got it now. Here is solution for this problem.

Coding for welcome.aspx

<form defaultbutton=”button1″ runat=”server”>
<asp:textbox id=”textbox1″ runat=”server”/>
<asp:button id=”button1″ text=”Button1″ runat=”server”/>
</form>

Coding for welcome.aspx.cs

TextBox1.Attributes.Add(“onkeydown”, “if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById(‘”+Button1.UniqueID+”‘).click();return false;}} else {return true}; “);

Best Credit to : http://www.beansoftware.com/asp.net-tutorials/accept-enter-key.aspx

Generate RSS Feed with ColdFusion MX

January 1, 2009 ppshein Leave a comment

Do you know how to generate RSS Feed with ColdFusion MX? If you don’t know well about CFMX, it might be complicated and fussy. But you little know about XML technology, it’s quite simple.

First of all, you need to put this, <cfsetting enablecfoutputonly=“yes”> at the top of the page. After that, output your query just like

<CFQUERY NAME=”RssQry” datasource=”MyDSN”>
SELECT *
FROM    RssTable
WHERE  Rss_status = <cfqueryparam cfsqltype=”CF_SQL_INTEGER” null=”no” value=”1″>
ORDER   BY Rss_id
</CFQUERY>

<cfsavecontent variable=”theXML”>
<cfoutput><?xml version=”1.0″ encoding=”ISO-8859-1″ ?>
<rss version=”2.0″>
<channel>
<title>RSS</title>
<link>http://www.rss.com</link>
<description>This is Description</description>
<language>en-us</language>
<copyright>Copyright — .</copyright>
<docs>http://—–.com/rss/</docs>
<lastBuildDate>#dateformat(now(), “ddd, dd mmm yyyy”)# #timeformat(now(), “HH:mm:ss”)# EST</lastBuildDate>
</cfoutput>

<cfloop from=”1″ to=”#RssQry.RecordCount#” index=”ctr”>
<cfscript>
title = replace(RssQry.Rss_title[ctr], “<”, “&lt;”, “ALL”);
description = replace(RssQry.Rss_description[ctr], “<”, “&lt;”, “ALL”);
description = replace(description, “&”, “&amp;”, “ALL”);
description = replace(description, ‘”‘, “‘”, “ALL”);
date = dateformat(RssQry.Rss_posted_date[ctr], “ddd, dd mmm yyyy”);
time = timeformat(RssQry.Rss_posted_date[ctr], “HH:mm:ss”) & ” EST”;
author = replace(RssQry.Rss_author[ctr], “<”, “&lt;”, “ALL”);
author_email = replace(RssQry.Rss_author_email[ctr], “at>”, “@”, “ALL”);
author_email = replace(author_email, “<”, “&lt;”, “ALL”);
</cfscript>

<cfoutput>
<item>
<title>#title#</title>
<description>#description#</description>
<link>http://tutorial#RssQry.Rss_id[ctr]#.easycfm.com</link>
<author>#author_email# (#author#)</author>
<pubDate>#date# #time#</pubDate>
</item>
</cfoutput>
</cfloop>
<cfoutput>
</channel>
</rss>
</cfoutput>
</cfsavecontent>

Categories: coldfusion Tags: ,