rdp – mremoteng Key Combinations not working anymore?

Hi Server Fault community!

I’m looking for those of you using mRemoteNG to manage their servers as I believe the answer should be amongst you. Suddenly for no apparent reason, mRemoteNG stopped sending Key Combinations to all of my remote hosts. No Win nor CTRL + ALT + DEL nor ATL + TAB, nothing…

I’m running the last stable version (1.76.20) and yes, I have set “Key Combinations” to “YES” so I’m 100% sure that it’s not that setting who is causing this.

enter image description here

Things I tried

  • Changing the setting “Key Combinations” back and forth
  • Uninstalling / Re-installing mRemoteNG
  • Looking for solutions online (no one reported this one yet)

My gut feel is that

  • Either the newest release introduced problems with this, but I’m not that confident this could be the problem as it is unreported yet (or my Googling skills suck…)
  • Some software instlled on my computer is capuring the key strokes, but again… what I see on my system doesn’t support that theory as I have installed a HotKey logger (called Hot Key Commander) and it reports that all the system key combinations are assinged to the Operating System (… and not any 3rd party app).

After a few hours spent on this issue that is really bugging me because I keep pressing key combinations expecting the remote host to do something and they are trapped by the local host, I give up. My last hope is this community!

Let me know if you need any logs or any additional information to test/try to reproduce this.

Thanks!

wp query – Multiple WP_Query args combinations according to post type

I’d like to have separate meta_query arguments according to the post type.

For example, I’d like to query t-shirts that have a green collar or dress-shirts that have a green inner-lining, right now I only do a single post type check where I check for t-shirts and dress-shirts and I separately check for the meta values which mean that it will also show different combinations such as t-shirts that have a green inner-lining

$query = new WP_Query(array(
    'post_type' => array('t-shirts', 'dress-shirts'),
    'meta_query' => array(
      'relation' => 'OR',
      array(
        'key' => 'collar',
        'value' => 'green',
      ),
      array(
        'key' => 'inner-lining',
        'value' => 'green',
      )
    ),
));

How can I set it up to work with two different args, one if the post type is t-shirts and a seperate args if the post type is dress-shirts which would look something like:

$query = new WP_Query(
  array(
    array(
      'post_type' => array('t-shirts'),
      'meta_query' => array(
        array(
          'key' => 'heal',
          'value' => 'green',
        )
      ),
    ),
    array(
      'post_type' => array('dress-shirts'),
      'meta_query' => array(
        array(
          'key' => 'sleeve',
          'value' => 'green',
        )
      ),
    ),
  )
);

Doing two separate queries won’t work as it will mess up pagination.

fa.functional analysis – Closed convex hull in infinite dimensions vs. continuous convex combinations

No. Even in one dimension. Say $K$ is the open interval $(0,1)$. Show $0 notin K^*$. Let $mu$ be a probability measure with support contained in $(0,1)$. Indeed,
$$
r(mu) := int_K x,dmu(x)
$$

is the integral of a positive function. That is, $x > 0$ a.e. So $int_K x,dmu(x) > 0$. Similarly $1 notin K^*$.

In a Banach space $E$, if there is any extreme point of $M = overline{text{conv} K}$ that does not already belong to $K$, then it also does not belong to $K^*$. So what if $K$ is the set $text{ex}; M$ of extreme points of $M$? Can we recover $M$ as $K^*$?

A very nice little book that discusses this situation is

Phelps, Robert R., Lectures on Choquet’s theorem, Lecture Notes in Mathematics. 1757. Berlin: Springer. 124 p. (2001). ZBL0997.46005.

Choquet’s theorem tells us that every point of a compact convex set $M$ is of the form $r(mu)$ for some probability measure concentrated on the set $text{ex}; M$ of extreme points of $M$.


Plug
My first publication to attract any notice was this one, where there is a generalization of Choquet’s theorem to certain closed bounded noncompact sets $M$.

