Posts
 
Reputation
Joined
Last Seen
Ranked #158
Strength to Increase Rep
+12
Strength to Decrease Rep
-3
97% Quality Score
Upvotes Received
173
Posts with Upvotes
152
Upvoting Members
127
Downvotes Received
5
Posts with Downvotes
5
Downvoting Members
5
49 Commented Posts
16 Endorsements
Ranked #90
Ranked #130
~384.17K People Reached
About Me

Software developer

Favorite Tags
c++ x 206
c x 118
java x 79
c# x 51

679 Posted Topics

Member Avatar for samaru
Member Avatar for rahulrajcse

[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 …

Member Avatar for Adarsh_4
0
6K
Member Avatar for pseudorandom21

[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 …

Member Avatar for Reinhard_1
0
7K
Member Avatar for coroll

I think the question is actually "how do I [generate permutations](http://en.wikipedia.org/wiki/Permutation#Algorithms_to_generate_permutations)?"

Member Avatar for JamesCherrill
0
2K
Member Avatar for Charlton21

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 …

Member Avatar for lernik
0
736
Member Avatar for daniel955

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' …

Member Avatar for Nisa_1
0
536
Member Avatar for Teddy112

You mean like the first paragraph of https://en.wikipedia.org/wiki/Database_index ?

Member Avatar for Teddy112
0
162
Member Avatar for srikanth112

Try to do this yourself, and post code with specific questions if you have a problem.

Member Avatar for Ali_52
0
643
Member Avatar for lewashby

> 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 …

Member Avatar for マーズ maazu
0
576
Member Avatar for ScottieF

> 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 …

Member Avatar for JOSheaIV
0
235
Member Avatar for Zerk

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.

Member Avatar for David W
0
264
Member Avatar for Doogledude123

> 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 …

Member Avatar for ddanbe
0
245
Member Avatar for pritaeas

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 …

Member Avatar for qingshan05
0
438
Member Avatar for Mayo_1
Member Avatar for Shiladittya_1

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.

Member Avatar for gusano79
0
121
Member Avatar for Ritesh_4

> 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 …

Member Avatar for gusano79
0
1K
Member Avatar for Labdabeta

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.

Member Avatar for gusano79
0
2K
Member Avatar for Caperski
Member Avatar for Caperski
0
207
Member Avatar for joshl_1995
Member Avatar for rubberman
0
403
Member Avatar for negru

Same as you'd add *n* numbers: Initialize a "sum" matrix to all zeros, then add matrices 1..*n* to the sum.

Member Avatar for gusano79
0
201
Member Avatar for shrikeps

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.

Member Avatar for gusano79
0
137
Member Avatar for surayanbo

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.

Member Avatar for gusano79
0
116
Member Avatar for kkvk

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)

Member Avatar for gusano79
0
182
Member Avatar for asholpurush1991

Show us what you've tried so far, tell us what you're having trouble with, and then we can help.

Member Avatar for gusano79
0
202
Member Avatar for hazelkahn

Show your work so far, tell us what you're having trouble with, and then we can start to help.

Member Avatar for gusano79
-2
227
Member Avatar for hazelkahn

Show your work so far, tell us what you're having trouble with, and then we can start to help.

Member Avatar for gusano79
-3
176
Member Avatar for COKEDUDE

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'`).

Member Avatar for deceptikon
0
139
Member Avatar for COKEDUDE

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`.

Member Avatar for JamesCherrill
0
1K
Member Avatar for anupamverma
Member Avatar for EarhawkPH

Another approach: 1. Shuffle your list of questions (make a copy if the original order is important) 2. Present them in the new order

Member Avatar for Stefce
0
268
Member Avatar for anumash

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`?

Member Avatar for anumash
0
257
Member Avatar for you207

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 …

Member Avatar for David W
0
563
Member Avatar for DeanMSands3

> 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 …

Member Avatar for DeanMSands3
0
2K
Member Avatar for NemeXis

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 …

Member Avatar for JamesCherrill
0
338
Member Avatar for nathan.pavlovsky

What other headers are you using? One of them must be including `cctype` for its own purposes.

Member Avatar for nathan.pavlovsky
0
263
Member Avatar for kausarnazzir

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).

Member Avatar for gusano79
0
97
Member Avatar for Suzie999

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 …

Member Avatar for gusano79
0
271
Member Avatar for overwraith

> 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 …

Member Avatar for gusano79
0
162
Member Avatar for pritaeas

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: …

Member Avatar for pritaeas
0
230
Member Avatar for kumanutiw

I was able to compile this without changes using VS2013... what are you using?

Member Avatar for NathanOliver
0
186
Member Avatar for Ef

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?

Member Avatar for gusano79
0
112
Member Avatar for jamesjohnson25

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 …

Member Avatar for vijayan121
0
520
Member Avatar for ASD_1

> 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`.

Member Avatar for gusano79
0
173
Member Avatar for genux008

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 …

Member Avatar for DaveAmour
0
255
Member Avatar for Darth Vader

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 …

Member Avatar for sandeepjkl
0
435
Member Avatar for Genius11

> 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?

Member Avatar for Mayukh_1
0
357
Member Avatar for Simon180

> 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 …

Member Avatar for Simon180
0
232
Member Avatar for dbfud1988
Member Avatar for utsavjoshi95
Member Avatar for Iyappan_1

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?

Member Avatar for gusano79
0
211

The End.