Monthly Archives: June 2012

Java pie

A useful JavaScript library I came across recently is the one created by Balamurugan that is based on the wz_jsgraphics library from walterzorn.

I made some modifications to the Pie library so more ‘properties’ can be specified by the calling script/code which makes it easier to use.

An example:

JavaScript Pie graph

<script type="text/javascript" src="wz_jsgraphics.js"></script>
<script type="text/javascript" src="pie.js"></script>
<div id="pieCanvas" style="overflow: auto; position:relative;height:300px;width:400px;"></div>
<script type="text/javascript">

 

var p = new pie();
p.radius = 100;
p.labelDistance = 120;
p.xCenter = 200;
p.yCenter = 150;
p.add("Jan",49);
p.add("Feb",51);
p.add("Mar", 87);
p.add("Apr",120);
p.add("May",56);
p.add("Jun",41);
p.add("Jul",31);
p.add("Aug",65);
p.fontName = "Tahoma";
p.labelFontSize = 14;
p.render("pieCanvas", "This is a test");

With this you will get a plain (but nice) pie graph that can use customize a bit if you like.

Here is a link to my modified version: JavaScriptPie

Windows Phone 8 on older hardware

I was reading this morning about the previews of Windows Phone 8 starting to make rounds and the one thing that draw my attention was the things mentioned about older hardware that won’t be supported by the new OS. I have an older ‘first generation’ WMP7 phone (HTC Mozart) that I use as a backup phone so it would have been nice if it was possible to upgrade to WMP8 – but unfortunately MS is greedy and wants us to buys more hardware (that has all the royalties and licenses built in) that makes them even more money.

One interesting thing mentioned in a techreport article is that there will be an upgrade to WMP7 to version 7.8 that will superficially look like the new OS (but many features missing of course). Hopefully this could help until I have the opportunity to upgrade my phone at the end of this year or so.

 

Microsoft announce tablet

I have to admit, the general feeling towards Windows 8 is still not a positive one – definitely if you look at it from a desktop/productivity perspective. BUT, seeing the pictures of the newly announced Microsoft tablets there may be some hope for Microsoft/Windows – as long as you are in the ‘tablet’ or consumer market. They are to be branded ‘Surface’ or Microsoft boutique multi-touch tablets. Looks awsum! (but then these are marketing pictures…)

Microsoft tablet

Microsoft tablet (shamelessly copied from techreport site 😉 )

One positive feature of both (yes that’s right two) models is the battery life. The ARM (NVidia) based one has something like a 31 watt-hour battery while the Intel one has 42 watt-hour. If that is true these little machines would really be nice for people that are always on the move. The Intel model features a full HD display while the ARM model has an expansion slot (Micro HD). Both models include an detachable ‘soft’ keyboard. Storage is not in the PC arena but still a useful 32 or 64GB on the ARM model and 64/128GB on the Intel one.

Keyboard choices

Keyboard choices

On a slightly negative side they only have USB 2.0 ports (not 100% sure about the Intel one) plus only the ARM model includes a copy of Office. The tablets will be sold in Microsoft ‘stores’ thus meaning it won’t be available in our beloved S of A. Our only option would be to try to buy it online or smuggle one in with a friend that was visiting the US of A.

Well, good luck Microsoft, perhaps there is some hope for ya.

Update: apparently the Intel based version does have USB 3.0. Nice.

Javascript tip: innerText or textContent

Just a quick tip how to handle using an UI object’s innerText property properly. Even today there are differences on how web browsers give you access to the ‘Text’ content of an HTML element. Let say you have the following html:

<p id=”mine”>This is some text</p>

To get the ‘content you must use the following:

IE and Chrome

mine.innerText

but in Firefox

mine.textContent

To make a ‘universal function to get this text you can use the following function:

function getInnerText(obj){
  if (obj){
    if (obj.innerText)
      return obj.innerText;
    else
      return obj.textContent
    }
  else
    return "";
}

Rumours of desktop development death greatly exaggerated

Ok, Microsoft has restored some faith from my side in them – after announcing that the new Visual Studio 11 (now called VS 2012) would NOT support any desktop development anymore.

They eventually changed their minds due to a lot of pressure and decided to release a desktop specific version as well – see this.

A quote from the article:

With this new Express edition, developers will be able to use C++, C#, or Visual Basic to create Windows desktop and console applications. Developers will also get access to new advances available across the Express family in Visual Studio 2012, such as the latest compilers and programming language tools, integrated unit testing, and the ability for small development teams to collaborate via Team Explorer and TFS Express.

Now, we just need to get MS to drop Metro and BioWare to fix Mass Effect 3’s ending… and the world could be a happy place again… hehe

Hope for ME3

This may be just a hoax or misunderstood info but apparently there might be a different ending for ME3 (in the works) after all – or at least a better explanation of why certain things happened the way they did.

Look at this screenshot.

There is some possible explanation why the ending was so ‘bad’ and how they possibly changed it just before the final release to give themselves more time to complete the ‘real’ ending – called something like ‘The Truth’. They do mention release dates of April/May which have passed already…

There is also mentions of more Multiplayer character classes like the Prothean Adept and Vanguard. Well, perhaps this is just grabbing at straws for hope but it may just give some hope for the Mass Effect story line/universe after all.

But perhaps the best option would be to just have some ammo (like Grunnt would say. I don’t need luck – I have ammo)