15,897,704 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 The_Real_Chubaka (Top 37 by date)
The_Real_Chubaka
7-Feb-12 12:52pm
View
Yes but, the last line of code i wrote was a few years ago.
The_Real_Chubaka
7-Feb-12 12:46pm
View
Point 1)
Rangek.runge4(count, y, dist); // Method executed in real time [Is this the way to do this?]
y and dist are both is of type double.
This is Runge Kutta method to solve a set of first order differential equations.
“count” is the x-value, time in this case. “y[0]” is the y-value of the first differential equation, “y[1]” the y-value of the second differential equation …
So, this method is supposed to find y-values at every count+dist point.
I set “dist” to 0.1 but, it can be changed.
The problem I have is using it in real time. I am assuming that it is finding y-values in real time because count is real-time.
Point 2)
I changed that line to:
fprintf(output, "%l\t%f\n", count, y[0]);
I modified my code so many time that I forgot to modify that line. Thank you :)
Point 3)
Thank you very much.
It works like a charm.
Last point)
I think I need to go back to my Runge Kutta code and write my logic to implement it in real time with a pen and paper.
The_Real_Chubaka
7-Feb-12 10:59am
View
Since, it is always getting re-initialized, it will always be equal to -1 after the first iteration.
That mean lastCount will always be != from count after the first iteration.
That is also why it is only printing the first line.
The_Real_Chubaka
7-Feb-12 10:56am
View
Do you mean like this:
while(1)
{
time02 = time_now(); // Returns the time now
static long count = 0;
count = (time02-time01)/1000; // Number of seconds since “time01”
Rangek.runge4(count, y, dist); // Method executed in real time [Is this the way to do this?]
static long lastCount = -1; // 'static' so it does not get re-initialised
cout << "Counting: " << lastCount << " seconds\n";
//if((count%2) == 0)
if(lastCount == count)
{
fprintf(output, "%f\t%f\n", count, y[0]);
lastCount = count;
continue;
}
cout << "Counting: " << count << " seconds\n";
if( ((time02-time01)/1000) >= MAX) break;// Stop after 10 second
}
I have two problems:
I made "lastCount" static, but it is always getting re-initialized!!! Why is that?
The "countinue" statement will make this line "Rangek.runge4(count, y, dist);" not be executed in real-time.
The_Real_Chubaka
6-Dec-11 12:50pm
View
Main purpose of the server: just a repository for source code. However, i it would be a plus if i can run my applications on it :)
The kind of application we are working on: We are busy working on a web application. crawlers, parsers, extracting data from websites, putting extracted data in a database ...
However, in the future, we don't know what other projects we will work on. It can be desktop app, mobile app...
Thank you for your interest in my question.
Herve
The_Real_Chubaka
8-Nov-11 20:09pm
View
All your link did is just take me back where i was for the past two hours.
Thanks anyway. I'm also busy trying to write my own implementation.
The_Real_Chubaka
8-Nov-11 18:07pm
View
I don't think they allow that. ie: It will give me more points. Especially if i 'accept' my own answer; i think they might even give me a warning. That's because it will also increase the number of pints i have.
The_Real_Chubaka
8-Nov-11 16:21pm
View
Hi. Thank you for wanting to help me.
I already got help. I just have to find out how to delete this question now.
My fileHandler is a handle to a file that contains space separated values.
The_Real_Chubaka
5-Nov-11 17:00pm
View
Thanks. It works :)
The_Real_Chubaka
23-Oct-11 13:01pm
View
Thanks but, that is the link where i got stuck.
I looked into the registry editor,All i found is this:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_CURRENT_CONFIG
But with Mehdi Gholam 's answer above, i could find on he control panel that i had .NET
The_Real_Chubaka
23-Oct-11 12:54pm
View
Hey, thanks. That was easy :)
The_Real_Chubaka
20-Oct-11 13:49pm
View
Sorry! I made a mistake in one of the lines.
It is -------> while(my $line = <file1>)
Not -------> while(my $line = )
The_Real_Chubaka
19-Oct-11 14:08pm
View
Hello Marcus,
Thanks very much for your help.
I am unfortunately still having problems.
This is what I now have:
[code]
#!/usr/bin/perl -w
require 5.10.1; ## The required version
use strict;
open FILE1, "<../file1.txt" or die "Cant not create the file!";
open FILE2, "+>file2.txt" or die "Cant not create file2.txt!";
while(my $line = <file1>)
{
my @words = split /\s+/,$line;
my $line_out;
foreach my $word (@words)
{
if ($word !~ m/[^-+.d]/)
{
$line_out .= $word . '';
}
}
print FILE2 "$line_out\n";
}
close FILE1;
close FILE2;
[\code]
This is my error message:
[code]
Use of uninitialized value $_ in split at extractColumns3.pl line 25, <> line 1.
Use of uninitialized value $_ in split at extractColumns3.pl line 25, <> line 2.
Use of uninitialized value $_ in split at extractColumns3.pl line 25, <> line 3.
Use of uninitialized value $_ in split at extractColumns3.pl line 25, <> line 4.
…
[\code]
Apologies for the basic questions. I’m just a biginner.
Thank you for your help.
Herve
The_Real_Chubaka
19-Oct-11 9:59am
View
Wow! Thanks for the many options.
Let me get to work now. I will contact you in a bit.
The_Real_Chubaka
7-Jun-11 10:44am
View
I already know how to parse JSON files using JACKSON.
To do that you need the objet model of the JSON file. I would like to be able to automatically generate the object model. In the link you gave me, the hard coded the object model of the JSON file the use as example. That object model was not generated automatically.
Thanks for your help anyway.
The_Real_Chubaka
27-May-11 9:57am
View
Yes, it is an output from part one of this application.
What part one of the app does is:
1)Takes HTML page concert them to XML
2)Parses those XML files
3)The output is what you see in my post.
Part two of the application is what i am trying to do.
The next step will be to put everything in a database
The_Real_Chubaka
27-May-11 8:45am
View
I was thinking of using a machine learning approach:
1) Use simple delimiters to parse the file
2) Use a decision-tree classifier (or any other classifier) to correct what has not correctly parsed.
But all this is still a bit vague for now
The_Real_Chubaka
27-May-11 8:45am
View
I was thinking of using a machine learning approach:
1) Use simple delimiters to parse the file
2) Use a decision-tree classifier (or any other classifier) to correct what has not correctly parsed.
But all this is still a bit vague for now
The_Real_Chubaka
30-Apr-11 9:40am
View
Thanks. It looks interesting. I'm using the first one that worked: solution 1. I'm sure yours also works just fine :)
The_Real_Chubaka
30-Apr-11 9:35am
View
Thanks,
It works like a charm :)
I even plotted it. Just beautiful!
The_Real_Chubaka
29-Apr-11 19:29pm
View
Oh. OK, Thank. I will try it tomorrow morning. Time for me to go to bed :)
The_Real_Chubaka
29-Apr-11 11:00am
View
Thank you for your help.
It seems like Math.log() only takes one argument.
But again, you are using the Math.Log() method instead, with a capital 'L'.
Do i have to write that method myself?
The_Real_Chubaka
8-Apr-11 5:15am
View
Thanks. I am actually working on a project where i have to use machine learning theory to automatically construct wrapper to extract data from thousands of web pages and put them together on common database.
This makes more sense now :)
The_Real_Chubaka
7-Apr-11 7:37am
View
Thanks. This makes more sense now.
By the way, do you by any chance know where I can get a list of very bad (badly structured) html pages. I would like to test my wrappers on them.
Thanks
The_Real_Chubaka
13-Mar-11 10:35am
View
I think you have given me the best answer.
You are right, i was confused. I will concentrate on HTML parsing.
The_Real_Chubaka
13-Mar-11 9:04am
View
Thanks for the links.
Id don't mean HTML structure. I mean HTML parse tree.
The_Real_Chubaka
11-Mar-11 8:40am
View
Thank you for your answer.
But, java is not a .Net language. Is it? I know it has a garbage collector. Is what you explained valid for java too?
The_Real_Chubaka
11-Mar-11 8:20am
View
Thank you for your answer.
Yes memory management is more than a critical issue for this job. The customer however, wants me to write the application either in java or Python.
Since you don't have the freedom that C++ offers for memory management, doesn't mean that C++ is better than java and python when it comes to memory management?
The_Real_Chubaka
11-Mar-11 8:08am
View
Thank you for your answer.
I understand that java has garbage collectors. But, don't you think that not having the freedom that C++ offers make c++ better at memory management than java?
The_Real_Chubaka
3-Mar-11 16:34pm
View
Please, do give me recommendations.
The_Real_Chubaka
3-Mar-11 15:55pm
View
I am knowledgeable in my field: data mining, machine learning and computer vision. I just don't know a lot about web development :(
The_Real_Chubaka
4-Jan-11 8:53am
View
Deleted
Reason for my vote of 4
Good introduction but, not easy enough to follow for a complete beginner.
The_Real_Chubaka
26-Dec-10 9:50am
View
There are a lot of tutorials, notes... on Google. I've just googled 'gets c++' and i got more than 6 million results. Most of the links have example codes that are very easy to understand. I wonder what Google you are using :)
The_Real_Chubaka
20-Dec-10 7:44am
View
I already found that one. It only has code for the 'Hough transform' for circles and ellipsis :(
I need code for non analytic curves. This is because i am trying to detect shapes in an image that are in another image. Those shapes can be anything.
Thanks anyway.
The_Real_Chubaka
20-Dec-10 4:59am
View
Thank you. I did what you suggested.
My code works now.
The_Real_Chubaka
20-Dec-10 4:58am
View
Thank you for you answer. The code work now.
I just forgot to link with the math library.
The_Real_Chubaka
20-Dec-10 4:57am
View
Thank you for you answer. The main mistake i made is that i forgot to link with the math library. I also did not know that there was no cos(float) function in the math library. Thank you for that information too.
Show More