Voir les contributions

Cette section vous permet de consulter les contributions (messages, sujets et fichiers joints) d'un utilisateur. Vous ne pourrez voir que les contributions des zones auxquelles vous avez accès.


Messages - Arenas

Pages: [1]
1
TEA 4 Tous / Re : Wath love Cats?
« le: janvier 31, 2024, 08:50:29 am »
Center any Txt
Us PowerShell, any version.

The Scripte
=================
cls

function Write-HostCenter { param($Message) Write-Host ("{0}{1}" -f (' ' * (([Math]::Max(0, $Host.UI.RawUI.BufferSize.Width / 2) - [Math]::Floor($Message.Length / 2)))), $Message) }
""
Write-HostCenter '_            _'
Write-HostCenter '_"            "_'
Write-HostCenter '_"   Help me !  "_'
Write-HostCenter '_"   (\.(°.°)./)  "_'
Write-HostCenter '_"                  "_'
Write-HostCenter '_"     Good  night    "_'
Write-HostCenter '_"                      "_'
Write-HostCenter '_"   Demo or carnival  ?  "_'
Write-HostCenter '_" What time do we live in? "_'
Write-HostCenter '_"                            "_'
Write-HostCenter
""

===================
@

2
TEA 4 Tous / Easter Sunday in 2024 is on ?
« le: janvier 24, 2024, 14:57:45 pm »
Easter Sunday in 2024 is on ?

Us PowerShell any version
@

=================

cls

$year = Get-Date -Format "yyyy"

$year = "$year"
$g = $year % 19
$s = [math]::Floor($year / 100)
$k = [math]::Floor(($s - 17) / 25)
$i = $s - [math]::Floor($s / 4) - [math]::Floor(($s - $k) / 3) + 19 * $g + 15
$i = $i - 30 * [math]::Floor($i / 30)
$i = $i - [math]::Floor($i / 28) * ([math]::Floor($g / 11) + 1) * ([math]::Floor((29 / ($i + 1))))
$j = $year + [math]::Floor($year / 4) + $i + 2 - $s + [math]::Floor($s / 4)
$j = $j - 7 * [math]::Floor($j / 7)
$l = $i - $j
$month = 3 + [math]::Floor(($l + 40) / 44)
$day = $l + 28 - 31 * [math]::Floor($month / 4)
""
Write-Host "Easter Sunday in $year is on is on $day-$month"

""

3
TEA 4 Tous / Wath love Cats?
« le: janvier 22, 2024, 22:53:16 pm »

# us PowerShell

cls

write-host -object (("1*0x1*1x1*2x1*3x1*4x1*2x1*3x1*0x1*5x1*1x1*6x1*1x1*6x1*1x1*7x1*0x1*8x1*3x1*4x1*9x1*4x1*2x1*8x1*1x1*10x1*11x1*12x1*13x1*1x1*14x1*15x1*9x1*16x1*1x1*17x1*15x1*18x1*16x1*19x1*13x1*20x1*16x2*14x1*0" -split "x") -split "x"|%{ if ($_ -match "(\d+)\*(\d+)") { "$([char][int]("10T32T47T92T95T40T46T41T61T118T67T97T116T115T108T111T101T80T119T114T104" -split "T")[$matches[2]])" * $matches[1] } }) -separator ""

:)

4
TEA 4 Tous / Trouver les 4 dimanche avant noël 2023
« le: décembre 05, 2023, 10:18:50 am »
cls

#  trouver les 4 dimanche avant noël 2023
# PowerShell toute version

$year = get-date -Format yyyy   

    $cd = ([datetime]"12/25/$year").tooadate()   
    $array = 1..28 |% {   
if (($cd - $_) % 7 -eq 1){   
    [datetime]::fromoadate($cd - $_).tolongdatestring()
    }   
 }   

"1." +$array[3]   
"2." +$array[2]   
"3." +$array[1]   
"4." +$array[0]   

""

@r

5
TEA 4 Tous / Artificial art (Second Options)
« le: octobre 08, 2023, 10:36:48 am »
Artificial art
Second Options

Have you see und read the previous scripts? on :
http://www.interplanete.com/forum/index.php?topic=794.msg6717#msg6717

Today I'm going to show you the same picture but in color.
You can see the image but you can't keep it.
We'll discuss that another time

The script: us PowerShell

Open the link with Edge.

Download the scripte :
http://burschi.fr/Artificial-art/artificial-art.ps1

6
TEA 4 Tous / Création station fm
« le: août 22, 2023, 05:34:39 am »
En utilisant dans la même page web pour deux nation: de "switcher" entre les jour paire et empaire
A utiliser pour un Pc ou pour un Mobile

Exemple comment utiliser la command "switch" pour PowerShell v. 7

$Xdate2 = 'en-US' -as [Globalization.CultureInfo]
(get-date).AddMinutes(60).ToString("h:mm tt", $Xdate2)

if((Get-Date).DayofYear % 2 -eq 0)
# au
{$Create.WriteLine(" <div style=""height:2px""></div>")}
# is
else {$Create.WriteLine(" <p style=""text-align:center;font-family:'Times New Roman';color:#FFFFFF""><em style=""color:#FF0000"">Luna Date: </em><em style=""color:#000000"">$Xhemera_nom </em><em style=""color:#FF0000"">$Xhemera_valeur</em><em style=""color:#000000""> - $Xmen_name </em><em style=""color:#FF0000"">$Xvaleur2</em><em style=""color:#000000""> - $Xetos_name </em><em style=""color:#FF0000"">$Xetos_valeur</em></p>")}

Avec un lien:




Une inconnu !




Bonne chance

7
L'Art numérique

Le scripte ( fonction )

For PowerShell  version  4 or plus
===============
cls

function Convert-ImageToAsciiArt
{
  param(
    [Parameter(Mandatory)][String]
    $Path,
   
    [ValidateRange(20,20000)]
    [int]$MaxWidth=80,
   
    # character height:width ratio
    [float]$ratio = 2 # 1.5
  )

  # load drawing functionality
  Add-Type -AssemblyName System.Drawing
 
  # characters from dark to light
  $characters = '$#H&@*+;:-,. '.ToCharArray()
  $c = $characters.count
 
  # load image and get image size
  $image = [Drawing.Image]::FromFile($path)
  [int]$maxheight = $image.Height / ($image.Width / $maxwidth)/ $ratio
 
  # paint image on a bitmap with the desired size
  $bitmap = new-object Drawing.Bitmap($image,$maxwidth,$maxheight)
 
 
  # use a string builder to store the characters
  [System.Text.StringBuilder]$sb = ""
 
  # take each pixel line...
  for ([int]$y=0; $y -lt $bitmap.Height; $y++){
    # take each pixel column...
    for ([int]$x=0; $x -lt $bitmap.Width; $x++){
      # examine pixel
      $color = $bitmap.GetPixel($x,$y)
      $brightness = $color.GetBrightness()
      # choose the character that best matches the
      # pixel brightness
      [int]$offset = [Math]::Floor($brightness*$c)
      $ch = $characters[$offset]
      if (-not $ch){ $ch = $characters[-1] }     
      # add character to line
      $null = $sb.Append($ch)
    }
    # add a new line
    $null = $sb.AppendLine()
  }

  # clean up and return string
  $image.Dispose()
  $sb.ToString()
}

$Path = "C:\......."
$OutPath = "C:\........txt"

Convert-ImageToAsciiArt -Path $Path -MaxWidth 100 |
Set-Content -Path $OutPath -Encoding UTF8

Invoke-Item -Path $OutPath

====================
30.04.2023 23h45
Origine file (your format)


Sortie d'image en format txt

8
TEA 4 Tous / Re : Synopsys: Usage des bases for Miniville
« le: avril 19, 2023, 23:27:33 pm »
J'ai modifier le txt.

J'ai ajouter de la couleur
et les paramètre "if/else"


J'ai verras bien .....

Version ter
@

----------------------

cls

########################
#
# Synopsys:
#
# Creat
# 2023-02-10 00:33:07Z
# Modif
# 2023-02-25 10:25:47Z (last, ter)
#
# Copyright @renas alias (athome)
# France
#
# File Name :
# DownloadString-from-Mv-bases.ps1
#
# Us any Powershell version
# All Info are cumule
# Non restriction
#
# The convention is:
# 1 klick env for 2 pop
# 1 klick ind or *com for 3 pop
# 1 klick sec for 4 pop
# 1 klick tra for 5 pop
#
# * "com" is obsolete "Yстаревший, nicht verwenden, not tu use!
#
# Bases: pop/- us [math]::round(bases 1..4) = somme
#
# That's all to do. Great to hear from you.
#
########################

