Totzkeeeeee's Blog

Just because I can...

  Home  |   Contact  |   Syndication    |   Login
  196 Posts | 4 Stories | 299 Comments | 324 Trackbacks

News


My blog is worth $14,678.04.
How much is your blog worth?

Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

Blog Roll

Cool Sites

Wednesday, June 03, 2009 #

You know, it’s like they’re not even trying anymore.

I just received your typical “we need an agent to receive payments and then keep some of the money and send us the rest” type of phishing email.  To qualify, I need a bank account – check, a credit card – check, check my email at least three times per day – double-check.

In the F.A.Q section question number one is:

Do I pay any tax? This is not your income and bank will know that, we pay fee for this activity to every Australian Bank.

Sweet, tax free money, but wait…just above there you said:

Pay on Payment processed which will be your wage for work done then and send the balance to any of our offices/location through means Money Gram/Western Union.

It would seem that they define wage differently in Australia.

Funds you receive from our customers in Australian dollars ( AUD ) through a direct deposit/credit card, you will simply cash/withdraw the payments at the bank thereafter transfer it to any of our branch office that will be made known to you via Money Gram/Western Union transfer pending when we have a suitable account here because clearing these funds here takes longer time and 25% is deducted from it at the bank, this is bad for business so we rocked that getting an individual in Australia  to work for us as our Representative would be the best choice.

Damn.  I was so close to qualifying.  You see, I’m in Ontario Canada.  They only missed by two hemispheres and roughly 10,000 miles.

At this point, it’s not even the phishers and the spammers that I want to die in a fire just stop it already.  It’s all of the idiots that respond to this crap and make it profitable for them.

Sigh.

Dave
Just because I can…


Friday, May 01, 2009 #

No.  Not that one. Not that one either.

I’m actually talking about the CorFlags section in the header of a portable executable image.

Wil Peck observed the following error when trying to use the Microsoft Jet OLEDB provider on an x64 machine:

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

The simple solution, as Wil points out, is to change the target of your project to x86 rather than Any CPU so that your build will produce a 32 bit executable.

If you have a solution with 32 projects in it, that’s not a simple thing to do.  If all you need to be able to do is run your program locally for testing/debugging purposes, there is a better – well easier – way.  CorFlags.exe

CorFlags allows you to set the 32BIT flag in the header so that the program will be loaded as a 32 bit process.  You can then attach the Visual Studio debugger to the running process and you’re all set.

You can do this to a strong named executable using the /Force option but this will obviously break the signature.  You can re-sign it or not based on your need.  For my purposes, simply running the program was good enough.  You will also need to rebuild the program in Visual Studio before you can push F5 to run it in the debugger.  Since you changed it behind VS’s back, it doesn’t know about the change and will complain that the file is corrupt when it tries to launch it.

Oh, and Wil is also correct in that Microsoft have no plans to make a 64 bit version of the provider available.  Ever.

Dave
Just because I can…

Technorati Tags: ,,

Thursday, April 30, 2009 #

In a word – wonderful.

I’m doing some work on a project where somebody had a bit of a fetish for nested views.  I’m not talking about one view inside another.  I’m talking about one view that joins a couple of other views that each join to other views as well. 

I needed to add a value to the output of the outer-most view and before I added ~another~ join I wanted to know if the table in question was already joined in one of the nested views.  Drilling down into them would have taken time.  I remembered that I had SQL Dependency Tracker installed on my machine so I loaded up the database.

It was very fast.  In just a few seconds the entire database was mapped and I was looking at the view in question.  There is a great panel (Dependencies) that shows what the selected object uses as well as what it is used by in a tree view.  I just drilled down into the ~uses~ tree and in seconds I had my answer.  The table was already joined so all I had to do was bubble up the column that I needed at the top.

