In Ruby, you can use the sort method on an array to sort that array - but you cannot sort a hash. That's because of the techniques used within a hash to make it very fast to look up individual elements.
So what do you do if you want to sort something like this: ?
stuff = {"Steve" => "Kent", "Grah ....
The Ruby on Rails Framework is a great way to put bolt web applications together quickly - but it can be overwhelming when you come to do it for the first time. There's a steep learning curve with all the various elements to put together to make up the whole.
We have a first (tiny!) demonstration i ....
Where does my test code go?
If you've written a class - a series of methods to be used within another application - how do you test it? How about writing a test program within the same file which runs as the main program if you run your class on its own from the command line, but is ignored if yo ....
If you're new to Ruby, but familiar with Object Oriented Programming, you might like to take a quick look at the example that I wrote during yesterday's course which shows how all the major OO elements are implemented in Ruby. The sample source is [here].
Here are some of the key facts:
• ....
The extension of houses to the East of Melksham started off the Sandridge Road at the tail end of last year, but the fields at the end of Snowberry Lane (the section to the south of Snarleton Lane) hadn't really got underway - this first picture is a Christmas one, showing just a few stakes inthe gr ....
In Ruby, have you ever wanted to know if an object is of a particular type?
The instance_of? method will return a true value if an object is of the type given as a parameter. However, instance_of? will return a false if we use it to check whether an object inherits from another class. So it's a ....
• What is Go?
Go is potentially the next generation C or C++. It's Open Source, developed internally by Google, already there and in use. Although computers have got many times faster since C and C++ were written, code development in systems languages has not, pushing people towards dynamical ....
An answer for me to usefully share ... written in answer to someone who's main role is to consolidate training requirements and provide a complete package under one banner, so isn't (and can't be expected to be) particularly techincal
Our public "Deploying Apache and Tomcat" course covers the Apa ....
"We don't like to email people because they might be deceased, and no-one likes getting a letter for a colleague who's passed away. So we phone instead" ... so said a sales caller yesterday.
We're a small company, but in such wide ranging business areas that we have to buy everying from soap to web ....
You can book your course, and include a room to stay overnight with us through the course at Well House Manor (that's ideal for delegates who don't live nearby), or you can book as a day delegate - if you live in Bath, Chippenham or Trowbridge, that's probably what you'll want to do.
What do you ge ....