What's the timing on Warrior en-Kor's damage redirection?

Question: Say I have Warrior en-Kor out and use its ability to redirect the next 5 damage it would get. I leave it as-is, and then in combat resolution a creature would deal 6 damage to it, leaving all but 1 damage redirected. Would I be assuming correctly that I cannot redirect that 1 damage later?
Comment: It doesn't transfer damage that's anyway been dealt; it changes what will receive damage
Comment: By "later", do you mean "after I have already used the ability to redirect the other damage" or "after the damage has already resolved"?
Answer: You cannot redirect damage after it has been dealt. The only card that ever did this was Simulacrum which now lets you gain the life lost from damage dealt to you back and then simulacrum deals damage to a target instead.
Redirection creates a replacement effect, all of the en-Kor creatures had this effect. It's been reworded to no longer talk about redirection, which is considered obsolete, the new en-Kor ability is written this way:

The next 1 damage that would be dealt to ~ this turn is dealt to target creature you control instead.

The new wording makes it much more clear that you have to activate the ability before the damage is dealt, since it refers to the "next" damage. So timing is the last time you have priority when the spell that would do the damage is on the top of the stack (other than Sudden Shock and Molten Disaster, which you would need the redirection active before it is cast due to split second) or when you have priority after blockers are declared but before damage is assigned (no priority to activate between assigning and dealing damage).
Answer: Yes, to redirect damage with Warrior en-Kor, you have to ativate its ability before damage happens.
That's because damage redirection is a kind of replacement effect, and replacement effects have to be active before the event they replace happen.


Accepting answers on Meta

Question: When asking about tags, on-topic subjects and the like. Is it best not to accept an answer and let the votes float the answers?
Or do we accept an answer after one has [X] votes?
What is the protocol?
Answer: Accepted answers on Meta are only practically useful in the support tag, as you have the distinct possibility of the answer that helped someone the most being marked as such for future visitors.
For other areas, we have special moderator-only tags to indicate when something has been completed, implemented or fixed: status-completed, along with other tags that indicate that we won't implement a feature or tag synonym, aka status-declined. When your future moderators and Stack Exchange employees go through questions here on meta to make sure that everything needing our attention has received it, we utilize these tags extensively.
When it comes to discussions started to form a community consensus, it's up to the author to accept an answer. However, reader beware, the accepted answer might not represent said consensus, but merely the discussion starter's preferred view on it. At that point, votes should take more precedence for someone wanting to know how does this community feel about X?
The protocol is just accept answers when and if you feel it makes sense to do so, but don't fret too much about it. If you like an answer so much that you feel compelled to accept it, go for it - you can't do that incorrectly as acceptance is a very subjective thing to begin with. Nothing breaks if you do, or don't accept answers here on meta.
Answer: Let the votes flow, when there is an overwhelming agreement it becomes clear to the community. You might be raising the question but it is the community that makes the decision.
There is no harm in accepting, but there is little benefit other then highlighting you own opinion.
Answer: @JamesJenkins has described one aspect of it, but I will note that some activities we might vote upon here will have times associated with them. The "acceptance" mechanism is a way of indicating the timing was hit with a particular response at the highest level at that time.
Now, if over time, a different response bubbles higher, the community might be best served in revisiting the question.
Answer: On meta I find it's best to not accept answers until the problem is resolved.  For example, a post asking for a tag synonym should have an acceptance when the synonym is created (or the community indicates, through votes, that it doesn't want the synonym).  A bug report or support request should be similarly resolved when the issue is gone.
This leaves the vast majority (at least in this early stage) of "site philosophy" questions, which I think should stay open for a while yet, at least for a week or so into the public beta.  We're the founders of the community and can set initial direction, but we don't own all the decisions once the doors open.  Let's leave room for votes to come in; if a clear consensus emerges then that's the time to accept an answer.

Accepting answers on Meta


Magento 2 Stores -> Configuration redirects to dashboard

Question: Getting issue after enabling form_key from backend.
When I am trying to open store > configuration
from Order section it took me redirect to admin dashboard
Answer: Take a look at - https://github.com/magento/magento2/issues/22366
Body must be at least 30 characters.
Answer: Hi I cannot "add a comment" yet, so this is the only place I can write.
I also see this issue having performed an upgrade to 2.2.8 from 2.2.2 today, however I am being redirected to the Orders screen rather than Dashboard, and from a variety of places (including attempting store > configuration as you did, and in fact attempting to see Dashboard sends me to orders...) - it'd be interesting to know if you get the redirect from other places too (e.g. Indexer or Cache screens, where I also suffer the issue).
I have also been battling with serialization / deserialization issues as a result of the same upgrade, and wonder if there is some serialized (old style pre-Json) data in your core_config_data table somewhere that might be throwing it.
Comment: When i am trying to redirect from order section To config...that Took me to dashboard in Magento 2.2.8
Comment: Interestingly my problem was solved when I upgraded the same installation further on from 2.2.8 to 2.3.1
Answer: I've seen similar, 302 redirects to your admin start page from some sections. I never found the root cause but fixed when disabling admin security keys.
From terminal run
php bin/magento config:set admin/security/use_form_key 0
You should see the keys disappear from URLs and the issue disappear.


How is 都是 used here?

Question: 他现在都是卡着时间准点开会
Does 卡着时间 mean stop time right? I remember being told it is slang for 卡点 which means to like check the time but whaf I am confused about is 都是 卡着时间 is a verb and object right? How come 是 is put before it.
Can I ask what 都是 does when behind a verb? Is it indicating a cause?
Answer: No, 卡着时间 does not mean stop time. It means "right on the clock"(or at the last moment). 卡点 is similar too( some time 卡点 means right on the beat with the music though).
Basically the sentence means: He is always attending the meetings right on the clock(/at the last moment) nowadays(/recently).( which implies that he is not showing early to meetings at all recently. LOL exactly like me in workdays)
The 是 can be removed but I believe the 是 implies it is a new ongoing norm for him to 卡着时间. Thats why I used "is always attending" in the translation above. I think this is indicating a similar status as the "habitual be" used in AAE.
so in short it is similar to "is+ verb(ing) + object" in English but more emphasizing on the "habitual" behaviour
Answer: 他现在都是卡着时间准点开会。There are two verbs 卡着 and 开会.
The verb is 卡着. In this sentence, 都是 is an adverb before the verb 卡着.
都是 = always.
现在 = recently, which is another adverb.
Answer: Here, 卡 is used as a verb that means "be wedged in between and cannot move, or get stuck".
他现在都是卡着时间准点开会。- He is now always struct to the exact time for the meeting.

How is 都是 used here?


java web based chat application

Question: I wanted to develop a small web based chat application. Currently I have developed by using Applets.
So can I create the application by using JSP and servlets without including the applets. Probably I would like to use JQuery or GWT in my web application.
Is it possible?
Answer: Of course you can implement a chat with the JSP and the jQuery library. jQuery provides a rich set of methods for AJAX capabilities. But in my opinion GWT is suitable the best for implementing multi-featured chat. It's ideal for applications based on AJAX and which have a rich user interface. You can greatly simplify development your application and AJAX-implementation using very convenient feature of Remote procedure call communications between client-side and server-side.
Here you can find answers to some questions from the server push, handling of threads and safety issues on the server side. This is necessarily need you to develop a chat application.
And here's an interesting example with GWT implementation of chat: first and second part.
Answer: Yes, you can create a web based chat application using jsp and servlets without using applets. here is one example. You can download the application and source as well. Have a look at it and use JQuery where ever necessary.

java web based chat application


T(n) = aT(n/b)+f(n), I don't understand the difference between a and b

Question: I was analyzing the time complexity for recursive algorithms like merge sort, but when I came across that recurrence, [I think that equation is called a recurrence right?] I couldn't differentiate between a which mean the number of subproblems and b which in my slides it says is the factor by which n is divided by.
Comment: I suggest looking at examples which use this kind of recurrence to analyze the running time of an algorithm.
Comment: @YuvalFilmus I don't want to analyze the algorithm just yet, I just want to understand what the variables 'a' and 'b' mean more clearly.
Comment: The only way to understand it is to see some worked out examples.
Comment: @YuvalFilmus This is a general formula for analyzing time complexity for recursive sorting algorithms. I hope we're not the only class in the world studying this method. It's strange you don't know about it
Comment: You might be the only class in the world in which this formula is only studied "theoretically" without absolutely *any* examples.
Comment: There were examples, but I still couldn't understand the difference.
Answer: Here are three examples of algorithms with $b=2$ and $a=1,2,3$.
In all these examples, there is some small-scale cheating involved, which doesn't affect the asymptotic running time. I'll let the reader figure out where I'm cheating.
Binary search
In this algorithm, we are looking for an element $x$ in a sorted array $A$ of length $n$.
If $n = 1$, the problem is easy.
Otherwise, let $m$ be the index of the middle element:

If $x = A[m]$, we are done.
If $x < A[m]$, we recurse with the array $A[1],\ldots,A[m-1]$.
If $x > A[m]$, we recurse with the array $A[m+1],\ldots,A[n]$.

Every time we recurse, the size of the array decreases by a factor of 2. Therefore, the running time of binary search on inputs of length $n$ satisfies the following recurrence:

$T(n) = T(n/2) + O(1)$.

Here $a = 1$ and $b = 2$. The solution is $T(n) = O(\log n)$.
Merge sort
In this algorithm, we are sorting an array $A$ of length $n$.
If $n = 1$, the array is already sorted.
Otherwise, partition $A$ into two arrays $A_1,A_2$ of length $n/2$, sort each recursively, and then merge them in $O(n)$ time.
In contrast to binary search, in which we only recursed on one of the half-arrays, in merge sort we recurse on both. Therefore the appropriate recurrence is

$T(n) = 2T(n/2) + O(n)$.

Here $a = b = 2$. The solution is $T(n) = O(n\log n)$.
Karatsuba multiplication
In this algorithm, the goal is to multiply two $n$-bit integers $x,y$.
We first divide $x,y$ into two $n/2$-bit integers: $x = 2^{n/2} x_1 + x_2$, $y = 2^{n/2} y_1 + y_2$. We then proceed as follows:

Compute $z_1 = x_1 y_1$.
Compute $z_2 = x_2 y_2$.
Compute $w = (x_1+x_2)(y_1+y_2)$.
Return $2^n z_1 + 2^{n/2} (w - z_1 - z_2) + z_2$.