Edgar, G. A., A noncompact Choquet theorem, Proc. Am. Math. Soc. 49, 354-358 (1975). ZBL0273.46012.

Combinations of towers

You have 25 red blocks and 25 blue blocks.
You can stack the blocks in any order into 5 towers with 5 blocks maximum in each tower.
You do not have to use all the blocks and blocks cannot float in mid-air.
How many combinations of towers can you make?
The base being 0 0 0 0 0 as 1 of the combinations.
So you could have in stack 1: ABBBA 2:0 3: BBA 4: BABAB 5:AAAAA.
How do you calculate how many options there are?

mac – Certain key combinations (involving CMD) don’t work

My left command key is not working for certain key combinations, but it works fine by itself, and in some other combinations. e.g.

Fails:

  • left-cmd + tab (switch apps)
  • left-cmd + w (close window/tab)

Succeeds:

  • left-cmd + r (refresh)
  • left-cmd + s (save)
  • left-cmd + /* anything else I’ve tried */

Also Succeeds:

  • right-cmd + tab
  • right-cmd + w
  • right-cmd + /* anything else I’ve tried */

I’ve tried:

  • zap PRAM: still fails
  • restart: fails
  • safe mode: still fails
  • pulling my hair out:
    still fails

Could this be a keyboard hardward problem?

terminology – What is the name of the type of program to produce Unicode characters from ASCII combinations?

For example, in Vietnamese, there are Unicode characters like “â”, “ê”, “ô”, “ư”, v.v. To type them from keyboard, I need to type aa, ee, oo, w, then a program will convert them to correct characters. What is the name of that kind of program?

My purpose is to study how vulnerable that kind of software is.

index – PostgreSQL efficient lookup for 2 column combinations

I have a PostgreSQL (v. 12) database storing match results. I have integer columns team_home and team_away which have foreign key constraints for team_id in table teams . My question has a few scenarios:

  1. If I want to find all games involving a single team with ID 1 I could do:

SELECT * FROM matches WHERE team_home = 1 OR team_away = 1;

  1. If I wanted to find all games between 2 teams, IDs 1 and 2 I could do:

SELECT * FROM matches WHERE (team_home = 1 AND team_away = 2) OR (team_home = 2 AND team_away = 1);

  1. I want to join my matches table with a teams table:

.

SELECT m.match_id, t1.name, t2.name 
FROM matches m 
JOIN teams t1 ON t1.team_id = m.team_home 
JOIN teams t2 ON t2.team_id = m.team_away 
WHERE m.team_home = 1 OR m.team_away = 1;

The question I have is – are these the optimal queries and can I improve efficiency?

I have read a bit about indexes and this page seems to suggest I could improve my queries across two columns like this by using a GIN index, however that is for text columns and not Foreign Key integer columns.

