|
Please don't double post.
---
b { font-weight: normal; }
|
|
|
|
|
ashishdhar wrote: work on an exiting and challenging project
The last time I was looking for a job I discovered that this was a euphamism for "we're going to give you lots of work in areas your not qualified for and give you no training and we want everything done by next Tuesday even although we realise that it is a 3 month project"
The jobs that are genuinely exiting don't need people to state they are exiting because it is obvious from the description. Jobs that are challenging are ones that allow the individual to grow as a person, and again that is obvious from the description.
However, since your description is "exciting and challenging" there isn't much to work with and I suspect that, quite probably, they'll turn out to be dull and tiresome.
So, prove me wrong - tell us what the job really is!
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I'm a C# developer, with a C++ background. I'm a C++ MVP, as it happens. I love to work on projects that are 'exciting and challenging', so perhaps if you'd like to tell us what it is, you'll get resumes from people who are more in your app domain. Of course, advertising through a question board leaves me worried about your budget, but I always ask for 50% up front, as would anyone worth hiring, IMO. It's a simple concept of shared risk.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ashishdhar wrote: to work on an exiting and challenging project
If the project is exiting, why are you hiring?
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
No offense, but:
Exiting as in "interesting", NOT as in "exit".
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
I know. I deliberately ignored the spelling error (should be "exciting").
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
i ready to work with u
Palestine
|
|
|
|
|
The project is EXITing the "I have a dream" phase and entering a "lets get real and get this thing done" phase.
|
|
|
|
|
Hi, I have made a small program that opens a data file in XML format, then searches through it for certain information, the problem I have is that if the first line of the XML text looks like;
<data xsi:schemaLocation="http://www.website.com" version="0.3" xml:lang="en">
it doesnt work, but if I change it so the first line is simply;
<data>
It does work.
The problem is that the data comes in the first way, which doesnt work for me, can anyone explain why it might be that this happens? I assume it is a simple, seeing as how I can fix it by simply removing a small amount of text.
(p.s. I am fairly new to XML so forgive me if this is really dumb!)
thanks in advance!
-- modified at 10:39 Thursday 5th January, 2006
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
Ok good point!, this is an example;
private void button4_Click(object sender, EventArgs e)
{
StreamReader sr = new StreamReader(@"data.xml");
XmlTextReader xr = new XmlTextReader(sr);
XmlDocument docData = new XmlDocument();
docData.Load(xr);
XmlNodeList wikinodes = wiki.SelectNodes("data/page");
lblNodes.Text = dataNodes.Count.ToString();
}
When it works, lblNodes will show there are 1699 nodes, when it doesnt work it just says there are 0 nodes.
The XML file looks roughly like this;
<data xsi:schemaLocation="http://www.website.com" version="0.3" xml:lang="en">
<page>informationhere</page>
<page>informationhere</page>
<page>informationhere</page>
</data>
but will only work if I change it to look like this;
<data>
<page>informationhere</page>
<page>informationhere</page>
<page>informationhere</page>
</data>
I hope that is enough info, Thank you!
|
|
|
|
|
Try with the "/data/page" xpath instead.
Otherwise, it might be the schema that removed the nodes. Does the schema that the data references to exist?
Check the contents of the InnerXml property once the document is loaded, to see if the page nodes gets loaded at all.
---
b { font-weight: normal; }
|
|
|
|
|
hhmmm, that didn't work, the page nodes do get loaded though.
The data that I am trying to process comes from the Wikipedia database dump (you know, the open source encyclopedia, see http://en.wikipedia.org/wiki/Main_Page).
I am practising on a small foreign language XML dump which can be downloaded from http://download.wikimedia.org/wikipedia/am/20051020_pages_current.xml.bz2 (the english wikipedia dump is about 3gbs, so you dont exactly want to process that every time you test the program!).
I extracted the exact first line of the XML, which is;
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.3/ http://www.mediawiki.org/xml/export-0.3.xsd" version="0.3" xml:lang="am">
This includes links to various websites that explain the schema.
I find it strange that it works by simply removing all the attribute material from this first line. I tried programmatically removing this using the Attributes.RemoveAll() method, but as I found out it should really be called RemoveAllButOne(), so that doesnt work either.
Thanks for trying to help, really appreciated, don't worry if don't have the time to go any further though.
Martin
|
|
|
|
|
I see. When you show the complete tag, it's obvious.
You need to use an XmlNamespaceManager object along with the xml document to be able to reach the nodes that belong to a namespace.
---
b { font-weight: normal; }
|
|
|
|
|
|
I am having trouble using the code from the tutorial posted here. The following is all of my code. I have commented what the original download version had in it...
using System;
using System.IO;
using org.pdfbox.pdmodel;
using org.pdfbox.util;
namespace Pdf2Text
{
class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
DateTime start = DateTime.Now;
if (args.Length < 2)
{
//The following line is the way it is written in the downloaded version
//Console.WriteLine("Usage: PDF2TEXT ");
//I wrote this
Console.WriteLine("Usage: PDF2TEXT MyPDF.pdf MYTEXT.txt");
//return;
}
using (StreamWriter sw = new StreamWriter(args[1]))
{
sw.WriteLine(parseUsingPDFBox(args[0]));
}
Console.WriteLine("Done. Took " + (DateTime.Now - start));
Console.ReadLine();
}
private static string parseUsingPDFBox(string input)
{
PDDocument doc = PDDocument.load(input);
PDFTextStripper stripper = new PDFTextStripper();
return stripper.getText(doc);
}
}
}
I get the following error message when I try to run it:
"An unhandled exception of type 'System.IndexOutOfRangeException' occurred in Pdf2Text.exe
Additional information: Index was outside the bounds of the array."
Can someone help!
Curt
|
|
|
|
|
Probably tou get IndexOutOfRangeException when you use args[1] and args[1] is not avaliable. I think that you shoul uncoment this return:
<br />
if (args.Length < 2) {<br />
Console.WriteLine("Usage: PDF2TEXT MyPDF.pdf MYTEXT.txt");<br />
}<br />
Hope this hepls.
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
Thanks for responding! I did that and the console flashes up then disappears and nothing happens beyond that. I'm at loss! If you have anymore suggestion please let me know! Thanks!
Curt
|
|
|
|
|
I think this happens because you supply an insufficient number of parameters. Try this :
if (args.Length < 2) {<br />
Console.WriteLine("Usage: PDF2TEXT MyPDF.pdf MYTEXT.txt");<br />
Console.ReadLine();<br />
<br />
return;<br />
}
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
I am using the System.Threading.Timer timer.
Now if I have a interval set quite low say 10ms it is possible for my timer event handler to be queued as they cannot be prcessed because the UI thread is busy or another application is running. When the UI thread becomes free it then processes all the queued events at the same time.
Is it possible to determine programmatically the number of timer event handlers that are being queued. I want to be able to determine when there is a build up of queued event handlers.
Some code to demonstrate this would be useful.
Also, is it possible to limit the number of timer event handlers that are queued?
Thanks,
Liam
|
|
|
|
|
You could start a separate thread to do the actual work of the timer, that way the thread that is waiting for the event is never busy. This if course only works if the code is thread safe, as you could have several threads running at the same time.
You can use a counter to see how many threads are running. Increase the counter when a task starts and decrease it when it finishes.
If the code can't be made fully thread safe, you could queue the events yourself to be able to keep track of them. Still using a separate thread to do the work (to keep the main thread response to the events), but don't start a new thread until the previous finishes.
---
b { font-weight: normal; }
|
|
|
|
|
I found the question a little odd considering the Timer he's using doesn't use events. It uses a callback delegate executed on a seperate thread out of the thread pool.
So, my question would be, does each tick get its own thread? If so, then in theory, a 10ms time interval could exhaust the thread pool if the callback code takes more than 10ms to execute. What happens to the Timer then? Does the callback get queued up waiting for the thread pool? Does this queue have an upper limit...the size of the stack, maybe?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
OK my terminology may be wrong. I use the following so I use the the wording "event handler"
tmrTimersTimer.Elapsed += new ElapsedEventHandler(tmrTimersTimerElapsedHandler);
No each tick does not get it's own thread. The callback code takes about 1-2 ms so should complete in plenty of time.
Now if another thread has the processor when my timer elapses it will queue. It will continue to queue timer callbacks. When my code gets the CPU back it will empty the queue and execute all the callbacks.
What I was hoping to achieve was to interrogate the queue that holds the timer callbacks.
|
|
|
|
|
OK. Now you've got me confused. Which timer are you using???
System.Threading.Timer - From your original post. Uses a callback delegate, not an event.
System.Timers.Timer - Uses an event called Elapsed .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave, sorry for the mixed up information I think I am confusing myself too.
What I have found is both timers:-
System.Threading.Timer
System.Timers.Timer
Will queue and "handler code" if it cannot be processed immediately. the "handler code" will then be processed when CPU time is avaliable.
Whereas
System.Windows.Forms.Timer
Does not queue and the "handler code" is essentially lost.
So I my question applies to both
System.Threading.Timer
System.Timers.Timer
Can I find out if there is a queue of "handlers" (either a callback delegate or an event handler) waiting to be processed?
|
|
|
|