javascript – Compare 2 iOS and Android versions

Please check and let me know which version is better?
I'm just trying to find warnings or better ways to achieve an independent version comparison of Android and iOS.

Accepted formats: formats & # 39; 1.0.0 & # 39; or & # 39; 1 & # 39; and an operator, for example: compareVersion (& # 39 ;, & # 39; 1.2.0 & # 39 ;, & # 39;> & # 39;)

Export function compareVersion (version 1, version 2, operator) {
const formattedV1 = version1.split (".");
const formattedV2 = version2.split (".");

leave diff = 0;

if (formattedV1.length! == formattedV2.length) {
const lengthDiff = formattedV1.length - formattedV2.length;
for (let index = 0; index < Math.abs(lengthDiff); index += 1) {
                if (lengthDiff > 0) {
formattedV2.push ("0");
} else {
formattedV1.push ("0");
}
}
}

for (leave index = 0; index <formattedV1.length; index + = 1) {
yes (dif === 0) {
const v1 = parseInt (formattedV1[index]);
const v2 = parseInt (formattedV2[index]);
if (isNaN (v1) || isNaN (v2)) {
throw a new error ("Problem when comparing versions: it is not a valid number");
}
yes (v1) < v2) {
                    diff = -1;
                }
                if (v1 > v2) {
diff = 1;
}
}
}

switch (operator) {
case "=":
case "==":
return diff === 0;
case "> =":
return dif> = 0;
case "<=":
return dif <= 0;
        case ">":
return diff> 0;
case "<":
return dif <0;

default:
throw new error ("Problem comparing versions");
}
}

OR

export function compareVersions (a, b, operator) {
const aParts = a.split (& # 39;. & # 39;);
const bParts = b.split (& # 39;. & # 39;);

couple const = [];

for (let index = 0; index < Math.max(aParts.length, bParts.length); index += 1) {
    pairs.push({
      a: parseInt(aParts[index]),
      b: parseInt(bParts[index]),
    });
  }

  let diff = 0;

  pairs.forEach((pair) => {
yes (dif === 0) {
if (pair.a> pair.b) {
diff = 1;
}
if (pair.b> pair.a) {
diff = -1;
}
yes (! isNaN (pair.a) && isNaN (pair.b)) {
diff = 1;
}
if (isNaN (pair.a) &&! isNaN (pair.b)) {
diff = -1;
}
}
});

switch (operator) {
case & # 39; = & # 39 ;:
case & # 39; == & # 39 ;:
return diff === 0;
case & # 39;> = & # 39 ;:
return dif> = 0;
case & # 39; <= & # 39 ;:
return dif <= 0;
    case '>& # 39;
return diff> 0;
case & # 39; <& # 39 ;:
return dif <0;

default:
launch new error (& # 39; Problem comparing versions & # 39;);
}
}

Android Versions – S / W Update Screwed up SGN8

This morning I installed sw update N950USQU5DSC1

Now the Always On Clock application is gone and I could not find it. This application works as a screen saver when the phone is turned off, and had settings like the hours you want it to be active.

Whoever manages these updates does not seem to care how they ruin people's phones. A few months ago, an update removed my siren's ringtone and, as a result, I could not hear my alarm company's call. As a result, the sheriff was sent to my residence.

At this point I do not know what else they committed.

Google Sheets: selection of the row with the best value for articles with several versions / updates

I'm sure my problem is quite simple to solve, but I've been doing it for a while and I might need help.

I have a large table, but the problem comes down to this: some elements have 2 versions (one normal and one improved), and I would like to be able to show only the best version of an element (updated if it exists, the normal version otherwise).

Example of table:

Name | Value | Kind
Tool A | 50 | Tool A
Tool A [U] | 75 | Tool A
Tool B | 100 | Tool B
Tool C | 200 | Tool C
Tool B [U] | 150 | Tool B

And I would like to get

Name | Value | Kind
Tool A [U] | 75 | Tool A
Tool C | 200 | Tool C
Tool B [U] | 150 | Tool B

Note: there can only be one update, and the base version of the "tool" always exists if that helps.

I can easily select the best value for tool A, B or C, but selecting the name (and other properties) is the problem.

I tried something like SELECT A, MAX (B), C GROUP BY C, but it is returning errors.

javascript – Loading two versions of the same JS library

You are currently migrating from a previous version of a JS library (sweetAlerts) to a newer version.

Both versions are loaded, but I want to be able to use the updated library, but I'm not sure how to reference in JavaScript to use the newest library. Any input on how to do this would be appreciated.

wp_enqueue_script (& # 39; sweet-alert & # 39 ;, plugin_dir_url (__FILE__). & js / sweetalert.min.js & # 39 ;, array (), $ this-> version, false);
wp_enqueue_script (& # 39; sweet-alert-latest & # 39 ;, plugin_dir_url (__FILE__). & # 39; js / sweetalert-latest.min.js & # 39 ;, array (), $ this-> version, false);

2013 – Unlike what is mentioned in many articles, the use of SystemUpdate () allows our corporate wiki pages without creating new versions

I'm working on a collection of corporate wiki sites within sharepoint in 2013 facilities, and I want to update a field called "Page number", without affecting the modified version number and modifedby, so I wrote this powershell script and executed it within a test wiki site: –

$ site = get-SPWeb http: // ** / site / customerwiki /
# specify the name of the list
$ list = $ site.Lists["Customer KB"] 
$ listitems = $ list.Items

foreach ($ listitem in $ listitems)
{
write-host $ listitem["ID"] "processed"
$ listitem["PageNumber"] = $ listitem["Initial"]+ $ listitem["ID"];
$ listitem.SystemUpdate ()
write-host $ listitem["Name"] "It has been updated."

} 

where the pages of the wiki were updated without creating a new version or updating the date of modification or modification … now I ask this question, since I found many articles that mentioned the demand Upgrade system() will create new versions like this link: – How to update the items in the SharePoint list without creating new versions

So, can anyone advise on this?

apt – Maybe I have 2 versions of Firefox, and I want to get rid of one of them

It is possible that this happened due to the recent update of Firefox (from 64. to 66.0.2) that stated that I could not download the update by itself, so I was asked to do it manually.

I will save the details about the things I did and tried, but the current state of things is this. apt remove firefox affirms that there is nothing to eliminate, because the package Firefox it is not installed The last installation of Firefox that I made was through click.

The problem manifests itself in the way that the same Firefox shortcut (the main menu), or also the Firefox command executed from the terminal, sometimes running the wrong Firefox / other I can distinguish them because they have different plugins installed and I am registered in one of them. Basically different user settings. And it's not that it just sometimes does not read my user settings and gives me a default Firefox; Both versions have been customized.

Both report being 66.0.2 of 64 bits.

The first time I noticed this, I simply removed the click one, but then the Firefox The command no longer worked, and neither did the direct access of the main menu. So I do not know how I would run the other, or even if I actually have two installed, or only the installation sometimes reads two profiles.

How do I find out where these two different versions come from and how do I get rid of one of them?

Denomination of pipe with name, affected Windows versions

I want to know which versions of Windows are vulnerable to the impersonation attack of named pipes. And, are the techniques used in that attack for each version the same?

seo – Will a site be blacklisted if it offers different versions to Google page crawlers and normal users?

The question is really double:

Is it possible to trick a page speed analyzer by detecting the user's agent (~ Lighthouse | other page speed trackers) and offering a reduced and faster version of the website? If yes, will this be detected over time and will it remain on the blacklist?

Also, on the contrary, is it possible to provide additional data (json-ld) to the tracker that you do not want to load for a normal user?

What is the default backup frequency for File History / Previous Versions?

I can not find information in help documents, technology, google, or have access to a unit to configure the file history to verify from my PC.

Semantic versions: move from one main version to another?

How should versions be hit during development between two major versions?
For example, let's say I have a version 1.5.0 and my goal is to launch a new main version that will be incompatible with the main version 1.

As soon as you begin to develop and make changes, those changes will be incompatible backwards, so by following semantic version control, if you have already done so 2.0.0? But development is in progress and the code remains unstable.

Or I should hit like any other compatible feature -> 1.6.0, 1.6.1, 1.7.0 etc. and when the new main version is ready, simply 2.0.0?

In case of being suffix with something like 2.0.0-alpha and then restart 2.0.0, once stable? Or hit 1.5.0-alpha (although it does not look good).

PS Starting from scratch, it makes sense to start with 0.1.0, because there is still no main version, but when there is one, it becomes difficult … 🙂