Archive for the ‘Development’ Category
Posted by jpluimers on 2019/03/13
Interesting read and watch:
At the recent Embedded Linux Conference and OpenIoT Summit, Mozilla Technical Evangelist Dietrich Ayala proposed a simple and affordable solution to home automation: A discarded smartphone can handle some of the most useful home automation tasks without requiring expensive hubs and sensors — or risking data security in the cloud.
Source: [WayBack ] Repurposing Old Smartphones for Home Automation | Linux.com | The source for Linux information .
Via Ruurd Pels .
GitHub Repository autonome/context by autonome (Dietrich Ayala)
–jeroen
VIDEO
Posted in Development , Hardware Development , IoT Internet of Things , Network-and-equipment , Power User , Software Development | Leave a Comment »
Posted by jpluimers on 2019/03/12
On my list of things to install soon IDE Fix Pack 6.4 and 6.4.1:
Technically, there is 6.4 that works in Delphi 10.3 Rio Update 1, but it is better to install 6.4.1 as it works with 10.3 and 10.3.1:
The dependencies file looks interesting for good uses list optimisation, given that you compile with all conditional define permutations:
There is a ton of changes, of which I like the bold ones most:
6.4
Fixed: Packages with duplicate units may not have caused a fatal compiler error.
Added: Support for Delphi 10.3 Rio
Added: StyleUtils.inc performance optimizations for faster UI rendering (D10.3)
Added: Infinite loop detection in TDebugger.UpdateEventLog
Added: Fix for TStringList.IndexOfName bug (RSP-21633)
Added: Fix for access violation in the Welcomepage JScript9.dll binding
Added: TCustomListBox.ResetContent is skipped if the handle isn’t created yet
Added: More STRINGCHECKS-free RTL code (2009/2010)
Added: More DFM Streaming optimizations
Added: RTL and DFM streaming patches to remove STRINGCHECKS (2009/2010)
Added: Removed VclFixPack OutputDebugString calls (2009)
Added: FillChar uses Enhanced REP MOVSB/STOSB cpu feature if available for large sizes.
Added: Enabled CPU LOCK string assignment optimization for local variables
Added: -x-Oe (experimental optimizations) and -x-cgo compiler option extension
Added: CodeGen: Remove of some unnecessary push/pop operations
Added: Expression Evaluator allows array access to pointers even if the type wasn’t declared with {$POINTERMATH ON}
Added: Max number of constants in a function was increased from 64K to 16M (2009-XE3)
Added: New compiler option extensions: -x–compileonly, -x–reslist, -x–depfile, -x–unitstats
Added: More performance optimization for the DCC64 compiler
Added: TStringBuilder.SetLength optimization [RSP-19178] (XE+)
Added: TStrings.GetDelimitedText optimization
Improved: Slight faster TStringList.IndexOfName optimization for sorted string lists.
6.4.1
Fixed: StyleUtils.inc patch contained a hard coded address causing the patch to fail if the DLL’s base address was relocated. (10.3 only)
Fixed: TCustomListBox.ResetContent patch crashed with an access violation. (2010 only)
–jeroen
Read the rest of this entry »
Posted in Delphi , Development , Software Development | Leave a Comment »
Posted by jpluimers on 2019/03/08
TL;DR:
Windows 10 has an undocumented /unique switch for sort
git for Windows ships with uniq (in a default x64 install, it is at C:\Program Files\Git\usr\bin\uniq.exe)
From [WayBack ] sorting – Is there a Windows equivalent to the Unix uniq? – Super User
This works fine:
dir /s /b *0*.pas *1*.pas *2*.pas *3*.pas *4*.pas *5*.pas *6*.pas *7*.pas*8*.pas *9*.pas | sort /unique > pas-files-with-numeric-names.txt
I need remove duplicate lines from a text file, it is simple in Linux usingcat file.txt |sort | uniqwhen file.txt containsaaabbbaaacccIt will output aaabbbcccIs there a Windows
Posted in Development , Power User , Software Development , Windows , Windows Development | Leave a Comment »
Posted by jpluimers on 2019/03/07
SourceTree does not like it when by accident two git stash entries have exactly the same name.
To work around that, you have to rename one.
The easiest way to do this is on the console using the tips from [WayBack ] How can I rename a git stash? – Stack Overflow (thanks [WayBack ] qzb ):
$ git stash list
stash@{0}: WIP on master: Add some very important feature
stash@{1}: WIP on master: Fix some silly bug
First, you must remove stash entry which you want to rename:
$ git stash drop stash@{1}
Dropped stash@{1} (af8fdeee49a03d1b4609f294635e7f0d622e03db)
Now just add it again with new message using sha of commit returned after dropping:
$ git stash store -m "Very descriptive message" af8fdeee49a03d1b4609f294635e7f0d622e03db
And that’s it:
$ git stash list
stash@{0}: Very descriptive message
stash@{1}: WIP on master: Add some very important feature
This solution requires git 1.8.4 or later, and yes, it works with dirty working directory too.
Some other useful git stash commands:
–jeroen
Posted in Development , DVCS - Distributed Version Control , git , Software Development , Source Code Management , SourceTree | Leave a Comment »
Posted by jpluimers on 2019/03/07
If you get a message like this in Atom when using plantuml-preview:
then you need to change the PlantUML Jar setting from your old version (in my case /usr/local/Cellar/plantuml/1.2017.13/libexec/plantuml.jar:
Then you have to save your .plantuml file so the preview re-renders.
This finds the homebrew installed PlantUML versions:
$ find /usr/local/Cellar/plantuml | grep plantuml.jar
/usr/local/Cellar/plantuml/1.2017.13/libexec/plantuml.jar
/usr/local/Cellar/plantuml/1.2017.14/libexec/plantuml.jar
–jeroen
Posted in Development , Diagram , PlantUML , Software Development , UML | Leave a Comment »
Posted by jpluimers on 2019/03/06
Delphi and FPC have different language boundaries, so it is always good to read a thread discussing how to get near-the-edge cases work in both.
This case is about Smart Pointers (here called auto pointers, maybe because auto_ptr is what they used to be called in C++): [WayBack ] Hi all, I am trying to make a certain piece of code cross compile between Delphi and FPC. On FPC, it compiles fine but on Delphi I get a [dcc32 Error] P… – Ugochukwu Mmaduekwe – Google+
In the end if comes down to that Delphi does not allow forward-declaration of records (it does for interfaces and classes) , but that you do not need a __PAutoPtr_T = ^__TAutoPtr_T, because you can use ^__TAutoPtr_T in parameters.
In Spring4D, they are called Shared/IShared/TShared , see my comment:
Note that since these are reference counted, you might want to call them shared_ptr . If you enforce the single-instance behaviour, observe that in C++ they are now called uniqe_ptr .
In Spring4D this rename has already taken place a while ago: https://bitbucket.org/sglienke/spring4d/commits/e252b81fd3788cf5b82588721f68d00c892deb87
–jeroen
Posted in Conference Topics , Conferences , Delphi , Development , Event , Software Development | 2 Comments »
Posted by jpluimers on 2019/03/06
With the removal of the C# based Windows vSphere Client in ESXi 6.5, the vSphere HTML5 Web Client is the way to go.
It doesn’t cover all functionality yet, and some functionality is in different places in the UI, so below the steps to change the hostname.
Since I prefer a central location of name and address management, I’ve also documented on how to do this with DHCP option 12.
Oh: I’m not alone in finding the changed place
Read the rest of this entry »
Posted in Development , ESXi6.5 , Hardware , MikroTik , Network-and-equipment , Power User , RouterOS , routers , Scripting , Software Development , Virtualization , VMware , VMware ESXi , WinBox | Leave a Comment »