190 Posted Topics
Hello everyone. I need to write a Bash script to remove blocks of text from a given file. The idea is, the text to be removed will be marked by appearing between certain delimiter characters i.e. [code] Here's some text and ~this bit gets removed~, where tilda is the delimiter. … | |
Hello everyone. I'm still working on that forum system I mentioned a bit ago (perlBB). Hopefully it'll be ready for Christmas :p . However, I ran into a strange problem while I was re-writing parts the two functions below. [code=perl]sub enter_post { my(@field, $input, $offset1, $offset2, $n, $name, $field_length, $flag_guest, … | |
Hello everyone. I've got the stuff working I talked about here ( [url]http://www.daniweb.com/techtalkforums/thread68292.html[/url] ). Now, I am working on this problem; I need to check if a cookie is present on the client machine. It's presense will indicate the user is logged in. If it is there I need to … | |
Hello everyone. Is it allowed to have a "use" statement inside an eval that is compiled separately to the enclosing program (i.e. eval EXPR, not eval BLOCK). The reason I want to do this is, I have modules of code that I don't want to be compiled every time my … | |
Hello everyone. I am currently working on the HTML / Javascript front end of a web forum system (perlBB). I have a couple of questions that would I would like to ask. 1. Is the way to include an external javascript file in a page like this? [code=HTML] <head> <link … | |
Re: From what you say, it sounds like your stored proceedure is a server side script that returns some stored information about a user's preferences when the user logs in. If this is so I would advise the following. Get the stored proceedure to serve a page with a script in … | |
I was wondering whether anyone else has experienced this. When a script I am working on got above a certain size, the line numbers quoted in the compile and run time error messages started to be inaccurate. The line numbers now seem to always be before where the error actually … ![]() | |
Hello everyone. If you live in the UK and you watch the news this will not need explaining to you. But....that rubbish reality TV show Big Brother on C4 has caused a diplomatic crisis. Why? Jade Goody has been bullying the **** out of Bollywood star Shilpa Shetty (using the … | |
Re: I think what might be wrong here is that Perl treats both single and double quotes as string terminators, whether you started the string with a single or double quote. My advice is try escaping the single quotes in your string with back slashes ( \ ). So the line … | |
Hello everyone. I decided to try out XAMPP ( [url]http://www.apachefriends.org/en/xampp[/url] ), which contains a pre configured distribution of Apache 2.2.3. My intention is to use it for some local testing of a web application that uses Perl scripts. I got Apache running easily enough and it runs the sample Perl … | |
Re: [QUOTE=MattEvans;302170]No. Why don't [B]you[/B] plan out how to do your homework problem, work out the answer, and reply [B]me [/B]with the solution; Now.[/QUOTE] :lol: The solution may lie in the field of "scale free networks" rather than Chinese postmen. If you have a specific question about a coding problem there … | |
Re: If someone does pay over the odds to one of these so called domain squatters, its their own fault. A company having a good sounding address for their website can't make up for good business management. Also, some domain suffixes have restrictions imposed on them by the DNS database maintainer, … | |
Hello everyone. I'm working on getting threads of replies to work in my forum system. I'm using this function: [code=perl] sub read_fields { my($offset1, $offset2, $offset3, $offset4, $this_offset, $result, $n, $dbase, $data, @field_name, @name_length, $num_fields, $m, $check, $check2, $primary_key, $action, @passed_array); ($offset1, $offset2, $result, $dbase, $num_fields, $m, $action, $primary_key, @passed_array) … | |
![]() | Re: You might be able to do this using the IPC tools built into Perl. This page describes how to open a child process and connect pipes to it's standard input and output: [url]http://perldoc.perl.org/IPC/Open2.html[/url] You can find more in depth information on interprocess communication in Perl here: [url]http://perldoc.perl.org/perlipc.html[/url] Steven. ![]() |
Re: What, what? Am I missing somthing here? :confused: . Maybe you're talking about someone with a similar name. Steven. | |
Hello everyone. I read a couple of tutorials on x86 assembly a while ago. It was made clear in these that certain instructions need to be included at the end of a program to make it close properly. However, there was some inconsistency about how a program should be terminated. … | |
Re: Now, take a look at an alternative view point: [url]http://www.pbm.com/~lindahl/real.programmers.html[/url] Steven. | |
Re: [QUOTE=jbennet;283222]i know its wierd but my cousin (shes female) always makes herself male when shes setting up profiles for forums as it means she gets chatted up less by desperate guys[/QUOTE] I've believed I was desperate at times, but I see now I wasn't that bad on the scale of … | |
Hello everyone. I was just wondering if it is OK to do this: [code=perl] if ($beer == $wine) {# Some code} elsif ($beer == $vodka) {} else {die("Oh dear! Neither condition satisfied!")} [/code] i.e. have an empty block attached to an if, elsif or else. It might sound like an … | |
Re: Hello. Here is me just after graduating from Surrey. It's about a year old. Steven. EDIT: oops....Scaling this image down has made my eyes look allweird and squinty. | |
Re: There are some applications whose developers claim can (in some cases) retrieve a C - like representation of the original source from a .exe file. It is generally believed that reverse compilation of 3rd level languages is difficult bacause there may not always be a one to one mapping between … | |
Hello everyone. Has anyone heard of Sigur Ros (the band from Iceland)? I got their last album for Christmas and its A - mazing :p . They even invented their own language to sing on the songs. If you don't have a clue who I'm talking about, think of the … | |
Re: I found this: [url]http://www.mushypea.co.uk/images/mushypea.gif[/url] Interestingly, I've just registered a domain in my name with a very similar URL. Be assured I'll be back to SPAM the Lounge with info about it soon (in a nice way :p ). Steven. | |
Hello everyone. I always run Perl scripts on a web server with [code] #!/usr/bin/perl -T [/code] at the top (i.e. taint mode on). I try to do the same when testing scripts on my local machine and this often works fine. But somtimes (when running from the command line) I … | |
Hello everyone. I had an idea for an encryption system based on irrational numbers a while ago and wrote down a rough specification. It is basically like this: 1. Decide on an irrational number to define the encryption, e.g. pie, e or an irrational n root of a number. It … | |
Re: Well, I saw the new year in in Bristol with a primal scream. I was in a pub garden with my sister (and loads of others, obviously) and some guy we knew started screaming "aaarrrhhh....". Soon others joined in and it built up until it was like "AAAARRRRHHHH!?!?...." :p :p … | |
Hello everyone. I read ~S.O.S.~'s signature today and it reminded me of somthing. The essence of it was a claim that you can't doubt logic or perception. About a year ago I had some experiences that brought logic and perception into direct conflict. These experiences might be called "daylight hallucinations" … | |
Re: Its a sad and perhaps little known story that two of the greatest mathematicians of the last century died in tragic circumstances. Alan Turing (as the "homepage" states) killed himself with a cyanide laced apple. This is perhaps because, having made ample use of his code breaking work during the … | |
Re: In Sinclair Spectrum 64 K BASIC: [code]for n = 1 to 10 print n next n [/code] | |
Re: I love the way Bruce Willis always starts off with a clean white T-shirt in those films, then it gradually gets more torn and covered in blood and dirt as the film progresses. Correct me if I'm wrong, but haven't there already been four Die Hard films (Die Hard with … | |
Hello everyone. I've been working on a web application (written in Perl) called perlBB for about 11 weeks ( [url]http://sourceforge.net/projects/perlbb[/url] ). I'm getting close to finishing an early version. However, suitable testing methods have become a bit of an "issue" for me on this project. So far I've been testing … | |
Re: [QUOTE=Ancient Dragon;286879]I suspect there are billions of planets in the universe that have water. We earthlins are probably not alone.[/QUOTE] I suspect you are correct. But consider this; if the universe is spatially infinite and (on large distance scales) of uniform density, intuition suggests that there are an infinite number … | |
Hello everyone. If you're a regular Perl user you might already know this; the developers of Perl 6 are using a prototype version of the Perl 6 interpreter written in Haskell to do various "proof of principle" testing. It's called Pugs (maybe a pun on the Haskell interpreter Hugs). However, … | |
Hello everyone. I am getting close to completing an early version of my open source forum system perlBB ([url]http://sourceforge.net/projects/perlbb)[/url]. I was wondering if someone could give me some advice about distribution of code between modules. In the scenario that the perl scripts in my system are run non - persistantly … | |
Hello everyone. Does anyone know why Unix developers seem to have an obsession with the words foo and bar? Anyone who has read many Unix manual pages or the official Perl documentation will know what I mean. They appear as example variable or parameter names all over the place! Maybe … | |
Hello everyone. I'm sure a few people around here have played a few computer games. But how many cheats do you know? To set the ball rolling I'll list my favourite ever cheat first: Game: Star Wars Knights of the Old Republic (Xbox) What: Turn Zalbar the Wookie into a … | |
Re: Hmmm, I decided to leave Daniweb once. But look at me now, still posting away :p . Guess I'll be staying then. So, I don't think you'll be getting away that easily Justine :) . Hope to hear from you soon. Steven. | |
Re: You don't need to deal with ports or FTP to do this. What you require can be done with a form on your website and a Perl script to process the form on the server. There may be open source scripts that can fill your requirements already out there (try … | |
Hello everyone. Which of these do you prefer? As people who know me would agree, I'm a bit of a depressive ******* somtimes :sad: . So, obviously I'm voting for the Chronicles (which for the uninitiated, is one of the darkest fantasy series' ever written). I do really like the … | |
Hello everyone. I was writing somthing in C++ today and a little "issue" occured to me. How can you avoid the possibility of a buffer overrun when reading from STDIN into a character array? In this simple example [code]#include <iostream> using namespace std; int main () { char *some_text = … | |
Re: Please post some of the code you have be unable to compile and the compile errors you have been getting. Then someone might be able to help. Steven. | |
Re: Tutorials are good for learning the basics of a language. However, if you want a reference resource where you can look up a manual page on any keyword (with some tutorials thrown in as well) try out [url]http://perldoc.perl.org[/url] They've got a particularly good tutorial on regular expressions here [url]http://perldoc.perl.org/perlretut.html[/url] I … | |
Hello everyone. I would imagine a fair few people who hang around in this forum have done or are doing computing related degrees. I was just wondering, do computer science / related degrees these days contain material on upcoming new computing technologies like quantum computing and biological computing? You can … | |
Re: Insomnia by Faithless: [code] I only smoke weed when I need to And I need to get some rest yo Where's the sense? And I confess I burned a hole in the matress, YES, YES It was me I feel guilty And at the count of three I pull back … | |
Hello everyone. I've been using my parents computer for a while to do various usefull stuff. It has Windows 98 SE and has been on broadband with no virus scanner or firewall for months. Before that it was on dial up for years with no protection. Thankfully it's still going … | |
Re: To make a Perl script display a page you have already created, do this: [code=perl] open(file1, "thanks.html"); @data = <file1>; close(file1); $page = join("", @data); print "Content-type: text/html\n\n$page"; [/code] Just make sure your thanks page has a link for the user to get back to the rest of your site. … | |
Hello everyone. I recently came accross the concept of Turing completeness (in languages). I was wondering, is there a general method for determining if a language is Turing complete? Or is it one of those intuitive things where you just have to look at it for a while and go … | |
Hello everyone. I've run into a problem with regular expressions; the extraction "variables" ($1, $2, $3 etc.) are read only and scoped to the current block. If you need to do two regex extraction operations in the same block, is there a way to reset the ($1, $2, $3 etc.) … | |
Re: I did Physics at university and the course included some numerical modelling work. Guess what language we were given to learn first....Fortran. It has some neat features, like having loads of fancy mathematical functions built into the core of the language. Since learning about other languages I've realised it's not … | |
Hello everyone. I've tried several times to use associative arrays in my Perl scripts, but each time I have got syntax errors I can't understand. Based on the tutorials I've read I have tried to do things like this: [code=perl]sub test_function { my($key, %table); %table = ('word1', 'Perl', 'word2', 'is', … |
The End.