Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Uniquely identifying each & every html template

Reply
Thread Tools

Uniquely identifying each & every html template

 
 
alex23
Guest
Posts: n/a
 
      01-21-2013
On Jan 21, 10:39*pm, Oscar Benjamin <(E-Mail Removed)>
wrote:
> This is a very old problem (still unsolved I believe):http://en.wikipedia..org/wiki/Ship_of_Theseus


+1 internets for referencing my most favourite thought experiment
ever

 
Reply With Quote
 
 
 
 
alex23
Guest
Posts: n/a
 
      01-21-2013
On Jan 21, 7:19*pm, Ferrous Cranus <(E-Mail Removed)> wrote:
> Renames and *moves are performed, either by shell access or either by cPanel access by website owners.


These websites owners, are you charging them for this "service" you
provide?

You seriously need to read up on some fundamentals of how the web +
apache + Python works. As it stands, you're asking us to do your job
for you, and it's getting TEDIOUS with you TELLING us how WRONG we are.
 
Reply With Quote
 
 
 
 
Ferrous Cranus
Guest
Posts: n/a
 
      01-21-2013
Τη Δευτ*ρα, 21 Ιανουαρίου 2013 2:47:54 μ.μ. UTC+2, ο χρήστης Joel Goldstick *γραψε:

> This is trolling Ferrous.* you are a troll.* Go away


Just because you cannot answer my question that doesn't make me a troll you know.
 
Reply With Quote
 
Ferrous Cranus
Guest
Posts: n/a
 
      01-21-2013
Τη Δευτ*ρα, 21 Ιανουαρίου 2013 2:47:54 μ.μ. UTC+2, ο χρήστης Joel Goldstick *γραψε:

> This is trolling Ferrous.* you are a troll.* Go away


Just because you cannot answer my question that doesn't make me a troll you know.
 
Reply With Quote
 
Ferrous Cranus
Guest
Posts: n/a
 
      01-21-2013
Τη Δευτ*ρα, 21 Ιανουαρίου 2013 2:56:24 μ.μ. UTC+2, ο χρήστης alex23 *γραψε:
> On Jan 21, 7:19*pm, Ferrous Cranus <(E-Mail Removed)> wrote:
>
> > Renames and *moves are performed, either by shell access or eitherby cPanel access by website owners.

>
>
>
> These websites owners, are you charging them for this "service" you
>
> provide?
>
>
>
> You seriously need to read up on some fundamentals of how the web +
>
> apache + Python works. As it stands, you're asking us to do your job
>
> for you, and it's getting TEDIOUS with you TELLING us how WRONG we are.


Dude, i host 4 sites of friend fo mine who want the same type of counter like i use iun my website.

ALL, iam asking for is a way to make this work.

 
Reply With Quote
 
Ferrous Cranus
Guest
Posts: n/a
 
      01-21-2013
Τη Δευτ*ρα, 21 Ιανουαρίου 2013 9:20:15 π.μ. UTC+2, ο χρήστης Chris Angelico *γραψε:
> On Mon, Jan 21, 2013 at 6:08 PM, Ferrous Cranus <(E-Mail Removed)> wrote:
>
> > An .html page must retain its database counter value even if its:

>
> >

>
> > (renamed && moved && contents altered)

>
>
>
> Then you either need to tag them in some external way, or have some
>
> kind of tracking operation - for instance, if you require that all
>
> renames/moves be done through a script, that script can update its
>
> pointer. Otherwise, you need magic, and lots of it.
>
>
>
> ChrisA



Perhaps we should look into on how's the OS handles the file to get an ideaon how its done?
 
Reply With Quote
 
Ferrous Cranus
Guest
Posts: n/a
 
      01-21-2013
Τη Δευτ*ρα, 21 Ιανουαρίου 2013 9:20:15 π.μ. UTC+2, ο χρήστης Chris Angelico *γραψε:
> On Mon, Jan 21, 2013 at 6:08 PM, Ferrous Cranus <(E-Mail Removed)> wrote:
>
> > An .html page must retain its database counter value even if its:

>
> >

>
> > (renamed && moved && contents altered)

>
>
>
> Then you either need to tag them in some external way, or have some
>
> kind of tracking operation - for instance, if you require that all
>
> renames/moves be done through a script, that script can update its
>
> pointer. Otherwise, you need magic, and lots of it.
>
>
>
> ChrisA



