228 Topics
|
|
I use: [ICODE]Integer.toBinaryString(number);[/ICODE] to get binary string. I want to get the sum of two binary number. how do i do? example: 0010 + 0011 = 0101! Thanks! smb help me please! |
|
I am trying to create a program to log the medal tally of the cwg. However,I'm still getting wind of using binary files. It seems as if nothing is being read from or written into them. Below is my entire code. It would be of help if somone could direct … |
|
[CODE] #ifndef VECTORBINARYTREE_H #define VECTORBINARYTREE_H template<typename Object> class ArrayVector{ private: int capacity; int sz; Object* a; protected: void overflow() { capacity*=2; Object* b=new Object[capacity]; for(int i=0;i<sz;i++) b[i]=a[i]; delete []a; a=b; } public: ArrayVector(int initCap=16){ capacity = initCap; sz=0; a = new Object[capacity]; } int size() const {return sz;} bool isEmpty() … |
|
The program like the title says is supposed to return the largest integer value in an user-inputted integer array, using binary recursion. And in the case of an empty array, return Integer.MIN_VALUE. I am kind of stuck on the logic of this binary recursive algorithm. I know there is errors … |
|
I was given a set of binary number to assemble it into gray code sequence: 111 000 110 011 001 100. Is their a specific way I have to do this? From What I read in the internet I think the following solution would be this: Gray Code 000 001 … |
|
im making a program that loads a collection of strings from a file. then the user need to search the keyword using a binarysearch, but im using strings in my program, how to make the program using array of characters? here's my code, thx before :) [code] #include <iostream> #include … |
|
Hey you guys I have a question about binary representation. I was given two signed binary (SB) number and Im suppose to determine which has the largest magnitude. I get the problem and I dont want any help on it but Im not sure how to[U] read[/U] this binary information. … |
|
hi i really need help, i m trying to write a program that displays in a textbox a talbe of the binary, octal, and hexadecimal equivalents of the decimal numbers in range 1-222. Plz help i m new to vb....Thks you |
|
First, sorry for posting this here, but I couldn't find a VBScript forum on Daniweb (which I find surprising). I'm working with binary data in several different projects. Below is an example of code that works to retrieve a static map image (PNG) from Google: [CODE]strFileURL = "http://maps.google.com/maps/api/staticmap?markers=2200+S+Western+Ave+Lisle+IL&zoom=14&size=400x400&sensor=false" Set objXMLHTTP … |
|
Hello, I have a program assignment that is supposed to that converts decimal numbers to binary, hexadecimal, and BCD. I am having an issue with keep the leading zeros on the binary. I have used a recursive function to output a binary conversion. [CODE]#include <iostream> #include <iomanip> using namespace std; … |
|
for (i=0, i<imax, i++) { // ... Array< complex<float>, 3 > matrix(x,y,z); // x,y,z are large and vary in each loop // ... // matrix <=== values for each element assigned // ... // now want to write "matrix" in a single binary file. // later, this matrix can be … |
|
Ok I have a linked list which have to read from binary file and to write in binary files. This is the function about the reading from keyboard: [CODE]short readElement( Node * newE) { int b,e,m; if ( newE == NULL ) return 1; do { printf("\n Registration number:"); scanf("%s", … |
|
I wrote this simple program in C to generate binary search tree, but i am unable to go beyond level 0. Note that I have not incorporated the printing part. [code] #include<stdio.h> #include<malloc.h> struct node { int data; struct node *lc; struct node *rc; }*start,*link,*tmp; int a[100]; int main() { … |
|
I've been trying to display the equivalent decimal number of the input binary number. I tried the below piece of code but am not achieving the result. I don't seem to understand why? Please Help!! [CODE] #include<stdio.h> #include<conio.h> #include<math.h> int a=0; int main() { char bin[8]; int i=0,len=0,r=0,w; printf("Enter a … |
|
I'm supposed to write a tcp server program which writes into a file a record as structure. The code is given below: [code] int n,i; cout<<"Enter number of student records"; cin>>n; for(i=0;i<n;i++) { cout<<"Enter id,name,average mark"; cin>>r[i].id>>r[i].name>>r[i].mark; } [/code] [code] int i,n1; FILE *fp; FILE *file = fopen("db.dat", "wb"); cout<<"Writing … |
|
Hi experts! I have the following code which I use for dynamically creating objects in one module (executable or shared object (.so or .dll)) and be able to delete it from any other module while enforcing the call to the delete operator in the original module where the object was … |
|
Hello everyone.. how to write "75 18" (binary) in offset 004012BC? [CODE]Dim Fhand As Integer Dim Offst As Long Dim DataP As Byte Private Sub Command1_Click() Fhand = FreeFile Offst = &H4012BC DataP = &H4B + &H12 'this is 75 18(binary), is this the right way to write 75 18? … |
|
Hi, I am trying to implement a binary tree(not sorted) using recursion. I have figured out most of my function however GetMax and GetMin are confusing me. [CODE]#include <stdio.h> #include <stdlib.h> #include <limits.h> typedef int TreeEntry; typedef struct binary_tree_node { TreeEntry item; struct binary_tree_node * left; struct binary_tree_node * right; … |
|
Problem 1: I was wondering if it's possible to add for example the struct below into a binary tree: [CODE=c] struct Appoint { string place; string title; int hour, minute; int durationHr, durationMin; }; [/CODE] I want the above struct to be sorted in the binary tree by hour and … |
|
Check this out: [URL="http://www.lfd.uci.edu/~gohlke/pythonlibs/"]Unofficial Windows Binaries for Python Extension Packages[/URL] |
|
[B]how to convert decimal to binary? && binary to decimal?[/B] [B]HELP guyz?! please?!![/B] |
|
I am currently making a binary tree and I was able to create the tree. What I am facing now is " How to get the total number of children in my left side and total number in my right side ". The structure is: [CODE] 1 2 3 4 … |
|
Creating a program to read a text file full of words in alphabetical order. I then have to read it into a Linked List. The linked list should output total number of words, which I have managed to do. After this it needs to calculate the min and max depth … |
|
So this is my problem: as the title suggests, I have a Labyrinth class that contains two binary trees made of two different kinds of structs that represent different kinds of rooms. The names are in spanish, so Arbol means tree, Laberinto is the labyrinth class and Sala1 and Sala2 … |
|
I wrote this code for fun. Wanted to do such a thing so that I would be able to use this in the future. I'm kinda new to this forum. I like to know what you think about the code. If can point out some mistakes or ways to improve … |
|
I'm trying to automatically convert a binary input in a textbox to a hex code in a second textbox. It does work the way I'm trying to, but the order it comes out is wrong, for instance, 1111 = 0F this is correct, but when i now make it : … |
|
Can anyone help me fix this problem I have with my code. I am supposed to be writing a Binary Insertion Sort method that calls a binary search method. I have code that is working for in order integers, when tested on reverse order integers it works except it places … |
|
Hi all, I am new to C, and till now have only done python (a years worth at university), and am finding myself running into walls whenever i try to do seemingly simply stuff. One of the main issues in comparison is the lack of a interpreter and Ch is … |
|
I new to Python and I'm trying to make this script work, I made this in php, but I'd like to know how to do it in python... I'm trying to encode a file with base64 and then decode and write the binary data to a file. [CODE=Python]import base64 binaryfile … |
|
Okay, this might become a monstous post, and I apologize for that. I recently switched from programming Java to C++ like a week ago, and can't seem to get all the pointers right it seems. Maybe all code provided in this post might seem a little overkill for the size … |
The End.