|
Yea. Can you show me some links plz ?
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:00am.
|
|
|
|
|
not it isn't, but i would like to know some good places
|
|
|
|
|
type this in google:
c# file transfer using socket
there are so many samplee and tutorials
|
|
|
|
|
Many of which are bad.
However, Google's ranking is probably no worse than the equally random replies one obtains here or on other forums. After all, how can the OP know if a link someone posts here is to a particularly good article, especially if the user just did a quick search and posted some result(s) from there without further ado?
|
|
|
|
|
i have a registry keys for mobile operators in Bahrain..
-- CURRENT_USER
------- Software
----------- MySoftware
------------------ Mobile Operator
and below that:
---------------------------- Batelco
---------------------------- Zain
---------------------------- STC
for every operator I have list of strings represents the mobile number range
for example f, for Batelco:
String : 39
Value : 39
String : 38
Value : 38
for Zain:
String : 36
Value : 36
String : 37
Value : 37
For STC:
String : 33
Value : 33
I want to read all in my C# program and validate a txtMobile textbox so that it has to start with one of the numbers there (it might be 2 left digits or 3 left digits or may be more or less)
|
|
|
|
|
OK, so what are asking? Are you asking how to do it? Are you asking for someone to do it? Are you having issues with doing it?
Also, please read this[^] and look at item #3. "Can anyone help plz" is not a very descriptive subject.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Search for "how to read registry" or look at the RegistryKey class in the MSDN doc[^].
|
|
|
|
|
Three days later...why are you responding to my post instead of the OP?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Maybe I was careless and should have responded to his. I am terribly sorry for the inconvenience.
|
|
|
|
|
Hi all,
I have a datagrid with 4 columns, 1st column is a combobox named "clmOptionNames" where i need to load the values from an combobox named "toolStripComboBox1" who is located outside the datagridview, the rest of the datagrid have values from a webservice and is loaded through the datasource.
Is there anyone who know how to get the content from one combobox and then insert it into a datagridview combobox? the combobox is located at column 0 in the datagridview.
|
|
|
|
|
ah forgot to drop in my code....
frm_Rights frmRights = new frm_Rights();
if (toolStripComboBox1.Text.ToString().Length != 0)
{
frmRights.label1.Text = toolStripComboBox1.Text.ToString();
frmRights.dataGridView1.Columns[1].HeaderText = "User Name";
frmRights.dataGridView1.Rows.Add("", "user1", "16-08-1971", "16:00:00");
frmRights.dataGridView1.Rows.Add("", "user2", "24-08-1983", "12:00:00");
BindingSource bindCombo = new BindingSource();
bindCombo.DataSource = toolStripComboBox1.Items;
DataGridViewComboBoxColumn datagridCombo = new DataGridViewComboBoxColumn();
datagridCombo.HeaderText = "Hello";
datagridCombo.DataSource = bindCombo;
frmRights.dataGridView1.Columns.Add(datagridCombo);
frmRights.ShowDialog(this);
}
The above code works well fine enough - only with the exception that it dont load the content into column 0 but just add a new column onto the datagridview.
|
|
|
|
|
codeproject-template.zip is empty, there is a thread with three posts saying this but no answer in a month, so I just wondered if anyone had a copy and could publish a link to it.
Thankyou
I had to sign up, I felt a bit guilty borrowing code ideas and not giving anything back.
|
|
|
|
|
|
Yes, because the code I want to post is C#.
I had to sign up, I felt a bit guilty borrowing code ideas and not giving anything back.
|
|
|
|
|
Rassler48 wrote: Yes, because the code I want to post is C#.
Can you tell me which template you are interested in?
|
|
|
|
|
|
hello,
i discovered this page because of an important need of a c# programm which enables me to plot a mathematical funtion im calculating with my own c# program.
i discovered : 2D Math Curve Presentation for your Project which is exactly what i need: easy and simple.
The problem is that it wont work -due to its date
is somebody able to fix the 2 errors?
Error 1 The call is ambiguous between the following methods or properties: 'System.Math.Floor(decimal)' and 'System.Math.Floor(double)' C:\Documents and Settings\admin\Local Settings\Application Data\Temporary Projects\WindowsApplication2\CurveCalc.cs 291 26 WindowsApplication2
error 2
message loop on a single thread is not a valid operation. Use Form.ShowDialog instead.
to this function:
Application.Run(new GraphPlot(funcstr,xs,xe,nump));
waiting for comments
|
|
|
|
|
Normally I would say you should ask in the article's forum but the author doesn't seem to respond to messages there.
THe first problem is because the Math.Abs function returns an int so the Floor method doesn't know which overload to use. The easy way around this is to cast the result to a deciaml or double depending on your needs:
redwx=(int)Math.Floor((decimal)(Math.Abs((int)Math.Log10(lox))));
I don't get the second error at all, if I remove the default Program.cs and replace it with the MainFile.cs all works perfectly.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
At first i have to thank you for looking in the code and your effort.
I call the funtion from a class within a public void method and it wont work. I have no idea what [STAThread] in line 8 of the original mainfile does. maybe it's because of that?
P.s: "Normally I would say you should ask in the article's forum but the author doesn't seem to respond to messages there." Thats exactly why i posted here.
|
|
|
|
|
MSDN/Google is your friend, Single-Threaded Apartment.
You probably don't need the MainForm class at all - all you probably need is to copy the code inside the Main method to your own method and instead of the Application.Run, just intanciate then display the form.
GraphPlot graphPlot = new GraphPlot(funcstr, xs, xe, nump);
graphPloat.Show();
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Seeing as it's a graph you should cast it to double. Decimal would work too, but is more expensive and offers no benefit in this application.
Try this: Open a new tab. Type "javascript:alert(0.1+0.2)" in the address bar. Now gape at the result, which is close to but not quite 0.3 - and read on to stop gaping.
Decimal is a type that can represent decimal numbers accurately. Computer hardware is of course made for working with binary numbers.
It is not possible, in general, to represent numbers in different bases accurately using the same number of digits, and sometimes not using *any* number of digits (though it is always possible to represent rational numbers as ratios in any base, and never possible to represent any irrational number as a ratio, in any base). For example, one third is an infinite sequence in base ten (0.33333333...) but it is simply 0.1 in base 3.
Decimal is useful in financial applications where it matters that base-ten numbers are exactly represented, but they are comparatively slow since your computer hardware doesn't have instructions to do arithmetics with them. The type must instead provide a software algorithm that manipulates the bits representing a decimal number. By all means, you'll probably never notice any difference, but in general, use double whenever you don't need an exact decimal-number representation. This is a case of drawing a graph, hence of mapping the value in question to a pixel, and it resolutely doesn't matter if it always snaps to the pixel it would have done if you used a decimal, so clearly the correct choice is double.
|
|
|
|
|
Hi,
I need to alter table programatically in dataset, I need a new column.
Can you please give some example/article about it.
Daniel.
|
|
|
|
|
DataTable dt = ?;
dt.Columns.Add(new DataColumn(typeof(DateTime));
An article about this one statement would seem overkill.
|
|
|
|
|
Hi,
I want to know what's the best way to return value from a fuction in a web service. Presently, a true value is returned if function ran successfully and a false value if not.
So my question is how can i return a value in between them (like true and false value). For instance, a function can get crashed while doing something inside, connecting to the database or couldn't delete a locked file and several other reasons.
I have created functions like these.
public bool AddUser(string username)
public bool DeleteUser(string userID)
public bool GetUser(string userID)
public bool DeleteFile(string fileID)
|
|
|
|