Thursday, August 13, 2009

Things I should do before I die...

  • Take the LSAT, Apply to Law School
  • Take the GMAT, Apply to Business School
  • Get a Degree in Engineering (Structural would be cool)
  • Be Scuba certified
  • Take Wilderness Survival training
  • Own my own (successful) business
  • Learn Spanish (Fluently)
  • Learn to weld (You can make anything welding)
  • Own a Ranch

Wednesday, March 11, 2009

Massive Error: The "AllowedRelatedFileExtensions" parameter is not supported by the "ResolveAssemblyReference" task. Verify the parameter exists on th

Error:

"The "AllowedRelatedFileExtensions" parameter is not supported by the "ResolveAssemblyReference" task. Verify the parameter exists on the task, and it is a settable public instance property."

Kind of a crap error in my opinion!

Solution:

Uninstall and reinstall the .NET Framework 2.0 ( and every other .NET Framework for surety.)

If you get something like this message when going through "Install/Remove Programs" (start->control panel):

"Patch Package could not be opened"

during uninstall (like I did :((( ) then use this guy (I call him the "Software Eradicator" because he is ruthless so be careful):

Download the Windows Installer CleanUp Utility package now.

{Referenced here:http://support.microsoft.com/kb/923100}

Now reinstall:
Download details: .NET Framework Version 2.0 Redistributable ...

And I installed the service pack too:
Download details: .NET Compact Framework 2.0 SP1 Redistributable

You are back on the road again.

Grats Googlers.

-Technage

Tuesday, March 10, 2009

C#, VB.NET, ListView Groups are not showing


Listview not showing groups? This could be your problem.

Scenarios:
  • I have done everything to display groups but they refuse to display!
  • Cannot see groups in listview
  • Listview has groupings but no groups at runtime
  • listview does not show groups
  • listview not showng groups
Solution:
Application.EnableVisualStyles()

Call it at the beginning of your App, this will only effect people who decide to add this to an older app in most cases.

I ripped my hair out for a while before finding this in the documentation. Grats googlers I did the work for you.

ListView groups are available only on Windows XP Home Edition, Windows XP Professional, Windows Server 2003 when your application calls the Application..::.EnableVisualStyles method. On earlier operating systems, any code relating to groups has no effect and the groups will not appear. For more information, see ListView..::.Groups.

p.s. - Another possibility is you are viewing in details but do not have a column added.
p.p.s. - Another possibility is you do not have listview1.showgroups = true.
p.p.p.s. - You can also set this in the properties rather than calling it. (Picture below p.p.p.p.s.)
p.p.p.p.s. - If you are running anything older than XP, Server 2003, etc you cannot view visual styles and are screwed until you update.

Tuesday, March 3, 2009

Coding Suggestion Box

Prior to becoming a programming stud *manly flex* I often wanted to be able to ask real programmers questions since programming was my career path from high school. I had many long nights trying to figure out my Pythagorean command line programs in Yahoo Programming chat rooms which seemed to have few to no real programmers!

Well folks I am a real programmer, though far from the best! And I am here to lend a helping hand to coders or future coders.

I am taking this idea from Raymond Chen (Old New Thing) at Microsoft. (Raymond is the GURU at windows API and the guts of the OS, in my opinion, if you ever need to figure out how to have a remote object send a keyboard play key to the computer serving your music up to the office this is the guy to ask how to get 'er done{yes I have a "Music server" program that lets me control our office computer with speakers, hey its all the way like 15ft away I can't get up to mute the bad songs everytime!}) and opening up a suggestion box for problems people would like to see if I could solve. Not that I think I am as good as Raymond but sometimes Celeb's like him focus on their niche and can't get to little things.

I love trying to solve problems and helping people in the process is great. If I really started posting all my problems and solutions I would be on to a gold mine of posts but sometimes I just want to get my own problems behind me. So I view this as a sort of giving back, I remember when I started programming and wished there were some people I could ask questions or bounce ideas off of.

Well I am stepping up to fill that role on this blog! Just post a comment on this and I will review it and try to come up with a solution.

Lets try and stick to my focuses though (if you want a quick answer) :
  • .NET (C# or VB.NET, ASP.NET)
  • JavaScript
  • Ajax
  • SQL (MySQL, SQLServer )
  • HTML
  • XML
I am generally ok in other stuff (Java, Perl, Python, VBS) but more often I might not know.

So anyway let me know if you want to give me a challenge!

Wednesday, February 25, 2009

Dynamically adding an anchor tag with Javascript

I found a post with someone trying to add this:



<a name="Example" onmouseover="Tip('Example')" onmouseout="UnTip()">[?]</a>


to the page for each LI that has Element Search inside it.



As part of my own quest to get more familiar with Javascript I am going to take
this example on.




They need to be able to do this dynamically which means javascript on the client
side.



CODE


<li><a href="http://www.blogger.com/example.aspx">Example</a></li>




Requirments


The LI's are generated depending on user preferences, so we cannot just replace them.


We cannot alter the data pulled, only add functions after the data has loaded.







Here is what the poster had:



CODE



var items = gid('sideMenu').getElementsByTagName("li");

for(var i=0;i<items.length;i++){

    if(items[i].innerHTML == "Element Search"){

        var somehtml = document.write("<a name=\"Example\"
onmouseover=\"Tip('Example')\" onmouseout=\"UnTip()\">[?]</a>");

     
     items[i].appendChild(somehtml);

    }

}






This is a good start but Document.Write() does not really make an HTMLelement we
can grab.



Here is a different approch.  Lets use the createElement and createTextNode
functions that are on the document object.  In this way we are using the DOM
(Document Object Model) and not just writing to the document text.

CODE



for(var i=0;i<items.length;i++){

    if(items[i].innerHTML == "Element Search"){

        var anchorTag = document.createElement('a');

        anchorTag.appendChild(document.createTextNode("[?]"));



        anchorTag.setAttribuate('name', 'Example');

        anchorTag.setAttribute('onmouseover', 'Tip("Example")');

        anchorTag.setAttribute('onmouseout', 'UnTip()');

        items[i].appendChild(anchorTag);    

    }

}




If I get an example to test this I will but for now I am going to send it off to
that user.  Now we have created elements and dynamically added them using Javascript
to the DOM this should be a much more robust method.