Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 500
Search took 1.77 seconds.
Search: Posts Made By: ralph l mayo
Forum: Computer Programming 08-21-2009, 07:43 PM
Replies: 3
Views: 1,030
Posted By ralph l mayo
Ruby: require 'net/http' require 'uri' ...

Ruby:

require 'net/http'
require 'uri'
raise ArgumentError, 'Pass an URL as the first param, tia' unless ARGV[0]
puts Net::HTTP.get(URI.parse(ARGV[0])).gsub(/[^\d]/, '')
Forum: Computer Programming 08-10-2009, 11:16 PM
Replies: 3
Views: 1,514
Posted By ralph l mayo
Try: template<typename T> typename...

Try:

template<typename T> typename List<T>::A List<T>::begin() const
Forum: Computer Programming 08-07-2009, 04:09 PM
Replies: 3
Views: 896
Posted By ralph l mayo
Soon variadic templates...

Soon variadic templates (http://en.wikipedia.org/wiki/C%2B%2B0x#Variadic_templates) will be the correct answer.

Right now it's impossible to say what is the most sensible route without knowing...
Forum: Computer Programming 07-14-2009, 04:58 PM
Replies: 5
Views: 884
Posted By ralph l mayo
The unspecified order of argument evaluation is...

The unspecified order of argument evaluation is only on facet of the problem with that line of code. The expanded second version *does* have defined behavior, because it introduces sequence points...
Forum: Computer Programming 07-14-2009, 03:12 PM
Replies: 5
Views: 884
Posted By ralph l mayo
Pure luck. The behavior of that code is...

Pure luck. The behavior of that code is unspecified.

http://www.experts-exchange.com/Programming/Editors_IDEs/C_CPP_CS/Visual_CPP/Q_23975343.html...
Forum: Computer/PC discussions 07-14-2009, 06:57 AM
Replies: 2
Views: 718
Posted By ralph l mayo
VPS means you get root, maybe with the caveat...

VPS means you get root, maybe with the caveat that you cannot build your own kernel, depending on which virtualization system the host uses.

You can definitely install mysql (or any other...
Forum: Computer Programming 07-13-2009, 03:08 PM
Replies: 1
Views: 762
Posted By ralph l mayo
It's easily done in C++ with boost::regex_replace...

It's easily done in C++ with boost::regex_replace (http://www.boost.org/doc/libs/1_35_0/libs/regex/doc/html/boost_regex/ref/regex_replace.html)

It's also rather easily done in either language...
Forum: Computer Programming 07-13-2009, 03:03 PM
Replies: 1
Views: 770
Posted By ralph l mayo
The type of *itrA is A*, but your ostream op...

The type of *itrA is A*, but your ostream op accepts const A&, so you need to do one of two things:

1. dereference again

cout << **itrA;


2. write an ostream operator that accepts A*
...
Forum: Computer Programming 07-07-2009, 12:46 AM
Replies: 1
Views: 2,593
Posted By ralph l mayo
That error message isn't very helpful. The...

That error message isn't very helpful.

The problem is that, while you can store pointers to member functions in variables, if you want to call them again you must have an instance of the class...
Forum: Computer Programming 06-21-2009, 03:02 PM
Replies: 5
Views: 1,384
Posted By ralph l mayo
As oracleguy said, the use of 'new' will cause an...

As oracleguy said, the use of 'new' will cause an issue, memory leaks in the pointers to dynamically-allocated instances of B.

A container (like vector) of raw pointers cannot safely deallocate...
Forum: Computer Programming 06-12-2009, 12:51 AM
Replies: 5
Views: 1,366
Posted By ralph l mayo
Just as you can use an array of arrays to...

Just as you can use an array of arrays to represent a multidimensional structure in C, you can use a vector of vectors in C++.

Some of the advantages of this approach are that you can return a...
Forum: Ruby & Ruby On Rails 05-07-2009, 01:10 AM
Replies: 2
Views: 11,506
Posted By ralph l mayo
Did you ever figure this out? It's because you...

Did you ever figure this out? It's because you spelled 'password' with an 'e'

(using password: NO) in MySQL parlance means the client did not attempt to give the server a password at all, so it's...
Forum: MySQL 02-08-2009, 05:27 AM
Replies: 5
Views: 1,083
Posted By ralph l mayo
I think you need to use a subquery so that you...

I think you need to use a subquery so that you can have two completely separate order operations. Try something like:

SELECT * FROM (SELECT * FROM table_name ORDER BY id DESC LIMIT 7) iq ORDER BY...
Forum: Computer Programming 02-08-2009, 04:04 AM
Replies: 2
Views: 767
Posted By ralph l mayo
I'm not exactly sure what you're confused about,...

I'm not exactly sure what you're confused about, so if this doesn't help post back.

The <T> in template <typename T> T Test<T>::method is required because it tells the compiler that the template...
Forum: Computer Programming 02-08-2009, 03:15 AM
Replies: 5
Views: 1,301
Posted By ralph l mayo
Just change it to fgetc(fp) as in the previous...

Just change it to fgetc(fp) as in the previous loop. It's not clear to me why you have two while loops with identical conditions, but that's another issue.
Forum: Computer Programming 01-21-2009, 11:21 PM
Replies: 4
Views: 1,144
Posted By ralph l mayo
This is maybe more appropriate to think about as...

This is maybe more appropriate to think about as an entry in the compiler's symbol table than as an address. When it comes across a declaration without a definition like this the only responsibility...
Forum: Computer Programming 01-19-2009, 01:03 AM
Replies: 4
Views: 1,004
Posted By ralph l mayo
It is platform-dependent and I don't know...

It is platform-dependent and I don't know anything about PSP development, but assuming microsleep() or millisleep() don't show up in the SDK you'll need to find a way to query the hardware clock that...
Forum: Computer Programming 01-18-2009, 11:47 PM
Replies: 4
Views: 1,004
Posted By ralph l mayo
Language? Platform?

Language? Platform?
Forum: Computer Programming 01-16-2009, 08:42 PM
Replies: 6
Views: 1,642
Posted By ralph l mayo
Are you sure you were looking at "The C++...

Are you sure you were looking at "The C++ Programming Language" and not "Programming Principles and Practice Using C++" by the same author? The latter is the only one I remember having the...
Forum: Computer Programming 01-14-2009, 07:15 PM
Replies: 6
Views: 1,642
Posted By ralph l mayo
Get the latest edition of The C++ Programming...

Get the latest edition of The C++ Programming Language by language architect Bjarne Stroustrup. You may need another book to use alongside it if you're very new to programming, but it's essential...
Forum: Computer Programming 01-14-2009, 06:54 PM
Replies: 3
Views: 1,687
Posted By ralph l mayo
If you know C[++] at all this problem is easier...

If you know C[++] at all this problem is easier to solve with the assumption that 'next' is a pointer to Node rather than a Node value. In fact it's only a couple lines. Think about what the list...
Forum: Computer Programming 01-09-2009, 01:48 AM
Replies: 1
Views: 1,347
Posted By ralph l mayo
System.Console.In gets you a TextReader...

System.Console.In gets you a TextReader (http://msdn.microsoft.com/en-us/library/system.io.textreader_members.aspx) (a stream) of the console input, which has methods with similar uses to the...
Forum: Computer Programming 01-03-2009, 06:18 PM
Replies: 1
F#
Views: 910
Posted By ralph l mayo
You can piece it together from the language...

You can piece it together from the language specification (http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec2.aspx), but it won't be easy because it's spread throughout the...
Forum: Geek News and Humour 12-17-2008, 12:38 AM
Replies: 10
Views: 3,844
Posted By ralph l mayo
I think that only works on debian-based distros. ...

I think that only works on debian-based distros.

Here's the sequel:
http://img339.imageshack.us/img339/4493/aptitudevl8.png
Forum: Geek News and Humour 12-17-2008, 12:26 AM
Replies: 4
Views: 4,288
Posted By ralph l mayo
This isn't about a virus per se, it's a heap...

This isn't about a virus per se, it's a heap overflow allowing execution of arbitrary code when IE loads malicious XML. Apparently said XML is already out there on a lot of otherwise trustworthy...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT +1. The time now is 06:37 PM.