## Nikon: Is the exposure of my cameras incorrect every time I use the flash?

When using the flash in a non-automatic mode (aperture priority or speed), the camera assumes that the flash is used for filling and calculates the exposure for a photo without flash. So, if the subject is dark, this will increase the exposure and then a large flash will be added. Then, when using the flash, go to the full manual or use the "Program" mode of your camera.

## sql – Divide the time in Oracle – ORACLE

I have the following query, but I have a small problem.

``````   trunc(to_char(to_date(elapsed_time,'hh24:mi:ss'),'sssss')/EXECUTIONS,2)

ERROR at line 2:
ORA-01850: hour must be between 0 and 23
``````

That happens because elapsed_time is the sum of all queries and the value is greater than 24 h.

How can I divert the value?

If you wish, here are two queries, one about all elapsed_time and the other is the query with the problem, the query with the problem is a query that takes the average per execution

``````﻿--TOP QUERIES COM MAIOR ELAPSED_TIME
set pagesize 0 embedded on;
set linesize 3000;
col EXECUTIONS for a10;
COL sql_id for a20;
col FETCHES for a10;
col PARSE_CALLS for a15;
col elapsed_time for a20;
SELECT * FROM
(SELECT
sql_id,
TO_CHAR(TRUNC((elapsed_time/1000000)/3600),'FM9900') || ':' ||
TO_CHAR(TRUNC(MOD((elapsed_time/1000000),3600)/60),'FM00') || ':' ||
TO_CHAR(MOD((elapsed_time/1000000),60),'FM00') AS elapsed_time, --ESSE CAMPO É A SOMA DE TODO O TEMPO DE ESPERA, NAO DE APENAS UMA EXECUCAO
child_number,
to_char(executions) as executions,
to_char(FETCHES) as FETCHES,
to_char(PARSE_CALLS) as PARSE_CALLS,
FROM    gv\$sql
ORDER BY elapsed_time DESC)
WHERE ROWNUM < 10 ---top 10
/
``````

The query I want to build for a long time will come:

``````--MEDIA ELAPSED_TIME POR EXECUCAO
set pagesize 0 embedded on;
set linesize 3000;
col EXECUTIONS for a10;
COL sql_id for a20;
col FETCHES for a10;
col PARSE_CALLS for a15;
col TOTAL_ELAPSED_TIME_SECS for a40;
SELECT sql_id,elapsed_time,to_char(to_date(elapsed_time,'hh24:mi:ss'),'sssss') "TOTAL_ELAPSED_TIME_SECS",
EXECUTIONS,trunc(to_char(to_date(elapsed_time,'hh24:mi:ss'),'sssss')/EXECUTIONS,2) "AVG_TIME_BY_EXECUTION_SEC" FROM
(SELECT
sql_id,
TO_CHAR(TRUNC((elapsed_time/1000000)/3600),'FM9900') || ':' ||
TO_CHAR(TRUNC(MOD((elapsed_time/1000000),3600)/60),'FM00') || ':' ||
TO_CHAR(MOD((elapsed_time/1000000),60),'FM00') AS elapsed_time, --ESSE CAMPO É A SOMA DE TODO O TEMPO DE ESPERA, NAO DE APENAS UMA EXECUCAO
to_char(EXECUTIONS) as EXECUTIONS
FROM    gv\$sql
ORDER BY elapsed_time DESC)
WHERE ROWNUM < 10 ---top 10
/
``````

## GM Techniques: How to deal with a player who says no all the time?

### As always, there are two approaches: inside the game and outside the game.

Out of the game:

It is a cliché in this stack, but for one reason: Talk to this player about what he wants. As mentioned earlier, not biting the plot hooks could be a simple result of not finding those interesting hooks. I recommend trying this first because it is not clear to me that the problem player is necessarily forcing the games to stop (a similar situation could arise from other sources).

Explicitly asking this player in advance about what elements of the story they would be interested in pursuing could clarify the problem without problems. If the player does not have stories that interest him to follow, he can request that they make some decisions anyway; not doing anything at the table is not much fun, and apparently this player complains that there is no game, so they could be willing to move forward in the plot even if they don't have much personal interest in doing so.

If the player is totally willing to stop forcing the game to a halt, and you don't want to avoid it using a method in the game, then there really aren't many options that don't involve excluding the player altogether. Refusing to play or refusing to allow others to play the game is not a style of play.

The situation he describes, as written, suggests that this player is simply toxic for his table, and would be for any table. It is not 100% clear to me that this impression is correct (the editions to the question can clarify), but a "player" who refuses to bite on the hooks of the plot, refuses to present any plot that they would do chasing, and will not stop forcing the game to stop, is not a person with whom you can work to provide a fun game, nor would a football team with a quarterback who refuses to run or throw the ball.

In the game:

I have never had a player as tough as the one described in the question, but when a PC does not accept any of its plot hooks, a useful strategy is to offer an open option instead of a list of options:

OK, you have your character built, with a background story and motivations and everything. You are in (location), and you have rejected the job offers of the Adventurer's Guild, City Hall, the Society of Assassins, and a direct request for help from the Goddess of Plot Advancement. Then your character has an unstructured time ahead. What would you like to do?

The decrease of all plot hooks and the indications of the story can indicate all kinds of things, from a frustrating and uncompromising player, to unclear plot hooks, to stories that simply do not interest a particular player. Letting players develop their own goals can serve as a kind of reverse story warning: they tell you what adventures are about, and you build content around that.

As above, a player who resists everybody suggested stories and further He has nothing they want to do on their own, he doesn't have a "play style" because they are no longer players: they are rejecting any interaction with the game.

At that point, you have a couple of options, and to be clear, we are scraping the bottom of the barrel to find them. Trying to force someone to play a game that doesn't want to play is a bad place to be. These options are, in effect:

• Railroads The events of the story happen to the characters, and they are not in a
position to accept or reject anything. As an example, being kidnapped
and taken to some ritual site where they will be sacrificed means
that refusing to play leads directly to the death of the PC
• Cut the character of the decisions. If the player is alone
The contribution to decision making related to the plot in the game is to avoid
any decision made, but are still willing to play in
other capabilities (like participating in a battle), you might consider
giving their decisions a weight of zero. This means that the other
the players at the table are making every plot decision, and this
the player's character may come or not

None of these options is excellent, but I can't emphasize enough that this player has chosen specifically not to play the game, and prevent other people from playing it too.

## Color a graph with an odd number of vertices with colors \$ k \$ (which is close to \$ Delta \$) in linear time

We have a simple connected non-directed graph with an odd number of vertices. We also know the number $$k$$ which is actually the nearest odd number greater than or equal to $$Delta$$. (So ​​yes $$Delta$$ even, $$k = Delta + 1$$ plus $$k = Delta$$.) that is to say $$k$$ It is the least odd number that is greater than or equal to the degrees of all vertices.

We want to find a linear time algorithm that colors the graph with $$k$$ colors.

I am very new to graphic coloring algorithms. I know that a greedy algorithm is actually linear time and can color the graph with $$Delta + 1$$. But I can't guarantee that I can color it with $$k = Delta$$ when $$Delta$$ It is odd.
Also, we should probably use all the information the question gives us. that is, using an odd number of vertices in some way, but the greedy algorithm does not use this additional information.

How can i solve this?

## Postprocessing: Do I lose information every time I add an adjustment layer to an 8-bit image in Photoshop?

There may be less color in the result, yes. In a pixel, each color channel can take only one of 256 values ​​(2⁸). Each setting transforms these 256 values ​​into some other 256 values. But there is a restriction: for any pair of two input values, the highest value of the two must remain the highest (otherwise, an effect called solarization is obtained). If you use the curves, this means that your curve cannot go down from left to right.

