473,765 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"data hiding" prototype code

I'm not sure if "data hiding" is the correct term, but I'm trying to
emulate this object-oriented technique. I know C++ probably provides
much more than my example, but I'd just like some feedback to find out
if I've done anything wrong. Also, I am working on this for an
embedded environment, so if there are great inefficiencies with this
code, I'd like to know that also. I realize there is overhead with
using an "accessor" function.

I'm trying to:
1.) "hide" data (variables declared as static at file scope) within a
file (algorithm.c)
2.) manipulate the data using an algorithm function (Algorithm())
3.) provide external access to the data using an "accessor" function
(GetAlgorithmDa ta())

Here is my code:

main.c:
#include <stdio.h>
#include "algorithm. h"

int main(void)
{
const ALGORITHM_DATA *alg_ptr;

Algorithm();
GetAlgorithmDat a(&alg_ptr);
/*alg_ptr->data1 = 99.9;*/ /* This is not allowed */
printf("%f\n", alg_ptr->data1);
printf("%f\n", alg_ptr->data2);
printf("%f\n", alg_ptr->data3);

return 0;
}

algorithm.c:
#include "algorithm. h"

static ALGORITHM_DATA alg;

void GetAlgorithmDat a(const ALGORITHM_DATA **out)
{
*out = &alg;
}

void Algorithm(void)
{
alg.data1 = 1.0;
alg.data2 = 2.0;
alg.data2 = 3.0;
}

algorithm.h:
#ifndef ALGORITHM_H_
#define ALGORITHM_H_

typedef struct {
double data1;
double data2;
double data3;
} ALGORITHM_DATA;

void GetAlgorithmDat a(const ALGORITHM_DATA **out);
void Algorithm(void) ;

#endif /*ALGORITHM_H_*/

Apr 11 '07 #1
11 5655
On Apr 11, 12:37 pm, "sofeng" <sofeng...@gmai l.comwrote:
I'm not sure if "data hiding" is the correct term, but I'm trying to
emulate this object-oriented technique.
I like to call it encapsulation.
I'd just like some feedback to find out
if I've done anything wrong.
I think there are some things you can do to improve your strategy
here, comments to follow.
I realize there is overhead with using an "accessor" function.
There are, and there are a couple of ways to mitigate that. However,
unless your accessors are being called in a tight loop, it's probably
not an issue you need to solve.
I'm trying to:
1.) "hide" data (variables declared as static at file scope) within a
file (algorithm.c)
First of all, making the variables static at file scope doesn't really
achieve the goal of encapsulation, particularly when you publish the
struct definition in the header. Secondly, static variables at file
scope are not much better than globals: they're certainly not thread
safe, and you open yourself to other sorts of errors as well.
2.) manipulate the data using an algorithm function (Algorithm())
3.) provide external access to the data using an "accessor" function
(GetAlgorithmDa ta())
Your design does not make it clear who "owns" this data. An algorithm
is typically a particular pattern applied to someone else's data,
although it may store some of it's own in the process. Thus, using
"Algorithm" as the generic placeholder for your OO class could be
confusing. Typical algorithms will *take* data and return *results*.

However, assuming that Algorithm really does own this data, I would
define the struct inside the .c file, providing the typedef in the .h
file. *This* hides your data. Algorithm() can return a pointer to this
type, and then you can call accessors with the pointer to obtain
individual elements of the data.

Don't have time to rewrite your code, so I hope that helps.

-bluejack

Apr 11 '07 #2
bluejack a écrit :
>
First of all, making the variables static at file scope doesn't really
achieve the goal of encapsulation, particularly when you publish the
struct definition in the header. Secondly, static variables at file
scope are not much better than globals: they're certainly not thread
safe, and you open yourself to other sorts of errors as well.
This is a very important point.

You should put in the .h files just:

typedef struct data;

hiding ALL the definitions of data from external user programs.

This has many advantages:

1) Impossible for your user to know ANYTHING about what is behind data.
2) Can't allocate new data structures but MUST pass through YOUR
allocation.
3) You publish the interface with accessor/setter functions.
4) You can change the structure layout at any time without needing
to recompile any user code.
Apr 11 '07 #3
Thank you for your reply. See my comments below.