In steps 1,2,3, we are multiplying $n/2$-bit integers (more or less; in step 3 they are $(n/2+1)$-bit integers). The rest of the algorithm consists of addition and subtraction, which can be done in linear time. Therefore the appropriate recurrence for the running time of this algorithm is
$$
T(n) = 3T(n/2) + O(n).
$$
Here $a = 3$ and $b = 2$. The solution is $T(n) = O(n^{3/2})$, improving on the trivial $O(n^2)$ algorithm.


How do I set up contact and opportunity pages so that the agency field is populated based on the account field?

Question: I am trying to set up an agency field in both the Contact and Opportunity page layouts so that when a user fills in the account field the agency field is automatically populated based on the agency field in that account.  I would also consider some sort of lookup window dependent on the account field for selecting agency?  How can this be set up? Please provide details.  Thanks!
Comment: Tried using formula field then selected Account>Advertiser agency but this populates my agency field with a number and letter code not Text from the agency field under the account.  what needs to be changed?
Comment: Still unclear on this.  I set up a formula that insert Account>Agency but when I create a test record the agency field is not shown and is read only and instead of showing the agency based on the account I input, it has a code of numbers and letters
Answer: If you want to populate agency field on account and Opportunity, you can do that by creating a new formula field. However If the agency field is a text field, populating the field on Opportunity and contact can be done by a workflow rule.
You will have to create a workflow rule and include a field update and choose "Use a formula to set the new value" and using Insert field in formula editor, you can accomplish that. Same goes for the opportunity.
The only caveat I see is in second approach is case when the agency is changed on account and you want it to propagate to Opportunity and Contact. In this case you will have to write a trigger.
So I will definitely recommend first approach i.e creating a formula field.


Control Access Module in Drupal slows down he site

Question: Whenever i enable content access module in drupal it slows down the site a lot , disabling it makes the site load properly. Are there any other modules which could be instead of content access?
Aditya
Answer: Other content access modules might just was result in the same slowdown. All these modules just add access rules to Drupal, the part that actuall looks for the permission is in Drupal core.
Instead, what I would try to do is install devel.module and print the executed sql queries. Then, look queries are actually slow and try to optimize them by adding indexes.
Maybe this only happens in combination with another module because it executes crappy queries.
Answer: If you are asking what other access modules you can use, you might try Nodeaccess
There are many more as well, see a list of possible modules at http://drupal.org/node/270000


PWM LED dimmer as TE driver

Question: Would it be possible to use a standard 12V DC LED dimmer together with a thermoelectric element to control the temperature? I'm talking about a very simple application with no need of fine tuning. Assuming that the output current provided by the dimmer is enough to drive the TE, I'm interested in knowing if the use of a PWM LED dimmer could possibly affect the life of the TE. A number of studies have shown that the PWM frequency has little or no significance on the life of the TE.
Comment: "A number of studies have shown that the PWM frequency has little or no significance on the life of the TE" there is your answer. Can you link to these studies?
Comment: http://www.tetech.com/publications/pubs/ICT99MJN.pdf
Comment: Are you thinking of incorporating this technique into a product that may sell several-to-many units a year. If so then, in the absense of hard facts about its viability, prototype testing is the key to understanding any problems and modifications. This ultimately means, for a one-off, in the absense of good data, try it and be sure to let us know what happens.
Answer: Yes - you could use a dimme to control a TEC. But do note the following:
With a TEC / Peltier cooler the aim if not using DC drive, is to not introduce significant thermal variations with the driving waveform. If the periods of the lowest frequency components of the driving signal are short compared to the thermal time constants then the TEC will not "notice" changes in thermal input.
If you lowered the PWM frequency such that a control cycle was say 10 seconds long, or if you used an on/off thermostat control (electronic or mechanical that cycled power based on measurable variations of temperature, then you will shorten lifetime. This is due (mostly, probably) to mechanical contraction/expansion cycles "working" the many bonded junctions and their bonding materials).
Olin has on several occasions made the interesting and seldom made point that if you want operation at less than 100% thermal output then you are better off using filtered DC than PWM. See this answer here for his reasoning.
RC PWM filter have low efficincy (Efficincy ~+ PWM duty cycle):
Worth noting is that PWM with smoothing using an RC filter is equivalent to using a voltage divider as load with TEC as bottom element and a virtual resistor dropping the supply voltage to the operating point as the upper element. The power dissipated in the virtual resistor is lost - unless you use eg a buck converter or an LC (nominally lossless) filter to reduce the voltage. Note also that an RC filter with PWM will have an efficiency of about the same value as VPeltier / Vsupply = the PWM duty-cycle (eg 30% for 30% on PWM ) and this will apply regardless of filter size. If you use NO formal series R and charge the capacitor with short pulses Murphy will not be fooled - the very large currents that will flow for very short periods when very short pulse and no formal R are used will dissipate just as much energy overall as if a formal larger value resistor had been used.
Comment: I'm sorry, but you have gotten what I said backwards.  You DO want to drive Peltier devices with average DC, not by banging back and forth between full on and full off, like you could do with a motor, for example.  See http://electronics.stackexchange.com/a/28637/4512 for a good example of where I mention this.
Comment: @OlinLathrop - Don't be sorry, it's my mistake :-). Having inverted your advice, It didn't make total sense so I explained why I thought you'd have said it :-). However, the point that I made re efficiency is one which may bear thinking about - and one I don't recall seeing mentioned before. Imagine a say 20% on PWM cycle and a say 10V supply. If a Peltier device was a true constant current load then PWM with no filtering gives 100% energy transfer to the Peltier. A 1A CC Peltier would dissispate   10W/2W at 100%/20% PWM. BUT as soon as you add filtering you significantly affect efficiency ...
Comment: @Olin - with say 20% duty cycle 10% supply RC filter abd cap with delta ripple small. Vcap = 2V. Iout mean = 1A for CC. Iswitchj mean = 1A but when on Iavgon = 5A. Filter R dissipation = Vres x Ires x duty_cycle = 8 x 5A x 0.2 = 8Watt. Pload = Vl x Il = 2 x 1 = 2W. Z = 20%. ie with an RC filter = duty cycle. You need an LC filter or a buck converter or equivalent converter // This sounds wrong and AFAIK nobody mentions it but I can't instantly see that I've done something silly. //
Comment: @OlinLathrop - Back of brain suggests that your arguments re PWM versus filtered driving are in part based on how you derive the filtered voltage. If I get to it I'll go over it with some real world parameters and see how it looks.
Comment: @OlinLathrop I've modified my answer to reflect your actual comments - and noted that filtered DC needs and LC filter or buck converter if efficiency is to be maintained.
Comment: @OlinLathrop thanks for your comments. My question for you is: driving a peltier straight out of a LED PWM dimmer will reduce its life or it is just a matter of efficiency?

PWM LED dimmer as TE driver


french Installation of civicrm 5.27.2 on drupal 8

Question: i want to install civicrm in french in my drupal 8.9.2 website. after following the instruction in this website https://lab.civicrm.org/dev/translation/-/wikis/Administrator-Guide. it's not work for me. please show me the best method install
cheers
Comment: what did you try? Did you get any error when enabling french language?
Comment: after activating the multi language option on the administration interface and adding the language I would like to the l10n folder in the civicrm module root, it does not display in the language choice
Answer: If you've already installed civi and you're able to get to the administer - localization - languages page, then the following is probably the simplest at this point:
In civicrm.settings.php (in web/sites/default), add this line to point to the l10n folder:
define('CIVICRM_L10N_BASEDIR', '/full/path/to/l10n');
OR
Move your l10n folder into vendor/civicrm/civicrm-core.
The first is slightly better because you can put l10n somewhere that won't get deleted when you upgrade, so then I'd also move l10n somewhere completely outside civi.
Comment: after doing it's no work for me


Fully saturated liquid and vapour

Question: In terms of fully saturated vapour and liquid for water. Why in a real world heat pump cycle for example may the water not exactly reach these saturation lines as indicated in an ideal cycle?
Answer: In the real world, processes don't stop at exactly the right phase point.  Real world processes are based on the heat transfer that actually occurs, so it will be (for example) less than 100% vapor, or be slightly superheated.

Fully saturated liquid and vapour


Best practice to test clustered production system

Question: Say you have a big bloat of enterprise software and for every customer a different setup in terms of amount of appservers, search cluster size, webservers, database, loadbalancers and application-related staging functionality (edit -> live systems).
Of course, you want to be as narrow as possible to your production environment within your UAT environment, where acceptance testing is done. Possibly you may want to do extensivly automated testing in this or any previous stage.
But, as a matter of fact, mirroring production like environments into testing stages is much to expensive, simply due to the resources necessary.
So my question is, if there are any good best practices to keep this gap between production and testing environments as small as possible, or good techniques to bridge that gap
Answer: For the large majority of tests, the focus is on the functionality and only one or at most a handful of tests will be executed at the same time in the same environment.
For these tests, it really doesn't matter if you have just a single appserver or a few dozen behind a load-balancer. The same goes for the other components that you might duplicate for handling larger loads.
There are only a few test areas where having a copy of the production system is beneficial or needed. Those tests are typically not executed often enough to warrant more than one setup with multiple instances of each component.
Tests to think about here are performance/load tests and tests that verify that components like load-balancers don't break the system (what happens if the load-balancer decides to shift a session from one appserver to another halfway through the session).


PCB power plane copper and lamination thickness

