Wondering if you’re running i386 or x84_64? No problem, there is quick command which will return this information to you.
uname -i
Wondering if you’re running i386 or x84_64? No problem, there is quick command which will return this information to you.
uname -i
If you have a complex SQL query, you might find that performance isn’t exactly ideal. Worse still, you don’t actually know which part of the query it is that is actually taking so long.
Luckily, MySQL comes to the rescue with the ability to explain.
All you have to do is start your query with the keyword EXPLAIN and MySQL will, rather than returning you a recordset of results, will instead provide a break down of everything it has done, including how it made the table joins and what order it did everything in.
EXPLAIN SELECT a INNER JOIN b ON a.col1 = b.col2 WHERE a.col1 > 1 AND b.col2 > 2;
If your insert statements are not time critical, you can use insert delayed in your SQL to speed things up. The syntax is as follows.
INSERT DELAYED table (col1, col2) VALUES ('a', 'b');
Insert delayed can be used with MyISAM and Memory, but cannot be used with InnoDB.
The advantage of using insert delayed is that the MySQL server returns a success message straight away so the script can keep going, without it actually having to do the insert. This allows the MySQL server to carry it out when it isn’t busy, and do several at the same time.
It’s appropriate for tables such as logs tables where it doesn’t matter too much if they don’t go in straight away.
Yes, you can update views in MySQL! A lot of people seem to be under the impression that you are unable to, but this simply isn’t the case. There are a lot of restrictive rules, which can be found in the MySQL manual, but as a rule of thumb, you can update them, but only one table.
For example, lets say you have a view which links table A and table B.
You can run an update on this view, but only if you are only updating the columns from one table. So you could run a query that updates a number of columns from table A, or you could run a query which updates columns from table B – but you can’t run a query which updated columns in both table A and table B.
If you need to accomplish this, you need to use a join instead.
Snapz really annoys me because I paid money for what is supposed to be the best product out there, but it’s actually incredibly hard to use because every time I want to take a screen shot I have to google for the shortcut key. By default, it’s this.
Cmd + Shift + 3
Quick command for listing locally modified CVS files.
cvs -Q status | grep -i locally
If you are using Flex Builder on Windows, you may run into an error where Flex Builder says it is unable to find the executable for Flash Player. The error will look something like the one below.
Flash Builder cannot locate the required version of Adobe Flash Player. You might need to install the FLash Player or reinstall Flash Builder. Do you want to try and run your application with the current version?
This will give you an attempt to continue dialog with a yes or no option. If you click yes then you would get another error similar to the following.
Cannot run program "C:\Users\chris\Desktop\flashplayer_11_sa_debug_32bit.exe": CreateProcess error=2, The System cannot find the file specified
You can fix this by following the steps below.
1. Go to the Adobe website and download the standalone Flash Player Debugger edition.
2. Open up Notepad and insert some text (literally, anything).
3. Save the file as dummy.swf on your Desktop.
4. Open your Desktop and right click on the file. Select “open with…”
5. Browse to the location of the Flash Debugger you downloaded and select it, making sure to tick the “always open these types of file” option.
From now on, you should be able to run the application from Flash Builder.
Over the years, the Worfolk Online network has run a lot of technical websites. Dozens and dozens of them. Each one had a selection of interesting and useful content, which for one reason or anther has since been closed down.
So, we decided to rescue them.
The result is that we’re currently working on importing articles from a number of old websites from our network.
It’s stretching our remit a little further than we already do – most of the articles are about web development and programming, but we thought it would be better to put them on here then for them to be lost forever – though that’s probably a big claim given how old the content is in some of them – it’s things we haven’t been doing for a decade!
Never the less, you may notice that our archives now date back to before the site was even founded in 2005. This is as a result of the new content we have brought on board and with articles dating back to 2002, we are now pulling together resources from the past decade!
Need to uncompress a .tar.gz file from the terminal? No problem.
tar xvzf filename.tar.gz
Hello everyone! I just wanted to post a quick update on what the status of the site was now.
We first acquired Hardware Tutorials back in 2005, but since then there hasn’t been much content added to it – and indeed the content that was posted back then wasn’t exactly amazing quality. But for prosperity sake, we have kept it.
Never the less, it has always been an ambition to develop the site further and one thing I constantly find myself doing at work is googling for solutions to problems, usually when I’m trying to install something, usually on CentOS. Though that isn’t to say I don’t have my fair share of problems dealing with OS X, Windows 7 and Fedora too.
Rather than just leaving the solutions I eventually find for these problems, Hardware Tutorials seems a reasonably appropriate place to post such solutions – a lot of it isn’t strictly hardware, but as I said in my opening post six years ago, we would almost certainly be straying from that criteria anyway.
So please enjoy the new and updated Hardware Tutorials. Hopefully, you will be seeing a lot more regularly updated content from now on.