On Apr 11, 1:18 pm, "bluejack" <bluuj...@gmail .comwrote:
First of all, making the variables static at file scope doesn't really
achieve the goal of encapsulation, particularly when you publish the
struct definition in the header. Secondly, static variables at file
scope are not much better than globals: they're certainly not thread
safe, and you open yourself to other sorts of errors as well.
I'm not sure what you mean by "publish the struct definition in the
header". I only put the typedef in the header-- that doesn't publish
the struct definition, right?
Your design does not make it clear who "owns" this data. An algorithm
is typically a particular pattern applied to someone else's data,
although it may store some of it's own in the process. Thus, using
"Algorithm" as the generic placeholder for your OO class could be
confusing. Typical algorithms will *take* data and return *results*.

However, assuming that Algorithm really does own this data, I would
define the struct inside the .c file, providing the typedef in the .h
file. *This* hides your data. Algorithm() can return a pointer to this
type, and then you can call accessors with the pointer to obtain
individual elements of the data.
I realize that the name "Algorithm" might be confusing. Maybe I should
have called it "Object". My intention is that "algorithm. c" "owns" the
data. I did define the struct inside the .c file (it is named "alg")
and I provided the typedef in the header file ( named
"ALGORITHM_DATA "). Maybe my naming was confusing-- maybe I should have
named it "AlgorithmDataT ype"? I do not want Algorithm() to directly
return the pointer to the data because its caller does not use the
data directly. I want to be able to use algorithm.c's data from
another function, say, Algorithm2(), which does not call Algorithm().
I want Algorithm2() to call algorithm.c's accessor function,
GetAlgorithmDat a() to get a pointer to a const ALGORITHM_DATA. I put
the const qualifier so that Algorithm2() would not be able to modify
the data in algorithm.c. I realize this calling structure was not
evident in my over-simplified example. I modified my example to
include Algorithm2(). Let me know if I have misunderstood you.

-sofeng

main.c:
#include "algorithm. h"
#include "algorithm2 .h"

int main(void)
{
Algorithm();
Algorithm2();

return 0;
}

algorithm.c:
#include "algorithm. h"

static ALGORITHM_DATA alg;

void GetAlgorithmDat a(const ALGORITHM_DATA **out)
{
*out = &alg;
}

void Algorithm(void)
{
alg.data1 = 1.0;
alg.data2 = 2.0;
alg.data2 = 3.0;
}

algorithm.h:
#ifndef ALGORITHM_H_
#define ALGORITHM_H_

typedef struct {
double data1;
double data2;
double data3;

} ALGORITHM_DATA;

void GetAlgorithmDat a(const ALGORITHM_DATA **out);
void Algorithm(void) ;

#endif /*ALGORITHM_H_*/

algorithm2.c:
#include <stdio.h>
#include "algorithm. h"

void Algorithm2(void )
{
const ALGORITHM_DATA *alg_ptr;

GetAlgorithmDat a(&alg_ptr);
/*alg_ptr->data1 = 99.9;*/ /* This is not allowed */

/* do something with data here */
printf("%f\n", alg_ptr->data1);
printf("%f\n", alg_ptr->data2);
printf("%f\n", alg_ptr->data3);
}

algorithm2.h:
#ifndef ALGORITHM2_H_
#define ALGORITHM2_H_

void Algorithm2(void );

#endif /*ALGORITHM2_H_*/

Apr 11 '07 #4

"sofeng" <so*******@gmai l.comwrote in message
news:11******** *************@o 5g2000hsb.googl egroups.com...
Thank you for your reply. See my comments below.

On Apr 11, 1:18 pm, "bluejack" <bluuj...@gmail .comwrote:
>First of all, making the variables static at file scope doesn't really
achieve the goal of encapsulation, particularly when you publish the
struct definition in the header. Secondly, static variables at file
scope are not much better than globals: they're certainly not thread
safe, and you open yourself to other sorts of errors as well.

I'm not sure what you mean by "publish the struct definition in the
header". I only put the typedef in the header-- that doesn't publish
the struct definition, right?
In your header file, you have

typedef struct {
double data1;
double data2;
double data3;
} ALGORITHM_DATA;

Instead, separate the typedef and the struct definition into header and
implementation files:

/* foo.h */
typedef struct foo_st foo_t;

/* foo.c */
#include "foo.h"

struct foo_st {
int bar;
};

Now, struct foo_st will be undefined outside of foo.c, which is what you
want to achieve. Pointers to foo_t can be defined by users of foo, but foo_t
objects cannot, leaving your code in charge of this and anything that has to
do with foo_t internals.

