2009-03-29

Fox Pro - Cateva comenzi

O comanda FoxPro utila este aceea care permite filtrarea inregistrarilor dintr-o tabela:
SET FILTER TO [lExpression] [IN nWorkArea | cTableAlias]
de exemplu SET FILTER TO info=123 face accesibile numai inregistrarile pentru care info este egal cu 123. Pentru a elimina un filtru se foloseste comanda fara expresia lExpression.

O alta comanda interesanta este aceea care permite gasirea primei inregistrari pentru care criteriul de cautare este indeplinit:
LOCATE [FOR lExpression1] [Scope] [WHILE lExpression2] [NOOPTIMIZE]
Pentru Scope se poate folosi: ALL, NEXT nRecords, RECORD nRecordNumber si REST.
Pentru a gasi si celelalte inregistrari se foloseste constructia:
DO WHILE FOUND()
   <comenzi>
  CONTINUE
ENDDO
Functia FOUND([nWorkArea | cTableAlias]) determina daca cea mai recenta comanda CONTINUE, FIND, LOCATE sau SEEK a avut succes.
Comanda CONTINUE este folosita dupa comanda LOCATE pentru a gasi urmatoarea inregistrare care indeplineste criteriul de cautare definit de catre LOCATE.

2009-03-17

Problema din Biletul 11

În acest post am menţionat despre o problemă în FoxPro. La punctul e) a fost găsită şi o altă soluţie care a fost reîmpachetată în arhiva foxpro_11b.zip.

2009-03-10

Language issue

Before Unicode there were code pages and fonts like Arial or Times New Roman reflected this like scripts as Arabic, Baltic, Central European, Cyrillic, Greek, Hebrew, Turkish, Vietnamese or Western. I usually have to switch to Central European script in video players in order to see the subtitle in my native language, Romanian. I have recently found out that BSPlayer and JetAudio are unable to make that switch and the subtitle looks awful in Western script. In fact the diacritics are shown wrong, the rest of text is ok. I have found two solutions to this: To use a font that has only one script (the Central European) or to make some changes in Windows settings to sort this thing out.
First solution for me is to use a font called JetRomanian (see it in the BOX).
Second solution is to follow these steps in Windows XP:
  1. Click Start, then go to Control Panel.
  2. From there choose Regional and Language Options.
  3. Then go to the Advanced tab and choose Romanian under the long label "Select a language to match the language version of the non-Unicode programs you want to use:"

That's it. Now I can watch the subtitle as they should be displayed.