473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Read a binary file until "\name\" is encountered...

Im trying to write a program that should
read through a binary file searching for the character sequence "\name\"

Then it should read the characters following the "\name\" sequence
until a NULL character is encountered.

But when my program runs it gets a SIGSEGV (Segmentation vioalation) signal.

Whats wrong?
And is there a better way than mine to solve this task (most likely)

Code:
----------------------------------------------------------------
int main()
{
FILE *fp;
fp = fopen("demo.dem","rb");

char cTkn;
char sName[50];
int i=0,j=0;
while(!(feof(fp)))
{
if(fread(&cTkn, sizeof(cTkn), 1, fp))
{
if(cTkn == ((char)92)) // if the character '\' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)110)) // if the character 'n' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)97)) // if the character 'a' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)109)) // if the character 'm' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)101)) // if the character 'e' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)92)) // if the character '\' is found
{
// here the complete "\name\" string has been found
while(cTkn != ((char)0))
{
fread(&sName[j], sizeof(cTkn), 1, fp);
j++;
}
}
}
}
}
}
}
}
i++;
}
printf("Read %d characters!\n", i);
printf("Found: %s",sName);
fclose(fp);

return 0;
}
----------------------------------------------------------------
Nov 14 '05 #1
14 3721
On 25 Feb 2004 07:34:40 -0800, jo**@ljungh.se (spike) wrote:
Im trying to write a program that should
read through a binary file searching for the character sequence "\name\"

Then it should read the characters following the "\name\" sequence
until a NULL character is encountered.

But when my program runs it gets a SIGSEGV (Segmentation vioalation) signal.

Whats wrong?
And is there a better way than mine to solve this task (most likely)
I think so. Here's a version I just threw together:
#include <stdio.h>

#define MAX 50

int main()
{
FILE *fp;
char cTkn, c;
char sName[MAX];
int inTxt = 0, pos;
size_t charCount = 0;

const char *txt = "\\name\\";

fp = fopen("demo.dem","rb");

while ((cTkn = getc(fp)) != EOF)
{
++charCount;
if (inTxt == 0)
{
if (cTkn == txt[0])
{
++inTxt;
}
}
else
{
if (cTkn == txt[inTxt])
{
if (txt[++inTxt] == '\0')
break;
}
else
inTxt = 0;
}
}

pos = 0;
while ((c = getc(fp)) != EOF && pos < MAX && c != '\0')
{
sName[pos++] = c;
}
sName[pos] = '\0';

printf("Read %d characters!\n", charCount);
printf("Found: %s",sName);
fclose(fp);

return 0;
}
Your version has a bunch of problems...

Code:
----------------------------------------------------------------
int main()
{
FILE *fp;
fp = fopen("demo.dem","rb");
Just out of curiosity, are you really using a C99 compiler, or a C++
compiler? If you want to maintain C89 compatibility, put all your
declarations /before/ your other statements within a block.

char cTkn;
char sName[50];
int i=0,j=0;
If you're intending i to count total characters, it isn't...
while(!(feof(fp)))
{
if(fread(&cTkn, sizeof(cTkn), 1, fp))
Note that you're not checking for EOF anywhere except at the top of the
loop and (sort of) up in your first fread.

Also, getc is easier to use to read a single character than what you're
doing (although I guess what you're doing is not technically wrong, except
that not checking for EOF is bad news.)
{
if(cTkn == ((char)92)) // if the character '\' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)110)) // if the character 'n' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)97)) // if the character 'a' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)109)) // if the character 'm' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)101)) // if the character 'e' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
if(cTkn == ((char)92)) // if the character '\' is found
{
// here the complete "\name\" string has been found
while(cTkn != ((char)0))
Here you're going into an infinite loop, because cTkn is never changed
based on the fread below. It isn't the fread that's causing the seg fault,
though; it is your incrementing j past the end of the sName buffer and then
having fread try to write into that location...(well, I guess even just
taking the address has undefined behavior, for the purists)

{
fread(&sName[j], sizeof(cTkn), 1, fp);
j++;
}
}
}
}
}
}
}
}
i++;
}
printf("Read %d characters!\n", i);
printf("Found: %s",sName);
fclose(fp);

