|
seser wrote:
As far as I know, the Stream class is serializable. What may reason of this error.
Not all Streams are serializable, e.g., FileStream is not serializable (btw, how could it be serializable). MemoryStream is a serializable stream (as it is only a glorified byte array, it's easy to serialize)
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
I realized that I don't have actually a "stream" but I have a "filestream" which is not serializable. And I solve the problem.
Thanks for your cooperation.
|
|
|
|
|
How could i obtain the write and read speed of my disk?
If someone could say to me, I will be grateful for it.
alain.
|
|
|
|
|
That's a complicated question. Disks read and write at different speeds depending on the kind of reading and writing (lots of little files, vs. a few big files, for example), as well as what else is going on with the system. You can read the specifications of a particular disk, but even that doesn't really give you a real answer, because of the system dependencies.
If you are reading and writing a lot of data and you want to give the user some feedback, then what you can do is extrapolate (calculate the current rate over the last time increment of your choice, then estimate how much time it will take to do the rest of the data, based on that; keep re-estimating and updating as you go).
Matt Gerrans
|
|
|
|
|
thanks for answering.
I just want to know the read and write time of the machines, because what I am doing is characterizing a network and I need to give a species of report of the principal characteristics of every machine of the network.
would you help me in that?
Alain.
|
|
|
|
|
Sure. Shall we start with negotiating a price?
Matt Gerrans
|
|
|
|
|
sorry man...
i'm an student, so i have no money...
bye...
|
|
|
|
|
hello
I have a question about the resource file i want to update it at runtime without recompileing. I want to be able to make a project multi-lingual and store all the (labels, buttons etc text) in a resource file with key and value. I tried updateing a resource file in vs.net 2003 without recompileing, but did not find a work around can anyone tell me if this possible.
thanks in advance
|
|
|
|
|
It should be possible. Otherwise there wouldn't be much of a point to get the values from the resource file at runtime.
What happened when you updated the resource file?
---
b { font-weight: normal; }
|
|
|
|
|
when i updated the resource file it needed a rebuild of the exe to take affect of the changed made.
|
|
|
|
|
May be you can try the .Config files ?
|
|
|
|
|
I want to define a class (which will store a 2D matrix and will do some operations on that).
Say I want to define a 2D matirx [1 2 3 ;1 2 3; 3 4 5] and I have a GUI to enter the data, where I enter <big>matrix(1,2,3;1,2,3;3,4,5)</big> and it constructs the matrix [1 2 3 ;1 2 3; 3 4 5].
Can someone help me how to acheive this?
|
|
|
|
|
Maybe you can do something like
new Matrix(
new MatrixRow(1, 2, 3),
new MatrixRow(1, 2, 3),
new MatrixRow(3, 4, 5)
);
Does that help?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
To store a two dimensional array, you use an array of arrays.
int[][] matrix;<br />
matrix = new int[3][];<br />
for (int i=0; i<3; i++) matrix[i] = new int[3];
Now you have a 3x3 array that you can store the values in.
---
b { font-weight: normal; }
|
|
|
|
|
But only problem is that i don't know what will be the size of the mastirx before hand. I just gave u an example ,..it could be any n*m matrix.
|
|
|
|
|
You can replace the numbers with variables containing any number you want.
---
b { font-weight: normal; }
|
|
|
|
|
Have you worked in MATLAB? its like nothing is mentioned? you just enter
>>[1 2 3,4 5 6;8 9 6]
and it creates a matrix. i want some application lik ethat. by looking at the expression user entered you construct the matrix. i know we can do that by defiing a variable. but how to determine th eorder of the matrix (n*m) by looking at the expression. bec as far as i know constructor takes only parameters. trick here is that by looking at the string 1 2 3,4 5 6;8 9 6 your constructor should be able to say that it is a 3*3 matrix and defines the matrix accordingly
|
|
|
|
|
Split the string by semicolon:
string input = "1 2 3;4 5 6;7 8 9";<br />
string[] rows = input.Split(';');
Now you have an array with three records. Create an array of string arrays to store the final result:
string[][] matrix = new string[rows.Length][];
Now split each row by space to get an array, and put it in the matrix:
for (int i=0; i<rows.Length; i++) matrix[i] = rows[i].Split(' ');
---
b { font-weight: normal; }
|
|
|
|
|
Thanks..solves my problem. u exactly got into the root of the problem.
|
|
|
|
|
Note though that the code does not check if the matrix is square. It will happily turn a string like "1;2 3 4 5;;6;7;8 9" into arrays without complaining.
---
b { font-weight: normal; }
|
|
|
|
|
Hi all,
I've started coding a windows form without the designer and suddenly I needed to set one of this property. Then I took a look at the code and saw that the designer added a function InitializeComponent() and did the setting of the property there. Couldn't the property be set in the Form's constructor? And where can I find some docs on InitializeComponent() cause I looked at MSDN and couldn't find any. Any advice is greatly appreciated.
Regards
|
|
|
|
|
Of course you can set the properties in the constructor. I bet the VS designer just creates an "InitializeComponents" method so it can better keep track of the changes made directly through the designer.
That's why the designer can get confused if you modify the "InitializeComponents" section too much.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
But is this function automatically called? Because I cannot see any point where it is called.
|
|
|
|
|
Take a closer look at the Form() constructor
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hello Dear...
InitializeComponent() Is not a special thing ! This is a common function. It will call in Constructor.You can move all codes in this function to the constructor directely ! But You can't change this codes in designer ! Designer (VS.NET) Protects this portion of codes.If you change some codes in this area,Designer will reproduce theme at each rebuild.
I hope this was helpful for you,
Bye
|
|
|
|