Skip to main content
Boman.Biz

Boman.Biz

Go Search
Home
Mobile Monger
  

JS/Blacole.BW–Google Image Search Virus

This this morning everyone in the office has started getting the following warning from Microsoft Security Essentials when accessing the Google Image Search page – this is even before actually searching for an image!

There are some fairly convincing noises in Microsoft forums that this is indeed a false positive and that new virus definitions are coming in the next few hours. 

Update 10:38am: Indeed this has been confirmed as a false positive – new definitions ETA 2 hours.  The guy at Microsoft that did this will either be fired or promoted Winking smile

Update 1:04pm: A new definition update is available that fixes this up.

 

image

Project Server and the Milli-Minute

I just thought it was interesting to note that internally Project Server stores durations in what here at IPMO has become known as milli-minutes.

In Project Server 1 minute is stored as 1000.  We have dubbed these “MilliMinutes”.

Therefore 1 MilliMinute:

  • = 0.6 seconds
  • = 3 Jiffies
  • = 20.16 MicroFortnights
  • = 52.58 NanoCenturies
  • = 2.38 Dog Seconds (Assuming a dog year is the equivalent of 7 human years)
Project Server: Broken Document Information Panel

Recently we had a customer who had a Project Server 2010 installation where they couldn’t edit documents the Project Documents library.

Whenever an Office file is uploaded and then edited from the SharePoint library, Excel/Word comes up with an error:
Required Properties - To save to the server, correct the invalid or missing required properties.

You hit Edit Properties and get:
The form cannot be opened. To fix this problem, contact the form designer.
Form template: http://server/sitecollection/site/proppanel.xsn
The XML Schema for the form template has an invalid value for the following attribute: location

This was a really complex one – and had to raise a Microsoft Support call for it.  They did some analysis on the database and determined it was problem with the list schema.

In the broken Project Documents libraries there were fields with the SourceID attribute set to “{$ListId:Project Documents;}” where in the Project Documents libraries that do work, this value is actually the GUID of the list where the field resides.  So this problem seems to centre around a field value substitution that has not taken place properly in the Site Templating process.

The guys at Microsoft Support did a great job of tracking this problem down.

Here is the resulting PowerShell fix:

Apply-Fix -siteUrl "http://projectserver.local/ProjectWorkspaceURL"

