## QUERY function with sort

I need to get data from tab 1 to tab 2, but not empty cells. I think the QUERY function should work, but it can not get it to work. I have created a test sheet, which you can check under the following link: Test

## quicksort – What is the worst case for the C ++ "sort" function?

What's the worst case for the C ++ "sort" function, when does it go to O (n ^ 2) time? I know it's QuickSort, so in most cases it's very fast, but in special cases it reaches O (n ^ 2). I've tried to figure it out through measurements, but I'm having trouble interpreting the results.

## Recheck function failed (re-test)

It's been a while, but I wondered if this could be implemented easily.
Just one option to recheck the Failed Recheck list in this list popup.
Some time ago I planned to create a batch file with which I can do something. Can not remember exactly what …
The verified list may have been saved BEFORE the re-verification links were manually executed, so I could see after the re-verification which were removed and put them back in "verified" just before the next manual verification, to retry them to check ?
I think I've done this mnaually, but it has lost the other data fields …
Search for GSA contributions; I know that I mentioned it here.

## Number Theory – The Möbius function as eigenvalues

Let the square matrix $$A$$ be defined by the tetration:

$$Large text {If} gcd (n, k) = 1 text {then} A (n, k) = underbrace {e ^ {e ^ { cdot ^ { cdot ^ {e ^ { 1 / n ^ s}}}}} _m text {else} A (n, k) = 0$$

This is a matrix starting with:

$$A = left ( begin {array} {cccccccc} e ^ {e ^ {e ^ e}} & e ^ {e ^ {e ^ e}} & e ^ {e ^ {e ^ e}} & e ^ {e ^ {e ^ e}} & e ^ {e ^ {e ^ e}} & e ^ {e ^ {e ^ e}} & e ^ {e ^ {e ^ e}} & dots \ e ^ {e ^ {e ^ {e ^ {2 ^ {- s}}}} & 0 & e ^ {e ^ {e ^ {e ^ {2 ^ {- s}}}} & 0 & e ^ {e ^ {e ^ {e ^ {2 ^ {- s}}}} & 0 & e ^ {e ^ {e ^ {e ^ {2 ^ {- s}}}} \ e ^ {e ^ {e ^ {e ^ {3 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ {3 ^ {- s}}}} & 0 & e ^ {e ^ {e ^ {e ^ {3 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ {3 ^ {- s}}}} & 0 & e ^ {e ^ {e ^ {e ^ {3 ^ {- s}}}} \ e ^ {e ^ {e ^ {e ^ {4 ^ {- s}}}} & 0 & e ^ {e ^ {e ^ {e ^ {4 ^ {- s}}}} & 0 & e ^ {e ^ {e ^ {e ^ {4 ^ {- s}}}} & 0 & e ^ {e ^ {e ^ {e ^ {4 ^ {- s}}}} \ e ^ {e ^ {e ^ {e ^ {5 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ {5 ^ {- s}}}} & e ^ {e ^ { e ^ {e ^ {5 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ {5 ^ {- s}}} & 0 & e ^ {e ^ {e ^ {e ^ {5 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ {5 ^ {- s}}}} \ e ^ {e ^ {e ^ {e ^ {6 ^ {- s}}}} & 0 & 0 & 0 & e ^ {e ^ {e ^ {e ^ {6 ^ {- s}}}} 0 & e ^ {e ^ {e ^ {e ^ {6 ^ {- s}}}} \ e ^ {e ^ {e ^ {e ^ {7 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ {7 ^ {- s}}}} & e ^ {e ^ { e ^ {e ^ {7 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ {7 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ { 7 ^ {- s}}}} & e ^ {e ^ {e ^ {e ^ {7 ^ {- s}}}} & 0 \ vdots & & & & & dpts end {array} right)$$

To let $$a (n)$$ be the consequence of eigenvalues the matrix $$A$$,

Show that $$m$$ Pieces of natural logarithms of eigenvalues $$a (n)$$:

$$sgn (a) underbrace { log ( log (… log (} _ m | a (n) |)) = frac { mu (n)} {n ^ s$$

converge to the Möbius function divided by $$n ^ s$$,

Mathematica program to demonstrate this truth:

``````(*start*)
Clear(A, s, mm, nn, i);
s = 1;
mm = 7;
Do(A = Table(
Table(If(GCD(n, k) == 1, Exp(Exp(Exp(Exp(1/n^s)))), 0), {k, 1,
nn}), {n, 1, nn});
a = Eigenvalues(A);
Print(b =
N(Table(Sign(a((i))) If(a((i)) == 0, 0,
Log(Log(Log(Log(Abs(a((i)))))))), {i, 1, nn}), 6)), {nn, 1, mm})
MatrixForm(A)
Total(b) - Sum(MoebiusMu(n)/n^s, {n, 1, Length(b)})
(*end*)
``````

{1.00000, -0.500000, -0.333333, -0.200000,0.166667, -0.142857.0}

This question has remained unanswered for several years in a previous question about the mathematics stack

## c ++ function that creates pointers to classes

I'm trying to create a function that creates pointers to instances of a Player class.

That's because I want to create as many player instances as I want at the beginning of my game.

This is intended to make the game a 2-player, 4-player or 3-player game and theoretically an infinite number of players determined by the user's input.

The problem I face is that when I use my function, I create pointers as follows:

to edit: player is a custom class that I made.

``````void createPointer()
{
player * player1 = new player("George");
}
``````
1. The pointer is only declared locally, which results in a memory leak, because I can not reference the pointer player1 because it is deleted when the createPointer () function completes.
2. As shown above, I could not refer the players correctly because they all have the name player1. I think I should use templates in c ++ to change the name of the variable every time a player is created.
3. As shown below, I could not delete the player instance at the end of the game:
``````void endGame()
{
//delete the object the pointer
//is pointing to in memory
delete player1;
//set the pointer to point to NULL
//as default, so can check if pointer is pointing
//to anything
player1 = NULL;
}
``````

So I just wondered if I could choose a different approach? I know a solution that is to globally declare the pointers first. i.e.

``````player * player1 = NULL;
player * player2 = NULL;
player * player3 = NULL;
void createPointer()
{
player1 = new player("George");
}
``````

However, this would mean that I can not create a variable number of players without first declaring them all, as shown in the above example.

Sorry, if I misunderstand something, I would be very happy about any advice.

## How does the "Query routes" function in Lightning's LND calculate the route charges?

I'm testing my own routing implementation, and for some strange reason a handful of channels reject my money order `InsufficientFee`,

The scenario is `A -c1-> B -c2-> C` where Node `A` sends a payment `C` above `B` The used channels are referred to as `c1` and `c2`,

To the `c1` The fee rules for nodes are

``````    "node1_policy": {
"time_lock_delta": 40,
"min_htlc": "1",
"fee_base_msat": "1000",
"fee_rate_milli_msat": "1",
"max_htlc_msat": "16777215000",
},
"node2_policy": {
"time_lock_delta": 144,
"min_htlc": "1000",
"fee_base_msat": "1000",
"fee_rate_milli_msat": "100",
"max_htlc_msat": "16777215000",
},
``````

To the `c2` The fee rules for nodes are

``````    "node1_policy": null,
"node2_policy": {
"time_lock_delta": 144,
"min_htlc": "1000",
"fee_base_msat": "10000",
"fee_rate_milli_msat": "100",
"max_htlc_msat": "10000000000",

}
``````

For an amount of 4999999 mSat `queryroutes` uses this route and calculates the charges as

``````{'amt_to_forward': '4999',
'amt_to_forward_msat': '4999000',
'chan_capacity': '16777215',
'chan_id': 'c1',
'fee': '10',
'fee_msat': '10499',},
{'amt_to_forward': '4999',
'amt_to_forward_msat': '4999000',
'chan_capacity': '10000000',
'chan_id': 'c2',
'fee': '0',
'fee_msat': '0',}
'total_amt': '5009',
'total_amt_msat': '5009499',
'total_fees': '10',
'total_fees_msat': '10499',}
``````

Could someone please explain to me step by step how to do that `lnd` Client gets this value?

## pandas – Problems running a function of Python Multiprocessing, which returns multiple data frames (and keeps them formatted as data frames).

Below is a brief example of the code I want to execute. I can execute the code, but my distributed function returns m1, m2, m3, m4 as a tuple instead of big data frames (df1, df2 …) This is not unexpected, but an attempt is made to change the code to return the results because dfs has created code that will not execute.

I do not mind However, if df1 concatenates with other df1 data frames, you are thinking about how to do it efficiently and output the results as a data frame. Thanks.

``````import multiprocessing as mp
import pandas as pd

a=some range
b=some range
c=some range

def function(dict1,dict2,paramlist):
**Do stuff*
return df1,df2,df3,df4

paramlist = ((x,y,z) for x in a for y in b for z in c for r in e)

if __name__ ==  '__main__':

num_processors = 3
p=mp.Pool(processes = num_processors)
m1,m2,m3,m4 = zip(*p.starmap(functools.partial(function,dict1,dict2),paramlist))
``````

## php – function that returns an array with the column name of each record

This is part of the code I created, unless I know how to finish it because all the attempts I made went awry.

``````'contents' => categorias_nomes('1,2,3,4')

function categorias_nomes(\$content) {
\$data_2 = array();
\$string = \$content;
\$array = array_map('intval', explode(',', \$string));
\$array = implode("','",\$array);

\$query_2 = mysqli_query(\$mysqli, "SELECT * FROM catalog_categories WHERE id IN ('".\$array."'));
while(\$row_2 = mysqli_fetch_array(\$query_2)){

``````

I need the function to return the column Surname each record within an array.

## Key Generation – How do I program a function to generate a secure encryption key for block ciphers?

I am currently studying the most popular encryption algorithms and methods. For practical reasons, I am currently pursuing a project in which I simply implement everything from ECB to RSA as a kind of C crypto library.
I wanted to ask how I would generate a more or less secure key in a C program (I know that writing a crypto library alone is not at all secure, but I just want to learn the basic principles from key generation to key exchange encryption mechanisms).
How could I approach the problem of implementing a secure key generation algorithm? Which main problems need to be considered in order to achieve at least mediocre key security?

## jenkins – How can you define the get_job_info function?

When I viewed the Jenkins Python API (https://python-jenkins.readthedocs.io/en/latest/api.html#jenkins.Jenkins.get_job_info) I found this function, which is a dictionary with all the builds of a jenkins Returns jobs or at least the last 100.

I would like to insert this function into a Python script, but I do not know how to define it, nor do I use it. Who can help me would be helpful. I do not even know how to define it.

Thank you very much