PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [c#] Matrix effekt



DeXTer
31.12.2008, 11:51
Hab eben was nettes per google gefunden:



#define readkey

using System;

namespace m7tr1x
{
class Program
{
static void Main(string[ ] args)
{
Console.Title = "tH3 M7tr1x 3ff3<t";
Console.ForegroundColor = ConsoleColor.DarkGreen;
Console.WindowLeft = Console.WindowTop = 0;
Console.WindowHeight = Console.BufferHeight = Console.LargestWindowHeight;
Console.WindowWidth = Console.BufferWidth = Console.LargestWindowWidth;
#if readkey
Console.WriteLine("H1T 7NY K3Y T0 C0NT1NU3 =/");
Console.ReadKey();
#endif
Console.CursorVisible = false;
int width, height;
int[ ] y;
int[ ] l;
Initialize(out width, out height, out y, out l);
int ms;
while ( true )
{
DateTime t1 = DateTime.Now;
MatrixStep(width, height, y, l);
ms = 10 - (int)( (TimeSpan)( DateTime.Now - t1 ) ).TotalMilliseconds;
if ( ms > 0 )
System.Threading.Thread.Sleep(ms);
if ( Console.KeyAvailable )
if ( Console.ReadKey().Key == ConsoleKey.F5 )
Initialize(out width, out height, out y, out l);
}
}

static bool thistime = false;

private static void MatrixStep(int width, int height, int[ ] y, int[ ] l)
{
int x;
thistime = !thistime;
for ( x = 0 ; x < width ; ++x )
{
if ( x % 11 == 10 )
{
if ( !thistime )
continue;
Console.ForegroundColor = ConsoleColor.White;
}
else
{
Console.ForegroundColor = ConsoleColor.DarkGreen;
Console.SetCursorPosition(x, inBoxY(y[x] - 2 - ( l[x] / 40 * 2 ), height));
Console.Write(R);
Console.ForegroundColor = ConsoleColor.Green;
}
Console.SetCursorPosition(x, y[x]);
Console.Write(R);
y[x] = inBoxY(y[x] + 1, height);
Console.SetCursorPosition(x, inBoxY(y[x] - l[x], height));
Console.Write(' ');
}
}

private static void Initialize(out int width, out int height, out int[ ] y, out int[ ] l)
{
int h1;
int h2 = ( h1 = ( height = Console.WindowHeight ) / 2 ) / 2;
width = Console.WindowWidth - 1;
y = new int[width];
l = new int[width];
int x;
Console.Clear();
for ( x = 0 ; x < width ; ++x )
{
y[x] = r.Next(height);
l[x] = r.Next(h2 * ( ( x % 11 != 10 ) ? 2 : 1 ), h1 * ( ( x % 11 != 10 ) ? 2 : 1 ));
}
}

static Random r = new Random();
static char R
{
get
{
int t = r.Next(10);
if ( t <= 2 )
return (char)( '0' + r.Next(10) );
else if ( t <= 4 )
return (char)( 'a' + r.Next(27) );
else if ( t <= 6 )
return (char)( 'A' + r.Next(27) );
else
return (char)( r.Next(32, 255) );
}
}

public static int inBoxY(int n, int height)
{
n = n % height;
if ( n < 0 )
return n + height;
else
return n;
}
}
}

Probierts aus, sieht echt n1 aus^^

55F
31.12.2008, 12:04
http://s10.directupload.net/images/081231/8kv3ry4k.jpg


coole sache

The Blubb
31.12.2008, 14:36
echt geil, danke

Darkraiser
31.12.2008, 14:51
Sehr nett ;) sieht auch noch richtig gut aus ... thx 4 share würde ich da ma sagen ^^ .. nur will keiner die 7kb große exe ohne icon annehmen xDD auch wenn ich sage es sieht gut aus ;)

naja thx schonmal

NeoMatrixXx
31.12.2008, 15:23
wie bekomme ich das hin? wo muss ich das eingeben?

