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.


Sujets - Arenas

Pages: [1]
1
TEA 4 Tous / How to calculate flexible vacation days, and moor
« le: mars 26, 2024, 17:35:46 pm »
cls



" 1 Sripte"
"==========================================="
""
"Use each script individually"
" - How to calculate flexible vacation days"
" - What season is it now?"
" - Find left day(s) of the Year active"
""
"==========================================="

""
" How to calculate flexible vacation days"
" For:"
" - Ash Wednesday,"
" - Easter,"
" - The first Advent Day"
" there are other days like this in the year ..... "
""

"Us PowerShell any version"

# We are in 2024.
$YYYY = (Get-Date).Year

# this is the 1. fool luna, the reel luna year at this moment is the ....
""
""
"  "" The reel Luna Year at this moment is for the: "" " + ($yyyy-1)
"  If the "" Men "" (Luna-Month-Name) is equale at the "" Nisannu """
"  and "" Hemera "" (Luna-Day) is the first-day = 1;"
"  The year will by crow to the next "" Etos "" (Year) = "" $YYYY "" "
""
""
" Tis exemple works only for 2024, of the Luna/ Earth Kalender"
""

""
$Ash_Wednesday = '14-02-2024'
$ts1 = New-TimeSpan -Start $date_full_luna -End $cendre
$Ash_Wednesday2 = (Get-Date $date_full_luna).AddDays($ts1.Days).ToString("ddd d MMM yyyy")
"--------------------------------------------"
"  " + $Ash_Wednesday2 + " "" Get Ash Wednesday $YYYY """
"--------------------------------------------"

$date_full_luna = Get-Date "11 - 01 - $YYYY"
$date_easter = (Get-Date $date_full_luna).AddDays(80).ToString("ddd d MMM yyyy")
"-------------------------------------------"
"  " + $date_easter + " "" Get Easter for $YYYY """
"-------------------------------------------"
""" The Kalendar cycle start, ordone par Rom """
$first_advent = '01-12-2024'
$ts = New-TimeSpan -Start $date_full_luna -End $first_advent
$first_advent = (Get-Date $date_full_luna).AddDays($ts.Days).ToString("ddd d MMM yyyy")
"----------------------------------------------------"
"  " + $first_advent + " "" Get the first Advent-Day $YYYY """
"----------------------------------------------------"
""
" - Tat's all - "
"Arenas 25 March 2024"

"================================="

"Us only the yellow champs"
Luna Kalender for Excel


Rapport-luna-earth-mars-2024





" 2 Another script"

"==========================="
"What season we have now ?"
"Us also PawerShell, any version."

Cls

$Date = Get-Date

Function Get-Season([datetime]$Date){
    If (!$Date) {$Date = Get-Date}
   
    #If date was not provided, assume today.
    # The dates are obviously not exactly accurate and are best guesses

    $Spring = Get-Date -Day 20 -Month 03 -Year $Date.Year
    $Summer = Get-Date -Day 21 -Month 06 -Year $Date.Year
    $Autumn = Get-Date -Day 22 -Month 09 -Year $Date.Year
    $Winter = Get-Date -Day 21 -Month 12 -Year $Date.Year
    $Season = switch($Date) {
        {($_ -lt $Spring)}  {"Winter";Break}
        {($_ -lt $Summer)}  {"Spring";Break}
        {($_ -lt $Autumn)}  {"Summer";Break}
        {($_ -lt $Winter)}  {"Autumn";Break}
        {($_ -ge $Winter)}  {"Winter"}
    }
    "{0:d} is in season {1}" -f $Date,$Season
}

""
"------------------------------"
    Get-Season
"------------------------------"






""
"================================="

" 3 Find the past days of 2 dates"


cls
""
""
" Synopsys 1 : Find left day(s) of the Year active"
""

"-------------------------------------------------"
""" Study from: ** 2023 oct. 14, from arenas. ** """
"-------------------------------------------------"

""
"    Days of Year ""minus"" Day of Year
    = Days of Year ""minus"" Day of Year
    -eq left Days for the Year active,
    as one Liner"
""
"The whole calculation process"
"    " +[string]([datetime]'12/31' - [datetime]'1/1' | % days) + " - " + [string](Get-Date).dayofyear`
 + " = "" left Day(s) for "" " + [string](Get-Date).year + ", " +(((Get-Date).dayofyear) - `
(([datetime]'12/31' - [datetime]'1/1') | % days))+ " Days"
""
"    Rigth ? "
""

""" Or """
"Short version"
""
 $xday_left_year = ((Get-Date).dayofyear) - (([datetime]'12/31' - [datetime]'1/1') | % days)
 $xday_left_year

 ""

2
TEA 4 Tous / Zoom in on the record-breaking quasar J0529-4351
« le: février 21, 2024, 21:07:09 pm »

Brightest and fastest-growing: astronomers identify record-breaking quasar.

quasar J0529-4351
as-gif-file
quasar J0529-4351
as-txt-file

@

3
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"

""

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

:)

5
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

6
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

7
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

8
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

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

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