- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 173
- Posts with Upvotes
- 152
- Upvoting Members
- 127
- Downvotes Received
- 5
- Posts with Downvotes
- 5
- Downvoting Members
- 5
Software developer
679 Posted Topics
Re: [QUOTE=griswolf;1510553]The first step in solving that problem is to know what the problem is. I know of at least three different problems that mention a monkey and a banana.[/QUOTE] [QUOTE=rahulrajcse;1513494]No one knows the solution? I want detailed information about the complexity & heuristic function which we have to choose for … | |
Re: [QUOTE=pseudorandom21;1703254]Anyone know of a way to obtain an MD5 checksum of a file (through HTTP) before downloading it through HTTP?[/QUOTE] Only one way that I'm aware of: Request the file using a [URL="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods"][ICODE]HEAD[/ICODE][/URL] request instead of [ICODE]GET[/ICODE]--the server should only return the HTTP headers for the file. One of the … | |
Re: I think the question is actually "how do I [generate permutations](http://en.wikipedia.org/wiki/Permutation#Algorithms_to_generate_permutations)?" | |
Re: The first step in optimizing is to ask yourself, "do I really need to optimize this?" I see "Kernels to be optimized for the CS:APP Performance Lab" in your comments, so I'm assuming the answer here is "yes." :) In the wild, though, the answer is just as likely to … | |
Re: You probably want a [URL="http://en.wikipedia.org/wiki/Breadth-first_search"]breadth-first search[/URL], with the tiles as nodes and edges between adjacent tiles in each of the four cardinal directions. If you only have one fuel source in the game, that's your root node. If you have multiple fuel sources, just mark each of them as 'visited' … | |
Re: You mean like the first paragraph of https://en.wikipedia.org/wiki/Database_index ? | |
Re: Try to do this yourself, and post code with specific questions if you have a problem. | |
Re: > I get two erros, 'const class Fraction' has no member named 'n' & 'const class Fraction' has no member named 'd' Well, look at the offending line in `Fract.h`: Fraction(const Fraction &src) { set(src.n, src.d); } Where are `n` and `d` defined in `Fraction`? Nowhere; this is why the … | |
Re: > I was thinking about having an employee table, a job table, and then a employee_job table that has a foreign key to an employee and a job. This is a pretty standard way of doing a many-to-many relationship in a relational database; it should work for you. > In … | |
Re: We won't write it for you - show us what you've done so far, and it helps to indicate a specific question or problem you're having. | |
Re: > I'm looking for what exactly is a Vector3 (or any Vector for that matter) and also what a Quaternion is in code? What are the variables types? Should you have multiple classes for each type? Depends on the language you're using, and even then, there are multiple ways to … | |
Re: I don't know NAudio, but it looks useful at a first glance. Do you have language/platform restrictions? If you have the time and inclination for portable DIY, you might look at [PortAudio](http://www.portaudio.com/) for output (I can speak to this one a bit) and something to decode whatever formats you want … | |
Re: Start with the two circles which contain the arcs. Where do they intersect? If they do, then see if the point(s) is(are) on one of the arcs. | |
Re: > make it shared across my LAN with others so that they can pull a copy on their own PC and work on it, and push their changes to the project, and thus make it available to all devs concerned. You want some sort of [version control system](https://en.wikipedia.org/wiki/Version_control) to avoid … | |
Re: If you want to be cross-platform, [GLFW](http://www.glfw.org/) is an excellent lightweight library that handles creating OpenGL contexts, basic window management, and user input. Then it gets out of your way. | |
![]() | Re: [Are you using GLEW](http://stackoverflow.com/a/8303331)? ![]() |
Re: Hm. Perhaps an overzealous browser pre-loaded it for you from a link on a page you visited? | |
Re: Same as you'd add *n* numbers: Initialize a "sum" matrix to all zeros, then add matrices 1..*n* to the sum. | |
Re: The file you're trying to load is UTF-8 encoded. Try using [UTF8Encoding](https://msdn.microsoft.com/en-us/library/system.text.utf8encoding(v=vs.110).aspx) instead. | |
Re: We don't do assignments for you. Show us your work so far, tell us what you're having trouble with, and then we'll be able to help. | |
Re: What do you have for `WriteMemoryCallback`? It should at least start like this: size_t WriteMemoryCallback(char *ptr, size_t size, size_t nmemb, void *userdata) Everything you need to know is here: * [CURLOPT_WRITEFUNCTION](http://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html) * [CURLOPT_WRITEDATA](http://curl.haxx.se/libcurl/c/CURLOPT_WRITEDATA.html) | |
Re: Show us what you've tried so far, tell us what you're having trouble with, and then we can help. | |
Re: Show your work so far, tell us what you're having trouble with, and then we can start to help. | |
Re: Show your work so far, tell us what you're having trouble with, and then we can start to help. | |
Re: You can't tell from return value from `atoi` alone. If it returns `0`, it's easy enough to check if the string itself is actually `"0"` (*i.e.*, `'0'` followed by `'\0'`). | |
Re: Are you looking for a digit in the first position here? Because if you are, the characters `'0'` through `'9'` don't have values `0` through `9`. | |
Re: Is the user name being logged the ASP.NET application's IIS app pool identity? | |
Re: Another approach: 1. Shuffle your list of questions (make a copy if the original order is important) 2. Present them in the new order | |
Re: You can't get a non-member pointer to a member function. If you did, and called it, what would the function use for `this`? | |
Re: This right here is your problem: *ptr = '\0' ...because you do this earlier: ptr = string ...which means you're modifying the string as you scan it. This is not a good idea. A better signature for your splitter function would be: int StrTok(vector<string> &vTokens, const char* string, const char … | |
Re: > define "equations". I second the question; are you looking for an algebraic solver, like a system of equations kind of scenario? > What do you see as an equation? > 1 + 3 + 4 - 1 / 2 = ? > or > "1 + 3 + 4 … | |
Re: All too often, sadly. My two most recent experiences went like this: 1. Notice awful code, realize it's so tangled that it's impossible to work on it bit by bit, convince everyone it's not worth "fixing", replace it completely 2. Notice awful code, carve off bits that are fairly self-contained … | |
Re: What other headers are you using? One of them must be including `cctype` for its own purposes. | |
Re: Sounds like a homework assignment; we won't do it for you. If you don't know where to start, you might try [Ralf Brown's Interrupt List](http://www.cs.cmu.edu/~ralf/files.html). | |
Re: Do you have a complete example that's short enough to post? You may be able to use some sort of [RAII](https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization)-like approach; *i.e.*, release the handle in some object's destructor. But beware [std::exit](http://en.cppreference.com/w/cpp/utility/program/exit)... nothing with [automatic storage duration](http://en.cppreference.com/w/cpp/language/storage_duration) will have its destructor called. [std::atexit](http://en.cppreference.com/w/cpp/utility/program/atexit) should help there. If possible, I'd … | |
Re: > Would you temporarily allow for the fact that both algorithims could be used in the code, or do you create a program that makes the necessary conversions, and uploads the data to another server, or what? Either could work, and I've seen both done... If you can, I'd go … | |
Re: Question one is always: Does the loading really need to be more efficient? In other words, is there a measurable and significant wait/delay when you're loading things? If not, or if the delay is acceptably short, I wouldn't worry about it. If there's a significant/unacceptable delay, then question two is: … | |
Re: I was able to compile this without changes using VS2013... what are you using? | |
Re: I'm sure someone here can help if you give us details. What's the project, what are you having trouble with, and what have you tried so far? | |
Re: Here's your main problem: if( to_string(i).compare(s) == 0){ [string::compare](http://en.cppreference.com/w/cpp/string/basic_string/compare) looks for an exact match, which only happens when `i` is 666. But you're ignoring the first time the match happens, so your code as written will happily spin on forever, looking for a nonexistent other 666 to show up. If … | |
Re: > I don't understand the memory part I got confused It says that memory at `0x00600000` through however long the assembled code is contains the program, and everywhere else (*i.e.*, `0x00000000-0x005FFFFF` and the end of the program to `0xFFFFFFFF`) has the value `-1`. | |
Re: With generics, you can use [type parameter constraints](https://msdn.microsoft.com/en-us/library/d5x73970.aspx) to limit the types someone can use with a method, to a certain extent. If I'm reading you right, though, that's not what you want. The point of a generic method is that the code is identical, no matter what type you … | |
Re: You're writing a class that implements an interface: > public class EWrapperImpl : EWrapper This means your `EWrapperImpl` class must have methods that match everything in `EWrapper`... > Error: TestCsharp.EWrapperImpl' does not implement interface member 'IBApi.EWrapper.currentTime(long) ...but it doesn't, so... > you need to provide at least an empty shell … | |
Re: > doesn't work in a proper way. It execute with errors. What are you expecting it to do, and what is it actually doing? What are the errors? | |
Re: > am just wondering would it be possible to convert the server side to a windows based system? Maybe. depends on if you used any OS-specific libraries. The networking code is most at risk, I think. > would it be possible to say change the code to a newer visual … | |
Re: What do you mean by "effective"? | |
Re: A simple search comes up with a variety of serial communication libraries... https://github.com/wjwwood/serial http://www.teuniz.net/RS-232/ http://sigrok.org/wiki/Libserialport http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/overview/serial_ports.html ...would one of these work for you? |
The End.