SmartSniff

by Administrator 27. Juni 2010 03:43

If you're looking for lots of good utilities for your daily job, have a look at NirSoft. SmartSniff is an ultra lightweight sniffer, that can run using RAW sockets (along with Pcap and Network monitor). PacketMon pretty much does the same, however SmartSniff is much better in it's GUI.

Tags:

Tools

Song_13

by Administrator 20. Juni 2010 02:51

New song added.

Enjoy :P

Tags:

Music | My Stuff

BP Spills Coffee

by Administrator 17. Juni 2010 02:15

Check out this video - damn funny.

 

Tags:

Fun Stuff

SilverDebugView

by Administrator 16. Juni 2010 15:03

Ok, this visual tree dumping thing actually kept me thinking, whether there is a way to have a GUI displaying the visual tree instead of just dumping it to the console. I came across things like calling WCF services or writing a debugging visualizer, but none of this seems really feasable. Then I found out about the LocalMessageReciever/LocalMessageSender mechanism which is out there since Silverlight 3. In a nutshell it allows for posting messages in between multiple Silverlight applications running on the same box. So I made a prototype that goes ahead and serializes the visual tree into such messages and have a Silverlight app on the other hand decoding and displaying the tree. The effect is really stunning. For my test solution I created 3 projects:

  • The project containing the debug library that can either be invoked via the immediate window when debugging or just be called via code.
  • A test application that dumps it's visual tree.
  • A Viewer application that displays the visual tree.

To dump a visual tree, just use this command:

d.vt ([RootObject});

I wired up this call to the click handler of the button in the test application, but as I said it works in the immediate window as well.

The viewer application will pick the dump packets up reassemble them. Packets using the LocalMessageReciever/LocalMessageSender Api may not supercede a size of 40k which might now be enough in some cases, so I added a fragmentation mechanism. The receiver is pretty straightforward and allows navigating in between received packets.

As you can see from the screenshot, we received three visual tree messages. I kept the format for messages open, so that it's possible to implement other message types and viewers for those. This is just a proof-of-concept solution, so it won't be valuable for debugging at this point, I'm note sure, whether I will add more to it or just leave it as an example. The dumping logic for the tree is an extended version of the one from this article. If you're interested in the source, you can download it here:

SilverDebugTestApplication.zip (38,51 kb)

Tags: , , ,

My Stuff | Projects | Silverlight

Debugging Visual Trees in Silverlight

by Administrator 12. Juni 2010 01:08

Sometimes when debugging Silverlight applications, you might want to inspect the visual tree. There is a good visualizer for WPF that allows you to do it, unfortunately there is none for Silverlight as far as I know. However I found this post, that contains a class you can embed in your project and then use in the immediate window to dump parts of the visual tree.

I played around with it at work and it works as expected, thanks alot Kiener for this one.

 

 

Tags: , ,

Silverlight

Enumerating Dependency Properties in Silverlight

by Administrator 3. Juni 2010 04:51

For a binding problem I wrote some helper code to enumerate dependency properties of a class. To pull that off, you have to use reflection to gather the static public fields of type DependencyProperty  and do the same for all base classes up to dependency object. To minimize the performance hit, resolved properties are cached, which is really good for you, wenn you use inheritance for your own crafted controls.

private class DependencyPropertyList : List<DependencyProperty>
{
}

private Dictionary<Type, DependencyPropertyList> m_TypeDependencyProperties = new Dictionary<Type, DependencyPropertyList>();

protected virtual IEnumerable<DependencyProperty> GetDependencyPropertiesRecursive(Type type)
{
    if (!m_TypeDependencyProperties.ContainsKey(type))
    {
        DependencyPropertyList propertyList = new DependencyPropertyList();

        foreach (FieldInfo field in type.GetFields(BindingFlags.Public | BindingFlags.Static))
        {
            if (field.FieldType == typeof(DependencyProperty))
            {
                propertyList.Add((DependencyProperty)field.GetValue(null));
            }
        }
        m_TypeDependencyProperties.Add(type, propertyList);
    }

    foreach (DependencyProperty property in m_TypeDependencyProperties[type])
    {
        yield return property;
    }

    if (type != typeof(DependencyObject))
    {
        foreach (DependencyProperty property in GetDependencyPropertiesRecursive(type.BaseType))
        {
            yield return property;
        }
    }
}

Tags: , ,

Silverlight

That was sorta lame

by Administrator 1. Juni 2010 00:46

Somhow Lame butchered the mp3 encoding of Song_12. I spotted longer periods of silence inside. When recording, I use Audacity to record a wav (or when only using VSTs just render directly with my DAW). Then after some trimming and perhaps compressing I generate an mp3 using Audacities lame plugin. This morning I just reopened the wav with Audacity and reexported to mp3 => everything's fine. Never happened before and probably won't happen again.

By the way - if you use lame and are not satisfied with the sound manimulation plugins included, check out  the Audacity VST Enabler. This allows you to run VST plugins (e.g. reverb, compression...) as effects inside Audacity which opens such a wide range of great plugins, including many free ones. A good starting point is this page, but you'll find lots of resources on Google.

Tags: ,

Music | My Stuff

About the author

for comments and suggestions contact:

 

Month List