Gunnar Peipman's ASP.NET blog
ASP.NET, C#, SharePoint, SQL Server and general software development topics.
-
.Net Framework 4.0: System.IO.File supports now IEnumerable<string>
.Net Framework 4.0 adds also some new and cool features to file system objects. File class has now ReadLines() methods that returns IEnumerable<string>. WriteAllLines() methods has two overload methods that accept IEnumerable<string> instead of strings array that was also supported in previous versions of .Net Framework. This posting introduces ReadLines() and WriteAllLines() methods and gives you some ideas how to use these methods in your applications.
-
.Net Framework 4.0: string.IsNullOrWhiteSpace() method
.Net Framework 4.0 Beta 2 has new IsNullOrWhiteSpace() method for strings generalizes IsNullOrEmpty() method to incluse also other white space besides empty string. In this posting I will show you simple example that illustrates how to use IsNullOrWhiteSpace() method.
-
.Net Framework 4.0: Complex numbers
.Net Framework 4.0 Beta 2 introduces new class in System.Numerics namespace: Complex. Complex represents complex numbers and enables different arithmetic operations with complex numbers. In this posting I will show you how to use complex numbers in .Net Framework 4.0 applications.
-
My MVP continued!
Couple of days ago I got e-mail with good news: my ASP/ASP.NET MVP status continues! I am really glad because Microsoft finds my public activities good enough and it gives me certainty that I am moving the right way.
-
IIS won’t start – Error 13: The data is invalid.
After restarting my virtual development machine IIS was not able to start anymore. I checked out if there is something reported to Event Viewer and I found the following error message – Error 12: The data is invalid. It turned out that during shutdown of my virtual machine IIS config file was ruined. Solution to my problem was very simple.
-
Creating squared avatar images
In one of my current projects I needed something that takes image uploaded by user and converts it to avatar image. There is requirement for avatar images: they must be 32x32 pixel squares. Here is my solution.
-
Using LINQ to query object hierarchies
I used LINQ to solve the following problem: find all titles of objects at hierarchy level X when you know object ID in hierarchy level Y. I cannot imagine if there is some other solution that is same short and clear as one that LINQ provides. Take a look and decide by yourself.
-
GetValue<T>() extension method for RegistryKey class
I needed some elegant method to read registry values in my Live Writer Delicious bookmarks plug-in. RegistryKey has GetValue() method but it returns values as object. I wrote generic version of GetValue() as RegistryKey extension method. It returns you specified value from key and converts it to type you ask. If conversions are not successful then default value of given type will be used.
-
Bookmarks2LiveWriter: Live Writer plug-in for serious bloggers
Bookmarks2LiveWriter is Windows Live Writer plug-in that is targeted to serious bloggers who also publish bookmarks postings. Bookmarks2LiveWriter lets you download bookmarks for given date range from Delicious and inserts them to current posting. Users can remove unwanted bookmarks and format bookmarks list before inserting it. Bookmarks2LiveWriter is released under GPL. Installer and source code are freely available to everybody.
-
Links 2009-08-19
JQuery and web development
- Limit Number of Characters in a TextArea using jQuery
- Find out which Key was pressed using jQuery
- jQuery Superfish Menus Plug-in
- Make website images look like a video with this CSS effect
- CSS2 – opacity
Mobile
- 55 per cent of subscribers think content is too expensive
- RIM Files Patent for Merged Capacitive and Resistive Touchscreen
- HTC patents magnetic stylus for capacitive screens
Sharepoint
- Programmatically creating Wiki Pages
- Presenting MOSS Support Explorer (Not even Beta Yet)
- "This week in Pictures" web part in Sharepoint 2007 and Time Interval
- #SharePoint Site Collections and 100Gb Content Database guidance
Social Networks
- Facebook spam
- Twitter Co-Founder Evan Williams’ Wife Tweets to the World While in Labor
- Twitter-Written Opera Will Debut at Royal Opera House
- Stop the Presses! 40% of Tweets Are 'Pointless Babble'
- Twitter Used to Manage Botnet, Says Security Expert
Software
- DB Schema Viewer
- Game program for kids less than 2 years :)
- Using TCP Analyzer to Debug TCP Performance
- O3D:- Google Releases 3D support open api for web browsers
- Community Clips
- Remote Server Administration Tools RSAT for Windows 7 Released
Programming
- Multimethods in C# 4.0 with 'dynamic'
- Implementing Parallel While with Parallel.ForEach
- Instantiating interfaces
- Using Linq with Microsoft Word and Excel
- 20 tips to write a good stored procedure (is really just 12)
- Using the innerText Property in Firefox
Other stuff
- How to reset regional language to English in Windows Live Writer (Live Writer)
- Nhibernate and the Null object pattern (programming)
- Preparing Today for SharePoint 2010 Q&A (SharePoint 2010)
- What is a Smart Client anyway? (varia)
- WER Services : The Three Cs of Response Satisfaction (Windows)
- Download details: Virtual Hard Disk Getting Started Guide (virtual-pc)
- Creating Visual Guidelines inside Visual Studio (Visual Studio)
- Google’s Decision to Launch the Chrome Operating System Reflects the Growing Importance of Web Applications (Google)
- Google Services for Websites Adds New Tools (Google)