taking a stab in the dark here but I have a project and I need help, we are basically creating a forum to talk about books, where users say book a must be read before book b, book c follows book b.
we are using html/sql/css/php to code this, with no framwork(no cakePHP).
this is the part I don’t understand how to do and would appreciate if someone could tell me what to google or just point me in the right direction.
when a user searches a book, lets say ‘jurassic park: the lost world’ - a graph comes up showing a picture of the book and then a arrow would be pointing towards the first jurassic park book.
It’s rather hard to give advice not knowing details of your project but check this out
Simple html syntax to define and display images on a webpage.
To show the arrow you need to create another image which is an arrow (transparent background) and then call it
Hope this helped
Sounds like you are fairly new. I highly recommend you get started on this site: http://stackoverflow.com/ Be warned though. If you ask a question, make sure you’ve taken the time to detail what you’ve tried, and in great detail what you are trying to do. Software development is too complex to be able to give a good answer to a vague question.
[quote]AnabolicMelvin wrote:
It’s rather hard to give advice not knowing details of your project but check this out
Simple html syntax to define and display images on a webpage.
To show the arrow you need to create another image which is an arrow (transparent background) and then call it
Hope this helped [/quote]
this is the exact wording of the question and ill will include figure 2
allow the user to specify a book and display a graph showing the specified book
and its respective book links up to a specified distance (number of booklinks) from the
book. For example, if the book title is â??Machine Learningâ?? and distance is two, show a
graph with the book as the origin and then booklinks from this book to other books, and
then booklinks from these linked books to others, there are no two books with more than
two booklinks apart â?? the booklinks graph shown in Figure 2 could be one such example.
I have no idea what you’re asking but storing graphs in a database is no trivial task. Well, storing isn’t so bad but trying to run Djikstra’s or some other procedure based algorithm in a set based database is the suck.
If you have that figured out, the rest should be cake.
I’m assuming it’s the general approach that you have a problem with and not the coding.
If you have small number of books in your library, you can create the graphs for each book beforehand and simply retrieve them when the name of that book is searched; but that’s not fun and also very inefficient and obv stupid when the number of books grow.
Look at this from an image processing POV.
For every book that you search, there are variable number of related books that need to be included in your graph, so for every book, a unique graph needs to be generated. A graph can be created every time you search a specific book, which means a dynamic algorithm allowing future updates to the library (good); or the graph can be generated once and stored in a database and retrieved when the name of that book is searched again; it’ll be faster but requires more memory and it’s semi-dynamic (can’t allow updates unless you separately take care of that).
To generate a graph for a specific book, you need an empty canvas (properly sized), the images of the specific book and all the related books (properly sized), arrows, and the texts besides those arrows. The images will be placed on the canvas the way you want them. Now the arrows need to be generated from a specific bundle of pixels to another specific bundle of pixels (size of bundle depends on weight of your arrow lines) (the eqtn of a straight line will allow you to set the color of the pixels belonging to that eqtn and eventually making the full arrow to appear)
It’s not a simple algorithm but I don’t know any other way to generate unique graphs. That’s why you don’t see this used anywhere that often.
[quote]AnabolicMelvin wrote:
I’m assuming it’s the general approach that you have a problem with and not the coding.
If you have small number of books in your library, you can create the graphs for each book beforehand and simply retrieve them when the name of that book is searched; but that’s not fun and also very inefficient and obv stupid when the number of books grow.
Look at this from an image processing POV.
For every book that you search, there are variable number of related books that need to be included in your graph, so for every book, a unique graph needs to be generated. A graph can be created every time you search a specific book, which means a dynamic algorithm allowing future updates to the library (good); or the graph can be generated once and stored in a database and retrieved when the name of that book is searched again; it’ll be faster but requires more memory and it’s semi-dynamic (can’t allow updates unless you separately take care of that).
To generate a graph for a specific book, you need an empty canvas (properly sized), the images of the specific book and all the related books (properly sized), arrows, and the texts besides those arrows. The images will be placed on the canvas the way you want them. Now the arrows need to be generated from a specific bundle of pixels to another specific bundle of pixels (size of bundle depends on weight of your arrow lines) (the eqtn of a straight line will allow you to set the color of the pixels belonging to that eqtn and eventually making the full arrow to appear)
It’s not a simple algorithm but I don’t know any other way to generate unique graphs. That’s why you don’t see this used anywhere that often. [/quote]
This is the way I envisaged it and I believe it to be stupid, they’re only testing the client side so I’ll speak to my group and ask if they want to just use photoshopp for a few books
this is an update, we just pretty much bring up a book then it lists whats a prerequisite to read it and what you should read after it. boom less stress.