replacement – Substituting factors for letters in expression

I have several large expressions that I’d like to substitute some factors for letter for the sake of simplicity. For example, I have this expression:

$$
frac{C_3 C_5 (C_1+C_4)-C_1 C_6 (C_2+C_5)}{2 C_4 sqrt{(C_1 C_6-C_3 C_4) (C_3 C_5-C_2 C_6)}}
$$

I would like to substitute the factor $(C_1C_6-C_3C_4)$ for $kappa_1$ and $(C_3C_5-C_2C_6)$ for $kappa_2$. What commands can I use to do this? I’ve tried using

expression /. {Subscript(C,1)*Subscript(C,6)-Subscript(C,3)*Subscript(C,4)-> Subscript((Kappa),1)}

for example, but it didn’t work. Thanks in advance.

combinatorics – Find the total no. of strings ( len n ) possible given a set of sets of letters such that no two letter from a single set should be in that string

This was an algorithm problem but I am having problems in formulating it.

I have a certain approach but I do not know how to fully execute:

Given

  • 26 letters in total
  • All possible strings of length n

Example

Find all possible strings of length 5 such that given ({a, b, c}, {d, g, h}), no two letters from each set can occur in that string:

  • ‘a’ and ‘d’ can occur any number of times in the string, as well as ‘a’ and ‘g’.
  • no single instance of ‘a’ and ‘b’ occurring or ‘b’ and ‘c’ or ‘a’, ‘b’ and ‘c’ ( basically any pair )
  • No non trivial sets such as ({a, b, c}, {d, g, h}, {c, l, f}) because that can be written as ({a, b, c, l, f}, {d, g, h})

My naive approach

  • Find all possible strings of length n consisting of characters other than the ones mentioned in the set of sets.
  • Take a single set:
    • Take 1 character from a set.
      • Find the characters that are valid with this character and count the possible strings of length n.

But this does not take care of repetitions I think. So is there some other way or do I need to refine more?

google sheets – Formula to count the number of different letters in a word

In sheets, suppose cell A1 contains the word CABBAGE.

I want to put a formula into, say, cell B1 that will count the number of different letters. So the output should be 5, because there are 5 different letters in CABBAGE.

I have a formula that will do this, however it is cumbersome and I bet there is a way to do it more concisely.

The formula that works is:

=if(isnumber(search(“A”,A1)),1,0) + if(isnumber(search(“B”,A1)),1,0) + … + if(isnumber(search(“Z”,A1)),1,0)

The formula adds 1 each time a letter is present in the word. I’m just not sure of the best way to consolidate the 26 terms into something more manageable.

power automate – Why are field names from a Microsoft Form randomised letters and numbers when retrieving via the Microsoft Forms ‘Get Response Details’ connector?

A Microsoft Form has 4 fields of type:

  • Text
  • File Upload
  • File Upload
  • Choice

The connectors used are:

When I look at the Raw Outputs of this last step in Power Automate, the body returned by Get response details is:

"body": {
    "responder": "me@domain.com",
    "submitDate": "7/5/2021 3:17:56 AM",
    "lots-of-letters-and-numbers-1":  "text string here",
    "lots-of-letters-and-numbers-2":  [{.....}],
    "lots-of-letters-and-numbers-3":  [{.....}],
    "lots-of-letters-and-numbers-4":  "text string here"
}

This makes referencing the specific fields later in the flow difficult because they are represented by some sort of code, rather than the actual field names.

Why are field names from a Microsoft Form randomised letters and numbers when retrieving via the Microsoft Forms ‘Get Response Details’ connector?

And how can I get it to output the actual field names?

permalinks – How to prevent wordpress from lowering Capitalized letters

I have the same issue as discussed here – https://stackoverflow.com/questions/4384768/how-can-i-make-capital-letter-upper-case-permalinks/4386225

I made changes to formatting.php like said above. But it allows to save the permalink/slug only at the very begining of the creation of the page/post. When I update the page (or try to change the slug) WP lowers the Capitalized slugs. I need to have the ability to save/change/update with Uppercase letters. It seems there is a JS – onblur code, which lowers the letters.
Any help appreciated.

enter image description here

I use Microsoft Ergonomic keyboard with my Mac mini . It drops selected letters – capital W, U, P. – swapped keyboards – same problem lease advise

I use Microsoft Ergonomic keyboard with my Mac mini . It drops selected letters – capital W, U, P. – swapped keyboards – same problem lease advise – Ask Different

parsers – How would you specify a grammar that can parse letters separated by single underscores?

In JavaScript, let’s say, it is easy to build a string intermixed with single underscores by just joining the string parts.

let string = ('foo', 'bar', 'baz').join('_')

In addition, it is straightforward to write a grammar that can have letters separated by at least one underscore.

grammar = letter letterOrUnderscore*
letter = a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z
underscore = _
letterOrUnderscore = underscore|letter

That will match the input string:

foo_bar_baz

However, it will also match these unwanted strings:

a____
ab__c
abc__d___

Basically, it will match sequences of underscores, when what we want is only one underscore between each sequence of letters, and we shouldn’t have trailing underscores. So only these are acceptable, for example:

a
ab_c
abc_d

The question is, how do you define a grammar to only allow 1 underscore between each sequence of letters? I can’t figure out how to write any sort of custom “grammar DSL” that can, in a straightforward way, handle this situation… I’m stumped currently how to do this.

grammar = letter then
  if previous == letter
    next = letter | underscore
  else
    next = letter

So it seems to need to access to the previous state, is there no other way to define this? Besides not being very “DSL-like”, it’s also significantly harder to handle this sort of situation.

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheapest USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Proxyti.com Buy Quality Private Proxies