text:
# Checking if Body is surrounded by other Bodies

I'm trying to make a game like Rampart as practice. I have gotten to the point where I want to check if the castle is surrounded by walls and decide whether to fill in the area and continue the game, but I have no idea how to do this. I have thought about ray-casting from the castle but it wouldn't work if there was a bend in the walls.

So any help or suggestions would be great!

• Is this the game you are referring to? – NauticalMile Apr 6 '15 at 21:47
• Yes it is! I Think It Is Cool! – GammaS Apr 7 '15 at 1:30
• How are your walls represented in box2d? b2EdgeShapes? b2ChainShapes? b2PolygonShapes? Also, are you using bodies with single fixtures or multiple for the walls? Are there discrete locations where walls can be placed? (e.g. only at 90 degree angles and can only be placed at half meter increments) Or can walls be placed anywhere? A screenshot would really help too. – NauticalMile Apr 7 '15 at 20:48

I think easiest way to solve this is to use very simple maze solver tactic. That is the "wall follower".

• Find wall
• Put your hand on the wall, either left or right of you
• Keep hand on wall
• Start moving
• Never let go off the wall, if there is a turn, you turn with the wall and if its "dead end" you turn but you still keep your same hand on the same side ( ie. left or right of you )

Eventually, you will find your way out.

So, how does this help you? You have to check after every wall placement, if you can walk around the wall ( either inside or outside, does not matter ) by walking near the wall until you get back to your starting point. However, it's easier to follow from inside so you can check the location of you newly place wall and go tile by tile towards the castle and find empty spot. That way you know you should be inside the walls.

1. Place wall
2. Find open spot near the wall
3. Check where the wall is considering your position now ( up,left,down or right)

Then, for example if

1. Wall is below you
2. Move left
3. If there is wall below you, goto 5
4. if there is NO wall below you, there might be turn to down, so move down.
5. There should be wall on the right side now, if not break out and fail
6. Move down with the same logic.

Google for: wall follower algorithm or something like that, to find examples

Maze_solving_algorithm -wikipedia

Keep the hand on the wall.

Floodfill from the castle.

• If the fill reaches an edge of the map: castle is not surrounded by walls
• If the fill does not reach the edge of the map: castle is surrounded by walls

Alternatively, you could use a pathfinding algorithm to check if there is a path between the castle and a point that must be outside the walls.


text:
20 questions linked to/from Understanding the Bloch sphere
147 views

### Prove that qubits can be represented on a unit sphere, avoiding the density matrix formalism [duplicate]

The Bloch Sphere is regarded as the most "intuitive" way of explaining a 2-level quantum system in computation and rotations of states described on Bloch sphere provides a really easy ...
166 views

### What is the physical intuition for Bloch Sphere? [duplicate]

I am very confused about how to think about the Bloch Sphere. How can we relate the concept of expectation value to the Bloch sphere? If my state lies in let's say $yz$ plane how can we say that ...
3k views

### How are quantum qubits implemented? [duplicate]

Its very easy to pull a logic gate or transistor circuit of the internet for example and begin to understand how it represents physical bits, by either having 5V across the circuit or below 3.3V. But ...
499 views

### Interpretation of rotating a quantum state

I'm currently taking an introductory quantum mechanics course, where the last covered topic was spin and identical particles. During some reading online, I stumbled across the term "rotating a quantum ...
2k views

709 views

format: plain


text:
# Problem 0.11Which problem in problem set shows that En is invariant under the action of Zn_ We use the notation

###### Question:

