The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

TomatoUSB – selectively save/restore NVRAM settings before/after upgrading

Posted by jpluimers on 2017/07/14

TomatoUSB recommends a NVRAM reset (or 30/30/30 reset) before and after upgrades.

This means you loose all your settings which causes a lot of people to not upgrade at all.

The steps to export/import are a bit vague as they depend on what you want to save.

It basically comes down to do this on the old configuration

nvram export --set

Save that output to a local file and then use a search tool searching for specific sections you want to restore.

After you restored the sections ensure you persist them:

nvram commit

This is what the TomatoUSB author usually searches for:

Read the rest of this entry »

Posted in Internet, Power User, routers, TomatoUSB | Leave a Comment »

SUSE 12.3 – How to auto start services…?

Posted by jpluimers on 2017/07/14

Old (somehow it was blocked in the post queue), but sometimes still relevant for more modern services as, well sysv versus systemd war still are not over yet…

Interesting: systemctl gives flaky results for many services.

chkconfig nfs
chkconfig nfs on

Source: [WayBack] SUSE 12.3 – How to auto start services…?

This is on my system:

revue:~ # systemctl is-enabled shellinabox
shellinabox.service is not a native service, redirecting to systemd-sysv-install
Executing /usr/lib/systemd/systemd-sysv-install is-enabled shellinabox
shellinabox  off
enabled
revue:~ # rcshellinabox status
Checking for service shellinabox                                                       unused
● shellinabox.service - LSB: shellinabox
Loaded: loaded (/etc/init.d/shellinabox)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
revue:~ # rcshellinabox start
redirecting to systemctl start shellinabox.service
revue:~ # chkconfig shellinabox
shellinabox  off
revue:~ # chkconfig shellinabox on
revue:~ # chkconfig shellinabox
shellinabox  on

–jeroen

Posted in *nix, openSuSE, Power User, SuSE Linux | Leave a Comment »

A slightly optimized TDateTime functions (YearOf, MonthOf, DayOf) …

Posted by jpluimers on 2017/07/13

Besides the optimised versions of these functions, I learned the most from these comments:

–jeroen

Source: A slightly optimized TDateTime functions (YearOf, MonthOf, DayOf) …

Posted in Delphi, Development, Software Development | 2 Comments »

BorCon 97, 20 years ago, Star Wars, 40 years ago

Posted by jpluimers on 2017/07/13

Marco Cantu (right) and Jeroen Pluimers (left) in 1997

Marco Cantu (right) and Jeroen Pluimers (left) in 1997

The BorCon 97 opening – today 20 years ago – was so much fun: the a Star Wars like opening crawl about a tiny company fighting the – then regarded – Evil Empire called Microsoft.

It was back in the days when lots of new things in the Delphi world were happening: Delphi 2 – the first 32-bit version – came out half a year before and the upcoming Delphi 3 was going to be a game changer as well. New features were rock solid and sales were booming.

Personally, I was much slimmer (yes, that’s me in the Tie-Dye), and could do a pre-conference tutorial on CORBA and VisiBroker (The ORB by Visigenic which was about to be acquired by Borland – which now is owned by Micro Focus only after spinning of the CodeGear which got acquired by Embarcadero that is now owned by Idera which feels like the Inprise story all over again).

I got triggered to this after watching the Opening Night Excitation episode 194 of the Big Bang Theory:

Read the rest of this entry »

Posted in Delphi, Delphi 2, Delphi 3, Development, Software Development | Leave a Comment »

https://www.youtube.com/watch?v=INzECItF6ew Delphi, where are you? 

Posted by jpluimers on 2017/07/12

Edit: in the mean time, the author took his video off-line. The G+ thread however is still interesting.

From a while ago:

[WayBack] https://www.youtube.com/watch?v=INzECItF6ew
Delphi, where are you? – Jacek Laskowski – Google+

 

YouTube video C++ Cool Debugging Tips and Tricks

–jeroen

Posted in C++, Delphi, Development, Software Development | 4 Comments »

Firebird: reset statistics for all indices using `set statistics index :index_name` – via: What is index selectivity?

