|
I prefer to get DLLs along with the source code.
I think an open-source project should allow people to read and compile the code, but not require them to.
I don't like having to build other peoples' code, though at least it's easier with .net (due to limited operating system and compiler support ).
One of my worst experiences was trying to build an OpenVMS version of a Perl module (a driver for RDB); I never got it to compile.
My best experience was compiling the MySQL ADO.net connector, the only problem is all the warnings about Obsolete methods.
|
|
|
|
|
Hello
I want create a file fox (*.dbf) which has 3 fields (ID, NAME, MOBILE). Then I need insert data to this file. Example:
1, Mr Join, 0912555666
2, Ms Angela, 0123666777
----------------------------------------
You can help me? There are examples as possible. Thank you very much!
|
|
|
|
|
No idea what you are asking. Please clarify.
|
|
|
|
|
Why DBF, this format is no longer used in any applications that I know of (possible exception is Foxpro). I suggest you look into another database, Access or SQL Express and there are a couple of others out there that will be a better option than DBF.
You cannot "write" to a .DBF file using filestream, you have to create a connection to the file, you may be able to use the Jet engine, try connectionstrings.com
You could also use XML for small data sets.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
How can I print content of richtextBox in C# ?
Hello Friends
|
|
|
|
|
|
is there any easier way to do it
or
can we do it through another control
Hello Friends
|
|
|
|
|
well it is pretty easy by itself just dig into the sample code
Regards,
Lev
|
|
|
|
|
That's about as "hand to you on a silver platter" as it's going to get.
|
|
|
|
|
Hi friends...!
I'm developing a exe which converts pdf file to jpg/image file.
I searched web to find some code.But I couldnt find any.
Can anyone help me to do this.
I know this is a simple task.But I'm new to C#.
I'm happy if anyone can guide me to achieve my task.
I'm using VS 2008 express edition.
Thank you.
charithmax
|
|
|
|
|
Try iTextSharp[^] this is a PDF lib for .net
Regards,
Lev
|
|
|
|
|
I download a sample file in this site http://msdn.microsoft.com/en-us/library/bb676897.aspx
I'd like to use "Windows Live ID Client Sample" with delphi 2007 or delphi7.
I tried to import " Microsoft.WindowsLive.Id.Client.dll" but Delphi is just made connect functions.
When I show with VS2008, I can use my features function.
How can I use this dll or not?
Thank you
|
|
|
|
|
If you're asking how to use the dll in Delphi, then I guess you've got the wrong forum.
Try to ask the same question on some Delphi for .Net forums
Regards,
Lev
|
|
|
|
|
If the Delphi you're using doesn't target the .NET Framework, you'll need to write a COM-exposed wrapper, using C# or VB.NET or some other .NET targeted language, around the classes and methods you want to use in this .DLL so Delphi can use it.
|
|
|
|
|
Suppose I have a long byte that can represent some GBs and I want to read it for example as:
2 GB, 11 MB and 25 KB
I'm not interested in dividing it by (1024^3) for GB as an example to see 2.02 GB, I want to know how much is that 0.02 GB in MBs and KBs
Please help!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: I'm not interested in dividing it by (1024^3) for GB as an example to see 2.02 GB, I want to know how much is that 0.02 GB in MBs and KBs
Use the Math.Floor function for this. 2.02 - Math.Floor(2.02) is .02. You can then work out what that .02 is in MB, and do the same to get a remained for KB.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Brilliant as always
Thanks Christian!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Christian Graus wrote: Math.Floor(2.02) is .02
No, it's not. Math.Floor(2.02) is 2.0.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: No, it's not. Math.Floor(2.02) is 2.0.
Not quite. He said 2.02 - Math.Floor(2.02) , which works out to 0.02.
|
|
|
|
|
Hey Guffa,
Guffa wrote: No, it's not. Math.Floor(2.02) is 2.0.
True, yet it was what I needed, this's how I finally managed it:
private decimal factor(int y)
{
return (decimal)Math.Pow((double)1024, (double)y);
}
private string format_bytes(long lng_Byte)
{
string str_value = "Infinity";
if (lng_Byte <= factor(5) && lng_Byte >= factor(1))
{
if (lng_Byte >= factor(1) && lng_Byte <= factor(2))
str_value = Math.Round(lng_Byte / factor(1)).ToString() + " KB";
if (lng_Byte >= factor(2) && lng_Byte <= factor(3))
str_value = Math.Floor(lng_Byte / factor(2)).ToString() + " MB" + " And " +
Math.Round(((lng_Byte / factor(2)) - Math.Floor(lng_Byte / factor(2)))
* (factor(1))).ToString() + " KB";
if (lng_Byte >= factor(3) && lng_Byte <= factor(4))
str_value = Math.Floor(lng_Byte / factor(3)).ToString() + " GB" + ", " +
Math.Round(((lng_Byte / factor(3)) - Math.Floor(lng_Byte / factor(3)))
* (factor(1))).ToString() + " MB" + " And " +
Math.Round(((lng_Byte / factor(2)) - Math.Floor(lng_Byte / factor(2)))
* (factor(1))).ToString() + " KB";
if (lng_Byte >= factor(4) && lng_Byte <= factor(5))
str_value = Math.Floor(lng_Byte / factor(4)).ToString() + " TB" + ", " +
Math.Round(((lng_Byte / factor(4)) - Math.Floor(lng_Byte / factor(4)))
* (factor(1))).ToString() + " GB" + ", " +
Math.Round(((lng_Byte / factor(3)) - Math.Floor(lng_Byte / factor(3)))
* (factor(1))).ToString() + " MB" + " And " +
Math.Round(((lng_Byte / factor(2)) - Math.Floor(lng_Byte / factor(2)))
* (factor(1))).ToString() + " KB";
}
else
str_value = lng_Byte + " Bytes";
return str_value;
}
Thanks Guffa.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Use the divison (/) and modulo (%) operators to split the size value:
long size = 2159043692;
long b = size % 1024;
size /= 1024;
long kib = size % 1024;
size /= 1024;
long mib = size % 1024;
size /= 1024;
long gib = size;
Console.WriteLine("{0} GiB, {1} MiB, {2} kiB and {3} bytes", gib, mib, kib, b);
Output:
2 GiB, 11 MiB, 25 kiB and 108 bytes
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
Can anyone tell me if it is possible to draw shapes and have them visible in the visual express editor. I can draw them in my code but it would be easier to use in the form editor. I was hoping to be able to add rectangles and lines just like buttons and menus...
|
|
|
|
|
No, Visual Studio, even the most expensive versions, is still not a painting program. You want to draw lines, the IDE doesn't give you much to help. I find using graph paper is a good way to work stuff out if you need to.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I was really after a way to add a flow chart to my program. Any ideas
|
|
|
|