mouse – Raise a window in 20.04 by clicking without clicking any of the buttons inside it (disable “click-through”)

I would like to configure Ubuntu 20.04 (with Gnome shell) so that if I click a window which does not have focus, that click raises the window and does nothing else; in particular, that click to raise the window does not actually have an effect on the window (so I can click where a button is without activating that button). In the old days on the Mac this was called “click-through”.

The reason for this is that it is very hard to click on a window to raise it without also clicking on a button inside it!

A Nautilus window mostly covered by other windows

Almost all the visible areas of that Nautilus window are “active” areas in some way; clicking in that window to focus and raise it will also change the folder that it is currently displaying.

Some clarifications:

  1. This is not about the window focus mode (focus-follows-mouse or sloppy focus). Windows are focused by clicking on them; I do not want focus-follows-mouse, and it is not what this question is about.
  2. This is about raising a window and giving it the focus by clicking on the window. I can switch to that window in other ways (alt-tab, for example, or by choosing it from the Dock) but I want to be able to click on a window to focus it and raise it, exactly as I currently can, but I don’t want to have to be careful to only click on an “inactive” area of that window to focus it.
  3. Yes, this problem is exacerbated by how there are not very many “inactive” areas in a window now that the title bar contains buttons. That’s not what this question is about, and I am quite happy with the window containing many buttons, as long as I’m not forced to click one of them just in order to give the window focus.

Window Function – SUM() OVER (PARTITION BY … ORDER BY …)

i wish you all stay healthy and safe in this unprecedented circumstance.

i am a newbie and asking my very first question in here.

i have following dataset.

enter image description here

green: original data.

yellow: values that i want to calculate.

red: dummy row that is manually added to set up starting point?

PureAsk = MAX(Ask – PreviousBalance, 0)

Balance = SUM(D$2:Dn) – SUM(C$2:Cn)
WHERE n stands for the current row

my server environment is azure data warehouse, which doesn’t allow recursive cte.

i am currently using WHILE loop, which is very time consuming and ineffective.

i believe there should be a more efficient way to do this calculation using Window SUM but I got confused how I can get the (previous) Balance for current PureAsk calculation.

the problem is that i have a circular (or cyclic) dependency: how to get row (n – 1)’s balance to calculate row n’s PureAsk.

so, this is an architectural problem but i couldn’t think of better way to prepare data for this.

i beg your wisdom. any advice will be helpful.



IF OBJECT_ID('tempdb..#D') IS NOT NULL DROP TABLE #D;
CREATE TABLE #D (
    WeekOrder       INT
    , Ask           INT
    , Delivery      INT
    , PureAsk       INT
    , Balance       INT
);

INSERT INTO #D VALUES (1, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (2, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (3, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (4, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (5, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (6, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (7, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (8, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (9, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (10, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (11, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (12, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (13, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (14, 0, 0, NULL, NULL);
INSERT INTO #D VALUES (15, 28800, 0, NULL, NULL);
INSERT INTO #D VALUES (16, 20815, 11185, NULL, NULL);
INSERT INTO #D VALUES (17, 41600, 0, NULL, NULL);
INSERT INTO #D VALUES (18, 46000, 0, NULL, NULL);
INSERT INTO #D VALUES (19, 39350, 0, NULL, NULL);
INSERT INTO #D VALUES (20, 45750, 2000, NULL, NULL);
INSERT INTO #D VALUES (21, 47750, 3850, NULL, NULL);
INSERT INTO #D VALUES (22, 41800, 3000, NULL, NULL);
INSERT INTO #D VALUES (23, 48000, 3000, NULL, NULL);
INSERT INTO #D VALUES (24, 37175, 9000, NULL, NULL);
INSERT INTO #D VALUES (25, 46175, 9000, NULL, NULL);
INSERT INTO #D VALUES (26, 47825, 6400, NULL, NULL);
INSERT INTO #D VALUES (27, 42225, 13725, NULL, NULL);
INSERT INTO #D VALUES (28, 42800, 12000, NULL, NULL);
INSERT INTO #D VALUES (29, 49200, 0, NULL, NULL);

-- now i insert the dummy week order = 0 for starting point.
INSERT INTO #D VALUES (0, 0, 0, 0, 0);

SELECT C.WeekOrder
        , C.Ask
        , C.Delivery
        , PureAsk = SUM(CASE WHEN C.Ask - P.Balance < 0 THEN 0 ELSE C.Ask - P.Balance END) OVER (PARTITION BY NULL ORDER BY C.WeekOrder ASC)
        , Balance = SUM(C.PureAsk) OVER (PARTITION BY NULL ORDER BY C.WeekOrder ASC)
                    - SUM(C.Delivery) OVER (PARTITION BY NULL ORDER BY C.WeekOrder ASC)
    FROM #D AS C            -- C for current
    INNER JOIN #D AS P      -- P for previous
        ON C.WeekOrder = P.WeekOrder + 1
    WHERE C.WeekOrder >= 1
    ORDER BY 1
;

Ubuntu 18.04 from VirtualBox sometimes has small window

I’m using VirtualBox 6.1.8 on Windows 10. I’ve installed an Ubuntu 18.04 image provided by my company. This installation includes the Guest Additions package. Most of the time, the VM starts up perfectly fine, showing a fullscreen window, allowing cut/paste between the VM and host, and shared folders are mounted.

