Final(?) magnet implementation for GB Robbo
C using 0xCyyx 8072 11 412/ 1204/ 733.8
C using map[] 5772 11 300/ 944/ 524.7
ASM 5060 11 276/ 872/ 460.0
| <?xml version="1.0"?> | |
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="DisplayMessages"> | |
| <ItemGroup> | |
| <MavenArtifact Include="commons-compress-1.23.0" Group="org.apache.commons" Artifact="commons-compress" Version="1.23.0" /> | |
| <MavenArtifact Include="commons-compress-1.22" Group="org.apache.commons" Artifact="commons-compress" Version="1.22" /> | |
| </ItemGroup> | |
| <Target Name="DownloadArtifacts" BeforeTargets="UnzipArchive"> | |
| <DownloadFile | |
| SourceUrl="https://repo1.maven.org/maven2/$([MSBuild]::ValueOrDefault('%(MavenArtifact.Group)', '').Replace('.', '/'))/$([MSBuild]::ValueOrDefault('%(MavenArtifact.Artifact)', '').Replace('.', '/'))/%(MavenArtifact.Version)/%(MavenArtifact.Artifact)-%(MavenArtifact.Version).jar" |
| using System.Runtime.InteropServices; | |
| using System; | |
| using System.Windows.Forms; | |
| // this guy stolen my code without credits https://www.codeproject.com/Articles/16310/How-to-Automate-Exporting-NET-Function-to-Unmanage | |
| using RGiesecke.DllExport; | |
| //<Project Sdk="Microsoft.NET.Sdk"> | |
| // <PropertyGroup> | |
| // <TargetFramework>net48</TargetFramework> | |
| // <PlatformTarget>x86</PlatformTarget> | |
| // </PropertyGroup> |
| $framework = "net6.0" | |
| #installing svcutil for dotnet | |
| dotnet tool install --global dotnet-svcutil | |
| mkdir CRBRLib | |
| Set-Location CRBRLib | |
| #getting zip with wsdl | |
| Invoke-WebRequest -Uri https://www.gov.pl/attachment/b9c58be1-560a-4c0c-b746-254336f49e41 -OutFile CRBR.zip | |
| #unpack zip and execute svcutil tool | |
| $wsdlFile = ($(Expand-Archive CRBR.zip -Verbose -Force *>&1 | Foreach-Object { if ($_.message -match "Created '(.*)'.*") { Get-Item $Matches[1] }}) | Select-Object -First 1).FullName | |
| dotnet-svcutil $wsdlFile -tf $framework |
| public class DatePicker extends DialogFragment implements DatePickerDialog.OnDateSetListener { | |
| static final Calendar MAX_DATE_VALUE = DateTimeUtils.addYears(DateTimeUtils.today(), 2); | |
| public static DatePicker newInstance(int id, Calendar date) { | |
| return newInstance(id, date, DateTimeUtils.today(), MAX_DATE_VALUE); | |
| } | |
| public static DatePicker newInstance(int id, Calendar date, Calendar minDate, Calendar maxDate) { | |
| DatePicker frag = new DatePicker(); |
| public interface GenericDialogFragment { | |
| String MESSAGE = "MESSAGE"; | |
| String TITLE = "TITLE"; | |
| String URI = "URI"; | |
| String ID = "ID"; | |
| String ARGS = "ARGS"; | |
| String VIEW = "VIEW"; | |
| String DATE = "DATE"; | |
| String POSITIVE = "POSITIVE"; | |
| String NEGATIVE = "NEGATIVE"; |
| /* | |
| * Copyright (C) 2019 Sam Lu | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
Final(?) magnet implementation for GB Robbo
C using 0xCyyx 8072 11 412/ 1204/ 733.8
C using map[] 5772 11 300/ 944/ 524.7
ASM 5060 11 276/ 872/ 460.0
| ld hl, G$soundState$0_0$0+1 ;12 ld bc, xx ;12 | |
| ldi a, (hl) ;8 ld a, (bc) ;8 | |
| ld c, a ;4 ld l, a ;4 | |
| inc bc ;8//+8 | |
| ld b, (hl) ;8 ld a, (bc) ;8 | |
| ld h, a ;4//+12 - fiexed | |
| ld a, (bc) ;8 ldi a, (hl) ;8 | |
| inc bc ;8 ;//+4 | |
| cp $01 ;same | |
| jr z, A$sounds$101 ;same |
| package pl.selvin.test; | |
| import java.awt.BorderLayout; | |
| import java.awt.Color; | |
| import java.awt.DisplayMode; | |
| import java.awt.EventQueue; | |
| import java.awt.Graphics; | |
| import java.awt.GraphicsDevice; | |
| import java.awt.GraphicsEnvironment; | |
| import java.awt.event.ActionEvent; |