Pular para o conteúdo principal

Postagem em destaque

🚀 Oferecendo Serviços Remotos de Desenvolvedor AdvPL e Mais 🖥️

🚀 Oferecendo Serviços Remotos de Desenvolvedor AdvPL e Mais 🖥️ Olá pessoal, Espero que este post encontre todos vocês bem! É com grande entusiasmo que compartilho que estou expandindo meus serviços como Desenvolvedor AdvPL para novos desafios e colaborações. Com mais de duas décadas de experiência sólida, minha jornada profissional tem sido enriquecedora, com a oportunidade de participar de projetos empolgantes ao longo dos anos. Agora, estou ansioso para trazer minha experiência e habilidades para novas equipes e projetos, trabalhando de forma remota. Minha expertise abrange não apenas AdvPL, mas também outras tecnologias-chave, incluindo JS, SQL, Infraestrutura e Otimização de Processos. Acredito que essa combinação de conhecimentos me permite oferecer soluções abrangentes e eficazes para uma variedade de necessidades de desenvolvimento. Acredito que a tecnologia tem o poder de transformar negócios e impulsionar o sucesso, e estou comprometido em ajudar meus clientes a alcançar seu

BlackTDN :: Feliz Natal e Boas Festas :: via PowerShell

 

BlackTDN

‘(18029799997931744,139752119745773792|%{"{0,60}"-f [Convert]::ToString($_, 2).Replace("0"," ")})-split”(.{12}|Mh)”|?{$_}’|%{iex $_;-join[char[]]$_[[char[]]"nOBB7[4oBCaenRa"]}

image

ou, se preferir algo mais animado….( Powershell – Oh Christmas Tree, Oh Christmas tree – One more change :: By Sean Kearneyon )

# PowershellTree-V-whatever.PS1

#Clear the Screen

clear-host

#Move it all down the line

write-host

# Assign two special characters into an array for potential "LIGHTS"

$starchar=[char][byte]15, "*"

# Number of rows Deep for the Tree- from 2 to whatever fits on the screen, after 30 it gets funky

$Rows = 30

# These variables are for the Bouncing Marquee at the bottom
# Column, number of Columns to move (relative to size of tree)
# and Direction it will move

$BottomRow=$Rows+4
$BottomColumn=0
$BottomMaxCol=($Rows)
$Direction=1

# Standard console Colours
# Just for fun I added in all the possible Console Foreground Colors
# Delete whichever ones you don't like

$colors = "DarkRed","DarkBlue","DarkCyan","DarkMagenta","DarkYellow","Gray","DarkGray","Blue","Green","Cyan","Red","Magenta","Yellow","White"

# Get where the Cursor was

$oldpos = $host.ui.RawUI.CursorPosition

# BsponPosh’s ORIGINAL Tree building Algorithm :)
# None of this would be possible if it weren’t for him

    Foreach ($r in ($rows..1)){
        write-host $(" " * $r) -NoNewline
        1..((($rows -$r) * 2)+1) | %{
                write-Host "*" -ForegroundColor Darkgreen  -nonewline
       }
        write-host ""
    }           

    # trunk

# A slight change, an extra row on the stump of the tree
# and Red (Trying to make it look like a brown trunk

    write-host $("{0}***" -f (' ' * ($Rows -1) ))  -ForegroundColor DarkRed
    write-host $("{0}***" -f (' ' * ($Rows -1) ))  -ForegroundColor DarkRed
    write-host $("{0}***" -f (' ' * ($Rows -1) ))  -ForegroundColor DarkRed

$host.ui.RawUI.CursorPosition = $oldpos

# New Addins by Sean “The Energized Tech” Kearney

# Compute the possible number of stars in tree (Number of Rows Squared)

$numberstars=[math]::pow($Rows,2)

# Number of lights to give to tree.  %25 percent of the number of green stars.  You pick

$numberlights=$numberstars *.35

# Initialize an array to remember all the “Star Locations”

for ($i = 0; $i -lt $numberlights; $i++)
{
$Starlocation+=@($host.ui.Rawui.CursorPosition)
}

# Probably redundant, but just in case, remember where the  heck I am!

$oldpos = $host.ui.RawUI.CursorPosition

# New change.  Create an Array of positions to place lights on and off

foreach ($light in ($numberlights..1))
    {
    # Pick a Random Row

    $row=(get-random -min 1 -max (($Rows)+1))

    # Pick a Random Column – Note The Column Position is
    # Relative to the Row vs Number of Rows

    $column=($Rows-$row)+(get-random -min 1 -max ($row*2))

    #Grab the current position and store that away in a $Temp Variable
    $temppos=$host.ui.rawui.CursorPosition

    # Now Build new location of X,Y into $HOST
    $temppos.x=$column
    $temppos.y=$row

    # Store this away for later
    $Starlocation[(($light)-1)]=$temppos

    # Now update that “STAR” with a Colour
    }
# Repeat this OVER and OVER and OVER and OVER

while($true)

