wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> suggestions, help, and FAQ >> testing: file attachments
(Message started by: william wu on Aug 21st, 2003, 11:20pm)

Title: testing: file attachments
Post by william wu on Aug 21st, 2003, 11:20pm
black mage attached

Title: Re: testing: file attachments
Post by william wu on Aug 21st, 2003, 11:32pm
(original thread at http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_cs;action=display;num=1051440816;start=0)

You are given an n [times] n grid, and m starting points on that grid, where m [le] n[sup2]. All points on the grid have exactly four neighbors, except for the boundary vertices.

Design an "efficient" algorithm that determines whether there exist m disjoint paths from the starting points to any m different points on the grid boundary. For example, figure (a) below has an escape shown by the bright green paths, but figure (b) does not.

(Quick and dirty summary of the problem: Imagine creatures at the starting points, each wanting to escape from the grid by taking routes which do not intersect. Determine if such a set of routes exists.)



Note: Adapted from an exercise problem in Introduction to Algorithms, by Cormen, Leiserson, Rivest, and Stein.

Title: Re: testing: file attachments
Post by towr on Aug 22nd, 2003, 1:32am
http://www.ocf.berkeley.edu/~wwu/YaBBAttachments/formula.png

hmm, well linking to it obviously works. If you know where the images will be stored you can do it without editing. But you can only do it with one image at a time, so if you want more images in your post you'd need to make a seperate post to upload every image.
Deleting the post also removes the attachment, which makes sense.

Title: Re: testing: file attachments
Post by william wu on Aug 22nd, 2003, 2:28am
2:27 AM 8/22/2003 fix: file attachments follow their threads when the threads are moved

Title: Re: testing: file attachments
Post by william wu on Aug 22nd, 2003, 3:10pm
retesting attachment behavior after threads are moved; looks like only the first post gets saved

edit: yeah, it's buggy

Title: Re: testing: file attachments
Post by Icarus on Sep 3rd, 2003, 6:39pm
Can the "add attachments" bit be included in the "modify post" screen? Currently it is only availble for the original post, not modifications. I was trying to add this pic to Puzzle with a broken link in the hard forum, but couldn't figure out a way to do it without making another post (such as this one! ;))

Which brings up another bug. When I first posted this, I discovered I had forgotten to crop the image, so I had a huge white field with the image below in the corner. So I go back and crop my picture. Remove the post with the huge empty one, and repost, attaching the new cropped form. Nope. Back came the old uncropped pic. I finally renamed the cropped pic, and attached it.

As far as I can tell, if your attacher already finds a pic with same name in memory, it attaches the old pic instead of the new. Removing a post with attachment does not delete the attachment from storage.

Three suggestions:
(1) When a post is removed, remove the attachment too. Otherwise your memory will be filled with abandoned attachments (such as "Ballinholepic.PNG").
(2) Allow the adding and removing of attachments in the "Modify screen". Again, with an attachment is removed, it should also be deleted from storage.
(3) If a new attachment has the same name as a current file, change the name of the attachment and use it, not the current file.

Title: Re: testing: file attachments
Post by towr on Sep 3rd, 2003, 10:55pm
(1) is allready the case afaik. Are you sure it wasn't you're browser cache that showed the wrong image?

Title: Re: testing: file attachments
Post by Icarus on Sep 4th, 2003, 3:38pm
It must of been. I'm not too familiar with that sort of thing.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board