1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. minx

Beiträge von minx

  • DeskStream 2 Release Candidate 1.8

    • minx
    • 20. April 2015 um 19:29

    Sinnfreie Idee #5425624.53:

    Man kann Fenster spiegeln, wenn man auf dem Server-Fenster mit einem automatischen Window-Spy alle Controls abfängt und eine GUI auf dem Client baut, welche genau so aussieht. Danach wird schlicht der DC vom Client und Server verglichen. Wenn nicht alles gleich ist (Nicht native Controls), und der Nutzer es wünscht, wird die ganze Server-GUI gestreamt.

  • DeskStream 2 Release Candidate 1.8

    • minx
    • 20. April 2015 um 19:21

    Ich meine eher, dass ein einzelnes Fenster gespiegelt wird. Z.B. Start des Servers, dort auf das Fenster klicken und beim Client taucht dieses Fenster auf als würde es auf dem Client laufen. D.h. auch mehrere Instanzen bzw. mehrere Fenster. So könnte man die Fenster auf dem Client wie native Programme behandeln.

    Ich hoffe meine Ausführungen ergeben Sinn :)

  • DeskStream 2 Release Candidate 1.8

    • minx
    • 20. April 2015 um 18:27

    Gewählter Auschnitt oder besser gewähltes Fenster wären famos, dann lässt sich das ganze schön als Monitoring einsetzen ohne das TV aktiv sein muss.

  • Rationale Approximation

    • minx
    • 19. April 2015 um 19:37
    Zitat

    Here is a translation into C++ with some minor updates. You cannot really determine equality between two floating point numbers, and besides, I need accuracy to some epsilon as well as a maximum size for the numerator. Anyway, here is a C++ offering.

    Code
    #include <utility>
    
    
    /**
    * Farey algorithm
    *
    * Translated from John D. Cook's Python implementation in
    * http://www.johndcook.com/blog/2010/10/20/best-rational-approximation/
    *
    * @param x A value between 0.0 and 1.0 to be approximated by two integers
    * @param eps The required precision such that abs(x-a/b) < eps. Eps > 0.
    * @param N The maximum size of the numerator allowed
    */
    pair<unsigned int, unsigned int> farley(double x, double eps, unsigned int N)
    {
      unsigned int a(0);
      unsigned int b(1);
      unsigned int c(1);
      unsigned int d(1);
      double mediant(0.0F);
    
    
      while ((b <= N) and (d <= N))
      {
        mediant = static_cast<float> (a + c) / static_cast<float> (b + d);
        if (abs(x - mediant) < eps)
        {
          if (b + d <= N)
          {
            return pair<unsigned int, unsigned int> (a + c, b + d);
          }
          else if (d > b)
          {
            return pair<unsigned int, unsigned int> (c, d);
          }
          else
          {
            return pair<unsigned int, unsigned int> (a, b);
          }
        }
        else if (x > mediant)
        {
          a = a + c;
          b = b + d;
        }
        else
        {
          c = a + c;
          d = b + d;
        }
        }
        if (b > N)
        {
          return pair<unsigned int, unsigned int> (c, d);
        }
        else
        {
          return pair<unsigned int, unsigned int> (a, b);
        }
    }
    Alles anzeigen


    Falls das ein wenig besser verständlich ist ^^

  • Rationale Approximation

    • minx
    • 19. April 2015 um 19:31
    Zitat

    How do you find the best approximations? You could do a brute force search. For example, if the maximum denominator size is N, you could try all fractions with denominators less than or equal to N. But there’s a much more efficient algorithm. The algorithm is related to the Farey sequence named after John Farey, though I don’t know whether he invented the algorithm.

    The idea is to start with two fractions, a/b = 0/1 and c/d = 1/1. We update either a/b or c/d at each step so that a/b will be the best lower bound of x with denominator no bigger than b, and c/d will be the best upper bound with denominator no bigger than d. At each step we do a sort of binary search by introducing the mediant of the upper and lower bounds. The mediant of a/b and c/d is the fraction (a+c)/(b+d) which always lies between a/b and c/d.

    Here is an implementation of the algorithm in Python. The code takes a number x between 0 and 1 and a maximum denominator size N. It returns the numerator and denominator of the best rational approximation to x using denominators no larger than N.

    Code
    def farey(x, N):
        a, b = 0, 1
        c, d = 1, 1
        while (b <= N and d <= N):
            mediant = float(a+c)/(b+d)
            if x == mediant:
                if b + d <= N:
                    return a+c, b+d
                elif d > b:
                    return c, d
                else:
                    return a, b
            elif x > mediant:
                a, b = a+c, b+d
            else:
                c, d = a+c, b+d
     
        if (b > N):
            return c, d
        else:
            return a, b
    Alles anzeigen
  • Forum Problemsammlung

    • minx
    • 19. April 2015 um 16:24
    Zitat von Raupi

    Ich glaube nicht das jemals wieder WBB 3.1 kommt, obwohl das genial war.

    Wenn Backup da (also 1:1, nicht nur DB), dann gehts, aber ich denke Woltlab vergibt keine Lizenzen mehr.

  • Forum Problemsammlung

    • minx
    • 19. April 2015 um 16:19
    Zitat von Mars

    ^ +1

    ^ +1

  • Forum Problemsammlung

    • minx
    • 19. April 2015 um 15:13
    Zitat von Raupi

    Ich bezweifle, das alle Dateien irgendwann von den Threaderstellern wieder aktualisiert werden.

    Da muss ich aber selbst sagen, dass ich oft meine alten Beiträge als Backup benutzt habe, wenn meine lokalen Kopien weg waren. Alles neu schreiben ist absolut keine Option. Ich hatte auch mehrere Snippets und Skripte in der Notizfunktion vom WBB3 gespeichert, die sind sowieso weg.

    Das Update war komplett fehlgeplant. Wenn die Anhänge tatsächlich komplett weg sind, dann hat das ganze Forum hier fast keinen Sinn mehr, wie Raupi schon sagte. Wenn schon keine Möglichkeit besteht die Anhänge wieder einzufügen, dann vielleicht einfach nur ein Verzeichnis mit allen Downloads.

  • Forum Problemsammlung

    • minx
    • 19. April 2015 um 14:00
    Zitat von Andy

    Und wenn du der Meinung bist, dass User in einem Forum ihre gesamten Anhänge nochmal hochladen und verlinken sollten, dann frage dich mal nach dem Sinn eines Forenupgrades, welches bisher KEINEN einzigen Vorteil gegenüber der Version vor einem Jahr hat!

    So ists.

  • Hilfe

    • minx
    • 17. April 2015 um 12:37
    Zitat von AspirinJunkie

    Denk einfach mal ganz kurz über diese Zahl nach...

    Wenn jede HTML Seite auch nur ein Byte groß ist, dann sind es insgesamt 9 x 10^62 TB :D

  • Hilfe

    • minx
    • 17. April 2015 um 12:22

    Dann tu das bitte per PN.

  • Hilfe

    • minx
    • 17. April 2015 um 12:14

    Das ist einfach bloß verrückt :huh: .

    Sag uns erstmal was du machen willst und vor allem um welche Seite es da geht.

  • CoSiNUs brOTHerS inTRO build 2015-04-20

    • minx
    • 15. April 2015 um 19:19

    Windows 10 x64 läuft.

  • Tunnel - kleiner Zeitvertreib für Zwischendurch

    • minx
    • 15. April 2015 um 11:12

    Benutze doch den Curve-Code aus meinem Post und halbiere oder viertele die vertikale Anzahl an Punkten. Die Interpolation ist doch automatisch. Du kannst ja im ersten Frame messen, wie viel tatsächlich gezeichnet werden kann bevor die Framerate unter 60 sinkt.

    Dazu natürlich auch AdlibRegister(ZeichenFunktion, 1000/60), damit du selbst die Geschwindigkeit ändern kannst.

  • Tunnel - kleiner Zeitvertreib für Zwischendurch

    • minx
    • 15. April 2015 um 07:21

    So lässt sich der zuckende Seitensteifen umgehen:

    [autoit]

    #include <GdiPlus.au3>
    #include <Misc.au3>

    [/autoit][autoit][/autoit][autoit]

    _GDIPlus_Startup()
    Opt("GUIOnEventMode", 1)
    $hDLL = DllOpen("user32.dll")

    [/autoit][autoit][/autoit][autoit]

    $hGUI = GUICreate("Tunnel", 210, 386)
    GUISetOnEvent(-3, "_Exit")
    GUISetState(@SW_SHOW)

    [/autoit][autoit][/autoit][autoit]

    Local $iX = 105, $iY = 370, $iInc = 0, $iScore = 0, $iFrames = 0
    Local $aBorders[386][2]
    Local $lPoints[387][2], $rPoints = $lPoints

    [/autoit][autoit][/autoit][autoit]

    $lPoints[0][0] = 386
    $rPoints[0][0] = 386

    [/autoit][autoit][/autoit][autoit]

    For $i = 7 To 385 Step 7
    For $x = 1 To 7
    $aBorders[$i - $x][0] = 75
    $aBorders[$i - $x][1] = 135
    Next
    Next

    [/autoit][autoit][/autoit][autoit]

    AdlibRegister("_FPS", 1000)

    [/autoit][autoit][/autoit][autoit]

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    $hBitmap = _GDIPlus_BitmapCreateFromGraphics(210, 386, $hGraphics)
    $hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hBuffer, 2)

    [/autoit][autoit][/autoit][autoit]

    Local $hPen = _GDIPlus_PenCreate(0xFFFEFEFE, 4)

    [/autoit][autoit][/autoit][autoit]

    _GDIPlus_GraphicsFillRect($hGraphics, $iX, $iY, 5, 5)

    [/autoit][autoit][/autoit][autoit]

    While 1
    $iFrames += 1
    $iScore += 1
    $iInc = Random(-1, 1, 1) * 2

    [/autoit][autoit][/autoit][autoit]

    $aBorder_Tmp = $aBorders
    For $i = 1 To 385
    $aBorders[$i][0] = $aBorder_Tmp[$i - 1][0]
    $aBorders[$i][1] = $aBorder_Tmp[$i - 1][1]
    Next

    [/autoit][autoit][/autoit][autoit]

    If $aBorders[0][0] + $iInc <= 1 or $aBorders[0][1] + $iInc >= 209 Then $iInc *= -1

    [/autoit][autoit][/autoit][autoit]

    $aBorders[0][0] = $aBorders[0][0] + $iInc
    $aBorders[0][1] = $aBorders[0][1] + $iInc

    [/autoit][autoit][/autoit][autoit]

    If _IsPressed(25, $hDLL) Then $iX -= 2
    If _IsPressed(26, $hDLL) Then $iY -= 2
    If _IsPressed(27, $hDLL) Then $iX += 2
    If _IsPressed(28, $hDLL) Then $iY += 2

    [/autoit][autoit][/autoit][autoit]

    If $iY <= 14 Then $iY = 14
    If $iY >= 370 Then $iY = 370

    [/autoit][autoit][/autoit][autoit]

    For $i = $iY - 14 To $iY + 14 Step 7
    If $iX < $aBorders[$i][0] or $iX > $aBorders[$i][1] - 5 Then
    MsgBox(48, "Oops!", "You crashed!" & @CRLF & "Score: " & $iScore)
    _Exit()
    EndIf
    Next

    [/autoit][autoit][/autoit][autoit]

    For $i = 0 To 385; Step 5
    $lPoints[$i+1][0] = $aBorders[$i][0]
    $lPoints[$i+1][1] = $i
    $rPoints[$i+1][0] = $aBorders[$i][1]
    $rPoints[$i+1][1] = $i
    Next

    [/autoit][autoit][/autoit][autoit]

    _GDIPlus_GraphicsDrawCurve($hBuffer, $lPoints, $hPen)
    _GDIPlus_GraphicsDrawCurve($hBuffer, $rPoints, $hPen)

    [/autoit][autoit][/autoit][autoit]

    _GDIPlus_GraphicsFillRect($hBuffer, $iX, $iY, 7, 7)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 210, 386)
    _GDIPlus_GraphicsClear($hBuffer, 0xFF808080)
    WEnd

    [/autoit][autoit][/autoit][autoit]

    Func _FPS()
    WinSetTitle($hGUI, "", $iScore & "@" & $iFrames)
    $iFrames = 0
    EndFunc

    [/autoit][autoit][/autoit][autoit]

    Func _Exit()
    _GDIPlus_ImageDispose($hBuffer)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()
    AdlibUnRegister("_FPS")
    DllClose($hDLL)
    Exit
    EndFunc

    [/autoit]
  • MiniCL - Berechnungen auf GPU in einer Zeile (kein OpenCL)

    • minx
    • 13. April 2015 um 00:44

    Problem gelöst. Das Problem lag bei dem eigenen WndProc vom Fenster, welches MiniCL erzeugt. AutoIt will diesen Loop nicht und crasht. Lösung: Dummy-GUI in AutoIt erzeugen und hWnd nach MiniCL übergeben, damit dort dann OpenGL initialisiert wird. Die Proc wird von AutoIts GUI geklaut. ^^

  • MiniCL - Berechnungen auf GPU in einer Zeile (kein OpenCL)

    • minx
    • 12. April 2015 um 23:41

    Jetzt ist glut bzw. freeglut endlich aus dem Code verschwunden. Damit hat sich der Overhead von ~500 auf ~180 ms reduziert. Die Kernelzeit ist etwa ~30 µs. Somit ist MiniCL.dll die einzige DLL die geladen werden muss. Mit UPX ist die etwa noch 250KB groß.

    Problem: AutoIt crasht noch immer nach erfolgreicher "Rückgabe" der Daten...

  • MiniCL - Berechnungen auf GPU in einer Zeile (kein OpenCL)

    • minx
    • 12. April 2015 um 14:59

    Moin.

    Ich möchte mal ein Mini-Projekt von mir vorstellen: MiniCL.

    Was?

    Wie bereits bekannt, hat Andy letztes Jahr (oder war es länger her...?) Header für OpenCL in AutoIt geschrieben (und das dann noch mit OpenGL verheiratet). Vorteil war, dass man jetzt alles was parallel läuft auf GPU (GPGPU) oder auf der CPU laufen lassen konnte. Leider müssen dafür nicht nur verschiedene SDKs für verschiedene Hersteller geladen und mitgeliefert werden, OpenCL ist auch nicht gerade die kompatibelste API.

    Ich möchte das ändern und das Berechnen auf GPU einfach gestalten. Ich schreibe deswegen eine DLL dafür, welche am Ende das einzige sein soll, was man mitliefern muss. Hier ist ein kleines Featureset:

    • Komplett self-contained (GLEW usw. sind alle direkt reinkompiliert).
    • Kernel werden in OpenGL GLSL geschrieben
    • Structs mit Daten können aus AutoIt einfach übergeben werden und die Ergebnisse werden destruktiv dort hineingeschrieben
    • Kompatibel mit allen OpenGL-fähigen Grafikkarten
    • MiniCL übernimmt OpenGL Initialisierung, Nutzer bekommt davon nichts mit
    • (geplant) Es können beliebig viele Kernel auf einmal übergeben werden, genauso mehrere Input-Structs, um den Overhead zu minimieren (möglichst viel auf GPU rechnen, nur Setup auf CPU)

    Das hier ist z.B. ein funktionierender Testcode. Es wird ein Array mit 6 floats erzeugt, an MiniCL übergeben, manipuliert:

    [autoit]


    ; Daten erstellen

    [/autoit][autoit][/autoit][autoit]

    $tInputData = DllStructCreate("float Value[" & 3 * 2 & "];")

    [/autoit][autoit][/autoit][autoit]

    $tInputData.Value(1) = 0
    $tInputData.Value(2) = 0.1
    $tInputData.Value(3) = 1
    $tInputData.Value(4) = 1.1
    $tInputData.Value(5) = 2
    $tInputData.Value(6) = 2.1

    [/autoit][autoit][/autoit][autoit]

    ; Daten auf GPU kopieren, Kernel ausführen

    [/autoit][autoit][/autoit][autoit]

    ; Entspricht: Value(n) = Value(n)^2 + 0.2

    [/autoit][autoit][/autoit][autoit]

    ConsoleWrite(@LF & "+> " & DllCall("main.dll", _
    "int:cdecl", "ExecuteMiniCL", _
    "str", "void main(void){ float c = texture2D(SRC, location).r; gl_FragColor = c * c + 0.2; }", _
    "ptr", DllStructGetPtr($tInputData)) _
    [0] & @LF)

    [/autoit]

    Der Output ist dann folgender:

    Code
    --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
    +> [MiniCL] Kernel successfully executed. Output data:
    ->	0.20 	0.21 
    ->	1.20 	1.41 
    ->	4.20 	4.61 
    +> [MiniCL] Kernel used: void main(void){ float c = texture2D(SRC, location).r; gl_FragColor = c * c + 0.2; }
    +>14:32:21 AutoIt3.exe ended.rc:0
    +>14:32:21 AutoIt3Wrapper Finished.


    Auf der GPU liegen Daten immer als 2D Matrix vor. Beim Übergeben an MiniCL konvertiert MiniCL den Array automatisch in eine Matrix.

    ToDo

    Bisher, wie man sieht, ist die Rückgabe noch nicht integriert. Das liegt an der katastrophalen Funktion glutWindow...(), welche AutoIt crasht, weil sie sich zu fein ist ein einem DLL-Thread zu laufen. freeglut.dll muss auch zur Zeit noch mitgeliefert werden. Ich plane aber das durch einen eigenen OpenCL context zu ersetzen (bisher taucht nämlich das eigentliche glut Fenster immer auf, was blöd aussieht :D ). Wenn das getan ist, muss wirklich nur noch MiniCL an sich mitgeliefert werden :)

  • SSE Shuffle Explorer V2

    • minx
    • 11. April 2015 um 20:49
    Zitat von eukalyptus

    ich hab selber noch nicht damit gearbeitet, ich hoffe jedoch, dass es seinen Zweck gut erfüllt und keine Bugs enthält


    Neuerdings Entwickler bei EA :D ?

    Mal schauen, wird bestimmt nützlich ^^

  • CoSiNUs brOTHerS inTRO build 2015-04-20

    • minx
    • 11. April 2015 um 18:29

    Wolltest du sowas ähnliches: http://www.openprocessing.org/sketch/133247

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™