Categories
Programming

Scrolling textbox when text is added, but not if the user has scrolled

You may (or may not) have read my recent article How to watch your log through your application in Log4Net which allows you to append Log4Net events direct in to a textbox – if so, you may then also have come across a frustration that I also had, which is that whenever the texbox is […]

Categories
Programming

How to watch your log through your application in Log4Net

Log4Net is an excellent logging system that allows you to clearly see what your application is doing and when, making it very easy to debug your app during development but especially during production. I have previously demonstrated how to use Log4Net in C# which enables you to log output to your console for the former […]

Categories
Programming

How to access WebAPI from a .Net 3.5 client in C#

So, like me, you may have come across some incompatibility within your WebAPI client that means you can’t use .Net 4/4.5 (which is required to use HttpClient and HttpResponseMessage etc.) – or you’re writing a web service to fill in due to this incompatibility. This solution should allow you to access your API (using POST) […]

Categories
Programming

Installing your C# project in Visual Studio 2012 (or earlier)

So you may or may not be aware that Visual Studio 2012 no longer has a built in project that will install your application for you – I can understand why this is, as it allows third parties to develop these and lets them focus on improving the programming experience, but I can also understand […]

Categories
Programming Wordpress

Loading JSON web service in to PHP

As I’ve recently had to implement the JSON implementation of the Twitter Search API v1.0 as a hotfix into ThinkTwit, I thought it might be useful to share how I did this… So if you’re here it’s probably because you need to read JSON in PHP or you have to implement an API, maybe the […]

Categories
Programming Wordpress

How to get the current widget id in WordPress admin

A very short post today, I just thought this would come in handy to someone. If you are in the form() function you should be able to do this:

Categories
Programming

C# DateTime.AddMinutes increments months at midnight

So last night I was writing an application that would process trunk logs from Connect Assist’s ShoreTel phone system which would allow the raw per-call data to be turned in to trunk usage stats (but that’s another story).

Categories
Programming

Clearing Temporary Internet Files in C#

I recently ran in to an issue (I actually ran in to multiple issues*) when using the WebBrowser control in Visual Studio 2010, C# .Net Framework 4.0, whereby the embedded Internet Explorer browser was able to login to the website we were using for a project was not successfully tidying up after itself when closed.

Categories
Programming

How to use Log4Net in C#

During a current project in work (one of many) I required a logging system for recording info and errors during operation so that I can easily and quickly debug the application when it is in service. As I was already aware of the extremely successful Log4j I decided to give its .Net counterpart a chance […]

Categories
Programming Wordpress

AJAX-ifying WordPress Widgets

I recently found the need to give AJAX abilities to a WordPress widget. Notably, I had a request from Kjell Martin Bovre of Scribo.no to allow ThinkTwit to update when used with a caching engine, for instance WP Super Cache. Caching engines work by converting the pages of a site in to HTML and, rather […]