|
Its all about implementing a recursive function.
|
|
|
|
|
You're going to need a very large stack to calculate an infinite sum. I suggest you use a Turing machine; it can do anything!
|
|
|
|
|
is java and c# encryption supports each other
i want to send an encrypted xml by c# to java . i use rsacyptographyserviceprovider to encrpyt. how can i decrypt this in java. can you give me any clue or an article which i can refer.
|
|
|
|
|
Hi,
When i try to send mail from c# windows application all mails are blocked in Queue (C:\Inetpub\mailroot\Queue). How can i unblock the mails send from the windows application.
Why it is blocked?
Thankyou,
yesu
|
|
|
|
|
ypki wrote: Why it is blocked?
Your SMTP server won't be running. Check in the IIS manager to see SMTP service is running or not.
|
|
|
|
|
I am trying to create a relation between two datatables.Here is the code i am using
SqlConnection conDatabase = new SqlConnection(databaseConnectionString);
SqlCommand cmdDatabase = new SqlCommand("SELECT * FROM StudentModule",conDatabase);
SqlDataAdapter daDatabase = new SqlDataAdapter(cmdDatabase);
//Get Columns for DataRelation
DataColumn[] databaseColumns = new DataColumn[dsImport.Tables[0].Columns.Count];
for (int i = 0; i < databaseColumns.Length;i++)
{
databaseColumns[i] = dsImport.Tables[0].Columns[i];
}
OleDbConnection conSpread = new OleDbConnection(spreadSheetConnectionString);
OleDbCommand cmdSpread = new OleDbCommand("SELECT * FROM[Sheet1$]",conSpread);
OleDbDataAdapter daSpread = new OleDbDataAdapter(cmdSpread);
//Get Columns for DataRelation
DataColumn[] spreadColumns = new DataColumn[dsImport.Tables[1].Columns.Count];
for (int i = 0; i < spreadColumns.Length;i++)
{
spreadColumns[i] = dsImport.Tables[1].Columns[i];
}
//Create DataRelation
DataRelation r = new DataRelation(string.Empty,databaseColumns, spreadColumns,false);
dsImport.Relations.Add(r);
The problem is that when i debug and step into the code the debugger does not go into the for loops,and therefore does not load the columns.What could be causing this plz help?
|
|
|
|
|
Looks you missed the statement to fill the DataSet.
daDatabase.Fill(dsImport)
Regards,
Syed Mehroz Alam
|
|
|
|
|
Thank you very much.i did not see that
|
|
|
|
|
i filled the dataset but it is still doing the same thing.
Anything else i'm missing???
|
|
|
|
|
It seems that you want to fill the same dataset in both the queries. Are you sure you are using the correct overload of Fill()[^] method.?
|
|
|
|
|
yes I want to Fill thesame dataset so that the comparison can be done and then create a third datatable
|
|
|
|
|
I am still foggy on this concept. Let me explain what I grasp (or think I do) so far. I will use this code as reference:
class TestClass
{
private int privVar = 5;
public int PubVar = 3;
}
(I know I am missing some code, but Im trying to keep it simple)
A private instance variable can only be modified within the class it was declared in. Or, within the method it was declared in.
A Public instance var has the same rules but also can be accessed by using it this way:
TestClass testClass = new TestClass();
int x = testClass.PubVar();
All of the books and articles I have read say that using public instance variables can be dangerous. Its not that I dont believe them, I just dont understand where the harm lies. In my current view, it seems like a person would have to instantiate your class by accident somehow, then use the testClass.PubVar(); (or w/e they named it) without know it is yours and not theirs?
Maybe because I am still learning C# and dont know of other ways that you can harm your variable? The reason why I bring this up now is because I am taking on the Get() and Set() methods, and the logic behind them is really confusing me.
I hope I am being descriptive enough of my problem, I was hoping to avoid a huge wall of text but maintain as much clarity of my question as possible.
Thanks
|
|
|
|
|
It can be "dangerous" to expose your class variables to the public, because your class has no idea that the outside world has changed the value.
If your class needs to know that the value has changed, then it's best to wrap it in a property, so you can add extra logic in the set method to deal with the new value.
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
I would suggest you look up encapsulation and/or information hiding to read about this. I'd add a link to wikipedia, but I didn't think the article there was too helpful - Google should suffice though.
Hope this helps,
Chris
|
|
|
|
|
can someone help me, need it badly.
|
|
|
|
|
I have an application that contains a dataset with a few datatables. I have a few .csv files that I'd like to load into the datatables. Can that be done? If so, how?
Thanks!
|
|
|
|
|
Open the .csv file with a StreamReader, read each line, then do a String.Split on the
commas (do this for each line).
Then insert the rows into the database.
Cheers,
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
Click here to view my blog
|
|
|
|
|
Thanks for your quick response! The CSV file is pretty big, it has approximately 15,000 rows of data. Is that the most efficient way?
Thanks!
|
|
|
|
|
Its the quickest way that i'm aware of. If your only doing it once or twice, time shouldn't be an issue, it'll be done before you can get a coffee...
Cheers,
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
Click here to view my blog
|
|
|
|
|
Does it have ot be done using code?
Otherwise, assuming you are using Sql, right click on the db, select Tasks > Import data and follow the wizard
|
|
|
|
|
Hi, A few weeks back i found a good article here on CP to do with running a new process from within your own form. It was as if the form was redirecting graphical output and input to the process.
Basicly, the form opened, and the process you defined (iexplore.exe or notepad.exe) would open and run from within your form, not in their own.
At the time i bookmarked, but i have had to reformat and lost all my bookmarks.
I spent over an hour thismorning, and just spent another hour looking through all the C# articles for this one.
I was wondering if someone knew what i was talking about and could point me in the right direction?
|
|
|
|
|
|
Ah my friend you are yet again my saviour.
Thank you. Yeah i love your windows tabbifier, i already use it on my computer, helps keep applications tidy.
But the second link is the exact article i was looking for.
Thank you so much.
|
|
|
|
|
Glad to help you Nice to hear that you are using my app If you have any suggestions please post them at the article. By the way, you could have found the article you were looking for in the references of my article
|
|
|
|
|
Yeah its an awesome app, normally i would just code my own using yours as a base but yours has all you could need just to keep things tidy when your running alot instead of the built in Taskbar grouping in XP.
If i come up with any suggestions ill let you know
Ohh its referenced in your app! Now i remember, thats how i found it in the first place!
|
|
|
|