15,908,437 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 Filipe Marques (Top 58 by date)
Filipe Marques
18-Feb-16 19:27pm
View
Hi anOther1, thanks for your help. I don't know if I was clear in my question but the checkbox that I refer was the checkboxes of the listview by setting 'CheckBoxes' property to true. Meanwhile, I figure out a solution for my problem that I posted here. Thanks any way. King regards, Filipe Marques
Filipe Marques
14-Jan-15 13:17pm
View
Hi, take a look at this: http://stackoverflow.com/questions/238002/replace-line-breaks-in-a-string-c-sharp Best regards, Filipe Marques
Filipe Marques
8-Jan-15 3:59am
View
Hahaha I knew it that was a very difficult error :D Yes, I understand why. I have always been concerned about return a reference but never pay attention to the function arguments. Thanks a lot Sergey :) Best regards, Filipe Marques
Filipe Marques
15-Dec-14 3:54am
View
Hi Jan, thanks for help. Yeah, yesterday I figure out how achieve that (I do not know how - as I said before, I am a newbie in this area hehe). It was a long weekend :) . And thanks for the tip, that we should not set properties on he treeview. To me, the xaml part is a kind of magic yet. Best regards, Filipe Marques
Filipe Marques
14-Dec-14 9:48am
View
My problem is to prevent the selected item been show in the combobox. I spend all night long to figure out a solution and what I did was to create a user control with a Textbox and a Combobox (only the arrow button is visible). I do not know if is the best solution, but it works :D In the solution area, I show the code that I wrote. Best Regards, Filipe Marques
Filipe Marques
12-Dec-14 22:45pm
View
Hi Jan, finally I got to your code working. Thank you very much for your help :D Just one question, when I have the tree expanded and I resize the window, the tree is collapsed. There are any chances to avoid that? Best regards Filipe
Filipe Marques
10-Dec-14 3:56am
View
I am sorry for taking so long to answer you. Thanks anyway :) As I said, this is my first program using WPF (and my second ou third using c# :D) so there is a very high probability of something wrong. But I solve my problem (see my comment in Solution 4). I do not know if this the best approach, but it works. Best regards, Filipe Marques
Filipe Marques
5-Dec-14 15:31pm
View
I need a button on each item. I must reduce the interaction between the user and the application. Well, I search on internet and I found the solution: http://stackoverflow.com/questions/4969418/wpf-treeview-with-right-alignment-values It was what I wanted :) Thank you Jan for your help.
Filipe Marques
5-Dec-14 15:31pm
View
Hi Jan, I used your code and the variable TreeViewWindow is never initialized. Maybe there is something that I am missing. Best regards, Filipe Marques
Filipe Marques
5-Dec-14 15:31pm
View
Hi, thank you for your answer but the result is the same as in johannesnestler solution, the application crashes. Best regards, Filipe Marques
Filipe Marques
5-Dec-14 15:29pm
View
Hi, thanks for your answer but when I used the '*', the application crashes. Best regards, Filipe Marques
Filipe Marques
3-Dec-14 17:26pm
View
Hi Jan, I updated my question
Filipe Marques
3-Dec-14 5:24am
View
Sure, but I can not show you right now because I do not have the code with me. Thanks in advance, Filipe Marques
Filipe Marques
3-Dec-14 3:57am
View
Hello Jan. Yes, the TreeViewItems have 2 columns. My only issue (I hope that be clear in my drawings :D ) is just about alignment. The width of the second column must be fixed and always docked to the right border of the window. The width of the first column is equal to window width minus the width of the second column. Beste regards, Filipe Marques
Filipe Marques
4-Jan-14 12:55pm
View
I think those are not the clusters that he asked for help. Best regards Filipe Marques
Filipe Marques
19-Oct-13 10:27am
View
Hi Andreas Gieriet, please, see the answers that I wrote for Pwasser solution. Best regards, Filipe Marques
Filipe Marques
19-Oct-13 10:25am
View
Andreas Gieriet and Pwasser, thanks for yours answers. I did not know the hide concept. I thought that a method is declared as public in base class, keeps accessible from derived class (for same methods with differents signatures). One more time, thanks for your answers :) . Best regards, Filipe Marques
Filipe Marques
27-Sep-13 17:38pm
View
Hi Jochen again :) This was just a test, to understand the process. So I did not check the if the project is a UNICODE or not because I knew the it was a non UNICODE. But yes, I must take in consideration. About the first two methods, you are right. Last night my head was over heat and I did not read properly the documentation and I thought that the drop target was my window. So, finally, the problem was the COleDataSource variable. It was a member of my class. I did not know that detail. Again, thanks for your help Jochen. Best regards, Filipe Marques
Filipe Marques
26-Sep-13 17:55pm
View
Thanks Jochen. You help me. Thats work know ;) Best regards, Filipe Marques
Filipe Marques
24-Sep-13 11:39am
View
Hi, do not call srand function inside the for loop. Call it before the for loop. This function initialize the random seed. Best reguards, Filipe Marques
Filipe Marques
14-May-13 13:10pm
View
Please, see my update. Filipe
Filipe Marques
13-May-13 17:25pm
View
http://docs.oracle.com/javase/1.4.2/docs/api/java/io/BufferedReader.html
Here you havê the documentation about BufferedReader class. In method readLine(), if the result is null (InputInstArray[getlnst] == null) then you reach the end of your buffer. Filipe
Filipe Marques
13-May-13 11:29am
View
Why you do not check if the return buffer is empty (yourBuffer.length) or is null? I'm suppose if you reach the EOF, buffer will came null or empty.
Filipe Marques
13-May-13 4:42am
View
So, yours input came from a file? - http://stackoverflow.com/questions/7413830/java-read-line-from-file - You can get each linde from file and do what you want to do with it. Filipe
Filipe Marques
8-May-13 8:35am
View
Thanks Julian ;)
Filipe Marques
8-May-13 4:28am
View
Be careful. If you use this.setDefaultCloseOperation yours clase must be extend to JFrame, otherwise you must do tourFrame.setDefaultCloseOperation. If he wants exit of his program during the execution of something, you have System.exit(yourCode).
Filipe
Filipe Marques
22-Apr-13 12:15pm
View
In train() function, inside the if block, you have happyRating.get(i - 1). If you keep the code of onClick() function (see my second point in my answer), when i=11 you are access the 10th element, your array only has 9 elements.
Filipe Marques
4-Apr-13 4:32am
View
Hi, look at this, I hope that helps you: http://stackoverflow.com/questions/3775373/java-how-to-add-image-to-jlabel
Filipe Marques
3-Apr-13 17:55pm
View
I never used eclipse. I use Netbeans or sometimes I use notepad++ with command line. But this is not relevant. You must have something similar with my code above. The unique difference that I can see is how eclipse create the button, but at the end, the result is the same. Best regards: Filipe
Filipe Marques
22-Mar-13 8:27am
View
Kapilkp, I update my answer with a sample code. It does nothing, it's only to show you. (:
Filipe Marques
21-Mar-13 16:10pm
View
Well Espen, thanks a lot for your solution. As I said to Steve, rigth now, the best solution is to instanciate an object first and then use the assignment. Reduce a lot the complexity of my code. My 5. Thanks Filipe
Filipe Marques
21-Mar-13 16:10pm
View
Thanks Steve, now the copy constructor is called. It solved my problem, but meanwhile, new things came out and I need to store the information about my object, so a temporary object is not a solution. My 5 to realize me for that assignment is in fact a copy-constructor. (: Thanks, Filipe
Filipe Marques
20-Mar-13 17:54pm
View
So, I have a clue what is happening: Return value optimization.
http://en.wikipedia.org/wiki/Return_value_optimization
And as I read (http://stackoverflow.com/questions/9941043/how-to-disable-return-value-optimization-in-visual-studio-2010) it is not possible to disable it.
Filipe Marques
20-Mar-13 17:38pm
View
Thanks for your answers. Please, read the comment that I did in Steve solution, for I do not a copy-paste of it. (:
Filipe Marques
20-Mar-13 17:37pm
View
Thanks for all replies. I didn't know about this. I thought that if I use the assignment operator to initialize an object, I was doing a assignment, but after read a little about this, makes sense. How ever, my copy constructor is not called. If after the initialization, if I assignment again my object again, the assignment operator is called (as expected, my object is already initialized). (yesterday I thought that I had put the copy constructor in code above, but I forgot it)
Filipe Marques
19-Mar-13 19:39pm
View
Thanks for your reply. As I said to Steve, the copy constructor is not being called. I don't get it. I think I need a good night of sleep. :)
Filipe Marques
19-Mar-13 19:35pm
View
Hi thanks for your answer. I updated the code with the constructors. I put printf's all of them and only the second is call (from tree<_T>::pre_iterator tree<_T>::end() method). I think there is something missing...a really basic thing :)
Filipe Marques
5-Mar-13 8:35am
View
In CodeProect there is actually an article to teach "how to create" custom operators. http://www.codeproject.com/Articles/31783/Custom-User-Defined-Operators-in-C
Filipe Marques
27-Jan-13 9:36am
View
Thanks a lot for the explanation Philippe. I never realised that using signed or an unsigned variable causes such impact. Now I have same performance in both situations and the asm code is the same too.
Filipe Marques
26-Jan-13 16:13pm
View
I did that because in low performance CPU (like micro controllers) the division is a overkill instruction (correct me if I am wrong). I know that compilers now a days optimize the code. What I was expected is, in worst case, the division takes the same time as shift operator (the compiler transform the division into a shift). The result was a difference in order of 30%.
Filipe Marques
26-Jan-13 16:05pm
View
Yes, the 'n' is a signed variable (int). I updated the question. Now, I put the asm code for the two situations. The compiler still uses the SAR instruction. The only diference I see now is in the end of code: with the division operator, the compiler puts the instructor MOV and in shift operator, doesn't.
Filipe Marques
26-Jan-13 15:42pm
View
I execute each one 10.000.000 times. Thanks for the link. I hope one day I gain courage to learn a little bit about assembly :D
Filipe Marques
26-Jan-13 13:37pm
View
Hi Mike, I already updated the question with the assembly code.
Filipe Marques
26-Jan-13 13:35pm
View
The shift method is commented.
Filipe Marques
17-Jan-13 5:36am
View
Deleted
Hi Syam,
take a look on this link
http://www.mkyong.com/java/java-how-to-get-current-date-time-date-and-calender/
Best regards
Filipe
Filipe Marques
10-Jan-13 6:40am
View
You have the opencv labrary and also you have the videoInput Library. They are very easy to use.
Filipe Marques
10-Jul-12 6:39am
View
thanks for your answer.
your answer made me re-thinking of the approach of my problem. i really appreciate it. :)
best regards
Filipe
Filipe Marques
7-Jul-12 9:33am
View
thanks for your answer
yes, I know about __LINE__ macro and I tried a lot of combinations with it, like in 'new' operator that i found in some forums, but I think the best way is to use a TRACE macro or something like that.
best regards, Filipe
Filipe Marques
23-Mar-12 6:48am
View
Hi Mohammad,
In my opinion, the best way is to use a microcontroller to read data and then transfer to your pc, where you will process your data. You can use a simple serial communication or a wireless one to transfer data.
About the clock of the processor, you must know the sample time (the interval of time that you read data), because can happen you try to read a lot of data and the microcontroller can not have time to read all data (very bad situation) or can happen you have a high clock speed processor and you just need to read data from, for exemple, 5 to 5 minutes (doesn't make sense)
Best regards
Filipe Marques
Filipe Marques
12-Jan-12 5:16am
View
i thought that for the compiler was the same.
And I use a lot of cast in code, and I always used.
Thanks
Filipe
Filipe Marques
11-Jan-12 14:29pm
View
Thanks Jochen,
works fine now.
However, I have a question: why you use
size_t remove_space(wchar_t *equation)
instead
size_t remove_space(wchar_t *(&equation))
?
Because I want the string back.
Filipe
Filipe Marques
11-Jan-12 14:23pm
View
I use normally char instead of wchar_t and I don't noticed this mistake.
thanks,
Filipe
Filipe Marques
17-Dec-11 9:52am
View
But I always need a global IP, if I am server, my IP, if my friend is a server, his IP.
Imagine I want create a chat room. If I connect first, I am the server and my friend will connect to me as a client. If my friend connect first, he is the server and I am the client.
Filipe
Filipe Marques
17-Dec-11 9:39am
View
Thanks.
Sometime ago I discovery a site like www.WhatIsMyIP.com but I thought that there was an easy way to get the public IP address by using a some function or some options of a function.
FIlipe
Filipe Marques
15-Dec-11 16:05pm
View
Thanks Jack.
Makes sense. So, if I understood, I configure my router to a certain port and a certain ip address and when I send data for that port and that ip address, I can receive in my computer.
And I don't take the chance of that ip address and port be used in other computer?
Thanks
Filipe Marques
15-Dec-11 15:57pm
View
Thanks Resmi for your tip, but I try gethostbyname() and I still get the local IP.
Filipe Marques
14-Sep-11 5:07am
View
Thanks for help.
I have a copy constructor in may class.
Filipe Marques
14-Sep-11 4:54am
View
thanks, make sense.
Show More