PHP – Is it a good idea to use lacquer for these types of websites?

I would like to hear your opinion. Should I paint (do not have an exact idea of ​​this tool) or install a similar tool on our server to improve the loading time?

Our website is regularly updated on content and design. By regular I mean on a daily to weekly basis, which includes content updates or page design updates.

My main concern is that if we use a caching tool like "Varnish" and a page is updated with resources such as CSS, JS, or images, changes will not be immediately displayed, and the cache may need to be rebuilt each time we create one Update (Please let me know if I'm wrong).

Therefore, I would like to know if we should use a caching tool on our website, such as "lack", which is regularly informed about the user interface and content. I also want to know which alternatives are better for IIS.

Web App – Effective ways to overlay a button to close a full-screen application if you have no idea about the layout of the application

I'm creating a web-based interface for a number of internal web applications. They are all embedded in an iframe for access.

Sometimes I have to allow the iframe to be displayed in full screen to give as much space as possible to an embedded app on the screen.

What I want to do is close the full screen button when the iframe is in full screen mode. I can superimpose one well, and it works that way. Visually, however, I'm faced with the fact that the apps all have different layouts – so there's no perfect place to set the close button for all apps. I'd like the close button ideally to be in the same place for a consistent user experience.

I should add a big condition: this is on a touchscreen terminal, and the user does not use a mouse. Otherwise, I would only have a mouse movement to one edge of the screen to expose the close button, just as a full-screen web browser in Windows displays the topmost UI when the mouse is moved to the top of the screen.

I can think of different scenarios to do this, but here I ask if anyone has found an earlier UI design pattern to handle this kind of situation.

PHP – Is it a good idea to use lacquer for this type of website?

I'd like to hear your opinion on whether I should install Lack (I have no idea about this tool) or a similar tool on our server to improve the load time.

Our website is regularly updated on content and design. With regular, I usually mean daily to weekly, which includes content updates or page design updates.

My main concern is that if we use a caching tool such as "Varnish" and the page is updated with resources such as "CSS," "JS," or "Images," changes will not be immediately reflected and the cache may be rebuilt each time must be when we make an update I know if I'm wrong.

Therefore, I would like to know if we should use a caching tool such as "Paint" on our website, which is regularly informed about UI and content updates, and what other better alternatives to "Paint" exist for IIS.

Is there an unbiased way to collect feedback on a product idea in a user survey?

I work with a stakeholder on a potential pivotal point for a product that works both inside and outside our organization. The stakeholder wants to ask a question like this in a survey directly to internal potential users: "If our organization offered a way (to reach your primary goal) (without either of your two main pain points) would you be interested in using it? "

I see this question as biased because it looks like "who in his right mind would not say yes?" The stakeholder has worked for us for many years and insists that this will not be a problem, but I find it hard to believe .

In our context, we also need to consider whether our users have the time, capacity and desire to use a product like ours. You can or do not use it inside or outside your work.

Are not we in the row to ask such a question? Even if it is us, what is a less biased way to ask it?

[ Politics ] Question open: Can one of you explain to Trump apologists why he has the idea to buy Greenland?

Could it be because the ice is melting and the resources there are now more accessible? Why should Greenland / Denmark want to give up what could make it a more important economic entity in the world? This is not like Alaska, where Russia was desperately looking for cash and resource status was unknown. Or the Gadsden purchase. I have to love. So many of you hastened to defend an unworkable idea to defend your cult leader.

Artificial Intelligence – Does the TensorFlow Object Recognition API understand the idea of ​​"context"?

For example, if I create an object recognition model to detect means of transport (cars, bicycles, planes, etc.). If I train it to detect wheels, then it's more likely to detect wheels on a car, not just because cars have wheels, but also because it recognizes that wheels are likely to appear on cars?

GUI design – Is it a good idea to hide the unsubscribe button with an error / warning message?

I am creating a secure website, closer to the banking business. I hesitate a bit to hide the unsubscribe link with the error / warning message. I think the design looks simplified when I add errors / warnings through the Logout Panel. I want UX experts to help me in this dilemma. Here are some prototype pictures.
Enter image description here

Note that I have a close button (X) in both the error message and the warning message. The user can close the message to see the logout button.

Here's the reason why I want to do this:

Basically, the error / warning message behaves like a notification message, even a success message is sent there. I wanted to put this in the header because I wanted to place my notification on the master page, not on the content page. That way, I can consistently display the notification.

mock up

download bmml source – Wireframes created with Balsamiq Mockups

Javascript – Is it a good idea to reduce the number of input parameters to a function by packing them into an object?

I create my own BST algorithm from scratch in JavaScript.

function bst(number, array) {
    let currentIndex = 0;
    let highIndex = array.length-1;
    let lowIndex = 0;
    let arrayNotExhausted = true;
    let returnedValues = null;

    currentIndex = array.length/2;
    while (arrayNotExhausted) {
        console.log(`The number is ${array(currentIndex)}, currentIndex: ${currentIndex}, high: ${highIndex}, low: ${lowIndex}`);
        if (number == array(currentIndex)) {
            console.log(`Found the number at ${currentIndex}`);
            return true;
        else {
            returnedValues = search(highIndex, lowIndex, currentIndex, arrayNotExhausted, number, array);
            highIndex = returnedValues.highIndexValue;
            lowIndex = returnedValues.lowIndexValue;
            currentIndex = returnedValues.currentIndexValue;
            arrayNotExhausted = returnedValues.arrayNotExhausted;
    console.log(`The number ${number} can not be found`);
    return false;

Code climate complains about a function in the above code has too many arguments, search(highIndex, lowIndex, currentIndex, arrayNotExhausted, number, array);

I'm thinking of reshaping my code by putting all six arguments into one object, eg.

search(object), where instead the object has all six properties, e.g. object.highIndex = highIndex, ..., object.array = array.

Alternatively, I can make some of the variables global variables, but in general I want to avoid global variables.

Algorithms – If I think I have a publishable idea about a particular problem, how do I publish it and how do I go about it?

I am new to research. I'm working on a specific problem that has been abandoned by all researchers (as far as publications are concerned). Anyway, I like to understand it for its simplicity and ease. However, there is a new algorithm for a problem and a new way to answer perhaps theoretical questions about this problem.

There is so little research on this particular problem that it would literally take you a day or less to look at everything and see that the idea has not actually been looked at. I use the well-studied field of integer programming / linear algebra to model each case of the problem.

Regardless of whether I am answering a big, open problem, I find the approach valuable, although answering basic questions about the problem becomes much easier. Algebra-related objects.

How do I proceed? Do I spend only one month perfecting the paper myself and putting it on arXiv? Is that everything?

Many thanks.

Design – Is such a "transparent" test framework a good idea?

Here is an example in R, but the concept applies to all languages ​​that support file IO. I'll introduce it in R just because the syntax looks better with the special function to override operators.

`%<-verify%` <- function(x, new.value) {
  name <- deparse(substitute(x))
  save.file <- paste0(name, '.rds')

  if (!file.exists(save.file)) {
    message(paste('Generating', save.file))
    saveRDS(new.value, save.file)
    assign(name, new.value, inherits=TRUE)
  } else {
    old.value <- readRDS(save.file)
    if (!isTRUE(delta <- all.equal(old.value, new.value))) {
    } else {
    assign(name, old.value, inherits=TRUE)

Let me explain it in action. For example, suppose you just get an old codebase and want to eliminate this mess.

> get.answer <- function() bitwXor(0xDEAD, 0xBEEF) %% 100

First, you need to do some examples so that the test framework can determine the result should His. If a name is awarded with %<-verify% For the first time, its value is stored in a file (named to avoid namespace collisions).

> source('test-util.R')
> answer %<-verify% get.answer()
Generating answer.rds
> answer
(1) 42

All following %<-verify% This name automatically compares the new value with the stored value and issues a warning if it does not match.

> get.answer <- function() 43
> answer %<-verify% get.answer()
Warning message:
In answer %<-verify% get.answer() : Mean relative difference: 0.02380952

This effectively prevents the code base from being corrupted by the new changes.

> get.answer <- function() 42
> answer %<-verify% get.answer()

Note that you should only use %<-verify% on the interfaces that interest you, for example, the exported functions. If you i %<-verify% i + 1 then be prepared within a loop for a wall of warnings.

The main advantage is transparency, which you can easily replace <- With %<-% and the check is done automatically. People are lazy, so the simpler implementation of tests leads to more tests and mistakes can be detected earlier.

Do you think that this is a good practice?