|
1-I need to test a code of proxy client
i need valid proxy servers , how do i know the lists i find from google search that they are reall proxy servers?
2- I am sending a request to socks4 proxy , the response is always 0 , what does this mean ?
3-if any one know sthe exact format of socks 4 request pls send
thanks alot
Mona
Mona
|
|
|
|
|
Hi am new to .NET environ, wanted to know what is the equivalent of CreateBitmap method of C in C# - which converts the postscript file to a bitmap file.
|
|
|
|
|
|
I have a problem with using System.Diagnostics.Debug methods. I created an empty test project and added only:
System.Diagnostics.Debug.Write("Write something");
System.Diagnostics.Debug.Write("Write something 2");
I set breakpoint on the second line to be sure, that the first method was actually executed and run the program using the Debug configuration. No output in the "Output" IDE window though :/ I have just switched from VS2003 to VS2005 and I have a fairly large application written natively with .NET 2005 to debug and no Debug logging functions output is making my efforts to understant the logic of that application fairly impossible.
I would appreciate any help. I think that the solution is very simple, but somehow cannot find it when Googling the net.
regards,
SebekZ
|
|
|
|
|
Have a look to see if the output is showing in the Immediate window.
There is an option in 2005 under Debugging/General for re-directing all output window text to the Immediate window. If this is set then Debug goes to immediate rather than Output.
hth,
Q.
|
|
|
|
|
I knew that it would be a simple checkbox that was to be unchecked somewhere... well, maybe I was thinking more of a weekend than work and that is the reason that I had not noticed this option. Thank you
regards,
Sebastian K. Zaklada
|
|
|
|
|
Hey everybody
I wrote a method that checks if a DiskOnKey is connected to the computer, and if it does, it pops a message says "connected".
the thing is that I have no idea how to make this method being called only when a new USB device is being connected.
can anyone help me with that?
thanks!
|
|
|
|
|
can anyone help me on how will i convert my Stringbuilder variable to a Byte array.. using c#
thanks
Im am SUPER P
|
|
|
|
|
Use the ToString method to get the contents as a string, then use the GetBytes method of any of the Encoding classes to encode this as bytes.
---
b { font-weight: normal; }
|
|
|
|
|
Choose an encoding an convert the string:
<br />
string text = stringBuilder.ToString();<br />
byte[] bytes = Encoding.Unicode.GetBytes(text);<br />
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
-- modified at 8:39 Friday 24th February, 2006
|
|
|
|
|
|
Can anyone help?
My application is reciving an array of data via TCP. This data has a JPEG image within it, aswell as other data. Once I have extracted to an array the JPEG image, I need to display it in a PictureBox control. Ideally converting my JPEG array into an Image class object would allow me to give the PictureBox the Image object for displaying. My problem is that I can see no way to do this apart from saving the JPEG array to a JPEG file and get the PictureBox control to load in the JPEG image by calling Image.FromFile(FilePath); I would rather not create a file as the application will be receiving lots of JPEG's and would cause high hard drive activity.
I would be gratefull for any help.
Thanks in advance.
|
|
|
|
|
Let's say you get byte[] data;
Do something like this:
MemoryStream ms = new MemoryStream(data);
(MemoryStream is in System.IO)
Then create an Bitmap instance by giving the created stream.
Bitmap bitm = new Bitmap(ms);
or with Image
Image image = Image.FromStream(ms);
|
|
|
|
|
MemoryStream! never new it existed. Thank you, that will do the trick.
|
|
|
|
|
Hi all,
I want to create a window system service that sits on the background and just fire another service/executable (i.e, notepad) every time a new user fast switches to a new session. How can I start a new process in another user sessions in WinXP using .NET 1.1 or 2.0? also how can detect the event of user fast switch to a new session?
thanks in advance...
|
|
|
|
|
Hi !
I want to enter in a textBox only "Number" ,with the following function :
public bool IsNumeric(string val)<br />
{<br />
try<br />
{<br />
double result = 0;<br />
return Double.TryParse(val, System.Globalization.NumberStyles.Any, System.Globalization.NumberFormatInfo.CurrentInfo, out result);<br />
}<br />
catch<br />
{<br />
return false;<br />
}<br />
} and for txtNumber_TextChanged event i wrote :
if (this.IsNumeric(txtNumber.Text.ToString())==false)<br />
txtNumber.Text="";
but I can enter "5.5" or "6/8" in the TextBox .
how can it possible that the user enter "ONLY Number " in textbox.
thanks !
s_mostafa_h
-- modified at 7:08 Friday 24th February, 2006
|
|
|
|
|
I wrote this code once, I just checked the code of every new entered char, if it is bigger that the char code for '9' or smaller than the char code '0', than its not a number (I'm not sure that 9 is the biggest char).
|
|
|
|
|
mostafa_h wrote: but I can enter "5.5" or "6/8" in the TextBox .
how can it possible that the user enter "ONLY Number " in textbox.
You are parsing the string to a double, so why shouldn't you be able to enter 5.5? It is a double!
If you want only integers then use int.Parse.
Otherwise you can check each character entered as the other poster has proposed. Use Char.IsDigit to determine if it is a valid digit and reject anything else. But consider whether you need to support negative numbers as well. In that case you need to check for - as well.
|
|
|
|
|
thanks for your reply !
but , the result of int32.Pars(.....) is not a boolean .
regards !
s_mostafa_h
|
|
|
|
|
|
dan neely wrote: int32.TryParse(...)
ARE YOU SURE !
Int32 , has not "TryPars" method .
s_mostafa_h
|
|
|
|
|
It doesn't need to return a boolean. If it fails it will throw an exception which you are trapping already in your code.
In fact the trapping you were using with double.TryParse should be unneccessary because I don't think you can make TryParse throw an exception (it returns false instead).
|
|
|
|
|
Hi,
I am using CSharpCodeProvider for the first time (.NET 1.1 & VS2003). My application has been used without problems for a few weeks.
Now I started using an external assembly (PortController.NET) from the generated assembly.
I can access the generated assembly (create objects and call methods) but when it reaches the poing where it uses PortController.NET (creating new object) I get the exception:
File or assembly name PortController.NET, or one of its dependencies, was not found.
But it works when executed through the debugger!?
My code looks like this:
ICodeCompiler comp = (new CSharpCodeProvider().CreateCompiler());<br />
CompilerParameters cp = new CompilerParameters();<br />
cp.ReferencedAssemblies.Add("system.dll");<br />
cp.ReferencedAssemblies.Add(@"C:\Program Files\PortController.NET\PortController.NET.dll");<br />
cp.GenerateExecutable = false;<br />
cp.GenerateInMemory = true;<br />
<br />
CompilerResults cr = comp.CompileAssemblyFromFile(cp, filepath);
In VS2003 PortController.NET is listed in the .NET list (for adding references) so I guess it's in the GAC.
Any suggestions?
Thanks,
Jan
|
|
|
|
|
Hi,
The problem is probably with Fusion ( the system responsible for loading assemblies ).
You cannot load an assembly that lives outside the .exe directory structure.
So either make sure the PortController.NET.dll assembly is in the GAC, or just put it in the same directory as your .exe. Either way, remove the path from the call to ReferencedAssemblies.Add .
If this doesn't work you will have to use Fuslogvw.exe to check the fusion logs. I seem to remember you have to clear your temporary internet files first.
You used to be able to view the GAC using Explorer ( at C:\Windows\assembly ), but I just checked my system and it seems to have disappeared
----------------------------
Be excellent to each other
|
|
|
|
|
Thanks for a very fine and serious answer. 5 from here.
I can't wait to get back to work monday.
Cheers
|
|
|
|