Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
8
Posts with Upvotes
8
Upvoting Members
7
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
0 Endorsements
Ranked #2K
~14.2K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.

21 Posted Topics

Member Avatar for zaxxon216

Here's the basic structure you want to aim for: After the person has taken their go, rotate the go for the next user (like multi-player). Now write an AI function or class that returns the position in the array where the AI would like to go. Set the position in …

Member Avatar for disa15031992
0
255
Member Avatar for Nerathas

I thought you meant selecting the second largest divisor of 2 numbers, in which case something along the lines of: [code] static int GetSecondDivisor(int num1, int num2) { List<int> divisors1 = new List<int>(); List<int> divisors2 = new List<int>(); List<int> overlaps = new List<int>(); int divisorIndex = 2; for (int i …

Member Avatar for ddanbe
0
2K
Member Avatar for Medalgod

I am designing an instant messanger and I am using tabs to allow for multiple chats to be taking place in the same windows form. When a new chat is opened, a new tab is added, using a User Control to make the new tab contain all of the required …

Member Avatar for nick.crane
0
1K
Member Avatar for denmarkstan

The error in the thread title is caused when you try and compare a string with an int. The standard way to resolve this is to put .ToString() on the end of the int. e.g. [code] int num = 1; string text = "1"; if(num == text) [/code] Here, the …

Member Avatar for Medalgod
0
2K
Member Avatar for sadhawan

Posted above is not a class, instead he has suggested you use a method which is called by simply: text = FilterText(text); (as it says in his post) Note that a method comes inside a class, e.g. [CODE] Class Program { static void Main() { string text = "text"; text …

Member Avatar for Medalgod
0
89
Member Avatar for Medalgod

OK, basically I want to test if the shift key is pressed. The method i've tried (unsuccessfully) is [CODE] private bool shiftPressed = false; private void CheckKeys(object sender, KeyPressEventArgs e) { //If enter is pressed and shift isn't //This allows for line breaks in a message by pressing shift & …

Member Avatar for Geekitygeek
0
156
Member Avatar for azfarhus
Member Avatar for Medalgod

OK, so i've written a server to listen to TCP connections, and send a response. It can be connected to via telnet and works fine. Next, i started writing the client side of the application - I started out simple by trying the following: [CODE] public static void Send2(Server server) …

Member Avatar for Medalgod
0
118
Member Avatar for Medalgod

Ok, I'm trying to pass some variables from inside Form1, to a new form: LoginDetails. Essentially, what this code does is check if a file exists. If it does, it loads the values from within the file. If the file loads correctly, (it should contail login details to a server) …

Member Avatar for Medalgod
0
364
Member Avatar for Medalgod

I am relitively new to C#. On thursday I started out writing a Tic-tac-toe game. Just a basic gridbuilder, ask the user where they want to go, alternate the users, as player2 where he wabts to go (checking if the move is 'legal'). I've just kept adding to it... This …

Member Avatar for amir pr
0
1K
Member Avatar for nsutton

Fix is @ ln10: [CODE] Console.WriteLine(value); [/CODE] You are priniting the random variable in your code, not the indexed value of the array

Member Avatar for nsutton
0
749
Member Avatar for mnf

[QUOTE=ddanbe;1083072]Hey! Way back I made a metronome with it! Very proud when after some soldering it actually worked.:icon_biggrin: Don't know if the 555 is still popular today...[/QUOTE] Most certainly is. Last used one in an egg timer :p But they are still the #1 timing IC around

Member Avatar for Diamonddrake
0
3K
Member Avatar for Diamonddrake

Unless Adobe are using magic, it is simply a memory/cpu tradeoff. 1. CPU Hungry - Store 1 raw image & 1 changed image, apply all changes every time a single change is made. 2. Memory hungry - Store 1 copy to be displayed & 1 copy for every transformation. Each …

Member Avatar for Diamonddrake
0
147
Member Avatar for Egypt Pharaoh

Defragging is best left to defragging programs. C# isn't exactly geared up for making a defrag program due to low level hdd access requirements. Consider calling the windows defrag program or another piece of 3rd party software to do the defragmentation itself. How to call processes: [code] using System.Diagnostics; ... …

Member Avatar for Medalgod
0
91
Member Avatar for Gixxer98226

This is really just a client-server model issue. With the web you must contact the server to check for updates, rather than the server alerting you of updates. So, for this to work with a 'standard' webpage you must get the page from the server and do the comparison. If …

Member Avatar for Gixxer98226
0
114
Member Avatar for rubiksnut

The file type ascociation is handled by the OS, not the program. What you must do is create your program with a bit of code that allows for the file path to be passed as an argument. Then ascociate the compiled executable with the filetype you will be using. think …

Member Avatar for rubiksnut
0
119
Member Avatar for pardeep3dec

The key here is really that you say you are reading data for another purpose. It is more manageable to have one file hold data for one thing. If you are certain you want to have both sets of data in one file sknake's post contains all you need :)

Member Avatar for Medalgod
0
106
Member Avatar for Egypt Pharaoh

Printing One Text Box: [code] public void PrintDocument() { //Create an instance of our printer class PCPrint printer = new PCPrint(); //Set the font we want to use printer.PrinterFont = new Font("Verdana", 10); //Set the TextToPrint property printer.TextToPrint = Textbox1.Text; //Issue print command printer.Print(); } [/code] As you can see …

Member Avatar for Medalgod
0
123
Member Avatar for nccsbim071

Depending on what, porecisely you are trying to do and whether the server is public or private (for security purposes) you may also want to consider calling a windows ssh client such as putty and pasing it the variables to connect to the server & run a command. Or of …

Member Avatar for Medalgod
0
183
Member Avatar for Member #671981

Perhaps the best place to start is to add a line break after each ts.Write called. Now you can see each individual piece of data. Make the first 2 lines a dump of paintSequence.GetLength(1) & paintSequence.GetLength(2). Then all you have to do is think of your 2d array as an …

Member Avatar for Member #671981
-1
2K
Member Avatar for rzhaley

Just a fix on jonsca's code: [code] for (int i = 0; i < firstArray.GetUpperBound(0); i++) for (int j = 0; j < firstArray.GetUpperBound(1); j++) firstArray[i, j] = ??; [/code] The less than or equal to comparitor should just be less than, else you'll be reading/writing outside of the arrays …

Member Avatar for ddanbe
1
138

The End.