228 Topics

Member Avatar for
Member Avatar for hackit

I am learning C. After completing the common core part. I found this unique program which will allow the user to create his own format specifier which will use "%b" as format specifier to convert a integer directly into binary. I want to know more about this code. How it …

Member Avatar for lil_bit
0
381
Member Avatar for ThePythonNoob

Hey guys im need some help with this binary calculator, you enter the amount of bits or n in and then it calculates the number? In order for you to understand my problem more I will explain why I am making this, I asked my dad how big 128 bit …

Member Avatar for ThePythonNoob
0
241
Member Avatar for ethio
Member Avatar for txhornsfan

I am having problems with my code. I think it is the print function, but I'm not sure. Everything compiles correctly. Just no output. Any help is appreciated. Thanks Here is what I have: #include <iostream> using namespace std; struct node* tree = NULL; struct node { int data; struct …

Member Avatar for Lucaci Andrew
0
215
Member Avatar for trishtren

Hey, Iv been working a lot with binary files recently and i am currently stuck trying to save a string to a file. The problem is i do not want the literal string value of "010100000000000100010011000000000001000100110" to be saved to the file I want the above binary string to be …

Member Avatar for NormR1
0
1K
Member Avatar for blackasninja

Heres the thing. This was one our class test and the image below is the lecturers question that is supposed to be one of his jokes(Binary/base). A large amount of the class answered that it was decimal 10. Every ideas and thought would be appreciated. Heres the image [Click Here](http://imgur.com/OwEKO)

Member Avatar for blackasninja
0
150
Member Avatar for sandz24

Can anyone discuss how to convert a jpeg color image into binary using OpenCv and C++. I find it hard understanding it on my own. I found sample programs but that really doesn't help much if I don't understand the meaning of every line of code. At least a step …

0
105
Member Avatar for Vish0203

i wrote a program to determine the binary digits of the entered integer. I want to implement it in other programs directly, instead of typing the same code again n again. Does anyone know? how to do that????????? #include<conio.h> #include<stdio.h> int main() { int n,a[20],i=0; printf("Enter a number: "); scanf("%d",&n); …

Member Avatar for Sky_Flyer
0
193
Member Avatar for geeerald1131

Help me please.. I can't make this code in window form application.. using System; namespace _01.Decimal_to_Binary { class DecimalToBinary { static void Main(string[] args) { Console.Write("Decimal: "); int decimalNumber = int.Parse(Console.ReadLine()); int remainder; string result = string.Empty; while (decimalNumber > 0) { remainder = decimalNumber % 2; decimalNumber /= 2; …

Member Avatar for Mitja Bonca
0
199
Member Avatar for HTMLperson5

By opaque binary i mean so that people cannot see the source code if they open the file in their text editor, so instead of seeing: print "You cant see me!" it would be something like: "0101010001010101001001010" And yes, i am trying to do this with python.

Member Avatar for TrustyTony
0
209
Member Avatar for nyuszi

im making a program which uses binarys so convert decimal numbers, characters, strings to binary numbers and work with them. but i got stucked because i want to divide Bin with Bin. something like this: 11010110110000 / 10011 = 01001110110000 so the new number will the 1001110110000 / 10011... until …

0
95
Member Avatar for nyuszi

Hello, i want a program which convert Dec,Char,String to Bin. but i got stucked in Char because i want to do 8 bit long list and if its not 8 long i put zeros in the front but something always wrong. import Data.Char (ord) toBinary :: Int -> [Int] toBinary …

0
114
Member Avatar for valorien

Hi Everyone, I have a list of numbers I'm trying to write to a file, which I want to be a binary file. Here's my code: nums = [0x1234, 0x5678, 0xabcd, 63, 44] with open('filename', 'wb') as bin_file: for number in nums: bin_file.write(number) The problem is that I keep getting …

Member Avatar for valorien
0
537
Member Avatar for jimjones371

Need help from daniweb community. I suck at programming. It doesn't make sense to me. I'm not going to be programming in my career but it's part of my major. I'm desperately trying to get an c- just to pass. Would love some help. I would appreciate some explanation but …

Member Avatar for gusano79
0
281
Member Avatar for bizak

Hello! I've been staring at my code for a while and I really have no idea where I'm going wrong. I'm working on deleting a specific node (for example, the integer 317)....but for some reason I just keep getting a nullpointer expression. I get the error when it goes into …

Member Avatar for JamesCherrill
0
287
Member Avatar for sandz24

Which of the two (Binary Image and Gray scale image) is easier to embed in a color image using Discrete Cosine Transform? I'm currently exploring image watermarking using discrete cosine transform. Thanks in advance!!! :)

Member Avatar for sandz24
0
185
Member Avatar for while(!success)

Hey guys, I've been messing around trying to learn binary trees and have created a simple program to get the month and number of days in a month to be inserted into the tree then displayed. I am getting a successful build, however, when it launches the terminal window the …

Member Avatar for while(!success)
0
140
Member Avatar for Dendari

Hello everyone. I'm trying to work with this kind of file: http://www.mediafire.com/?da0ad07pzfogdl0 (you may use Notepad++ to open it) I think it's a binary data file but I'm not sure. Anyways what I need to do it's to edit some of the text part inside it. Example: http://img403.imageshack.us/img403/8017/94022290.jpg I'd like …

Member Avatar for Dendari
0
221
Member Avatar for abhishek_ag

Hi Guys, I have written the below program to convert binary to octal, it is giving me erroneous results. On entering 1111 as the input number I should get 17 as the output, whereas I am getting 16707000337 as the output. Kindly help me out, below is my program: /*program …

Member Avatar for abhishek_ag
0
262
Member Avatar for Anonymous123

I have an assignment to write a program in Java to implement the Natural Correspondence Algorithm for converting a linear list into a binary tree. The program should process its inputs in two steps: (a) It first builds a tree for a given input list (b) It then traverses the …

Member Avatar for Anonymous123
0
273
Member Avatar for garu525

Hello, I need some advice on how this function outputs the left zeros so everything will be even at 16 bits [CODE]string conv (int num, int base) { if (num == 0) return "0000000000000000"; char NUMS[] = "0123456789ABCDEF"; string result = ""; do { result.push_back (NUMS[num % base]); num /= …

Member Avatar for histrungalot
0
140
Member Avatar for crag0

I need to write a script that will check a file and find out what type of file it is. The files I am downloading none of them have extensions and some are binary others txt and html files. I only want to work with the binary files. If anyone …

Member Avatar for TrustyTony
0
175
Member Avatar for dushtu.bor

Please tell me why it gives me always zero value? [CODE]<?php $total =0; $memid = $_POST['username']; $leg = $_POST['leg']; mysql_connect ("host", "usr", "paswd") or die ('Error: ' .mysql_error()); mysql_select_db ("dbname"); function getTotalLeg($memid,$leg){ $sql="select $leg from `users` where `username`='$memid' "; $res=mysql_query($sql); $row=mysql_fetch_array($res); global $total; $total = $total+mysql_num_rows($res); if($row['$leg']!=''){ getTotalLeg ($row['$leg'],'lname'); getTotalLeg …

Member Avatar for dushtu.bor
0
169
Member Avatar for rfrapp

Hello, I need to demonstrate the binary search using recursion, and I've run into a little problem. In my example, if "key" was 1, 2, 3, or 6, then it would return true. Anything else would give me an error. Why is that? Here's my code: [CODE] // binary search.cpp …

Member Avatar for rfrapp
0
253
Member Avatar for userct

I need to modify this movies program so that way the DVDs will be sorted by title at all times (A first thru Z). I need to use Binary Search so I put a method in DVDCollection but I'm probably missing something or calling it incorrectly. The program needs to …

Member Avatar for userct
0
234
Member Avatar for rizzi143

Create a program to construct a binary search tree consisting of nodes that each stores an integer in Java, avoid duplication of values when inserting nodes in the tree. When a new leaf node is created list all the nodes in the path from the newly added leaf node to …

Member Avatar for ejosiah
0
257
Member Avatar for cajohnson

I am working to take c code from an academic paper and edit. I am studying cryptographic algorithms. I have ran the following code, but I am having a little difficulty understanding two things. First, the program uses unsigned long ints. When they are added or subtracted, I don't get …

Member Avatar for cajohnson
0
209
Member Avatar for Mouche

Hello. I wrote a program to convert decimal fraction values into binary fractions. I seem to be running into some floating point accuracy problems. After multiplying a floating point number by 2 over and over, eventually the number becomes corrupted. Since I'm multiplying so many times, I think the error …

Member Avatar for Mouche
0
240
Member Avatar for stamatt45

I'm writing a program to convert Decimal numbers to binary, hexadecimal, and BCD as a refresher before i start getting code assignments in school. I'm almost done, but i have a seg_fault (compiler says decToHex function) in 1 function and i am hoping for some feedback on the others. I'll …

Member Avatar for raptr_dflo
0
3K
Member Avatar for Labdabeta

I have a difficult function to write and I have no idea where to begin. Here is the definition of what I need to write: "A function f(x,y) which returns true if the binary number formed by concatenating the bits of x, 8*y-1 zeroes and a one is prime, false …

0
109

The End.