Question: One of the boards I have has these surface traces that run a lot of current through. I believe they are called power planes. Does anyone know a typical copper thickness (35 um?) ?
Also, what is the type of lamination on the top (lighter green color) and what's could be the thickness?
Answer: A typical PWB copper thickness is "1 ounce". This is how much one square foot of plating weighs. 1 oz = 35 micro-meters. https://pcbprime.com/pcb-tips/copper/
A power supply board might use 2 or 3 oz copper, but I don't think that this board does.
The green layer is the "solder mask". It keeps the molten solder from straying beyond the pads. It also provides some protection to the traces. If there is a standard thickness I don't know it.
Answer: There is a wide variation in designs.
35 um is std 1oz copper lam.(ination)  Then 0.5, 0.25, 2,3,4... oz
Outer layer is typ 0.5 oz.(18 um) then 0.5 oz plating added, but can be any sub-multiple or bare with organic coating.
The clear tint is a polymer called "soldermask" that protects the traces also has a wide variance from dry to wet film might typically be 20 to 25 um which is your choice.
Answer: The copper can have various thicknesses; 1 oz. copper (short for one ounce per square foot) is 35 μm thick, but 2 oz. is also common for boards that handle higher power.¹ Some boards have 0.5 oz. copper, too. Inner layers are usually thinner than outer layers in a multi-layered board.
Note that all copper in a given layer will have the same thickness; there's no practical method to make a power plane thicker than other traces on the same layer. You would just make the whole layer thicker.
The soldermask (the green stuff) doesn't usually have a defined thickness; its purpose is to simply act as a physical barrier between the metal traces and the environment, to prevent solder from sticking where you don't want it to and to prevent oxidation of the copper. This function doesn't strongly depend on thickness, and it's not expensive to procure or to deposit (unlike the metal layers) so its thickness will vary between fabs that use different equipment and different soldermask materials.
The parts of the copper traces that are not covered by soldermask are typically coated in something as well. For the cheapest boards, this is just a quick dunk in molten solder followed by a blast of hot air to get off all but a little bit of it (referred to as a HASL finish, "hot air solder levelling"). HASL finishes are not typically of a controlled thickness, and I couldn't tell you what a typical thickness is. Slightly more expensive boards, or ones where flatness is a big concern (HASL can be fairly bumpy, relative to what's needed to reliably attach certain surface-mount parts), will use ENIG (for "Electroless Nickel/Immersion Gold"), where a thin plating of nickel is applied, followed by an even thinner layer of gold. Typical thicknesses for ENIG are around 200 μ" (yes, that's microinches. That's about 5 μm.) of nickel, followed by 1-3 μ" (25 to 75 nm) of gold. There are other finishes, but those are by far the most common.

¹The PCB fab that I use for prototype runs actually offers as thick as 13-ounce copper for outer layers, if you're okay with paying hundreds of dollars more and waiting the better part of a month for your boards to ship. I have no idea what you would use such a board for. That's nearly half a millimeter of copper!


a plural can be used when I don't know how many?

Question: I need cars
Can it mean I need one car as in 'I need some cars' or 'I need a car' if I don't know how many cars I need? Ex. 'The predicate consists of the verb and its complements and also most adverbials.' why complements and adverbials, not complement and adverbial?
Answer: If you do not know how many you need, but you know it is more than one, you would use the plural: "I need cars" or "I need some cars". If you only need one car, you would say "I need a car." If you know how many car you need and it is more than one, you could use the number: "I need ____ cars" (fill in the blank: five, or seven, or two, etc.).
Comment: It would depend on context and your assumptions. What do you need the car(s) for? This is a situation where English doesn't necessarily have built in context clues, and if you are uncertain you may have to qualify that in speech. Aka "We will need at least one car to get everyone to the party, maybe more, depending on how many people show up."
Comment: If I don't know it is more than one?
Answer: It is rather unusual not to know if you will need one or more than one.  Two is 100% more than one! What you can say will depend on how likely you believe the various situations are.

How will we travel to the festival?
We'll need cars.  One for every five people.

In this context, if only five people are travelling, then only one car would be needed, but it suggests that the speaker expects more than five people.  If fewer than five are expected, but more are possible you might get (in spoken English)

How will we travel to the festival?
We'll need a car;  perhaps two if we get more than five people.

In practice, this isn't actually a difficulty.  You don't normally say "we need {plural}".  You'd probably say "We'll need a few {plural}". It means "more than one" but it is understood that if it turns out you only need one, that is not a grammatical mistake, it is just an error of fact.


How to convert a Hamiltonian for the tight-binding model in silicene into $k$-space?

Question: I am trying to convert the Hamiltonian from the paper "A topological insulator and helical zero mode in
silicene under an inhomogeneous electric field" (also on arXiv) into $k$-space.
$$
\begin{array}{rcl}
H & = &~~-t \displaystyle \sum_{\langle i,j\rangle\alpha}c_{i\alpha}^{\dagger}c_{j\alpha} \\
&&+~~i\frac{\lambda_{\mathrm{SO}}}{3\sqrt{3}} \displaystyle \sum_{\langle\langle i,j\rangle\rangle\alpha\beta}v_{ij}c_{i\alpha}^{\dagger}\sigma_{\alpha\beta}^{z}c_{j\beta} \\
&&-~~i\frac{2}{3}\lambda_{\mathrm{R}} \displaystyle \sum_{\langle\!\langle i,j\rangle\!\rangle\alpha\beta}\mu_{ij}c_{i\alpha}^{\dagger}\Bigl(\vec\sigma\times\vec{d}_{ij}^{0}\Bigr)_{\alpha\beta}^{z}c_{j\beta} \\
&&+~~\ell \displaystyle \sum_{i\alpha}\zeta_i E_z^i c_{i\alpha}^{\dagger}c_{i\alpha}
\end{array}
$$
I converted the first term into $k$-space, but I need help for the remaining 3 terms. I am not asking for the whole derivation. Hints on how to deal with the terms would be enough.
Comment: It should be clear from your question what you are asking.  Please post the Hamiltonian and explain how you have dealt with the 1st term.  Also, why are the remaining terms causing difficulty?  Please be more specific.  Thanks.
Comment: Sorry for any inconvenience ,this is my first time posting here so i am not used to it.I am about to go into my 3rd year of college and i just completed my quantum mechanics course. My professor introduced me to topological insulators and wanted me to understand this paper.Actually more or less he wants me to understand how the calculations are going on . The first term was pretty easy with 3 nearest neighbour atoms and no spin distinction but in 2nd term due the spin and next nearest neighbour atoms i don't know how to fourier transform it let alone simplify it.
Comment: Some more information would be desirable. ..e.g. what do the terms in your expression represent?  What does <> and  mean?  Some of it looks familiar but much of it isnt obvious what it means (at least to me).  If you could elaborate (and even rewrite using LaTEX) thatd be most excellent
Comment: I haven't looked through your picture in great detail but for next nearest neighbours the two sublattices of the honeycomb decouples. So this you should be able to treat as two ordinary decoupled nearest neighbour fourier transforms
Comment: Actually i don't get what you are trying to say 'cause next nearest neighbours belong to the same sub lattice(A or B). It's not a combination of both.
Comment: Actually i don't have LaTex right now and the connection's been very unstable. So i won't be able to write any equation.
Comment: @Student I edited the question for you this time, but in the future, you should do that sort of thing yourself. You can read about the math rendering capabilities on this site [in the help center](https://physics.stackexchange.com/help/notation).
Answer: Fourier transformation of the creation/annihilation operators is no different than any other Fourier transform; the spin index just comes along for the ride. For instance,
$$c^\dagger_{i \alpha} = \frac{1}{\sqrt{2\pi}} \int_\text{BZ} d^2k\,c^\dagger_{\mathbf{k} \alpha}e^{i\mathbf{k}\cdot\mathbf{x}_i}$$
With that operator in hand, your second term (ignoring the prefactor, spin index summation, and various factors of $2\pi$ throughout) becomes
$$\sum_i \sum_{\delta\in\Delta_i} \nu_{i,i+\delta} \,\sigma_{\alpha\beta}^z\int d^2k\int d^2q\, c^\dagger_{\mathbf{k}\alpha} e^{i\mathbf{k}\cdot\mathbf{x}_i}c_{\mathbf{q\beta}}e^{-i\mathbf{q}\cdot(\mathbf{x}_i+\delta)},$$
Where I have defined $\Delta_i$ as the set of next-nearest-neighbor displacement vectors associated with site $i$. Inspection of the graphene lattice will show that $\nu$ is $+1$ for three of the NNNs and $-1$ for the other three; I'll let you separate those out by hand. Once you do, you'll find that the only remaining functional dependence on the site index $i$ is in the exponentials, and since
$$ \sum_i e^{i(\mathbf{k}-\mathbf{q})\cdot\mathbf{x}_i} \propto \delta(\mathbf{k}-\mathbf{q})$$
you end up with something like
$$ \sigma_{\alpha\beta}^z\int d^2 k\,c^\dagger_{\mathbf{k}\alpha}c_{\mathbf{k}\beta}e^{-i\mathbf{k}\cdot\delta}.$$
There are no longer any spatial indices remaining; this term has been "converted into $k$-space", as you requested. Note that it's a sum of $k$-dependent operators; you're probably looking for the $k$-dependent Bloch hamiltonian, not the "true" hamiltonian operator, so take note of whether you want your hamiltonian to be $k$-dependent or not.
This is simply a rough demonstration of how to Fourier transform these operators and then reduce them using delta functions. There are several details I omitted, but you should be able to carry out manipulations like these on the remaining terms.


How do I send an email when the CloseDate in opportunity is changed?

Question: Hey I am working on this project where an email should be sent 5 days before the CloseDate in an opportunity. This is to be done using workflows only. the ISCHANGED function doesn't work with time dependent workflows and I tried doing the 'CloseDate <> NUll' but it still wasn't firing the email. What should be the criteria in the time dependant workflow actions? 5 Days Before Rule Trigger Date or 5 Days Before CloseDate?
Answer: Rule criteria should be
Closed date  equals TODAY
and rule should trigger 5 days before closed date.
you can check it in your dev org. it's working fine for me


Dangers of connecting ground to neutral?

Question: In my living situation, there is no ground wire at the building. There is a ground AND neutral bus in the breaker box, but it doesn't extend to this separate building, which I'm living in. I've got all my stuff plugged in, including my computer and monitors, heaters, soldering station, etc. Recently I noticed that when my socked-foot is on the concrete and I touch any bare metal on my computer case, I get a tingle in my finger. I also just noticed the same thing while soldering and holding the piece of solder. I know what this means, and I'm curious if it would be super dangerous to bridge the ground and neutral posts in the outlets together. I know they're linked in the breaker box, and all the receptacles in this building are on a single circuit breaker. I know it's not advised, but since modifications like adding a ground post or running a new wire to the main building aren't possible, would this solve the tingly-finger issue? I live in the US and there is only single-phase 120VAC out to this building.
Comment: If making the installation safe isn't an option that only leaves moving out or writing a will.
Comment: Does the outbuilding have a subpanel with its own ground rod, or is it simply fed with branch circuits from the main building's panel?
Comment: @ThreePhaseEel The separate building (garage) does not have its own panel or ground rod, it's fed by a live and neutral wire from the main panel in the house. There are actually 3 wires from the house to the garage, but it was for a two-way switch and the traveler wires have both been linked together in the house (with a wire nut, by me, to bypass the two-way switch), so effectively there's two identical live wires and one neutral.
Comment: Is the feed to the garage a directly buried cable, or in a conduit?
Comment: @ThreePhaseEel They are run through the air from the roof of the house to the roof of the garage. They go from the breaker box, through the conduit box in the house where there used to be a 2-way switch that I bypassed, then up through the wall to the apex of the house, then to the garage and directly into the switch and lights in the garage.
Comment: @ThreePhaseEel I thought about reusing one of the wires and driving my own ground rod at the garage, but the homeowner doesn't want me to do that, for whatever reason, and running new wire to each outlet in the garage isn't possible.
Comment: What sort of cable is used for the overhead run? Can you get us photos (without getting too close, of course)?
Comment: There are 3 individual solid, probably 12 guage wires running through the air. They're properly mounted on both the house and garage with ceramic mounts. Any pictures would be pretty useless, honestly.
Answer: Based on further conversation.... this is an emergent condition that is trying to kill you.  It hasn't succeeded only because the shock path to source is high-impedance and limiting current flow to below 10ma.  (if you can feel it, it's at least 1ma).  Naturally occurring impedances can change dramatically, so it could turn and kill you tomorrow.
You say your garage already has a ground wire that you've tied into.  However since it is not tied back to the house, it is a "fake ground". It makes things more dangerous.

