Igor's Blog

As I expand the data binding layer for my travelblog.ws project, I keep coming across different ways of breaking the PHP PDO statement class. The recent peculiarity that I've come across was to do with binding more variables than there were bind parameters in the SQL statement. In this situation, PDO will not return any data. In fact this is documented in the API...
Binding more values than specified is not possible; if more keys exist in input_parameters than in the SQL specified in the PDO::prepare(), then the statement will fail and an error is emitted.

Lets see the code that would cause the above behaviour. First there was some boiler plate code to write to execute a simple SQL statement (getting an ID from a 'posts' table for data that I know exists). There was a single bind parameter, ':id', in the SQL statement.
$binds = ...; /* see specific examples below */
$sql = 'SELECT id FROM posts WHERE id = :id';
$statement = $dbConn->prepare($sql);
$results = $statement->execute($binds);
$data = $statement->fetchAll(\PDO::FETCH_OBJ);

when the $binds variable was set as follows:
$binds = array('id' => '0f841cb12dc75');

I was getting data back as expected...

[Read More and Comment]  

, , , ,

I recently bought a Nintendo 3DS XL and of course I just had to order an R4 (R4i SDHC RTS in my case) cartridge so that I could play none other but DSDoom. Due to the age of some of these projects there were scarce details on how to get that working so it took quite a bit of searching around and trial and error but in the end I had Doom running on my 3DS!

Unlike some of the other 3D games on 3DS, Doom doesn't require you to look up and down which makes it easy to control and doesn't involve using the stylus for input. If you tried playing 'Moon' you would know what I mean.

This was how the R4i was packaged - the R4i cartridge itself and a micro-USB to USB adapter. There was a slot on the R4i to insert a SD card. SD cards up to 32Gb in size could be used.

DSC02122.JPG DSC02123.JPG

[Read More and Comment]  

, , , ,

I've noticed today that my version of JD-GUI started crashing whenever I tried to open a jar file to decompile. I was on macOS Sierra and had version 0.3.3 of JD-GUI installed. This was the kind of error and crash report I was getting...

Process: jd-gui [13650]
Path: /Applications/JD-GUI.app/Contents/MacOS/jd-gui
Identifier: jd.jd-gui
Version: ???
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: jd-gui [13650]
User ID: 501
Date/Time: 2017-02-21 12:06:45.436 +1000
OS Version: Mac OS X 10.12.3 (16D32)
Report Version: 12
Anonymous UUID: FD4C197F-34C0-7E0B-A88A-B0BDD3397DD7
Sleep/Wake UUID: F6E62B43-7C66-4E90-8968-E92535403845
Time Awake Since Boot: 700000 seconds
Time Since Wake: 320000 seconds
System Integrity Protection: enabled
Crashed Thread: Unknown
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000241499f5
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]

Fortunately there was a way to fix it! The latest version (1.4.0 at the time of writing) from the download page fixed the problem.

[Read More and Comment]  

, , ,

It's getting close to Easter time which means assembling more electronic bunnies and for that I need new PCBs. This time around I decided to place and order with Seeed Studio Fusion (that's 3 Es) instead of any of the other PCB Fab I've used in the past. Overall I have to say they have a much better quality than Shenzhen2U, service is fast but shipping is a little pricey, though still much cheaper than Oshpark.

It took just 7 days to have my PCBs fabricated and then they were in my mailbox 3 days after that. That's quite impressive!

Something that I really liked was the ability to preview your Gerbers before submitting the order. This is a definite plus over some of the other budget fabs.

The actual ordering process is very similar to many others, just a single page form where you can choose all your PCB options. Coloured PCBs do not cost any extra from Seeed Fusion, so I went for red instead of the default green.

In terms of shipping options, their page said that EMS and USPS were available, but when my order came up, these did not show. The standard post option was a very similar price to couriers so I skipped that and went for quicker delivery with DHL.

[Read More and Comment]  

, , , ,
Programming, DIY, Games, Hacks, Tech and more.
Follow me on...
Current and Past Projects
See my Resume


RSS Feed

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
StrFunc() Online
300 George St Blogumentary
Guru JSON-RPC Tester
Extrudifier Object Designer

Recent Blog Posts

Binding extra variables with PHP PDO returns no results

New Nintendo 3DS XL, R4i SDHC RTS Lite and DSDoom

Older versions of JD-GUI crashing on macOS Sierra

How does Seeed Fusion stack up as a low budget PCB fab

Where to find the last item (Robbie's lost lyrics) in GravityFalls Lake level

Detecting print requests to print contents of a DIV with JavaScript

Using Google DFP with AdSense on responsive pages

How to change the email subject line in Gmail

Force PHP GD library to load JPEG images that have invalid data

How to uninstall Samsung Smart Switch from your Mac

Recent Galleries

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

DIY spare parts computer build with a RAIDMAX Anura case

Fake 'Lepin' brand Lego packaging

Hardwood garden bench with clear resin void filler

Fixing a 3D printer extruder that stopped heating up

Easily increase disk space in a Lenovo Ideapad 100S 14" laptop with an M.2 SSD

Making a multi-piece 3D printed solder spool holder stand

DIY indoor apartment grow light wiring

Good Friday Electronics fun Easter Bunny LED PCB Kit IBEABU-01.0

Top Categories

Blogs I follow

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth


RAWS Parts Online
Alpha Dimensions Hosting
Kristensen Photography
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Follow me on... 
...or subscribe for updates!

Don't show this again