Is it a good practice to use the tag of not following the internal links in a multilingual website?

I have a website that is in the USA UU And in FR-FR and I am creating links for the English version of the website.
I wanted to know if I should put all the links in the English version, do not follow. Is it a good practice?

Is it a common practice to use identical images separated from different resolutions for different screen sizes?

From a design perspective, it is more common to use images of different sizes for desktop and mobile computers, or it is more common to use the same image for each and display them in different sizes using CSS or otherwise.
What are the pros and cons of each approach?

rest: what is the best practice to send a large variety of chains to an API?

I am creating a simple application that is a client web application and an API behind it. I am combining two third-party APIs, one must be called from my client application (to facilitate authentication) and the other must be called by the server.

The data I receive from my first API is a list of strings: they will have a length between 0 and 150 elements, each string is an unknown length. Each of these elements must be passed to my server, either as individual elements (preferred) or as a serialized string. My endpoint will always return a single object, regardless of how many elements are passed to it.

What is the most semantic way to pass this data to my API?

It's not really a GET request, since the returned object is dynamic, and I'm worried about URL length limits (which are discussed here) since I do not know what these strings will look like.

POST also feels incorrect since I will not store what is sent to me, although this would allow me to send the data in the body of the request and not worry about the size.

Maybe I should not worry so much about semantics and just do what works, but I'm interested in opinions about the best way to design my API here.

Disclosure: Is it a bad practice to remove a resolved report from the Open Bug Bounty file?

An XSS vulnerability report was made through Open Bug Bounty, which was repaired, confirmed and a reward was made.

The reporter has marked the problem was solved. They have also offered to eliminate the vulnerability of the Open Bug Bounty file.

Not being familiar with Open Bug Bounty, I'm not sure if this is a good or bad thing. The vulnerability was ethically informed in the open air, so the fact that there was a report is already in the public record. The only reason why I can think about eliminating it is the protection of the reputation, and even then it does not seem to be a very strong reason.

My inclination is to leave it in the default file and that removal seems suspicious.

Is there any good reason to delete a report from the file?

Python – Google Kick Start Practice Round 2019 – Mural

My code exceeds the time limit in the second test set. A suggestion / suggestion of a better algorithm would be appreciated.

issue

Thanh wants to paint a wonderful mural on a wall that is north long sections Each section of the wall has a beauty score, which indicates how beautiful it will look if it is painted. Unfortunately, the wall is beginning to crumble due to a recent flood, so you'll have to work fast!

At the beginning of each day, Thanh will paint one of the sections of the wall. The first day, he is free to paint any section he likes. Each subsequent day, you must paint a new section next to a section that you have already painted, since you do not want to divide the mural.

At the end of each day, a section of the wall will be destroyed. It is always a section of the wall that is adjacent to another section and is not painted (Thanh is using a waterproof paint, so the painted sections can not be destroyed).

the total beauty Thanh's mural will be equal to the sum of the beauty scores of the sections he has painted. Thanh would like to guarantee that, no matter how the wall is destroyed, he can still achieve a total beauty of at least B. What is the maximum value of B for which he can offer this guarantee?

Entry

The first line of the entry gives the number of test cases, T. T The test cases continue. Each test case starts with a line that contains a whole number north. Then, follow another line that contains a string of north digits from 0 to 9. The i-th digit represents the beauty score of the i-th section of the wall.

Exit

For each test case, generate a line containing Case #x: y, where x is the number of the test case (from 1) and y is the maximum beauty score that Thanh can guarantee that it can achieve, as described previously.

Limits

  • 1 ≤ T ≤ 100.
  • Time limit: 20 seconds per test set.
  • Memory limit: 1 GB.

Small data set (test set 1 – visible)

2 ≤ north ≤ 100.

Large data set (Test set 2 – Hidden)

For exactly 1 case, north = 5 × 10 ^ 6; for the other T – 1 cases, 2 ≤ north ≤ 100.

Sample

Entry

4
4
1332
4
9583
3
616
10
1029384756

Exit

Case # 1: 6
Case # 2: 14
Case # 3: 7
Case # 4: 31

In the first sample case, Thanh can get a total beauty of 6, no matter how the wall is destroyed. On the first day, you can paint any of the sections of the wall with the beauty score 3. At the end of the day, the first section or the fourth section will be destroyed, but it does not matter which one. On the second day, you can paint the other section with the beauty score 3.

In the second sample case, Thanh can get a total beauty of 14, painting the section further to the left of the wall (with a beauty score of 9). The only section of the wall that can be destroyed is the one to the right, since the one to the left is painted. On the second day, you can paint the second section of the left end with the beauty score 5. Then, the last unpainted section of the wall on the right is destroyed. Note that on the second day, Thanh can not paint the third section of the wall (with a beauty score of 8), since it is not adjacent to any other painted section.

In the third sample case, Thanh can get a total beauty of 7. Start by painting the section in the middle (with beauty score 1). Whichever section is destroyed at the end of the day, you can paint the remaining wall at the beginning of the second day.

My solution

T = int (input ()) # number of attempts in the test set