{

# Now we just pull all those stars up and blank em back
# on or off randomly 7 at a time

for ($light=1; $light -lt 7; $light++)
    {
    # Set cursor to random location within Predefined "Star Location Array"

    $host.ui.RawUI.CursorPosition=($Starlocation | get-random)
    # Pick a random number between 1 and 1000
    # if 500 or higher, turn it to a light
    # Else turn it off

    $flip=get-random -min 1 -max 1000
    if ($flip -gt 500)
        {

        # Write a Random "star character" on the screen
    # in a Random Foreground Color from defined sets

    write-Host ($starchar | get-random) -ForegroundColor  ($colors | get-random) -nonewline
    }
    else
    {
    write-host "*" -Foregroundcolor DarkGreen -nonewline
    }
    }

# Remember where we are

$temppos=$oldpos

# Set a position for the row and Column

$oldpos.X=$BottomColumn
$oldpos.Y=$BottomRow

# update the console

$host.ui.Rawui.CursorPosition=$oldpos

# Bump up the column position based upon direction

$BottomColumn=$BottomColumn+$Direction

# Ok this was a BAD way to do it but it works for
# Christmas.   If we hit the right side change
# Direction to backwards.  If we hit the left side
# Change direction forwards

If ($BottomColumn -gt $Rows)
{ $Direction=-1 }

If ($BottomColumn -lt 1)
{ $Direction=1 }

# Print greeting.  Space must be before and after to avoid
# Trails.  Output in Random Colour

write-host " Happy Holidays Powershell " -ForegroundColor  ($colors | get-random)

# End of the loop, keep doin’ in and go “loopy!”

}

image

Hehe… Sean Kearneyon é bem criativo… (Cheesy Christmas Tree Script)

$colors = "cyan","Green","Yellow","Red","magenta","white"

Clear-Host

Write-Host

while($true)
{
    $oldpos = $host.ui.RawUI.CursorPosition
    Write-Host "        *" -ForegroundColor ($colors | get-random)

    # Row One
    Write-Host "       *" -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"        -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"        -ForegroundColor ($colors | get-random)

    # Row Two
    Write-Host "      *" -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random)

    # Row Three
    Write-Host "     *"  -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random)

    # Row Four
    Write-Host "    *"   -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random)

    # Row Five
    Write-Host "   *"    -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random)

    # Row Six
    Write-Host "  *"     -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random) -nonewline
    Write-Host "*"       -ForegroundColor DarkGreen              -nonewline
    Write-Host "*"       -ForegroundColor ($colors | get-random)

    # Stump
    Write-Host "       ***       " -fore DarkGreen
    Write-Host "       ***       " -fore DarkGreen

    $host.ui.RawUI.CursorPosition = $oldpos
    sleep .40
}

Write-Host

image

[]s
иαldσ dj

Comentários

  1. Fazum ae de conferir meu jogo da MegaDaVirada, se eu ganhar te dou R$1 e nunca mais mexo com AdvPL.

    ResponderExcluir

Postar um comentário

Postagens mais visitadas deste blog

BlackTDN :: RLeg ~ Desvendando a Função ParamBox

Para quem precisar desenvolver uma interface de entrada de dados, coisa rápida, e não quer ter aquele trabalhão danado que todos já sabemos, o Protheus tem uma função que ajuda muito, é uma interface semelhante a função Pergunte, porém com muito mais opção de objeto de entrada de dados, alias até colocar o scrollbox desta interface com todos os objetos em outra MsDialog ou Wizard é simples. Vejam o exemplo abaixo, boa sorte! Rleg. //---------------------------------------------------------- // Função exemplo utilizando a função ParamBox() //---------------------------------------------------------- User Function xParamBox() Local aRet := {} Local aParamBox := {} Local aCombo := {"Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"} Local i := 0 Private cCadastro := "xParambox" // ---------------

Protheus :: Chamando Funções do Menu Diretamente e sem a Necessidade de Login

Ferne$ perguntou: "...é possível abrir alguma rotina do sistema sem solicitar login ao usuário, como por exemplo a rotina MATA010..." Sim Ferne$, é possível sim. Abaixo um Exemplo para a Chamada à função MATA010 sem a necessidade de Login no sistema. #INCLUDE "PROTHEUS.CH" #INCLUDE "TBICONN.CH" /*/ Funcao: MATA010Ex Data: 30/04/2011 Autor: Marinaldo de Jesus Descricao: Executar a Funcao MATA010 diretamente sem a necessidade de LOGIN no Protheus Sintaxe: 1 ) U_MATA010Ex ( Chamada diretamente na Tela de Entrada do Sistema ) ; ou 2 ) totvsclient.exe -q -p=u_MATA010Ex -a=01;01 -c=rnp_local -e=rnp -m -l ( Chamada Via Linha de Comando ) /*/ User Function MATA010Ex( cEmpFil ) Local aEmpFil Local bWindowInit := { || __Execute( "MATA010()" , "xxxxxxxxxxxxxxxxxxxx" , "MATA010" , "SIGAFAT" , "SIGAFAT", 1 , .T. ) } Local cEmp Local cFil Local cMod Local cModName := "SIGAFAT" DEFA

BlackTDN :: Customizando a interface de Login no Protheus e by You

A publicação “ BlackTDN :: By You e sua nova tela de login ”  de nosso amigo OBona deu o que falar e, em função disso, esse que a muito não vos escreve resolveu criar uma versão onde será possível personalizar, “por completo”, a tela de login no Protheus/by You. Considerando que OBona já havia “mapeado, identificado e customizado” as imagens peguei-as emprestadas para o exemplo que se segue: O primeiro passo para a customização “total” da interface de login do Protheus/by You será implementar o “Ponto de Entrada” ChgPrDir (Diretório de impressão) . Usaremos esse PE juntamente como programa U_FindMsObject.prg (apresentado pela primeira vez em: Protheus :: ADVPL : The Container : Presents Pandora's box ). Diferente do exemplo proposto por OBona, que substitui, durante o processo de compilação, as imagens padrões do sistema (excluindo-as) por imagens customizadas (com o mesmo nome) este novo exemplo mantém, no RPO, as imagens padrões adicionando novas imagens customizadas que serã