A Southwestern adventurer striking out into the badlands of the Midwest for fun, profit, and for a wife who wouldn't move back to the Southwest :)
Thursday, December 31, 2009
Photoshop Tutorial: Glowing Lines
Luminescent Lines | Tutorials Palace
Javascript Transition Library
transm.js (javascript programmable image transitions)
Tuesday, December 29, 2009
Operation Weezy F. Baby. | Funniest Video of the Day
Saturday, December 26, 2009
Metaplace Goes Under
It looks like metaplace.com, which conceptually SHOULD have been successful, is shifting gears (going under). It is a shame, I think the 2.5D Flash environment has potential, but in a world of triple A shooters a cartoon big headed avatar Flash environment I think failed to capture content creators which spells death for metaplace's current model.
Oh well, sometimes you step up to the plate, swing, and strike out. I wish a prosperous future to the folks at metaplace, no harm in failing as long as they pick themselves up, brush off, learn, and move forward.
Monday, December 21, 2009
Coda Obscura: Source Safe Messes with your WCF Services in Silverlight (And Probably Elsewhere)
Tips & Tricks: Object reference not set to an instance of an object when creating Silverlight-Enabled WCF Service
Friday, December 18, 2009
Thursday, December 17, 2009
Missing Enum.GetValues() when doing Silverlight for instance ? - Blog'A'Little
Missing Enum.GetValues() when doing Silverlight for instance ? - Blog'A'Little
If you name your class something like myclass.shared.cs and remember to put the partial keyword infront of the class you can declare this class in your web project and it will be shared with your silverlight project (if using the business or similar tempate, which breaks things up in a silverlight and a web project. Remember to include the folling namespaces at the top of the class.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
Have fun.
Wednesday, December 16, 2009
WCF RIA Services Update bug? : The Official Microsoft Silverlight Site
WCF RIA Services Update bug? : The Official Microsoft Silverlight Site
Tuesday, December 15, 2009
Silverlight DataSet
Laskarzhevsky Software Inc
TranslateThis Button: Copy+Paste translation for 52 languages
TranslateThis Button: Copy+Paste translation for 52 languages
jSnow jQuery Plugin
Monday, December 14, 2009
Silverlight and RIA: Ignoring a Property in Your Business Object - Deborah's Developer MindScape
My XAP file is 5 Mb size, is that bad?
dygraphs JavaScript Visualization Library
Wednesday, December 09, 2009
Great Into Silverlight RIA Services Video
Currently Watching : The Official Microsoft Silverlight Site
Friday, December 04, 2009
Kind of a Cool Star Wars Fan Remake
Star Wars: IMPS the Relentless from Darth Anonymous on Vimeo.
The crew has Chapter 2 up which is just as good if not better. For more go here-
http://impstherelentless.com/
Thursday, December 03, 2009
WCF and Silverlight
MSDN Switzerland Blog
Wednesday, December 02, 2009
CommonJS effort sets JavaScript on path for world domination
CommonJS effort sets JavaScript on path for world domination
Tuesday, December 01, 2009
Photoshop Tip: CS3 and CS4 Get Rid of the Hide/Show All Menu Items
Remove “Show all Menu Items” From Photoshop CS4 « Chris Koerner
Thanks Chris!
Monday, November 23, 2009
JavaScript - Find position
function Scroll2Pos(cID)
{
var obj = document.getElementById(cID);
var curtop = 0;
if (obj.offsetParent)
{
do
{
curtop += obj.offsetTop;
}
while (obj = obj.offsetParent);
window.scrollTo(0, curtop);
}
}
It is based on this.
JavaScript - Find position
Friday, November 20, 2009
Military Video System is Like YouTube With Artillery | Danger Room | Wired.com
Military Video System is Like YouTube With Artillery | Danger Room | Wired.com
Thursday, November 05, 2009
Unit Testing: When You Should and When You Shouldn't
This article provides a much needed balancing perspective-
http://blog.codeville.net/2009/11/04/selective-unit-testing-costs-and-benefits/
Hat Tip: Elijah Manor
Wednesday, October 28, 2009
Basic: RSS Feeds
http://net.tutsplus.com/tutorials/other/feeds-101/
Military Technology: 30 Day Drone
http://www.wired.com/dangerroom/2009/10/30-days-no-landing-darpa-aims-for-drone-endurance-record/
Wednesday, October 07, 2009
UFO? Drone? Freak Natural Occurance
Link
Watch the embedded video. It will make you go...huh...
Saturday, September 19, 2009
Excellent Form Validation Plugin for jQuery: Vanadium
http://vanadiumjs.com/
Here is some sample syntax. Say you wanted to verify that a user entered in at least four characters in a textbox.
<input class=":max_length;4" type="text">
Vanadium uses the class HTML attribute to set the validation rule. Many rules are supported.
Wednesday, August 26, 2009
Forget your iPod or MP3 Player? Fear Not, The Grooveshark is Here
http://www.grooveshark.com
I found some tunes on the shark that I couldn't find on Amazon. Pretty cool. Use and abuse before the site goes offline.
Monday, August 24, 2009
Windows 7: First Impressions
I pretty much could care less about graphical UI (kinda Office 2007 ribbon-ish), but under the hood Windows 7 appears to run very fast even on older machines.
I'm digging my old computer with Windows 7. I've got a bunch of older 3D software programs that I'd like to try out on this laptop to see how they run. I will post results as they arise.
So far, if you can get Windows 7, I'd say install it.
FYI, the specs of my older laptop if interested.
* 3.2 Gig p4 w Hyper Threading
* 64 Meg ATI 9600 Video Card
* 1 Gig of Memory
* 80 Gig HD
So far the laptop seems very responsive with Windows 7. Good job Microsoft.
Thursday, August 20, 2009
Open Source Non MS Tech
http://www.inanis.net/blog/
I am blown away. With my experience with Word Press, you pretty much can add a theme and get it working in a few minutes. Not so with many MS tech open source projects out there. You will encounter some sort of obscure configuration detail that needs to be worked out, and waste time messing with arcana obscura to get things up and running.
Look what folks have done with "crappy" PHP and MySQL.
Makes me wonder.
Wednesday, August 05, 2009
Winamp Music Tip: Stream Those MP3's
That doesn't work for me. I've got so many web browser windows open I often times accidental close the one streaming music, and even if I am careful and don't I have to think about why the window is open and remember not to close it, which I don't like.
Downloading the whole MP3 sometimes isn't practical (i.e. a four hour show MP3).
So I remembered a solution to this problem from my audio editing days.
1) Copy the link to the actual download version of the MP3 file.
2) Open a text editor like notepad, paste the link, and save the file with an m3u extension, like "someradioshow.m3u".
3) Now click on the m3u file. If you have Winamp installed, it will begin to stream the mp3 file instead of download it. Cool huh?
Now we have our music app streaming, and web browser windows can open and close without hassle.
Tuesday, August 04, 2009
I Might Have To Get One Of These
http://www.edge-online.com/news/apple-tablet-computer-to-double-as-a-game-console-analyst
I might have to get me one of these, and apparently, Bill Gates agrees (he was just a little early in agreement, perhaps).
http://gizmodo.com/5324866/vintage-bill-gates-predicts-tablets-to-be-the-most-popular-form-of-pc-sold-in-america
I might have to shift more time over to Unity 3D and Object-C development . I think Microsoft has made a few epic screw ups (Vista anyone?). One is they are listening to nerds as to what new features to offer rather then rank and file programmers. Coding on the MS stack is becoming too top heavy, maybe Unity 3D dev and Object-C will be a welcome breath of development fresh air, and a little competition will force MS to listen to everyone who uses their products rather than just enterprise developing geeks. No I'm not bitter!
Serious though, always remember there are no good guys. Apple sells crap hardware, so make sure you get those extended warranties. MS treats their development community well, but you pay a premium for their products that as time goes by, and open source stuff becomes better and better, I'm not sure is warranted. Linux is the only psuedo good guy out there, but since you can use many open source Linux apps on Mac's, might as well cough up a little extra cash for the Apple wow factor and mailine product (like Photoshop and 3D Packages) support.
Wake up MS, time to truely innovate, and innovate where the consumer can see the change, not the nerd army of developers behind the scenes. Bill understands, but he is taking more of a back seat now. Wow us Balmber, before MS becomes the next depreciated giant that rages on without knowing it is dead...
Monday, August 03, 2009
Tip: When/How Your Microsoft User Password
So just a tip. Change your domain password at the end of the day, or change it and log off and log back on. If you are like me and have a ton of stuff open, the former is better then the later.
Wednesday, July 29, 2009
The Power of Twitter
Well, for those of you who like to ignore this trend and the tools of self promotion, here is a cautionary tale of what can happen if you at least don't understand the new medium. The me generation has the tools to punish you if act like an @ss.
http://advanced-twitter-marketing.com/advanced-twitter-marketing/offline-businesses-beware-twitter-is-watching
Also as a side note, this article reveals how Google's search absolutely blows the competition away. I know M$ is trying hard to catch Google with Bing and Yahoo search, good luck :) The following quote is telling-
"All this - and Pete just posted the information THIS MORNING… Already a search for the headline, “Woman Sued for $50,000 Over a Tweet”, shows how viral this type of issue is: searching at Google shows 5,000 references to the article, searching at Yahoo! shows 6 results, and searching at Bing shows 34 results."
Source: (twitter) mparent77772
Wednesday, July 22, 2009
Old Man Grumblings
I digress.
I guess my point is summed up here.
http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25748
I might have blogged about this before, but I keep coming back to this, as it never gets old to me.
Monday, July 20, 2009
Not Digging Telerik
[Update] Someone from Telerik contacted me willing to help us out with our issue. That says a lot for Telerik and restores a good chunk of my faith in their controls and their support.
I like Telerik. They have produced some very cool controls to use with ASP.Net. Unfortunately the 2009 Q1 release broke all our controls at work. We normally inherit off of the Telerik controls and add some additional functionality. Whatever changes happened under the hood makes the Q1 + releases useless to us.
My job is to figure out a solution. So far no luck. Telerik says they don't support inheritance issues. Wish we would have known that earlier, or at least known to expect that existing working code will not be guaranteed to work in the future as is.
Sucks. Use this as a warning against becoming too dependant on 3rd party controls, as you can and will get burned.
Monday, July 13, 2009
70-536 Exam Prep
http://en.csharp-online.net/MSDN_Reference_Guide_for_Exam_70-536
Also, the Microsoft training books for the exam, though useful, are riddle with errors. Just an FYI.
Saturday, July 11, 2009
SQL Server Express And Abyss Web Server
First, I moved the database from the app_data folder in the web project to somewhere else, probably not necessary but I thought it might help. I also attached to the database using sql server express studio and created a new login name that was different then the one I used on my dev box (did this both for global security users and then added the new user to the instance of the db...again may not be necessary).
From there I himmed and hawed until I came up with a connection string that works. Here it is roughly. Sql server express was installed in a named instance like this-
devbox\sqldev
So my connection string ended in my web.config file for my asp.net project ended up like this.
<add name="somename" connectionString="Data Source=.\sqldev;AttachDbFilename=D:\data\test.mdf;Initial Catalog=reports;User Id=someid;Password=somepassword;user instance=true;Integrated Security=SSPI" />
Hope that helps someone else at least get going.
Wednesday, July 08, 2009
Infocyde!!!
Well, I decided that all these stared links were pilling up, so I went about trying to unstar them, parsing the info and putting it into some useful state either in my brain or an Evernote notebook.
Well, it took pretty much a good chunk of the day, just to get through LAST MONTH's stared items. There is just no way I can process all the data, and as we have learned throughout history (using intelligence and wars as an example) data not processed is absolutely useless, and the time spent gathering it data that wasn't processed is essentially another definition of absolute waste.
So, I'm pondering going to a once a week RSS feed check, and really being selective about what gets stared, and hopefully processing data right then into info. I don't know if I can do this or not because I'm so addicted to real time info, but I really should, for a lot of reasons.
And I bet I'm not the only one out there who has a problem with this. So here are my rules.
1) Can I find this data relatively easily in the future? Yes->Ignore the data.
2) Am I at work? Yes->Star the data for later.
No->Process it (save/copy/bookmark) now.
That should cut down on the info glut. I'm trying to turn myself into a search engine, and that probably isn't helpful productivity wise.
Monday, July 06, 2009
We Lost An Interesting Person This Last Week
I was very much on the same page (or like to think so) with Keel's views about UFO's, Ghost, Faeries, etc... all really being the same phenomena, and that phenomena isn't extraterrestrial, but ultraterrestrial. Keel, though not a Christian, declared on several occasions that he wasn't really a "UFO-ologist", but a "demonologist" because he recognized the phenomena for what it really is. He, independent of a religion paradigm, came to the same conclusions I have and many others have about UFO's being something other and more complex then little green men from space or hicks out in the back woods who drank too much.
I admired Keel, as I admire anyone, who looks around the world and realizes (or really admits to themselves) that there is more then meets the eye as to what is going on in this fascinating realm we call existence. I admire his courage and the intellectual honesty to peer at the things that "don't make sense" if the world is exclusively a by product of random mutation.
Here is a pretty good article on Keel and his impact on the Fortean community.
http://www.cryptomundo.com/cryptozoo-news/keel-obit/
I hope that Keel's journey lead him ultimately to Jesus, and that now John A. Keel is in peace.
Thursday, July 02, 2009
VS 2008 and PHP
Well then check the following link out-
http://www.php-compiler.net/doku.php?id=core%3aphp-in-vs2008
Have fun!
Wednesday, June 24, 2009
Microsoft BizSpark
Special thanks to AZ Groups and Scott Cate for helping me get started. Scott Cate rocks. And thanks to Microsoft for their willingness to help incubate start ups.
www.mykb.com
www.azgroups.com
www.microsoft.com/bizspark/
I still have and love my day job, so I will proudly serve my employer as long as my job holds out. So I'll only be a part timer at the new gig, but with two or three other developers also working part time, I think we will roll something out quickly. If anyone has some spare computers laying around, I'd love to take 'em off your hands.
And I've been praying about some direction, this opportunity just fell in my lap, so be sure that God answers prayers in Jesus's name. (I know, that makes me strange I guess, but it is true).
Monday, June 15, 2009
My HelloWorld LINQ Example
string[] s = { "test", "hello world", "mamma", "zack", "aaa","xxx" };
// LINQ
var subset = from z in s where z != "hello world"
orderby z descending select z;
int i = 0;
foreach (var l in subset)
{
Response.Write("Item " + i.ToString() + " = " + l + "<br />");
i++;
}
Sunday, June 14, 2009
What is Hot Right Now In The Job Market
Java: 8052 jobs
.Net: 4927 jobs
PHP: 1454 jobs
ASP.Net: 2324 jobs
Flex: 796 jobs
Flash 1081 jobs
test driven development: 2295 jobs
MVC: 520 jobs
Silverlight: 262 jobs
Design Patterns: 1368 jobs
Agile: 2221 jobs
SQL Server: 7285 jobs
MySQL: 1479 jobs
c#: 4014 jobs
Visual Basic: 895 jobs
VB: 1964 jobs
Javascript: 3589 jobs
jQuery: 314 jobs
AJAX: 2011 jobs
Photoshop: 646 jobs
Ruby on Rails: 257 jobs
Python: 1023 jobs
Maya: 19 jobs
3D Max: 13 jobs
Unity 3D: 1 job
A few surprises, I expected to see a lot more Flex and Silverlight jobs. Apparently Java is far from dead, despite what many bloggers have espoused. SQL Server DBA's are in high demand as well. Python also looks pretty strong where Ruby on Rails still looks over hyped in the blogosphere compared to demand.
Wednesday, June 10, 2009
Great AJAX jQuery ASP.Net Article
http://www.mikesdotnetting.com/Article.aspx?ArticleID=104
Enabling GZip on IIS7
http://cfsilence.com/blog/client/index.cfm/2009/6/10/Enabling-GZip-Encoding-On-IIS7
Saturday, June 06, 2009
Cool Javascript Visualization Library
http://thejit.org/demos/
Source: Web Resources Depot
Thursday, June 04, 2009
Another jQuery UI Plugin Set
http://flowplayer.org/tools/demos/index.html
Source: http://www.danvega.org/blog/
Adding CSS Links On The Fly In C#
void AddSmallGridCSS ()
{
HtmlLink link = new HtmlLink ();
link.Href = "~/App_Themes/" + Page.Theme + "/mystylesheet.css";
link.Attributes.Add ( "type", "text/css" );
link.Attributes.Add ( "rel", "stylesheet" );
Page.Header.Controls.Add ( link );
}
You don't have to use app themes, the file can be in any directory.
Tuesday, June 02, 2009
Noteworthy: First Graduate of a Virtual Institution