The various views of your database objects and how they relate to each other are very cool as well.  There are five different layouts available:

  • Balloon Tree groups objects together in balloon-like clusters

    This is a fast layout, which is good for grouping related objects together. It is suitable for diagrams that contain a large number of objects.

  • Hierarchic organizes the objects in a hierarchical structure, from top to bottom
  • Orthogonal places objects so that the connections between the objects are straight lines that are as close to vertical and horizontal as possible

    The objects form small clusters. This is ideal for diagrams that contain a small number of objects.

  • Smart Organic links objects into sets of clouds or lattices

    This layout is good for grouping related objects together.

  • Circular lays the objects out to form the boundaries of circles, with connections that cross the centre of the circle

I have a suspicion that this is done in WPF as the animation of the layouts is very fast and smooth.  Zooming is also very smooth and it’s obvious that the display is vector based as everything looks great at any zoom level.

All in all, this saved me a bunch of time and hassle and allowed me to accomplish my task in a minimal amount of time.

Dave
Just because I can…


Wednesday, April 29, 2009 #

You know what?  There just might be hope for us yet.

Simply perfect.

Dave
Just because I can…

(h/t Kung Fu Monkey)


Tuesday, April 28, 2009 #

That’s a mouthful.

Back in November of 2008 Microsoft shipped the GDR (General Distribution Release) for the Database Edition of VSTS.  This update changed the way the database is modelled internally and removed the need to have SQL Server installed locally.  You can check out a review of my experience with this release here.

The scope of the changes required at that time was such that we decided against updating.  I had estimated approximately one full day to implement the changes to our stored procedures and views that would have been required.

On April 21st of this year Microsoft has released the GDR R2.  This release contains fixes and changes to how certain things were handled that addresses many of the deficiencies in the previous version.  Microsoft really listened to the feedback from their customers.

With the improvements in R2, I had the entire thing modified and up and running in just under one hour!  Nice.

Download it here: Visual Studio Team System Database Edition – GDR R2

Dave
Just because I can…

Technorati Tags: ,,,

Tuesday, March 31, 2009 #

Here are some notes about my experience when testing an upgrade to the general distribution release of the Database Edition.

I installed the latest version of the VSTS Database Edition (GDR) on my laptop and loaded up a copy of the a database project.

Everything converts pretty much ok with the only issue being unresolved cross-database references.  DBPro is now model-based and as such does not require SQL Server to be installed locally.  This also allows them to have project references to other databases as well as linked server references.  This enables far more rigorous checking and enforcement of object references.  Also, there are some objects (i.e. logins) that are now treated as server level objects and should be moved into a project based on the new server project type that is then referenced in your database project.

Currently there are numerous warnings in this database project about unresolved references which do not stop the build or the deployment.  These warnings are now considered errors (TSD03006 specifically) and prevent the project from building or deploying.  This issue can be addressed in one of two ways; using either database project references or database schema file references.

We can create a new database project for each external database and import its schema.  We would then create a reference in our database project to that project.  This gives us extra projects to be concerned with.  This approach is generally used when the external databases are likely to be modified in future and you would do so using these new projects.

Using a database schema file still requires us to create a database project and import the schema.  Building the database then produces a .dbschema file.  Once we have that file, we can abandon the database project.   We can add the .dbschema file to our database project and reference it there.  We would do the same for any other external databases.  We can include these files in source control as well.  We can then edit these files should the other databases change or simply replace their contents with new versions of them.

Once we have these database references we will need to fix up places in the SQL that are currently giving us trouble.  Building the project right now gives a LOT of errors.  Roughly 300 of them.  Fortunately, a lot of them can be fixed by simply fixing up the table reference in the select statement because an error is generated for every column in that SELECT.  If 10 columns are selected then you get 10 errors.  Qualifying the table reference fixes all 10 at a go so it's not that bad really.

Further, we will need to change code that does a SELECT INTO a temporary table to define the temporary table with a CREATE TABLE statement and then do an INSERT.  This way DB Edition can also resolve these references at compile time.

I did a test with one of the external databases using by this application by creating a schema file and then referencing it.  It works very well.

I really believe that folks should bite the bullet now and get this done.  The GDR is the current shipping version of the product and contains bug fixes in other areas as well as new tools and functionality.  Any future service packs will target this edition.  An additional benefit of doing this is that you will know at build time if everything is going to work.  (well, at least find all the objects it needs) Right now, you can't be sure until you actually execute some things.

Dave
Just because I can…

Technorati Tags:

Technorati Tags: ,

Just posting a bunch of links to some really great articles on WPF.  Pay special attention to the ones on the MVVM pattern.  Very powerful stuff.


Dan Crevier's Blog - DataModel-View-ViewModel Pattern Part One

Introduction to Attached Behaviours in WPF

Tales From The Smart Client - Attached Behaviour Pattern Sample

Silverlight Behaviours

A Guided Tour of WPF - 5 part series covering the basics

Simplifying the TreeView by Using the ViewModel Pattern

Using MVC to Unit Test WPF Applications

Great series on the ItemsControl

Validation in Windows Presentation Foundation

Dr. WPF's Blog

 

Recent WPF Articles in MSDN Magazine:

WPF Apps With The Model-View-ViewModel Design Pattern

Understanding Routed Events and Commands In WPF

Customize Data Display with Data Binding and WPF

Dave
Just because I can…


Tuesday, May 06, 2008 #

This year the bonus session (Wednesday May 14 at 18:00) will be a panel of speakers debating the Future of .NET. Where is .NET going? How will new development influence .NET and be influenced by .NET? Join Carl Franklin and Richard Campbell from .NET Rocks as they moderate a discussion on the future directions of .NET. The panellists include individuals who have strong visions of the future of software development and the role that .NET can play in that future. Attend this session and bring your questions to get some insight into the potential future of .NET! This bonus session is free for everyone. Panelists are: Ted Neward,Oren Eini, and Scott Bellware


DevTeach Toronto - one of the best developer conferences in Canada - is less than a week away! Are you going? If not, you'll be missing out on a keynote address by Scott Hanselman, a panel discussion featuring Carl Franklin and Richard Campbell, a highly-acclaimed "Party with Palermo" social event with Jeffrey Palermo, the ability to attend tons of sessions covering the latest & greatest technologies, and the opportunity to connect with many of your peers from across Canada and around the world. Now, why on Earth would you want to miss all of that?! Register today!


Jeffrey Palermo (MVP) is hosting Monday May 12th in Toronto is acclaimed ‘’Party with Palermo’’. This is the  official social event kicking off DevTeach Toronto. The event is not just for the attendees of Toronto it’s a free event for everyone. It’s a unique chance for the attendees, speakers and locals to meet and talk with a free beer. The event will be held at the Menage club location and you need to RSVP to attend. Get all the details at this link: http://www.partywithpalermo.com/

 pwpbadge


Wednesday, April 02, 2008 #

In a previous (failed) attempt at an April Fools post I mentioned that a new and hipper version of Visual Basic was being designed to take advantage of the DLR.

Little did I know how close I was.  LOLCode on the DLR

Dave
I CAN HAS JUST BECAUSE...


Bueller

Perhaps I am the fool.  Either that or nobody's listening; which is a distinct possibility as I haven't been posting anything much of interest in some time now.  I thought that this would have at least garnered some half-hearted jabs.

I mean really.  Where are all of those naive petitioners now?

BTW, the code examples shown in my previous post are actually from LOLCODE and yes, it's real.  To be honest, I sort of like the way the code reads.  There's even the beginnings of a .NET compiler for Lolcode and the LOLCODE Specification 1.2 is pretty complete.

 

Dave
Just because I can...


Back in March of 2005 I found myself with the unlikely need to print from a DOS-based program to a USB printer in a stand-alone environment.  At the time, I documented the process, mostly for myself.  That article has now accumulated one hundred and seventy-six thousand, six hundred and two three four hits during the intervening 3 years.

What this means, even to this day, as the hits continue to climb at a steady pace, is that about once every nine minutes (!!) somebody does a search on how to make this happen.  I even get email via my blog asking me to "please me tell how print dos to my usb".  Almost weekly.  Seriously.

You people need to upgrade.  At least give Windows 98 a go.  I guess the old adage still holds: If it ain't broke...

