|
Hello experts,
I want to make my application more user friendly and interactive. So I decided to provide the outlook type control in side bar.
If you are go to properties of any .Net project then you will see a new type of Tab with Application, Build, Build Events etc. ]
Is it in build in .NET...?
Please help.
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
There are several outlook style controls here, on codeproject. Use search and you will find them
|
|
|
|
|
Hi,
i checked two checkbox in datagridview rows and want to capture the state of checkboxes..
kirankumar
|
|
|
|
|
bool blisChecked = yourCheckBox.Checked; ?
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
T will be some value type int, float, double, etc...
public T Mean<t>(T[] vec) where T : ???????
{
T tmp = 0; <--- error
foreach (T v in vec)
tmp += v; <--- error
return tmp / vec.Length; <--- error
}
Are they so complex compared to C++
chesnokov
|
|
|
|
|
Sad but true: there is (not yet) a INumber or IArithmetic interface for this.
So either you have to use reflection to query the operators or you have to define a Interface yourself.
With .net 3.5 you can use the extension-method system to add the implementation for your interface to double/int/etc. so maybe this is the best way.
|
|
|
|
|
try this :
<br />
public T Mean(T[] vec) where T : Int32,Double,Fload,.....<br />
{<br />
tmp = default(T);
foreach (T v in vec)<br />
tmp += v; <br />
return (tmp / vec.Length) as T;
}<br />
Hope that helped
Nassos
"Success is the ability to go from one failure to another with no loss of enthusiasm."
Winston Churchill
"Quality means doing it right when no one is looking."
Henry Ford
|
|
|
|
|
I am using socket class for udp connection. I have to receive data from server but i do not know the size of data. In receive method we have to send byte array. Is there any way i can know how much bytes are available to read so that i can make an array of bytes for that size?
|
|
|
|
|
Received data should be in Byte Array right ? the you can ask byteArray.Length
|
|
|
|
|
in fact i am asking how can i know how much data is available to read so that i can make that much long byte array and send it as an argument in receive method of socket.
|
|
|
|
|
Well, i assume that you are using Asynchronous Socket
SocketPacket socketData = (SocketPacket)asyn.AsyncState; // where asyn is type of IAsyncResult
int iSizeofDatainSocket = socketData.m_currentSocket.EndReceive(asyn);
|
|
|
|
|
Sorry i forget to mention i am using synchronous. I understand your code. But how can this be done in synchronous. Here is my code snippet:
Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);<br />
IPEndPoint end = new IPEndPoint(IPAddress.Any, 0);<br />
sock.Bind(end);<br />
sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 3000);<br />
sock.Connect(this.GSIP, this.GSPort);<br />
<br />
byte[] bufferRec = new byte[65000];<br />
<br />
sock.Receive(bufferRec);<br />
|
|
|
|
|
Sorry i thought you are using Sync.
Please look at the highlighted stuff...
Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
IPEndPoint end = new IPEndPoint(IPAddress.Any, 0);
sock.Bind(end);
sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 3000);
sock.Connect(this.GSIP, this.GSPort);
int iTotalAvailableData = sock.Available;
//that size i am unable to know
byte[] bufferRec = new byte[iTotalAvailableData];
sock.Receive(bufferRec);
Thanks.
|
|
|
|
|
hello all,
In C# .NET how can i get ASCII value of a particular char and also how can i get a ASCII char from a ASCII value. such that for 65 it should return 'A'.
Please Reply.
Thank you
Dipak
|
|
|
|
|
int i = 65;
char a = (char) i;
|
|
|
|
|
|
|
I couldnt get you, its all smile eye..
|
|
|
|
|
Ignore that 'dhans'. It seems to be a troll sh*tting all the way.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
In your endeavor to test and showcase the different smileys, you missed to see and test the other link 'Add a smiley ' with this link (http://www.codeproject.com/script/Forums/emoticons.aspx[^]), where you have more smileys to click-n-insert to have more fun and get '1' voted to be subsequently kicked.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
|
if in my database there are many rows of data..
how do i do a random sorting to display one row of data into my textbox..
|
|
|
|
|
angels777 wrote: how do i do a random sorting to display one row of data into my textbox..
What does it mean ??
You want to read records Randomly into your text box ??
You can try with Random Class
|
|
|
|
|
ya exactly what u said.. how to display that
|
|
|
|
|
hi. i am using wpf c#
i would like to insert pictures into my richtextbox where the picture border can be dragged to modify the size..after that save to database..
|
|
|
|