Archive for April, 2013

CollectionViewSource: avoid useless refresh

April 23, 2013

Interacting with CollectionViewSource is an effective way to implement special behaviours our end users very eager of.
CollectionViewSource showes almost immediately its result, but when you move big quantity of data, it might update too often;
end users’ feedback might be something … inelegant (ie: why list is flashing ?)

A simple solution is DeferRefresh() method, postpone useless refresh and will show last one.
Sample code might be:

ICollectionView dataView = CollectionViewSource.GetDefaultView(listBox.ItemsSource);
using (dataView.DeferRefresh())
   SortDescription sd = new SortDescription(newField, ListSortDirection.Ascending);

source: CollectionView.DeferRefresh() : My new best friend

Technorati tags: WPF,CollectionView,CollectionViewSource

VirtualBox: how to move a vm to another disk

April 21, 2013

It has passed long time, since I learned to sotre vm disks (vdi,vhd,…) among several disks (physical disks, nas, usb, network, …), for performance issues.

It happens also to move VMs from one disk to another (brabd new 3TB hard disk 🙂 ) or pc-to-pc.

This post in Virtual Box forum is really usefull: How to move a VM to another disk (same machine), this post has helpfull step-by-step instruction.

Here I copy them briefly, but remember to read full post

1.) Copy your “VirtualBox VMs” folder from its current location which is “C:\” to any location you desire. (Remember,Do not delete yet. Only copy,just incase.)

2.) Change your “Default Machine Folder” to the new location.

3.) Now go back to your VirtualBox Manager. Right click on your Guests and click “Remove”. It’ll pop up with 3 options, IMPORTANT: Click on “Remove only”. (Remember,Do not delete anything yet).

4.) Now close your VirtualBox Manager. And then Right click on toolbar “Start Task Manager”. Inside Task Manager, go to “Processes”…. Check to see if “VBoxSVC.exe” is still running…. If yes, click on it and “End Process” …If no,it has timed out and you’re good to go. F5 to refresh your desktop.

5.) Open your VirtualBox Manager again. Go to “Machine,Add”. Your new location should be there automatically. If not, just locate,Then use the add feature to add your guests back one at a time. (select the *.vbox file).

Hope it helps

Next step: and what about a vdi with snapshots?

Technorati tags: VirtualBox

GetPropertyName via reflection

April 5, 2013

Reflection is very usefull, and most of the time it needed horrible (but precious!) code to write. No matter about class, helpers, static methods, extension methods, or whatever, that code was awful.

Because every developer is lazy, I was looking for a elegant way to use reflection and Expression, and found this ReflectionUtility that was the right one for me: How to get C# property names without magic strings – static reflection.

You can call it this way:
ReflectionUtility.GetPropertyName(() => myOrder.CustomerCode);

This post worth a read: How to get C# property names without magic strings – static reflection


Supercomputer ready for retirement…

April 3, 2013

Recently I talked about parallel computing (here) and today I just faced with “IBM Roadrunner, the first petaflop machine, goes offline today.” in World’s top supercomputer from ‘09 is now obsolete, will be dismantled

IBM RoadRunner started in 2008 and now it became too expensive to run, but it’s still in top 25 (#22) .

Current supertcomputer give us double petaflops per watt performance/cost, compared to RoadRunner.

Hei, what’s the powerbill this month?  😦

But it’s life isnt’ ended at all, his electronic parts will be analyzed for future supercomputers’ projects.

source: World’s top supercomputer from ‘09 is now obsolete, will be dismantled

Technorati tags: Parallel

Instant Team Foundation Server 2012 and Project Server 2010 Integration How-to [Instant] by Gary P. Gauvin

April 2, 2013

Eccomi qui appena letto questo libricino su TFS e Project Server: Instant Team Foundation Server 2012 and Project Server 2010 Integration How-to [Instant] by Gary P. Gauvin.

Sono poche pagine, neanche 50, ma cariche di aiuti e informazioni; un libro essenziale e pratico.
L’autore ripercorrre i passi necessari per attivare l’integrazione fra TFS-Project Server (e Sharepoint), sia in caso di nuova attivazione che di upgrade;
c’è anche una requirement-checklist sui componenti e versioni corrette, e sui componenti extra che facilitano la gestione ed ovviamente sono “caldamente consigliati” (es Active Directory, Backup).

L’esposizione è chiara e semplice, una guida passo-passo, con tanto di indicazioni precise, a menu-checkbox-campi da selezionare/cliccare, per tutta la procedura.

Ci sono anche molte note che chiariscono i piccoli errori che possono essere commessi (es: non mettete lo spazio fra …) e che, in passato, ci richiedevano di tornare sui nostri passi per risolvere piccole&grosse “noie” che si presentavano di volta in volta.

C’è anche una sezione riguardante la configurazioni di permessi e sicurezza per utenti, service account e accesso ai database, che infatti è segnalata come “Must know”. 😉
E’ presente una tabella richiesta/intervento che aiuta a capire quali sono i punti di intervento (TFS, Project Server,…) in funzione della esigenza.

Infine, è presente una sezione con script Powershell e link per approfondimenti su argomnti ed applicativi citati nel libro.

Una piccola nota a margine: mi sarei aspettato una sezione di troubleshooting, anche non esaustiva;
tutte le indicazioni presenti nel libro lavorano nella direzione di ridurre le occasioni di errore, ma forse per sarebbe stato utile un aiuto nell’analisi delle problematiche per orientare il lettore nella giusta direzione di ricerca&soluzione.

Buona lettura

Technorati tags: TFS, MS Project