$Xt = [string] "#text"

# your Miniville city name

$Xminiville = "mv0" # also or: aldana-test, mv0, xenia, burschi, st-innsbruck, bangor, sandefri

$Xa = (Get-Host).UI.RawUI
$Xa.WindowTitle = "Sync Bases for $Xminiville"

$XmlUrl = "http://$Xminiville.miniville.fr/xml"
[xml]$Xml = (new-object System.Net.WebClient).DownloadString($XmlUrl)

$Xpop = $Xml.selectSingleNode('city/population').$Xt # $Xt = format txt
$Xcom = $Xml.selectSingleNode('city/bases/@com').$Xt
$Xenv = $Xml.selectSingleNode('city/bases/@env').$Xt
$Xind = $Xml.selectSingleNode('city/bases/@ind').$Xt
$Xsec = $Xml.selectSingleNode('city/bases/@sec').$Xt
$Xtra = $Xml.selectSingleNode('city/bases/@tra').$Xt
""
""" Last update Date/Time (yyyy-mm-dd hh:mm:ssz) """ # The Time is zulu
Get-Date -Format (Get-culture).DateTimeFormat.UniversalSortableDateTimePattern
""
"Bases: pop/- us [math]::round(bases 1..4) = somme"

""
# name f the City
Write-host "Ideal: 52 % for Pop and 48 % for Bases"
Write-host "The ' " -nonewline;
Write-host $Xminiville -ForegroundColor green -nonewline;
Write-host " ' MiniVille have :";
""
# the best is 52 %
$Xtot = [int]$Xpop
Write-host "Pop's <> 50 % = " -nonewline;
Write-host ("{0:## ### ###}" -f $Xtot) -ForegroundColor green;

$Xtot = [int]$Xenv + [int]$Xind + [int]$Xcom + [int]$Xsec + [int]$Xtra
$Xplus_minus =  [int]$Xtot - [int]$Xpop

if ($Xplus_minus -lt -0){
    Write-host "Somme bases <> 50 % = "" env,ind,com,sec,tra = +/- "" " -nonewline;
    Write-host ("{0:## ### ###}" -f $Xtot) -ForegroundColor red -nonewline;
    Write-host " [ klick: " -nonewline; $Xplus_minus_2 = "{0:## ### ###}" -f ($Xplus_minus)
    Write-host $Xplus_minus_2 -ForegroundColor green -nonewline;
    Write-host " ]""";
    }
else {
    Write-host "Somme bases <> 50 % = "" env,ind,com,sec,tra = +/- "" " -nonewline;
    Write-host  (" {0:## ### ###}" -f $Xtot) -ForegroundColor green -nonewline;
    Write-host " ""[ klick: missing pop! " -nonewline; $Xplus_minus_2 = "{0:## ### ###}" -f ($Xplus_minus)
    Write-host $Xplus_minus_2 -ForegroundColor red -nonewline;
    Write-host " ]""";
}


""
""
# If 500 pop, env is on
# 1 env
if ($Xenv -lt 0){Write-host """ Env is off """ -ForegroundColor yellow}
    else {Write-Host """ " -nonewline; Write-Host Env is on -ForegroundColor yellow -nonewline; " """}

