├── .gitattributes ├── .gitignore ├── APRecursao.prw ├── ASPThreads.prw ├── AdvPLSuite.prw ├── Agenda.prw ├── ApCodeBlock.prw ├── ApDBImage.prw ├── ApGlbQueue.prw ├── ApHello.prw ├── ApHello2.prw ├── ApHello3.prw ├── AppInt01.prw ├── AppInt02.prw ├── ColorGrid.prw ├── FTPManager.prw ├── GetScreen.cpp ├── GetScreen.dll ├── GetScreen.hpp ├── GetScreen.prw ├── MemCacheTST.prw ├── NewQRCode.prw ├── Numbersum.prw ├── Permuta.prw ├── PocBARCode128.prw ├── QryInCache.prw ├── README.md ├── RmtDet.prw ├── TSTDBIMG.prw ├── TSTDup.prw ├── TSTFile.prw ├── TSTHash.prw ├── TSTQueue.prw ├── WAgenda.aph ├── WAgenda.prw ├── Wordpress.PRJ ├── ZDBTFile.prw ├── ZDbfMemIndex.prw ├── ZFPTFile.prw ├── ZMEMIndex.prw ├── formpost.aph ├── getinfo.aph ├── postinfo.aph ├── tttp110_APGames.zip ├── zDBFFile.prw ├── zDBTFile.prw ├── zFPTFile.prw ├── zISAMFile.prw ├── zIsamFile.prw ├── zJsonKit.prw ├── zLibDateTime.ch ├── zLibDateTime.prw ├── zLibDec2Hex.ch ├── zLibDec2Hex.prw ├── zLibNBin.ch ├── zLibNBin.prw ├── zLibRandomic.ch ├── zLibRandomic.prw ├── zMEMFile.prw ├── zMEMIndex.prw └── zXMLKit.prw /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.BAK -------------------------------------------------------------------------------- /APRecursao.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/APRecursao.prw -------------------------------------------------------------------------------- /ASPThreads.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ASPThreads.prw -------------------------------------------------------------------------------- /AdvPLSuite.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/AdvPLSuite.prw -------------------------------------------------------------------------------- /Agenda.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/Agenda.prw -------------------------------------------------------------------------------- /ApCodeBlock.prw: -------------------------------------------------------------------------------- 1 | #include 'protheus.ch' 2 | 3 | /* ====================================================================== 4 | Função U_OLA01 .... U_OLA05 5 | Autor Júlio Wittwer 6 | Data 12/12/2014 7 | Descrição Fonte de teste e demonstração de uso de CodeBlocks 8 | 9 | Post relacionado : https://siga0984.wordpress.com/2014/12/12/codeblocks-em-advpl-parte-01/ 10 | ====================================================================== */ 11 | 12 | User Function Ola01() 13 | Local bCB := {|| MsgInfo("Ola CodeBlock") } 14 | Eval(bCB) 15 | Return 16 | 17 | 18 | User Function Ola02() 19 | Local bCB := {| cMsg | MsgInfo(cMsg) } 20 | Eval(bCB,"Ola CodeBlock") 21 | Eval(bCB,"Adeus CodeBlock") 22 | Return 23 | 24 | 25 | User Function Ola03() 26 | Local bCB := {| x1,x2 | IIF( X1 < x2 , x1 , x2 ) } 27 | Local nRet 28 | Local cRet 29 | nRet := Eval(bCB,10,5) 30 | MsgInfo( cValToChar(nRet),"Numero") 31 | cRet := Eval(bCB,"ABC","ACD") 32 | MsgInfo( cRet,"String") 33 | Return 34 | 35 | 36 | User Function Ola04() 37 | Local bCB := {| x,y,z | y := x/2 , z := x*2 , x%2 == 0 } 38 | Local nTeste := 4 39 | Local lPar 40 | Local nY , nZ 41 | // O bloco de codigo recebe em x o valor de nTeste 42 | // e recebe em y e z a referência das variáveis 43 | // nY e nZ respectivamente 44 | lPar := Eval( bCB , nTeste , @nY , @nZ ) 45 | MsgInfo(lPar , "O numero e par ? ") 46 | MsgInfo(nY , "Numero / 2 ") 47 | MsgInfo(nZ , "Numero * 2 ") 48 | Return 49 | 50 | 51 | User Function Ola05() 52 | Local aValores := {} 53 | Local nSoma := 0 54 | Local bSoma := {| nValor , nPos | nSoma += nValor } 55 | aadd(aValores,3) 56 | aadd(aValores,4) 57 | aadd(aValores,3) 58 | aadd(aValores,10) 59 | aEval(aValores,bSoma) 60 | MsgInfo(nSoma,"Valores Somados") 61 | Return 62 | 63 | 64 | -------------------------------------------------------------------------------- /ApDBImage.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ApDBImage.prw -------------------------------------------------------------------------------- /ApGlbQueue.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ApGlbQueue.prw -------------------------------------------------------------------------------- /ApHello.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ApHello.prw -------------------------------------------------------------------------------- /ApHello2.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ApHello2.prw -------------------------------------------------------------------------------- /ApHello3.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ApHello3.prw -------------------------------------------------------------------------------- /AppInt01.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/AppInt01.prw -------------------------------------------------------------------------------- /AppInt02.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/AppInt02.prw -------------------------------------------------------------------------------- /ColorGrid.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ColorGrid.prw -------------------------------------------------------------------------------- /FTPManager.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/FTPManager.prw -------------------------------------------------------------------------------- /GetScreen.cpp: -------------------------------------------------------------------------------- 1 | #define _CRT_SECURE_NO_WARNINGS 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "GetScreen.hpp" 9 | 10 | /* ------------------------------------------------------------ 11 | Programa GetScreen 12 | Autor Júlio Wittwer 13 | Data 07/09/2016 14 | Descrição DLL Win32 para uso com o TOTVS SmartClient 15 | Permite a captura da tela do computador onde o SmartClient está sendo executado 16 | gerada como uma imagem .JPEG salva em disco, usando o nome do arquivo fornecido 17 | como parâmetro. 18 | 19 | Utilização 20 | 21 | Utilizar a função ExecInClientDLL(), informando os seguintes parâmetros: 22 | 23 | int ID => Número da operação desejada 24 | 0 = Obter a versão da API 25 | 1 = Capturar um ScreenShot em formato JPEG 26 | 27 | char * BufIn => array de char contendo um parâmetro para a opção. 28 | SE ID = 0, o parâmetro é ignorado e pode ser NULL 29 | SE ID = 1, deve ser informado o nome do arquivo JPEG no qual a 30 | captura de tela deve ser gravada. 31 | 32 | char * BufOut => Array de char contendo o resultado da chamada, no formato 33 | NNN XXXXXXXX, onde NNN é um Código de Status , e XXXXX contém uma informação 34 | adicional sobre o status retornado. Em caso de sucesso, o número retornado é "000" 35 | Qualquer outro número indica uma condição de falha. 36 | 37 | "001 Encode size failed" 38 | "002 Memory allocation failed" 39 | "003 Image Codec not found" 40 | "004 Image Save Error (%d)" 41 | "005 Unexpected Error %d 42 | "010 Unknow Command" 43 | 44 | ------------------------------------------------------------ */ 45 | 46 | 47 | extern "C" __declspec(dllexport) void ExecInClientDLL( int ID, char * BufIn, char * BufOut, int nSizeOut ) 48 | { 49 | 50 | if( ID == 0 ) 51 | { 52 | // Retorna a versão da DLL de captura 53 | strcpy(BufOut,"000 GetScreen V 0.160911"); 54 | } 55 | else if (ID == 1) 56 | { 57 | // REaliza a captura da tela 58 | // Recebe em BuffIn o nome do arquivo a ser salvo 59 | // Retona em buffOut o status da operação 60 | // Em caso de sucesso, retorno "000 Ok" 61 | // Em caso de erro, retorno "NNN " 62 | DoCapture(BufIn,BufOut); 63 | } 64 | else 65 | { 66 | // ID não conhecido/inválido 67 | strcpy(BufOut,"010 Unknow Command"); 68 | } 69 | } 70 | 71 | 72 | /* ------------------------------------------------------------ 73 | Codigo exemplo de captura de tela obtido HitHub 74 | https://gist.github.com/philipgoh/3865787 75 | em 07/9/2016, refatorado para atender a necessidade 76 | deste exemplo 77 | ------------------------------------------------------------ */ 78 | 79 | 80 | using namespace Gdiplus; 81 | using namespace std; 82 | 83 | // Inicializa GDI para a captura de vídeo 84 | // faz a captura, salva em disco, e finaliza GDI 85 | 86 | void DoCapture( char * file , char * result ) 87 | { 88 | 89 | // Initialize GDI+. 90 | GdiplusStartupInput gdiplusStartupInput; 91 | ULONG_PTR gdiplusToken; 92 | 93 | GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); 94 | 95 | int x1 = 0; 96 | int y1 = 0; 97 | int x2 = GetSystemMetrics(SM_CXSCREEN); 98 | int y2 = GetSystemMetrics(SM_CYSCREEN); 99 | 100 | // Realiza a captura da tela e salva em arquivo 101 | ScreenCapture(x1, y1, x2 - x1, y2 - y1, file , result ); 102 | 103 | // Shutdown GDI+ 104 | GdiplusShutdown(gdiplusToken); 105 | 106 | } 107 | 108 | 109 | // Retorna o ponteiro do encoder adequado para fazer 110 | // a conversão do BITMAP em memória para o formato desejado 111 | 112 | 113 | int GetEncoderClsid(const WCHAR* format, CLSID* pClsid ) 114 | { 115 | UINT num = 0; // number of image encoders 116 | UINT size = 0; // size of the image encoder array in bytes 117 | 118 | ImageCodecInfo* pImageCodecInfo = NULL; 119 | 120 | GetImageEncodersSize(&num, &size); 121 | 122 | if(size == 0) 123 | { 124 | // Encode Size Failure 125 | return -1; 126 | } 127 | 128 | pImageCodecInfo = (ImageCodecInfo*)(malloc(size)); 129 | if(pImageCodecInfo == NULL) 130 | { 131 | // Memory allocation failure 132 | return -2; 133 | } 134 | 135 | GetImageEncoders(num, size, pImageCodecInfo); 136 | 137 | for(UINT j = 0; j < num; ++j) 138 | { 139 | if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 ) 140 | { 141 | *pClsid = pImageCodecInfo[j].Clsid; 142 | free(pImageCodecInfo); 143 | // Success 144 | return j; 145 | } 146 | } 147 | 148 | free(pImageCodecInfo); 149 | 150 | // Image Codec not found 151 | return -3; 152 | } 153 | 154 | // Encapsula a gravação do BITMAP capturado da tela 155 | // para o formato JPEG em disco 156 | 157 | void BitmapToJpg(HBITMAP hbmpImage, char *filename , char * result ) 158 | { 159 | 160 | Status eRC = Ok; 161 | 162 | Bitmap * p_bmp = Bitmap::FromHBITMAP(hbmpImage, NULL); 163 | 164 | CLSID pngClsid; 165 | 166 | int RC = GetEncoderClsid(L"image/jpeg", &pngClsid); 167 | 168 | if( RC >= 0 ) 169 | { 170 | const size_t cSize = strlen(filename)+1; 171 | std::wstring wc( cSize, L'#' ); 172 | mbstowcs( &wc[0], filename, cSize ); 173 | eRC = p_bmp->Save(&wc[0], &pngClsid, NULL); 174 | if ( eRC != Ok) 175 | RC = -4; 176 | } 177 | 178 | delete p_bmp; 179 | 180 | if ( RC == -1 ) 181 | sprintf_s(result,255,"001 Encode size failed"); 182 | else if ( RC == -2 ) 183 | sprintf_s(result,255,"002 Memory allocation failed"); 184 | else if ( RC == -3 ) 185 | sprintf_s(result,255,"003 Image Codec not found"); 186 | else if ( RC == -4 ) 187 | sprintf_s(result,255,"004 Image Save Error (%d)",eRC); 188 | else if ( RC < 0 ) 189 | sprintf_s(result,255,"005 Unexpected Error %d",RC); 190 | else 191 | sprintf_s(result,255,"000 Ok"); 192 | 193 | } 194 | 195 | 196 | // Funão de captura / snapshot de tela 197 | // Requer o ambiente DGI previamente inicializado 198 | 199 | void ScreenCapture(int x, int y, int width, int height, char *filename, char * result ) 200 | { 201 | HDC hDcMemory = CreateCompatibleDC(0); 202 | HDC hDcScreen = GetDC(0); 203 | HBITMAP hBmp = CreateCompatibleBitmap(hDcScreen, width, height); 204 | 205 | SelectObject(hDcMemory, hBmp); 206 | BitBlt(hDcMemory, 0, 0, width, height, hDcScreen, x, y, SRCCOPY); 207 | 208 | // Converte a tela capturada em JPEG e salva em disco 209 | BitmapToJpg(hBmp, filename , result ); 210 | 211 | // Cleanup 212 | DeleteObject(hBmp); 213 | DeleteObject(hDcMemory); 214 | ReleaseDC(NULL,hDcScreen); 215 | 216 | } 217 | -------------------------------------------------------------------------------- /GetScreen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/GetScreen.dll -------------------------------------------------------------------------------- /GetScreen.hpp: -------------------------------------------------------------------------------- 1 | 2 | void DoCapture( char * file , char * result ); 3 | void ScreenCapture(int x, int y, int width, int height, char *filename, char * result ); 4 | 5 | 6 | -------------------------------------------------------------------------------- /GetScreen.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/GetScreen.prw -------------------------------------------------------------------------------- /MemCacheTST.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/MemCacheTST.prw -------------------------------------------------------------------------------- /NewQRCode.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/NewQRCode.prw -------------------------------------------------------------------------------- /Numbersum.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/Numbersum.prw -------------------------------------------------------------------------------- /Permuta.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/Permuta.prw -------------------------------------------------------------------------------- /PocBARCode128.prw: -------------------------------------------------------------------------------- 1 | #include 'protheus.ch' 2 | #include 'zlib.ch' 3 | 4 | User Function PocBAR128() 5 | 6 | Local oBar := zBarCode128():New() 7 | Local aSeq, oBmp 8 | 9 | // Gera a sequencia de valores em array 10 | aSeq := oBar:Generate('http://siga0984.wordpress.com') 11 | 12 | // Monta o bitmap usando os valores 13 | oBmp := oBar:BuildBmp(aSeq) 14 | 15 | // Salva a imagem em disco 16 | oBmp:SaveToBMP('\barcode.bmp') 17 | 18 | Return 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /QryInCache.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/QryInCache.prw -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blog 2 | 3 | Fontes AdvPL do Bog "Tudo em AdvPL" 4 | 5 | Cada fonte de exemplo publicado no BLOG "Tudo em AdvPL" ( https://siga0984.wordpress.com ) está disponivel para Download 6 | 7 | ATENCAO -- Embora os fontes da ZLIB ainda estejam neste repositorio, eles estao sendo versionados separadamente a partir de 11/1/2019 no repositorio https://github.com/siga0984/zLIB 8 | 9 | 10 | /* ------------------------------------------------------------------------------------------- 11 | 12 | Copyright 2015-2019 Júlio Wittwer ( siga0984@gmail.com | http://siga0984.wordpress.com/ ) 13 | 14 | É permitido, gratuitamente, a qualquer pessoa que obtenha uma cópia deste software 15 | e dos arquivos de documentação associados (o "Software"), para negociar o Software 16 | sem restrições, incluindo, sem limitação, os direitos de uso, cópia, modificação, fusão, 17 | publicação, distribuição, sublicenciamento e/ou venda de cópias do Software, 18 | SEM RESTRIÇÕES OU LIMITAÇÕES. 19 | 20 | O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, 21 | INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE 22 | ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS 23 | SERÃO RESPONSÁVEIS POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA 24 | EM AÇÃO DE CONTRATO OU QUALQUER OUTRA FORMA, PROVENIENTE, FORA OU RELACIONADO AO SOFTWARE. 25 | 26 | *** USE A VONTADE, POR SUA CONTA E RISCO *** 27 | 28 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 29 | and associated documentation files (the "Software"), to deal in the Software without 30 | restriction, including without limitation the rights to use, copy, modify, merge, publish, 31 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom 32 | the Software is furnished to do so, WITHOUT RESTRICTIONS OR LIMITATIONS. 33 | 34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 35 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 36 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 37 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 38 | OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE. 39 | 40 | *** USE AS YOU WISH , AT YOUR OWN RISK *** 41 | 42 | ------------------------------------------------------------------------------------------- */ 43 | 44 | -------------------------------------------------------------------------------- /RmtDet.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/RmtDet.prw -------------------------------------------------------------------------------- /TSTDBIMG.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/TSTDBIMG.prw -------------------------------------------------------------------------------- /TSTDup.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/TSTDup.prw -------------------------------------------------------------------------------- /TSTFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/TSTFile.prw -------------------------------------------------------------------------------- /TSTHash.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/TSTHash.prw -------------------------------------------------------------------------------- /TSTQueue.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/TSTQueue.prw -------------------------------------------------------------------------------- /WAgenda.aph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/WAgenda.aph -------------------------------------------------------------------------------- /WAgenda.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/WAgenda.prw -------------------------------------------------------------------------------- /Wordpress.PRJ: -------------------------------------------------------------------------------- 1 | Group Tudo em Advpl 2 | Version=7.0 3 | VSSDB= 4 | HasProperties=1 5 | Properties 6 | BeforeApply= 7 | AfterApply= 8 | Icon= 9 | ID= 10 | Version= 11 | PalmName= 12 | OutPut= 13 | End 14 | ProjectsCount=1 15 | Project siga0984 16 | FoldersCount=1 17 | Folder Fontes 18 | VSSPath=Fontes 19 | FilesCount=14 20 | File \GitHub\Blog\ApCodeBlock.prw 21 | Type=T 22 | End 23 | File \GitHub\Blog\ApGlbQueue.prw 24 | Type=T 25 | End 26 | File \GitHub\Blog\ApHello.prw 27 | Type=T 28 | End 29 | File \GitHub\Blog\ApHello2.prw 30 | Type=T 31 | End 32 | File \GitHub\Blog\ApHello3.prw 33 | Type=T 34 | End 35 | File \GitHub\Blog\AppInt01.prw 36 | Type=T 37 | End 38 | File \GitHub\Blog\AppInt02.prw 39 | Type=T 40 | End 41 | File \GitHub\Blog\APRecursao.prw 42 | Type=T 43 | End 44 | File \GitHub\Blog\RmtDet.prw 45 | Type=T 46 | End 47 | File \GitHub\Blog\TSTDup.prw 48 | Type=T 49 | End 50 | File \GitHub\Blog\TSTHash.prw 51 | Type=T 52 | End 53 | File \GitHub\Blog\TSTQueue.prw 54 | Type=T 55 | End 56 | File \GitHub\Blog\ApDBImage.prw 57 | Type=T 58 | End 59 | File \GitHub\Blog\TSTDBIMG.prw 60 | Type=T 61 | End 62 | End 63 | End 64 | End 65 | -------------------------------------------------------------------------------- /ZDBTFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ZDBTFile.prw -------------------------------------------------------------------------------- /ZDbfMemIndex.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ZDbfMemIndex.prw -------------------------------------------------------------------------------- /ZFPTFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ZFPTFile.prw -------------------------------------------------------------------------------- /ZMEMIndex.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/ZMEMIndex.prw -------------------------------------------------------------------------------- /formpost.aph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/formpost.aph -------------------------------------------------------------------------------- /getinfo.aph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/getinfo.aph -------------------------------------------------------------------------------- /postinfo.aph: -------------------------------------------------------------------------------- 1 | 2 |

