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 :)
Tuesday, August 26, 2008
Decent Windows Service Tutorial
http://www.beansoftware.com/NET-Tutorials/Create-Windows-Services.aspx
Saturday, August 23, 2008
Truespace 7.6 Free
Friday, August 22, 2008
A Peak at Goggle Trends
I checked out the search trends for ASP.Net, and I found the following-
- Out of the top 10 originating search cities, only three where American (Houston, Atlanta, and Phoenix).
- The United States was 8th over all in searches, even Iran beat us.
- The top search language is suprisingly Vietnamese, followed by English at number two (probably due to the fact that most Indian programmers speak English). It looks like there is a large outsourcing effort going on in Vietnam.
Now let's check out the search trends for php.
- Only San Fransisco made it on the top 10 originating cities list, and the United States didn't even make it on the top 10 originating search regions.
- English didn't make it on the top 10 languages used in the search
- It looks like Indonesia (Jakarta specifically) are doing the most with php right now.
Ok, Now lets do a trend for jQuery.
- America doesn't make it on the top 10 search regions.
- San Fran seems very active in its searching for jQuery, so is Redmond, else the other cities are all foreign, many of them being Asian cities.
- Russians seem to be eating up jQuery, Russia being the top search region and top originating search language.
And lastly, lets do a trend search on Java
- English is the 6th in originating search languages.
- No American cities show up on the top 10.
- The United States doesn't show up on the top 10 originating search regions.
One last one, lets do Actionscript-
- New York, San Fran, English as the 3rd searched language, US not in the top 10 for search originating regions.
So, it seems like America has a few tech hubs (San Fransisco, Redmond, to a lesser extent Phoenix, Houston, and Atlanta). Other than that it looks like there are multiple regions in the world that are way more active in at least web development then America is. Right now it seems like America drives technology (though a suprising amount of what Microsoft, IBM, and Apple deliver is from outsourced teams).
So are we seeing the slow death of the American web developer?
Not sure.
CGI Advancement
http://technology.timesonline.co.uk/tol/news/tech_and_web/article4557935.ece
Thursday, August 21, 2008
Very cool way of passing a DataSet to a WCF Service
I found this post, might get you started.
http://pstaev.blogspot.com/2008/04/passing-dataset-to-wcf-method.html
Tuesday, August 19, 2008
Chucking Rocks at the Moon with WCF and NTLM Errors
So I created my "hello world" WCF service, and straight off the get go...problem.
I created my WCF web service (in an existing web app, going that route), left everything as default, and got the service running in debug mode. I copied default URL (with the ?wsdl) that comes up when you run the web service.
I then created a new web project, right clicked in VS 2008 on the Add Web Service, and pasted in the URL from above. The discovery took place, and everything looked good.
So in the code behind page_load method on my default page, I do something like this. Not your names will very.
ServiceReference1.WCFTestClient x =
new Consumer.ServiceReference1.WCFTestClient ();
try
{
Response.Write ( x.GetData ( 3 ) );
x.Close ();
}
catch ( System.Exception ex )
{
Response.Write ( ex.ToString () );
}
then I fire it up...bomb. Something about an NTLM anonymous blah blah blah error.
I read, figure out you can turn NTLM off (if you are using Cassini, right click on your web application sln, properties, start up, uncheck NTLM). But that wasn't going to work as the web app that I'm adding the web service into actually needs NTLM.
So, I played around. By default, the binding used is wsHttpbinding. You can change that to get things running. In the web config on the web app that host the service, I changed the binding entry from wshttpbinding to basicHttpBinding. On my consumer web app, I updated the web service reference, then went into the web config and changed the security mode setting lines in the basicHttpBinding.
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
Well, once I fired up again in debug, everyting works, and allegidly NTLM is still in place. Hope this helps someone. Not sure how secure all this is, so I will keep playing.
Monday, August 18, 2008
Nuke War Anyone?
* Russia shoots down an American C-17 Cargo plane carrying humanitarian supplies to Georgia
* Russia blockaids more Georgian ports.
* America tries to send in more aid.
* Either a Russian fighter or a Russian naval vessel fires on an American vessel. There is return fire and the Russian vessel is destroyed.
* A Blackjack bomber test American air defenses, and due to the present crisis, is shot down
* Scattered skirmishes between Russian and American forces through out the world.
* KAAABOOOOM!
I hope cool heads prevail here.
Wednesday, August 13, 2008
Email Obfuscator
http://www.jottings.com/obfuscator.htm
Friday, August 08, 2008
Georgia and Russia Go At It
A fast naval response by the Russians further indicates advanced planning on their part-
http://blog.wired.com/defense/2008/08/while-the-media.html
Read the third paragraph.
[Update]
Further evidence that Russia was planning aggression against Georgia in advance.
http://blog.wired.com/defense/2008/08/georgia-under-o.html
Basically the Georgian's saw the writting on the wall, so they made a pre-emptive move on their break away republics...or the Russians saw the Georgian's planning an assault, and began to build up their forces...not sure which, probably and chicken or the egg question a that point. Both sides have interest in break away areas.
The flare up, and possible war, between Russia and Georgia will be interesting. Here are a few links that will help you understand the conflict.
There is oil involved.
http://www.debka.com/article.php?aid=1358
Russia started the recent flare-up. http://www.reuters.com/article/newsOne/idUSL768040420080808
The Georgians are feeling perhaps a little overconfident, having had recent military training and funding from the U.S. and Israel , and ground combat experience in Iraq http://blog.wired.com/defense/2008/08/the-new-war-in.html http://blog.wired.com/defense/2008/08/did-us-military.html
I predict that the Russians will prevail, but if it comes to out and out full blown combat, the Russians will end up with a suprisingly big bloody nose before the conflict is over. It might be good for Russia's ego to be trimmed a bit. In either case it is sad to see that a bunch of young people are probably going to be killed over money and nationalistic pride.
Thursday, August 07, 2008
Apple Slaves
I've got a lot of bad things to say about Apple. And I do not come to my conclusions from a point of ignorance. For now, I'll just link to this article, which points out the well known horrible conditions in which technical Apple employees, pretty much from day one, often have found themselves working in. Read this SlashDot article for the latest-Monday, August 04, 2008
3 Important JSON / WCF Problems and Solutions
http://encosia.com/2008/06/05/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/
Encosia outlines three little items that could end up making you pull a lot of hair out of your head wondering why your JSON jQuery WCF communication isn't working
Friday, August 01, 2008
Props to the Pakistani Airforce
http://www.pakdef.info/pakmilitary/airforce/war/indexafghanwar.html
I feel bad for Pakistan. They are in a rock and a hard place now.
Thursday, July 31, 2008
ASP.Net Dynamic File Download Protection
//http://www.codeproject.com/KB/aspnet/SecureFileDownload.aspx
//http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2855600&SiteID=1
if (Request.QueryString["fid"] != null) //&& Session["uid"] != null)
{
string sPath = Server.MapPath("~") + "Your path here";
string sFileName = "";
if (Request.QueryString["fid"].ToString() == "1")
{
sPath += "real_file_name.config";
sFileName = "display_file_name.pdf"; //or .doc, .jpg, .mp3, whatever
Response.AddHeader("content-disposition", "attachment; filename=" + sFileName);
Response.ContentType = "application/octet-stream";
System.IO.FileStream fs =
System.IO.File.Open(sPath, System.IO.FileMode.Open, System.IO.FileAccess.Read);
Byte[] flen = new byte[256];
int iBytes = fs.Read(flen, 0, flen.Length);
Response.Buffer = true;
Response.BinaryWrite(flen);
while (iBytes != 0)
{
iBytes = fs.Read(flen, 0, flen.Length);
Response.BinaryWrite(flen);
}
fs.Close();
Response.End();
}
Place this in either your Page_Init or Page_Onload, adjust the paths, names, and what not and you have your file protection (in the snippet the session check is commented out, but you can see what I was getting at). For your base file path you can use Server.MapPath("~") + "/whatevedirectory/". Also if you are writting to files, it is a good idea to keep these files in your App_Data directory, as I've heard (don't know if it is true) that messing with files outside that directory may cause your app to recycle.
The above code could probably be put into an HTTPModule, you could read real file names and display names from a database, or encrypt your query string, whatever, this will give you the basics.
Column Side Gradients
- Blur between Web Application Developer and Hard Core Low Level Programmer
- Web Application Developer
- Web Scripter
- Web Designer
- HTML Content Developer
I think I'd like to find myself in the "Web Scripter" category, someone who does back-end database programming, but also does design work. I think I could meet a lot of small business user needs that way. Small business owners don't need or care about the craft of programming, and they can't support the budget for solutions based on those methodologies, but small business owners do need interactivity and data storing/retrieval. A nice blend of task for a single coder or a small team. I think I'm getting burned out a little bit on the application development side of things. I see a lot of extra abstraction layers being added into the mix, which is all well in good, but often times the extra effort is unnecessary and it is only done to please the herd.
Anyway, that is neither here nor there. Here is a link to a Photoshop/CSS tutorial on how to create gradient fades on the sides of content columns, something I'm seeing a lot of these days.http://www.projectseven.com/tutorials/images/gradient_tiles2/index.htm
A Bunch of Techie Links...
Again, another hurry up and wait day at work, even though I do have some things to do, I took a few minutes to go through my starred google feeds, and I present to you all (and to myself in the future) a bunch of links that might be useful to you.
Virtualization: http://virtualbox.org/
Plots: http://www.deensoft.com/lab/protochart/
Software: http://cyn.in
Jquery Plotting: http://code.google.com/p/flot/
Flot example: http://www.garyrgilbert.com/blog/index.cfm/2007/12/12/JQuery-Charting-Plugin
Another jQuery Plotter: http://www.reach1to1.com/sandbox/jquery/jqchart/
Httpmodule as Background Service: http://dotnetslackers.com/ASP_NET/re-126158_Using_an_HttpModule_to_Run_a_Background_Service.aspx
Resources for Photoshop: http://amarieveanne-stock.deviantart.com/art/Dragons-volume-II-76024664
ProtoChart: http://www.deensoft.com/lab/protochart/dynamic.php
Tuesday, July 29, 2008
PHP Sql Server 2005 Native Driver
http://www.microsoft.com/downloads/details.aspx?FamilyId=61BF87E0-D031-466B-B09A-6597C21A2E2A&displaylang=en
Referrenced from -
http://www.misfitgeek.com/
Monday, July 28, 2008
The New Look And Feel
http://www.masternewmedia.org/information_design/information-design-principles/web-20-design-simple-social-design-components-20071017.htm
Highlights include-
- Centered Design
- Rounded Edges
- Large Fonts
- Simple, Consistent Navigation
- Logos and Icons
- Subtle 3D/ Refective Surfaces
- Whitespaces
- A whole section on the socal web.
Saturday, July 26, 2008
California Bans Transfat, Freedom
Mommy, otherwise known as the government to most Californians, has recently passed a law banning trans fat from the state. While I think most Americans eat too much trans fat, I don't think the government has any business stepping into the role of Mommy. I'm down with having people who eat to much trans fats and thus suffer health related issues due to their over consumption of trans fat paying a higher premium for health care (and I would be one of those individuals, unfortunately). I don't believe liberals through government agencies should have the right to make sure people "live correctly". My ancestors bailed Europe because they didn't believe in government telling people how to live, and the setup this great country known as the United States of America where people are free to make their own choices, be they good or bad, and benefit or suffer the consequences of their own choices, again be they good or bad. It sets a really bad precedent abdicating even small personal freedoms (even to eat "the wrong" foods) to government. Today trans fat, but what will "Mommy" try to fix for us tomorrow? Ten years from now? Pretty soon government will be trying to make sure we all "believe correctly" and help us all reach acceptable ideological conclusions for the good of the "community" (i.e. the government). F that. Live Fat or Die! (j/k). How about live free of lefties (and conservatives) in government telling us how to live, and all of us being responsible for our own life choices. http://abcnews.go.com/print?id=5393222
Friday, July 25, 2008
Flash 3D
http://www.electricoyster.com/
[Update]
Here might be what these guys are using for their 3D Engine-
http://www.flashsandy.org/
Thursday, July 24, 2008
jQuery Autocomplete example
http://www.pengoworks.com/workshop/jquery/autocomplete.htm
I created a quick and dirty aspx "servlet" page, with all the
aspx-
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AutoCompleteTest.aspx.cs"
Inherits="jQueryAutoComplete.servlets.AutoCompleteTest" %>
Code Behind- (mine was hooked into an access db...)
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace jQueryAutoComplete.servlets
{
public partial class AutoCompleteTest : System.Web.UI.Page
{
protected void Page_Init ( object sender, EventArgs e )
{
if ( Request.QueryString["q"] != null )
{
string sQry = "Select [CatID], [CatDesc] from tCategories where " +
"[CatDesc] like '" + Request.QueryString[ "q" ] + "%' order by [CatDesc]";
string oStr = ConfigurationManager.ConnectionStrings[ "cats" ].ToString ();
System.Data.OleDb.OleDbConnection oConn =
new System.Data.OleDb.OleDbConnection(oStr);
oConn.Open();
System.Data.OleDb.OleDbCommand oCmd =
new System.Data.OleDb.OleDbCommand ( sQry, oConn );
System.Data.OleDb.OleDbDataReader oRdr =
oCmd.ExecuteReader ( CommandBehavior.CloseConnection );
while ( oRdr.Read () )
{
Response.Write ( oRdr[ "CatDesc" ].ToString () + "|" +
oRdr[ "CatID" ].ToString ()+ Environment.NewLine);
}
oRdr.Dispose ();
oCmd.Dispose ();
oConn.Dispose ();
}
Response.End ();
}
}
}
And then my HTML page, which contains the simple autocomplete box which is pretty much pulled directly from the above site-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>jQuery Autocomplete</title>
<script src="jquery-1.2.6.pack.js" type="text/javascript"></script>
<script type='text/javascript' src='jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="jquery.autocomplete.css" />
</head>
<body>
<form action="" onsubmit="return false;">
<p>
Ajax City Autocomplete:
<input type="text" id="Names" value="" style="width: 200px;" />
<input type="button" value="Get Value" onclick="lookupAjax();" />
</p>
</form>
<script type="text/javascript">
function findValue(li) {
if( li == null ) return alert("No match!");
// if coming from an AJAX call, let's use the CityId as the value
if( !!li.extra ) var sValue = li.extra[0];
// otherwise, let's just display the value in the text box
else var sValue = li.selectValue;
alert("The value you selected was: " + sValue);
}
function selectItem(li) {
findValue(li);
}
function formatItem(row) {
return row[0] + " (id: " + row[1] + ")";
}
function lookupAjax(){
var oSuggest = $("#Names")[0].autocompleter;
oSuggest.findValue();
return false;
}
$(document).ready(function() {
$("#Names").autocomplete(
"AutoCompleteTest.aspx",
{
delay:5,
minChars:1,
matchSubset:1,
matchContains:1,
cacheLength:10,
onItemSelect:selectItem,
onFindValue:findValue,
formatItem:formatItem,
autoFill:true
}
);
});
</script>
</body>
</html>
And wa-la! Autocomplete on the fly. Thank you pengoworks.com and jQuery.