|
How do you define "text content". Any text between any html tags?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
yes, but i am also excluding the text between the 'a' tags
its a 'spider' bot program that crawls the net looking for words that meet certain criteria, then it looks them up in an online dictionary and maps the word to its meaning
so im just trying to get the words from the page then i do the criteria checks
i already have a regex to extract the href's
here is that one:
<code>
string href = Regex.Match(link, "href=\\\"(.*?)\\\"").Value;
</code>
only downside to that regex is it only gets 'legal' href's like href="fsdfs" not href=fsdfs but thats ok
regs,
g00fy
|
|
|
|
|
|
thank you for that,
i did search though for about an hour, as i always do but i couldnt fine anything substantial, but my searches where for regex not for a complete solution
thank you again
g00fy
|
|
|
|
|
you're welcome
David
|
|
|
|
|
keep a lookout for a dictionary builder article on here in a while,
funcitonality will (initially) include:
* recursively follow links from a starting URI, (to a limit)
* build dictionary based on words from the browsed pages, word and several meanings
* generate word files for MS Word and the like
* build thesarus from generated dictionary
* merged dictionary database table to recursivley build bigger dictioanry with meaning comparisons
* multilingual translations, for word and meaning
* run from desktop client or login to web frontend
* print a formatted dictionary by word prefix
all this will hopefully be achieved using online dictionaries and translators that are already in place.
also, does anyone know how MS query string looks like for searching clip art from within office, i have a clip art library builder, using similar concept and i would like to access the clipart from microsoft. im not sure they do licence checking on there clipart as you can search them from thier webpage. perhaps i will start another thread on this soon
regs
g00fy
|
|
|
|
|
Hy,
I'm trying to create a class which sends files (common file formats - xls, pdf, txt, jpg) to
a specified printer and a specified paper slot.
My problems are:
- Doing it with Process.Start (verb "print" or "printto") is a good and quick method,
but i have to set the paper slot for each document. (Is there another possibility?)
- The function should be dynamic for all file types, that means, I do not want to make a class
for every file type (PDFDocument, TXTDocument etc...)
The best solution for me would be a function like this:
public void PrintFile(string FileName, string PrinterName, string PaperSlot)
{
...
}
Maybe there's a component or something else which is solving my problem. I'm already sick of searching...
I'm thankful for every answer.
Greez && Thx
DukeII
|
|
|
|
|
Hello,
When l got to update my database l get this error message "Missing the datacolumn 'DepartmentName' in the DataTable 'Employee' for the sourceColumn 'DepartmentName' ".
I have a database application. 2 tables. Department and Employee.
Department -> DepartmentCode (PK)
DepartmentName
Employee -> EmployeeID (PK)
Name
Surname
DepartmentCode (FK)
I have create this relationship in code using relationships in the form load event. see below:
<br />
private void frmEmployees_Load(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
cnn.Open();<br />
OleDbCommand cmd = cnn.CreateCommand();<br />
cmd.CommandType = CommandType.Text;<br />
cmd.CommandText = "SELECT * FROM Employee";<br />
da.SelectCommand = cmd;<br />
da.FillSchema(ds,SchemaType.Source,"Employee");<br />
da.Fill(ds,"Employee");<br />
<br />
cmd.CommandText = "SELECT * FROM Department";<br />
da.SelectCommand = cmd;<br />
da.FillSchema(ds,SchemaType.Source,"Department");<br />
da.Fill(ds,"Department");<br />
<br />
DataColumn parentColumn = ds.Tables["Department"].Columns["DepartmentCode"];<br />
DataColumn childColumn = ds.Tables["Employee"].Columns["DepartmentCode"];<br />
<br />
ds.Relations.Clear();<br />
drEmployees = new DataRelation("EmployeeDetails",parentColumn,childColumn);<br />
ds.Relations.Add(drEmployees);<br />
<br />
txtEmployeeID.Text = ds.Tables["Employee"].Rows[0]["EmployeeNumber"].ToString();<br />
txtFirstName.Text = ds.Tables["Employee"].Rows[0]["FirstName"].ToString();<br />
txtSurname.Text = ds.Tables["Employee"].Rows[0]["Surname"].ToString();<br />
txtDateOfBirth.Text = ds.Tables["Employee"].Rows[0]["DateOfBirth"].ToString();<br />
txtAddress1.Text = ds.Tables["Employee"].Rows[0]["Address1"].ToString();<br />
txtAddress2.Text = ds.Tables["Employee"].Rows[0]["Address2"].ToString();<br />
cboDepartment.Text = ds.Tables["Employee"].Rows[0]["DepartmentCode"].ToString();<br />
<br />
string departmentCode = ds.Tables["Employee"].Rows[0]["DepartmentCode"].ToString();<br />
DataRow[] departmentRow = ds.Tables["Department"].Select("DepartmentCode = '" + departmentCode + "' ");<br />
string departmentName = departmentRow[0]["DepartmentName"].ToString();<br />
<br />
<br />
this.UpdateDepartments();
} <br />
catch ( OleDbException ex )<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
catch ( Exception ex )<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
}<br />
When l click the update button, l run this code and get an error on the update.
<br />
ds.Tables["Employee"].Rows[0]["FirstName"] = txtFirstName.Text;<br />
ds.Tables["Employee"].Rows[0]["Surname"] = txtSurname.Text;<br />
ds.Tables["Employee"].Rows[0]["DepartmentCode"] = departmentCode;<br />
<br />
da.Update(ds,"Employee");
I hope someone can help me with this question. very important.
Thanks in advance,
Steve
|
|
|
|
|
I would like to know how can I design MS Money like software in C#?
|
|
|
|
|
|
Make this into a patent and you could make billions....
|
|
|
|
|
|
|
how do i populate a treeview with data from the dataset.
i dont want to populate it by writing an xml file n then populating...
just refreh the treeview everytime i enter the details in the database..how to do it?
|
|
|
|
|
Well... If I understand this correct. You have a SQL Server that can be updated with data, and a exe that sould update its treeview when something has happend in the database?
I assume your using a MS SQL server of some flaour. I would have made a insert/update trigger in the database that executes a "extended stored procedure" written in C++. The extended stored procedure could contact your application over Eg. a socket connection, pinging the exe to do a refresh against the SQL Server.
If your using MS SQL Server 2005 beta2 I'm sure you can make use of the .NET framework and do something cool with Remoting.NET from the SQL server to your app.
|
|
|
|
|
Hi can anyone tell me that how i program's My server to output as Music/Audio to Clients Like (Radio programs). in C#.NET
Sheharyar_JH
|
|
|
|
|
You can send the audio file as binaries and then save it in the client pc by the client program ...
I am not sure but try...
|
|
|
|
|
hi all,
I want to load a Windows Form1 to a panel which is in a another form2.Can I do it?.Can I set child property to form1 and do it?
thanks in advance.
|
|
|
|
|
You can not put a top level control on a control. Please use "user controls" insted. They can be added to a panel.
|
|
|
|
|
I did something like this for a tab control. I think the same thing would work for a panel control.
Dim frm As New Form1
frm.TopMost = False 'Note this line
Me.TabPage1.Controls(0).Controls.Add(frm)
frm.Dock = DockStyle.Fill
frm.Show()
Good Luck!
Have a great day!
j2associates_NO_SPAM_@yahoo.com
|
|
|
|
|
I had a simple .NET application successfully developed and deployed to a production environment.
Out client required another application, which is slightly different from the first application.
So I basically use the first application to develop the second application. I have successfully deployed the second application in my development PC, and it works absolutely fine. So I decided to deploy the application in the production.
First I deployed the application, in a PC that the login user has the administrative rights, The application was successfully deployed and it worked perfectly.
Then I try to install the application in the work stations that the login users do not have administrative rights to their PCs. When I double click my MSI, I ended up with the following error message.
“This advertised application would not be installed because it might be Unsafe. Contact your administrator to change the installation user interface option of the package to basic.”
I tried the following options
-------------------------------
- Change the Group Policies UI option to basic.
- Tried login as an administrator that PC, and tried deploying it.
- Workstations use the Active directory, and I changed the active directory UI option to basic.
I still have the same error. Please help me this pretty urgent.
|
|
|
|
|
Hello All,
We have a custom control which inherits from ComboBox, call it CC1. It also raises a custom event. We have a second custom control which inherits from CC1, call it CC2. CC2 traps the custom event raised by CC1.
If I drag 4 of the CC2 controls onto a windows form, the CC2 custom event sub gets called 4 times instead of once. The custom event CC1 is firing 1 time for each control that exists on the form. However, it is receiving the correct CC1 object as a sender argument. What am I missing here? Thanks in advance!
Have a great day!
j2associates_NO_SPAM_@yahoo.com
|
|
|
|
|
What you are describing is correct behaviour. Each instance attaches it's own sub to it's event, and since there are four instances, four events are fired.
What exactly are you trying to do?
|
|
|
|
|
Thanks Adam! Please feel free to correct me if my terminology is not accurate, but I need an "Instance" event, not a class or type event.
As an example, if I have 5 standard comboboxes on a form and I write code to trap CombBox3's click event, I only get one event firing, right?
Is this issue because my inherited Class2 has no design surface upon which Class1 resides?
What I am trying to do is set a timer which is fired when the user clears the textbox portion of a combobox. If the timer expires and the user hasn't typed anything into the textbox portion, it is reset. I raise my custom event just before resetting the text in case I want to supply some alternate text to use.
If combobox3 was cleared, combobox3 is the object passed into the event every time it fires (I pass it as a Sender object into the Custom event). If I cannot restrict the event to only the object that actually raised it, is there any way to account for it so I don't run the same code over and over for no reason?
I really appreciate your response, this project is pushing me into some areas in which I have not worked before. Thanks!
Have a great day!
j2associates_NO_SPAM_@yahoo.com
|
|
|
|
|
Hi,
As an example, if I have 5 standard comboboxes on a form and I write code to trap CombBox3's click event, I only get one event firing, right?
Correct. You clicked ComboBox3, so ComboBox3's Click event fired - you only wired one method up to the ComboBox3.Click event.
If combobox3 was cleared, combobox3 is the object passed into the event every time it fires (I pass it as a Sender object into the Custom event). If I cannot restrict the event to only the object that actually raised it, is there any way to account for it so I don't run the same code over and over for no reason?
There's one thing that's confusing me: what do you mean by "restrict the event to only the object that raised it"? When you raise the event in your custom subclass, you pass in the current instance that raised the event ("this") as the Sender argument to your event handler. Or do you want to ensure that only one method can attach itself to an event?
|
|
|
|