software – How can a non-root program cover your entire screen with a window?

This year, since much of students are online, College Board (the company that administers AP Exams in the US, along with the SAT) recently released its Digital Testing App. Once installed, and going through a setup, it allows you to go through a test demo to mirror the actual test conditions. However, once you do, it covers your entire screen and prevents you from Alt+Tab to another window. This ability could make sense if the program was given administrator privileges on install (like Respondus Lockdown Browser, I believe), but the Testing App wasn’t, and yet still could. This could just be a trick like just a really big window, but I’m not completely sure. Could anyone shed some light on this and how could they do this?

google sheets – How to Apply Conditional Formatting Based on Adjacent Cell Value for Entire Column?

I am looking to apply conditional formatting to all cells in a column (excluding the header) where a colour will be applied depending on if its value is greater, equal, or less than the adjacent cell.

Simple example:

A B
1 100 200
2 50 150
3 80 20

Here is a simple spreadsheet that is more complex implementing @Rubén’s solution:

https://docs.google.com/spreadsheets/d/1pl_UOyyE8r-JOcGWM2zsA2fFAbuvH3EUg7YnonaTZqY/edit?usp=sharing

Range B:B has the following custom formulas:

  • =B2>=A2 for green (if the cell on the right is greater than or equal to the cell on the left)
  • =B2<A2 for red (if the cell on the right is less than the cell on the left)

If the value in column B is greater than or equal to the value in column A, colour the B cell green. If the value in column B is less than the value in column A, colour the B cell red.

So rows 1 and 2 should be green, and 3 red.

I am familiar with how to do this individually on a per cell basis, but if I have hundreds of rows and need to do this over multiple columns I don’t want to manually do this hundreds of times. It looks like I need to use the Custom formula is on Conditional formatting rules, but I can’t figure out how to target a relative cell by position.


What I’ve tried:

  • Conditional formatting on one cell such as Great than or equal to $A2, then dragging this row down hoping the 2 increments. It doesn’t. This also wouldn’t work in scenarios where there are unique formulas or static values in the cells without going back and updating the cell values.
  • Using the Custom formula is, but unable to find the correct function to pair it with to again make that 2 value increment. Looked at MATCH and other descriptions of functions and didn’t see anything suitable for dynamic cell.
  • Looked at using the Script Editor, but this didn’t seem right and seemed like overkill for what I feel is pretty simple.
  • Googling, but somehow not finding anyone who’s wanted to do this before. Stack has questions that are close, such as Conditional Formatting based on other column that also use the MATCH function, but I wasn’t able to make this work.

files – search for filenames on entire android device tree using ADB ‘find’

Use:

find . -name "*prop*"
  • .: represents the current folder.
  • -name: option to find files by name.
  • *prop*: filenames that contain the word prop.

OR as mentioned by @alexs on the comment, you can use:

find . -iname "*prop*"
-iname: option to find files by name but is case insensitive.

If you want to find the all files with the root folder as the stating place, do as mentioned by @IrfanLatif by using:

find / -iname "*prop*"

Python: Replace nested dict key’s value in entire json whether inside a list or directly a dict

I want to replace the values inside a json for dictionary’s key it could be present as dictionay directly in json or as a dictionary inside another list as below:

