Quantcast
Channel: Chui's Counterpoint
Browsing all 88 articles
Browse latest View live

Enterprise Library – CustomTraceListener that logs to a Ring Buffer

Configuring Enterprise Library is actually harder than writing a custom trace listener. There was one catch though. A CustomTraceListener doesn’t inherit from FormattedTextWriterTraceListener. The...

View Article



Run Install.ps1 to add Bootstrapper for Caliburn.Micro

Running Install-Package doesn’t seem to trigger install.ps1 anymore. This incantation works for me PM > $project = Get-Project SlCaliburn PM > install.ps1 "packages\Caliburn.Micro.1.3.1"...

View Article

WebMatrix 1.0 Reset Passwords

The token generated by WebMatrix 1.0 used base64 encoding, and caused odd problems when copy and pasted into web browsers. The following hack addresses the issue. resetToken =...

View Article

Windows 8 – What it can do and what it couldn’t do

I hear there’s a lot of confusion, even among sales staff of what Windows 8 is, and what is Windows RT, and why they should buy one. Hopefully, these FAQs would answer a lot of questions. Will my old...

View Article

Shopping Cart Schema

My recent freelance work involved writing a shopping cart and integration with a hosted payment gateway. How hard could it be? Well, as it turns out, there were quite a few elements that I missed in my...

View Article


Banning spammers on a low traffic site

I’ve a low/zero traffic site that attracts more bots than human visitors. Here’s a simple Python script that looks through the logs and bans visitors who try to spam the comments page. import os, time...

View Article

Minimal Read-Only DataGrid in Silverlight for Large Data Sets

A virtualizing stack panel allows large datasets to be rendered.Here’s a sample: <ItemsControl x:Name="MyDataGrid"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate>...

View Article

RazorEngine and ASP.net WebPages v2

I use RazorEngine for generating emails. Unfortunately, for a recent project, it has a dependency on ASP.net Web Pages v 1. The best way to install this on a machine that doesn’t already have v1 in the...

View Article


Tutorial – Validating data with Caliburn.Micro

Purpose This tutorial explains how to validate a textbox using Caliburn Micro. In this example, we are creating a logon screen and we wish to validate the username and password are not blank before...

View Article


Visual Studio 2012 and Microsoft XNA Game Studio

Ryan Lange has provided a handy guide how to get XNA studio projects to run in Visual Studio 2012. But this is on the proviso you already have Microsoft XNA Game Studio already installed on the...

View Article

CreateProcess and redirecting StdIn StdOut StdErr doesn’t have to be...

Here are some notes on how Windows’s CreateProcess works while it is still fresh. References: Raymond Chen – Be careful when redirecting both a process’s stdin and stdout to pipes, for you can easily...

View Article

JavaFX Experiments

Note: Upload to public_html/wp-content/blogs.dir/4/files/javafx #1

View Article

Why can’t I build python extensions with a different version of Visual Studio?

The short answer: you probably can if you are careful enough to limit your use of Python API calls. For example, you cannot use PyFile_AsFile, the reason is that C runtime objects like FILE* created in...

View Article


Turning leiningen script into an executable

I used the venerable launch4j to wrap leiningen-standalone jar into an executable. You can get the Windows clojure binaries here. There were a few problems along the way. Clojure reports MethodNotFound...

View Article

In Memory of Aaron Swartz

Russian prosecutors sought 3 years of jail term for this act of political defiance by Pussyriot. Aaron Swartz was threatened with 35.

View Article


Silverlight – faster compilation by reducing xap file size

Suppose we have a Silverlight Solution that has tens of projects. A lot of time is spent building the .xap file. Every time a DLL is touched, the entire solution is re-xapped. To avoid this, we can use...

View Article

Reactive Extensions Pop Up Toaster

I’m experimenting with RX, and this is an early attempt at expressing the following logic. Start to slide the toaster into view, then fade it out, and remove the toaster from visual tree If a mouse...

View Article


Image may be NSFW.
Clik here to view.

Adding Global Behaviors to Silverlight Controls

Take a look at the two buttons below, and hover your mouse over them. You’ll notice that the buttons hide themselves. However, when you take a look at the XAML, it is not obvious how this is...

View Article

JavaFX and RxJava

Netflix has released a Java port of .NET’s Reactive Extensions called RxJava. I’m new to RxJava although I’ve played around a little with its .NET counterpart. In a nutshell, reactive programming is a...

View Article

Silverlight Links

Subscribing to Change Notifications without Memory Leaks

View Article
Browsing all 88 articles
Browse latest View live


Latest Images