Drupal Coder + Acquia Dev Desktop on Windows

My work is requiring the use of Code Review tools on a Drupal govCMS project. Unfortunately getting these to work on windows is a pain. So i made a bit of small text document outlining how to get PHPCS / Drupal Coder working on windows along with Dev desktop.


PS: I like dev desktop because it setups some of the box tools such as drush. My main development however is on xampp, It’s good to know how things work underneath and I think it’s a little faster…

See also:

Sublime Text & Drupal? – The community has you covered!

Posted in Drupal | Leave a comment

NullPointerException in JApplet on Web Browser refresh?

Since finishing university and applying for jobs, I’ve decided to brush on up on my Java Skills. To kickstart the occasion, I decided to transform (and sometimes improve) all of my Java assignments to Web Applets, where most were command line ones.

Among numerous applet specific issues (they run fine in eclipse IDE), The biggest one is has been so far a big fat “NullPointerException” when refreshing the page.

It works fine on first load of the page, but when refreshing via F5 key, and a error results.
(every 2nd refresh works fine though)


Also, The “Details” button, which brings up the console, showed no errors, painfully annoying.

The Solution?

The solution is to assign the variable during program execution if you have created it as

public class myApplet extends JApplet{

static JTextArea console = new JTextArea(); //<-- This will be null on reload

public myApplet () {}
public void start() {
console = new JTextArea(); //<-- Added to stop Null pointer Error on reload
//other applet code

(or similar) just below the JApplet Class heading. Interesting though, Integers (Int type), are unaffected.

After implementing this fix, you can also, just drop the “new” code in the static area, is it will be made anyway, wasting computer time.

static JTextArea console;

So there you go, fixed.

Here’s some pictures that will help in understanding:




Thanks for reading!


Posted in Java Applets | Leave a comment

Site moved to hand coded HTML5

Hi All,

As I been job hunting, I thought whats the best way to show that I actually know some software concepts?

Enter, joshuagraham.id.au, a PHP project.  Designed with twitter Bootstrap and mobile in mind.

And I used a few modules from my degree’s project, Adaptive Quiz Manager, to hit the ground running.  It went well except for:

  • Discovering a bug in the core and template files (it didn’t work on the site root), so after figuring that out and changing accordingly, the PHP side was fine.
  • Moving WordPress – yeah you got it – WordPress doesn’t live being moved at all. I did my homework though and got it running fine at home, but on upload to the webserver, my sub folder “blog-and-some-thoughts” didn’t like me & kicked me out back the homepage. So I’ve bitten the bullet and re-installed from scratch – too much time and effort wasted, but a learning opportunity none the less.

So there you go, all setup and ready to go again. Now to improve the content.

Thanks for reading.


Posted in Uncategorized | Leave a comment

outlook.com custom domain email not authenticating?

Currently I use Microsoft’s outlook.com custom domain email system, and two days ago, it stopped working.

My Android phone running K-9 Mail (for email) and Exchange Active sync (for calendar), simply said “authentication error” with K-9 Mail saying incorrect username/password when editing the account as well.

Why all of a sudden did it stop working though?  It’s been working perfect for the whole year.

It turns out that Microsoft has upgraded everyone (or most?) on a custom domain to the new exchange platform, similar to the office 365, with Outlook Web App when you sign in via a web browser (it has “owa” in the address bar, with many other visual differences). BUT, Apparently according to some Microsoft forums, authenticating with your custom email won’t work due to bug. Instead, as a work around, you need to make an outlook.com(.au) alias, wait 24 hours and use that to sign in on your email client.

I already had an outlook.com.au alias, and it worked fine using this. Tested on:

  • IMAP – on K9-Mail
  • Active Sync Exchange on Outlook 2013

Hope fully the email team will fix this, but until then, either use a web browser or create an alias to sign in with, on the your email client. Otherwise, it’s an excellent service.

PS: Don”t like the alias email name in outlook? this page will help to rename it.




Posted in Web Fixes | Leave a comment

Red Alert 3 on Intel 965 / X3100

Who doesn’t like games?

Kidding aside, I found the best way, I believe, to run the game Red Alert 3 on my Old laptop.
(sold the new laptop, the low resolution and no hdd light drove me crazy)
Fun fact: old laptop was a Del Latitude D620 with a Intel 945 card but it died so I replaced the motherboard from a D630 – now with 965 graphics.

Okay, Small tutorial:


  • Assuming Widows Vista+ on 64 bit
    (I am on Windows 10 64 bit)
  • Assuming Red Alert 3 ver 1.6 (Most likely works with latest version 1.12 as well)

Set Widows to allow unsigned driver installations:

  • Run Command Prompt as Administrator
  • type: “bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS”
  • Press ENTER
  • type: “bcdedit -set TESTSIGNING ON”
  • Press ENTER
  • Reboot Computer

Install Modded Driver

Add Red Alert 3’s  “exe” files to the Registry to enable Software rendering (take some load off the GPU) a.k.a “addgame.reg”

Option 1) Pre-made files:

  • Download reg file from this link (Right Click Save as)
  • Double click and add to registry

Option 2) Manually edit the reistry

  • Run regedit.exe
  • browse to: [HKEY_LOCAL_MACHINESYSTEMControlSet001ControlClass{4d36e968-e325-11ce-bfc1-08002be10318}000]
  • Right Click on the right pane “New-> DWORD (32-bit) Value
  • Name: “~ra3_1.6.game” where 1.6 is the version of your game (see C:Program Files (x86)Electronic ArtsRed Alert 3Data for the latest version)
  • Right Click the new key -> modify -> set value to “1”
  • OK
  • Exit

Set Computer to dis-allow further unsigned drivers (optional):

  • Run Command Prompt as Administrator
  • type: “bcdedit -set loadoptions ENABLE_INTEGRITY_CHECKS”
  • Press ENTER
  • type: “bcdedit -set TESTSIGNING OFF”
  • Press ENTER
  • Reboot Computer

Play The Game

  • Best resolution to could get was 1200 x 800 and on VERY low settings before game would go very slow

Notes & Links:

9xx Soliders snsfrontiers: https://www.facebook.com/groups/71161501714/

Intelli Modder 32 facebook page: https://www.facebook.com/modpgd/

Intelli Modder 32 http://www.bugbytes.co/download-links-phdgd-intel-gma-modded-drivers/

Intelli Modder 32 FAQ: https://www.facebook.com/notes/734831653203651/


There are another modded driver from the places such as Intelli Modder 32’s list. I only compared one of them but it might be useful.
“Solo v1.0.1 x64” is slightly slower than Chell 1.7b by 5-10% in red alert 3 in my limited testing.

To see if the GPU is being pushed to it limit, other than visually running slow,  I like to use the GPU-Z program. Simply, run it-> Sensors tab -> Check GPU Load. Run game and alt-tab out to see the graph. Around 85% load is pretty good, leaving some room to see those explosions etc without the computer getting too slow.

The “3danalyse”  program is apparently does similar stuff to the addgame.reg functionality. Also, I couldn’t get it to work (crashes before main screen).

I welcome any better modded drivers though.

That’s all i can think of, for those with these old laptops.


Posted in Games | Leave a comment

Use Office’s save as PDF to save PDFs with links

Long time, no post.

I just finished University this week, and I am now looking actively for (many) jobs due to  centrelink requirements.. But I have almost finished my group project, just some finial adjustments to see if our sponsors want to use it.

Exciting but there always something to pull me away from this fun site.

Anyway, the content of this post is about PDF link hyphens “-” not working. So I was converting a power-point file to PDF as It might be more accessible to others, but the links would not work.

It looked fine in the address bar in chrome (after clicking the link):

But an error.. then I looked on the actual error content on the page:


What the?

Turns out that Adobe Acrobat Pro X, when used as a “printer” converts the hyphens in certain fonts to these Unicode codes (apparently). Also, I’m unsure if using the “add-on” component in office does this as I had office 2013 and it’s incompatible.

The solution? Office 2013 thankfully it has a save as PDF feature, which works fine.

Now, I don’t why these conversions happen in the first place and why, but it’s lucky came across a related article:

Note: comments don’t work on that article for some reason

Which pointed towards this workaround and I’m glad I wasn’t the only one being annoyed by this.

So, saving PDF’s with links? better use office’s save as PDF function.


Posted in Web Fixes | Leave a comment

Mobile draft 2

I have another progression in the learning and updates yet to be introduced for this website.

This time, it’s all about responsiveness. Having the website have one code base but display differently depending on the screen size on the web browser displaying it.

So building on last time’s mobile menu, this it will now display (relatively) the same on a mobile and now more desktop like on a computer. It’s pretty cool.

Since it needs to be resized, being embedded won’t be the way to go, so here’s link. On a side note, I had to edit my word-press theme with another blank template to get it to work. I might write a guide on that later.


I also used a few different sites, here is a notable one:
A responsive tutorial site

Have a good Day.

Posted in Web Design | Leave a comment

Mobile draft 1 completed

Finally worked out some quirks on my draft mobile page, like words wrapping around the page. The solution i think was using “translateX” and having the sidebar use “position:fixed”, otherwise it it pushes the content out a bit. Also the content overlaps the header for some reason, so i added “z-index” to up the stacking to 1 on the header, not sure why it didn’t need it before. I’ve edited it too much and probably broke something. Damn, oh well, will look into that later, since it’s late.

You can see the the wrapping problem in the original mockup by someone on the internet:
who I think is: https://gist.github.com/Laidlaw/4696017 but not quite sure.

it doesn’t have translate3d, which is apparently faster (I need to look into that). it’s just simple. So here it is, awesome! DRAFT: http://codepen.io/silverham/pen/KwWJZZ (embeded below)

See the Pen cssPanelMenu by Joshua Graham (from Jeremy T) (@silverham) on CodePen.

And the old one is here.
OLD: http://codepen.io/jetpacmonkey/pen/ktIJz

See the Pen cssPanelMenu by Jeremy T (@jetpacmonkey) on CodePen.

Posted in Web Design | 1 Comment

How to restore the Windows 8 bootloader after installing/messing with a Windows 7 VHD

I got a few things to write blog posts about but write now I’ll write about something fresh in my mind.

To Skip to the Actual How to restore boot loader, click here to jump to bottom.

So I while a ago, I partially cloned Windows 7 partition on my Samsung Laptop to a VHD so that I could move it between my microSD card and the SSD with ease whilst using the pre-installed Windows 8 OS as my main one. Now I’m sure the VHD is the same as I used it last time but apparently not.

Anyway, so I added it back to the boot menu but all I got as either blank screen(frozen) or a automatic restart after choosing it.
After more toiling anyway on the interwebs I find a command at worked.. or so I thought.

Attach the VHD using Disk Management (Right Computer –> Manage –> Disk Management –> Menu Bar –> Attach Disk)

Open Command Prompt as Administrator (Windows Key –> type “cmd” –> Right Click cmd –> run as administrator)

Bcdboot Windows
e.g. bcdboot E:Windows

TahDah! Booting into Windows…

BUT a Blue Screen of Death, 0x00000136
Error expanding VHD to size.

I think somehow i might of copied other partitions from the real hard drive as a stubs but it now it thinks they are real. Damn!

So installed Windows 8.1 pro, courtesy of Charles Sturt University, School of Computing and Maths and Dream Spark subscription.
Then I installed and used Hyper-V’s Edit disk, in-conjunction with my external hard drive (thank goodness it was USB 3.0!).

Change to fixed size.

But now the boot-loader is win 7 style because i messed up earlier getting it to work, which leads us to…

How to restore The Windows 8 boot loader

Courtesy of a few forum folks , the commands I used were
(assuming the Windows 8 drive is C)

Bcdboot C:windows

Set the boot policy to standard (in case it was set to the legacy – which is win7 style text)
This is also assuming Win 8 is set to default (which it should be because the metro loader apparently doesn’t work unless win8 is the default)

bcdedit /set {default} bootmenupolicy standard

Then restart without closing the Command prompt, not sure why, or if necessary, but one person recommends it. I can confirm this method does work!

So Cheers, I’m just glad i found i use for the dream spark. It’s got lots of potential.

Posted in Computer Fixes | Leave a comment

Started making new site using php

I’ve done the research, it’s either eclipse or NetBeans. Since I’ve used eclipse before in my Java subjects I’m going to give NetBeans a a try, it seems all right.

*An hour later*

I give up downloading Apache alone!
Backstory: Why can’t I find a a single tutorial on NetBeans v8 and NOT v7?
Where is this “Servers” tab everyone is talking about?
Why does other NetBeans installers have Apache integrated and not the PHP one??
Why is the Netbeans install quick guide in inaccurate?

It also didn’t help that my internet is is slow and the netbeans intro guide is on the internet ;/
it reminds me the Moneysmart site.. so many clicks and everything is slow!
Extra note: personal opinion on opensource vs commercial projects:
open source = Excellent Installer, crappy UI, not intuitive but A++ features
commercial = crappy installer, Excellent UI, intutive but features missing/broken/limited

Gah, Gah Gah!

Okay, I’ll install XAMP even though i don’t need MySQL and stuff.
I Then had to set a option:
Right Click project on the side > Set Configuration > Customise > Sources (on side)
Tick “Copy files…” > put “C:xampphtdocs” in the “Copy to Folder text field”
Option to set in NetBeans

So I now have a working PHP install, Awesome!
PHP working

Notes: You can find this tutorial at the following link (thanks!):

Posted in Web Design | 1 Comment