16,020,741 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 Visual Basic questions
View Javascript questions
View .NET 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 YvesDaoust (Top 200 by date)
YvesDaoust
7-Dec-18 12:02pm
View
Why worry ? Your value is accurate to fifteen significant figures, the maximu that double precision provides.
YvesDaoust
18-May-16 15:08pm
View
Sorry, no, I am busy.
YvesDaoust
18-May-16 9:44am
View
Write a complete program. If you don't have the skills, ask someone around you.
YvesDaoust
18-May-16 9:32am
View
Don't worry, this is normal.
YvesDaoust
9-Mar-15 16:44pm
View
Read this: http://mathworld.wolfram.com/NormalEquation.html
YvesDaoust
2-Mar-15 2:47am
View
Lookup http://en.wikipedia.org/wiki/Linear_least_squares_(mathematics)#Derivation_of_the_normal_equations
YvesDaoust
11-Aug-14 11:23am
View
Did you try it ?
YvesDaoust
11-Aug-14 4:27am
View
Thanks for the hints. Capturing the WM_PASTE message raises an annoying complication: as you need to override the WndProc for the control, you need to create a custom control just for that purpose. (Simple derivation of the TextBox class can't be used as it causes the Designer to stop recognizing the code, making the Form impossible to graphically edit :( )
YvesDaoust
11-Aug-14 2:37am
View
What idea ? Using KeyPress was already described in the question.
YvesDaoust
10-Aug-14 10:13am
View
Its a Windows Forms TextBox, not WPF. My question is about handling the paste action, I am comfortable with the keyboard input.
YvesDaoust
8-Jul-14 16:28pm
View
"all" the points is a lot, as there are infinitely many of them :)
To compute a single point along the arc, consider the unit vectors s = SE/||SE|| and r (as above), and form the sum C + s.cos(t) + r.sin(t), where t is some angle in the allowed range. (You can compute this range from the chord length and the radius.)
YvesDaoust
4-Jul-14 2:45am
View
Glad to know :)
YvesDaoust
11-Jun-14 17:01pm
View
A test case with five points is not appropriate. With so few points, virtually any matching is acceptable, as you assume that there are outliers. Such methods are typically use with hundreds to tenths of thousands of points with a significant part truly matching.
YvesDaoust
31-Mar-14 5:31am
View
You do not specify if the first and last bounds are considered to be "between" as well.
YvesDaoust
28-Mar-14 5:38am
View
No, not clearer. You didn't answer my question. There is no relation between depth and color, there is a relation between depth and lightness. You must describe what you want in more precise terms.
YvesDaoust
27-Mar-14 7:06am
View
Still pretty unclear what you want. Are you referring to the gray shaded sphere (leftmost picture) or the colored "sheets" inscribed in a sphere (next picture) ? Such effects are much easier to achieve using a true 3D model than with a flat one.
YvesDaoust
19-Mar-14 3:19am
View
Your question is not explicit enough. Please tell more about the effect you need to achieve and show samples.
YvesDaoust
14-Jan-14 9:00am
View
This seems to be doable: http://msdn.microsoft.com/en-us/library/fh1h056h.aspx
YvesDaoust
14-Jan-14 6:31am
View
This is Solution 1. All I had to change in my code was inserting the line
[assembly:ClassInterfaceAttribute(ClassInterfaceType::AutoDual)]; // This will let VB6 pre-load the interface définitions
But of course, all the class wrapping code needs to be there as well.
YvesDaoust
16-Dec-13 5:32am
View
Reason for my vote of 1 \n Lacks generality and uses poor techniques.
YvesDaoust
10-Dec-13 10:28am
View
BTW: users of this forum don't like minimalistic explanations together with lengthy code, where the reader has to do all the work
YvesDaoust
19-Oct-13 6:13am
View
I have been looking for such an easy solution for months (no daily :) ), and it was in front of my eyes !
YvesDaoust
18-Oct-13 12:40pm
View
Hurray, by searching better, I found the GetStdHandle call which does the trick, and now it works !
Thanks alot. You can enter your comment as a solution, I'll validate it.
YvesDaoust
18-Oct-13 12:35pm
View
Interesting. I think I once had a look at the Console API and couldn't find a way to get the handle to the application console.
YvesDaoust
18-Oct-13 11:00am
View
This IS an ANSI escape sequence. They don't work in a Command Prompt window. Thanks for the attempt...
YvesDaoust
12-Oct-13 10:13am
View
More precisely, closing the numerator, before the slash
YvesDaoust
12-Oct-13 6:12am
View
Five left and four right. Is that balanced ???
YvesDaoust
7-Oct-13 14:55pm
View
I like your suggestion :)
YvesDaoust
7-Oct-13 12:26pm
View
Extra hint about run-length-coding the shape: to fill an arbitrary polygon, the sweepline approach is well known (http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/scan/sld028.htm). It amounts to decomposing the polygon into trapezia (some of which degenerate into triangles). You can adapt it to the case of a Pie, provided you take the curvature of the circle into account and split the arc at the top and bottom if needed to ensure that an horizontal line crosses once only.
YvesDaoust
7-Oct-13 12:13pm
View
SetPixel/GetPixel are a severe bottleneck. In your case it is much better to "LockBits" the bitmap so that you can access the image buffer directly (you will find posts on this topic elsewhere in CP). If in addition you can generate a run-length-coded representation of the pie (not an easy task), you can memcpy whole runs at a time. This can be quite efficient for large areas.
YvesDaoust
7-Oct-13 11:39am
View
How do you perform "per-pixel analysis" precisely ? There are ways to access the bitmap pixels efficiently.
YvesDaoust
7-Oct-13 11:22am
View
I assume (not tested) that you can do without naming the shape:
With ActiveWindow.Selection.ShapeRange(1)
...
End With
YvesDaoust
7-Oct-13 10:57am
View
Thanks for the suggestion
YvesDaoust
16-Sep-13 9:13am
View
Reason for my vote of 3 \n Interesting
YvesDaoust
6-Aug-13 6:52am
View
Yep, seems difficult to lower to 4 operations. Given the small domain, it is thinkable to fully tabulate the function (2^8 * 8 * 2 entries = 4 kB), but even the table lookup has a cost...
YvesDaoust
6-Aug-13 6:22am
View
Nice try. The expressions are indeed correct. I'll remember the -b trick!
Unfortunately in my context I cannot precompute the mask m (and even less its complement), so that the operation count is not reduced.
YvesDaoust
19-Jun-13 8:47am
View
Where is the problem ? You allocate 200,000 objects each 100 bytes in size don't you ?
YvesDaoust
17-Jun-13 15:14pm
View
How exactly do you check the returned value ? This looks like an uninitialized value and I doubt this is the true returned value.
YvesDaoust
5-Jun-13 6:03am
View
thanks for the feedback :)
YvesDaoust
4-Jun-13 13:35pm
View
I didn't mean that you should redistribute the DLLs. I just meant that the redistributable are not preloaded, they have to be redistributed otherwise there would be no point making them redistributable. Use static linking.
YvesDaoust
4-Jun-13 11:27am
View
Have a look at the Regional Settings on your machine (Control Panel). It can be that the thousands separator is set to be the comma. Defining it as empty could help.
YvesDaoust
4-Jun-13 11:22am
View
I am not sure that the Windows operating system is deemed to have preinstalled run-time libraries (DLLs). They are not part of the distribution.
The run-time libraires are meant to be used by application developers with Visual Studio. Microsoft grants you the right to redistribute them. Windows utilities should not require them.
/MT and /MTd will link statically with the required run-times libraries and the executable will be self-contained. Anyway, mind possible incompatibilities with third-party libraries.
YvesDaoust
4-Jun-13 11:13am
View
Are you sure you need to do that ? If passing 4 arguments instead of 1 is an issue for you, you can pass a, b anc c as global parameters (and keep calling the function F).
YvesDaoust
31-May-13 5:38am
View
The code is working. I am confident that security rights and threading issues are correctly dealt with (even if these matters are totally and forever opaque to me) as all following operations succeed. The problem is silently ignored in a normal execution, it is just the debugger that tries to challenge me.
Thanks again.
YvesDaoust
31-May-13 4:13am
View
Hi KarstenK,
thank you for taking the time to look at my question.
The good news: this sample program indeed works (provided you remove an extraneous pclsObj->Release() at the end, which causes an access violation exception (!)).
The bad news: the problem is still there.
It does not lie in the initialization function (I already tried three different options, to no avail: CoInitialize(0), CoInitializeEx(0, COINIT_APARTMENTTHREADED) and CoInitializeEx(0, COINIT_MULTITHREADED) - these three work with the sample program.)
I also tried the additional call to CoInitializeSecurity, which is missing in my code. This did change the behavior in some versions of my program but not in others.
So I conclude that the problem is memory-mapping dépendent or due to a race and will be harder to trace as it is somewhat random.
Anyway, your suggestion opened new ways to investigate, thanks.
YvesDaoust
21-May-13 9:24am
View
This code does not even compile !
YvesDaoust
18-May-13 13:19pm
View
It will be simple in any language (that supports floating-point arithmetic and 2D arrays), as you essentially need to encode the formulas for the 4 basic operations on complex numbers where you did it for floats.
YvesDaoust
18-May-13 13:12pm
View
This question is unclear. What do you call a 2D spherical image ?
YvesDaoust
18-May-13 11:43am
View
Your question is unclear as I (we) don't know what you call an "ordinary binary tree" vs. a "binary search tree".
YvesDaoust
4-Mar-13 12:37pm
View
How do you submit the documents for printing ? Only this "print handler" knows how many pages were requested per document.
YvesDaoust
4-Mar-13 7:13am
View
Thanks for the suggestion.
I have now completed a solution that does not require programming (well, a single line of code), and... works, so I am adopting it :)
YvesDaoust
26-Feb-13 6:18am
View
Next trap, next solution: it is not enough to raise the ComVisible attribute, as no class method will be exposed (the class data members are). Now we need to let the compiler generate the proper interface definitions with ClassInterfaceAttribute(ClassInterfaceType::AutoDual).
YvesDaoust
26-Feb-13 6:11am
View
Next progress: RegAsm seems to be case unsensitive as it raises an "ambiguous name" error in case two identifiers are identical except for casing. Once this is avoided, a TLB file is generated.
YvesDaoust
25-Feb-13 14:24pm
View
Second progress: need to find the right version of regasm ! (I had several of them on my machine). Shame on MS for not warning about version incompatibilities.
YvesDaoust
25-Feb-13 12:44pm
View
Do you need to find all N first digits, or just the Nth ?
YvesDaoust
25-Feb-13 12:42pm
View
Your problem statement is incomplete. You first need to decide what method to use for the computation.
If the goal is just to practice parallel programming, you can pick any algorithm, even inefficient.
If the goal is to really accelerate the computation, then you need 1) to compute a huge number of decimals (otherwise it is not worth the trouble) and 2) to have a truly good sequential algorithm.
YvesDaoust
25-Feb-13 12:36pm
View
What is Alchemi ?
YvesDaoust
25-Feb-13 12:30pm
View
Dropping this is not an option, it is required by customers. The alternative is to rewrite the whole stuff as ActiveXs, which I want to avoid.
What do you mean by "contaminates the system" ?
YvesDaoust
25-Feb-13 8:07am
View
As I already explained, there is no Build tab in the projects settings, I am using VC++ to build the assembly, not C# nor VB. I didn't see any option similar to "Register for COM Interop".
YvesDaoust
25-Feb-13 6:29am
View
First progress: ComVisibleAttribute requires a "using namespace System::Runtime::InteropServices;" clause.
YvesDaoust
25-Feb-13 6:05am
View
Just seen it and tried it. Things just a little more obscure now...
YvesDaoust
25-Feb-13 6:03am
View
Something rather puzzling:
regasm mVizNET.dll /tlb says:
RegAsm : error RA0000 : Failed to load 'mVizNET.dll' because it is not a valid .NET assembly
I can't understand this, as the file mVizNET.dll does work; in particular, it can be referenced by a project and the Object Browser views it seamlessly. So this must be a valid assembly, mustn't it ?
YvesDaoust
25-Feb-13 5:46am
View
Of course. None of it seems applicable to my case. Specifically: "5.Click Configuration Properties, and then click the Build node": there is no Build node in the configuration properties of VC2005; I coundn't find any equivalent (same about "Compile"); "Use the ComVisibleAttribute attribute": the syntax [CombisibleAttribute(true)] genrerates a compilation error; "The /tlb: switch generates and registers a type library": no, I don't see any TLB file generated.
This article makes me believe that what I want to achieve is possible and at the same time sticks me deeply.
YvesDaoust
25-Feb-13 2:33am
View
Why the @ character ?
YvesDaoust
19-Feb-13 5:31am
View
You should use the third argument to getline and specify the newline character as the string delimiter, otherwise space will be taken by default.
YvesDaoust
19-Feb-13 5:28am
View
As far as I know, getline does not "ask" anything. It is an input-only function and does not emit any message. What makes you think the behavior differs when called from main() ?
YvesDaoust
19-Feb-13 5:21am
View
How do you know it was skipped ?
YvesDaoust
19-Feb-13 2:16am
View
Platform and language are of little relevance here, the SDK is multi-environment. The tag FreeImage was rejected. I am specifically adressing the members used to this package.
YvesDaoust
18-Feb-13 12:24pm
View
A silly question: did you ever... call these functions or methods ?
And if yes, did you ever... pass some arguments ?
YvesDaoust
4-Jan-13 9:47am
View
It seems that my problem is not isolated: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/b2aacd05-d9e9-4c6f-95f5-d6c005c9a5c6/
Thanks for your contributions.
YvesDaoust
3-Jan-13 11:44am
View
That's what I thought too. That's how it used to be. The Win32 projects are running fine, both Release and Debug. As I said, any x64 project fails in the Debug mode, even when created from scratch and even after complete reinstallation of VS2008 !
YvesDaoust
3-Jan-13 11:30am
View
I don't plan to install on another machine. I just want to debug on mine.
YvesDaoust
3-Jan-13 11:13am
View
Unfortunately, the target storage may not be an NTFS disk. I'd prefer a solution such that encryption/decryption is done locally before/after the transfer.
YvesDaoust
3-Jan-13 10:17am
View
I am not sure you understood my post.
YvesDaoust
3-Jan-13 10:15am
View
I am not shipping anything, just debugging a program.
I find it hilarious that you need to build an installer as a workaround.
YvesDaoust
27-Dec-12 6:25am
View
Ooops, wrong, after a full rebuild it seems to work.
YvesDaoust
27-Dec-12 5:56am
View
I don't believe that the problem lies directly in my code. It occurs in an early stage of application loading. Only trivial constructors are called for a few static class instances (mere intialization of data members, if initialization at all). No heap allocation on my side (no malloc, no new, no pointer dereference).
YvesDaoust
27-Dec-12 5:47am
View
The situation has worsened a little: I have moved my global variables as static inside functions (that was relevant in my case). Now the Debug version does not crash anymore and the Release one still crashes, and does never trap into the debugger. So there is even less that I can investigate.
YvesDaoust
25-Dec-12 4:50am
View
I wonder what extra information I could provide.
I tried to reproduce this in a toy project, to no avail. I have other application projects using the same library, that seem to work fine. The application that crashes is a much bigger one, but identical settings are used.
YvesDaoust
25-Dec-12 4:34am
View
Yes, this is frequent. Impossible to trace as this is in system code and not trapped by the debugger.
YvesDaoust
17-Dec-12 7:57am
View
Reason for my vote of 2 \n See comment
YvesDaoust
10-Dec-12 3:47am
View
The answer is platform (OS) dependent. You tell us nothing about it.
YvesDaoust
4-Dec-12 15:37pm
View
You're welcome
YvesDaoust
4-Dec-12 15:37pm
View
High 5
YvesDaoust
4-Dec-12 3:31am
View
The answer must be in the error messages. Read them carefully.
YvesDaoust
3-Dec-12 12:41pm
View
Reason for my vote of 3 \n Make things as simple as possible, but not simpler.
YvesDaoust
3-Dec-12 9:10am
View
In what way does this contradict my suggestion ???
1 and 3 can be done with a single variable; 2 requires two of them.
YvesDaoust
3-Dec-12 9:09am
View
Deleted
In what way does this contradict my suggestion ???
1 and 3 can be done with a single variable; 2 requires two of them.
YvesDaoust
30-Nov-12 10:09am
View
As I sais, implement a Pain handler. You can draw anything you like in it. And use the method Refresh of the form when you want to update the display.
As you are not sepcifying a freehand curve, but rather a polygon, you'd better implement a MouseDown handler.
YvesDaoust
30-Nov-12 9:36am
View
I don't know how it is in ImageJ.
Capturing the cursor positions is very simple. Just implement a MouseMove event handler and store the coordinates in an array. Implement drawing in the Pain event handler. There is no need for a third party library.
YvesDaoust
30-Nov-12 5:26am
View
Yep, you need to keep a count of words in the current sentence, and a count of words in the current paragraph. Can be done with a single map or two of them.
Storing the text structure is of no help.
YvesDaoust
30-Nov-12 4:33am
View
I don't quite agree with this approach. It is overkill.
There is no need to store any hierarchical representation of paragraphs and sentences, as only counts are requested. Processing can very well be done on the fly.
The only relevant data structure I see here is a histogram of word counts, which is indeed appropriately implemented using a map.
Don't put classes everywhere. KISS.
YvesDaoust
30-Nov-12 4:16am
View
You should specify whether the contour needs to follow some object edge/outline in the image or just be a freehand path.
First problem is hard; second is trivial.
YvesDaoust
22-Nov-12 6:46am
View
I confirm that using FreeImage is not a seamless experience.
One of the failures of the test program is a source file not included in the project ! You wonder if the package was tested before release.
Another is a runtime error message you get when trying the same test program and using the test images: "*** TIFF Format
Error while opening TIFF: data is invalid ***"
Yet another, more annoying issue is the assertion error at run-time when running under Linux: Assertion `sizeof(uint64)==8' failed.
I guess I'll find my way through, but this is exactly the kind of time-wasters I wanted to avoid...
YvesDaoust
21-Nov-12 2:24am
View
I tried FreeImage and it didn't compile under Windows unless I fixed the code. Then I tried a test program and it didn't link because of a missing function. Though I was trying the Windows-ready package for Visual Studio.
How can I trust a package in such conditions ?
YvesDaoust
16-Nov-12 10:44am
View
yes, I mean no compilation issues, no need to fetch extra headers files, adjust linker settings, read endless manual...
YvesDaoust
16-Nov-12 9:43am
View
Thanks.
Will it integrate seamlessly ? I think it is overfeatured compared to my needs.
YvesDaoust
4-Nov-12 15:16pm
View
Don't go too far.
YvesDaoust
4-Nov-12 12:25pm
View
Missing * operator.
There are also several errors related to coordinates computation. You made it more complicated that need be. Follow my guidelines.
YvesDaoust
4-Nov-12 8:26am
View
Nice.
YvesDaoust
3-Nov-12 18:56pm
View
Are you kidding ? This code already does a decreasing number of swaps per pass.
YvesDaoust
3-Nov-12 9:48am
View
Nobody can help you as this question is perfectly unclear. Please rephrase.
YvesDaoust
2-Nov-12 9:45am
View
You are right. I was referring to the Windows Forms combo. In WPF, you will use property comboBox1.TextBox.Text and event comboBox1.TextBox.TextChanged
YvesDaoust
2-Nov-12 9:30am
View
You are welcome. You can rate my post then.
YvesDaoust
2-Nov-12 6:13am
View
What is the real issue then, that you can't raise the event or that you can't get the changed content ?
YvesDaoust
2-Nov-12 5:52am
View
Doesn't it work if you just assign a value to the Text property and handle the TextChanged event of the Combo ?
YvesDaoust
2-Nov-12 5:41am
View
Your question is confusing. Do you want to disable clipboard operation for the Windows GUI (Windows Explorer for instance) or for your application window(s) ? In the second case, what kind of widget ?
YvesDaoust
31-Oct-12 12:55pm
View
I want Visual Studio. My productivity with Eclipse is much lower, this is why I want to bypass it. It is slow and error prone. Make is not in order.
YvesDaoust
31-Oct-12 11:49am
View
I must compile with all my compilers (6 or 7 of them) to check portability. This is my daily preoccupation. I'd like to simplify my configuration by avoiding Eclipse.
It indeed seems that VC6 was able to export makefiles. But I don't see this feature in later versions :( And I wonder if that would fit with my requirement #1.
YvesDaoust
31-Oct-12 11:16am
View
Because I need my code to be compliant with another compiler.
How do you turn a VS project into a makefile ??
YvesDaoust
26-Oct-12 7:07am
View
Yes, much longer. Bad for the caches and for virtual memory. It increases the amount of space that the processor needs to keep close.
YvesDaoust
26-Oct-12 7:01am
View
The issue is that when going column by column the addresses go back and forth, and the successive pixels you visit are far apart.
YvesDaoust
26-Oct-12 6:56am
View
What you wrote is 95% valid Visual Basic. Just enter it and fix the syntax errors. (I am not going to do that for you.)
YvesDaoust
26-Oct-12 6:53am
View
As said, to work by increasing addresses. The column-by-column scheme stresses memory management too much, it lacks locality.
YvesDaoust
26-Oct-12 6:26am
View
This is becoming quite surrealistic.
Do you realize that you gave the solution at the beginning of your post?
YvesDaoust
26-Oct-12 6:18am
View
Yes, this is clear from the beginning.
You already know how to display a message box and input numbers, don't you ?
You know how to respond to GUI events like a button click, don't you ?
You also know how to perform a linear search in an array, don't you ?
So what is missing ? Just how to compare two numbers ?
YvesDaoust
26-Oct-12 6:06am
View
Not sure if it is a good idea to carry out a task that has not been specified to you.
Anyway, the first question to answer is whether the categories will be determined by a human (supervised clustering) or established from the dataset by automated means (unsupervised clustering.)
YvesDaoust
26-Oct-12 5:59am
View
I am doing my best to figure out what you can't do. You give me little clue. Please explain.
YvesDaoust
26-Oct-12 5:56am
View
You are welcome.
There are several options for mapping complex numbers to RGB (2D unbounded plane to unit cube). One is Phase -> Hue, Magnitude -> Lightness (rescaled), fully saturated colors. It is an interesting challenge to make such transforms fast.
YvesDaoust
26-Oct-12 3:59am
View
" that code is die " ???
" how to do " ???
Please rephrase.
YvesDaoust
26-Oct-12 3:38am
View
This is a really unexpected statement, as 1) you understand the concepts, 2) you are quite able to use the VB IDE, 3) you wrote the code for a linear search, and yet you claim that you cannot do it !?
We always do things we never did before. What are you missing ?
YvesDaoust
26-Oct-12 2:33am
View
So you've got all ingredients now, just code the search routine...
YvesDaoust
25-Oct-12 14:16pm
View
You are welcome.
Just copy/paste the code and do the required adaptations to turn it to valid Java.
YvesDaoust
25-Oct-12 8:41am
View
You should have stated your question differently then.
Do you have a Visual Basic development environment ?
YvesDaoust
10-Oct-12 6:09am
View
thumbs up
The next battle is to lobby some standardization commitee so that they define tags for use on form so that your personal data can be filled in automatically...
YvesDaoust
10-Oct-12 5:59am
View
I just tried it and it seems to be doing exactly what I want ! Thanks !
YvesDaoust
10-Oct-12 5:58am
View
Thanks but I am not programming an application.
YvesDaoust
2-Oct-12 4:57am
View
Please tell us what you mean by "best".
YvesDaoust
24-Sep-12 14:53pm
View
Reason for my vote of 3
Usually, IRR computation is done using Newton iterations rather than dichotomy. Faster.
YvesDaoust
21-Sep-12 4:40am
View
Have a look at those new errors and fix them. In the first place, include <windows.h>.
No I am not trying that for you.
YvesDaoust
14-Sep-12 14:06pm
View
I made yet another attempt with the FilgraphManagerClass object. It has all the bells and whistles I need, like RenderFile, Run, Pause, GetCurrentImage, CurrentPosition...
Unfortunately, I found no way of getting frame-by-frame resolution :(
YvesDaoust
14-Sep-12 3:08am
View
I made an attempt with FFmpeg and quickly ran into portability problems with the MSVC environment (missing include files, vararg macros...), all requiring ad-hoc adaptations at various places.
This is exactly what I want to avoid. Dealing with such mammuth packages is a pain in the neck.
YvesDaoust
14-Sep-12 2:25am
View
No I didn't, thank you for pointing me at it.
Unfortunately, I tried the IMediaDet interface and it does not work with my file. It just reports 0 output streams in it.
This is confirmed by the Demo application that comes with the article.
YvesDaoust
14-Sep-12 2:20am
View
I don't mind mixing native and managed code. I am looking for a solution that I can put at work in a couple of hours. Can you recommend me one that has a straightforward API?
YvesDaoust
5-Sep-12 4:18am
View
Interesting, thank you for contributing. Where did you find this info ?
This is perfectly horrible, I will stick to my Solution 1 !
By the way I am nearly done rewriting all my stuff using intrinsics. In the beginning I was strongly against them, considering that they were just a painful rewrite with no added value. After a while I realized that they nicely take care of register allocation and make your code look human again. I saw no loss of performance compared to my carefully handcrafted assembly; sometimes improvements by 20% or so...
YvesDaoust
3-Sep-12 6:19am
View
For me it is unclear what you cannot do.
YvesDaoust
3-Sep-12 5:54am
View
What is the question ?
YvesDaoust
20-Aug-12 4:35am
View
It is unclear if you want a tool that modifies the image (inlay) or keeps a set of drawing primitives on top of the image while keeping the latter untouched (overlay).
Also unclear what you mean by "redo some operation".
YvesDaoust
18-Aug-12 8:02am
View
Thanks. I have tried sending to one of the bloggers. We'll see...
YvesDaoust
18-Aug-12 7:27am
View
Microsoft's sites are a labyrinth. I need a way to address the right guy in the right team, or their "suggestion box".
I don't want them to solve this issue for myself (I have workarounds and I won't be waiting for the next VS release). I just want to make this suggestion with some probability that it is heard.
I am not sure it requires changing the compiler, rather updating the relevant table somewhere.
YvesDaoust
18-Aug-12 5:51am
View
These are of no help. Why did you answer that ?
YvesDaoust
18-Aug-12 4:29am
View
What do you mean ?
YvesDaoust
6-Aug-12 15:53pm
View
In the end your suggestion is the right one. One option would be to retrieve the local variables from the stack frame, but it appears very difficult to locate them in optimized code. Passing them as argument should make things easier.
YvesDaoust
4-Aug-12 8:38am
View
If you want to work with larger files, all versions of Visual Studio Express have a wonderful text editor that can load and process them.
YvesDaoust
3-Aug-12 4:31am
View
From this quite interesting CodeProject article "Inline Assembly in GCC Vs VC", I understand that my problem is not specific to the Intel syntax: gcc inline assembly just does not support references to local variables. These have to be found in the stack frame :-( (hoping that they have not been optimized away...)
YvesDaoust
3-Aug-12 2:49am
View
Not the right day to quit smoking, I am afraid.
YvesDaoust
2-Aug-12 15:26pm
View
Thank you for trying to help.
This inline assembly is MMX/SSE code hand crafted for maximum performance. I don't believe that any vectorizing compiler could beat it.
There are more than 10,000 lines of assembly code so rewriting to AT&T syntax is not practical (not talking of the disgust it inspires me.) There is a customer waiting at the door, and the work is 99% done, except for this regrettable restriction.
I am dreaming of a better option than locating the variables on the stack for hundredths of functions.
YvesDaoust
2-Aug-12 10:54am
View
What do you mean ? I am using functions.
My question is very specific to the behavior of gcc/g++ in the Intel inline assembly compatibility mode.
YvesDaoust
20-Jun-12 10:13am
View
In C#, I work like this:
in Form1.cs, declare a class like this:
// Trick to allow double buffering
public class DoubleBufferPanel : Panel
{
public DoubleBufferPanel()
{
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
}
}
Then in Form1.Designer.cs, replace the occurrences of the Panel type by the this newly defined class (two places).
YvesDaoust
31-May-12 11:38am
View
Interesting proposal.
I am trying that, it works on a property and a method argument ! Thanks !
YvesDaoust
31-May-12 10:30am
View
The class library is written in C++. The buffer arguments are typed as unsigned char* (unmanaged). I am not writing the VB declarations myself, the Object Browser does.
YvesDaoust
18-May-12 10:15am
View
How can I restart the application after the reboot to where it was interrupted, in case of a desktop?
YvesDaoust
17-May-12 6:14am
View
That's also my feeling, thanks.
YvesDaoust
17-May-12 6:08am
View
Nice, thanks.
The MSDN topic is the most interesting: http://technet.microsoft.com/en-us/library/cc180825.aspx
YvesDaoust
17-May-12 6:02am
View
Cool, new leads !
Any idea about the availability/reliability of the info ?
YvesDaoust
17-May-12 6:01am
View
Deleted
Cool, new leads !
Any idea about the availability/reliability of the info ? [see my comment on Solution 2]
YvesDaoust
16-May-12 11:08am
View
Yes, quite right. For me the module is more the size of the cells, but this is just a matter of convention.
YvesDaoust
23-Apr-12 11:21am
View
The replacement approach is sound but has a potential flaw: a character could be replaced more than once if it appears in several confusions.
For instance, assume the confusions p <-> ph and h <-> H; pasoli would turn to phasoli, then to pHasoli.
YvesDaoust
23-Apr-12 10:03am
View
I don't believe one can easily make sense of this problem statement.
You use the term "count" (usually meaning number of), but you compare sums (adding the values together).
And what do you call "swapped numbers" ? All of the numbers are moved during the sorts.
YvesDaoust
13-Mar-12 3:34am
View
Let's work to help developers, not make them feel stupid.
YvesDaoust
17-Feb-12 8:47am
View
The second part of the condition does not make sense; it is the same as f(n) != g(n), I don't think this is intended.
YvesDaoust
7-Feb-12 2:56am
View
Deleted
Why do you use these spanLeft and spanRight flags ?
YvesDaoust
2-Feb-12 8:06am
View
1) I agree with that
2) with that too
3) the same regedit.exe is run in both cases (the file associations were left as default on both machines), this is what makes the case unintelligible
4) this is exactly what I would like to avoid, I don't want this redirection
YvesDaoust
2-Feb-12 6:52am
View
I agree with that, but I still want to understand what causes the redirection on one machine and not on the other.
BTW: I haven't solved this.
YvesDaoust
31-Jan-12 2:29am
View
Deleted
Reason for my vote of 5
New, handy tool; not extra luxury when you think about how painful leaks hunt can be.
YvesDaoust
30-Jan-12 2:30am
View
Nikhil, I think you don't realize that your question is meaningless without providing mode context. Avoid doing this, as it easily irks the CodeProject members.
YvesDaoust
25-Jan-12 11:29am
View
By the way, your title is misleading.
YvesDaoust
24-Jan-12 3:01am
View
Deleted
Reason for my vote of 5
You were the only one to raise an interesting issue regarding this otherwise trivial problem
YvesDaoust
24-Jan-12 3:00am
View
Deleted
Who said that the empty string is not a palindrome ? ;)
YvesDaoust
24-Jan-12 2:39am
View
Deleted
Reason for my vote of 5
Good to know, I would never have imagined that such an option existed by myself
YvesDaoust
19-Jan-12 4:17am
View
Deleted
Too glad that you liked these.
The given implementation IS iterative; the trick is that the log10 invocations correspond to B constant values that just need to be precomputed (log10(0.5)=-0.301030, log10(0.75)=-0.124939, log10(0.875)=-0.057992...).
You will find plenty of CORDIC implementations in various language, but it is up to you to mine the Web.
Have a look at http://www.voidware.com/cordic.htm, and also http://www.quinapalus.com/efunc.html
YvesDaoust
18-Jan-12 3:05am
View
Deleted
You are welcome.
For the sake of readability, you can map an RGB structure on the byte triplets. See my Alternative 5.
YvesDaoust
17-Jan-12 15:21pm
View
Deleted
DISCLAIMER: someone inserted spaces on the left of the assignment operators; I hate that.
YvesDaoust
17-Jan-12 15:14pm
View
Deleted
next time i'll sta
YvesDaoust
27-Dec-11 3:32am
View
Deleted
Reason for my vote of 1
This code smells. Combining a monitor with busy waiting loops is a nonsense. This code is too complicated to be verified. I would never trust it.
YvesDaoust
22-Dec-11 10:07am
View
Deleted
What tags ?
YvesDaoust
20-Dec-11 3:14am
View
3.If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
YvesDaoust
14-Dec-11 9:26am
View
Deleted
I thought you liked Monthy Python's sense of humour.
YvesDaoust
14-Dec-11 4:34am
View
No. What more do you know about these images ? [You seem to know how the middle one was obtained]
If yo don't tell me the context I cannot help you.
YvesDaoust
13-Dec-11 5:40am
View
Actually, it is impossible to answer your question without knowing how you would define a good lineament detection. What would you really expect as a valid output of the algorithm. Subjectivity should be dealt with in the first place.
If I were to do it, I would first try a classical edge detector (Canny + non-maxima suppression + hysteresis thresholding), then filter on edges that go in pairs (this would be an ad-hoc algorithm to be created).
You can also get some inspiration from http://www.irisa.fr/vista/Papers/2000_mva_laptev.pdf, even though this is a fairly sophisticated solution.
YvesDaoust
13-Dec-11 4:45am
View
The median filter does not produce a binary image by itself. Do you you mean binarization followed by binary median filter, or grayscale median filter followed by binarization, or something different ?
In my not-so-humble opinion, this algorithm is a poor lineament detector. Indeed it generates a lineament-like image, but that has little correspondence with the underlying image. Too many false positives and false negatives.
YvesDaoust
13-Dec-11 4:14am
View
What is binarization by medians ? Never heard of that. Median filter ?
I understand the intent to find lineaments. Anyway it seems to me that the method is very uneffective. May lineaments are detected where there are none in the source image, and conversely, many salients lineaments are ignored.
YvesDaoust
13-Dec-11 2:32am
View
Deleted
Reason for my vote of 1
Is this article adding any value ?
YvesDaoust
1-Dec-11 4:27am
View
If you never programmed in your life, take a few minutes to download Visual Basic Express edition (free) and play with it a little.
Follow the "Creating Your First Visual Basic Program" tutorial. You'll quickly understand if this is for you or not.
YvesDaoust
1-Dec-11 4:10am
View
You can try by yourself first. Never too late to ask an expert after.
You might even be pleased that the manufacturer provides what you need as a sample program.
YvesDaoust
1-Dec-11 2:58am
View
Wonderful, this closes my question. Thank you for providing this precious info.
YvesDaoust
30-Nov-11 7:03am
View
Did you read the question ? The question is about the formats to support, not about coding.
YvesDaoust
30-Nov-11 6:59am
View
Did you read the question ? The question is about the formats to support, not about coding.
YvesDaoust
30-Nov-11 6:59am
View
Deleted
Did you read the question ? The question is about the formats to support, not about coding.
YvesDaoust
28-Nov-11 9:15am
View
In terms of readability, your 1) is the coolest. [Except for the necessary reversal trick.]
YvesDaoust
28-Nov-11 9:04am
View
Quite right. I was misled both by the code brwoser and by the documentation, which only report overloads with 1 to 3 fields.
Thanks for the tip !
YvesDaoust
28-Nov-11 7:54am
View
Just too lazy to use an array
YvesDaoust
28-Nov-11 6:40am
View
By the way, nobody's perfect: when printing Unicode characters to a Windows console, two bad things happen:
- printing with wprintf does not use the Unicode character set (€ appears as ?);
- printing with _putws just stops writing when it meets a non-ascii character !
YvesDaoust
28-Nov-11 3:11am
View
Thanks for the answer.
My question is more about the client applications: do they all recognize Unicode content ? (the classical MS applications do)
YvesDaoust
27-Nov-11 12:20pm
View
Given that you are using the built-in function for text replacement, there is little chance that you could achieve better performance from a Word macro.
If you really experience a perfomance problem (huge text/massive number of replacements), doing the replacements using other tools can be an option.
YvesDaoust
25-Oct-11 5:01am
View
Deleted
Reason for my vote of 1
Why make it simple when you can make it dangerously complicated ?
Those two flags should be mutually exclusive. This opens a "correctness hole" in the code. A single flag makes this property implicit.
YvesDaoust
25-Oct-11 3:51am
View
Deleted
Actually, this is not a joke. How can you check that a multiply has overflown ?
YvesDaoust
25-Oct-11 3:45am
View
Deleted
Just for the sake of being picky, how can you be sure that when overflow does occur the condition long.MaxValue - answer < answer holds ?
YvesDaoust
19-Oct-11 4:35am
View
Deleted
Matthew, have a look at this site: http://www.luschny.de/math/factorial/FastFactorialFunctions.htm. It is a wonder.
YvesDaoust
19-Oct-11 4:31am
View
Deleted
Shouldn't you add overflow detection ? (Doing it without the knowledge that overflow starts at 13 - otherwise that would be cheating.)
Show More