--
Jonas
Apr 11 '07 #5
On Apr 11, 1:18 pm, "bluejack" <bluuj...@gmail .comwrote:
Your design does not make it clear who "owns" this data. An algorithm
is typically a particular pattern applied to someone else's data,
although it may store some of it's own in the process. Thus, using
"Algorithm" as the generic placeholder for your OO class could be
confusing. Typical algorithms will *take* data and return *results*.

However, assuming that Algorithm really does own this data, I would
define the struct inside the .c file, providing the typedef in the .h
file. *This* hides your data. Algorithm() can return a pointer to this
type, and then you can call accessors with the pointer to obtain
individual elements of the data.
Thank you for your reply.

I realize that the name "Algorithm" might be confusing. Maybe I should
have named it "Object". My intention was that "algorithm. c" is the
owner of the data. I *did* define the struct inside algorithm.c (named
"alg") and provided the typedef in algorithm.h (named
"ALGORITHM_DATA "). "ALGORITHM_DATA " is a typedef, not a variable
definition. Maybe the name in all caps was confusing. Maybe I should
have named it "AlgorithmDataT ype".

I didn't want to return a pointer to the structure because in my
actual code, I want a function other than the caller of Algorithm() to
get access to algorithm.c's data directly. For example, I want
Algorithm2(), which does not call Algorithm() to be able to call
GetAlgorithmDat a() to get access to the data structure defined in
algorithm.c. I realize I did not specify this calling structure in my
oversimplified example. I have added the Algorithm2() code below.
Please let me know if I have misunderstood you.

main.c:
#include "algorithm. h"
#include "algorithm2 .h"

int main(void)
{
Algorithm();
Algorithm2();

return 0;
}

algorithm.c:
#include "algorithm. h"

static ALGORITHM_DATA alg;

void GetAlgorithmDat a(const ALGORITHM_DATA **out)
{
*out = &alg;
}

void Algorithm(void)
{
alg.data1 = 1.0;
alg.data2 = 2.0;
alg.data2 = 3.0;
}

algorithm.h:
#ifndef ALGORITHM_H_
#define ALGORITHM_H_

typedef struct {
double data1;
double data2;
double data3;

} ALGORITHM_DATA;

void GetAlgorithmDat a(const ALGORITHM_DATA **out);
void Algorithm(void) ;

#endif /*ALGORITHM_H_*/

algorithm2.c:
#include <stdio.h>
#include "algorithm. h"

void Algorithm2(void )
{
const ALGORITHM_DATA *alg_ptr;

GetAlgorithmDat a(&alg_ptr);
/*alg_ptr->data1 = 99.9;*/ /* This is not allowed */

/* do something with data here */
printf("%f\n", alg_ptr->data1);
printf("%f\n", alg_ptr->data2);
printf("%f\n", alg_ptr->data3);
}

algorithm2.h:
#ifndef ALGORITHM2_H_
#define ALGORITHM2_H_

void Algorithm2(void );

#endif /*ALGORITHM2_H_*/
Apr 12 '07 #6
On Apr 11, 1:18 pm, "bluejack" <bluuj...@gmail .comwrote:
Your design does not make it clear who "owns" this data. An algorithm
is typically a particular pattern applied to someone else's data,
although it may store some of it's own in the process. Thus, using
"Algorithm" as the generic placeholder for your OO class could be
confusing. Typical algorithms will *take* data and return *results*.

However, assuming that Algorithm really does own this data, I would
define the struct inside the .c file, providing the typedef in the .h
file. *This* hides your data. Algorithm() can return a pointer to this
type, and then you can call accessors with the pointer to obtain
individual elements of the data.
Thank you for your reply.

I realize that the name "Algorithm" might be confusing. Maybe I should
have named it "Object". My intention was that "algorithm. c" is the
owner of the data. I *did* define the struct inside algorithm.c (named
"alg") and provided the typedef in algorithm.h (named
"ALGORITHM_DATA "). "ALGORITHM_DATA " is a typedef, not a variable
definition. Maybe the name in all caps was confusing. Maybe I should
have named it "AlgorithmDataT ype".

I didn't want to return a pointer to the structure because in my
actual code, I want a function other than the caller of Algorithm() to
get access to algorithm.c's data directly. For example, I want
Algorithm2(), which does not call Algorithm() to be able to call
GetAlgorithmDat a() to get access to the data structure defined in
algorithm.c. I realize I did not specify this calling structure in my
oversimplified example. I have added the Algorithm2() code below.
Please let me know if I have misunderstood you.

main.c:
#include "algorithm. h"
#include "algorithm2 .h"

int main(void)
{
Algorithm();
Algorithm2();

return 0;
}

algorithm.c:
#include "algorithm. h"

static ALGORITHM_DATA alg;

void GetAlgorithmDat a(const ALGORITHM_DATA **out)
{
*out = &alg;
}

void Algorithm(void)
{
alg.data1 = 1.0;
alg.data2 = 2.0;
alg.data2 = 3.0;
}

algorithm.h:
#ifndef ALGORITHM_H_
#define ALGORITHM_H_

typedef struct {
double data1;
double data2;
double data3;

} ALGORITHM_DATA;

void GetAlgorithmDat a(const ALGORITHM_DATA **out);
void Algorithm(void) ;

#endif /*ALGORITHM_H_*/

algorithm2.c:
#include <stdio.h>
#include "algorithm. h"

void Algorithm2(void )
{
const ALGORITHM_DATA *alg_ptr;

GetAlgorithmDat a(&alg_ptr);
/*alg_ptr->data1 = 99.9;*/ /* This is not allowed */

/* do something with data here */
printf("%f\n", alg_ptr->data1);
printf("%f\n", alg_ptr->data2);
printf("%f\n", alg_ptr->data3);
}

algorithm2.h:
#ifndef ALGORITHM2_H_
#define ALGORITHM2_H_

void Algorithm2(void );

#endif /*ALGORITHM2_H_*/

Apr 12 '07 #7
sofeng wrote:
I'm not sure if "data hiding" is the correct term,
The C computer programming language supports encapsulation
but *not* data hiding (like the private label in C++).
C programmers have always used "opaque" data types
when they need to "hide" data.
This is accomplished by publishing a type declaration
in a public header file (algorithm.h in this case)
and defining the new type in a private implementation file
(algorithm.c in this case).
but I'm trying to emulate this object-oriented technique.
I know C++ probably provides much more than my example,
but I'd just like some feedback to find out if I've done anything wrong.
Also, I am working on this for an embedded environment,
so if there are great inefficiencies with this code,
I'd like to know that also.
I realize there is overhead with using an "accessor" function.

I'm trying to:
1.) "hide" data (variables declared as static at file scope) within a
file (algorithm.c)
Don't!
2.) manipulate the data using an algorithm function (Algorithm())
Use my Algorithm_new function instead.
3.) provide external access to the data using an "accessor" function
(GetAlgorithmDa ta())
Use my data1, data2 and data3 functions instead.
cat algorithm.h
#ifndef ALGORITHM_H
#define ALGORITHM_H

typedef struct Algorithm Algorithm;

Algorithm* Algorithm_new(d ouble, double, double);
void Algorithm_delet e(const Algorithm* p);
double data1(const Algorithm*);
double data2(const Algorithm*);
double data3(const Algorithm*);

#endif/*ALGORITHM_H */
cat algorithm.c
#include "algorithm. h"
#include <stdlib.h>

struct Algorithm {
double data1;
double data2;
double data3;
};

Algorithm* Algorithm_new(d ouble x, double y, double z) {
Algorithm* p = malloc(sizeof(A lgorithm));
p->data1 = x;
p->data2 = y;
p->data3 = z;
return p;
}
void Algorithm_delet e(const Algorithm* p) {
free((void*)p); }
double data1(const Algorithm* p) {
return p->data1; }
double data2(const Algorithm* p) {
return p->data2; }
double data3(const Algorithm* p) {
return p->data3; }
cat main.c
#include <stdio.h>
#include "algorithm. h"

int main(int argc, char* argv[]) {
const Algorithm* p = Algorithm_new(1 .0, 2.0, 3.0);

printf("%f\n", data1(p));
printf("%f\n", data2(p));
printf("%f\n", data3(p));

Algorithm_delet e(p);
return 0;
}
gcc -Wall -std=c99 -O2 -c algorithm.c
gcc -Wall -std=c99 -O2 -o main main.c algorithm.o
./main
1.000000
2.000000
3.000000

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Apr 12 '07 #8
On Apr 11, 4:39 pm, "Jonas" <spamhereple... @gmail.comwrote :
"sofeng" <sofeng...@gmai l.comwrote in message

