Recently I saw a code that initilizes a struct using {0} .My question is if this works for all elements of the struct or just the 1st one. Example:
.H File:
typedef struct
{
UINT32 size;
UINT16 num1;
UINT8 * p_buffer;
} MY_RECORD;
--------------
.C File:
...
MY_RECORD...
Hi,
I would like your expertise in order to protect my code for strings without the \0 terminator (in case of memory corruption). Currently the code is failing because when it invokes strlen for a string with trash in it it never finds the \0 terminator then returns the size of the datatype...
Hi all,
does anybody knows how to convert an org.w3c.dom.Document into a String ?? (basically I want to log the dom tree into a string object not a file). Thanks
BTCMan
Hi,
I would like suggestions on how to open a Directory only Browser Dialog (I mean: only folders are listed and one of them can be selected). I was trying to use JFileChooser with setFileSelectionMode set to DIRECTORIES_ONLY, but this was not I was looking for (I want to avoid the window to...
Hi guys,
I would like to read a node with all its contents from a DOM tree and insert it in a new DOM. Any hint? Below is my dom tree format (already in memory as a dom tree) and the expected result:
MEMORY DOM:
<?xml version="1.0" encoding="UTF-8"?>
<Oper>...
Hi people,
I have a List object with "n" different DOM trees (each element of the List object has a Document object).
I want to create a new DOM tree object and insert in it each one of the "n" DOM trees I have in the saved List. So the final result will be a single DOM.
Any hint of code...
Hi,
I have the following XML:
...
<aaa>
<bb>
<ccTemplate>../dir1/dir2/file3.xml</ccTemplate>
<dd>
</dd>
</bb>
<ee>
</ee>
<ff>
<gg>
<hhTemplate>../dir1/dir2/file4.xml</hhTemplate>
</gg>
</ff>
</aaa>
This XML file is parsed into a DOM tree Document. How do I...
Hi people,
I need to extract some data from the pattern pattern:
(xxx,yyy,zzzz)
The output should be handled like this:
var1 = xxx;
var2 = yyy;
var3 = zzz;
Also, the digits may vary like: (xxx) OR (xxx,yyy)
I want to avoid using String split method or to remove the "(" and the ")"...
Hi people,
I wrote a TCL script and now I am facing problems because I did not specify a timeout condition - I don't know how to do that in TCL!Basically I want that my program continues its execution but ensuring that the timeout limit is never crossed. This is what I tried (among other...
Hi people,
can somebody tells me how can I extract the file name from a variable full path (path + filename)?
Sample:
set fullpathinfo "/aaa/.../bbb/ccc/filename1.txt"
set filenameresult ""
[unknow code here to extract only filename1.txt and put it into variable filenameresult]
[...]
puts...
Hi all,
I have to execute a unix cshell script inside my TCL script and then read its return code. The cshell script return codes can be:
0 - 100 % success
1 - partial success
2 - error
The dummy cshell script named "dummy_script.sh" is below:
-------------------
#!/bin/ksh
echo Cshell...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.