Every time I start a new web project I want to have create tons of little rounded corners for my web site. It's a pain because I'm not great at PhotoShop and it's a hassle if I want to change colors. I found a JavaScript library that does all of the rounded corners on the fly. It seems to have a lot of customizations that you can add and play with. The only bad thing is that it is a JavaScript library and you have to add a command to initiate the rounded corner creation. However, I think that you could very easily customize to pull the parameter from the div tags parameters and automate everything without any custom JavaScript in your HTML page. Anyways, check it out and use it however you can.
http://www.ruzee.com/blog/shadedborder
Monday, March 26, 2007
Wednesday, March 21, 2007
Typed Datasets
I've heard of typed datasets before but I just started using them on my current project. Wow, they're cool. Typed datasets are cool because you predefine the structure of the dataset (tables, columns, relationships, etc.) through Visual Studio 2005. Once defined, Visual Studio generates the code to create the class for the typed dataset. Now you get all the nice features of typical dataset but you can now also access the data in a type safe way. Instead of accessing the value of a column in row using:
currentColumn("ColumnA")
you can do this:
currentColumn.ColumnA
This is nice because a change of the data structure will cause compilation errors instead of runtime errors (runtime errors bad). Typed datasets are very cool. Microsoft has a very good tutorial on typed datasets: http://msdn2.microsoft.com/en-us/library/aa581778.aspx
currentColumn("ColumnA")
you can do this:
currentColumn.ColumnA
This is nice because a change of the data structure will cause compilation errors instead of runtime errors (runtime errors bad). Typed datasets are very cool. Microsoft has a very good tutorial on typed datasets: http://msdn2.microsoft.com/en-us/library/aa581778.aspx
Tuesday, March 20, 2007
FTP and .NET 2.0
One of my current projects has a requirement to send files programmatically via FTP. I found some great resources out there but the most useful is this one:
http://www.codeproject.com/vb/net/FtpClient.asp
The main point of his post is that he made a library for FTP'ing built on the FTPWebRequest object built into the .NET 2.0 framework. He does a great job of explaining the basics of using FTPWebRequest and then goes into details about his library. I found this article very helpful.
http://www.codeproject.com/vb/net/FtpClient.asp
The main point of his post is that he made a library for FTP'ing built on the FTPWebRequest object built into the .NET 2.0 framework. He does a great job of explaining the basics of using FTPWebRequest and then goes into details about his library. I found this article very helpful.
Thursday, March 08, 2007
Project Time Tracking
I do several side projects that require me to track the time I spend programming on each project. I found a site that allows you set up projects and start tracking their time. It works very well and is cool due to the AJAX features that it has. It also has very nice reporting feature.
http://www.toggl.com/
http://www.toggl.com/
Righ Click Context
I found this article about creating context sensitive right click context menu. You can display pretty much anything that you want. It's a very slick implementation:
http://www.harelmalka.com/rightcontext/
http://www.harelmalka.com/rightcontext/
Reading and Writing an Encrypted DataSet to Dis
My current project requires that I store a strong-typed dataset to the file system for offline storage. After doing some researching, I found this very helpful blog entry:
http://weblogs.sqlteam.com/davidm/archive/2006/06/13/10195.aspx
It basically serializes the dataset object, encrypts the serialization and then writes the resulting encrypted stream to file. It works great.
http://weblogs.sqlteam.com/davidm/archive/2006/06/13/10195.aspx
It basically serializes the dataset object, encrypts the serialization and then writes the resulting encrypted stream to file. It works great.
Wednesday, February 07, 2007
Running .NET Apps from Network Shares
One of my current projects requires that my application run from a network share. Not thinking that this would be a problem, I wrote my application and went to deploy it and amazingly, it didn't run. It threw a security error. After some digging I found out that .NET apps don't run with full trust when running from network shares (thankfully, big security problem if they did). They actually don't run with enough trust to even load the main form.
I found a thread that mentioned the solution: http://www.vbdotnetforums.com/showthread.php?t=1224 . Basically you just need to setup the security.config for the machine to grant full trust to your application. You can do it by hand or you can use the CASPOL utility that comes with .NET framework.
I found a thread that mentioned the solution: http://www.vbdotnetforums.com/showthread.php?t=1224 . Basically you just need to setup the security.config for the machine to grant full trust to your application. You can do it by hand or you can use the CASPOL utility that comes with .NET framework.
Config Files and Assemblies in the GAC
Be sure to read the update at the bottom of the post.
The 2.0 version of the .NET has improved the application configuration functionality a lot. Read/Write capability being one of the nicest new features. Combined with Visual Studio 2005’s
new settings dialog, using the app.config has gotten a lot easier.
The 2.0 version of the .NET has improved the application configuration functionality a lot. Read/Write capability being one of the nicest new features. Combined with Visual Studio 2005’s
new settings dialog, using the app.config has gotten a lot easier.
One of the main rules when using the app.config, is that the app.config file has to be in the same folder as its owning dll or exe. Which usually isn’t a problem unless your dll is sitting in the GAC. If you’ve had any experience with the GAC, you know that you can’t just add files to it. It only really accepts .NET dlls.
My current project requires a business layer that will be used by multiple applications, which is a great use of the GAC. There are some settings that will be needed by this business layer. So the question is: How do I get the app.config settings to work with a dll that is stored in the GAC?
It took some figuring out but I found a way. It's not the cleanest way but it works.
Copy your dll to the GAC (however you normally do it)Open command prompt (Start -> Run -> cmd)Change the path to Windows Root Folder\AssemblyDepending on what you have installed Change the path to:.NET 1.0 or .NET 1.1: cd GAC.NET 2.0: cd GAC_MSILIf you dir, you will see a list of all the assemblies installed into the GAC. Cd into your assembly's folderIf you dir again, you will see one folder with your assembly's version and public key token. Cd into this folderIf you dir again, you will be glad to see your assembly.Copy your config file to this folder via the command promptYour application should now be able to locate and use any configuration that you have added to that file.
UPDATED 2: Thanks to commenters on further research, the above option of serialization is not required. All you need to do is setup your settings for the built in app.config funcationality and then use the OpenMappedExecConfiguration method. Example:
Private Shared Function GetConfigurationSection() As Configuration.ClientSettingsSection
Dim codebase As String = System.Reflection.Assembly.GetExecutingAssembly().CodeBase
Dim fileMap As New Configuration.ExeConfigurationFileMap()
Dim p As New Uri(codebase)
Dim localPath As String = p.LocalPath
Dim executingFilename As String = System.IO.Path.GetFileNameWithoutExtension(localPath)
Dim sectionGroupName As String = "applicationSettings"
Dim sectionName As String = String.Format("{0}.My.MySettings", executingFilename)
Dim configName As String = String.Format("{0}.config", localPath)
fileMap.ExeConfigFilename = configName
Dim config As Configuration.Configuration = _
Configuration.ConfigurationManager.OpenMappedExeConfiguration(fileMap, Configuration.ConfigurationUserLevel.None) 'System.AppDomain.CurrentDomain.)
If config IsNot Nothing Then
Dim group As Configuration.ConfigurationSectionGroup = config.GetSectionGroup(sectionGroupName)
If group IsNot Nothing Then
Return DirectCast(group.Sections(sectionName), Configuration.ClientSettingsSection)
End If
End If
Return Nothing
End Function
Sunday, February 04, 2007
Another handy link
CellSwapper is a cool service that helps you find someone to take over you cell phone account by transferring your account to someone else.
http://feeds.feedburner.com/~r/Techcrunch/~3/73811460/
http://feeds.feedburner.com/~r/Techcrunch/~3/73811460/
VMware Converter
Found this news item the other day. This can change a lot how we do things.
http://news.com.com/2110-1010_3-6154353.html?part=rss&tag=2547-1_3-0-5&subj=news
http://news.com.com/2110-1010_3-6154353.html?part=rss&tag=2547-1_3-0-5&subj=news
Subscribe to:
Posts (Atom)