colinardo-avatar
colinardo 2 days ago
Tutorial
Mikrotik Scripting: Using the "place-before" parameter to place fw rule "after" other rule
This is a quick trick to programmatically place firewall rules after specific rules, not before.

Normally you already have the place-before parameter when adding firewall rules, but there can be times when you programmatically need to place the rule after another specific rule.

Assumed you want to insert a new rule after the common "established, related" states firewall rule in the input chain, you could do this

/ip firewall filter add chain=input protocol=tcp dst-port=22 action=accept place-before=([get ([find chain=input && connection-state ~ "established"]->0)]->".nextid")  

This places the rule after it. It makes use of the .nextid property of the entry to get the internal id of the next item in the list. This also works when the rule is the last one in the chain, because the .nextid property will then automatically receive the maximum internal id reference *ffffffff.

The above oneliner assumes that a specific rule already exists, otherwise this command will fail. So to be secure you normally want to do a check if the rule exists:

{
    :local rule ([/ip firewall filter find chain=input && connection-state ~ "established"]->0)  
    :if ($rule) do={
       /ip firewall filter add chain=input protocol=tcp dst-port=22 action=accept place-before=([get $rule]->".nextid")  
    } else={
       :error "Rule not found!"  
    }
}

Regards @colinardo
max-avatar
max 3 days ago
Tutorial
Microsoft Edge no longer starts - Reset Edge
On a couple of occasions, after logging in to Edge, the browser itself would no longer start. The usual PC restart didn't help either. Tested on Windows 11. Here are two things that helped me:

back-to-topRepair Edge


Go to Settings -> Apps -> Installed Apps and search for 'edge'.

Select 'Change' from the three dot menu and then click 'Repair'.

3388144983656078

If this does not help, you may need to delete files.

back-to-topDelete the Edge user profile


In Explorer, browse to the following directory

C:\Users\username\AppData\Local\Microsoft\Edge

In general, you can only permanently delete the User Data folder if your Edge browser no longer starts or is broken.  Otherwise, there are open directories in the folder that cannot be deleted.

Here you will find the 'User Data' folder. Just delete it completely. Edge should then start up as if you had reinstalled it.

3388144957481983

back-to-topWhat happens to existing favourites and passwords?


As I usually synchronise through my Microsoft account, the favourites and passwords were back immediately.
Without synchronisation, they are probably gone.

back-to-topSo always make a backup!


Regards,
@max
Frank-avatar
Frank 4 days ago
Tutorial
How do I remove the Google Updater from macOS?
Who hasn't experienced this: you delete Google Chrome in macOS and yet the annoying ‘Google Updater has added objects that can run in the background’ messages continue to appear. Even if you have disabled them in the settings ‘General -> Login objects -> Allow in background’, they are still active in the system.

The tip refers to macOS 17, but should also work with other versions. In general, you should be careful not to delete the wrong files. A backup is very helpful here.

I have been deleting MacOS programs for years using the free programme AppCleaner.

back-to-topIn this way, background services can be permanently removed:


Open a terminal and type the following command

cd ~/Library/LaunchAgents

There are two files here that belong to Google. If there are other files in the folder, they belong to other background services. Please do not delete them.

com.google.keystone.agent.plist
com.google.keystone.xpcservice.plist

The two Google files will now be deleted:

rm com.google.keystone.*

If the service is still running and cannot be deleted, you will need to type 'sudo' in front of it and enter the login password.

There are two other directories that should be searched in the same way:

cd /Library/LaunchAgents
cd /Library/LaunchDaemons

If there is still a 'google' file, delete it too.

Then close and re-open System Preferences. The 'Google Update' service should no longer appear in the list or notifications. If you want to be absolutely sure, you can simply restart your system.

This procedure usually works for all background services under MacOS.

Finally, we check that the following directory exists

cd ~/Library/Google
ls -la

If this is the case, please run the following uninstall script:

.~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/ksinstall --uninstall
rm -r ~/Library/Google/

The directory is now gone, and with it the 'Google Update' background service.

Kind regards,
Frank
Frank-avatar
Frank 6 days ago
Tutorial
Fast string compare function for PHP
Hello User,

As a developer, I was faced with a challenge: I needed a fast but rough string comparison function for our website. It checks the approximate percentage change between old and new text.

I tried a few PHP functions like similar_text() and later levenshtein(). But even these native functions took over 30 seconds for long texts - far too long for our website.

My search for a more efficient solution led me to a simple but highly effective method. Instead of complex algorithms, I now use basic word processing techniques such as length comparison and word counting. The result? An 80% to 90% increase in performance over similar_text() and levenshtein().

My humble stringCompare() function compares two texts ($str1, $str2) and returns the difference as a percentage. It is not only fast, but also easy to understand and implement. However, it is not 100% accurate (depending on the length of the text, single digit differences are possible). It focuses more on quantitative aspects (length, word frequency) than on qualitative aspects (meaning, context). It is effective at identifying structural similarities and literal matches, but may miss more subtle differences or similarities in content.

I would like to share this solution with the developer community in the hope that it may help with similar performance issues.

public static function stringCompare($str1, $str2): float {
        if ($str1 === $str2) return 0.0;

        $str1 = self::cleanString($str1);
        $str2 = self::cleanString($str2);

        if ($str1 === '' && $str2 === '') return 0.0;    
        if ($str1 === '' || $str2 === '') return 100.0;    

        $len1 = strlen($str1);
        $len2 = strlen($str2);

        // length change
        $lenChange = abs($len1 - $len2) / max($len1, $len2);

        // Improved detection of repeated text
        $repetitionFactor = 0;
        if (str_contains($str2, $str1) || str_contains($str1, $str2)) {
            $repetitions = max($len1, $len2) / min($len1, $len2);
            $repetitionFactor = 1 - (1 / $repetitions);
        }

        // character comparison
        $chars1 = count_chars($str1, 1);
        $chars2 = count_chars($str2, 1);
        $charDiff = 0;
        foreach (array_keys($chars1 + $chars2) as $i) {
            $charDiff += abs(($chars1[$i] ?? 0) / $len1 - ($chars2[$i] ?? 0) / $len2);
        }
        $charChange = $charDiff / 2;  // normalisation

        // comparison of words
        $words1 = str_word_count(mb_strtolower($str1), 1);
        $words2 = str_word_count(mb_strtolower($str2), 1);
        $wordCount1 = array_count_values($words1);
        $wordCount2 = array_count_values($words2);
        $wordDiff = 0;
        $allWords = array_unique(array_merge(array_keys($wordCount1), array_keys($wordCount2)));
        
        $count1 = count($words1);
        $count2 = count($words2);

        if ($count1 > 0 || $count2 > 0) {
            foreach ($allWords as $word) {
                $freq1 = $count1 > 0 ? ($wordCount1[$word] ?? 0) / $count1 : 0;
                $freq2 = $count2 > 0 ? ($wordCount2[$word] ?? 0) / $count2 : 0;
                $wordDiff += abs($freq1 - $freq2);
            }
            $wordChange = $wordDiff / 2;  // normalisation
        } else {
            // If no words are recognised, we only use the character comparison.
            $wordChange = $charChange;
        }

        // Weighted total change
        $overallChange = max(
            $lenChange,
            $repetitionFactor,
            ($charChange * 0.4 + $wordChange * 0.6)
        );

        return round(min($overallChange, 1.0) * 100, 2);
}

Example:

$str1 = "This is an example text for the comparison";    
$str2 = "xxxx xx xx xxxxxxx xxxx xxx xxx xxxxxxxxxx";    
echo "Percentage change (same position, replaced by x): " . TextComparison::stringCompare($str1, $str2) . "%\n";    

Result: Percentage change (same position, replaced by x) : 93.59%

face-smile
Lochkartenstanzer-avatar
Lochkartenstanzer 7 days ago
1 comment
Comment: Developer diary: rootdb is our new international IT forum
/offtopic: Using same account as in administrator.de works.
admtech-avatar
admtech 8 days ago
General1 comment
Developer diary: rootdb is our new international IT forum
Hello users,

The previously announced new international forum is now live:

back-to-toprootDB.com


The idea of a bilingual site on administrator.de with only one domain failed for us. Neither Google nor other search engines supported it. No matter what we tried, the English articles were usually not found by the search engines. We were always only seen as a German site.

Now we are launching this new international forum with a .com domain that fits the topic well: https://rootdb.com is our new home for establishing an international IT forum. Everything on rootDB will be in English only. The domain rootdb.com is easy to remember and consists of only a few characters. It can be entered quickly. In addition, similar to the term ‘administrator’, it represents the topic of the website.

All English content has been deleted from administrator.de and imported into rootDB. Existing users who have posted or commented in English or registered on the English site have been transferred and can log in as usual. A separate message will be sent to these users. We have done this to ensure that existing content is not lost. The forums are now completely separate. This applies to everything: database, notifications, newsletters, etc.

New users will need to register again.

I hope you like our decision and the new site and look forward to your feedback or a click on the heart.

