Saturday, May 31, 2008

New Tribe Found, Put in a Zoo

A remote tribe in Brazil has been found. Some group called "Survival International" is hard at work protecting them...from advanced medicine, electricity, toilet paper, knowledge, and all sorts of other advancement under the guise of some sort of politically correct notion about tribal sovereignty.

I'm all for gradual introduction of the tribe into our global world of ours, but isolating them so they can be "studied" and "protected" seems to me a bit like putting these people in a zoo.

Read more here-

http://news.bbc.co.uk/2/hi/americas/7426794.stm

[Update] - Guess the whole thing was a hoax. I got my all uppity over nothing :(

http://www.guardian.co.uk/world/2008/jun/21/amazon?gusrc=rss&feed=worldnews

Friday, May 30, 2008

Great Marketing Article with Societal Implications

I read the grokdotcom from time to time it is a great resource for marketing information. The following is an interesting post about "You" and the failure of the Web 2.0 hype (though not quiet framed that way in the article). What is interesting to me is the concept of information irrelevance, which is just another term for infocyde...hiding critical information by burying it. Though the article is targeted at marketeers, poli-sci geeks and wanna be philosophers like myself might find the article of interest.

Take a look here-

http://www.grokdotcom.com/2008/05/30/marketing-to-yourself/

More War B.S. Marine Busted for Handing Out Coin with Christian Verse On It

Anther sad milestone for our society and the Iraq war. We are allegedly fighting for Iraqi's freedom. Yet I guess freedom of religion, which is really a subsets of freedom of speech and freedom of thought, isn't included in the rights that we hope to "civilize" the Iraqis with, and apparently is no longer even a right for our own troops.

Some marines where handing out coins with a Bible verse on the coin to Iraqis. Some Iraqi elders got hot and bothered because Americans might influence Iraqi minds against Islam. A marine was busted and is in trouble, and our own president apologized to the Iraqis. Why are we over there again? To help prop up an Islamic dictatorship? If this is how the war is being waged, let's bring the troops home. We don't even know what we are fighting for.

Koodos to the marine for standing up for Jesus Christ and his country.

Thursday, May 29, 2008

Pretty Good Article About Partial Page Post And Ajax

I use the Telerik Ajax controls, which though are now based on MS AJAX under the hood still have their own client side enhanced API. But I don't have the Telerik Rad Controls at home, so I was researching how to do things the MS way when I stumbled upon the following article, which might be of some use to you.

http://aspnet.4guysfromrolla.com/articles/052808-1.aspx

Sunday, May 25, 2008

Age Of Conan: First Impressions

So I started playing Age of Conan with my wife (yes, she is a gamer...eat your heart out). So far I'm having a blast. If you are a hard core gamer I would recommend picking up the Age of Conan, but be warned, you need a pretty beefy box to run it on. My laptop, which is a dual core proc with a 256 meg dedicated graphics card gets only about 6-22 fps on the LOW settings in Conan. The game is still playable, but I wouldn't attempt playing it with anything less then a gaming rig that is a year or two old.

I'm running a 12th level Priest of Mitra on the Shadowbane shard called Lotharum. If you play say hi. I'm still poking around the city running minor quest. I figure I'll play 2 or 3 nights a week, so I don't expect to rise through the ranks all that quickly.

Tuesday, May 20, 2008

Telerik RadComboBox Auto Complete Example

Ok, I found a few blog post and some documentation from Telerik on how to create a web service to populate a RadComboBox. None of the examples where complete, so here is a very basic example to get you going.

First, in design mode drag a RadScriptManager to your page. Switch to design mode, and click on the smart tag. Add the whatever it is called to your web config. Then drag a RadComboBox to your page. Then add the the Javascript so you have something that looks like below. Some of the code is obscured by the right side bar, just select the code and copy paste into a text viewer and it should all be there. I need to find sometime to either find a new blogging platform or widen out my blog a bit.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Telerik_Error._Default" %>
<%
@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server">
<title>Untitled Page</title>
</
head>
<
body>
<form id="form1" runat="server">
<div>
<script type="text/javascript">
function OnClientItemsRequesting(sender, eventArgs)
{
var context = eventArgs.get_context();
context[
"FilterString"] = eventArgs.get_text();
context[
"test"] = "2";
}
</script>

<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
<telerik:RadComboBox runat="server" ID="RadComboBox1" Width="300px"
EnableLoadOnDemand="true"
OnClientItemsRequesting="OnClientItemsRequesting">
<WebServiceSettings Method="GetProducts" Path="Test.asmx" />
</telerik:RadComboBox>
</div>
</form>
</
body>
</
html>


Ok, half way done. Now create the webservice. I called mine GetProducts. In order for it to work you have to use the RadComboItemData object as well as Generic list. Here is a sample webservice.

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using Telerik.Web.UI;
using System.Collections.Generic;

namespace Telerik_Error
{
/// <summary>
/// Summary description for Test
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(
false)]
// To allow this Web Service to be called from script,
//using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class Test : System.Web.Services.WebService
{

[WebMethod(EnableSession=
true)]
public RadComboBoxItemData[] GetProducts(object context)
{
IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context;
List<RadComboBoxItemData> result = new List<RadComboBoxItemData>();
for (int i = 0; i <= 5; i++)
{
RadComboBoxItemData itemData =
new RadComboBoxItemData();
itemData.Text = contextDictionary[
"test"].ToString() +
contextDictionary[
"FilterString"].ToString() + i.ToString();
itemData.Value =
"value" + i;
result.Add(itemData);
}
return result.ToArray();
}

}
}


