How To Jumble Up Points In Collection
Nov 2, 2011
I have a collection which is a list of points, and I need to mix them all up before passing them into an algorithm - similar to if i was to pour them into a bad and shake the bag up.
how i might approach this? The collection will always have a different number of points in it..
View 9 Replies
ADVERTISEMENT
Jun 23, 2011
I'm working in .net 2005. I have a collection of points and I'm creating a polyline with them; however, I need to curve fit them so that they appear to be some what straighter.
If you look at my picture, you can see the blue dots represent the points and the red line is a represenation of how I'd like the final results to be. (Basically, I need to line to appear straighter and less jaggedy looking than it is now).
I didn't know if I should try to see if there's some plug-in for doing this or if vb.net has anything I could use to do this myself.
View 15 Replies
Apr 29, 2012
Instead of defining the Points in Series Collection Editor, can I define them from textboxes, numeric up down or something like that?
Example: Having a numeric up down, the number I put there appears as Y value for a X value that never changes, even when I change the numeric up down value.
View 15 Replies
Jan 8, 2012
I am reading a CSV while into a string() containing values in columns in this order like: -
"SSN", "Location", "Name", "Sex"
123456, "IOWA", "Jorge", "M"
But I need to jumble up the order of the columns in string() so that order should be
"SSN", "Name", "Sex" "Location",
123456, "Jorge", "M", "IOWA",
View 1 Replies
Nov 24, 2009
I came across this word jumble codes from a c++ post in this forum this is the post word jumble in c++ I would like some help for translating this to vb.net here are the codes
#include <iostream>
#include <string>
#include <cstdlib>
[Code]....
View 3 Replies
Apr 20, 2010
is there a way to offset the points in a polygon without having to change each one individually the points are in an array
View 2 Replies
Jan 31, 2010
how can i get the points which make a polygon from a region which was derived from the polygon's points?
View 1 Replies
Jan 15, 2010
Is it good practice to store sub-collections of item X inside a parent collection of item X for caching 'filter-queries' which are performed on the parent collection? (They won't be used together (as in color AND type).) Or is it also ok to just Loop over the collection and return the correct entities in a temporary collection?
[Code]...
View 1 Replies
Sep 7, 2011
I have the following classes:
Product, Service and OrderItem
Product and Service must inherit OrderItem. So basically I want to store OrderItem object in my shopping cart and these object are store in a list.
Public MustInherit Class OrderItem
Private m_enuItemType As TypeOfItem = TypeOfItem.None
Private m_strUserID As Integer[code].....
View 1 Replies
Feb 8, 2010
I have been researching for a couple of days now and to no avail. Does Anyone know how to make a custom collection that take advantage of the collection editor? I would like to be able to have 3 Color Values, 1 Boolean and 1 String.
View 15 Replies
Jul 25, 2011
I'm trying to support Basic.NET on my framework so I'm trying to convert C# 4 code to Basic.NET 10. Microsoft is committed to "co-evolve" these two but I'm having a problem with collection initialization... I found that I can initialize a collection much like in C#:
[Code]...
View 6 Replies
Apr 15, 2009
I've got the following ADO.NET Entity Framework Entity Data Model:I want to find all the Policyholders with both a Service of a given Id and also a Keyword of a given Status.
This LINQ Does Not Work:
Dim ServicesId As Integer = ...
Dim KeywordStatus As Integer = ...
Dim FoundPolicyholders = From p As Policyholder In db.PolicyholderSet.Include("Keywords").Include("Services") _
Where p.Services.Id = ServicesId _
And p.Keywords.Status = KeywordStatus _
Select p
The Where clause cannot search the p.Services and p.Keywords EntityCollections in that way.
[Code]...
View 1 Replies
Apr 6, 2012
currently in my application I have a Global Collection that is a Collection of Collections.Currently I am trying to add items/ elements to one of the child collections of the Global Collection but I am unable to use the collections methods of the child.When I assign a variable to the child collection and return the collection it is just an object with the collection inside.
Ex:
Dim GlobalCollection as New Collection
Dim ChildCollection1 as New Collection
Dim tempCurrentCollection[code]......
View 3 Replies
Dec 17, 2009
I've been working with a CMS called InsiteCreations 2008. I'm running into an error I just can't wrap my head around. I would even be willing to compensate anyone a small amount over paypal, for a solution. The error is rare in occurance, and appears when clicking about 3-4% of links to other pages within our CMS.The full code page is quite large, but there seems to be only one function associated with the error. The error also only appears when not logged into the CMS. If logged into the CMS, clicking the link simply displays the page as normal. I have already checked permissions on the page from the CMS admin console, and it is public.
The error message is as follows:
Server Error in '/' Application.Collection index must be in the range 1 to the size of the collection.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
[code]....
View 2 Replies
Apr 15, 2011
search the collection of a collection in my LINQ Where clause?
View 11 Replies
Apr 14, 2011
Take the following scenario:
Public Class Store
Public Overridable Property Areas As List(Of Area)
End Class
Public Class Area
[code]....
What's the quickest way to get a total count of shelves for a store? I.e. for a store I get the total count of areas by using Areas.Count Or will I need to loop through each area and tally the count of shelves?
View 2 Replies
Mar 25, 2011
I have an ASP.NET app with lots of textboxes all over the page that need updating at various points through program execution. These textboxes actually belong to a certain class, so for easy updating I thought I could create a Dictionary(Of string, object) and add the control.ID and the control to it and then for updating do something like this:
[Code]...
View 3 Replies
Jun 26, 2012
I need to convert a VB Collection to a modern one, like Dictionary or Hashtable. For my approach, I need the Collection's KEYS. Googling tells me that it's impossible. Re-writing the entire application using new collections is not an option as the application is really old and large (converted from VB6 to VB.Net).Using the old Collection also is not good - as there are new components in development.Converting a - for example - Hashtable to Collection works:
using VBCollection = Microsoft.VisualBasic.Collection;
public static VBCollection ToVBCollection(this Hashtable table)
{
[code]....
View 1 Replies
Jun 19, 2011
In window textbox, I'd like to just allow 2 decimal points only. I could set text box only numeric but don't know how to limit 2 decimal points.[code]...
View 3 Replies
Apr 14, 2012
I want two decimal points value. I have used this code
lblNo.Text = Math.Round(CDec(txtNo.Text + (txtNo.Text * 0.2)), 2).ToString()
If i have value as 1.32 then its ok but if i have value like 2.3 it shows 2.3 but i want value as 2.30 How can i get this value.
View 3 Replies
Aug 12, 2009
I have a collection of lines and as i loop through through the collection, i need to see if it aleady contains a certain line; however, the contains method wants a string and i have stored lines, so how can i use this method to see if my line is already in the collection so i don't place it in there twice?
View 7 Replies
Oct 8, 2009
I want to find out the X and Y position of a point which is halfway between a point and another point, in VB.net. Since there is no "direction" property (which would make this much easier...), I have no idea how to do this.
C# code is acceptable as well, though I would prefer vb as it wouldn't require a port.
View 6 Replies
Feb 6, 2012
i have this code in vb and i want to know how to make it to add decimal points
Dim a, b As Integer
a = CSng(TextBox1.Text)
b = CSng(TextBox2.Text)
Dim result As Single
result = a + b
Lb_sum.Text = result
for example if i add 4.2 + 4.4 its show 8 instaid of 8.6
View 2 Replies
Jul 13, 2011
I am drawing an arc within a square or a polygon with the maximum possible radius inside.When the arc is drawn within the boundary of the square or polygon,the arc length will intersect at few points on the square or polygon.How to find the coordinates of the intersecting points of arc at the periphery of the square/ polygon?
View 2 Replies
Apr 11, 2012
how can i calculate the 13 points on the polygon (see image)?
the 2 points either side of the centre points
are +/- width or height * 0.2761423749154
i have 4 known points, topLeft, topRight, bottomRight, + bottomLeft.
the polygon won't always be a regular rectangle as it is in the image
View 11 Replies
Aug 14, 2009
This thread (Question) is a continuation of a question answered by JohnWein. the original question asked by me in this thread:http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4d9b44a0-91ed-4f64-a3a2-74afffce2256 an this is the answer:
[Code]...
The question is, in the case of four connections, how can I make sure that all points are connected with minimum number of connections using the same above code?
View 1 Replies
Mar 18, 2006
Is there a way of converting pixels to points? The dimensions in VB are in pixels, but Office COM such as WordApp.Resize are expressed in points. So trying to align app windows is a mess.I guess the ratio of pixels to points varies from one monitor to another(?), so this would need to be calculated at run time.I tried a nifty trick of doing Me.Font.SizeInPoints / Me.FontHeight but that doesnt seem to be quite right or a very sensible way of doing it.
View 2 Replies
Oct 2, 2009
I'm trying to create an array of Points but can't seem to get it right.
I can create an array of Integers just fine.
Dim MyArray() as Integer = {1,2,3,4,5}
View 3 Replies
Mar 14, 2012
I have some text I would like to extract from a file. I know what comes before it and what comes after it but the text will be variable. I was thinking read it in line by line until i found the line which is the indicator of the text starting to the indicator that it is ending.[code]...
View 7 Replies
May 13, 2009
I have a question about drawing lines. Most of the code snippets I've seen approach drawing a line with the mouse down as the startpoint and the mouse up as the endpoint. But I am trying to draw a line by startpoint as
a mouse click and then an endpoint as a mouse click just as you do on a typical cad program.
View 8 Replies