function Apply-Fix($siteUrl)
{
    clear
    Add-PSSnapin "Microsoft.SharePoint.Powershell" -ErrorAction SilentlyContinue # -EA 0
    [Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
    
    foreach ($spwTarget in (Get-SPSite $siteUrl).RootWeb.Webs) {
        Write-Host "Checking Web: " $spwTarget.Url
        $list = $spwTarget.Lists["Project Documents"]
         
        $fields = $list.fields
         
        foreach($field in $fields)
        {
            if($field.SourceId -eq '{$ListId:Project Documents;}')
            {
                $schemaxml = $field.SchemaXML
                $schemaxmldata = [xml]$schemaxml
                $schemaxmldata.Field.SetAttribute("SourceID", $list.ID)
                $schemaxml = $schemaxmldata.get_InnerXml()
                $field.SchemaXML = $schemaxml
                $field.Update()
                Write-Host "Fixed" $field.Title "field in Project Documents"
            }
        }
    }
    Write-Host "Done."
}
Microsoft Touch Mouse Review

touch-mouseblkfobfy111-370x313-1294286260My brand new Microsoft Touch Mouse arrived yesterday – hurrah! -  and here are my initial impressions.

Many of you will be thinking that this is just Microsoft ripping off the Apple ‘Magic Mouse’ – but what these people fail to remember is that Microsoft Research invented this technology, showed previews of their working prototypes back in 2009, way before Apple’s mouse.  However in true Microsoft style, it has taken them a very long time to get this thing to market.

EDIT: As it turns out Microsoft and Apple were working on designs at the same time with different implementations (Capactitive/Optical respectively)

WP_000543The packaging is very well designed with a flip-top box lid that exposes the mouse in a kind of jewel case design was very pleasing.

Generally as a mouse its a very reasonable, responsive unit.  Since it uses BlueTrack, its more sensitive and works on more surfaces than any other regular red LED mouse. 

My last mouse was a full-size wireless BlueTrack explorer, which was very ergonomically shaped for comfort.  This mouse is not very shaped and has a very straight profile – the upside is that it can be used in either hand, but after a full-day of use I could feel the difference.  

Another major down-side is that it uses regular AA batteries and doesn’t have a recharging dock, so I will have to re-fuel it with rechargeable batteries  and cycle them through.  Even though the specs say the battery life should be multiple months – real-world use will tell.

WP_000544The transceiver is super-tiny and there is a place for it on the under-side of the mouse for those that travel.  For some mysterious reason it comes with a high quality USB extension cable for you to plug the transceiver into in case your PC is far away from your work-area.  Weird because the transceiver is supposed to have a fairly long range anyway *shrug*.

 

 

 

So now the important part – Multi-touch Gestures

image

In my use of the mouse, the gestures work very well, and are genuinely useful.  I found myself instantly finding the touch scrolling and side to side panning useful.  The gestures are all quite easy to execute with the exception of the ‘Back’ and ‘Forward’ gestures where I found I really have to kink my thumb up and at an angle to get it to recognise it.

The only major disappointment here is that none of the gestures except for scrolling appear to work through a Remote Desktop session.  For most people this will be a non-issue, but for me, I spend the majority of my conscious life using a Remote Desktop to server somewhere and the ‘Back’ gesture doesn’t work - Grrr.  So with that in mind I wouldn’t recommend this mouse for anyone in software development or IT administration – which is a big pity.  Maybe when more of the servers I control get RemoteFX this will become less of an issue, but I don’t think that will happen for a few years.

scotty_trek4In conclusion I wouldn’t say this mouse has changed my life, and I reserve the right to go back to my far more ergonomic, comfortable, rechargeable BlueTrack Explorer – but it certainly is a new and interesting way to interact with Windows 7.  The gage of its success will be if I miss the gestures in a few months time when I sit down a computer with a regular mouse.  Maybe I will think to myself ‘A regular mouse – how quaint’ Winking smile

    Accessing Project Server Reporting Database from Code

    imageWhat you must learn is that these rules are no different than the rules of a computer system...some of them can can be bent. Others...can be broken.”

    When developing software for Project Server 2010, occasionally we need to present information to the user that can only be sourced from the Project Server Reporting database.  Actually getting the data out of the database is a fairly simple exercise, once you know which one it is! 

    The class that Project Server uses to manage this sort of thing is the PsiServiceApplication that lives in the Microsoft.Office.Project.Server.Administration assembly.  Unfortunately all the classes in this assembly are marked as internal and sealed to prevent unauthorised use – i.e. Us. 

    So in situations like this, its sometimes necessary to use Reflection to bend the rules a little Winking smile

    Enjoy!

    /// <summary>
    /// Gets the reporting database based on a PWA URL.
    /// </summary>
    /// <param name="vstrPWAUrl">The PWA URL.</param>
    /// <returns>
    /// SPDatabase object representing the required Reporting database or Null if not found
    /// </returns>
    /// <history>
    ///     <change user="JBoman" date="10/08/2011">Initial version.</change>
    /// </history>
    public SPDatabase GetReportingDatabase(string vstrPWAUrl)
    {
        Assembly assPSA = Assembly.Load("Microsoft.Office.Project.Server.Administration, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c");
        Type typePsiServiceApplication = assPSA.GetType("Microsoft.Office.Project.Server.Administration.PsiServiceApplication");
    
        MethodInfo minfGetServiceAppByIUrl = typePsiServiceApplication.GetMethod("GetServiceAppByUrl", BindingFlags.NonPublic | BindingFlags.Static);
        object objPsiServiceApplication = minfGetServiceAppByIUrl.Invoke(null, new object[] { vstrPWAUrl });
    
        if (objPsiServiceApplication != null)
        {
            MethodInfo minfGetSiteList = typePsiServiceApplication.GetMethod("GetSiteList", BindingFlags.NonPublic | BindingFlags.Instance);
            object objSiteList = minfGetSiteList.Invoke(objPsiServiceApplication, new object[] { Microsoft.SharePoint.Administration.SPUrlZone.Default });
            if (objSiteList != null)
            {
                IEnumerable colSiteList = (IEnumerable)objSiteList;
                IEnumerator enumSiteList = colSiteList.GetEnumerator();
                while (enumSiteList.MoveNext())
                {
                    KeyValuePair<string, SPPersistedObject> kvpSite = (KeyValuePair<string, SPPersistedObject>)enumSiteList.Current;
                    if (kvpSite.Key.ToLower() == vstrPWAUrl.ToLower())
                    {
                        Type typeProjectSite = assPSA.GetType("Microsoft.Office.Project.Server.Administration.ProjectSite");
                        PropertyInfo pinfReportingDatabase = typeProjectSite.GetProperty("ReportingDatabase", BindingFlags.Instance | BindingFlags.Public);
                        if (pinfReportingDatabase != null)
                        {
                            object objReportingDatabase = pinfReportingDatabase.GetValue(kvpSite.Value, null);
                            if (objReportingDatabase != null)
                            {
                                return (SPDatabase)objReportingDatabase;
                            }
                        }
                    }
                }
            }
        }
        return null;
    }
    
    Hyper-V Failover Cluster with high ping times

    Server - applicationToday I have been trying to get the Hyper-V Server Fail-Over Clustering working using 2 servers running the new Hyper-V Server, which is essentially a Server Core installation with Hyper-V.

    The crux of the issue was that we were getting TERRIBLE ping times to the Cluster IP Address and the other IP Address on one of the adapters.  So bad were the ping times that we were also getting lost packets, the cluster wouldn’t validate and everything was bad.

    The short story is that the binding order of the network adapters was bad on one of the servers.  Using this article I changed the binding order of the NICs on the server by modifying the registry here:

     HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Linkage

    There is much difference of opinion as to what the correct binding order is, but essentially I changed it to be more like the server that was working.

    Warning: my solution is NOT very like any of the suggested binding orders, but my philosophy is that empirical evidence always trumps documentation.

    Binding order of broken server:

    1. <Hyper-V Shared Network>
    2. Microsoft Failover Cluster Virtual Adapter
    3. <iSCSI HBA / Cluster Network>
    4. <Management Adapter>
    5. Microsoft Virtual Network Switch Adapter

    Changed order to:

    1. <Hyper-V Shared Network>
    2. <iSCSI HBA / Cluster Network>
    3. Microsoft Failover Cluster Virtual Adapter
    4. <Management Adapter>
    5. Microsoft Virtual Network Switch Adapter

      Everything is fine now – small change – but made a big difference.

      Multi-Colour Bitmaps on the C64

      A few weeks ago, a friend of my Dad’s wanted to get rid of his old C64 and as it turned out he had only used it a couple of times and it was in great condition still in its original box.

      For a small fee I acquired the machine and various accessories, which seem harder and harder to get these days.  I say “harder and harder to get” because I went to a local flee market the other day that had stalls with so-called “Vintage” computing hardware – but all I found were Super Nintendos, Game Cube’s, Playstation 1’s and a few home-built arcade machines with MAME interiors.  Nothing really old or of note.  Maybe I just don’t hang out at the right flee markets *shrug*  A quick search of eBay right now reveals there are only 7 C64’s for sale, so maybe the supply is starting to dry up!

      I unboxed the C64 and got it started up on the 46” LCD display I had handy:

      252990_10150637756720228_660465227_18933211_6032572_n

      Seeing that blue screen again gives me a good feeling, its quite a complex thing to describe.  I was lucky discovering computing through the Commodore 64.  As a computers go, its more of an alive creature than today’s computers.  If you turn the volume up on the sound output of a C64 you can hear it processing, give it some work to do and you can hear the patterns in the data … but enough nostalgia Winking smile

      I now had a functioning C64, but didn’t have anything interesting to do with it.  It came with a DataSette for loading data from tape, but to do anything really interesting you need a Disk Drive.

      200px-Commodore-Datassette      220px-Commodore_1541_front_cropped

      I used to have a 1541 disk drive of my very own when I was a kid, so I decided to go and get it from storage out of my Mum’s shed. 

      Something to know about the 1541 disk drive it that it is a serial device that responds to commands sent to it by the C64.  Electronically its almost as complex and powerful as the C64 itself – certainly alot heavier!

      I powered up my 1541 drive, but alas after 15 years sitting in the shed it wasn’t working.  The normal behaviour is that the green light comes on, then the red, the drive motor spins – then the red light and drive motor go off.  My drive motor and red light didn’t go off, which meant the 1541 didn’t pass its own start-up diagnostic process.  Disheartened I opened it up vacuumed it out and checked the obvious rubber belts and mechanics but all seemed fine.

      On the main PCB I noticed that all the main IC’s were in sockets.  I thought of a little trick my Dad showed me and gently pressed on each IC until it creaked slightly.  Reassembled and it worked – the red light and drive motor stopped after switching it on.

      Photo_12D4AF35-E6FA-523E-3ACA-E80B0E5491C6

      Now I had a C64 and Disk Drive .. awesome. 

      I had an idea and decided I would get the C64 to do some slideshows.  This involved getting the C64 to display coloured bitmaps – an easy task for almost any digital device these days, but back in the 64’s day displaying a photo-realistic image was a difficult task.

      The C64 has a display that is 320x200 pixels and there are 16 possible colours on the C64 however that is not the whole story.  The C64 has two bitmap modes:

      1. Hi-Res Mode: 320x200 2 colours.
      2. Multi-Colour Mode: 160x200 with 3 colours per 4x8 square plus a global background colour.

      It is this second multi-colour mode that I am interested in, and while this mode displays the most colours, we lose half the horizontal resolution in exchange for the increased colour space.

      The way it works is that each pixel has two bits assigned to it that specify one of four locations to find a nybble (4 bits) that designate a colour from the full 16 available on the machine.

      • 00 – Get colour from the global background colour at 53280
      • 01 – Upper 4 bits of screen memory (1024 to 2023)
      • 10 – Lower 4 bits of screen memory (1024 to 2023)
      • 11 – Lower 4 bits Colour memory (55296 to 56295)

      Each group of 4x8 pixels is assigned one byte from both the screen memory and colour memory to get the additional colour space information.

      image

      This makes the total amount of storage consumed 10,001 bytes for the frame, quite a complex setup.  This whole mechanism is aimed at conserving memory as it is pretty tight on a machine that really only has 40k of usable RAM.

      The next challenge is to get a normal JPG photo into this format – hmmmm

      IMAG0304

      The first step is to get the photo into the correct dimensions. 

      Resize into 320x200 first and then warp the aspect ratio into 160x200 – remembering that since all the pixels are double width, the aspect ratio will fix itself up later when it actually renders.

      Stage1

      Next, we need to get the image into the correct colour space.  I could write my own dithering algorithm, but really Adobe Photoshop does it best.  Just setup a colour table with the 16 C64 colours in it and tell PhotoShop to sort it out:

      image

      Result:

      Stage2

      The next part couldn’t be done by PhotoShop – I wrote a small program in C# to do it:

      • Survey the entire picture to find the most populous colour – this will become the global background colour.
      • Survey each 4x8 area of the photo find out the 3 most popular colours, and then fit the remaining pixels into the closest fit.
      • Create a file containing the resulting Hi-Res buffer, Screen Memory and Colour memory.
      • Render a preview just for fun Smile

      image

      Photo_85057A8D-07DA-2131-C295-CB38D9B469B8So now I have a file that is 10,001 bytes long, just have to get it onto the C64.  Hook up the 1541 via the special serial cable to an old NEC Laptop (its the only thing I had around that actually still has an old SPP style parallel port!) and transfer the file into an SEQ (Sequential) file using an old DOS utility called Star Commander – its a very well written piece of software that uses the PC parallel port to emulate a C64 serial port to talk to the 1541 drive.  Very clever.

      With heavy reference to the C64 Programmers Reference Guide I wrote a program in BASIC that loads the file from disk and puts all the bytes where they are supposed to go.

      It was then I also remembered how BASIC on the C64 actually executes … very slowly!

      Oh well – re-writing it in machine code is a project for later!

      And the final rendered result on the C64 ……

       

      ccs16

       

      …… I don’t know why, but I think thats an awesome result from a 30 year old computer Smile

      Bing Vision to take on Google Goggles

      imageWhile Google Goggles has been around on Android phones for ages, according to Windows Phone developer podcast it looks like Windows Phone 7 will be getting a visual search in the Mango update scheduled for later in the year.  I look forward to pointing my phone at various objects around the house and hitting search to learn more about them.

      <Begin Usual Rant>

      Although it might be a bit of a gimmick - hopefully this is a feature makes it outside the US and to Australian users and doesn’t get added to the long list of features of Microsoft Products are gimped for international users:

      • WP7 Clickable addresses
      • WP7 Copy & Paste (Still without NoDo here in Australia on Omnia 7)
      • Zune Pass
      • Kinect Voice control
      • etc. etc.

      After getting an iPad2 recently I am gradually moving away from Microsoft for my own mobile computing needs, as I have realised they have chosen not to compete in the Australian market – not being able to offer a way for people to legally purchase content for Windows Phone.

      Apart from a few music tracks on bandit.fm – it seems iTunes is the only functioning music store for Australian users.  For some weird reason Zune, Rhapsody, Spotify, Last.FM, Netflix, RDIO, Netflix, Amazon Music etc. etc. all don’t want to participate in the Australian market…… FINE.  I will go where the content is … and unfortunately that's Apple iTunes. I never want to hear complaints from any of those companies wishing they had more market-share, because to have market-share you need Step 1: Participate in the market.

      Ahhh…. now I feel better Smile

      KIN Studio coming to WP7–Called “Mobile Studio”

      imagesCA5HUKJFLooks like Microsoft are just now starting up the project to port the KIN studio over to Windows Phone 7, and have decided to hire some interaction designers.

      “Help us change the way people think about mobile phones. The Mobile Studio will redefine the mobile phone for millions of everyday users around the world.”

      Source

      WP7 NoDo Finger Pointing

      Microsoft has been collecting a lot of criticism lately for the tardiness of the promised updates to their Windows Phone 7 operating system.  Joe Belifore didn’t help by proclaiming in a video on Channel 9 that the update process was almost completed – this prompted Microsoft to release a chart with some more details about how the update was progressing, and in Australia at least it points the finger squarely at the carriers as the reason for the hold up:

      image

      However Alex Angas noticed on the Telstra Website a “Software Updates” tab that lists the updates as either having been approved by Telstra, or not having been received from Microsoft:

      image 

      So it has turned into schoolyard finger pointing match, with the Windows Phone early adopters the losers – as Windows Phone 7 devices purchased today commonly already contain the updates.

      Microsoft have been innovative in discovering all new ways to totally eliminate any confidence in their mobile platform.  I know I won’t be spending any more time on the Windows Phone application I was writing until Microsoft get the carriers out of the loop and start delivering updates directly to end users.

      My Samsung Omnia 7 has a big Optus logo in the boot sequence that indicates it has an Optus specific ROM loaded, even though I run it on the 3/Vodafone network so this carrier testing situation is ludicrous and irrelevant and needs to stop.

      1 - 10 Next

       FishEYE

       My Employer

       Microsoft Tag

       Skype

      My status

       XBOX Live

       ‭(Hidden)‬ Admin Links