return 0;
}
----------------------------------------------------------------


Hope that gets you going.
-leor
Leor Zolman
BD Software
le**@bdsoft.com
www.bdsoft.com -- On-Site Training in C/C++, Java, Perl & Unix
C++ users: Download BD Software's free STL Error Message
Decryptor at www.bdsoft.com/tools/stlfilt.html
Nov 14 '05 #2
On 2004-02-25, spike <jo**@ljungh.se> wrote:
Im trying to write a program that should
read through a binary file searching for the character sequence "\name\"
Then it should read the characters following the "\name\" sequence
until a NULL character is encountered.
It might be more useful to write a more general function that can search
a binary file for any string. Your program can then call this function,
passing "\\name\\" in as input. Untested code:

/*
* Accept binary input stream and string as input.
* Return true or false depending on whether the string
* is found in the input stream, or not, respectively.
*
* Caller can use ftell() to later find the number
* of bytes scanned.
*/
int bf_textsearch(FILE *fp, char *s)
{
int index;
int len;
int c;

index = 0;
len = strlen(s) - 1;
while ((c = fgetc(fp)) != EOF) {
if (c != s[index]) {
index = 0;
ungetc(c, fp);
continue;
}
if (index == len) {
return 1;
}
index++;
}
return 0;
}
But when my program runs it gets a SIGSEGV (Segmentation vioalation) signal.

Whats wrong?
And is there a better way than mine to solve this task (most likely)
Your code checks for or failure of the first call to fread(), but not
subsequent calls. The subsequent calls may have set the EOF indicator,
leaving your file-position indicator in an indeterminate state, and so
subsequent calls to fread result in undefined behavior.

In your innermost if-clause, your loop on reading the file until you
find a '\0' character. However, you are storing all the characters you
have read into sName, which is an array of 50 char. If the number of
characters in your stream following the found string is larger than 50,
then you are accessing an array outside of its defined bounds, and this
results in undefined behavior. Don't bother storing the result into
the array. Just discard your scanned characters (for instance, by
continuing to re-use the cTkn variable to scan into).

Code:
----------------------------------------------------------------
int main()
{
FILE *fp;
fp = fopen("demo.dem","rb");

char cTkn;
char sName[50];
int i=0,j=0;
while(!(feof(fp)))
{
if(fread(&cTkn, sizeof(cTkn), 1, fp))
{
if(cTkn == ((char)92)) // if the character '\' is found
{
fread(&cTkn, sizeof(cTkn), 1, fp);
[snip]
while(cTkn != ((char)0))
{
fread(&sName[j], sizeof(cTkn), 1, fp);
j++;
}
[snip]
----------------------------------------------------------------


-- James
Nov 14 '05 #3
On Wed, 25 Feb 2004 16:16:42 GMT, Leor Zolman <le**@bdsoft.com> wrote:
while ((c = getc(fp)) != EOF && pos < MAX && c != '\0')


Whoops, that was supposed to be ... && pos < MAX - 1 ...
-leor

Leor Zolman
BD Software
le**@bdsoft.com
www.bdsoft.com -- On-Site Training in C/C++, Java, Perl & Unix
C++ users: Download BD Software's free STL Error Message
Decryptor at www.bdsoft.com/tools/stlfilt.html
Nov 14 '05 #4
On Wed, 25 Feb 2004 16:16:42 GMT, Leor Zolman <le**@bdsoft.com> wrote:
char cTkn, c;


AND c should've been an int, not a char. I guess chars default to signed on
my platform :-(
-leor

Leor Zolman
BD Software
le**@bdsoft.com
www.bdsoft.com -- On-Site Training in C/C++, Java, Perl & Unix
C++ users: Download BD Software's free STL Error Message
Decryptor at www.bdsoft.com/tools/stlfilt.html
Nov 14 '05 #5
nrk
James Hu wrote:
On 2004-02-25, spike <jo**@ljungh.se> wrote:
Im trying to write a program that should
read through a binary file searching for the character sequence "\name\"
Then it should read the characters following the "\name\" sequence
until a NULL character is encountered.


It might be more useful to write a more general function that can search
a binary file for any string. Your program can then call this function,
passing "\\name\\" in as input. Untested code:

/*
* Accept binary input stream and string as input.
* Return true or false depending on whether the string
* is found in the input stream, or not, respectively.
*
* Caller can use ftell() to later find the number
* of bytes scanned.
*/
int bf_textsearch(FILE *fp, char *s)
{
int index;
int len;
int c;

index = 0;
len = strlen(s) - 1;
while ((c = fgetc(fp)) != EOF) {
if (c != s[index]) {
index = 0;
ungetc(c, fp);

Change above 3 lines to:

if ( c != s[index] ) {
index = (c == s[0]);

Small improvement, but probably worthwhile.

-nrk.

<snip>

--
Remove devnull for email
Nov 14 '05 #6
On 2004-02-25, nrk wrote:
James Hu wrote:
[snip]
while ((c = fgetc(fp)) != EOF) {
if (c != s[index]) {
index = 0;
ungetc(c, fp);

Change above 3 lines to:

if ( c != s[index] ) {
index = (c == s[0]);

Small improvement, but probably worthwhile.


Nice, thanks!

-- James
Nov 14 '05 #7
Leor Zolman wrote:
On 25 Feb 2004 07:34:40 -0800, jo**@ljungh.se (spike) wrote:
Im trying to write a program that should read through a binary
file searching for the character sequence "\name\"

Then it should read the characters following the "\name\"
sequence until a NULL character is encountered.
....snip ...
I think so. Here's a version I just threw together:


If the value of "name" is a variable, and the read is from a
stream with no backtracking allowed, this is quite an elegant
problem. This indicates the Knuth-Moyer-Pratt algorithm. I was
originally thinking a state machine to follow through marker, but
eventually realized that involved backtracking in the general
case.

The discussion is OT here, but quite well suited to
comp.programming. Here is an outline I threw together :-)

#include <stdio.h>
#include <string.h>

#define MAXLEN 254

/* The difference between a binary and a text file, on read,
is the conversion of end-of-line delimiters. What those
delimiters are does not affect the action above.
*/

/* --------------------- */

/* Dummy, to test main */
int binfsrch(const char *marker, char *id)
{
if (strcmp(marker, "\\name\\")) return 0;
else {
strcpy(id, "found it");
return 1;
}
} /* binfsrch */

/* --------------------- */

int main(int argc, char **argv)
{
char idstring[MAXLEN + 1];

if (2 != argc) {
puts("Usage: binfsrch name < file_to_search");
}
else if (binfsrch(argv[1], idstring)) {
printf("\"%s\" : \"%s\"\n", argv[1], idstring);
}
else {
printf("\"%s\" : not found\n", argv[1]);
}
return 0;
} /* main binsrch */
Cross-posted and fups set.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

Nov 14 '05 #8
nrk
Leor Zolman wrote:
On 25 Feb 2004 07:34:40 -0800, jo**@ljungh.se (spike) wrote:
Im trying to write a program that should
read through a binary file searching for the character sequence "\name\"

Then it should read the characters following the "\name\" sequence
until a NULL character is encountered.

But when my program runs it gets a SIGSEGV (Segmentation vioalation)
signal.

Whats wrong?
And is there a better way than mine to solve this task (most likely)
I think so. Here's a version I just threw together:
#include <stdio.h>

#define MAX 50

int main()
{
FILE *fp;
char cTkn, c;
char sName[MAX];
int inTxt = 0, pos;
size_t charCount = 0;

const char *txt = "\\name\\";

fp = fopen("demo.dem","rb");

while ((cTkn = getc(fp)) != EOF)
{
++charCount;
if (inTxt == 0)
{
if (cTkn == txt[0])
{
++inTxt;
}
}
else
{
if (cTkn == txt[inTxt])
{
if (txt[++inTxt] == '\0')
break;
}
else
inTxt = 0;
}
}

pos = 0;
while ((c = getc(fp)) != EOF && pos < MAX && c != '\0')
{
sName[pos++] = c;
}
sName[pos] = '\0';

printf("Read %d characters!\n", charCount);
printf("Found: %s",sName);
fclose(fp);

return 0;
}


Input contains: "\\name\ nrk<null>"

Output is not as expected.

Reason for failure: Oh, the darn machine did what I said, instead of what I
wanted ;-)

Your version has a bunch of problems...


Your's has only one (barring the lack of error checks). That it doesn't
backtrack one character when it has to.

-nrk.

<snip>

--
Remove devnull for email
Nov 14 '05 #9
On Wed, 25 Feb 2004 19:51:06 GMT, nrk <ra*********@devnull.verizon.net>
wrote:

Input contains: "\\name\ nrk<null>"

Output is not as expected.

Reason for failure: Oh, the darn machine did what I said, instead of what I
wanted ;-)

Your version has a bunch of problems...


Your's has only one (barring the lack of error checks). That it doesn't
backtrack one character when it has to.


Right. Here's a modified version with a bit more error checking, and the
other fixes, rolled-up:

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

#define MAX 50

int main()
{
FILE *fp;
char cTkn;
int c;
char sName[MAX];
int inTxt = 0, pos;
size_t charCount = 0;

const char *txt = "\\name\\";
const char delim = '\\';

if ((fp = fopen("demo.dem","rb")) == NULL)
{
printf("Error opening file.\n");
exit(EXIT_FAILURE);
}

while ((cTkn = getc(fp)) != EOF)
{
++charCount;

if (cTkn == txt[inTxt])
{
++inTxt;
if (txt[inTxt] == '\0')
break;
}
else if (cTkn == delim)
{
inTxt = 1;
continue;
}
else
inTxt = 0;
}

pos = 0;
while ((c = getc(fp)) != EOF && pos < MAX - 1 && c != '\0')
{
sName[pos++] = c;
}
sName[pos] = '\0';

printf("Read %d characters!\n", charCount);
printf("Found: %s",sName);
fclose(fp);

return 0;
}

It avoids backtracking--not that there's any penalty for ungetting a char,
but just because I ended up not needing to do that. While I think this
approach will work for any delimiter used in the manner of this example,
none of these simplistic (though evidently not simplistic enough for me to
have gotten it right the first time) solutions would handle the undelimited
general case when arbitrary backtracking would be necessary. I think that
was the point Chuck was making.
-leor
Leor Zolman
BD Software
le**@bdsoft.com
www.bdsoft.com -- On-Site Training in C/C++, Java, Perl & Unix
C++ users: Download BD Software's free STL Error Message
Decryptor at www.bdsoft.com/tools/stlfilt.html
Nov 14 '05 #10
nrk
Leor Zolman wrote:
On Wed, 25 Feb 2004 19:51:06 GMT, nrk <ra*********@devnull.verizon.net>
wrote:

Input contains: "\\name\ nrk<null>"

Output is not as expected.

Reason for failure: Oh, the darn machine did what I said, instead of what
I wanted ;-)

Your version has a bunch of problems...

Your's has only one (barring the lack of error checks). That it doesn't
backtrack one character when it has to.


Right. Here's a modified version with a bit more error checking, and the
other fixes, rolled-up:


Still some problems.
#include <stdio.h>
#include <stdlib.h>

#define MAX 50

int main()
{
FILE *fp;
char cTkn;
That should be an int, not a char.
int c;
char sName[MAX];
int inTxt = 0, pos;
size_t charCount = 0;

const char *txt = "\\name\\";
const char delim = '\\';

if ((fp = fopen("demo.dem","rb")) == NULL)
{
printf("Error opening file.\n");
exit(EXIT_FAILURE);
}

while ((cTkn = getc(fp)) != EOF)
{
++charCount;

if (cTkn == txt[inTxt])
{
++inTxt;
if (txt[inTxt] == '\0')
break;
}
else if (cTkn == delim)
{
inTxt = 1;
continue;
}
else
inTxt = 0;
}

pos = 0;
while ((c = getc(fp)) != EOF && pos < MAX - 1 && c != '\0')
You're calling getc without checking the state of the stream, the first time
around. You might want to see if both feof and ferror return 0, before
entering this loop. Alternately, you can simply check that txt[inTxt] is
0. So, something along the lines of:
if ( txt[inTxt] == 0 ) {
while ((c = getc(fp)) != EOF && pos < MAX - 1 && c != '\0')
{
sName[pos++] = c;
}
sName[pos] = '\0';

printf("Read %d characters!\n", charCount);
printf("Found: %s",sName);
fclose(fp);

return 0;
}

It avoids backtracking--not that there's any penalty for ungetting a char,
but just because I ended up not needing to do that. While I think this
approach will work for any delimiter used in the manner of this example,
none of these simplistic (though evidently not simplistic enough for me to
have gotten it right the first time) solutions would handle the
undelimited
general case when arbitrary backtracking would be necessary. I think that
was the point Chuck was making.
No argument on that count. The OP's particular case is simple enough that
you don't have to resort any sophisticated string matching except for a
simple one-step backtrack (and when it is only one step, turns out, you
don't actually need to backtrack :-).

-nrk.
-leor


--
Remove devnull for email
Nov 14 '05 #11
On Thu, 26 Feb 2004 02:07:46 GMT, nrk <ra*********@devnull.verizon.net>
wrote:


You're calling getc without checking the state of the stream, the first time
around. You might want to see if both feof and ferror return 0, before
entering this loop. Alternately, you can simply check that txt[inTxt] is
0. So, something along the lines of:
if ( txt[inTxt] == 0 ) {
while ((c = getc(fp)) != EOF && pos < MAX - 1 && c != '\0')


[among other things]

Thanks, yeah... having programmed in C for 25 years doesn't really count
for beans when not so much of that coding has had to be of "industrial
strength" quality. I'm finding out the hard way, time and again, how good a
place this group is to help come to grips with what constitutes
bullet-proof C coding practice (or at least, in light of platform
variations, how to get as close as possible to that ideal.)
-leor


Leor Zolman
BD Software
le**@bdsoft.com
www.bdsoft.com -- On-Site Training in C/C++, Java, Perl & Unix
C++ users: Download BD Software's free STL Error Message
Decryptor at www.bdsoft.com/tools/stlfilt.html
Nov 14 '05 #12
Mac
On Wed, 25 Feb 2004 16:34:18 +0000, Leor Zolman wrote:
On Wed, 25 Feb 2004 16:16:42 GMT, Leor Zolman <le**@bdsoft.com> wrote:
char cTkn, c;
AND c should've been an int, not a char. I guess chars default to signed on
my platform :-(


Regardless of the signedness of chars, getc() returns an int...
-leor

--Mac

Nov 14 '05 #13
/*
Leor Zolman wrote:
On 25 Feb 2004 07:34:40 -0800, jo**@ljungh.se (spike) wrote:
Im trying to write a program that should read through a binary
file searching for the character sequence "\name\"

Then it should read the characters following the "\name\"
sequence until a NULL character is encountered.

But when my program runs it gets a SIGSEGV (Segmentation
vioalation) signal.

Whats wrong? And is there a better way than mine to solve
this task (most likely)


I think so. Here's a version I just threw together:


I finally got around to implementing my KMP algorithm version of
this, which allows straightforward file input with no backtracking
and arbitrary key values. Pick at it.

*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>

/* The difference between a binary and a text file, on read,
is the conversion of end-of-line delimiters. What those
delimiters are does not affect the action.
This is a version of Knuth-Morris-Pratt algorithm. The
point of using this is to avoid any backtracking in file
reading, and thus avoiding any use of buffer arrays.
*/

/* --------------------- */

/* Almost straight out of Sedgewick */
/* The next array indicates what index in id should next be
compared to the current char. Once the (lgh - 1)th char
has been successfully compared, the id has been found.
The array is formed by comparing id to itself. */
void initnext(int *next, const char *id, int lgh)
{
int i, j;

assert(lgh > 0);
next[0] = -1; i = 0; j = -1;
while (i < lgh) {
while ((j >= 0) && (id[i] != id[j])) j = next[j];
i++; j++;
next[i] = j;
}
#if (0)
for (i = 0; i < lgh; i++)
printf("id[%d] = '%c' next[%d] = %d\n",
i, id[i], i, next[i]);
#endif
} /* initnext */

/* --------------------- */

/* reads f without rewinding until either EOF or *marker
has been found. Returns EOF if not found. At exit the
last matching char has been read, and no further. */
int kmpffind(const char *marker, int lgh, int *next, FILE *f)
{
int j; /* char position in marker to check */
int ch; /* current char */

assert(lgh > 0);
j = 0;
while ((j < lgh) && (EOF != (ch = getc(f)))) {
while ((j >= 0) && (ch != marker[j])) j = next[j];
j++;
}
return ch;
}

/* --------------------- */

int binfsrch(const char *marker)
{
int *next;
int lgh;
int ch;
int items; /* count of markers found */

if (!(next = malloc(strlen(marker) * sizeof *next))) {
puts("No memory");
exit(EXIT_FAILURE);
}
else {
lgh = strlen(marker);
initnext(next, marker, lgh);
items = 0;
while (EOF != kmpffind(marker, lgh, next, stdin)) {
items++;
printf("%d %s : \"", items, marker);
while (isprint(ch = getchar())) putchar(ch);
puts("\"");
if (EOF == ch) break;
}
}
return items;
} /* binfsrch */

/* --------------------- */

int main(int argc, char **argv)
{
if (2 != argc) puts("Usage: kmpsrch name < file_to_search");
else if (binfsrch(argv[1])) {
printf("\"%s\" : found\n", argv[1]);
}
else printf("\"%s\" : not found\n", argv[1]);
return 0;
} /* main kmpsrch */

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #14
jo**@ljungh.se (spike) wrote in message
news:<66**************************@posting.google. com>...

// here the complete "\name\" string has been found
while(cTkn != ((char)0))
{
fread(&sName[j], sizeof(cTkn), 1, fp);
j++;
}


You never alter cTkn within the while-loop making it and endless loop.
Fix this and your original code should work as expected.
Nov 14 '05 #15

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

Similar topics

1
by: Ron | last post by:
I am trying to run asp.net pages. The server is accessed via http://sitename/username I have verified it is using port 80 and aspx extensions are configured. But when I run and asp.net page I...
39
by: Joe Laughlin | last post by:
If I have a character array with "/some/file/directory/file_name", are there any functions / libraries that I could use to separate the directory ("some/file/directory") from the file name...
1
by: Jay | last post by:
I'm installing one of my dlls to the GAC but no matter what attribute I try, the name that shows up in explorer under global assembly name is always just the name of my assembly file. Is there a...
1
by: A.M-SG | last post by:
Hi, I am trying to simplify my app.config file. Can I have a section handler in a separated file? I am looking for something like this: <section name=".." type=".." file="..."> but it...
4
by: kevin | last post by:
Hi, I am trying to create a page so the user can browse the network, select a file and have that file name (text) inserted into our sql DB so I can build the hyperlink path later on. Here's what...
2
by: trint | last post by:
With the following code, I get the "message" whether or not there is content in my filefield: function check_file_field() { var file_field = document.getElementById("custCartFile");...
5
by: cssExp | last post by:
alright suppose i have the following. <input type="file" name="upload" /> <input type="text" name="discription" /> <input type="image" onclick="addFile();" src="images/addfile.jpg" name="add"...
2
by: Curious | last post by:
There's a problem with what is displayed on a tab in my UI. At first, it's a message, "loading...". Then it should be replaced with the actual file name on the tab. Now the issue is that it...
3
by: eeeeman | last post by:
This one has really got me! Im trying to write a value to a input type="file" form element using client-side javascript. I have tried the obvious, simply writing: <input type="file" ...
185
by: jacob navia | last post by:
Hi We are rewriting the libc for the 64 bit version of lcc-win and we have added a new field in the FILE structure: char *FileName; fopen() will save the file name and an accessor function will...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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,...
0
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...

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.