if ($Xenv -gt 0){
    $Xround_env = [math]::round($Xenv - ($Xpop/2))
    if($Xround_env -gt 0){`
        Write-Host " [ 1 ($Xenv - ($Xpop/2)) ] = " -nonewline;
        Write-Host ("{0:## ### ###}" -f $Xround_env) -ForegroundColor green -nonewline;
        Write-Host " [Env]";
    }
    else {
        Write-Host " [ 1 ($Xenv - ($Xpop/2)) ] = " -nonewline;
        Write-Host ("{0:## ### ###}" -f  $Xround_env) -ForegroundColor Red
    }
}
# Si 50 pop, ind is off
# 2a ind
if ($Xind -lt 1){Write-host """ Ind is off """ -ForegroundColor yellow}
    else{Write-Host """ " -nonewline;
        Write-Host Ind is on -ForegroundColor yellow -nonewline; " """
    }

if ($Xind -gt 1){
    $Xround_ind = [math]::round($Xind - ($Xpop/3))
    if ($Xround_ind -gt 1){
        Write-Host " [ 2a ($Xind - ($Xpop/3)) ] = " -nonewline;
        Write-Host ("{0:## ### ###}" -f $Xround_ind) -ForegroundColor Green
    }
    else{
        Write-Host " [ 2a ($Xind - ($Xpop/3)) ] = " -nonewline;
        Write-Host ("{0:## ### ###}" -f $Xround_ind) -ForegroundColor Red
    }
}
# us switsh (if/else/elseif)
# Si -1 000 pop, com is off
# 2b com is obsolete, Yстаревший, nicht verwenden, not tu use!
if ($Xcom -lt 1000){Write-host """ Com is off """ -ForegroundColor yellow}
    else{Write-Host """ " -nonewline;
        Write-Host Com is on -ForegroundColor yellow -nonewline; " """
    }
if ($Xcom -gt 0){
    $Xround_com = [math]::round($Xcom/3)
    if ($Xround_com -gt 0){
        Write-Host " [ 2b ($Xcom/3) ] = " -nonewline;
        if ($Xround_com -eq 0){$Xround_com = "0"
            Write-Host ("{0:## ### ###}" -f $Xround_com) -ForegroundColor Green}
        else{Write-Host ("{0:## ### ###}" -f $Xcom) -ForegroundColor Green}
    }
    else{
        Write-Host " [ 2b ($Xcom/3) ] = " -nonewline;
        if ($Xround_com -eq 0){$Xround_com = "0"
            Write-Host ("{0:## ### ###}" -f $Xround_com) -ForegroundColor Red}
        else{Write-Host ("{0:## ### ###}" -f $Xcom) -ForegroundColor Red}
    }
}
# Si 300 pop, sec is off
# 3 sec
if ($Xsec -lt 0){Write-host """ Sec is off """ -ForegroundColor yellow}
    else{Write-Host """ " -nonewline;
        Write-Host Sec is on -ForegroundColor yellow -nonewline; " """
    }

if ($Xsec -gt 0){
    $Xround_sec = [math]::round($Xsec - ($Xpop/4))
    if($Xround_sec -gt 0){
        Write-Host " [ 3 ($Xsec - ($Xpop/4)) ] = " -nonewline;
        Write-Host ("{0:## ### ###}" -f $Xround_sec) -ForegroundColor Green
    }
    else{
        Write-Host " [ 3 ($Xsec - ($Xpop/4)) ] = " -nonewline;
        Write-Host ("{0:## ### ###}" -f $Xround_sec) -ForegroundColor Red
    }
}
# Si 100 pop, tra is off
# 4 tra
if ($Xpop -lt 100){Write-host """ Tra is off """ -ForegroundColor yellow}
    else{Write-Host """ " -nonewline;
    Write-Host Tra is on -ForegroundColor yellow -nonewline; " """
    }

if ($Xpop -gt 100){
    $Xround_tra = [math]::round($Xtra - ($Xpop/5))
    if($Xround_tra -gt 100){
        Write-Host " [ 4 ($Xtra - ($Xpop/5)) ] = " -nonewline;
        Write-Host ("{0:## ### ###}" -f $Xround_tra) -ForegroundColor Green
    }
    else{
        Write-Host " [ 4 ($Xtra - ($Xpop/5)) ] = " -nonewline;
        Write-Host ("{0:## ### ###}" -f $Xround_tra) -ForegroundColor Red
    }
}

""
$Xobs = "I hope this helps your situation. If not, I'd be happy to revisite`n"
$Xobs += "------------------------------------------------------------------`n"
$Xobs
""
clear-variable X* -scope global -F
-------------------------------------

30 avril 2023 - 00:44:08z évolutive

9
TEA 4 Tous / Synopsys: Usage des bases for Miniville
« le: avril 05, 2023, 20:54:33 pm »
# The stuff



cls

########################
#
# Synopsys:
#
# Creat
# 2023-02-10 00:33:07Z
# Modif
# 2023-02-25 10:25:47Z (last, ter)
#
# Copyright @renas alias (athome)
# France
#
# File Name :
# DownloadString-from-Mv-bases.ps1
#
# Us any Powershell version
# All Info are cumule
# Non restriction
#
# The convention is:
# 1 klick env for 2 pop
# 1 klick ind or *com for 3 pop
# 1 klick sec for 4 pop
# 1 klick tra for 5 pop
#
# * "com" is obsolete "Yстаревший, nicht verwenden, not tu use!
#
# Bases: pop/- us [math]::round(bases 1..4) = somme
#
# That's all to do. Great to hear from you.
#
########################

$Xt = [string] "#text"

# Type your Miniville city name

$Xminiville = "aldana" # aldana, mv0, xenia, burschi
$XmlUrl = "http://$Xminiville.miniville.fr/xml"
[xml]$Xml = (new-object System.Net.WebClient).DownloadString($XmlUrl)

$Xpop = $Xml.selectSingleNode('city/population').$Xt
$Xcom = $Xml.selectSingleNode('city/bases/@com').$Xt
$Xenv = $Xml.selectSingleNode('city/bases/@env').$Xt
$Xind = $Xml.selectSingleNode('city/bases/@ind').$Xt
$Xsec = $Xml.selectSingleNode('city/bases/@sec').$Xt
$Xtra = $Xml.selectSingleNode('city/bases/@tra').$Xt
""
""" Last update Date/Time (yyyy-mm-dd hh:mm:ss) """
Get-Date -Format (Get-culture).DateTimeFormat.UniversalSortableDateTimePattern
""
"Bases: pop/- us [math]::round(bases 1..4) = somme"
""
"[1 (($Xpop/2) - $Xenv) ] = " + [math]::round(($Xpop/2) - $Xenv)+" [klick's: env]"
"[2 (($Xpop/3) - ($Xind + $Xcom)) ] = " + [math]::round(($Xpop/3) - ($Xind + $Xcom))+" [klick's: ind+com]"
"[3 (($Xpop/4) - $Xsec) ] = " + [math]::round(($Xpop/4) - $Xsec)+" [klick's: sec]"
"[4 (($Xpop/5) - $Xtra) ] = " + [math]::round(($Xpop/5) - $Xtra)+" [klick's: tra]"
""
""" The ' "+$Xminiville+" ' Miniville is not equal ! """
"Pop's 50 % = "+[int]$Xpop

$Xtot = [int]$Xenv + [int]$Xind + [int]$Xcom + [int]$Xsec + [int]$Xtra

$Xplus_minus = [int]$Xtot - [int]$Xpop
"Somme Bases <> 50 % = ""env,(ind+(com)),sec,tra"" = " + $Xtot + " ""[klick's: " + "{0:### ###}" -f ($Xplus_minus) + " ]"""

clear-variable X* -scope global -F

""
"I hope this helps your situation. If not, I'd be happy to revisit"
""

Visit the table !

10
TEA 4 Tous / My-Mini-city, Mini-Ville
« le: avril 27, 2022, 22:44:36 pm »
Bonjours, Bonsoir

Pour utiliser ces deux ville, lise bien qui et dans la page web:
 https://arenas.pagesperso-orange.fr/Table-OneDrive/Table-OneDrive.html

@

11
TEA 4 Tous / Re : Pour Edge
« le: avril 17, 2020, 16:57:20 pm »

12
TEA 4 Tous / Re : Pour Edge
« le: mars 22, 2020, 15:42:32 pm »
Bonjour,

Je peut avoir une copy d'écran?

Merci

@r

13
TEA 4 Tous / Pour Edge
« le: mars 18, 2020, 21:26:26 pm »
Bonjour

Qui n'aime pas la musique sur son portable/Pc 24 h sur 24 h? Il y a 100 station radio en FM disponible
Le sys, fonction très bien. Mais cette scripte est fait pour "Edge" et les portable. Moi j'utilise iPhone.

Vous allez crée un raccourcie sur votre portable et le tours est jouer ….

 https://arenas.pagesperso-orange.fr/GradientExample/frameset-mediaplayer.html

@r

14
TEA 4 Tous / Re : [Windows 7/8/10] - Astuces.
« le: juillet 29, 2018, 20:20:09 pm »
Bonsoir,

Merci pour vôtre travail

@r

15
Albums Photos / mes meuileurs veux a vous tous....
« le: décembre 19, 2012, 20:41:52 pm »
sorry pour cette emplacments ici. (sorry modo).

mes veux sincere a vous:

noel pour toute est a tous !

arenas

Pages: [1]