Now, consider a value somewhere in the middle, for example 128. Its setting moves it to 140. The 128 values ​​below 128 are assigned to 128 new positions between 0 and 140 (of course, this means that some values ​​per below 140 will not be used, and the remaining 128 values ​​(128 and higher) are now assigned to 116 values, so it started with 256 values, and now has 128 + 116 = 244 values.

This can lead to what is called a comb histogram:

The previous histogram is a linear gradient in black and white, in which, using Curves, I moved 128 to 140. The spaces on the left are the 12 values ​​that are left empty (128 to 140) while the teeth on the right are result values ​​that correspond to two input values ​​(12 of them, 128 in 116).

Each adjustment of this type eats a little color. This is not too visible at the beginning because it has three color channels and the missing values ​​do not apply to all three channels at the same time (sometimes you can even get more colors …), but in flat areas with uniform colors you will get visible bands.

## performance: extraction of date and time from the database and optimization of a For loop

I'm learning Python and I'm looking for ways to make my code look more python.

My first problem is the conversion of a DateTime returned by a database.

``````try:
print("Getting most recent record from database")
get_max_date=fixfile.conn.execute('SELECT max(date) from sharehistory').fetchall()
get_max_date=get_max_date(0)(0)
get_max_date=dtime. strptime(get_max_date,'%Y-%m-%d %H:%M:%S')
day_start=get_max_date.strftime('%m%d%Y')
day_start=dtime.strptime(day_start, '%m%d%Y')
``````

As you can see, I get the Date, denoting it and converting it.
I guess there is a better way to do this.

Second, I have written 3 FOR loops to address very similar problems

`````` for div in table.find_all("tr", {'align':'right'}):
div.decompose()

for div in table.find_all("td", {'align':'right'}):
div.decompose()

for div in table.find_all("td", {'colspan':'8'}):
div.decompose()
``````

How can this be done more efficiently?

## pr.probability – Naive Monte-Carlo Convergence First Exit Time (Reference)

Leave $$X_t$$ be a $$d$$three-dimensional broadcast initialized in $$x in mathbb {R} ^ d$$; given as the strong solution for the SDE
$$X_t = x + int_0 ^ t a (t, X_t) dt + int_0 ^ t sigma dW_t;$$
where $$to$$ It is a predictable function $$sigma> 0$$Y $$W_t$$ It is an adapted Brownian movement. Suppose further that $$f$$ it is a limited continuous function of $$mathbb {R} ^ d$$ to $$mathbb {R}$$ and define a discrete time grid
$$0 = t_0 < points .

Leave $$D$$ be an open subset not empty and connected of $$mathbb {R} ^ d$$ with soft limit and containing $$x$$. I would like to know the convergence rate of the naive estimate of the Monte Carlo type
$$tau ^ {N, n} triangleq inf_ {i = 1, dots, N} t_i cdot I left (X_t ( omega_i) not in D right) + infty cdot I left (X_t ( omega_i) not in D right)$$
at the actual stop time $$tau triangleq inf left {t> 0: , X_t not in D right }$$?

Where is this type of problem studied (that is, references are appreciated)?

## Nikon: Does my camera's exposure break every time I use the flash?

No matter what setting my camera has whenever I use the flash, the exposure is very high. I try to change my ISO and Aperture to but it doesn't help. I have a Nikon D3400, could it be a problem with the sensor? It worked just a few days ago and I picked it up again to find it completely messy. As long as I don't use the flash, it works perfectly, but what could be wrong?

## Time complexity of the optimal algorithm to solve this problem

Given a $$N times N$$ matrix $$M$$ whose elements are integers, find the largest element that occurs in each row of the matrix.

I tried using hashtable as follows:

The idea is to use hash-table (let's call it $$ht_1$$) to track the occurrence count of each item.
Now, to handle the case where the element is repeated in the same row, we use another hash table (call this $$ht_2$$) Now before making increases in $$ht_1$$ We check if this item has already been produced in this row or not. If not, then and then we make increases in $$ht_1$$.

Then, once you have finished processing the entire matrix as described above, pass one more pass in the matrix and this time keep track of the maximum element you have exactly $$N$$ occurrence as noted $$ht_1$$.

So, in general, this works $$O (N ^ 2)$$ expected time.

But because of the use of the hash table, the worst time complexity remains $$O (N ^ 4)$$.

Now, I wonder, can I do better than this? It means that there is some way to solve in $$O (N ^ 2)$$ In the worst case.

Note: There is no other restriction on this.