Two forms same page?

B3y steven 12/1/2009 2:13:00 PM

I have a page that has two forms in the same page, the catch is the second form is nested inside the first form. Well this violates W3C, and it seems that IE8 doesn't work with it. Color me surprised that IE8 actually is doing what it suppose to do according to the HTML specs.

Anyhow I needed this to work for my form to function and I was limited on time. So here is what I did to make the submit work with IE8.

1. Remove the "Submit" on the Button and just make it plain button ('<input type="button" id="Save" value="Save" />)
2. Add some jQuery magic to submit the first (the outer) form;

Enjoy!

ps; I seriously hate this blog engine - but I haven't found time to change it. Oh what a quandry.

Tags: , ,

MySQL SubSonic case sensitivity non-sense

B3y steven 11/8/2009 12:07:00 PM

So I had my database on a Linux box using MySQL then I decided to move it to my local box while in development as I wanted to simplify my life.

I backed up the files from the Linux machine and then restored them to the Windows box MySQL instance. Then I told Subsonic to re-run the T4 files to regenerate the classes for the DAL (of course after I modified my connection string).

Then I look to my horror and I have 240 errors. Nice. Seems the case sensitivity is not as one would expect between the Linux and the Windows box. 

After farting around with a couple of SQL rename statement, which didn't work, I read that in window the best way is to stop the MySQL service, go to the files in the DB data folder rename them as you want them to be, then re-start the MySQL service.

I did this, then regenerated my classes (again via the Subsonic T4 files) and this time no errors, the case sensitivity of the filenames (yes I like CamelCase, so what) carries over into the MySQL connections.

The trick (to me anyhow) was figuring out where the heck the files for the DB where stored. I found it like this; If you look on the properties of the MySQL service you will see it is getting handed the ini file to use for settings (I think the default is 'my.ini'). This file in in the program files install folder, so open it up and you will see a "datadir" section. This is the folder where the database files are stored.

Enjoy!

 

Tags: ,

Different Software Developer Levels

B3y steven 10/3/2009 10:25:00 AM

Something I have been thinking about and is bothering me so I put it on a blog for all to gaze upon my insanity.

There are several 'levels' (or 'Degrees' if you will) to a software developers coding skill.

1. Novice

2. Expert

3. Distinguished

4. Revered

Novice; The guy at work who does write software for a living, but he doesn't; read any blogs, know who or what GOF is, has no idea about any upcoming technologies (relies upon the Experts on his team to inform him), usually is a sports fan, does more activities not involving developement than does. This type is not only ignorant of nearly all aspects of software develoment, other than the minimul to do his job, he seems content in his ignorance - knowing that the Experts will keep him updated as needed for him to do his job.

Expert; The guy at work who does read blogs, is usually looked at as a Geek, spends more time at his computer than not, is the guy the Novice developers listen to for help. This is what I consider myself.

Distinguished; This is the guy the Expert's listen to. He is a developer who has been recognized by the Experts as someone who is very skilled, knowledgable and a resource for continual good help. This would be along the lines of Hanselman, Haack, Gutherie, etc.

Revered; Developers who are legendary in their contributions or accomplishments. Those who made a profound difference in software development. This level is a small field and usually looked at with great respect by all other developers. Among these would be greats like; Heijlsberg, van Rossum, Ritchie, Torvalds, etc.

The interesting part to me is that (most of the time) arrogance increases by the level. The Expert seems snotty to the Novice, The Distinguished seems snotty to the Expert. But after observing this in the wild I have realized its not arrogance its almost empathy. The higher level realizes that generally speaking the only difference between him and the lower level is dedication. Dedication to spend time learning, to constantly evolve and adapt to the new tools in software development. That or is the disgust that isnt because of some inability of the lower level, but the lack of drive of the lower to reach higher and attempt to increase his skills.

Next time your talking to someone who you perceive is above your level and you get the urge to smack them for being an asshole, take that as a compliment that they recognize that you have skills and ability and that they think you could achieve more.

Drive on...

Tags:

Using Fiddler with Localhost and ASP.NET DEV IIS Server

B3y steven 9/26/2009 8:53:00 PM

Quick and to the point (the 1234 is the port your local IIS dev server is running on);

http://localhost:1234 <- fails

http://ipv4.fiddler:1234 <- works

Enjoy!

 

Tags: ,

jqGrid get Row Column Value

B3y steven 9/18/2009 9:10:00 PM

This took me a while to figure out, so I am putting it here for prosperity. This is how to get the value of a specific column in a jqGrid selected Row;

ondblClickRow: function(id, rowid) {
var ret = $("#grid").getRowData(id);
window.location = '/Clients/Details/' + ret.ClientID;
}

Enjoy!

Tags: , ,

Input hidden missing from post FormCollection

B3y steven 9/17/2009 9:10:00 PM

I futzed around trying to get my hidden selected ID to be in the FormCollection object posted to my ASP.NET MVC controller.

I could not for the life of me figure out why it was not in the collection.

The input was defined like this;

<input id="pkid" type="hidden" value="15" />

Finally after looking around I noticed it was missing the 'name' attribute.

<input id="pkid" name="pkid" type="hidden" value="15" />

After that the hidden was in the AllKeys and I could get the value, perhaps

widely known but it messed with me for a bit.

Enjoy!

Tags:

Payday Online sucks with black hole force

B3y steven 9/15/2009 7:48:00 PM

In the last three days I have gotten over 200 comments on posts from Payday Online (www.yesmyloans.com) using some horrific auto post utility software package to go out and post SPAM comments all over blogs.

I havent any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.

One of their favorite and this one;

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.Any way Ill be subscribing to your feed and I hope you post again soon

I did a whois on the www.yesmyloans.com and came up with;

Domain Name: yesmyloans.com
Registered at http://www.dynadot.com

Registrant:
Cristina Dasianu c/o Dynadot Privacy
PO Box 701
San Mateo, CA 94401
United States

Administrative Contact:
Cristina Dasianu c/o Dynadot Privacy
PO Box 701
San Mateo, CA 94401
United States

1-650-585-1961

And from the hundreds (yes hundreds no shit I am not joking in the last 60 hours 274 of these);

Name: payday online
E-mail: yesmyloans1@gmail.com
Website: http://www.yesmyloans.com/
Country code: US
IP address: 70.86.162.178
Referrer:
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.1; .NET CLR 3.5.30729; .NET CLR 3.0.30618)

