How do I share projects on the web?

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2008
Posts: 27
Reputation: edgar5 is an unknown quantity at this point 
Solved Threads: 2
edgar5 edgar5 is offline Offline
Light Poster

How do I share projects on the web?

 
0
  #1
Jan 17th, 2009
I'm starting to get the hang of writing VB.NET code--very simple jobs, but covering some esoteric subject matter. The first two tasks I needed to accomplish came about because I decide to import my (rather large) CD collection onto my new (also rather large) external hard drive; I used Apple’s iTunes. iTunes uses an online database to identify each CD and employs the information to create folder (i.e. album) and track (song) names. These names are truncated and/or abbreviated to fit file systems which only accommodate short file/directory names. Sometimes, the database cannot identify the album; as I have the original in hand, I can supply the missing information; unfortunately, iTunes makes no provision for this! I entered the missing info into a plain text file.

My first program asked for a target folder then inspected it for a text file called titles.txt. If found, it opened the text file and counted the number of .m4a (music) files in the folder. If the text file had the same number of titles as tracks in the folder, it renamed the tracks to match the names. Unfortunately, there are a few illegal characters where file/folder names are concerned. The program has provisions for replacing invalid characters as designated by the user. This worked great for the song titles which were missing!

RenameSongs3.zip


My second task was a bit more daunting! The actual .m4a file contains the complete song title but the file has a truncated/abbreviated name, this is displeasing to my perfectionist eye! I wrote a second program which, when pointed at a folder, looks at every .m4a file in it and all sub-folders it contains, and reads the song name from the file then renames the file appropriately (given that the file system I use may contain very long names and replacing any invalid characters). This required two fairly difficult (for a beginner) sub-tasks—one was to recursively inspect all sub-directories the other was to parse the meta-data in an MP4 (.m4a) file.

tag2file.zip

Years ago I knew how to post code projects on my web page (different OS!) I may be able to figure out how to zip up a project and post it on my website, but what do I need to include, to make the offering useful? I have downloaded tons of code examples and not a single one would compile! Sometimes the code itself was worth reading, but I would like folks to be able to compile and run my examples. I will try zipping the project folder and sticking that on my site.
Last edited by edgar5; Jan 18th, 2009 at 12:00 am. Reason: -ed.--add web links
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++

Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: How do I share projects on the web?

 
0
  #2
Jan 18th, 2009
Very great you can share them and make communities around them too at http://codeplex.com
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 27
Reputation: edgar5 is an unknown quantity at this point 
Solved Threads: 2
edgar5 edgar5 is offline Offline
Light Poster

Re: How do I share projects on the web?

 
0
  #3
Jan 18th, 2009
Originally Posted by RamyMahrous View Post
...you can share them and make communities around them too at http://codeplex.com
I had not found codeplex--looks like a good resource for both mining and posting code. Thanks!
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++

Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: How do I share projects on the web?

 
0
  #4
Jan 18th, 2009
and what about http://sourceforge.net/ ?
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 27
Reputation: edgar5 is an unknown quantity at this point 
Solved Threads: 2
edgar5 edgar5 is offline Offline
Light Poster

Re: How do I share projects on the web?

 
0
  #5
Jan 18th, 2009
Originally Posted by RamyMahrous View Post
and what about http://sourceforge.net/ ?
I'm a member at Sourceforge but do not find it user friendly. For me, as a seeker of sample code, not a single one of at least 15 VB.Net project I got there would compile and run! I think the major changes in VB2008 are the culprits !

I am working on the second project today (tag2file). It is still very rough! Am learning about Try...Catch...Finally. When last I coded (about 8 years ago) they were just showing up and I never really learned the details. Is this proper:



  1. Try
  2. My.Computer.FileSystem.RenameFile(fileNameFull, fileNameWext.ToString())
  3. Catch Ex As ArgumentException
  4. Catch Ex As FileNotFoundException
  5. Catch Ex As PathTooLongException
  6. Catch Ex As IOException
  7. Catch Ex As NotSupportedException
  8. Catch Ex As SecurityException
  9. Catch Ex As UnauthorizedAccessException
  10. MsgBox("Uncaught file rename error. " + Ex.GetType().Name + vbNewLine + "Did NOT rename:" + vbNewLine + fileNameFull)
  11. Finally
  12. MsgBox("Unknown uncaught file rename error. Did NOT rename:" + vbNewLine + fileNameFull)
  13. End Try

or do I have to catch each seperately with its own MsgBox?
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++

Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 27
Reputation: edgar5 is an unknown quantity at this point 
Solved Threads: 2
edgar5 edgar5 is offline Offline
Light Poster

Re: How do I share projects on the web?

 
0
  #6
Jan 18th, 2009
Originally Posted by edgar5 View Post
  1. Try...End Try
or do I have to catch each seperately with its own MsgBox?
Ah, now I see! If I want a generic "catch all" I use:
  1. Try
  2. ...
  3. Catch exp As Exception
  4. MsgBox("An error occurred while attempting to load a file. The error is:" + System.Environment.NewLine + exp.ToString() + System.Environment.NewLine)
  5. End Try
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++

Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: How do I share projects on the web?

 
0
  #7
Jan 18th, 2009
You've to. and don't write catch code in Finally (because finally code executed in all cases)
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 27
Reputation: edgar5 is an unknown quantity at this point 
Solved Threads: 2
edgar5 edgar5 is offline Offline
Light Poster

Re: How do I share projects on the web?

 
0
  #8
Jan 18th, 2009
Originally Posted by edgar5 View Post
  1. Try...End Try
or do I have to catch each seperately with its own MsgBox?
Ah, now I see! If I want a generic "catch all" I use:
  1. Try
  2. ...
  3. Catch exp As Exception
  4. MsgBox("An error occurred while attempting to load a file. The error is:" + System.Environment.NewLine + _
  5. exp.ToString() + System.Environment.NewLine)
  6. End Try
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++

Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 27
Reputation: edgar5 is an unknown quantity at this point 
Solved Threads: 2
edgar5 edgar5 is offline Offline
Light Poster

Re: How do I share projects on the web?

 
0
  #9
Jan 18th, 2009
Originally Posted by RamyMahrous View Post
You've to. and don't write catch code in Finally (because finally code executed in all cases)
Ah, " finally code executed in all cases" that was very helpful info!
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++

Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: How do I share projects on the web?

 
0
  #10
Jan 18th, 2009
Exactly and in .net 2.0 and later you can write
  1. 'try block
  2. catch..
  3. catch..
  4. catch..
without need to use nested try catch
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC