Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 40 of 497
Search took 0.14 seconds.
Search: Posts Made By: Cerulean
Forum: C++ Jul 18th, 2006, 6:44 PM
Replies: 49
Views: 1,288
Posted By Cerulean
Why? Make your life easier: std::string s =...

Why? Make your life easier:
std::string s = "hello";
s += " more";
s += " and even more";
// s is now "hello more and even more"
Forum: Python Jul 15th, 2006, 8:03 AM
Replies: 7
Views: 442
Posted By Cerulean
If you have 50 classes that need the metaclass...

If you have 50 classes that need the metaclass I'd assume they'd all be related enough to warrant their own module. This other stray class would not belong in that module. Problem solved
Forum: Python Jul 13th, 2006, 5:44 AM
Replies: 22
Views: 319
Posted By Cerulean
titaniumdecoy: Maybe you should have posted all...

titaniumdecoy: Maybe you should have posted all of these requirements from the start. Your question has evolved from "how do I make a human-readable config file in the form foo=bar" to "how do I do...
Forum: Python Jul 11th, 2006, 6:47 PM
Replies: 22
Views: 319
Posted By Cerulean
I don't know if i'd call it dangerous. I'd say...

I don't know if i'd call it dangerous. I'd say that it's nice having the ability to tap into a fully blown programming language when doing your config. I use Python for some of my configurations and...
Forum: Community Announcements and Feedback Jul 10th, 2006, 10:00 AM
Replies: 79
Views: 1,687
Posted By Cerulean
Ugh. Please don't regurgitate myths...

Ugh. Please don't regurgitate myths (http://kdemyths.urbanlizard.com/myth/27) you may have heard on some forum or chat-room or whatever. Konqueror has very impressive CSS support...
Forum: Python Jul 8th, 2006, 9:44 AM
Replies: 11
Views: 277
Posted By Cerulean
That does sound pretty obscure. If i'm not...

That does sound pretty obscure. If i'm not mistaken the explorer uses a HTML rendering widget to display the folders and stuff? If you could find a way to get a reference to that rendering widget you...
Forum: Community Announcements and Feedback Jul 8th, 2006, 9:33 AM
Replies: 79
Views: 1,687
Posted By Cerulean
Screenshot here...

Screenshot here (http://paul.giannaros.org/screenshot.png)


I'm all for big_k placing adverts where he wants on his forum, but your analogy is flawed. If TV providers made a sudden change where 20...
Forum: Community Announcements and Feedback Jul 7th, 2006, 8:04 PM
Replies: 79
Views: 1,687
Posted By Cerulean
It looks and works fine in Firefox but I was very...

It looks and works fine in Firefox but I was very disappointed to see how thoroughly broken it is in Konqueror. I don't like running web browsers at full screen (I feel at 1280x1024 I shouldn't need...
Forum: Python Jun 22nd, 2006, 11:47 AM
Replies: 12
Views: 343
Posted By Cerulean
Ah, much more succinct, and the project is much...

Ah, much more succinct, and the project is much easier to navigate than when I last looked into it. Cheers :-)
Forum: Other Programming Languages Jun 18th, 2006, 2:11 PM
Replies: 6
Views: 196
Posted By Cerulean
The most important question is what are you...

The most important question is what are you trying to do? There may be an easier way that going through all the requirements you suggested because that'll take quite a bit of serious coding.
Forum: Python Jun 14th, 2006, 5:05 PM
Replies: 15
Views: 415
Posted By Cerulean
If you're asking about opening a webpage or...

If you're asking about opening a webpage or viewing an image on the web then read my previous post. os.system("program-name") launches the program specified by 'program-name', e.g...
Forum: Python Jun 13th, 2006, 12:52 PM
Replies: 15
Views: 415
Posted By Cerulean
Firstly, bear in mind os.startfile is Windows...

Firstly, bear in mind os.startfile is Windows specific (it won't work on Mac or Linux if you try to run your script there).

Sane: may be better if you mentioned it's win-only before you advocated...
Forum: Python Jun 12th, 2006, 1:03 PM
Replies: 12
Views: 343
Posted By Cerulean
Documentation for pyparsing is sparse at best....

Documentation for pyparsing is sparse at best. It's good once you fiddle with it, but I thought it was the only major one available. That list shows otherwise. Will have a look too.
Forum: Python Jun 12th, 2006, 12:57 PM
Replies: 8
Views: 219
Posted By Cerulean
I think that should be import...

I think that should be
import webbrowser
webbrowser.open("MyHTML.html")
edit: Heh, beaten to it

As for os.startfile, i'd imagine that uses Windows' start command or some such. KDE has similar...
Forum: Python Jun 12th, 2006, 12:50 PM
Replies: 6
Views: 200
Posted By Cerulean
Or you could not bother using %d or other...

Or you could not bother using %d or other placeholders and just use %s. %s implicitly converts to a string so it won't error out if you decide to change the integer into a list or whatever.
print...
Forum: Python Jun 12th, 2006, 12:46 PM
Replies: 25
Views: 619
Posted By Cerulean
They were indeed. List comprehensions are more...

They were indeed. List comprehensions are more efficient if you're not calling a function in them. For example:

l = [104, 101, 108, 108, 111]
map(chr, l) # faster than [chr(x) for x in l] as the...
Forum: C++ Jun 12th, 2006, 12:29 PM
Replies: 18
Views: 391
Posted By Cerulean
A little theory - Kilo's example is basically...

A little theory - Kilo's example is basically doing what the first pass of a bubble sort (http://en.wikipedia.org/wiki/Bubble_sort) would do but instead of swapping the items in the array he's...
Forum: Python Jun 9th, 2006, 6:40 PM
Replies: 25
Views: 619
Posted By Cerulean
So which one is it? Either it was a joke or it...

So which one is it? Either it was a joke or it wasn't?

Bear in mind that the vast majority of us do not read minds. Not everyone knows what you're saying or what you're thinking - similarly someone...
Forum: Python Jun 8th, 2006, 6:06 PM
Replies: 245
Views: 5,428
Posted By Cerulean
As for things slowing to a crawl - why not call...

As for things slowing to a crawl - why not call time.sleep during the intensive loops periodically to free up resources to other processes so your computer doesn't become unusable?
Forum: Python Jun 6th, 2006, 9:38 AM
Replies: 7
Views: 262
Posted By Cerulean
The pygame tutorials use pretty simple Python...

The pygame tutorials use pretty simple Python constructs. They should give you no problem if you've got a fair grasping of the Python language. Concentrate on learning Python first, then move onto...
Forum: Python Jun 3rd, 2006, 10:14 AM
Replies: 12
Views: 288
Posted By Cerulean
Where did you get that from? You're still using...

Where did you get that from? You're still using function names that are reserved, just going about it indirectly using setattr. Of course it's fine to use names from functions that are built in...
Forum: Python Jun 2nd, 2006, 9:21 AM
Replies: 25
Views: 708
Posted By Cerulean
I bet you I could create three windows and a...

I bet you I could create three windows and a system tray in 10 lines. It all depends on the functionality of those windows the controls they contain.
Forum: Python Jun 1st, 2006, 1:00 PM
Replies: 3
Views: 227
Posted By Cerulean
You generally do this from the command line. Not...

You generally do this from the command line. Not sure if this is the same with windows (doubtful) but under Linux (with BASH) you generally do
python foo.py > logfile.txt 2>&1
The `2>&1` bit...
Forum: Bash / Shell Scripting May 31st, 2006, 2:48 PM
Replies: 9
Views: 532
Posted By Cerulean
Make sure you have atd running (the at daemon),...

Make sure you have atd running (the at daemon), then it's as simple as:
at 05.00
at> firefox
at> (ctrl+d)
Forum: Python May 30th, 2006, 7:39 AM
Replies: 25
Views: 708
Posted By Cerulean
It's beyond me how disabling a border would have...

It's beyond me how disabling a border would have made your button disabled. The API for wxWindows is pretty explanatory, though there are cross platform pitfalls that you should be aware of if you...
Forum: Coder's Corner Lounge May 27th, 2006, 7:57 PM
Replies: 46
Views: 919
Posted By Cerulean
Mia hara. Kai esei? Yiasou - more or less...

Mia hara. Kai esei?


Yiasou - more or less pronounced 'yah' 'sue'. That's also quite conveniently 'goodbye' as well.
Forum: Python May 27th, 2006, 7:49 PM
Replies: 11
Views: 336
Posted By Cerulean
Where else does everything else run?

Where else does everything else run?
Forum: JavaScript and Client-Side Browser Scripting May 26th, 2006, 7:12 PM
Replies: 11
Views: 491
Posted By Cerulean
I believe that's prototype.js's syntactic sugar...

I believe that's prototype.js's syntactic sugar for 'document.getElementById'.
Forum: JavaScript and Client-Side Browser Scripting May 26th, 2006, 9:14 AM
Replies: 11
Views: 491
Posted By Cerulean
What on earth is a loading tag? Did you just make...

What on earth is a loading tag? Did you just make that up? I think you just need to put something inside the div element - a non-breaking space ( ) would do.
Forum: JavaScript and Client-Side Browser Scripting May 26th, 2006, 9:08 AM
Replies: 16
Views: 491
Posted By Cerulean
Yup, as I said further up - caching is slower....

Yup, as I said further up - caching is slower. running with the cached version gives ~23 ms here. Regular document.getElementById gives ~15 ms. This is with Konqueror 3.5. On Firefox, results are...
Forum: JavaScript and Client-Side Browser Scripting May 26th, 2006, 8:40 AM
Replies: 16
Views: 491
Posted By Cerulean
I'm quite sure it's slower. Lemme write a test...

I'm quite sure it's slower. Lemme write a test now.
Forum: JavaScript and Client-Side Browser Scripting May 25th, 2006, 1:17 PM
Replies: 16
Views: 491
Posted By Cerulean
document.getElementById("myElement").style.backgro...

document.getElementById("myElement").style.backgroundColour
Even with that (correct here, *high 5* for the UK) spelling of "colour"? Heh

document.getElementById is supported in the vast majority of...
Forum: JavaScript and Client-Side Browser Scripting May 24th, 2006, 2:42 PM
Replies: 16
Views: 491
Posted By Cerulean
Nono, setAttribute is standard JavaScript. IE...

Nono, setAttribute is standard JavaScript. IE doesn't like standards, heh.
As for your original get_object function - if / else ifs in interpreted languages are costly and setting a flag for the...
Forum: Python May 20th, 2006, 6:10 PM
Replies: 245
Views: 5,428
Posted By Cerulean
Yeah. Getting bunches of information from...

Yeah. Getting bunches of information from websites for the good of companies is fairly commonplace. I work part-time for a travel industry software provider and had to create a few spiders to scrape...
Forum: JavaScript and Client-Side Browser Scripting May 15th, 2006, 2:28 PM
Replies: 15
Views: 414
Posted By Cerulean
Snap :P

Snap :P
Forum: Coder's Corner Lounge Apr 21st, 2006, 11:59 AM
Replies: 29
Views: 716
Posted By Cerulean
Happy birthday Paul (aka Cerulean) and Queen...

Happy birthday Paul (aka Cerulean) and Queen Elizabeth! *chuckles*
Forum: JavaScript and Client-Side Browser Scripting Apr 19th, 2006, 6:39 PM
Replies: 15
Views: 507
Posted By Cerulean
Other way round. bgColor _is_ an attribute of the...

Other way round. bgColor _is_ an attribute of the element - background-color isn't, but it's a style property. So he could have done either:
el.style.backgroundColor = '#35A695'
or:
el.bgColor =...
Forum: JavaScript and Client-Side Browser Scripting Apr 18th, 2006, 4:54 PM
Replies: 15
Views: 507
Posted By Cerulean
Yeah, getElementsByName doesn't work on a bunch...

Yeah, getElementsByName doesn't work on a bunch of elements, including pre. Found that out the hard way after thumping myself when wondering why a client side syntax-highlighter wasn't working in IE....
Forum: JavaScript and Client-Side Browser Scripting Apr 17th, 2006, 7:07 AM
Replies: 20
Views: 693
Posted By Cerulean
what is this `this` you speak of?

what is this `this` you speak of?
Forum: JavaScript and Client-Side Browser Scripting Apr 17th, 2006, 7:04 AM
Replies: 19
Views: 523
Posted By Cerulean
Not so broke that you can't afford a...

Not so broke that you can't afford a domain/hosting ;)

Edit: And you're doing some truly creepy things on that page - reloading the window if netscape 4 resizes? Do you even know what Netscape 4?
Showing results 1 to 40 of 497

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:04 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC