I have expanded your zip file and the start bytes are nothing like yours, that helps - not.
So $9, $10, $11, $12 and $13 are BCD AND $15, $16, $17 are HEX values for the year in the file you gave; that is 15\09\03 ; and similarly $18, $19, $20 for the time...
Why did you not tell us that part of the info is BCD and the other part HEX to decimal conversion?
Longhand the second part only for just ONE set of values and added a newline just to make it clear...
The BCD part is easy...
OSX 10.7.5, default bash terminal...
not much familiar with binary and hex calculation in script programming....
explaination:
binary format control the parameter turned on or off in the program stored in hex mode, the question is:
how to change 39e to 19e using the binary calculation(although i don't know the command for... (2 Replies)
Hi ,
i'm using special binary file (lotus notes) and modifying an hexadecimal address range with windows hex editor and it works fine !
The file is an AIX one and i'm forced to transfert (ftp) it before modifying it and re-transfert !
NOW i would do this directly under AIX !
I can... (4 Replies)
Hi all,
I have a print control file (dflt) for Oracle which is in binary. As I am going to develope an application in Window environment, I would like to reference the dflt file. But it is in binary format and I cannot access it. Anyone can suggest me how to convert the file into text or... (5 Replies)
i want to output something like
2f 00 00 00
but i can't seem to escape characters like i'm used to in some programming languages, so with this:
echo "/\0\0\0" >> outputfile
i actually get
2f 5c 30 5c 30 5c 30 0a
ie the \0 isn't giving me the 00 i need, and in addition it has got an... (8 Replies)
Folks,
can anyone help with a script to convert hex to binary digits, and break the 32 bit binary into packs of 4 and send them to 8 different variables.Any help is sincerely appreciated.
Thanks
venu
Its in korn shell...... (24 Replies)
The file contains code like the below and need to convert each one into a decimal
00 00 00 04 17 03 06 01
So the output should come as
0 0 0 4 23 3 6 1 (24 Replies)
Hello *nix specialists,
Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Hi Team,
Here's the requirement.
I have a image file in jpg format in unix.
Now I need to
i. convert the jpg format to binary format
ii. followed by loading the binary file to Oracle db.
Can anyone help me out?
Thanks
Krishnakanth Manivannan (4 Replies)
Does anyone know how to convert an expect script to binary in linux?. (3 Replies)
Discussion started by: John Wilson
3 Replies
LEARN ABOUT DEBIAN
math::polygon::clip
Math::Polygon::Clip(3pm) User Contributed Perl Documentation Math::Polygon::Clip(3pm)NAME
Math::Polygon::Clip - frame a polygon in a square
INHERITANCE
Math::Polygon::Clip
is a Exporter
SYNOPSIS
my @poly = ( [1,2], [2,4], [5,7], [1, 2] );
my @box = ( $xmin, $ymin, $xmax, $ymax );
my $boxed = polygon_clip @box, @poly;
DESCRIPTION
Cut-off all parts of the polygon which are outside the box
FUNCTIONS
polygon_fill_clip1(ARRAY-BOX, LIST-OF-POINTS)
Clipping a polygon into rectangles can be done in various ways. With this algorithm (which I designed myself, but may not be new), the
parts of the polygon which are outside the BOX are mapped on the borders. The polygon stays in one piece.
Returned is one list of points, which is cleaned from double points, spikes and superfluous intermediate points.
polygon_fill_clip2(ARRAY-BOX, LIST-OF-POINTS)
To be implemented. The polygon falls apart in fragments, which are not connected: paths which are followed in two directions are
removed. This is required by some applications, like polygons used in geographical context (country contours and such).
polygon_fill_clip3(ARRAY-BOX, OUT-POLY, [IN-POLYS])
To be implemented. A surrounding polygon, with possible inclussions.
polygon_line_clip(ARRAY-BOX, LIST-OF-POINTS)
Returned is a list of ARRAYS (possibly 0 long) containing line pieces from the input polygon (or line).
example:
my @points = ( [1,2], [2,3], [2,0], [1,-1], [1,2] );
my @bbox = ( 0, -2, 2, 2 );
my @l = polygon_line_clip @bbox, @points;
print scalar @l; # 1, only one piece found
my @first = @{$l[0]}; # first is [2,0], [1,-1], [1,2]
SEE ALSO
This module is part of Math-Polygon distribution version 1.02, built on September 19, 2011. Website: http://perl.overmeer.net/geo/
LICENSE
Copyrights 2004,2006-2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.12.4 2011-09-19 Math::Polygon::Clip(3pm)