Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[HS] Un joli virus pour vous !

12 réponses
Avatar
garnote
Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge

10 réponses

1 2
Avatar
Didier
pas mal :-))

garnote a écrit:
Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge




Avatar
Nicolas B.
Inoffensif comme virus, mais excellent !
:-)

On peut même changer les coefficients des fonctions pour obtenir d'autres
formes.


A+
--
Nicolas B.

Adresse @adresse.bidon.com invalide,
E-mail : www.cerbermail.com/?gAAILfkPsC


Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge


Avatar
garnote
Salut Nicolas,

Et comme mon graphqiue ne contient qu'une série,
il faudrait ajouter :
k = WorksheetFunction.Min(k, 32000)
Est-ce encore 32 000, le nombre de points
maximal d'une série (2002-2003) ?
et renommer la macro «Famille de virus».

:-)

Serge

"Nicolas B." a écrit dans le message de
news: eVhKjuK$
Inoffensif comme virus, mais excellent !
:-)

On peut même changer les coefficients des fonctions pour obtenir d'autres
formes.


A+
--
Nicolas B.

Adresse @adresse.bidon.com invalide,
E-mail : www.cerbermail.com/?gAAILfkPsC


Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge






Avatar
Nicolas B.
Est-ce encore 32 000, le nombre de points
maximal d'une série (2002-2003) ?


Oui, aussi bien sur XP que sur 2003, la limite n'a pas changée.


Bonne soirée
--
Nicolas B.

Adresse @adresse.bidon.com invalide,
E-mail : www.cerbermail.com/?gAAILfkPsC


Salut Nicolas,

Et comme mon graphqiue ne contient qu'une série,
il faudrait ajouter :
k = WorksheetFunction.Min(k, 32000)
Est-ce encore 32 000, le nombre de points
maximal d'une série (2002-2003) ?
et renommer la macro «Famille de virus».

:-)

Serge

"Nicolas B." a écrit dans le
message de news: eVhKjuK$
Inoffensif comme virus, mais excellent !
:-)

On peut même changer les coefficients des fonctions pour obtenir
d'autres formes.


A+
--
Nicolas B.

Adresse @adresse.bidon.com invalide,
E-mail : www.cerbermail.com/?gAAILfkPsC


Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge






Avatar
gee-dee-
Pffff....
même pas peur .....
t'aurais pu te fouler un peu plus ....
bouge même pô !!!!!

:O)))))

"garnote" a écrit dans le message de
news:ppt%b.79152$
Salut Nicolas,

Et comme mon graphqiue ne contient qu'une série,
il faudrait ajouter :
k = WorksheetFunction.Min(k, 32000)
Est-ce encore 32 000, le nombre de points
maximal d'une série (2002-2003) ?
et renommer la macro «Famille de virus».

:-)

Serge

"Nicolas B." a écrit dans le message de
news: eVhKjuK$
Inoffensif comme virus, mais excellent !
:-)

On peut même changer les coefficients des fonctions pour obtenir
d'autres


formes.


A+
--
Nicolas B.

Adresse @adresse.bidon.com invalide,
E-mail : www.cerbermail.com/?gAAILfkPsC


Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge










Avatar
isabelle
Pffff....
même pas peur .....
t'aurais pu te fouler un peu plus ....
bouge même pô !!!!!



:-))))))))))
c'est que Serge l'a anesthésié avant de l'envoyer.

isabelle

Avatar
Philippe.R
Bravo Serge,
Vraiment fort joli !
--
Amicales Salutations

Retirer A_S_ pour répondre.
XL97 / XL2002

"garnote" a écrit dans le message de news:_xs%b.79145$
Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge




Avatar
Jacky
T'est sûr que c'est un virus, mon radiologue m'a passé au scanner la semaine
dernière. Il m'a montré une photo du même genre mais en noir et blanc.Il a
voulu me faire croire que c'était mon cerveau.

;o))
Félicitations

JJ
Avatar
garnote
:-)))

Avant que je trouve le truc pour le faire gigoter,
le voici avec plus de détails :

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.012
For c2 = -1.5 To 1.5 Step 0.012
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
k = WorksheetFunction.Min(k, 32000)
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 10
.MarkerForegroundColorIndex = 10
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 2
.Shadow = False
End With
ActiveChart.Deselect
End Sub

Je crois qu'il est temps du dodo !

Serge






"gee-dee-" a écrit dans le message de news:
#BcmnAL$
Pffff....
même pas peur .....
t'aurais pu te fouler un peu plus ....
bouge même pô !!!!!

:O)))))

"garnote" a écrit dans le message de
news:ppt%b.79152$
Salut Nicolas,

Et comme mon graphqiue ne contient qu'une série,
il faudrait ajouter :
k = WorksheetFunction.Min(k, 32000)
Est-ce encore 32 000, le nombre de points
maximal d'une série (2002-2003) ?
et renommer la macro «Famille de virus».

:-)

Serge

"Nicolas B." a écrit dans le message
de


news: eVhKjuK$
Inoffensif comme virus, mais excellent !
:-)

On peut même changer les coefficients des fonctions pour obtenir
d'autres


formes.


A+
--
Nicolas B.

Adresse @adresse.bidon.com invalide,
E-mail : www.cerbermail.com/?gAAILfkPsC


Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge














Avatar
Denys
Bonjour Serge.....

Bravo!!! Ressemble pas un peu à un de nos politiciens?????
As-tu reçu une commandite pour ce programme???

:-))))

Bonne journée

Denys


-----Original Message-----
Bonsoir,

Je viens de programmer mon premier virus :-)))

Sub Virus()
Application.ScreenUpdating = False
Sheets.Add
Dim table(1 To 50000, 1 To 2)
For c1 = -1.5 To 1.5 Step 0.015
For c2 = -1.5 To 1.5 Step 0.015
x = c1: y = c2:
For i = 1 To 10
x1 = x ^ 3 - 3 * x * y ^ 2 + 0.5
y1 = 3 * x ^ 2 * y - y ^ 3
If Abs(x1) > 10 Or Abs(y1) > 10 Or _
x1 ^ 2 + y1 ^ 2 > 100 Then GoTo 10
x = x1
y = y1
Next i
10:
If Abs(x1) < 10 Or Abs(y1) < 10 Then
k = k + 1
table(k, 1) = c1
table(k, 2) = c2
End If
Next c2
Next c1
Range(Cells(1, 1), Cells(k, 2)).Value = table
Set ici = Range(Cells(1, 1), Cells(k, 2))
Charts.Add
With ActiveChart
.ChartType = xlXYScatter
.SetSourceData Source:=ici, _
PlotBy:=xlColumns
.Location Where:=xlLocationAsNewSheet
.HasLegend = False
.PlotArea.ClearFormats
.PlotArea.Interior.ColorIndex = 3
.Axes(xlValue).MajorGridlines.Delete
.Axes(xlValue).Delete
.Axes(xlCategory).Delete
End With
With ActiveChart.SeriesCollection(1)
.MarkerBackgroundColorIndex = 4
.MarkerStyle = xlCircle
.Smooth = False
.MarkerSize = 8
.Shadow = False
End With
ActiveChart.Deselect
End Sub


Serge


.



1 2