This came from a sample project that I was working on called Telerik_Error, thus the weird namespace reference. You can ignore that. Also not that in the javascript you can add additional variables to the context object, like I did with the variable test. Hope this code helps. The next step would be to include data. You should be able to pull in a datatable from a database and loop through it add items once you get the base webservice up and running.

Sunday, May 18, 2008

Localization in Classic ASP

I found a great blog post about performing localization (language translation) in Classic ASP.

Check it out here-

http://networkprogramming.spaces.live.com/blog/cns!D79966C0BAAE2C7D!379.entry

Dude in Switzerland Pulls a Da Vinci

Pretty cool, a guy from Switzerland took to the skies for a five minute flight with his custom made jet assisted wing. Da Vinci would be proud. Read on -
http://www.news.com/2300-11397_3-6239730-1.html?tag=ne.gall.pg

ASP.Net Connecting to An Access 2007 DB

I was fooling around at home and decided to use an Access 2007 DB in a small project. After checking out a few blogs, none of which had the solution completely correct, I got this working. Hopefully this will be useful to someone.

On your ASP.Net aspx page, here is a sample data source. Note, you want to use the SqlDataSource, not the access one. Weird huh?



<asp:SqlDataSource ID="MyDS" runat="server"
ConnectionString
="<%$ ConnectionStrings:myConn %>"
ProviderName
="<%$ ConnectionStrings:myConn.ProviderName %>"
SelectCommand
="select * from mytable"></asp:SqlDataSource>
In your web.config file, add the following connection string. If you haven't added on replace your default ConnectionStrings line with the following-


<add name="myConn"
connectionString="Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=|DataDirectory\myDB.accdb;
Persist Security Info=False;
"
providerName="System.Data.OleDb" />

That should get you started.

Also, if you don't have Access 2007 installed on your server, you will need the new Access ODB driver-

http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en

Is all this worth the extra effort then just downsaving your .accdb to an .mdf? From what I see probably not, but here is the info. Not sure which way I will go with things yet for my little project.

Sources:
http://www.connectionstrings.com/
http://weblogs.asp.net/steveschofield/archive/2008/05/03/iis-7-0-access-2007-and-asp-net-2-0.aspx

Thursday, May 15, 2008

SQL Identities

I always get confused, is it scope_identity, @@ident, or what to get the primary key of a row I just inserted?

The SQL Authority Blog does a good job of sorting things out.

