Create 2-Dimesional Dynamic Array Large Size
Aug 22, 2009i have a problem with the size of array i want to make a 2-Dimensional array with large size such as
[Code]....
i have a problem with the size of array i want to make a 2-Dimensional array with large size such as
[Code]....
I'm trying to find the sum of all the digits that make up the number 2^1000, which you may have guessed is from Project Eula. I think it's good so far except I'm just learning about arrays and dynamic arrays, so how will I know what the size of the index will be so I can specify when the Do loop should stop so I don't get an indexoutofrange exception?
vb.net
Dim BigNumber As Double = 2 ^ 1000
Dim DigitArray() As Char = BigNumber.ToString.ToCharArray
Dim Index As Integer = 0
Dim SumOfDigits As Integer = 0
[Code] .....
I m trying to manipulate some excel sheet data in visual basic but for tht i hv converted the excel file into text tab delimited file. now i m able access each column n row value as i want but the prob is the text file has to b input n the no of columns in it could be varied so i need a method to count the number of elements in th tab delimited array wen first time the text file line is read.
View 8 RepliesI have a label which appears full screen on a projector (VGA 2). In this label I will be sending strings. Some one liner's, some wrapped paragraphs. Some multi-line with carrage returns. My goal is to have the font dynamically change size to be as large as possible without overflowing the fixed label size.
View 10 RepliesDoes this create a dynamic byte array?
Code:
Private m_renderedReport As Byte()()
Or this actually creates a structure?
I'm trying to create an array of checkboxes dynamically and also want to put event to those checkboxes. For example: I have a array of checkboxes - Chk1, Chk2. I want it to work this way: When I check Chk1, I want to disable Chk2, and when Chk1 is unchecked, Chk2 is enable, and vice versa.
[Code]....
I want to write a program to do Markov chain, but my states are quite large. First of all I calculate all the transition probabilities and revenues for all states(1381860 total states), and store in a multidimensional array. Public RevArr(0 To 9, 0 To 750, 0 To 282) As Long
After that the iteration of markov chain should use these as inputs to calculate the steady-state probabilities. But when I try to run the main code I got this error.Exception of type 'System.OutOfMemoryException' was thrown.
The following is the declaration of second array I add just another dimension for storing all the iterations, but I get this error. Dim stateprob(IT + 1, 0 To 9, 0 To 750, 0 To 282) As single
I want to write an extension method that works with all kinds of arrays (Integer, String, Decimal, ...). It returns an array of the same type and size as the input parameter array.[code]...
View 1 RepliesI have the following code to create an array of serial ports.
[Code]...
Trying to create a program that accepts a square array size 4 by 4. Then it should print the totals of the rows and columns. I started with a form and made text boxes and created a print button. I made it so that numbers can be input into the boxes. When hitting the print button, it should print the totals of what was input, however, it isn't doing that. Is there a different way to write the array code so that it will print it? Should i not have text boxes but rather have labels with fixed numbers set in them?
View 11 RepliesI am trying to create and initialize an array of structures of a fixed size. Each struct will be populated when a button is clicked. Here is an example of my struct:
public structure buttonStruct
dim x() as Boolean
dim y() as Boolean
[code]....
In my form_load function I am declaring the array of structs and:
Dim BtnStruct(15) As ButtonStruct
BtnStruct(0).Initialize()
[code]....
Whenever a specific button is clicked, I am trying to collect data and store it in the respective struct and so for example, if button 1 is clicked then I will store the data associated with button 1 into BtnStruct(0). The position of the button is stored in a public variable called BtnNum. If I attempt to store information in the struct inside another function as follows, I receive an error
BtnStruct(BtnNum).x(pos - 1) = temp "btnstruct is not declared. it may not be inaccessible due to its protection level"
I am new in this forum, also new in VB.Net I need to create a public class for insert and delete data to database Public Class My_DBFunctions
[Code]...
I have created an vb.net windows application. In the application i have 2 xml files (e.g., Pre.xml & Post.xml) & the 2 files are same structure.
My requirement is compare the pre & post xml files and get the differences between xml files. Like what are all the newly added nodes, removed nodes and modified nodes as well.
I tried with XmlDiffPatch.Dll, it is working for small size xml files, but in my case xml file size should be upto 100+ mb.
I am using this code to write files
Try
Dim ObjWS As New localhost.Service
'ObjWS.AssigningDataToTemplate(1550, arrValues)
[Code]....
Here i got proble to send a large size of file like 500 mb file etc
I want to load minimum 150MB of XML into dataset,
simple way of doing that is
XmlDataDocument xmlDatadoc = new XmlDataDocument();
xmlDatadoc.DataSet.ReadXml("C:\books.xml");
But i feel on Lagre size message this code make some performance issue.
I want to load minimum 150MB of XML into dataset,simple way of doing that is
XmlDataDocument xmlDatadoc = new XmlDataDocument();
xmlDatadoc.DataSet.ReadXml("C:\books.xml");
But i feel on Lagre size message this code make some performance issue.
I've build a large program with many references. F.e.:
System.Data.DataSetExtensions
System.Linq.Dynamic
I've to write a Dynamic Linq Expression: [URL]
In my case: Dim query As IEnumerable = ds.Sales.Where(strWhere)
But with System.Data.DataSetExtensions Where is misinterpreted. The compiler expects (Datarow, Integer, Boolean). If I delete System.Data.DataSetExtensions everything is ok with this expression, but I get many other errors, so I need this reference. What can I do that the Where is interpreted correctly?
Is it possible to make a checkbox large? So far, the sources i've read said that it's nearly
impossible.I've tried Cssclasses and it didn't work either. I don't want to cheat and use a TextBox.How can I make the checkboxes larger?
So, I have a little issue.. I can't currently explain it using the software I'm developing because it's "internal"... So I'm going to describe it as an email serverAnd the email server has a fair number of email accounts, and I want to save the accounts emailFor development, I've been saving it all in a list of a structure (this sounds worse than it is, the data actually is no more than 120 bytes per "email")
View 5 RepliesWithin our application, some of the object's text are effected by users with "Large font" turned on under Control Panel>>Graphic Properties. I can't determine what is the trigger to this behavior. I have many forms including TableLayoutPanels, ComponentOne Sizers, some objects with DOCK=Fill, and AUTOSIZE=TRUE. I wrote a simple Hello World form, and it is not impacted by the "large font" setting.
View 1 RepliesI'm using "My.Computer.FileSystem.CopyDirectory(...)" to copy large directories (30-50gb) from one mapped share folder to another. Using "FileInfo.length" to add up all file and subfolder sizes, determines the 'origin directory' size just fine. However, if I use the same method for determining the size of the 'destination directory', mid copy, it returns the full file size, despite the copy not yet being complete.I'm at a loss as to why, as this method works fine in testing, going from a local PC t
Private Function FolderSize(ByVal dir As String) As Long
Dim Size As Long = 0
Dim d As New DirectoryInfo(dir)
[code].....
i need to read a large file stream binary my code is Dim sr As New IO.FileStream(srcFile,
[Code]..
How to compress large mp3 files :
I want if i have a 5 mb files then it can be converted to 1mb or low ...so that the high beats and music would be very low.
i want the coding for that in vb or vb.net ?
In my project, form_double Click and Form_Maximize is not working when i do break point. Its not Button_Click, Form_Load. I want to do like this. "My project design form grid column size is small when form load and want to be large grid column size when the form is maximize."
View 1 RepliesI am facing an amazing problem in my application. On my Developement server when I am running my application, then there is one function where I am trying to put whole stringbuilder contents in a string object. This Function is used for paging the reports.For that I am using a method of Stringbuilder.tostring() and when I chek the value of this statement (stringbuilder.tostring()) it shows no such interface is supported, which later on throws exception of system is out of memory. Here i am using .net 2.0 framework and sql server 2005 database.But when I run the application on stagging server then there is no such exception thrown.[code]
View 3 RepliesAre inputboxes nolonger dynamic in size?in VB6 I could list say 12 months of the year along with month numbers and ask the user to select a month number. So the code would go:strmsg = "1" & chr(9) & "January & chr(13) & "2" & chr(9) & "February" & chr(13) e.t.c. {for each month} & "Leave Blank To Cancel". This would list Month 1 to 12 plus the last line.
There appear to be 2 problems using vb.net:
1The input box does not grow virtically to accommodate a dynamic number of lines
2The chr(9) function to produce a "tab" does not appear to work, whilst the chr(13) (Return) does work
i am in the process of learning myself VB.net (2010 dotnet 4 )And am a litte confused in whats the best way to program what can be called an array.i want to have an array that looks like this,
{{"aap", 1}, {"noot", 2}, {"mies", 3, "boom"}, {"vuur", 4, 7}}
now i tried to declare
[code].....
Is there a better (more compact or elegant) way of declaring a large array such as this?[code]...
View 3 RepliesI need to improve memory performance on my application and I could see that I have problems with memory fragmentation.I've read an interesting article on large objects from Andrew Hunter of Red Gate, and one of the solutions he recommends isow do I implement his suggestion in my code?My program has a very complex form (with an object that leaves residual memory every time it opens. I found a complex list that may be the culprit, and I'd like to implement his suggestion to see if it fixes the issue.
View 1 RepliesI need to write code to interpolate the values shown in the image below. By "interpolate" I mean that if you were given a value of [Code]. I have working in Excel but I can't figure out how to make it work in VB 2010. Should I set my data up as an array or as 6 lists? If the user inputs a certain number how do I code it to look for the next highest number and next lowest number?
View 10 Replies