Still need to research this: [WayBack] I search for way to automatically generate class body from interface definition… – Jacek Laskowski – Google+
–jeroen
Posted by jpluimers on 2019/01/23
Still need to research this: [WayBack] I search for way to automatically generate class body from interface definition… – Jacek Laskowski – Google+
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, ModelMaker Code Explorer, Software Development | 2 Comments »
Posted by jpluimers on 2019/01/23
Don’t forget your padding: Hello,I’m playing with the APK format of a sample “Hello world” Android application.my (first) goal is to be able to rebuild an APK from a unzipped one… – Paul TOTH – Google+
References: RSA Algorithm
–jeroen
Posted in Android, Development, Encryption, Mobile Development, Power User, Security, Software Development | Leave a Comment »
Posted by jpluimers on 2019/01/23
As a back-end person, sometimes I wondered about CDATA in front-end HTML code was for, especially in JavaScript and CSS style elements.
[WayBack] HTML vs. XHTML – WHATWG Wiki explains how to be compatible with XHTML, HTML, XML based tools and older browsers:
The following code with escaping can ensure script and style elements will work in both XHTML and HTML, including older browsers.
In both cases, XML ignores the first comment and then uses the
CDATAsection to avoid the need for escaping special characters<and&within the rest of the contents (with subsequent JavaScript comments added within to ensure the HTML-oriented code is ignored by JavaScript).In HTML, older browsers might display the content without the content being within a comment, so comments are used to hide this from them (while modern HTML browsers will run code inside the comments). The subsequent JavaScript comment is added to negate the text added for the sake of XHTML.
The
<style>requires the/**/comments since CSS does not support the single line ones.<!----> ... //--><style type="text/css"><!--/*--><![CDATA[/*><!--*/ ... /*]]>*/--></style>If not concerned about much older browsers (from which one is hiding the HTML) one can use the simpler:
//<style>/*<![CDATA[*/ /*]]>*/</style>Also note that the sequence “
]]>” is not allowed within aCDATAsection, so it cannot be used in true XHTML-embedded JavaScript without escaping.
–jeroen
via:
Posted in CSS, Development, HTML, HTML5, JavaScript/ECMAScript, Scripting, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2019/01/22
Interesting code generator from 3D models into Xamarin, Delphi or Oxygene code:
[WayBack] Petra Sketch Plugin | Melbourne | Applying Code
Convert Sketch drawings to iOS, macOS, Android and Windows native drawing code.
[WayBack] Documentation of Petra Sketch Plugin | Melbourne | Applying Code
Via:
–jeroen
Posted in .NET, C#, Delphi, Development, Software Development, Xamarin Studio | Leave a Comment »
Posted by jpluimers on 2019/01/22
- The caption says, “Saint Dogbert enters the Land of Cubicles searching for the demons of stupidity.” Dogbert walks down the hall wearing a bishop’s miter and holding a scepter.
- The caption says, “Suddenly he finds an over-promoted computer guru spouting useless database concepts.” A man sits at a conference table with two glassy-eyed co-workers. The man says, “You’d be fools to ignore the boolean anti-binary least-square approach.”
- The caption says, “The monster is dispatched to the dark world by the sight of its most feared object.” Dogbert stands on the conference table holding a document in front of the man. Dogbert says, “Look! Actual code!” The man’s head melts into his shirt and a co-worker says, “Cool!”
Source: [WayBack] Dilbert Comic Strip on 1995-11-09 | Dilbert by Scott Adams
–jeroen
via: [WayBack] architecture – Why does the .NET framework have no concept of classes as first-class types? – Software Engineering Stack Exchange
Posted in Development, Software Development | Leave a Comment »
Posted by jpluimers on 2019/01/22
Note: if the system you SSH from is ever compromised, then assume the passwordless targets are also compromised!
–jeroen
Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, Linux, openSuSE, Power User, SSH, SuSE Linux, TCP, Tumbleweed | Leave a Comment »
Posted by jpluimers on 2019/01/21
Historically, [WayBack] W1036: Variable '%s' might not have been initialized (Delphi) has had a lot of gotchas.
The most important still is that it never show for managed types (strings, interfaces, etc).
Usually W1036 shows for non-managed types, but Dan Hacker has found a new case where it does not in [WayBack] Why don’t I get the warning W1036 Variable “‘MyStrings’ might not have been initialized’ if the StringsToDo parameter in DoSomething is defined as a var… – Dan Hacker – Google+
He noticed it in Delphi XE and 10.2 Tokyo.
I tested it with the Win32 compiler in XE8.
This warns:
program W1036;
{$APPTYPE CONSOLE}
uses
System.SysUtils,
System.Classes;
procedure DoSomething(var StringsToDo: TStringList); // <-------- this line makes the difference
begin
//do nothing
end;
procedure Test;
var
MyStrings : TStringList;
begin
MyStrings.Free; {W1036 warning if StringsToDo param is NOT var}
DoSomething(MyStrings);
end;
begin
end.
This does not warn:
program W1036;
{$APPTYPE CONSOLE}
uses
System.SysUtils,
System.Classes;
procedure DoSomething(StringsToDo: TStringList); // <-------- this line makes the difference
begin
//do nothing
end;
procedure Test;
var
MyStrings : TStringList;
begin
MyStrings.Free; {W1036 warning if StringsToDo param is NOT var}
DoSomething(MyStrings);
end;
begin
end.
initially, I misread his report and reacted wrongly on the cause (but rightly on the suggested use case of var and of TStringList):
Because a var parameter means that the caller should pass in an initialised parameter. Otherwise it should be an
outparameter, not avarparameter.
varparameter for reference types likeTStrings(only pass asTStringListif it deliberately is not compatible withTStrings) is a risky thing anyway, because the called method can overwrite it and then the caller has to notice the change, then decide what to do with the previous value (likely free it).
I later correct myself:
Looking better, I think it is a compiler issue.
The only difference between nothing and var is the loading of the parameter as a pointer:
with
var//W1036.dpr.16: MyStrings.Free; {W1036 warning if StringsToDo param is NOT var}
//004CD924 8B45FC mov eax,[ebp-$04]
//004CD927 E8B8A6F3FF call TObject.Free
//Project1.dpr.17: DoSomething(MyStrings);
//004CD92C 8D45FC lea eax,[ebp-$04]
//004CD92F E8E0FFFFFF call DoSomethingwithout
var//W1036.dpr.16: MyStrings.Free; {W1036 warning if StringsToDo param is NOT var}
//004CD924 8B45FC mov eax,[ebp-$04]
//004CD927 E8B8A6F3FF call TObject.Free
//Project1.dpr.17: DoSomething(MyStrings);
//004CD92C 8B45FC mov eax,[ebp-$04]
//004CD92F E8E0FFFFFF call DoSomething
So:
var, a pointer to the instance of MyStrings (obtained by a lea instruction) gets pushed on the stackvar, the instance of MyStrings (obtained by a mov instruction) gets pushed on the stack.For the difference metween mov and lea, and the use of [] brackets, see:
Given the following
code:L1 db "word", 0
mov al, [L1]
mov eax, L1What do the brackets ([L1]) represent?
–jeroen
Source: Why don’t I get the warning W1036 Variable “‘MyStrings’ might not have been i…
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 3 Comments »
Posted by jpluimers on 2019/01/21
Seems my interest in Ubiquiti needs more research: [WayBack] Linus Torvalds – Google+: Working gadgets: Ubiquiti UniFi collection.
Hopefully by now I’ve time to re-design the WiFi coverage in the house and invest in a few of those access points.
Related:
Controller
service unifi stop mongod --repair --dbpath /srv/unifi/data/db service unifi start
https://unifi.ubnt.com/5.8.24.0/unifi/site/default/dashboard?d=############000000000#######000000000#######00000000######## where # are digits, 0 are usually zero digits and 5.8.24.0 is .0 prepended by the first 3 parts of your Unifi Controller Version (mine had Version 5.8.24-11016 at that time).
Splitting 5Ghz and 2.4Ghz SSIDs: two ways (I think the second is cleaner)
For both the first and second one, you need to configure under “Config” -> “WLANs”.
For the second one, you can clone from the first, then change the SSID names.
–jeroen
Posted in Power User, Ubiquiti, WiFi | Leave a Comment »
Posted by jpluimers on 2019/01/21
I have a bunch of [WayBack] FRITZ!WLAN Repeater 1750E | Overview | AVM International devices; this is the quickest way to install them as LAN -> WiFi bridge (connect ethernet to your LAN; use the WiFi as a bridge).
FRITZ!WLAN Repeater 1750E with password 00000000 (that eight times a zero)192.168.178.127 with netmask 255.255.255.0 and gateway 192.168.178.2 for WiFi.–jeroen
Posted in Fritz!, Fritz!WLAN, Internet, Power User | Leave a Comment »