Perhaps we should look into on how's the OS handles the file to get an ideaon how its done?
 
Reply With Quote
 
Piet van Oostrum
Guest
Posts: n/a
 
      01-21-2013
Ferrous Cranus <(E-Mail Removed)> writes:

> This python script acts upon websites other people use and every html
> templates has been written by different methods(notepad++,
> dreamweaver, joomla).
>
> Renames and moves are performed, either by shell access or either by
> cPanel access by website owners.
>
> That being said i have no control on HOW and WHEN users alter their html pages.


Under these circumstances the only way to solve it is to put an
identification *inside* the file and make sure it will not be changed.
It could for example be some invisible piece of HTML, or an attribute to
some tag. If that can't be done the problem cannot be solved and it
makes no sense keeping asking the same question over and over again.
--
Piet van Oostrum <(E-Mail Removed)>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
 
Reply With Quote
 
Dave Angel
Guest
Posts: n/a
 
      01-21-2013
On 01/21/2013 07:06 AM, Ferrous Cranus wrote:
>
>> <snip>
>>
>>
>> Seriously, you're asking for something that's beyond the power of
>>
>> humans or computers. You want to identify that something's the same
>>
>> file, without tracking the change or having any identifiable tag.
>>
>> That's a fundamentally impossible task.

>
> No, it is difficult but not impossible.
> It just cannot be done by tagging the file by:
>
> 1. filename
> 2. filepath
> 3. hash (math algorithm producing a string based on the file's contents)
>
> We need another way to identify the file WITHOUT using the above attributes.
>


Repeating the same impossible scenario won't solve it. You need to find
some other way to recognize the file. If you can't count on either
name, location, or content, you can't do it.

Try solving the problem by hand. If you examine the files, and a
particular one has both changed names and content, how are you going to
decide that it's the "same" one? Define "same" in a way that you could
do it by hand, and you're halfway towards a programming solution.

Maybe it'd be obvious from an analogy. Suppose you're HR for a company
with 100 employees, and a strange policy of putting paychecks under the
wipers of the employees' windshields. All the employee cars are kept
totally clean of personal belongings, with no registration or license
plates. The lot has no reserved parking places, so every car has a
random location.

For a while, you just memorize the make/model/color of each car, and
everything's fine. But one day several of the employees buy new cars.
How do you then associate each car with each employee?

I've got it - you require each one to keep a numbered parking sticker,
and they move the sticker when they get a new car.

Or, you give everyone a marked, reserved parking place.

Or you require each employee to report any car exchanges to you, so you
can update your records.

If you can solve this one, you can probably solve the other one. Until
then, we have no spec.



--
DaveA
 
Reply With Quote
 
Tom P
Guest
Posts: n/a
 
      01-21-2013
On 01/21/2013 01:39 PM, Oscar Benjamin wrote:
> On 21 January 2013 12:06, Ferrous Cranus <(E-Mail Removed)> wrote:
>> , 21 2013 11:31:24 .. UTC+2, Chris Angelico :
>>>
>>> Seriously, you're asking for something that's beyond the power of
>>> humans or computers. You want to identify that something's the same
>>> file, without tracking the change or having any identifiable tag.
>>>
>>> That's a fundamentally impossible task.

>>
>> No, it is difficult but not impossible.
>> It just cannot be done by tagging the file by:
>>
>> 1. filename
>> 2. filepath
>> 3. hash (math algorithm producing a string based on the file's contents)
>>
>> We need another way to identify the file WITHOUT using the above attributes.

>
> This is a very old problem (still unsolved I believe):
> http://en.wikipedia.org/wiki/Ship_of_Theseus
>
>
> Oscar
>

That wiki article gives a hint to a poosible solution -use a timestamp
to determine which key is valid when.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generated UPDATE statement. could not determine which columns uniquely identify the rows for "Customers" bazzer ASP .Net 8 03-23-2007 08:26 PM
could not determine which columns uniquely identify the rows for ... bazzer ASP .Net 0 04-10-2006 11:09 AM
Semi OT: Uniquely Identifying Substrings for an Elem in a Set: substr, Sets and Complexity Veli-Pekka Ttil Perl Misc 6 08-23-2005 09:10 AM
How do I uniquely identify a control? Alan Silver ASP .Net 6 02-24-2005 06:31 PM
The best way to uniquely identify anonymous visitors muser8@hotmail.com ASP .Net 2 07-26-2004 11:47 PM



Advertisments