Programming :: How To Generate MD5 / Sha-1 With Perl
Mar 31, 2010How can I generate a md5 or sha-1 code with perl?
View 2 RepliesHow can I generate a md5 or sha-1 code with perl?
View 2 RepliesHow do I generate sql result into xml ? Tried this way (shown below), but it generates all data into single column.
Code: Select allgenerate_xml()
{
f1=_tmp1
f2=_tmp2
cat $SQL_QUERY_OUT |sed -e 's/^"//g;s/"$//g;s/","/|/g'|tr '|' ' ' > $f1
[ -e $SQL_QUERY_OUT ] && rm $SQL_QUERY_OUT
[code]....
Does anybody know how to generate excel charts from C, or if it's possible at all?
For example, if I had 2 arrays that I wanted to export to excel and graph against each other. I know how to export it to a csv file, that's no problem, but I have no idea where to start with generating a graph of the data. I can't seem to find any examples anywhere.
I'd appreciate if someone could point me in the right direction.
Just a simple example to show you what I mean code...
I have a file, two columns, first column has a list of 15000 (yes 15k) unique codes, second column has the afilliate codes of 60 locations repeated to fill out the 15000 rows of unique codes. I need to produce a nice neat paper voucher which will fit onto A6 (1/4 A4) and is ready to print. Each voucher has the unique code and corresponding location. So far I am thinking PHP will do the job. This does it somewhat, but doesn't let be split the fields between the ",". I did this so far in PHP
[Code]...
I am trying to generate pdf in thai language. i have installed thai package (extension in babel package). It is finally generating pdf in thai. but thai string are cming very long as compared to original string given in .tex file.
View 3 Replies View RelatedI need to generate random numbers using /dev/random in C. The numbers should be of type double (64-bit floating point).The functionality should be equal to linux command "od -An -N8 -t fD /dev/random", but written in C.The prototype should be "double drand(void);".
View 7 Replies View RelatedA script to generate random dates. It uses the year range 2006-2009, and truncates every month of the year to an ordinary February's 28 days, but otherwise it's pretty solid and safe.
Code:
spate=1
while [ $spate -le 120 ]
[code]....
We are running some script to generate below values however we don't need the first level output as it always shows cpu % as 0.0.
(We dont need following part:
NAME STATE CPU(sec) CPU(%)
XXX -----r 55567 0.0
[code]....
I want to automate my System-installation. So i try to make a Script that will generate the /etc/motd. Now i have the Problem that the script has some variables and after the "Hostname, OS, HW, IP" the "stars" are anyware, but not there they should. The most problem is the $OS this string can verry long or verry short be. Fedora release 12 (Constantine) or RedHat 5.4 i can do that after the variables place the "stars" on the write position?
Script
Code:
#!/bin/bash
[code]....
I have some c++ code and want to generate class diagrams using some tool which would scan the c++ code and generate diagrams. Is there any such open source tool to be used on linux machine?
View 1 Replies View RelatedI have both 32 bit and 64 bit libs installed with gcc multilib.
I tried following options, but the result is still a 32bit elf:
# cc -mips64 -mabi=o64 -mlong64 -mgp64 -c gendian.c
# file gendian.o
gendian.o: ELF 32-bit LSB relocatable, MIPS, MIPS64 version 1 (SYSV), with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped
The machine is running 64 bit os:
# uname -a
Linux debian 3.2.0-4-5kc-malta #1 Debian 3.2.63-2+deb7u2 mips64 GNU/Linux
Both 4.6 and 4.7 gcc have been tried, and both have the same issue.
Fixed: need -mabi=64
I want to write a program in C which will generate a maze randomly and find the solution for it ..
The idea behind is in [url]
How the 16 bit integer is stored in a variable..Earlier I wrote a program on trees and displayed it using dotty.. Is there any such tool to display a maze..I am using ubuntu 10.04.
i have spotted that script (something similar that i am looking for)
[URL]
and i just dont know how to use it.I am not a programmer myself and probably no need for learning that just to create one script! modify "wje_lq" script and run it. thing like : "Just redirect standard output to a file in the normal manner" ? and all this
I.Comment out the first definition of *character-set*, by adding a semicon at the beginning of the line.
II.Uncomment the second definition, which just uses "ABC", by removing the semicolon from the beginning of the line.
III.Comment out the first definition of *word-length*.
IV.Uncomment the second definition, which uses a word length of four.
i would like to generate :
10-character combinations of the following characters (lowercase) 23456789abcdef with no more then 3 same letters repeates no metter side by side or within one line (sequence) so lets say
abcdef1234 accept
fabcde1234 accept
ffabcd1234 accept
which is probably permutation with repetable string ( where abc is not equeal to cba etc .so ti speak position does metter)
fffabc1234 not acceptable -----(3 same characters)
ffabcf1234 not acceptable -----( 3 same characters event thought not side by side)
we dont want 3 same characters apper in same line.
explanation what I want to do exactly:I have a textfile which looks for instance like this:
file.txt:
...
something=else to do
[code]....
Where is the perl module for programming with sockets?
View 4 Replies View RelatedI just downloaded Tk-804.028 and try to install it (according to the README.linux) but I get:
> perl Makefile.PL
/opt/ActivePerl-5.10/bin/perl-static is installed in /opt/ActivePerl-5.10/lib okay
PPM for perl5.010001
Test Compiling config/perlrx.c
Test Compiling config/pmop.c
Test Compiling config/pregcomp2.c
[code]...
Any recommendations on what Perl tutorial to use?
View 1 Replies View RelatedI am taking an input from the user for free and Used capacity in a disk. I wish to convert Input entered in MBTB to GB and this is how i am doing it.
Code:
<some code>
print "Enter Total disk space";
$tot = <STDIN>;
convert($tot);
[code]...
how do i pass the value of conv[0] after conversion back to $tot or $use such that they contain only value which is in GB?
I really would like Perl Qt4 bindings. The best I could find is this:[URL]The problem is that the sources would not compile, and the RPMs are for 32-bit machines.Is there really no such thing as good Perl Qt4 bindings?
View 8 Replies View RelatedI am a newbie on linux and just searching everything about perl scripting and modules nearly 3-4 days. I need a perl script but one of not easy to find on searching google. Okay now I need a perl script which create or recreate (edit) id3 tags (artist, comment, album, year, cover) of mp3 files stored on my linux centos server. I installed MP3::Tag version 1.13 pearl module to my server. I Searched tutorials about how to use it, finally I get through reading id3 tag of mp3 file but not achieve to modify it or create a new id3tag.
These are the details:
I have a mp3 file called 1.mp3 this script will process that '1.mp3' file read its id3tag if there is one, than modify or create id3tag for it by my fix artist name for example:
'1.mp3' files id3 tag details are like this
Artist: Dj xx
Year:2010
Title:yyyyy
Comment:eerwer
Cover: x.jpg
Now via this perl script which uses MP3::TAG I will change it's
artist as YYY
Title:ttt
Comment:cool
Cover:t.jpg
these are gonna be my fixed values. I mean all '1.mp3' file will have same artist based on script value.
The reason of this script is I will share Dj podcasts on my server and Dj's would have upload their mp3's which has got different id3 tags and cover pics. etc. I want to create more organized podcasts of them by the way I would trigger this perl script via Cronjob.
As some of you know that I am new to this forum. I have another problem that I got stuck on. I have this file called "Fib.rbb" and my instructor told us to write an interpreter program by using Fib.rbb.
"You are to write an interpreter in Perl for Rongs Basic Basic (RBB) as explained in class. The BNF description for RBB and a test file called Fib.rbb are part of the RBB.zip file which is available in the Course Documents folder on blackboard. If you call your interpreter myIntp.pl, you would execute the program via perl myIntp.pl Fib.rbb
Code: Print "A few Fibonacci numbers:"
Just installed Fedora 14. I wanted to try "Hello World" with perl. But where is it?
Code: [user]@user bin]$ ls
Im somewhat new at perl and was wondering if there was a way to run a perl script or tool made from perl, from a USB pen that would work both on Linux and on Windows?
View 1 Replies View RelatedI writed my home.html page in /var/www with following form:
Quote:
<form action="/cgi-bin/login.cgi" method="get" class="form-font">
<label>Already you registered?</label><br/><hr/><br/>
<fieldset><br/>
<legend>Insert your account</legend>
Email: <input type="text" name="email"/><br/><br/>
[Code].....
I'm the server guy which is why I don't know this, but were staging a new webserver and we use some custom perl scripts and as were moving the site over for testing, apache is blowing a perl error;Can't locate web.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/mcp/htdocs/cgi-bin/newgraph.gif line 11.,Now I can copy that file local, but there are a bunch of things, so the question is how do you globally add a folder to the perl search path
View 1 Replies View RelatedI have a debian lenny machine that I am trying to add mod_perl to and use apache asp on. I have had a range of failures on it. Is ther a way I can build apache2 with mod_perl in it? Instead of separate. Apache2 is built with some modules built in by default, how can I make mod_perl one of them?
View 1 Replies View RelatedI would like to ask opinion from perl experts.
I want to compare 2 files and show the differences in a text file.
For example, if i open File A an B in notepad
File A:
File B:
Quote:
line3 is missing in File B
So if I did a File compare (line by line), the differences will be in line3, line4, line5, line 6.
But I dont want it to be like that.
I want it to be like this
Quote:
Can Text:: Diff able to perform the work.
Using given program , i am able to print current date but is is possible to print last n no. of date. For example i want to print last three date staring from today. so o/p should be like
2010-06-02
2010-06-01
2010-05-31
Code:
my $myTimeStamp = "";
sub _timestamp
{
[Code]...
How do I download a file to a specified location on disk in Perl?I tried doing a few web searches but suprisingly couldn't find anything.
View 4 Replies View RelatedI writed Quote:
#!/usr/bin/perl -w
use Error qw(:try);
try {
[code]....