|
i have a small problem in regex. I have string that contains the following text:
The oStarthereptional para
meter "dis
tributions" is a list of dis
tributiongroups, enclosed in
angle brackets. If specified,
the distribution
portion of a new newsgroup (e.g,
’net’ in ’net.wombat’) will be
examined for a match with the
distributiendon categorie
s listed, and
only those new newsgroups wh
ich
Now, suppose i wanted to extract all the text between Starthere and end - how would I do that? Many lines are terminated byt a carriage return/ line feed pair etc.
|
|
|
|
|
Use a pattern that contains a set that matches any character, like "Starthere[\w\W]*end".
---
b { font-weight: normal; }
|
|
|
|
|
i am developing an app that needs to access a web site ( the site is an online manager for my fax machine) i need the app to look at the page that contains the stored faxes, i then need it to be able to store these fax images (as multi-page TIF files), the problem i am having intially, is to be able to 'turn' the page of images, as there are 9 pages of them, the button to move to teh next page on teh site is controlled by a javascript function, and i dont know how to use POST to be able to call the javascript function, or if its even possible, i am very new to c# and web components as well
Any help that i can get would be really appreciated
thaynann
|
|
|
|
|
HttpWebRequest only downloads content, it doesn't do any interpretation of the content. Automating IE is probably the least complicated solution for what you want to do. This is an example of automating the webbrowser control and there are several more on the site: http://www.codeproject.com/cs/miscctrl/WebBrowserEx.asp[^]
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Thanx for the link, ill have a look through it to see if it will do wat i need it to, hopefully it will, thanx again
|
|
|
|
|
Hi,
How can i display Raster(Fixed pitch)font in c#
or how can i convert them to other type, say Open Type font, in order to display it
Thanx.
|
|
|
|
|
Please help me out with this problem:
I have a string where some data is stored.Ihave to deserialize this string to data value object.How to do it.
|
|
|
|
|
You could try converting the string to bytes using one of the System.Text.XXXEncoding classes and then wrap it in a MemoryStream . You could then use the MemoryStream as a parameter to the appropriate formatter (Binary/XML) and deserialize the object.
Sample code (doesn't compile)
byte []b = System.Text.ASCIIEncoding.GetBytes(text);
using (MemoryStream ms = new MemoryStream(b))
{
YourClass obj = new BinaryFormatter(typeof(YourClass)).Deserialize(ms);
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
R/sir
I am student of BCS I want to make my final project on Antivirus. I also want to give the user the facility of compression, zipping, encryption, spy agent, recover Files, security purpose (just tell me how can I get the number of hard disk through Software) and streaming (how many hrs, days) user can use this one.Please help me step by step approach because this is my first ever project and If it is possible please provide me code which will guide up to the end. I have just One month left so it is kindly requested to help me as soon as you have this mail.
Waiting your kind reply
Muhammad junaid.
|
|
|
|
|
muhammad junaid wrote:
Please help me step by step approach because this is my first ever project and If it is possible please provide me code which will guide up to the end. I have just One month left so it is kindly requested to help me as soon as you have this mail.
You're kidding right ?
Let me paraphrase
'I am a student who has to hand in a project. This is the first thing I've ever written, and I'd like to singlehandedly write something in a month that a team of qualified, experienced professionals would take much longer for. I recognise this is a challenge, so if you could provide me with the source code, it would really help.'
I think you have two options here
1. hack into Nortons servers and steal their code
2. use magic
I suggest rethinking your project, with a month to write it, you should choose something where you have some idea how to go about it when you start. Otherwise, it will be two weeks in before you realise you're incapable of doing it, and then you'll have no time to do something else.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I started laughing when reading this, I am a student, this is my final project... this is my first project ever!
|
|
|
|
|
Yeah, it's REALLY sad, but there's a lot of it going around.
Although, these are the people hoping to compete with me for jobs, so that I can live with.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No, I think that what he was doing was looking for a rent-a-coder site. That is what I thought this was at first.
|
|
|
|
|
Yeah, he seems typical of what you get on rentacoder. I worked there briefly, the people who run it are lying scum, and the whole system is designed to rip off coders.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hehehe, writing antivirus software in one month. He would be the first to finish that. But I do have some ideas which might be doable in one month:
- Write a system that monitors temperature and air moisture and is accessable over the internet.
I did this with 7 other developers in one month. It involves both hardware design and software design. It is doable, but you got to have skilled people for this.
- Write a small game
This must be doable in one month. I did it as my first project in the uni.
With no team to work with.
- Write a simple FTP client
Done this in only one week. So you should be able to make it even better than my client was (Be adviced, I used java and supported ipv6, so there's some study involved here on that subject)
There are a dozen more projects you could make in one month. But antivirus is way above your level to do in one month.
|
|
|
|
|
Ok, now that I was convinced that datatables are the way to go, someone explain how they work. What are the three different parts, and why use them. If the explainations don't help, then I will post my code, and see what is wrong. Thanks for all help.
|
|
|
|
|
A DataSet is a collection of DataTables. A DataGrid has a datasource property, which can accept an array, or a DataTable ( amongst other things ). Once you set the datasource property, you call the DataBind() method on the grid, which will cause the control to attempt to render itself using the data source. Your aspx should define the grid such that it contains the columns you want it to, otherwise, I believe you automatically get a column per column in the data source.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
So am I only required to use the Data Table? Right now I am only using a Data Table, and it won't acctually place it on the page, how do I get it to do so?
|
|
|
|
|
ExpertComing wrote:
and it won't acctually place it on the page
How do you mean 'it' ? You need to create a datagrid, set it's datasource to be the datatable, and call DataBind() on the grid. Then you can format the grid and add your controls, etc, in the aspx.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Where is my problem Christian?
public void CreateTable (Object sender, EventArgs e)<br />
{<br />
string[] skills = new string[3];<br />
skills[0] = "attack";<br />
skills[1] = "strength";<br />
skills[2] = "defence";<br />
<br />
<br />
DataTable dtshowskills = new DataTable("USkills");<br />
<br />
DataColumn userSkill = new DataColumn("Skill");<br />
showskills.Columns.Add("userSkill");<br />
DataColumn userLevel = new DataColumn("Level");<br />
showskills.Columns.Add("userLevel");<br />
<br />
foreach (string skill in skills)<br />
{<br />
DataRow drskill = dtshowskills.NewRow();<br />
drskill["userSkill"] = skill;<br />
drskill["userLevel"] = 0;<br />
showskills.Rows.Add(drskill);<br />
}<br />
<br />
DataSet dsshowskills = new DataSet();<br />
dsshowskills.Tables.Add(showskills);<br />
dgSkills.DataBind(dsshowskills, "USkills");<br />
}<br />
<br />
|
|
|
|
|
First of all,
ExpertComing wrote:
DataSet dsshowskills = new DataSet();
dsshowskills.Tables.Add(showskills);
You don't need this. Why do you want to create a dataset ?
dgSkills.DataSource = showskills;
dgSkills.DataBind();
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Now I get this error:
System.NullReferenceException: Object reference not set to an instance of an object.
Does that mean I am creating a cell, and not using it?
I found a couple silly mistakes when I was reviewing my code. Fixed those, still no luck. I hate it when I don't understand something, I haven't done any ready on DataTables, so I feel helpless.
Thanks for all of your help man.
|
|
|
|
|
ExpertComing wrote:
System.NullReferenceException: Object reference not set to an instance of an object
You have to create the datagrid in the aspx, then in the codebehind, you create the variable, make it protected and make sure the name is the same. If you just put a datagrid in your codebehind, it will indeed be null.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
HI All,
I am trying to call a function from a dll. One of its parameters is a structure that I will need later to call another function from another dll but the problem is that I don't know its detailed structure to be able to marshall it in C#.
I am not interested in accessing the struc ture's attributes,it's a temporary step for me before calling the other function. However,it must be accuartely done in order to pass a correct argument to the other function.
Can I just marshal the unknow datatypes within the structure as it they were "void"?
Any ideas or suggestions? It's really has been puzzling me for a time now and I can't reach a solution
Thanks and Best Regards,
E.A.
|
|
|
|
|
IF the dll is a Microsoft one, then pinvoke.net[^] might help. Either way, it would give you examples showing how this is done.
Christian Graus - Microsoft MVP - C++
|
|
|
|