|
|
Thanx again Giorgi!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
if datatable has primary key, you can search using DataTable.Rows.Find(object key) or DataTable.Rows.Find(object[] keys).
if you prefer more like Sql statements, create a DataView instance from your datatable and supply RowFilter property with your criteria ie. 'a like '%filter%' or b=1 and c='2'' etc.
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
i made a combo box ...
now i want that when i click on it for drop down,
it should be displayed all available fontsizes in it.
how can i do it....
Maifs
|
|
|
|
|
|
I just wonder if there is a way of raising a number to a certain power by c# code i.e coding such a function in c#. e.g 3^5,OR 3^x where x can be a variable, now writing this in code form????
|
|
|
|
|
It has to do something with Math doesn't it? Why not search for such class?
|
|
|
|
|
Is it System.Math.Pow() that you are looking for?
Always keep the Murphy Rules in mind!
|
|
|
|
|
I believe it has to do with double power(val, n) etc.
|
|
|
|
|
What are the differences between using :
HttpChannel, TcpChannel, and IpcChannel in .NET Remoting ?
How about the performance ?
Thanks...
|
|
|
|
|
Its all a question of project scope...
HttpChannel
Scope
Wide - Objects can be hosted on an HTTP server, which makes it robust. The object can then be accessed from anywhere on the internet.
Efficiency
Reduced - HTTP brings alot of overhead with it, which reduces efficiency
Security
High - When hosting on IIS, advantage can be taken of SSL(secure socket layer) windows authentication or kerberos.
TCPChannel
Scope
Narrow - This requires certain ports to be opened, and therefor not anyone may obtain access
Efficiency
Increased - the protocol uses raw sockets to transmit data across networks
Security
low - by default there is no security system that companies this protocol, thus creating a security risk.
Hope this helps
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Hey guys... I'm in a bit of a pickle
[backgroundInfo]
The program in question is used to communicate with an external device(fingerprint scanner). Im using the manufacturers SDK to achieve this. What basically happens in the code is a connection is established to the device via serial, lan or *modem. After the connection has been successfully established methods are called for retrieving data etc, etc.
*modem communication is my problem
[/backgroundInfo]
Now the serial and network work perfectly, the modem does not. The method to establish connection via modem is not documented in any way and the more i try and explain to the manufacturers(who cant speak engwish velly goot) to send me code examples of how to establish a modem connection to their hardware using their SDK, the more they send me manuals to create a new dial-up network connection in windows manually
Now the only "workaround" i can think of right now is to create a connection between the two GSM modems via a GSM wrapper that i found here on CP somewhere, and SOMEHOW emulate that connection to a serial port... That way i can just use the SDK's serial connection method which looks like this.
if (ZKclass.Connect_Com(comPort, deviceNumber, baudeRate))
{
}
I'm totally lost, im not even sure if this approach is possible.
Any thoughts and/or ideas are appreciated
Thank you
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Harvey Saayman wrote: Now the serial and network work perfectly, the modem does not.
...
the more they send me manuals to create a new dial-up network connection in windows manually
IMO when you success using LAN, the only thing you must do is establishing connection by modem and use same method with LAN does, but may be using TCP or HTTP or other methods that must be supplied by your manufacturer.
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
how to play a song using MCI ?(C#)
|
|
|
|
|
|
don't know whether this link solves your purpose, please specify which file format you want to play?
and please google first, before posting
http://www.codeproject.com/KB/audio-video/moemeka7.aspx[^]
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
How to create Round(Circle Shape)Button in C#?
|
|
|
|
|
|
// This method will change the square button to a circular button by
// creating a new circle-shaped GraphicsPath object and setting it
// to the RoundButton objects region.
private void roundButton_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
System.Drawing.Drawing2D.GraphicsPath buttonPath =
new System.Drawing.Drawing2D.GraphicsPath();
// Set a new rectangle to the same size as the button's
// ClientRectangle property.
System.Drawing.Rectangle newRectangle = roundButton.ClientRectangle;
// Decrease the size of the rectangle.
newRectangle.Inflate(-10, -10);
// Draw the button's border.
e.Graphics.DrawEllipse(System.Drawing.Pens.Black, newRectangle);
// Increase the size of the rectangle to include the border.
newRectangle.Inflate( 1, 1);
// Create a circle within the new rectangle.
buttonPath.AddEllipse(newRectangle);
// Set the button's Region property to the newly created
// circle region.
roundButton.Region = new System.Drawing.Region(buttonPath);
}
|
|
|
|
|
Is it possible to get an approximate sum of S defined as 1/2 + 1/4 + 1/8 to a certain number of counts? Say up to 1/16?
If so how does one write such a code in c# to achieve this?
Thanks
|
|
|
|
|
Angelinna wrote: If so how does one write such a code in c# to achieve this?
Personally speaking, I'd use a loop. It's the simplest way.
|
|
|
|
|
Just how does a loop get applied in this case.
|
|
|
|
|
You could use a Fraction/Rational number class or find the GCD of all the numbers, multiply them by the GCD, sum them all, then divide by the GCD.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
You can get much better than an approximation, you can get the exact value.
The sum of (1/2 + 1/4 + 1/8 + ... + 1/n) is (1 - 1/n).
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|