473,699 Members | 2,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

this is a bloody hard one (for me...) please help me !

Hi everyone,
This really is a tricky one ! (at least for me:). Actually I haven't
found any solution to this problem anywhere...

So I'll try to be as clear as possible in my explanations. First, I
have the following structure:
typedef struct _object3D {
float coord[8][4];
float r, g, b;
} object3D;
float coord[8][4] is an array of 2 dimensions that hold the
coordinates of the vertices of a 3D object read from a

file.Those are homogenous coordinates, that's why the dimension of the
columns is 4 instead of 3. Now as you can see

my 3D object can be composed of 8 vertices. But the problem is that
this number of vertices is static ! What if I

want to have a 3D object
made of 10 vertices. Even worse, the program will crash also in the
case my 3D object is

made of less than 8 vertices as you can see in the following:

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D){
for (i = 0; i < 8; i++)
/*if not 8 vertices -> CRASH :( */
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0;
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;
}

So I thought about doing the following in order to solve my problem:
#define NBPOINTS 8
typedef struct _object3D {
float coord[NBPOINTS][4];
float r, g, b;
} object3D;

but then NBPOINTS can't be change...

OK for those who are still with me here is another thing I thought
about :

typedef float (*rowPtr3D)[4];
typedef struct _object3D {
int nbPoints; /*read from the file so we know the size of the first
dimension*/
rowPtr3D coord;
float r, g, b;} object3D;

But then it crashes in the following :

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D)
{
for (i = 0; i < 8; i++)
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0; <---- CRASH oups...
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;}

OK so if anybody as an idea that may help me, let me know. I'm kinda
desperate !!!!
Cheers,

Sam.
Nov 13 '05 #1
6 1680
berthelot samuel wrote:
Hi everyone,
This really is a tricky one ! (at least for me:). Actually I haven't
found any solution to this problem anywhere...

So I'll try to be as clear as possible in my explanations. First, I
have the following structure:
typedef struct _object3D {
float coord[8][4];
float r, g, b;
} object3D;
float coord[8][4] is an array of 2 dimensions that hold the
coordinates of the vertices of a 3D object read from a

file.Those are homogenous coordinates, that's why the dimension of the
columns is 4 instead of 3. Now as you can see

my 3D object can be composed of 8 vertices. But the problem is that
this number of vertices is static ! What if I

want to have a 3D object
made of 10 vertices. Even worse, the program will crash also in the
case my 3D object is

made of less than 8 vertices as you can see in the following:

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D){
for (i = 0; i < 8; i++)
/*if not 8 vertices -> CRASH :( */
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0;
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;
}

So I thought about doing the following in order to solve my problem:
#define NBPOINTS 8
typedef struct _object3D {
float coord[NBPOINTS][4];
float r, g, b;
} object3D;

but then NBPOINTS can't be change...

OK for those who are still with me here is another thing I thought
about :

typedef float (*rowPtr3D)[4];
typedef struct _object3D {
int nbPoints; /*read from the file so we know the size of the first
dimension*/
rowPtr3D coord;
float r, g, b;} object3D;

But then it crashes in the following :

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D)
{
for (i = 0; i < 8; i++)
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0; <---- CRASH oups...
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;}

OK so if anybody as an idea that may help me, let me know. I'm kinda
desperate !!!!
Cheers,

Sam.


1. Read the C Faq below on dynamic allocation of multidimensiona l
arrays. This will be good fundation material.

2. Try making a vertex a separate class:
struct Vertex
{
float x, y, z;
};

Then an object is composed of {a container of} vertices:
struct Object_3d
{
unsigned int num_vertices;
struct Vertex * vertices;
float r, g, b; // or perhaps c, m, y, k.
}

Your initialization function would dynamically allocate the
vertices:
void Initialize_Obje ct_3d(struct Object_3d const * p_vertex,
unsigned int num_vertices)
{
p_vertex->vertices = malloc(num_vert ices
* sizeof(struct Vertex));
p_vertex->num_vertices = num_vertices;
/* ... */
p_vertex->vertics[0].x = 6.0;
/* ... */
return;
}

3. You could also youse a linked list for the container.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library

Nov 13 '05 #2


berthelot samuel wrote:
Hi everyone,
This really is a tricky one ! (at least for me:). Actually I haven't
found any solution to this problem anywhere...

So I'll try to be as clear as possible in my explanations. First, I
have the following structure:
typedef struct _object3D {
float coord[8][4];
float r, g, b;
} object3D;
float coord[8][4] is an array of 2 dimensions that hold the
coordinates of the vertices of a 3D object read from a

file.Those are homogenous coordinates, that's why the dimension of the
columns is 4 instead of 3. Now as you can see

my 3D object can be composed of 8 vertices. But the problem is that
this number of vertices is static ! What if I

want to have a 3D object
made of 10 vertices. Even worse, the program will crash also in the
case my 3D object is

made of less than 8 vertices as you can see in the following:


You can make a typedef:
typedef float (*vertices)[4];
and then dynamically allocate the needed vertices. The limit
is only limited by your memory resources. Write a function to
Add the vertices to the struct:

Example:

#include <stdio.h>
#include <stdlib.h>

typedef float (*vertices)[4];
typedef struct _object3D
{
vertices coord;
float r, g, b;
size_t v_cnt; /* vertices count*/
} object3D;

int AddVertice(obje ct3D *p, float w, float x, float y, float z);
void PrintObject3D(o bject3D *p);
void FreeObject3D(ob ject3D *p);

int main(void)
{
object3D my = {{NULL},55.6f,2 3.6f,76.9f,0};

AddVertice(&my, 1.22f,2.33f,3.4 4f,4.55f);
AddVertice(&my, 55.1f,44.1f,33. 1f,22.1f);
PrintObject3D(& my);
FreeObject3D(&m y);
return 0;
}

int AddVertice(obje ct3D *p, float w, float x, float y, float z)
{
vertices tmp;
size_t count = p->v_cnt;

if((tmp = realloc(p->coord,(p->v_cnt+1)*(size of *tmp))) == NULL)
return 0;
p->coord = tmp;
p->coord[count][0] = w;
p->coord[count][1] = x;
p->coord[count][2] = y;
p->coord[count][3] = z;
p->v_cnt++;
return 1;
}

void PrintObject3D(o bject3D *p)
{
size_t i,j;

printf("r = %.2f\ng = %.2f\nb = %.2f\n\n",p->r,p->g,p->b);
for(i = 0;i < p->v_cnt; i++)
for(j = 0; j < 4; j++)
printf("Coord[%u][%u] = %.2f\n%s",i,j,p->coord[i][j],
(j==3)?"\n":"") ;
return;
}

void FreeObject3D(ob ject3D *p)
{
free(p->coord);
p->coord = NULL;
p->r = p->g = p->b = 0.0f;
p->v_cnt = 0;
return;
}

--
Al Bowers
Tampa, Fl USA
mailto: xa******@myrapi dsys.com (remove the x to send email)
http://www.geocities.com/abowers822/

Nov 13 '05 #3
On 2003-11-01, berthelot samuel <sa************ **@voila.fr> wrote:
typedef struct _object3D {
float coord[8][4];
float r, g, b;
} object3D; float coord[8][4] is an array of 2 dimensions that hold the
coordinates of the vertices of a 3D object ...

... the problem is that this number of vertices is static !
You can declare coord as a pointer as you have tried below, or
you can declare coord to be a flexible array. In the flexible
array approach, the flexiby array has to be at the bottom of
the struct.

#ifdef HAVE_FLEXIBLE_A RRAYS
# define FLEXIBLE_ARRAY_ SIZE
# define FLEXIBLE_ARRAY_ FUDGE 0
#else
# define FLEXIBLE_ARRAY_ SIZE 1
# define FLEXIBLE_ARRAY_ FUDGE 1
#endif

