Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/28/21 in all areas

  1. SudokuHelper is an application that acts like an electronic Sudoku grid. It supports 9x9, 12x12, and 16x16 Sudokus, both in the classic and Gosu variant, where cells can be marked to only accept even numbers. The application neither creates Sudokus itself nor provides a solver for them; it is just a more convenient way to solve a Sudoku from a magazine or other external source than doing it on paper, using pencil and eraser. The application's main features are: Invalid cell values are marked in red. Candidate values can be added and removed from a cell. Setting a cell's value will automatically remove candidates no longer possible in other cells. All actions can be undone, the undo stack is only limited by available memory. Named marks can be set for the current undo stack state and one can later restore the stack to such a named mark. The complete Sudoku can be saved to file, including the undo stack, and later loaded again from such a file. The project can be found on GitHub: https://github.com/PeterBelow/SudokuHelper The code is a good example (IMO) of how to uncouple the UI from the "buisness" code using interfaces, in a kind of MVC design. It is free (public domain) without restrictions.
  2. Lars Fosdal

    Delphi on Windows 11 on MacBook Pro 16 (2021)

    Getting to know the Mac. The OS is “UNIXish”, so that is pretty easy, but the UI and the keyboard… OMG, it is hard when 30 years of Windows is engraved into your DNA. Shift, fn, control, option, command will take some time to get used to., The multi-touchpad, with clicks, doubleclicks, single, double and triple finger combos... After deciding on Parallels Pro as a VM host, getting the Windows 11 for ARM VM up and running was incredibly easy. I went for four CPUs and 10Gb as the base config. Getting Delphi 11 + November patch installed went flawlessly and pretty quick. Getting PA Server installed also went without a hitch. It took a little while to start Delphi the first time, but after that it was snappy. I created a blank FMX project, but when I try to select the MacOS ARM 64-bit platform, I arrive at Obstacle 1: Delphi fails to import MacOS SDK and asks if I installed the XCode command line tools? I had installed XCode, but since I´ve never used it, it is pretty much a blank sheet to me. Looking at the PA Server console, I found that it ran: > command_line: "/usr/bin/xcodebuild" -version -sdk When I run that in a Terminal, I get an error message: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance So, Google it is. https://github.com/nodejs/node-gyp/issues/569 lists a solution, suggesting # Install Command Line Tools if you haven't already. xcode-select --install Which fails, suggesting it is installed, and that I should use Software Update to update it. I do. It is up to date. # Enable command line tools sudo xcode-select --switch /Library/Developer/CommandLineTools This does not help. Same error message about the command line tool instance. The third option worked. # Change the path if you installed Xcode somewhere else. sudo xcode-select -s /Applications/Xcode.app/Contents/Developer Yay, I have a MacOS 12 SDK! Even if the import log looks weird. A single Hello World TLabel and Run. Yay! MacOS ARM app running! Lets try something more complex. I open a sample project, switch to MacOS ARM, and compile. dccosxarm64 command line for "FMSimplePhysics.dpr" [dccosxarm64 Error] E2597 ld: library not found for -lFlatBox2DDyn [dccosxarm64 Fatal Error] F2588 Linker error code: 1 ($00000001) Obstacle 2: Now what!? It is probably trivial, but ...
  3. pyscripter

    GExperts 1.3.19 Alpha 2 for Delphi 11 Patch 2

    An alternative to the method Žarko Gajić described is the following code: function ScaleImageList(Source: TCustomImageList; M, D: Integer): TCustomImageList; const ANDbits: array[0..2*16-1] of Byte = ($FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF, $FF,$FF); XORbits: array[0..2*16-1] of Byte = ($00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00); var I: integer; Icon: HIcon; begin Result := TCustomImageList.CreateSize(MulDiv(Source.Width, M, D), MulDiv(Source.Height, M, D)); if M = D then begin Result.Assign(Source); Exit; end; Result.ColorDepth := cd32Bit; Result.DrawingStyle := Source.DrawingStyle; Result.BkColor := Source.BkColor; Result.BlendColor := Source.BlendColor; for I := 0 to Source.Count-1 do begin Icon := ImageList_GetIcon(Source.Handle, I, LR_DEFAULTCOLOR); if Icon = 0 then begin Icon := CreateIcon(hInstance,16,16,1,1,@ANDbits,@XORbits); end; ImageList_AddIcon(Result.Handle, Icon); DestroyIcon(Icon); end; end; It is simpler and I think works better.
  4. David Heffernan

    Library to get user, computer info

    Not such much on Linux
×