Optimize Waypoints For More Than 25?

Sep 10, 2010

I need to order lists of up to 100 addresses in optimized order. Is there a way to do this since getdirections is limited to 25? i don't se any way around this 25 limit. Is there one I'm missing?

No I'm trying to use MapPoint object model but it crashes as well with this many waypoints. Here is my example proof of concept code from Excel:

Sub OptimizeRoute()
Dim objApp As Object 'New MapPoint.Application
Dim objMap As Object 'MapPoint.Map

[Code]....

View 2 Replies


ADVERTISEMENT

Make A Picturebox Follow A Path Determined By Waypoints?

May 8, 2012

what is the easiest way to make a picturebox follow a path determined by waypoints? without using like 100 if statements and timers.

View 6 Replies

VS 2008 Error In Maths Formula - Get The Magnetic Track From Two Waypoints

May 5, 2011

Trying to get the magnetic track from two waypoints, but are getting error in the formula,

This is my code at the moment (produces error)

tc1.text = Math.Atan2((Math.Sin(lon1.Text - lon2.Text) * Math.Cos(lat2.Text)), Math.Cos(lat1.Text) * Math.Sin(lat2.Text) - Math.Sin(lat1.Text) * Math.Cos(lat2.Text) * Math.Cos(lon1.Text - lon2.Text))) 2 * pi)

View 7 Replies

Way To Optimize My Algorithms

Sep 28, 2009

I had been working on a project that would generate a loan schedule.

But, It needs to factor in specified holidays and weekends.

Now, when running with a small 'term', it seems to work fine.[code]...

View 14 Replies

Will The Compiler Optimize This

Mar 8, 2012

Consider this

bar = 1
foo = <1 or 2, depending on previous code>
if foo=1
while bar <= 5

[code].....

What I want to know is, is the compiler smart enough to optimize away the (apparently) repeated tests for "foo = 1" since foo is not modified in the body of the loop?If so, I might use the second construct since it is semantically equivalent (I think!), takes less code and reduces indentation levels.

View 6 Replies

Optimize Linq Contains Method

Apr 1, 2012

I need a list from OldGuids that are not in the NewGuids, so I used the Contains method, the problem is that it is already running more then half hour, is there a faster way? or how much longer would it take about? [code]

View 2 Replies

Optimize Ms Access On Network?

Nov 1, 2010

Is it possible to use a string as an array? I mean:' I have several arrays

Dim a10() As Integer = {530}
Dim a15() As Integer = {370, 231}
Dim a20() As Integer = {305, 176, 126}

'I declare a variable as a string and I assign the name of an array to it

Dim tablaalfa As String = "a10"

'I retrieve data from the array using the name of the variable instead:

lbl1.Text = tablaalfa(2)

I guess it doesn't work in this way?

View 3 Replies

What Are Things Vbc.exe Does When /optimize Switch Is Used

Mar 6, 2012

vbc.exe has something called /optimize switch right. If I enable that what are the optimizations the compiler can do for me? The MSDN documentation just curtly says 'does various compiler optimizations'. Where can I find the complete quantified view of the different optimizations that actually goes into.Here is the thing I am pursuing this route. One of the code blocks in a module I am leading has a lot of delimited array manipulations. I believe this is going to be a heck costly in terms of string memory handling. I am looking to see if I can retire them by way of simple properties or methods so that the compiler can internally do something like our c++ inline functions making a best win-win offer in terms of both memory and processing time. I admit when the compiler translates them as inline function, the JITed code might be big in size right?

View 7 Replies

.net - Optimize This Simple But Horrible Implementation?

Jul 27, 2011

I basically want to remove the formula from the cells but want to retain the calculated values.

SO, I implemented it easily and it works great but REALLY SLOW. (About 2 mins for 1800 cells)

I have : Dim col As Excel.Range = getRange()For Each cell In col cell.Value = cell.Value Next

I tried to do this to the first cell and then autofill the rest, but that copied the value of 1st cell to the rest of the cells in column.

View 7 Replies

How To Optimize Simple But Complex Looking Implementation

Jul 28, 2011

Want to dump a fetched table to a excel sheet. [code] I am new to data fetching and ADO.Net concepts and just got it working.But. This seems to be very inefficient and lame to me. So, can you help reducing the complexity and may be improve performance ? A totally different (Better) implementation is most welcome !

View 2 Replies

Optimization :: Optimize Own Code Written?

Jan 20, 2011

How can I Optimize my own code written by VB.net? Is there any tools for it? Does Visual Studio have any one? What's your suggestion? I use VS2008 as my editor.

View 1 Replies

Optimize Classes Before Serializing And Saving

Oct 24, 2010

Often it is very usefull to save data as a class by serialize and compress it. From few experiments I have noticed that
Class A
Public name as string
Public List as new list(of string) <---- empty
End Class

Class B
Public name as string
Public List as list(of string) <----- not instantiated
End Class

If I serialize and compress the 2 classes the class B uses less spaces once serialized and compressed. This suggests me that if a class contains a list that is instantiated but empty it is better to set that to nothing and reset as new when it is decompressed and deserialized. Is there any dll that optimizes a class to be stored (serialized and compressed) and restore it when it is decompressed and deserialized?

View 6 Replies

Simplify And Optimize This Checksumming Code?

Jan 27, 2011

Public Function CalCheckSum(ByVal ByteList As List(Of Byte)) As List(Of Byte)
Dim total As Integer = 0
For Each b As Byte In ByteList

[code]....

View 1 Replies

Copy Selected Listview Items To Another (optimize)?