If a grounded device has a ground fault, that current is harmlessly shunted back to the main panel.
If an ungrounded device has a ground fault, it electrifies the chassis of that device only.
If a device plugged into a fake ground has a ground fault, it electrifies its chassis and every other device also plugged into that fake ground.

You have the latter situation and it's Very Bad.   Any device in the garage could be the origin of the ground fault that is giving you these problems.
The right solution is twofold:

Disconnect the fake ground from your receptacle(s).  This will protect you from any rogue ground faults in other devices in the buildings.  In this situation you are better off with no ground than fake ground.  Beware: metal junction boxes and conduit can deliver "ground" to the yoke (bracket) of a device, make sure that can't happen!
Replace that receptacle with a GFCI receptacle.  This will assure any ground faults don't kill you and confine any ground faults to just what's plugged into it.  So if only your devices are plugged into it, it's gotta be safe!   Connect only hot and neutral to the GFCI.  Mark the receptacle "no equipment ground"; it should come with some stickers.  Don't hook anything to the LOAD side of the GFCI.

Let's go into the details in my original answer.
Tying neutral to ground makes things much worse!
Under ideal conditions, modern electrical wiring is done as an isolated system, with a safety shield.  Without grounds, it should be the same, only without the safety shield obviously.
What's the deal with the neutral-ground bond in the main panel?  That is only to bond the isolated system to protect it from ESD, lightning and ground faults.  Never bond neutral to ground anywhere else - if the neutral wire breaks, neutral will float up to 120V, and that means, so will ground!  We see people fry themselves this way on a regular basis.
No appliance anywhere should be leaking any conductor to its case.  Not even neutral (as you propose) - because if you flip the plug over, or lose neutral, neutral becomes hot.  The ground shield would help if it was there.  A GFCI/RCD device would help a lot.
Get a GFCI
A GFCI receptacle or breaker will detect ground faults for you and shut off the power.  Mostly it's useful as a diagnostic aid, "when I touch X, the GFCI trips" which tells you X has a ground fault.  The GFCI doesn't care whether your building has grounding; it is comparing hot and neutral current flows and looking for current that has gone astray (e.g. through you).
Write yourself a get-out-of-jail-free card
Since you are leaving this behind, make sure you write a letter to the landlord advising him of defects in the garage wiring and the fact that you experienced tingling, shocks, whatever you did in fact experience, and that you did make an effort to reduce the hazard but that fixing it properly was impossible for you.  Keep a copy of the letter, it is your get-out-of-jail-free card if anyone is hurt in the future.
If someone is hurt, the landlord's best defense is "I didn't know" and to pin it on anyone but himself. His lawyer will force him to viciously deny receiving the letter; he will claim you created the hazard.  You want as much "paper trail" as possible to prove you sent it: at the very least a certified mail receipt, better sending a CC of the letter to the city's electrical inspector, and best having your own lawyer send it.

The rest of this advice applies to people able to modify the home at will.
Retrofit that ground!
Many people refuse to add grounds because they think they need to replace all their wiring. Now let's pause for a moment.  Wires that carry your power ordinarily (hot and neutral) need to run together.  That assures their magnetic fields cancel out and don't cause heating that starts a fire.  However, this does not apply to ground wires.
So in the 2014 NEC, Code was revised to give you wide freedom to retrofit grounds.  So you can just run the ground wire you need any way that is reasonable - including between buildings - and you don't need to follow the same route.  The book says "Git r done"!   And hardware stores sell bare ground wire, or you can take the insulation off Romex.
Don't parallel wires
Noting that you converted a pair of 3-way switches into non-switches, you should not have tied the two messengers together on both ends.  Paralleling wires causes a lot of subtle problems.  You should use one messenger or the other.   The other wire should be capped off as a spare.
Gee, what would you do with that spare?  Hum de dum...  I can't suggest using it as a ground wire because we follow Code here and there's a Code requirement that ground wires under 6 AWG be natively green or bare, and not just taped green.
A ground rod to the building is not enough.
The grounding system has at least two purposes:  One is returning natural electricity sources (ESD, lightning) to earth.  A local ground rod on your building will do that fine.
The other is returning fault current to source (which is where artificial electricity wants to go).  A ground rod in a remote building will not do that because dirt doesn't conduct electricity well enough to reach the ground rods in the main building.  That is why you need to have a ground wired between buildings.
If you really need a lot of power out there
Since I assume the 3-way is a 120V circuit, you could really bump up the power out there and solve your grounding problem by putting a transformer in your outbuilding and creating a separately derived service.  A transformer's isolation moots the ground wire back to the house, and requires a local grounding system (since this would then become a main panel).
However, this requires more education and a lot more respect for electricity than I have seen in OP. This stuff can kill you, and it's already trying.
Comment: Yup - definitely don't suggest using that spare wire as a ground ... ;)
Comment: Amended answer to address your latest info.  Don't let this kill you (or the next tenant).
Comment: I'm not sure I would blame the PSU, it's brand new and only has this problem in this building. It's definitely not static electricity because I've tested it with the meter. That, and the fact that it's not just the computer but the soldering station as well.
Comment: I did some testing and found out that the hot/neutral of the receptacle is wired correctly (that is, neutral is the left slot and hot is the right) but my ground is also giving a voltage, so my thinking is that somewhere in the old wiring of the garage, someone either accidentally or through stupidity, tied the live wire to the unused ground wire. What's odd is that only the plugs that I installed even have a ground, the garage is essentially on a 2-wire circuit, so I don't know how the ground slot could be giving any voltage at all.
Comment: **Wait. What??** Ground is not being brought over from the house, but there is this existing wire in the garage that you are using *as* ground even though you know it can't be a good ground!? <-- THIS.  When you say *stupidly... tied the live wire to the unused ground wire*,  stupidity not required, **a ground fault in any device in the circuit** would have that same effect. It would affect every device.  Some ground faults leak just an amp or two, and wouldn't display on a properly grounded site.  Unless it had a GFCI, and you should *really* be using GFCIs here. Not doing so is a death wish.
Comment: There is nothing tied to ground anywhere that I know of. All that is coming into the garage is live and neutral. Like I said, this wasn't an issue until I moved into this building. I've had all of these things plugged in in other houses without these problems. I'm moving again soon, but I would like to fix the issue before I do. I'm 100% certain the ground fault isn't with anything I've plugged in, because I'm pretty sure that the homeowner is having her teenage daughter move in here when we leave.
Answer: The answer to you question, is no. You should not, under any circumstances, connect the ground terminal of a receptacle to neutral.  Doing so could turn you tingle, into an all out shock.
In fact, if you're feeling a tingle from your devices, you might want to make sure the neutral isn't already connected to the ground.  If it's not, then your devices may be faulty.  Under normal operation, there should not be current flowing on the exposed metal of a device.
My advice.  Install a proper 4-wire feeder, or disconnect the power to the building.


strongly correlated limit of the electron gas

Question: In chapter 7 of "introduction to many-body physics" by Coleman, the author calculated the Hartree-Fock contribution to the energy of the electron gas, following which it is claimed that the most strongly correlated limit of the electron gas is the dilute limit. This statement appears quite counter-intuitive to me and the author didn't explain why. Any help is greatly appreciated!
Answer: Yes, it is indeed counterintuitive, because it is a purely quantum result with no classical counterpart. The reason is simple and stems from the Heisenberg uncertainty relation.
The Hamiltonian takes the form $$H = K + U := \sum_{i=1}^N \frac{p_i^2}{2m} + \sum_{i,j \neq i}^N \frac{q^2}{|{\bf r}_i - {\bf r}_j|}.$$ Specifying the density is equivalent to specifying the mean interelectron spacing $a$ (not the Bohr radius!). By the uncertainty principle, the typical momentum $p$ satisfies $p a \sim \hbar$, so the kinetic energy scales like $a^{-2}$, while the potential energy scales like $a^{-1}$. So at low densities where $a$ is large, the potential energy dominates.
The physical intuition is that packing in electrons very tightly is kind of like confining each one in a small box. And the HUP tells you that if they're confined to a small box, they will have high momentum, so they'll be moving so fast that their interactions will be negligible - they'll just fly right past each other without having enough time close together to be deflected very much. Even though the potential energy becomes stronger for denser systems, the kinetic energy becomes stronger even faster, and it's the relative energy that matters.
The crossover value of $a$ for which the two energies are comparable is around the Bohr radius $a_0$. Unfortunately, in real metals the interelectron spacing is often of this order of magnitude, so neither the kinetic nor the potential energy dominates and we need to consider both together. This is why some metals are strongly correlated and others aren't.
Comment: I see. Wigner crystal is a nice example, many thanks!
Comment: If we consider an extreme example: 2 electrons are located thousands of miles apart from each other. The 2 electrons can barely feel the existence of each other. Then how could they be strongly correlated?
Comment: @M.Zeng They're not, but that's not an electron gas. The electron gas argument only applies to a many-body system, in which the Coulomb repulsion between the many electrons tends to localize each one in place.
Comment: well, whether it is strongly correlated or not depends on whether the electrons in the system can be treated effectively as weakly interacting quasiparticles. So the number of particles doesn't matter in this sense, but this is not the main problem here. We can use sufficiently many electrons if you want.
Comment: but certainly the Coulomb repulsion does not serve to localize the electrons in place. If the particles are far away from each other, then each of them may be very well described by a single-particle theory.
Comment: @M.Zeng It depends what physics you're trying to capture. If you had a region of space many miles across, consisting *entirely* of electrons at a density of one per mile, then the ground state would consist of a Wigner crystal in which the electrons are localized and lock into a bcc lattice. The many-body low-energy physics of such a system would indeed technically be "strongly correlated" because each electron's localization comes from the (tiny) Coulomb repulsion of the faraway ones. Such a ground state would be incredibly unstable, because it would be so easy for any single electron ...
Comment: @M.Zeng ... to move away from its equilibrium position. The characteristic energy scale of the system would be tiny - $e^2/(\text{1 mile})$ - so you'd need an *incredibly* clean system at *incredibly* low temperatures to get the Wigner crystal, so this is completely physically unrealistic. But nevertheless the exact ground state would technically be "strongly correlated," as the electrons would be localized.


