Parallel Extensions Automatically Handle Single And Multicore Environments?
Apr 8, 2009
Will LINQ's parallel extensions automatically detect the number of cores and utilize them all? Conversely, if the code is run on a single core machine, will it still work or do I have to detect the number of cores and tell PLINQ how many to run across? I don't have access to any single core machines to test my code on so I can't even test this for myself and I haven't been able to find any useful info elsewhere...
Also, while it might at first seem obvious when to use parallelism, are there any rules of thumb regarding where it should and as importantly should not be used? I don't necessarily program in a specific environment. I tend to divide my time somewhat equally (depending on project) between web, client/server apps, windows apps, windows service and console utilities depending on the task at hand.
View 2 Replies
ADVERTISEMENT
Feb 7, 2011
i need to automatically click upload button and input the values automatically in a website using web browser control
i know how to do this
For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("button")
If element.OuterText.Contains("upload") Then
[Code]....
does sendkeys.send "filename.flv" works fine or any other method works fine
input automatically the file name on the open save dialog box and click open button
View 1 Replies
Dec 17, 2010
From within the same form is this possible? I could eliminate a ton of code if this were possible.
View 8 Replies
Jul 17, 2009
I have some VB code which makes use of a COM api and results in a certain dialog box popping up on the screen. My program is a console application, that needs to run in a batch file, but I haven't found any other way to do things other than finding a way to automatically manipulate the dialog box. Here is the api call (omitting setup code) that results in the dialog popping up:
[Code]...
View 2 Replies
Jan 16, 2012
I have a service that scans network folders using a parallel.for method. However recently I am finding if I stop the service then while windows says the service is stopped the process is still running in task manager. However it is at 0 cpu and the memory does not change. If I try and end the task (even a force in command prompt) it just says access denied and i have to reboot the server. What would be the best way to make sure everything terminates? I thought of adding a global Boolean that in the stop procedure it turns true and part of my parallel code will check for that and call s.stop.
View 1 Replies
May 6, 2009
I need to handle a soap request and send a response in a single string. My response is going well but I can not see a request string in my log file thought protocol analyzer can see it properly.
View 2 Replies
May 27, 2010
What i have heard is, that a program dont get much faster on a dual core (or quad core) than on a single core processor, because windows assigns the program to just one core. (but still a little faster because other programs run on the other cores instead or something like that).And if you want to exploit the power of multicores, you have to code in a way so that different calculations get sent to different cores simultanuasly and then gather the result afterward.First of, is this correct? And if so (or if not so) is it possible to program in vb to exploit multicores. I mean can you create 4 threads and assign them to each core, or does this require some heavy C++ coding?The reason im asking is because and application i have created uses biometric identification (fingerprints) and this requires somcalculations, the more fingerprints that gets stored. Then if i somehow could make it use more codes, maybe this will be a little faster?Is this possible in vb, or would i get way in over my head for trying to work with th
View 1 Replies
May 14, 2011
I don't have an example code, but recently figured out how to make a single sub handle the keydown event for multiple text boxes.What I would like to know is if it is simple enough to have the object name that is sending the event instead of "microsoft..text: 54654" (sender.ToString in a debug window) type of return. I don't know how to make use of that.
View 3 Replies
Jan 18, 2010
Target machine 4 core AMD I have an event that is raised my the main thread of the application. The event is consumed by several different classes in the application. I want them all to run concurrently up to the max cores available and then que the rest in order.The work routine in each class is relatively small but concurrency is the goal.Considering this.
A. Create a background worker on each classes initialization and have the event handler start the worker.
B. Create a delegate to the do-work sub that is called by the event handler
A- Pros - worker is only created once and reusable so only pay creation cost once.
A-Cons could create a ton of workers that consume resources eventually.
B- Pros Smaller thread pool
B- Cons Lot of overhead
View 2 Replies
Oct 12, 2009
I'm wondering what would happen if my program was used say, on a computer with a chinese keyboard? I assume the text box controls will be fine, but sometimes I compare english strings.. such as "!" and "@" and a few other things.
View 3 Replies
Feb 4, 2011
I wanted to create a custom control with a custom Item-Collection in it.(Similar to the ListView Items, but with other properties)I wrote a Class that holds properties of a single Item data (ClassItemData) and another class that "Inherits System.Collections.ObjectModel.Collection(Of ClassItemData)". The Collection class contains a public event (ItemCollectionChanged) which is raised when "ClearItems", "InsertItem", "RemoveItem" or "SetItem" is called. (I used "Overrides" on all these functions and added the Raise Event to them.) The event is handled in the custom control itself and causes the control to refresh/repaint itself. The collection class contains also "Default Public Overloads ReadOnly Property Item(ByVal index As Int32) As ClassItemData" which returns the Item at the speciefic index.
The control refreshes itself when I place the control on a form and use code like: ControlName.Items.Add("TestItem") Unfortunately the control does not refresh itself when I use: ControlName.Items.Item(0).Visible = False The value of the Item itself has changed after this, but the control does know about the changes and does not refresh itself. If I do a manual repaint/refresh of the control, it looks all fine, but it does not work automatically. Does anyone know, what I have to add, so I can handle an event or something in the control when a property in the ItemData class has changed? How do I recognize changes in existing items and raise an event in the custom event?
View 6 Replies
Jul 4, 2009
I have a web application that works in our stage/test environment fine but once we moved it to our production environment something weird happens. All the control ids change. a label went from ctl00_cphMainContent_lblPetName to _ctl0_cphMainContent_lblPetName. Why would this happen? What could cause something like this to happen. The only two differences I know of are the production environment has HTTPS and I've disabled debugging.
View 3 Replies
Jun 4, 2010
Currently all my application that is released is always release in production. However I would like that changed and also have a development side (For testing).
I've tried searching for steps on how to create a development server however I cannot seem to find a tutorial.
In the past I've seen someone release their application in development by having it in on "Debug" option and have it released in production by having it on the "release" option. (I apologize for the vagueness as it was along time ago since I saw it).
View 2 Replies
Apr 22, 2011
I have developing application to Remote Control Winamp. I want to know What number of the Windows Handle Message to Launch Winamp automatically?
I have been search in many forums, but I have no get anything.
I only several Window Handle Message about Winamp :
CODE:
View 3 Replies
May 15, 2009
Here is the error:
System.Runtime.InteropServices.COMException, Paste, Exception from HRESULT: 0x800A03EC
All machines are Windows XP with the same version of Excel (2003). Some machines get the error, some don't. We have yet to find a pattern.
Here is the code:
Public Shared Sub ExportToExcel(ByVal dt As System.Data.DataTable)
Dim app As New Microsoft.Office.Interop.Excel.Application
app.Visible = False
[Code].....
View 1 Replies
Oct 29, 2009
I am developing an application in Vb.Net 2005 and have enabled the installation by clickonce, the update occurs before the application starts. My problem is very simple, the server that contains updates is correctly natted to be available from the outside with a public IP.
The clients who access from an external network connecting without problems, download software and updates. When local clients are connected to the same network of the server (LAN) can not download anything because they try to access the server with the ip public, and the nat does not work . We can not perform operations on the DNS server or hosts file and not even on the router.
I need to figure out if i can use ClickOnce to use more than one distribution server, primary and secondary. I'd like to set as the primary server the public address and the secondary server with internal network ip address.
View 1 Replies
Dec 23, 2009
Say I have a code with 3 methods that do some pretty intensive work. Would executing these methods on 3 seperate threads be faster then executing them one after the other on a single core cpu? And what if it's a dual core or HT?
View 8 Replies
Sep 5, 2010
I am trying to make a list, separated by a comma, of entries from a single column in a SQL database. I have been spending the last several days searching for a way to do this, but every thing I found either didn't work, or wasn't exactly what I was looking for.
The query will pull all the email address that are not null. What I need to know is how to take the result of that query and make it look like this:
email0@address.com, email1@address.com, email2@address.com, etc, etc, ...
I feel like I should know this, but for the life of me, I can't remember nor can I find it in any of the textbooks I have.
I am using Visual Basic 2010 and SQL Server 2005. I also have access to Visual Basic 2005 if needed.
View 2 Replies
Oct 23, 2009
I use SqlParameters when executing database statements. I know that I can replace a single quote with two single quotes... but in the past SqlParameters took care of this for me. I have two projects.. in one, the SqlParameter does this and it handles single quotes fine, in another, it does not and I'm at a loss why (I even copied and pasted the code):
[Code]...
View 9 Replies
May 7, 2010
I am trying to use the DGV to view various properties from a variety of different class instances. Is it possible to bind each cell individually?
View 9 Replies
Dec 3, 2010
I am trying to update a row or a single cell in ms access through vb.net. But when i update the text box named NRIC, say for example i want to update "s4522147B" to "tr4521856C" and mean while leaving the other fields the same.
But the thing is when i make the changes in nric.text (textbox), the dataset actually updates the whole column in the table instead of the selected textbox.
Below is my code for the update part
[Code].....
View 3 Replies
Aug 18, 2009
can i create IE extensions with vb.net? and if so where do i start?
View 9 Replies
Nov 14, 2009
How can I able to get all the extensions in a Directory. This is for vb.net windows application.
View 3 Replies
Mar 23, 2009
I wrote an application to handle a joystick with directinput. It works fine if it uses the handle of the main window but it doesnt happen the same if the handle is the one of the component that contains the joystick's operation.
I mean:
main form handle: 15
component handle (which is inside the window and the joystick needs the focus of this component to work): 25
It always work if the handle i initilizate the device is the main form (15).How can i use only the handle of the component?
View 1 Replies
Nov 8, 2009
This is my problem:
<System.Runtime.CompilerServices.Extension()> _
Function CastAs(Of TSource As TTarget, TTarget)(ByVal array As TSource()) As TTarget()
Return Global.System.Array.ConvertAll(array, Function(src As TSource) DirectCast(src, TTarget))
End Function
View 10 Replies
May 3, 2010
I can open the extension manager and browse all the extensions, but as soon as i click the "Download" button to install it, i get this error;
"The extension could not be installed because the following error occured:
The remote server returned an error: (404) Not Found."
View 4 Replies
Aug 8, 2011
when you use the object browser to see the features of a sortedlist elementat is not shown , but because a sorted list inherets features of ienumerable it works, cant that be corrected
View 1 Replies
Oct 8, 2009
I have a combobox that shows all filenames in a partisular folder, how can I just show the File Extensions?
Dim ComboBox1Items As List(Of String)
Dim myDir As New System.IO.DirectoryInfo(TreeView1.SelectedPath)
ComboBox1Items = New List(Of String)
[Code].....
View 8 Replies
Nov 5, 2006
I'd like to inquire if it is possible to create a specific file extension like for example .wew and when the user double clicks over the that kind of file ,it excutes the programm associated with it ,and how can the contents be interpreted by the program, I tried to find how to do that ,and I only found soultion that deal with windows shell scripting
View 3 Replies
Aug 26, 2011
I am trying to open files with different extension which are not supported by windows as well.Extension like (.bin,.dat,.lzc etc etc) Is there any way i can access these files by using any emulator?
View 1 Replies