automation – How can I automatically display the section link on my one-page Elementor website?

My website is using long one-page posts for each issue of our magazine and these are navigated through anchor links. I add the anchor links through Elementor. I want to be able to display the section link automatically so people can share that part of the page easily.

For example, here, the section link for the article on naps is https://theyellipages.in/#silent . How can I display this automatically so I don’t have to manually do it for each section since there are many in a page?

facebook – How to automatically search my entire site for any content embedded using oEmbed?

How can I carry out an automatic search of all pages/posts on my site for any content embedded using oEmbed (preferably Facebook/Instagram content)?

The reason I ask is because this WPBeginner post says that on October 24th, all Facebook or Instagram content embedded on a site using oEmbed will be deprecated, and such content will be (slightly) broken. I’d like to first determine how much oEmbed content I have on my site. My site is has a relatively large amount of pages/posts (content added by others), so manually searching each will be a bit tedious.

Would I perhaps need to carry out a database search? Or a text search through all the files?

FYI my site uses Classic Editor throughought–not Gutenberg.

Thanks.

mesh – MeshRegion automatically merges vertices that are nearby in space

I sometimes work with surface meshes that have self-intersections (immersions rather than embeddings). MeshRegion usually doesn’t have any problems dealing with these kinds of surfaces, unless there are distinct vertices that have the same position in space. During the construction of a MeshRegion these vertices are automatically merged together (the problem remains if I import such a mesh), and this obviously messes with the combinatorics of the surface. Is there a way to disable this undesired “feature”?

Here is an example illustrating this problem:

n = 31;
uvs = Flatten(Table({i, j}/(n - 1), {i, 0, n - 1}, {j, 0, n - 1}), 1);

immersion({u_, v_}) := {Cos(2 (Pi) u), Sin(2 (Pi) u), v/4};
cylinderpts = immersion /@ uvs;

foldoverimmersion({u_, v_}) := {Cos(1/4 (Pi) (1 + 6 u))/(
   1 + Sin(1/4 (Pi) (1 + 6 u))^2), (
   Cos(1/4 (Pi) (1 + 6 u)) Sin(1/4 (Pi) (1 + 6 u)))/(
   1 + Sin(1/4 (Pi) (1 + 6 u))^2), v/4};
foldoverpts = foldoverimmersion /@ uvs;

idx({i_, j_}) := n (i - 1) + j;
faces = Map(idx, 
   Flatten(Table({{{i, j}, {i + 1, j}, {i, j + 1}}, {{i + 1, 
        j}, {i + 1, j + 1}, {i, j + 1}}}, {i, 1, n - 1}, {j, 1, 
      n - 1}), 2), {2});
meshfaces = Polygon /@ faces;

parameterM = MeshRegion(uvs, meshfaces)
cylinderM = MeshRegion(cylinderpts, meshfaces)
foldoverM = MeshRegion(foldoverpts, meshfaces)

MeshRegion automatically merges nearby vertices

The meshes parameterM, cylinderM, and foldoverM are constructed using the same list of faces, but running MeshCellCount yields

{961, 2760, 1800}
{930, 2730, 1800}
{930, 2730, 1800}

It might seem reasonable that the nearby vertices should be merged for the cylinder. On the other hand, the example where I extruded part of a lemniscate (foldoverM) the vertices are only merged if the grid width is divisible by 6 (since the parameterization I use has self intersections at u=1/6 and u=5/6).

blockchain – How to automatically get transaction while sending BTC?

Here is my SendBTC method. I do not want to pass fundingTransaction variable each time I call this method. Currently, I pass fundingTransaction value by looking up to https://testnet.smartbit.com.au/. I want to get this funding transaction in this method only. How can I do this?

public static bool SendBTC(string secret, string toAddress, decimal amount, string fundingTransaction)
    {
        Network bitcoinNetwork = Network.TestNet;
        var bitcoinPrivateKey = new BitcoinSecret(secret, bitcoinNetwork);
        var address = bitcoinPrivateKey.GetAddress(ScriptPubKeyType.Legacy);

        var client = new QBitNinjaClient(bitcoinNetwork);
        var transactionId = uint256.Parse(fundingTransaction);
        var transactionResponse = client.GetTransaction(transactionId).Result;

        var receivedCoins = transactionResponse.ReceivedCoins;

        OutPoint outPointToSpend = null;
        foreach (var coin in receivedCoins)
        {
            if (coin.TxOut.ScriptPubKey == bitcoinPrivateKey.GetAddress(ScriptPubKeyType.Legacy).ScriptPubKey)
            {
                outPointToSpend = coin.Outpoint;
            }
        }

        var transaction = Transaction.Create(bitcoinNetwork);
        transaction.Inputs.Add(new TxIn()
        {
            PrevOut = outPointToSpend
        });

        var receiverAddress = BitcoinAddress.Create(toAddress, bitcoinNetwork);


        var txOutAmount = new Money(amount, MoneyUnit.BTC);

        var minerFee = new Money(0.0005m, MoneyUnit.BTC);

        var txInAmount = (Money)receivedCoins((int)outPointToSpend.N).Amount;
        var changeAmount = txInAmount - txOutAmount - minerFee;

        transaction.Outputs.Add(txOutAmount, receiverAddress.ScriptPubKey);
        transaction.Outputs.Add(changeAmount, bitcoinPrivateKey.GetAddress(ScriptPubKeyType.Legacy).ScriptPubKey);


        transaction.Inputs(0).ScriptSig = address.ScriptPubKey;

        transaction.Sign(bitcoinPrivateKey, receivedCoins.ToArray());

        BroadcastResponse broadcastResponse = client.Broadcast(transaction).Result;

        return broadcastResponse.Success;
    }

dual boot – Ubuntu deleting files on NTFS Partition automatically

I was cloning a repo but as shown as soon as it got cloned and i entered to open it in my ubuntu(20.04) it dissappeared, it has happened before once but i didn’t care as file was not important it only seems happens when i am cloning (yes only cloned repositories and couple of .mp4 got corrupted don’t know if videos are related to this) into my ntfs hdd which i share with windows (dual- boot) so i tried looking for it and i found my old folder that dissappeared in .trash-1000. but no sign of folder that got deleted today. Does it have something to do with partition being ntfs?
found more video file it has been deleting in found.000.

Why not make HDR from a single RAW automatically?

Most HDR tools will allow you to import a single RAW file and work on it without first converting it to several JPEGs. Just as when you import a series of JPEGS, the initial blend will look a little flat if the dynamic range in the original frame is compressed into a depth of 8 bits.

Here is a set of examples of a RAW file shot at ISO 400, 1/320 sec, f/11 and processed using Canon’s Digital Photo Professional (DPP).

The shot straight out of camera and converted using the in-camera settings.
enter image description here

The same shot after conventional adjustment of Brightness, Contrast, Saturation, WB, etc. Notice that to display the details in the shadows we had to give up some detail in the brighter sky.
enter image description here

Immediately after importing into the HDR tool in DPP and then converted to JPEG. Some (but not all) of the adjustments made in the previous step are retained (White Balance/Color Temperature, for example), but the HDR tool compresses the full dynamic range of the image into 8 bits which causes the image to look a little flat.
enter image description here

After adjusting the sliders in the HDR Tool to tone map the image. This allows the subtle differences between some tonal ranges to be exaggerated, While still allowing the details from both the shadows and highlights to be visible.
enter image description here

How to update the license of Visual studio automatically?

When we manually open the visiual studio and from help menu and click on register, then the license is getting updated.But, we are using visual studio for automation with CI tools like jenkins.Where, we will use the devenv command line tool.Here, we don’ launch the shortcut.This command line version is not updating the license automatically. So, every 10 days our compilation is failing and we need to manually open visual studio and refresh the license.

We are getting this error with compilation.

Microsoft Visual Studio 2017 Version 15.0.28307.145.
Copyright (C) Microsoft Corp. All rights reserved.

The license for Visual Studio has expired.

Your license for this product is expired and could not be refreshed. Please connect to the internet to continue to use this product.

How to load TermDebug vim plugin automatically?

I’m using Termdebug plugin to use gdb right inside vim to debug program.

The thing is the sequence to launch gdb from vim involves the following steps

  • :packadd termdebug
  • :Termdebug <executable-file>

I don’t want to always execute the first command every time. I’m not sure this is recommended (performance-wise?) to do it as most instructions online seem not to suggest or have instruction to load this automatically at all.

I might get away with this via setting runtimepath in ~/.vimrc but I didn’t find any source or location of termdebug on the system.

Ok, the question is

How to load TermDebug plugin automatically right after I start editing the file?

terminal – How to automatically change iTerms tab title to that of currently open file?

My goal is that when I open a file in the Terminal (regardless of editor, FWIW I use Micro) to automatically show the filename in the tab title and when I exit/quit the editor revert the tab title back to what is was. How do I acheieve this?

Note: I am aware this easy enough with Neovim but thats not what I use, I almost exclusively use Micro editor and rarely Nano.

macos – When are temp files in /var/folders automatically deleted?

  1. How often and under what conditions are files under /var/folders/ removed?

  2. Where can I find any official documentation or notes on this? I’ve searched but haven’t even found a mention of it.

  3. If an application creates a file under /var/folders/, is it possible for that file to be removed by the system before the application quits?’

  4. Bonus question: Why isn’t this information easier/possible to find? Is this a gap in Apple’s documentation, or an intentional omission?


Here’s a related question, but it’s 10 years old and refers to /tmp and not var/folders: In macOS, how often is /tmp deleted?

Here’s almost the same question from 51 weeks ago with 0 answers: In OSX when are /var/folders deleted