Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UrlyBird questions.

 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where do you find the version information about the assignment?

What is the magic number(257) all about? The specification says "Identifies this as a data file ".

Thanks in advance,

Muthaiah.
 
Wei-ju Wu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The version information of my assignment was in the title (1.1.3)

It is what the specification says: an identifier of the .db file (simply a fixed value). Depending if you find this flag you could decide whether this is a valid .db file.

The specification also says at what position within the file you will find this magic cookie.
[ May 24, 2005: Message edited by: Wei-ju Wu ]
 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Wei-ju Wu.

That means I got to have the magic number speficfied in the properties file and check that aginst the one in the file is it?

Muthaiah
 
Wei-ju Wu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can simply specify it as a symbolic constant within your code, since you can not assume that the properties file exists on application start (at least this holds true for suncertify.properties in my assignment).
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11945
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Muthaiah,

Just to confirm a theory currently in this forum, is your assignment version "1.0.1"?

This would equate to the hex representation of your magic cookie (257).

Regards, Andrew
 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got the version 1.2.1
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My version was 2.3.2 and my cookie was 0x0202 (my database file was called db-2x2.db). The middle number is apparently left out when determining the cookie number and database file name.

Frans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic