|
You should open and read Excel File then Insert it's value in Mysql database.
Add refrences Microsoft.office.Introp.excel to read excel file.and Use SQL Connection and Query to save it on Mysql.
If you can think then I Can.
|
|
|
|
|
ok sir . i think that would be good option please do this. and how me demo how can i implemet in my project.
thanks in advance
naim khan
|
|
|
|
|
Read the excel, connect to MySQL and do insert.
जय हिंद
|
|
|
|
|
try this[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I want to write a program that use global WH_CALLWNDPROC hook.
First,i write a SystemHook.dll in vc++.Then,write a program using SystemHook.dll in C#.If the hook type is WH_MOUSE_LL,the program is ok.
If the hook type is WH_CALLWNDPROC,the system and the program will be broken.
please tell me why,and how can i do,thanks a lot!
|
|
|
|
|
If you just want to get WndProc, use :
Override in form class :
protected override void WndProc(ref Message m)<br />
{<br />
base.WndProc(ref m);<br />
}<br />
|
|
|
|
|
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
}
The Method that you give me can only process the current program,can not process windows xp system WndProc.I want to get global system WndProc.
Thank you,stancrm!
|
|
|
|
|
It's probably because mouse and keyboard hook callbacks occur in the context of the application that set the hook, whereas WndProc hooks occur in the context of the application executing WndProc. Was your hook setting application managed when you tried mouse hooking in C#?
|
|
|
|
|
On his blog, Roger Alsing describes a very interesting program. I wonder if it can be improved....?
Here you can find a file with Dan Bystrom’s improvements [to the EvoLisa program], plus an additional improvement (using uints instead of doubles when the fitness drops below 3/4 of uint.MaxValue). I added an additional feature which could be implemented. It allows an interlaced subset of the pixels to be tested for fitness. I also included an open-source C program I found on the Internet that generates fast random numbers, but that would not help improve the program much speed-wise due to other bottlenecks in the system, so I did not implement it. Right now the renderer seems to be the major bottleneck in the code. You may want to try using System.Windows.Shapes.Polygon instead of System.Graphics for the polygons, since then each polygon could be rerendered at will individually. Right now, rendering is the major bottleneck in the code after the updates are applied (Around 350 renders occur per second on my computer, whereas 3,500 mutates or 1,750 fitness evaluations can occur in the same time period [I tested that by commenting out code temporarily and counting to ten while the algorithm was running. The margin of error was around 10%, which is negligible in this case]). By the way, I think that using uints instead of doubles was the 60% improvement that Dan was talking about, although the improvement would be more along the lines of 3X if the Renderer was faster.
The question is, how can I implement this? (I am a high-school student who has recently begun programming, and I consider myself to be a novice-intermediate programmer). Could anyone optimize that code with all of this in mind? The key is to use System.Windows.Shapes.Polygon so only one polygon would usually need to be rendered per generation (maybe two or three, but certainly not all of them as is required now). Before you ask, NO, THIS IS NOT A HOMEWORK ASSIGNMENT!!!
modified on Wednesday, May 6, 2009 4:45 PM
|
|
|
|
|
I want to know, can c# interface interact with external tool like HTK windos binary
if or if no tell me how can i use HTK tool kit with c# program
give me any simple example
please...
thank you
|
|
|
|
|
C# can use p/invoke to call any dll.
I want to know, do you really think that's a helpful choice for a subject header ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I am doing project to convert human voice into text ,i have to use HTK tool kit because in my SRS I have mentioned
HTK tool and C# interface for user interface, now I can not change technology. I wont to know how to use external tool with C# GUI
|
|
|
|
|
I wish to have a checkbox to select whether to use a && or || within a algorythm, does anyone know how I might do this, for example:
bAndOr == true then use
a = b && c
else
a = b || c
because I will be using multiple AndOrs I need to be able to select as needed.
I appreciate any help
If you have a better way of handling this please let me know.
Thanks in advance,
Michael
|
|
|
|
|
hi, i have a software which has a firebird datasource. I am developing a C# application which reads data from this database. I searched on how to make an odbc connection with this database and now i have 3 questions
1. do i really need some firebird odbc driver application to make a connection, how do i know if one(firebird odbc driver) is installed on my computer
2. how would i connect to this database.
3. how do u specify the database if its on remote computer.
I m not that much familiar with odbc. I have worked with system.data.sqlclient and am quite new to odbc connections.
Sorry,if i am asking this question in a wrong place. I don't think it was a database general question. Please provide help on how do make a connection to firebird database.
Thanx
|
|
|
|
|
Firebird has ado.net connector so why do you need an odbc connection?
|
|
|
|
|
Hello,
I made a pretty complex application, and I want to know if there is any simple ways to create a save/load functionality.
I tried serializing the entire app, but of course that does not work
Any other methods that don't involve to much time to do this ?
Thank you
PS: It's a very quick school project, and I made the app pretty complex, with tab controls that have tab pages that contain different user controls ..etc.. It would take to long to take every control one at a time and save it.
|
|
|
|
|
There is no "easy" way to do this without proper planning. This should have been one of your first requirements, since it will have a large impact on your data model. What is that, you say?? Well, it's the classes that hold the data that your business logic manipulates. The business logic is told what operations to do on the data by other parts of the business logic, but is ultimately driven by the user interface. So, if all your data is encapulated by some properly designed classes, serializing it to a file or some other data store becomes a trivial matter.
Since the hair on the back of my neck says you're likely storing some of the data in "global" variables, some in your user controls, and some in some other things, like arrays, it's going to be pretty good chore to straighten all this out so you can save/load the data.
|
|
|
|
|
Hi,
I have two comboboxes, cbPhysicalCountry and cbPostalCountry. Both Comboboxes are populated via a dataset. How can I set the cbPostalCountry = cbPhysicalCountry when the user checks the checkbox "UsePhysicalCountry"?
I populate my comboboxes with the following code
DataSet dsPhysicalCountry = WCFService.GetCountry();
cbPhysicalCountry.DataSource = dsPhysicalCountry.Tables["Country"];
cbPhysicalCountry.DisplayMember = "Country";
cbPhysicalCountry.ValueMember = "Id";
When the checkbox_checkchanged event fires I have the following code,
if(checkbox.checked == true)
{
cbPostalCountry.SelectedItem = cbPhysicalCountry.SelectedItem;
}
Thank you in advance...
Illegal Operation
|
|
|
|
|
try this way,
if (checkBox1.Checked == true)
cbPostalCountry.SelectedValue= cbPhysicalCountry.SelectedValue;
|
|
|
|
|
What happens if the postal and physical countries are different?
Try SelectedValue instead of item. Try using a BindingSource instead of a table.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Okay, I’m confused on what to Dispose and when. Below is a subroutine called from a loop. First time through it is okay, the second time through it throws a System.Exception “Parameter is not valid” on the DrawString line. But if I remove all the Dispose commands at the bottom I can call this subroutine a dozen times without error.
Obviously in this instance I can just remove the Dispose commands and move on but I want to understand when I should or shouldn’t call Dispose. (After all I might be missing some Dispose calls elsewhere in my program.)
private void DrawRotatedText(Graphics Canvas, string text, Rectangle DestRect)
{
Bitmap bmp = new Bitmap(500, 500, PixelFormat.Format64bppArgb);
Graphics g = Graphics.FromImage(bmp);
g.Clear(Color.White);
Font font = new Font("Arial", 12, FontStyle.Regular, GraphicsUnit.Pixel);
Brush brush = Brushes.Black;
StringFormat stringFormat = new StringFormat();
stringFormat.Alignment = StringAlignment.Center;
stringFormat.LineAlignment = StringAlignment.Center;
g.DrawString(text, font, brush, (bmp.Width / 2), (bmp.Height / 2), stringFormat);
Bitmap bmp2 = Rotator.RotateImage(bmp, (360 - 45));
ImageAttributes attr = new ImageAttributes();
attr.SetColorKey(bmp.GetPixel(0, 0), bmp.GetPixel(0, 0));
Rectangle SrcRect = new Rectangle((bmp2.Width / 2) - (DestRect.Width / 2),
(bmp2.Height / 2) - (DestRect.Height / 2), DestRect.Width, DestRect.Height);
Canvas.DrawImage(bmp2, DestRect, SrcRect.Left, SrcRect.Top, SrcRect.Width,
SrcRect.Height, GraphicsUnit.Pixel, attr);
bmp.Dispose();
font.Dispose();
brush.Dispose();
stringFormat.Dispose();
bmp2.Dispose();
attr.Dispose();
g.Dispose();
}
|
|
|
|
|
Hi,
it is good practice to Dispose of objects that satisfy all these conditions:
1. they have a public Dispose() method
2. you don't need them anymore
3. you did cause their creation. This includes all "new Somethings()", all "CreateXxx()" results, and some specials such as Image.FromFile(); it excludes the objects you are borrowing, such as the Graphics you get from PaintEventArgs, the Brush you get from Brushes.Black, etc. There also is no need to Dispose of Controls that reside on a Form: when the Form gets closed, the Controls get Disposed of automatically.
there are two good reasons to call Dispose explicitly:
1. the object may contain unmanaged resources (e.g. memory blocks allocated outside the CLR)
2. the object may be expensive (e.g. use lots of memory)
Disposing it explicitly does whatever is necessary to free the resources (when unmanaged) or make them collectable (when managed).
it is also common practice to Dispose in reverse order, hence a=new A(), b=new B(), b.Dispose(), a.Dispose(); this may be relevant when b actually depends on a as in b=new B(a);
it may be wise to include null tests, as in if (b!=null) b.Dispose(); in case you are not sure b really got created (say in a finally block where the try part maybe didn't complete).
|
|
|
|
|
Luc Pattyn wrote: it is good practice to Dispose of objects that satisfy all these conditions:
1. they have a public Dispose() method
What if it didn't? Would setting it to null do/be the same? Would setting it to null enable the garbage collector to execute the destructor(if defined) quicker?
eg:
ExampleClass ex = new ExampleClass();
ex.DoSomething();
ex = null;
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
fly904 wrote: Would setting it to null do/be the same?
setting a reference to null removes one reference to some object. If that happened to be the last live reference, the object becomes collectable, which does not free any memory yet, since the GC has to run first to discover that. And it does not close a file, does not free other managed resources, and does not free any unmanaged resources, say memory that got malloced in native code, will not get freed ever if there is no Dispose(); BTW: Windows will clean up everything when the process exits.
If a Dispose exists but is not called by your code, it will get called by the GC when the object gets finalized, which may be much later. Do you want to keep the large memory footprint longer than necessary, do you want to keep files open longer then necessary, ...? I don't think so.
|
|
|
|
|
I want to be in charge of the Garbage Collector... I see it go past my window every thursday morning and I think to myself, if only I could control that contraption, then I could control those little minions which serve it... then I shall rule the world. But I normally just go back to sleep.
ps. Thanks, you cleared alot of my questions up.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|