The question can be described as:
Input: A positive integer K and a big text. The text can actually be viewed as word sequence. So we don't have to worry about how to break down it into word sequence.
Output: The most frequent K words in the text.
My thinking is like this.
1) use a Hash table to record all words' frequency while trave...
There are some good examples on how to calculate word frequencies in C#, but none of them are comprehensive and I really need one in VB.NET.
My current approach is limited to one word per frequency count. What is the best way to change this so that I can get a completely accurate word frequency listing?
wordFreq = New Hashtable()
Dim ...
Hi Folks,
I've got the following url route and i'm wanting to make sure that a segment of the route will only accept numbers. as such, i can provide some regex which checks the word.
/page/{currentPage}
so.. can someone give me a regex which matches when the word is a number (any int) greater than 0 (ie. 1 <-> int.max).
cheers!
...
What is the best way to find the total number of words in a text file in Java? I'm thinking Perl is the best on finding things such as this. If this is true then calling a Perl function from within Java would be the best? What would you have done in condition such as this? Any better ideas?
...
I am trying to use the Office COM components in order to create Word and Excel documents. Unfortunately I can not achieve this because I am getting an error.
Cannot find IDispatch for
'{00020906-0000-0000-C000-000000000046}'
in module
'{00020905-0000-0000-C000-000000000046}',
v8.3
I tried reinstalling Office, my applicatio...
The problem
I have a word template which uses VBA's Declare statement to link to a dll, whose path can be determined within the VBA macro
I want to delploy this to the users %APPDATA%\Microsoft\Word\STARTUP directory
I DON'T want to permanently change the user's PATH environment variable (temporarily would be OK, but this doesn't seem ...
Hello all,
Is there any way using diff to show differences only in lines that include an specific word?.
Thank you.
...
I am doing a CSV Import tool for the project I'm working on.
The client needs to be able to enter the data in excel, export them as CSV and upload them to the database.
For example I have this CSV record:
1, John Doe, ACME Comapny (the typo is on purpose)
Of course, the companies are kept in a separate table and linked with...
We have an application in which admin members can add content for their subordinates to view. Their requirement is that it should be able to display word, excel, powerpoint and pdf documents in a non-editable manner.
The one option that I found for doing this is to have the content loaded into a web browser component. The downside to ...
I want to find a string in a word document and delete everything after it.
What is the best way to do this without using the selection object?
Thanks
...
I provided some of my programs with a feedback function. Unfortunately I forgot to include some sort of spam-protection - so users could send anything they wanted to my server - where every feedback is stored in a huge db.
In the beginning I periodically checked those feedbacks - I filtered out what was usable and deleted garbage. Th...
Hello,
I'm looking for a way to use Word mail merge for sending merged documents to a webservice I'm using. This webservice accepts word documents. I would like to start a regular mail merge process, design my document, add a recipient list and merge fields. Then I would like to click a button which will cause Word to generate each docu...
how to Parse a PDF file and write the content in word file using Java?
...
I've created my own ribbon toolbar tab with a few buttons. I can add text and similar actions to the document I'm working on. Now I want to add a button that will save the document I'm working on without using the Word save button because I want to set some of the parameters.
Every example I found showed how to save a document that was...
Using Visual Studio 2008 Pro, is it possible to make changes to the existing Word ribbon items?
For example, can I add an additional mail merge option to the "Finish" group in the "Mailing" tab?
...
Using VSTO, I've created a custom tab in the Ribbon designer and added some groups and button controls there. When user clicks one of the buttons, I'd like to connect to a SharePoint site and open a word document from it in Word (an instance is already open). I'm able to connect to the SharePoint site already and have the URLs to the d...
I've created a Word add-in component, and a visual studio setup project to install the component.
On a clean machine with Office 2003 installed, it does not seem to be possible to get the add-in component to load in Word.
Googling the issue suggests that this is because the assembly is not trusted. I gave the assembly full trust using ...
I have a word document which is a blank form. I need to be able to fill it in programatically using .NET, and print out the result.
The form I have is a word document but I could obviously convert this to pdf if need be.
Can anyone please help?
Thanks
Ronnie
...
I want to set up a template document along the lines of this:
================
Doc content
----------------
Merge Field1
Merge Field2
Merge Field3
----------------
More doc content
================
I then want to be able to open the document, load a DataTable from the database in C# and merge the fields in the template section in ...
I am using Word Automation to manipulate some documents (yuk!). I am using this command to get a bookmark within a document.
Object oBookmark = "MyBookmarkName";
Range oRngoBookmark = wordDocument.Bookmarks.get_Item(ref oBookmark).Range;
What I want to find out is if that bookmark is in a table in the document or not. Is there an easy...