Meet Julie Shannon, Texas State Technical College’s virtual college in Second Life first grad. Pretty amazing.
Source: Dusan Writer's Metaverse
Monday, June 01, 2009
Coffee Plantation in downtown Tempe to close Saturday

Coffee Plantation in downtown Tempe to close Saturday
Shared via AddThis
Friday, May 29, 2009
Just So I Don't Forget...Force IE8->IE7 Rendering
Monday, May 25, 2009
jQuery Thickbox Alternative: TinyBox
http://www.leigeber.com/2009/05/javascript-popup-box/
jQuery Ribbon Plugin
Friday, May 22, 2009
jQuery Plugin: Fancy Gestures Mouse Recognition
http://anantgarg.com/2009/05/21/jquery-fancy-gestures/
Thursday, May 21, 2009
MS SQL 2008 Developer Training Kit
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=e9c68e1b-1e0e-4299-b498-6ab3ca72a6d7
Source: Pinal Dave
New Marque jQuery Plugin
Monday, May 18, 2009
Cool jQuery Masked Input Plugin
http://digitalbush.com/projects/masked-input-plugin/
Source: Link
Friday, May 15, 2009
Sad Loss, 60 Year Old Major Killed In Iraq
http://www.chron.com/disp/story.mpl/ap/top/national/6424905.html
Thursday, May 14, 2009
The Magic Footer
1) Frack older browsers, and do it the easy way,
2) Or two, do a minimal CSS hack so you can support IE6 and older versions of Safari.
So here is some reinvent the wheel code. For number one, you just need a bit of CSS.
.footer{ width:100%; height:50px; position:fixed; bottom:0px; z-index:1000;}
then on your page, <div id="footer" >
done.
For step two, try this approach.
CSS bottom footer by MJT, or google fixed footer.
Proud Ship Leaves the Fleet
http://nosint.blogspot.com/2009/05/carrier-kitty-hawk-leaves-active-fleet.html
Tuesday, May 12, 2009
Vista Built-In Unzip Sucks
Sad End of An Era
I guess the site creator, Shane, had been struggling to keep the site going for a long time. I think it was causing him to go broke and he wasn't getting enough donations to keep the station going. RR's passing is a true loss, but on to bigger and better things to the site's creator Shane.
www.reignradio.com.
Sunday, May 10, 2009
Star Trek, Generation ?
8.7/out of 9 Stars. Go see it.
Friday, May 08, 2009
Monday, May 04, 2009
One Note: I Get It Now
- Copy paste from web sites code examples
- Makes all your content searchable
- Has an interface to automatically post things to external blogs
- Is easily Organizable.
I'm occassionally hunting through favorites/bookmarks wondering where that could I saw was at, while my developer co-worker just types in a few keywords in One Note and all the info is at his finger tips. Plus he puts all the locations of servers, company procedures, personal info, etc... all in One Note, so he really does have one spot to look for things.
I haven't fully explored One Note, but so far I like it. And if Office 2007 is a little to big a purchase for your wallet, try Ever Note. I haven't used it, but I hear it is almost as good, and it is free or low cost.
Evernote.com
Executing a Console App from ASP.Net
// path to the console app
string sPath = Server.MapPath("~/apps/GoogleTranslationConsole.exe");
// pass your path, and your arguments array into a ProcessStartInfo
ProcessStartInfo proc = new ProcessStartInfo(sPath,Request.Form["lagr"]);
// Incase you want to read messages back from the code
proc.RedirectStandardOutput = true;
// hide any command windows from showing up
proc.UseShellExecute = false;
proc.CreateNoWindow = true;
// create the process that will control the console app
Process p = new Process();
p.StartInfo = proc;
p.Start();
// use console.writeline for data to return back.
// Also, be sure to either p.Dispose() of your process here or do
// do a System.Environment.Exit in your console app when work is done
//p.StandardOutput.ReadToEnd() for results.
Here is the original link that I got this info from, which is in VB.Net.
Opening a Console App in VB.Net
Note: I haven't deployed this code to production yet, I've only got it working on my local box. In a production environment you probably want to make sure that your console apps aren't accessible by the web, that your console app is secure enough so that it only does what is should do when it should do it, and that only the right people can execute it (thought for my purposes probably the IIS account will probably have permission to execute). Just something to watch for once you are to that point.
Tuesday, April 28, 2009
Ajax jQuery Chat Demo
Here is a simpler version with source code designed for Webmatrix/Razor/MVC3
[HERE]
I wanted to do a quick demo for a chat client similar to the one I see on gTalk and Facebook. Note in this demo I am polling, I use javascript to poll a server page for any new chat comments. This technique will work ok for small to mid sized trafficed web sites. For heavy trafficed sites, you probably need to do some sort of subscript/event model, maybe using a comet server (google). That technique is beyond me at this point, but here is a demo of the more basic polling technique that you can expand on.
The concept is pretty simple. You need three things.
1) The chat page (HTML and jQuery...or in my case an aspx and jQuery page).
2) A push page with which will accept your chat form post and save them to a database (for this example I'm using SQL Server 2008.
3) a pull page that will send new chat messages to the chat pages as they become available (actually not really sending, the chat script will continuously poll the page about every 2 seconds looking for new data to read).
Ok, our chat page will look like this- (remember to include a reference to your jQuery script somewhere, not shown).
<form id="form1" runat="server"> <div> <div style="width: 200px; height: 400px; border: solid 1px blue; overflow: auto" id="Chat_window"> </div> <br /> ID: <input type="text" style="width: 80px" id="ChatID" maxlength="10" /><br /> <input type="text" id="ChatMsg" style="width: 200px" maxlength="200" /> <a href="javascript:postit()">Post</a> <script type="text/javascript"> function postit() { clearInterval(ptime); var zpost = { "ChatID": $("#ChatID").val(), "ChatMsg": $("#ChatMsg").val() }; $("#Chat_window").prepend("<span>" + zpost.ChatID + ": " + zpost.ChatMsg + "<br /></span>"); $.post("push.aspx" , zpost , function(data) { pullit(); ptime = setInterval(pullit, 1500); }); } function pullit() { var url = "pull.aspx?t=" + eval(Math.floor(Math.random() * 90000)); $.post(url, function(data) { if (data == "") return; $("#Chat_window").prepend(data); while ($("#Chat_window").children().size() > 29) { $("#Chat_window").find("span:last-child").remove(); } }); } var ptime = setInterval(pullit, 1500); </script> </div> </form>
Ok, I know setting the ptime inline is bad form, but heh, it is just a demo. Some highlights. You have a postit and pullit method. The postit sends the ChatID and ChatMsg to the server as a form request. I'm adding some random query string var to the end of the pull.aspx page call to help prevent caching, this worked for me but you might have to tweak things a little bit more in your environment. The pullit method polls the the pull page about every 1.5 seconds for changes.
Now for the push it page. I'm using Asp.net, but you can accomplish the same thing in PHP or whatever.
public partial class push : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { SaveChatPost(); } void SaveChatPost() { using (SqlConnection oConn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myconnectionstringname"].ToString())) { using (SqlCommand oCmd = new SqlCommand()) { oCmd.CommandType = CommandType.Text; oCmd.CommandText = "declare @ts as datetime;set @ts = current_timestamp;Insert into HonoviMarketing.dbo.tChat (ChatTime, ChatId, ChatMsg) values (@ts,@p_ChatID, @p_ChatMsg);Select @ts as CurrentChatTime"; oCmd.Parameters.Add(new SqlParameter("@p_ChatID", Server.UrlDecode(Request.Form["ChatID"]))); oCmd.Parameters.Add(new SqlParameter("@p_ChatMsg", Server.UrlDecode(Request.Form["ChatMsg"]))); oConn.Open(); oCmd.Connection = oConn; using (SqlDataReader dr = oCmd.ExecuteReader()) { if (dr != null && dr.HasRows) { dr.Read(); Session["CurrentChatTime"] = dr["CurrentChatTime"].ToString(); Session["ChatID"] = Request.Form["ChatID"]; } } oConn.Close(); } } } }
No biggie here (and if the code runs off the page, just highlight and copy it, you'll get it all, stupid blogger :)). I save the post to the database, get a current_timestamp, and set that as well as the chosen ChatID into session variables that help with pulling the right data on the pull.aspx page, which is next. Note on both pages I put this logic in the code behind of the aspx page, and removed all the HTML from the front page except for the top asp.net directives line. And again, I'm just doing a simple example here, not worried to much about query security and the like, so don't get anal.
public partial class server : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { PullData(); } string XMLSafe(string s) { return s.Replace("&", "&").Replace("<", "<").Replace(">", ">"); } void PullData() { using (SqlConnection oConn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myconnectionstringname"].ToString())) { using (SqlCommand oCmd = new SqlCommand()) { oCmd.CommandType = CommandType.Text; oCmd.Connection = oConn; oConn.Open(); if (Session["CurrentChatTime"] == null) { oCmd.CommandText = "Select Current_Timestamp as CurrentChatTime"; using (SqlDataReader dr = oCmd.ExecuteReader()) { if (dr != null && dr.HasRows) { dr.Read(); Session["CurrentChatTime"] = dr["CurrentChatTime"].ToString(); } } } else { string sDate = Session["CurrentChatTime"].ToString(); SqlParameter p = new SqlParameter(); p.Direction = ParameterDirection.Input; p.Value = sDate; p.SqlDbType = SqlDbType.DateTime; p.ParameterName = "@p_CurrentTime"; oCmd.Parameters.Add(p); oCmd.CommandText = "select chatTime, ChatID, ChatMsg from HonoviMarketing.dbo.tChat where ChatTime > @p_CurrentTime and ChatID <> '" + Session["ChatID"] + "' order by ChatTime; SELECT CONVERT(varchar, current_timestamp, 21) as CurrentChatTime"; using (SqlDataReader dr = oCmd.ExecuteReader()) { if (dr.HasRows) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); while (dr.Read()) { sb.Append("<span>" + XMLSafe(dr["ChatID"].ToString()) + ": " + XMLSafe(dr["ChatMsg"].ToString()) + "<br /></span>"); } Response.Write(sb.ToString()); dr.NextResult(); if (dr.HasRows) { dr.Read(); Session["CurrentChatTime"] = dr["CurrentChatTime"].ToString(); } } } } oConn.Close(); } } } }
Again of note is that I'm using session vars to help pull just the latest message that is needed. One gotcha that I encountered with SQL server to be aware of is that you need to format the current_timestamp else you loose the milliseconds, which was causing the chat page to sometime receive double messages. You need to format in your query like so - SELECT CONVERT(varchar, current_timestamp, 21) as CurrentChatTime for setting an accurate time for a session var.
Also remember to put a reference on both pages to the System.Data.SqlClient if you are copying my code. Here is a pic of the table layout I used.

Happy coding!
[Update]
I noticed I didn't do the SELECT CONVERT(varchar, current_timestamp, 21) as CurrentChatTime formating on the if session["CurrentTimeChat"] == null clause for the first time the pull page is hit, you can add that if you want, though things seem to work without it. Also the XMLSafe method isn't really necessary nor fully implimented, so you can ditch that method if you want or fully build it out if you are concerned about illegal HTML and XML chars. I'd fix this all in code but reposting in blogger is a pain when dealing with code, so I'll leave it as is, which works fine.
Monday, April 27, 2009
Basic: jSON Basics
http://www.hunlock.com/blogs/Mastering_JSON_(_JavaScript_Object_Notation_)
Tuesday, April 21, 2009
Google Makes Another Raid into Web 3.0
We have a battle for next generation web apps that currently is between Silverlight and Flex/Flash, with Unity 3D and some other plugins on the fringes.
But now Google enters the fray…
Google's new Open GL Web API
Source: Ajaxian.com
Tuesday, April 14, 2009
Javascript Gotcha: substr <> substring
For more-
substr vs substring
Sunday, April 12, 2009
Friday, April 03, 2009
Need a Free(ish) Netmeeting Alternative?
Sunday, March 29, 2009
Pushbutton Flash Game Maker
Check it out here-
http://pushbuttonengine.com/
Update: Looks like IE doesn't like blogger, as the past in link doesn't work anymore. Oh well. Also, the pushbuttonengine is by the same guys who made torque.
Thursday, March 26, 2009
Distributed Open Source SVN: Git
http://www.webdesignerdepot.com/2009/03/intro-to-git-for-web-designers/
Wednesday, March 25, 2009
Unity 3D AI Package
http://drawlogic.com/2009/03/24/unity3d-path-and-behave-projects-from-angryant-waypoints-ai-paths-library-behavioral-trees-and-more/
Torque to Offer Unity3D Alternative
http://drawlogic.com/2009/03/24/torque3d-to-offer-web-based-export-similar-to-unity3d-improved-pipeline/
Future: Javascript 3D Capabilities On the Horizon
http://dusanwriter.com/index.php/2009/03/25/3d-in-a-browser-mozilla-and-open-gl-to-build-plug-in-free-virtual-world-access/
About time! Why mess with all these 3rd party plugins (Flash/Unity/Silverlight) when we can do things directly from the web browser? Especially when 3D will become more and more common.
VRML is dead...but its successor could finally be on the horizon.
Monday, March 23, 2009
Disappointment with Silverlight 3 Beta's 3D
I guess I will have to wait...but beggers can't be choosers.
Friday, March 20, 2009
IE 8, Didn't Break As Many Things As I Worried About
www.microsoft.com/ie
Thursday, March 19, 2009
Great SQL Server Maintenance Article
http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=ExpressMaintenance&referringTitle=Home
Wednesday, March 18, 2009
Kick @ss, Unity 3D for Windows Released!
http://unity3d.com/unity/download
Thanks Developmag.com for breaking the story-
http://www.developmag.com/news/31482/Unity-now-avaiable-for-Windows
Also announced today is the release of Silverlight 3 Beta...yawn.
Friday, February 27, 2009
Decent Post on Emerging Virtual Worlds for The Enterprise
Wednesday, February 18, 2009
Like to Chat? Check out Meebo
Tuesday, February 17, 2009
Ahhh Vanity
But blogging is fun, and feeds a little personal vanity I suppose. I don't bring much to the table, but every once in a while someone will thank me for posting some code or quote a comment I left on a blog.
Here is one case...
http://dusanwriter.com/index.php/2009/02/17/identities-constructed-virtual-worlds-and-anonymity/
This post is about virtual identities, something I'm very interested in. And the author, Dusan, talked briefly about a comment I made about Oscar Wilde, though I can't seem to find the original comment on the other blog post. So, in a small way, I added to the discussion of things, and got people to think a little bit about a point I made, which is cool.
Does my heat good and feeds the vanity flame a little more.
Thursday, February 12, 2009
Think Science Isn't Cool? In the USSR It Is
http://miss2009.nuclear.ru/participants.html
I doubt most engineering or scientific firms in the US could mount any sort of challenge to the miss atom contest in the CIS.
What does this tell us, besides the fact that I was checking out some Russian scientific hotties? That there is a big cultural difference between Russia and the US. In Russia, science is cool enough to attract some babe talent. In America, not so much (though there are exceptions to every rule...if you are female, in science, and reading this, you are the exception...of course:). This is a problem.
Source: Wired Defense Blog
Monday, February 09, 2009
Three PHP Frameworks Worth Checking Out
Anyway, I digress...
For those of you who just can't stand the fact that you don't have all the OOP and other "modern" features of other languages in PHP, check out the following PHP frameworks that extend PHP to support things like MVC, better OOP, and Active Record, to name a few. Here they are.
CakePHP http://cakephp.org/
The Zend Framework http://framework.zend.com/
Code Igniter http://codeigniter.com/
If you have any opinions on which is better, I'd be interested. I will take one out for a spin on my second or third project.
Sunday, February 08, 2009
Abyss and Sql Server 2008



1. Download and "install" (unpack into a folder) the latest php/SQL Server driver (it says 2005, works wth 2008, but you have to get funky if you want to use some of the new 2008 data types...update in the works).
http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=61bf87e0-d031-466b-b09a-6597c21a2e2a&displaylang=en
2) Copy the php_sqlsrv_ts.dll from your driver's install folder into your php folder.
Wednesday, February 04, 2009
XMLDataSource Remembered
http://www.codeproject.com/KB/webforms/XMLDataSource.aspx
Thanks Keyvan Nayyeri
Update: Or you can use XML directly in the XMLDataSource control
https://stackoverflow.com/questions/322190/asp-net-3-5-bind-to-xml-string
Tuesday, February 03, 2009
Great Example of a Serious Game
Monday, February 02, 2009
Problem for Microsoft
Once you have a few list up, go through them, and see hot many of them are using ASP.Net.
1? Maybe 2?
Not good. ASP.Net is awesome for creating internal enterprise-based web applications. It isn't getting that much steam, it would appear, with the innovative crowd that is bringing new web apps to the masses. This in turn means that up and coming developers, who may not exist in the enterprise sphere (yet), see only sites using PHP, or Ruby, or something else. A rational choice for this next wave of developers will be to go with what the big boys (at least of what they can see of the big boys from their vantage point) are using, and it isn't ASP.Net.
I'm in a similar position right now. I do all ASP.Net/C# dev at work, but for an upcoming personal project I'm thinking of ditching ASP.Net for at least the web component of the project. Why? It is just to much. The last web site that I built where I was exclusively focusing on solving client problems, while not having to learn how to implement technical solutions on the fly, was written with simple classic ASP. With ASP.Net it seems like you really need to be at a guru level before you can quit worrying about the how-to's and focus elusively and the why's and what is best questions. Even though I use ASP.Net all the time at work, I don't feel like I'm at the guru point yet. Classic ASP was simple, but it did what I needed without me having to think to much about it. I miss that.
Now I'm looking at PHP for the web component (I will probably stick with MS SQL Server for the db). I'd have to learn it, but it looks like the basics of PHP are really, really simple, something I can probably sit down and master the basics of (data in, data out, data on the page) in a few days. That sounds really appealing to me right now. My project isn't about learning how to do something, it is about providing something. I want to get into the providing a solution rather then learning how to provide a solution as quickly as possible with the minimal about of head aches. Plus I want to right code and have once it works to be able to sit for the next 10 years without worrying about it. PHP is going on version 6 right now, but from what I understand version 1 code will still run under PHP 6 (though this might not be 100% the case, I imagine minimal tweaking would be needed). Classic ASP is pretty stable, but who knows how long that will be around. With .Net, Migrating say from version 1.1 to version 4.0 (when it comes out) would be nightmare, and would require investments into MS server tech and developer software.
So, is ASP.Net a fit for public web applications? The big boys don't seem to think so, probably for some of the reasons I alluded to above, and for Microsoft, that is a problem.
Wednesday, January 28, 2009
A Few Compressor Links
CSS Cleaning and Compressing-
http://www.cleancss.com/
http://www.cssdrive.com/index.php/main/csscompressor/
http://www.cssoptimiser.com/
Javascript Compression-
http://www.xmlforasp.net/JSCompressor.aspx
http://javascriptcompressor.com/
Wednesday, January 21, 2009
Add a Little Flair to your Web Site
http://www.wildform.com/
http://www.swishzone.com
http://www.xara.com/us/
If you know of any others, let me know and I'll post 'em.
Flex - Silverlight - Laszlo- Javascript - Widget IDE: Spket
http://www.spket.com/
Free for personal use, under 30 for professional. If you have used it please leave a comment and let me know what you think.
Monday, January 19, 2009
Very Useful List of Web Design Resources
http://elementiks.com/web_resources.php
Wednesday, January 14, 2009
Free Images and Video for The Web
http://tutorialblog.org/how-to-dress-up-your-site-without-paying-a-dime/
Wednesday, January 07, 2009
Javascript Page Flip
Check it out here...
http://www.sitepoint.com/examples/jquery/animate4.php
The full article here...
http://www.sitepoint.com/blogs/2007/07/20/javascript-sprite-animation-using-jquery/#comment-858604
Pretty cool, I'm sure this technique has been done elsewhere, and can be utilized in other technologies like Flash and Silverlight if you wanted to go that route.
Friday, January 02, 2009
Caching and DataSets
http://weblogs.asp.net/despos/archive/2005/08/08/421868.aspx