Oct 28, 2009

I fairly new to .Net. I did a small project a year or so ago but haven't coded in it since. I'm picking up maintenance of a project where items are selected from one listview and copied to another removing the selected item from the "parent". The current code is in two steps:1. Get the selected items removing from sender:

Public Function GetSelectedItems(Optional ByVal pRemoveFromList As Boolean = False) As ListView
Dim mList As New ListView

[code].....

View 4 Replies

Forms :: Optimize Code And Lower CPU Usage?

May 14, 2009

When my form first loads, it runs at about 30k CPU, but after about 10 minutes of use, it goes up to (and stays at) about 70k CPU.

What ways can i optimize my code to allow the CPU usage to stay low, or how can i lower it during the running of the program.

My most concerned areas of the CPU are:

1. I have a web browser, and when a user types in a url and presses go or enter, the CPU jumps about 4k:

Private Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go.Click
WebBrowser1.Navigate(OldURL.Text)

[Code]....

The second worry is when i open other forms, it boosts the CPU up aswell. the only code for this is:

Form.Show()

View 1 Replies

Optimize Loop Through Lines Of MultiLine Textbox?

Oct 11, 2008

I 'm currently developing program which I can check the lines of each textbox if it has same length. The code is working properly in few lines like 2000 lines, but when I try to load a textfile which has 50,000 lines, my program is not responding anymore it takes forever. [code]...

View 7 Replies

Optimize The Code For Copying Data From One Dataset To Another?

Oct 6, 2009

this is in reference to my main post here update mdb with data from different tables in dataseti have two tables in a dataset called dsSource. dsSource.Tables(0) has the following columns: ,,,,,,,code,art,sizerng1,sizerng2,sizerng3,etc...... dsSource.Tables(1) has the following columns: ,,,,,,,code,art,size1,size2,size3,etc...... the conditions here are: 1) to look for "1" in columns sizerng1, sizerng2, etc. of dsSource.Tables(0) 2) match code and art on both tables finally if both conditions are valid then the size values in columns size1, size2, etc. will be assigned to columns in sizerng1, sizerng2, etc. my main concern here is i have to loop through all rows in both tables which takes a long time, so is there a better way to do this than the code i have below?.

'***put the sizes from weights to traps file
row1 = 0
For Each dr As DataRow In dsSource.Tables(0).Rows

[code].....

View 8 Replies

VS 2008 : Optimize Recursive Treeview With AddRange?

Jun 23, 2009

I have this seperate class to fill a treeview from my database.There are over 33000 records and when this class runs, it takes almost 1 minute to finish.When i run this query from the server it takes for 5 seconds to retrieve all items.Is there a way to optimize this class?

Option Explicit On
Option Strict On
Imports System.Windows.Forms

[code]....

View 19 Replies

C# - Does The JIT Compiler Optimize (inline) Unnecessary Variable Declarations

Oct 20, 2011

I've read several articles and questions/answers that conclude the best practice is to let the JIT compiler do all the optimization for inline function calls. Makes sense. What about inline variable declarations? Does the compiler optimize these as well?

[Code]...

Of course I prefer the latter because it's easier to read and debug, but I can't afford the performance degradation if it exists. I have already identified this code as a bottleneck -- No need for retorts about premature optimization.

View 2 Replies

DB/Reporting :: Optimize Query (aggregates On Multiple Tables)?

Feb 20, 2008

Code:

Tables:
- Company
- Department
- Employee
- CertificationA
- CertificationB

I am trying to return a recordset that gives some summary information about each company. The fields in my returned recordset should look like the following.

Company.Name, NumberOfDepartments, NumberOfEmployees, NumberOfCertificationA, NumberOfCertificationACompleted, NumberOfCertificationB, NumberOfCertificationBCompleted

There are actually about 10 different Certification tables but, with Certification A and B you should get the hang of it. When an employee starts a certifaction, a record is added to the that certification table.Below is a query I wrote that works (gets me the data I need), but I am unsure if it is the most efficient way. There will be quite a lot of data so performance is an issue.

Code:

Dim sqlNumberOfDepartments As String
sqlNumberOfDepartments = _
"(SELECT COUNT(*) " & _
"FROM DEPARTMENT " & _

[code].....

View 1 Replies

Optimize LINQ Query For Use With JQuery Auto-complete?

May 20, 2010

I'm working on building an HTTPHandler that will serve up plain text for use with jQuery Autocomplete. I have it working now except for when I insert the first bit of text it does not take me to the right portion of the alphabet.[code]...

My question is, how would I implement this concept into my HTTPHandler without doing a fresh SQLQuery on every character change? IE: I do the SQL Query on the QueryString("ID"), and then on every subsequent load of the same ID, we just filter down the "Part".[url]...

View 2 Replies

Optimize Linq To SQL Query, Group By Multiple Fields

Jul 26, 2010

My LINQ query contains the following Group By statement:

Group p By Key = New With { _
.Latitude = p.Address.GeoLocations.FirstOrDefault(Function(g) New String() {"ADDRESS", "POINT"}.Contains(g.Granularity)).Latitude, _
.Longitude = p.Address.GeoLocations.FirstOrDefault(Function(g) New String() {"ADDRESS", "POINT"}.Contains(g.Granularity)).Longitude}

The query works, but here is the SQL that the clause above produces

SELECT [t6].[Latitude]
FROM (
SELECT TOP (1) [t5].[Latitude]

[Code]....

but this produced an error: "A group by expression can only contain non-constant scalars that are comparable by the server."

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved