Archive

Posts Tagged ‘Visualization’

Suggestion: implement ignore keyword or allow missing catch block in C#

This is a suggestion I’ve just sent in via Visual Studio’s “Send a frown” feature (rewritten here a bit differently from memory, since that feedback channel doesn’t allow you to access your previous feedback as the Microsoft Connect or the Uservoice site does) :

Instead of having to write

try
{

}
catch (SomeExceptions)
{
//NOP (ignored)
}

I’d like to be able to write

try
{

}
ignore (SomeExceptions);

and similarly if a finally block is used, allow:

try { … }

ignore(SomeExceptions)

finally { … };

That is, I suggest adding an “ignore” keyword, introduced to C# in order to ignore specific exceptions.

Alternatively, could allow a missing catch block, so that the catch (…) clause would be able to be followed directly by a “;” to end the try/catch statement, or by a “finally” clause and its code (sub)block.

try
{

}
catch (SomeExceptions);

and when finally block is used:

try {…}

catch(SomeExceptions)

finally { … }

I’ve also uploaded this for voting up here:
http://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/9453432-implement-ignore-keyword-or-allow-missing-catch-bl

Nice DeepZoom image samples via ClipFlair Studio’s Image component

Here are some DeepZoom image samples to enjoy via ClipFlair‘s Image component, in our ClipFlair Studio app (Silverlight-based):

Another impressive one is this Mandelbrot fractal, a dynamically generated DeepZoom image from Google AppEngine SDK demos:

http://studio.clipflair.net/?image=http://mattjmandelbrot.appspot.com/mandelbrot256.dzi

You can point the mouse and scroll the mouse wheel or double click to zoom in where you want.

One can make DeepZoom tiled images and DeepZoom image collections (can read more at http://msdn.microsoft.com/en-us/library/cc645050%28VS.95%29.aspx) with various authoring tools, including DeepZoom Composer (can read more about that tool at http://msdn.microsoft.com/en-us/library/dd409068%28loband%29.aspx)

However, the easiest way is to use ZoomIt service (http://zoom.it/pages/create/) to make a DeepZoom image wrapper (hosted at that site) for any big image on the web (giving it the original image URL). e.g. http://zoom.it/wR4i is a ClipFlair Poster (the respective DZI image is at http://cache.zoom.it/content/wR4i.dzi – internally ClipFlair’s image component converts zoom.it URLs to get the real .DZI image and show it)

Fix: Visual Studio opens class diagram in XML editor with double click

Recently, to save myself sometime after having renamed some interfaces/classes in the ClipFlair project sourcecode, I right-clicked one of the class diagrams (.cd files) in it at Visual Studio’s “Solution Navigator” (this is an enhanced Solution Explorer addon) and using “Open With…” I opened up the diagrams with the XML editor to do a rename-all operation for the respective class names.

However, after saving the project I found out that from then on, that specific .cd file was opening up as XML file when double-clicked instead of opening up as a Class Diagram in the respective designer pane. Using Open With dialog would open it as a Class Diagram when asked to specifically, but using the checkbox to always open up as Class Diagram wouldn’t help fix the double-click problem for that specific .cd file (others would open up fine as class diagrams, not as XML files, when double-clicked).

I just managed to fix that issue by right clicking the file node in solution navigator’s tree and and excluding that file from the project (not deleting!), then saving the project, closing the solution containg the project and adding the file (via “Add existing file”) again after having reopened the solution. I could also possibly have right clicked selected “Unload project” after saving it and then select to reload it again, think that would have worked too.

Using VisualHG addon for Visual Studio I commited the changes to the Mercurial repository used by ClipFlair on Codeplex, which showed me that the file difference that did the fix was the following in the .csproj project file:

   <ItemGroup>
     <None Include="Diagrams\Windows.cd" />
-    <None Include="Diagrams\Windows.Views.Interfaces.cd">
-      <SubType>Designer</SubType>
-    </None>
+    <None Include="Diagrams\Windows.Views.Interfaces.cd" />
     <None Include="Diagrams\Windows.Views.ViewModels.cd" />
   </ItemGroup>

 

That is instead of that marked-as-bold entry above (marked by the diff tool with – prefix), the line marked with + prefix should be used instead. This is obviously some bug in Visual Studio 2010, it’s nice to know though that you can easily take the project offline and edit the .csproj to fix it (or remove the .cd file, save the project, reload it and add the file again).

PivotViewer for a rich search experience

For ClipFlair, I’m looking into implementing advanced search using Silverlight PivotViewer

Update: 

You can now check out ClipFlair Gallery in all its PivotViewer with DeepZoom glory.

A really nice example of PivotViewer search is at:

http://www.appletoncompassion.org/VirtualExhibitViewer

This may take long time to load, since its loading 10000 children art DeepZoom image tiles

You can use the mousewheel to zoom in there or the zoom slider at top-right (can also click an item to zoom to it)

See the filters at the left handside, play with them by selecting items there at the various properties to see the images get rearranged to show only ones selected by the filters.

Has also buttons at the top-right to bin the items based on having same values at properties selected

Another good example is Netflix movie catalog:
http://netflixpivot.cloudapp.net/
e.g. select Sort: Genre at top-right and click Graph View button there instead of the default Grid View to see the items get binned by Genre, then start filtering them down from the left handside bar

Also see a SharePoint sites collection search with PivotViewr:
http://www.wssdemo.com/livepivot/

MSDN magazine collection with PivotViewer:
http://pivot.blob.core.windows.net/msdn-magazine/msdnmagazinepivot.htm

Finally, for a nice series of Silverlight PivotViewer programming articles by Tony Champion see:

http://tonychampion.azurewebsites.net/blog/index.php/tag/pivotviewer/

http://pivotviewerlessons.codeplex.com/ (source code)

http://pivotviewer.championds.com/ (live examples)

BTW, people are also working on HTML5 PivotViewer:

http://www.rogernoble.com/2012/02/02/addressing-the-elephant-in-the-room-the-html5-pivotviewer/

http://lobsterpot.com.au/lobsterpot-html5-pivotviewer-now-open-source

http://lobsterpothtml5pv.codeplex.com/

http://lobsterpot.com.au/pivotviewer/api-reference

http://lobsterpot.com.au/pivotviewer/extending-the-html5-pivotviewer

http://pivot.lobsterpot.com.au/html5.htm (Live HTML5 Sample)

http://examples.hubbardone.com/html5/html5pivotviewer.htm (Live HTML5 Sample)

For developers, here are some direct links to .CXML (Collection XML) files:

http://gallery.clipflair.net/collection/activities.cxml
http://gallery.clipflair.net/collection/video.cxml
http://gallery.clipflair.net/collection/images.cxml

http://pivot.blob.core.windows.net/msdn-magazine/msdnmagazine.cxml
http://images.appletoncompassion.org/deepzoomfull/AppletonCompassionFull.cxml
http://www.esrc.ac.uk/Pivot/CXML/Grants/Grants.cxml
http://labs.championds.com/MIX10/MIX10Collection.cxml
http://spscollection.blob.core.windows.net/pivot/SharePoint.cxml
http://www.xpert360.net/SQLBits/Collection.cxml
http://pivot.metia.com/worldcup/wc2010-dz.cxml

By opening the .CXML file URL in a web browser you can see its XML-based structure.

By using ClipFlair Studio‘s Gallery component you can open most of those .CXML URLs and play with the respective collection (you use the wrench button on the Gallery component’s titlebar to turn it over and set the Source URL, then turn over again to see the collection – just wait a bit if it’s big and takes some time to load).  An alternative is to open in your browser a URL of the form http://studio.clipflair.net?gallery=http://spscollection.blob.core.windows.net/pivot/SharePoint.cxml

Not all of these URLs will work in ClipFlair Studio’s Gallery component though, because some servers may be using restrictive access policy files for Silverlight, not allowing a Silverlight app like ClipFlair Studio which is served from http://studio.clipflair.net to download the .CXML file.

Prime links

http://io9.com/5819325/the-bizarre-mathematical-conundrum-of-ulams-spiral

http://scienceblogs.com/goodmath/2010/06/the_surprises_never_eend_the_u.php

http://img529.imageshack.us/img529/615/ulam3.png

http://imprompt.us/2010/ulam-spiral-take-2/

http://home.manhattan.edu/~peter.boothe/ulam.pdf

http://mathworld.wolfram.com/PrimeSpiral.html

http://blog.morphism.com/2010/05/building-numbers.html

http://blog.morphism.com/2010/07/pdfs-from-building-numbers.html

http://math.ucr.edu/home/baez/roots/

http://math.ucr.edu/home/baez/roots/polynomialrootssmall.png

http://incubator.quasimondo.com/flash/wheel_of_primes.php

http://incubator.quasimondo.com/flash/Primeverse_1024.html

http://rob.tarrfamily.com/share/Triangle.gif

http://www.numberspiral.com/

http://www.numberspiral.com/p/p006.html

http://www.numberspiral.com/p/common_diff.html

http://punarvak.blogspot.com/2010/07/ulam-spirals-and-its-variants.html

http://oeis.org/A113688

 

btw, via the last link I came across to the very interesting “On-Line Encyclopedia of Integer Sequences” http://oeis.org/Seis.html (a service of http://oeisf.org/). Their search facility allows you to enter a series of numbers separated by space or comma and check if they exist in some known integer number series.

Categories: Posts Tags: , , ,

Οπτικοποιώντας το φώς

Πρόσφατα έκανα κριτική ανάγνωση (review) μιας προτεινόμενης δημοσίευσης για το συνέδριο ΤΠΕ-Ε 2011 (http://www.ekped.gr/?p=202), που είχε σχέση με την πρόσληψη της έννοιας του φωτός και της σκιάς από τα νήπια. Ανέφερε πως έχουν πρόβλημα να οπτικοποιήσουν νοητά το φως ως “ακτίνες” (όχι ότι είναι ακριβώς ακτίνες βέβαια, κύμα είναι) και τη διάδοση του.

Σκεφτόμουν ένα πείραμα όπου περνά φως μέσα από ένα κλειστό διαφανές κουτί που περιέχει σκόνη, το οποίο μετά ανακινείς για να εμφανιστεί το φως πάνω στη σκόνη, ή και συνδιασμό διαγραμμάτων και βιωματικής εμπειρείας.

Σχετικά με τη διάδοση του, ο φωτεινός κώνος μιας εστιασμένης φωτεινής πηγής (spot cone) μεγαλώνει όσο απομακρύνεσαι από την πηγή, άρα αν τον οπτικοποιήσεις τα παιδιά μπορούν να συλλάβουν την κατεύθυνση του φωτός (από το μικρό προς το μεγάλο) και τη διάδοση (ιδίως αν παραλληληστεί με τον κυματισμό γύρω από μια πέτρα που πέφτει στο νερό). Αν συνδυαστεί με καθρέφτες που τοποθετεί/μετακινεί ο μαθητής, η διάδοση μπορεί να γίνεται ίσως ακόμη πιο σαφής.

%d bloggers like this: