- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 12
- Posts with Upvotes
- 9
- Upvoting Members
- 12
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
67 Posted Topics
I'm trying to send data back and forth between two computers using a Socket (TCP). The data is in the form of serialized Packet objects. At an early point in the application, it must send 25 or so Packets of the same type to the other side. See Case 1 … | |
Re: [url]http://www.memory4less.com/m4l_itemdetail.aspx?partno=KVR333D4R25/1G&itemid=27104376&rid=fd_10[/url] It has the same part number as what you requested. | |
Re: You reached 380 points, so you achieved position 11591 of 658357 on the ranking list You type 501 characters per minute You have 90 correct words and you have 1 wrong words The highest wpm I remember getting was on some baby-ish typing program in our school's computer app class. … | |
Re: There's another operating system called "Cosmos" that is written in C#, although I think it just converts the C# to Assembly and compiles that. I'm not exactly sure how the thing works at all. :D Maybe it's something worth looking at? | |
Here's my dilema. My client program is going to request a certain file from my server program, so the server program needs to send the size of the file it requests and then the file itself by using a Socket all in one go. My client will then read the … | |
Re: Not really understanding what you mean...You can have as many if statements as you want wherever you want pretty much. | |
Re: Antivirus programs search a virus executable for a known piece of code or some other sort of signature that uniquely identifies it. Exactly how a virus is identified depends upon how the antivirus was made. The "signatures" or "definitions" you download just about every day is a database containing these … | |
The program that uses this function is receiving files of multiple types and sizes from another PC. It has been working well but when the files' size exceeds about 100MB I run out of memory. I need to modify the receiving code so that it saves the incomplete file to … | |
Re: You'll need to keep track of how many it sends and tell it to stop and wait a specified amount of time when that number reaches 400. Here's an example. I do not know how long you might want it to wait, I assumed 30 seconds. [CODE] int SentEmails = … | |
Re: Would this work for you? This will open the specified website in the user's default browser. [CODE]System.Diagnostics.Process.Start("http://www.daniweb.com/");[/CODE] | |
Re: Please use code tags next time. :) [CODE] int P = 0; int[,] numbers = {{1, 2, 0, 6 }, {5, 6, 7, 0 }, {9, 3, 6, 2 }, {6, 4, 8, 1}}; int[] A = new int[16]; foreach (int n in numbers) { A[P] = n; P++; } … | |
The attached program has a small bug when you right click on an item. The first time you right click any item it'll throw the context menu (it's the same menu under File) all the way up to the top left of the screen, but the second time you right … | |
Re: Its taking a string called ligne, splitting it at char 59 (that's a semicolon), and assigning valeur as index zero of the split. C# equivalent of that [CODE]string valeur = ligne.Split(';')[0];[/CODE] | |
Re: I'm also working on something similar to this. I believe your problem is that you're writing a string representation of the data to the file. .txt files contain only text and nothing else. Right click a .txt file and open it with Notepad. It's just text. Now right click an … | |
Re: Use code tags please. :) [CODE]static void Main(string[] args) { string[,] fp = readFilePaths(); OleDbConnection con = new OleDbConnection(); OleDbDataAdapter da; DataSet ds = new DataSet(); con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and Settings/kyalanur/Desktop/Nav tool/PCGDataManager.mdb;User ID=;Password=;"; string sq = "SELECT * FROM History"; con.Open(); da = new OleDbDataAdapter(sq, con); da.Fill(ds, "History"); for … | |
Re: Try incorporating what is in the web.config into the code itself. This worked for me. [CODE] MailMessage message = new MailMessage(); SmtpClient smtpClient = new SmtpClient("smtp.gmail.com"); message.From = new MailAddress("testing@gmail.com"); message.To.Add("alex@hotmail.com"); message.To.Add("alex2@hotmail.com"); message.Subject = "Test Mail"; message.Body = "This is for testing SMTP mail from GMAIL"; smtpClient.Port = 587; smtpClient.Credentials … | |
In my client/server program, whenever I need to get data from one or the other it requires a buffer to temporarily store the data. The problem is that I don't know how much data I am going to be getting. I could be receiving a few lines of text or … | |
Re: Your buffer needs to be 1048576 if you want to get up to a megabyte. Warning though, reading cuts off when the buffer is full so if your image turns out to be bigger than a megabyte you're not going to have the full image and it will throw an … | |
Re: This will do it. [CODE]for (int I = 1; I <= 4; I++) { this.Controls["label" + I].Text = "Some text"; }[/CODE] | |
Re: I don't believe you're going to be able to [I]easily[/I] get the path of a file just by having its file name. That's what Search does. The first thing that popped up in my head was to create a dictionary. Make the key be the file's name and make the … | |
If you look at a bunch of files with the Details view, file types known to Windows have a greater description of the file in the Type column. For example, .exe is an Application, .txt is a Text Document, and .cpp is C++ Source. If they are not known, Windows … | |
Re: When you make a new 'A' and tell it to Show(), you should see another method called ShowDialog(). This is exactly what you want as execution will not continue until that dialog is closed. Here's an example. Assuming the form you want to call is named SubmitForm. [CODE]SubmitForm A = … | |
Re: Try this. I don't understand the problem fully but this is what I use to get the computer's 'external' IP that you can connect to it from, especially if it is behind a router. [CODE]string IP = new WebClient().DownloadString("http://automation.whatismyip.com/n09230945.asp");[/CODE] | |
Re: There's an infinite recursion going on. Here's what is happening. Line 127: You make a BattleshipBoard object called 'b' giving it the value of a new BattleshipBoard class. It's going to go through and assign any variables you tell it to and make its methods available to the object you … | |
Right now I only need to be able to send a 100kb JPEG photo. I tried Google and found a couple of things but their code only threw exceptions so maybe what they've done is not appropriate in my situation. This is an attempt at a remote screen viewer. If … | |
Re: You can set a control's location and many other properties from within the code. What you want to do would be done like so, and other properties can be set in a similar way. [CODE]ButtonName.Location = new Point(X, Y);[/CODE] I'd put this in the constructor, after InitializeComponent();, so that it … | |
Re: Hey! I've done something exactly like this before! :) DateTime and TimeSpan didn't work so well for me and required extra crap like Days, Year, Seconds, etc. I didn't like that. I only wanted the distance between two hours in one day. What I ended up doing was, if the … | |
I want to start a method whose name is in a string. My server program will be receiving commands from the client, perform those commands, and send the information back to the client. So instead of using a switch with many cases that only execute a method, I thought it … | |
I have a group with 7 different NumericUpDown boxes in it. Above those I have a label that tells how many choices you have remaining. When the NumericUpDown goes up, the remainder goes down. However it also goes down when a NumericUpDown goes down as well. It needs to go … | |
This list box will contain the name of processes that are currently running. My function to update the list first checks to see if it does not contain the name of a process that is running, then adds the process if it needs to. Then it checks to see if … | |
My program starts 5 different threads when it is opened. One or more of them is not stopping correctly and is causing my program to remain alive even after the main form has closed. Before I go through trying to find which one is doing it is there some way … | |
I couldn't find anything that would do what I am trying to do with my client and server. Mainly, I want to click a button that will start downloading a file I select on the remote computer. Optionally I would also like to show the transfer rate, estimate time remaining, … | |
I'm learning C++ and just finished a tutorial on pointers. I understood what they were and how to use them but I do not understand when they should be used. When would it be practical to use a pointer to get a value instead of using the value's name? For … | |
Just as the title says, how can I detect double clicking in a ListView? I'm trying to emulate browsing through a directory with windows explorer. | |
Re: I don't believe Python can do that to the console. You might be able to achieve something like this using some GUI toolkit like wxPython or tkinter. But if you don't want to do that a possible workaround would be to write another small script to run alongside your main … | |
I'm doing a client and server program and I am having issues getting my computer's local IP address. [ICODE]Dns.GetHostAddresses(Dns.GetHostName());[/ICODE] returns 2 addresses for me. My computer is behind a router with 2 others on the network. The code returns 192.168.1.2 (I know this is my computer), and 192.168.56.1 (I have … | |
I'm at a point with this program that I need to do a lot of work with strings. This would be so much simpler to do in Python, however I don't want the entire program written in Python. How could I use functions from a Python script in C++? | |
This program gets a list of the processes running and displays them in a ListBox. When one is clicked it puts info about the process such as start time and filename in text boxes. But some of these don't return anything and the text box remains blank and I can't … | |
This program will kill the process a user specifies and start a BackgroundWorker that constantly analyzes a list of running processes and kills it again if it starts. But it will not cancel even when I tell it to. This is the BackgroundWorker's code. [CODE]private void KeepProcessKilled_DoWork(object sender, DoWorkEventArgs e) … | |
I'm working on a scientific/algebraic calculator and I have put all of the code that will deal with any of the math in a separate class. However I cannot access any of the controls on the form from this class. I need to write the answer into the box on … | |
Re: C'mon, show a little effort. It's not hard, I promise. [URL="http://www.java2s.com/Code/Python/Function/Function-Define.htm"][I][B]This page might help.[/B][/I][/URL] | |
Re: You have the function inside your while loop. Functions must always be called so they will execute their code. To call it you need to type the name of the function and include any variables it needs within the parenthesis. Like so: [ICODE]ask_number("Type a number: ", 1, 100)[/ICODE] In this … | |
I used someone else's code as an example to start my game and move my character around. I understood the majority of it but there's a couple of parts I don't get. I want my character to move Up when the up arrow is pressed, but smoothly! My code right … | |
Re: That means no value was returned. Look at your find_discount() function. You've set what discount should be on all occasions, but you only return on one occasion! You need to move it back so it returns after all the if and else statements. Here's how it should be. [CODE]def find_discount(total): … | |
Re: Can't test it but it looks like bad indentation. Line it up like this. [CODE]def coordinates(quickdraw, event): if ((len(event) > 0) and ("MousePressed" in event)): first = event.split(":")[0] xcoord = event.split(":")[1] x = xcoord[0:4] x = x.strip() y = xcoord[5:8] y = y.strip() print x print y return x return … | |
Re: Simply replace the numbers with raw_input(). Add a string between the parenthesis to also print a prompt. [CODE]a = raw_input("A = ") b = raw_input("B = ") c = raw_input("C = ") class fallObj(DirectObject): def __init__(self): #rest of the code goes here[/CODE] | |
I know this is probably overly simple but I am terrible with math. This is a section from a game I'm attempting with PyGame. Instead of using pixels for coordinates I have my own render function that uses blocks(actually just cnverts block value to pixels), which are 32x32 pixels, so … | |
Re: What version of Python are you running? I can't think of any reason it would do that. It works fine for me. | |
Re: I'm a beginner with C++ but I'll attempt to help. Line 3: Your main() function is void. The Main() function must always return an int. So change void to int. Line 5: I don't believe you'll need this. Replace with a declaration of the variable "i" Line 6: The variable … | |
Just started learning C++ today. I'm writing a program to keep up with school assignments. [CODE] #include <iostream> #include <stdlib.h> #include <fstream> #include <string> struct Assignment { string Period; string Title; string Page; string Date; string Instruct; }; void NewAssignment() { system("CLS"); Assignment Work; cout << "New Assignment Entry" << … |
The End.