news:11******** *************@o 5g2000hsb.googl egroups.com...
Thank you for your reply. See my comments below.
On Apr 11, 1:18 pm, "bluejack" <bluuj...@gmail .comwrote:
First of all, making the variables static at file scope doesn't really
achieve the goal of encapsulation, particularly when you publish the
struct definition in the header. Secondly, static variables at file
scope are not much better than globals: they're certainly not thread
safe, and you open yourself to other sorts of errors as well.
I'm not sure what you mean by "publish the struct definition in the
header". I only put the typedef in the header-- that doesn't publish
the struct definition, right?

In your header file, you have

typedef struct {
double data1;
double data2;
double data3;
} ALGORITHM_DATA;

Instead, separate the typedef and the struct definition into header and
implementation files:

/* foo.h */
typedef struct foo_st foo_t;

/* foo.c */
#include "foo.h"

struct foo_st {
int bar;
};

Now, struct foo_st will be undefined outside of foo.c, which is what you
want to achieve. Pointers to foo_t can be defined by users of foo, but foo_t
objects cannot, leaving your code in charge of this and anything that has to
do with foo_t internals.

--
Jonas
But struct foo_st is synonymous with foo_t so why does it matter that
it is available outside of foo.c? Don't we really care about the
actual variable definition (where the memory is allocated) of type
"struct foo_st" or "foo_t"? For example, for the definition of
foo_var, "foo_t foo_var", foo_var should not be made available outside
of foo.c.

Apr 12 '07 #9

"sofeng" <so*******@gmai l.comwrote in message
news:11******** *************@p 77g2000hsh.goog legroups.com...
On Apr 11, 4:39 pm, "Jonas" <spamhereple... @gmail.comwrote :
>"sofeng" <sofeng...@gmai l.comwrote in message

news:11******* **************@ o5g2000hsb.goog legroups.com...
Thank you for your reply. See my comments below.
On Apr 11, 1:18 pm, "bluejack" <bluuj...@gmail .comwrote:
First of all, making the variables static at file scope doesn't really
achieve the goal of encapsulation, particularly when you publish the
struct definition in the header. Secondly, static variables at file
scope are not much better than globals: they're certainly not thread
safe, and you open yourself to other sorts of errors as well.
I'm not sure what you mean by "publish the struct definition in the
header". I only put the typedef in the header-- that doesn't publish
the struct definition, right?

In your header file, you have

typedef struct {
double data1;
double data2;
double data3;
} ALGORITHM_DATA;

Instead, separate the typedef and the struct definition into header and
implementati on files:

/* foo.h */
typedef struct foo_st foo_t;

/* foo.c */
#include "foo.h"

struct foo_st {
int bar;
};

Now, struct foo_st will be undefined outside of foo.c, which is what you
want to achieve. Pointers to foo_t can be defined by users of foo, but
foo_t
objects cannot, leaving your code in charge of this and anything that has
to
do with foo_t internals.

--
Jonas

But struct foo_st is synonymous with foo_t so why does it matter that
it is available outside of foo.c? Don't we really care about the
actual variable definition (where the memory is allocated) of type
"struct foo_st" or "foo_t"? For example, for the definition of
foo_var, "foo_t foo_var", foo_var should not be made available outside
of foo.c.
<context>
"sofeng" <sofeng...@gmai l.comwrote
I'm trying to:
1.) "hide" data (variables declared as static at file scope) within a
file (algorithm.c)
2.) manipulate the data using an algorithm function (Algorithm())
3.) provide external access to the data using an "accessor" function
(GetAlgorithmDa ta())
</context>

Inside foo.c, after the definition of struct foo_st, this will be a complete
type, instances of which can then be defined and its members manipulated.
Everywhere else, this will not be possible. This will "hide" your data. In
order to provide access to and ways to manipulate the data, consider the
following:

/* foo.h */
typedef struct foo_st foo_t;

foo_t * foo_create();
void foo_destroy(foo _t *foo);
void foo_set_bar(foo _t *foo, int bar);
int foo_get_bar(con st foo_t *foo);
void foo_manipulate( foo_t* foo);
/* foo.c */
#include "foo.h"

struct foo_st {
int bar;
};

foo_t * foo_create()
{
return malloc (sizeof(foo_t)) ;
}

void foo_destroy(foo _t *foo)
{
free(foo);
}

