Thursday, 5 July 2018

Get current hour expression in Flow

This wasn't obvious to me!  I wanted to get the current hour to use in a condition in my Microsoft Flow.  I was looking to only perform an action between certain hours.

int(formatDateTime(convertFromUtc(utcnow(),'GMT Standard Time'),'HH'))

The expression uses utcnow() to get the current utc datetime. It's passed into the convertFromUtc function as the first argument.  The second argument is the region.

Finally, I use formatDateTime to format it using 'HH' which is 24 hour format.  This outputs a string value.  The int function is used to parse the string value to an integer type.

My flow has a condition that would only perform a sequence of actions between the hours of 6pm and 7am.

@or(less(variables('CurrentHour'), 7),greater(variables('CurrentHour'), 18))



Thursday, 10 June 2010

Samsung Series 6 (UE46B6000)

samsung-led-tv

I have recently bought a Samsung Series 6 television and I wanted to share my thoughts.

I’m not going to describes specs. so look here. 
http://www.samsung.com/uk/consumer/tv-audio-video/television/led-tv/UE46B6000VWXXU/index.idx?pagetype=prd_detail

I spent time reading many reviews before I took the plunge!

First thing, it’s brilliant!

Why did I choose the 6000 series?

There was a series 8 (UExxB8000) and the overall difference between the Series 6 and 8 in my opinion are:

  • 200 Hz
  • DLNA
  • Media 2.0
  • Yahoo widget stuff
  • £400 more

These didn’t interested me.  I have an Xbox 360 and Virgin Media V+.  The Xbox 360 can output at 1080p at 60hz and the V+ box at 50Hz so this ruled out the 200 Hz mode for me.

I basically use the television as a huge monitor, being delivered digital TV and on demand from the V+.  My Xbox has all the necessary DLNA crap that I never use anyway.

Internet Explorer 8 freezes when attempting to browse

I had a weird problem with my Internet Explorer that took me a while to track.  Occasionally when I would open other tabs and try to browse to bing.com,  google.com or any other web site it would not respond to the request.  It would freeze and behave like there were not connections available! Odd.
Anyway, I found a problem that solves it for me.  AVG Web Shield was causing my issue.  I have no evidence to support my claim other than when I restarted my computer and started using Internet Explorer 8 the problem went away.  Could be coincidence :)

Steps to disable Web Shield
  • Double click the AVG icon in the notification area of your taskbar
  • Double click Web Shield icon circled below
  • Uncheck Enable Web Shield (require browser restart) 

Thursday, 25 February 2010

Peugeot 206 Door Repair

Damage

At the end of the day a car is a ‘machine’ designed to get you from A to B.

My 206
My car : Peugeot 206

Unfortunately, I am a victim of a car break in. 

A thief broke into my car, stole a few items and damaged my car door to enter.  It looks like a sharp instrument like a screwdriver was forced into the side of the lock to unlock the vehicle and gain access.

Hole in door
The damage to driver side door

Above is the result of the damage. The dirt was there before! Now, I have been quoted around £230 - £600 for the repair ranging from just a none guaranteed fill in and paint, to a full door skin replacement!

My car insurances costs me roughly £400 per year for fully comprehensive and I’m a 30 year old male with 7 years no claims bonus.  My excess is £200.

Should I make a claim I’d have to pay the £200 excess plus lose my no claims (or part) bonus thus losing my 70% discount.

So, for the maximum saving it made sense to pay for the repair myself or for me to carry out the repair. I decided to do the repair myself. I have written about it here because I found very little resource on the internet and also if you are like me and lack the confidence and know-how then this may lead you in the right direction (hopefully).

Preparation

Takes a while but worth doing. This is how I did my preparation work.

Tools and Materials

You need TORX screw drivers to remove the screws from the door trim. I bought a set from B&Q for £13. If you want to save money here just get the size T20. I didn’t know the required size hence why I bought a set.

Milliput 
Milliput Putty

I bought some Milliput putty from the local car auto care shop. You basically mix 2 different types of putty together and over a few hours it’ll harden like rock. Cost £4.99.

paint

Touch up paint

I bought Peugeot black touch up paint from Halfords. Cost £7.99.

Repairing

Firstly, remove the door trim.  You’ll want to get access to the hole from inside the door to bend the metal back and shape the putty. We don’t want any putty getting in the way of the locking mechanism.

Here are some pictures on how I did it.

Tweeter housing
Removing Tweeter housing

Remove the tweeter housing. I managed to get my fingers in all sides and pulled it away. It’s quite strong but don’t bend it off. 

Exposed tweeter
Tweet Tweet

Once off, the tweeter hangs out to say hello! The glue on mine had dried and was brittle. 

IMG_0135 
Door Lever Removed

Next, remove the door lever. It just pulls out.

IMG_0134
Remove Door Handle

Don’t forget to take off this handle.  Remove the screw first in the centre.

Screw placement

The screws

Remove two screws here. The small on between the two large ones near the top of this picture. The one near the bottom of this photograph.

Screw placement
Door trim screw

Remove the screw below the door window.

Removing trim from door

Door, bottom of trim

Pull the door trim off from the door.   The clips are quite strong.  You’ll be able to feel the resistance to determine where the clip is. Use a screw driver to gently pry the trim from the door. 