push notification with username and password

Question: I am developing an app for the iPhone that needs to notify the user when they have any new unread important messages, so i am wanting to use the push notification service. But the user has to sign in using a username and password which is then checked against the web service. Can I still use the push notification service if the user has to sign in with a username and password? And if i can is there any example code any where that does the  same thing using push notification with a username and password?
Comment: Yes, I don't understand what the problem is. The user gets a notification and clicks to view the message.  The app opens, and at that point the user can type in the username and password to actually view the message.  Or, is there a different flow than what I am describing there?
Comment: is the user automatically signed out when the app closes?
Comment: your described application flow is confusing. If you are using push notification why you need login, or if you are using login then why you need "push"
Comment: The comments add have actually helped thanks. And Yes the user automatically signs out on app close.
Answer: I have actually resolved this, not with a very good fix but with a fix that will work for the time being. I actually use local notification that runs using schedules and then when it receives a local notification it runs a processor to call to the webservice with the username and password.


Storing all past (user generated) passwords (bcrypted)

Question: I am working on application where I want to add support for Event Sourcing and I am thinking how to solve problem of the passwords (unfortunately I cannot delegate authorisation to external service).  The problem I have encountered is the question "how insecure is storing all passwords for given user (with metadata, like time of change), even in hashed form?".
Answer: I would just record an event like on timestamp T user U changed the password. Storing anything related to the password makes little sense.
Saving the plaintext password is madness. Saving the same hash as the password storage is madness too. Storing a stronger hashed version of the password does not make sense, why store something stronger on the log? Storing an weaker version undermines security.
Saving just the relevant event data (timestamp, user, maybe application module, IP address, things like that) and leaving out the password is enough.
Comment: My idea was to have single log to restore application as a whole. But I think you are right there that there is little to no sense in it as user can always reset the password on their own.


Create a file switching user in the same process

Question: I have a program that needs to create a file in a directory where the user who is running the application doesn't has permission to write, but other user has. Is possible to do that?
I know that I can login a user with write privileges in that folder with LogonUserA, but then I don't know how to create a file using the returned token. Also, I know the user name and password of the user who can write in that directory.
I use Delphi, but the example or ideas could be in any language.
Answer: <code>HANDLE hToken = LogonUser(...);
ImpersonateLoggedOnUser(hToken);
// do something
RevertToSelf();
CloseHandle(hToken);
</code>


How to assign a record for approval to a managers manager

Question: I have a requirement where I need to send a record for approval to the managers manager level. Eg: If A have manager as B and B have manager C. I have a condition that if the the qty is less than 10 the send it to B (Manager of A). IF qty is greater than 10 the send the to B as well as to C (Manager of Manager A). For this I have created a formula field on User to get the user id of the managers manager. I have 2 steps - In first I assigned the record approve to Manager, but in 2 step i need to select the formula field where it refer to managers manager. Is this possible to do from Approval process. Or we need to implement anything else. Please guide me the best way to solve this.
Answer: the solution is to approve along the manager's hierarchy. In a first approval step, the record is to be approved by the manager. Instead of letting the process end, the record is fed into a second approval step, where it is again forwarded to the manager (= the manager's manager). see http://www.cloudprofessionals.biz/salesforce-advanced-approvals-auto-approvals-and-approval-by-managers-manager/ for details.
Formula fields cant work, they deliver text (e.g. names only). To approve via named users you have to include a custom user field to your object.


Difference between failed task and killed task attempt?

Question: Does failed task attempt thrown an unhandled exception ?
Who will terminate killed task attempt ?
Does a killed task attempt thorws any exception ?
Answer: Hadoop will, for example, start a map task again if it has the resources for that and if a currently running map task is doing very slow-> if there is a chance that a running map task fails it tries to start a second instance of the task (Speculative Execution). This leaves you with two options about the outcome of the job. Either the map task, which was started earlier will eventually finish and hadoop will kill the second map task(this will leave u with one killed task), since it is not needed anymore or the first task will fail and then (hopefully) the second one will succeed (this leaves you with one failed task). At least this is what I understood from google-ing around. Here is a link to this explanation from the book:
Hadoop:Speculative Execution
Hope I helped!
Cheers


Listing in reference section, but not quoting

Question: Can we list papers/Journals in reference section, but do not quote them in thesis. It may happen that I read some papers which are close to my area of work, but I may not use any idea from that paper. So in such case, I may not quote anything from that paper. But since I have read that paper, can I list that paper in reference section?
Comment: The references section is not supposed to list every paper you have read; only those which you think the reader needs to know about.
Comment: What is the merit of listing a paper that you don't use in your argument? The reference 's purpose is to help reading your argument, not a list of your accomplishments or general recommendation for reading in the topic. Also, you should note that many regular references are just pointing important papers or reviews in the field, which may be your original purpose here
Answer: Many journals require you to reference every entry in your list of references somewhere in the paper. That is probably also a good rule of thumb for a thesis.
The reason for this rule is that people do not typically just read through the list of references by itself. They read through the text, and in places where another publication is referenced, they will look it up in the list of references at the end. If the list of references contains entries that are not in fact referenced anywhere in the text, nobody is likely to ever look at that entry.
In practice, if you think that a paper is relevant for your thesis, then there ought to be a place in your text where you should cite it. If you cannot find a place where it would be worthwhile to cite it, then the paper is likely not relevant.
Comment: "The reason for this rule is that people do not typically just read through the list of references by itself." - I think that is a questionable assumption. I have met plenty of researchers who saw "take a paper related to your research interests, jump right into the bibliography and, one-by-one, check whether the referenced works are relevant to you" as one of their primary methods of maintaining a wide overview of all the interesting ideas published out there.
Comment: @O.R.Mapper -- I don't doubt that *some* people do it *some* of the time.  I'm among them. I doubt that that's the majority situation when people read papers.
Comment: Can't you make some sort of remarks like "This work is closely related to [1], [2] and [3], that investigate [this other issue]"
Comment: @Ant -- clearly. What I wanted to point out that if it is possible to make such a remark, then *that remark should have been in the paper to begin with* because the references are pertinent to the place in the paper where you want to put the remark.
Answer: The correct answer for you will depend on your field's citation style. In styles more common in the humanities, you might have a Works Cited section, a Works Consulted or just Bibliography section (MLA style), which together work quite different than APA/IEEE/ACM styles.
The Works Cited section works as the Reference section does in APA/IEEE/ACM style, and only the works cited section needs in-body citations. If you do not cite and properly integrate the work into the body of your paper, you do not include it in the works cited/reference section.
However, some styles and fields use the concept of a more general "Works Consulted" or "Bibliography" section, and listing here does not require you to cite it in the body of the text at all. Here you are explicitly required to include any materials you read, consulted, or which may have materially contributed to your work, even though they were not explicitly cited, quoted, or more directly referenced. This style of work believes in acknowledging much more generalized/abstract "indebtedness", and proponents of this practice often argue that it is more scholarly honest. In fields that don't use it, the argument tends to be that it's overkill, unproductive, and unnecessary, and thus is not used. The fields that use this style also tend to allow secondary sources, and thus both primary and secondary sources end up being listed somewhere even if you only cite the primary source.
You should refer to your own field's style guide and norms, or other explicit rules of your program and institution, to determine what is required of you in your work. In fields where you must actually reference the work directly in the text, it is not appropriate to "stuff the references" with work you did not cite directly. In fields with works consulted/bibliography sections, it can be considered plagiarism and scholarly dishonesty to not list items that you did not even explicitly reference in the text body.


Use of "As well" in the beginning of a sentence

Question: Is it improper to start a sentence with "As well," to mean "In addition"?
Some grammar books say "As well," should be used only at the end of the sentence. Is it so?
Comment: Sentence-initial _Too,_ and _Plus,_ also seem to be more idiomatic in some regions than in others.
Answer: According to Bryan Garner's Modern English Usage (2016), initial as well meaning "also, in addition, moreover," is standard Canadian usage, but usually considered poor style elsewhere. So if you're Canadian or writing for a Canadian readership, feel free to use it. If not, it would be best in some other position in the sentence.
Comment: Why did you not tell us what your search engines and on-line thesauruses told you, please?

"As well" is well able to start a sentence in many contexts, and unreasonable in many others.

As so often, here, context is all…
Comment: Right. As long as those contexts are in the land of Molson and Tim Horton. There was also a brief essay on the OED website on Canadian English that mentioned initial _As well_ as a characteristic of Canadian English as well. Oh, look! I'm not Canadian and I put it at the end of the sentence. Note this is not _as well as_.
Answer: The use of "As well" as an initial conjunction is unique to Ontario natives. I'd never encountered that usage anywhere in print or in speech in Western Canada during the four decades preceding 2003, until a young editor from Toronto began working in our Japanese translation office in Vancouver. I'm afraid that Texas-born Garner has mistakenly generalized what's recently become common in populous Southern Ontario as "Canadian."
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

Use of “As well” in the beginning of a sentence


Examples of higher dimensional TQFTs

