OSX – NTFS read/write
For OSX 10.6: http://hints.macworld.com/article.php?story=20090913140023382
Snow Leopard has the ability to mount NTFS volumes as read/write, but it’s not enabled by default — just read only is supported, as in 10.5. Here’s how to get full read/write support for NTFS drives in Snow Leopard. First, uninstall NTFS-3G or Paragon if you’re using either one.
Here’s how to get read/write support for NTFS drives in Snow Leopard:
1. In Terminal, type diskutil info /Volumes/volume_name, where volume_name is the name of the NTFS volume. From the output, copy the Volume UUID value to the clipboard.
2. Back up /etc/fstab if you have it; it shouldn’t be there in a default install.
3. Type sudo nano /etc/fstab.
4. In the editor, type UUID=, then paste the UUID number you copied from the clipboard. Type a Space, then type none ntfs rw. The final line should look like this: UUID=123-456-789 none ntfs rw, where 123-456-789 is the UUID you copied in the first step.
5. Repeat the above steps for any other NTFS drives/partitions you have.
6. Save the file and quit nano (Control-X, Y, Enter), then restart your system.After rebooting, NTFS partitions should natively have read and write support. This works with both 32- and 64-bit kernels. Support is quite good and fast, and it even recognizes file attributes such as hidden files.
Lion / Mountain Lion: http://www.cheeming.com/2012/05/13/enable-ntfs-read-and-write-support-in-osx-10-7-lion.html
If you require NTFS read and write support in OSX Lion, like you have a portable USB hard drive formatted with NTFS, you can do the following:
Install OSXFUSE
Download the latest OSXFUSE and install it. The one I tested with is version 2.3.9. OSXFUSE is a drop-in replacement for MacFUSE which is no longer actively maintained and not known to work well with OSX Lion (there might be some versions of MacFUSE that might work with Lion but I didn’t investigate further). When installing, please ensure that the compatibility layer is installed to make it a drop-in replacement for MacFUSE. This will make it work well with file systems that do not have native support for OSXFUSE yet.
Install NTFS-3G
Download the latest NTFS-3G and install it. The one I tested with is version 2010.10.2. The one I used is the open source version. There are commercial versions if you prefer that.
Fix the timeout issue in NTFS-3G
There is a bug with NTFS-3G in OSX Lion which will cause a popup message about “15 seconds” timeout error when a NTFS filesystem is being mounted. To quickly fix this, download the following fuse_wait package and install it or you can check the following page for more details.
Once that is done you should have NTFS working on OSX Lion properly.
Calendar text entries
The calendar text entries in the month view do not resemble your appointments data. Instead they’re latin proverbs:
The texts aren’t from your calender. They use more lines to show you’re busy that day or not. These are the texts used in the month view:
Dignis milt
Worthy of milt.Nulla facilis
There are no easy ones.Aliquam sodale
A memberNam rhoncus nis
For the workNam nec vulputate
For the buildersHello from Seattle
Hello from SeattleSuspendisse egetos
We sufferMaecenas sem mattis
Read more hereClas aptent tacitis
And drive the fleet of silenceVestibulum imperdiet
Your event
Quotation from Answer on http://windowsphone.stackexchange.com
The beauty that are anonymous methods
I recently came to see code, that used anonymous methods in a very elegant fashion. As very simplified example:
using System; using System.Collections.Generic; namespace ConsoleApplication2 { class Program { static void Main ( string[] args ) { new List<string> { "a", "b", "c", "d" }.ForEach( print => Console.WriteLine( print ) ); } } } |
Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes is an article on MSDN which is a good starting point. Used wisely on a chosen place, it makes the code short and readable. Going crazy makes it essentially unmaintainable. As for me, I think I should get more familiar with that along with LINQ and the ideas behind.
Windows 8 app hero cake
We received a nice cake from Microsoft today for our participation on Windows 8 launch. We created a first, early release for a photo book application on Windows 8 together with FUJIFILM.
Visit http://www.syzygy.de (German) to see what we do more.
EF: Using HierarchyId with EntityFramework
While evaluating EntityFramework again for a possible use in a new project I decided to tackle HierarchyId support first. The sad news first: there is no built-in way to work with HierarchyIds. The same goes for spatial data, at least for the time being. Both data types are user defined data types, which makes it hard to nearly impossible for a ORM to be database agnostic and supporting that type. Julie Lerman (she has written the well known Programming Entity Framework book) has published an article together with Jason Follas) how to read spatial data (note: the Entity Framework June 2011 CTP introduced a much more streamlined, integrated way of doing this). Essentially this should be possible with HierarchyId, too.
To setup my testing I created a EmployeeData table with data in a new SQL Server 2008 R2 database (I don’t like fiddling in existing databases, so I create and drop test databases frequently). I used the sample code from here, as I’m as lazy as a developer should be. Note: there is a download link at the end of the page. It will save you some time, as the double colons between hierarchyid and GetRoot() aren’t visible on the page and you’ll have to fill them in and add a primary key to the table. Latter is important, as EF doesn’t work on key-less tables.
Data setup, now we need to make EF happy. According to the aforementioned blog entry you need to cast to a binary column, this is best done with a view.
The view’s code is straightforward, once you know which type you should use:
CREATE VIEW [dbo].[EmployeeDemoView] AS SELECT CONVERT( [varbinary](MAX), OrgNode, 0) OrgNode, EmployeeID, LoginID, Title, HireDate FROM dbo.EmployeeDemo |
Now I created a simple console application and added a reference to EF using NuGet (if you don’t know this, do yourself a favor and learn it – it’ll save you tons of time). Add a new model and connect it to the database. I’ve omitted the table, just went for the view.
All columns were there, moved on to coding. A bit of googling and looking into the SQL Server types unveiled the Read method of SqlHierarchyId. What I had to learn, was to successfulle read the stream, the variable has to be initialized as a Null SqlHierarchyId. So my testing looked like this:
using ( ConsoleApplication1.MyDataContextEntities ctx = new MyDataContextEntities() ) { var employees = ctx.EmployeeDemoView.ToList(); foreach ( var item in employees ) { var hierarchyID = Microsoft.SqlServer.Types.SqlHierarchyId.Null; var loginID = item.LoginID; using ( var stream = new System.IO.MemoryStream( item.OrgNode ) ) { using ( var rdr = new System.IO.BinaryReader( stream ) ) { hierarchyID.Read( rdr ); } } Console.WriteLine( "{0},{1}", loginID, hierarchyID ); } } |
There is no way to query for an HierarchyId, but at least you can use it.


