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 / 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

2
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

3
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

4
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 !

5
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

@

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

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

Je peut avoir une copy d'écran?

Merci

@r

8
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

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

Merci pour vôtre travail

@r

10
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]