typedef struct _object3D {
int nbPoints;
float r, g, b;
float coord[FLEXIBLE_ARRAY_ SIZE][4];
} object3D;

When using a flexible array, the most straight forward way to
use it is to use malloc() to create your object instance:

object3D *makeObject3D(u nsigned nbPoints) {
object3D *obj;
int extra_Points;

extra_Points = nbPoints - FLEXIBLE_ARRAY_ FUDGE;
obj = malloc(sizeof(o bject3D) + extra_Points*si zeof(float[4]));
if (obj != 0) obj->nbPoints= nbPoints;
return obj;
}

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D){
for (i = 0; i < 8; i++)
/*if not 8 vertices -> CRASH :( */
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0;
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;
}
Nevermind that i and j are undeclared.

I am not sure what you mean by CRASH, but one problem with this function
is that you are passing an object3D value to the function and not
a reference. This means when the function returns, the caller's
object3D will still be uninitialized. In order to allow the function
to manipulate the callers object3D, the function should be written to
accept a reference to the object3D. In C this is done with a pointer.
Combined with the flexible array approach above, the function changes to:

void initObject3D(ob ject3D *myObject3D) {
int i, j;
for (i = 0; i < myObject3D->nbPoints; i++)
for (j = 0; j < 4; j++)
myObject3D->coord[i][j] = 0.0;
myObject3D->r = 1.0;
myObject3D->g = 1.0;
myObject3D->b = 1.0;
}

And the two functions could be used together like:

{
object3D *myObj;

/* make an object with 9 vertices */
myObj = makeObject3D(9) ;
initObject3D(my Obj);

/* ... */
}

When you are done with an object, you will need a function to
reap dynamically allocated memory:

void freeObject3D(ob ject3D *obj) {
free(obj);
}

This works because makeObject3D did its work with a single call to
malloc.
typedef float (*rowPtr3D)[4];
typedef struct _object3D {
int nbPoints; /*read from the file so we know the size of the first
dimension*/
rowPtr3D coord;
float r, g, b;} object3D;
This is another approach. But if you go this route, when creating an
instance of object3D, you will need another malloc for the array

object3D *makeObject3D(u nsigned nbPoints) {
object3D *obj;

obj = malloc(sizeof(o bject3D));
if (obj == 0) return 0;
obj->coord = malloc(nbPoints *sizeof(float[4]));
if (obj->coord == 0) {
free(obj);
return 0;
}
obj->nbPoints= nbPoints;
return obj;
}

And to reap the memory, you will need two calls to free:

void freeObject3D(ob ject3D *obj) {
if (obj == 0) return;
free(obj->coord);
free(obj);
}

This approach can be used without calling makeObject3D and freeObject3D
though, if you declare both your object and the array off the stack:

{
int nbPoints = 9;
float coords[nbPoints][4];
object3D myObj = { .nbPoints = nbPoints, .coord = coords };

initObject3D(&m yObj);
/* ... */
}

Notice that we pass in the address of myObj to initObject3D so that
initObject3D will be able to modify the object.
/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D)
{
for (i = 0; i < 8; i++)
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0; <---- CRASH oups...
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;}


Never mind that i and j are undeclared.

Again, you have declared initObject3D to take an object3D by value.
This causes the contents of the callers object3D to be copied into the
function's object3D argument. The function will not copy back the
values when the function exits.

You did not show how it is that you created your object3D instance.
Perhaps you did not allocated memory for the coord pointer, and the
indicated assignment is in error because it is dereferencing an
uninitialized pointer variable.

Thirdly, your function assumes the size of the array coord is pointing
to is always 8. This is an error. You declared your struct to contain
the number of points, and the i variable should not exceed the number of
points indicated by the object3D instance.

-- James
Nov 13 '05 #4
sa************* *@voila.fr (berthelot samuel) wrote in message news:<ca******* *************** ****@posting.go ogle.com>...
Hi everyone,
This really is a tricky one ! (at least for me:). Actually I haven't
found any solution to this problem anywhere...

So I'll try to be as clear as possible in my explanations. First, I
have the following structure:
typedef struct _object3D {
float coord[8][4];
float r, g, b;
} object3D;
float coord[8][4] is an array of 2 dimensions that hold the
coordinates of the vertices of a 3D object read from a

file.Those are homogenous coordinates, that's why the dimension of the
columns is 4 instead of 3. Now as you can see

my 3D object can be composed of 8 vertices. But the problem is that
this number of vertices is static ! What if I

want to have a 3D object
made of 10 vertices. Even worse, the program will crash also in the
case my 3D object is

made of less than 8 vertices as you can see in the following:

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D){
for (i = 0; i < 8; i++)
/*if not 8 vertices -> CRASH :( */
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0;
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;
}

So I thought about doing the following in order to solve my problem:
#define NBPOINTS 8
typedef struct _object3D {
float coord[NBPOINTS][4];
float r, g, b;
} object3D;

but then NBPOINTS can't be change...

OK for those who are still with me here is another thing I thought
about :

typedef float (*rowPtr3D)[4];
typedef struct _object3D {
int nbPoints; /*read from the file so we know the size of the first
dimension*/
rowPtr3D coord;
float r, g, b;} object3D;

But then it crashes in the following :

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D)
{
for (i = 0; i < 8; i++)
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0; <---- CRASH oups...
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;}

OK so if anybody as an idea that may help me, let me know. I'm kinda
desperate !!!!
Cheers,


C's Arrays have fixed size, you can't modify their size dynamically.
In cases which require variable sized arrays you use functions like
'malloc', 'realloc' and 'free'

e.g. if you want to create a variable integer array

you do so by

int *intVarArray = malloc(some_siz e_in_bytes);

You address the individual elements of the array now in the same way
as you do for 'ordinary' arrays
that is for the first element

you would do

intVarArray[0] = some_value;

When you are done using this array, you free up the memory aquired
when you called malloc by.

free(intVarArra y);

In case you want to again change the size of the above array to
'larger' or 'smaller' then do so by calling

realloc(intVarA rray, new_size_in_byt es);
Look in your C book for discussion on 'dynamic memory allocation'
specifically look in your book's index for 'malloc', 'realloc' and
'free' functions.

HTH

--
Imanpreet Singh Arora
imanomaniac AT acm DOT org
Nov 13 '05 #5
On 1 Nov 2003 06:15:21 -0800, sa************* *@voila.fr (berthelot
samuel) wrote:
Hi everyone,
This really is a tricky one ! (at least for me:). Actually I haven't
found any solution to this problem anywhere...

So I'll try to be as clear as possible in my explanations. First, I
have the following structure:
typedef struct _object3D {
float coord[8][4];
float r, g, b;
} object3D;
float coord[8][4] is an array of 2 dimensions that hold the
coordinates of the vertices of a 3D object read from a

file.Those are homogenous coordinates, that's why the dimension of the
columns is 4 instead of 3. Now as you can see

my 3D object can be composed of 8 vertices. But the problem is that
this number of vertices is static ! What if I

want to have a 3D object
made of 10 vertices. Even worse, the program will crash also in the
case my 3D object is
snip examples that are known not to work
OK for those who are still with me here is another thing I thought
about :

typedef float (*rowPtr3D)[4];
typedef struct _object3D {
int nbPoints; /*read from the file so we know the size of the first
dimension*/
rowPtr3D coord;
float r, g, b;} object3D;

But then it crashes in the following :

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D)
{
for (i = 0; i < 8; i++)
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0; <---- CRASH oups...
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;}

OK so if anybody as an idea that may help me, let me know. I'm kinda
desperate !!!!


This is the right idea. It is the implementation that is incomplete.
The fact that your pointer is a member of a structure is irrelevant.
As with all pointers, you must initialize it before you dereference
it. Since you didn't, it's value is indeterminate and attempting to
evaluate that value for any purpose, including dreferencing, leads to
undefined behavior. Having you program crash is one of the better
kinds of undefined behavior so consider yourself lucky.

You are looking for a way to have coord point to a quantity of objects
of type *rowPtr3D. (The fact that each of these objects is an array
is a detail which does not come into play until later.) Since you
don't want to use a #define, we can assume that the quantity is not
known until run time.

Once this quantity is known to the program, it can be stored in a
variable (which I will call q). You allocate enough space for q
objects with
myObject3D.coor d = malloc(q * sizeof *myObject3D.coo rd);

After testing to make sure malloc succeeded, you can assign values to
each coord with a loop like
for (i = 0; i < q; i++)
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0;

Note the limit on the first for statement and consider the last:

myObject3D.coor d is a pointer to the space allocated capable of
holding q objects.

By definition, myObject3D.coor d[i] is the same as
*(myObject3D.co ord+i). The expression inside the parentheses involves
pointer arithmetic. The expression evaluates to the address of the
i-th object beyond the one the pointer points to. The dereference
operator (*) evaluates the object at that address.

Now it is important to know that the object in question is an
array. An array subscripted by [j] evaluates to the j-th element of
the array. This is exactly what you want to happen when you write the
expression myObject3D.coor d[i][j].

So even though you cannot define the array in you code, you can use
dynamic allocation to create an area of memory that you can treat, in
almost every respect, as if it were the 2D array you wanted.

The one exception that comes to mind is the sizeof operator.
When coord is defined as an array, sizeof myObject3D.coor d will
evaluate to the total number of bytes occupied by the array. When it
is defined as a pointer, sizeof will evaluate to the size of the
pointer. There is no standard way to determine the size of the area
allocated.

One common solution is to add another member to your structure,
something like
int size;
and in your code, assign this int the first dimension, as in
myObject3D.size = q;
<<Remove the del for email>>
Nov 13 '05 #6
Huge thanx to Thomas, Al, James, Minti and Barry for your time. It
really helped ! Cheers .
Barry Schwarz <sc******@deloz .net> wrote in message news:<bo******* ***@216.39.135. 144>...
On 1 Nov 2003 06:15:21 -0800, sa************* *@voila.fr (berthelot
samuel) wrote:
Hi everyone,
This really is a tricky one ! (at least for me:). Actually I haven't
found any solution to this problem anywhere...

So I'll try to be as clear as possible in my explanations. First, I
have the following structure:
typedef struct _object3D {
float coord[8][4];
float r, g, b;
} object3D;
float coord[8][4] is an array of 2 dimensions that hold the
coordinates of the vertices of a 3D object read from a

file.Those are homogenous coordinates, that's why the dimension of the
columns is 4 instead of 3. Now as you can see

my 3D object can be composed of 8 vertices. But the problem is that
this number of vertices is static ! What if I

want to have a 3D object
made of 10 vertices. Even worse, the program will crash also in the
case my 3D object is


snip examples that are known not to work
OK for those who are still with me here is another thing I thought
about :

typedef float (*rowPtr3D)[4];
typedef struct _object3D {
int nbPoints; /*read from the file so we know the size of the first
dimension*/
rowPtr3D coord;
float r, g, b;} object3D;

But then it crashes in the following :

/*Initialize elements of an Object3D*/
void initObject3D(ob ject3D myObject3D)
{
for (i = 0; i < 8; i++)
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0; <---- CRASH oups...
myObject3D.r = 1.0;
myObject3D.g = 1.0;
myObject3D.b = 1.0;}

OK so if anybody as an idea that may help me, let me know. I'm kinda
desperate !!!!


This is the right idea. It is the implementation that is incomplete.
The fact that your pointer is a member of a structure is irrelevant.
As with all pointers, you must initialize it before you dereference
it. Since you didn't, it's value is indeterminate and attempting to
evaluate that value for any purpose, including dreferencing, leads to
undefined behavior. Having you program crash is one of the better
kinds of undefined behavior so consider yourself lucky.

