Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~10K People Reached
Favorite Forums
Member Avatar for DustinS

I made client & server programs in C# based on this example code. c# client program: IPHostEntry ip = Dns.GetHostEntry(tbServer.Text);//"MyComputer-MSI" string addr = ip.AddressList[0].ToString(); TcpClient clientSocket = new TcpClient(addr, 1234); At the last line above, I got the message: An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Additional information: …

0
108
Member Avatar for DustinS

import os data = map(lambda c: ord(c), file(args[0]).read(os.path.getsize(args[0]))) For one file, os.path.getsize(args[0]) returns 10456 while len(data) returns 281. After looking at different files, I realized that it always stops reading at the 0x1A character. The documentation says that in Windows, Python uses _wfopen which (for compatibility reasons) interprets 0x1A (CTRL-Z …

Member Avatar for Gribouillis
0
2K
Member Avatar for DustinS

My console program outputs "*" symbols to indicate progress. I'd like to read this in order to update the progress bar in a Windows form: [code=c#] int Progress=0; System.Diagnostics.Process ProcessObj = new System.Diagnostics.Process(); ProcessObj.StartInfo.UseShellExecute = false; ProcessObj.StartInfo.CreateNoWindow = true; ProcessObj.StartInfo.RedirectStandardOutput = true; ProcessObj.Start(); while(!ProcessObj.HasExited){ Progress+= ProcessObj.StandardOutput.ReadBlock(buffer, index, 1); } Progress+= …

Member Avatar for DustinS
0
204
Member Avatar for DustinS

For some reason, the row header is being automatically set to the same value that appears in the adjacent cell in the first column. I can set and get HeaderCell.Value, but it has no effect on what is displayed. [CODE] If I (manually or programmatically) enter: Length Radius Obj 1 …

Member Avatar for DustinS
0
408
Member Avatar for DustinS

I am relatively new to c# and am making a 2D physics engine as a fun project to learn the language and the .NET environment. I am making a form that can be used to modify the number of objects. Unfortunately, I cannot find a way to change the length …

Member Avatar for DustinS
0
213
Member Avatar for DustinS

The "exec" function seems to literally execute strings as code in a Python shell: >>> exec("a=2") >>> a 2 >>> However, when I tried this function from within a tkinter form, the variables were no longer accessible via their original names: a=1 #initialize the variable "a" exec(str(CodeTextBox.get())) # I entered …

Member Avatar for Gribouillis
0
107
Member Avatar for DustinS

I just started messing with Python, and was having a great time with entering Tkinter GUI commands into the Python shell (ActivePython 2.5). Its fun entering commands one at a time and seeing components appear real-time (instead of normal process of having to compile the whole thing first). Anyway, I …

Member Avatar for DustinS
0
7K