Click here to Skip to main content
Page 1 of 24
Page Size: 10 · 25 · 50


Author filtered by: Stefan_Lang [x]
Forum Message 5 May 2013  
I did say "if you can help it", and the implied advice was that you should avoid #define, if there is a better method. There are better methods for every single example you gave: 1. #d
Forum Message 2 May 2013  
I've tried my hand at redefining the comma operator[
Forum Message 1 May 2013  
Please do not cross-post! It just makes it harder for everyone to gather the sparse information that is already
Forum Message 1 May 2013  
Vaclav_Sal wrote:lack of understanding of   one of the fundamental language features – in this case C preprocessor There isn't muc
Answer 1 May 2013   license: CPOL
I know you can use functions as template parameters[^]. I suppose it could work with lambdas, but I have not tried myself.
Answer 30 Apr 2013   license: CPOL
I think you actually need something very different, but to give you an idea just how complex this task is, this something that would in part solve this problem:template class Property { std::string name_; T value_;public: Property(const std::string& name, const T&...
C++
Answer 28 Apr 2013   license: CPOL
The question you posted does not make a lot of sense in english. At least not if option 2 is the only accepted answer. In my comment above I suggested the term "memories" isn't accurate, but maybe it's something else, e. g. what exactly is meant by "interact"? This may refer to the ability to...
Why use the '*' marker? by Stefan_Lang
Answer 28 Apr 2013   license: CPOL
The first is like a street sign pointing in one direction, and telling you Moscow is 7843 miles that way.The second is Moscow. ;-)P.S.: If you need any more help regarding C/C++ variable declarations, try this link:http://cdecl.ridiculousfish.com/?q=int%2A+a%3B[^]
C++
Forum Message 25 Apr 2013  
P.P.S.: using svn copy on URLs implicitely commits the change whereas the version you used still required a commit. You did perform the move efore the commit, so there is a distinct difference between
Forum Message 25 Apr 2013  
I give up. I'm used to the TSVN documentation which doesn't have a copy command: it only uses a branch command that only works on the repository. Problem solved... There still remain the facts that
Re: The cost of software by Stefan_Lang
Forum Message 25 Apr 2013  
Actually the desktop market is heading the same direction: Portals like Steam and Origin sell new top titles as well as Indie games at a fraction of the standard price. Apparently enough people are bu
Forum Message 25 Apr 2013  
I literally copied the commands you listed (except for the file paths). Also your question shouldn't be necessary: the two arguments were working copy locations*, a repository location must be an URL.
Forum Message 24 Apr 2013  
For what its worth I found an old installation of the SVN command line client installed on my system (version 1.6.*something*) and tried to reproduce your results. I got to the cp command, and there I
Forum Message 24 Apr 2013  
If your only problem would be an array with one dynamic dimension, you could try this: std::vector<double> array[500][25][10]; That will create an array of 125000 double
Forum Message 24 Apr 2013  
No, a branch in SVN is not a directory, it is a link! The problem is that everything was performed inside the working directory, i. e. there was only ever one version: copying a directory an
Forum Message 24 Apr 2013  
Ok, let me put it that way: the repository root was the root of your working copy. Therefore any change under that root can not be part of a logical branch! A branch requires a complete copy of your w
Forum Message 24 Apr 2013  
EdReel wrote:intuitive SCM like git That's an oxymoron if I've ever seen one :doh: Branches and merging used to be tricky and sometimes
Forum Message 24 Apr 2013  
You never created a branch, you only created a copy of a subdirectory that happened to be named trunk/. That is why you then had two files rather than one. The problem started w
Forum Message 23 Apr 2013  
Stuart Dootson wrote:when you branch in SVN, you're effectively copying the trunk (or whatever branch you're on) to a new location in the SVN repository (
Forum Message 23 Apr 2013  
Stuart Dootson wrote:a DVCS like mercurial or git has much better theoretical underpinnings than SVN. Branches are treated as alternate repositories
Answer 22 Apr 2013   license: CPOL
Now, if I am on a 32bit machine, with 2GB RAM, and if I have a vector of size say 170,000,000 members, what is the maximum size of each member do I have to have so I will not go out of memory?First, the physical amount of RAM has nothing to do with it: a modern OS will shuffle your memory...
game programing with c by Stefan_Lang
Answer 22 Apr 2013   license: CPOL
There is an interesting tutorial for a simple physics engine[^] that includes moving, colliding balls. Check it out, it comes with great explanations and code.
Answer 22 Apr 2013   license: CPOL
Some things to consider:First, the speed of a loop usually depends on the code performed within much more than the type of loop.Second, which loop to use depends on the way you wish to control the loop. You can rewrite any type of loop as another, but that won't change your requirements...
Forum Message 22 Apr 2013  
At the very least, anyone with admin rights will always be able to see it. If nothing else, this is necessary for virus scanners and backup programs! Why is the standard hide flag not sufficient for y
Forum Message 18 Apr 2013  
I have no doubt a good programmer can write good programs with any syntax element of any language, but that doesn't mean that everyone should! Even the best program deterioates over time. Of all eleme
Forum Message 18 Apr 2013  
continue isn't on quite the same level of abusive potential as goto: goto can jump backwards, out of multiple nested levels of scope, and into an entire differen
Forum Message 17 Apr 2013  
Funny you're talking about Weakly interacting massive particles[
Forum Message 17 Apr 2013  
Tom Deketelaere wrote:Also took me a google search to find the damn shut down button I found it in my "Getting started with Win 8" booklet t
Forum Message 17 Apr 2013  
Regarding multiselect, I was refering to selecting multiple objects on the desktop or within Explorer using [Shift]-LMB or [CTRL]-LMB , or by dragging a frame around the objects. Somehow it never occu
Answer 16 Apr 2013   license: CPOL
While I'd urge you to heed the advice provided with solution 1 and check out a C++ tutorial[^], here's a few things to consider for this problem:There are various methods for reading input, but ultimately C++ is not a very comfortable language for parsing text from any source. You really...
C++
Forum Message 15 Apr 2013  
Then Microsofts thinking is wrong. They crippled the use of the mouse with metro: right-click opens a context toolbar at the bottom of the screen even if the cursor is at the top. closing an app, inst
Re: Math puzzle by Stefan_Lang
Forum Message 11 Apr 2013  
The triangle center circle doesn't need to be 2m from the corner, it needs to be 2m from the outermost parts of the gap. These are the midpoints of the sides, which are only 2/sqrt(3)m removed from th
Re: Math puzzle by Stefan_Lang
Forum Message 11 Apr 2013  
You assumed triangles with 4m sides, so the projected circles from the corners would just touch on the center of each side. You'd get exactly the same gaps as you would for the hexagons *with* the cen
Forum Message 11 Apr 2013  
I did a very thorough investigation of the space we actively need some 30 months back, when all we had was a 80 GB HD and the option to outsource data to the company network. I've found our disks to b
Re: Math puzzle by Stefan_Lang
Forum Message 11 Apr 2013  
In either variant you're going to have multiple projectors at the corners of each 'cell': in a square grid, if you want one projector on each corner and one in each center that results in an average o
Re: Math puzzle by Stefan_Lang
Forum Message 10 Apr 2013  
An approximation would be easy enough to calculate (using r rather than the actual radius of the sphere to arrive at a formula): 1. Since the surface of the sphere is effectivey flat
Answer 10 Apr 2013   license: CPOL
There are several problems at hand:First, I've read your question (version 3) and the already existing solutions and comments. But then I ended up being totally confused, because part of the discussion didn't appear to make sense. The problem of course was that you drastically altered the...
C++
Answer 9 Apr 2013   license: CPOL
There are basically two ways to provide your own interface for a third party class.1. Inheritance:This wouldn't work, as you need to include the header file in your own header file, and you wish to avoid this.2. Using delegates:Your own class creates an instance of the library class...
C++
Re: Intellisense by Stefan_Lang
Forum Message 25 Mar 2013  
Why do you bother? When I started at my current occupation it took me half an hour to get my boss purchase VisualAssist: 10 minutes to download and install the demo, 10 minutes to figure out what to p
Re: Intellisense by Stefan_Lang
Forum Message 25 Mar 2013  
Intellisense causes problems for me about once every five years. That is roughly our schedule for VS updates, and the problem mentioned is to find out where the **** MS hid the deactivate option th
Answer 22 Mar 2013   license: CPOL
Right, I finally found the problem in my original source code. There were actually two issues:1. I needed to move the definition of operator+ to a header (created a separate one for all the operator definitions to come). Thanks to Matthew Faithfull for pointing this out.2. The original...
Answer 21 Mar 2013   license: CPOL
None of this is legal C or C++ syntax.First of all, you're not even using the correct keywords. Keywords and symbols in C/C++ are case sensitive.Second, your syntax is off: you didn't put the keywords and symbols in correct order for your statements to make sense.Third, declarations...
Maniputing time with C++ by Stefan_Lang
Answer 21 Mar 2013   license: CPOL
1. Convert the string to hours, minutes and seconds2. combine these three numbers to calculate the total number of seconds3. Add 804. Split up the resulting value back to hours, minutes and seconds5. convert that back to string.There may be shortcuts or faster ways of doing this, but...
Question 21 Mar 2013   license: CPOL
I've profiled my application to see why my 3D-vector implementation is almost 3 times slower than the corresponding C function calls: the results proved that every single function call costs more time than the actual arithmetic being performed! I've already cut the number of function calls down...
Forum Message 18 Mar 2013  
Nader Elshehabi wrote:Coffee is as important to me as water Makes sense, unless you prefer chewing beans ;P
Forum Message 18 Mar 2013  
Why do you think you have to pause a project just for the purpose of brewing or picking up a drink? I find that time to be highly productive - some of my best ideas I got while I was away from my desk
Re: Hungarian UIs by Stefan_Lang
Forum Message 18 Mar 2013  
The name of a variable should indicate what it's used for, so I see no reason not to use Hungarian notation as a means to distinguish between different kinds of UI components. Since there is only a li
Question 14 Mar 2013   license: CPOL
I'm currently looking for ideas to improve our vector library. In Boost::uBlas I stumbled on a reference to Blitz++, which provdies a very neat looking method for initializing small sized vectors (and matrices): Array A(3,3); //two-dimensional 3-by-3 array of floatA = 1, 2, 3, ...
C++
Forum Message 13 Mar 2013  
Originally my idea was to use a struct of function pointers and 'iterate' over them to arrive at a different pointer. However, I found that pointer arithmetic apparently doesn't work on function point
Forum Message 12 Mar 2013  
The following code compiles and it does return the correct values: int* f1(int i) { return 0; } int* f2(int* pi) { return pi; } union UPointers { int*(*ag1[2])(int i); struc

Page 1 of 24
1 2 3 4 5 6 7 8 9 10


Advertise | Privacy | Mobile
Web04 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid