Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

thebeekeeper

@thebeekeeper
About
Posts
33
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • For you no guns solution people
    T thebeekeeper

    The same document also gave us the 3/5ths compromise. Are you willing to stick by that?

    The Lounge com question

  • For you no guns solution people
    T thebeekeeper

    Why?

    The Lounge com question

  • Hhow to start a career in?
    T thebeekeeper

    You sound like you're already on the right track

    The Lounge business tutorial question career

  • HELP WITH BILINEAR INTERPOLATION???
    T thebeekeeper

    Something I usually will do when using matlab is to first implement my algorithm to be computed sequentially, like I would in C and then move to the matrix form. It executes far more slowly, but with the data sizes you're talking about it won't matter.

    Algorithms algorithms help tutorial question

  • Question!
    T thebeekeeper

    ha! I forgot that [] are for indexing into arrays!

    C / C++ / MFC question c++ data-structures

  • Question!
    T thebeekeeper

    If by 'whatever input' you mean the number you put in the square brackets for ch[100], I think this is because ch[n] is always going to be a pointer. It's equivalent to char *ch = (char*)malloc(sizeof(char) * n); then sizeof(ch) will always be 1 because it's pointing to the start of your array. In C, you sort of always have to keep track of the size of your arrays manually.

    C / C++ / MFC question c++ data-structures

  • VS and Qt linking differences
    T thebeekeeper

    Does anybody know the details of how linking works in VS2005 vs Qt? Namely, QtCreator. I've got an app I'm writing that uses a 3rd party library, and it works correctly when I build the project in VS2005, but not when I build in QtCreator. Everything seems to link correctly in both cases, so I'm sort of at a loss. The error I get when I build with QtCreator is an access violation error. It seems like my code is calling into an invalid memory location. I can see that the function has an address with something like cout << SomeFunction << endl; but that doesn't tell me a whole lot besides that it's not null. Maybe the runtime is doing something different? When I look at my exe in depends, I get some strange results. Both versions (VS and Qt) show my exe pointing at the correct dlls, but in the Qt one I don't get any entries in the "Parent Import Function List View" but I do get entries when I build with VS. I feel like that bit of information is pointing out something obvious to me, but I can't figure out what it is. Nick

    C / C++ / MFC visual-studio performance help question

  • Book covering basic physics/electronics relevant to computer science?
    T thebeekeeper

    Here's a link to the text that we used in a class I took on designing logic circuits with transistors: here[^] That one is going to be very technical, but it won't go too deep into the quantum effects that make transistors work. I really don't know of any books that will be more qualitative in describing these kinds of circuits. The best explanation I can give of a transistor is to put 2 diodes facing each other:

    a -|>|--x--|<|-- b

    and put a wire going into that x in the middle. Now, you have a voltage controlled switch with the control point at x. If you put a signal at point a with x connected to ground, you don't get anything at b, but if you connect x to a voltage, the switch closes and you get a -> b.

    The Lounge learning game-dev help question

  • Book covering basic physics/electronics relevant to computer science?
    T thebeekeeper

    I've got a EE degree, so I should know most of that stuff, but it's all gotten a little foggy in the last 8 years or so. You can figure out what voltage and electricity physically are by reading a circuit analysis or 1st year college physics text. Basically all you're going to get is that voltage is the potential energy between 2 points. Current is the movement of electrons through a point. Electricity is electrons i guess. How a logic gate is physically implemented is something I don't think anybody should really want to know about :( Although I guess if you understand diodes you can get a qualitative understanding of how transistors work, and then you can move on to groups of transistors to create logic gates. If you really want to know exactly how a transistor works, you're going to be dealing with insanely long equations and things only get worse when you want to put them together into a gate.

    The Lounge learning game-dev help question

  • Got to Malaysia
    T thebeekeeper

    Thanks to everybody that gave me tips on long distance travel. Especially the one about sleeping pills. So, I've arrived here in Johor Bahru, Malaysia, and it's really incredible. I came from Chicago, and it's amazing to see a city that's so clean. I'm sure there are parts that aren't as nice, but from what I've seen so far it's pretty amazing. I've got one question that will probably be best answered by a diverse group like this. Is it only white people that recline their seats on an airplane? Of course, on the first flight which was about 13 hours from Chicago to Tokyo, I got the middle seat, and the lady in front of me put her seat back. I'm about 6'3", so this is pretty inconvenient and painful for me. Then, I looked around and noticed that nobody else put their seats back. It was a Japan Airlines flight, so I also noticed that most of the people weren't white. Is there a correlation here or is it just me? Note that I'm white and I don't put the seat back unless there's nobody back there.

    The Lounge question learning

  • Going to Malaysia
    T thebeekeeper

    Ha! Yes, it does. I spent 2 days in Canada once, right across the border, so I consider that not really leaving the US. I'm sure all the Canadians here will have a different opinion about that.

    The Lounge question

  • Going to Malaysia
    T thebeekeeper

    Rob Philpott wrote:

    cockroaches

    yikes

    The Lounge question

  • Going to Malaysia
    T thebeekeeper

    That's a pretty good idea. I've got a quit date set and everything, but this might move that up.

    The Lounge question

  • Going to Malaysia
    T thebeekeeper

    That's what I'm planning on trying to do. I've got to see what they have here for over the counter sleeping pills or something like that. I really should have been given time to see a doctor, especially about any vaccines I should have, and about some sedatives.

    The Lounge question

  • Going to Malaysia
    T thebeekeeper

    Not sure yet where exactly I'm going... I found out yesterday at 10am that I'm leaving tomorrow at 11:30am. I'm not sure how I'm going to handle that 21 hour plane ride. I can barely go for 3 hours without a cigarette right now.

    The Lounge question

  • Going to Malaysia
    T thebeekeeper

    So, I've never really been out of the US before, and I'm leaving for Malaysia tomorrow morning for work. Anybody here ever been there? I'm hoping for some tips on what to expect.

    The Lounge question

  • DrawText is giving me garbage
    T thebeekeeper

    I'm using the same CA2W conversion that I use on a const char* from c_str(). And no, it doesn't work, but the strange thing is that it's like the data is going bad when I pass it into CMyList::AddString(). So, if I create a LPCWSTR hello = TEXT("hello") and pass it into CListBox and CMyList::AddString everything works fine. But! If I do a CA2W conversion and pass it into both of those same methods, it works for CListBox, but now for CMyList. X|

    C / C++ / MFC help c++ graphics xml

  • Embedded Data
    T thebeekeeper

    USB HID sounds like the closest thing you'll find to this. Or just sending bytes through the parallel port. When you get to that low level, there's really nothing that's independent of a PC and its OS. Also, looking for a C++ api for this kind of thing is sort of a dead end. You have to program for the embedded chip you're working with. Hopefully whoever made this chip would have also created a way to send data to it. If it's a microcontroller that has some flash memory, there's probably a SPI interface.

    C / C++ / MFC question c++ hardware

  • DrawText is giving me garbage
    T thebeekeeper

    AHA! I just figured out that I'm doing the conversion correctly (maybe), the problem is I have bad data to convert. I inspected the memory location that lpDrawItemStruct->itemData was pointing to, and it looked like garbage. So, I added a method to my class where I can send text and store it in a vector. Then, in DrawItem I just look in my own vector for strings to draw, and everything works fine. I guess this works for now, but I'd really like to know how to get my string out of itemData so I can use AddString on my list box like a normal person. The only idea that I have right now is that my initial cast in DrawItem is bad.

    LPCTSTR lpszText = (LPCTSTR) lpDrawItemStruct->itemData;

    I don't see how this could be bad since that's exactly what I'm passing to AddString. The strange this is that it works when I pass in a literal with TEXT("..."), but not a converted const char* from string.c_str(). Thanks for your help!

    C / C++ / MFC help c++ graphics xml

  • DrawText is giving me garbage
    T thebeekeeper

    No, it's coming out of std::string c_str(), so it's a const char*. There's no way that can be Unicode, right? Also, if I use OutputDebugString, it works after I use the CA2W conversion and looks correct in the output window. So, I've got this:

    USES_CONVERSION;
    CA2W converted(updates[i]->ToString().c_str());
    // CListBox -- looks right
    m_UpdateBox.AddString(converted);
    // CMyListBox -- looks wrong
    m_ProductList.AddString(converted);
    // Output window -- looks right
    OutputDebugString(converted);

    I'm starting to think I'm pulling out bad data in my DrawItem method, but I copied that code from MSDN, so it can't be wrong :omg:

    C / C++ / MFC help c++ graphics xml
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups