|
Works like a champ!
--had to do a little bit of modification as you had the nodelevel declared as a 1 so it would then increment to 4 before ever actually reaching the desired point...so mod it to a 0 rather than 1 and its pretty...course i could have just changed the if == to value to 4, but then it would not have been the soulution i was looking
Thanks a bunch!
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
Hello all,
How can i count the nuber after the decimal point.
Please Help
Thanks
Hoho
|
|
|
|
|
Can you provide more information? I did not understand what you meant by count the number!!
|
|
|
|
|
Thanks for your reply
I need to count how many numbers after the decimal point for instance if 3.44 or 3.4 i need to count how many number after the decimal point it is now two number in the frist number and one number in the frist number.
Thanks for your time
Best regards,
Hoho
|
|
|
|
|
Very tricky.
The problem is in the datatype you use to represent the number. Floating points don't accuratly represent the number they are supposed to. It could be off by a very small amount. Thus, if you have a number like 17.2, the internal representation may be 17.1999999. Your may want 1, because 17.2 is the real value, or you may want infinity, because the real value repeats for ever.
How important is it that you can do this?
Roy.
|
|
|
|
|
Hello!
One thing that comes to mind is to convert the number to a string and then search for the decimal separator:
int FractionDigits(double d)
{
string s = d.ToString();
int i = s.IndexOf(System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator);
if (i<0)
return 0;
else
return s.Length-i-1;
} The maximum number you'll get depends on how double.ToString() formats your number. Usually you'll get up to 15 digits, but that's enough for most practical cases.
Regards,
mav
|
|
|
|
|
Hi,
Please anyone tell me, how can i include an image in my C# project and refer it.
Currently i am referring to a image in my hard drive, but i wish to include it in my project as a resource.
Any help will be appreciated..
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
You can check out the "Making it pretty" section of Building the CVS Root File Changing Utility.
In short, you add the image to your project, make it an embedded resource, and then use GetManifestResourceStream to get the image.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Gee thanks man..
That was a lot of help.
I'll try it out and tell you tomorrow.
Thanks a lot.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
OK. I have followed the simple examples found to produce a C# dll, which I can then use with RegAsm to produce a tlb file....and the end result is that I can call the original C# from within ASP/VB6. This all works fine.
However, if I amend the simple Library project to include a reference to a web service and follow the same steps (Adding a strong name file, compiling and running regasm), I end up with a strong name key error when using RegAsm. I have tried both manually compiling and also from the project.
So, I have tried separately creating a proxy class using wsdl...and then compiling this cs file into a dll, and then setting a reference to this dll in a separate servicedcomponent project. When compiling I get 'Assembly generation failed -- Referenced assembly xyz does not have a strong name'. Therefore I assume I need to apply the strong name separately to the Web Service Reference before compiling my ServicedComponent?
Fine, so I go back to the web consumer cs file, and compile it using csc /target module so that I get a netmodule, and then use Al.exe to try and link the module with the strong name. To use Al.exe I pass in the name of the dll/strong name file....and the 'Unspecified Error' that comes back complains about the original cs file which was used to create the netmodule!
Any ideas?
|
|
|
|
|
OK, I have managed to run this again and avoid the error from the the Al.exe.
|
|
|
|
|
I'm trying to fill a dataset with a DataAdapter.
OracleCommand cmd = new OracleCommand(cmdStr, conn);<br />
OracleDataAdapter oda = new OracleDataAdapter(cmdStr, conn);<br />
DataSet ds = new DataSet();<br />
oda.SelectCommand = cmd;<br />
oda.Fill(ds);
For whatever reason, it gives me this error:
Oracle.DataAccess.Client.OracleException: ORA-00903: invalid table name
Can someone help me?
Stack Trace:
<br />
Line 104: DataSet ds = new DataSet();<br />
Line 105: oda.SelectCommand = cmd;<br />
<big>Line 106: oda.Fill(ds);</big><br />
Line 107: dgWHR.DataSource = ds;<br />
Line 108: dgWHR.DataBind();<br />
[OracleException: ORA-00903: invalid table name]<br />
Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)<br />
Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src)<br />
Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)<br />
Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br />
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)<br />
WhoHasRoutes.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\ferrellgas\whohasroutes\default.aspx.cs:106<br />
System.Web.UI.Control.OnLoad(EventArgs e)<br />
System.Web.UI.Control.LoadRecursive()<br />
System.Web.UI.Page.ProcessRequestMain()
Thanks in Advance
Scott
|
|
|
|
|
Hello,
It is nothing to do with DataAdapter. It seems that the db query contains invalid table name.
According to ora-codes.com
ORA-00903: invalid table name
Cause: A table or cluster name is invalid or does not exist. This message is also issued if an invalid cluster name or no cluster name is specified in an ALTER CLUSTER or DROP CLUSTER statement.
Action: Check spelling. A valid table name or cluster name must begin with a letter and may contain only alphanumeric characters and the special characters $, _, and #. The name must be less than or equal to 30 characters and cannot be a reserved word.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
My query is a query with a bunch of nested Select statements.
When i run the query in PL/SQL developer it returns results fine. Direct copy / paste.
|
|
|
|
|
Try simplifying the SELECT statement to use fewer nested queries. I don't know for sure, but you might be limited to a single SELECT keyword when using a DataAdapter...? Anyone, feel free to correct me here!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 12:03 Thursday 22nd December, 2005
|
|
|
|
|
Hello,
Can you paste the db query here. There might be something related to string manipulation in C# or .net related issue.
Cheers.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
My registration page contains fields,register submit button and also a user control inside this page. i have username, password fields and Login submit button in this user control. in both user control and registration page i have used RequiredFieldValidator. so, when i try to login to my application by providing userid and password it is not entering into the application because it is validating registration page required fields and also if i fill all required fields in registration page and when i click on register submit button the records are not saving it is validating login screen required fields. how do i correct this problem? since i cannot validate fields in javascript because it is a multilingual application. pls. help me out.
|
|
|
|
|
Try implementing the validation controls in the user login control itself.
|
|
|
|
|
How can i send and Receive Messages from one application to another or passing a varaible from one application to another
Amit Grover
CDAC R&D
|
|
|
|
|
|
i would like to use winAPI instead of Inter-Process Communication in .NET Using Named Pipes,. plz send me e.g if possible
Amit Grover
CDAC R&D
|
|
|
|
|
A.,
I don't think anyone on this board will give a shrink-wrapped solution to your problem. Interprocess communication can get messy depending on how you implement it. If you don't already understand what you're doing, then you need to get some education regarding the matter.
However, you have a lucky star over your head because I found two articles right here on CodeProject that you can read. You will then know for what you ask and two methods for doing it in the Win32 API.- Interprocess communication tutorial, by Alex Fr
- Interprocess Communication using Shared Memory, by Zoran M. Todorovic
Now that I've helped you find articles, you need to help yourself by reading them.
I gather that you don't know how to make calls to the Win32 API from C#. I will start you in the right direction: search this site or the Internet for "p/invoke". You will find what you need.
Sincerely,
Curtis Schlak.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
|
i am looking for win32 api functions for send and recieve messages
Amit Grover
CDAC R&D
|
|
|
|
|