Dec 19 2009

Allowing remote desktop with blank passwords on Win7

Category: .geek,.media centerAmit Bahree @ 12:47 pm

I finally got the time to upgrade my MCE with the RTM bits of Win7 (was running an old RC build until now). Given this is a dedicated MCE with nothing else on it and an on an isolated part of the network, I don’t have a password set for the Account I use to login (of course not a recommended practice). Now, I wanted to RDP to the machine and I realised then that Win 7 does not allow RDP with blank passwords by default (Vista behaves in the same fashion). The workaround is a simple fix – to update the group policy as Dan shows in this post. Even though that post is for Vista, its the same steps for Win 7.

Share

Tags: ,


Dec 06 2009

BizTalk Flat File schema optional attribute issue

Category: .geek,.microsoftAmit Bahree @ 11:37 pm

I encountered this interesting issue and thanks to Colin we were able to resolve it. There will be situations you will encounter when adding additional optional attributes to a Flat File (FF) schema in BizTalk will cause problems. To get around this you basically will need to set the following properties to relax the parsing of the attributes which break.

  • parser_optimization="complexity"
  • allow_early_termination="true"
  • early_terminate_optional_fields="true"

This got me thinking more and wanting to understand what does changing these attributes mean under the covers. Below is what I found out on each of these.

On parser_optimization:

  • Setting the parser_optimization to complex essentially generates a more complicated grammar (it uses both a top down and bottom up parsing); this grammar is then used to parse the FF.
  • The complicated grammar is better when parsing records with more optional nested options – however it still cannot handle all the layout conditions and can still break in some situations.
  • And given the runtime is doing more things, this will be slower than the other option called ‘speed’ (yeah no kidding Sherlock!).
    • The reason the ‘speed’ option is faster is because it uses top-down parsing only.
  • In addition you should also set lookahead_depth to zero (more on this below) to avoid validation failures (against a schema) when there are many optional nodes in the same group/record.

Changing the lookahead_depth itself is trivial but you need to be a little more aware of what this means:

  • This essentially tells the parser when making a parsing prediction how far ahead to look in the token stream.
  • Setting this to Zero essentially means ‘infinite lookahead’ which in turn means more memory will be consumed.
    • Depending on how busy your BizTalk servers are and how much memory pressure you already experience processing various files (and their sizes), this might be an issue.

Basically, the FF parser is a streaming parser and implemented as a leftmost derivation which takes in a CFG. Essentially when we change the lookahead_depth to zero we change do not restrict this and the parser can recognize tokens using DFA perhaps (of course we don’t know the real implementation).

For those old school like me, and have played with yacc – that is a LL(1) parser – essentially parse the grammar with one token lookahead.

On allow_early_termination="true":

  • When working with FF’s BizTalk expects that every line is of the same length (either because of the data contained padded with spaces). However if it finds a newline (CR + LF) character then it breaks and you get an error something along the lines of “Unexpected data found while looking for: \r\n”.
  • Adding the allow_early_termination setting helps fix this. Read more here.
  • Also note that only the right-most positional field is allowed to early terminate.

Lastly, the early_terminate_optional_fields attribute enables early termination of optional trailing fields. A couple of points to note on this:

  • If your schema does not have this annotation and you open that in the BizTalk editor, then it will automatically add this annotation explicitly and set it to the default value of False.
  • This only takes affect if you also have the allow_early_termination annotation set to True.
  • More details on this here.

And in case you were wondering this is a supported option by Microsoft as shown in this KB article.

Share

Tags: ,


Oct 25 2009

Installing OpenSceneGraph on Ubuntu

Category: .geekAmit Bahree @ 2:06 pm

If you use the Synaptic Package Manager in Ubuntu 9.04 to install OpenSceneGraph, by default it will install version 2.4.x. However if you want to install OpenSceneGraph 2.8.1 then you need to do the following in a terminal:

  1. Modify the file /etc/apt/sources.list (make sure you run it via sudo something like: sudo gedit /etc/apt/sources.list)
  2. Add the following two lines in the end and save the file:
    1. deb http://openscenegraph.dachary.org/packaging-farm/openscenegraph/gnulinux/debian/unstable/src ./
    2. deb-src http://openscenegraph.dachary.org/packaging-farm/openscenegraph/gnulinux/debian/unstable/src ./ 
  3. Run in the terminal: sudo apt-get update
  4. And finally run: sudo apt-get install openscenegraph

Share

Tags:


Jun 17 2009

Major Network Attack

Category: .geekAmit Bahree @ 10:21 pm

Wow! Looks like a lot of bots suddenly woke up – major attack in progress.

image

Grrr … b**tards!

Share

Tags:


Jun 02 2009

Image detection – how, what, where – any insights?

Category: .geekAmit Bahree @ 10:00 pm

I don’t have much experience with image detection in a video, and wanted to understand what options are possible – all I know it is not as simple as “CSI” makes it out to be – yet. Smile

Here is the scenario:

Say I have a remote controlled aircraft (a mini helicopter) which among other things has a camera fitted which is filming over a certain area. I use a training set and somehow “train” the camera to look for certain objects and recognise data points of that object and learn it to recognize that object (for example a human in Pink). Now once this is trained, if the helicopter is over another area and recording I want it to be able to recognise these pre-trained images in that video feed and do something if something is found (e.g. a human in pink).

The closest “CSI” analogy I can think of is – the facial recognition which they show to be iterating through hundreds of photos comparing data points (which of course as we all know this is mostly fiction – but that is a discussion point for another day).

So the question:

What does it take to compare objects in video feeds? I am not really interested in knowing how to “train” and find a pink human – but rather how to reliably and possibly quickly (within reason of course) compare and see if two are the same of the pattern. This should also reduce the false positives – e.g. a pink table might look like a human in pink with the environmental factors (shadows, sunlight, rain, angle of camera, etc.). I have read a little online but don’t have any experience in the subject.

Has anyone done this (or something similar) in the past or have any pointers for me? Smile

Share

Tags:


May 19 2009

Creating an Event Source via a Reg File

Category: .geekAmit Bahree @ 8:55 pm

If you ever tried to write to the event log, without an event source for that application created you will get an exception saying something along the lines of that you do not have permissions to create the event source.

If an event source does not exist, it is automatically created. The creation of the event source is a privileged operation and requires elevated privileges (a.k.a admin privileges) which of course might not always be possible if running a web application.

The easiest way to create this event source is via a reg file. An example is below (credit goes to my colleague Dominic to provide me the original sample).

Note: you need all the lines below including the “Windows Registry Editor Version 5.00”.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\YOUR-APPLICATION-NAME-GOES-HERE]

"EventMessageFile"=hex(2):43,00,3a,00,5c,00,57,00,49,00,4e,00,44,00,4f,00,57,\

  00,53,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,\

  4e,00,45,00,54,00,5c,00,46,00,72,00,61,00,6d,00,65,00,77,00,6f,00,72,00,6b,\

  00,5c,00,76,00,32,00,2e,00,30,00,2e,00,35,00,30,00,37,00,32,00,37,00,5c,00,\

  45,00,76,00,65,00,6e,00,74,00,4c,00,6f,00,67,00,4d,00,65,00,73,00,73,00,61,\

  00,67,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,00,00

Share

Tags:


May 18 2009

Upgrading Enterprise Edition to Ultimate (Vista or Win7)

Category: .geekAmit Bahree @ 10:40 am

If you are ever in a situation where you want to upgrade say from Vista Enterprise edition to Win 7 Ultimate edition – by default you cannot do this. When you insert your Win7 disc you won’t find the upgrade option available and the only way you see forward is to do a complete fresh install (after backing up your data of course). However, that is very time consuming and of course generally a lot of pain.

So here is a tip to get you to upgrade without doing a complete fresh install where you “fool” the installer in thinking you have a different version to allow you to upgrade.

You need to do the following steps, before inserting the Windows DVD

  1. Go to, Start, Run: and type: regedit.exe
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
  3. Change the key: ProductName from "Windows 7  Enterprise” to “Windows 7 Business” or to “Windows 7 Ultimate”
  4. Change the key: EditionID from "Enterprise" to “Business” or to “Ultimate”
  5. Do not restart!
  6. Now insert Windows DVD and start upgrading (the option Upgrade will not be graded out anymore)

Of course you will need the appropriate licences and still need to activate, etc.

Share

Tags:


Apr 04 2009

RAID Blues

Category: .geekAmit Bahree @ 12:59 pm

On my machine running all the VM’s at home – one disk has failed. I have not replaced it, instead marked it as OK and am rebuilding the volume now. Second time this has happened – if it happens once more then maybe it is time to actually replace the physical disc.

*Sigh* I hate disc failures.

image

Share

Tags:


Apr 04 2009

foldl' better than foldl

Category: .geekAmit Bahree @ 12:13 pm

In Haskell the foldl' function defined in the module Data.List is better than foldl because that does not use a thunk. A thunked expression requires an internal stack. As an expression can grow infinitely large, the runtime imposes a limit on the size of this stack. As the simple example below shows that given a large enough input the stack will overflow.

Prelude> foldr (+) 0 [1..100]
5050
Prelude> foldl (+) 0 [1..100]
5050
Prelude> foldl (+) 0 [1..1000]
500500
Prelude> foldl (+) 0 [1..10000]
50005000
Prelude> foldl (+) 0 [1..100000]
5000050000
Prelude> foldl (+) 0 [1..1000000]
*** Exception: stack overflow

On the other hand, foldl' while similar to foldl does not build up on thunks and in real world programs is probably more useful.

Prelude> :module +Data.List
Prelude Data.List> foldl' (+) 0 [1..1000000]
500000500000
Prelude Data.List> foldl' (+) 0 [1..1000000]
500000500000
Prelude Data.List> foldl' (+) 0 [1..10000000]
50000005000000

Share

Tags:


Mar 17 2009

Vista Tip – launching apps as admin

Category: .geekAmit Bahree @ 10:34 pm

This is probably not new, but I was not aware of it until recently. To launch an application as an administrator you press CTRL + SHIFT + ENTER when using the Search box – instead of just Enter. Pretty cool if you are a keyb guy/gal.

Share

Tags:


Mar 12 2009

MIT’s Wearable 6th Sense

Category: .geekAmit Bahree @ 7:13 am

MIT’s Media Lab has a prototype of a wearable 6th sense – pretty damn cool – initially seems to get you thinking “what is the point?”; but sit it out and it will all make sense! Of course the whole “6th sense” is glamorizing it a bit, it is more JIT info.

I wonder what happens if your phone is not in a 3G/HSDPA coverage and what the battery drain on the phone is with the data connection always on and how big is your phone bill (most people don’t have unlimited data options on their mobile).

Share

Tags:


Feb 21 2009

That Cern think explained

Category: .geekAmit Bahree @ 3:27 pm

I guess since we are all alive, it will be good to understand what that Cern thing really is (pdf). Smile

Share

Tags:


« Previous PageNext Page »
Get Adobe Flash player