|
You cannot determine that on your own. You need a server on the other end that will be able to send and receive with a bandwidth superior to your own, and you can then test against that server, but the bandwidth will always be the bandwidth of the weakest link.
|
|
|
|
|
You need some files of known size. Start the upload of the smallest of them, determine the time required for uploading, and then calculate (please note: bandwidth is typically in bit per second, while file size is in bytes, i.e. that "100MB" connection should translate into 12.5 MegaBytes per second). If that did not take far too long, take the next bigger file and so on - the result has the smallest error for the biggest file.
Of course, repeat that for download.
And, as Michel Godfroid pointed out, be certain that on the other side the connection is better than on your side.
|
|
|
|
|
They also use a different kind of "mega".. as in 1000000 instead of 1048576
|
|
|
|
|
Hi guys,
I develop a csharp smart device.I want know now fill my combobox with data extractedfrom my database .mdf(wishing that the TCP/IP goes well and the connection to my local server works well ).
My code is:
string sConnection = "Provider=SQLNCLI.1;Persist Security Info=False;User ID=sa;Initial Catalog=GMAO;Data Source=127.0.0.1,1433;Password=sa;";
string sSQL = "SELECT com FROM energie; ";
SqlConnection conn = new SqlConnection(sConnection);
SqlCommand comm = new SqlCommand(sSQL, conn);
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(sSQL,conn);
SqlDataReader dr = null;
try
{
comm.Connection.Open();
da.Fill(ds, "SQL Temp Table");
foreach (DataRow d in ds.Tables[0].Rows)
{
MessageBox.Show("xxxx");
comboBox1.Items.Add(d.ItemArray[0].ToString());
}
}
catch (SqlException ex)
{
MessageBox.Show("connexion impossible");
MessageBox.Show(ex.Message);
return;
}
dr.Close();
comm.Connection.Close();
Still not filled after running .
what is the problem???
Thanks
|
|
|
|
|
I suggest you run it under the debugger and see if a) there's a table in the dataset, and b) if there are rows in the table.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi,
I really don't know to run it under the debugger???<
Thanks
|
|
|
|
|
Put a breakpoint in the code at the point you want to break it. There's a shortcut to do this: press F9. Ensure you've built the code as a Debug build and press F5 to run it in debug mode. When your code hits the breakpoint, you can step over code using F10. To step into a function, press F11. To inspect the value of a variable, you can use the locals window, or the quick watch, you can inspect it with the immediate window or you can hover over the input in the running code and see the values in the visualizer.
It's that easy, and you really need to learn how to debug your code - it's a vital skill.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
It's almost impossible to help you until you learn how to use Visual Studio.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi,
It is not a problem if u don't like me to help me.There are always some starters in any field u know.The experimental ones try to help them.So,I am a starter .If u try to help me,thank u a lot of u collaborativ caracter.Else,it is not time nor place to give me tips
Thank u a lot
|
|
|
|
|
Hi "Starter",
After reading your answer, I think I should give you a tip.
You seem to be a beginner in programming - otherwise you would know how to debug your code (with or without a debugger...)
Many members on codeproject are real experts, ask them if you have a real problem.
But before that, learn how to use your tools and language. No one likes the kind of "beginner" unwilling to learn and asking "questions".
Developing for a smart device is even more challenging than for a PC platform - (I do it a lot)
So if you still have the problem with your combobox and the problem is unspottable during debug - contact me - i will try to help you
|
|
|
|
|
I suggest you read and study this article[^], even if you are using a different version of Visual Studio.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
Good morning,
I am working on a smart device application.
I want to create a listbox with 3 columns which get there data from a local database .sdf
I tried the following code but an exception occurred.
private void button1_Click(object sender, EventArgs e)
{
string wCS = @"Data Source =\Storage Card\ModeDifféré\BaseGmaoLocale.sdf;";
SqlCeConnection sqlceconn = new SqlCeConnection(wCS);
SqlCeCommand command = sqlceconn.CreateCommand();
command.CommandText = "SELECT [ID]+\" \"+[Magasin]+\" \"+ [qtyonhand] AS IMQ from stocks where ID like %@txt%";
SqlCeDataAdapter adapter = new SqlCeDataAdapter(command);
SqlCeParameter txt = new SqlCeParameter("@txt", SqlDbType.NVarChar);
txt.Value= textBox1.Text;
command.Parameters.Add(txt);
DataSet ds = new DataSet();
adapter.Fill(ds);
listBox1.DataSource = ds.Tables[0];
listBox1.DisplayMember="IMQ";
}
this is the exception
there is an error parsing the querry. [token line number =1, token line offset=77, Token in error = %]
thank you in advance.
|
|
|
|
|
Of course there's an error...your select command is not written correctly.
This is what it looks like to SQL:
SELECT [ID]+" "+[Magasin]+" "+ [qtyonhand] AS IMQ from stocks where ID like %@txt%
You need to look at a SQL reference and see how to write a proper SQL Select statement.
Why did you put in +\" \" ? Where in the world did you see that.
And please, start using proper naming conventions. When you add a control, change it's name to reflect what it is and what it holds. Take a look here: Naming convention[^]
|
|
|
|
|
hello
I would like to know the role of substitution in our applications, I searched but I don't understand its usefulness.
thank you
|
|
|
|
|
Are you talking about Substitution Class i.e; <asp:Substitution /> ?
Check its usage and examples here
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Hi,
Can anyone recommend a library that I can use for my winforms .net project to generate barcodes of different types/formats?
Thanks in advance.
Rafferty
|
|
|
|
|
|
Thanks for the reply. I was hoping for a linear barcode generator, our intended barcode scanner will not be able to read 2D
Rafferty
|
|
|
|
|
search the CodeProject articles, there are many on barcodes.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
hi all,
i am trying to export my C++ functions to C#. and i have succeeded in exporting them. while importing the functions. now to one of such functions, i want to pass two newly defined functions in C# as arguments, how should i achieve this. kindly help me.i am very badly in need of the solution to complete my project.
this is how i have implemented:
1. function exporting from C++:
extern __declspec(dllexport) bool Callregistercallback(CRTSPWrapper* pObject,funccallback fptr_video,funccallback fptr_audio,void* ptr);
where funccallback is a function pointer
2. function call in C++ test application
m_oSarixrtsp->registercallback(GetVideoPacket,GetAudioPacket,NULL);
where GetVideoPacket and GetAudioPackets are functions that are defined in the main of C++
3.function importing in C#
[DllImport("sampleclient_dll.dll", CharSet = CharSet.Ansi)]
static private extern bool Callregistercallback(IntPtr pTestClassObject,IntPtr fptr_video,IntPtr fptr_audio,IntPtr ptr);
4.function defintion in C#:
here i have defined two delegates to the functions namely Getvideopacket and getaudiopacket as follows:
public delegate void getadelegate(char[] pBuffer, int nSize);
public delegate void getvdelegate(char[] pBuffer, int nSize);
public bool registercallback([MarshalAs(UnmanagedType.FunctionPtr)]IntPtr fptr_video, [MarshalAs(UnmanagedType.FunctionPtr)] IntPtr fptr_audio, IntPtr ptr)
{
getvdelegate objv = new getvdelegate(Getvideopacket);
getadelegate obja = new getadelegate(Getaudiopacket);
return Callregistercallback(this.m_pNativeObject, fptr_video, fptr_audio, ptr);
}
5.function call from test application in C#:
testclass.registercallback(Getvideopacket,Getaudiopacket,null);
this is resulting in a compile time error stating: cannot convert a System method to System IntPtr.
Kinldy help me out please. thanks in advance.
regards
sindhu
|
|
|
|
|
There is quite alot of code here interspersed in mixed languages with non code which makes it rather difficult to find what is what.
Could you edit you post wrapping the code parts in <pre> </pre> tags (you can highlight the code and click the 'code block' link above to do this automatically)? It would be helpful if you could use different pre blocks for each language section.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
that is unreadable, lacking PRE tags; as it involves P/Invoke, maybe this[^] helps.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
sindhumahe wrote: and i have succeeded in exporting them
Are really certain that you have succeeded?
It seems not.
First you need to ensure that your function is exported property.If you use the definition:
extern __declspec(dllexport) bool Callregistercallback(CRTSPWrapper* pObject,funccallback fptr_video,funccallback fptr_audio,void* ptr);
without appropriate definition of the function inside the library module definition file,or without setting configuration the compiler to compile the lib as C code you will be unable to call it using:
[DllImport("sampleclient_dll.dll", CharSet = CharSet.Ansi)]
static private extern bool Callregistercallback(IntPtr pTestClassObject,IntPtr fptr_video,IntPtr fptr_audio,IntPtr ptr);
That happens because by default every function is compiled as C++ code not as C code and C++ uses names decoration to avoid conflicts between functions with the same names but with different arguments.
Refer to this article for more details how to properly export your functions.
Life is a stage and we are all actors!
|
|
|
|
|
Hi,
I'm trying create a sample ActiveX control. In this process, I need to create a cab file from setup exe file using CABSDK. Please guide me. Thanks in advance.
|
|
|
|