http://blog.sqlauthority.com/2007/03/25/sql-server-identity-vs-scope_identity-vs-ident_current-retrieve-last-inserted-identity-of-record/

The short answer is that you want to use SCOPE_IDENTITY()

And if you are stuck with developing with Access, here is your answer-

http://databases.aspfaq.com/general/how-do-i-get-the-identity/autonumber-value-for-the-row-i-inserted.html

Another technique is to generate a unique key on the server and then insert that as your primary key into the database. Since you insert it with the other info you usually know what it is. Usually developers use GUID's for this, which you can create both in classic ASP (check out my classic ASP post) and natively in .NET. There is a performance hit using GUID's though, but you can minimize that hit by using COMB GUID's. I've got some code for generating those somewhere, but I'm not going to hunt for it tonight. But here is a discussion thread with some code samples-

http://www.informit.com/discussion/index.aspx?postid=a8275a70-0698-46f0-8c8f-bf687464628c

NEWSEQUENTIALID is also available, but that is created on the database side, so the purpose is kind of lost, so I'd stick with COMB GUID's.

I used to get pretty religious about this type of stuff (hated GUID's), but ultimately most of us aren't building the next Amazon, Google, MySpace, etc..., so getting anal about primary keys to get that last ounce of efficiency isn't worth the time unless you approach that scale.

It seems like things are moving several steps away from the database in abstraction levels anyway (with O/R mappers and technology like LINQ). We have so much computing horsepower now that bloat seems to be the way of the future...

Tuesday, May 13, 2008

British X-Files to Be Released

The Brits are opening up their MoD UFO files, with 150 files to be released over the next 10 years.





http://www.thesun.co.uk/sol/homepage/news/article1160625.ece

I'd say the biggest UFO story worth looking at that these files could shed some light on is something that happened in 1981 over an RAF/USAF airbase (multiple witnesses, including high ranking military officials, physical evidence, radar signatures). Was it aliens? Soviets? Guards smoking pot? I don't know, but there is evidence that something unusual happened, maybe these files will shed some additional light on what really did happen back then.

Also, the Pope declared that it was ok to believe in aliens.

http://www.breitbart.com/article.php?id=D90KSE100&show_article=1

Strang days.

Sunday, May 11, 2008

Generation Last

(Back by popular demand...I originally just wanted to do a quick post about video games and the brain, and I ended up spending an hour writing what turned out to be a Bible study. I realized that it was too long so unfortunately I tried to cut things down, and a lot of the good stuff was lost. But here is my post...hopefully I'll get some time to really lay out what Generation Last is, why I think we are approaching it, and what that means).

There has been a debate going on between a small group about how or if at all changes in our society (technologically, morally, and spiritually) are effecting humanity. The basic theory is that our brain is a giant chemical vat. If we expose ourselves to stimuli (real or simulated) the brain produces chemicals. Over time, our brain reorganizes to "better handle" all the chemicals that we are producing. This "better handling" may not be better at all. Here is a taste of what I am talking about.

Worry about The Brain Article

Some additional books worth reading are-

Porn Nation (about the internet and sexual addiction),
On Killing (A military book about how the violence on TV and in video games makes killing easier, but doesn't make the psychological effects from killing go away).

Both are well worth the read.

Now my rant-

I fear that mankind, by doing nothing more then following consumer demand, is creating a society of pathologically short attention spanned violent perverts who demand instant gratification in all things, lack empathy for others, lack critical thinking skills, lack a work ethic, and are so shallow that their relationships are short lived and hallow. And that same society will bend over backwards to adapt by lowering expectations, dumbing down the schools, providing more outlets for violence and sex, more access to both legal and "illegal" drugs, etc... Moods will become something you can "mod", so individuals will no longer have to deal with the guilt and shame of their behaviors...or at least prolong dealing with them until a break down comes. Then even more powerful drugs and psychological techniques will be used to "fix" these people, resulting in older individuals becoming zombies, with their capacity to feel anything inside burnt out by their previous youthful pursuits and then later medical "science".

It is coming. And I'm convinced that this is the last generation that Paul wrote Timothy about in 2 Timothy.

2Ti 3:1 This know also, that in the last days perilous times shall come.
2Ti 3:2 For men shall be lovers of their own selves, covetous, boasters, proud, blasphemers, disobedient to parents, unthankful, unholy,
2Ti 3:3 Without natural affection, trucebreakers, false accusers, incontinent, fierce, despisers of those that are good,
2Ti 3:4 Traitors, heady, highminded, lovers of pleasures more than lovers of God;
...
2Ti 3:12 Yea, and all that will live godly in Christ Jesus shall suffer persecution.
2Ti 3:13 But evil men and seducers shall wax worse and worse, deceiving, and being deceived.

Garbage in Garbage Out

We, can keep the garbage of generation last out of lives to some degree by monitoring how we spend our time, and choosing the high road instead of the low one of fast food, porn, violent games, laziness, disorganization, recreational drug use, etc. Rather then letting generation last's society shape us, we need to reshape ourselves in light of God's word so that we can be a salt and a light to people living in the last generation.

Rom 12:2 And be not conformed to this world: but be ye transformed by the renewing of your mind, that ye may prove what is that good, and acceptable, and perfect, will of God.

Rev 18:4 And I heard another voice from heaven, saying, Come out of her, my people, that ye be not partakers of her sins, and that ye receive not of her plagues. [Talking about Babylon...which could be symbolic of the end times "system", or generation last's society.]

So we are commanded by God to have our brains reorganized by Him rather then the world around us. How can we do that?

I think firstly, we have to acknowledge a big truth.

Prov 16:25 There is a way that seemeth right unto a man, but the end thereof are the ways of death.

The society of generation last will seem to many to be the ultimate paradise. For our every short term perceived "needs" (really lusts) generation last society will be have an answer to meet those need in near or real time. Many of the solutions that end time society will offer us are solutions that go outside the boundaries of what God intended for us. We need to acknowledge that the solutions offered by end time society to meet our needs-porn, sex, violence, narcotics, fast food, feel good medications, etc... are wrong and should be avoided (note, not all drugs and sex is wrong, not misquote me here, just when they are abused they can be extremely negative). Generation Last's guide on how to live live (which is preached constantly in popular culture) is in direct contrast with what the Bible teaches. All this brain reprogramming stuff to me is just further evidence that God really does know what He is talking about when He tells us to avoid things He labels as sin. If we don't, our very capacity to be able to seek forgiveness and restoration with God might literally be reprogrammed out of our brains. Do we want that? Is the loss of our capacity even want to seek salvation and restoration with God worth the short term highs and buzzes offered by generation last society? I fear we by creating a consumer based society that has thrown biblical morality to the way side we are ultimately creating Satan's slaughtering house.

Pro 27:20 Hell and destruction are never full; so the eyes of man are never satisfied.

Heaven help us if all we are about globally is satisfying our lusts.

Jesus, God incarnate, came down to earth, showed us an alternative way of living, and then offered His sinless life as a sacrifice for our sins. He offers us the tools we need to reprogram our brains. First, He offers forgiveness. We can deny our conscious, but when we sin, somewhere deep down we know we have done wrong. Being forgiven is a powerful force, a reboot of our spiritual operating system that opens up our minds and our brains to reprogramming by God. Once we have accepted Jesus's pardon for our sins, His Word and His Spirit will be waiting to reprogam our brains, if we set aside the things of the World and focus on the things of God. Plus, Jesus knows that we aren't prefect, and that all of us to one degree or another have indulged in the sins that the world offers us (and in our weakness as human beings will at times continue to do so). So he makes the forgiveness permanent. He forgives us for past, current, and future sins at the moment we ask for His salvation. Even though all our bodies will physically die (unless Jesus returns first) due to the ravages of living in our fallen world, our souls will forever live with God and be beyond the reach of Generation Last's Society.

If you don't know Jesus as savior, click the link at the top right of the page.

Friday, May 09, 2008

Using Light to Hide

Below links to an article about how the military is using lights to reduce the visibility of objects in the sky. There are also hints that other spectrum beyond visible light are being manipulated as well.

Read on-

http://blog.wired.com/defense/2008/05/invisible-drone.html

Wednesday, May 07, 2008

Interesting Article about Rapid Game Prototyping

Some stus somewhere protyped some 50 games in one semester. Worth a read. Read on here-

http://www.gamasutra.com/features/20051026/gabler_01.shtml

China Uses India as a Punching Bag for Cyber Warfare Drills

I suspect China is waging a quiet cyberwar against India as testing for a larger potential cyber engagement with the U.S.

Read more [HERE].

Sourced from the Wired Defense Blog

Telerik RadComboBox in a RadGrid

Ok, this post is only a half post, as for now I will leave out a lot of details. I use Telerik's control suite for ASP.Net (www.telerik.com) at work. I spent about four hours yesterday trying to get a RadComboBox's selected value to bind to a column in the Grid's dataset when in edit mode (so I could get two way databinding on the grid so it will handle the update/delete/insert automatically as long as you setup the appropriate procs and params in your SQL datasource).

Without including all the details I couldn't get things to work until I bound the RadComboBox to a column that initially had the value of ''in the dataset . Then, in the item data bound event I set the value the RadComboBox to the value it should be.

So in my stored proc I had to return two columns like this, mycolumn (which I set in the select to ''), and then mycolumn_real_value which in the stored proc is the value that should be the value for mycolmn. The RadComboBox's selectedvalue is bound to mycolumn like selectedvalue='<%# Bind("mycolumn") %>'. Then in the item data bound event for the Grid I cast the e.Item as a GridItem, then do a findcontrol to find the RadComboBox, then set the text of that RadComboBox to the value of mycolumn_real_value. Also you can't give the RadComboBox a DataSourceID. I ended up building a function that pulls a new DataView out of a DataSource, then loops through that view's rows and add's new items to the RadComboBox.

I'm sure there is another way, but I couldn't get anything else to work, including the downloaded Telerik examples.

I'll post actual code for this at one point, and to 99% of you who read this it will sound like a bunch of nonsense(like most of my post), but to those of you like me who have been pulling their hair out to get two way databinding to work on a RadComboBox in a RadGrid the above will put you on the right path.

Monday, May 05, 2008

Posting Code to Blogger from Visual Studio

Ok, here is a little test of a code poster that works with Visual Studio 2008. Just copy your code into the clipboard, fire up the exe, and then magic happens under the hood to replace your clipboard copied text with the appropriate HTML markup.

For more info and a download, go [HERE].


<html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title>Untitled Page</title>
</
head>
<
body>
<form id="form1" runat="server">
<div>

</div>
Test
</form>
</
body>
</
html>

App Accelerator: Something Worth Checking Out

I had not heard of Appcelerator until recently, but it looks like it might be worth a look. It is a framework for building AJAX/RIA applications. It is compatible with .Net, PHP, Ruby, and more. Just at a glance it looks like it uses JSON for data loads and Appcelerator has its own built in messaging queue that keeps data communication back and forth to the server as light as possible.

Learn more here-

http://www.appcelerator.org/

Saturday, May 03, 2008

Still Hope

The following study debunks the popular myth that all the new start ups are created by young 20 somethings. The actual median age of an Entrepreneur when they start their companies is 39, and only 8% have an elitist educational background.

Read on here-

http://chronicle.com/wiredcampus/article/2958/new-study-debunks-myth-that-most-tech-entrepreneurs-are-college-kids

I'd love to start a company in the serious gaming space, but juggling kids, family, and putting food on the table while starting a business seems like a tall order. We shall see.

A Flying Witch?

Mexico lately has been a hot spot for UFO sightings. Now we have film of a...flying witch? Probably not, but there is video of SOMETHING flying around. It looks like a woman in some sort of jet pack device. Of course video can be easily faked now a days, but allegedly there are plenty of witnesses.

Check out the article for yourself.

http://www.thesun.co.uk/sol/homepage/news/article1118824.ece