Problem 0.11 Which problem in problem set shows that En is invariant under the action of Zn_ We use the notation of definition 0.27_ Show that Ez" = {(9.9 ... 9) 9" = e}. Thus when G is finite IEZ | = I{g â‚¬ G : 9" = e}l:

#### Similar Solved Questions

##### Question 10 [2.2 pts] Which one of the following statements corect?Spectra and are due l0 compounds W and respectively Spectra and are due compounds X ad W respectivelyCompound WCompound XSPECTRUMBH (phenyl protons)SPECTRUM
Question 10 [2.2 pts] Which one of the following statements corect? Spectra and are due l0 compounds W and respectively Spectra and are due compounds X ad W respectively Compound W Compound X SPECTRUM BH (phenyl protons) SPECTRUM...
##### Hi I have 4 problems below I need done ASAP, if you could upload them one...
Hi I have 4 problems below I need done ASAP, if you could upload them one by one by order you finish them instead of all at once that would be appreciated, I need this done in basic c++ code, all of the body structure are below I just need codes to be implemented for the codes to give the write outp...
##### Use double-angle identities to write each expression, using trigonometric functions of $\theta$ instead of 4$\theta .$ $\sin 4 \theta$
Use double-angle identities to write each expression, using trigonometric functions of $\theta$ instead of 4$\theta .$ $\sin 4 \theta$...
##### The endosperm of seed was formed by which part of the fertilizedembryo sac?choose one option and explainthe fertilized synergid cellsthe fertilized antipodal cellsthe fertilized egg cellthe fertilize cell with the two polar nuclei
The endosperm of seed was formed by which part of the fertilized embryo sac? choose one option and explain the fertilized synergid cells the fertilized antipodal cells the fertilized egg cell the fertilize cell with the two polar nuclei...
##### Write any five difference between galvanic cell and electrolytic cell?
Write any five difference between galvanic cell and electrolytic cell?...
##### What is the product of the 2 KO Bu HBr. t1j ROOR following reaction cojuanbas
What is the product of the 2 KO Bu HBr. t1j ROOR following reaction cojuanbas...
##### Find the limit or show that it does not exist. $\displaystyle \lim_{x \to \infty} \frac{x^4 - 3x^2 + x}{x^3 - x + 2}$
Find the limit or show that it does not exist. $\displaystyle \lim_{x \to \infty} \frac{x^4 - 3x^2 + x}{x^3 - x + 2}$...
##### Business perspective: Are the following countries civil law or common law countries? What are some of...
Business perspective: Are the following countries civil law or common law countries? What are some of the implications of this? -United States of America -Canada -Spain...
##### Course learning outcome assessment problem B A simple random sample of 51 recorded speeds (in mph) is obtained from cars traveling on a section of Highway 605 in Los Angeles_ The Sample has a mean of 57 mph and a standard deviation of mph: Use a 0.01 significance level to test the claim that the mean speed of all cars on that section of Highway 605 is greater than the posted speed limit of 55 mph
Course learning outcome assessment problem B A simple random sample of 51 recorded speeds (in mph) is obtained from cars traveling on a section of Highway 605 in Los Angeles_ The Sample has a mean of 57 mph and a standard deviation of mph: Use a 0.01 significance level to test the claim that the mea...
##### (Continuation of Example $3 . )$ The error bounds for $E_{T}$ and $E_{S}$ are "worst case" estimates, and the Trapezoidal and Simpson Rules are often more accurate than the bounds suggest. The Trapezoidal Rule estimate of $\int_{0}^{\pi} x \sin x d x$ in Example 3 is a case in point. a. Use the Trapezoidal Rule with $n=10$ to approximate the value of the integral. The table to the right gives the necessary y-values. b. Find the magnitude of the difference between $\pi,$ t
(Continuation of Example $3 . )$ The error bounds for $E_{T}$ and $E_{S}$ are "worst case" estimates, and the Trapezoidal and Simpson Rules are often more accurate than the bounds suggest. The Trapezoidal Rule estimate of $\int_{0}^{\pi} x \sin x d x$ in Example 3 is a case in po...
##### A woman who is heterozygous for normal vision marries a man with normal vision. If they...
A woman who is heterozygous for normal vision marries a man with normal vision. If they have a girl, what is the probability she is colorblind? And what if it is a boy?...
##### Write a system of equations associated with the augmented matrix Do not try to solve.:J;H[: OA: ~Ax=2 xty=4 Tx - Sy= - 4 0 B. ~Ax+y+z=2 X-5y=4 Oc ~Ax+y=2 X+ 4y=4 7x-5v=
Write a system of equations associated with the augmented matrix Do not try to solve. :J;H[: OA: ~Ax=2 xty=4 Tx - Sy= - 4 0 B. ~Ax+y+z=2 X-5y=4 Oc ~Ax+y=2 X+ 4y=4 7x-5v=...
##### Dependent Event P(B)=0.70 P(B')=0.30 P(A and B)=0.63 P(A l B) = 0.90 0.36 of set is...
Dependent Event P(B)=0.70 P(B')=0.30 P(A and B)=0.63 P(A l B) = 0.90 0.36 of set is neither A nor B Find P(A' l B')...
##### Which of the following is a way that protein function can be modified AFTER translation? Select...
Which of the following is a way that protein function can be modified AFTER translation? Select one: a. gene duplication b. gene rearrangement c. protein cleavage d. exon shuffling e. transcription regulation...
##### Symmetry 1,3-bist adjene Confirmation ζ-γanς S — gauche S - Cig CH. Calculated EWUgy (Hartree /powtide)...
Symmetry 1,3-bist adjene Confirmation ζ-γanς S — gauche S - Cig CH. Calculated EWUgy (Hartree /powtide) -155,992 (H/e ) -155.986488 -155.9 85 94 Calculated Energy kcal/mol - 9182 6.4 -91882.9 -q1882.6 Re \cative Eneroy Dihedral (Kla\ /mo) C2V Angle () 180° 456 tajisted (v...
2_ Let X and Y have joint density function Jly+x) 0<*< =(x)f O<y < 2 (o,otherwise (e Find the value ofk that makes this a pdf 5,5.k(y+r) didy $'klh+} {-ce)4)1 uil (q Find f,(x) and fs(y)... 5 answers ##### In your molecules from part B, circle the functiona groups that can participate in hydrogen bonding (4 pts)The illustration below shows what the surface ofa TLC plate looks like on molecular level. The silica coating has exposed-OH groups that can participate in hydrogen bonding:Use the silica surface below to draw two ofthe molecules from part B undergoing hydrogen bonding with the plate. Show lone pairs on the molecules when you re-draw them below (8 pts).O-Si-O: Si 0 0-Si-Q: 0 O-Si-O:0-Si-O: In your molecules from part B, circle the functiona groups that can participate in hydrogen bonding (4 pts) The illustration below shows what the surface ofa TLC plate looks like on molecular level. The silica coating has exposed-OH groups that can participate in hydrogen bonding: Use the silica sur... 5 answers ##### Instruction: Write down all your work and carefully justify your answer. Unsupported answer will not get any credit: Hand in your solution on Dec Ith before class: Late submission will not be accepted. This problem set is worth 5 points.Question 1_ We have sample 7,8,8,8,9,11,12,13,14,15. Find the sample mcan _ 2. Find the sample median and mode: 3. Find the sample variance and standard deviation Instruction: Write down all your work and carefully justify your answer. Unsupported answer will not get any credit: Hand in your solution on Dec Ith before class: Late submission will not be accepted. This problem set is worth 5 points. Question 1_ We have sample 7,8,8,8,9,11,12,13,14,15. Find ... 5 answers ##### Ura Ine comooun ] Inurosl Ioru 1 Aspl%J" aA-Po"_ Ediu tq ploblm Gme Rond Anarene canntril Fnd Iho occumulniod vaiuc l un rioctitont ol 510 QQD Icx 4 yearg H In IKolest tle 6" , I Uc nommwi 04 compourlad qurdery cnluaura coripoundod monlry cnpoindedVannt [3"nccuinulaled value Trn Mnigycomplurkag quareny?(Round YOU: ateul tlles no; (0at Iho Weculnulal } valuc |Lent / Ioluy coinpoul Iod injncly"(Rpind your aneyict Ia Ino nuatuat Cogit )Wlil Ihg ucclU aied vale dtne namsy Ura Ine comooun ] Inurosl Ioru 1 Aspl%J" aA-Po"_ Ediu tq ploblm Gme Rond Anarene canntril Fnd Iho occumulniod vaiuc l un rioctitont ol 510 QQD Icx 4 yearg H In IKolest tle 6" , I Uc nommwi 04 compourlad qurdery cnluaura coripoundod monlry cnpoinded Vannt [3" nccuinulaled value T... 5 answers ##### Determine if each trial can be considered an independent Bernoulli trial for the following situations_ (a) Cards dealt in a hand of poker: Yes, this can be considered an independent Bernoulli trial, No, this cannot be considered an independent Bernoulli trial.(b) Outcome of each roll of a die Yes, this can be considered an independent Bernoulli trial, No, this cannot be considered an independent Bernoulli trial. Determine if each trial can be considered an independent Bernoulli trial for the following situations_ (a) Cards dealt in a hand of poker: Yes, this can be considered an independent Bernoulli trial, No, this cannot be considered an independent Bernoulli trial. (b) Outcome of each roll of a die Yes, ... 1 answer ##### Which of the following monomers is NOT correctly matched with an appropriate corresponding polymer? all of... Which of the following monomers is NOT correctly matched with an appropriate corresponding polymer? all of these are correctly matched. nucleotide; RNA amino acid; starch nucleotide; DNA monosaccharide; glycogen Question 21 In 2013, scientists in Europe discovered a new organelle in grapes that they... 1 answer ##### 8 Andy Eggers has invested$150,000 in a privately held family corporation. The corporation does not...
8 Andy Eggers has invested $150,000 in a privately held family corporation. The corporation does not do well and must declare bankruptcy. What amount does Eggers stand to love? a. Up to his total investment of$150,000. b. Zero. c. The $150,000 plus any personal assets the creditors demand. d.$100,...


text:
cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

SOLVED
Newbie

## Option to set radius value for the size of the break in dimension extensions lines

I have found that sometimes the value is set, sometimes not. Where can I define the value? So far I could not find any configuration option.

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: Option to set radius value for the size of the break in dimension extensions lines

Hello Joshua,

it seems the value of the DTL option wittness_line_offset is used by default.

Regards,

Gunter

2 REPLIES 2

## Re: Option to set radius value for the size of the break in dimension extensions lines

Hello Joshua,

it seems the value of the DTL option wittness_line_offset is used by default.

Regards,

Gunter

Highlighted

## Re: Option to set radius value for the size of the break in dimension extensions lines

Yes that's right, but this option also defines the distance of all witness lines to the body edge. Unfortunately this distance according to DIN is defined 0.


text:
# Solve the following linear equation. Show all steps.-8n + 4(1 + 5n) = -6n - 14Check your solution to the linear equation from problem 4 by substituting and evaluating both sides of the equation. Show all steps.

Question

Solve the following linear equation. Show all steps.
-8n + 4(1 + 5n) = -6n - 14

Check your solution to the linear equation from problem 4 by substituting and evaluating both sides of the equation. Show all steps.


text:
Question 13.16:-

Addition of HBr to propene yields 2-bromopropane, while in the presence of benzoyl peroxide, the same reaction yields 1-bromopropane. Explain and give mechanisms.

Addition of HBr to propene is an example of an electrophilic substitution reaction.
Hydrogen bromide provides an electrophile, H+. This electrophile attacks the double bond to form 1° and 2° carbocations as shown:

Secondary carbocations are more stable than primary carbocations. Hence, the former predominates since it will format a faster rate. Thus, in the next step, Br– attacks the carbocation to form 2 – bromopropane as the major product
${H}_{3}C-\stackrel{+}{CH}-C{H}_{3}+Br\to C{H}_{3}-\underset{Br}{CH}-C{H}_{3}$
2-Bromopropane
This reaction follows Markovnikov’s rule where the negative part of the addendum is attached to the carbon atom having a lesser number of hydrogen atoms. In the presence of benzoyl peroxide, an addition reaction takes place anti to Markovnikov’s rule. The reaction follows a free radical chain mechanism as:

Secondary free radicals are more stable than primary radicals. Hence, the former predominates since it forms at a faster rate. Thus, 1 – bromopropane is obtained as the major product.

In the presence of peroxide, Br free radical acts as an electrophile. Hence, two different products are obtained on addition of HBr to propene in the absence and presence of peroxide


text:
Some Bright Spots For AOL, Yes, But Also More Gloom Ahead

AOL (NYSE: AOL) offered some positive signs in its earnings release this morning — total advertising dollars rose for the first time since ’08, display was up double digits overall and in the U.S. But when it warned investors that the surge wasn’t likely to be extended into Q3, that was all investors needed to hear to send the stock plummeting until it recovered some ground later in the day. After a tremendous amount of volatility the last two days, that’s all it took for shaken investors to run for the hills. While there are some positives in AOL’s story, the next few months do not hold out much promise to relieve investors’ worries.

In an interview, CFO Artie Minson told paidContent that AOL saw no ad growth year-over-year in June and that July was looking the same. On top of that, the integration of the Huffington Post into AOL continued through those months, which also contributed to a slowdown.

As a result, although AOL believes it will reach profitability this year, it has pulled back on the forecast. It now expects a profit of roughly $355 million in constrast to something in the range of$425 million earlier. By the end of Tuesday, AOL’s stock price stood at \$12, which represented a rise of 7.24 percent after falling nearly 30 percent in the hours before.

AOL has been pinning its revenue gains on driving more premium brand advertising both through its third party network and its owned and operated sites. Typically, when the economy weakens, marketers tend to reduce brand spending and concentrate more on lead generation and direct response, which are naturally cheaper and provider a clearer sense of ROI.

I asked CEO Tim Armstrong what his thoughts on the digital ad market at this point, given all the dark clouds hanging over the economy and the increased volatility in the ad market.

“Digital always has an advantage, even when there’s the chasm between consumer usage that the digital migration of ad dollars,” Armstrong said. “Overall, digital will fare as well if not better than the other ad media sectors. I would hope that the economic issues we’re faced with get cleared up quickly. When the macro-economy is unstable, it does slow marketers’ planning down. But most of our customers are locked and loaded on their 2012 planning, so I hope it keeps up at a strong rate.”

In recent weeks, AOL has reorganized its ad team, jettisoning global ad chief Jeff Levick, a former Google (NSDQ: GOOG) colleague of Armstrong’s, and replaced him with Ned Brody, who had previously been in charge of the network side of the business and is now chief revenue officer.

Was the change at the top a reflection that perhaps things weren’t going so well, despite display rising 14 percent and the Project Devil interactive branding ad formats being largely well-received?

Armstrong was a bit indirect, saying only, “One thing we’ve proven is by changing AOL when we need to, we continue to increase the operational output and strength of the company. You’re only seeing us make changes when we either know or think very strongly that it’s going to have an operational improvement. That was the driver that was very plain and simple on our side. It’s going to allow us to capture more demand in the marketplace.”


text:
# How to prove that only a particular function satisfies some properties?

Prove that $f(n) = 1 - n$ is the only integer valued function defined on integers such that $f(f(n)) = n$ and $f(f(n + 2) + 2) = n$ for all $n \in \mathbb{Z}$ with f(0) = 1

• I tried applying f again to the second condition and obtained f(n + 2) + 2 = f(n), then tried generalizing it using induction but I am unable to proceed – saisanjeev Jul 12 '17 at 8:36
• What you've found is a concrete link between $f(n)$ and $f(n+2)$, for any $n$. That means if you know what $f(0)$ is, then you can tell what $f(2)$ is. But then you know what $f(2)$ is, and can therefore tell what $f(4)$ is. Do you see how induction follows naturally from here? The cases for odd or negative $n$ follow similiarily. – Arthur Jul 12 '17 at 8:46

Let's prove by induction that for all $n \ge 0$ you have $f(n)=1-n$.
Basic step: for $n=0$ $$f(0)=1=1-0$$ and for $n=1$ $$f(1)=f(f(0))=0=1-1$$
Inductive step: for $n \ge 2$ $$f(n)= [f((n-2)+2)+2]-2 = f(n-2)-2 = 1-(n-2)-2=1-n$$ And the proof is concluded.
A similar argument can be used to prove the equality for $n <0$.
• How is that the answer, he was asking for the unicity of $f$. – Furrane Jul 12 '17 at 9:59
• @Furrane The only function satisfying those conditions is $n \mapsto (1-n)$. It is unique. – Crostul Jul 12 '17 at 11:48


text:
# Uniform boundedness of weak solution

Let $$u_n\in W_{0}^{1,p}(\Omega)$$ be a positive weak solution of the equation: $$-\Delta_p u=\frac{f_n(x)}{(u+\frac{1}{n})^\delta}\text{ in }\Omega.$$

Let $$p=N$$ and $$f\in L^m(\Omega)$$ for some $$m>1$$. Then how $$u_n$$ is uniformly bounded in $$W_{0}^{1,p}(\Omega)$$. This result is proved in Lemma 4.5 in the following article: https://link.springer.com/content/pdf/10.1007%2Fs00030-016-0361-6.pdf

Can you help me with it. It is written as a simple fact.

Here $$\Omega$$ is a bounded smooth domain in $$\mathbb{R}^N$$, $$f$$ is a nonnegative but not identically zero function in $$\Omega$$.

Okay, as you written the result is proved in the article for $$1 < p < N$$. They say that the case $$p=N$$ can be proved similarly. You are now asking about this case.

Remember that $$\Omega \subset \mathbb{R}^N$$ and $$\Delta_N u = \text{div}(|\nabla u|^{N-2} \nabla u).$$ The Sobolev inequality tells us that $$W^{1,N}_0$$ is embedded in $$L^q$$ for all $$q\geq 1$$.

Then

\begin{aligned}\|\nabla u_n\|_{L^N}^N = \int |\nabla u_n|^{N-2} \nabla u \cdot \nabla u= -\int \Delta_N u_n \cdot u_n &=\int \frac{f_n u_n}{(u_n+\frac{1}{n})^\gamma} \\ &\leq \int f_n u_n^{1-\gamma} \\ &\leq \|f\|_{L^m} \|u_n^{1-\gamma}\|_{L^{m'}} \\ &=\|f\|_{L^m} \|u_n\|_{L^{(1-\gamma)m'}}^{1-\gamma} \\ &\leq C \|f\|_{L^m} \|\nabla u_n\|_{L^N}^{1-\gamma} \end{aligned}

Hence

$$\|\nabla u_n\|_{L^N} \leq (C \|f\|_{L^m})^{\frac{1}{N+\gamma-1}}.$$

• Ok. I agree but one confusion is that suppose we have given $m>1$ and $\gamma\in(0,1)$. Then to us ethe above embedding theorem one need that $(1-\gamma)m'\geq 1$. Why this is true? – Mathlover Jan 15 at 19:09
• Please help me with this argument. I have understood all the arguments except this. Thank you very much. – Mathlover Jan 15 at 19:13
• I have got. If this is less than 1 then using Holder inequality one can get the uniform bound. Thanks. – Mathlover Jan 18 at 7:05


text:
Showing:
Handle Score
@Ibrahim Nash 6420
@mb1973 5642
@Quandray 5233
@akhayrutdinov 5111
@saiujwal13083 4510
@sanjay05 3762
@kirtidee18 3673
@marius_valentin_dragoi 3522
@sushant_a 3459
@verma_ji 3413
Strongly connected component (Tarjans's Algo)
Hard Accuracy: 39.0% Submissions: 2439 Points: 8

Given a Directed Graph with V vertices and E edges, Find the members of strongly connected components in the graph.

Example 1:

Input:

Output:
0 1 2,3,4,
Explanation:

We can clearly see that there are 3 Strongly
Connected Components in the Graph as mentioned
in the Output.

Example 2:

Input:

Output:
0 1 2,
Explanation:
All of the nodes are connected to each other.
So, there's only one SCC as shown.

You don't need to read input or print anything. Your task is to complete the function tarjans() which takes the number of vertices V and adjacency list of the graph as input parameters and returns a list of list of integers denoting the members of strongly connected components in the given graph.
Note: A single strongly connected component must be represented in the form of a list if integers sorted in the ascending order. The resulting list should consist of a list of all SCCs which must be sorted in a way such that a lexicographically smaller list of integers appears first.

Expected Time Complexity: O(V + E).
Expected Auxiliary Space: O(V).

Constraints:
1
105
1
105
0
u, v N-1

### Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

#### My Submissions:

Strongly connected component (Tarjans's Algo)


text:
# Tag Info

It's not only possible, it's explicitly recommended (see Ruxton & Beauchamp 2008). First, if the omnibus-test of homogeneity across all groups is not of interest (e.g. the over all ANOVA $F$-test), consider not paying attention to it at all or not doing it in the first place. Second, if each planned comparison tests a different specific hypothesis, it is ...


text:
# QMK firmware on the planck light keyboard

One of the many little hobbies I’ve picked up over the years is mechanical keyboard building and programming. I was originally interested in programming Arduino microcontrollers, and was excited to see that people were using small arduinos to make keyboards that have all sorts of secret programmable features (and really nice buttons). Over the years I’ve put together a small but nice collection of mechanical keyboards in different shapes and sizes. I’m using an especially weird one to write this post today.

The Planck Light was listed on Massdrop almost a year ago as an ortholinear backlight portable ultralight fully programmable mechanical keyboard. The drop had some major issues. The boards came functional but lacking bootloaders. That meant that, while they could be used, they could not be customized. The stabilizer on the spacebar was also not perfect, and I found myself wanting to reprogram the board to move the spacebar over to one of the function key spots. Today, I received a programmer from Massdrop that let me flash a new bootloader onto the board, fixing this problem. I’m also going to solder two regular size switches in place of the current defunct spacebar. These issues taken care of, I think that the board will actually be a very pleasant daily driver. The ortholinear layout takes some getting used to, but it’s nothing I won’t be able to adjust to over time.

Programming this little board can be challenging, so I figure I’ll post a very quick outline of how it’s done.

1. Clone the QMK repository from Github. QMK firmware is the best available for mechanical keyboards these days.
2. Navigate to the keyboard subfolder of choice and dive into a layout subfolder, usually the default one
3. Make a copy of the original layout files for safekeeping, then make tweaks to the layout as necessary. QMK documentation is great for figuring out tricky commands such as backlight control or audio. Below is a screenshot of a piece of my current layout.
4. In terminal, navigate to the QMK folder and type make keyboard/subkeyboard:layout. If you have all the necessary dependencies installed (a process expedited by the QMK toolbox program, if I recall) the firmware should be built up leaving a .hex file in the base QMK directory.
5. Use QMK Toolbox to flash the firmware. This will usually require resetting the keyboard into DFU mode either by pushing a hardware button or a certain combination of keys. Be sure to select the proper microcontroller. My Planck Light uses the 1286 microcontroller shown selected in the image below.

And there you have it! Programming the Planck Light. I can write a quick post about flashing the bootloader with Massdrop’s programmer if it would be helpful to anyone else out there, but to be honest it’s really a one shot deal so I don’t think it’s worth my time to make a record of it for my own future use. For now keep an eye out for more keyboard posts in the future, you two people who Google tells me found my site so far.


text:
## 4.1 Some rules of thumb

The Normal distribution contains some very useful properties which we can use as rules of thumb. This is best explained via an example. Let us again consider a continuous random variable $$X$$ that denotes the height in cm of university students. For argument's sake, let us further assume that $$X$$ is Normally distributed with:

• $$\text{E}(X) = \mu = 172.38$$
• $$\text{SD}(X) = \sigma = 9.85$$

We can express the distribution of an arbitrary normally distributed random variable $$X$$ as $$X \sim N(\mu, \sigma^2)$$. Therefore, we can succinctly write down the distribution of the height variable $$X$$ as:

• $$X \sim N(172.38, 9.85^2)$$

Three very useful rules of thumb are as follows:

Some rules of thumb for an approximately normal data set

1. About 68% of values are within 1 standard deviation of the mean
2. About 95% of values are within 2 standard deviations of the mean
3. About 99.7% of values are within 3 standard deviations of the mean

Considering here that the mean is $$172.38$$ and the standard deviation is $$9.85$$, we can apply these rules of thumb as follows:

1. About 68% of students' heights are within the range $$172.38 \pm 1\times9.85 = (172.38 - 9.85, 172.38 + 9.85) = (162.53, 182.23)$$
2. About 95% of students' heights are within the range $$172.38 \pm 2\times 9.85 = (172.38 - 19.7, 172.38 + 19.7) = (152.68, 192.08)$$
3. About 99.7% of students' heights are within the range $$172.38 \pm 3\times 9.85 = (172.38 - 29.55, 172.38 + 29.55) = (142.83, 201.93)$$

This is visually represented in the below plot:


text:
# How to calculate crystal field stabilisation energy?

How to calculate it? I know that it depends on the coordination compound and the number of electrons present in t2g and eg orbitals and the final answer is expressed in terms of crystal field splitting parameter. But, how to know how many electrons are there in t2g and eg orbitals?

I think rather than a broad answer and example would help. So, consider the compound $\ce{[Ni(CO)4]}$ and how to calculate CFSE for it?

• forgot to mention wether the election is in high spin or low spin..if low spin d electrons will first fill up the t2g level then the eg level.rest is same . – user4206 Jan 18 '14 at 5:23

Step 1: Look up Nickel Carbonyl and find out what geometry it has.

We need the geometry to know how the $d$ orbitals will split in the ligand field. The geometry can also be predicted: late transition metals with strong field ligands tend to be tetrahedral.

Step 2: Find the appropriate crystal field splitting diagram for this geometry.

Step 3: Figure out how many $d$ electrons there are.

Nickel is in Group 10, with a configuration of $\ce{[Ar]}4s^2 3d^8$ or $\ce{[Ar]}4s^1 3d^9$. In coordination compounds we will consider this configuration to become $\ce{[Ar]}4s^2 3d^8 \implies \ce{[Ar]}3d^{10}$. The $s$ electrons are considered to move to the $d$ sub-shell in bonding - bonding need not represent ground state atomic electron configurations just group state molecular electron configurations. For more information on $d$ electron count, go to this Wikipedia page.

Step 4: Fill in the $d$ electrons.

You can do this part yourself. How do you put 10 $d$ electrons in the orbital diagram?

Step 5: Determine $\Delta E$.

$\Delta$ is the energy different between the $e_g$ and $t_{2g}$ sets of orbitals. This Wikipedia page walks through an octahedral complex. In tetrahedral complexes, the energy of the $e_g$ orbitals is lower and the energy of the $t_{2g}$ orbitals is higher. The energies are:

• $e_g \ (d_{x^2-y^2},\ d_{z^2}) \ E=-\frac{3}{5}\Delta_\textrm{tet}$ (stabilized)
• $t_{2g} \ (d_{xy},\ d_{xz},\ d_{yz}) \ E=\frac{2}{5}\Delta_\textrm{tet}$ (destabilized)

Then multiply the numbers of electrons in the orbitals by the stabilization/destabilization values, and sum.

$$\Delta E = 4\times\left(-\frac{3}{5}\Delta_\textrm{tet}\right)+6\times\left(\frac{2}{5}\Delta_\textrm{tet}\right)=?$$

We have to see the $d$-orbital of the metal atom how many electrons there are, but in excited state not in ground state; then see the spins whether it is low spin or high spin because $d$-orbital is divided into $t_{2g}$ and $e_g$ with respect to their energies difference then apply the formula. The formula is

$$\mathrm{no.\ of\ electrons\ in\ t_{2g}\cdot(-0.4)}+\mathrm{no.\ of\ electrons\ in\ e_g\cdot(0.6)}$$

Example: I have $\mathrm{[Co(F)_6]^{3-}}$ now see cobalt has $3d^7$, $4s^2$ system in ground state but in excited state it loses three electrons in the formation of ions and two elctrons from $4s$ and one from $3d$ orbital so thus Cobalt gets $3d^6$ configuration. Now it is of high spin so $4$ electrons go to $t_{2g}$ orbital and $2$ electrons go to $e_g$ orbital. By applying formula,

$4(-0.4)+2(0.6)=-1.6+1.2=-0.4$

• Thanks for your answer. Could you format it a bit better, it's a bit confusing as it stands. – jonsca Dec 19 '13 at 0:18

The process is quite simple. .. to determine CFSE we need to know that the diffidence of energy levels of two sets have been arbiter taken as 10 dq. . Where t2g set is more stable then eg set octahedral and vice versa in tetrahedral complex. -0.4x + 0.6y will help to calculate it. X indicates electrons in t2g and y in eg. Sum up all and find the diffidence ... That gives cfsc Usually tetrahedral splitting is shown in terms of octahedral as 4/9 OS


text:
#### Randomized Riemannian Preconditioning for Quadratically Constrained Problems

##### Boris Shustin, Haim Avron

Optimization problem with quadratic equality constraints are prevalent in machine learning. Indeed, two important examples are Canonical Correlation Analysis (CCA) and Linear Discriminant Analysis (LDA). Unfortunately, methods for solving such problems typically involve computing matrix inverses and decomposition. For the aforementioned problems, these matrices are actually Gram matrices of input data matrices, and as such the computations are too expensive for large scale datasets. In this paper, we propose a sketching based approach for solving CCA and LDA that reduces the cost dependence on the input size. The proposed algorithms feature randomized preconditioning combined with Riemannian optimization.

arrow_drop_up


text:
View Single Post

Mentor
 Quote by Vanadium 50 If you took a bucket of stopped pions, and could very, very accurately measure the electron energy in the decay π→e+v, you would see three peaks, one for each of the mass eigenstates. Essentially, there are three different decays: π→e+v1, π→e+v2, π→e+v3.
 Quote by robert2734 Isn't electronness conserved?
No. We know this because neutrino (flavor) oscillations exist. An antineutrino that was created together with an electron, e.g. in nuclear beta decay, can be absorbed in a reaction that produces a muon.

My interpretation of the mathematics is that if you could select a neutrino with a particular mass by measuring the electron energy precisely in the decay that V50 describes, then that neutrino would be a mixture of e, μ and τ neutrino states, at least from the moment that you measure the electron energy.

Furthermore, it would be a non-oscillating mixture because it would be a pure mass state. The probabilities of getting an e, μ or τ when the neutrino interacts, would be constant, and not vary with position or time as with neutrino oscillations.


text:
## Contains Duplicate III

Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i and j is at most k.

### Analysis:

At the first glance, it is natural to think that "using two loops to search every two elements within distance k" to solve this problem. However, the O(n^2) time complexity is not accepted for OJ.

Here is how I think of the problem, since it is asking for whether two indices exists ... , we have to search the array in some way.  There are two constrains:  one is related to element values in the array, the other is related to indices.  So, we have to consider the two at the same time when checking one pair of elements. In other words, we have to know the element value and the element index at the same, and using some strategy, to scan the array and find if there is any pair satisfy the constrains.

Let's take an example, say the array is A = [3,6,0,4], and we set t = 2, k =2.
Let's sort the array according to the value,
the values of the array becomes:  A' = [0, 3, 4, 6]
the indices of the array becomes:  I' = [2, 0, 3, 1]
We rewrite them into one array:
P = [(0,2), (3,0), (4,3), (6,1)]

Now we are searching the pairs, starting from the first pair:
(0, 2) where 0 is the value 2 is the index.

Now we have pair  P[i] = (0,2), i = 0, we need P[j] to check if  P[i] and P[j] satisfy the constrains that
abs(P[i][0] - P[j][0]) < = t and abs(P[i][1] - P[j][1]) < = k.

When compare current pair P[0] = (0,2) and next pair P[1] = (3,0),  abs(0-3) > t. It seems natural to keep the first pair P[0] and search the rest of array after P[1], but in fact it is not an efficient way, especially when k is a large number.

Since we have already sorted the array, if the value difference between P[0] and P[1] is greater than t, the value difference between P[0] and P[2], P[3] ... P[end] must also greater than t. If current comparison is not satisfied, all the other comparisons are not even necessary. We can move P[0] to next element.

While on the other hand, if the value difference <= t, but the index difference > k, we still have to  keep the current P[i] and move P[j] until meets the above scenario or the end of the array.

In this example:
1. Compare (0,2) and (3,0),   abs(0-3) >t
2. Compare (3,0) and (4,3),   abs(3-4) <=t , abs(0-3) > k
3. Compare (3,0) and (6,1),   abs(6-3) > t
4..Compare (4,3) and (6,1),   abs(4-6) <=t, abs(3-1)<=k, satisfied. Return True.

### Code(C++):

class Solution {
public:
static bool pcomp(pair<int,int> a, pair<int,int> b) {
return a.first < b.first ;
}

bool search(vector<pair<int,int> > l, int t, int k){
int po = 0;
while (po < l.size()){
int i = po + 1;
while (i < l.size()){
if ((abs(long(l[i].first) - long(l[po].first)) <= t)&&(abs(l[i].second - l[po].second)<= k)){
return true;
}else{
if (abs(long(l[i].first) - long(l[po].first)) > t){
break;
}else{
i+=1;
}
}
}
po += 1;
}
return false;
}

bool containsNearbyAlmostDuplicate(vector<int>& nums, int k, int t) {
if (nums.size() == 0 ){
return false;
}
vector<pair<int,int> > pp;
for (int i=0;i<nums.size();i++){
pp.push_back(make_pair(nums[i], i));
}
sort(pp.begin(),pp.end(),pcomp);
return search(pp, t, k);
}
};

### Code(Python):

class Solution(object):
def search(self, l, t, k):
po = 0
while po < len(l):
i = po + 1
while i < len(l):
if abs(l[i][0] - l[po][0]) <= t and abs(l[i][1] - l[po][1]) <= k:
return True
else:
if abs(l[i][0] - l[po][0]) > t:
break
else:
i +=1
po += 1
return False

def containsNearbyAlmostDuplicate(self, nums, k, t):
"""
:type nums: List[int]
:type k: int
:type t: int
:rtype: bool
"""
pp = sorted(zip(nums, range(len(nums))), key= lambda x:x[0])
return self.search(pp,t ,k )


text:
# How do you multiply (5.3\times 10^ { - 5} ) ( 4\times 10^ { 2} )?

Jul 29, 2017

$\left(5.3 \times {10}^{- 5}\right) \left(4 \times {10}^{2}\right) = 2.12 \times {10}^{- 2}$

#### Explanation:

$\left(5.3 \times {10}^{- 5}\right) \left(4 \times {10}^{2}\right)$

= $5.3 \times {10}^{- 5} \times 4 \times {10}^{2}$

= $5.3 \times 4 \times {10}^{- 5} \times {10}^{2}$

= $21.2 \times {10}^{- 5 + 2}$

= $2.12 \times 10 \times {10}^{- 3}$

= $2.12 \times {10}^{1 - 3}$

= $2.12 \times {10}^{- 2}$

Note: I have converted $21.2$ to $2.12 \times 10$ as I believe answer too is desired in scientific notation.


text:
# Find the position of a circle tangent to two other circles

Say there are 3 circles, A, centered at point a, B centered at point b, and C, centered at point c. Each has a known radius independent of the others, Ar, Br, and Cr. The positions of a and b are known, but the position of c isn't.

The distance between a and b will always be between (Ar + Br) and (Ar + Br + (2 * Cr)).

I'm looking for an algorithm to find the position of c so that circles A and C are tangent, and circles B and C are tangent. There ought to be two solutions unless a and b are at their maximum allowed distance, in which case there would only be one.

Thank you, any help is much appreciated.

You just need that the distance between the centre of $C$ and the centre of $A$ is $r_A+r_C$, while the distance between the centre of $C$ and the centre of $B$ is $r_B+r_C$, hence you just need to intersect two circles to find the position(s) of $C$.
• @RichardEllwood: you just need to solve the system given by $(x-x_A)^2+(y-y_A)^2=(r_A+r_C)^2$ and $(x-x_B)^2+(y-y_B)^2=(r_B+r_C)^2$ where $(x_A,y_A)$ and $(x_B,y_B)$ are the coordinates of the centres of $A$ and $B$. – Jack D'Aurizio Apr 12 '15 at 23:15
• +1 although as well as the circle centred at A radius $r_A+r_C$ and the circle centred at B radius $r_B+r_C$, it may also be worth drawing the circle centred at A radius $|r_A-r_C|$ and the circle centred at B radius $|r_B-r_C|$ and looking for more intersections. – Henry Apr 12 '15 at 23:18


text:
## Errata and Addenda for Algebraic Geometry I (Edition 2)

Here we post a list of errata and addenda. The name tags refer to the people who found the mistake. We are very grateful to all of them. Further remarks and hints - trivial or not - are very welcome.

You can submit errata through the web site (or just send us an email).

##### Explanation: Major errorMinor errorTypo/TrivialRemarkUnclassified

91 errata listed.

PageDescriptionSubmitted byEd.
p. 6,
Preface to 2nd edition
Add Peng Du to the list of names. U. Görtz 2
p. 8,
16
Replace "field" by "fields". A. Graf 1 2
p. 13,
Line 16
Replace "subset" by "open subset". A. Graf 1 2
p. 15,
Line -15
Replace $\mathscr M$ by $\mathcal M$. I. Tselepidis 1 2
p. 17,
Line 20
Replace "function" by "functions". Ehsan Shahoseini 1 2
p. 29,
Proof of Corollary 1.60
For the proof of the second assertion, i.e. \mathbb{P}^n is a prevariety, one need to show the connectedness of \mathbb{P}^n. But, the book use part (2) of the Lemma 1.19 (to show irreduciblity) which itself needs the connectedness! If connectedness is trivial, the second assertion of the Corollary 1.60 is proved and there is no need to speak about Lemma 1.19 and irreduciblity; and if connectedness is not trivial, then one can not use the Lemma 1.19. Make the reference to Lemma 1.19 more precise: Use part (1) to show that $\mathbb P^n(k)$ is connected (from the construction and previous discussion it is clear that any two of the standard charts have non-empty intersection.). Then irreducibility follows from part (2) (which needs the connectedness), but that was already noted as a general fact in Proposition 1.48. Ehsan Shahoseini 1 2
p. 30,
Line -10
After "are again in a", add reference to Exercise 1.20 (b). Ehsan Shahoseini 1 2
p. 33,
Line -13, -12
Replace $\mathbb{P}_k^n$ by $\mathbb{P}^n(k)$. E. Hong 1 2
p. 35,
Line 5
Replace "function field" with "function fields". Ehsan Shahoseini 1 2
p. 35,
Line -9
Replace "it" by ", the quadric of rank 3". Ehsan Shahoseini 1 2
p. 47,
Line -10
Replace "$R$-module" by "an $R$-module". A. Graf 1 2
p. 52,
Line 8
$\mathscr O(U)$ should be $\mathscr O_{\mathbb C}(U)$ Ehsan Shahoseini 1 2
p. 62,
Line -20
Replace $i^\flat_x$ by $i^\sharp_x$. A. Graf 1 2
p. 66,
Line -13
Replace "subset" by "open subset". A. Graf 1 2
p. 71,
Prop. 3.8
Add a reference to Exer. 2.18. A. Graf 1 2
p. 72,
Prop. 3.10
Add a reference to Exer. 2.16. (And/or odd a reference to Prop. 3.10 to the exercise.) A. Graf 1 2
p. 72,
Line -16
Replace "with an open subscheme of $T_i$" by "with an open subscheme $T_i$ of $T$". E. Hong 1 2
p. 75,
Line -1
Replace the reference to Section (4.14) by a reference to Section (4.13). N.T. 1 2
p. 81,
Proof of Prop. 3.33
Replace the beginning of the first sentence by "If $x\in X$ and if $U={\rm Spec} A$ is an affine open neighborhood of $x$, then $x$ is closed in $U$ and corresponds to ..." A. Graf 1 2
p. 83,
Proof of Thm. 3.37
The point that $X(k)$ is connected should be addressed explicitly. A. Graf 1 2
p. 84,
Line -21
Add index $i$ to the second intersection. A. Graf 1 2
p. 86,
Definition 3.41 (1), second line near the end
Replace $\mathcal{O}$ by $\mathcal{O}_X$. Andreas Blatter 2
p. 86,
Line 22
Kernels of sheaves have not been defined yet at this point. A. Graf 2
p. 92,
Line 23
Replace "component" by "components". A. Graf 1 2
p. 92,
Exercise 3.19
Replace ${\rm Hom}({\rm Spec}(R), \mathbb P^n_R)$ by ${\rm Hom}_{R}({\rm Spec}(R), \mathbb P^n_R)$ to make explicit that we only consider $R$-morphisms here. A. Graf 1 2
p. 93,
Exercise 3.26(a)
The statement is true for $V = X$, but not in general. (E.g., take $Y= \mathbb A^1_k$, $U=\mathbb A^1_k\setminus \{0\}$, $I=\{1, 2\}$, $i=1$, $V=U_2\subseteq X$.) Paulo Lima-Filho 1 2
p. 107,
Remark/Def. 4.24
Conflict of notation: There are too many $f$'s here, $f\in \Gamma(U, \mathscr O_S)$ in line 2, the morphism $f\colon X\to S$, the polynomial $f$ in (1). U. Görtz 1 2
p. 116,
Line -19
Add reference to Cor. 4.7. A. Graf 1 2
p. 116,
Line -15
Replace "as $S$-scheme" by "as an $S$-scheme". A. Graf 1 2
p. 129,
Prop. 5.22 (4)
It would be enough to assume that $X$ and $Y$ are locally of finite type over $k$. A. Graf 1 2
p. 131,
Line -12
Since $d$ is never refered to, its definition in the statement of Prop. 5.30 should be removed. A. Graf 1 2
p. 133,
Proof of Cor. 5.33
Since the formulation "vanishes identically" has not been formally defined, it would be clearer to replace "in which case" by "i.e.,". A. Graf 1 2
p. 136,
Line 13
Better: "... where $S$ is the spectrum of a field $k$ and $X$ is of finite type over $k$." A. Graf 1 2
p. 137,
Line -4
It should be explained why $\bar{x}$ is closed in $X_K$. The point $\bar{x}$ is a point of the fiber $p^{-1}(x) = \Spec \kappa(x)\otimes_k K$. We now use Proposition 3.33. Since the extension $\kappa(x)/k$ is finite, $\kappa(x)\otimes_k K$ is a finite-dimensional $K$-vector space. This implies that the residue class field of $\bar{x}$ (which is a quotient of this tensor product) is finite over $K$. Hence $\bar{x}$ is a closed point of $X_K$. (A variant of the argument: Since $\kappa(x)\otimes_k K$ is finite over $K$, it is an Artin ring, hence the fiber $p^{-1}(x)$ has dimension $0$. Therefore $\bar{x}$ is a closed point of the fiber. Since $x$ is closed in $X$, $p^{-1}(x)$ is closed in $X_K$. Altogether we see that $\bar{x}$ is closed in $X_K$.) A. Graf 1 2
p. 137,
Line -15
It might be clearer to move this remark up so that it comes directly after the proof of Corollary 5.45. A. Graf 1 2
p. 142,
Line 15
It is clearer to write $A\otimes_kK = \Gamma(C_K\cap D_K, \mathscr O_{C_K\cap D_K})$ (so to make use of the calculation in the previous line). A. Graf 1 2
p. 143,
Proof of Lemma 5.62
It would be helpful to add a reference to equation (4.12.4). A. Graf 1 2
p. 143,
Line -13
Replace $\bigoplus$ by $\bigoplus_d$. A. Graf 1 2
p. 150,
Line -6
Add subscript $k$ (twice). A. Graf 1 2
p. 150,
Example 6.3 (3)
Maybe explain that the finiteness conditions are imposed to ensure that the construction (and passing to the dual vector space, resp.) is compatible with the tensor product. A. Graf 1 2
p. 150,
Line 12
Label the final arrow with $df_x$. A. Graf 1 2
p. 151,
Line 8
Replace "homomorphisms" by "local homomorphisms". A. Graf 1 2
p. 152,
Line 13
Replace "projection $X(k[\varepsilon])\to X(k)$" by "map $X(k[\varepsilon])\to X(k)$ induced by the projection $k[\varepsilon]\to k$, $\varepsilon\mapsto 0$. A. Graf 1 2
p. 153,
Lines -2, -1
Replace the reference to Section (4.14) by a reference to Section (4.13). Dominik Briganti 1 2
p. 155,
15
Replace "$k$-scheme" by "$K$-scheme". Dominik Briganti 1 2
p. 155,
Lines 1, 2
It should be added that here ${\rm Spec}(K[\varepsilon])$ is considered as an $S$-scheme via the composition ${\rm Spec}(K[\varepsilon])\to{\rm Spec}(K)\to S$, where the first morphism is the one coresponding to the inclusion $K\subset K[\varepsilon]$. Ho Hai Phung 1 2
p. 156,
Line -17
Replace "a $r\times r$ minor" by "an $(n-d)\times (n-d)$ minor" as $r$ is not defined in Definition 6.14. Jan Willing 1 2
p. 169,
Exercise 6.12 (b) (iii)
Condition (iii) should be changed to: "$X \cong \coprod_i \Spec K_i$, where $K_i$ are finite separable field extensions of $k$." (Alternatively, add the assumption that $X$ is quasi-compact in the beginning.) Rafael M. Saavedra 1 2
p. 171,
The second line of exercise 6.26
Replace ${\rm Spec} R[X](f)$ by ${\rm Spec} R[X]/(f)$. Also, there is a conflict of notation ($X$ is used for the scheme and for the variable). Han Hu 2
p. 173,
Line -9
Somewhere (maybe after Example 7.2) add a sentence like "If $\mathscr A$ is a presheaf of rings and $\mathscr F$ is a presheaf of abelian groups with an $\mathscr A$-module structure (as presheaves), then the sheafification of $\mathscr F$ is a sheaf of modules over the sheafification of $\mathscr A$, because sheafification is compatible with products. A. Graf 1 2
p. 174,
Line 17
Replace "of an $\mathscr O_X$-module" by "of an $\mathscr O_X$-module $\mathscr F$". A. Graf 1 2
p. 177,
Line -1
Add period at the end of the sentence. A. Graf 1 2
p. 178,
Around line -9
Add that the tensor product is associative (up to canonical isomorphism) and that one can similarly form tensor products of more than two factors (with the same result as taking successive tensor products). A. Graf 1 2
p. 182,
Line 6
Add "for all open $U\subseteq X$" at the end of the line. A. Graf 1 2
p. 185,
Line 15
Replace "with respect" by "with respect to". U. Görtz 1 2
p. 185,
Line -12
Replace "localization in the prime ideal" by "localization at the prime ideal". A. Graf 1 2
p. 189,
Proof of Corollary 7.19 (4)
Maybe replace the final sentence by the following, to make this clearer: These isomorphisms show that the presheaf $\mathscr H$ on the basis of the topology given by the $D(f)$ is actually a sheaf, and therefore yield the desired isomorphism (7.10.3). Caiyong Qiu 1 2
p. 190,
Theorem 7.22
Replace $X_s$ by $X_s(\mathscr L)$ in the statement (and in the proof before the reduction to $\mathscr L \cong \mathscr O$. A. Graf 1 2
p. 191,
-11
Add reference to Corollary 3.22 (open subschemes of noetherian schemes are noetherian). A. Graf 1 2
p. 195,
Line -3
Replace "as" by "as an". A. Graf 1 2
p. 202,
Exer. 7.4
Add a comma before $s_r(x)$ in both (a) and (b). A. Graf 1 2
p. 204,
Exer. 7.10 (a)
Replace the first occurrence of "polynomials" by "polynomial". A. Graf 1 2
p. 205,
Exercise 7.16
Replace $\mathscr F$ by $\mathscr E$ (four times). Jan Willing 1 2
p. 209,
Prop. 8.4
It would be helpful to point out explicitly that for an $S$-Scheme $T$ the set ${\rm Hom}_S(T, S)$ is a singleton set (and that therefore in both (1) and (2) of Prop. 8.4 the set $F(T)$ has at most one element). A. Graf 1 2
p. 218,
Line 9, (8.7.1)
Maybe replace $u^*\mathrm{Grass}^e(\mathscr{E})$ by $\mathrm{Grass}^e(\mathscr{E})\times_SS'$ here to emphasize that the Yoneda lemma is used in order to obtain an isomorphism of schemes. The corresponding identification of functors is already obtained in the displayed line above. Xiaolong Liu 1 2
p. 219,
Line 21
Replace $q'$ by $q''$. Xiaolong Liu 1 2
p. 221,
Line 7
Replace $Grass^1(\bigwedge^d\mathscr{O}_{Spec(\mathbb{Z})})$ by $Grass^{\binom{n}{d}-1}(\bigwedge^d\mathscr{O}_{Spec(\mathbb{Z})})$. Xiaolong Liu 1 2
p. 223,
Line -6
Replace $M_{1 \times n}$ by $M_{1\times n}(R)$. Sz-Sheng Wang 1 2
p. 257,
Line 25,26
Replace 'constructible' by 'globally constructible' twice. Xiaolong Liu 1 2
p. 293,
line -6
Replace $f\circ s={\ rm id}_U$ by $h_{|U}\circ s= {\rm id}_U$. Xiaolong Liu 2
p. 295,
Lines -12, -11, -10
Define $\theta$ and $\theta'$ as $\theta := (g_{ij})_[i,j}$ and $\theta' := (g_{ij}')_[i, j}$, respectively. Maybe replace "for all $i$" with "for all $i \in I$". Mention explicitly that the equation (in line 7) holds on $U_i \cap U_j$. N. T. 1 2
p. 302,
line -9
Replace '$f_{|U}$' by '$s_{|U}$'. Xiaolong Liu 2
p. 313,
Lines 8, 11
The expression for $f$ in line 8 (ed. 1: line -4) ignores that there may be denominators. A homogeneous polynomial may be expressed as stated and for those $f$ the expression in line 11 (ed. 1: line -1) is correct. In general, we express an element of $\mathcal R$ as a fraction and extend the map $Z$ in the obvious way so that it becomes a group homomorphism. J.-C. Syu 1 2
p. 321,
Exercise 11.18 (a)
Replace '$Z^1({\rm Spec}\ A)\cong\mathbb{Z}^r$' by '$Z^1({\rm Spec}\ A)\cong\mathbb{Z}$'. Xiaolong Liu 1 2
p. 332,
line 12
Replace 'second equality' by 'equality in (1)'. Xiaolong Liu 2
p. 362,
Proof of Lemma 12.84
All $C$'s should be $A$'s, similarly for the $C_\nu$ (and probably the $c_{ij}$ should be renamed to $a_{ij}$. Xiaolong Liu 2
p. 373,
Line -8
We defined $V_+(\mathfrak a)$ only for homogeneous ideals contained in $A_+$. Therefore $V(\mathfrak a^h)$ should be replaced by $V(\mathfrak a^h\cap A_+)$. Note that for $\mathfrak p\in {\rm Proj}(A)$, we have $\mathfrak a\subseteq \mathfrak p \Leftrightarrow \mathfrak a^h\subseteq\mathfrak p\Leftrightarrow \mathfrak a^h\cap A_+\subseteq\mathfrak p.$ (Alternatively we could define $V_+(-)$ for all homogeneous ideals (or even all subsets of $A$) and explain why this doesn't make a difference.) Dominik Briganti 1 2
p. 380,
Line 14
Replace '$(M_{(f)})_n$' by '$(M_f)_n$'. Xiaolong Liu 1 2
p. 386,
Line -12
Replace '$\mathbb{P}^{n+1}=\mathbb{P}(\mathscr{O}_S^{n+1})$' by '$\mathbb{P}_S^{n}=\mathbb{P}(\mathscr{O}_S^{n+1})$'. Xiaolong Liu 1 2
p. 409,
Line -1
Replace '$X$' by '$Z$'. Xiaolong Liu 1 2
p. 412,
line -8
Replace '$A^x=k[x,y,\mu]/(\mu x=y)$' by '$A^x=k[x,y,\mu]/(\mu x-y)$'. Xiaolong Liu 1 2
p. 437,
line 6
Replace '$h=g\circ f$' by '$g=h\circ f$'. Xiaolong Liu 1 2
p. 456,
Line -10
Replace $\varphi$ by $\varphi'$ (twice). Peng DU 1 2
p. 457,
Prop. 14.67
The lower right triangle of the diagram constructed at the end of the proof is not commutative in general, therefore the proof is not valid as given here. Furthermore, in Step (i) of the proof of Theorem 14.66 (ed. 1) / Theorem 14.68 (ed. 2), a morphism $f': T'\rightarrow S'$ is considered where $T'$ is a finite disjoint union of affine open subschemes of $S'$ covering $S'$. If $S'$ is not quasi-separated, then it is not possible to find a quasi-compact such $f'$. Therefore, it seems better to handle individually the two cases of this proposition that are needed in the proof of the theorem: The case where $T'$ is a finite disjoint union of open subschemes of $S'$, and the case where $f' : T'=S \rightarrow S'$ is a section of $p: S' \rightarrow S$. Both cases are easy to deal with (the first one because it is clear that morphisms of this kind satisfy descent). A posteriori, the theorem implies that the proposition is actually true in the form stated. M. Bruneaux, P. Godfard 1 2
p. 468,
Proof of Theorem 14.93
For $n=1$ the proof needs to be modified slightly (this case is easier, but the exception should be stated explicitly).
Furthermore, in the second part of the proof it might be appropriate to give a few more details, see here.
J.-C. Syu / U. Görtz 1 2
p. 487,
Exercise 14.8
Replace $X$ by $Y'$. 1 2
p. 513,
Second line in the proof of Prop. 16.11
Add "open subset" after dense. Andreas Blatter 1 2
p. 526,
Line -5
In the expression for $g$, in the third parenthesis there should be $(X_2-1)^2$ instead of $(X_2^2-1)^2$. Alejandro Vargas and Tim Seynnaeve 1 2
p. 551,
Example A.6.(3)
The category of sets should also be in the list. Andreas Blatter 1 2
p. 571,
Proposition B.73 (6)
What is true (and proved in Matsumura's book) is: If $B$ is normal, then $A$ is normal. If $A$ and $B\otimes_A\kappa(\mathfrak p)$ are normal for all $\mathfrak p\in {\rm Spec}(A)$, then $B$ is normal.
It is not true that normality of $B$ implies normality of the fibers. Consider for instance a discrete valuation ring $A$ with uniformizer $t$ and $B=A[X,Y]/(XY-t)$. Then $B$ is regular and in particular normal, but the special fiber $(A/t)[X, Y]/(XY)$ is not normal.
M. Kerz 1 2
p. 607,
Left col., lines 3, 4
The symbols for direct sum and product should be exchanged. J.-C. Syu 1 2


text:
# Section title disappears when using titlesec?

I'm writing a paper in LaTeX, and I wanted to use titlesec for custom title styling, when I tried to apply my custom styling to my chapter title, it worked.

However, when I tried to apply custom styling to my section, the section-title disappeared like in the following picture:

This is the code in my header:

\documentclass[a4paper,12pt,oneside]{book}
\usepackage{blindtext, array, color}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\usepackage[explicit]{titlesec}

\titleformat{\chapter}[block]{\Huge\bfseries}{\color{gray75}\thechapter}{20pt}{\begin{tabular}[t]{@{\color{gray75}\vrule width 2pt}>{\hsp}l}#1\end{tabular}}

\titleformat{\section}[block]
{\Large\bfseries}{\color{gray75}\thesection}{12pt}{}

\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[style=ieee,backend=bibtex]{biblatex}
\usepackage[paper=a4paper,left=25mm,right=25mm,top=25mm,bottom=25mm]{geometry}
\usepackage{setspace}
\usepackage{fancyhdr}
\fancyhf{}
\cfoot{\thepage}
\pagestyle{fancy}
\setstretch{1.3}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\newcommand{\abbrlabel}[1]{\makebox[3cm][l]{\textbf{#1}}}
\newenvironment{abbreviations}{\begin{list}{}{\renewcommand{\makelabel}{\abbrlabel}}}{\end{list}}

\begin{document}

I don't understand what is happening!

• Welcome to TeX.SX! Since you use the explicit option, the last argument in \titleformat{\section} should be {#1}, rather than {} – egreg Apr 2 '17 at 9:45
• Thank you! It worked, I totally looked over that, thanks for the quick answer, what a great community! – Diederik Apr 2 '17 at 9:55
• We do our best for helping! Welcome again! – egreg Apr 2 '17 at 9:55

Since you're using explicit, the code for the section should be

\titleformat{\section}[block]
{\Large\bfseries}{\color{gray75}\thesection}{12pt}{#1}

However, I usually prefer not using the option: it's easier if you define a suitable one argument macro and keep the code in a different place, reducing clutter.

\documentclass[a4paper,12pt,oneside]{book}

\usepackage{color}
\usepackage{array}
\usepackage{titlesec}

\definecolor{gray75}{gray}{0.75}

\titleformat{\chapter}[block]
{\Huge\bfseries}
{\color{gray75}\thechapter}
{20pt}
{\formatchapter}

\titleformat{\section}[block]
{\Large\bfseries}
{\color{gray75}\thesection}{12pt}
{}

\newcommand{\formatchapter}[1]{%
\begin{tabular}[t]{@{\color{gray75}\vrule width 2pt}>{\hspace{20pt}}l}
#1
\end{tabular}%
}

\begin{document}

\chapter{State of the art}

\section{First section}

\end{document}


text:
This Code works fine CodeManx:- https://blender.stackexchange.com/a/19158/78916, but how would I get this work in an AddonPreferences cutom boxex? I can get it to work but it references 'object' 'cube' I would like to have it reference a UI file! Not asking for a script but something I can read to get my head around building custom UI's for the AddonPreferences, driving me crazy to get anything other that this, reference wise. HardOps has a perfect example of what I want in a expand panel on the UI tab, those are perfect to what I want, but I've a hard time following the code in 'Hops' python! An Expand box/panel is what I want (I think) but I just cant get anything to work in AddonPreferences, where do I need to look and what to read?

• Just add a def draw(self, context): method to the class as usual. If you'd like to copy the hardops properties, right-click > edit source... Jul 7 '20 at 16:00
• IMO would have it reference a property annotated to your AddonPreferences class. Eg toggle : BoolProperty() in addon prefs draw would be layout.prop(self, "toggle") Jul 7 '20 at 16:02
• Jul 7 '20 at 16:04

Right guys, thanks for he pointers, batFINGER pointed me in the right direction, I did look at the link brockmann posted and have seen that link on my quest travels. I don't know if I've found the right direction as I've used WM for the toggle but had in my head that all when hovered would point back to preferences! BUT I've got the look that I was looking for, I was after changing the icons ref toggle state but cant get anything to work but happy as it is, achieved my goal, thanks for the help, here is my code/effort:-

import bpy

preference.py file that gets imported from _init.py

from bpy.props import ( StringProperty, BoolProperty, FloatProperty, )

class AddonPreferences use (bl_idname = package) if multiple file.

# prop listings strings
some_folder = StringProperty(
name="Assets Folder",
subtype='DIR_PATH',
)

# prop listings bools
bpy.types.WindowManager.prop_toggle1 = bpy.props.BoolProperty()
bpy.types.WindowManager.prop_toggle2 = bpy.props.BoolProperty()

# prop listings float
test_ing = bpy.props.FloatProperty(default=1.0)

# user prefs panel
def draw(self, context):
layout = self.layout

# prop 1
wm = context.window_manager

box = layout.box()
box.prop(wm, 'prop_toggle1', icon='TEXTURE', text='HEADER', expand=False, emboss=True)

if wm.prop_toggle1:
box.prop(self, "test_ing", text='TESTING')

# prop 2
box = layout.box()
box.prop(wm, 'prop_toggle2', icon='FILE' , text='HEADER', expand=False, emboss=True)

if wm.prop_toggle2:
box.prop(self, "some_folder", text='TESTING')


text:
# Convergence and error estimates for a finite difference scheme for the multi-dimensional compressible Navier-Stokes system

18 Feb 2020 Mizerova Hana She Bangwei

We prove convergence of a finite difference approximation of the compressible Navier--Stokes system towards the strong solution in $R^d,$ $d=2,3,$ for the adiabatic coefficient $\gamma>1$. Employing the relative energy functional, we find a convergence rate which is \emph{uniform} in terms of the discretization parameters for $\gamma \geq d/2$... (read more)

PDF Abstract

# Code Add Remove Mark official

No code implementations yet. Submit your code now

# Categories

• NUMERICAL ANALYSIS
• NUMERICAL ANALYSIS


text:
# Google Online challenge -Internship 2021( Today's round questions)

Hii guys today I took part in Google Online Challege for summer internship 2021 . The challenge was invitational . I got invite for it last week . I am sharing the questions for practise purpose of others . Enjoy and Share your answers on comment sections.

Constraints of Q1:-
1<=t<=100
1<=N<=100000
1<=starting node,ending node<N
1<=weight of node<=1e9

Constraints of Q2:-
1<=t<=10
1<=N<=100000
1<=C<=1e15
1<=A[i]<=1e9
1<=B[i]<=1e9

3 Likes

Question 1 is on net ,( hackerrank) , dp on tree.

Also how many u solved?

2 Likes

partially solved both . For the second question I want to see efficient approach( something
like O(N log N) ) . I have seen similar type of question in past Hackerearth contest .

Question 1 as said by @ssrivastava990 is available on hackerrank and you might find it on codechef/codeforces also.
In question 2, for each index i, we can do a binary search on K, using sparse table and prefix array you can calculate the value of objective function in O(1) time, therefore total time complexity would be O(N*log(N)).

3 Likes

Thanks buddy but still I have a doubt on 2nd one . I got that we can use prefix sum to get the second part of equation in O(1). But finding the subarray of K and then the maximum value of it using Binary search I didn’t fully got it . Can you code it with comments . It would be very helpful.

ans = 0
for i in range(1, n):
start = i, end = n, val = i - 1
while(start <= end):
mid = (start + end)/2
cost = max(B[i],.....B[mid]) + (mid-i+1)*(prefix[mid] - prefix[i-1])
if(cost <= c):
val = mid, start = mid + 1
else:
end = mid - 1
ans = max(ans, val - i + 1)
return ans

Please note that to find max(B[i],.....B[mid]), you need to use sparse table O(1) approach.

3 Likes

Oh thanks mate I didn’t knew about sparse table can be used to find the max in O(1) time . My bad.

How to solve this question?? The best i could come up with was to emulate the process repeatedly by selecting k most frequent elements using a multiset.

2 Likes
1 Like

One of my friend sent me this problem, wasn’t able to solve, @everule1 @ssjgz @carre could you please give some hints for this?? (1 \leq k \leq 10^5)
Thanks

2 Likes

I can not see the constraint for k

could this work?:

• sort the elements by c[i] value (non-decreasing)

• then:

 for i=0 to n-k:
substract c[i] for k-1 elements greater than i  (segment tree to do this)

I got the same problem. I guess i passed some test cases using basic permutations and combinations ig. It was like - 1. nCk ways to select k diff groups 2. find num of ways to select each group. 3 multiply 1 and 2

1 \leq k \leq 10^5

I edited the post, could that approach work?

Taking the sample:
N = 4, K = 2, c = [7, 7, 8, 17]
Then the answer we will get from your algo is 7 + 8 = 15(if I understood correctly). But answer is 19.

That algorithm does give 19, and I can show it to be optimal for k=2.

It is in fact min(2*mx, 2*(sum-mx)) for k=2.


text:
# How to Factor Trinomials? (+FREE Worksheet!)

Learn how to use FOIL, “Difference of Squares” and “Reverse FOIL” to factor trinomials.

## Step by step guide to Factoring Trinomials

• To factor trinomials sometimes we can use the “FOIL” method (First-Out-In-Last):
$$\color{blue}{(x+a)(x+b)=x^2+(b+a)x+ab}$$
• Difference of Squares”:
$$\color{blue}{ a^2-b^2=(a+b)(a-b)}$$
$$\color{blue}{ a^2+2ab+b^2=(a+b)(a+b)}$$
$$\color{blue}{ a^2-2ab+b^2=(a-b)(a – b)}$$
• Reverse FOIL”:
$$\color{blue}{x^2+(b+a)x+ab=(x+a)(x+b)}$$

### Factoring Trinomials – Example 1:

Factor this trinomial. $$x^2-3x-18=$$

Solution:

Break the expression into groups: $$(x^2+3x)+(−6x−18)$$
Now factor out $$x$$ from $$x^2+3x : x(x+3)$$ , and factor out $$−6$$ from $$−6x-18: −6(x+3)$$
Then: $$=x(x+3)−6(x+3)$$, now factor out like term: $$x+3$$
Then: $$(x+3)(x−6)$$

### Factoring Trinomials – Example 2:

Factor this trinomial. $$x^2+x-20=$$

Solution:

Break the expression into groups: $$(x^2-4x)+(5x-20)$$
Now factor out $$x$$ from $$x^2-4x : x(x-4)$$ , and factor out $$5$$ from $$5x-20: 5(x-4)$$
Then: $$=x(x-4)+5(x-4)$$, now factor out like term: $$x-4$$
Then: $$(x+5)(x-4)$$

### Factoring Trinomials – Example 3:

Factor this trinomial. $$x^2-2x-8=$$

Solution:

Break the expression into groups: $$(x^2+2x)+(-4x-8)$$
Now factor out $$x$$ from $$x^2+2x : x(x+2)$$ and factor out $$-4$$ from $$-4x-8: -4(x+2)$$
Then: $$=x(x+2)-4(x+2)$$ , now factor out like term: $$x+2$$
Then: $$(x+2)(x-4)$$

### Factoring Trinomials – Example 4:

Factor this trinomial. $$x^2- 6x+8=$$

Solution:

Break the expression into groups: $$(x^2-2x)+(-4x+8)$$
Now factor out $$x$$ from $$x^2-2x : x(x-2)$$ , and factor out $$-4$$ from $$-4x+8: -4(x-2)$$
Then: $$=x(x-2)-4(x-2)$$, now factor out like term: $$x-2$$
Then: $$(x-2)(x-4)$$

## Exercises for Factoring Trinomials

### Factor each Trinomial

1. $$\color{blue}{x^2 – 7x + 12}$$
2. $$\color{blue}{x^2 + 5x – 14}$$
3. $$\color{blue}{x^2 – 11x – 42}$$
4. $$\color{blue}{6x^2 + x – 12}$$
5. $$\color{blue}{x^2 – 17x + 30}$$
6. $$\color{blue}{x^2 + 8x + 15}$$

1. $$\color{blue}{(x – 3) (x – 4)}$$
2. $$\color{blue}{(x – 2) (x + 7)}$$
3. $$\color{blue}{(x + 3) (x – 14)}$$
4. $$\color{blue}{(2x + 3) (3x – 4)}$$
5. $$\color{blue}{(x – 15) (x – 2)}$$
6. $$\color{blue}{(x + 3) (x + 5)}$$

## Related to "How to Factor Trinomials? (+FREE Worksheet!)"

### What people say about "How to Factor Trinomials? (+FREE Worksheet!)"?

No one replied yet.


text:
# Pathria page 2 -- total energy for mutually interacting particles

1. Feb 13, 2016

### spaghetti3451

In page 2 of Pathria's textbook on 'Statistical Mechanics,' it is mentioned that

Consider the total energy $E$ of the system. If the particles comprising the system could be regarded as noninteracting, the total energy $E$ would be equal to the sum of the energies $\epsilon_i$ of the individual particles:

$E = \sum_{i} n_{i}\epsilon_{i},$

where $n_i$ denotes the number of particles each with energy $\epsilon_i$.

If the particles were mutually interacting, the total energy $E$
cannot be written in the form above.

Why can't the total energy be written in the form above for mutually interacting particles?

2. Feb 13, 2016

### Buzz Bloom

Hi failexam:

The interaction of the particles implies that there is additional internal energy in these interactions that is not part of the energy of the individual particles. Here is an example. Suppose the particles are small dust particles, each with a very small electric charge, say all negative. Suppose the charge on each particle is so small that the electrostatic repulsive force between particle is about half the gravitational attractive force. The total energy is the sum of the energy of all the particles, plus additional energy in the electrostatic field.

The details in this scenario may not be quite right, but perhaps it will help you find some helpful and more accurate information on the internet.

Regards,
Buzz

3. Feb 13, 2016

### Jilang

If you try it, you will find you are double counting!