/* implementation of other functions declared in foo.h should follow...
*/

The user of your code will only include foo.h, and thus will never be able
to access the elements of struct foo_st directly (to them, it will be an
incomplete type, declared but not defined), nor be able to create objects of
type foo_t. The only way to do this will be to use the API you provide. The
_good thing_ here is that the user will not have to care about your
implementation of foo_t, you are free to change anything you please as long
as the API is kept intact.

If you want there to be only *one* foo_t object, as implied in point (3),
then you could declare a static variable in foo.c:

/* foo.h */
typedef struct foo_st foo_t;

foo_t * foo_get_instanc e();
void foo_manipulate( foo_t *foo);
/* foo.c */
#include "foo.h"

struct foo_st {
int bar;
};

static foo_t foo_instance;
static int is_initialized = 0;

foo_t * foo_get_instanc e()
{
if (!is_initialize d) {
foo.bar = 0;
is_initialized = 1;
}
return &foo_instanc e;
}

/* implementation of other functions declared in foo.h should follow...
*/

Now, the only foo_t object in existence will be the one defined in foo.c,
since objects of the type cannot be defined anywhere else. This would be
akin to a singleton in the OO-paradigm.

--
Jonas
Apr 12 '07 #10

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

Similar topics

10
2083
by: Picho | last post by:
Hi all, Lets say I have a "secret" I wish to "hide", lets say a database password. For the more detailed problem, a web application/service that uses a connection string. all the solutions I came up with (embedding in code, encrypting-decrypting) involve embedding the/another secret in the code. since my problem cannot request a user intervention, I am at a stop.
5
2193
by: Amir S. | last post by:
Hi, I'm a newbie to C++ (2 weeks into the course). We were given this assignment to write some code that reads a set of integers (grades) from a file (filename passed by console), outputs them in reverse order, calculates and prints their average. => We have been told that we need to make sure that our code meets "information hiding" guidelines. Could anyone help me get started with this (any ideas?)
3
4698
by: 21novembre | last post by:
Hi all, I made a question several days before to describe my strange trouble of mysqldump. But I still can't figour it out. Well, I just want to ask another question whether I could just backup my databases by copying the data folder to some place? Then if I meet some disaster, could I just copy the backup folder back to recover my databases? Thank you. Zh.y
8
25403
by: Jerry | last post by:
I have an off-the-shelf app that uses an Access database as its backend. One of the tables contains a field with an "OLE Object" datatype. I'm writing some reports against this database, and I believe this field contains data I need. When I view the table in datasheet view, all I can see in this field is the string "Long binary data". So, I've got the problem of needing to extract data from this field, but I don't know what format...
10
31706
by: FX | last post by:
I wanna publish a script on my site which allows me to hide image source. i have rough idea abt it. i`ll point src to some php page like: <img src="image.php"> & in tht php wat exactly shud be done so tht user doesnt come to know the real source location of image file upon clicking its properties. I've seen websites doing this. can somebody post the script for it? Thanx in advance
3
6576
by: Nicolas Castagne | last post by:
Hi all, I have been wondering for a while why function hiding (in a derived class) exists in C++, e.g. why when writing class Base { void foo( int ) {} }; class Derived: public Base { void foo( char const ) {} };
5
21794
by: Nick Gilbert | last post by:
Hi, I'm using the asp:Wizard control and on some of the steps, I would only like the user to be able to progess to the next step by clicking an image button. Therefore I would like to be able to hide the Next button on these steps. Is there any way to do this? I know you can convert the navigation to a template, but this is a
38
3306
by: Sanders Kaufman | last post by:
I'm converting my table-based layouts to css-positioned divs - but the ONLY reason I'm doing it is because it's *considered* a best practice. I don't really see where anything goes hinky when tables are used - but I'm doing it anyway because the HTML and CSS specs says to reserve tables for tabular data. So as I convert my login widgit to a css thing, I'm saying to myself - hey, this form is most certainly "tabular data" - even if it...
3
4125
by: BobRoyAce | last post by:
I am using Visual Studio 2008 w/ VB.NET. For the database, I am using SQL Server 2005, which is running on a dedicated server box. I am creating a WinForms application for a client. It is run on any of several employees' desktop PCs. Now, they want to be able to "push" some of the data from the SQL Server database up to a database on a website (also SQL Server 2005).
0
9568
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
9404
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
10007
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...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8833
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...
0
6649
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
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.