However, quite often when I start up the VM, I get a small window that looks like before I installed Guest Additions. However, cut/paste between host/VM still works, and I still have shared folders. When this happens, I restart the VM, and it almost always starts up fine on the second try.

I had a feeling that this is some sort of race condition, so I thought perhaps not logging in as quickly as I usually do might help. I used to have it set to auto-login, and it seemed like this happened more often with that. I now wait until the login page appears, and I don’t immediately sign in. It’s possible this helps, but this morning it didn’t. I still got the small window, then I restarted, and after logging in again, I got a large window again.

My gmail abels window has collapsed, how can I bring it back?

My labels window has collapsed – horizonatally, not vertically – and so now I can only see the inbox and starred labels. I have tried all the options listed – I can see the ‘Meet’ tab, I have tried clicking on the ‘hamburger’ tab, but this is more for a vertical collapse as opposed to a horizontal collapse. I cant clear this so far.

Does anyone have a clear and simple fix for this frustrating quirk that has suddenly appeared

Many thanks.

Failed to execute ‘atob’ on ‘Window’

Estoy enviando la siguiente cadena "Búsqueda no encontrada" al enviarla sin la ú la toma perfectamente, pero cuando va con ú sale el siguiente error:

Uncaught DOMException: Failed to execute ‘atob’ on ‘Window’: The string to be decoded is not correctly encoded.

El codigo js es el siguiente:

 w._getParameterByName = function (name) {
    name = name.replace(/(()/, "\(").replace(/())/, "\)");
    var regex = new RegExp("(\?&)" + name + "=((^&#)*)"),
        results = regex.exec(location.search);
    return results === null ? "" : atob(decodeURIComponent(results(1).replace(/+/g, " ")));
};

Agradezco su ayuda

ids – What happens if a sender changes the TCP window size over multiple packets that have the same ACK number?

I’m currently doing research on evasion attacks that seek to bypass a Deep-learning based Network Intrusion Detection System.

In order to achieve this, I need to know what the constraints are for the TCP window size field in the TCP packet header. Imagine a client has just sent the last TCP-ACK packet to a server in order to complete the 3-way handshake. He then immediately proceeds to send a GET request to the server (these 2 packets are thus sent one after the other, and contain the same ACK-number).

What happens if the TCP window size in the TCP-ACK packet does not match the window size in the TCP packet containing the GET request? Will the receiver simply observe the last value for the window size that he obtained? Or will there be a violation in the TCP protocol in any way? You can assume that the change in window size is very small, and will not cause the buffer to be full.

More generally, if the client sends N uninterrupted packets (e.g. a heavy-load POST request), can he change the window size in each packet header without repercussions?

python 3.x – Calculating a unique count within a rolling time window without an explicit loop

I have a pandas DataFrame that contains a row per member per day, expressing member interaction with a website. Members interact only on some days, each member is identified with an ID. Here is a simulated example:

import pandas as pd
import numpy as np

# Generate data.

ids = np.repeat(np.arange(100), np.random.randint(100, size = 100))

test = (
    pd.Series(
        ids,
        index = pd.Series(pd.date_range('2020-01-01', '2020-02-01').values).sample(ids.shape(0), replace = True)
    )
    .sort_index()
)

print(test.head())

Gives:

2020-01-01     4
2020-01-01    65
2020-01-01    95
2020-01-01    40
2020-01-01    88
dtype: int32

I’d like to calculate a unique count of members within a 7 day rolling window. After some experimentation and research on Stack Overflow (including pandas rolling/groupby function), I arrived at an explicit loop and slicing:

# Calculate rolling 7 day unique count.

unique_count = {}

for k in test.index.unique():

    unique_count(k) = test.loc(k - pd.Timedelta('7 days'):k).nunique()

# Store as a dataframe and truncate to a minimum period.

unique_count = pd.DataFrame.from_dict(unique_count, orient = 'index', columns = ('7_day_unique_count')).iloc(7:)

print(unique_count.tail())

Gives:

            7_day_unique_count
2020-01-28                  98
2020-01-29                  98
2020-01-30                  98
2020-01-31                  97
2020-02-01                  97

This seems to work correctly and performs OK. But is it possible to do this without the explicit loop (with resample/groupby/rolling functions)? And if so, is that more efficient?

productivity – Window Manager for Mac

I’ve always been a Mac user, but when my Mac died I borrowed a Chromebook. Chrome has an awesome extension that manages windows to let you see all windows and their own tabs in one view, merge or save windows, close windows or tabs directly from that page, see which app is playing an audio or video, and more. I can’t find anything like it for Mac. This is crucial since I frequently have close to 100 tabs open for research. The link below shows what I mean. Is there anything similar for Macs??

https://chrome.google.com/webstore/detail/cluster-window-tab-manage/aadahadfdmiibmdhfmpbeeebejmjnkef?hl=en

Java Control Panel Won’t Open – Blank Window Then Crashes

When I try an open up the Java control panel from the windows control panel I get a blank Java control panel window which then crashes (disappears) without any error code. When running in safe mode I am able to open up the control panel successfully.
Blank Window Example

I also cannot run any standalone .jar files either (with a similar issue of a blank window showing then disappearing after a few seconds).

I am running a single Java install, 64 bit Version 8 Update 251. I have tried uninstalling (and deleting all program files and AppData folders associated) and reinstalling a number of times to no avail. On Windows 10 Version 1909

macos – Font color for SAVE button in Open/Save Dialog window

Stack Exchange Network


Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange