Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: Windows.Forms.DataGrid Pin
Alomgir Miah27-May-05 8:25
Alomgir Miah27-May-05 8:25 
Generalmscorlib.xml Pin
zuschauer198027-May-05 1:39
zuschauer198027-May-05 1:39 
GeneralTool to convert from Ms Access Database to MYSQL Database Pin
rockxuyenmandem27-May-05 1:27
rockxuyenmandem27-May-05 1:27 
GeneralRe: Tool to convert from Ms Access Database to MYSQL Database Pin
Member 157708727-May-05 2:39
Member 157708727-May-05 2:39 
QuestionConfig file in dll project? Pin
davebarkshire27-May-05 1:08
davebarkshire27-May-05 1:08 
AnswerRe: Config file in dll project? Pin
DavidNohejl27-May-05 2:31
DavidNohejl27-May-05 2:31 
AnswerRe: Config file in dll project? Pin
Dave Kreskowiak27-May-05 2:33
mveDave Kreskowiak27-May-05 2:33 
GeneralSmall UI prob Pin
Niklas Ulvinge27-May-05 0:56
Niklas Ulvinge27-May-05 0:56 
I'm programming a neural network
and I got a small user interface problem.

I want it to lool like this:
Input: 10 Output: 0

The algorithm could look like this:
1. print Input:
2. get 2 chars
3. procesing
4. print Output:
5. print result of proccesing

But I can't do the get 2 chars line.

<br />
        static void Main(string[] args)<br />
        {<br />
//don't care about this<br />
            //setup NN<br />
            NeuralNetwork nn = new NeuralNetwork(2);<br />
            nn[0].addNeurons(2);<br />
            nn[1].addNeurons(1);<br />
<br />
            nn.CENTENIPL();<br />
<br />
            //insert Learning and other prosseces here.<br />
            educateNeuron(nn);<br />
<br />
//it begins here<br />
            do<br />
            {<br />
                setInputs(nn);<br />
                nn.CalcNet();<br />
<br />
                Console.Write("  Output ");<br />
                for (int i = 0; i < nn[1].neurons.Length;i++ )<br />
                    Console.Write(nn[1][0].output);<br />
                Console.Write('\n');<br />
            } while (true);<br />
        }<br />
        static void setInputs(NeuralNetwork nn)<br />
        {<br />
            Console.Write("Input: ");<br />
            char[] buffer = new char[nn[0].neurons.Length];<br />
            Console.In.Read(buffer, 0, buffer.Length);<br />
<br />
            for (int i = 0; i < buffer.Length; i++)<br />
            {<br />
                if (buffer[i] == '0')<br />
                    nn[0][i].output = 0;<br />
                else<br />
                    nn[0][i].output = 1;<br />
            }<br />
        }<br />

Now it looks like:
Input: 01
Output 0,009378789
Input: Output 0,9900505
//don't worry about the decimals

The PROgrammer Niklas Ulvinge aka IDK
GeneralRe: Small UI prob Pin
John Fisher27-May-05 4:37
John Fisher27-May-05 4:37 
GeneralRe: Small UI prob Pin
Niklas Ulvinge27-May-05 4:47
Niklas Ulvinge27-May-05 4:47 
GeneralRe: Small UI prob Pin
John Fisher27-May-05 6:16
John Fisher27-May-05 6:16 
GeneralRe: Small UI prob Pin
Niklas Ulvinge27-May-05 6:23
Niklas Ulvinge27-May-05 6:23 
GeneralRe: Small UI prob Pin
John Fisher27-May-05 6:36
John Fisher27-May-05 6:36 
GeneralRe: Small UI prob Pin
Niklas Ulvinge27-May-05 6:40
Niklas Ulvinge27-May-05 6:40 
GeneralRe: Small UI prob Pin
John Fisher27-May-05 10:44
John Fisher27-May-05 10:44 
GeneralStatic class Pin
LIUCKAS27-May-05 0:01
LIUCKAS27-May-05 0:01 
GeneralRe: Static class Pin
User 665827-May-05 0:37
User 665827-May-05 0:37 
GeneralRe: Static class Pin
Andrew Kirillov27-May-05 0:37
Andrew Kirillov27-May-05 0:37 
GeneralRe: Static class Pin
Niklas Ulvinge27-May-05 0:48
Niklas Ulvinge27-May-05 0:48 
GeneralRe: Static class Pin
Robert Rohde27-May-05 5:21
Robert Rohde27-May-05 5:21 
GeneralRe: Static class Pin
Niklas Ulvinge27-May-05 6:19
Niklas Ulvinge27-May-05 6:19 
GeneralRe: Static class Pin
Wraith227-May-05 0:51
Wraith227-May-05 0:51 
GeneralRe: Static class Pin
LIUCKAS29-May-05 20:40
LIUCKAS29-May-05 20:40 
GeneralFileSystemWatcher Pin
s2111979226-May-05 23:53
s2111979226-May-05 23:53 
GeneralRe: FileSystemWatcher Pin
John Fisher27-May-05 4:43
John Fisher27-May-05 4:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.