Alternatively should I create an ARRAY column of team ids and then use an ANY query? (The obvious downside to that is you lose the abilit

binary – Does a megabyte represent (2^8)^1000000 bits in base2? Isn’t that more than enough combinations to represent everything?

Every introductory CompSci resource I can find goes through how 8 bits are in a byte, etc. So a byte can store some 2^8 values in binary. Then when asking about four bytes, we can assume this is (2^8)^4=2^32.

But I can’t find anywhere if this pattern holds up until the total amount of hard drive or memory storage. For instance, if even a single megabyte can really hold (2^8)^1000000 bits, isn’t this a number so large that it could store all data in existence everywhere in the universe many times over? The number of possible combinations from a number that large would surely never be reached. Yet in reality, we all know a megabyte isn’t much.

I can’t help but feel somewhere that the exponentiation must stop, and we instead multiply bytes together. Or is it really the case the numbers can get this big? Such as a gigabyte representing ((2^8)^1000)^3 bits?

If I can represent a number, let’s say, 1 million in 32 bits, and I wanted to store 10^50 numbers this large, wouldn’t the required bits be 2^32*10^50? First of all, I’d never need to store 10^50 of any unit of data on my hard drive, that’s astronomically massive, and secondly, 2^32*10^50 is quite a small number, far below (2^8)^1000000. So what’s really happening here that we need so much storage, and a megabyte isn’t much?

excel – VBA Function returning Array For RGB Color Combinations

Submitting for review by experts.

Inspired by this question to color value cell having duplicates with a different color. So “Apple” will have one color for all duplicates. Then “Banana” will have a different color for all its duplicates. What if number of such values exceeds 56 (max number of ColorIndex property ?

With this function I am trying to create array of all possible combinations in a given range and step of RGB colors in VBA.

Starting from 1 and ending 255 there are 256*256*256 = 16,777,216 (1 added for absence of color, 0) unique combinations of RGB colors. More than enough for all excel rows 🙂 Refer this stackoverflow link

Function RGBColorArray(StartCol As Byte, EndCol As Byte, ColStep As Byte) As Variant
'This function gives array of combinations of colors
'Function will return error if StartCol or EndCol > 255
'StartCol is the color number from where to start. Say 150
'EndCol is the color number where to end. Say 220
'ColStep is the desired gap/interval between the two consecutive color numbers
'If every color combination is desired then ColStep = 1
'If every 5th color combination is desired then ColStep = 5
Dim RndEndCol As Integer
RndEndCol = StartCol + WorksheetFunction.MRound(EndCol - StartCol, ColStep)
If RndEndCol > 255 Then
EndCol = EndCol - ColStep
'Though this could be EndCol = RndEndCol - ColStep but it returns the same result of final array.
End If

Dim r As Byte, g As Byte, b As Byte, x As Byte, i As Long, j As Byte, k As Byte, l As Long
Dim arr As Variant, arrVal As Variant
x = 2 + (EndCol - StartCol) / ColStep
'ReDim arr(1 To x * 7, 1 To 3)
ReDim arr(1 To x ^ 3, 1 To 3)

StartCol = StartCol - ColStep
'_________________________________________
r = 0: l = 0
For i = 1 To x
    g = 0
    For j = 1 To x
        b = 0
        For k = 1 To x
            l = l + 1
            arr(l, 1) = r
            arr(l, 2) = g
            arr(l, 3) = b
            If b = 0 Then
            b = StartCol + ColStep
            Else
            If b <> 0 And k < x Then b = b + ColStep
            End If
        Next
        If b = 0 Then
        b = StartCol + ColStep
        Else
        If b <> 0 And k < x Then b = b + ColStep
        End If
        If g = 0 Then
        g = StartCol + ColStep
        Else
        If g <> 0 And j < x Then g = g + ColStep
        End If
    Next
    If b = 0 Then
    b = StartCol + ColStep
    Else
    If b <> 0 And k < x Then b = b + ColStep
    End If
    If g = 0 Then
    g = StartCol + ColStep
    Else
    If g <> 0 And j < x Then g = g + ColStep
    End If
    If r = 0 Then
    r = StartCol + ColStep
    Else
    If r <> 0 And i < x Then r = r + ColStep
    End If
Next

RGBColorArray = arr

End Function

So, following procedure will color range E1:E125 with different RGB color combinations returned by the above function. Function is RGBColorArray(150, 240, 30). 125 cells is result of 5 step colors (0,150,180,210,240). So, 5*5*5 = 125

Sub ColorMyRange()
Dim cell As Range, arr As Variant, i As Long, x As Long
i = 1
arr = RGBColorArray(150, 240, 30)
x = UBound(arr, 1)

For Each cell In Range("E1:E" & x)
    cell = arr(i, 1) & " | " & arr(i, 2) & " | " & arr(i, 3)
    cell.Interior.Color = RGB(arr(i, 1), arr(i, 2), arr(i, 3))
    i = i + 1
Next

End Sub

Column A, B and C contains array of RGBColorArrayfunction

enter image description here
enter image description here