I have a basic understanding of hexadecimal and binary representations, which I'd like to improve. Can anyone recommend books that can help me along? Thanks.
Ok i have problem with my code for reading binary file...
First i will show you my writing code:
void book_saving(char *file_name, struct BOOK *current)
{
FILE *out;
BOOK buf;
out = fopen(file_name, "wb");
if(out != NULL)
{
printf_s("Writting to file...");
do
{
if(current != NULL)
{
…
Ok i have problem with my code for reading binary file...
First i will show you my writing code:
void book_saving(char *file_name, struct BOOK *current)
{
FILE *out;
BOOK buf;
out = fopen(file_name, "wb");
if(out != NULL)
{
printf_s("Writting to file...");
do
{
if(current != NULL)
{
…
After removing the minimum element in a binary heap, i.e. after removing the root, why is the last leaf then assigned to the root and sifted down?
Why not take the lesser child of what used to be the root and just keep sifting up all the children? Isn't this the same amount of operations, so why is the "sift down" method…
In response to this question asking about hex to (raw) binary conversion, a comment suggested that it could be solved in "5-10 lines of C, or any other language."
I'm sure that for (some) scripting languages that could be achieved, and would like to see how. Can we prove that comment true, for C, too?
NB: this doesn't…
Pretend you're at an interview. The interviewer asks:
What is the decimal value of this binary number?
10110101
What is the first thing you responsed with?
Ok, this is another one in the theory realm for the CS guys around.
In the 90's I did fairly well in implementing BST's. The only thing I could bever get my head around was the intricacy of the algorithm to balance a BinaryTree (AVL).
Can you guys help me on this?
What is the total number of comparisons necessary to locate all the n sorted distinct integers in an array using binary search, I think it is nlogn, but I am not sure. What do u guys think?
Maxmind offers a binary DAT file format for downloading their GeoIP database.
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
Does anyone know how this has been packaged? Also, is there any kind of copy protection on the data?
I'd like to offer up a set of data in a similar way.
Anyone with any…
I have data structured in Binarytree format, i want to represent it into an image(*. jpeg) then i need to display that image on web page and all the data will come @ runtime, so image processing should be done @ runtime, how to do this ?
This is what my thought solution any other suitable solution are also welcomed,
web…
I asked this question a few days ago but it seems to have gone cold fairly quickly. What I want to do is pretty simple and I can't believe someone hasn't figured it out.
Solution needs to be JScript classic ASP. I am reading a file from a remote server and I want to process that (binary) file on my server and spit the…
How to create a script to :
compare two trees,
in c/c++ in a non recursive mode?
also,
How to create a script in c/c++ to verify if a tree is binary, in a non recursive mode?
thanks in advance.
I have a binary files which needs to be sent as a string to a third-party web-service. Turns out it requires that it needs to be base64 encoded.
In ruby I use the following:
body = body << IO.read("#{@postalcard.postalimage.path}")
body is a strong which conists of a bunch of strings as parameters.
So...how…
Hi,
I have to query a column containing a Binary column with data like this ®â{Õ¦K!Eòû¦?;#§ø.
How can i query this colmn..if I wanted something like:
SELECT Name
FROM Users
WHERE ID = ®â{Õ¦K!Eòû¦?;#§ø
THanks
In c++ 0x10 is the way to represent a hex value.
if I leave off the 0x then it's dec. Is there a way to define a binary?
Not that I can't derive 0x0003 is 11, but it would be cool if I could use
0b0011. It would just make the code a little more obvious.
<Binary Id="binUpdate" SourceFile="c:\xxx\Update.exe"/>
<CustomAction Id="Update" BinaryKey="binUpdate" Execute="deferred" ExeCommand="c:\xxx" />
When I build a Wix project with the above custom action, it complains that "The system cannot find the file 'C:\xxx\Update.exe".
This update.exe is deployed by…
Hi!
Is there a method to build a balanced binary search tree?
Example:
1 2 3 4 5 6 7 8 9
5
/ \
3 etc
/ \
2 4
/
1
I'm thinking there is a method to do this, without using the more complex self-balancing trees. Otherwise I can do it on my own, but someone probably have done this…
i have to create a program which can have n number of nodes and each subnode can have n number of subnodes and so on, its not a binarytree.
i need to know how can one create it?
Why is it that if you open up an EXE in a hex editor, you will see all sorts of things. If computers only understand binary then shouldn't there only be 2 possible symbols seen in the file? Thanks
Consider this expression as a "selection" control structure on integer "x":
0 < x < 10,
with the intention that the structure returns TRUE if "x" is in the range 1..9.
Explain why a compiler should not accept this expression. (In particular, what are the issues regarding the binary operator "<"?…
I am trying to write a "contains" function for a binary search tree. I receive the following error at compile "Unhandled exception at 0x77291CB3 (ntdll.dll) in BST.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x001E2FFC)." The following is my code.
struct Node {
int data;
Node*…
i need to write a program that counts the number of nodes from a certain level given in binarytree
i mean < numberofnodes(int level){}
i tried writing it without any success because i don't how to get to a certain level then go
to count number of nodes
I've just tried to hg diff some C source files and was told that they are binary.
So, my question is: How can I convince UNIX and Mercurial that these files are, in fact, ASCII?
Thanks in advance for your help.
How to double a number of binary digits in an integer? For example, if bin(x)="1001" then bin(y) must be "11000011". Is there any smart and fast algorithm ?