15,885,914 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Albert Holguin (Top 200 by date)
Albert Holguin
20-Apr-17 14:29pm
View
When you try this again... from the directory you're in do the following:
(0) list the current directory
(1) run pwd to see your present working directory
(2) list the /bin directory (to make sure you have bash there)
(3) list the environment variables (env)
Albert Holguin
14-Mar-17 16:19pm
View
Except there's a major negative in pulling in IO from a user as integers for the purpose of doing math... you'll immediately lose precision from a floating point input. Your results also don't always match the input types, integer division often results in non-integer value (i.e 3/2!=1, 3/2==1.5).
Albert Holguin
13-Mar-17 10:21am
View
FYI... this is considered bad for security, hence the feature being disabled by default.
Albert Holguin
1-Mar-17 17:27pm
View
+5, I'd add a couple of things... if you're already in python and have a prompt, you can launch via execfile() or exec() (depending on version)... and you can also run the debugger on a python script from the terminal
Albert Holguin
1-Mar-17 17:11pm
View
Appears to be an "embedded" Python issue (or nuance)...
Albert Holguin
23-Feb-17 12:01pm
View
That's definitely not C. If you need help with whatever language this is, tag appropriately. If you just want help with understanding concurrency in general, don't use a language specific tag.
Albert Holguin
26-Jan-17 10:02am
View
You probably should care about namespace clashes... it's a reason not to rely on macros so heavily.
Albert Holguin
24-Jan-17 21:49pm
View
Haven't seen one... but I've moved over to the gcc toolset a bit ago.
Albert Holguin
24-Jan-17 16:06pm
View
+5... but if OP is simply trying to find the state of a definition within a file, my solution is probably the simplest thing to do.
Albert Holguin
18-Jan-17 18:20pm
View
With that many questions, I'm not so sure you'll get that many responses. Nobody wants to sit and answer all this. To get good responses, keep things concise and only offer relevant info.
Albert Holguin
18-Jan-17 18:06pm
View
Are you asking a question or trying to interview us?
Albert Holguin
13-Jan-17 9:19am
View
Virtual method would be the approach I'd use for this type of problem. +5 for list of approaches to solving the problem...
Albert Holguin
11-Jan-17 10:59am
View
Yeah, it's actually a pretty good question. I'll upvote it as well (as well as your answer).
Albert Holguin
11-Jan-17 10:58am
View
You know, C++ has pretty good/easy networking libraries as well. Heck, there are a handful of libraries that have interfaces/bindings for both C++ AND Python (i.e.
ZeroMQ
[
^
]).
Albert Holguin
9-Jan-17 14:32pm
View
are you running make on an APK file?
Albert Holguin
2-Jan-17 17:04pm
View
Yeah, OP had conflicting information, I *THINK* he meant foo should be equal to bar on the first iteration only.
Albert Holguin
2-Jan-17 16:02pm
View
This would compile...except that this wouldn't give you the expected results... because the value of foo would get initialized to c every time f() was called and not only the first time.
Albert Holguin
22-Dec-16 14:33pm
View
Have you tried flushing? Believe there's also an "auto_flush" variable you can enable so that streams are flushed every time you pass something... fyi, if logging a lot, this feature can actually slow things down, hence it being disabled by default.
Albert Holguin
18-Dec-16 22:29pm
View
Didn't look at the dates... that shows up on my feed as an unanswered question given my filters... what can I say? ::shrug::
Albert Holguin
13-Nov-16 21:38pm
View
well, first off... I asked if you were breaking on purpose there... are you? do you understand what that does?
Albert Holguin
10-Nov-16 13:06pm
View
I've been in Linux land for too long perhaps
Albert Holguin
10-Nov-16 9:58am
View
lib libraries are the static versions, are you trying to do static linking? If not, or you're not sure, you probably should be doing dynamic linking (i.e. dll libraries).
Albert Holguin
9-Nov-16 13:15pm
View
-1 to -49 do not return 0 if you use an unsigned int, and yes, 100-149 are also valid but I thought that was acceptable given the OP's requirements.
Albert Holguin
9-Nov-16 11:54am
View
Well, this does account for negatives as well (you'll get "not valid" for negatives since the result val will be huge). It does also allow values up to 149 though, which I though would be proper given that "extra credit" can usually boost a grade slightly over a 100.
Albert Holguin
9-Nov-16 10:44am
View
Although this meets the requirements of the OP, it sure is ugly.... NEVER use this in actual production code.
Albert Holguin
8-Nov-16 13:15pm
View
You're doing so much pointer arithmetic that you're likely going out of bounds. Use a debugger or put some print statements to figure out where you're going out of bounds.
Albert Holguin
8-Nov-16 11:24am
View
There are a lot of reasons to use mixed programming, so definitely useful, but be sure to have weighed your options for using it before choosing to do so. A popular mix right now is Python/C++ (that I use), that's because C++ can be fast but it must be compiled, Python doesn't have to be compiled so it can be versatile. By combining the two, you have fast execution times, but still get the run-time versatility of Python.
Albert Holguin
7-Nov-16 11:25am
View
Your "fix" broke the expected main prototype. Your initial problem was signaling an error you attempted to fix incorrectly.
Albert Holguin
23-May-16 17:47pm
View
There are a ton of resources online that give examples on this topic. Please try another one if one doesn't compile off the back.
Albert Holguin
20-May-16 15:00pm
View
It depends on install paths... if they're not in default locations such as /usr or /usr/local then you do have to source that every time (or do something to have that done automatically).
Albert Holguin
12-Apr-16 22:34pm
View
Better than nothing... :)
Albert Holguin
10-Apr-16 20:59pm
View
If you suspect any networking problems, try using Wireshark to see the data being exchanged between the machines. That would also tell you if there are any firewalls blocking any paths. Aside from that, the application could be failing for any number of reasons. You can always try running it from a debugger, if it was built with debug symbols, it may give you some meaningful feedback, if it wasn't... at least it'll let you know what assembly it failed on (for example, some library that it's using or attempting to use).
Albert Holguin
8-Apr-16 19:44pm
View
It's possible that it wasn't finding the Qt libraries in the expected location. You could have actually specified the location by either editing the makefile or by using a load library path (environment variable).
Albert Holguin
7-Mar-16 20:33pm
View
I tried to detail the process out a little more since I work with Linux quite a bit...
Albert Holguin
18-Feb-16 23:48pm
View
Well, you could do it for one byte but it would be a very simple program.. here it is:
Albert Holguin
18-Feb-16 23:31pm
View
As a fellow C++ prog... I must agree... Powerful and as versatile as you make it to be!
Albert Holguin
12-Feb-16 15:55pm
View
This is dangerous though... because scope plays an important part of this. Don't return by reference anything that's going to go out of scope as soon as the function is finished!
Albert Holguin
12-Feb-16 10:03am
View
+5
Albert Holguin
12-Feb-16 10:00am
View
Installing drivers through Wine on Linux won't buy you anything. Wine is a compatibility layer for regular user applicatons, not for drivers.
As to Linux support for touchscreens, you may be hard pressed to find anyone supporting it. Touchscreens haven't really been a big part of most desktop/server distros. Perhaps try looking at Android or other derivative distros, they should have better support for this type of application (although they're generally a pain to work with outside of the handheld environment). Good luck.
Albert Holguin
12-Feb-16 9:54am
View
You should probably post this as a solution...
Albert Holguin
9-Feb-16 13:50pm
View
+5, That ladies and gentlemen, is what we'd call horrible code in the business... don't be that guy. Just because you can do something doesn't mean you should.
Albert Holguin
29-Jan-16 15:22pm
View
Splitting a file into anything smaller than the MTU size is a waste of time (assuming TCP)... default MTU size in Linux is 1500 bytes.
Albert Holguin
29-Jan-16 14:59pm
View
The actual size of the array that you're using. If you're using a raw char array, you should know the size since you allocated it... if you're using a container (say vector, even though I don't think it's applicable to use a vector for this) then use whatever size() function the container has.
Albert Holguin
28-Jan-16 20:17pm
View
FYI... sizeof() gives you the size of whatever you're passing to it, if you pass an char[] to it, it'll give you the size of the address, not the size of the buffer... looks like you're using it wrong... also, you shouldn't have to specify "this" all the time if you're already within the object, makes the code unnecessarily verbose... if you're making calls within a class, "this" is implied.
Albert Holguin
28-Jan-16 20:12pm
View
curiosity is a great way to learn... keep it up
Albert Holguin
28-Jan-16 20:02pm
View
Except you're completely bypassing iterators by loading data the way you're showing right? You're also bypassing any memory management. In your example, if the user didn't initialize the vector, you'd get a nice crash out of that. So you've given someone a false sense of security.
Albert Holguin
28-Jan-16 19:39pm
View
+4.... this really doesn't buy you anything... for that matter, why a std::vector and not a std::array? the socket recvfrom() call isn't going to change size, no point in using a vector.
Albert Holguin
12-Jan-16 23:23pm
View
...although the purpose of redefining new in debug mode is to prevent this type of crashing for debugging (detect overflows/ invalid memory access)... so I doubt that's the cause of a crash.
Albert Holguin
12-Jan-16 15:03pm
View
Yep, I'll have to second CPallini... don't think that would crash as written in the post.
Albert Holguin
29-Dec-15 14:40pm
View
Since the OP seems to be new to multithreading figured the extra info would help them.
Albert Holguin
29-Dec-15 10:55am
View
+5... Also worth noting std::thread is relatively new and is basically a standardized version of what boost::thread was (C++ did not include multithreading until recently, meaning all systems implemented their own version). pthread is the POSIX standard but it's not natively supported by Windows.... Windows has its own WinAPI threading calls.
Albert Holguin
29-Dec-15 10:45am
View
That just means that the main thread will be blocked but the Windows architecture will continue to work in the background (i.e. COM and messaging will not be blocked).
Albert Holguin
29-Dec-15 10:44am
View
That's just it... you don't HAVE to "join", the main thread can do something else if you'd like.
Albert Holguin
11-Dec-15 12:47pm
View
Sure, you can do this easily with C or C++ if you know enough about the Windows API (assuming you mean Windows). You just have to learn about Windows controls and messaging. The control IDs can be snooped using the Spy++ utility (although this should be considered a hack since the control IDs may change between software versions).
Albert Holguin
8-Dec-15 13:28pm
View
If you just installed it, why not just re-install but use the desktop version instead?
Albert Holguin
4-Dec-15 9:17am
View
If you have Wireshark, another thing to look for is retransmissions. They should be pretty easy to spot with Wireshark, they're colored with a different color than a regular packet transfer. If retransmissions are occurring for whatever reason you'll also see this type of lag.
Albert Holguin
4-Dec-15 8:38am
View
I must have read your number wrong, I was thinking 1126... In that case, the MTU size should have been reached and the OS should have sent out a handful of packets. Try checking your MTU size anyway, its possible that it's set to a really large number which would cause this behavior.
Albert Holguin
3-Dec-15 22:39pm
View
Not sure why libraries aren't an option for you... ??? ....there's an open source logger called log4cpp that's become pretty popular in Linux, but it's definitely cross-platform.
Albert Holguin
3-Dec-15 22:24pm
View
Probably buffering due to default MTU size, that amount of data is actually less than the standard 1500 byte MTU size commonly used.
Albert Holguin
2-Dec-15 12:05pm
View
That's why I didn't post a solution, because the obvious errors should result in the interpreter giving you an error message that should be self-explanatory, so didn't know what they meant with "make it work" or "it doesn't work".
As to /bin/sh that should be your default way of doing things unless you're using functions that are specific to one shell or another. Ubuntu does however still have /bin/bash, so that works just as well. Think they replaced bash with dash as the default because dash is supposed to be faster and they use a lot of shell scripts during the startup process.
Albert Holguin
2-Dec-15 10:56am
View
...and I guess while we're at it... "#! /bin/bash" and "#! /bin/sh" are not two types of shells... actually bash is a type of shell while /bin/sh is usually a symbolic link to the system default shell (in modern Ubuntu, that's actually dash not bash... a change that was introduced back in ~2006).
Albert Holguin
2-Dec-15 10:51am
View
Updated the vote... as to extensions with scripts, that's neither good practice or common, want an example? If you happen to have an Ubuntu installation somewhere, go to the /etc/network/if-up.d/ path... see a bunch of executables without extensions? yep, they're all bash scripts. This particular set of scripts are executed when the network manager does anything with any of the ethernet ports (they all do something relating to ethernet ports or associated services).
Albert Holguin
2-Dec-15 1:20am
View
What's your problem specifically? ..I see a few small issues but I don't exactly feel like setting this up and running it since you're not really asking a complete question here.
Albert Holguin
2-Dec-15 1:18am
View
technically speaking, the extension doesn't matter in Linux... your chmod command is out of order (filename last)... firefox is a command in this context, not a variable, this actually launches firefox if it's not running (ps command is dumping output to file, then he's attempting to check the file for an instance of firefox already running).
Albert Holguin
2-Dec-15 0:47am
View
Yes, ifconfig would give you the addresses of the ethernet ports on the Linux device that you ran that on. It sort of sounds like OP is trying to figure out either 0. who the server is he's connected to OR 1. where he should be attempting to find his host machine. Maybe OP will clarify.
Albert Holguin
2-Dec-15 0:44am
View
You question isn't very clear... try to clarify or re-phrase.
Albert Holguin
2-Dec-15 0:42am
View
console? ...you mean terminal? ...and if so, you can't do that, each terminal (i.e. bash) instance is independent of the other...
Albert Holguin
18-Nov-15 10:47am
View
Not until I had already written everything down... then I said, oh well... :-/
Albert Holguin
17-Nov-15 10:46am
View
Regardless of how you dice it, you shouldn't have two interfaces on the same subnet address... which is what you have going here.
Albert Holguin
16-Nov-15 9:30am
View
Pretty sure that's your problem...
Albert Holguin
20-Oct-15 17:23pm
View
Your problem statement is not clear at all...
Albert Holguin
19-Oct-15 15:01pm
View
Happy Monday :)
Albert Holguin
19-Oct-15 14:54pm
View
the part after ":" is not anything that has to do with authentication, it's part of the path... only thing he exposed was a username, which may or may not be useful depending on ssh security settings.
Albert Holguin
19-Oct-15 14:45pm
View
Pretty much it.... failed to provide a path to your library... +5
Albert Holguin
6-Oct-15 10:54am
View
+5
Albert Holguin
6-Oct-15 10:53am
View
when it comes to doing something trivial, common, but tedious.... use a library
Albert Holguin
14-Aug-15 11:37am
View
Embedding a scripting language is the way I would go about this too... not sure I'd use Lua though as there are a variety of heavy lifting mathematically intensive scripting engine options (Octave/Matlab) that would likely support math intensive scripting very well. Of course, I don't have much experience with Lua so that probably makes me a little biased against it. .....+5 for the scripting suggestion though...
Albert Holguin
30-Jul-15 15:59pm
View
I'll have to agree with ^Richard.. this is a massive topic. I would assume that it wouldn't be terribly hard to do something like this in terms of complexity but in terms of how much work you'd need to do, it would probably be a pretty big undertaking for one person.
Albert Holguin
30-Jul-15 12:50pm
View
thanks for the upvote
Albert Holguin
27-Jul-15 10:26am
View
Didn't I already answer this? You're specifying library_dirs but you're not telling the linker what libraries you need. Read the documentation.
Albert Holguin
24-Jul-15 10:11am
View
lol, that's a good one!
Albert Holguin
24-Jul-15 10:07am
View
It's the defacto standard in Windows... not in any other system. I'm still sort of surprised this was never standardized.
Albert Holguin
23-Jul-15 20:08pm
View
+5... extern "C" simply makes it easier... unless you speak in mangled terms. The other issue with mangling is that it can also changes based on compiler settings and to add insult to injury, it's non-standard.... so different compilers can make different mangled names.
Albert Holguin
23-Jul-15 20:00pm
View
Sounds like a useless property...lol, +5
Albert Holguin
23-Jul-15 20:00pm
View
+5... I hate all these special terms as well
Albert Holguin
15-Jul-15 14:39pm
View
+5.. on all accounts... including "why haven't you found it on your own" question
Albert Holguin
13-Jul-15 11:29am
View
"Future proof"? ...no such thing... :)
Albert Holguin
26-Jun-15 16:33pm
View
thanks
Albert Holguin
26-Jun-15 16:32pm
View
Not all of us are C# programmers.
Albert Holguin
26-Jun-15 16:20pm
View
Modern programmers are using C# to leverage .NET assemblies? ...more like C# programmers are using that...
Albert Holguin
22-Jun-15 15:53pm
View
+5
Albert Holguin
10-Jun-15 10:22am
View
Perhaps you should set the linger option separately, since it requires a different structure. Your setsockopt() call may be failing, you're not checking the return.
Albert Holguin
9-Jun-15 22:56pm
View
Why not just use a class? ...if you need the types to be generic, use a template. The code will be easier to follow and maintain.
Albert Holguin
8-Jun-15 22:14pm
View
CentOS 7 is essentially the "free-ware" version of RedHat Enterprise. It's VERY capable but since it's more of a server type of OS, it probably just doesn't do too many things automatically like Ubuntu does. It also does tend to lag on functionality due to the stability requirements of enterprise users.
Albert Holguin
8-Jun-15 22:11pm
View
I've tried to set up a multi-language project in Eclipse and well, it's a cluster ****. I assume there's probably a way to configure build scripts (like your .sh) but I haven't seen it. VisualStudio is a lot easier to set up that sort of scenario.
Albert Holguin
1-Jun-15 15:06pm
View
This just about sounds like a permissions problem. I'd check build directory permissions, resource file(s) permissions... ??? ... worth checking out.
Albert Holguin
18-May-15 18:23pm
View
Why is it an issue? ...if this is for source control purposes, you do know that you can simply ignore the file type right? ...perhaps if you tell us what you're trying to achieve we can help you set it up.
Albert Holguin
12-May-15 16:49pm
View
You need to show the code where you are generating and passing the structures. Otherwise it's just a guessing game.
Albert Holguin
8-May-15 12:38pm
View
Happens... happy coding! :)
Albert Holguin
7-May-15 10:35am
View
Yeah but I think even if you have all dependencies present, compiling a dll in one version and an executable in another will make them incompatible. I had this issue with Studio 6 and 2008.... then saw it again when trying to roll from 2008 to 2010. Again, I wasn't exactly sure what component caused the problem and it didn't bother me enough to try to find out.
Albert Holguin
6-May-15 19:14pm
View
I'd stick with gcc/g++ for a beginner. If you ever venture into the Linux world, that is by far the most widely used compiler. In windows you can use them through Cygwin or MinGW. For starting out, I'd also recommend you compiling your simple programs through the command line/terminal and work your way up to an IDE.
Albert Holguin
6-May-15 19:10pm
View
8bit PCM is pretty common... not the best but common nonetheless
Albert Holguin
6-May-15 18:59pm
View
Yep, I've had some of issues trying to do this in the past.
Albert Holguin
6-May-15 18:59pm
View
See my comment above... I've personally had issues with this.
Albert Holguin
6-May-15 18:58pm
View
In my personal experience... I've never had luck using DLL's that were compiled with different versions of VisualStudio (more specifically, as other pointed out, the underlying libraries used that you link your software to). I never had enough motivation to figure exactly what part didn't quite match up, but in general... there are issues there of concern.
Albert Holguin
6-May-15 18:52pm
View
+5
Albert Holguin
6-May-15 18:51pm
View
Upvoted the question because it's a legitimate question and the OP is actually trying. Not sure who/why it was downvoted. (+4)
Albert Holguin
6-May-15 18:49pm
View
Even though I like your solution... not sure it's well suited for a newbie. +4 :)
Albert Holguin
5-May-15 11:37am
View
Eclipse is an IDE, not a compiler.
Albert Holguin
13-Apr-15 13:02pm
View
If you're using TCP/IP, this happens automatically without you doing anything. You have to provide more info on what you're trying to do and what protocols you're using.
Albert Holguin
13-Apr-15 12:59pm
View
What are the dependencies (maybe screen cap and place somewhere)? This really shouldn't be the case.
Albert Holguin
23-Mar-15 16:35pm
View
Look for tutorials online.
[
^
]
Albert Holguin
18-Mar-15 12:05pm
View
Learn to use macros... but also learn about the problems they cause. With that said, happy learning! :)
Albert Holguin
18-Mar-15 10:07am
View
I can't revise your code because the whole idea there is bad. Probably the best way for you to test this out is to use a non-gui application. That would prevent your blocking call from being a problem.
Albert Holguin
15-Mar-15 23:11pm
View
+5
Albert Holguin
11-Mar-15 22:24pm
View
It means the calls you show do absolutely, positively nothing.
Albert Holguin
3-Mar-15 10:50am
View
How do I convert serial to serial using completely different voltage levels and pin outs in C++? ...yeah, good luck... +5
Albert Holguin
1-Mar-15 14:43pm
View
...although you can easily make infinite for() loops as well too...unfortunately.
Albert Holguin
1-Mar-15 14:41pm
View
That's horrible code... you should throw that away and forget you ever saw it.
Albert Holguin
27-Feb-15 16:38pm
View
This is sort of an old post... but did you search for any libraries name pthreadGC2? The extension in regular Linux would be .o for the shared object. Cygwin does tend to butcher library names though, they do a .o.dll extension or something similar.
Albert Holguin
17-Feb-15 16:12pm
View
One of the things you'll see on older posts if cross-platform compatibility issues with .Net... Don't forget MS has recently announced it's releasing the code for it and intends on making it run natively on Linux (not surge if merging with Mono or converting all of their code).
Albert Holguin
16-Feb-15 8:43am
View
Answering as comment since I don't feel like making a real detailed answer. Every program has pointers, since it's the pointer to data in memory (you may not realize they're there... but they're always there). As to when it's useful, well, the alternative is to make copies every time you pass data along, which is terribly inefficient and depending on a few factors, slow.
Albert Holguin
2-Feb-15 21:26pm
View
Posting for the OP and anyone who may browse the Q&A.
Albert Holguin
2-Feb-15 14:50pm
View
OP, see my comment associated with solution 2...
Albert Holguin
2-Feb-15 14:50pm
View
FYI for the OP... this isn't part of standard C/C++. These aren't included in the gcc version of that header file so don't use them if compiling standard code for use in multiple platforms.
Albert Holguin
29-Jan-15 17:05pm
View
What's the question?
Albert Holguin
22-Jan-15 22:01pm
View
You need to add more information, it's not clear what you're doing. What GSM modem are you using? How are you sending the messages? What do you mean you're "unable to get the right codes"?
Albert Holguin
22-Jan-15 16:21pm
View
...and if you're combining two signals of two different sample rates, they must be resampled to the same rate first before combining...
Albert Holguin
22-Jan-15 16:14pm
View
No worries... I'm a communications engineer. ;)
Albert Holguin
22-Jan-15 16:12pm
View
I believe it's more of a misnomer than what he's actually trying to do. Since he's trying to play a sound, what he's referring to as frequency is sampling frequency...otherwise known as sample rate.
See the arguments for the
sound()
[
^
] function.
Albert Holguin
22-Jan-15 16:09pm
View
You don't need an FFT to neither combine a signal or to play it back. You only need that if you're doing spectral analysis.
Albert Holguin
22-Jan-15 15:46pm
View
+5, if you're combining two signals and all you're trying to do is play the combined signal, then all you need is the sample rate (or sampling frequency). I'd hope both signals were sampled using the same sample rate, otherwise you'd get some odd spectral anomalies that aren't really caused by the mixing of the original signals.
Albert Holguin
22-Jan-15 15:41pm
View
This should be a solution. This question gets asked a ton but understanding the concepts really comes down to using them.
Albert Holguin
7-Jan-15 20:49pm
View
A good combination of the call stack and adding breakpoints at different places should allow you to narrow down the location of the call and thereby the class/instance. Heck, I've found memory leaks by getting creative with breakpoints.
Albert Holguin
7-Jan-15 20:46pm
View
+5... call stack and breakpoints are definitely the way to go.
Albert Holguin
7-Jan-15 15:02pm
View
Seems like a great solution... +5
Albert Holguin
7-Jan-15 14:58pm
View
Just used the reference because it was the first thing I found with the picture of the build-events section in Visual Studio. I didn't exactly remember what it was called so I had to do a quick search. I mostly work in Linux nowadays.
Albert Holguin
6-Jan-15 15:09pm
View
There's a handler you're supposed to override but I can't remember which one. I've done this with a toolbar (had two toolbars, one was a major mode setting, didn't want the mode setting to be undocked), is that what you're trying to do?
Albert Holguin
5-Jan-15 18:08pm
View
Sounds like a pain in the rear
Albert Holguin
5-Jan-15 15:04pm
View
I always wondered who used edit/continue. I personally wouldn't spend that much time on such a trivial feature.
Albert Holguin
5-Jan-15 9:46am
View
Very true :)
Albert Holguin
5-Jan-15 9:41am
View
See my solution. A legitimate use would be a corporate environment where they try to track attempted access to blocked sites. Think his "www.google.com" example was just a random website he picked for his question (not that he'd necessarily block google). Guessing as to intent here.
Albert Holguin
26-Nov-14 14:44pm
View
Harvest repository? ...I have no clue what that is. The unresolved inclusion sounds like, well... an unresolved inclusion. There is something the code includes that is in non of the include paths.
Albert Holguin
26-Nov-14 14:40pm
View
This my friend... is what we would call a code dump. When posting code, post only what's relevant. You also fail to explain what your problem/question is.
Albert Holguin
13-Nov-14 10:02am
View
Just by changing VS versions, you're changing libraries. They use completely different MFC versions.
Albert Holguin
10-Nov-14 10:07am
View
Look it up.
Albert Holguin
6-Nov-14 14:41pm
View
+5
Albert Holguin
6-Nov-14 14:32pm
View
So what's the error? ...and did you "delete" it or uninstall it through the regular Windows uninstaller?
Albert Holguin
6-Nov-14 11:52am
View
Your question is not clear.
Albert Holguin
6-Nov-14 10:55am
View
By the way, when you have multithreading bugs, they're VERY dependent on system architecture because every system handles parallel processing a little differently (even processor clock speeds can affect it, because the thread scheduling slots will be different). Hence the need for robust data/variable access control.
Albert Holguin
6-Nov-14 10:52am
View
Unfortunately, the bad part of multi-threaded programming is that debugging is very hard and there's really no simple way of doing it.
Albert Holguin
6-Nov-14 10:50am
View
I must admit, I often forget to look at the post date as well.
Albert Holguin
6-Nov-14 10:47am
View
+5... it's pretty trivial. For the OP, don't forget you can experiment with things right no the command prompt. If you're not sure what a call does, type in on the prompt and don't put a semicolon at the end and it will output to the prompt.
Albert Holguin
4-Nov-14 10:36am
View
Is this for an application that you installed? ...or is it an application that someone else installed? Did the application write to the registry? Did the application store to any protected directories (such as Windows\system32 or even the Program Files directories)?
Albert Holguin
30-Oct-14 16:17pm
View
+5...very right!
Albert Holguin
30-Oct-14 10:13am
View
Sure.. threading is a tricky subject. I'm sure you'll make a lot of mistakes along the way and learn from them. Debugging multi-threaded problems is a bit of a nightmare, so you'll quickly learn to be more careful with variable/data exchanges.
Albert Holguin
30-Oct-14 10:12am
View
Looping on a global boolean is generally ok... IF your thread is doing a read-only operation on it.
Albert Holguin
29-Oct-14 10:14am
View
Sure. If a thread has to keep running, each "iteration" or work run iteration, you update the variables from any externals only once at the start of the iteration. After the iteration initialization, the thread once again has full control of his structure and variables. The alternative, when you do require "near" simultaneous access of data/variables (near meaning it's not really simultaneous, but you don't wait until the one thread is completely done) is to use a mutex/critical section for protection.
Albert Holguin
29-Oct-14 9:25am
View
Not sure what you're asking... the important thing to realize when you're creating a data structure to pass on to the thread is that while that thread is running, NO OTHER THREAD touches those variables until that thread is done with them.
Albert Holguin
28-Oct-14 15:12pm
View
thanks
Albert Holguin
5-Sep-14 13:52pm
View
If you have a specific reply to a solution, use the "comment" section under that solution. Don't post follow-ups as solutions please. Keeping this relatively orderly will help others in the future that may have the same problem you have.
Albert Holguin
6-Aug-14 15:10pm
View
Perhaps you should let us know what you're trying to accomplish by moving these system files around. It's very obvious to me what your problems are with this batch file (permissions plus paths) but I'm not sure why you're even doing this at all. Perhaps if you share what you're trying to accomplish you can get recommendations on how to accomplish your goal in a cleaner manner.
Albert Holguin
30-Jul-14 1:15am
View
...but I would agree that some 90% of issues are file permission based...
Albert Holguin
30-Jul-14 1:09am
View
Did see that, think the only thing that may have made this answer better would be an example of some of the discrepancies. I tried to think of some, but I may confuse them with other windows library implementations (since I've been working a lot with alternative implementations recently).
Albert Holguin
29-Jul-14 23:47pm
View
This may get you what you need, certainly not the best option if you're the developer.
Albert Holguin
29-Jul-14 23:45pm
View
+4, most issues I've seen do have to do with permissions, but there are other possibilities... hard to tell without more info from OP.
Albert Holguin
10-Jul-14 17:28pm
View
Any more details as to what you're trying to accomplish? ...In Linux, it's easy enough to have a computer auto-login, then you can access anything you need under that login. In Windows I'm not so sure (but I believe it's also possible). The login portion would be configured within the OS of interest, then you can access anything via sockets (or any other IPC).
Albert Holguin
10-Jul-14 16:58pm
View
This smells strangely like homework...
Albert Holguin
9-Jul-14 9:59am
View
I've done this before... for debugging purposes... as long as you flush the buffer, it should write out to file. It's possible that somewhere in your code the output file name is different when in debug mode, check for that? Your path may also be different when running in debug mode, so make sure you're checking the right path.
Albert Holguin
2-Jul-14 16:33pm
View
That happens every now and then... those great little mysteries you solved but not really...lol, at least you have something working now! :)
Albert Holguin
2-Jul-14 16:32pm
View
m stands for magic... :p
Albert Holguin
1-Jul-14 17:18pm
View
When you just create a default socket, it'll use the first available NIC (the order is that listed when you do ipconfig). You can actually change the order of the adapters independently of the program by disabling/enabling them (the last enabled goes to the top of the list)... at least that's how you could do it in other Windows versions, not sure if that still works in Weven.
Albert Holguin
1-Jul-14 17:15pm
View
When you look at the network adapter settings, there should be IPv6 and IPv4 listed independently... you can enable/disable one or the other.
Albert Holguin
1-Jul-14 15:25pm
View
Have you checked to make sure IPV4 is enabled on the NIC? ...also, make sure that when you do an ipconfig, the first address listed is real and not some virtual interface for some other program.
Albert Holguin
23-Apr-14 15:46pm
View
There's not much to say about it... it's a general programming language. It runs on the CLR, a software abstraction engine designed (virtual environment) designed to partially sandbox software. The abstraction allows for multiple languages to be able to create code that run within it, since there's an intermediate compilation that creates your application. Once you deploy, the intermediate build is compiled locally in a process commonly referred to as "just-in-time compilation". As for implementing algorithms, you'll always have libraries available to you, just like in C/C++.
Albert Holguin
23-Apr-14 10:44am
View
Only if it's URGENTZ
Albert Holguin
23-Apr-14 10:32am
View
I know of one converter... the do it by hand converter... :p
Albert Holguin
23-Apr-14 10:32am
View
I wouldn't say it's not possible, more like it's hard but not impossible.
Albert Holguin
28-Mar-14 17:34pm
View
Personally, I wouldn't use a solution that will require a third party daemon if you don't have to.
Albert Holguin
27-Mar-14 18:03pm
View
You do realize that in the MS link you provided it says (i.e. no longer supported):
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Albert Holguin
27-Mar-14 17:20pm
View
Messaging also has it's pros/cons... for example, to use windows messaging, you need a window, you can't message to an application that doesn't have a window (although the window can be invisible), and of course, the messaging is that case is Windows specific and cannot be used in any other OS.
Albert Holguin
27-Mar-14 17:17pm
View
You would need a new connection every time (unless you use connection-less transfers, but then you lose some of the benefits of sockets). I'm not sure I know what you mean when you say "message bus". Typically any messaging system will require a messaging marshaling system (i.e. something that does the actual message transfers). In Windows messaging, that's just the Windows kernel. Not sure if that's the type of messaging you're referring to. Sockets can actually serve in a similar fashion if configured properly, for example... if all clients are accessing the same data, you could use multicasting, where everyone interested in the data joins the multicast group and receives the datagrams (packets).
Albert Holguin
27-Mar-14 16:08pm
View
There would still be a lot of questions... would all of your clients get all of the same data or use different streams? ...what are the data rates we're talking about? Some think real-time voice rates are high, but that's actually slow by today's standards, so it really depends on how much data you're moving.
Typically I would recommend to use sockets when possible because they're probably the most flexible IPC option available today, however, they're not nearly the fastest. If you're dealing with a high-volume of data at high-rates, then the overhead of sockets starts to become an issue (you also have to keep in mind that the network stack is a shared system resource). In that case, you have to look at faster options.
Albert Holguin
14-Mar-14 15:07pm
View
yeah, use other ways... you can configure the routers to forward just about anything, but if you have to reconfigure a router to do something that you could just do differently, than might as well do it differently (means the other solution is probably better)
Albert Holguin
6-Mar-14 9:43am
View
Problem is.... no router is going to forward those messages... because they look like a virus/worm.
Albert Holguin
5-Mar-14 9:30am
View
That address means I'm broadcasting to EVERYONE on the internet, so it may not be considered a valid address. Typically even when using broadcasts, you'd confine the broadcast to your own subnet... for example, 192.168.1.255 (just a random example).
Albert Holguin
28-Feb-14 10:52am
View
Where are you making these calls from?
Albert Holguin
28-Feb-14 10:49am
View
Your first link is the German site. (I just edited the link to go to the English site)
Albert Holguin
26-Feb-14 10:36am
View
Not sure if it would make a difference... just thinking here... but are these static or dynamic libraries? ...wondering if you could possibly wrap the libraries in another library so the namespaces are completely separate (since the global namespace of a dll is independent of the calling exe), it would be a hassle but that may work.
Albert Holguin
25-Feb-14 13:16pm
View
What kind of control is it?
Albert Holguin
25-Feb-14 10:23am
View
What's your network topology like? You probably shouldn't broadcast to 255.255.255.255 anyway, not sure that's even valid.
Albert Holguin
19-Feb-14 16:32pm
View
Like I said, it's not in the documentation, but it is in the code.... and when exactly has logic ever stopped MS from doing something? lol
Albert Holguin
19-Feb-14 15:20pm
View
True, overriding is trivial.
Albert Holguin
19-Feb-14 15:18pm
View
I looked within the afxwin header that's part of the VS2008. The article was written around 2002 I believe, so if they're not in the new CDocument, it may be they were removed, but they were also not referenced in the 2008 documentation even though I can see they're there.
Albert Holguin
19-Feb-14 10:40am
View
The thing is... you can make them equally fast if you avoid the pitfalls. For example, some of the std containers pre-allocate data because dynamically allocating data is slow. So even if you only load one object into the container, it will still take up (let's say) the size of five objects just in case you load more. If you exceed the container size, then it has to reallocate memory and copy the old data into the larger allocation. Well, if you know your size, you can always preallocate the memory and save yourself a lot of time, this goes for both C++ and C. So, it's more like knowing what causes slowdown in each and avoiding the situations.
Albert Holguin
19-Feb-14 10:09am
View
I would agree with CPallini on this topic. It's all about who writes the code and knowing what are the things that can cause slowdowns in code.
Albert Holguin
12-Feb-14 11:39am
View
If you're trying to use it for educational purposes, you can usually get a demo version of the core that'll last for a month or so. If it's for business purposes, then you'll just have to bite the bullet and pay for it (depending on the feature, they run around ~$8K). Alternative is for you to code the stuff yourself from scratch.
Albert Holguin
11-Feb-14 16:51pm
View
How are you sharing the data? ...this just about points to thread data access problems (or lack of thread synchronization).
Albert Holguin
11-Feb-14 16:49pm
View
Yes, this one... this is a place with experts that know about threads.
Albert Holguin
11-Feb-14 14:18pm
View
I was referring to your other solution. Settle down.
Show More