228 Topics

Member Avatar for
Member Avatar for gianrocks

hey everyone, i am to create a database filled with pdf files and its stored into binary. i was able to convert each file into binary but the problem is dat now i cant display it in the viewer.. can someone help me? i remember that i used to do …

Member Avatar for Owais_4
0
3K
Member Avatar for john10

Hey guys, I would like some help regarding saving or reading to or from a bin file. I've read several online tutorials about file input/output, however it doesn't given specific information when applying it to both an array of structures. My knowledge of pointers is weak, as I constantly need …

Member Avatar for jimmichaels29
0
3K
Member Avatar for Reverend Jim

##vbScript - Convert Integer to Binary String Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. vbScript has a number of functions for converting from one type to another. These functions are named C<type> as in CInt (convert to int), CDbl (convert to double), etc. There …

0
4K
Member Avatar for Reverend Jim

##vbScript - Sorting With and Without Code Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. Sorting is something that must be done from time to time. I'm going to examine three ways. The first is the well known (at least by name) QuickSort method. Rather …

1
1K
Member Avatar for munitjsr2

[CODE] #include <stdio.h> #include <stdlib.h> typedef struct filedata { char data[100]; }data_t; data_t * fname=NULL; //IS AN ARRAY OF the structure filedata REQUIRED HERE void quit() { printf("\nPress enter to exit"); fflush(stdin); getchar(); } int main() { char ch; fname=(data_t *)malloc(sizeof(data_t)); FILE *fptr=NULL; atexit(quit); printf("Please enter the file name to …

Member Avatar for AssertNull
0
3K
Member Avatar for Bryan_5

I'm trying to store some information in a binary file. However, i met with a problem that i can't rectify. For example, if the first order comes in, there is a struct of information that includes orderNo 1, which will be stored into the binary file. When there's a second …

0
228
Member Avatar for Doogledude123

I'm having some issues with my BSP Dungeon Generation and I'm not sure why! I'd greatly appreciate the help :) Occasionally I'll get an IllegalArgumentException in RandomHelper. That may help, but it's not the issue because it only happens rarely. As you can see, [this image](http://puu.sh/nb9Ir/70efbe5e81.png) shows that the Rooms …

Member Avatar for JamesCherrill
0
630
Member Avatar for noobjavacoder

First question, is there any difference between binary search and recursive binary search??? I looked through google and everything but couldnt find any useful info. I did find irritative and recursive but that was it. and second question: Given a desired search value of 98 and an array with the …

Member Avatar for invisal
0
1K
Member Avatar for chubbyy.putto

what I am trying to do is store same letter to same node. For example: let say I have person, people is sent to be put into a node. This will create two node. I want to some thing like P: Person People Person and People are same note When …

Member Avatar for bernardo.mclobo
0
410
Member Avatar for phony

` //Header file: stackADT.h #ifndef H_StackADT #define H_StackADT //************************************************************* // Author: D.S. Malik // // This class specifies the basic operations on a stack. //************************************************************* template <class Type> class stackADT { public: virtual void initializeStack() = 0; //Method to initialize the stack to an empty state. //Postcondition: Stack is empty. …

Member Avatar for tinstaafl
0
956
Member Avatar for Doogledude123

So, I've written a Custom Binary Format outline but I'm not sure how to translate it to code. I was looking for a few tips on where to get started? Here's my outline. MAPDATA { signature // U24 0x4D, 0x41, 0x50 (MAP) version // U8 0x01 width // U16 (MAX …

Member Avatar for JamesCherrill
0
824
Member Avatar for Mr._1

Hi..i m new here..i want to ask some little help..how can i save the listbox items into binary file? The items should write at specific location which is offset 0x2E (item1), 0x9A (item2) and 0x106 (item3)..each offset separate by 108 length..

Member Avatar for SteveDotNet
0
305
Member Avatar for goha1414

Write a program in object code that will convert a 3-bit binary number to a decimal number,For example, if input is 101, output should be 5; if input is 011, output should be 3. that is what I have to do,this is what I have so far but its not …

Member Avatar for saifali110
0
1K
Member Avatar for Garidius

Hello to all in forum, Maybe some java expert could help me. How can I read chunks from binary file each chunk at a time? The chunks are separated with the bytes D2 followed by A7 and of variable length. This is whenever D2A7 is found, this is the End/Beginning …

Member Avatar for Garidius
0
2K
Member Avatar for EarhawkPH

I'm having problems with this program. Everytime i enter a fractional decimal number, it displays -0.0000 or sometimes garbage values. Ex: Enter any fractional decimal number: 5.7 -2.888blah blah blah garbage another Ex: Enter any fractional decimal number: 25.7 -0.000000 #include<stdio.h> int main(){ long double fraDecimal,fraBinary,bFractional = 0.0,dFractional,fraFactor=0.1; long int …

Member Avatar for David W
0
385
Member Avatar for ddanbe

I you ever would have the need to do this conversion you probably would use `string myStr = Convert.ToString(myInt,2);` which does the job. Here is presented another way to do this with some simple formatting included. Some highlights for newbies and not so newbies: Line 9: Custom enum type Line …

1
289
Member Avatar for kxjakkk

I'm trying to modify this code: class Tree: def __init__(self, cargo, left=None, right=None): self.cargo = cargo self.left = left self.right = right def __str__(self): return str(self.cargo) def print_tree_inorder(tree): if tree is None: return print_tree_inorder(tree.left) print(tree.cargo, end=" ") print_tree_inorder(tree.right) So that it adds parentheses around every operator and pair of operands. …

Member Avatar for kxjakkk
0
461
Member Avatar for stephen.teacher

hi all, this is some extra credit from class we sat around cleaning up code today this is what we came up with public boolean equals2(IntTree t2){ return equals2(this.overallRoot, t2.overallRoot); } private Boolean equals2(IntTreeNode r1, IntTreeNode r2){ if(r1 == null || r2 == null){ return r1 == null && r2 …

Member Avatar for stephen.teacher
0
298
Member Avatar for prerit

Hello all!Im trying to write a program that accepts a string from users and then converts each character in the string to its corresponding 8-bit binary code and store it for further manipulation on obtained bit. I have the following code but it is not executing as expected : #include …

Member Avatar for deceptikon
0
324
Member Avatar for N1GHTS

Say I have code like this... typedef struct { unsigned A:1; unsigned B:1; } FlagStruct; extern FlagStruct *Flags; Imagine that the Flags instance is a shared resource in a multi-threaded application. Say thread #1 decides to read the value of Flags->A but thread #2 decides to set or clear Flag->B …

Member Avatar for N1GHTS
0
238
Member Avatar for Doogledude123

Alright, so I am building a Converter to convert ASCII to Binary and for some reason, the for each loop stops working when it hits a space, and I have no idea why. I'm probably just over thinking it. Extra: Can you tell me how to force the output binary …

Member Avatar for Doogledude123
0
4K
Member Avatar for Labdabeta

Hello, I have a bug in my program somewhere and I cannot understand why. The program merely prints data from a binary file. Here is the code: #include <iostream> #include <fstream> #include <vector> #include <cstdint> using namespace std; int main(int argc, char *argv[]) { if (argc!=2) { cout<<"Invalid argument count, …

Member Avatar for Labdabeta
0
409
Member Avatar for Rabee_1

Hello , I have to write a code that read a file in python and convert each chaaravter to 1, or 0 and send these digets to a a selonoid to make a strike or not to make ( brille printing ) is that possible ???? please need your help …

Member Avatar for iamthwee
0
462
Member Avatar for Eve_1

Hello guys, I am a new learner in PHP and I am modifying a simple binary site. I am here to ask help how can I calculate my downline pairs or the total left and right side of some user. Here is the example of my tables in database: +++++++++++++++++++++++++++++++++ …

Member Avatar for diafol
0
863
Member Avatar for Stefan_2

This is what I have to code. Input an array of numbers(any numbers that user inputs from standard input, aka keyboard), remove numbers from array that are not 0 and 1. Thay array should now be bitwise moved with << or >> (again user choses the number of spaces moved …

Member Avatar for Stefan_2
0
285
Member Avatar for nouth

It is possible to read/write the binary of any file with using Python? `open(file, "b")` only works for windows `"rb"` `"rb+"` `"wb"` `"wb+"` `"ab"` `"ab+"` works but `.read()` just prints the file contents not its binary

Member Avatar for nouth
0
696
Member Avatar for gu mi nam

this code was error.please help me fix it include <iostream> include <conio.h> include <algorithm> using namespace std; int a[]={1,5,7,4,9,8}; BST*binary_search_tree; struct BST{ int value; BST* left; BST* right; }; int search_bst(BST* node,int key){ if(node==NULL) return -1; if(key<node->value) return search_bst(node->left,key); if(key>node->value) return search_bst(node->right,key); else return node->value; } void insert_bst(BST* &treeNode,BST* newNode){ …

Member Avatar for gu mi nam
0
392
Member Avatar for oanahmed

I want to know how a microprocessor converts the binary digits into decimal equivalent. The processor only has the ability of manipulating 0's and 1's but, how these numbers are converted back into their decimal equivalent? Are they converted by another circuit? If so, then how and what it is …

Member Avatar for mike_2000_17
0
294
Member Avatar for oanahmed

I want to know how software is converted into electrical pulses or `0`'s and `1`'s in computer. How does the computer do it? I know that `0` and `1` in binary system actually represent `off` and `on` states respectively and the computer stores the data in its memory in the …

Member Avatar for mike_2000_17
0
259
Member Avatar for ryan.jay.ong

I want to convert some numbers to binary, octal, and hexadecimal.. for example: . DECIMAL......BINARY......OCTAL.....HEXADECIMAL ................................................................... 1.................00000001.....001.......1 2.................00000010.....002.......2 And so on..

Member Avatar for AndrisP
0
175

The End.