Extract A Subarray From An Array Similar To MyArray[20:30] In Other Languages?
Dec 23, 2011Something like this:
Function SubArray(Buf() As Char, FromChar As Integer, ToChar As Integer) As Char()
Something like this:
Function SubArray(Buf() As Char, FromChar As Integer, ToChar As Integer) As Char()
I need to extract a value from a process array to myArray:
File: MyClass.vb
Public Function getTheRunningProcess()
Dim MyArray As Array
[Code]....
Now you might be thinking i can directly use the process in the File: Form1.vb but here is the situation, i have to use this function over and over again in different form as the application demands it has to be.
I know how to check whether an item exists in a list using (MyList.Contains), But I do not know how to check the whole list. For example (use one button and one richtextbox):
[Code]...
I'm using Real Studio 2011r3.It's just a simple game that's a small maze from a bird's eye view and you've got to dodge enemies and what not.But I've been told to make a map array like this: [code] I've got level1map(13,13) as an integer, and the numbers in the brackets are supposed to be ypos, xpos.Say I make level1map(5,7) as = 1, it'll make both the 5,7 and the 7,5 so that you can't walk into them.. even if 7,5 is still = 0.I could have just left something out somewhere, but I've been trying to work this out for days..Oh, and with the 7,5 will let me walk there if I walk from the left or right.. but not from the top or bottom.
View 11 RepliesI'm an inquisitive .NET student without any commercial working knowledge and I have been puzzled by what exactlty are .NET languages meant for? Q1.If you look on job websites, .NET seems mainly used for web applications, not much for Windows applications? (My dream job is to develop standalone small Windows applications.)
[Code]...
visual basic.net is case insensitive so it allows the coder to write without caring or remembering the casing of variables. it also relieves from the 'undeclared variable' errors if you use the variable in another case than the one used in declaration. The fact that its line termination is a line feed makes it even more readable unlike C# or c++ that need good care in the casing and contineous war with following up with the {}, matching them and figuring out which is for which.my question is what are the advantages of c# over vb knowing that both get compiled to MSIL so there is almost no performance difference between the two languages?
View 1 RepliesI read a an array of bytes from a file I pass this to a class that then assigns various bytes from that array to various members of varying sizes.
Ideally i would like to do something like this
memberThatIsAUShort = bitconverter.ToUShort(tempArray.subArray(3,5))
memberThatIsAShort = bitconverter.ToShort(tempArray.subArray(6,8))
Instead of looping through the array, copying the bytes to new shorter array and passing them in.
I have an array of structures:
[Code]...
An array of the above structure with 30 element. I want to sum the empsal of those emp elements whose emp.empName & emp.empAge is equal.
[Code]...
I want to reading in a excel file and extract the sCodenumber sDescription ans the sStatus and store them in a array : StatusComposeArray(5200) As MyCompose. After this I need this array for comparing outside this class. But as can you see the array is defined inside the sub: ReadingIn_ExcelFilesCompose [Code]
View 2 RepliesIn VB6 I could set up code to loop through say 10 option buttons to check their values. The code would be something likie this:[code]But in VB .NET it seems that if I use the Controls command as above I cannot use/check the Checked property as Control does not take that as a property of Control. It seems also that I may have to use the Find property of Control as in "Controls.Find" etc.How can I do this in VB .NET? I have a very control intensive application and I must be able to easily loop through controls and check their values without writing out 10 x the code required.
View 8 RepliesI'm using VS2008.Is the following OK to do the following VB.NET with a very simple class (see below)?
for each CurrentObject as MyObject in MyArray
'access current object
next
The "simple class":
Class MyObject
public I as integer
end class
I seem to remember that something about needing iEnumerable, but my compiler isn't complaining.
I need for the current values entered into the textboxes to show up in a messagebox when enter is selected. I will also need to know how to also have in this message box only the checked boxes of the CheckBox.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myArray(12) As String
myArray(0) = TextBox4.txt
[code]....
I have an array DetailsArray in VB.NET which contains the result of a LINQ query. I have shown below the values of the array. i need to get the "ProjectID" from the array and assign it to 'ProjID' variable
DetailsArray (0){Name =
"TestProject1", ProjectID = 10}
Dim ProjID as Integer = DetailsArray(??)
How would I do that?
Okay here is a short video that shows exactly what I want to do. I'm a beginner with databases so I'm not that good at it. [url]...
View 12 RepliesDim strTest(recordSet.Count)() As String[code]...
Then once the array i populated above, i need to find the if another variable is contained in the second dimension of the second paren contains the value of my variable like this.[code]...
I want to pass a List of T where T is an object I've created that has about ten properties (strings, dates and integers).The lst passes to the function successfully. I am also passing an New T of the Object (itm as T).I can see all the values (see image below), but because it's generic I cannot seem to retrieve the property values and I cannot figure out how to iterate through the properties of each itm as they are retrieved in the For Each.[code]
View 10 RepliesThis illustrates a series of bytes that I've received from a socket and assigned into a byte array (frameData). How do I extract the ascii string from frameData if FrameData.Length is 79 bytes long and I need to extract the byte locations whose begin -frameData(26) and end frameData(44) are given by the arrows I've drawn?
View 3 RepliesI have this stored in Varible (History)
Date Open High Low Close/Last Volume
12:35 0.0004 0.0007 0.0004 0.0007 84,556,352*
01/21/2010 0.0005 0.0005 0.0004 0.0004 21,650,660
01/20/2010 0.0004 0.0005 0.0004 0.0005 8,030,977
01/19/2010 0.0005 0.0005 0.0004 0.0005 22,396,206
01/15/2010 0.0005 0.0005 0.0004 0.0005 15,749,998
How do I extract each line and store in Array (fhistory(6) ?
I have been puzzling over this for about 2 days now but to no avail.All i am trying to do is retrieve all the "<a href = "myLink.php">MyLink</a>"
I can do it via the webbrowser with getElementsByTagName but i just cant for the life of me work out how i split the returned html into either an indexed array or just use inStr or Split function to split this into seperate value, But if i have a csv file with 20 links i dont want to have to load every page into a webbrowser control just to use getElementsByTagName.
Now it all works fine and retrieves the source code from the page. I have only extracted part of the code which is relevant to the retrieving html to try to shorten this post.
[Code]...
I'm using WinPcap to capture incoming data. Basically I'm dealing with a continuous stream of incoming data, either as byte array or as memorystream (pieces up to 64kb).
I need to check this data to see if there's a certain url and then extract it.
The url I need to find looks like this:http://201.122.38.5/data/today/798572987-589571?139805890582 The length of the 'code' after "/today/" is always the same. The IP address changes. What's the best/fastest/most efficient way to continuously check these byte arrays or memorystreams and extract the urls without hogging the CPU too much?
[Code]...
How do I Extract all Characters in Unicode, UFT8,iso-8859-1 to 9 etc to a list or array In VB?I have a SQL Database of which contains values from 51 languages. I need to detect which ISO-8859-? Was used to encode the string value. For example Turkish Characters i.e. "Ö Ş ş ğ ü Ç" Once I have the correct ISO, I need to convert the Chars with-in the string to Unicode using only if the string value contains values that are not UFT7, and convert the string to HEX?The reason I need to detect the ISO etc is because we are sending SMS, of which jump from 160 characters to 70 if a special characters are used, i.e. "Ö Ş ş ğ ü Ç" Is there a simple way to extract the ISO-8859 Character Set to a Array etc, or is there a simple way to check if the character exists with a ISO-8859 data set?
View 5 Replies[Code]...
What am I doing wrong or do I use a incorrect way to extract text from an array? Using += takes up a lot of computing power when it reaches like 50000 characters so I want a method with much better performance
Best way to have different languages?
View 4 Repliesi am trying to get the available languages installed in visitors pc's. The problem is that i don't want to get the languages from the internet browser.
View 1 RepliesI´ve been tryed to get more languages in my program.I´ve tryed application settings.
View 8 RepliesWhy use VB over other programming languages?
View 2 RepliesDim str As String
Dim str2 As Array
str = "blabla duhduh"
str2 = str.Split(" ")
I'm building a website which will have a Spanish and Italian version.
In the past, when building a site which must be available in different languages, I've created a SQL Table like follows:
dbo.News
--------
ID int
EnglishTitle nvarchar(200)
SpanishTitle nvarchar(200)
[Code]....
However, I've found this really time consuming (especially if the client later asks for another language option as a second phase).
What is the best practice for doing something like this, allowing scope for extra languages?
Is there a way to perform this in VB.NET like in the C-Style languages:
struct Thickness
{
double _Left;
double _Right;
[code].....
I'm not sure if what I am trying to do is possible, but surprisingly VS2008 seems to let me copy a .cs file directly into my VB.NET project. I then thought that I may be able to use the class in this file directly from VB.NET. However, it doesn't see it when I try to reference it in. Is what I'm trying to do possible, or is VS2008 simply treating the C# file as a resource file or something?
View 3 Replies