Best regards,
Frank
emiratesdraw-avatar
emiratesdraw 11 days ago
emiratesdraw has registered
Focus: Development - User group: Sales.
mohammad.sabbah-avatar
mohammad.sabbah 11 days ago
mohammad.sabbah has registered
Focus: Networks - User group: Administrator.
lovequoteshub-avatar
lovequoteshub 15 days ago
lovequoteshub has registered
Focus: Apple/Mac/iOS - User group: Designer.
Jonson-avatar
Jonson 15 days ago
Jonson has registered
Focus: DevOps (Development and Operations) - User group: Consultant.
Ahmed317-avatar
Ahmed317 15 days ago
Ahmed317 has registered
Focus: Android/ChromeOS - User group: Database Administrator.
MorganWorthington-avatar
MorganWorthington 16 days ago
MorganWorthington has registered
Focus: Android/ChromeOS - User group: Application Specialist.
cytionlb123-avatar
cytionlb123 17 days ago
cytionlb123 has registered
Focus: Design/Media - User group: Application Specialist.
fergoshop-avatar
fergoshop 17 days ago
fergoshop has registered
Focus: Other systems - User group: Consultant.
rharteveld-avatar
rharteveld 19 days ago
rharteveld has registered
Focus: Business and System Integration - User group: Administrator.
fleekit75-avatar
fleekit75 19 days ago
fleekit75 has registered
Focus: Business and System Integration - User group: BI Analyst.
mehmetince-avatar
mehmetince 21 days ago
mehmetince has registered
Focus: IT Infrastructure Planning and Optimization - User group: Administrator.
txguy77-avatar
txguy77 21 days ago
txguy77 has registered
Focus: Security - User group: Consultant.
miniwin-avatar
miniwin 22 days ago
miniwin has registered
Focus: Windows in general - User group: Administrator.
martinelias-avatar
martinelias 25 days ago
martinelias has registered
Focus: Editing/Publication - User group: Marketing.
ellite-avatar
ellite 25 days ago
ellite has registered
Focus: Digital Transformation and Innovation - User group: Consultant.
101blockchains-avatar
101blockchains 29 days ago
101blockchains has registered
Focus: Blockchain/Cryptography - User group: Administrator.
rtu560-avatar
rtu560 31 days ago
rtu560 has registered
Focus: Windows server - User group: End-user.
heinz333-avatar
heinz333 33 days ago
heinz333 has registered
Focus: Linux/Unix in general - User group: End-user.
Farmer67-avatar
Farmer67 35 days ago
Farmer67 has registered
Focus: Apple/Mac/iOS - User group: Data Analyst.
FayeCh-avatar
FayeCh 36 days ago
FayeCh has registered
Focus: Business and System Integration - User group: Marketing.
Frisconet-avatar
Frisconet 37 days ago
Frisconet has registered
Focus: Windows desktop - User group: End-user.
CBODeutschland-avatar
CBODeutschland 39 days ago
CBODeutschland has registered
Focus: Other systems - User group: Database Administrator.
cholaturbo-avatar
cholaturbo 41 days ago
cholaturbo has registered
Focus: Apple/Mac/iOS - User group: Application Specialist.
20AllDigital-avatar
20AllDigital 43 days ago
20AllDigital has registered
Focus: Design/Media - User group: Web Designer.
AronFinch-avatar
AronFinch 44 days ago
AronFinch has registered
Focus: Business and System Integration - User group: Marketing.
muhammadali3908-avatar
muhammadali3908 45 days ago
muhammadali3908 has registered
Focus: Apple/Mac/iOS - User group: Administrator.
gecome-avatar
gecome 46 days ago
gecome has registered
Focus: Other systems - User group: Manager.
Standardroofingtx-avatar
Standardroofingtx 47 days ago
Standardroofingtx has registered
Focus: Development - User group: Developer.
JimmyJoyner-avatar
JimmyJoyner 47 days ago
JimmyJoyner has registered
Focus: Android/ChromeOS - User group: Application Specialist.
42loops-avatar
42loops 47 days ago
42loops has registered
Focus: Development AI - User group: Developer.
BavarianLion-avatar
BavarianLion 49 days ago
BavarianLion has registered
Focus: Networks - User group: Administrator.
triethylcitrateoil-avatar
triethylcitrateoil 52 days ago
triethylcitrateoil has registered
Focus: Android/ChromeOS - User group: Administrator.
escapegames-avatar
escapegames 53 days ago
escapegames has registered
Focus: Networks - User group: Trainer.
Tanzeel-avatar
Tanzeel 56 days ago
Tanzeel has registered
Focus: Digital Transformation and Innovation - User group: Marketing.
NatturaaruttaN-avatar
NatturaaruttaN 61 days ago
NatturaaruttaN has registered
Focus: Other systems - User group: Administrator.
nimbus-avatar
nimbus 62 days ago
nimbus has registered
Focus: Development - User group: Developer.
bi0sec-avatar
bi0sec 62 days ago
bi0sec has registered
Focus: Security - User group: Administrator.
Applebacklink-avatar
Applebacklink 64 days ago
Applebacklink has registered
Focus: Apple/Mac/iOS - User group: Project Manager.
mindfullyfitwell-avatar
mindfullyfitwell 65 days ago
mindfullyfitwell has registered
Focus: Business and System Integration - User group: Manager.
Dani-avatar
Dani 66 days ago
Information1 comment
App-V is no longer being deprecated
In Hamburg on the M.A.D. Day (Modern Application Deployment) we could announce that App-V is no longer being deprecated – The Client and the Sequencer. But the Server will still go away.

With this Post I would like to clarify a few things which also was brought up by Tim Mangan in his Analysis of the M.A.D. Day 2024 and specific this announcement.

Read more here


Regards,
Dani
gutachter24-avatar
gutachter24 66 days ago
gutachter24 has registered
Focus: Security - User group: Security Expert.
customgptaiq-avatar
customgptaiq 66 days ago
customgptaiq has registered
Focus: Development AI - User group: Developer.
karibianhome-avatar
karibianhome 66 days ago
karibianhome has registered
Focus: E-Commerce and Online Marketing - User group: Marketing.