Page 1 of 1

Thank to Mr. Rao

Posted: Mon May 25, 2020 12:20 pm
by Otto
Dear Mr. Rao,

I want to thank you for your tireless work. Sincerely.
Primarily today for the xBrowser.

With mod harbor I exchange data via a hash that is saved in a file. It's incredible how easy it is to display the data with xBrowse ().

This is the hash

Code: Select all

{"roomsImg":"img\/restaurant-bergland.jpg","roomsMap":{"101":{"coords":[1126,174,1192,274],"title":"Tisch 101","free":2,"shape":"rect"},"102":{"coords":[1330,275,1395,370],"title":"Tisch 102","free":5,"shape":"rect"},"103":{"coords":[1330,453,1396,547],"title":"Tisch 103","free":5,"shape":"rect"},"104":{"coords":[1127,344,1184,400],"title":"Tisch 104","free":5,"shape":"rect"},"105":{"coords":[1124,487,1190,581],"title":"Tisch 105","free":1,"shape":"rect"},"106":{"coords":[1332,709,1427,776],"title":"Tisch 106","free":0,"shape":"rect"},"107":{"coords":[1330,875,1424,942],"title":"Tisch 107","free":0,"shape":"rect"},"108":{"coords":[1338,1096,1430,1159],"title":"Tisch 108","free":5,"shape":"rect"},"109":{"coords":[1370,1270,1429,1326],"title":"Tisch 109","free":2,"shape":"rect"},"110":{"coords":[1214,1228,1273,1328],"title":"Tisch 110","free":3,"shape":"rect"},"111":{"coords":[1068,1230,1132,1326],"title":"Tisch 111","free":4,"shape":"rect"},"112":{"coords":[931,1228,995,1326],"title":"Tisch 112","free":2,"shape":"rect"},"113":{"coords":[745,1228,808,1328],"title":"Tisch 113","free":2,"shape":"rect"},"114":{"coords":[608,1228,672,1329],"title":"Tisch 114","free":0,"shape":"rect"},"115":{"coords":[628,1074,686,1128],"title":"Tisch 115","free":0,"shape":"rect"},"116":{"coords":[488,1079,543,1130],"title":"Tisch 116","free":0,"shape":"rect"},"117":{"coords":[413,1196,23],"title":"Tisch 117","free":2,"shape":"circle"},"118":{"coords":[413,1265,25],"title":"Tisch 118","free":3,"shape":"circle"},"119":{"coords":[493,1265,24],"title":"Tisch 119","free":5,"shape":"circle"},"120":{"coords":[382,1495,442,1589],"title":"Tisch 120","free":5,"shape":"rect"},"121":{"coords":[620,1497,683,1595],"title":"Tisch 121","free":4,"shape":"rect"},"122":{"coords":[812,1489,905,1554],"title":"Tisch 122","free":2,"shape":"rect"},"123":{"coords":[994,1491,1092,1555],"title":"Tisch 123","free":5,"shape":"rect"}}}
 
Fivewin code

Code: Select all

cTEXT := memoread( "bergland.json" )   /
hb_jsondecode( cTEXT, @res )  
xbrowse( res )
 
Image

Re: Thank to Mr. Rao

Posted: Mon May 25, 2020 2:13 pm
by Antonio Linares
+1

:-)

Re: Thank to Mr. Rao

Posted: Mon May 25, 2020 3:49 pm
by ADutheil
+1
I use it a lot to browse objects when I can't remember the name of some data or method. It's a priceless help.

Re: Thank to Mr. Rao

Posted: Mon May 25, 2020 8:04 pm
by Silvio.Falconi
I not understood What you are doing

Re: Thank to Mr. Rao

Posted: Tue May 26, 2020 7:40 am
by Massimo Linossi
+1

Re: Thank to Mr. Rao

Posted: Tue May 26, 2020 11:16 am
by Otto
Hello Silvio,
hash with (x)harbour - knowledge base
http://forums.fivetechsupport.com/viewt ... hilit=hash

Best regards,
Otto

Re: Thank to Mr. Rao

Posted: Thu May 28, 2020 8:09 am
by MOISES
Undoubtedly, despite the fact that the issue of the vertical scroll bar under SQLRDD has not yet been solved, xBrowse is an extraordinary control and has nothing to envy to the Telerik grid for example.

The work of Mr. Nages has been extremely commendable and with advances that were unthinkable when xBrowse appeared back in version 2.4 of the product.

Re: Thank to Mr. Rao

Posted: Thu May 28, 2020 9:55 am
by Silvio.Falconi
Otto wrote:Hello Silvio,
hash with (x)harbour - knowledge base
http://forums.fivetechsupport.com/viewt ... hilit=hash

Best regards,
Otto
I used Hash to make an old application
dispositions and substitutions for the teachers of my school and acceptance of the dispositions all via telegram

Re: Thank to Mr. Rao

Posted: Fri May 29, 2020 5:05 pm
by nageswaragunupudi
HASH-TREE


Image

Code: Select all

#include "fivewin.ch"

#ifdef __XHARBOUR__
   #xtranslate hb_hKeyAt( <h>, <n> )     => hGetKeyAt( <h>, <n> )
   #xtranslate hb_hValueAt( <h>, <n> )   => hGetValueAt( <h>, <n> )
#endif

//----------------------------------------------------------------------------//

function Main()

   local cJson, hHash

   cJson := MEMOREAD( "otto.json" )
   HB_JsonDecode( cJson, @hHash )

   XBROWSER HashTree( hHash ) TITLE "HASH-TREE" ;
      SETUP ( oBrw:aCols[ 1 ]:AddBitmap( { FWDArrow(), FWRArrow() } ) )

return nil

function HashTree( hHash )

   local oTree
   local n, uKey, uVal, cType

   TREE oTree

   for n := 1 to Len( hHash )
      uKey     := hb_hKeyAt( hHash, n )
      uVal     := hb_hValueAt( hHash, n )
      cType    := ValType( uVal )
      if cType == "A"
         uVal  := FW_ValToExp( uVal )
      endif
      TREEITEM uKey CARGO { uVal }
      if cType == "H"
         HashTree( uVal )
      endif
   next

   ENDTREE

return oTree