DeXTer
31.12.2008, 15:25
Visual c# 2008 laden, Konsolenanwendung erstellen und alles mit meinem geposteten Code ersetzen! Kompilieren, feddig

EDIT:

oder den SharpDevelop , da gibts nicht so viel zu laden :)

Hennieliminator
31.12.2008, 15:30
LOL wenn ich es in devC++ reinpacke (jaa ich weiß is cpp und nicht C#) stürtzt devC++ beim Kompilieren ab..

Nagut.. VS2005 geöffnet - neues C# ConsolenProject... Code hinzugefügt... Kompiliert VB2005 kackt ab.. WTF??

WTF ist nich nur bei den Quellcode so... waaaas?.. ich muss XP neuinstallieren :D

Explore_Force
04.01.2009, 11:48
ganz schön geil das teil :P
sieht wirklich cool aus :D

Sirect
04.01.2009, 12:06
Hat das jemand für .NET? Hab auf dem Rechner keinen Converter.

ZoX
05.01.2009, 19:16
joa für ne.net versi währ ich auch ^^

k0rxxx
06.01.2009, 13:08
jungs das ist bereits .net code

ihr meint wahrscheinlich eine vb.net version
kann ja wohl nicht all zu schwer sein das umzuschreiben
google zeigt euch bestimmt auch einen converter der das für euch macht

ZoX
06.01.2009, 13:54
Private Shared Sub Main(ByVal args As String())
Console.Title = "tH3 M7tr1x 3ff3<t"
Console.ForegroundColor = ConsoleColor.DarkGreen
Console.WindowLeft = InlineAssignHelper(Console.WindowTop, 0)
Console.WindowHeight = InlineAssignHelper(Console.BufferHeight, Console.LargestWindowHeight)
Console.WindowWidth = InlineAssignHelper(Console.BufferWidth, Console.LargestWindowWidth)
#If readkey Then
Console.WriteLine("H1T 7NY K3Y T0 C0NT1NU3 =/")
Console.ReadKey()
#End If
Console.CursorVisible = False
Dim width As Integer, height As Integer
Dim y As Integer()
Dim l As Integer()
Initialize(width, height, y, l)
Dim ms As Integer
While True
Dim t1 As DateTime = DateTime.Now
MatrixStep(width, height, y, l)
ms = 10 - CInt(DirectCast((DateTime.Now - t1), TimeSpan).TotalMilliseconds)
If ms > 0 Then
System.Threading.Thread.Sleep(ms)
End If
If Console.KeyAvailable Then
If Console.ReadKey().Key = ConsoleKey.F5 Then
Initialize(width, height, y, l)
End If
End If
End While
End Sub

Shared thistime As Boolean = False

Private Shared Sub MatrixStep(ByVal width As Integer, ByVal height As Integer, ByVal y As Integer(), ByVal l As Integer())
Dim x As Integer
thistime = Not thistime For x = 0 To width - 1
If x Mod 11 = 10 Then
If Not thistime Then
Continue For
End If
Console.ForegroundColor = ConsoleColor.White
Else
Console.ForegroundColor = ConsoleColor.DarkGreen
Console.SetCursorPosition(x, inBoxY(y(x) - 2 - (l(x) / 40 * 2), height))
Console.Write(R)
Console.ForegroundColor = ConsoleColor.Green
End If
Console.SetCursorPosition(x, y(x))
Console.Write(R)
y(x) = inBoxY(y(x) + 1, height)
Console.SetCursorPosition(x, inBoxY(y(x) - l(x), height))
Console.Write(" "c)
Next
End Sub

Private Shared Sub Initialize(ByRef width As Integer, ByRef height As Integer, ByRef y As Integer(), ByRef l As Integer())
Dim h1 As Integer
Dim h2 As Integer = (InlineAssignHelper(h1, (InlineAssignHelper(height, Console.WindowHeight)) / 2)) / 2
width = Console.WindowWidth - 1
y = New Integer(width - 1) {}
l = New Integer(width - 1) {}
Dim x As Integer
Console.Clear()
For x = 0 To width - 1
y(x) = m_r.[Next](height)
l(x) = m_r.[Next](h2 * (If((x Mod 11 <> 10), 2, 1)), h1 * (If((x Mod 11 <> 10), 2, 1)))
Next
End Sub

Shared m_r As New Random()
Private Shared ReadOnly Property R() As Char
Get
Dim t As Integer = m_r.[Next](10)
If t <= 2 Then
Return CChar(("0"c + m_r.[Next](10)))
ElseIf t <= 4 Then
Return CChar(("a"c + m_r.[Next](27)))
ElseIf t <= 6 Then
Return CChar(("A"c + m_r.[Next](27)))
Else
Return CChar((m_r.[Next](32, 255)))
End If
End Get
End Property

Public Shared Function inBoxY(ByVal n As Integer, ByVal height As Integer) As Integer
n = n Mod height
If n < 0 Then
Return n + height
Else
Return n
End If
End Function
Private Shared Function InlineAssignHelper(Of T)(ByRef target As T, ByVal value As T) As T
target = value
Return value
End Function

wird bei mir ausgespuckt ^^ kann das ma wer richten das klappt nämlich nid

ir0n
06.01.2009, 15:13
Coole Sache, der Effekt ist echt sau geil :D
Hab's mal kompiliert in C# 08, und ja, dass ding ist 10.5 KB groß weil ich ein Icon geaddet habe >_>

Download: http://rapidshare.com/files/180394208/Matrix.exe

Check:

Datei Matrix.exe empfangen 2009.01.06 16:14:34 (CET)
Status: Laden ... Wartend Warten Überprüfung Beendet Nicht gefunden Gestoppt
Ergebnis: 0/38 (0%)
Laden der Serverinformationen...
Ihre Datei wartet momentan auf Position: 1.
Geschätzte Startzeit ist zwischen 38 und 55 Sekunden.
Dieses Fenster bis zum Abschluss des Scans nicht schließen.
Der Scanner, welcher momentan Ihre Datei bearbeitet ist momentan gestoppt. Wir warten einige Sekunden um Ihr Ergebnis zu erstellen.
Falls Sie längern als fünf Minuten warten, versenden Sie bitte die Datei erneut.
Ihre Datei wird momentan von VirusTotal überprüft,
Ergebnisse werden sofort nach der Generierung angezeigt.
Filter Filter
Drucken der Ergebnisse Drucken der Ergebnisse
Datei existiert nicht oder dessen Lebensdauer wurde überschritten
Dienst momentan gestoppt. Ihre Datei befindet sich in der Warteschlange (position: ). Diese wird abgearbeitet, wenn der Dienst wieder startet.

SIe können auf einen automatischen reload der homepage warten, oder ihre email in das untere formular eintragen. Klicken Sie auf "Anfragen", damit das System sie benachrichtigt wenn die Überprüfung abgeschlossen ist.
Email:

Antivirus Version letzte aktualisierung Ergebnis
a-squared 4.0.0.73 2009.01.06 -
AhnLab-V3 2009.1.6.3 2009.01.06 -
AntiVir 7.9.0.45 2009.01.05 -
Authentium 5.1.0.4 2009.01.05 -
Avast 4.8.1281.0 2009.01.06 -
AVG 8.0.0.199 2009.01.06 -
BitDefender 7.2 2009.01.06 -
CAT-QuickHeal 10.00 2009.01.06 -
ClamAV 0.94.1 2009.01.06 -
Comodo 878 2009.01.05 -
DrWeb 4.44.0.09170 2009.01.06 -
eTrust-Vet 31.6.6293 2009.01.06 -
Ewido 4.0 2008.12.31 -
F-Prot 4.4.4.56 2009.01.05 -
F-Secure 8.0.14470.0 2009.01.06 -
Fortinet 3.117.0.0 2009.01.06 -
GData 19 2009.01.06 -
Ikarus T3.1.1.45.0 2009.01.06 -
K7AntiVirus 7.10.578 2009.01.06 -
Kaspersky 7.0.0.125 2009.01.06 -
McAfee 5486 2009.01.05 -
McAfee+Artemis 5486 2009.01.05 -
Microsoft 1.4205 2009.01.06 -
NOD32 3742 2009.01.06 -
Norman 5.80.02 2009.01.06 -
Panda 9.0.0.4 2009.01.06 -
PCTools 4.4.2.0 2009.01.06 -
Prevx1 V2 2009.01.06 -
Rising 21.11.12.00 2009.01.06 -
SecureWeb-Gateway 6.7.6 2009.01.06 -
Sophos 4.37.0 2009.01.06 -
Sunbelt 3.2.1809.2 2008.12.22 -
Symantec 10 2009.01.06 -
TheHacker 6.3.1.4.205 2009.01.05 -
TrendMicro 8.700.0.1004 2009.01.06 -
VBA32 3.12.8.10 2009.01.05 -
ViRobot 2009.1.6.1546 2009.01.06 -
VirusBuster 4.5.11.0 2009.01.06 -
weitere Informationen
File size: 10752 bytes
MD5...: 1bc8b878236ae572b6d19b15fafe861d
SHA1..: 1ed44a2bad88c20de00a2686d3d64ca3b512f11c
SHA256: c7097c31877bbb4c50bd5e3ef5983ed43d1530cae12ccb53a3 e381c6c7561ae5
SHA512: 8a8c06e8c7bd88cf020aa626b9443805411091bbfe4c44662f 49fd9d92ef78d3
e61d6964dcdc4ac97f2aec4155c016bc8ce0102f3640a6f1cc 24dc890fed80a4
ssdeep: 96:3ENjxJynN9A+5jAGDkGC/oqU4Jz61qXdp6PA7etzNt:3ELwAaznPqU4s1qXxe
H
PEiD..: -
TrID..: File type identification
Generic CIL Executable (.NET, Mono, etc.) (94.8%)
Generic Win/DOS Executable (2.5%)
DOS Executable Generic (2.5%)
Autodesk FLIC Image File (extensions: flc, fli, cel) (0.0%)
PEInfo: PE Structure information

( base data )
entrypointaddress.: 0x402d0e
timedatestamp.....: 0x496374ef (Tue Jan 06 15:12:47 2009)
machinetype.......: 0x14c (I386)

( 3 sections )
name viradd virsiz rawdsiz ntrpy md5
.text 0x2000 0xd14 0xe00 5.18 fbec8977d9475544b8770879b2c11650
.rsrc 0x4000 0x1750 0x1800 2.13 fa917768ab9805fe6f12b84bed6ca702
.reloc 0x6000 0xc 0x200 0.08 f84d25a4f6dd8f44f8713e2cefae543c

( 1 imports )
> mscoree.dll: _CorExeMain

( 0 exports )

Lg, Chris

Sirect
06.01.2009, 15:54
Dank dir konnte ich es jetzt wenigstens mal ansehen ;)

zeus7
06.01.2009, 15:57
die anwendung konnte nicht initialisiert werden bla bla bla

DeXTer
06.01.2009, 18:46
.net Framework installiert?

ir0n
06.01.2009, 19:06
@ zeus: Dann hast du kein .NET Framework installiert ;)

Lg, Chris

bl4ck3y3
09.07.2009, 18:43
sieht richtig geil aus thx

MPC500
09.07.2009, 18:57
Reup please

sTalk3er
09.07.2009, 19:01
Reup please

wa wieso reup? Der code steht auf de 1sten seite o0

Elexarie
09.07.2009, 19:03
Ah. Jetzt schreib ich auch mal Feedback.

Nicht viele Worte: ECHT GEIL! Super Teil!

MPC500
09.07.2009, 19:11
Was kann ich mit dem Code denn machen??

Kann ich auch den Matrix effect als Desktop Hintergrund machen??

sTalk3er
09.07.2009, 19:17
das ist eine.exe
du musst eine .gif haben um so was hinzubekommen.
was du mit dem code machen kannst wird dir auf seite1 erklärt

MfG