Forums | Articles | References
Welcome guest.  | Register | Login | Recent posts
Baby Shower Favors :: games blog directory
International Calling Cards

Need Help

Need Help

erm...im a student n im thinking of creating a software where it can scan saved web pages and look for a certain quotation that we key in so that the software will tell us which web page did we took the quotation from... ( :-D honestly this is a problem i encounter right now while righting an essay )

so the problem is that im a newb, i am not to literate in programming but im thinking of creating the software based on flash or html (if it suite its purpose for the software and this is the problem)...so im running out of idea on which sofware to used to build this king of software and how???

Rolling Eyes so hopefully somebody can help me out...please pm or mail me


Re: Need Help

Flash is used for multimedia, HTML as markup. You'll want to do things in PHP and Python, python, in my experience being the easier of the two to learn. There are others, but yea, those are the two most common. :-)

__________________

wombat@wombat:~> apt-get moo

If the area around my avatar is dark gray chances are you are using MS Internet Explorer, one of the few browsers that do not have full PNG-24 support. Considered trying [url=http://bro

Re: Need Help

If you're on linux, open a terminal, cd to the directory where the saved pages are, and type

grep 'this is a quote' *

be sure to put a \ before any ' in the quote itself

grep 'Schroedinger\'s cat' *

if the pages are in subdirectories of the directory, do this:

grep 'Schroedinger\'s cat' `find .`

note: those are backquotes (under the ~)

You can probably also do this on MacOS X
If you're on windows, get a better operating system.

Re: Need Help

Welcome aboard Cupati.

I believe the solution Taco gave you is what you need which means you don't actually have to write new software for that. Tools are already there (terminal, grep, find).

You might make it a script though.

If you would still want to challenge yourself and make a program that does this I suggest python. I've only learned some basics and am yet to practice it, but for what I saw it would be pretty easy to do this in python after some reading and learning about it.

Thanks
Daniel

Re: Need Help

Yeah, rewriting grep in python is a nice first programming project. I believe it can be done in one line :goof: .

EDIT: ok, two lines, one to import some modules, and one to do the actual work.

Re: Need Help

I couldn't resist. This python program does exactly the same as the grep unix command.

import sys, re
for c in [(a,b) for a in sys.argv[2:]  for b in open(a,'r').readlines() if re.search(sys.argv[1],b)]: print "%s: %s" % c,

That's all. Of course, this is very advanced black magic. You can do the same thing in many more lines, and much more readable lines too Laughing . I don't mean to scare you away from python, I'm just showing how powerful it is once you have mastered it.

Re: Need Help

The thing I love about Python (and don't take my words on this - my programming knowledge is limited if at all) is that you can do more in less lines of code. I've looked at a C script and then at a Python script - they both do the same thing, yet Python had over 40 less lines and the entire script was roughly 200 long.

I suppose, of course for kernels and such C or a variant of it would be much more applicable, since it's faster to execute. I can't see myself coding the kernel or similar so for my small tasks - python will do.

In fact I used python just recently to work out table of values for a reciprocal quadratic function (mathematics assignment). I think I got the highest degree of accuracy, and I saved the most time - one script - all I need to do is change the formula and voila. Just imagine using a calculator for that!

__________________

wombat@wombat:~> apt-get moo

If the area around my avatar is dark gray chances are you are using MS Internet Explorer, one of the few browsers that do not have full PNG-24 support. Considered trying [url=http://bro

Re: Need Help
Quote:

Pascal wrote:
Just imagine using a calculator for that!

Actually, I think my programmable calculator is quite nice. I even wrote some games on it.

:geeky: <- there's no such smiley is there?

Re: Need Help

Yes, I've heard good things about python among which is that it is also easy to learn which is logical for a language that can write a functional program in so little lines of code. That is why I decided for it to be the first language I am gonna learn, and I did learn some basics although I stopped for a few weeks now due to being occupied with other stuff. However, catching up and practising with python shouldn't be a problem and I'll probably be quick at that once I continue learning. After python I think I will go for PHP because that is something I need for the web (besides html and CSS which I should also learn to a more advanced level).

Quote:

tbuitenh wrote:
:geeky: <- there's no such smiley is there?

Well, we better get one then. I'll try to find a suitable one and put it in under that code. :yes:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You may quote other posts using [quote] tags.
  • You can use BBCode tags in the text. URLs will automatically be converted to links.
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options

Smileys
:sick::jawdrop:8):?:O:P}:):D:(;):):sheep::calm::drool::eureka::geek::boggle::hothead::huh::innocent::irk::nose::notsure::ooh::scared::purplex::rain::rassbury::snide::sob::upsidown::urgh::whoa::whyme::sillywink::worry::pinkgrin::pinkhi::sorry::sweatdrop::woohoo::grin::smile::sad::eek::shock::-?:cool::lol::mad::razz::oops::cry::evil::badgrin::roll::wink::!::?::idea::arrow::neutral::doubt:
Syndicate content

Copyright © 2004 - 2008 Libervis Network - Some Rights Reserved :: Advertise :: Privacy Policy :: Contact