299 Posted Topics
Re: Well, that's fascinating, but unless you tell us what it is, we can't help. Funny how that works. | |
Re: [B]Life[/B] is a precious gift to all - to men and to ants. [B]Aardvark[/B] | |
Re: Read this: http://en.wikipedia.org/wiki/Jpeg#Discrete_cosine_transform I'll see if I can find some source code. | |
Re: Nope. http://codepad.org/r9ud4Qsm | |
Re: I'm not entirely sure I understand the rules of the game. Could you explain further? | |
Microsoft Office VBA is a language many of us love to hate. I am no exception, but I know better than to kick the cash cow that feeds me. As it is, the grand and spacious realm that is DaniWeb lacks a VBA forum. There's VB.NET, VB4,5,6 and Legacy Languages. … ![]() | |
I have a calculated field that takes the ID field of a table and pads it with leading zeroes. So far, I've gotten this to work: `String$(4-Len(Trim$(Str$([ID]))),"0") & Trim$(Str$([ID]))` Broken down, it takes the ID field, and string-ifies it. For some reason, this pads it with a space, hence the … | |
Greetings, DaniWeb! I have an Access DataBase with a Form I need to modify. When the user moves between records, I need to trigger an event. Is there an event that triggers, and what is it? I know it's not Form.Load. Thanks, DaniWeb! | |
Re: To share the semaphore, it has to be in the shared memory space. Therefore, you'll want to redefine the semaphore variable as a pointer, then point it somewhere in the shared memory space that isn't being used, then initialize it. | |
Re: Assuming a square NxNmatrix where N is an odd number, it looks like: Find the center (x,y) where x and y equal N/2 rounded down. Or N>>1; Go Up One. Go Right One. Go Down Two. Go Left Two. Go Up Three. Go Right Three. ... Happy coding. | |
Re: This is a lot like a binary search. Looking at this, you can already tell where to look after 4 readings. So drop it to 4 readings: 0,90,180,270 (you already know 0 and 360 are the same.) Find your two highest. Pick exactly in the middle. Take a reading. Repeat. … | |
Re: **cout** and pretty much everything else in the **Standard Template Library** (i.e. the header files without the **.h** at the end) are members of the **std** namespace. On line #2 add in: `using namespace std;` | |
Re: It's not dead; it's resting. http://www.youtube.com/watch?v=4vuW6tQ0218 | |
Re: Man, how I miss my Operating Systems class. BEST. CLASS. EVER. Let me rewrite this with comments: void P(){ A(); //Begin critical section wait(S1); //Grab S1 B(); signal(S1); // Release S1 //End of critical section C(); D(); signal(S2); // Producer E(); } void Q(){ F(); //Begin critical section wait(S1); G(); … | |
Re: I'm going to go ahead and get the ball rolling. The best plan of action would be to: * Set your primary's DHCP to limit IP assigning from .2 to .252 * Assign your secondary routers LAN IP's to .253 and .254 respectively. * Disable the DHCP on your secondary … | |
Re: //class class vehicle { protected: char model[20], color[20], brand[20]; float price, deposit, rate, monthly_installment, newprice; int term; public: void calculate_installment(); }; class car:public vehicle { private: float installment; //newprice removed since provided by vehicle public: void calculate_installment(); }; //main program #include <iostream> #include <string.h> //Use cstdio instead #include <stdlib.h> //Use … | |
Re: Looks like you're already preoccupied, but if I may be so bold, try a podcast ripper. What a podcast ripper teaches you: Sockets (i.e. network connections and transfers) XML Parsing Binary File Writing (In addition to whatever bells and whistles you add like a GUI interface via MFC, GTK+, Qt, … | |
Re: Did a little Google-fu. I found the [Armadillo library](http://arma.sourceforge.net/) hosted on Sourceforge. It has a Psuedo-Inverse function (http://arma.sourceforge.net/docs.html#pinv) Also found a codeforge sample: http://www.codeforge.com/article/41545 - Might be more useful if you've never linked libraries. (Disclaimer: This is Google-fu only. I haven't tested either.) | |
Re: Well, Code::Blocks, like Dev-C++ is an IDE that (usually) comes packaged with the MinGW compiler (based on GCC). If you're still willing to give it another serious try, do this: First install the MinGW GCC compiler and the MSYS compiling environment (not an IDE). Go to: http://sourceforge.net/projects/mingw/files/ A little above … | |
Re: A string is not exactly the same as a character array. There's a bit of overhead that goes into it. Try using curl_easy_setopt(curl, CURLOPT_URL, m_sURL.c_str()); | |
Re: http://en.wikipedia.org/wiki/Persistent_browser-based_game In effect, the game doesn't reset when you close your browser. OK, so first things first. You're going to want to start small. I'd get either a free web host or a XAMPP installation on your home computer. The down-side of a free web host is that you have … | |
Re: Try this. You'll like it. http://www.antlr.org/ EDIT: And if you're feeling adventurous... http://en.wikipedia.org/wiki/Shunting-yard_algorithm | |
Re: I haven't gotten any done or even close to started past a [B]very[/B] loose framework, but when I finally do this is how I'll do it: C++ [I](I. NEED. MORE. SPEED.)[/I] SFML [I](On Windows, Mac, and Linux)[/I] Home brewed. [I](Because the little men who live in my toes tell me … | |
Re: Those work, but they tend to be slow. Have you looked into Multi Precision Number libraries? There's GMP and MPFR to name a few. FYI: `uint64_t` will get you into the very shallow end of 20-digit numbers (i.e. 0-18446744073709551615) | |
Re: EDIT: @AD: I seriously thought so too, but I googled it first. SECOND EDIT: @rithish: DO NOT DO THIS UNLESS YOU KNOW WHAT YOU'RE DOING! Apparently, you can. I'd try it first on your compiler just to be sure. Make sure it's pointed at a valid memory location that has … | |
Re: *Googles "Oromiya" (Henicken's location) and "notes of birr". facepalm* Now I get it. OK, so our friend Henicken is Ethiopian. Notes of birr are their currency. However, as stated in previous posts, Henicken, YOU NEED TO POST WHAT YOU'VE DONE ALREADY. Show us at least half of a program, and … | |
Re: Howdy and welcome to DaniWeb. We're glad to have you. Some things to remember: * Be courteous to others. * Don't spam. (Though in the Geek's Lounge, it's becoming more of a "guideline." Even so, please, don't.) * **Always** use the **Code** tag in the Formatting Menu (up top) when … | |
Re: Gotta use the environment variables. Google "cgi c++ tutorial" There are several libraries that handle this for you like CGIcc. EDIT: Oops, I (sort of) lied. For a "GET", you need to use the "**QUERY_STRING**" environment variable. For a "POST", you need to first read the "**CONTENT_LENGTH**" variable, **then** read … | |
Re: No. Instead, I'll give you this. #include <iostream> using namespace std; #define KM_M 1000 #define M_CM 100 #define CM_MM 10 int main(){ long long mm, cm, m, km; cout<<"Input number of kilometers:"; cin>>km; cout<<"Input number of meters:"; cin>>m; cout<<"Input number of centimeters:"; cin>>cm; cout<<"Input number of millimeters:"; cin>>mm; m+=km*KM_M; cm+=m*M_CM; … | |
Re: Rewrite the code to print out debugging at the beginning and end of each function: #include <iostream> using namespace std; void addSpace(int depth){ for(int i=0;i<depth;i++) cout<<" "; } int fun(int x, int depth) { int retVal=7; addSpace(depth); cout<<"begin fun("<<x<<"):\n"; if (x <= 0){ retVal= 0;} else if (x >= 9 … | |
Re: So... this code is totally untested. Hope it works for you. :) ' RocketHubReader.vb ' Compiled from sources by DeanMSands3 ' Disclaimer: This code is untested. Use at your own risk. Option Explicit Option Strict Imports System Imports System.IO Imports System.Net Imports System.Xml Class RocketHubReader Public Shared myUserName as String … | |
Re: Tell us more about your project. What database are you using? Can you retrieve values from it? What do you want the HTML file to look like? EDIT: This might be helpful. http://www.dotnetperls.com/xmlwriter | |
Re: > Shsh111 stop asking for people to do the work for you and show us what you have done so far so we can help you. If you get people to do your homework for you your going to struggle when the time comes to do the work yourself which … | |
Re: Let me Google that for you: http://lmgtfy.com/?q=producer+consumer+c%2B%2B+pthread Third link on first page: http://richiejp.com/pthread-producer-consumer-example-in-c/ | |
Re: @Critical Error: From the frontpage, "Our Geeks' Lounge forum is the place to chat about anything. Have fun and relax in this forum." Technically, I could start topic about rutabagas and asparagus. I'd get down-voted for it, but I could still do it. @Hani1991: Carry on, sir. Carry on. | |
Re: I'm going to throw my hat in support of AD on this one. On Bush and Iraq: After 9/11, everyone was angry. Democrats, Republicans, Independents, everyone. We went into Afghanistan and Iraq to clean house. And we did. We thought it would be a quick "kill the bad guys, and … | |
Re: He once stopped looters from vandalizing a shop in London - while vacationing in Singapore. | |
Re: Here's a listing of some free and partial ebooks on Game Programming. http://www.e-booksdirectory.com/listing.php?category=264 Happy coding. | |
Re: As an additional plug for Java (though my heart belongs to C++), you can write wrappers around native libraries to give Java access to them. For example, the popular game Minecraft is written in Java, but includes hardware-accelerated OpenGL libraries which are only available natively. Wrappers were written for the … | |
Re: Techy23: You're still using Turbo C. Do yourself a big big favor. **Drop Turbo C.** Like it's on fire. Covered with ants. Ants on fire. Get a copy of Orwell Dev C++. http://sourceforge.net/projects/orwelldevcpp/ Then add SDL to the MinGW compiler that comes with it. http://www.libsdl.org Then you'll want to add … | |
Re: This same question has been cross-posted multiple times: http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/0ba199e9-e806-48bd-9b85-6f8668c732d4 http://stackoverflow.com/questions/11717613/how-can-i-get-a-dte-object-with-msbuild http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/120c6cdf-5bba-4396-8ac8-7fe507ae879a The answer: DTE and serviceProvider are Visual Studio constructs. You're not going to get them in MSBuild. Ask your team leader if he wants any headlight fluid or ID 10-T forms while you're out. | |
Re: Are you using this on your PC or an XBox 360? Look into XInput: http://msdn.microsoft.com/en-us/library/hh405053(v=vs.85) Here's a useful tutorial to get started (not quite what you were looking for, but it's the right direction.) http://www.codeproject.com/Articles/26949/Xbox-360-Controller-Input-in-C-with-XInput | |
Re: If you include the fonts in any form, you need to give credit where credit is due. Bundle the license in a text file or make it somehow easily accesible to the user like in a "Credit and Thanks to" page included in the game. | |
Re: AD's already got this one covered, but I wanted to throw something in as well. If you want a static function to use instance specific data, you have to pass a pointer to the instance as a parameter: You modify your FClass::PrintIt like so: static void PrintIt(FClass *instance) { printf("%d",instance->number); … | |
Re: Let's see... I'm going to troll a bit here. From the name Shankar, I'm guessing he's Indian. With that, I'm going to assume that he's using our beloved Turbo C++ in 16 glorious bits. I'm going to further guess that there's an overflow error lurking about here somewhere. ![]() | |
Re: If your using Turbo C, you're pretty much stuck in DOS. But you can run programs inside that magical wonder called DOSBox. I recommend learning graphics using the old Denthor VGA trainers as translated into C by Chris Mann. ftp://ftp.scene.org/mirrors/hornet/code/tutors/denthor/ Then, once you understand all that, then you're ready for … ![]() | |
Re: There are multiple problems. I've got time for only a few. In your **insert_front()** function you have this: if(n==NULL) { cout<<"\nOverflow\n"; getch(); } It should have a **return;** statement inside it. if(n>=5) { delete_end(); } This needs to be fixed. Here, you're trying to count the number of items. But … | |
Re: Yeah, what WaltP said. Edit: And Labdabeta. Ouch. Ouch. Ouch. This code really hurt me. I kept thinking that a finite state machine version would be a better approach. Ask if you're interested. Back to your code, I debugged far enough to get it sort of working. It took a … | |
Re: Ditto was made using Visual Studio, so it's probably best to use Visual Studio to edit it. You'll want Visual C++ Express since its free to use (I'm pretty sure that Express version will do what you need). http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express Also, it __may__ be helpful to read up on the extra … |
The End.