|
sanforjackass wrote: it make it a little more faster but not that faster, is there a way to make it works more faster?
Withous seeing what the code does, IMO you've three real options:
- Refactor to run in parallel. This is only an option if the order things are processed in does (or can be made to) not matter
- Re-implement using pointers. This will work best if one of the lists/collections you are itering over is long and the processing task is short-lived
- Profile the code and optimize the task that is taking the most time.
It might be helpful if you post code, of give psuedo-code about what you application is actually doing.Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
IMO do the second tip first (MAJOR speed increase, between 5 and 100 times), then do the first one (speed increase depends on the processor, best-case scenario is 1x extra increase for each processor core [such as 4x for a 4-core processor]). After those two major optimizations (Use .NET 4.0 Beta's Parallel.For method for the first tip), profile the code (NProf is a good sampling profiler, also Visual Studio 2010 Beta 2 [free to use until June] comes with an excellent profiler. If you have the money, use ANTS, as I have heard only good things about it) and fix the bottlenecks (those areas that take the most time).
|
|
|
|
|
|
Hi All
I have a project which is using Microsoft.Jet.OLEDB.4.0, to connect to an access database.
Windows 7 x64 does not allow my project to connect to the database.
Is there another way in which I can connect to the database in Windows 7 x64
Thanks
|
|
|
|
|
Microsoft.Jet.OLEDB.4.0 is not supported for x64 platform it's compatible only with x86.I'm not 100% sure but it's might be the same for Access ODBC drivers by MS.So if you desire to use them your should run your app in x86 mode. Life is a stage and we are all actors!
|
|
|
|
|
Thanks, I'll try that.
|
|
|
|
|
There are no 64-bit drivers for Access. Since you cannot mix 64 and 32-bit code in the same process, you either have to use a different database engine that DOES have 64-bit drivers, you you have to force your project to compile as a 32-bit app.
|
|
|
|
|
this.webdatechooser.value=datetime.now();
but its gets assinging value 1-01-0001 wen page gets loaded and the value is not shown in the control..
help me to get out of this mess
thanks
|
|
|
|
|
|
Hi. I'm creating a program that would allow a user to drag a picturebox that is contained inside a panel and drop it into another panel. My problem is I don't know how to drag the picturebox over to the other panel. I already know how to drag a picturebox using mousedown, mousemove and mouseup events. This is the only problem that keeps me from keep on coding the program..please help..
|
|
|
|
|
hi friends!
I choose the given branches (@host_name) for a time interval (@dateStart, @dateFinish. As to me to count up a difference in time between @dateStart and @dateFinish and to show result? As a result I learn what is the time branch (@host_name) was on communication for a time interval (@dateStart, @dateFinish).
SELECT DISTINCT address_ip, gate
FROM ip_address, history
WHERE HOST_NAME=@host_name
AND h_date BETWEEN @dateStart AND @dateFinish
AND h_date= DATEDIFF ("d", @dateStart, @dateFihish) -- как тут писать, правильно ли я делаю
AND ip_address.id=history.id_ip
AND is_con=@con;
|
|
|
|
|
Hi,
I've 4 to 5 printers in my printer's list. I would like to give my document to a specific printer, programmatically. Please guide me to achieve this. Thanks in advance.
|
|
|
|
|
You can have a dropdown allowing the user to choose the printer and then based on the selected value set the PrintOptions.PrinterName in the code-behind file - in the print button's click event..
Example
protected void btnPrint_Click(object sender, EventArgs e)
{
if (ddlPrinter.SelectedValue == "S")//Printer 1
myReportDocument.PrintOptions.PrinterName = @"\\my-domain\AAA-HP9050-P1";
else if (ddlPrinter.SelectedValue == "A")//Printer 2
myReportDocument.PrintOptions.PrinterName = @"\\another\OOO-hp4250-p2";
}HTH
Neh
|
|
|
|
|
Thanks for your reply. Can you tell me what is myREportDocument in your code.
I wrote the following code to print the doc file. But the output is blank. Can you correct.
printDocument1.DocumentName = "C:/Test/CSR.doc";
PrintDialog dlg = new PrintDialog();
dlg.Document = printDocument1;
printDocument1.PrinterSettings.PrinterName = "CutePDF Writer";
if (dlg.ShowDialog() == DialogResult.OK)
printDocument1.Print();
Note: printDocument the control in toolbox.
|
|
|
|
|
It is a Crystal - ReportDocument.. used in a web app.. has your query been resolved?
|
|
|
|
|
Ok, Thanks.
Can you correct the code which I used to print the document, in my previous post.
|
|
|
|
|
Tested the code below.. works fine.. let me know if u r facing an issue.
printDocument1.DocumentName = "C:/Test.doc";
printDocument1.PrinterSettings.PrinterName = @"\\my-domain\AAA-HP9050-P1";
printDialog1.Document = printDocument1;
if (printDialog1.ShowDialog() == DialogResult.OK)
printDocument1.Print();
HTH,
Neha
|
|
|
|
|
No, its giving the same result, blank document. the output is blank document
|
|
|
|
|
am looking into it.. will let u know..
|
|
|
|
|
Ok, Awaiting for your reply. Thank you
|
|
|
|
|
I got a problem with my application. I use C# to develop a editor using webBrowser.
Everytime I drag an image from Window Explorer or something else into my editor, the dialog appears and asks me to save my current work so I can't insert a picture into my editor unless I save my work.
Can anyone tell me how to insert an image into the editor? So that I can have as many images as I want. At this time, I just have one image at a time in my editor.
Thanks a lot.
|
|
|
|
|
Hi....
I am Gopal. I am using VS.NET 3.5. I want to show an image on crystal report using the image path which is in the database. I am using the OLE object. I don't know how to link OLE object and the my database table.Can anyone help me in to do this. I have very urgent requirement to do this. Please help me.....
Thanks & regards,
Gopalmodified on Wednesday, March 10, 2010 11:57 PM
|
|
|
|
|
Hi gopal
I'm sidharth i didnt really get u.. are u telling that u have stored an image in database or u wanna creat a chart based onthe readings in database?_________________________________________________________________
U cannot insult me- as i'm already insulted :p
|
|
|
|
|
Hey....
I am just saving the path of the image in the database. I want to show the image dynamically on the report. If you knows about this please help. I saw one article that he is using OLE object to show the image...
I don't know how to link both of these. If you knows tell me
Thanks
|
|
|
|
|
this is not the exact answer but anyway u have to work on it....
retieve the location from the db and store it in an invisible textbox
(txtImagePath.text)
imageData = ReadFile(txtImagePath.Text);
then get a picture box drag it to the required place and link this pic location with the picture box...
pictureBox1.ImageLocation = imagedata
_________________________________________________
i'm not sure about the above but there are ways to proceed with it..
|
|
|
|