Tuesday 26 April 2011

color code, rgb value

Color Color code RGB value
White W 255,255,255
Black N 0,0,0
Dark Gray N 64,64,64 (25% gray)
Gray W 192,192,192
Red R 255,0,0
Dark Red R 128,0,0
Yellow GR 255,255,0
Dark Yellow GR 128,128,0
Green G 0,255,0
Dark Green G 0,128,0
Cyan BG 0,255,255
Dark Cyan BG 0,128,128
Blue B 0,0,255
Dark Blue B 0,0,128
Magenta RB 255,0,255
Dark Magenta RB 128,0,128
Blank X N/A

Friday 29 January 2010

CURSORTOXML இந்த கமண்டுக்கு எளிய உதாரணம்

CREATE CURSOR animals (name c(7))
INSERT INTO animals (name) VALUES ("rate")
INSERT INTO animals (name) VALUES ("cat")
INSERT INTO animals (name) VALUES ("lion")
INSERT INTO animals (name) VALUES ("elephant")
INSERT INTO animals (name) VALUES ("cow")
INSERT INTO animals (name) VALUES ("horse")

CURSORTOXML("animals", "a1")
?a1

ஒரு டிபிஎப் பைலை ஒரு டெக்ஸ்ட் பைலாக மாற்றும் எளிய புரோகிராம.

CLOSE ALL
CLEAR ALL

lcFieldString = ''
lcMemo = ''

USE GETFILE('dbf', 'Select DBF') && Prompts for table to be used.

lnFieldCount = AFIELDS(laGetFields) && Builds array of fields from the
                                    && selected table.

*!* Prompt for Output file and use Low-Level functions
*!* to create it.
lcTextFile = FCREATE(GETFILE('txt', 'Select Text'))

*!* Starts scanning the table and converts the fields
*!* values according to their types **
SCAN
   WAIT WINDOW STR(RECNO()) + ' Of ' + STR(RECCOUNT()) NOWAIT
 
   FOR lnCount = 1 TO lnFieldCount
      lcType = laGetFields(lnCount, 2)

      IF lcType # 'G' && Don't try to turn a general field into a string
         lcString = EVALUATE(laGetFields(lnCount, 1))
      EndIf
     
      DO CASE
         CASE lcType = 'M' && Process the Memo Fields
            lnMemoLines = MEMLINES(EVALUATE(laGetFields(lnCount,1)))
            FOR lnLoop = 1 TO lnMemoLines
               IF lnLoop < lnMemoLines
                  lcMemo = lcMemo + ;
                     ALLTRIM(MLINE(EVALUATE(laGetFields(lnCount, 1)), ;
                                   lnLoop)) + ' '
               ELSE
                  lcMemo = lcMemo + ;
                     ALLTRIM(MLINE(EVALUATE(laGetFields(lnCount, 1)), ;
                                   lnLoop))
               ENDif
            ENDfor
          
            lcString = lcMemo
            lcMemo = ''
         CASE lcType = 'G' && Process the General Fields
            lcString = 'Gen'
         CASE lcType = 'D' && Process the Date Fields
            lcString = DTOC(lcString)
         CASE lcType = 'T' && Process the DateTime Fields
            lcString = TTOC(lcString)
         CASE lcType = 'N' && Process the Numeric Fields
            lcString = STR(lcString, LEN(STR(lcString)), 2)
         CASE lcType = 'I' && Process the Integer Fields
            lcString = STR(lcString)
         CASE lcType = 'L' && Process the Logical Fields
            IF lcString = .T.
               lcString = 'T'
            ELSE
               lcString = 'F'
            ENDif
      ENDcase
    
      IF lnCount < lnFieldCount && Determines if the last field was
                                && processed and sets the closing quote.
         lcFieldString = lcFieldString + '"' + lcString + '"' + ','
      ELSE
         lcFieldString = lcFieldString + '"' + lcString + '"'
      ENDif
   ENDfor

   FPUTS(lcTextFile, lcFieldString) && Writes string to the text file.
   lcFieldString = ''
ENDscan

FCLOSE(lcTextFile)

CLOSE All
CLEAR All
WAIT WINDOW 'Text File Creation Completed' NOWAIT
               

மேலே உள்ள புரொகிராமை அப்படியே காப்பி பண்ணி சேவ் பண்ணிவும்.

இப்பொழுது இந்த புரொகிராமை ரன் பண்ணவும் இப்போது நமக்கு தேவையான டிபிஎப் பைலை தேர்வு செய்யவும் அடுத்து டெக்ஸ்ட் பைலுக்கான பெயரை தரவும் இப்போது டெக்ஸ்ட் பைல் தயாராகிவிடும்