Dados Sumbetidos

3 |

First name: <%=HTTPPOST->FIRSTNAME%>
4 | Last name: <%=HTTPPOST->LASTNAME%>

5 | 6 | -------------------------------------------------------------------------------- /tttp110_APGames.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/tttp110_APGames.zip -------------------------------------------------------------------------------- /zDBFFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zDBFFile.prw -------------------------------------------------------------------------------- /zDBTFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zDBTFile.prw -------------------------------------------------------------------------------- /zFPTFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zFPTFile.prw -------------------------------------------------------------------------------- /zISAMFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zISAMFile.prw -------------------------------------------------------------------------------- /zIsamFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zIsamFile.prw -------------------------------------------------------------------------------- /zJsonKit.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zJsonKit.prw -------------------------------------------------------------------------------- /zLibDateTime.ch: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------------------- 2 | 3 | Copyright 2015-2019 Júlio Wittwer ( siga0984@gmail.com | http://siga0984.wordpress.com/ ) 4 | 5 | É permitido, gratuitamente, a qualquer pessoa que obtenha uma cópia deste software 6 | e dos arquivos de documentação associados (o "Software"), para negociar o Software 7 | sem restrições, incluindo, sem limitação, os direitos de uso, cópia, modificação, fusão, 8 | publicação, distribuição, sublicenciamento e/ou venda de cópias do Software, 9 | SEM RESTRIÇÕES OU LIMITAÇÕES. 10 | 11 | O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, 12 | INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE 13 | ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS 14 | SERÃO RESPONSÁVEIS POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA 15 | EM AÇÃO DE CONTRATO OU QUALQUER OUTRA FORMA, PROVENIENTE, FORA OU RELACIONADO AO SOFTWARE. 16 | 17 | *** USE A VONTADE, POR SUA CONTA E RISCO *** 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 20 | and associated documentation files (the "Software"), to deal in the Software without 21 | restriction, including without limitation the rights to use, copy, modify, merge, publish, 22 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom 23 | the Software is furnished to do so, WITHOUT RESTRICTIONS OR LIMITATIONS. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 26 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 27 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 28 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 29 | OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE. 30 | 31 | *** USE AS YOU WISH , AT YOUR OWN RISK *** 32 | 33 | ------------------------------------------------------------------------------------------- */ 34 | 35 | 36 | 37 | 38 | 39 | #ifndef zLibDateTime_CH 40 | 41 | #define zLibDateTime_CH 42 | 43 | #xtranslate STOD( ) => U_ZSTOD( ) 44 | #xtranslate DATE2DJ( ) => U_ZDATE2DJ( ) 45 | #xtranslate DJ2DATE( ) => U_ZDJ2DATE( ) 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /zLibDateTime.prw: -------------------------------------------------------------------------------- 1 | #include 'Protheus.ch' 2 | 3 | // ---------------------------------------- 4 | // Converte data no formato AAAAMMDD para Data do AdvPL 5 | STATIC Function STOD(cValue) 6 | Local cOldSet := Set(_SET_DATEFORMAT, 'yyyy:mm:dd') 7 | Local dRet := CTOD(Substr(cValue,1,4)+":"+Substr(cValue,5,2)+":"+Substr(cValue,7,2)) 8 | Set(_SET_DATEFORMAT, cOldSet) 9 | Return dRet 10 | 11 | -------------------------------------------------------------------------------- /zLibDec2Hex.ch: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------------------- 2 | 3 | Copyright 2015-2019 Júlio Wittwer ( siga0984@gmail.com | http://siga0984.wordpress.com/ ) 4 | 5 | É permitido, gratuitamente, a qualquer pessoa que obtenha uma cópia deste software 6 | e dos arquivos de documentação associados (o "Software"), para negociar o Software 7 | sem restrições, incluindo, sem limitação, os direitos de uso, cópia, modificação, fusão, 8 | publicação, distribuição, sublicenciamento e/ou venda de cópias do Software, 9 | SEM RESTRIÇÕES OU LIMITAÇÕES. 10 | 11 | O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, 12 | INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE 13 | ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS 14 | SERÃO RESPONSÁVEIS POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA 15 | EM AÇÃO DE CONTRATO OU QUALQUER OUTRA FORMA, PROVENIENTE, FORA OU RELACIONADO AO SOFTWARE. 16 | 17 | *** USE A VONTADE, POR SUA CONTA E RISCO *** 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 20 | and associated documentation files (the "Software"), to deal in the Software without 21 | restriction, including without limitation the rights to use, copy, modify, merge, publish, 22 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom 23 | the Software is furnished to do so, WITHOUT RESTRICTIONS OR LIMITATIONS. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 26 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 27 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 28 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 29 | OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE. 30 | 31 | *** USE AS YOU WISH , AT YOUR OWN RISK *** 32 | 33 | ------------------------------------------------------------------------------------------- */ 34 | 35 | 36 | 37 | 38 | #ifndef zLibDec2Hex_CH 39 | 40 | #define zLibDec2Hex_CH 41 | 42 | #xtranslate Dec2Hex( ) => U_ZDec2Hex ( ) 43 | #xtranslate Hex2Dec( ) => U_ZHex2Dec ( ) 44 | 45 | #endif 46 | 47 | 48 | -------------------------------------------------------------------------------- /zLibDec2Hex.prw: -------------------------------------------------------------------------------- 1 | 2 | /* ====================================================== 3 | 4 | Funcoes de Conversao Decimal / Hexa e vice-versa 5 | 6 | ====================================================== */ 7 | 8 | USER Function HexTest() 9 | Local cHex := 'AA' 10 | Local nVal := HEX2DEC(cHex) 11 | Local cHex2 := DEC2HEX(nVal) 12 | conout(cHex) 13 | conout(nVal) 14 | conout(cHex2) 15 | return 16 | 17 | // ---------------------------------------- 18 | // Converte um valort decimal de 0 a 255 para Hexadecimal 19 | 20 | STATIC __aHEX := {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'} 21 | 22 | STATIC Function DEC2HEX(nByte) 23 | Local nL := ( nByte % 16 ) 24 | Local nH := ( nByte-nL) / 16 25 | Return __aHEX[nH+1]+__aHEX[nL+1] 26 | 27 | // ---------------------------------------- 28 | // Converte um valort hexadecimal de 00 a FF para decimal 29 | 30 | STATIC Function HEX2DEC(cHex) 31 | Local nH := asc(Upper(substr(cHex,1,1))) 32 | Local nL := asc(Upper(substr(cHex,2,1))) 33 | If nH <= 57 ; nH -= 48 ; Else ; nH -= 55 ; Endif 34 | If nL <= 57 ; nL -= 48 ; Else ; nL -= 55 ; Endif 35 | Return (nH*16)+nL 36 | 37 | 38 | -------------------------------------------------------------------------------- /zLibNBin.ch: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------------------- 2 | 3 | Copyright 2015-2019 Júlio Wittwer ( siga0984@gmail.com | http://siga0984.wordpress.com/ ) 4 | 5 | É permitido, gratuitamente, a qualquer pessoa que obtenha uma cópia deste software 6 | e dos arquivos de documentação associados (o "Software"), para negociar o Software 7 | sem restrições, incluindo, sem limitação, os direitos de uso, cópia, modificação, fusão, 8 | publicação, distribuição, sublicenciamento e/ou venda de cópias do Software, 9 | SEM RESTRIÇÕES OU LIMITAÇÕES. 10 | 11 | O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, 12 | INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE 13 | ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS 14 | SERÃO RESPONSÁVEIS POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA 15 | EM AÇÃO DE CONTRATO OU QUALQUER OUTRA FORMA, PROVENIENTE, FORA OU RELACIONADO AO SOFTWARE. 16 | 17 | *** USE A VONTADE, POR SUA CONTA E RISCO *** 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 20 | and associated documentation files (the "Software"), to deal in the Software without 21 | restriction, including without limitation the rights to use, copy, modify, merge, publish, 22 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom 23 | the Software is furnished to do so, WITHOUT RESTRICTIONS OR LIMITATIONS. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 26 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 27 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 28 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 29 | OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE. 30 | 31 | *** USE AS YOU WISH , AT YOUR OWN RISK *** 32 | 33 | ------------------------------------------------------------------------------------------- */ 34 | 35 | 36 | 37 | 38 | 39 | #ifndef zLibNBin_CH 40 | 41 | #define zLibNBin_CH 42 | 43 | #xtranslate Bin4toN( ) => U_Bin4toN ( ) 44 | #xtranslate NtoBin4( ) => U_NtoBin4 ( ) 45 | 46 | #xtranslate Bin2toN( ) => U_Bin2toN ( ) 47 | #xtranslate NtoBin2( ) => U_NtoBin2 ( ) 48 | 49 | #xtranslate NTOBIT8( ) => U_NTOBIT8 ( ) 50 | #xtranslate NTOBIT16( ) => U_NTOBIT16 ( ) 51 | 52 | #xtranslate NTOBITS( ) => U_NTOBITS ( ) 53 | #xtranslate BITSTON( ) => U_BITSTON ( ) 54 | 55 | #xtranslate Bit4ToHex( ) => U_Bit4ToHex ( ) 56 | 57 | #xtranslate BIT8TON( , ) => U_BIT8TON ( , @ ) 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /zLibNBin.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zLibNBin.prw -------------------------------------------------------------------------------- /zLibRandomic.ch: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------------------- 2 | 3 | Copyright 2015-2019 Júlio Wittwer ( siga0984@gmail.com | http://siga0984.wordpress.com/ ) 4 | 5 | É permitido, gratuitamente, a qualquer pessoa que obtenha uma cópia deste software 6 | e dos arquivos de documentação associados (o "Software"), para negociar o Software 7 | sem restrições, incluindo, sem limitação, os direitos de uso, cópia, modificação, fusão, 8 | publicação, distribuição, sublicenciamento e/ou venda de cópias do Software, 9 | SEM RESTRIÇÕES OU LIMITAÇÕES. 10 | 11 | O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, 12 | INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE 13 | ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS 14 | SERÃO RESPONSÁVEIS POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA 15 | EM AÇÃO DE CONTRATO OU QUALQUER OUTRA FORMA, PROVENIENTE, FORA OU RELACIONADO AO SOFTWARE. 16 | 17 | *** USE A VONTADE, POR SUA CONTA E RISCO *** 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 20 | and associated documentation files (the "Software"), to deal in the Software without 21 | restriction, including without limitation the rights to use, copy, modify, merge, publish, 22 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom 23 | the Software is furnished to do so, WITHOUT RESTRICTIONS OR LIMITATIONS. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 26 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 27 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 28 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 29 | OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE. 30 | 31 | *** USE AS YOU WISH , AT YOUR OWN RISK *** 32 | 33 | ------------------------------------------------------------------------------------------- */ 34 | 35 | 36 | 37 | 38 | 39 | #ifndef zLibRandomic_CH 40 | 41 | #define zLibRandomic_CH 42 | 43 | #xtranslate Randomic( , ) => U_RANDOMIC , , ) 44 | 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /zLibRandomic.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zLibRandomic.prw -------------------------------------------------------------------------------- /zMEMFile.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zMEMFile.prw -------------------------------------------------------------------------------- /zMEMIndex.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zMEMIndex.prw -------------------------------------------------------------------------------- /zXMLKit.prw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siga0984/Blog/f4b4c8a40238139006008dac5fa2fd2ff50d1cdd/zXMLKit.prw --------------------------------------------------------------------------------