Locations of visitors to this page

    Blog List       Minimize  
.NET
.NET 3.5
.NET:ACL
.NET:AppDomains
.NET:ASP
.NET:ASP ServerControls
.NET:ASP:Commerce
.NET:ASP:Config
.NET:ASP:JSON
.NET:ASP:Layout
.NET:ASP:Media/Flash
.NET:ASP:Mobile
.NET:ASP:Monitoring
.NET:ASP:Navigation
.NET:ASP:Stress Testing
.NET:ASP:Validation
.NET:ASP:WebParts
.NET:C#-Trig
.NET:CAB
.NET:CAS
.NET:Certification
.NET:CF
.NET:Collections
.NET:Configuration
.NET:Cryptography
.NET:Db
.NET:Delegates
.NET:Deployment
.NET:Diagnostics
.NET:Documentation
.NET:Encoding
.NET:Environment
.NET:Extension Methods
.NET:Globalization
.NET:I/O Streams
.NET:Interop
.NET:IO:Mail
.NET:IsolatedStorage
.NET:LicenseManager
.NET:LINQ
.NET:Metrics/Quality
.NET:Mono
.NET:MSOffice
.NET:Optimization
.NET:Patterns/Practices
.NET:Reflection
.NET:Remoting
.NET:Reverse Engineering
.NET:Serialization
.NET:Silverlight
.NET:Silverlight UserGroup
.NET:Threading
.NET:WCF
.NET:Windows Services
.NET:WinForms
.NET:WPF
.NET:Xml
Admin
Admin:Creating Software
Admin:CruiseControl
Admin:Estimating
Admin:Installers/Packaging
Admin:Methodologies
Admin:PM
Admin:SourceControl
Admin:UnitTesting
Admin:VisualStudio
Arch:Gen
Arch:Patterns
Arch:UML
Blogging
DB:Sqlite
DB:SqlServer
DB:SqlServer CE
DB:VistaDB
Graphs
IT
IT:DNN
IT:DOS
IT:IIS
IT:MailServers
IT:MS Office
IT:OS (XP/Vista/7)
Misc
Misc:Hardware
Misc:Humour
mISV:Accounting
mISV:Marketing
OS:Vista
Personal
Personal:Children
Personal:Faith
Personal:Family
Personal:History
Personal:Politics
Places:New Zealand
Places:Paris
Presentations
Tech:CSS
Tech:Regex
Tech:SQL
Tech:Web:HTML
Tech:XML/XSL

             
    Sprouting Synapses       Minimize  

             
Where I post whatever is crossing my mind...

In the news today was a line that interested me:

“We have a secret weapon. We have nowhere else to go.”

Golda Meir

 

Link:

http://www.jpost.com/International/Article.aspx?id=170785

powered by metaPost

Not sure I’m ever going to use this, but just discovered (thanks D4) DynamicQueries.

Basically, DynamicQueryable is quite powerful and includes the following:

  • Dynamic string-based querying of any LINQ provider (late-bound versions of Where, Select, OrderBy, Take, Skip, GroupBy, Any, and Count extension methods)
  • String-based mini expression language (like the “it” identifier in the sample below), including complex conditional statements and all operators
  • Dynamic creation of classes for projections

An example would be (notice the ‘it’ keyword):

 

namespace QuickSharp {
  using System.Linq.Dynamic;
    
  public class Persons : List{}
    
  public class Person {
    public string First {get;set;}
    public string Last {get;set;}
    public string Sex {get;set;}
    public int Age {get;set;}
  }
  class Program {
    static void Main() {
      try{
        Persons persons = new Persons();
        persons.Add(new Person{First="Jane", Last="Smith", Sex="F", Age=20});
        persons.Add(new Person{First="Betty", Last="Smith", Sex="F", Age=30});
        persons.Add(new Person{First="Paul", Last="Smith", Sex="M", Age=20});
        persons.Add(new Person{First="Jack", Last="Smith", Sex="M", Age=30});
                
        foreach (Person p in persons.AsQueryable().Where("Age<=29 AND Last>=\"s\"").OrderBy("it.Last")){
          Console.WriteLine(p.First);
        }
      } catch (Exception ex){Console.WriteLine(ex.ToString());}
    }
  }
}

Source code for the library can be found here:

C# Dynamic Query Library (included in the \LinqSamples\DynamicQuery directory)

 

Links:

 

Read More »

Found this:

internal static class Global
{
    /// <summary>
    /// Helper method for generating a "pack://" URI for a given relative file based on the
    /// assembly that this class is in.
    /// </summary>
    public static Uri MakePackUri(string relativeFile)
    {
        string uriString = "pack://application:,,,/" + AssemblyShortName + ";component/" + relativeFile;
        return new Uri(uriString);
    }
    private static string AssemblyShortName
    {
        get
        {
            if (_assemblyShortName == null)
            {
                Assembly a = typeof(Global).Assembly;
                // Pull out the short name.
                _assemblyShortName = a.ToString().Split(',')[0];
            }
            return _assemblyShortName;
        }
    }
    private static string _assemblyShortName;
}

 

over on

http://blogs.msdn.com/greg_schechter/archive/2008/05/12/introduction-to-writing-effects.aspx

powered by metaPost

My good man, Chris Klug, as usual being incredibly self-deprecating about his work…

 

Nice one, dude.

powered by metaPost

Use mslookup to find the mta:

 

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Users\Phillip.Hutchings>nslookup /?
Usage:
   nslookup [-opt ...]             # interactive mode using default server
   nslookup [-opt ...] - server    # interactive mode using 'server'
   nslookup [-opt ...] host        # just look up 'host' using default server
   nslookup [-opt ...] host server # just look up 'host' using 'server'
C:\Users\Phillip.Hutchings>nslookup
Default Server:  UnKnown
Address:  172.22.105.51
> somesite.co.nz
Server:  UnKnown
Address:  172.22.105.51
Name:    somesite.co.nz
Address:  202.74.207.16
> somesite.co.nz MX
*** Can't find address for server MX: Non-existent domain
> ?
Commands:   (identifiers are shown in uppercase, [] means optional)
NAME            - print info about the host/domain NAME using default server
NAME1 NAME2     - as above, but use NAME2 as server
help or ?       - print info on common commands
set OPTION      - set an option
    all                 - print options, current server and host
    [no]debug           - print debugging information
    [no]d2              - print exhaustive debugging information
    [no]defname         - append domain name to each query
    [no]recurse         - ask for recursive answer to query
    [no]search          - use domain search list
    [no]vc              - always use a virtual circuit
    domain=NAME         - set default domain name to NAME
    srchlist=N1[/N2/.../N6] - set domain to N1 and search list to N1,N2, etc.
    root=NAME           - set root server to NAME
    retry=X             - set number of retries to X
    timeout=X           - set initial time-out interval to X seconds
    type=X              - set query type (ex. A,AAAA,A+AAAA,ANY,CNAME,MX,NS,PTR,
SOA,SRV)
    querytype=X         - same as type
    class=X             - set query class (ex. IN (Internet), ANY)
    [no]msxfr           - use MS fast zone transfer
    ixfrver=X           - current version to use in IXFR transfer request
server NAME     - set default server to NAME, using current default server
lserver NAME    - set default server to NAME, using initial server
root            - set current default server to the root
ls [opt] DOMAIN [> FILE] - list addresses in DOMAIN (optional: output to FILE)
    -a          -  list canonical names and aliases
    -d          -  list all records
    -t TYPE     -  list records of the given RFC record type (ex. A,CNAME,MX,NS,
PTR etc.)
view FILE           - sort an 'ls' output file and view it with pg
exit            - exit the program
> set type=MX
> somesite.co.nz
Server:  UnKnown
Address:  172.22.105.51
somesite.co.nz     MX preference = 5, mail exchanger = mta.somesite.co.nz
somesite.co.nz     nameserver = ns2.somesite.co.nz
somesite.co.nz     nameserver = ns1.somesite.co.nz
mta.somesite.co.nz internet address = 202.74.207.110 ns1.somesite.co.nz internet address = 202.74.207.10 ns2.somesite.co.nz internet address = 202.74.207.100
>

 

once that is found, telnet in (telnet mta.somesite.co.nz 25) and verify the username to see if it exists or not:

 

220 MTA1.somesite.co.nz SMTP Server ( Exim )
VRFY suspect@somesite.co.nz
252 Administrative prohibition
MAIL FROM: <sky@xero.com>
250 OK
RCPT TO: <suspect@somesite.co.nz>
550 Unrouteable address
powered by metaPost

Just saving a link for me to look at the end of the year and compare…

http://money.cnn.com/2009/12/08/real_estate/housing_outlook.fortune/index.htm


PS: The author really likes California in 2011…don’t see how he can suggest those figures.

powered by metaPost

Wow. Flash will be unavailable on Mobile 7.

