windows 10 – Locking down an internet cafe user

I have set up or am trying to set up a visitor policy for an Internet café or something similar where you have limited access to a computer so you can only use a browser (this is for a class project, mostly hypothetical).

I have found a couple different paths I can go, one of which is running Microsoft Edge (web browser) as the custom user interface which gives me just a Microsoft Edge window (This is the basis for all my paths since it honestly is the most locked down I have ever seen Windows) but if they minimize or exit out it, it just gives you a black screen.

I have a solution for exiting which is a script that when Edge closes by clicking the cross it logs out the user which is great but they can still minimize it and have a black screen. I can run Edge in kiosk mode which removes the URL bar (Haven’t really got around this one so I’ll just start 2 Edge windows, one in kiosk and another in regular full-screen meaning if they exit out of the full-screen one they won’t be able to exit out of Edge completely as they will be just stuck with a the kiosk mode edge window.

I’ll just set a custom homepage telling the users to just ctrl-n to re-open the window. I wish there was a way to just have that window log user out if they exit it but then they could still minimize it. It also removes the exit so no way for users to log off and the minimize, maximize button.

I have a couple of questions.

I just needed to give hopefully enough context on what I am doing or trying to. I have little to none programing still so I’m kind of hoping that you would be able to help me.

Is there a program would that overlays all windows even over the Edge in kiosk mode that would allow users to logoff.

Sorry for the extra log question here.

applications – Screensaver without locking screen

I am looking for a solution that runs screensaver or turns off the screen when idle without locking the phone.

Most common scenario: Open messagaing app. Write with friend. Screensaver pops or screen turns off. Someone replies then application shows automatically.

I have note4 with android 6.0.1 and I can’t turn off auto screen lock in settings. I have fingerprint configured and I don’t want to change it. Also, Stay awake developer option is not a solution because screen just dims and its dangerous for amoled.

Is it possible to configure screen to work like that?
Is there any application for that?

notebooks – Locking cell groups

Imagine I have a notebook divided into multiple groups of code cells which are set as initialization groups. I then have a single cell which evaluates a function program() that yields an interactive tool (for example via Manipulate) which internal functions are defined in the initialization groups. Something like

enter image description here

If these groups are collapsed, is it possible to lock them so that when I share the notebook the code in these groups remains hidden and private and the only accessible cell is the one to run the program?

screen – What is surface locking and unlocking in Pygame?

Surface locking allows you to directly access the pixel data of accelerated surfaces. It’s not so much about improving performance. Rather, an accelerated surface already has performance improvements, but it comes with a trade off of requiring locking & unlocking if you’re going to directly change its data.

All of the built in Pygame functions will automatically lock and unlock the Surface data as needed. So for basic blitting, you don’t need to worry about it.

When might you need it? Let’s say you had some code that required multiple get_at() &/or set_at() calls. Each such call requires locking & unlocking the surface & according to the docs:

Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation.

In that situation, it would likely be more performant to lock the surface once, perform any required reads & writes to the pixel data and then unlock it.

Here’s what the the docs say about locking:

On accelerated Surfaces, the pixel data may be stored in volatile video memory or nonlinear compressed forms. When a Surface is locked the pixel memory becomes available to access by regular software. Code that reads or writes pixel values will need the Surface to be locked.

Surfaces should not remain locked for more than necessary. A locked Surface can often not be displayed or managed by pygame.

Not all Surfaces require locking. The mustlock() method can determine if it is actually required. There is no performance penalty for locking and unlocking a Surface that does not need it.

All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.

It is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released.

What is screen locking and unlocking in Pygame?

I’ve read a little about screen locking and unlocking in pygame in Beginning Game Development with Python and Pygame. However, I still don’t understand it.

I’ve read that it can improve the game performance, so I’m wondering about its other advantages.

So overall, what are the main uses of screen locking and unlocking ?

How does it improve performance ?

Is it necessary to lock and unlock the screen everytime I blit an image into it ?


Here is a part of the passage that I read in that book :

Whenever Pygame draws onto a surface, it first has to be locked. When a surface is locked, Pygame has full control over the surface and no other process on the computer can use it until it is unlocked. Locking and unlocking happens automatically whenever you draw onto a surface, but it can become inefficient if Pygame has too many locks and unlocks.


I’m mostly wondering about manual screen locks and unlocks and not just about automatic ones and btw to lock and unlock a surface manually, all is needed is:

# applying some changes to that surface

unity – How to set transform.up without locking the y-axis?

I’m trying to make an object’s transform.up to a normal of the raycastHit point. I tried using this line of code:

transform.up = Vector3.Lerp(transform.up, normal, 1 * Time.deltaTime);

This works well but locks the y-axis rotation as a result the object can’t rotate and just keeps going forward. I tried using Quaternion.LookRotation. But I couldn’t make it affect the object’s rotation. Here is what I tried:

bodyRotation = Quaternion.LookRotation(transform.forward, normal);
transform.rotation = Quaternion.Slerp(transform.rotation, bodyRotation, 100 * Time.deltaTime);

How can I set the transform.up without locking the y-axis?

java – Locking a DB table and waiting for writing/reading it from a web application

I’m working on a web application using Spring (Java and JPA + Hibernate) and I was wondering if there is a way of locking a MYSQL table and then when another web service (or even another thread from the same application) tries to read or write the locked table it waits for it to be unlocked.

For example, imagine a use case (transaction) that needs to read a value and then increment it. There is a concurrency problem, because 2 or more threads at the same time are trying to read+write the same table.

Do I have to program it manually? Is that possible with java or using any of his libraries?

sql server – problem on understanding locking and covering index

As per my study, I found that a lot of people mention that the covering index would help to reduce the “key lookup” blocking. I was keen to test and understand it, but my testing did not show the expected result.

First I run the code below, I trying to update the table on the first transaction without commit and then on another session, I run a query to select the col2 and col3 from the tableA. According to the book, the second session will be block by the first session.

-- Create the table for testing
    (col1) INT,
    (col2) INT, 
    (col3) INT, 
    (col4) CHAR(100) DEFAULT('abc') NOT NULL

SET @int = 1;

-- Load data into the table
WHILE (@int <= 1000) 
    INSERT INTO (TableA) 
        ((col1), (col2), (col3), (col4))
    VALUES (@int*2, @int*2, @int*2, @int*2);
    SET @int = @int + 1;

ON (TableA) ((col1));

-- Create a non-clustered index
ON (TableA) ((col2));

    UPDATE (TableA) SET col3=999 WHERE Col2=4

--ON another session, I query this.
SELECT (col2),col3 FROM (TableA) 
WHERE (col2)=66
option (recompile)

The second session did using the key lookup to the Cluster index cidx_TableA and return the result, I expect it would no return any result because suppose it would lock by the update on first session. Why?

I am not yet create the covering index yet, because it did not make any blocking at all. So, did covering index really work?

enter image description here

locking – Azure SQL DB – How to track the locked rows using dm_tran_locks?

I use Azure SQL DB (Basic, DTU, Provisioned). Isolation is default snapshot read committed ON.

To handle concurrent transactions, I use table hints to lock the row(s). The requirement is that during the lock…

#1. Other users should be allowed to read all the rows in the tables (including the one being updated).

#2. Other users should be allowed to update other rows without waiting for the completion of the previous session.

#3. Other users should be able to identify the lock details ((3.1) If Row1 is locked by User1, then other user should be able to identify the locked user and locked row. (3.2) If Row1 is locked by User1, and, If Row2 is locked by User2, other user should be able to identify the locked users and the corresponding locked rows.)

When I use ROWLOCK alone with SELECT, the requirements #1 and #2 are satisfied.
When I use ROWLOCK,UPLOCK with SELECT, the requirements #1 and #3.1 are satisfied (using dm_tran_locks and dm_exec_sessions).

Is there a way to satisfy #1, #2, #3.1 and #3.2?