Did a long-put-off update on my Thinkpad with all its recommended Lenovo drivers from the ThinkVantage tool. All dandy, apart from the fingerprint reader stopped working. It used to have a little green light on to show it was ready, now it was off in sleep mode.
Simple solution: Go to Device Manager > Biometric Devices > TouchChip Fingerprint Coprocessor > Properties > Power Management and untick the "Allow the computer to turn off this device" option.
DaddyCode Team Blog
C# , ASP.NET, MVC, SQL, Sharepoint, JQuery and nowt else from a Web Developer in Leeds
27 Nov 2014
18 Nov 2014
Remote Desktop connection failed
Couldn't connect via RDC via an RD Gateway. Tried all sorts but in the end tried going into Device Manager, showing all hidden devices, and removed all the ISATAP virtual tunneling adapters that various Virtual Machines had added. It worked!
22 Oct 2014
Installation Ended Prematurely - MVC Hotfix MS14-059
Just had a scary moment when a production MVC application went down due to MS Updates removing the MVC 3.0.0.0 dll and replacing it with MVC 3.0.0.1.
Although we located the MS Hotfix (MS14-059), the installer gave us a worrying "Installer Ended Prematurely" error.
The solution was simple - the server needed a reboot to allow it to install some pending updates before the Hotfix could be run.
Although we located the MS Hotfix (MS14-059), the installer gave us a worrying "Installer Ended Prematurely" error.
The solution was simple - the server needed a reboot to allow it to install some pending updates before the Hotfix could be run.
21 Oct 2014
VBScript / Classic ASP value equivalency crib sheet
DBNULL VALUE
Equivalent to: NULL
ZERO VALUE
Equivalent to: FALSE
STRING NUMBER VALUE (e.g "0")
Equivalent to: NUMBER VALUE (but STRING ZERO is not FALSE!)
EMPTY VALUE / UNDEFINED VALUE / UNPROVIDED REQUEST VALUE
Equivalent to: FALSE (but not NULL!)
EMPTY STRING ("")
Not equivalent to FALSE, EMPTY, ZERO or NULL!
NOTE: If you compare NULL with anything, it just returns NULL, not TRUE/FALSE
NOTE: While 0 is equivalent to FALSE, 1 is NOT equivalent to TRUE
19 Sept 2014
A simple script for scheduled Access DB backups
Here's a simple wee backup script to save as a VBS file (e.g. backup.vbs) and then run from Windows Task Scheduler.
Saves a copy with a datestamp in the filename e.g. Data_2014-09-07.mdb
Saves a copy with a datestamp in the filename e.g. Data_2014-09-07.mdb
Dim oldfilePath
Dim newfilePath
oldfilePath = "C:\LivePath\Data.mdb"
newfilePath = "D:\Data_Backups\Data_"
newfilePath = newfilePath & datepart("yyyy", date()) & "-"
newfilePath = newfilePath & Right("0" & DatePart("m",Date), 2) & "-"
newfilePath = newfilePath & Right("0" & DatePart("d",Date), 2) & ".mdb"
Dim fso : Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile oldfilePath, newfilePath, true
Set fso = Nothing
25 Aug 2014
Adding a Clear Filter / Clear Search Button to DataTables
I wanted a generic way to add a "clear filter" button to the text filter on all the DataTables on a site.
One way would be to change the input type of the filter to "search" - then HTML5 browsers will automatically show a clear widget. However, you'd have to press return after clicking it, so I wanted a one-click solution.
Here's what I came up with. It works with DataTables 1.9.
One way would be to change the input type of the filter to "search" - then HTML5 browsers will automatically show a clear widget. However, you'd have to press return after clicking it, so I wanted a one-click solution.
Here's what I came up with. It works with DataTables 1.9.
// Setup DataTable Defaults
$.extend( $.fn.dataTable.defaults, {
fnInitComplete: function(oSettings, json) {
// Add "Clear Filter" button to Filter
var btnClear = $('<button class="btnClearDataTableFilter">CLEAR</button>');
btnClear.appendTo($('#' + oSettings.sTableId).parents('.dataTables_wrapper').find('.dataTables_filter'));
$('#' + oSettings.sTableId + '_wrapper .btnClearDataTableFilter').click(function () {
$('#' + oSettings.sTableId).dataTable().fnFilter('');
});
}
});
16 May 2014
A ValueInjecter Injection that ignores null values
Want to use ValueInjecter but don't want to copy null values into your model?
Usage:
public class NoNullsInjection : ConventionInjection
{
protected override bool Match(ConventionInfo c)
{
return c.SourceProp.Name == c.TargetProp.Name
&& c.SourceProp.Value != null;
}
}
Usage:
target.InjectFrom(new NoNullsInjection(), source);
15 Apr 2014
Access MDB activity causes Visual Studio 2012 "File Modified Outside Environment" warning
I've found a way to stop this when it starts. Close VS2012 and delete your Visual Studio solution's (hidden) SUO file, which you will find with the SLN file.
10 Feb 2014
Classic ASP FPDF creates TMP files in folder
Weird little problem just now - a classic ASP (vbscript) page used FPDF to generate PDF files. All working fine but weirdly, the script seemed to be generating TMP files in its directory - one for each PDF generated.
Took a while to figure out, but turned out that the IIS user account had WRITE permission on the folder but not MODIFY. Once MODIFY was added, the TMP file problem went away. Small victories...
Took a while to figure out, but turned out that the IIS user account had WRITE permission on the folder but not MODIFY. Once MODIFY was added, the TMP file problem went away. Small victories...
6 Feb 2014
Lottie Dexter (Year of Code) and Jeremy Paxman on BBC Newsnight 5 Feb 2014
Okay, just finished watching this debacle and want to reel off some thoughts. Venty venty.
I guess it must be true for any skilled worker that when journalists cover your area of expertise, your hackles rise and you begin to wonder what basic stuff is being misunderstood and misrepresented by those journalists in all the other articles you've ever read on other subjects. Fair enough, journalists are generalists - they can't be expert in everything. However, the computer industry must be one of the last ones where a journalist can describe your passion and life's work as "baffling ... gobbledegook" and then dismiss it with a "it doesn't mean anything!". Both of those conclusions were drawn by Jeremy Paxman and Zoe Conway on Newsnight tonight regarding what they termed "code", as they were discussing the current "Year of Code" initiative. I'm surprised they can be so clueless and dismissive regarding computer code; would they take a cursory glance at the work of physicists, doctors and mathematicians and dismiss it simply because they don't understand it?
On the other hand, in many ways you'd be right to be dismissive regarding the basic premise being purported by Lottie Dexter, director of the Year of Code initiative. She did a very bad job of explaining either "code" or why and how it should be taught to young people. Most baffling of all is why she continued the lie that computer programming is something you can learn quickly ("in a day"!), while also admitting that she doesn't know how to program at all herself. Facepalm.
Regarding the "why teach code to 5 year olds" question, I'm not surprised that she had a hard time answering questions. My answer would be "don't". People who code tend to be natural problem solvers who enjoy working with abstract concepts (some people think strong mathematics ability is a requirement but that's not necessarily true). I'm of the opinion that *most* people don't fit that profile. But also, the article kept stressing that in the future we will all need to code to be useful in the knowledge economy. You could have made that point twenty years ago, but people today don't need to code on a daily basis. Hell, I wouldn't need to write software if it wasn't my actual job - why does everyone suddenly need to start writing javascript?
We don't teach Mandarin, Chemistry or A-level maths to five year olds because we realise that a) they're hard subjects, and b) not everyone will need those skills. Computer programming is in the same league. We save these skills to be taught later when people start to become aware of their strengths and interests. So I'm all in favour of teaching good coding skills in schools, but only to the students that want to learn. Teaching coding across the board just seems bizarre.
Watching the segment again on iPlayer (link - starts at 17:50), the implications of this "coding" requirement entering the curriculum in primary schools from Sept 2014 began to sink in. Teachers will surely need a lot of support in getting up to speed with this, and kids aren't going to be able to learn "code" without using a computer directly - most primary schools I know only have one computer per class. I agree with Clive in the comments below that we could be teaching broad problem solving concepts without a computer. However this initiative whiffs of sophistry and lip service from the government. I sincerely hope these lessons won't be rote "copy out the code block into the box and press RUN" exercises, but I expect to be disappointed...
I guess it must be true for any skilled worker that when journalists cover your area of expertise, your hackles rise and you begin to wonder what basic stuff is being misunderstood and misrepresented by those journalists in all the other articles you've ever read on other subjects. Fair enough, journalists are generalists - they can't be expert in everything. However, the computer industry must be one of the last ones where a journalist can describe your passion and life's work as "baffling ... gobbledegook" and then dismiss it with a "it doesn't mean anything!". Both of those conclusions were drawn by Jeremy Paxman and Zoe Conway on Newsnight tonight regarding what they termed "code", as they were discussing the current "Year of Code" initiative. I'm surprised they can be so clueless and dismissive regarding computer code; would they take a cursory glance at the work of physicists, doctors and mathematicians and dismiss it simply because they don't understand it?
On the other hand, in many ways you'd be right to be dismissive regarding the basic premise being purported by Lottie Dexter, director of the Year of Code initiative. She did a very bad job of explaining either "code" or why and how it should be taught to young people. Most baffling of all is why she continued the lie that computer programming is something you can learn quickly ("in a day"!), while also admitting that she doesn't know how to program at all herself. Facepalm.
Regarding the "why teach code to 5 year olds" question, I'm not surprised that she had a hard time answering questions. My answer would be "don't". People who code tend to be natural problem solvers who enjoy working with abstract concepts (some people think strong mathematics ability is a requirement but that's not necessarily true). I'm of the opinion that *most* people don't fit that profile. But also, the article kept stressing that in the future we will all need to code to be useful in the knowledge economy. You could have made that point twenty years ago, but people today don't need to code on a daily basis. Hell, I wouldn't need to write software if it wasn't my actual job - why does everyone suddenly need to start writing javascript?
We don't teach Mandarin, Chemistry or A-level maths to five year olds because we realise that a) they're hard subjects, and b) not everyone will need those skills. Computer programming is in the same league. We save these skills to be taught later when people start to become aware of their strengths and interests. So I'm all in favour of teaching good coding skills in schools, but only to the students that want to learn. Teaching coding across the board just seems bizarre.
Watching the segment again on iPlayer (link - starts at 17:50), the implications of this "coding" requirement entering the curriculum in primary schools from Sept 2014 began to sink in. Teachers will surely need a lot of support in getting up to speed with this, and kids aren't going to be able to learn "code" without using a computer directly - most primary schools I know only have one computer per class. I agree with Clive in the comments below that we could be teaching broad problem solving concepts without a computer. However this initiative whiffs of sophistry and lip service from the government. I sincerely hope these lessons won't be rote "copy out the code block into the box and press RUN" exercises, but I expect to be disappointed...
Subscribe to:
Comments (Atom)
If I helped you out today, you can buy me a beer below. Cheers!