I have the following simple code to return a binary number in a array format given an interger and the number of the bits for specifying the interger as binary number.
#include <stdio.h>
#include <stdlib.h>
int main ()
{
// int* get_binary_number(int* bit_array, int num, int... (8 Replies)
Hi All,
Is there any command which can convert binary decimal coded values to ascii values...
i have bcd values like below
0-- -v -
Pls suggest a way to convert this.
Thanks,
Deepti.Gaur (3 Replies)
Anybody please help me...
Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary Coded Decimal) representation. Also, draw its Flow Chart.
This is a unix qn...
plz post algorithm for that :confused: (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary... (2 Replies)
I need code for converting a string to a negative decimal value.
For ex, i have the value in the form of a string (5489.95-) i need to convert it into decimal value (-5489.95) while getting output using printf command.
i know how to get as a string
a="5489.95-"
printf "%10s"$a >>xyz.dat
... (5 Replies)
Hi All,
New to this forum (and yes , a newbie in programming..:p)
I have a decimal to binary converter script done this way :
i=$1
bit0=$(( (i & 0x01) > 0 ))
bit1=$(( (i & 0x02) > 0 ))
bit2=$(( (i & 0x04) > 0 ))
bit3=$(( (i & 0x08) > 0 ))
bit4=$((... (6 Replies)
Hello,
I have script which work fine on particular data.file .
The next feature I want to achieve is to get the decimal equivalent of data to data.
The data looks like this :
data(01000000000000000000110000000000)
thank you..
#include <iostream>
#include <fstream>
#include... (4 Replies)
Hi ,
seq can be 0...128
int windex = seq / 8;
int bindex = seq % 8;
unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue = bitvalue;
This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to... (1 Reply)
Discussion started by: greenworld123
1 Replies
LEARN ABOUT DEBIAN
file::mimeinfo::rox
File::MimeInfo::Rox(3pm) User Contributed Perl Documentation File::MimeInfo::Rox(3pm)NAME
File::MimeInfo::Rox - Open files by mimetype "Rox style"
SYNOPSIS
use File::MimeInfo::Magic;
use File::MimeInfo::Rox qw/:magic/;
# open some file with the apropriate program
mime_system($somefile);
# more verbose version
my $mt = mimetype($somefile)
|| die "Could not find mimetype for $somefile
";
mime_system($somefile, $mt)
|| die "No program to open $somefile available
";
DESCRIPTION
This module tries to mimic the behaviour of the rox file browser <http://rox.sf.net> when "opening" data files. It determines the mime
type and searches in rox's "Choices" directories for a program to handle that mimetype.
See the rox documentation for an extensive discussion of this mechanism.
EXPORT
The methods "mime_exec" and "mime_system" are exported, if you use the export tag ":magic" you get the same methods but
File::MimeInfo::Magic will be used for mimetype lookup.
ENVIRONMENT
The environment variable "CHOICESPATH" is used when searching for rox's config dirs. It defaults to
"$ENV{HOME}/Choices:/usr/local/share/Choices:/usr/share/Choices"
METHODS
"mime_system($file)"
"mime_system($file, $mimetype, @_)"
Try to open $file with the appropriate program for files of it's mimetype. You can use $mimetype to force the mimetype. Also if you
allready know the mimetype it saves a lot of time to just tell it.
If either the mimetype couldn't be determinated or no appropriate program could be found "undef" is returned. If the actual system
failes an exception is raised.
All remaining arguments are passed on to the handler.
"mime_exec($file)"
"mime_exec($file, $mimetype, @_)"
Like "mime_system()" but uses exec instead of system, so it never returns if successful.
"suggest_script_name($mimetype)"
Returns the list "($dir, $file)" for the suggested place to write new script files (or symlinks) for mimetype $mimetype. The suggested
dir doesn't need to exist.
BUGS
Please mail the author when you encounter any bugs.
AUTHOR
Jaap Karssenberg <pardus@cpan.org>
Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
SEE ALSO
File::MimeInfo, File::MimeInfo::Magic, <http://rox.sourceforce.net>
perl v5.14.2 2012-01-05 File::MimeInfo::Rox(3pm)