|
Try this
string[] arrayLevels = new string[2];
Hope that works for you.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Ok, thanks! I don't know what I was thinking...
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
It looks like you are trying to access an array but you are using a type called System.Array. When you declare an array like so
byte[] arrayOfBytes = new byte[1000];
arrayOfBytes will implicitly inherit the type System.Array. arrayOfBytes is not of type System.Array, it is of type byte[]. It seems like you are attempting to access a type of type System.Array but for you to access it with indexing it would have to be an array of System.Array.
System.Array[] arrays = new System.Array[10000];
If you are going to use the System.Array type use the method GetValue
myArray.GetValue(index);
I recommend you use the conventional array syntax as it is much faster and good coding.
string myArray = new sring[100];
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
Hi all,
I am working for my plan. And now, I have a problem, I need to get Stock price from the Web. One of addresses:
http://priceonline.hsc.com.vn/priceonline.vi.hsc
http://www.bvsc.com.vn/StockPrice.aspx
I used HttpWebRequest, HttpWebResponse and StreamReader to get above addresses in HTML format. Now I want to get Stock qoutes.
Can I read data from that HTML?
How to get Stock qoutes?
Pleas help me!
Thanks!
|
|
|
|
|
I would start here
http://www.codeproject.com/dotnet/apmilhtml.asp
|
|
|
|
|
Hello all,
I’m working on a Mouse Gesture Recognition application (I’m planning to do it with C#), the application is supposed to sit in the background and process gestures only if the right mouse button is held.
There are many articles/tutorials/codes about the subject… however I want to do it with Neural Networks, that way I can recognize circles and other complicated gestures.
I found only two examples about mouse gestures with NNs, one in C++ and the other in C#... and both of them don’t include enough documentation or explanation for me to understand and implement.
Examples I found are:
http://www.codeproject.com/csharp/cmgblade.asp
http://www.codeproject.com/cpp/gestureapp.asp
I was hoping to find more explanation on the matter… and perhaps simpler code!
Thanks in advance,
tmp0
PS: I've posted the same message in the "General Discussion" section, but didn't get a clear answer. I'm hoping to get another answer here.
|
|
|
|
|
I have a friend of mine which has written a fullscreen app which act as a menu for its kids.
Now he would like to be able to run it fullscreen and take over the WINDOWS, WINDOWS+E, WINDOWS+M, ALT-TAB keys when the session start. Or something like that.
What would be the best way to achieve that?
|
|
|
|
|
Hello
You'd have to make a global keyboard hook, to handle these keystroke before windows.
Regards
|
|
|
|
|
great idea!
I was wondering if there was something generic. i.e. instead of blocking this particular keys combination a way to block all those "kind" of combination...
|
|
|
|
|
i read your question on other boards also i think the answer is
1): block the start menu and desktop icons using security policy
2): make your fullscreen application (formborder style = none , windows state = maximize) catch all keys pressed and nullify the effect of windows key , ctrl+esc and other combinations of start menu genration and minimize all (window+m) , show desktop(window + d) and (ctrl + alt + dele - any app can be closed from there any new ones can be started) etc . for this you can see
this. remember this wont wotk when other application is opened and have focus cause you will have no control over the keys pressed event of them you should make a more able program (i dont know how to do it but it is being done - remember all spy applications catches key stroke from any applications.
3): your application will contains shortcut to the other applications (and you can run them from here in admin mode till the password you entered is same and you can also built an interface to update that)
4): and using policies you can also block execution / installation of programs
hope this will help
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
thanks!
|
|
|
|
|
I have been told a few time about policy and the policy manager, but I can't find it!
I have XP Home edition.
I looked into the Control Panel and into the Accessories...
What is it (this 'Olicy manager')?
Where could I find it?
|
|
|
|
|
Hello,
I would like to learn that is there any way to execute an assembly in an application domain, asynchron. I attached the sample source code that I want to execute;
AppDomainSetup setup = new AppDomainSetup();<br />
setup.ApplicationBase = @"C:\Lab\appdomainchildcs\appdomainchildcs\bin\Debug";<br />
AppDomain domain = AppDomain.CreateDomain("RemoteDomain", null, setup);<br />
domain.ExecuteAssembly("appdomainchildcs.exe");<br />
AppDomain.Unload(domain);
In the above code, I would like to execute "appdomainchildcs.exe", asynchronus.
I would be appreciated, if anybody help me about the trouble. Thank you...
Orkun GEDiK
SAP R/3 BASIS and Development Consultant
ASTRON
|
|
|
|
|
Hello
Make a second thread and call your code from that thread.
Regards
|
|
|
|
|
Thank you for your response, Nader. Is there any other way to do it, except calling an assembly in a thread?
Regards,
Orkun GEDiK
SAP R/3 BASIS and Development Consultant
ASTRON
|
|
|
|
|
Well, this is what asynchronicity is all about. If you were looking for something like callback functions, I don't know any BeginLoad() methods. Yet this should work the same.
Regards
|
|
|
|
|
Thank you for your response.
Orkun GEDiK
SAP R/3 BASIS and Development Consultant
ASTRON
|
|
|
|
|
Hello,
I'm using MS Access as database back-end for my C# application and I have an OLE Object field in my MS Access Database and I want to extract the content (say JPG image) to the users' desktop.
I'm using OleDB and C#.NET 2.0.
How can I do that?
Thanks.
|
|
|
|
|
Hello
O'm not sure if this would work or not, but read it as binary in a stream, and build an image object from that stream.
Regards
|
|
|
|
|
Thanks Nader it almost worked but I'm no getting a text file extracted well... the first line is:
$ ےےےےPackage Package Package ²{ Sa.txt C:\DOCUME~1\Owner.Joe\Desktop\SA.txt $ C:\DOCUME~1\Owner.Joe\Desktop\SA.txt S{ ...
Then the content of my file begins!
The same for the last line:
METAFILEPICT " »ْےےî "E s 2 ' ûُے گ Tahoma è
vـٍ ¸¤َwء¤َw 0ُw‘"f
- ےےے . ! Sa.txt! û ¼ ²"System ‘"f
& ٹ ےےےےhَ - L
What's worng?
Thanks.
|
|
|
|
|
Textfile?? You didn't mention text? I thought you said that you are reading an image from the database, so you should read it as binary stream then on the fly call Image.FromStream() method. Why did you create a text file for the image?
What you got is binary, and it won't be displayed properly by any text editor -eg. notepad-. If I'm getting you wrong or missing something, please clarify.
Regards
|
|
|
|
|
I thought it's the same thing so I said image just to make it simple
Ok so now I have an access db and I'm inserting an html document into an OLE field by right clicking and choosing insert object...
How can I - by code - extract the exact html file and save it to the user desktop?
|
|
|
|
|
Well, please don't be offended, I was just wondering. To some extent yes, it could be almost the same.
For the Html document you are storing -though I'd prefer to store it in the Db as text. This would be much easier-, the Html text itself won't be changed, but you wil find some binary OLE Metadata at the begining of the doument. You just got to ignore it in your Stream, and begin reading from the first Html tag -eg. <html>, or <body>, etc..-. That should do it, but then you have to treat it like text and not binary like storing it in a string and saving it to html file. Also the images of the html page won't be saved in the Db, and when you extract the file and save it to "something.html" you will only get the html and no pictures -except of course if they are online pictures, and you were connected-.
I hope I was close enough this time.
-- modified at 22:29 Sunday 15th October, 2006
Oh! I almost forgot. About the metadata at the end, just ignore whatever is after the </html> tag.
BTW: How do you extract the Oleobject from you Db in C# code?
Regards
|
|
|
|
|
I'm trying to parse html that resides locally by using the HtmlDocument class
and unfortunately you can only get an instance of an HtmlDocument through the
WebBrowser control.
Some of the html files I want to parse are quite large so I want to get the
HtmlDocument in a separate thread. But for some reason, whenever I move the
code to navigate the WebBrowser to a separate thread the DocumentCompleted
event is never fired. When I step through I can see that some of it is
loading but not all. Here is some code:
-----------
...<br />
Thread worker = new Thread(new ParameterizedThreadStart(LoadHtml));<br />
worker.SetApartmentState(ApartmentState.STA);<br />
worker.Start(files);<br />
...<br />
<br />
private void LoadHtml(object obj)<br />
{<br />
foreach(FileInfo fileinfo in (FileInfo[])obj)<br />
{<br />
HtmlParser parser = new HtmlParser(fileinfo);<br />
m_listHtmlParsers.Add(parser);<br />
}<br />
}<br />
<br />
public class HtmlParser<br />
{<br />
public HtmlParser(FileInfo fileinfo)<br />
{<br />
m_wbHtmlParser.DocumentCompleted +=<br />
new WebBrowserDocumentCompletedEventHandler(ParseHtml);<br />
m_wbHtmlParser.Navigate(m_fiChapterFile.FullName);<br />
}<br />
<br />
private void ParseHtml(object sender, <br />
ebBrowserDocumentCompletedEventArgs e)<br />
{<br />
}<br />
}<br />
------------------
If I take this out of the thread, the DocuementCompleted event get's fired
and everything works. I think what is happening is that the thread is being
exited before the document is completely loaded. But I'm not sure how to
make sure all the HtmlParsers have fired the DocumentCompleted event before
the thread ends.
Any help would be greatly appreciated.
|
|
|
|
|
If you need to parse HTML docs on background threads, you'll need to create the HTML control on that thread, then navigate using that same thread. Chances are navigation is getting screwed up because you created the control on one thread, then used it from another thread, which is a no-no.
|
|
|
|