Search found 23 matches

by froggie
Fri Aug 29, 2008 8:35 pm UTC
Forum: Coding
Topic: Texinfo: alternating colors for table rows?
Replies: 3
Views: 1246

Re: Texinfo: alternating colors for table rows?

Cheers, but as you mentioned it is not supported by a good number of browsers.
And all I see when searching for the topic are javascript-based solutions. Ideally I'd like to not have to shoehorn that into my Texinfo manual...
by froggie
Wed Aug 27, 2008 7:37 pm UTC
Forum: Coding
Topic: Texinfo: alternating colors for table rows?
Replies: 3
Views: 1246

Texinfo: alternating colors for table rows?

Okay, that's probably not strictly speaking a coding question, but I'm writing some software documentation using GNU Texinfo, and I'd really like the tables (when the manual is output in HTML format, either using texi2html or texinfo --html) to have alternating row colors (IMHO it makes reading much...
by froggie
Wed Aug 27, 2008 7:32 pm UTC
Forum: Coding
Topic: Beginning C++ question
Replies: 27
Views: 2878

Re: Beginning C++ question

Third, statements should end with a semicolon :)

Fourth, don't double post
by froggie
Wed Aug 27, 2008 7:31 pm UTC
Forum: Coding
Topic: Beginning C++ question
Replies: 27
Views: 2878

Re: Beginning C++ question

First, equality comparison is "==" (two equal signs) in C++.
Second, you want the remainder of the division (use the modulo operator %, or a bitmask)
by froggie
Sun Jul 13, 2008 8:41 pm UTC
Forum: Coding
Topic: Coding with security in mind . . .
Replies: 5
Views: 1631

Re: Coding with security in mind . . .

Disclaimer: I'm not a specialist about security issues.

The only thing I can recommend is: "don't roll your own"
Use established authentication/crypto/whatever librairies.

Also, using a language where memory management is automatic may help with some exploitable security problems.
by froggie
Wed Apr 23, 2008 8:31 pm UTC
Forum: Coding
Topic: larger_type c++ template metaprogram
Replies: 7
Views: 1878

Re: larger_type c++ template metaprogram

I've just read this and I'm not sure I understood your question, but isn't it something that you could implement by partial template specialization, i.e. template<typename T1, typename T2> struct LargerType {}; template<> struct LargerType<int, int> { typedef int larger_type; }; template<> struct La...
by froggie
Wed Apr 23, 2008 7:48 pm UTC
Forum: Coding
Topic: C++: returning functors?
Replies: 1
Views: 1391

C++: returning functors?

Hi everyone, Here is my problem. I want to sort a vector<MyClass> according to: - an attribute of MyClass (say either a string returned by MyClass::getString() or an int returned by myClass::getInt() ) - a sort order (Qt::SortOrder which is an enum that may take two values: AscendingOrder and Descen...
by froggie
Sun Apr 20, 2008 7:03 pm UTC
Forum: Coding
Topic: PHP Math Programming
Replies: 6
Views: 1409

Re: PHP Math Programming

Perhaps a bit OT, but I tought doing financial computations using floating point types was a bad idea since you can't represent negative powers of 10 in terms of negative powers of two?
by froggie
Sun Apr 20, 2008 11:23 am UTC
Forum: Coding
Topic: Closures, c++, c#, life, the universe...
Replies: 3
Views: 1196

Closures, c++, c#, life, the universe...

So I've been hacking c++ for most of the past year (although my initial training was in Java, and my previous gig involved a 'safe' dialect of Ada), and I tried to have a go at functional programming (mostly through more intensive use of STL algorithms, less hand-coded loops etc). I still fail to un...
by froggie
Tue Apr 15, 2008 9:27 am UTC
Forum: Coding
Topic: Cross-platform GUI toolkits - which?
Replies: 11
Views: 2011

Re: Cross-platform GUI toolkits - which?

I'd go with Qt as well, the signal/slot programming is nice.
More to the point, the Qt documentation is very good and the examples are aplenty.
Make sure you're OK to release your programs under GPL (or not release them) if you're using it.
by froggie
Sat Apr 12, 2008 8:17 am UTC
Forum: Coding
Topic: What languages can be used as a functional language
Replies: 18
Views: 2587

Re: What languages can be used as a functional language

Javascript, Erlang, Ruby... :D
by froggie
Sat Apr 12, 2008 7:54 am UTC
Forum: Coding
Topic: Need help learning... let alone starting...
Replies: 7
Views: 1258

Re: Need help learning... let alone starting...

Hi, I think the key here is to find fun examples. The language does not really matter, as there are a host of languages that can be used in a platform-independant fashion. You may want to log on to http://projecteuler.net and have a go at a few problems. Java compiler on OSX: use the Sun JDK. For so...
by froggie
Fri Feb 15, 2008 8:43 pm UTC
Forum: Coding
Topic: Is this standard C behavior?
Replies: 27
Views: 3216

Re: Is this standard C behavior?

By the way, is there ever any reason of using the types "int" or "long" instead of the fixed-size types defined in <stdint.h>? (oh, and why do you have to perform strange shenanigans to use INT32_C macros and the like using a C++ compiler?)
by froggie
Sat Dec 01, 2007 9:05 am UTC
Forum: The Help Desk
Topic: Intermittent RAM detection problem
Replies: 3
Views: 1244

Re: Intermittent RAM detection problem

Did both, seems to work now. Cheers!
by froggie
Fri Nov 30, 2007 5:43 pm UTC
Forum: The Help Desk
Topic: Intermittent RAM detection problem
Replies: 3
Views: 1244

Intermittent RAM detection problem

OK, so I bought a used thinkpad x31 to run Ubuntu on. It's got 768 MB RAM (1*256 pc2100 + 1*512 pc2700). Problem is, roughly every other boot, it only finds 512MB (figure displayed by both BIOS and a 'cat /proc/meminfo'). Other times, it sees the whole memory. I tried to google for similar problems ...
by froggie
Tue Oct 02, 2007 8:20 am UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 146103

Re: Funniest/Most Annoying Code Comments

just to reply to EvanED apropos the debug symbol name: I believe the standard is to define NDEBUG when not in "debug mode" (asserts() in the code will be disabled). Note that GCC seems to leave the asserts on (ie. not define NDEBUG) even when compiling without -g, but defining that symbol ...
by froggie
Mon Aug 13, 2007 9:36 am UTC
Forum: Coding
Topic: Ways to practice
Replies: 9
Views: 2560

python

And if you're willing to learn Python, Dive into Python has a lot of useful / practical examples.
by froggie
Wed Aug 08, 2007 8:21 am UTC
Forum: Coding
Topic: WEIRD bug
Replies: 19
Views: 3104

Valgrind

Maybe you could valgrind your program and see where the illegal access happens? Or give us a gdb backtrace of when it segfaults?
by froggie
Fri Aug 03, 2007 7:02 pm UTC
Forum: Coding
Topic: Java Books
Replies: 34
Views: 10700

Java books

I'd start with "Thinking in Java" (B. Eckel, available online) and then "Effective Java" by J. Bloch
by froggie
Fri Jul 20, 2007 8:33 pm UTC
Forum: Coding
Topic: A few problems i've been having with game programmin in Java
Replies: 18
Views: 3311

Maybe you could create a test case that repeatedly changes the image/array, and see whether the program size grows linearly or not. Plus, try to set the maximum heap size at two or three times the size of the image (if it is by far the largest object in your program) and check whether garbage collec...
by froggie
Fri Jul 20, 2007 1:37 pm UTC
Forum: Coding
Topic: A few problems i've been having with game programmin in Java
Replies: 18
Views: 3311

Stabbing in the dark here, but you might try to observe GC behaviour by using the -verbose:gc option when running your app.

Also, have a look at
http://java.sun.com/docs/hotspot/gc1.4.2/
if you' re using sun's jvm.
by froggie
Fri Jul 20, 2007 12:56 pm UTC
Forum: Coding
Topic: Making a scriptable c++ application?
Replies: 8
Views: 2520

lua

Lua looks very clean, but it seems to be missing integral types? Why is that?
by froggie
Wed Jul 18, 2007 6:59 pm UTC
Forum: Coding
Topic: Making a scriptable c++ application?
Replies: 8
Views: 2520

Making a scriptable c++ application?

Hi everyone, here is my issue: I've got a c++ application that monitors remote objects, and I'd like it to be scriptable so that users can configure it a bit. Specifically, I'd like to replace the main() by an interpreted file that instancies a few c++ objects and passes control to the 'real' c++ ap...

Go to advanced search