Code Snippets xBase

Short texts xBase 🧑‍💻 Code snippets xBase ✍️ Reading lists xBase 👀

Programa de stress test para appserver.

#include “protheus.ch” #include “shell.ch USER Function BateMuito() Local cMyEmp := space(2) Local cMyFil := space(2) Local nProcs := 1 Local cSlaves := ” cMyEmp := ’99’ cMyFil := ’01’ cSlaves := ‘localhost:1235’ ShellExecute( “open”, “cmd”, “wmic cpu get loadpercentage”,”d:\tmp”, 1) DEFINE DIALOG oDlg TITLE “Stress Protheus” ; FROM 0,0 TO 480,640 PIXEL @ 05,05 SAY […]

Programa de stress test para appserver.

#include “protheus.ch” #include “shell.ch USER Function BateMuito() Local cMyEmp := space(2) Local cMyFil := space(2) Local nProcs := 1 Local cSlaves := ” cMyEmp := ’99’ cMyFil := ’01’ cSlaves := ‘localhost:1235’ ShellExecute( “open”, “cmd”, “wmic cpu get loadpercentage”,”d:\tmp”, 1) DEFINE DIALOG oDlg TITLE “Stress Protheus” ; FROM 0,0 TO 480,640 PIXEL @ 05,05 SAY […]

Exemplo completo webservice REST ADVPL

#include “PROTHEUS.ch” #include “RESTFUL.ch” #xtranslate @{Header } => ::GetHeader( ) #xtranslate @{Param } => ::aURLParms\[ \] #xtranslate @{EndRoute} => EndCase #xtranslate @{Route} => Do Case #xtranslate @{When } => Case NGIsRoute( ::aURLParms, ) #xtranslate @{Default} => Otherwise Static aUsers := {{‘1′,’Vitor’,’27’},{‘2′,’Joao’,’40’},{‘3′,’Jackson’,’25’}} WsRestful tstwsrest Description “WebService REST para testes” WsMethod GET Description “Sincronização de dados via […]