Saturday, 24 April 2010

Camera RAW & HDR

My camera, a Panasonic TZ5 cannot produce RAW format images & that seems to be a loss given all the nice features such as the ability to change exposure (EV) in the raw editors (in my instance Photoshop CS3 Camera Raw). Imagine my surprise to discover that using "Open As" instead of "Open" one can then select "Camera Raw" as the file type & select a JPG or TIF files and get the raw editor on screen.

So, I've been tinkering & have taken a macro shot of a daisy taken as the sun went down yesterday :

and produced firstly this from just the raw tool :
,
unfortunately it seems to lose a lot of brightness during the lossy save / upload process and then using the Raw tools to change the exposure I created 3 files of -4,0 & +4 EV and ran it through Photomatix
:.

I know they're not great pictures but this discovery means a much greater scope for control of a picture and HDR is now possible, I'm even more encouraged having found an article comparing HDR pictures produced using RAW pictures vs images produced using files generated using the camera raw editor.

There's some work to be done - I need to start with a great picture first....

Thursday, 1 April 2010

HP ink refills

I have just had my second try at refilling Hewlett Packard inkjet cartridges. This is something I have tried before with varying degrees of success and more often failure or at the very least success with messy fingers.

Refilling cartridges does appear to make financial sense, I have an HP Photosmart D5460 which produces awesome colour photo output, at present a set of cartridges is around £80 and that is more than 50% of the purchase cost whilst a complete set of inks with the refill tools (the modern ones are good) cost around £23 and I think will do around 4 refills (the box says 5 but with it's hardly an exact science).

Clearly there are downsides to refills (besides messy fingers), chief of which is uncertain print quality and uncertain robustness of the inks - if you are printing photos to display / keep for a long time then sticking to HP manufactured cartridges is essential.

But what if you just want the odd snap to show people and are not concern about longevity? Or you are printing web pages / text for convenience of your work / hobbies (so we print web pages to have a hard copy to refer to when working off screen quite frequently)? Who cares how long the colours stay bright.

I have purchased a set of inks from Inktec. I don't recall any magic claims about longevity of the colours but they are supposed to be consistent colour blah blah and they come from a business specialising in refills - there are plenty of cheaper sources out there, particularly ebay. These come with tools which actually work, the instructions are good but take a couple of goes to figure out.

My experience? Well I have found my HP D5460 cartridges have a little ink window on the bottom that fills with ink, once I realised I monitored how full that was (hold the cartridges the right way up as the ink simply sinks down into the window) and that is the indicator.

The big trick with this HP5460 is the software. HP have been very clever to make sure you keep buying their cartridges, the printer bleats if non originals are used - firstly, refilling the existing cartridge is a disaster as the printer keeps saying the the cartridge needs replacing. So the trick is to have 2 sets of cartridges so refilling the "old" set means the printer just tells you that you've inserted a previously used cartridge and asks you to press ok. Job done.

These refills are great. Just remember to refill over a sink.

Sunday, 28 March 2010

Chailey Mill

I went out for a bike ride this afternoon, grabbing a sunny & warm moment between the rain showers we've had for the last few days & on my way around I spotted a view of Chailey Windmill that I had not previously noticed. I've cycled the same route no end of times and just hadn't noticed the mill on the horizon, nor the church for that matter.
>
I've never visited Chailey Mill and having lived in the vicinity for the last 7 or 8 years I think this might be something worth taking Alex to see in the summer.

Sunday, 21 March 2010

Unknown medals

Does anyone know what these medals are for please?


From Chris


They are labelled "Queen Charlotte 1761-1818", "Awarded For Service" and I cannot find them on Google (pictures or words) & cannot find them on a number of medal sites I've lookedat.

Thanks

Wednesday, 17 March 2010

Iomega Iconnect

I've spotted a scattering of previews and a single review of the Iomega Iconnect which is now available. What a great idea, a USB device that hosts other usb devices and is accessible via the normal TCP/IP network capabilities (wired or wireless) of your PC.

This looks really handy to me - I can plug in my 1TB backup drive, a USB memory stick and a printer. At £60 it is an almost unique item at a sensible cost.

It is actually available for purchase now (in fact iomega emailled me to tell me so) and the Iomega site has demo of the web interface that you will get in production.

Unfortunately, it has the typical design flaw applied to usb devices designed by someone who hasn't got a clue, firstly, not enough USB ports, so very quickly you would need two of these, good for making money, not so good for sockets and secondly, usb on the front and back so it doesn't matter how the device is positioned messy wires still protrude - for pete's sake designers, spend a little time thinking about who will actually use these things & how, casual USB use will still be via the desktop.

Discouraged, actually no, the device looks so great, it even has remote internet access, admittedly via a pay for service but you'd have to fiddle with port forwarding on your router anyway (well except for those of you who forgot security) so why not just skip the web service and let yourself directly in?

So why haven't I purchased on yet? Well I have an HP D5460 printer with the usual 2 way usb capabilities - it is used on 2 PCs & I've got the usb cable taped to a desk leg for convenience of swapping over so having the printer on the network would be great but I do like the 2 way comms.

More and more devices support modern usb features, does the Iomega Connect? Who knows, the manual does not say but what it does say is "connect a supported printer". Is there a list of supported printers? No.

I've raised a support call with Iomega - they have responded which is good - they even responded same day (now 7 days ago) with "we'll check to see if a supported printer list exists". Why say connect a supported printer if you don't know what is supported.

There, that's off my chest now.

Wednesday, 24 February 2010

SQL Server Job Rerun Utility

Ever had a server with numerous scheduled tasks that suffers numerous failures? It happens, one day your SQL Server is working then the next several jobs fail, you diligently rerun them all which takes you hours. Perhaps you even find the same problem again, maybe a drive is on the way out causing an intermittent problem, maybe some evil techie turned off that tape drive for purposes known only to him. Maybe your jobs are running but never finishing so you have to cancel some to free up resources.

You've got a problem. You need to fix it.

But you also need a way to quickly and easily rerun all of your outstanding jobs because that can take hours. Microsoft provide
[msdb].[dbo].[sp_start_job] 'job name'
to help out but that's only good for one job.

I've written the following code to rerun any jobs that have failed or been cancelled which fit the given name using the standard like syntax, waiting for a specified delay between each.

Syntax is
usp_ReRunJobs 'job name', 'delay'
where 'job name' is literally the textual name of the job ie if all of your full backups are called 'Full Backup Of xxxx' then 'Full Backup %', alternatively, just '%' to do everything, whilst 'delay' is in the format 'hh:mm:ss' ie '00:00:30' means a 30 second delay between each job.

You might have even tried the retries feature of scheduled jobs - that works wonders except where a job is genuinely broken and the retry impacts on the next job and so on, so usp_ReRunJobs could be scheduled to run daily after the usual job complete as a backstop.

Here's the code  :

IF OBJECT_ID ( 'usp_ReRunJobs', 'P' ) IS NOT NULL
    DROP PROCEDURE usp_ReRunJobs

go
create procedure usp_ReRunJobs (
      @Name       varchar(255)      = 'Full Backup%',
      @Delay            varchar(8)        = '00:00:60'
)
as
begin

      set nocount on

      IF ISDATE('2000-01-01 ' + @Delay + '.000') = 0
    BEGIN
        SELECT 'Invalid time ' + @Delay + ',hh:mm:ss, submitted.';
    END else begin

            create table #xp_results(
            job_id uniqueidentifier not null,
            last_run_date int not null,
            last_run_time int not null,
            next_run_date int not null,
            next_run_time int not null,
            next_run_schedule_id int not null,
            requested_to_run int not null, -- bool
            request_source int not null,
            request_source_id sysname collate database_default null,
            running int not null, -- bool
            current_step int not null,
            current_retry_attempt int not null,
            job_state int not null )
     
            declare @JName                varchar(255)
            declare cJobs cursor fast_forward for
                  select      j.name
                  from msdb..sysjobs j
                  join  msdb..sysjobhistory j2 on j.job_id = j2.job_id
                  where j.name like @Name
                  and         j.enabled = 1
                  and         j2.instance_id = (
                                                            SELECT            max(h.instance_id)
                                                            FROM        [msdb].[dbo].[sysjobhistory] h
                                                            where       j2.job_id = h.job_id
                              )
                  and         not exists (
                                                      select      x.job_id
                                                      from  #xp_results x
                                                      where x.job_id = j.job_id
                                                      and         x.running = 1
                              )
                  and         j2.run_status not in ('1','4')
                  order by j.name

            insert #xp_results exec master.dbo.xp_sqlagent_enum_jobs @is_sysadmin = 1, @job_owner= ''
            open cJobs
            fetch next from cJobs into @JName
            while @@fetch_status = 0
            begin
                  select 'Started '+@JName
                  exec msdb..sp_start_job @Job_Name = @JName
                  waitfor delay @Delay
                  fetch next from cJobs into @JName
            end
            close cJobs
            deallocate cJobs

            drop table #xp_results

      end
end
go

I'm not claiming it's the prettiest code or the most efficient but it gets the job done. The only thing I haven't managed to crack is getting the job start message appearing during the execution of the code so if you want to watch your jobs you'll have to resort to activity monitor, I have tried raiserror nowait but that didn't work either but that is a downside I can live with given on the second day of having this code in place it saved me about an hour of rerunning tasks by hand.

Tuesday, 23 February 2010

Roses are red, or not

Photo taken in macro mode on a Panasonic DMC-TZ5, hand held - this was the only one I took that wasn't distinctly out of focus, hand held clearly being a bad plan for macro at the best of times but I had to take the opportunity as I knew I would never get around to getting the tripod out.