Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

some doubt about urlyBird

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello , I have some doubts about the assignament UrlYbird:

1-My assignaent said the following:

--------------------------------------------
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record
--------------------------------------------

I understand that the file is composite the following form:

name location .....[0 or 1]
this mean that at the end to the records always are a byte that say if the record is valid or not valid , when I read the records , to the end the byte not is read.

2-In the interface some methods throws RecordNotFoundException this exception is throws when not find a record indicate ???

3-when I do a find in a remote mode is necessary lock a records ???

4-the method SecurityException when is throw???

Thanks in advance for your help .
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Irene,

Originally posted by Irene Rodriguez:
Hello , I have some doubts about the assignament UrlYbird:

1-My assignaent said the following:

--------------------------------------------
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record
--------------------------------------------

I understand that the file is composite the following form:

name location .....[0 or 1]
this mean that at the end to the records always are a byte that say if the record is valid or not valid , when I read the records , to the end the byte not is read.



You have only quoted the first sentence following "Repeat to end of file:" In the instructions I have, they state:

From the instructions:
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record
Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information

So, for my instructions I have a different order to what you have understood from your instructions. Namely, my instructions are telling me that I should have: [0 or 1]name location .....

As always, check your own instructions - it is possible that your understanding is correct, as there are different instructions out there.

Originally posted by Irene Rodriguez:
2-In the interface some methods throws RecordNotFoundException this exception is throws when not find a record indicate ???



Yes. (Is this a yes/no question? )

I know English is not your native language, and I regret that I dont speak more languages. Reading your question above, I think you are asking "In the interface some methods throws RecordNotFoundException - is this exception thrown to indicate when a record is not found?"

Originally posted by Irene Rodriguez:
3-when I do a find in a remote mode is necessary lock a records ???



No. The only time it is necessary to lock a record is when you are modifying it in some way.

When you are reading a record, or performing a find operation, you only need to consider the state of the record at the time you read it. If it gets modified 1 second after you read it - too bad.

Originally posted by Irene Rodriguez:
4-the method SecurityException when is throw???



This is dependant on what your instructions tell you, but typically this is thrown when a client tries to do modify or unlock a record when they do not own the lock.

This is similar to reserving a seat at the cinema. If all seats are reserved, and somebody tries to sit in a seat just because there is nobody there, then management will call security.

Regards, Andrew
 
Gerenne Vives
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thanks , I understand , my intruction say the same that you said me , refrences at byte deleted , this mean that the byte deleted is the followinf form:

[0]-Palace Smallvile....
[1] Palace Sa......

this is correct??
 
Andrew Monkhouse
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Irene,

Yes, that is correct.

Regards, Andrew
 
Gerenne Vives
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok , thanks!!!
 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic