|
Some recent topics started on our forums |
Using python as a configuration file
|
Hi, I'm writing a program in C++ and want initialize it with a configuration file. I usually use libconfig but in this case I have many similar configuration settings and in many cases it'd be easier to write the configuration file using basic progr... |
Posted September 29, 2010 10:18:31 AM
|
Lego turing machine
|
Hi,
A while ago I posted here about making a lego turing machine. In the end lego was too expensive so I used carboplast, popsicle sticks, plastic bottles, rubber bands and a glue gun. Here's the result:
http://www.youtube.com/watch?v=5I_SoWxuN0c
... |
Posted August 19, 2010 3:44:21 AM
|
calculating RGB from intensity
|
I writing a basic ray-tracer and have a question about calculating the RGB values for each pixel. To calculate the color of each pixel we send a ray from the camera to the pixel, use the scene to find all the light sources that contribute to the col... |
Posted August 10, 2010 6:24:41 AM
|
using operators with polymorphism in C++
|
I have a Vector class that represents a vector which can have any number of elements. It overloads the obvious operators like + and -. I'd like to try different implementations of the operators so I was thinking of making an abstract vector interfac... |
Posted April 1, 2010 7:24:12 PM
|
passing a reference with boost::python
|
Let's say I have the following function:
void addOne(double& x)
{
x+=1;
}
And I want to expose it to python using boost like this:
BOOST_PYTHON_MODULE(add)
{
using namespace boost::python;
def("addOne", addOne);
}
... |
Posted March 23, 2010 8:03:25 AM
|
Numerical Analysis Libraries
|
Are there any good open source numerical analysis libraries. Most importantly, I'm looking for one that can solve linear equations, solve ordinary differential equations, and efficiently handle various vector and matrix operations.
What do you... |
Posted March 20, 2010 6:21:01 PM
|
Win32: Getting printer name from DEVNAME or DEVMODE struct
|
Hi I am programming in Vista 32 bit. I use PrintDlg/PrintDlgEx to open a print dialog box. I don't use the PD_RETURNDC flag.
The dialog box returns with no errors but the device name that appears in DEVMODE is corrupt,
and the offset that appears... |
Posted March 6, 2010 12:15:27 PM
|
port forwarding
|
Is it possible to do port forwarding if my router doesn't support it? (I can't upgrade the firmware because it's not my router, and I can't switch routers because the router contains the modem from the ISP).
I was thinking that maybe it'd be possi... |
Posted December 17, 2009 11:16:24 AM
|
ascii to unicode in c++
|
In c++, how can you convert an ascii string to a unicode string?
And more specifically, how can I get the output of typeid.name in a unicode format?
Thanks |
Posted October 5, 2009 1:42:18 PM
|
Turn a cell phone into a usb mouse
|
Hi,
Is it possible to write a program for a cell phone (in java ME on a Nokia phone for example) that lets you use the phone as a usb mouse? I'd like the computer to recognize the phone as part of the HID class when I connect it to the compute... |
Posted September 15, 2009 6:50:49 AM
|
View All Topics Started By This User
|
|
Some recent replies made on our forums |
Using python as a configuration file
|
Thanks for the suggestions. I'll take a look at boost and lua. |
Posted September 30, 2010 12:26:31 PM
|
calculating RGB from intensity
|
Ok,I'll look up tone mapping. Thanks for the help. |
Posted August 10, 2010 10:31:14 AM
|
using operators with polymorphism in C++
|
Quote:Original post by Antheus
Which is what std::vector is used for.
But what if I want to apply various operators to my vectors? Don't I have to write a new class to do that?
|
Posted April 5, 2010 2:03:20 PM
|
using operators with polymorphism in C++
|
Quote:Original post by Zahlman
Why do you need more than one kind of Vector at all? Or at worst, more than a few small sizes? Are you writing some kind of quantum-mechanics simulator or something? Nearly all practical applications don't have to... |
Posted April 5, 2010 1:09:24 PM
|
using operators with polymorphism in C++
|
Thanks for all the helpful replies. It seems like I shouldn't be using polymorphism for basic types. Maybe it'd be better to use templates? I could make a class with a signature like:
template<class Storage, class Math> Vector;
and then to... |
Posted April 4, 2010 4:34:03 AM
|
using operators with polymorphism in C++
|
Quote:Original post by imi
How do the different implementations of your BasicVec differ? Are they different dimensions of a vector? Then you most probably want a compile time error anyway if you use two different vectors in an equation.
IVec* v... |
Posted April 2, 2010 5:56:58 AM
|
using operators with polymorphism in C++
|
Quote:Original post by jwezorek
...
I think it would be easier to help if we knew a little more about what you want to do. What kind of vectors do want to have besides BasicVec? What kind of polymorphic behavior do you want?
I want to experiment... |
Posted April 2, 2010 3:00:30 AM
|
using operators with polymorphism in C++
|
I'm sorry, I don't understand. How can STL and <algorithm> help with a mathematical vector class? (I now see that I wasn't clear before, I'm trying to implement a mathematical vector, not a container class)
Can you explain what you mean when... |
Posted April 1, 2010 8:17:33 PM
|
using operators with polymorphism in C++
|
How can I use concrete types if I want to be able to easily change the implementation?
How to typed iterators help?
Thanks |
Posted April 1, 2010 8:00:10 PM
|
port forwarding
|
Quote:Original post by Sneftel
Quote:(I can't upgrade the firmware because it's not my router, and I can't switch routers because the router contains the modem from the ISP).Don't be so sure about that; router/modem combos I've seen allow you to set... |
Posted December 17, 2009 11:39:22 AM
|
View All Replies Made By This User
|