Question: 1-dimensional TQFT's assign to every 1-manifold (disjoint union of circles) a vector space and to every surface a linear map between the vector spaces that correspond to the boundary manifolds. So this is a functor from the cobordism category of 1-manifolds to the category of vector spaces. What are some examples of higher dimensional TQFT's? ie functors from the cobordism category of n-manifolds to the category of vector spaces.
Comment: As already said, two dim TQFT corresponds to Frobenius algebra, because every surface has a "pair of pants" decomposition. The simplest example of $2$ dim TQFT I know : take a triangulated surface, a vector space $V$, an element $a \in V \otimes V \otimes V$ and a contraction $\mu \in V^* \otimes V^*$. Triangulating your surface, you can put a copy of $a$ on every triangle, taking the big tensor product of all $a$ and using edges for contracting. You will end with a scalar which is an invariant of the surface. $a$ and $\mu$ have to verify some conditions (invariance under Pachner moves).
Answer: Two dimensional non-extended TQFTs correspond to Frobenius algebras and there's a book about that (only the short version is linked tho).
Extended TQFTs are a technically more daunting, but conceptually easier to define gadget: if you believe this paper (you should; a more user-friendly presentation is contained in this master thesis) the $\infty$-category (in some model: the paper uses Segal spaces -am I right?-) of $n$-dimensional cobordisms happen to be the free symmetric monoidal $(\infty,n)$-category on a single generator.
For what I can understand and remember, the issue with the nonextended version is that without higher category theory you cannot properly address Baez-Dolan conjecture. As the dimension goes up and up, you can not expect to have a nice classification of the manifolds in your cobordism category in terms of "generators and relations" as it happens in dimension two.
Three-dimensional TQFTs are studied in a beautiful, but difficult, book by Turaev, because of their link with knot theory, but I would appear ridicolous if I attempted to explain more.
All this material, however, comes from my bad memory and from a rather unthoughtful googling operation: you can certainly find something that suits better your curiosity if you interrogate it too (Plus, I'm far from being an expert in each of the things I cited.) :)
There are, in fact, several different approached to the subject, and it might be dispersive not to choose one on which you want to concentrate first: just to mention one, https://arxiv.org/abs/0806.1079

Examples of higher dimensional TQFTs


Can a plane window create a constant divergence or convergence beam?

Question: If we consider a plane window as a lens, then both the radius of the lens is infinity and its focus lies at infinity. So if a light beam coming from infinity and parallel to the principle axis then since the beam tend to converge or diverge towards the focus so the beam will never converge or diverge and the beam will remain with the same divergence or convergence. So we can create a beam with constant divergence. Is this idea correct practically since it is correct theoretically?
Answer: The problem with the setup you describe is that we need a beam with zero divergence to start with. So you can't create a zero divergence beam.
Your window will not change the divergence of any light rays that pass through it. So if the beam has zero divergence before it reaches the window it will have zero divergence after it has passed through the window. But if the beam has a non-zero divergence before it passes through the window it will have the same non-zero divergence after it has passed through the window.
Comment: I said the beam will no more converge or diverge,I didn't mean 0 divergence.So by principle them beam will travel with same divergence or convergence.
Answer: A lens with flat surface does not change the angle of the beam and only apply a shift to output beam position. As you see in the diagram below
Answer: In a sense, yes: a beam with no divergence or convergence (that is, zero divergence) will continue with no divergence or convergence after it passes through a flat window (or reflects off a flat mirror).  However in practice the beam will diverge slightly unless the incident beam and the window or mirror are infinitely wide. See [https://en.wikipedia.org/wiki/Gaussian_beam#Beam_waist].


Allow only ls on directories

Question: how can I set permissions to a folder so all users not in my group, can only do ls on it? I don't get the difference between - and r.
Comment: You want people to be able to list the contents of a directory, but not to e.g. `cd` into it, or access subdirectories?  Could you add a behaviour that you want to deny and one that you want to allow?
Answer: The important flag is the "execute" flag on the directory, which on directories is actually a "traversable" flag. If it is not set, the directory cannot be used in a path. So: 1) you cannot CD to it, and 2) you cannot use the files in the directory.
Let's set up test ritg with a directory and a file
>>mkdir listonly
>>touch listonly/uselessfile

So far so good:
>>ls listonly/
uselessfile

Change the executable flag of the directory:
>>chmod -x listonly

You can no longer CD to it:
>>cd listonly
bash: cd: listonly: Permission denied

When you use ls you can see the files:
>>ls listonly/
uselessfile

However, in many cases ls is aliased to add some options that require looking at the metadata for each file (flags, timestamp, size...), which it cannot do since that requires using the directory in a path (for me that was ls --color=auto') so you have to use plain ls otherwise you get a of the files but with unsightly errors:
>>ls listonly/
ls: cannot access 'listonly/uselessfile': Permission denied
uselessfile

Note that file explorers typically change their working directory to the target directory to list its contents, so this may not play well with GUI interfaces.
Answer: Example:
#change current directory to /tmp/
vodka@vodka-PC:~$ cd /tmp/

#create my_folder directory in tmp
vodka@vodka-PC:/tmp$ mkdir my_folder

#chnage directory permissions to 775
(all people can show dir content and make cd,
but can not remove or create new files)
vodka@vodka-PC:/tmp$ chmod 775 my_folder/

#check permissions
vodka@vodka-PC:/tmp$ ls -ld my_folder
drwxrwxr-x 2 vodka vodka 4096 окт 20 11:26 my_folder

#create new test file
nano ./my_folder/test_file.txt

#chage file permission to 770 (only owner and member of groups can show file content and modify it)
vodka@vodka-PC:/tmp$ chmod 770 ./my_folder/test_file.txt

#test it. Switch to postgres user and show dir content. We see files in directory
vodka@vodka-PC:/tmp$ sudo su - postgres
postgres@vodka-PC:~$ ls -l /tmp/my_folder/
-rwxrwx--- 1 vodka vodka 4 окт 20 11:27 test_file.txt
#try to show file content, remove or create new files in dir
cat: /tmp/my_folder/test_file.txt: Permission denied
postgres@vodka-PC:~$ >/tmp/my_folder/test_file_2.txt
-bash: /tmp/my_folder/test_file_2.txt: Permission denied
postgres@vodka-PC:~$ rm /tmp/my_folder/test_file.txt
rm: remove write-protected regular file '/tmp/my_folder/test_file.txt'? y
rm: cannot remove '/tmp/my_folder/test_file.txt': Permission denied

So, other users can only show list of files.

Allow only ls on directories


How do you make a word in Latin a Dative case?

Question: I would like to know the step by step way.
Answer:
Look up the noun in a dictionary, which will list the nominative and genitive forms.
Compare these to a table of declensions (possibly contained in your dictionary) to identify which of the five declensions your noun belongs to.
From the same table, read the relevant dative ending (paying attention to whether you want the singular or plural) and apply that.

The way you've phrased your question suggests you are completely new to Latin, and I would encourage you to learn in a more systematic way than just learning individual processes like this. The dative (and any other case) is used differently in every language and isn't very helpful in isolation.
Comment: A clarification to step 2: compare the genitive, rather than the nominative, because the genitive is a surer indicator of the declension and the stem.


iSync w/ Nokia 7705

Question: I have all my phone saved in address book on my MAC (snow leopard) how do I transfer these phones over my new phone? I did pair it through bluetooth, although when I tried using iSync, I get "this device is not supported by isync"
Answer: first you need to export all of your vCards out of address book and then using vCard Splitter to split that one file into multiple peaces and then using bluetooth you can upload to your phone!
Answer: Try The Missing Sync for Symbian by Mark/Space.
Comment: Nokia 7705 isn't running Symbian OS

iSync w/ Nokia 7705


How to cite a book with no editor but different authors for every chapter?

Question: I want to cite from this book. It has explicitly marked different authors for the chapters, but there are no editors given on the front pages. Is this then regarded as a monography rather than a miscellany/anthology or do I use all authors as editors?
Comment: @manuel459 The front matter doesn't make any mention of an editor, so it seems more appropriate to consider them all as authors of the book.
Comment: I think you cite the particular chapters you refer to, each with its authors.
Comment: So I use the authors as editors of the book?
Answer: I would say something like

Joos, Erich,  title of appropriate chapter ,  in
Decoherence and the Appearance of a Classical World in Quantum Theory , Springer, etc,  Chapter zz   pp. xx-yy.

in whatever format best matches the bibliography style of the journal.
Comment: I've used this format for a chapter in a book with no known editors. If I wanted to cite the whole book rather than a particular chapter, I'd just delete the part "Joos ... chapter, in" from Ethan's example.
Answer: @Ethan Bolker gives the right answer, and the only thing that one should add is to remind you of the purpose of a citation: It isn't an elaborate exercise in testing whether you can follow a specific syntax (this is for all of you APA folks out there! :-) ), but it is a way to help your readers find related literature. If you provide the citation in a way that makes it easy for readers to find what you are pointing to, then you've succeeded, and the example by Ethan Bolker achieves this.


Is there a way to add repo to Snappy ubuntu core?

Question: I am trying to install more stuff and I am seeing very little in snappy's install.
Is there a way to use apt-get or add repositories to install?
Answer: No, at the moment all you see is all you get. Snappy has just been launched, and it will take some time before applications get packaged for it.
As you can see, APT is not installed, and if you try to use apt or apt-get, you will get this message:
Ubuntu Core does not use apt-get, see 'snappy --help'!

snappy is the new package manager, and that is the one that you should use. In particular, snappy does not have the concept of 'repository': i.e. all packages come from the same source.
Comment: Ah, I am looking forward to get snappy on raspberry pi 2 and get lots of things going there.. Hope to see more things on snappy soon. Thanks!
Answer: To get apps that are not already packed as snaps (especially for arm platform) I am using classic mode installed by:

sudo snap install classic --devmode --edge

then activate with

sudo classic

then you can use the classic apt-get
Answer: Maybe you can just create a snap from the ppa/apps you want.
Here is how I create an APT snap:
First you will need to install snappy-tools on your host system:
$ sudo apt-add-repository ppa:snappy-dev/tools && sudo apt-get update && sudo apt-get install snappy-tools

Convert APT packages into a snap by using deb2snap ,
more details please found here: https://github.com/mikix/deb2snap
$ bzr branch lp:deb2snap
$ cd deb2snap
$ ./deb2snap -d 15.04 apt

Install your snap:
$ snappy-remote --url=ssh://[user]@[target ip]:22 install apt*.snap

Make whole system partition writable,
which also means the system will be restored if you upgrade or rollback ubuntu-core, but apps installed by using snappy will remains here.
$ sudo mount -o remount,rw /

Run the app: apt
Because a Segmentation fault, I cannot just use the command apt.apt, which we just installed, but you can do this instead:
$ sudo /apps/apt.sideload/current/bin/apt.real

and so you can start doing this:
$ sudo /apps/apt.sideload/current/bin/apt.real install software-properties-common # which gives you the ability to add ppa


How can I lower Teamviewer CPU Usage?

Question: I often use Teamviewer to access my MacBook Pro from my main mac, and also my families computers to assist them with problems.
Teamviewer on my MBP will use upwards of 46/62% of both CPUs and 58.9mb ram (its a 2009 MBP), while if I use Apples own remote control (I assume its VNC), 'ScreensharingAgent' it will sit nicely between 1.3 to 1.9 CPU % at 28.2MB of ram.
In terms of image and speed, both look exactly the same, I think Apples remote control is even snappier in responding, but maybe its because of the CPU usage.
The situation is even worse when I am trying to help my mom who is using a 2010 Macbook Air that is considerably less CPU performant.
I have set up Teamviewer to optimize speed whenever I connect to any of the computers and I have also ticked all boxes that I thought made sense, even lowering the color amount to LOW (256) and even grayscale without much change.
I also live in Portugal, so, both houses use Fiber optics connections (100mbs or so) and my MBP is even in the local lan, so I know bandwidth should not be a factor.
I have Googled around and I have found other people with similar problems but no real solutions to the CPU problem.
Comment: The optimization for speed you set is to lower bandwidth usage, not increase processing speed.
Comment: Consider using nice or renice to change the process priority level,  but this is an old question so why has it returned?
Comment: Well, the problem was never really solved :/ To this day, Teamviewer continues to hog most systems.
Answer: You can try to set a lower priority to the TeamViewer daemon process so that it will less interfer with other applications if you want the computer to stay more responsive. This may indirectly decrease the amount of CPU TeamViewer uses when other applications are being used.

How can I lower Teamviewer CPU Usage?


Which registers are safe to use in a function (x86)

Question: According to Wikipedia the Intel ABI allows using EAX, ECX and EDX without preserving them in a function.
I am not sure what "Intel ABI" means. Does this mean it is enforced/followed by all compilers targeting Intel CPUs? I am writing an assembly function that will be called from C code. Can I assume this for all compilers? (I am only targeting x86 at the moment)
Answer: The Intel ABI is just a calling convention established by Intel.
In general, how parameters are passed and which registers are saved or trashed during a function call is defined by the Calling convention of the function:
http://en.wikipedia.org/wiki/Calling_convention
In particular for __cdecl, __stdcall and __fastcall you should expect EAX, ECX and EDX to be trashed, and your function should preserve other registers and return on EAX (or EDX:EAX for 64-bit returns).
If you don't know what the calling convention that you should be using is, you shouldn't be writing in assembly, since messing up the calling convention can lead to exploitable bugs in your application.
In C, the default calling convention is normally __cdecl and for Windows exported APIs it is normally __stdcall.
Comment: I know the calling convention I need to be using, and know it's meaning as far as order of parameters and stack cleanup. I didn't know about the registers. Do you know which compilers follow this ABI? msvc/gcc?
Comment: @baruch At least for MSVC, the calling convention is specified in the function prototype. The compiler looks at this and does the right thing. For ex, WSARecv's def starts like this `int WSAAPI WSARecv`. The `WSAAPI` resolves (through several #defines) to __stdcall.
Comment: @MarcSherman I am aware of the calling convention, but is the register preservation part of the calling convention?
Comment: @baruch: Yes. Register preservation is a fundamental part of the calling convention. Read the Wikipedia article in this answer for more details.
Comment: @baruch Sorry about that. Anyhow, the debugger doc that comes with windbg states this about the relationship of calling convention and register preservation: "The x86 architecture has several different calling conventions. Fortunately, they all follow the same register preservation and function return rules"
Answer: It's the Intel Application Binary Interface, a set of rules dictating things like what registers are available for use without saving, how arguments are pushed on the stack, whether caller or callee cleans up the stack frames and so on.
If you know that the rules are being followed, that's fine. I tend to save everything just in case (other than those things I'm using for returning information of course).
But it's not necessarily enforced for all compilers and you would be unwise to think so unless the compiler specifically states it.


Does SO have a place to accumulate similar or duplicate questions?

Question: I am a student with quite limited experience in programming, so I spend a lot of time on SO. When I search for a problem I have, I usually come across multiple similar questions, some even duplicate. In my experience, duplicate questions may actually have a different answer, one of which works better than the other. Is there a place where issues for one topic (i.e Java JTables) are combined? I would also like if the answers are generalized because most of the time they focus on the code in the question. Is there maybe a way to integrate something like this in SO?
Comment: Very common problems do need about two dozen questions before SO users stop adding more of them.  Mission failed btw.  You don't have enough rep to really do anything about it and it is probably too late anyway to get them marked as duplicates.  Technically faq can be added to the tag wiki, you can propose an edit.
Answer: There are two things you can do.

Add your answer to the open question. However, this will only work if your answer also answers the open question - which it should do if the questions are duplicate.

If you think that the duplicates aren't really duplicates then edit the question (you can suggest edits with any reputation) to bring out the differences and flag (or vote if you have enough reputation) to reopen. If your edit is accepted the question should be added to the reopen queue. While it normally takes 5 votes to reopen a question someone with a gold badge in one of the original tags on the question can reopen with a single vote.
Once the question is reopend you can add your answer.
Comment: My issue is not with the duplicate questions or missing answers. I usually have to hack together different Questions and answers and would like a place where I could share my results.
Answer:
I usually have to hack together different Questions and answers and
  would like a place where I could share my results.

Above is from your comment. It's the crux of the issue. SO requires users to do some work to adapt generalised solutions (or specific applications of such) to their own problems. SO doesn't aim to do anyone's project for them. For the latter, there's an active marketplace outside  of SO for contracted work or code mentors.
This is intentional. SO can cater for and address a wider range of problems this way. If you would like to combine aspects across multiple Q&A and put them together in a coherent way, you could write your own Q&A. However, for this to be successful you should consider:

For your Q&A to be more useful, someone should be able to apply the knowledge to their own problem rather than just your issue.
If you are lifting aspects of other answers, you should credit them accordingly. Your answer should clearly demonstrate the novel way you are combining the various elements.

If your problem is trivial, it will likely be closed as a duplicate of trivial problems. (Remember, multiple duplicates may be associated with a single question.) Make sure you are contributing something new to SO. Use your judgement to assess whether it has some  use beyond your use case. You'll know after a few tries, via community feedback, whether you're getting it right.


STM32 USART loopback

Question: Is it possible to connect the Rx and Tx pins of the same USART or on two different USARTs on an STM32 discovery board to make a loopback and test the USART?
Comment: Yes, as long as you make sure only one device is writing on every line, I believe. There should not be two devices talking on the same line.
Comment: What do you mean with same line ? I am only using the Tx and Rx pins by the USART (no GPIO)
Comment: BTW one of 1-wire implementation works exactly like this: you connect together RX and TX of same USART.
Comment: I just tested it now on 2 different USARTs and it worked perfectly. Moving on to same USART :)
Comment: You should ask @camil-staps to form his comment as an answer so that you can officially accept it. Despite the miscommunication about multiple USARTS, he did take the time to answer your question.
Answer: You can do anything with USART lines as long as you stick to one basic rule. To understand this rule, you have to understand how the protocol works.
Basically, we have two lines: Rx and Tx. Let's consider these from the device A point of view. Rx is A receives, Tx is A transmits. This means Rx is B transmits, and Tx is B receives. You can now see that these two data lines are one-directional: it's in the circuit who writes and who reads.
It's possible to 'hack' a USART communication: sending data to device X and listening with device Y. Actually, it's a great idea. For example:

simulate this circuit – Schematic created using CircuitLab
In this case, I wanted to read data from A with B, but A sent way too much data. So I added a filter in C. Device A doesn't even notice this change.
You can do really anything with USART lines: listening with multiple devices on one line, et cetera. Just make sure there aren't two devices that have Tx and Tx connected. They will interfere.
Comment: This is interesting, but seems to answer a question substantially different than the one that was asked...
Comment: @ChrisStratton I tried to give a general explanation of the USART which shows the answer ('yes'). You have to see the different USART modules as different devices and I believe this answer is valid then. Or am I misunderstanding something?

STM32 USART loopback


Free homotopy class of Riemannian manifold represented by closed geodesic

Question: I'm trying to prove the following result, which is Problem 6-17 in Lee's Introduction to Riemannian Manifolds:

Suppose $(M,g)$ is a compact connected Riemannian manifold. Show that every nontrivial free homotopy class in $M$ is represented by a closed geodesic that has minimal length among all admissible loops in the given free homotopy class.

This problem comes with a hint, which breaks the solution down into the following steps:

Show the given free homotopy class is represented by a geodesic loop;
Show the lengths of such loops have positive greatest lower bound;
Choose a sequence of geodesic loops whose lengths approach this bound, and show that a subsequence converges uniformly to a geodesic loop whose length is equal to this greatest lower bound;
Show the limiting curve is in the given free homotopy class;
Apply the first variation formula to show that the limiting curve is in fact a closed geodesic.

I have most of these steps down except 3 and 5. First of all, if I have such a sequence, finding a universally convergent subsequence seems similar in spirit to Arzelà-Ascoli, but finding the right uniformly bounded and equicontinuous sequence of functions so far has eluded me.
Second of all, in proving 5, the first variation formula says that if $\Gamma_s(t)$ is a variation (i.e. a homotopy) between the limiting curve $\gamma(t)$ and one of the sequence curves $\gamma_n(t)$, then
$$
\frac{d}{ds}\bigg|_{s=0} L_g(\Gamma_s) = -\int_a^b \langle V, D_t\dot\gamma\rangle\:dt - \sum_{i=1}^{k-1} \left\langle V(a_i), \Delta_i \dot\gamma\right\rangle + \langle V(b),\dot\gamma(b)\rangle - \langle V(a), \dot\gamma(b)\rangle
$$
where $V(t) = \frac{d}{ds}\big|_{s=0} \Gamma_s(t)$ is the variation field along $\gamma$, $(a_0, \ldots, a_k)$ is an admissible partition for $V$, and $\Delta_i \dot\gamma = \dot\gamma(a_i^+) - \dot\gamma(a_i^-)$ is the "jump" in the velocity vector field at $a_i$. In this case, $V(a) = V(b)$, so we need to show $\dot\gamma(a) = \dot\gamma(b)$ and $\Delta_i \dot\gamma = 0$ for all $i$. Since $\Gamma_0$ is a critical point for this variation, this forumula becomes
$$
\int_a^b \langle V, D_t\dot\gamma\rangle\:dt = - \sum_{i=1}^{k-1} \left\langle V(a_i), \Delta_i \dot\gamma\right\rangle + \langle V(b),\dot\gamma(b)\rangle - \langle V(a), \dot\gamma(a)\rangle
$$
But why does this show the limiting curve $\gamma$ is geodesic? Where in here does it follow that $D_t\dot\gamma \equiv 0$?
Edit 1: I think I can use the Arzelà-Ascoli theorem for $\mathbb R^n$-valued functions of a compact space in a geodesic ball in normal coordinates around a limit point of an appropriate sequence $\{x_n\}$ in $M$; say, for example, $x_n = \gamma_n(0)$, where $\{\gamma_n\}$ is the sequence of geodesic loops.
Edit 2: Using the sequence $\{x_n\}$ coming from $x_n = \gamma_n(0)$, take a convergent subsequence $x_n \to p \in M$, and then let $w_n = \dot\gamma_n(0) \in T_{x_n}M$ for each $n$. Assume after reparametrization that each $\gamma_n$ is unit-speed, so the parallel translations $v_n \in T_pM$ along radial geodesics from $p$ to $x$ are unit tangent vectors. In particular, they too have a convergent subsequence $v_n \to v$. I think the resulting geodesic we want is then just $\gamma(t) = \exp_p(tv)$.
Comment: The hint says to pick a sequence of geodesic loops. so these should have no jumps but your variation formula contains a list of jumps. I think these should all disappear, so you varation formula simply says critical point if and only if $D_t\dot{\gamma}=0$.
Comment: If the jumps all disappear, then we should get $0 = \langle V(b), \dot\gamma(b) \rangle - \langle V(a), \dot\gamma(a)\rangle$. Why is this equal to $0$? What we really want to show is $\dot\gamma(a) = \dot\gamma(b)$.
Comment: If it is a geodesic loop there is no jump at the end points either. The end points are only special in your parametrization.
Answer: I have an (incomplete) idea for (3), so i'm leaving it here :)
Let $\gamma_i: [0, 1] \to M$ be your geodesics, with $l(\gamma)=l_i$, and $l_i \to l$, the infimum of all distances. We have $\lVert\gamma_i\rVert=l_i$. Now, if $t_1<t_2$, we can bound the (intrinsic) distance between $\gamma_i(t_1)$ and $\gamma_i(t_2)$ using $\gamma_i$ as a path:
$$ d(\gamma_i(t_1), \gamma_i(t_2))\leq \int_{t_1}^{t_2} \lVert \gamma_i'(s) \rVert \, ds=(t_2-t_1) l_i. $$
Now, $\sup l_i<\infty$, as $\{l_i\}_{i \in \mathbb{N}}$ is a convergent sequence. This proves that $\{\gamma_i\}_{i \in \mathbb{N}}$ are uniformly Lipschitz functions, and thus equicontinuous.
With that in mind, we can use something like Arzelà-Ascoli: by a diagonal argument and the compactness of $M$, we can extract a subsequence $\{\gamma_{i_j}\}_{j \in \mathbb{N}}$ such that $\gamma_{i_j}(t)$ converges for each rational $t \in [0, 1]$. Equicontinuity (and completeness of $M$) gives uniform convergence, and now we have a uniform limit $\gamma$. In particular, $\gamma: [0, 1] \to M$ is a continuous and closed path.
We just need to bound the lenght, but I'm working on it
Comment: This is a good argument. I think the length lower bound can come from the fact that the injectivity radius of a compact manifold is always positive, so the length of a geodesic loop is at least twice the injectivity radius


Export or download feature layer table data from arcgis online using python or Arcpy

Question: How would I export feature edit layers or their table data from arcgis online using Python or Arcpy?  I want to download the attributes of a feature edit layer.
Answer: With ArcREST you can export/download feature services (plus plenty of other tasks). You can find the source code on GitHub and a sample blogpost that shows how to do it on an older version, though it should be relatively similar to ArcREST 3.
There are some sample scripts in the repo that should get you started, as well.


server name in background

Question: For windows server 2008, is there an easy way to put the server name in the background wallpaper?
I'd like it to display SERVER-A, SERVER-B etc...
I'd prefer not to buy anything or generate images.
Answer: You have an easy option: suck it up and create a simple wallpaper with that server's name on it only.
Another choice is sysinternal's bginfo. Both are free.
Comment: bginfo works well.
Comment: +1 - Yay BGINFO. I run a logon script on some server computers (applied w/ loopback GPO processing) to regenerate the background on each logon, and populate it with various fun items.
Answer: Yeah, BGInfo is probably the best way to go.
You can also have it display useful information like IP, MAC, domain, etc.  You can set it up to update automatically at login with the sweet new task scheduler just set it to "At logon" for the trigger and "C:\Bginfo.exe bginfo.bgi /timer:0" for the action, where "C:\BGinfo.exe" is the path to where you have BGInfo.exe and "bginfo.bgi" is the full path to where you have your saved .bgi.
You can get bginfo by just googling, or by clicking here.
Answer: To be perfectly honest (and simple) I always rename the My Computer icon on the desktop to the server name.
Comment: I frequently do the same. Especially for dev / office servers that I'm on a lot.
Answer: BGInfo is the answer I'm afraid!  I use a funky bit of vbscript which allows you to select the right wallpaper resolution and then runs BGInfo using a config file to put the information in the right place.  The script is below and you can modify it to your requirements:
<code>Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * From Win32_DisplayConfiguration")

Const OverwriteExisting = TRUE

' Determine the size of the desktop
For Each objItem in colItems
    X = objItem.PelsWidth
    Y = objItem.PelsHeight
Next

WScript.Echo "X:" & X
WScript.Echo "Y:" & Y

StrPath = "c:\bginfo\"
strRightSizeBMP = StrPath & "wallpaper" & X & "x" & Y & ".bmp"

WScript.Echo strRightSizeBMP

' Location and Name of Wallpaper
WinPath = "c:\bginfo\wallpaper.bmp"

' Copy Wallpaper for correct Screen Resolution to correct location
objFSO.CopyFile strRightSizeBMP, "c:\bginfo\wallpaper.bmp", OverwriteExisting

' Check for a temp file.  If it exists, this script has run before on this PC, therefore we quit.
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colFiles = objWMIService.ExecQuery("SELECT * FROM CIM_DataFile WHERE Path = '\\bginfo\\' AND Drive = 'C:' AND FileName = 'wallpaper' AND Extension = 'bmp'")
If colFiles.Count =1 Then WScript.Echo "c:\bginfo\wallpaper.bmp exists"

If colFiles.Count < 0 Then
    objFSO.CopyFile strRightSizeBMP, "c:\bginfo\wallpaper.bmp", OverwriteExisting
End If

Set objShell = CreateObject("Wscript.Shell")
objShell.Run("c:\comet\bginfo.exe c:\bginfo\bginfo-cfg.bgi /TIMER:0 /SILENT /NOLICPROMPT"), 1, TRUE
</code>
You should save the script into c:\bginfo\ and also dump the following files into this directory:
bginfo.exe
bginfo-cfg.bgi    (created using bginfo with your specific configuration)
wallpaperYYYYxZZZZ.bmp    (where Y and Z are the resolutions - e.g wallpaper800x600.bmp)
You'll need to create one wallpaperYYYYxZZZZ.bmp for each resolution you want to support.
Finally, just add the full path to the script into the logon script or RUN registry key.

server name in background


Where does spacy, nltk, prodigy, sklearn fit in the AI project?

Question: Where does tools like spacy, sklearn, prodigy, nltk fit in the below AI project architecture and what are some common alternatives to these:
Answer: I am not sure you can neatly fit the above tools and libraries into your schematic. What even is the meaning of "feature" here, is it an output (like "text classification" is an output of the algorithm)? In which case I challenge the usefulness of this schematic.
Nevertheless nltk, sklearn, etc. are libraries that contain multiple and diverse tools to help you do everything along the NLP AI modeling workflow. From feature extraction to modelling and validation.
As an example all three libraries of spacy, sklearn and nltk have the ability to construct models. So they certainly fit into "ML algorithm" but they also help in feature extraction so they fit in that bucket.
Beyond that they offer you general data wrangling capabilities as well as validation measures which do not appear in your schematic.
The main difference
NLTK and spacy are mainly focused on NLP and text-based data whereas sklearn is very much multipurpose.
The Alternatives
The alternatives really depend on your use cases, NLTK and spacy do very similiar stuff so are already alternatives to each other for NLP. Sklearn is almost standard when it comes to ML in python but if you want to build deep-learning you will probably work more with Keras, pytorch, etc.
Comment: It is right that spacy forces you to choose a specific algorithm which is the most effective one, but nltk allows you to choose any algorithm that you wish to use?
Comment: @variable That is not a 100% accurate way to describe this. Spacy contains pretrained models so called encoders which tokenize the text in a specific way like BERT for example. You can however choose between those, the same is true for NLTK. However I suspect you can also build your own tokenizers and encoding models with NLTK and "unlink" the actual model development and the encoding/embedding.
Comment: OK, and what about for example - training a model using SVM / SGD. I know that sklearn allows us to do this. But can this also be done using nltk and spacy?


Blender renders invisible black object in my scene that I cant get rid of

Question: I have been working on a dystopian city environment for some time and when test rendering, there is a huge black cube in the middle of my scene. I have tried using Alt + H and Shift + H to unhide everything but this does not seem to work as I cannot see the cube in the viewport. I have also tried deleting certain objects and looking through the collections but I still cannot seem to find the cube which is only visible in the render. Please help as I do not know what else to try!
Answer: Guys I figured out how to fix this. If you ever have an annoying invisible object in your scene that you cannot find anywhere in the viewport go to the top right filter settings, select 'Hidden' and it will display all of the hidden objects in your scene which you can then delete!