This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void Main(string[] args) | |
| { | |
| try{ | |
| GTFrotaIntegracaoClient client = new GTFrotaIntegracaoClient(); | |
| if (client.Autenticar("JSANTANA", "123")) | |
| Console.WriteLine("Acesso autorizado"); | |
| else | |
| Console.WriteLine("ACesso negado"); | |
| }catch(Exception ex){ | |
| Console.WriteLine(ex.Message); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #CORE | |
| group = core | |
| admin-port = 13000 | |
| admin-password = playsms | |
| status-password = playsms | |
| log-file = "/var/log/kannel/kannel.log" | |
| log-level = 0 | |
| access-log = "/var/log/kannel/access.log" | |
| smsbox-port = 13001 | |
| store-type = file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Simple Python module to upload files to Google Drive | |
| # Needs a file 'client_secrets.json' in the directory | |
| # The file can be obtained from https://console.developers.google.com/ | |
| # under APIs&Auth/Credentials/Create Client ID for native application | |
| # To test usage: | |
| # import google_drive_util | |
| # google_drive_util.login() | |
| # google_drive_util.test() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| generatePagesArray: function(currentPage, collectionLength, rowsPerPage, paginationRange) | |
| { | |
| var pages = []; | |
| var totalPages = Math.ceil(collectionLength / rowsPerPage); | |
| var halfWay = Math.ceil(paginationRange / 2); | |
| var position; | |
| if (currentPage <= halfWay) { | |
| position = 'start'; | |
| } else if (totalPages - halfWay < currentPage) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #INCLUDE 'protheus.ch' | |
| #INCLUDE 'topconn.ch' | |
| User Function ImpGTRel01() | |
| Private oReport := Nil | |
| Private oSecCab := Nil | |
| Private cPerg := PadR("RCOMR01", Len(SX1->X1_GRUPO)) | |
| PutSx1(cPerg,"01","Código de?" ,'','',"mv_ch1","C",TamSx3 ("B1_COD")[1] ,0,,"G","","SB1","","","mv_par01","","","","","","","","","","","","","","","","") | |
| PutSx1(cPerg,"02","Código ate?" ,'','',"mv_ch2","C",TamSx3 ("B1_COD")[1] ,0,,"G","","SB1","","","mv_par02","","","","","","","","","","","","","","","","") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| col "Tablespace" for a22 | |
| col "Used MB" for 99,999,999 | |
| col "Free MB" for 99,999,999 | |
| col "Total MB" for 99,999,999 | |
| select df.tablespace_name "Tablespace", | |
| totalusedspace "Used MB", | |
| (df.totalspace - tu.totalusedspace) "Free MB", | |
| df.totalspace "Total MB", | |
| round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "PROTHEUS.ch" | |
| #include "RESTFUL.ch" | |
| #xtranslate @{Header <(cName)>} => ::GetHeader( <(cName)> ) | |
| #xtranslate @{Param <n>} => ::aURLParms\[ <n> \] | |
| #xtranslate @{EndRoute} => EndCase | |
| #xtranslate @{Route} => Do Case | |
| #xtranslate @{When <path>} => Case NGIsRoute( ::aURLParms, <path> ) | |
| #xtranslate @{Default} => Otherwise |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #INCLUDE "TOTVS.CH" | |
| User Function RemoveEspec(cWord) | |
| cWord := OemToAnsi(AllTrim(cWord)) | |
| cWord := FwNoAccent(cWord) | |
| cWord := FwCutOff(cWord) | |
| cWord := strtran(cWord,"ã","a") | |
| cWord := strtran(cWord,"º","") | |
| cWord := strtran(cWord,"%","") | |
| cWord := strtran(cWord,"*","") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import speech_recognition as sr | |
| from pyautogui import press, typewrite, hotkey | |
| r = sr.Recognizer() | |
| with sr.Microphone() as source: | |
| while True: | |
| try: | |
| audio = r.listen(source) | |
| result = r.recognize_google(audio,language="pt-BR") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include 'totvs.ch' | |
| #include "TBICONN.CH" | |
| // EXEMPLO DE CHAMADA DA FUNCAO | |
| User Function Intel01tst() | |
| Local oPedidoEnvio, cPed, oVolume | |
| Local aItens := {} | |
| PREPARE ENVIRONMENT EMPRESA "01" FILIAL "0103" USER "ADMIN" PASSWORD "589@corp" MODULO "FAT" | |
| cPed := "000131" |
OlderNewer