C#
|
|
 |

|
A non C# solution - you might want to try and use Comet notifications[^].
|
|
|
|

|
Hi all, I am trying to create a method that allows users to convert a Word document to other kinds of files like PDFs, text files, etc., and that means using Word library and Word components. These need the Office Interop Word Assembly to work and I heard that hosting companies won't install it for you because of the licensing fee and they won't let you install it on their web server unless you sign up for a dedicated server. Are there open source alternatives out there that I can use? Thanks in advance.
modified 17 Sep '12 - 11:17.
|
|
|
|

|
Yes, you can use the OpenOffice API for .NET to manipulate Office docs programmatically. I've used it before, and it works.
However, if you do decide to use it, be warned: it's not easy, and it's very poorly documented, not to mention intuitive. But if you do get it working, it's a wonder.
Good luck!
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
|
|
|
|

|
Sounds like something that would be well worth reading as an article.
|
|
|
|

|
I would actually post it, if I'd remember how to do it. I may be able to dig the source though. Nice idea though, I was actually thinking about an article on automating some stuff, although not Office files. Thanks for the idea!
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
|
|
|
|

|
Hello friends
I am practicing C# by solving the Problems in projecteuler.net. Now I am working on 20th one.
I create a project and here it is my code:
const int number = 100;
double fact = Library.Math.Fact(number);
BigInteger bigInteger = new BigInteger(fact);
int sum = 0;
while (bigInteger > 0)
{
sum += (int)(bigInteger % 10);
bigInteger /= 10;
}
Console.WriteLine("Sum of the digits int the number {0}! is {1}", number, sum);
static double Fact(int number)
{
return number == 1 ? 1 : number * Fact(number - 1);
}
It is absolutely fine, isn't it?
I have tried the small number that I can calculate manually and the result given was correct. But when I give to the site the rsult of my code it doesn't accept the answer.
What's wrong with my code?
modified 18 Sep '12 - 9:40.
|
|
|
|

|
Meysam Tolouee wrote: It is absolutely fine, isn't it?
Depends on how you define "fine".
Well first, your recursive alogorithms could be an iterative one, that would be even finer.
Next: for large number you round, because the precision of double may be not good enough. So there are rounding error for large numbers.
By the way, I didn't downvote you and I wonder why someone did.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|

|
I just changed the output of method Fact() from double to BigInteger.
Now it really works fine.
Fine means it gives me true result.
|
|
|
|

|
Meysam Tolouee wrote: Now it really works fine.
Fine means it gives me true result.
Ok, if it's fine for you, it's fine for me, too
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|

|
ihoecken wrote: By the way, I didn't downvote you and I wonder why someone did.
I've just counter-voted, but I have a suspicion as to why he was univoted.
|
|
|
|
 |
|
|
General
News
Suggestion
Question
Bug
Answer
Joke
Rant
Admin