Door trim removed
Tear away paper to fit hand

The door is covered by a paper mesh that is glued to the door.  You’ll have to gently peel some away to gain access to the damaged hole from the inside.

Tearing paper
Hole visible via tear

You cannot see in this picture but through the hole you’ll see the damage.  I found it awkward but managed to bend as much of the metal back into place.  It also allows you see the putty and position it from this side.

Filling

Describes filling the hole with putty.

IMG_0132

Putty Mixed

This is the putty I mixed.  It comes in two parts of blu-tac like substance. Mixing the two parts activates the putty; its pliable and will harden in a few hours.

IMG_0130 
Putty in hole

I pushed the putty in the hole ensuring that nothing was obstructed on the other side.  I used a dam cloth to ‘sand’ the putty so that it was smooth and equal to the existing surface.  The guy at the auto care shop said ‘Don’t let it dry and then sand it’. Mould it as best as you possibly can why it’s pliable!

IMG_0142
Putty in hole

Just another view. Smooth as a baby’s bottom!

Painting

Describes the painting process.

IMG_0189
Mask around the fill and primed

I put masking tape around the filled hole so that I would only paint the area that required painting.  Also, it would catch the excess paint. This shows it with the primer paint applied.

IMG_0263 
Painted
I took this picture about 2 weeks after getting the paint done.  Hence the dirt.

IMG_0264 
Painted Close up

Not a perfect job. I’ve left a drop at the bottom.  All in all I’m pleased with the work I’ve done.

Total Cost

So, this is the total cost.

Item Price
Millput Putty £4.99
Paint £7.99
Screw Drivers £13.00
Labour (me 1 hour) £0

Total

£25.98

Wednesday, 6 January 2010

IE7Pro

Add spell checking and other features to Internet Explorer.
http://www.ie7pro.com/

Wednesday, 15 July 2009

Jet Brains ReSharper

I have using the ReSharper evaluation and now it has come to crunch to decide whether or not to purchase. I was very impressed with what ReSharper has to offer with all the features that were added to Visual Studio.

I have been using Eclipse for Java development and felt I was switching to a ‘less feature rich IDE’ when moving to Visual Studio when navigating around a large solution. This drove me to evaluate CodeRush and ReSharper.  I felt that the version for CodeRush Xpress for Visual Studio just didn’t cut it.

These were the following ReSharper wins for me:

  • Type Hierarchy: This would allow you to view a Hierarchy of classes that implemented / derived from certain classes and interfaces.  The Visual Studio ‘Find All References’ is just too dawn slow!
  • Go to Implementation: Allows you to to directly navigate to an implementation of an interface; multiple implementation would pop up showing the ‘Type Hierarchy’.
  • File Search: Allows you type part of a filename to locate it in the solution.
  • Type Search: Allows you to type part of a type name to find the type.

Well, despite my love for ReSharper I could not justify the purchase with my own cash since ultimately my company would be benefiting from the purchase. In my opinion my company should make the purchase to serve the dozen developers we have to improve the productively levels.

I thought I’d share some alternative add-ins that I have found for Visual Studio 2008 to allow you to get by a little easier.  It’s doesn’t solve everything but if you want to make Visual Studio a little bit more feature rich and tolerable when moving from Eclipse then this is what I recommend.

DPack

DPack is a FREE collection of Microsoft Visual Studio 2008 and 2005 tools. DPack is designed to greatly increase developer's productivity, automate repetitive processes and expand upon some of Microsoft Visual Studio features.

It provides File Search and Type Search, make sure to change the settings to cache to disk rather than to memory, otherwise you’ll be stuck will the dialog window that collects information about your solution every time you open you solution which can take a few minutes.

Visual Studio PowerCommands

Visual Studio PowerCommands provided various useful commands such as Collapse Projects, Open Containing Folder etc etc. See http://visualstudiogallery.msdn.microsoft.com/en-us/DF3F0C30-3D37-4E06-9EF8-3BFF3508BE31

Reflector

Reflector allows you to analyse assemblies showing you various implementations of classes and interfaces.  Not a true type hierarchy but combined with RelectorLink it proves to be quite useful.

I would highly recommend ReSharper but I think that the productively improvement it provides should be provided by the company you’re working for rather than yourself. If you’re self employed and/or a contractor then ReSharper will serve you well.

Thanks for reading.!

HttpWebRequest.DefaultMaximumErrorResponseLength

I usually use Google to hunt for solutions to my exceptions but this one proved to be a challenge with regards to the amount of digging that had to be done.

I encountered an issue with a .NET Client receiving a Soap Fault that was greater than 64K. This mean’t that a response stream greater than 64K got truncated and thus this exception.

[System.Xml.XmlException] = {System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: faultstring, soap:Fault, soap:Body, soap:Envelope. Line 2833, position 4.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextR...

Turns out you can set HttpWebRequest.DefaultMaximumErrorResponseLength=-1 for unlimited in code or the web.config / app.config

  

<system.net>
    <settings>
      <httpWebRequest maximumErrorResponseLength="-1"  />
    </settings>
  </system.net>



Lets hope with some indexing that this post serves you well!