``` 
{ 
  "appType": "popper",
  "createdAt": "1970-01-01T00:00:00.000Z",
  "updatedAt": "1970-01-01T00:00:00.000Z",
  "people": [{
            "name": "Vol1",
            "label": "Vol1",
            "peopleInfo": [{
                "name": "ram",
                "age": "2407653459860",
                "id": "1b738651-da9f-4c85-88c1-70dbfe1976681"
            }],
            "itemInfo": {
                "id": "ee763970-51e2-57a5-955c-d72fc3e28a3f",
                "name": "xyz",
                "type": "any",
                "managed": false
            }
        }],
  "itemInfo": [{
            "managed": false,
            "vendorName": "any",
            "serialNumber": "AF-10124"
             }],
}
Desired Output:

{ 
  "appType": "popper",
  "createdAt": "1970-01-01T00:00:00.000Z",
  "updatedAt": "1970-01-01T00:00:00.000Z",
  "peopleInfo": [{
            "name": "Vol1",
            "label": "Vol1",
            "people": [{
                "name": "ram",
                "age": "2407653459860",
                "id": "1b738651-da9f-4c85-88c1-70dbfe1976681"
            }],
            "itemInfo": {
                "id": "ee763970-51e2-57a5-955c-d72fc3e28a3f",
                "name": "xyz",
                "type": "any",
                "managed": True
            }
        }],
  "itemInfo": [{
            "managed": True,
            "vendorName": "any",
            "serialNumber": "AF-10124"
             }],
}

so as in desired output i want to update/replace the *managed* flag as *True* from *false* for **itemInfo** directly in json and as well as **itemInfo** in **peopleInfo** List using python. The iteminfo dictionary can be present in entire json in some different list as well. Thankyou for the help.

c++ – Octree LOD without traversing the entire tree

I am working on a voxel engine that uses a huge Hashed Linear Octree that reconfigures when you move. Each octree leaf is a voxel. The world is procedurally generated using 2D Perlin noise.

The octree utilizes face culling and instancing to accomplish pretty good performance in OpenGL. I have implemented LODs in order to allow for much bigger scenes and my bottleneck has quickly shifted from rendering faces to generating the Octree.

Each time the camera moves I need to reconfigure the Octree’s LOD in order to ensure the viewer sees high detail near him and low detail in the distance. The system works great for small Octrees (256^3) but as soon as I go to a 1024^3 Octree, the generation of the Octree LOD takes 1-2 minutes. Even done on a separate thread it isn’t enough.

I am sure there is a way to generate the Octree world without traversing the whole Octree but I could not find it.

The basic outline of how I do the Octree LOD generation when the camera moves:

  1. Start traversing the Octree at the root node

  2. For each node, check the distance of the node’s center from the camera

    2.a. If the node is a leaf and the distance is smaller than the node size * CONSTANT, divide it. If it is not a leaf, traverse its children and go back to (2).

    2.b. If the node is not a leaf, and the distance is larger than the node size * CONSTANT, collapse the node if needed.

That’s basically it. Because the world is procedurally generated, dividing each node means iterating its entire volume (x+1,z,x+2,z…x,z+1,x,z+2…x+1,z+1….) to determine if the 2D Perlin noise passes through the node volume, above it, or below it (This has to be part of the problem as for 256^3 nodes it takes 65536 iterations).

I know that I can improve this by parallelizing the entire algorithm, but I still feel like there has to be 1) a way to calculate LODs without entire tree traversal, and 2) figuring out if to divide the node without iterating through its whole volume 1 by 1.

Would love to get some pointers, I could not find many resources about this online.

developing – Developed film has dark/bright wavy line spanning across entire film

My presumption is that you developed this film yourself.

The dark (on the negatives) area and slightly wavy edge are due to the film being incompletely submerged in the chemicals. Either you didn’t have enough solution to cover the film (250-290 ml, depending on the tank type, for 35mm) or you developed a single roll in a larger tank and the reel wasn’t fully seated to the bottom of the tank.

In Paterson type tanks, one thing to watch out for is that a single reel can slide up the column, so that even if you’ve poured more than the (for this tank type) 290 ml solution required to cover a single 35mm reel, the reel may not be covered. The recommendation is that if you’re processing a single roll in the “2-reel” tank (will hold 2x35mm or 1×120), put an empty reel on top of it.

The other thing that can happen is that even if you did this, if the empty reel was on the bottom by mistake, your 500 ml (per comments) of developer would only about half cover the film in the upper reel.

The third thing is that you might have loaded two rolls, but didn’t actually measure enough developer to cover two — my 2-reel Paterson won’t hold a full liter, that takes a 3-reel tank (which is prone to the same problems I mention above), so if you had two rolls in a 2-reel tank, you surely did not pour twice 500 ml.

However it happened, that roll of film was only about half covered. The dark swatches in the half of the strip without half-images on it is unfixed emulsion (that section should almost completely clear if you return the film to bleach and fixer or blix steps).

If I re-install an encrypted version of Ubuntu on my laptop and fill my entire SSD up with a large .txt file, does this securely wipe the SSD?

This might work, but there is a much easier way to wipe your hard drive clean:

Boot the computer from a Ubuntu live bootable USB. When it prompts you with the options to ‘Run Ubuntu’ or ‘Install Ubuntu’, choose ‘Run Ubuntu’.

When Ubuntu loads, open the command prompt, then do sudo fdisk -l to find the location of the SSD in the file system (it will likely be /dev/sda). Then, use the following dd command to fill the SSD with zeroes:

dd if=/dev/zero of=/dev/sda bs=4M status=progress

(assuming your SSD is /dev/sda – otherwise, change accordingly)

sql server – Does pausing an online resumable rebuild on an otherwise inactive partition affect the entire index that spans across all partitions?

Using SQL Server Enterprise 2017 edition.
… I just had an interesting issue with a partitioned clustered index that i was rebuilding just a partition of.
The table and all but one indexes are on a partition schema that is partitioned on a DATEMODIF (varchar) field in ‘YYYYMMDD’ format.

we have yearly partitions in place : 17 is for data for 2016, 18 for 2017 etc…

The table has 26 billion rows,
count by year is approx:
2015 : 312,686,074
2016 : 1,990,483,950
2017 : 3,378,498,597
2018 : 5,756,681,366
2019 : 6,301,979,049

i ran “ALTER INDEX (IDX_FK_MyIndex) ON (dbo).(T_PARTITIONED_TABLE) REBUILD PARTITION = 17 WITH (SORT_IN_TEMPDB = OFF, ONLINE = ON, RESUMABLE = ON, MAXDOP = 2) ”

The VM has 6 CPUs and 320GB RAM, and Nimble SAN storage in the background.

I had the usual workload that can handle 1800 transactions per second drop to 50-100 per second.
(the transactions are all INSERTs into the partitioned table-> into partition 22, for 2021)
I left it running for 50 minutes (it had managed 25% of the clustered index on partition 17 (for 2016)), and the backlog was getting too high so i decided to PAUSE it with “ALTER INDEX (IDX_FK_MyIndex) ON (dbo).(T_PARTITIONED_TABLE) PAUSE”

Even with this paused, i only got up to 150/200 transactions/second.
After more fretting and sweating, i used the ABORT command to see if this or some ‘hidden’ workload was causing the slowness. And bam, after the abort it jumped right back up to 1800 trans/sec.

Not a request for support ;), but was curious – I thought partitioned indexes were independent, but the pause of an online resumable rebuild on an otherwise inactive partition affects the entire index, spanning across all partitions ?
Has anyone seen anything like this, or have an explanation? I couldn’t find anything on MS online docs saying anything about this…

file system – When performing an adb pull of an entire device, why do I see /proc/self/root in pathnames repetitively?

When performing adb pull / on a non-rooted device, I see hundreds of items with pathnames that begin with /proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root?

That’s not a typo. That is literally how the path of each of these items is prefaced.

It looks recursive or like an infinite loop, but eventually the repetition ends with a unique file or folder name.

What is going on? What is adb doing here?