228 Topics

Member Avatar for
Member Avatar for o0oKodako0o

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!

Member Avatar for apines
0
116
Member Avatar for Shijo Jose

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 …

Member Avatar for Taywin
0
197
Member Avatar for crossbow25

[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() …

0
84
Member Avatar for flyingcurry

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 …

Member Avatar for Taywin
0
178
Member Avatar for speedy94519

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 …

Member Avatar for gusano79
0
166
Member Avatar for EarendurRingern

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 …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for speedy94519

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. …

Member Avatar for hamshu88
0
135
Member Avatar for jatt09

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

Member Avatar for jatt09
0
182
Member Avatar for tgreer

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 …

Member Avatar for tgreer
0
754
Member Avatar for Exercitus

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; …

Member Avatar for daviddoria
0
313
Member Avatar for applepomme

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 …

Member Avatar for chiwawa10
0
185
Member Avatar for george61

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", …

Member Avatar for prvnkmr449
0
3K
Member Avatar for titan_31

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() { …

Member Avatar for Narue
0
172
Member Avatar for guru_iyer

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 …

Member Avatar for volvo877
0
507
Member Avatar for hari.sarvothama

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 …

Member Avatar for Ancient Dragon
0
379
Member Avatar for mike_2000_17

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 …

1
148
Member Avatar for kkusuk

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? …

Member Avatar for AndreRet
0
118
Member Avatar for xxpokerxx

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; …

Member Avatar for xxpokerxx
0
265
Member Avatar for Drakarus

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 …

Member Avatar for Drakarus
0
265
Member Avatar for TrustyTony

Check this out: [URL="http://www.lfd.uci.edu/~gohlke/pythonlibs/"]Unofficial Windows Binaries for Python Extension Packages[/URL]

0
89
Member Avatar for jefferlyn92
Member Avatar for NormR1
0
65
Member Avatar for codewalkz

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 …

Member Avatar for codewalkz
0
1K
Member Avatar for circusfreak

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 …

Member Avatar for NormR1
0
130
Member Avatar for alllucky7s

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 …

Member Avatar for alllucky7s
0
208
Member Avatar for Sinaru

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 …

Member Avatar for mrnutty
1
181
Member Avatar for ndz-niels

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 : …

Member Avatar for ndz-niels
0
143
Member Avatar for Roy_Valentine

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 …

0
117
Member Avatar for commentator8

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 …

Member Avatar for rajuln
0
409
Member Avatar for X-Boy

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 …

Member Avatar for bumsfeld
0
4K
Member Avatar for emilo35

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 …

Member Avatar for emilo35
0
156

The End.