for i in rank (1, T + 1):
N = int (input ()) # number of wall sections
score_input = input () # string entry of beauty scores
beauty_scores = [int(x) for x in score_input]

    muralLength = (N + 1) // 2
bestScore = 0 # to get the best beauty score

for k in the range ((N + 2) // 2): # the no. of possible murals
score = sum (beauty_scores[k:k+muralLength])

if score> bestScore:
bestScore = score

print ("Case # {}: {}". format (i, bestScore))

More details

My code worked fine for the first set of tests, but the time limit was exceeded for the second. The most likely result is that with the test case north = 5 x 10 ^ 6, there were too many options of murals for the code to verify (2500001 to be exact).

c # – Is it a bad practice to have game scores with decimals?

I'm working on a game that will have a final score by level. This score will be calculated and displayed to the player at the end of each level. The calculations of the current score will yield a score with a decimal point (for example, 256.3). Is it bad practice to use scores with decimal points when it comes to design? If so, what are some of the results for rounding and using whole numbers?

usability – Are tags / chips that can not be punctured by good practice?

The title says it all basically.

I have to show a trip that contains Title, description and lots of additional random information (labels). The problem is that these labels should not be selectable and labels seem to be the best way to divide the three "types of information" of a trip (the second example with only dividers seems a bit more messy).

Now the problem: are inseparable labels a thing in the world of UX or is it going to be the worst decision of my life?

P.s: Maybe there is an easy and obvious solution for this that you see, but I do not.

Something good

No good

Is it more common, or the best practice, to design several web pages to complete user profile data or a page divided into sections?

I realize that a site like LinkedIn is overwhelming and clumsy when I try to update my profile. I guess LinkedIn would hire some of the best developers in the world, but sometimes it feels slow and clumsy.

Facebook seems downright cryptic at times. Finding out the large amount of Google settings also seems somewhat "hostile to the user". The Twitter and GitHub profiles seem to be much easier to use and functional for my purposes. Dribbble and Instagram seem fortunately simple.

Is it just me? Does it have to be so cumbersome and exaggerated?

I wonder if this is mainly my experience, if there are best practices around this idea, if the LinkedIn website has "problems" from the point of view of the design experts, and if there are examples of "profiles" very well acts. write & # 39; websites that anyone could direct me to

Reductions – Reduce the exact coverage to the sum of subsets in practice!

The reduction of Exact Cover to Subset Sum has been previously discussed in this forum. What interests me is the practicality of this reduction, which I will discuss in section 2 of this post. For those who are not familiar with these problems, I will define them and show the Exact Cover reduction $ leq_p $ Subset of sum in section 1. For readers who are already familiar with these problems and the reduction can move forward to section 2.

section 1

the Exact cover It is defined as follows:

Given a family $ {S_j } $ of subsets of a set $ {u_i, i = 1,2, ldots, t } $ (often called the Universe), find a subfamily $ {T_h } subseteq {S_j } $ such that the sets $ T_h $ they are disjoint and $ cup T_h = cup S_j = {u_i, i = 1,2, ldots, t } $.

the Sum of subsets It is defined as follows:

Given a set of positive integers $ A = {a_1, a_2, ldots, a_r } $ and another positive integer $ b $ find a subset $ A & # 39; subseteq A $ such that $ sum_ {i in A & # 39;} a_i = b $.

For him reduction Exact cover $ leq_p $ Subset of Sum I followed the die by Karp R.M. (1972) Reducibility between combinatorial problems.

Leave $ d = | {S_j } | + $ 1, and let
$$
epsilon_ {ji} = begin {cases} 1 & text {if} & u_i in S_j, \ 0 & text {if} & u_i notin S_j, end {cases}
$$

so
$$
a_j = sum_ {i = 1} ^ {t} epsilon_ {ji} d ^ {i-1}, tag {1}
$$

Y
$$
b = frac {d ^ t-1} {d-1}. tag {2}
$$

section 2

In practice (ie, for real-world problems) the size of the Universe for the Exact Cover problem can be very large, for example. $ t = 100 $. This would mean that if I reduced the problem of Exact Cover to the sum of the Subsets, the numbers $ a_j $ content in the set $ A $ for the sum of subsets could be extremely large, and the gap between the $ min {A } $ Y $ max {A } $ Therefore, it can be huge.

For example, let's say $ t = 100 $ Y $ d = 10 $, then it is possible to have a $ a_j propto 10 $ {100} $ and other $ a_i propto 10 $. Implementing this on a computer can be very difficult since adding large numbers with small numbers basically ignores the small number, $ 10 ^ {16} + 1 – 10 ^ {16} = 0 $. You can probably see why this could be a problem.

So, is it possible to reduce Exact Cover to Subset Sum in a more practical way, to avoid large numbers, and that integers are $ A $ Are they of a more reasonable size?

I know it is possible to multiply both $ A $ Y $ b $ by an arbitrary factor $ c $ to escalate the problem again, but the fact remains the gap between the smallest possible whole and the largest $ A $ it is astronomical

Thanks in advance!