That’s really really surprising. Almost too out-there to believe.

http://www.wired.com/gadgetlab/2010/02/no-flash-on-windows-mobile-7/

powered by metaPost

image

(Or is it just a single frame of a game of Life that is playing out on the servers of http://generator.beetagg.com/ ?)

powered by metaPost

Wow.

Trivia, I know, but still…human communication is fantastic…

 

Aoccdrnig to rscheearch at Cmabrigde Uinervtisy, it deosn't
mttaer in waht oredr the ltteers in a wrod are,
the olny iprmoatnt tihng is taht the first and last ltteer
be in the rghit pclae. The rset can be a taotl mses
and you can still raed it wouthit a porbelm. This 
is bcuseae the huamn mnid deos not raed ervey lteter by 
istlef, but the wrod as a wlohe. Amzanig huh?

powered by metaPost

Just came across this paragraph on the net.

“Of course you don’t want to pay much performance costs for your logging infrastructure. Fortunately tracing doesn’t cost you too much. I wrote some tests in Common.Logging to compare both and found Common.Logging twice as fast as Trace. Note, that we are talking about 2s vs. 4s for passing 100.000.000 log entries through the chain. I do not think that this is an issue for anyone except for applications generating an insane number of log entries.”

In other words: no big difference between any logging system, so anybody who waxes lyrical for log4net or other framework for more than 2 seconds…give it a rest: I don’t care.

 

Link:

http://eeichinger.blogspot.com/2009/01/thoughts-on-systemdiagnostics-trace-vs.html

powered by metaPost

I’m currently reworking an custom TraceListener called EmailTraceListener…and it noticed how few posts there are out there touching on TraceFilter… and yet it’s great.

For those who’ve never looked at it, there are two built in filters derived from the TraceFilter abstract class: EventTypeFilter and SourceFilter, but if you need more, rolling your own is trivial.

The point is, all you have to do is refer to one of them in your config file, and voila! Filtered output, which in my case is most useful:

<add name="EmailTraceListener" type="XAct.Diagnostics.EmailTraceListener" server=”…” port=”…” userName=”…” password=”…” useSSL=”true” from=”…” to=”…” subject=”…”>
  <filter type="System.Diagnostics.EventTypeFilter" initializeData="Error" />
</add>

Link:

http://blogs.msdn.com/bclteam/archive/2005/09/21/472015.aspx

powered by metaPost
By Sky Sigal

So depressing a chart, that no comment is required:

image

and

Apple is growing with about 14,000 new apps added per month (9 percent).

?!?!!

 

Link:

http://www.wired.com/gadgetlab/2010/02/the-state-of-mobile-app-stores-summarized-in-charts/

powered by metaPost

Bill Ramos has a succint post describing how to set up SQL Server Agent to use Database Mail to alert the admin in the event of a job failure.

Link:

http://blogs.msdn.com/billramo/archive/2009/03/30/sql-server-agent-and-database-mail-better-together.aspx

powered by metaPost

I was looking for something else and came across this keeper for people looking for an intro to SQL Server.

I’m starting to really like SlideShare  (I just opened my account…a little late to the game) :-)

powered by metaPost

Shockingly good example of UI design:

 

PS: Scott: A little too close for comfort…

 

PPS: Anybody know of what they would have used for the UI framework?

Link:

http://blogs.zdnet.com/mobile-gadgeteer/?p=2552&tag=nl.e539

powered by metaPost

I’ve been looking at providing Authenticated RSS Feeds…and the architecture – beyond the fact that it is not implemented widely – has not inspired much confidence in me.

But the alternate – providing RSS feeds with a private Url (eg: an Uri with a user specific private token) is even worse:

 

Another reason as to why it’s not a good idea:

The website I work on offers custom RSS feeds based on keywords for registered users.

That’s great if you have an RSS reader that runs on your desktop, but in Bloglines [et all], it has the unintended consequence that all these custom feeds become discoverable.
It’s not so much a privacy problem, it’s more a gunking up the bloglines feed search problem.

Link:

http://techcrunch.com/2006/08/01/bloglines-will-block-your-feed-from-search/

powered by metaPost

Finally: a good one stop diagram to get anyone up to speed in 60 seconds or less:

image

The only thing I would add to the above are the following points:

 

 

 

An Aggregation is a special case of Relationship.

An Aggregation is that is a WholePart Relationship.

A Composition is a special case of Aggregation,

A Composition is when the Child object can only belong to one Whole.

 

Note that Aggregation is a somewhat vague concept that conveys a life-cycle dependency relationship…but not agreed upon by all.

By that, there is a general understanding that

  • A Composition is an Aggregation with an added lifetime responsibility.
  • A composition is the same as an aggregation except that a Part object can belong only to one Whole object at any one time

ie:

  • Composition:  Mother <|>---> Fetus(destruction of mother destroys baby)
  • Aggregation:  Mother <>---> Baby (destruction of mother does not destroy baby)

 

A third ‘common’ concept is that in Composition, the child can get to it’s Parent (Form <|>—> Control).

 

Actually…For more clarity, read this: http://ootips.org/uml-hasa.html

 

 

 

Then again, maybe this diagram is more to your liking:

image

 

 

Ref:

http://www.loufranco.com/blog/assets/cheatsheet.pdf

http://tnerual.eriogerg.free.fr/umlqrc.pdf

powered by metaPost

According to this article in the NZ Herald News, it’s evolutionary! (The french will be relieved…)

To win attention, start with a problem - Business - NZ Herald News

powered by metaPost

ImagineCup_image001

I’ve just returned from a roadshow arranged by Ryan Tarak of Microsoft as part of the Imagine Cup where I was asked to talk about Silverlight, and what could be gained by using it.

The first part of what I presented was the HTML behind the web buttons of many web pages… and then I demonstrated that these types of hacks had already been tried and dropped in other frameworks.

Then I talked about how developers used to static pngs and layouts had a hard time understanding what benefits effects and animations could bring to the table, so I showed them the following slides:

Then wrapped up by pulling out Visual Studio, and using code to demonstrate how easily one could pick up Silverlight, by demonstrating how to take a simple button, keep its functionality, change its appearance totally, and use it to drive animations that added meaning and clarity to the event…No biggie, but simple enough to show how much richer, and understandable, an animated UI can be than simple png+html interfaces.

 

 

On a personal note:
I found it less easy than I imagined.  In Christchurch I could have been more succinct. In Wellington, I lost the plot for a second. In Auckland, I was able to regroup and got it just about right again– although I would have liked more time to present the patterns involved.
But even if not a walk in the park, I really enjoyed the experience, and the chance to hang out for 3 days with a group of very intelligent and fun presenters.

powered by metaPost

A wonderful quirky summary of it:

 

PS: I noticed that whatever posted by this person (youtube) seems to be worth looking at.

powered by metaPost

 

image

 

I have a hard time with HTML these days…

I’ve just been travelling around New Zealand trying to shake people out of a complacent acceptance of the current status quo, the lemming like behaviour of webbies with their faces expectantly turned towards the east eagerly awaiting salvation via the imminent arrival of HTLM5 (in 2022)….because it’s becoming absurd.

Doesn’t matter where we start really. But might as well start with the most important piece of real estate on a screen…the button. The Buy thingy that gets you paid…

We don’t use <INPUT type=”BUTTON”…/> for just about anything anymore: instead we create them out of CSS styled A tags, or UL tags, and then handle image swapping for mouse over/out visual effects via JScript.

In other words…we throw out the functionality defined by the specs, and built up a replacement solution out of bits and bobs held together with chewing gum.

If that isn’t the definition of a broken spec, I don’t know what is.

HTML stands for Hyper Text Markup Language. And it’s great for what it was designed for: Text.

But for apps, use eXtensible Application Markup Language.

It really is that simple.

Otherwise, we’ll continue to live in an absurd world where we use A for button, textboxes instead of autocomplete combos, etc. css for tables, etc.

Just because you can figure a way to get things done via JScript and HTML, doesn’t mean you should.

powered by metaPost

How do you deploy your webapps up to the server? Just take them offline, save the config file, XCOPY up the new content, and twiddle around with the config file, merging in the values?
Almost never works the first time, and you rush to figure out where the typo is that you just introduced into the config file?

Is there a better way?

Actually yes. What you need is an installer. A free one. One that can work via interfaces, or a command line, be automated, that has an uninstaller built in, and – most importantly -- can handle customisation of the config file per target destination, updating variables specific to the Live environment, such as ConnectionString,Email server vars, WCF endpoint Uri’s, etc.

And it turns out that you already have that built into Visual Studio.  It’s just a bit buried, and has a UI design that really stinks -- but it does the job, is free, and once you know what you are doing, is all you need to get the job done right. Everytime.

 

I think you’ll like this.

Read More »

Copyright 2007 by Sky Sigal