Two-Dimensional Array Resizing
how do I resize a two-dimensional array? The array I'm working with is "data(X)(Y)" where X is 0 or 1 and Y grows to a dynamic number.If "data(1)(highest element)" IsNull, then I need to strike it from the array. I believe this should be doable by simply resizing the second dimension down by one. Through researching I established the following set of code:
I = UBound(data(0)) - 1
ReDim Preserve data(2,I)
But it results in a "Subscript out of range" message on the latter line. Short of looping through and building a new array.
View Replies
ADVERTISEMENT
If I have an Array declared like this:
MyArray = array (“value 1”, “value 2”, value 3”)
Will this array physically be a long single row or a single column (like below)?
Value 1 value 2 value 3
Or
Value 1
Value 2
Value 3
View Replies
View Related
I need to loop through a two-dimesnional array (x,y) until a value in x is empty or the end of the array is reached, whichever comes first. Example array:
Dim myArray(4,1)
myArray(0,0) = "part 1"
myArray(0,1) = quantity
myArray(1,0) = "part 2"
myArray(1,1) = quantity
myArray(2,0) = "part 3"
myArray(2,1) = quantity
myArray(3,0) = ""
myArray(3,1) = quantity
myArray(4,0) = "part 5"
myArray(4,1) = quantity
In the example above, the loop should stop once it determines myArray(3,0) is empty. If myArray(3,0) was not empty, the loop would continue until the end of the array was reached. Anybody have a code example to do this?
View Replies
View Related
I'm working on developing (yet another) shopping cart for my work. I was wondering if anybody knows which approach leaves a smaller footprint in memory on a server: an ADODB Recordset which stores arrays one-dimensional arrays or a two-dimensional array?
We are currently hosing our web site on a shared machine at Verio. The cart I have to build needs separate carts because a customer's products can come from different locations. Each location will have a different cart. On the cart page itself, I would like to display each cart in a separate location.
Logically, it make the most sense (to me, anyway) to use an ADODB Recordset to manage each individual cart (array) than to write the code to manage the arrays. What are the disadvantages of using ADODB recordset instead of a two-dimensional array in this case?
Which approach would be easier to manage and manipulate? Are there any reasons why I shouldn't use a two-dimensional array? The nice thing about ADODB is that I will not need to program certain features and have access to FILTERS.
Any suggestions about how each approach would scale as site traffic increases? Will one approach bog down the server more than the other? I'm also open to suggestions about a possible, yet illusive, 3rd way.
View Replies
View Related
what i want to do is have a (multi dimensional?) array, so that each second dimension represnts a row of radiobuttons. The trouble is i don't know what to name the arrays as. Obviously for each row the names for the different radio buttons will be the same, meaning you can only select one.
in php you could do it with a single array as you name each row of radio button differently:
1st row:
name='array[0]'
2nd:
name='array[1]'
in asp it doesn't look like you can do it this way, because to create a similar array you'd do something like
1st row:
name='array'
2nd
name='array'
then use split in the recipient script. This does not work however, because each radiobutton (on all rows) has the same name, and therefore when you click one all the rest on every row are unclicked..
View Replies
View Related
I understand the logic behind a multi dimensional array (sort of). What I need to do is be able to capture the product information (that is in a product session) that a user has selected and email it to a specific address.
The email coding page is written in javascript. This page is already being used to also send the customer credit information. If anyone has some insight in this I would be very appreciative. Code:
View Replies
View Related
I guess one should declare the array using empty brackets.
Dim MyArray()
Later I set MyArray to:
Redim MyArray(2,3)
The problem comes now. How should I use Redim again? I have heard that only one of the two dimensions can be enlarged or decreased. Is that correct? If so, which dimension would be ok to set to 5 in MyArray. Is ReDim MyArray (2,5) correct or should it be (5,2)?
View Replies
View Related
how to get and assign the first dimension of a two dimensional array to another array? For example, I have a recordset object (rsObj) and then I take that object and assign to array (via GetRows() method). I would like to take just the first dimension and assign to another array, but I get a "Subscript Out of Range" error.... any ideas?
temp_array = rsObj.GetRows
new_array = temp_array(0)
View Replies
View Related
Does anyone know how to store multi-dimensional arrays in the Application object? And if so please show an example.
Also, how do you loop through multi-dimensional arrays? I just can't seem to get my head wrapped around this.
View Replies
View Related
I would like to know how many rows and columns are created in the following array. Is it 10 rows and 2 columns or is it 10 columns and 2 rows? Dim Array(9,1)
I have searched for some info about it but not found any consensus. Some sources claim that the first number symbolizes the rows and the second number the columns and other sources claim the opposite. I am confused.
What is it really like? How many rows and columns?
Assume that I need an array with 2 columns and 5 rows then how should it be declared (4,1) or (1,4)?
Which is the first dimension and which dimension it the second one? Horizontally (first/second) vs vertically (first/second)?
How are the various elements called, for example how is the element on the first row in the 5th column called. By using (0,4) or (4,0)?
Assume that I want to store first and last names in two separate columns in an array and then expand the array by using Redim/preserve. The dimension I want to expand is the one with the rows because I view the array as a table with two columns.
I know there are certain rules that apply when it comes to using Redim/preserve on multidimensional arrays. Only the last dimension can be changed etc. How could that be done in this case? I am mainly interested in the declaration (1,x) or (x,1), where 1 is the number of columns and x number of rows (that is increased).
View Replies
View Related
I am trying to setup a 2 dimensional array which i can populate on the fly with data coming frtom a database.
I understand that you have to set a specfic size for the array in ASP, but I am looking at making the array dynamic and using the Redim function to increase the size by 1 each time. Code:
View Replies
View Related
I am trying to create a dynamic multi-dimensional array, based on a count from a database. The count is correct, but when I try to Redim preserve my array, I get an error...
Subscript out of range
referring to the line of code...
ReDim Preserve builderArray(CInt(builderCount),5)
How can I do this redim successfully?
View Replies
View Related
My client wants me to add a functionality which would enable him upload and resize the pictures. His server is having ASPUPLOAD and e-kov components intalled. Also he doesn't want to write files to the disk and save only to memory.
I can use ASPUPLOAD's functionality to save files in memory or save files in the database. My question is how can I access a file so that I can resize the image using e-kov software. And when using 'upload.save' only, without path, it saves the file virtualy but where does the file and how to access it.
View Replies
View Related
I currently use ASPImage and resize JPG files with no problem. How, though, do I resize GIF images? Is there a different component?
View Replies
View Related
I have been using Imager Resizer....
View Replies
View Related
Recommend me a good free image resizing tool you've been...
View Replies
View Related
I have a load of images on a server, but I don't want to resize the original images. I want to display the images on a page but at a reduced size.
Just forcing the browser to display the images at a smaller size using the width/height attributes is not really acceptable as the picture looks like *** (a technical term if ever there was one :P).
Ideally I want to see if there is the functionality to properly resize, i.e. resample?, the image on the fly. Im not interested in storing the images just resizing and displaying.
View Replies
View Related
I have a web page which pulls images from a access database.
The images are displayed on the page from a recordset (objRS("Thumbnails") - Thumbnails being the field in my database that holds each image.
However, because I want the images display in thumbnail format, it means I have to open Photoshop and resize each image to thumbnail size (100 x 100) before adding them to the database.
Is there a way in ASP that I could code so that each image brought in from the record set, no matter what size, will display at 100 x 100px so I don't have to manually resize them to thumbnail size myself?
View Replies
View Related
I'm designing a site in asp where the user can upload an image and the page will read from a database and show the image. The problem is that all images are odd sizes and the image is being stretched when displayed on the page. I want the page to intelligently resize the image so that it will fit within the confines of a frame. I've tried all sorts but nothing seems to work.
View Replies
View Related
I need a help to prevent resizing of <TDwhen i post inside this <TDhtml text of other web page.
View Replies
View Related
I realise that ASP can't dynamically create images on the fly using ASP code. I am considering getting a DLL file to do this for me. My question is this: do I just place the DLL on the server with my ASP file? As DLL files need registering, how does this work with using a web server? I have a folder called cgi-bin on my server.
I realise this is more a question for my webhost but I have never used a dll before and wondered if anyone could shed some light on what is involved?
View Replies
View Related
making the image proportion to its size...
View Replies
View Related
I've been looking for ages for decent serverside (or clientside I suppose,) software for uploading images. I need the software to make thumbnails of the images too.
I'm making a property website product and I need to make it easy for the user to upload pics by browsing to them and selecting them. When he/she adds the info and photos the thumbnails will be made automatically ....
View Replies
View Related
I have a register module where user can register with their information and they have to upload their images.
1. I need to know how i rename that image and upload to server with that new name.
2. how to i change the image's height and width and then upload that image.
View Replies
View Related
I've been tasked with the challenge of re-sizing images linked via BBcode on the fly. I have compiled a list of functions that do individual components of this task, but stringing them together has proved, well, a challenge.
I discovered this code that will re-size the images, however this will need to be added on an ad-hoc basis, and the fact that the image name appears twice complicates the usual system I used to add the code.
Usual way of replacing the code (inside a function):
Code:
vText = Replace(vText,"[ img ]","<div align='center'><img align='middle' src='")
vText = Replace(vText,"[/ img ]","'></div>")
Image resize code:
View Replies
View Related
I need to install a component which will upload and resize images (jpegs). I don't need too many bells and whistles but would like one which is reasonably good at keeping the file size low (or lets me set the compression options).There's quite a few out there, has anyone any recommendations?
View Replies
View Related
I have a sysmon activex control inside an ASP page. When I resize the window, the activex control does not resize itself to fit the window. Does anyone know how to make the activex control automatically resize to fit the window?
View Replies
View Related
I have a script on a site that i am redoing and have used an i frame that resizes depending on the size of the page that is loaded into it.
I would like to use an existing asp driven page from a realesate site to laod in to the iframe as the "listings" section; however the frame will not resize. any sugestions? Code:
View Replies
View Related
What is the difference between the HTML <table> and ASP <asp:table>? I've just shifted development environments from DreamWeaver to Visual Studio. I've put together a page by dropping elements directly onto the grid, but I get no automatic reformatting. My old technique from DW would be to put it all in a table for formatting, but I find that clumsy in VS.
First, they have both html and asp table controls, and I don't know the difference between them. Second, the two controls are rendered on the design page differently, and I really can't tell what they are going to do. Third, the asp:table is shown without any rows or columns. What's up with that?
View Replies
View Related
My company works with a lot of estate agent websites and other projects that require images to be uploaded by the client (and their employees). We have been searching for a client-side resizing application (such as a Java applet) that can perhaps create a thumbnail, as well as a smaller version of the original file and then upload these two images to the webserver.
There are plenty of php and perl Applets that do this, but none that can submit to an ASP form.
View Replies
View Related
I am working on a gallery and am uploading pics. Is there any way of resizing the resizing image eg make a thunbnail from the image been upload. Also can I rename the image so that images aren't overwritten.
below is the code I am using.....
View Replies
View Related
is it possible to resize images uploaded in the dundas component or any other upload 3rd party component.
Also i woudl like to be able to rename them and put in specific folders?
View Replies
View Related
Can this be done? I have designed a site that displays images in a specific dimension, but the majority of site visitors either disregard this requirment or don't know how to resize images. Is there a way to upload in image and then physically resize it to whatever I want?
View Replies
View Related