Posted by jpluimers on 2017/07/12

A while ago, I needed to reset the index statistics for all indices in one our databases: a Firebird database.

I hadn’t done work like this in a while, so I made the cardinal mistake of Googling and using the first matching StackOverflow answer that seemed a perfect fit.

Boy was I wrong (:

In sql – My firebird query plan does not use correct index – Stack Overflow  I found the accepted answer (no less!) has this neat block to update index statistics for all indices:

    EXECUTE BLOCK
    AS
      DECLARE VARIABLE IDX VARCHAR(31);
    BEGIN
      FOR
        SELECT rdb$index_name FROM rdb$indices
        WHERE NOT rdb$index_name LIKE 'RDB$%'
        INTO :idx
      DO BEGIN
        EXECUTE STATEMENT 'update statistics ' || :idx
        WITH AUTONOMOUS TRANSACTION; 
      END
    END

The code consistently failed with this error:

    Script Error:
    
    Dynamic SQL Error
    SQL error code = -104
    Unexpected end of command - line 1, column 19

When I removed the lines inside the do beginend block, then the outer statements execute fine.

Incidentally, column 19 is right at the space at the end of after the 'update statistics '. Which meant that either the string concatenation was wrong, or the statement itself.

And yes, I should have Googled the Firebird documentation instead, as What is index selectivity? has the correct statement that recalculates statistics for all indexes:

set term !! ;

EXECUTE BLOCK AS
declare variable index_name VARCHAR(31);
BEGIN
for select RDB$INDEX_NAME from RDB$INDICES into :index_name do
execute statement 'SET statistics INDEX ' || :index_name || ';';
END!!

set term ; !!

–jeroen

Source: What is index selectivity?

Posted in Database Development, Development, Firebird | Leave a Comment »

Cool Google stuff: Trivia Template for the Google Assistant

Posted by jpluimers on 2017/07/11

This is soo cool: [Archive.isTrivia Template to make Google Assistant trivia questionaires.

It reminds me of a project a few years back where we did a similar thing to create automated interviews.

The trivia template tool lets you build apps for the Google Assistant without writing a single line of code.

Source: [WayBackGoogle Assistant Trivia Template – Leon Nicholls – Medium

Via: [WayBack] Trivia Template: Nandini Stocker and I just launched a template tool to create trivia games for the Google Assistant. The template turns your questions and answers from a spreadsheet into a fully functioning game without writing any code… – Leon Nicholls – Google+

–jeroen

Posted in Development, Google, Google AI, Power User, Software Development | Leave a Comment »

Droste effect… best torrent sites – Google Search

Posted by jpluimers on 2017/07/11

Likely the Droste effect won’t last long: best torrent sites – Google Search and https://www.google.com/#q=best%20torrent%20sites both give this list at the top and a recursive link about stories with the search links at the bottom.

via many, including:

–jeroen

Read the rest of this entry »

Posted in Fun, Google, GoogleSearch, Power User | Leave a Comment »

Firebird: creating indices in scripts after checking for their existence

Posted by jpluimers on 2017/07/11

A few notes when making scripts that create indexes based if they do (not) exist (yet):

–jeroen

Read the rest of this entry »

Posted in Database Development, Development, InterBase | Leave a Comment »

3.6 GIG – Public-Mikrotik-Bandwidth-Test-Server – MikroTik RouterOS

Posted by jpluimers on 2017/07/10

Don’t abuse: 3.6 GIG – Public-Mikrotik-Bandwidth-Test-Server – MikroTik RouterOS [WayBack]

Primary btest server (for short high speed bursts):

  • IP address: 207.32.195.2
  • User: btest
  • Passowrd: btest
  • Max connection time: 10 minutes
  • No winbox access, only bandwidth test

Secondary btest server (for longer less high speed traffic) [WayBack]:

  • IP address: 207.32.195.10
  • User: btest
  • Passowrd: btest
  • Local Tx Speed: 25k
  • Remote Tx Speed: 25k
  • No winbox access, only bandwidth test

–jeroen

Posted in Internet, MikroTik, Power User, routers | 6 Comments »