messages
listlengths 1
1
| topic
stringlengths 2
60
|
|---|---|
[
{
"date": "2011-06-03",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Carlos,\n\nEmpiezo a tner claro toda esta problemática, al fin (gracias <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> ). \n\nEl hecho de usar CmSay() y el metodo Ctmr2Pix() para mi es solo la unica solucion si quieres usar formularios preimpresos. De esta manera clavaras al milimetro, EXCEPTO lo q se encuentre por debajo del offsetX e Y (que de acuerdo, alla nunca se imprime nada).\n\nPero si quieres diseñarte tus impresos, usar emf, etc la otra opcion creo que es la mas acertada. \n\nTocar la clase, con tu sugerencia no creo q sea necesario. Ya tienes los suficientes metodos para trabajar de una manera u otra, es solo saber y conocer sus consecuencias. Para esto estamos aqui, para preguntar y aprender <!-- s:wink: --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\":wink:\" title=\"Wink\" /><!-- s:wink: --> \n\nDe todas maneras contra gustos... <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: --> \n\nGracias Carlos",
"time": "12:19",
"topic": "Class Printer",
"username": "Carles"
}
] |
Class Printer
|
[
{
"date": "2008-11-18",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi \r\n\r\nI'm using SMTP modified class with Authorization (by Luis K) without problems.\r\n\r\nWhen tring the same rotine with a exchange server it's stop in:\r\n\r\n11/18/08 19:11:22: 250 CL3STAL.hsm.min-saude.pt Hello [172.31.9.109]\r\n503 5.5.2 Send hello first.\r\n\r\nHow can i use the TSMT class with exchange servers ?\r\n\r\nWhat modifications i need ?\r\n\r\nbest regards\r\n\r\n Pedro Faro",
"time": "21:15",
"topic": "Class SMTP with Exchange Server",
"username": "Pedro Faro"
}
] |
Class SMTP with Exchange Server
|
[
{
"date": "2008-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Pedro,\r\n\r\nI am very sorry but I'm afraid I don't have an answer for your problem.\r\n\r\nBut I'd like to take the opportunity to ask you a question.\r\n\r\nDo you have any experience to connect a FWH-application to Outlook through OLE ?\r\n\r\nIn my application I have a calendar which I want to synchronize with the Outlook calendar.\r\n\r\nThanks a lot in advance for your answer.",
"time": "11:05",
"topic": "Class SMTP with Exchange Server",
"username": "driessen"
}
] |
Class SMTP with Exchange Server
|
[
{
"date": "2008-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi\r\n\r\nSorry , i've no experience in that area.\r\n\r\nWhat i do is send E-mails via smtp (not going trough outlook) using a modified class SMTP .\r\n\r\nregards\r\n Pedro",
"time": "11:28",
"topic": "Class SMTP with Exchange Server",
"username": "Pedro Faro"
}
] |
Class SMTP with Exchange Server
|
[
{
"date": "2008-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pedro,\r\n\r\nThanks a lot for your answer.\r\n\r\nI did a little bit of thinking about your question concerning SMTP and Exchange Server.\r\n\r\nTo my opinion, SMTP has nothing to do with Exchange server. To my opinion, SMTP sends an email directly to the e-mail-server, doesn't it ?\r\n\r\nI tried to use SMTP too, some time ago but I had a lot of trouble with sending the attachments which seemed to be unreadable to the correspondents.\r\n\r\nYou said you made some changes to the TSMTP class ? What did you change ? Can you provide a good working example of your SMTP system ?\r\n\r\nThanks.",
"time": "13:32",
"topic": "Class SMTP with Exchange Server",
"username": "driessen"
}
] |
Class SMTP with Exchange Server
|
[
{
"date": "2008-01-16",
"forum": "Bugs report & fixes / Informe de errores y arreglos",
"text": "Antonio, si coges el ejemplo TestBubm.prg, y indicas TEXTBOTTOM, NO FUNCIONA!\n\nTampoco el TEXTTOP.\n\nUsando el SendMessage que te comento en el otro hilo, se realiza correctamente, intentando hacer lo mismo con esta clase, no es posible.",
"time": "10:01",
"topic": "Class TBUTTONBMP",
"username": "thefull"
}
] |
Class TBUTTONBMP
|
[
{
"date": "2008-01-16",
"forum": "Bugs report & fixes / Informe de errores y arreglos",
"text": "Rafa,\n\nEscribe esas claúsulas en mayúsculas. La clase no estaba comprobando si estaban escritas en mayúsculas.\n\nYa lo hemos arreglado para la próxima versión.",
"time": "11:30",
"topic": "Class TBUTTONBMP",
"username": "Antonio Linares"
}
] |
Class TBUTTONBMP
|
[
{
"date": "2008-01-16",
"forum": "Bugs report & fixes / Informe de errores y arreglos",
"text": "[quote=\"Antonio Linares\":1k4hm754]Rafa,\n\nEscribe esas claúsulas en mayúsculas. La clase no estaba comprobando si estaban escritas en mayúsculas.\n\nYa lo hemos arreglado para la próxima versión.[/quote:1k4hm754]\n\nAntonio, las he escrito en mayusculas, es más, en el preprocesado ya realizas el UPPER().\n\n[code:1k4hm754]\n.. \n[ <cPostext: TEXTTOP, TEXTBOTTOM, TEXTLEFT, TEXTRIGHT> ] ;\n\n=>....\n <cPrompt>, <.lCancel.>, <cBitmap>, [ Upper(<(cPostext)>) ], <cToolTip> )\n[/code:1k4hm754]\n\nPor lo tanto, algo ocurre porque no se posiciona ni arriba ni abajo, sale en medio.",
"time": "11:44",
"topic": "Class TBUTTONBMP",
"username": "thefull"
}
] |
Class TBUTTONBMP
|
[
{
"date": "2008-01-16",
"forum": "Bugs report & fixes / Informe de errores y arreglos",
"text": "Rafa,\n\nSi revisas el código fuente del método Paint() verás que se tiene en cuenta:\n[code:3h64mcur]\n if ! Empty( ::hBitmap )\n if ::cPosText == \"TEXTBOTTOM\"\n nTop = 7\n elseif ::cPosText == \"TEXTTOP\"\n nTop = ::nHeight() - 6 - nBmpHeight( ::hBitmap )\n else\n nTop = ( ::nHeight() / 2 ) - ( nBmpHeight( ::hBitmap ) / 2 )\n endif\n if ::cPosText == \"TEXTRIGHT\"\n nLeft = 7\n elseif ::cPosText == \"TEXTLEFT\"\n nLeft = ::nWidth() - 6 - nBmpWidth( ::hBitmap )\n else\n nLeft := ( ::nWidth() / 2 ) - ( nBmpWidth( ::hBitmap ) / 2 )\n endif\n \n if ::lActive\n DrawMasked( ::hDC, ::hBitmap, nTop + If( lPressed, 1, 0 ),;\n nLeft + If( lPressed, 1, 0 ) )\n else\n DrawGray( ::hDC, ::hBitmap, nTop + If( lPressed, 1, 0 ),;\n nLeft + If( lPressed, 1, 0 ) )\n endif \n endif \n[/code:3h64mcur]",
"time": "19:27",
"topic": "Class TBUTTONBMP",
"username": "Antonio Linares"
}
] |
Class TBUTTONBMP
|
[
{
"date": "2008-01-17",
"forum": "Bugs report & fixes / Informe de errores y arreglos",
"text": "Antonio, si, pero si el PREPROCESADOR ya lo pasa a mayúsculas.\nAsi, si lo pruebas no funciona correctamente.",
"time": "09:30",
"topic": "Class TBUTTONBMP",
"username": "thefull"
}
] |
Class TBUTTONBMP
|
[
{
"date": "2015-01-05",
"forum": "To do - WishList / Por hacer - Peticiones",
"text": "Buenos dias\nAntonio, sería posible cambiar en la clase TBar:\n[code=fw:2zimmlif]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#define</span> GROUP_SEP <span style=\"color: #000000;\">8</span><br /> </div>[/code:2zimmlif]\n\npor una DATA (por ejemplo)\n\n[code=fw:2zimmlif]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">DATA</span> nGroupSep <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">8</span><br /> </div>[/code:2zimmlif]\n\nY sustituirlo en la clase?\nPara poder configurar la distancia que deja entre botones cuando defines un Group de ellos (ahora quedan muy distanciados y muy feo)\nSi ves la ultima imagen que he puesto de Sciedit (FivEdit), tengo que seguir usando una clase heredada y quiero quitármela tambien\nSaludos",
"time": "11:40",
"topic": "Class TBar",
"username": "cnavarro"
}
] |
Class TBar
|
[
{
"date": "2015-01-05",
"forum": "To do - WishList / Por hacer - Peticiones",
"text": "Cristobal,\n\nHecho. Muy buena sugerencia <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nGracias!",
"time": "23:32",
"topic": "Class TBar",
"username": "Antonio Linares"
}
] |
Class TBar
|
[
{
"date": "2015-01-06",
"forum": "To do - WishList / Por hacer - Peticiones",
"text": "Muchas gracias",
"time": "00:04",
"topic": "Class TBar",
"username": "cnavarro"
}
] |
Class TBar
|
[
{
"date": "2023-02-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "ask to Charles Kwon but it run only with resources",
"time": "12:59",
"topic": "Class TDlgResize where can I download ?",
"username": "Silvio.Falconi"
}
] |
Class TDlgResize where can I download ?
|
[
{
"date": "2023-02-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dear Coleagues\n\nWhere can I download tdlgresize class Charles Kwon , i need resize dialog from resources \n\nThanks \nFabian",
"time": "21:55",
"topic": "Class TDlgResize where can I download ?",
"username": "devwin2010"
}
] |
Class TDlgResize where can I download ?
|
[
{
"date": "2006-11-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hola \n\nPuden descargar la fuentes desde <!-- w --><a class=\"postlink\" href=\"http://www.quark-costos.com\">www.quark-costos.com</a><!-- w -->\n\nSaludos\n\nArturo",
"time": "01:53",
"topic": "Class TDwg for view drawing Dwg and DXF AutoCad",
"username": "Arturo Tamayo Daza"
}
] |
Class TDwg for view drawing Dwg and DXF AutoCad
|
[
{
"date": "2022-05-01",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Many thanks Mr. Rao,\nthis works fine now.\n\nBut i still have an issue when using either \n[color=#0040FF:3ilvw4dx]PRINT oPrn NAME \"Testprint PREVIEW\"[/color:3ilvw4dx] or\n[color=#0040FF:3ilvw4dx]PRINT oPrn NAME \"Testprint\" PREVIEW FILE cPdfFile[/color:3ilvw4dx]\nI want to print a jpg logo amongst text and the vertical position of this logo is different in those two versions.\nMy code :\n[code=fw:3ilvw4dx]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br />REQUEST FWHARU <span style=\"color: #B900B9;\">// required for using HaruPdf</span><br /><br />PROCEDURE Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #B900B9;\">//----------------</span><br /><span style=\"color: #00C800;\">LOCAL</span> oPrn, oFont<br /><span style=\"color: #00C800;\">LOCAL</span> cPdfFile := CurDrive<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\":<span style=\"color: #000000;\">\\\"</span> + curdir() + \"</span>\\<span style=\"color: #00C800;\">print</span>.pdf<span style=\"color: #ff0000;\">\"<br />LOCAL cDGSV := CurDrive() + \"</span>:\\<span style=\"color: #ff0000;\">\" + curdir() + \"</span>\\dgsv.jpg<span style=\"color: #ff0000;\">\"<br />LOCAL nHeight, nRow, nCol, nYRes, nXRes<br /><br /><br /> TPrinter():lUseHaruPDF := .t.<br /><br /> PRINT oPrn NAME \"</span>Testprint<span style=\"color: #ff0000;\">\" PREVIEW FILE cPdfFile<br /><br /> DEFINE FONT oFont NAME \"</span>Arial<span style=\"color: #ff0000;\">\" SIZE 0, -10 OF oPrn<br /> nHeight := oPrn:GetTextHeight( \"</span><span style=\"color: #ff0000;\">\", oFont )<br /><br /> nYRes := ( 10 * oPrn:nVertRes() / oPrn:nVertSize() ) / 10 // Faktor for mm in vertical<br /> nXRes := ( 10 * oPrn:nHorzRes() / oPRn:nHorzSize() ) / 10 // Faktor for mm in horizontal<br /> nCol := 144.25 * nXRes<br /><br /> PAGE<br /> nRow := 45 * nYRes<br /> oPrn:Say( nRow, nCol, \"</span>Line above<span style=\"color: #ff0000;\">\", oFont )<br /><br /> @ 59, 148 PRINT TO oPrn IMAGE cDGSV SIZE 14.62, 4.3 MM<br /><br /> nRow += 5.5 * nHeight<br /> oPrn:Say( nRow, nCol, \"</span>Line below<span style=\"color: #ff0000;\">\", oFont )<br /><br /> ENDPAGE<br /> ENDPRINT<br /><br /> RELEASE FONT oFont<br />RETURN</span></div>[/code:3ilvw4dx]\n\nThe jpg file [img:3ilvw4dx]https://www.hamelau.eu/tmp/dgsv.jpg[/img:3ilvw4dx] can be downloaded at [url:3ilvw4dx]https://www.hamelau.eu/tmp/dgsv.jpg[/url:3ilvw4dx]\n\nI know that your advice will be to let the printer do the calculation for positionimg in MM or Inches and so.\nBut I don't want to measure all my linefeeds in millimeters, especially when using two fonts of different heights in the same line.\n\nBtw. When I save the pdf from the FiveWin preview as pdf file it looks correct in Adobe reader.\nSo there is something not quite exact in the FiveWin preview display.\n\nCould there be an other solution?\nRegards,\nDetlef",
"time": "22:35",
"topic": "Class TFont different",
"username": "Detlef"
}
] |
Class TFont different
|
[
{
"date": "2022-04-30",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi alll,\n\nwhen printing to a pdf file I have a strange font issue.\nNormally I could get the height of a font by coding [b:a0jg8dun][color=#FF0000:a0jg8dun]oFont:nHeight[/color:a0jg8dun][/b:a0jg8dun].\nSo this is working:\n[code=fw:a0jg8dun]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br />REQUEST FWHARU<br /><br />PROCEDURE Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #B900B9;\">//----------------</span><br /><span style=\"color: #00C800;\">LOCAL</span> oPrn, oFont<br /><span style=\"color: #00C800;\">LOCAL</span> cPdfFile := CurDrive<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\":<span style=\"color: #000000;\">\\\"</span> + curdir() + \"</span>\\<span style=\"color: #00C800;\">print</span>.pdf<span style=\"color: #ff0000;\">\"<br />LOCAL nRow := 50<br /><br /> TPrinter():lUseHaruPDF := .t.<br /> PRINT oPrn NAME \"</span>Testprint<span style=\"color: #ff0000;\">\" PREVIEW<br /> DEFINE FONT oFont NAME \"</span>Arial<span style=\"color: #ff0000;\">\" SIZE 0, -10 OF oPrn<br /><br /> PAGE<br /> oPrn:Say( nRow, 50, \"</span>Line one<span style=\"color: #ff0000;\">\", oFont )<br /> nRow += 1.2 * oFont:nHeight<br /> oPrn:Say( nRow, 50, \"</span>Line two<span style=\"color: #ff0000;\">\", oFont )<br /> ENDPAGE<br /> ENDPRINT<br /><br /> RELEASE FONT oFont<br />RETURN<br /></span></div>[/code:a0jg8dun]\n\nBut If I do the following \n[code=fw:a0jg8dun]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><span style=\"color: #00D7D7;\">#define</span> _HEIGHT <span style=\"color: #000000;\">2</span> <span style=\"color: #B900B9;\">// value of font size array for height</span><br />REQUEST FWHARU <span style=\"color: #B900B9;\">// required for using HaruPdf</span><br /><br />PROCEDURE Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #B900B9;\">//----------------</span><br /><span style=\"color: #00C800;\">LOCAL</span> oPrn, oFont<br /><span style=\"color: #00C800;\">LOCAL</span> cPdfFile := CurDrive<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\":<span style=\"color: #000000;\">\\\"</span> + curdir() + \"</span>\\<span style=\"color: #00C800;\">print</span>.pdf<span style=\"color: #ff0000;\">\"<br />LOCAL nRow := 50<br /><br /> TPrinter():lUseHaruPDF := .t.<br /> PRINT oPrn NAME \"</span>Testprint<span style=\"color: #ff0000;\">\" PREVIEW [b:a0jg8dun][color=#4000FF:a0jg8dun]FILE cPdfFile[/color:a0jg8dun][/b:a0jg8dun]<br /> DEFINE FONT oFont NAME \"</span>Arial<span style=\"color: #ff0000;\">\" SIZE 0, -10 OF oPrn<br /><br /> PAGE<br /> oPrn:Say( nRow, 50, \"</span>Line one<span style=\"color: #ff0000;\">\", oFont )<br /> nRow += 1.2 * oFont:nHeight<br /> oPrn:Say( nRow, 50, \"</span>Line two<span style=\"color: #ff0000;\">\", oFont )<br /> ENDPAGE<br /> ENDPRINT<br /><br /> RELEASE FONT oFont<br />RETURN<br /></span></div>[/code:a0jg8dun]\nThat gives me the error : [b:a0jg8dun][color=#FF0000:a0jg8dun] \"Class: 'ARRAY' has no exported method: NHEIGHT\"[/color:a0jg8dun][/b:a0jg8dun]\nIn this case I have to write [b:a0jg8dun]nRow += 1.2 * oFont[ _HEIGHT ][/b:a0jg8dun]\nWhy is the height value of the same font in different structures?\n\nRegards,\nDetlef",
"time": "21:31",
"topic": "Class TFont different",
"username": "Detlef"
}
] |
Class TFont different
|
[
{
"date": "2022-05-01",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Instead of\n[code=fw:2vw64imy]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">nRow += <span style=\"color: #000000;\">1.2</span> * oFont:<span style=\"color: #000000;\">nHeight</span> </div>[/code:2vw64imy]\n\nPlease use:\n[code=fw:2vw64imy]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">nRow += <span style=\"color: #000000;\">1.2</span> * oPrn:<span style=\"color: #000000;\">GetTextHeight</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"\"</span>, oFont <span style=\"color: #000000;\">)</span> </div>[/code:2vw64imy]",
"time": "08:01",
"topic": "Class TFont different",
"username": "nageswaragunupudi"
}
] |
Class TFont different
|
[
{
"date": "2006-12-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thanks to Pier Luigi help, the excellent Class TGraph from Alfredo Arteaga is already available for FiveWin for Pocket PC (FWPPC). See this impressive screenshot:\n[url=http://imageshack.us:1ys8xs5x][img:1ys8xs5x]http://img220.imageshack.us/img220/8868/fwppcgb0.png[/img:1ys8xs5x][/url:1ys8xs5x]",
"time": "09:05",
"topic": "Class TGraph on FWPPC",
"username": "Antonio Linares"
}
] |
Class TGraph on FWPPC
|
[
{
"date": "2006-12-14",
"forum": "FiveWin for Pocket PC",
"text": "Thanks to Pier Luigi help, the excellent Class TGraph from Alfredo Arteaga is already available for FiveWin for Pocket PC (FWPPC). See this impressive screenshot:\n[url=http://imageshack.us:2gzqgzjh][img:2gzqgzjh]http://img220.imageshack.us/img220/8868/fwppcgb0.png[/img:2gzqgzjh][/url:2gzqgzjh]",
"time": "09:07",
"topic": "Class TGraph on FWPPC",
"username": "Antonio Linares"
}
] |
Class TGraph on FWPPC
|
[
{
"date": "2023-10-25",
"forum": "Utilities / Utilidades",
"text": "[code=fw:gg6sp877]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbclass.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> oHash := THash<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <br /> oHash:<span style=\"color: #000000;\">one</span> = <span style=\"color: #ff0000;\">\"first\"</span><br /><br /> ? oHash:<span style=\"color: #000000;\">one</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> THash<br /><br /> <span style=\"color: #00C800;\">DATA</span> hHash<br /> <br /> <span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #00C800;\">INLINE</span> ::<span style=\"color: #000000;\">hHash</span> := <span style=\"color: #000000;\">{</span>=><span style=\"color: #000000;\">}</span>, <span style=\"color: #00C800;\">Self</span><br /><br /> ERROR HANDLER ONERROR<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> ONERROR<span style=\"color: #000000;\">(</span> uParam1 <span style=\"color: #000000;\">)</span> <span style=\"color: #00C800;\">CLASS</span> THash<br /><br /> <span style=\"color: #00C800;\">local</span> cKey := __GetMessage<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">local</span> uRet<br /> <br /> <span style=\"color: #00C800;\">if</span> <span style=\"color: #0000ff;\">Left</span><span style=\"color: #000000;\">(</span> cKey, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span> == <span style=\"color: #ff0000;\">\"_\"</span><br /> cKey = <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">(</span> cKey, <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span><br /> ::<span style=\"color: #000000;\">hHash</span><span style=\"color: #000000;\">[</span> cKey <span style=\"color: #000000;\">]</span> = uParam1<br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #00C800;\">if</span> ! hb_HHasKey<span style=\"color: #000000;\">(</span> ::<span style=\"color: #000000;\">hHash</span>, cKey <span style=\"color: #000000;\">)</span><br /> ::<span style=\"color: #000000;\">hHash</span><span style=\"color: #000000;\">[</span> cKey <span style=\"color: #000000;\">]</span> = <span style=\"color: #00C800;\">nil</span><br /> <span style=\"color: #00C800;\">endif</span> <br /> <span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">RETURN</span> ::<span style=\"color: #000000;\">hHash</span><span style=\"color: #000000;\">[</span> cKey <span style=\"color: #000000;\">]</span><br /> </div>[/code:gg6sp877]",
"time": "22:24",
"topic": "Class THash",
"username": "Antonio Linares"
}
] |
Class THash
|
[
{
"date": "2023-10-28",
"forum": "Utilities / Utilidades",
"text": "Porting Class THash to C code:\n\nThis is a good example of how to implement ERROR HANDLER for a Class from C code\n\n[code=fw:1e2d5seh]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> o := THash<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <br /> ? o:<span style=\"color: #000000;\">ClassName</span><br /><br /> o:<span style=\"color: #000000;\">first</span> = <span style=\"color: #ff0000;\">\"one\"</span><br /> ? o:<span style=\"color: #000000;\">first</span><br /><br /> o:<span style=\"color: #000000;\">second</span> = <span style=\"color: #ff0000;\">\"two\"</span><br /> ? o:<span style=\"color: #000000;\">second</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span> <br /><br /><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP <br /><br /><span style=\"color: #00D7D7;\">#include</span> <hbapi.h><br /><span style=\"color: #00D7D7;\">#include</span> <hbapicls.h><br /><span style=\"color: #00D7D7;\">#include</span> <hbapiitm.h><br /><span style=\"color: #00D7D7;\">#include</span> <hbhash.h><br /><span style=\"color: #00D7D7;\">#include</span> <hbstack.h><br /><span style=\"color: #00D7D7;\">#include</span> <hbvm.h><br /><span style=\"color: #00D7D7;\">#include</span> <hboo.ch><br /><br />extern HB_FUN___CLSADDMSG;<br /><br />HB_FUNC_STATIC<span style=\"color: #000000;\">(</span> THASH_ONERROR <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pHash = hb_itemNew<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /> <br /> hb_arrayGet<span style=\"color: #000000;\">(</span> hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span>, pHash <span style=\"color: #000000;\">)</span>;<br /><br /> hb_vmPushSymbol<span style=\"color: #000000;\">(</span> hb_dynsymSymbol<span style=\"color: #000000;\">(</span> hb_dynsymFindName<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"__GETMESSAGE\"</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushNil<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> hb_vmProc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hb_parc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">-1</span> <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">]</span> == <span style=\"color: #ff0000;\">'_'</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retc<span style=\"color: #000000;\">(</span> hb_parc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">-1</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>;<br /> hb_hashAdd<span style=\"color: #000000;\">(</span> pHash, hb_stackReturnItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_ANY <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_arraySet<span style=\"color: #000000;\">(</span> hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span>, pHash <span style=\"color: #000000;\">)</span>;<br /> hb_ret<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span> <br /> <span style=\"color: #000000;\">{</span><br /> HB_SIZE nPos;<br /><br /> hb_hashScan<span style=\"color: #000000;\">(</span> pHash, hb_stackReturnItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, &nPos <span style=\"color: #000000;\">)</span>;<br /> <br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> nPos == <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_hashAdd<span style=\"color: #000000;\">(</span> pHash, hb_stackReturnItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_ANY <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_ret<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span> <br /> <span style=\"color: #00C800;\">else</span><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> hb_hashGetValueAt<span style=\"color: #000000;\">(</span> pHash, nPos <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span> <br /><br /> hb_itemRelease<span style=\"color: #000000;\">(</span> pHash <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #00C800;\">static</span> HB_SYMB symOnError = <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"ONERROR\"</span>, <span style=\"color: #000000;\">{</span> HB_FS_STATIC <span style=\"color: #000000;\">}</span>, <span style=\"color: #000000;\">{</span> HB_FUNCNAME<span style=\"color: #000000;\">(</span> THASH_ONERROR <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">}</span>, <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">}</span>;<br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> THASH <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">static</span> HB_USHORT uiClass = <span style=\"color: #000000;\">0</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> uiClass == <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> uiClass = hb_clsCreate<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, <span style=\"color: #ff0000;\">\"THASH\"</span> <span style=\"color: #000000;\">)</span>; <span style=\"color: #B900B9;\">// it has just one DATA</span><br /> <br /> hb_vmPushSymbol<span style=\"color: #000000;\">(</span> hb_dynsymSymbol<span style=\"color: #000000;\">(</span> hb_dynsymFindName<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"__CLSADDMSG\"</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushNil<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> hb_vmPushInteger<span style=\"color: #000000;\">(</span> uiClass <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushString<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ONERROR\"</span>, <span style=\"color: #0000ff;\">strlen</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ONERROR\"</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushSymbol<span style=\"color: #000000;\">(</span> &symOnError <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushInteger<span style=\"color: #000000;\">(</span> HB_OO_MSG_ONERROR <span style=\"color: #000000;\">)</span>;<br /> hb_vmProc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>; <br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_clsAssociate<span style=\"color: #000000;\">(</span> uiClass <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hb_pcount<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> > <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// it may receive an existing hash as a parameter</span><br /> hb_arraySet<span style=\"color: #000000;\">(</span> hb_stackReturnItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span>, hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_ANY <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">else</span><br /> hb_arraySet<span style=\"color: #000000;\">(</span> hb_stackReturnItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span>, hb_hashNew<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>; <br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP</div>[/code:1e2d5seh]",
"time": "13:43",
"topic": "Class THash",
"username": "Antonio Linares"
}
] |
Class THash
|
[
{
"date": "2023-10-30",
"forum": "Utilities / Utilidades",
"text": "Manu Expósito's version:\n\n[code=fw:5232635n]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">14</span>:<span style=\"color: #000000;\">57</span>, <span style=\"color: #000000;\">10</span>/<span style=\"color: #000000;\">30</span>/<span style=\"color: #000000;\">2023</span><span style=\"color: #000000;\">]</span> Manu Exposito: <span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Gestion de hash como objetos</span><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbapiitm.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbvm.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbstack.h\"</span><br /><br /><span style=\"color: #00D7D7;\">#define</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> hb_arrayGetPtr<span style=\"color: #000000;\">(</span> hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span><br /><span style=\"color: #00D7D7;\">#define</span> _GETHASH1<span style=\"color: #000000;\">(</span> pSelf <span style=\"color: #000000;\">)</span> hb_arrayGetPtr<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span>pSelf<span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Constructor</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_NEW<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pSelf = hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> PHB_ITEM hTable = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASH <span style=\"color: #000000;\">)</span> ;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> !hTable <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hTable = hb_hashNew<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /> hb_arraySetPtr<span style=\"color: #000000;\">(</span> pSelf, <span style=\"color: #000000;\">1</span>, hTable <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> pSelf <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Asigna un nuevo hash para gestionarlo desde el objeto</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SETHASH<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pSelf = hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> PHB_ITEM hTable = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASH <span style=\"color: #000000;\">)</span>;<br /> PHB_ITEM hTableOld = hb_arrayGetPtr<span style=\"color: #000000;\">(</span> pSelf, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hTable <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hTableOld <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_itemReturnRelease<span style=\"color: #000000;\">(</span> hTableOld <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_arraySetPtr<span style=\"color: #000000;\">(</span> pSelf, <span style=\"color: #000000;\">1</span>, hTable <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">return</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> hTableOld <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Obtiene el hash gestionado desde el objeto</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_GETHASH<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pSelf = hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> hb_arrayGetPtr<span style=\"color: #000000;\">(</span> pSelf, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_LEN<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_retnint<span style=\"color: #000000;\">(</span> hb_hashLen<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_DEL<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> hb_hashDel<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> HB_FALSE <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SET<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> hb_hashAdd<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey, hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span>, HB_IT_ANY <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> HB_FALSE <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_CLEAR<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> hb_hashClear<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SORT<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_hashSort<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SCAN<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HB_SIZE nPos = <span style=\"color: #000000;\">0</span>;<br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_hashScan<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey, &nPos <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_retnint<span style=\"color: #000000;\">(</span> nPos <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_KEYS<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> hb_hashGetKeys<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_VALUES<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> hb_hashGetValues<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_GET<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> PHB_ITEM pValue = hb_hashGetItemPtr<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey, HB_HASH_AUTOADD_ACCESS <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pValue <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> pValue <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">return</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_ret<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_END<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_itemRelease<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Añade los metodos de la clase</span><br /><br /><span style=\"color: #00C800;\">static</span> void addMethods<span style=\"color: #000000;\">(</span> HB_USHORT usClassH <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> <span style=\"color: #B900B9;\">// Datas</span><br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"_HASH\"</span>, THBHASH_SETHASH <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"HASH\"</span>, THBHASH_GETHASH <span style=\"color: #000000;\">)</span>;<br /><br />…<br /><span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">14</span>:<span style=\"color: #000000;\">57</span>, <span style=\"color: #000000;\">10</span>/<span style=\"color: #000000;\">30</span>/<span style=\"color: #000000;\">2023</span><span style=\"color: #000000;\">]</span> Manu Exposito: <span style=\"color: #000000;\">Y</span> un ejemplo de uso<br /><span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">14</span>:<span style=\"color: #000000;\">57</span>, <span style=\"color: #000000;\">10</span>/<span style=\"color: #000000;\">30</span>/<span style=\"color: #000000;\">2023</span><span style=\"color: #000000;\">]</span> Manu Exposito: <span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Ejemplo usu de THbHash</span><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br />procedure main <br /><br /> <span style=\"color: #00C800;\">local</span> h := THbHash<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">new</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">local</span> i, c, n<br /><br /> alert<span style=\"color: #000000;\">(</span> valtype<span style=\"color: #000000;\">(</span> h <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> alert<span style=\"color: #000000;\">(</span> valtype<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">getHash</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">for</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">10</span><br /> c := hb_ntos<span style=\"color: #000000;\">(</span> i <span style=\"color: #000000;\">)</span><br /> h:<span style=\"color: #000000;\">set</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"key\"</span> + c, <span style=\"color: #ff0000;\">\"value\"</span> + c <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">next</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Numero de elementos:\"</span>, n:= h:<span style=\"color: #000000;\">len</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /><br /> <span style=\"color: #00C800;\">for</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> n<br /> ? <span style=\"color: #ff0000;\">\"Clave:\"</span>, c := <span style=\"color: #ff0000;\">\"key\"</span> + hb_ntos<span style=\"color: #000000;\">(</span> i <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\"Valor:\"</span>, h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span> c <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">next</span><br /><br /> h:<span style=\"color: #000000;\">end</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> alert<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Fin\"</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span></div>[/code:5232635n]",
"time": "15:00",
"topic": "Class THash",
"username": "Antonio Linares"
}
] |
Class THash
|
[
{
"date": "2023-11-01",
"forum": "Utilities / Utilidades",
"text": "Muy bueno.\n\nA mi parecer faltaría una declaración previa de las DATAs posibles (opcional) para evitar posibles errores en tecleo que puedan suponer auténticas quebraduras de cabeza para encontrar el error, porque... \n\n// ... no es lo mismo ...\no:cVar: \"Texto\"\n\n// ... que\no:Var:= \"Texto\"\n\nSalu2",
"time": "11:18",
"topic": "Class THash",
"username": "paquitohm"
}
] |
Class THash
|
[
{
"date": "2023-11-01",
"forum": "Utilities / Utilidades",
"text": "Querido Paco,\n\nSi, buena idea, además hoy Ritzan ha comentado que las keys pueden ser case sensitive ó no, lo cual debe contemplarlo también la clase.\n\nAdemás hay que implementar métodos que accedan a las funciones que ofrecen los hashes, es algo sencillo, pero aún no se ha hecho.\n\nEntre todos la vamos mejorando, gracias <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "17:18",
"topic": "Class THash",
"username": "Antonio Linares"
}
] |
Class THash
|
[
{
"date": "2023-11-01",
"forum": "Utilities / Utilidades",
"text": "[quote=\"paquitohm\":12v89u7n]Muy bueno.\n\nA mi parecer faltaría una declaración previa de las DATAs posibles (opcional) para evitar posibles errores en tecleo que puedan suponer auténticas quebraduras de cabeza para encontrar el error, porque... \n\n// ... no es lo mismo ...\no:cVar: \"Texto\"\n\n// ... que\no:Var:= \"Texto\"\n\nSalu2[/quote:12v89u7n]\nYo estaba en lo mismo.\n\nEntendí que la clase evolucionaría en Fivetech, de ahí que mis primeros pasos fueran renombrándola para impedir conflictos entre clases declaradas.\n\nMis primeros pasos\n[code=fw:12v89u7n]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">/*<br /><br />Tret del foro de Fivetechsoft.com el 25/10/2023 21:24<br /><br />*/</span><br /><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbclass.ch\"</span><br /><br /><span style=\"color: #B900B9;\">/*<br />function Main()<br /><br /> local oHash := TMyHash():New()<br /> <br /> oHash:one = \"first\"<br /><br /> ? oHash:one<br /><br />return nil<br />*/</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> TMyHash<br /><br /> <span style=\"color: #00C800;\">DATA</span> hHash<br /><br /> <span style=\"color: #00C800;\">DATA</span> lUpper <span style=\"color: #0000ff;\">INIT</span> .F.<br /> <span style=\"color: #00C800;\">DATA</span> lChivato <span style=\"color: #0000ff;\">INIT</span> .F.<br /> <br /> <span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #00C800;\">INLINE</span> ::<span style=\"color: #000000;\">hHash</span> := <span style=\"color: #000000;\">{</span>=><span style=\"color: #000000;\">}</span>, <span style=\"color: #00C800;\">Self</span><br /><br /> ERROR HANDLER ONERROR<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> ONERROR<span style=\"color: #000000;\">(</span> uParam1 <span style=\"color: #000000;\">)</span> <span style=\"color: #00C800;\">CLASS</span> TMyHash<br /><br /> <span style=\"color: #00C800;\">local</span> cKey := __GetMessage<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #B900B9;\">//local uRet</span><br /> <br /> cKey := <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">(</span> ::<span style=\"color: #000000;\">lUpper</span>, Upper<span style=\"color: #000000;\">(</span> cKey <span style=\"color: #000000;\">)</span>, cKey <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">if</span> <span style=\"color: #0000ff;\">Left</span><span style=\"color: #000000;\">(</span> cKey, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span> == <span style=\"color: #ff0000;\">\"_\"</span><br /> cKey = <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">(</span> cKey, <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span><br /> ::<span style=\"color: #000000;\">hHash</span><span style=\"color: #000000;\">[</span> cKey <span style=\"color: #000000;\">]</span> = uParam1<br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #00C800;\">if</span> ! hb_HHasKey<span style=\"color: #000000;\">(</span> ::<span style=\"color: #000000;\">hHash</span>, cKey <span style=\"color: #000000;\">)</span><br /> ::<span style=\"color: #000000;\">hHash</span><span style=\"color: #000000;\">[</span> cKey <span style=\"color: #000000;\">]</span> = <span style=\"color: #00C800;\">nil</span><br /> <span style=\"color: #00C800;\">If</span> ::<span style=\"color: #000000;\">lChivato</span><br /> MsgStop<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"No existe Hash: \"</span> + cKey, <span style=\"color: #ff0000;\">\"Error!\"</span> <span style=\"color: #000000;\">)</span> <br /> <span style=\"color: #00C800;\">EndIf</span><br /> <span style=\"color: #00C800;\">endif</span> <br /> <span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">RETURN</span> ::<span style=\"color: #000000;\">hHash</span><span style=\"color: #000000;\">[</span> cKey <span style=\"color: #000000;\">]</span><br /> </div>[/code:12v89u7n]\nLa DATA lchivato se utilizaría en pruebas de desarrollo de la aplicación, una vez superadas se dejaría a .F.\n\nPor cierto, no domino en absoluto ni conozco las posibilidades de Hash, de ahí el uso de la DATA lUpper en lugar de su característica case sensitive.",
"time": "20:05",
"topic": "Class THash",
"username": "FiveWiDi"
}
] |
Class THash
|
[
{
"date": "2023-11-01",
"forum": "Utilities / Utilidades",
"text": "Aquí está la lista de funciones relativas a Hash: <!-- m --><a class=\"postlink\" href=\"https://github.com/Petewg/harbour-core/wiki/hb_H\">https://github.com/Petewg/harbour-core/wiki/hb_H</a><!-- m -->\n\nIncluso esta lista podria estar mas completa: <!-- m --><a class=\"postlink\" href=\"https://www.kresin.ru/en/hrbfaq_3.html#Doc8\">https://www.kresin.ru/en/hrbfaq_3.html#Doc8</a><!-- m -->\n\nPara el tema case sensitive parece que habria que utilizar esta: \n hb_HCaseMatch(<hHash>, [<lFlag>]) ? lPreviousFlag",
"time": "22:37",
"topic": "Class THash",
"username": "paquitohm"
}
] |
Class THash
|
[
{
"date": "2023-11-04",
"forum": "Utilities / Utilidades",
"text": "Hola!\n\nA continuación lo realizado respecto a la clase THbHash de Manu con algunas colaboraciones aportadas acá y de este servidor. A mi parecer, la clase ya cumple con lo necesario. \n\nLa Clase:\n[code=fw:yk9d0nba]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Gestion de hash como objetos</span><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbapiitm.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbvm.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbstack.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbapicls.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hboo.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbinit.h\"</span><br /><br /><span style=\"color: #00D7D7;\">#define</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> hb_arrayGetPtr<span style=\"color: #000000;\">(</span> hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span><br /><span style=\"color: #00D7D7;\">#define</span> _GETHASH1<span style=\"color: #000000;\">(</span> pSelf <span style=\"color: #000000;\">)</span> hb_arrayGetPtr<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span>pSelf<span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Constructor</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_NEW<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pSelf = hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> PHB_ITEM hTable;<br /> PHB_ITEM hTablePar = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASH <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hTablePar <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hTable = hb_itemNew<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /> hb_itemMove<span style=\"color: #000000;\">(</span> hTable, hTablePar <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> hTable = hb_hashNew<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_hashClearFlags<span style=\"color: #000000;\">(</span> hTable, HB_HASH_BINARY <span style=\"color: #000000;\">)</span>;<br /> hb_hashSetFlags<span style=\"color: #000000;\">(</span> hTable, HB_HASH_IGNORECASE | HB_HASH_RESORT <span style=\"color: #000000;\">)</span>;<br /> hb_arraySetPtr<span style=\"color: #000000;\">(</span> pSelf, <span style=\"color: #000000;\">1</span>, hTable <span style=\"color: #000000;\">)</span>;<br /><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> pSelf <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Asigna un nuevo hash para gestionarlo desde el objeto</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SETHASH<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pSelf = hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> PHB_ITEM hTablePar = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASH <span style=\"color: #000000;\">)</span>;<br /> PHB_ITEM hTableOld = _GETHASH1<span style=\"color: #000000;\">(</span> pSelf <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hTableOld <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hTableOld = hb_hashNew<span style=\"color: #000000;\">(</span> hTableOld <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hTablePar <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> PHB_ITEM hTable = hb_itemNew<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /> <br /> hb_itemMove<span style=\"color: #000000;\">(</span> hTable, hTablePar <span style=\"color: #000000;\">)</span>;<br /><br /> hb_hashClearFlags<span style=\"color: #000000;\">(</span> hTable, HB_HASH_BINARY <span style=\"color: #000000;\">)</span>;<br /> hb_hashSetFlags<span style=\"color: #000000;\">(</span> hTable, HB_HASH_IGNORECASE | HB_HASH_RESORT <span style=\"color: #000000;\">)</span>;<br /> hb_arraySetPtr<span style=\"color: #000000;\">(</span> pSelf, <span style=\"color: #000000;\">1</span>, hTable <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_itemReturnRelease<span style=\"color: #000000;\">(</span> hTableOld <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Obtiene el hash gestionado desde el objeto</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_GETHASH<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pSelf = hb_stackSelfItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> hb_arrayGetPtr<span style=\"color: #000000;\">(</span> pSelf, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_LEN<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_retnint<span style=\"color: #000000;\">(</span> hb_hashLen<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_DEL<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> hb_hashDel<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> HB_FALSE <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SET<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> hb_hashAdd<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey, hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span>, HB_IT_ANY <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> HB_FALSE <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_CLEAR<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> hb_hashClear<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SORT<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_hashSort<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SCAN<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HB_SIZE nPos = <span style=\"color: #000000;\">0</span>;<br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_hashScan<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey, &nPos <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_retnint<span style=\"color: #000000;\">(</span> nPos <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_KEYS<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_itemReturnRelease<span style=\"color: #000000;\">(</span> hb_hashGetKeys<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_VALUES<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_itemReturnRelease<span style=\"color: #000000;\">(</span> hb_hashGetValues<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_GET<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> PHB_ITEM pValue = hb_hashGetItemPtr<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey, HB_HASH_AUTOADD_ACCESS <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pValue <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> pValue <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">return</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_ret<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_VALUEAT<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pPos = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_NUMERIC <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pPos <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> PHB_ITEM pValue = hb_hashGetValueAt<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hb_itemGetNS<span style=\"color: #000000;\">(</span> pPos <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pValue <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> pValue <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">return</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_ret<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_KEYAT<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pPos = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_NUMERIC <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pPos <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey = hb_hashGetKeyAt<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hb_itemGetNS<span style=\"color: #000000;\">(</span> pPos <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">return</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_ret<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_DELAT<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pPos = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_NUMERIC <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pPos <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hb_hashDelAt<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hb_itemGetNS<span style=\"color: #000000;\">(</span> pPos <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_retl<span style=\"color: #000000;\">(</span> HB_TRUE <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">return</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_retl<span style=\"color: #000000;\">(</span> HB_FALSE <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_HASKEY<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_HASHKEY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> HB_SIZE nPos;<br /> hb_retl<span style=\"color: #000000;\">(</span> hb_hashScanSoft<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, pKey, &nPos <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_storns<span style=\"color: #000000;\">(</span> nPos, <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_ret<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_SETFLAGS<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM nFlags = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_INTEGER <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> nFlags <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_hashSetFlags<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hb_itemGetNI<span style=\"color: #000000;\">(</span> nFlags <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_GETFLAGS<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_retni<span style=\"color: #000000;\">(</span> hb_hashGetFlags<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_CLEARFLAGS<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM nFlags = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_INTEGER <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> nFlags <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_hashClearFlags<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hb_itemGetNI<span style=\"color: #000000;\">(</span> nFlags <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">static</span> void THBHASH_END<span style=\"color: #000000;\">(</span> void <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> hb_itemRelease<span style=\"color: #000000;\">(</span> _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br />HB_FUNC_STATIC<span style=\"color: #000000;\">(</span> THBHASH_ONERROR <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> PHB_ITEM pKey;<br /> char *szKey;<br /> PHB_ITEM hTable = _GETHASH0<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /><br /> hb_vmPushSymbol<span style=\"color: #000000;\">(</span> hb_dynsymSymbol<span style=\"color: #000000;\">(</span> hb_dynsymFindName<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"__GETMESSAGE\"</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushNil<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> hb_vmProc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> pKey = hb_stackReturnItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> szKey = hb_itemGetC<span style=\"color: #000000;\">(</span> pKey <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> szKey <span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">]</span> == <span style=\"color: #ff0000;\">'_'</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// SET</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_itemPutC<span style=\"color: #000000;\">(</span> pKey, szKey + <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>;<br /> hb_hashAdd<span style=\"color: #000000;\">(</span> hTable, pKey, hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_ANY <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span> <span style=\"color: #B900B9;\">// GET</span><br /> <span style=\"color: #000000;\">{</span><br /> HB_SIZE nPos;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hb_hashScan<span style=\"color: #000000;\">(</span> hTable, pKey, &nPos <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> hb_itemReturn<span style=\"color: #000000;\">(</span> hb_hashGetValueAt<span style=\"color: #000000;\">(</span> hTable, nPos <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_xfree<span style=\"color: #000000;\">(</span> szKey <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Añade los metodos de la clase</span><br /><br /><span style=\"color: #00C800;\">static</span> void addMethods<span style=\"color: #000000;\">(</span> HB_USHORT usClassH <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">static</span> HB_SYMB symOnError = <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"ONERROR\"</span>, <span style=\"color: #000000;\">{</span> HB_FS_STATIC <span style=\"color: #000000;\">}</span>, <span style=\"color: #000000;\">{</span> HB_FUNCNAME<span style=\"color: #000000;\">(</span> THBHASH_ONERROR <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">}</span>, <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">}</span>;<br /><br /> <span style=\"color: #B900B9;\">// Data hash</span><br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"_HASH\"</span>, THBHASH_SETHASH <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"HASH\"</span>, THBHASH_GETHASH <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #B900B9;\">// Data flags</span><br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"_FLAGS\"</span>, THBHASH_SETFLAGS <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"FLAGS\"</span>, THBHASH_GETFLAGS <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #B900B9;\">// Metodos</span><br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"NEW\"</span>, THBHASH_NEW <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"SETHASH\"</span>, THBHASH_SETHASH <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"GETHASH\"</span>, THBHASH_GETHASH <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"LEN\"</span>, THBHASH_LEN <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"DEL\"</span>, THBHASH_DEL <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"ADD\"</span>, THBHASH_SET <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"SET\"</span>, THBHASH_SET <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"GET\"</span>, THBHASH_GET <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"CLEAR\"</span>, THBHASH_CLEAR <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"SORT\"</span>, THBHASH_SORT <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"SCAN\"</span>, THBHASH_SCAN <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"KEYS\"</span>, THBHASH_KEYS <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"VALUES\"</span>, THBHASH_VALUES <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"VALUEAT\"</span>, THBHASH_VALUEAT <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"KEYAT\"</span>, THBHASH_KEYAT <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"DELAT\"</span>, THBHASH_DELAT <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"HASKEY\"</span>, THBHASH_HASKEY <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"SETFLAGS\"</span>, THBHASH_SETFLAGS <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"GETFLAGS\"</span>, THBHASH_GETFLAGS <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"CLEARFLAGS\"</span>, THBHASH_CLEARFLAGS <span style=\"color: #000000;\">)</span>;<br /> hb_clsAdd<span style=\"color: #000000;\">(</span> usClassH, <span style=\"color: #ff0000;\">\"END\"</span>, THBHASH_END <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">// Añade el metodo ONERROR como gestor de errores de la clase</span><br /> hb_vmPushSymbol<span style=\"color: #000000;\">(</span> hb_dynsymFindSymbol<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"__CLSADDMSG\"</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushNil<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>;<br /> hb_vmPushInteger<span style=\"color: #000000;\">(</span> usClassH <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushString<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ONERROR\"</span>, <span style=\"color: #0000ff;\">strlen</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ONERROR\"</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushSymbol<span style=\"color: #000000;\">(</span> &symOnError <span style=\"color: #000000;\">)</span>;<br /> hb_vmPushInteger<span style=\"color: #000000;\">(</span> HB_OO_MSG_ONERROR <span style=\"color: #000000;\">)</span>;<br /> hb_vmProc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Funcion de clase para usar desde Harbour</span><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> THBHASH <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">static</span> HB_USHORT usClassH = <span style=\"color: #000000;\">0</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> usClassH == <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> usClassH = hb_clsCreate<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, <span style=\"color: #ff0000;\">\"THBHASH\"</span> <span style=\"color: #000000;\">)</span>;<br /> addMethods<span style=\"color: #000000;\">(</span> usClassH <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> <span style=\"color: #B900B9;\">// Instancia un objeto de la clase THBARRAY y lo mete en la pila</span><br /> hb_clsAssociate<span style=\"color: #000000;\">(</span> usClassH <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">// Asigna el objeto C++ a la data del objeto de xBase</span><br /> hb_arraySetPtr<span style=\"color: #000000;\">(</span> hb_stackReturnItem<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">1</span>, <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//=============================================================================</span><br /><span style=\"color: #B900B9;\">// Inicializa los simbolos de las clase en la tabla de simbolos de harbour.</span><br /><span style=\"color: #B900B9;\">//=============================================================================</span><br /><br />HB_INIT_SYMBOLS_BEGIN<span style=\"color: #000000;\">(</span> THBHASH__InitSymbols <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"THBHASH\"</span>, <span style=\"color: #000000;\">{</span> HB_FS_PUBLIC | HB_FS_LOCAL <span style=\"color: #000000;\">}</span>, <span style=\"color: #000000;\">{</span> HB_FUNCNAME<span style=\"color: #000000;\">(</span> THBHASH <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">}</span>, <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">}</span><br />HB_INIT_SYMBOLS_END<span style=\"color: #000000;\">(</span> THBPGPP__InitSymbols <span style=\"color: #000000;\">)</span><br /><br />#if defined<span style=\"color: #000000;\">(</span> HB_PRAGMA_STARTUP <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00D7D7;\">#pragma</span> startup THBHASH__InitSymbols<br />#elif defined<span style=\"color: #000000;\">(</span> HB_DATASEG_STARTUP <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00D7D7;\">#define</span> HB_DATASEG_BODY HB_DATASEG_FUNC<span style=\"color: #000000;\">(</span> THBHASH__InitSymbols <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbiniseg.h\"</span><br />#endif<br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /> </div>[/code:yk9d0nba]\n\ntest00.prg\n[code=fw:yk9d0nba]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Ejemplo uso de THbHash</span><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br />procedure main <br /><br /> <span style=\"color: #00C800;\">local</span> h := THbHash<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">new</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">local</span> i, c, n<br /><br /> alert<span style=\"color: #000000;\">(</span> valtype<span style=\"color: #000000;\">(</span> h <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> alert<span style=\"color: #000000;\">(</span> valtype<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">getHash</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">for</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">10</span><br /> c := hb_ntos<span style=\"color: #000000;\">(</span> i <span style=\"color: #000000;\">)</span><br /> h:<span style=\"color: #000000;\">set</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"key\"</span> + c, <span style=\"color: #ff0000;\">\"value\"</span> + c <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">next</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Numero de elementos:\"</span>, n:= h:<span style=\"color: #000000;\">len</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /><br /> <span style=\"color: #00C800;\">for</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> n<br /> ? <span style=\"color: #ff0000;\">\"Clave:\"</span>, c := <span style=\"color: #ff0000;\">\"key\"</span> + hb_ntos<span style=\"color: #000000;\">(</span> i <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\"Valor:\"</span>, h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span> c <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">next</span><br /><br /> ? h:<span style=\"color: #000000;\">key1</span>, h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"key1\"</span> <span style=\"color: #000000;\">)</span><br /><br /> h:<span style=\"color: #000000;\">autor</span> := <span style=\"color: #ff0000;\">\"Manu Exposito\"</span><br /> ? h:<span style=\"color: #000000;\">autor</span>, h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"autor\"</span> <span style=\"color: #000000;\">)</span><br /> <br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /> ? <span style=\"color: #ff0000;\">\"Keys:\"</span> <br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">keys</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /> ? <span style=\"color: #ff0000;\">\"Values:\"</span> <br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">values</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /><br /> h:<span style=\"color: #000000;\">end</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> alert<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Fin\"</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span></div>[/code:yk9d0nba]\n\ntest01.prg\n[code=fw:yk9d0nba]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Ejemplo uso de THbHash</span><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br />procedure main <br /><br /> <span style=\"color: #00C800;\">local</span> hash := <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"key1\"</span> => <span style=\"color: #ff0000;\">\"valor1\"</span>, <span style=\"color: #ff0000;\">\"key2\"</span> => <span style=\"color: #ff0000;\">\"valor2\"</span>, <span style=\"color: #ff0000;\">\"key3\"</span> => <span style=\"color: #ff0000;\">\"valor3\"</span><span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">local</span> h := THbHash<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">new</span><span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Numero de elementos:\"</span>, h:<span style=\"color: #000000;\">len</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, len<span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /> <br /> h:<span style=\"color: #000000;\">autor</span> := <span style=\"color: #ff0000;\">\"Manu Exposito\"</span><br /> ? h:<span style=\"color: #000000;\">autor</span>, h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"autor\"</span> <span style=\"color: #000000;\">)</span><br /><br /> hash<span style=\"color: #000000;\">[</span> <span style=\"color: #ff0000;\">\"prueba\"</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #ff0000;\">\"prueba desde fuera\"</span><br /> <br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /> ? <span style=\"color: #ff0000;\">\"Keys:\"</span> <br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">keys</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /> ? <span style=\"color: #ff0000;\">\"Values:\"</span> <br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">values</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /> ? <span style=\"color: #ff0000;\">\"Todo:\"</span><br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /><br /> h:<span style=\"color: #000000;\">end</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Todo despues del end:\"</span><br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /><br /> alert<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Fin\"</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span><br /> </div>[/code:yk9d0nba]\n\ntest02.prg\n[code=fw:yk9d0nba]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Ejemplo uso de THbHash</span><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br />procedure main <br /><br /> <span style=\"color: #00C800;\">local</span> hash := <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"key1\"</span> => <span style=\"color: #ff0000;\">\"valor1\"</span>, <span style=\"color: #ff0000;\">\"key2\"</span> => <span style=\"color: #ff0000;\">\"valor2\"</span>, <span style=\"color: #ff0000;\">\"key3\"</span> => <span style=\"color: #ff0000;\">\"valor3\"</span><span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">local</span> h := THbHash<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">new</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Numero de elementos:\"</span>, h:<span style=\"color: #000000;\">len</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, len<span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /> <br /> h:<span style=\"color: #000000;\">setHash</span><span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Numero de elementos:\"</span>, h:<span style=\"color: #000000;\">len</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, len<span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /><br /> h:<span style=\"color: #000000;\">autor</span> := <span style=\"color: #ff0000;\">\"Manu Exposito\"</span><br /> ? h:<span style=\"color: #000000;\">autor</span>, h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"autor\"</span> <span style=\"color: #000000;\">)</span><br /> <br /> hash<span style=\"color: #000000;\">[</span> <span style=\"color: #ff0000;\">\"prueba\"</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #ff0000;\">\"prueba desde fuera\"</span><br /> <br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /> ? <span style=\"color: #ff0000;\">\"Keys:\"</span> <br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">keys</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /> ? <span style=\"color: #ff0000;\">\"Values:\"</span> <br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">values</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /> ? <span style=\"color: #ff0000;\">\"Todo:\"</span><br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /><br /> h:<span style=\"color: #000000;\">end</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Todo despues del end:\"</span><br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> hash <span style=\"color: #000000;\">)</span><br /><br /> alert<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Fin\"</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span><br /> </div>[/code:yk9d0nba]\n\ntest03.prg\n[code=fw:yk9d0nba]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #B900B9;\">// Ejemplo usu de THbHash</span><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br />procedure main <br /><br /> <span style=\"color: #00C800;\">local</span> h := THbHash<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">new</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">local</span> i, c, cKey<br /> <br /> CLS<br /><br /> h:<span style=\"color: #000000;\">cAuthor</span> := <span style=\"color: #ff0000;\">\"Manu Exposito\"</span><br /> ? <span style=\"color: #ff0000;\">\"Author: \"</span>, h:<span style=\"color: #000000;\">cAuthor</span>, <span style=\"color: #ff0000;\">\"Key con mayusculas y minusculas:\"</span>, h:<span style=\"color: #000000;\">cAuThOr</span><br /> h:<span style=\"color: #000000;\">cAuthor</span> := <span style=\"color: #ff0000;\">\"YO Exposito\"</span><br /><br /> ? <span style=\"color: #ff0000;\">\"valtype( h ) => \"</span>, valtype<span style=\"color: #000000;\">(</span> h <span style=\"color: #000000;\">)</span> , <span style=\"color: #ff0000;\">\" | \"</span><br /> ?? <span style=\"color: #ff0000;\">\"valtype( h:getHash() ) => \"</span>, valtype<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">getHash</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /><br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /> ? <span style=\"color: #ff0000;\">\"List of Methods:\"</span><br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> __objGetMethodList<span style=\"color: #000000;\">(</span> h <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">for</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">10</span><br /> c := hb_ntos<span style=\"color: #000000;\">(</span> i <span style=\"color: #000000;\">)</span><br /> h:<span style=\"color: #000000;\">set</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"key\"</span> + c, <span style=\"color: #ff0000;\">\"value\"</span> + c <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">next</span><br /><br /> h:<span style=\"color: #000000;\">key1</span> := <span style=\"color: #000000;\">{</span> <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">}</span><br /> h:<span style=\"color: #000000;\">add</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"key11\"</span>, <span style=\"color: #000000;\">{</span>|| alert<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"Fin!\"</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">)</span><br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /> ? <span style=\"color: #ff0000;\">\"Delete key10. => h:del('key10') => \"</span>, h:<span style=\"color: #000000;\">del</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"key10\"</span> <span style=\"color: #000000;\">)</span><br /> ? <span style=\"color: #ff0000;\">\"Scan the key5 => h:scan('key5') => \"</span>, hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">scan</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"key5\"</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\" ( Return value in key5 ) \"</span><br /> ? <span style=\"color: #ff0000;\">\"Value in position 6 => h:valueAt( 6 ) => \"</span>, hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">valueAt</span><span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">6</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> ? <span style=\"color: #ff0000;\">\"Is defined 'key8'? => h:hasKey('key8') => \"</span>, h:<span style=\"color: #000000;\">hasKey</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"key8\"</span> <span style=\"color: #000000;\">)</span><br /><br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /> ? <span style=\"color: #ff0000;\">\"Number of elements:\"</span>, hb_ntos<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">len</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Keys:\"</span> <br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">keys</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /> ? <span style=\"color: #ff0000;\">\"Values:\"</span> <br /> ? hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #000000;\">values</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /><br /> ? <span style=\"color: #ff0000;\">\"------------------------------------------------------\"</span><br /> <span style=\"color: #00C800;\">FOR</span> EACH cKey IN h:<span style=\"color: #000000;\">Keys</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> ? cKey, <span style=\"color: #ff0000;\">\"=>\"</span> , hb_valtoexp<span style=\"color: #000000;\">(</span> h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span>cKey<span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">if</span> hb_isBlock<span style=\"color: #000000;\">(</span> h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span>cKey<span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> ; EVAL<span style=\"color: #000000;\">(</span> h:<span style=\"color: #0000ff;\">get</span><span style=\"color: #000000;\">(</span>cKey<span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> ; <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> h:<span style=\"color: #000000;\">end</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span><br /> </div>[/code:yk9d0nba]\n\n\nSaludos cordiales.",
"time": "03:42",
"topic": "Class THash",
"username": "riztan"
}
] |
Class THash
|
[
{
"date": "2023-11-05",
"forum": "Utilities / Utilidades",
"text": "Actualizado:\n\n<!-- m --><a class=\"postlink\" href=\"https://github.com/riztan/harbour-utilitis/tree/main/thbhash\">https://github.com/riztan/harbour-utili ... in/thbhash</a><!-- m -->\n\n\nSaludos!",
"time": "17:05",
"topic": "Class THash",
"username": "riztan"
}
] |
Class THash
|
[
{
"date": "2023-11-05",
"forum": "Utilities / Utilidades",
"text": "Querido Ritzan,\n\ngracias! <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "19:35",
"topic": "Class THash",
"username": "Antonio Linares"
}
] |
Class THash
|
[
{
"date": "2023-11-06",
"forum": "Utilities / Utilidades",
"text": "Hola a todos,\n\nAntes de nada vaya por delante mi respeto y admiración por el trabajo de Manu Expósito, yo sigo utilizando su fantástica clase TDBF (en sintaxis prg no en c).\n(Perdona Manu, te debo una respuesta desde hace tiempo, pero no doy más de mi).\n\nNo tengo ni nociones de 'C'; si que me desenvuelvo bastante bien con código en sintaxis PRG.\n\nPor lo expuesto sólo puedo apuntarme a la clase que provea FiveTech, tanto da si es en C como en PRG, pero que forme parte de su producto.\nNecesito poder actualizarme a las nuevas versiones de Harbour y FWH sin contratiempos. El tiempo que puedo dedicar a \"investigar\" cuando \"sucede algo\" es muy limitado.\n\nYo no soy capaz de modificar/ampliar/mantener una clase en C, de ahí esa decisión.\n\nOs acordáis de TSBrowse? Pués ahí estamos.\n\nAún así agradezco muchísimo (no os lo imagináis), el que personas como Ustedes esten investigando y desarrollando en este campo.\n\nUn abrazo,",
"time": "11:50",
"topic": "Class THash",
"username": "FiveWiDi"
}
] |
Class THash
|
[
{
"date": "2016-04-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I tried to correct the errors I found to compile my class with Harbour \n\nsee my github",
"time": "17:14",
"topic": "Class TLed for Harbour",
"username": "Silvio.Falconi"
}
] |
Class TLed for Harbour
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello,\n\nTry this simple:\n\n[code=fw:2028s1ij]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">static</span> oWnd<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> oTmr, oSay, oFnt<br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oFnt <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Fixedsys Normal\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">-30</span><br /><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"Prueba\"</span><br /><br /> @ <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">2</span> <span style=\"color: #0000ff;\">SAY</span> oSay <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"La hora es \"</span>+time<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">COLOR</span> <span style=\"color: #ff0000;\">\"GR+/W*\"</span> <span style=\"color: #0000ff;\">FONT</span> oFnt <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">450</span>, <span style=\"color: #000000;\">150</span><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">TIMER</span> oTmr <span style=\"color: #0000ff;\">INTERVAL</span> <span style=\"color: #000000;\">700</span> <span style=\"color: #0000ff;\">ACTION</span> ChangeColor<span style=\"color: #000000;\">(</span> oSay <span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">OF</span> oWnd<br /><br /> <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">TIMER</span> oTmr<br /><br /> <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd<br /><br /> oFnt:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">function</span> ChangeColor<span style=\"color: #000000;\">(</span> oSay <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">static</span> lStatus := .F.<br /> <span style=\"color: #00C800;\">static</span> lStatus1 := .F.<br /><br /> <span style=\"color: #00C800;\">if</span> lStatus<br /> oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"GR+/W*\"</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">else</span><br /> oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"b+/W*\"</span> <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">endif</span><br /><br /> oSay:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> lStatus = ! lStatus<br /> lStatus1 = ! lStatus<br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /> </div>[/code:2028s1ij]\n\n\nSilvio, why don´t you share your class?.",
"time": "12:01",
"topic": "Class TLed from Silvio Falconi",
"username": "lucasdebeltran"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"lucasdebeltran\":1x3ugt4p]Hello,\n\n\nSilvio, why don´t you share your class?.[/quote:1x3ugt4p]\n\nbecause I'm still working with this class\nbecause I have not yet finished creating the class\n\nporque todavía estoy trabajando con esta clase\nporque todavía no he terminado de crear la clase",
"time": "12:07",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi dear friend Silvio Falconi:\n\nUps <!-- s:oops: --><img src=\"{SMILIES_PATH}/icon_redface.gif\" alt=\":oops:\" title=\"Embarassed\" /><!-- s:oops: --> <!-- s:oops: --><img src=\"{SMILIES_PATH}/icon_redface.gif\" alt=\":oops:\" title=\"Embarassed\" /><!-- s:oops: --> yesterday I was looking for documentation to learn how to make classes and found this\n\n[url:1zbom8sp]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=26368&hilit=tled[/url:1zbom8sp]\n[url:1zbom8sp]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=26419&hilit=tled[/url:1zbom8sp]\n[url:1zbom8sp]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=26368&hilit=tled[/url:1zbom8sp]\n[url:1zbom8sp]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=32223[/url:1zbom8sp]\nsorry , I did not know that the sources had a right reserved, sorry for my bad English",
"time": "13:03",
"topic": "Class TLed from Silvio Falconi",
"username": "cuatecatl82"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Greetings to the community :\n\nSomeone will tled Silvio Falconi Have the class , functional forum esta sources but I found no examples of how to use it via recuros ..\n\nMaybe Silvio provide it .. Could Greetings",
"time": "04:05",
"topic": "Class TLed from Silvio Falconi",
"username": "cuatecatl82"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I not provide the sources for now ( I'm working to correct some bugs) , sorry...it have a copyright \nI never publish the sources on this forum ...where you take my sources ?\n\nEstimado señor nunca he publicado el código fuente de esta clase, usted podría decirme dónde sacó mis fuentes",
"time": "10:00",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Why i must share or publish somethings is not correct. Tled class not work also good.Tomorrow Isent all my sources to ANTONIO and he'll deecide to share or publish it or not.\nThank to all my friends for the regarding messages \n. U are the real friends...I LOVE YOU ALL SO MUCH",
"time": "22:17",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Equivocarse es de humanos, pero de sabios aceptarlo y corregirlo. La humildad es un DON...Imagino que todos estamos equivocados en relacion a tu comportamiento para con el foro...70 veces 7...disculpa...saludos... <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: -->",
"time": "22:25",
"topic": "Class TLed from Silvio Falconi",
"username": "joseluisysturiz"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "+1",
"time": "22:36",
"topic": "Class TLed from Silvio Falconi",
"username": "karinha"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"karinha\":28qzcrr3]+1[/quote:28qzcrr3]\n\n\n++++1",
"time": "23:05",
"topic": "Class TLed from Silvio Falconi",
"username": "ACC69"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "+++++++++++1\n\nGood sarcasm... So, that's my last post about this... not worth it.",
"time": "00:07",
"topic": "Class TLed from Silvio Falconi",
"username": "Kleyber"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I not see my sources on these topicw but you wrrote you founded my sources",
"time": "13:53",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Victor Daniel wrote :\n\n[color=#0000FF:1cgc5qbf][b:1cgc5qbf]I did not know that the sources had a right reserved[/b:1cgc5qbf][/color:1cgc5qbf]\n\nI don't understand the problem\nAs soon I'm publishing a solution inside the forum, sharing my experience, \nI think [size=150:1cgc5qbf]it is nonsense [/size:1cgc5qbf] talking about copyrights as long it is my own created solution\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->",
"time": "15:44",
"topic": "Class TLed from Silvio Falconi",
"username": "ukoenig"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"ukoenig\":9i0dtsru]Victor Daniel wrote :\n\n[color=#0000FF:9i0dtsru][b:9i0dtsru]I did not know that the sources had a right reserved[/b:9i0dtsru][/color:9i0dtsru]\n\nI don't understand the problem\nAs soon I'm publishing a solution inside the forum, sharing my experience, \nI think [size=150:9i0dtsru]it is nonsense [/size:9i0dtsru] talking about copyrights as long it is my own created solution\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->[/quote:9i0dtsru]\n\nYou're right Uwe. \nEspecially when the copyright belongs to someone who is not even able to boil water without the help of this forum.",
"time": "15:59",
"topic": "Class TLed from Silvio Falconi",
"username": "Massimo Linossi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thanks partners..",
"time": "16:32",
"topic": "Class TLed from Silvio Falconi",
"username": "cuatecatl82"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Massimo Linossi\":2h43a2pg][quote=\"ukoenig\":2h43a2pg]Victor Daniel wrote :\n\n[color=#0000FF:2h43a2pg][b:2h43a2pg]I did not know that the sources had a right reserved[/b:2h43a2pg][/color:2h43a2pg]\n\nI don't understand the problem\nAs soon I'm publishing a solution inside the forum, sharing my experience, \nI think [size=150:2h43a2pg]it is nonsense [/size:2h43a2pg] talking about copyrights as long it is my own created solution\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->[/quote:2h43a2pg]\n\nYou're right Uwe. \nEspecially when the copyright belongs to someone who is not even able to boil water without the help of this forum.[/quote:2h43a2pg]\n\n\nVery good Mássimo.\n\nPorquê você nunca contribui com nada Silvio?\n\nWhy you never contributes anything Silvio?\n\nPor eso nunca, no aporta nada Silvio?\n\nPerché non contribuisce nulla Silvio?\n\nRegards, saludos.",
"time": "17:52",
"topic": "Class TLed from Silvio Falconi",
"username": "karinha"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "sin animo de crear polemicas,\npienso que los foros de fwh son para ayudar a los compañeros con sus problemas y para mejorar fwh.\n\nsin embargo existen algunos que son un poco reacios a compartir sus \"soluciones\", y en esto sobresale silvio.\ntengo claro que hay algunas cosas que nos reservamos para nosotros mismo y cada quien tiene ese derecho, pero no me perece la forma de responderle a un usuario que solicita ayuda,\ncuando como dice el dicho \"..arrieros somos y el el camino andamos..\" \n\npero es comun ver a silvio a la defensiva, como en esta ocacion, la verdad es que se ve y se sienten como si de echo le robaran algo que de alguna forma muchos contribuyeron \na construir y/o mejorar con sus post de ayuda.\n\nes algo contradictorio verlo en algunos post pidiendo ayuda para desarrollar tal o cual cosa, lo cual luego tienen \"derechos reservados\".\nes comun que cuando alguen le pregunta si lo puede compartir responda con que \"esta aun en desarrollo\" o esa clase la hice con otra persona y esa no autoriza, como recuerdo sucedio hace mucho tiempo.\n\nyo hace mucho tiempo de silvio no espero sino peticiones de ayuda y soporte nada mas. \ncomo decimos aca \"no pidamos peras al olmo, no esta en su naturaleza.\"\n\nespero que la diferencia de idioma no afecte mucho de lo que deseo expresar.\n\nsalu2\ncarlos vargas",
"time": "18:52",
"topic": "Class TLed from Silvio Falconi",
"username": "carlos vargas"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Sure.\nI've seen so many times that this genius created a new class, but needs the 99% of work that must be made by Antonio or others.\nHe wrote a function that is not working, someone else wrote a lot of lines for solving his problem, but he didn't understand. \nAnd for this reason the function \"not run\".\nMy hamster is a better programmer, and a better interlocutor.",
"time": "19:24",
"topic": "Class TLed from Silvio Falconi",
"username": "Massimo Linossi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Traduzido para português\n\nTranslated to Portuguese\n\nMassimo Linossi wrote(escreveu)\n\nCerto.\n\nEu vi tantas vezes que este gênio criou uma nova classe, mas precisa de 99% do trabalho que deve ser feito por Antonio ou outros.\n\nEle escreveu uma função que não está funcionando, alguém escreveu um monte de linhas para resolver o seu problema, mas ele não entendeu.\nE por esta razão a função \"não executar\".\n\nMeu hamster(rato) é um programador melhor, e um melhor interlocutor.\n\n\nRegards, saludos.",
"time": "19:52",
"topic": "Class TLed from Silvio Falconi",
"username": "karinha"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"carlos vargas\":2ev4retu]sin animo de crear polemicas,\npienso que los foros de fwh son para ayudar a los compañeros con sus problemas y para mejorar fwh.\n\nsin embargo existen algunos que son un poco reacios a compartir sus \"soluciones\", y en esto sobresale silvio.\ntengo claro que hay algunas cosas que nos reservamos para nosotros mismo y cada quien tiene ese derecho, pero no me perece la forma de responderle a un usuario que solicita ayuda,\ncuando como dice el dicho \"..arrieros somos y el el camino andamos..\" \n\npero es comun ver a silvio a la defensiva, como en esta ocacion, la verdad es que se ve y se sienten como si de echo le robaran algo que de alguna forma muchos contribuyeron \na construir y/o mejorar con sus post de ayuda.\n\nes algo contradictorio verlo en algunos post pidiendo ayuda para desarrollar tal o cual cosa, lo cual luego tienen \"derechos reservados\".\nes comun que cuando alguen le pregunta si lo puede compartir responda con que \"esta aun en desarrollo\" o esa clase la hice con otra persona y esa no autoriza, como recuerdo sucedio hace mucho tiempo.\n\nyo hace mucho tiempo de silvio no espero sino peticiones de ayuda y soporte nada mas. \ncomo decimos aca \"no pidamos peras al olmo, no esta en su naturaleza.\"\n\nespero que la diferencia de idioma no afecte mucho de lo que deseo expresar.\n\nsalu2\ncarlos vargas[/quote:2ev4retu]\n\n[Español]\nYo pensaba que era el unico a tener este pensamiento sobre el... gracias Carlos.\n\n[English]\nI thought I was the only one who have this thinking about him... thanks Carlos.",
"time": "20:49",
"topic": "Class TLed from Silvio Falconi",
"username": "Kleyber"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pues ya sabemos que no, aca en mi pais hay un dicho \"es como el zamuro..come de todos pero nadie come de el...\", he visto compañeros compartiendo aplicaciones completas sin esperar nada a cambio, hasta el mismo Antonio regalo hace tiempo versiones de FWH solo porque publicaramos IMAGENES de nuestras aplicaciones desarrolladas con FWH, el problema con el Sr. Silvio como ya han comentado muchos de que pide ayuda para resolver y mejorar sus aplicaciones y luego no es capaz de compartir lo que de una forma u otra ayudo el foro a resolver...es su forma de tratar a los demas colegas del foro...sin ganas de hecharle mas agua a lo mojado, una vez intente ayudar en una consulta que el habia publicado y por lo visto no entendi bien su necesidad y respondio que leyera bien o algo parecido, a lo cual Daniel Garcia le respondio que esa no era la forma de tratar a un colega del foro y que todos merecemos respeto...pero bueno...ya veo que todos sabemos de como es Silvio, esperemos que estas opiniones lo hagan ser un poco mas considerado y respetuoso con los demas colega del foro...nadie le pide que regale o publique sus aplicaciones porque sabemos que es su medio de trabajo...pero si alguien busca algo que ya este resuelto por ayuda de todos....creo no deberia ser problema COMPARTIRLO...gracias..saludos... <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> \n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25621\">viewtopic.php?f=3&t=25621</a><!-- l -->",
"time": "21:33",
"topic": "Class TLed from Silvio Falconi",
"username": "joseluisysturiz"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "To All\n\n\n[b:1eqa9u5b]Very kind gentlemen before you shoot zero against me ..[/b:1eqa9u5b]\n\nYou must [b:1eqa9u5b]first reflect and read the topic[/b:1eqa9u5b] carefully from the first message, [b:1eqa9u5b]not just only the last my message.[/b:1eqa9u5b] \n\n\n\n[b:1eqa9u5b]Mr. cuatecatl82 ask to me :[/b:1eqa9u5b] \n\n[quote:1eqa9u5b]\"Someone will tled Silvio Falconi Have the class , \nfunctional forum esta sources but I found no examples of how to use it [u:1eqa9u5b]via recuros[/u:1eqa9u5b] \"[/quote:1eqa9u5b]\n\n\nIf Mr. cuatecatl82 me who asks support to insert the tled object into his application because [b:1eqa9u5b] it fails to include in the class tLed on resource[/b:1eqa9u5b] \n\nso unfortunately I understand that someone gave my class to Mr. cuatecatl82 without my permission because I never publish my sources into forums of fivetech\n\nwhy I understood this ?\n\nI understand this because the old versions of my tLed class never had defined the \"redefine\" method !!!!\n\n\nWhen I ask Mr. cuatecatl82 [b:1eqa9u5b]where he got my sources[/b:1eqa9u5b], Mr. cuatecatl82 lists five or six topics of the forum where really are not described class tLed sources but questions of malfunction\n\n in the implementation of my class.\n\n[b:1eqa9u5b][size=150:1eqa9u5b]So I understand only one thing:[/size:1eqa9u5b] someone gave my sources on Mr. cuatecatl82 without my permission \nand now Mr. cuatecatl82 is in trouble because it can not run my class in its programs.[/b:1eqa9u5b]\n\n\n[b:1eqa9u5b]What would you see I have to think? [/b:1eqa9u5b]\n\n[b:1eqa9u5b]Is it a criminal offense, or I misunderstood the words of Mr. cuatecatl82?[/b:1eqa9u5b]\n\nSo Good ..go...\n\n[b:1eqa9u5b]When Mr lucasdebeltran ask[/b:1eqa9u5b] me [quote:1eqa9u5b]\"Silvio, why don´t you share your class?\" [/quote:1eqa9u5b] \n\nI understand that Mr. Lucadebeltran [u:1eqa9u5b]has not understood what is the real problem [/u:1eqa9u5b]\n\nand then I explain to Mr. lucasdebeltran that I'm still working on it because the class has many operational errors.\n\n\n\n\n[b:1eqa9u5b]when Mr Uwe wrote [/b:1eqa9u5b]\n\n[quote:1eqa9u5b]\"I think it is nonsense talking about copyrights\" [/quote:1eqa9u5b]\n\n[u:1eqa9u5b]does not understand what's the problem, the problem is not the copyright, The problem is another[/u:1eqa9u5b]\n\n\n\n\n[b:1eqa9u5b]Even Mr. Massimo \"Wheels\" Linossi wrong when he wrote his message[/b:1eqa9u5b] \n \n[quote:1eqa9u5b]\"Especially when the copyright belongs to someone who is not even able to boil water without the help of this forum\"\" [/quote:1eqa9u5b]\n\nHonestly I have never been able to work with a class created by Massimo Linossi in 20 years that use the Fivewin,\n\n[b:1eqa9u5b] I've never seen one source as does this gentleman Massimo \"wheels\" Linossi to demand it from me?[/b:1eqa9u5b]\n\n\n\nAlso Mr. karina [u:1eqa9u5b]does not understand what the problem[/u:1eqa9u5b] is and writes other offensive messages\n\n\n[b:1eqa9u5b]That no one can understand what is the [size=150:1eqa9u5b]problem[/size:1eqa9u5b]?[/b:1eqa9u5b]\n\n\n\nBut there are not end there other people who in order to tarnish the undersigned write offensive messages and other nonsense\n\n\n[b:1eqa9u5b]Dear Mr. Carlos vargas you also tell me about copyright, \nthat really you can not understand what is the problem?[/b:1eqa9u5b]\n\n\nEven Mr. Massimo \"Wheels\" Linossi offends me why compare me to [b:1eqa9u5b] his[size=200:1eqa9u5b] hamster[/size:1eqa9u5b][/b:1eqa9u5b]\n\nbut dear Mr. Massimo has never done a class? where you have published it?\nI've never seen ... ahhh now I remember your class have given it to [b:1eqa9u5b]your[size=150:1eqa9u5b] hamster[/size:1eqa9u5b][/b:1eqa9u5b] and you have never published it here\n\n\n[b:1eqa9u5b]even Mr Kleyber when wrote[/b:1eqa9u5b] [quote:1eqa9u5b]\"I thought I was the only one who have this thinking about him.\"[/quote:1eqa9u5b] [b:1eqa9u5b]offends me[/b:1eqa9u5b] \n\n\n\n\n[b:1eqa9u5b]even Mr joseluisysturiz when wrote[/b:1eqa9u5b] this message [u:1eqa9u5b]he not understood the problem[/u:1eqa9u5b] \n\n[quote:1eqa9u5b]\"Pues ya sabemos que no, aca en mi pais hay un dicho \"es como el zamuro..come de todos pero nadie come de el...\",\n he visto compañeros compartiendo aplicaciones completas sin esperar nada a cambio, hasta el mismo Antonio regalo hace \ntiempo versiones de FWH solo porque publicaramos IMAGENES de nuestras aplicaciones desarrolladas con FWH, \nel problema con el Sr. Silvio como ya han comentado muchos de que pide ayuda para resolver y mejorar sus aplicaciones\n y luego no es capaz de compartir lo que de una forma u otra ayudo el foro a resolver...\nes su forma de tratar a los demas colegas del foro...sin ganas de hecharle mas agua a lo mojado, \nuna vez intente ayudar en una consulta que el habia publicado y por lo visto no entendi bien su necesidad\n y respondio que leyera bien o algo parecido, a lo cual Daniel Garcia le respondio que esa no era la forma de \ntratar a un colega del foro y que todos merecemos respeto...pero bueno...ya veo que todos sabemos de como es Silvio, \nesperemos que estas opiniones lo hagan ser un poco mas considerado y respetuoso con los demas colega del foro..\n.nadie le pide que regale o publique s\nus aplicaciones porque sabemos que es su medio de trabajo...\npero si alguien busca algo que ya este resuelto por ayuda de todos....creo no deberia ser problema COMPARTIRLO...gracias..saludos.[/quote:1eqa9u5b]\n\n\nMr. joseluisysturiz [b:1eqa9u5b]not only did not understand the problem[/b:1eqa9u5b] but lists an oldest topic when I asked for help from Daniel. \n\nall you need to carefully read the last message which I explain what happened.\n \nMr. Ariel and Mr. joseluisysturiz have certainly responded in support of my difficulty \nbut they [b:1eqa9u5b]have not understood what was the subject that I wondered in that message[/b:1eqa9u5b]\n\nAs I sad onlast mesage of this topic \n [b:1eqa9u5b]\"Someone does not read well my questions, and not knowing how to respond tries to answer my questions with other arguments, without realizing that the subject was indeed another[/b:1eqa9u5b]\"\n\nMr. jose luis isturiz[b:1eqa9u5b] increases the twelve [/b:1eqa9u5b] with another ofensive message \n\n[quote:1eqa9u5b]\"Equivocarse es de humanos, pero de sabios aceptarlo y corregirlo. La humildad es un DON...\nImagino que todos estamos equivocados en relacion a tu comportamiento para con el foro...70 veces 7...disculpa...saludos.\"[/quote:1eqa9u5b]\n\n\nDear Mr. joseluisIsturiz not understand my behavior towards the forum, \nthis is very strange ... [b:1eqa9u5b]really I think that no one has yet figured out what the problem or I were all taking the piss?[/b:1eqa9u5b]\n\nthen karinha (+1) and ACC69( ++++1) \n\nand Kleyber( +++++++++++1) \n[quote:1eqa9u5b]\"Good sarcasm... So, that's my last post about this... not worth it.\"[/quote:1eqa9u5b]\n\n\n[b:1eqa9u5b]Not [size=150:1eqa9u5b]worth it[/size:1eqa9u5b] to do what?[/b:1eqa9u5b]\n\n[b:1eqa9u5b]All this is amazing how people pretend to understand what the problem .....Honestly as I wrote to Antonio Linares I am tired of reading these messages offensive to people who have not figured out what is the problem and frankly at this point no one else would publish and never would share a class in my place.[/b:1eqa9u5b]\n\n[b:1eqa9u5b]and I remain to read the offensive messages like an idiot in front of my computer because no one has really figured out what is the problem !!![/b:1eqa9u5b]\n\nIncredible !!!\n\n\nYou all want my class T Led..ok\n\n[b:1eqa9u5b]But seriously do yourself a question in your heart ...[/b:1eqa9u5b]\n\n[b:1eqa9u5b]You truly deserve the TLED class of Silvio? (after all your offensive messages ?) [/b:1eqa9u5b]\n\nSo Good !!!\n\nWhen all of [b:1eqa9u5b]you will demonstrate[/b:1eqa9u5b] to myself that what I read were only taken for a ride and not offensive messages \nand [b:1eqa9u5b]only then when I will finish the class TLED[/b:1eqa9u5b] I publish my class !!!\n\n\nRegarding copyrights in Italy unlike the other world countries when one works at a firm does not own sources but it is the same name of the owner of the source, \n[b:1eqa9u5b]so I could not publish tled without the authorization of this company in which I worked my performance[/b:1eqa9u5b].\n\nU all are Very kind gentlemen, ... thank you so much \n\nBest Regards",
"time": "16:27",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Could we please end this thread ?\n\nI often tell my friends about this FiveTech community. I tell them that people here come from all over the world, with many different cultures, politics, religions ... and yet everyone is courteous and helpful to everyone else. This community is an example of how we can all respect each other even if we have differences.\n\nPlease, lets not lose that. I've been programming in xbase for almost 34 years, and yet when I come here I still learn new things every day. As I grow older, my eyesight isn't as good, I forget things, and I have to study hard to learn new technologies and methods. It is with the help of all the people on this forum that I can still be a benefit to all of my clients, and I thank you.\n\nPlease ... lets stay nice, and I thank all of you for the help you give me along this journey. It allows me to still work, and that income allows me to help others as they face some real crisis in their lives. \n\nTim",
"time": "18:44",
"topic": "Class TLed from Silvio Falconi",
"username": "TimStone"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[b:36d8t8p2]Tim what you said is right[/b:36d8t8p2] but w[b:36d8t8p2]hat happened is wrong[/b:36d8t8p2].\n\nI can be gentle to community and I had decided also to publish the tled class as recommended by Antonio Linares this morning at rivate email, but I do not care ... \n\ndear tim what would you do? (After receiving continuous offenses)",
"time": "18:50",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "...y vivieron todos felices...!!!\n\n *** FIN ***\n\n CopyRight(c) FTS - 2016",
"time": "21:07",
"topic": "Class TLed from Silvio Falconi",
"username": "joseluisysturiz"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "<!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: -->",
"time": "23:18",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Ok pongo punto final a este asunto con Silvio Falconi, como decimos aqui en México: Ya estuvo suave...\n\nEmpezar y espero que tengas la capacidad necesaria para que puedas entenderlo:\n\nNo tengo ningun archivo fuente de tu clase TLed, ni de ninguna Clase de tu propiedad con derechos\nreservados como tu le llamas, y si la tuviera no te estuviera \"solicitando\" que la compartas, tengo \nla capacidad de entender como se hace una clase desde cero o para hacerla o mejorarla..\n\nPuse los enlaces de los lugares donde la encontre porque de ahi los tome, y si te fijas bien: tu mismo\nlas escribiste y si bien sabes cuando escribes código de tus programas en un mensaje \"público\" entre nosotros \nque somo usuarios de Fivewin, obviamente el texto lo estas compartiendo con todos los que lleguen a leer tu mensaje\neste solucionado o no, y tu codigo pertenece a quien lo leea y lo guarde, todos en algun momento copiamos código del foro, \nlo compilamos y si nos gusta o nos hace util lo guardamos para usarlo después, dime tu no lo haz hecho..?\n\nMe gusta aprender todos los dias cosas nuevas y más de amigos que hablan el mismo lenguaje de programación, tambien me gusta\nser agradecido con los colegas y compartir lo que aprendo y lo que tengo, y cuando tengo problemas: aprender de mis errores\ny que sin ayuda de todos en este foro no podria solucionar.\n\n\nSin embargo tu entiendes y piensas que tengo tu Clase TLed y que te la estoy robando, Silvio estas muy equivocado...\n\nPara finalizar quiero decirte y pedirte:\n\nSi realmente gustas de compartir tu trabajo y tus conocimientos en este foro: \nque en cuanto tengas tu Clase TLed funcionando,terminada o en fase de pruebas y si te nace de corazón compartirla hazlo, \nTe aseguro que muchos te lo vamos a agradecer entre ellos yo, y seguro entre todos haremos más funcional y efectivo \ntu trabajo y tu esfuerzo.\n\nSi no la quieres compartir pues no lo hagas, nadie te va a suplicar por unas lineas de texto, pero tampoco se vale fastidiar al \nforo preguntando tus dudas para solucionar tus problemas sin dar nada a cambio, y más reclamandonos que no te entendemos y que no \nsolucionamos tus problemas.\n\nEl foro es para ayudarnos entre todos, aprender y mejorar nuestro trabajo, tambien para presumir lo que sabemos hacer...\nPorque no? es agradable cuando te elogian por tu trabajo, pero cuando compartes y eres gradecido, si no sería se egoista.\n\nSomos muchos los que tenemos la capacidad de hacer una Clase como la tuya, si no igual seguro mejor, de mi parte no tendras\nun no como respuesta cuando me solicites ayuda.\n\nEspero no te molestes y que esto quede hasta aqui. Perdón y mil Disculpas Maestro Antonio..\n\nSaludos..\n\n/*/**////*/*/*/*//*/////*/*\n\nOk I put an end to this matter with Silvio Falconi, as we say here in Mexico : It was soft ...\n\nStart and hope you have the capacity to be able to understand :\n\nI do not have any source of your file tled class , or any class of your property rights\nreserved as you call him , and if I did not I was \" asking \" to share it , I have\nthe ability to understand how a class is made from scratch or to make it or improve it...\n\nI put the links of places where I found her there because of the take , and if you look closely : yourself\nYou wrote them and while you know when you write your program code in a \"public\" message among us\nI somo users Fivewin obviously the text you are sharing with all who come to read your message\nThis solved or not, and your code belongs to whoever leea and keep it all at some point we copied the forum code ,\ncompile it and if we like it or makes us useful we keep it for later use , so do not tell me you done .. ?\n\nI like learning new things every day and more than friends who speak the same language programming , I also like\nbe grateful to colleagues and share what I learn and what I have, and when I have problems : learn from my mistakes\nand without the help of everyone in this forum could not solve.\n\nHowever you understand and you think you have your class and you tled I 'm stealing , Silvio these very wrong ...\n\nFinally I want to say and ask :\n\nIf you really like you to share your work and your knowledge in this forum :\nthat once you have your tled working class , completed or undergoing testing and if you do share is born of heart ,\nI assure you that many of us will thank you including me , and insurance among all do more functional and effective\nyour work and effort.\n\nIf you do not want to share then do not do it , nobody will beg for a few lines of text, but neither is it annoy the\nforum asking your questions to solve your problems without giving anything in return , and claiming us you do not understand and do not\nWe solve your problems.\n\nThe forum is to help each other , learn and improve our work , and also to show off what we do ...\nWhy not? It is nice when you praise for your work, but when you share and gradecido are, whether it would be selfish.\n\nMany of us have the ability to make a class like yours, if not equal safe better of me not tendras\nno answer when requesting help me .\n\nI hope not to bother and that this remains up here . Forgiveness and Apologies thousand Maestro Antonio ..\n\nRegards..\n\nPd. Use google translator for you to understand your language ..",
"time": "02:33",
"topic": "Class TLed from Silvio Falconi",
"username": "cuatecatl82"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "\"Wheels\" ???\nYes, I'm disabled and on wheels, or better in a wheelchair because I had a skiing accident.\nAnd what are your apologies, mr. \"not run woodenhead\" ?",
"time": "08:10",
"topic": "Class TLed from Silvio Falconi",
"username": "Massimo Linossi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Please: respect and collaboration",
"time": "11:25",
"topic": "Class TLed from Silvio Falconi",
"username": "MarcoBoschi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio have my new tled sources, he can make what he want .\nthanks Massimo after the hamset, now I am a \"not run woodenhead\", see you next Monday,to cto!!!",
"time": "11:30",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[url:hu1eimbw]https://bitbucket.org/fivetech/fivewin-contributions/downloads/tled.zip[/url:hu1eimbw]\n\nThanks Silvio <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "12:02",
"topic": "Class TLed from Silvio Falconi",
"username": "Antonio Linares"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Now is also to github\n[url:10w66lsf]https://github.com/silviofalconi/Tled[/url:10w66lsf]",
"time": "13:01",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2016-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Massimo Linossi\":1807ucco]\"Wheels\" ???\nYes, I'm disabled and on wheels, or better in a wheelchair because I had a skiing accident.\nAnd what are your apologies, mr. \"not run woodenhead\" ?[/quote:1807ucco]\n\nI not Known your situation but when I wrote \"Wheels\" I meant that you have a wheel to the brain, why write sentences without understanding first why\nAfter you've continued to write that I'm a hamster, and I straitjacket and then write that when I leave the hospital crazy I have to go to the pharmacy. \nBut it is not the time But before he can write nonsense. So please if you have nothing sensible to write avoids writing nonsense",
"time": "13:46",
"topic": "Class TLed from Silvio Falconi",
"username": "Silvio.Falconi"
}
] |
Class TLed from Silvio Falconi
|
[
{
"date": "2013-02-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi,\n\nWith a regular get I can set the focus color with:\noGet:SetGetColorFocus( RGB(152,251,152) )\n\nHow can I do this with a multiget? Is it possible?",
"time": "02:08",
"topic": "Class TMultiGet - Focus Color",
"username": "Jeff Barnes"
}
] |
Class TMultiGet - Focus Color
|
[
{
"date": "2013-02-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Jeff,\nit is a little bit tricky.\nI noticed ( with a alert ) during reading the lines in a multiline get, \nthe focus status changed for each line from focus to lost focus.\nMaybe a bug ?\n\nsee what happens, changing these lines of the multiline get inside the working function to :\n\n[color=#0000FF:mzexlh6a][b:mzexlh6a]@ 3, 10 GET oGet1 VAR cVar OF oDlg SIZE 95, 30 MULTILINE\noGet1:bGotFocus := {|| MsgAlert( \"Got Focus\" ), oGet1:SetColor( , 11251710 ), oGet1:Refresh() }\noGet1:bLostFocus := {|| MsgAlert( \"Lost Focus\" ), oGet1:SetColor( , 15973519 ), oGet1:Refresh() }[/b:mzexlh6a][/color:mzexlh6a]\n\n[b:mzexlh6a]I got it working like :[/b:mzexlh6a]\n\n[img:mzexlh6a]http://www.pflegeplus.com/pictures/multiline1.jpg[/img:mzexlh6a]\n\nfunction Main()\nLocal oGet1, oGet2,[color=#FF0000:mzexlh6a] lFocus1 := .F.[/color:mzexlh6a]\nlocal cVar:=\"lalalalala\",cVar1:=\"hoplalalalala\"\n\nDEFINE DIALOG oDlg FROM 1,10 TO 24,60\n\n@ 1, 12 BUTTON \"&End\" OF oDlg ACTION oDlg:end()\n\n// only read focus status once !!!\n// --------------------- \n[color=#FF0000:mzexlh6a]@ 3, 10 GET oGet1 VAR cVar OF oDlg SIZE 95, 30 MULTILINE\noGet1:bGotFocus := {|| lFocus1 := .T.,;\n IIF( lFocus1 = .T., oGet1:SetColor( , 11251710 ), NIL ), oGet1:Refresh() }[/color:mzexlh6a]\n\n[color=#0000FF:mzexlh6a]oGet1:bLostFocus := {|| lFocus1 := .F.,;\n oGet1:SetColor( , 15973519 ), oGet1:Refresh() }[/color:mzexlh6a]\n\n@ 8, 10 GET oGet2 VAR cVar1 OF oDlg SIZE 95, 15 \n\nACTIVATE DIALOG oDlg\n\nreturn NIL\n\nBest Regards\nUwe <!-- s:roll: --><img src=\"{SMILIES_PATH}/icon_rolleyes.gif\" alt=\":roll:\" title=\"Rolling Eyes\" /><!-- s:roll: -->",
"time": "14:00",
"topic": "Class TMultiGet - Focus Color",
"username": "ukoenig"
}
] |
Class TMultiGet - Focus Color
|
[
{
"date": "2013-02-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thank you Uwe ... Works perfectly <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->",
"time": "14:15",
"topic": "Class TMultiGet - Focus Color",
"username": "Jeff Barnes"
}
] |
Class TMultiGet - Focus Color
|
[
{
"date": "2022-09-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "This is another Class TNeuralNetwork for Harbour that I have ported from Python code <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\n[url:36op59tx]https://github.com/FiveTechSoft/TNeuralNetwork[/url:36op59tx]\n\nOriginal Python work by Matt Mazur",
"time": "07:53",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Antonio Linares"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2022-09-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "fantastic",
"time": "09:54",
"topic": "Class TNeuralNetwork for Harbour",
"username": "fgondi"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2022-09-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nbuen dia, y cual seria el uso practico de esta clase o sea en que lo podemos aplicar ?\n\nSaludos.",
"time": "12:45",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Ariel"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2022-09-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Estimado Ariel,\n\nMuy buena pregunta que requiere una muy interesante reflexion:\n\nCuando no teníamos hashes en Clipper, no sabíamos pensar en \"hashes\". Ahora que los tenemos y sabemos pensar en ellos, sabemos de su enorme utilidad. \n\nAlgo muy similar ocurre con la inteligencia artificial, y más concretamente con las redes neuronales: como no las hemos tenido, aún no sabemos pensar en ellas y en sus enormes posibilidades.\n\nPara que sirve una Red neuronal ? Para adivinar unos resultados, en base a unos valores de entrada y a unos valores de salida, desconociendo la relación que hay entre ellos.\n\nUna Red neuronal tiene que ser entrenada para que sepa generar unos valores de salida (output) a partir de unos valores de entrada (input). ¿ Y como es que no sabemos calcular los valores de salida a partir de los valores de entrada ? Simplemente porque desconocemos su relación matemática, pero la Red neuronal la averiguara una vez haya sido entrenada.\n\nQue valores de entrada y que valores de salida podemos usar ? Cualesquiera, ya que a la Red neuronal no le interesa de donde vengan los valores de entrada y cuales sean los de salida. A la Red neuronal sólo le interesa acertar cometiendo el menor error posible.\n\nImaginemos una contabilidad en donde han habido unos ingresos, unos gastos y unos beneficios o pérdidas. Si entrenamos a la Red neuronal con esos datos, la Red neuronal podrá hacer una aproximación muy certera de lo que sucederá en los meses venideros. A más datos le demos, mejor sabrá acertar. Si le damos datos de casas y sus precios, la Red neuronal sabrá valorar cualquier vivienda. Si le damos datos de música, sabrá reconocer una canción, etc, etc\n\nEn realidad lo que hace la Red neuronal es calcular el error entre los valores output esperados y los obtenidos y así ir disminuyendo su error más y más. A más entrenamiento, más aciertos. Igual que cuanto más entrena un deportista, mejor hace lo que hace. El entrenamiento \"afina\" su funcionamiento.\n\nAhora se trata de aprender a pensar en situaciones en donde las redes neuronales son idóneas. Son un mecanismo de \"adivinación\" matemático y de nosotros depende decidir que tienen que adivinar.\n\nImagina una función a la que le das unos parámetros y esperas unos resultados, pero no sabes lo que hace la función. La Red neuronal aprenderá lo que hace la función con sólo entrenarla.\n\nLas redes neuronales son la base de la inteligencia artificial que está revolucionando y seguirá revolucionando nuestra sociedad. Son adivinos mecánicos que aprenden solos, dándoles datos de entrada y salida <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "14:46",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Antonio Linares"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2022-09-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Este es un vídeo con un ejemplo bastante claro.\n[url:2a47bct6]https://www.youtube.com/watch?v=aircAruvnKk[/url:2a47bct6]\n\nEl cálculo de tendencias y reconocer patrones es el futuro.\n\nEs cambiar la mentalidad, no en todos los casos se puede programar todas las posiblidades, a veces hay demasiadas posibilidades.\n\nEn el mundo de la gestión y la contabilidad, es buscar tendencias y poder ofrecer resultados futuros si se mantiene la tendencia, u optimizar servicios de la empresa (productos, rutas, crm, etc.)",
"time": "19:24",
"topic": "Class TNeuralNetwork for Harbour",
"username": "fgondi"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2022-09-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nUna delicia leerte. Tengo dos dudas:\n\n¿Cómo se traduce al castellano los hashes?\n\n¿Cómo podemos explicarlos de forma sencilla?\n\nGracias y saludos",
"time": "19:53",
"topic": "Class TNeuralNetwork for Harbour",
"username": "elvira"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2022-09-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Estimada Elvira,\n\nEn este post le explique a James lo que son los hashes, en incluye una imagen muy ilustrativa:\n<!-- l --><a class=\"postlink-local\" href=\"http://fivetechsupport.com/forums/viewtopic.php?p=223533&sid=7fcd15dba524ab7c0c556dcfe98a464e#p223533\">viewtopic.php?p=223533&sid=7fcd15dba524ab7c0c556dcfe98a464e#p223533</a><!-- l -->\n\nCuando tenemos un grupo de datos, podemos acceder a ellos por su orden: primero, segundo, tercero, etc...\nó podemos acceder a ellos por una \"etiqueta\". Esto son los hashes: grupos de datos accesibles por una etiqueta.\n\nImagina un grupo de personas y les dices: que pase el primero, que pase el segundo, que pase el tercero... etc eso seria un grupo de \"datos\" ordenados por orden.\nPor el contrario podrias decirles: que pase \"Juan\", que pase \"Pepe\", que pase \"Luis\"... esto seria un grupo de datos seleccionables por una etiqueta <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nHoy en dia se usa en Twitter la palabra #hashtag que es también una etiqueta. Es seleccionar un dato por una etiqueta o caracteristica, en vez de por una posición.",
"time": "06:31",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Antonio Linares"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2022-09-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio y Fernando,\n\nmuchas gracias por la explicacion sencilla y clara.\n\nSaludos.",
"time": "17:12",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Ariel"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2022-09-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Ariel,\nI once started a knowledge base for HASH tables here ;\n[url:25otu7mq]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=19895&p=104891&hilit=hash#p104891[/url:25otu7mq]\n\nBest regards,\nOtto",
"time": "19:12",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Otto"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2023-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Saludos,\nAntonio gracias por excelente trabajo, he estado gogleando, por ahora solo tengo fantasías y expongo una de ellas:\n\nLa IA para la integración contable, debemos entrenarla de manera similar en la que capacitamos a un auxiliar contable,\ncuando te llega esta factura debes aplicar estos principios o criterio, debemos tomar una foto de la factura de compra y entrenar la IA mediante tensorflow, ¿esto debemos hacerlo proveedor por proveedor?, la IA ira aprendiendo que es una factura de compra y las próximas facturas de compra será facil, hasta que puede hacerlo totalmente autónomo. \n¿Cómo le indico a tensorflow las partes de la factura. Item, Codigo, descripción, monto, IVA, ID_FISCAL?,",
"time": "08:43",
"topic": "Class TNeuralNetwork for Harbour",
"username": "jnavas"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2023-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Querido Juan,\n\nTienes que pensar en cual van a ser los \"inputs\" que le vas a dar a la red neuronal y cuales son los \"outputs\" esperados.\n\nPor ejemplo, imagina que le vas a dar 12 valores diferentes a la vez (en cada sesión de entrenamiento), y que esperas 7 valores diferentes de retorno\n\nEn ese caso la red neuronal usaría 12 perceptrones de entrada y 7 perceptrones de salida. Por lo general se usa una capa intermedia, por lo menos, entre la capa de entrada y la de salida. Esa capa intermedia podria usar, por ejemplo, 10 perceptrones.\n\nConforme se entrena, la red neuronal va ajustándose más y más a los valores esperados, disminuyendo así el error cometido y mejorando su nivel de acierto.",
"time": "09:40",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Antonio Linares"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2023-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Aquí tienes el código en Harbour escrito por chatGPT para el ejemplo anterior:\n\n[code=fw:b0ohwc2s]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#define</span> EPOCHS <span style=\"color: #000000;\">100</span><br /><span style=\"color: #00D7D7;\">#define</span> LEARNING_RATE <span style=\"color: #000000;\">0.1</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">LOCAL</span> input_data := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">0.5</span>, <span style=\"color: #000000;\">0.3</span>, <span style=\"color: #000000;\">0.2</span>, <span style=\"color: #000000;\">0.7</span>, <span style=\"color: #000000;\">0.9</span>, <span style=\"color: #000000;\">0.1</span>, <span style=\"color: #000000;\">0.4</span>, <span style=\"color: #000000;\">0.6</span>, <span style=\"color: #000000;\">0.8</span>, <span style=\"color: #000000;\">0.2</span>, <span style=\"color: #000000;\">0.5</span>, <span style=\"color: #000000;\">0.7</span><span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">LOCAL</span> true_output := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">0.1</span>, <span style=\"color: #000000;\">0.2</span>, <span style=\"color: #000000;\">0.3</span>, <span style=\"color: #000000;\">0.4</span>, <span style=\"color: #000000;\">0.5</span>, <span style=\"color: #000000;\">0.6</span>, <span style=\"color: #000000;\">0.7</span><span style=\"color: #000000;\">}</span><br /><br /> train_neural_network<span style=\"color: #000000;\">(</span> input_data, true_output<span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span> <br /><br /><span style=\"color: #00C800;\">FUNCTION</span> sigmoid<span style=\"color: #000000;\">(</span>x<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #000000;\">1</span> / <span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1</span> + <span style=\"color: #0000ff;\">EXP</span><span style=\"color: #000000;\">(</span>-x<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> <br /><span style=\"color: #00C800;\">FUNCTION</span> sigmoid_derivative<span style=\"color: #000000;\">(</span>x<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span> x * <span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1</span> - x<span style=\"color: #000000;\">)</span><br /><br />PROCEDURE initialize_parameters<span style=\"color: #000000;\">(</span> weights_input_hidden, weights_hidden_output, bias_hidden, bias_output<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">12</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> weights_input_hidden<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span> := hb_Random<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">1</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> <br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> weights_hidden_output<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span> := hb_Random<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">1</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> bias_hidden<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> bias_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br />PROCEDURE forward_propagation<span style=\"color: #000000;\">(</span> inputs, weights_input_hidden, weights_hidden_output, bias_hidden, bias_output, hidden_output, predicted_output<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> hidden_input<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">]</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">12</span><br /> hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + inputs<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * weights_input_hidden<span style=\"color: #000000;\">[</span>j, i<span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + bias_hidden<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><br /> hidden_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := sigmoid<span style=\"color: #000000;\">(</span>hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + hidden_output<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * weights_hidden_output<span style=\"color: #000000;\">[</span>j, i<span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + bias_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><br /> predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := sigmoid<span style=\"color: #000000;\">(</span>predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br />PROCEDURE calculate_loss<span style=\"color: #000000;\">(</span> predicted_output, true_output <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> loss := <span style=\"color: #000000;\">0.0</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> loss := loss + <span style=\"color: #000000;\">0.5</span> * <span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">(</span>predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> - true_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span> ^ <span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> <span style=\"color: #00C800;\">RETURN</span> loss<br /><br />PROCEDURE backward_propagation<span style=\"color: #000000;\">(</span> inputs, true_output, hidden_output, predicted_output, weights_hidden_output, weights_input_hidden, bias_hidden, bias_output<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> output_error<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span>, output_delta<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">LOCAL</span> hidden_error, hidden_delta<br /> <br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> output_error<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := true_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> - predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><br /> output_delta<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := output_error<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> * sigmoid_derivative<span style=\"color: #000000;\">(</span>predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> hidden_error := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> hidden_error := hidden_error + output_delta<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * weights_hidden_output<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> hidden_delta := hidden_error * sigmoid_derivative<span style=\"color: #000000;\">(</span>hidden_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">12</span><br /> weights_input_hidden<span style=\"color: #000000;\">[</span>j, i<span style=\"color: #000000;\">]</span> := weights_input_hidden<span style=\"color: #000000;\">[</span>j, i<span style=\"color: #000000;\">]</span> + inputs<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * hidden_delta * LEARNING_RATE<br /> <span style=\"color: #00C800;\">NEXT</span><br /> bias_hidden<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := bias_hidden<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + hidden_delta * LEARNING_RATE<br /><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> weights_hidden_output<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span> := weights_hidden_output<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span> + hidden_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> * output_delta<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * LEARNING_RATE<br /> <span style=\"color: #00C800;\">NEXT</span><br /> bias_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := bias_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + output_delta<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> * LEARNING_RATE<br /> <span style=\"color: #00C800;\">NEXT</span><br /><br />PROCEDURE train_neural_network<span style=\"color: #000000;\">(</span> inputs, true_output <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> weights_input_hidden<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">12</span>, <span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">]</span>, weights_hidden_output<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">10</span>, <span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span>, bias_hidden<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">]</span>, bias_output<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">LOCAL</span> hidden_output<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">]</span>, predicted_output<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span>, loss<br /><br /> initialize_parameters<span style=\"color: #000000;\">(</span>weights_input_hidden, weights_hidden_output, bias_hidden, bias_output<span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> epoch := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> EPOCHS<br /> hidden_output = Array<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">10</span> <span style=\"color: #000000;\">)</span><br /> predicted_output = Array<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">7</span> <span style=\"color: #000000;\">)</span><br /> <br /> forward_propagation<span style=\"color: #000000;\">(</span>inputs, weights_input_hidden, weights_hidden_output, bias_hidden, bias_output, @hidden_output, @predicted_output<span style=\"color: #000000;\">)</span><br /><br /> loss := calculate_loss<span style=\"color: #000000;\">(</span>predicted_output, true_output<span style=\"color: #000000;\">)</span><br /><br /> backward_propagation<span style=\"color: #000000;\">(</span>inputs, true_output, hidden_output, predicted_output, weights_hidden_output, weights_input_hidden, bias_hidden, bias_output<span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">IF</span> <span style=\"color: #00C800;\">Mod</span><span style=\"color: #000000;\">(</span>epoch, <span style=\"color: #000000;\">100</span><span style=\"color: #000000;\">)</span> == <span style=\"color: #000000;\">0</span><br /> ? <span style=\"color: #ff0000;\">\"Epoch\"</span>, epoch, <span style=\"color: #ff0000;\">\"Loss:\"</span>, loss<br /> <span style=\"color: #00C800;\">ENDIF</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Training complete!\"</span><br /><br /><span style=\"color: #00C800;\">RETURN</span><br /><br /> </div>[/code:b0ohwc2s]",
"time": "10:13",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Antonio Linares"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2023-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "La IA para la integración contable, debemos entrenarla de manera similar en que capacitamos a un auxiliar contable, cuando te llega esta factura debes aplicar estos principios, debemos tomar una foto de la factura de compra y entrenar la IA mediante tensorflow, ¿esto debemos hacerlo proveedor por proveedor?, la IA irá aprendiendo que es una factura de compra y las próximas facturas de compra será facil, hasta que puede hacerlo totalmente autónomo.\n¿Cómo podemos aplicarlo con tensorflow?",
"time": "10:24",
"topic": "Class TNeuralNetwork for Harbour",
"username": "jnavas"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2023-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\nGracias \nprimero debe mostrarle la foto , method ImportGraph( cFileName ) // no devuelve un valor. , Primero voy a compilarlo y asignarle la imagen.\n\n[quote=\"Antonio Linares\":18d4l4ob]Querido Juan,\n\nTienes que pensar en cual van a ser los \"inputs\" que le vas a dar a la red neuronal y cuales son los \"outputs\" esperados.\n\nPor ejemplo, imagina que le vas a dar 12 valores diferentes a la vez (en cada sesión de entrenamiento), y que esperas 7 valores diferentes de retorno\n\nEn ese caso la red neuronal usaría 12 perceptrones de entrada y 7 perceptrones de salida. Por lo general se usa una capa intermedia, por lo menos, entre la capa de entrada y la de salida. Esa capa intermedia podria usar, por ejemplo, 10 perceptrones.\n\nConforme se entrena, la red neuronal va ajustándose más y más a los valores esperados, disminuyendo así el error cometido y mejorando su nivel de acierto.[/quote:18d4l4ob]",
"time": "10:28",
"topic": "Class TNeuralNetwork for Harbour",
"username": "jnavas"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2023-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Para llegar a ese nivel tendrias que usar a todos tus usuarios de tus aplicaciones para retro alimentar la red neuronal\n\nHarian falta miles de entrenamientos\n\nPiensalo en un nivel mas simple. Lo entrenas tu, o lo entrenan ellos. Lo ideal seria ambos\n\nEntiende la esencia, luego escala esa idea tanto como te permita la imaginación <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "10:33",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Antonio Linares"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2023-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "hay librerías open source para el reconocimiento de imágenes basadas en inteligencia artificial\n\nSi lo que quieres es automatizar el proceso de lectura de unas facturas o documentos, tendrias que usar la libreria OpenCV\n\n<!-- l --><a class=\"postlink-local\" href=\"https://fivetechsupport.com/forums/viewtopic.php?f=3&t=41193&start=0&hilit=opencv\">viewtopic.php?f=3&t=41193&start=0&hilit=opencv</a><!-- l -->",
"time": "10:35",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Antonio Linares"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2023-11-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Ejemplo corregido y resultado:\n\n[code=fw:oz162mrp]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#define</span> EPOCHS <span style=\"color: #000000;\">1000</span><br /><span style=\"color: #00D7D7;\">#define</span> LEARNING_RATE <span style=\"color: #000000;\">0.1</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">LOCAL</span> input_data := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">0.5</span>, <span style=\"color: #000000;\">0.3</span>, <span style=\"color: #000000;\">0.2</span>, <span style=\"color: #000000;\">0.7</span>, <span style=\"color: #000000;\">0.9</span>, <span style=\"color: #000000;\">0.1</span>, <span style=\"color: #000000;\">0.4</span>, <span style=\"color: #000000;\">0.6</span>, <span style=\"color: #000000;\">0.8</span>, <span style=\"color: #000000;\">0.2</span>, <span style=\"color: #000000;\">0.5</span>, <span style=\"color: #000000;\">0.7</span><span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">LOCAL</span> true_output := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">0.1</span>, <span style=\"color: #000000;\">0.2</span>, <span style=\"color: #000000;\">0.3</span>, <span style=\"color: #000000;\">0.4</span>, <span style=\"color: #000000;\">0.5</span>, <span style=\"color: #000000;\">0.6</span>, <span style=\"color: #000000;\">0.7</span><span style=\"color: #000000;\">}</span><br /><br /> train_neural_network<span style=\"color: #000000;\">(</span> input_data, true_output<span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span> <br /><br /><span style=\"color: #00C800;\">FUNCTION</span> sigmoid<span style=\"color: #000000;\">(</span>x<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #000000;\">1</span> / <span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1</span> + <span style=\"color: #0000ff;\">EXP</span><span style=\"color: #000000;\">(</span>-x<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> <br /><span style=\"color: #00C800;\">FUNCTION</span> sigmoid_derivative<span style=\"color: #000000;\">(</span>x<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span> x * <span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1</span> - x<span style=\"color: #000000;\">)</span><br /><br />PROCEDURE initialize_parameters<span style=\"color: #000000;\">(</span> weights_input_hidden, weights_hidden_output, bias_hidden, bias_output<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">12</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> weights_input_hidden<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span> := hb_Random<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">1</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> <br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> weights_hidden_output<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span> := hb_Random<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">1</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> bias_hidden<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> bias_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br />PROCEDURE forward_propagation<span style=\"color: #000000;\">(</span> inputs, weights_input_hidden, weights_hidden_output, bias_hidden, bias_output, hidden_output, predicted_output<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> hidden_input<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">]</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">12</span><br /> hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + inputs<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * weights_input_hidden<span style=\"color: #000000;\">[</span>j, i<span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + bias_hidden<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><br /> hidden_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := sigmoid<span style=\"color: #000000;\">(</span>hidden_input<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + hidden_output<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * weights_hidden_output<span style=\"color: #000000;\">[</span>j, i<span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /> predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + bias_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><br /> predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := sigmoid<span style=\"color: #000000;\">(</span>predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br />PROCEDURE calculate_loss<span style=\"color: #000000;\">(</span> predicted_output, true_output <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> loss := <span style=\"color: #000000;\">0.0</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> loss := loss + <span style=\"color: #000000;\">0.5</span> * <span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">(</span>predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> - true_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span> ^ <span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> <span style=\"color: #00C800;\">RETURN</span> loss<br /><br />PROCEDURE backward_propagation<span style=\"color: #000000;\">(</span> inputs, true_output, hidden_output, predicted_output, weights_hidden_output, weights_input_hidden, bias_hidden, bias_output<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> output_error<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span>, output_delta<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">LOCAL</span> hidden_error, hidden_delta<br /> <br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> output_error<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := true_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> - predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><br /> output_delta<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := output_error<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> * sigmoid_derivative<span style=\"color: #000000;\">(</span>predicted_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">10</span><br /> hidden_error := <span style=\"color: #000000;\">0.0</span><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> hidden_error := hidden_error + output_delta<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * weights_hidden_output<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> hidden_delta := hidden_error * sigmoid_derivative<span style=\"color: #000000;\">(</span>hidden_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">12</span><br /> weights_input_hidden<span style=\"color: #000000;\">[</span>j, i<span style=\"color: #000000;\">]</span> := weights_input_hidden<span style=\"color: #000000;\">[</span>j, i<span style=\"color: #000000;\">]</span> + inputs<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * hidden_delta * LEARNING_RATE<br /> <span style=\"color: #00C800;\">NEXT</span><br /> bias_hidden<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> := bias_hidden<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> + hidden_delta * LEARNING_RATE<br /><br /> <span style=\"color: #00C800;\">FOR</span> j := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">7</span><br /> weights_hidden_output<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span> := weights_hidden_output<span style=\"color: #000000;\">[</span>i, j<span style=\"color: #000000;\">]</span> + hidden_output<span style=\"color: #000000;\">[</span>i<span style=\"color: #000000;\">]</span> * output_delta<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span> * LEARNING_RATE<br /> <span style=\"color: #00C800;\">NEXT</span><br /> <span style=\"color: #B900B9;\">// bias_output[i-1] := bias_output[i-1] + output_delta[i-1] * LEARNING_RATE</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br />PROCEDURE train_neural_network<span style=\"color: #000000;\">(</span> inputs, true_output <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> weights_input_hidden<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">12</span>, <span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">]</span>, weights_hidden_output<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">10</span>, <span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span>, bias_hidden<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">]</span>, bias_output<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">LOCAL</span> hidden_output<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">]</span>, predicted_output<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">]</span>, loss<br /><br /> initialize_parameters<span style=\"color: #000000;\">(</span>weights_input_hidden, weights_hidden_output, bias_hidden, bias_output<span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">FOR</span> epoch := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> EPOCHS<br /> hidden_output = Array<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">10</span> <span style=\"color: #000000;\">)</span><br /> predicted_output = Array<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">7</span> <span style=\"color: #000000;\">)</span><br /> <br /> forward_propagation<span style=\"color: #000000;\">(</span>inputs, weights_input_hidden, weights_hidden_output, bias_hidden, bias_output, @hidden_output, @predicted_output<span style=\"color: #000000;\">)</span><br /><br /> loss := calculate_loss<span style=\"color: #000000;\">(</span>predicted_output, true_output<span style=\"color: #000000;\">)</span><br /><br /> backward_propagation<span style=\"color: #000000;\">(</span>inputs, true_output, hidden_output, predicted_output, weights_hidden_output, weights_input_hidden, bias_hidden, bias_output<span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">IF</span> <span style=\"color: #00C800;\">Mod</span><span style=\"color: #000000;\">(</span>epoch, <span style=\"color: #000000;\">100</span><span style=\"color: #000000;\">)</span> == <span style=\"color: #000000;\">0</span><br /> ? <span style=\"color: #ff0000;\">\"Epoch\"</span>, epoch, <span style=\"color: #ff0000;\">\"Loss:\"</span>, loss<br /> <span style=\"color: #00C800;\">ENDIF</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> ? <span style=\"color: #ff0000;\">\"Training complete!\"</span><br /><br /><span style=\"color: #00C800;\">RETURN</span><br /><br /> </div>[/code:oz162mrp]\n[quote:oz162mrp]Epoch 100 Loss: 1.035\nEpoch 200 Loss: 1.003\nEpoch 300 Loss: 0.947\nEpoch 400 Loss: 0.258\nEpoch 500 Loss: 0.173\nEpoch 600 Loss: 0.163\nEpoch 700 Loss: 0.010\nEpoch 800 Loss: 0.000\nEpoch 900 Loss: 0.000\nEpoch 1000 Loss: 0.000\nTraining complete![/quote:oz162mrp]\nComo se ve, el error va disminuyendo hasta hacerse cero",
"time": "11:39",
"topic": "Class TNeuralNetwork for Harbour",
"username": "Antonio Linares"
}
] |
Class TNeuralNetwork for Harbour
|
[
{
"date": "2017-08-16",
"forum": "TensorFlow and Python examples",
"text": "When we review the TensorFlow examples we notice a lot of repetitive code. \n\nThat reminds me the Windows Petzold's era, so again we can simplify the repetitive code, \ncreating a generic class TNeuronalNetWork in Python <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nThis is a work in progress, very good to learn basic Python stuff!\n\nclass.py\n[code=fw:3q0thc9y]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">import tensorflow as tf<br /><br /><span style=\"color: #00C800;\">class</span> TPerceptron :<br /> aWeights = <span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">]</span><br /><br /> def <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">self</span>, nInputs <span style=\"color: #000000;\">)</span> :<br /> <span style=\"color: #00C800;\">for</span> n in range<span style=\"color: #000000;\">(</span> nInputs <span style=\"color: #000000;\">)</span> :<br /> <span style=\"color: #00C800;\">self</span>.aWeights.append<span style=\"color: #000000;\">(</span> tf.zeros<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">class</span> TLayer :<br /> aPerceptrons = <span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">]</span><br /> bias = None<br /> aPrevLayer = None<br /><br /> def <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">self</span>, nPerceptrons <span style=\"color: #000000;\">)</span> :<br /> <span style=\"color: #00C800;\">for</span> n in range<span style=\"color: #000000;\">(</span> nPerceptrons <span style=\"color: #000000;\">)</span> :<br /> <span style=\"color: #00C800;\">if</span> <span style=\"color: #00C800;\">self</span>.aPrevLayer :<br /> <span style=\"color: #00C800;\">self</span>.aPerceptrons.append<span style=\"color: #000000;\">(</span> TPerceptron<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>.<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> len<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">self</span>.aPrevLayer.aPerceptrons <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">else</span> :<br /> <span style=\"color: #00C800;\">self</span>.aPerceptrons.append<span style=\"color: #000000;\">(</span> TPerceptron<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>.<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <br /> <span style=\"color: #00C800;\">self</span>.bias = tf.zeros<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">self</span> <br /><br /><span style=\"color: #00C800;\">class</span> TNeuronalNetwork : <br /> aLayers = <span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">]</span> <br /> input = None<br /> output = None<br /> nLearningRate = <span style=\"color: #000000;\">0.002</span><br /> nTrainingEpochs = <span style=\"color: #000000;\">500</span><br /> tf = None<br /> loss = None<br /> optimizer = None<br /><br /> def <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">self</span>, aTopology <span style=\"color: #000000;\">)</span> :<br /> <span style=\"color: #00C800;\">self</span>.input = tf.placeholder<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"float\"</span>, shape=<span style=\"color: #000000;\">(</span> None, aTopology<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">self</span>.output = tf.placeholder<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"float\"</span>, shape=<span style=\"color: #000000;\">(</span> None, aTopology<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">-1</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <br /> <span style=\"color: #00C800;\">for</span> n in range<span style=\"color: #000000;\">(</span> len<span style=\"color: #000000;\">(</span> aTopology <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> :<br /> <span style=\"color: #00C800;\">self</span>.aLayers.append<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">self</span>.aLayers<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">-1</span> <span style=\"color: #000000;\">]</span> = TLayer<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>.<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> aTopology<span style=\"color: #000000;\">[</span> n <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span><br /> <br /> <span style=\"color: #00C800;\">if</span> n == <span style=\"color: #000000;\">0</span> :<br /> <span style=\"color: #00C800;\">self</span>.tf = tf.add<span style=\"color: #000000;\">(</span> tf.matmul<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">self</span>.input, weights<span style=\"color: #000000;\">[</span> <span style=\"color: #ff0000;\">'h1'</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #00C800;\">self</span>.aLayers<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">-1</span> <span style=\"color: #000000;\">]</span>.bias <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">else</span> :<br /> <span style=\"color: #00C800;\">self</span>.aLayers<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">-1</span> <span style=\"color: #000000;\">]</span>.aPrevLayer = <span style=\"color: #00C800;\">self</span>.aLayers<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">-2</span> <span style=\"color: #000000;\">]</span> <br /> <span style=\"color: #00C800;\">self</span>.tf = tf.add<span style=\"color: #000000;\">(</span> tf.matmul<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">self</span>.tf, weights<span style=\"color: #000000;\">[</span> <span style=\"color: #ff0000;\">'h1'</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #00C800;\">self</span>.aLayers<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">-1</span> <span style=\"color: #000000;\">]</span>.bias <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">self</span>.loss = tf.reduce_mean<span style=\"color: #000000;\">(</span> tf.nn.softmax_cross_entropy_with_logits<span style=\"color: #000000;\">(</span> logits=<span style=\"color: #00C800;\">self</span>.tf, labels=<span style=\"color: #00C800;\">self</span>.output <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">self</span>.optimizer = tf.train.AdamOptimizer<span style=\"color: #000000;\">(</span> learning_rate = <span style=\"color: #00C800;\">self</span>.nLearningRate <span style=\"color: #000000;\">)</span>.minimize<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">self</span>.loss <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">self</span><br /><br />oNN = TNeuronalNetwork<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>.<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">5</span>, <span style=\"color: #000000;\">7</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span></div>[/code:3q0thc9y]",
"time": "09:34",
"topic": "Class TNeuronalNetwork: simplifying the TensorFlow code",
"username": "Antonio Linares"
}
] |
Class TNeuronalNetwork: simplifying the TensorFlow code
|
[
{
"date": "2017-08-23",
"forum": "TensorFlow and Python examples",
"text": "We better go step by step to implement it:\n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?p=204899#p204899\">viewtopic.php?p=204899#p204899</a><!-- l -->",
"time": "14:12",
"topic": "Class TNeuronalNetwork: simplifying the TensorFlow code",
"username": "Antonio Linares"
}
] |
Class TNeuronalNetwork: simplifying the TensorFlow code
|
[
{
"date": "2008-12-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "HARBOUR 7.01 2007 build. \r\n\r\nIs there anybody who knows where I could find a library\r\nwith the class TOleAuto ? <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> \r\n\r\nCiao a tutti",
"time": "12:22",
"topic": "Class TOleAuto and HARBOUR 7.01",
"username": "MaxP"
}
] |
Class TOleAuto and HARBOUR 7.01
|
[
{
"date": "2008-12-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"MaxP\":3huorlor]HARBOUR 7.01 2007 build. \n\nIs there anybody who knows where I could find a library\nwith the class TOleAuto ? <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> \n\nCiao a tutti[/quote:3huorlor]\r\n\r\nHi,\r\n\r\nIn Harbour, from contrib\\hbwin\r\n\r\nRegards,\r\n\r\nToninho.",
"time": "13:05",
"topic": "Class TOleAuto and HARBOUR 7.01",
"username": "toninhofwi"
}
] |
Class TOleAuto and HARBOUR 7.01
|
[
{
"date": "2008-12-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thank you Toninho\r\n\r\nyou say \"In Harbour, from contrib\\hbwin\"\r\ncould you give me another little help\r\ntelling me how can I find \"contrib\\hbwin\" ?\r\n\r\nSorry, but my had is made of wood <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( -->\r\n\r\nMassimo",
"time": "16:28",
"topic": "Class TOleAuto and HARBOUR 7.01",
"username": "MaxP"
}
] |
Class TOleAuto and HARBOUR 7.01
|
[
{
"date": "2008-12-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "He means in the harbour\\contrib\\hbwin directory. You don't get this with the standard Harbour install, you would need to get it when you download all the source code.\r\n\r\nSince you don't already know this, I am guessing that you are not looking for the source code, but rather just the name of the LIB file that you need to link into your program so you can call TOLEAuto()? I don't know the answer--it does seem to be getting linked in buildx.bat (for xHarbour). I don't use Harbour so I don't know if it is in buildh.bat, but if you make sure all those libs are getting linked into your app then that might solve your problem.\r\n\r\nRegards,\r\nJames",
"time": "17:38",
"topic": "Class TOleAuto and HARBOUR 7.01",
"username": "James Bott"
}
] |
Class TOleAuto and HARBOUR 7.01
|
[
{
"date": "2008-12-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "hbole.lib\r\n\r\nEMG",
"time": "18:37",
"topic": "Class TOleAuto and HARBOUR 7.01",
"username": "Enrico Maria Giordano"
}
] |
Class TOleAuto and HARBOUR 7.01
|
[
{
"date": "2008-12-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Many thanks for your help\r\n\r\nin order of \"appearance\"\r\nToninho, James and Enrico\r\n\r\nI've solved my problem <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->",
"time": "09:33",
"topic": "Class TOleAuto and HARBOUR 7.01",
"username": "MaxP"
}
] |
Class TOleAuto and HARBOUR 7.01
|
[
{
"date": "2007-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Just to inform you that xharbour Class TOleAuto has been ported to Harbour, so if you need TOleAuto support now you can have it from Harbour too <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nIts already available from Harbour CVS at contrib/ole2.\n\nNext Harbour build from FiveTech will include it (HBOleAut.lib)",
"time": "01:09",
"topic": "Class TOleAuto for Harbour",
"username": "Antonio Linares"
}
] |
Class TOleAuto for Harbour
|
[
{
"date": "2007-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Great! Now, if you only could do the same with hbzip.lib... <!-- s:) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":)\" title=\"Smile\" /><!-- s:) --> \n\nEMG",
"time": "09:37",
"topic": "Class TOleAuto for Harbour",
"username": "Enrico Maria Giordano"
}
] |
Class TOleAuto for Harbour
|
[
{
"date": "2007-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Enrico,\n\nYou may ask Przemek for his advise about it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nIf he considers that it is possible, then we may do it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "10:13",
"topic": "Class TOleAuto for Harbour",
"username": "Antonio Linares"
}
] |
Class TOleAuto for Harbour
|
[
{
"date": "2007-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I already asked him in at least two occasions and he said something about the licence of the library and that he doesn't want to work on it.\n\nEMG",
"time": "10:20",
"topic": "Class TOleAuto for Harbour",
"username": "Enrico Maria Giordano"
}
] |
Class TOleAuto for Harbour
|
[
{
"date": "2007-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "We may review it when we get some free time <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nIn the meantime, here it is HBOleAut.lib for Harbour:\n<!-- m --><a class=\"postlink\" href=\"http://rapidshare.com/files/26446254/hboleaut.lib.html\">http://rapidshare.com/files/26446254/hboleaut.lib.html</a><!-- m -->\n\nfor those that may want to start using it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "10:50",
"topic": "Class TOleAuto for Harbour",
"username": "Antonio Linares"
}
] |
Class TOleAuto for Harbour
|
[
{
"date": "2007-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Antonio Linares\":1xijezvl]We may review it when we get some free time <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->[/quote:1xijezvl]\n\nThank you!\n\n[quote=\"Antonio Linares\":1xijezvl]In the meantime, here it is HBOleAut.lib for Harbour:\n<!-- m --><a class=\"postlink\" href=\"http://rapidshare.com/files/26446254/hboleaut.lib.html\">http://rapidshare.com/files/26446254/hboleaut.lib.html</a><!-- m -->\n\nfor those that may want to start using it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->[/quote:1xijezvl]\n\nI already tried it from CVS. It seems to work fine. Thank you!\n\nEMG",
"time": "11:01",
"topic": "Class TOleAuto for Harbour",
"username": "Enrico Maria Giordano"
}
] |
Class TOleAuto for Harbour
|
[
{
"date": "2007-04-17",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Informaros de que la clase TOleAuto de xharbour ha sido portada a Harbour, por lo que si necesitais soporte de TOleAuto ahora podeis tenerlo desde Harbour tambien <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nYa está disponible en el CVS de Harbour en contrib/ole2\n\nEl próximo build de Harbour de FiveTech la incluirá (HBOleAut.lib)",
"time": "01:11",
"topic": "Class TOleAuto para Harbour",
"username": "Antonio Linares"
}
] |
Class TOleAuto para Harbour
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.