|
Amen! I always use string literals when I have a backslash. It seems stupid to do a double backslash.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
David Stone wrote:
I always use string literals when I have a backslash.
I try to as well, but there are times when you want a tab, line feed, new line, or quote embedded in the string. The only clean way to put those in a string is to use the \t, \r, \n, and \" escape sequences (not sure of the real name ).
James
Sig code stolen from David Wulff
|
|
|
|
|
Well yeah, but those are string format modifiers...or whatever they're called. I'm cool with those. But when it's a path, I use @.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
__Stephane Rodriguez__ wrote:
Please teach people to use @"c:\myNewDir". Let's get rid of that nasty thing!
"c:/myNewDir"
"There are no stupid question's, just stupid people."
|
|
|
|
|
leppie, you're using UNIX?
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Nope, just Windows I guess MS realized how stupid \'s are for directories and decided to lets us use / as well. Try it!
@"c:\work" == "c:\\work" == "c:/work"
"There are no stupid question's, just stupid people."
|
|
|
|
|
i have created a service that listen on some port.
i want.when i send some command to that perticuler port.
then it will execute a setup file using
Process.start() command.
but when i send a command.It will execute Process.star()
line but process window did not appear.
what is the problem ?
is it possible that a process executed into a service?
the answer i got.
Right click on the service property. Show the LogOn Tab, and check the "allow service to interact with desktop".
thanks for reply.
but sir i right click the service(project) property.but i could not find LogOn Tab so that i could not check "allow service to interact with desktop".
how to do that?
any body could tell?
r00d0034@yahoo.com
|
|
|
|
|
Hey Folks,
I have a few old (very handy) programs that I have written using perl and python that I want to port to C# just for the sake of doing it.
In one of the instances, I need to enumorate across a directory and get the the total size of the files in the directory. Using a simple "foreach" loop like:
<br />
long total = 0;<br />
...<br />
...<br />
foreach(FileInfo f in directory.GetFiles())<br />
{<br />
total += f.Lenght;<br />
}<br />
...<br />
...<br />
And I have to say that this is SLOW. When recursing medium to large directories it can take as much as 10x the time my perl and python
programs take.
My guess is that it is due to fact that the call to the Length property is not so light-weight as one might think. So, the call inside the loop is killing me.
Has anybody else ran into this hiccup?
And, does anybody have any suggestions about how to design around this?
Any help would be appreciated
Many Thanks
|
|
|
|
|
I'm sending an xml response to a VB app from a C# HttpHandler. I'm setting Content-Type: to text/xml however the VB app is using objHTTPRequest.responseXML.xml to pick up the xml.
HttpHandler snip
<br />
context.Response.ContentType = "text/XML";<br />
XmlWriter xw = new XmlTextWriter(context.Response.OutputStream, System.Text.Encoding.UTF8);<br />
xw.WriteRaw(xmlString);<br />
VB app snip
<br />
strResponseXML = objHTTPRequest.responseXML.xml 'This gets nothing!<br />
strResponseText = objHTTPRequest.responseText 'This receives the response<br />
Anyone know why the objHTTPRequest.responseXML.xml would not pick up the xml rather the objHTTPRequest.responseText picks it up??? What can I do to fix this???
Thanks,
ed
Every time I walk into a singles bar I can hear Mom's wise words: "Don't pick that up, you don't know where it's been!"
|
|
|
|
|
VB forum I guess. There is no responseXML stuff in .NET
By the way, make sure to send "text/xml" instead of "text/XML". You never know how touchy can the tools be.
How low can you go ? (enculage MS)
|
|
|
|
|
HI!
I made a little Programmer boards link list:
http://www.c-sharpcorner.com/forum/default.asp
http://www.vbforums.com/
http://forums.devshed.com/index.php?s=
http://www.codeproject.com/script/comments/forums.asp?forumid=1649
http://www.gotdotnet.com/community/messageboard/Home.aspx?
http://www.cprogramming.com/cboard/
http://www.codeguru.com/forum/index.php?s=
http://www.coderforums.net/
http://pirate.planetarion.com/forum/
http://www.tek-tips.com/index.cfm
http://www.mrunix.de/forums/
http://linuxnewbie.org/forum/
http://www.techimo.com/forum/
http://www.sitepointforums.com
http://visualbasicforum.com/
http://www.developerfusion.com/forums/
Please add you favorite board to the list
THX!!!
gicio
|
|
|
|
|
|
;P;P
|
|
|
|
|
Hi!
I check the MSDN Library but I can't find any infos about: how to connect to and FTP...
I need also infos how get folders names from the ftp....
Have any one experience which class can I use to connect to an FTP??
THX!!!
|
|
|
|
|
First of all, you could do it the hard way by yourself: using the System.Net.Sockets namespace and writing all the packet handling by yourself.
Once you get sick of that...you can look around for FTP components in C#. But really, you should look no further than home:
http://www.codeproject.com/csharp/FTP.asp[^]
http://www.codeproject.com/csharp/FTPDriver1.asp[^]
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Just for reference, FTP is an application level protocol. It follows a fairly well-defined set of rules, and is text-based. It runs above TCP/IP services and sockets, and there are a thousand and more ways to implement it. If you are interested in writing your own FTP control, there are some resources you could check out. Hope they help (anyone) interested in writing an FTP control, server, or client.
First, a GREAT resource: http://www.faqs.org/rfcs/rfc-activeT.html
Second, some FTP RFC's:
File Transfer Protocol (the standard)
-> http://www.faqs.org/rfcs/rfc959.html
The File Transfer Protocol (older revisions, still useful)
-> http://www.faqs.org/rfcs/rfc172.html
-> http://www.faqs.org/rfcs/rfc265.html
-> http://www.faqs.org/rfcs/rfc354.html
-> http://www.faqs.org/rfcs/rfc542.html
Internationalization of FTP
-> http://www.faqs.org/rfcs/rfc2640.html
PKI (Public Key Infrastructure) with FTP
-> http://www.faqs.org/rfcs/rfc2585.html
PASV - Passive mode FTP to enable firewall-friendly FTP
-> http://www.faqs.org/rfcs/rfc1579.html
Using FTP (good for making sure your user complient. )
-> http://www.faqs.org/rfcs/rfc1635.html
TFTP (Trivial FTP) stuff
-> http://www.faqs.org/rfcs/rfc2349.html
-> http://www.faqs.org/rfcs/rfc2348.html
-> http://www.faqs.org/rfcs/rfc2347.html
-> http://www.faqs.org/rfcs/rfc2090.html
-> http://www.faqs.org/rfcs/rfc1350.html (the spec itself)
|
|
|
|
|
i have created a service that listen on some port.
i want.when i send some command to that perticuler port.
then it will execute a setup file using
Process.start() command.
but when i send a command.It will execute Process.star()
line but process window did not appear.
what is the problem ?
is it possible that a process executed into a service?
r00d0034@yahoo.com
|
|
|
|
|
Right click on the service property. Show the LogOn Tab, and check the "allow service to interact with desktop".
How low can you go ? (MS retrofuck)
|
|
|
|
|
thanks for reply.
but sir i right click the service(project) property.but i could not find LogOn Tab so that i could not check "allow service to interact with desktop".
how to do?
r00d0034@yahoo.com
|
|
|
|
|
i got it thanks.
r00d0034@yahoo.com
|
|
|
|
|
Please remove the now useless posts on this board.
How low can you go ? (enculage MS)
|
|
|
|
|
can it be done programatically?
i want when i install my service that check box automatically checked.
how to do that.
r00d0034@yahoo.com
|
|
|
|
|
You've got the Windows API here[^].
How low can you go ? (MS rant)
|
|
|
|
|
i have study that SERVICE_INTERACTIVE_PROCESS.
but question here is that i have created service in
csharp i have not to creat it again and i want to do that thing too.
is there any easy way?
r00d0034@yahoo.com
|
|
|
|
|
There is no API to do that with .NET
In fact there are .NET APIs but they are not public.
You have two options :
- change the appropriate registry key for this service (see in HKLM\System\CurrentControlSet\Services\"servicename"\Type).
- use interop to call the native WIN32 CreateService method. This should be something like this :
[DllImport("advapi32.dll", CharSet=CharSet.Auto)]
public extern static IntPtr CreateService(IntPtr databaseHandle, string serviceName, string displayName, int access, int serviceType, int startType, int errorControl, string binaryPath, string loadOrderGroup, IntPtr pTagId, string dependencies, string servicesStartName, string password);
you should pass the numerical value of "interactive process" for the serviceType parameter.
How low can you go ? (MS rant)
|
|
|
|