Dave
Just because I can...


Tuesday, April 01, 2008 #

Now that Visual Basic has broken ties with its COM roots it is free to continue innovation and advance the platform for the next generation.  Microsoft has done a lot of market research and found that VB is being embraced by the younger generation and have embarked on a completely new form of the language. 

The typical VB developer has long been associated with the "Mort" persona.  Mort doesn't have time for fancy frameworks and elegant code.  He just wants to get things done quickly and efficiently and move on to the next problem.  Late binding and dynamic execution is king.  Even in during inter-personal communication Mort will often use shorthand codes like "BRB" for Be Right Back.  With this in mind, the new language is evolving to take advantage not only of Mort's personality but also of the forthcoming DLR. (Dynamic Language Runtime)

Still in the very early stages of development, it is at least two versions away and can't even be called pre-alpha at this point.  Through some of my MVP connections that wish to remain anonymous, I have obtained a sneak peak and just have to share it with you.  Following are some early examples of the new Visual Basic.

The canonical introductory example:

HAI

CAN HAS STDIO?

VISIBLE "HAI WORLD"

KTHXBYE

HAI - Signals the beginning of the program.  Every program starts with HAI.

CAN HAS...? - This is a feature request and replaces the Imports statement.  Similar to #include in C++ or "using" in C#.

VISIBLE - The print statement.  Sends the output to stdout.

KTHXBYE - Closes the HAI block.  Every program ends with KTHXBYE.  Does not close any other code blocks.

 

Here is an example that retrieves a value from the user and outputs that value to stdout.

HAI

CAN HAS STDIO?

I HAS A VAR

GIMMEH VAR

VISIBLE VAR

KTHXBYE

I HAS A - Variable declaration.  Currently all variables are of type BUKKIT (array) and BUKKITs are heterogeneous.  Future type proposals include NUMBAR and YARN (string). 

HAI

CAN HAS STDIO?

I HAS A WHOLE

GIMMEH WHOLE

LOL VAR R WHOLE

KTHXBYE

LOL <l-value> R <expression> - An assignment operator.  The value of WHOLE is put into VAR and now I have a WHOLE in my BUKKIT!  Sorry, I just couldn't resist.

GIMMEH - Get input from the user.  Similar to Console.ReadLine() in .NET.  Places the input into VAR.

File access and error handling:

HAI

CAN HAS STDIO?

BTW this file has a list of all my friends in it

PLZ OPEN FILE "FRNDZ.TXT"?

    AWSUM THX

        VISIBLE FILE

    O NOES

        INVISIBLE "ERROR!"

KTHX

KTHXBYE

BTW - By The Way.  This is the comment indicator and replaces  the single quote.  Equivalent to REM.

PLZ...? - PLZ...? sets up the equivalent of a try/catch block.  AWSUM THX begins the block of code that should be executed if the operation is successful and is implicitly closed by O NOES. O NOES is equivalent to a catch block.  The block is closed by KTHX.

OPEN - OPEN handles non-standard I/O.  FILE is simply a variable and in this example represents a file handle.  Here we see the dynamic nature of this new version.  We did not need to declare the variable FILE with I HAS A.

INVISIBLE - Used to output messages to the debug console. (stderr)

I hope you've enjoyed this look into this future version of Visual Basic.  I for one am looking forward to the time when this language is embraced by the next generation of "c0d3rz" and "hax0rs" who will most certainly restore the language to its former glory and popularity.

Dave
Just because I can...


Friday, March 28, 2008 #

It's that time of year again.  Every year ASP.NET Pro Magazine runs its Reader's Choice Awards to find out what the community at large feels are the best tools and components available.  There are categories for such things as the Best:

  • Add-In
  • Charting Component
  • Component Set
  • Grid
  • Navigation Suite
  • Online Editor
  • Printing/Reporting Components
  • Scheduling Components
  • and more...

The final choice is for Best Overall Component of the Year.  Voting is now open and only takes a minute or two to complete.  Head on over and make your voice heard.

Dave
Just because I can...