Sunday, 22 April 2018

HP Stream 14 - Windows 10 Woes and Reinstall

Windows 10, love it or hate it it's hard to avoid using it.

I'm now having to support my Son's .HP Stream 14 laptop - mainly for him to do his homework on (yeah, right)..

It's not a bad little laptop, no powerhouse to be certain, but for browsing and connecting to the school resources it does exactly what we wanted.

Or at least it did until a couple of days ago - when Windows decided it was no longer going to let anyone log in.  The problem was probably a corrupt user profile - unfortunately my Son, in an unusual display of self reliance tried to fix it himself by following some youtube videos.

To cut a long story short - oh dear.

I'm not that bothered that he tried to fix this himself - but I'd rather that he'd asked for a bit of help once he got to the point of trying to do a system restore.

Windows has a few tricks to get you out of situtations like this.

You can use a system rollback - these had been disabled.

You can do a system refresh, keeping your files and apps in place.  This didn't work - it just gave an error message to the effect that it couldn't do it.

You can do a full wipe, which removes everything but puts it back to a "just installed" state.  This didn't work either.

HP also provide a "restore to factory settings" option.  Guess what?  It didn't work.

One Google search later and the "recommended" next step on the HP forums according to their "experts" is to buy the recovery media on USB stick (or DVD) directly from HP.  So I checked...

£35 plus postage.

To quote Winston Churchill "Fuck that for a game of soldiers."

Before we move on, I'd like to make it clear that anything that you decide to do based on this blog post you do at your own risk.  If your laptop ends up unbootable, explodes, eats the cat, makes obscene phone calls to your Grandmother or whatever it's your problem, not mine.

So, for the cheapskates amongst us, what next?

In my case, I popped onto Amazon and bought a fresh 32GB usb key on next day delivery (thank you Amazon Prime).

Then, I followed the instructions here to create a Windows 10 USB install (you'll need  access to a working PC to do this).

And then I booted from the USB key (I did this from safe mode, but you can get the boot options by pressing ESC repeatedly on startup).

I ended up having to format the existing Windows partition and then re-installing onto there.  After that it's a case of confirming the install language, crossing your fingers and waiting half an hour (or so) whilst it installs.

And that's pretty much it.

The correct drivers for sound, WiFi and the onboard graphics were installed, I was able to create a local administrator account for me, and then connected my Son's own Microsoft account - and...

It worked.  One plain Windows 10 install, correct drivers and no crapware.

For me, this was a big success, and TBH if you've already got a USB key at least 4GB in size kicking around you can do this legally for nothing apart from a couple of hours of your time.

Worst comes to the worst if it hadn't worked I'd not have been much worse off and could still have bought a restore thingy from HP, however, at the prices they're asking it paid to try the "hard" way first.

Tuesday, 22 March 2016

Rise from your grave!

We're back!

After a lengthy absence from game coding (and blogging) I'm looking to start things up again.

This has been something that I've wanted to get back into for a while, but for various reasons haven't had the time or inclination to do so.

I've also had a bit of a love/hate relationship with BlitzMax **, and as good as it was it the development environment didn't play nicely on 64-bit Linux systems.  As that is what I use it was a bit of a problem.  Some long-standing bugs (such as looking in the wrong location for the joystick device) were never fixed and meant having to "hack" the language to get things working the way I needed.  Sound was also a bit problematic.

I've had a look at Monkey - which is the "next gen" version of BlitzMax, and it has some very nice features - such as generating HTML5 games, having a very familiar syntax and having a free version and an updated IDE (on Windows).

However the Linux IDE is more or less the same as the BlitzMax one, and it didn't take long to come across the first bugs, and on reporting it I was told that the free version "wasn't a priority".  A couple of months later the bug is still there, and although instructions have been given to changing the compiler to fix this manually, I really can't be pestered with that any more.

This has left me as a coder without a viable platform.

Being lazy I don't really want to go down the path of learning another language, so I'd like to stick with something (reasonably) familiar.

At work I use Visual Studio, and although Mono is tempting the development environments on Linux are a bit on the primitive side, at least when it comes to vb.mono, so I've put that one on the back-burner.

As I'd quite like to stay with a version of basic, and use something that I can at least generate Windows and Linux binaries with I've started looking through the open source alternatives.

FreeBasic is the first one that I've looked at, and it might be a winner!

Let's look at the list and see if it ticks the boxes:

* Is it cross platform? - Yes.  It compiles for DOS, Windows and Linux.  It doesn't support MacOS X as far as I'm aware, but then again I've not been in a position to compile for Macs for a while anyway.
* Does it have familiar syntax? - Yes.  It's a re-implementation of QBasic (which evolved into Visual Basic).
* Does it create stand-alone binaries? - Yes.  It compiles quickly and the speed of the binaries is (allegedly) close to that of C code compiled with GCC.
* Does it come with a modern IDE? - No.  It doesn't come with an IDE, however...

Geany (pictured above) is a rather nice IDE that supports FreeBasic.  It has code highlighting, autocompletion (if you download the FreeBasic tag file for it), allows you to compile and run the code directly from the IDE, in fact it does pretty much everything you could need.  It's also open source and available to install straight from the Ubuntu software repository.

Sound (using WAVs) is supported using external libraries.  There are some (primative) built in tone generator commands, but to do something beyond that requires a little work.

This is a little bit cumbersome at first, but there are plenty of examples out there of how it works, and I've already got sound samples working using the SDL libraries.

I may also look at using SDL for the graphics, depending on how good the inbuilt graphical functions are.

Once I've had a bit more of a play I'll create a follow up post, but so far it looks rather promising.

**As a footnote, BlitzMax is now available for free under an open license, if you are using Windows it is certainly well worth a go, just be prepared to have to work a bit to get it going properly on Linux.

Thursday, 2 October 2014

Time Flies

I've just had a bit of a surprise when I realised how long I've been using Linux as my main operating system.

"How long?" I hear you ask...

Thirteen years.

Yes folks, thirteen years!

Around the time that Windows XP was released, I'd switched to Linux as a "can I use it full time" experiment, and never went back.

These days I'm not even dual booting, Ubuntu is the only OS on my computer, and it does everything I need at present - (I'm not a huge gamer).  I'll admit, I have got a Windows XP virtual machine, but in all honesty it doesn't get used and will probably be deleted if I start running low on disk space.

