Archive

Posts Tagged ‘Fixed’

All Definitions and Usages of Arrays in ASP

October 24th, 2009 Mehmatrix No comments

Arrays are one of the basics of programming. We can create lots of things via arrays like matrices, databases, tables… Let’s make it shorter and start.

Array() Function in ASP

We define our arrays using the Array() function. We can store values with two different ways. We can create the array and put values in array at the same time, or we can create the array then we can initialize the values. For getting the values from arrays we have to know position of value in array. For example; second value of array, third value of array, 56th value of array etc. There is very important point that you have to know: Array() function is zero based. That mean’s first value of array is the 0th element of array.

1.1) Fixed Size Arrays

It’s better to use this usage, if you know exactly number of elements which will be used, because the compiler will know the size of array and make the processes faster.

Example 1.0: Creating the array and initializing the values at the same time.

1
2
3
4
5
6
7
8
9
< %
dim my_array
my_array=Array("First","Second","Third","Fourth")

Response.Write "my_array(0) : "&my_array(0)&"<br/>"
Response.Write "my_array(1) : "&my_array(1)&"<br />"
Response.Write "my_array(2) : "&my_array(2)&"<br />"
Response.Write "my_array(3) : "&my_array(3)
%>

Output of Example 1.0:

1
2
3
4
my_array(0) : First
my_array(1) : Second
my_array(2) : Third
my_array(3) : Fourth

This is a fixed array that includes only 4 elements that you define. You can not add another element in this array. Also, Click to Read Complete Article »

Bookmark and Share
Categories: ASP Tags: , , , ,

Fixed Method for Positioning Elements in CSS

October 19th, 2009 Captain 4 comments

This article is short but inculding very useful information. A few years ago, we web programmers are used to make these operations via javascript. However, this wasn’t good method because, computers were not powerful enough. Nowadays, computers are too powerfull and we don’t need to use javascript anymore! Just one thing is required for us: CSS(Cascading Style Sheet).

Look at the top-right of this page. Did you see it? Let’s see how it is done…
Structure 1.0:

1
2
3
4
5
6
7
8
9
10
< !doctype html>
<head>
<style type="text/css">
#[DIV_ID]{
position:fixed;
top:[margin-top];
right:[margin-right];
left:[margin-left];
bottom:[margin-bottom];
}</style></head><body><div id="[DIV_ID]"></div></body>

Example 1.0: Assume that we have a div named Click to Read Complete Article »

Bookmark and Share
eXTReMe Tracker