I have a class having 2 properties (both integers) and storing class into List collection.[code]Here I need return "TRUE". (values in "GroupNo" is not static and not in sort).How can we do that in vb.net?
Protected Sub invokePagination(ByVal table As DataTable) 'CallPagination() As PagingControlDTO If table.Rows.Count > 0 Then Me.DataGridPaging1.Visible = True
[code].....
The code which is underlined is to be replaced.Instead of this I want to use column name to get the total count , since it contain the total count.Column Name is "TOTALROWCOUNT"
This is my problem: I have an array with dates in it and I want a list with the dates and how much that date is sequel to the amount of that dates in the array.
This is my code so far: arrsVerschillendeDagen(iTellerke) is declared on moduleniveau arriMaand(iTellerke) is declared on moduleniveau arriJaar(iTellerke) is declared on moduleniveau
I have a subroutine too that redimension my arrays. Private Sub FillArray() For iCounter As Integer = 0 To arriDag.Length - 1 arrsVerschillendeDagen(iCounter) = arriDag(iCounter) & "/" & arriMaand(iCounter) & "/" & arriJaar(iCounter) Next 'result: 14/10/2009, 20/12/2009, 20/12/2009, 14/12/2009, 14/12/2009, 14/12/2009 [Code] .....
I am learning Linq, so bear with me. I have a class object that holds 4 other class objects with each holding a List(Of T) of the next. Think tiered classes. As these lists as built I need to search all the Group2 for all Group3 to see which Group3.units.count is the largest. "units" being a List(Of T). [code]
I'm having a problem trying to get the array to count. Computing the average rainfall works but counting the aboveavgcount and belowavgcount isn't working out right.I'm not sure if i'm not storing the array correctly or if it's a coding error somewhere.
Now I'm VERY new at the reading in a text file and storing into arrays thing and tried for hours last night to figure this out, googling and every possible way of writing the code. However, I don't know what to try next and I'm getting more confused by the minute. I have a text file which I load into my program. This data is stored into 6 arrays, each of which has data that comes from either a combobox, date or text field. What I'm trying to do is to find the count of items in each index of the array.
I have an multi dimed array of stock sizes, material type and count. The array could have duplicate arrays. In the end I need an array that is condensed with no duplicate and the count field is how many there were in the array. Example: Original array Material: STL TUBG Stock Size: 3" X 3" X 0.250" W/T X 254MM Material: STL TUBG Stock Size: 3" X 3" X 0.250" W/T X 254MM Material: STL TUBG Stock Size: 3" X 3" X 0.250" W/T X 254MM Material: STL TUBG Stock Size: 3" X 3" X 0.250" W/T X 254MM Material: STL TUBG Stock Size: 3" X 3" X 0.250" W/T X 102MM Material: STL TUBG Stock Size: 3" X 3" X 0.250" W/T X 102MM Material: HRS Stock Size: 1" X 4" X 175MM Material: HRS Stock Size: 1" X 4" X 175MM Material: HRS Stock Size: 1" X 4" X 175MM Material: HRS Stock Size: 1" X 4" X 175MM I need Material: STL TUBG Stock Size: 3" X 3" X 0.250" W/T X 254MM Count: 4 Material: STL TUBG Stock Size: 3" X 3" X 0.250" W/T X 102MM Count: 2 Material: HRS Stock Size: 1" X 4" X 175MM count: 4
I have a SQL database which I'm running a query against to return a list of names - eg using "select names from table"I would like to add all of these names to an array so I can use them later. To do this I would need to use a dynamic array as the number of names returned could be anything.Apart from first running "select count(names) from table", getting a value and then Redim'ing the array on the count is there another method I can use.I've seen there's a dataset row.count? Can I somehow use this?
connection.Open() reader = command.ExecuteReader() While reader.Read()
I have an array of items where i have separated the first two characters, which in my case are ID tags. I have populated my CLBox and the output is like this
AA Aa BB
[Code]...
What would the process be to do this, would i need to create a reference list or stringbuilder for all the tags(there is about 3000 tags) or would it be possible to loop through and count the matches. I declared the Tags thinking that i could do something from there.
I am selecting a distinct user from IT_Cases_List and stored it in an arraystaff(). From this array, I will then call a Stored Procedure to count the no of cases attended by this user,(arraystaff(i)) and loop it until arraystaff.length-1
but the problem is that the count does not tally.
Sub getStaff(ByVal month As String) If Not con.State = ConnectionState.Closed Then con.Open()
[Code]....
ok, i've called only once getcases but i'm still having the same problem.
this is what i get when i run the program:
if i get Count(*) from the database, the total no of cases i should be getting is 132, whereas the total of cases i get from the program is 157 (7+7+20+20+49+49+5)
if i run the query from sql, this is what i should be getting
i notice that the Count number gets duplicated (7,7,20,20,49,49,5) instead of (7,20,49,5,10,27,13)
I need to seperate a name into 2 parts using split the first part being 2 letters "That was easy" but the last part of the name would have an unknown lenght. so how do I get the unknown length? I believe I understand the Join Part here is what I have but it only works when you know the lenght of the name
Project Notes 'Form has two textboxes and one button 'first text box holds a first and last name ' 1-seperate the first and last name into 2 variables
Can a LINQ or a LAMBDA expression be used to count the 1's in a binary string ?For example, if I convert a number to its BINARY using.>>
Dim binaryString As String = Convert.ToString( numberVariable, 2 )
1) Without using a loop such as a FOR NEXT loop, can I count the number of 1's in the STRING using LINQ or a LAMBDA expression?
2) Can I get the indexes of where the 1's are at in a collection such as a LIST using LINQ or a LAMBDA expression?I know the syntax of some LINQ expressions, however, I don't know which method may be suitable.
However, now I'm converting this program to VB.Net and I'm stuck at this point. Can't find Array(xxx,xxx,xxx) in VB.Net 2010. Is there any option or function for this?
I am trying to get a count of all the times a byte sequences occurs in another byte sequences. It cannot however re-use a bytes if it already counted them. For example given the string let's assume the byte sequence was k.k it would then find only 3 occurrences rather than 5 because they would be broke down like: [k.k].[k.k].[k.k]. and not like [k.[k].[k].[k].[k].k] where they over lap and essentially just shift 2 to the right.
Ideally the idea is to get an idea how a compression dictionary or run time encoding might look. so the goal would be to get down to just 2 parts, as (k.k.k.) is the biggest and best symbol you can have.
Public numUsers As Integer Public fNameUsers As String = ("......users.txt") Public UserRecords As Usersclass() 'note... this line is in a module '
reader = New System.IO.StreamReader(fNameUsers) numUsers = 0 'Split the array up at each delimiter of "," and add new objects ' Do While reader.Peek <> -1 ReDim Preserve UserRecords(numUsers) oneline = reader.ReadLine
Ok i just want to know if value x is not in my array .Heres what i have been trying .Im using VB.net and just need to know when x isnt in the array so i can take an action.
Dim L, Path(0) As Integer Open = cleara(Open) sealed = cleara(sealed)[code].....
Here is how this work so far
Add my location to open ,Create H,G,F for items in open list Find lowest F
Find adjacent nodes
Loop through nodes
If node is not walkable then ignore
If in sealed ignore (this is where im stuck at)
If not in sealed and is walkable then if in open compare G scores else add to open
I'm working in VB.Net. I have a textbox in which the user enters a number of strings seperated by comma. I store this value in a string array like this
Dim Src() As String Src = txtVals.Text.Split(",".ToCharArray)
I want to search a dynamic string in this array. How could I do it in the fastest way?
I'm working in VB.Net. I have a textbox in which the user enters a number of strings seperated by comma. I store this value in a string array like this Dim Src() As String Src = txtVals.Text.Split(",".ToCharArray) I want to search a dynamic string in this array. How could I do it in the fastest way?
I'm working in VB.Net. I have a textbox in which the user enters a number of strings seperated by comma. I store this value in a string array like this
Code: Dim Src() As String Src = txtVals.Text.Split(",".ToCharArray)
I want to search a dynamic string in this array. How could I do it in the fastest way?
I have an array where it storing all the analyzed values. The ubound array is 2999 and if we plot a chart with y-axis as the values and x-axis as the number of array (0-2999), the chart will look like as similar to the chart shown in the link below. (sorry to say I'm not unable to upload my picture from my pc, no idea what is the problem).I'm able to search for the maximum value (~ -25dB) of my chart from my array with this simple routine:[code]But my problem is I do not know how to find my second peak value, as example, the value ~-63 dB as shown in the chart. How should i write the routine to get this value from the array?
this in an array, how do i find how many lines are in this array (obviously there is 4 but i want it to automatically detect it because it may not always be four if i import a differnt txt file)
Dim lines() As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load lines = IO.File.ReadAllLines("fileName.txt") Label1.Text = lines(0)