In that time I'd started off using Mandrake Linux, switched to Slackware (which I used for a good number of years) before switching to Ubuntu.  I never found any good reason to switch back to Slackware - so I've been using that ever since.

It's true what they say, "Time flies when you're having fun..."

Tuesday, 9 September 2014

Scheduled email reports in SpagoBI 4.2

A common requirement when creating reports is that as well as having them run "on demand" that they be scheduled to be sent automatically via email.

SpagoBI allows this functionality, here is how I did it on SpagoBI 4.2.

Step 1: Configuring the email settings.

Click on the "Resources" icon and select the "Configuration management" option.

This will take you to the configuration page.  As there are a lot of options here, we'll change things to only see the ones relating to email.  Change the "Select Category" pull-down to "MAIL".

You'll now need point SpagoBI to an external mail system that will send the emails on your behalf.  The following settings are the ones that you'll need to look at for scheduling (you may want to duplicate this for the User and KPI email settings too).

In my case I only needed to set the smtphost, smtpport and from settings to point at my company's proxy server and provide a dummy return email address.

Step 2: Scheduling a report

The reports scheduling module is hidden away under the "Repository Management" section.

Select the "Scheduler" option.

From here you can add new scheduled reports or view / amend existing ones.

To add a new report click on the "Add" button

Now you need to name the schedule item. 

Click on the "+" button to add a report (multiple reports can be added to a single scheduled item).

Browse to the document(s) that you'd like to send by email, and make sure they are selected, then click the "Save" icon.

 Now add the parameter values for the report, and click "Save" once you have finished.

You will be returned to the main schedule screen, with your report listed in the left-hand column.  Select your report, then click on the "+" sign in the "Schedulations" section.

You can now specify the time that the report will be scheduled for.

Select the start date / time, end date / time (if required) and the report frequency.

Now we need to specify that we are sending the report via email.


Select the "Send mail" option.  This will display the email options.

Fill in the details to match your requirements (at the very least the "Mail to" and "Mail Subject" fields), before clicking the "Save" icon.

You can test your scheduled item by clicking its "Execute now" button.

Step 3: Charts, graphics and PDFs

The problem with this is that by default the report will be attached as a .HTML document, and any graphics or charts that may be in your report will be missing (HTML being the default format used in SpagoBI).

To change it, you'll need to add an extra parameter onto your SpagoBI document, with the "URL Name" set to outputType.

You will also need to create an "Analytical driver" for this.


You will also need a LOV with the return value of "html."

No, that isn't a typing error.  If you set the LOV to return "pdf" then it will return as a PDF even when trying to view it via the web site.  We will override this value when we schedule the report.

Now, edit your scheduled item (see Step 2 above).  The "outputType" parameter should now be listed.  Set its value to "pdf."

Save the item, and that's it.  The next time you run that scheduled item it will attach a PDF to the email.  Not only that, but the PDF will also contain any graphics or charts that you included.