News terminals digital television installation in filling stations

Do you recommend News terminals digital television installed in filling stations?

Using an example to comprehend why “safely” erasing a drive yields better results than filling it up with meaningless data

A hypothetical 1GB USB stick is full of sensitive documents/images/etc. and it is not encrypted.

The owner wishes to discard it and is aware of having to safely erase it first.

There are several tools and utilities to do this. Some can be configured to do it “faster yet less safely”, others do it “slower but more safely”.

As opposed to have it erased using all the different ways known to do this, the owner chooses to simply drag all the current items to the recycle bin and then paste one 1GB (~2-hour) black screen movie file to the USB stick.

Again, no fancy erase utilities are used. The USB stick is then discarded.

If it falls into the wrong hands, can any of the sensitive files (that filled the stick before the movie file was pasted) be retrieved?

(1) If no, why do complex hard drive erase utilities exist? Some of them feature “safe” erase procedures that take houuurs, when simply filling a soon to be discarded HD with meaningless files, can do the job?

(2) If yes, how can 2GB (movie file + sensitive files) co-exist in a 1GB stick? Seems to me like the only logical explanation is (a) the movie file was in fact less than 1GB, (b) the USB stick was secretly larger than 1GB as stated, or (c) the movie file was copy-pasted only partially and the owner did not notice.

Filling a hole in an image in O(nlogn)

I have a grayscale image (given by a float matrix with values between [0, 1]) with a hole in it (a cluster of pixels/cells with values of -1).


The boundary of the hole as all the cells that are 4-connected to a hole pixel (a pixel with -1 value) (you can read more about pixel connectivity here:

I(v) is the color of the pixel v.

I need the fill the hole using this formula:

Denote the boundary with B. So for each u – hole pixel:

\begin{equation} I(u) = \frac{\Sigma_v{_\in}_B w(u,v) * I(v))}{\Sigma_v{_\in}_B w(u,v)} \end{equation} Where w is some arbitrary weighting function (for example using euclidean distance)

\begin{equation} w(v,u) = \frac{1}{|| u – v||} \end{equation} Denote the number of hole pixels with n, the naive solution will be O(n^2), since for each hole pixel, we sum over all boundary pixels (and the upper bound for the amount of boundary pixels is 4n, of course).

I was told a solution could be achieved in O(nlogn), but I couldn’t think of anything even close to that.

I thought of doing some bitwise operations, but I reached a dead end. I also tried reusing computations, but I couldn’t find any.

Moreover, the way I see it, there’s no avoiding calculating w(u,v) for the n^2 pairs of hole/boundary pixels – which is already more than O(nlogn).

What am I missing? Could you point me at the right direction?


Is filling up plan cache causes a decrease in space allocated for data cache?

SQL Server uses allocated server memory for different kind of purposes. Two of them are plan cache and data cache which are used to store execution plans and actual data correspondingly.

My question: Do these two caches have different allocated space section in Buffer pool, or in contrary, they have just one section in Buffer pool which they share between each other?

In other words, if plan cache is filling up, does space for data cache is reducing as well?

Minimization of DFA, Table Filling Method or Myhill-Nerode Theorem

I want to know, what if the DFA is merged states. So if my DFA starts with q0 and then have (q0,q1) state it goes to with an ‘a’ for example. How do I do the table filling method.

I tried to rename the merged state, for example turning (q0,q1) to q4 for example. But then the issue is when I try to do the table filling. With the input in the Automaton, I get only one state, sometimes the final state. So do I mark it.

For example, I renamed (q0,q1) to q4. Now in the table, if I want to find out the marking for q0 and q4. With an ‘a’ I get q4,q4 for both of the state and with ‘b’ I get nothing from q0 and q2(final state) from q4. I know since q4,q4 does not exist I do not mark. But I only get one state, which happens to be the final state. Do I mark q0,q4 part of the table or do I leave that blank aswell

How to stop filling bad?

I’ve created a simple Chrome extension for web developers. Its aim is to cut down the repetitive task of form-filling to a minimum. With this extension, you can save data you’ve already typed into a form (text boxes, dropdowns, checkboxes) with jus one hotkey, and restore them when making another test. It may seem like autocomplete, yet I’ve added some unique features – you can share once completed form with your teammates, or manage all the forms in web UI.

Have a look

Using a fixed decimal when filling a currency amount input field

When entering currency amounts into an input field, I’ve seen two methods:

Keyed Decimal: The keypad includes the decimal character and the user enters the decimal along with the numbers. The Chase mobile app uses this approach.

Key  Display  5       $  5  4      $  54  .     $  54.  6    $  54.6  3   $  54.63 

Fixed Decimal: The keypad excludes the decimal character and the numbers fill around a fixed decimal. The PayPal and Square mobile apps both use this approach.

Key  Display  5    $  0.05  4    $  0.54  6    $  5.46  3   $  54.63 

The keyed decimal approach seems more straightforward to me, and it also requires 2 fewer keystrokes when entering non-decimal amounts (e.g. $ 10 only requires typing 1-0, instead of 1-0-0-0). However, users of our payment processing app have accidentally charged amounts like $ 123,456.00 instead of $ 1,234.56 because they were expecting a fixed decimal interaction instead of a keyed decimal interaction.

Is this just a matter of preference, or are there other merits to a fixed decimal approach that I may be overlooking?