Its internet douchbags like this who make putting anything on the internet difficult. I sincerly hope not a single sale is derived from their tactics.

Blah.

 

Tags: ,

Chrome really that much faster?

B3y steven 8/24/2009 11:33:00 AM

I have switched to Google's Chrome as my default browser and today was playing around with the Javascript benchmark tests.

Just wow.

Chrome (2.0.172.39) - 2965

Firefox (3.5.2) - 284

IE (8.0.6001.18702) - 58.1

Good grief.

 

Tags: , ,

jQuery Replace craziness

B3y steven 8/10/2009 10:33:00 AM

 

I spent way too much time figuring this out.

var originalString = “Batman And Robin”;

var replacedSpaces = originalString.replace(‘ ‘, ‘_’);

This doesn’t work, it only replaces the first instace of the match, so replacedSpaces == “Batman_And Robin”.

var replacedSpaces = originalString.replace(/ /g, ‘_’);

This does work, and now replacedSpaces == “Batman_And_Robin”.

 

Tags: ,

Powershell v1 Uninstall Nightmare

B3y steven 7/25/2009 9:58:00 AM

So I wanted to install the SQL 2008 Express edition but it has a pre-requiresite of Powershell v2, simple enough I thought.

It starts to install, and fails telling me that Powershell v1 is already installed and that I have to remove it. To remove it the screen says go into "Add or Remove Programs" and then remove powershell.

Ah but there is the problem, of course there is not a "Windows Powershell" it is something more like; "Hotfix for Windows XP (KB926139-v2)"

Sure that is very clear indeed. Found this here.

Enjoy!

Tags: ,

Powered By BlogEngine Enhanced with Snapshots

About the author

Steven Hildreth Steven Hildreth
Proof that anyone can setup a blog.

E-mail me LinkedIn Profile

Send mail Sign in

Recent posts