You are looking for a way to have coord point to a quantity of objects
of type *rowPtr3D. (The fact that each of these objects is an array
is a detail which does not come into play until later.) Since you
don't want to use a #define, we can assume that the quantity is not
known until run time.

Once this quantity is known to the program, it can be stored in a
variable (which I will call q). You allocate enough space for q
objects with
myObject3D.coor d = malloc(q * sizeof *myObject3D.coo rd);

After testing to make sure malloc succeeded, you can assign values to
each coord with a loop like
for (i = 0; i < q; i++)
for (j = 0; j < 4; j++)
myObject3D.coor d[i][j] = 0.0;

Note the limit on the first for statement and consider the last:

myObject3D.coor d is a pointer to the space allocated capable of
holding q objects.

By definition, myObject3D.coor d[i] is the same as
*(myObject3D.co ord+i). The expression inside the parentheses involves
pointer arithmetic. The expression evaluates to the address of the
i-th object beyond the one the pointer points to. The dereference
operator (*) evaluates the object at that address.

Now it is important to know that the object in question is an
array. An array subscripted by [j] evaluates to the j-th element of
the array. This is exactly what you want to happen when you write the
expression myObject3D.coor d[i][j].

So even though you cannot define the array in you code, you can use
dynamic allocation to create an area of memory that you can treat, in
almost every respect, as if it were the 2D array you wanted.

The one exception that comes to mind is the sizeof operator.
When coord is defined as an array, sizeof myObject3D.coor d will
evaluate to the total number of bytes occupied by the array. When it
is defined as a pointer, sizeof will evaluate to the size of the
pointer. There is no standard way to determine the size of the area
allocated.

One common solution is to add another member to your structure,
something like
int size;
and in your code, assign this int the first dimension, as in
myObject3D.size = q;
<<Remove the del for email>>

Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1577
by: Michael | last post by:
Hi! Please have a look at my website at http://noumlauts.com. I am currently working on a new design and I cannot find out, why there is such a huge margin under the first h3 (+subtext) in the #left... Could someone please explain to me, what is producing this big margin? Thanks,
25
1778
by: Protoman | last post by:
Hey, is this program right? It calculates the average, harmonic mean, quadratic mean, and the standard deviation for two numbers. Can you proofread it for me? Here it is: #include <iostream> #include <cstdlib> #include <cmath> using namespace std;
4
1833
by: peter.hrdy | last post by:
Hi guys. i have big problem with using fopen, fsockopen or curl. if i tried to use it on remote site it doesn't works. i've readed to much posts but didn't found anything helpfulll. fopen just give permission denied. ........ please help
1
1080
by: G | last post by:
I have the following DropDownList on my webform. <asp:DropDownList ID="MyStatus" CssClass="DropDownList" runat="server"> <asp:ListItem Value="" Text="Please select"></asp:ListItem> <asp:ListItem Value="0" Text="Where's the nearest bridge?">Where's the nearest bridge?"></asp:ListItem> <asp:ListItem Value="1" Text="Been better.">Been better.</asp:ListItem> <asp:ListItem Value="1" Text="Feeling chirpier than
31
1659
by: anonymouse127 | last post by:
This is now such a nasty place to visit so I'm quitting coming here. Newbies are regularly attacked in a vicious way about top-posting - which is a completely normal thing to do outside of this little newsgroup micro-world. The equally severe beatings people are given for not trimming quotes in the right way is also unfair. Shouting at people to read the rules doesn't hold up as an argument. When you add a newsserver and search for...
3
6303
by: trahul87 | last post by:
Hi, I have a Toshiba Satellite A25 - S207. The internal hard disk has just crashed. I do not want to change the hard disk since its very expensive. So, is it possible to boot using an external hard disk connected through USB? Please help , i am in a real messy situation.
92
6202
by: Heinrich Pumpernickel | last post by:
what does this warning mean ? #include <stdio.h> int main() { long l = 100; printf("l is %li\n", l * 10L);
0
8686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9173
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9033
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7748
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6533
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5872
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2345
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.