"Contact us" form submission best practice

Question: As a user, when I submit a "Contact us" form with [valid] info, should the page response show in the form (clear the form and show some "We have received your message" type of success message, either at the top or bottom of the form, or should they simply be redirected to another page showing the success message?
Answer: Directed to a new page. Clearing the form is troublesome because it lets the user refill it out, even though there's a message saying it's been received. Redirect moves them away and is a clearer state change for a user to understand.
Answer: There are two good directions that I can think of:
A. Replace form with a friendly success section
Rather than redirect entirely, I'd recommend only replacing the form with a success message. That should prevent the user from getting disoriented and would allow them to interact with other elements on the page if there are any.
There should be a "Submit another message" button under the success message, in case the user wants to write again.
As a nice-to-have, think about including an illustration as part of this success section, to add a feeling of delight to the interaction. Bonus points for a subtle animation in the illustration. People generally remember the best and worst points in an interaction, and they're also likelier to remember the start and the end of one, so a charming experience at the end of an interaction goes a long way.
B. Clear the form and show a temporary success message
I've never seen this approach be a problem for users. On the contrary, it seems to meet their expectations. If you go with this approach, be sure that:

that it animates in so that it's noticed
the success message stays on long enough to be noticed (I use 3.5 s)
it's visible no matter the size of the window (you can animate the "Submit" button for this or use a bottom toast)

While potentially not as charming as the first approach, this approach tends to be a lot simpler to implement.

No matter which direction you go with, be sure to send the user an e-mail confirming that his message was received. As a nice-to-have, it's nice to confirm that their message will be read and mention whether the user should expect a reply and, if so, how long it might take.


Parcooking carrots and green beans for an already well-seasoned casserole

Question: I will be heating an otherwise perfectly-seasoned casserole dish for an hour.  (Time constraint non-negotiable! But temperature flexible.)  I want to add fresh carrots and green beans but am wondering how long to parcook them (respectively) so they will be just right after an hour in a very moist dish of meat and veloute.  Any suggestions?
Comment: 1 hour at what temperature? Seems to me that carrots and beans in a casserole are usually cooked through.  Why not put them in raw and heat the casserole until the veg is cooked?  By that time the dish will be heated.
Comment: Totally read that title as 'Cooking parrots'
Answer: In my experience, carrots at about 1.5-2cm thickness will be cooked through after an hour at a bare simmer. You might consider slightly browning, rather than boiling them before adding them to the mixture, for flavor, and to get them up to temperature. As for green beans, (depending on how you like them ) add them 10 -15 minutes before the end of your cooking time?
But if you really don't want to shift the flavor, why not cook them exactly to your liking and add them right at the end, just before service? More like a garnish than an ingredient. Plenty of traditional French stews do this with bacon, caramelized onions, mushrooms .. etc.


"Pick up a homological algebra book and prove all of the theorems yourself" (exercise from Lang's Algebra)

Question: There's a famous story about an exercise from Lang's Algebra that says something along the lines of "pick up a homological algebra book and prove all  of the theorems yourself".  I cannot find it in the third revised edition, and I'm wondering if it's still in the third revised edition, if it's only in the older editions, or if it's an urban legend.
Comment: @YCor, could you explain why are you making these minor edits for questions that have been there for a decade?
Comment: @GTA this can be (and has already been) discussed at the dedicated chat: https://chat.stackexchange.com/rooms/10243/conversation/bumping-retagging-deprecated-tags
Comment: FWIW I once had a prof tell me that a standard thing was to ask students to prove everything in Spanier. But not everything there is a diagram chase...
Answer: It's real, but only in the first and second editions.  (I don't have any electronic proof, but I've seen it in my copy of the second edition and someone else's copy of the first edition.)  It's the only exercise in the chapter.
The full quote in the second edition is:

Take any book on homological algebra,
and prove all the theorems without
looking at the proofs given in that
book.
Homological algebra was invented by
Eilenberg-MacLane. General category
theory (i. e. the theory of
arrow-theoretic results) is generally
known as abstract nonsense (the
terminology is due to Steenrod).

If I'm not mistaken, the quote is the same in the first edition.  First edition: page 105; Second edition: page 175; so you can look in your library to see if I messed up the quote!
And I do have an electronic copy of the third edition, which I've searched to confirm it is not there.  The historical remarks were expanded, written less dismissively and put at the intro to Part Four.
Update: I've scanned the evidence.  First, Second.
Comment: @Minhyong: you and Joe Rotman (in his homological algebra book) are rather generous to Lang. I am very glad Lang had a change of mind and actually wrote something responsible on homological algebra in the third edition; the original exercise strikes me as an obnoxious joke, a kind of then-fashionable sneer at categorical subjects.
Comment: Joseph Rotman was the first to tell me about this exercise in an email correspondence.I told him this is why everyone hates Lang except the do-it-yourself crew. I seriously doubt anyone but the most brillant of students ever succeeded in proving everything fom scratch in any homological algebra text worth looking at.
Comment: My memory isn't very precise, but Lang's attitude was that the intention of the exercise was essentially psychological: There are times when a certain kind of mathematical apparatus needs to be absorbed without too much fuss. Those weren't his exact words, of course.
Comment: If you have the means, the time, and the will, is there any chance you could scan that page?
Comment: Done! $       $
Answer: In the Russian 1968 translation of Lang's Algebra (which is done from the Addison-Wesley 1965 edition), this exercise is there on page 126, exactly as quoted in Jonas' answer.  It is complemented by two footnotes by the editor of the tranlation.
The footnotes say: "1) We suggest to skip these exercises on the first reading." and "2) It should be pointed out that the term `abstract nonsense' in this book has a positive character and is used below in the serious sense."
Comment: I've also seen the footnotes in the Polish translation I used.
Comment: That is interesting!
Answer: It is not an urban legend at all.  It's certainly in the second edition, which is the one I studied from when I was a grad student.  However it seems to be missing from the Springer 2002 edition.  Certainly a loss, in my opinion.
Comment: Probably because in almost 30 years since the 1st edition,no student succeeded in doing it,Jose.I'm sure students were able to get big chunks of the task done,but I doubt the whole thing.
Answer: I got to this list since I was trying to remember whether the quote from Lang was true or not.  Indeed, my copy, first edition I guess, does have that quote on p. 105.  I don't know exactly how "positive"(ly) the term "abstract nonsense" is meant in that quote, though.  I would imagine that Lang would have been annoyed had someone suggested they do that with any of his books.
Re: Spanier.  Yes, the book is terse, and hard to read.  I sincerely doubt that the intent was primarily to make a teaching text for beginning grad students; this was, and is, the standard reference book for basic algebraic topology.  What makes it hard to read is the fact that every statement is made is as great a generality as he could.  This is an advantage for a reference text.  I sincerely doubt, however, that there was anything in that book that Spanier could not prove completely.
That being said, I certainly struggled through a course using it.  I chose to take algebraic topology from someone else, to avoid taking it from Spanier himself, since I thought he would teach it as generally as was in the book.  It turns out, though, that he did back down from that level of abstraction when teaching the course, and perhaps I missed something not taking the course from him.
Comment: I did take algebraic topology from Spanier at Chicago, and it was the
graduate course that most excited me (though I wound up working  in
quite different fields).
Comment: Spanier's book was one of the textbooks for the algebraic topology course I took as a grad student.  I hardly used it at all during that year, but afterward I found it to be an excellent resource.  (The course I took was taught by Albrecht Dold, and his lectures were so amazingly clear and well thought-out, that one didn't really need a textbook.)
Comment: Interestingly, Dold's Algebraic topology text is also rather formal.


what are the mechanics of sweating?

Question: The causes of sweating aside, i.e. I'm not interested in which and how nerve signals are transmitted to sweat glands. But I would like to read a detailed account on what a sweat gland consists of, what it does when not sweating, but esp. what happens when a sweat nerve signal arrives. Is there a good free review or can you give one?
Comment: Go to the International Hyperhidrosis Society's website www.SweatHelp.org and look in the Know Sweat section. If you don't find what you want there, ask their top docs: Dee Anna Glaser, MD at St Louis University; or David Pariser, MD at Eastern Virginia Medical School.
Answer: Myoepithelial cell contraction initiates glandular release from most exocrine glands developed from the ectoderm. These are the cells that exist in the glandular epithelium.
At the distal end of the glanduar coil, an isotonic plasma filtrate gets actively transported into its lumen. As you move down the coil, close to where it connects to the duct, absorptive cells remove NaCl to make sure the sweat is hypotonic when it reaches the surface of the skin. If you view these cells where staining for alpha tubulin or beta actin, you will see they have abundant levels of myofillaments, something uncharacteristic of epithelial cells. Hence Myoepithelial.

what are the mechanics of sweating?


Should the covers on sewage drainage pipes be airtight?

Question: Should the caps on the sewage drainage pipes outside be airtight? We've had a little back-up (vent related, it looks like) and I loosened the caps in case water couldn't drain fast enough, so overflow  would go into the yard instead of the shower stall. I'm thinking we have a vent issue, but until we can get them cleaned next week, I'd like to leave the caps loose when doing laundry. Just wondering if loose caps contribute to drainage problems or if it matters.
Comment: Do you have a basement? If so it's going to back up in the basement long before it would back up up the T to ground level.
Answer: The risk is that you have sewer gas escaping at ground level and this could easily enter your house. This gas is potentially flammable or explosive.
Venting issues are not going to cause a backup. Slow draining or gurgling are common symptoms of venting problems. If you have a backup it is very likely your sewer is clogged.
There are also environmental concerns with discharging sewage on your lawn in that it can enter the drinking water supply. I imagine you could be fined for this.
Comment: You likely have a partial blockage.
Comment: I don't have a basement and thanks for the responses. Initially, sewage did come into the shower, but that was brief and hasn't happened again since using drain opener products. The remaining problem is that the drains/toilets drain much slower when the washer is spinning or if someone takes a long shower.


Do I need to thaw fish before steaming it?

Question: Can I thaw fish during steam cooking or is it better to leave the fish the night before in the fridge?
Comment: Normally (in fact, all the time), I microwave the frozen fish to thaw it, without cooking it - because, the fish would start to smell during the hours it took to thaw it at room temps.
Answer: Thawing as part of the cooking process is safe.
If your fish is very thin, you may get good results.  The risk is that the outside will overcook before the inside is thawed and cooked through.
You will probably get better results thawing the fish in the refrigerator before steaming it.
Answer: Yes you can steam fish from frozen, it makes the timing a bit harder to judge without experience  (obviously a defrosted fish is easier to control the timing).  Also there will be more moisture released from the fish which may be a problem depending what you are steaming the fish in.


Do ferrofluid nanoparticles come out of solution when exposed to a solenoid DC field current?

Question: As the electrically-charged ionic tails of surfactants used to attach to the magnetic nanoparticles require the particle to be magnetized to stick to them; if a ferrofluid is passed has a solenoid DC current field, which causes demagnetization, will this cause the surfactants to leave the particles and in effect, make the particles insoluble again?
Comment: I struggle to understand what you are asking here. Surfactants are not attracted to magnetic particles by *magnetic* effects. Static magnetic fields don't cause demagnetisation. And simple observation will demonstrate that ferrofluids don't fall apart under static magnetic fields (the spectacular 3D patterns the fluids produce in strong fields would not be possible if the solutions fell apart).
Answer: Ferrofluids are not true solutions, but are stable colloidal suspensions. Brownian motion is sufficient to keep the tiny particles, on the order of 10 nm, from settling out. Other examples of colloids are milk (fatty globules in liquid) and colloidal gold in water.
Though an alternating magnetic field in an AC-powered solenoid would only stir up the particles and keep them  suspended, a strong-enough steady magnetic field would separate the ferrofluid particles from the liquid, as would a centrifuge, just as whole milk is separated into cream and skimmed milk.
It is also possible to disrupt colloids by changing pH+. For example, cheeses are made by adding citric, acetic or lactic acids (or letting friendly microorganisms do that for you).
Bon appétit, but don't eat the ferrofluid.
Comment: I'm happy to clarify my claim to "under static magnetic field strengths routinely achievable on earth" ferrofluids won't separate. The record is currently ~50T which is 10 times the typical big fields in NMR or MRI machines. I don't think we know much about what happens to *any* material when fields go much above 10T.
Comment: Ferrofluids would be pretty useless if static fields caused the fluids to break down and separate. None of their practical applications would even be possible if this were true.
Comment: @matt_black, read: a *strong-enough* field. Given sufficient strength, the iron particles adhere strongly enough to squeeze out the suspending fluid. It might take something from the Francis Bitter Magnet Lab (q.v., http://web.mit.edu/fbml/) or a magnetar with field 10e11 T, but at some point the ferrofluid would precipitate.


QGIS DB Manager Import layer/file Oracle not working - Error 8 Loading of the layer failed

Question: QGIS 2.12.0 - DB Manager 0.1.20 - Windows 7 - Oracle 11g 188.8.131.52.0
Import vector layer
Shapefile as well as a layer (vector) and with every possible combinations of settings, the results are the same. It also happens with a previously exported table (as shp) from same db/schema:
Error 8
Loading of the layer "myschema"."mytable" failed

An inspection of the "loaded" table indicates that only the 'geom' column was created (no other columns where created), it is however of UNKNOWN geometry type and the table is empty.
user_sdo_geom_metadata record was created correctly.
All other operations within DB Manager on existing tables work correctly.
Is there perhaps another way of loading existing vector layers onto Oracle (pyQGIS?)?
Answer: This issue has been reported 2 years ago, thug life oracle .. https://issues.qgis.org/issues/14026
Answer: Maybe this one can help.
Firstly connect to Oracle via GeoServer and create a table in GeoServer. Publish this layer with WFS, add WFS to QGIS and add geometry to this layer save your edits.
In DB Manager create a blank table with geometry like created in GeoServer.
And run QSL at below table who created in QGİS; "in QGIS adding a table without geometry is not editable for this problem copying geometry from another table will make it editable".
insert into ""TablenamecreatedinQGis"(id, geom) select 1, geom from ""TablenamecreatedinGeoserver

after, this you can import your layer to on this table.


ODE45 solver implementation in Python

Question: I have a project where I need ODE solver without dependencies to libraries like Scipy. I decide to implement ODE45. According to tutorials from internet and from what I remember from classes I implement it somehow.
The code below contains also example function (pendulum) with exactly same values as in the scipy ODE tutorial https://docs.scipy.org/doc/scipy-0.18.1/reference/generated/scipy.integrate.odeint.html. The resulting plot from my code looks the same.
However, I am not really sure if I done it in the good way. Especially I would really appreciate any hints how to improve the functions ode45_step and ode45 and verification whether my implementation is correct. I do not need to check the input variables, it will be done somewhere else.
import numpy as np
import matplotlib.pylab as plt

def ode45_step(f, x, t, dt, *args):
    """
    One step of 4th Order Runge-Kutta method
    """
    k = dt
    k1 = k * f(t, x, *args)
    k2 = k * f(t + 0.5*k, x + 0.5*k1, *args)
    k3 = k * f(t + 0.5*k, x + 0.5*k2, *args)
    k4 = k * f(t + dt, x + k3, *args)
    return x + 1/6. * (k1 + k2 + k3 + k4)

def ode45(f, t, x0, *args):
    """
    4th Order Runge-Kutta method
    """
    n = len(t)
    x = np.zeros((n, len(x0)))
    x[0] = x0
    for i in range(n-1):
        dt = t[i+1] - t[i]
        x[i+1] = ode45_step(f, x[i], t[i], dt, *args)
    return x

def f(t, y, b, c):
    """
    Pendulum example function.
    """
    theta = y[0]
    omega = y[1]
    dydt = [omega, -b*omega - c*np.sin(theta)]
    return np.array(dydt)

b = 0.25
c = 5.0

N = 101

x0 = np.array([np.pi - 0.1, 0.0])
t = np.linspace(0, 10, N)

x = ode45(f, t, x0, b, c)

plt.plot(x)
plt.show()

Answer: The following line is incorrect:
return x + 1/6. * (k1 + k2 + k3 + k4)

Should be:
return x + 1/6. * (k1 + 2*k2 + 2*k3 + k4)

Cross reference:
This code

ODE45 solver implementation in Python


Best way to pay off debt?

Question: I have a home equity loan- ~$42K at 7.5% and about $10K in credit card debt at 16%+. I have several hundred thousand dollars in vested stock options from my company (part of my long term incentive plan). I also have about $80K in stocks in my Fidelity account. Does it make more sense to cash in the options or sell shares from my fidelity account to pay off the debt? The options are in a very favorable position right now (3M). The tax consequences of selling the options versus selling my shares is what has me stuck. Which one is a better idea or how do I figure this out?
Comment: The two answers below are reasonable, but we would need to know your annual income to give you a certain answer.
Comment: My estimated taxable income this year should be about $200K (file married - joint).
Answer: The key phrase in your post is that the options are "in a good position now".  They may be worthless in three months or a year.
If I was you I would cash in the options and pay off the debt.  Cash in enough to also cover taxes.  You may want to cash them all in.
Comment: Thank you for your reply. I get your point about the options value versus later. Good point! My estimated taxable income this year should be about $200K (file married - joint). I think I may need to sell about $70K+ in options value to net ~$45K to $50K after tax. Part of my concern is that the option proceeds would be treated as income and it would shift my tax bracket increasing my burden on my normal income. Does this make sense?
Comment: I understand your concern and congratulations on doing so well.  The options proceeds will be taxed at 33% and probably part of your income.  If 50K was needed I would sell off 75K of my options, your math is spot on.

That's what I would do.  While it may be seem inefficient tax wise, you will reap the tangible and intangible benefits of being debt free.  You can easily build wealth with you future income as it will not be "nerfed" by interest payments to the bank.
Comment: Pete, thank you so much for the great advice. It is very much appreciated. I'll most likely head in that direction now. Best regards!
Comment: Keep us posted!
Comment: You can also look at paying off debt as having a guaranteed return of 7.5% on $42k and 16% on $10k. I've never seen guaranteed returns with percentages that high before.
Answer: The most tax efficient way to get some cash would be to sell some stocks from the Fidelity account that have the lowest capital gains. The tax will typically be 15% of the capital gains. This will be a one-time cost which should save you money compared to paying 7.5% on the loan year after year.
Tax on selling the stock options will probably be higher, since you imply there would be high capital gains, and some of the proceeds might even be taxed as income, not capital gains.
Comment: Thank you for the reply. It makes sense. Yes, the options would be taxed as income. My estimated taxable income this year should be about $200K (file married - joint).

Best way to pay off debt?


How long until you get the purple shark fin?

Question: I've spent FOREVER in the sea with 1560 health and an enchanted monkey wizard staff. I've done all the tricks, like squeezing and staying at the top while spamming black demons, but the eels always kill me. I've the red and green shark fin, but not the purple. When do I find it!
Answer: I believe there is no pre set time after which the purple shark appears. Just keep on trying and if you think you die too early, try improving your stats (attack if you are killed by something killable and health if you die from the Sea Snakes). Also try using Erase magic to remove the Snakes' missiles and Enchanted Armor to take less damage from them.
Answer: The erase magic spell and the health potions are really all you need. When i got the the shark bit i stayed in one of the ditches in the ground below. This stops you from moving and(if you are low enough) will prevent sharks from damaging you. Whenever the snake comes and the blue water balls are about to hit you, use the erase magic spell to get rid of the balls. Also keep using the monkey wizard staff and the octopus king crown with jaspers. Those fireballs will kill the sharks if your staff doesn't. Lastly, use the pink enchanted gloves and any kind of armor to keep you alive just in case.


Get User ID from a Profile Page to use in a View

Question: I'm creating Views blocks on profile pages such as drupalsite.com/users/testuser. I need to display blocks such as "Test User's Posts" and "Test User's comments." What is the best way to get the User ID of the profile pages' subject in order to filter the content based on this User ID?
Answer: In this case, /user/testuser is just an alias of /user/n where n is the user ID.  Which means the user ID is available in the unaliased URL, allowing you to do this.


Unit step function and ramp function

Question:
Can I express this signal only with unit step function?
I've been told that this signal needs ramp function** to be expressed.  Is that true?
To be honest, I don't know what the ramp function is.
y =(-t - 2)(u(t + 2) - u(t)) + 2t*(u(t) - u(t - 1)) + 2*(u(t) - u(t)) + (5 - t)*(u(t - 3) - u(t - 4))
Is this form right?
Answer: This looks like homework.
The initial part of your expression is correct but there are some errors later on. You say you don't know what a ramp is, so I don't know how you've got as this far with it but, anyway, the procedure for solution is:

At \$\small t=-2\$, a ramp with a slope of \$\small -1\$ begins. Your solution for this part is correct: \$\small f(t)=(-t-2)u(t+2)\$
At \$\small t=0\$, three things happen: the initial ramp is halted; the signal steps up by 2 units to the origin; and a new ramp with a slope of 2 begins. These three things can be combined into a single ramp, with appropriate slope, plus a step, \$\small 2u(t)\$
At t=1, ...
At t=3, ...
At t=4, ...
Comment: Thank you sir...
is this the right answer??:
-r(t+2)+r(t)+2u(t)
+2r(t)-2(t-1)
-r(t-3)+r(t+4)-u(t)
Comment: No. (-t-2) is a ramp of slope -1 and with vertical axis intercept of -2. But it needs to be forced to zero for t<-2, and for this you need to multiply by the unit step function (or more correctly the Heaviside function), u(t+2). This step function is zero for t<-2 and unity for t>-2. Hence the first part of the graph from t=-2 to t=0 is: (-t-2) u(t+2). Now you need to construct the remainder of the function.
Comment: Note, the \$\small 0\rightarrow 1\$ transition for a unit step function u(x) occurs where the argument, x=0. Thus, a unit step u(t-a) is zero for \$\small t<a\$ and unity for \$\small t \ge a\$. Some other examples: the 0 to 1 transition for u(t-4) is at t=4; the transition for u(t+9) is at t=-9
Answer: A ramp function is just a linear y = x for x>=0.
So I think your function cannot be expressed only with step functions because it has ramp parts
Answer: If you are allowed to use integration, then yes, you can represent it only with a combination of unit steps.
Take the derivative of that function, and you will see how a sum of unit steps can be combined to create its derivative. Then integrate that, and add more unit steps until the constant sections are correct.
If you cannot integrate, then yes, you need a sum of ramps and unit steps (I don't think you can do it with only ramps, perhaps someone can correct me if this is not the case?). Had you Googled "ramp function", you would find this, which is pretty much all you need to know.
Answer: You can solve it with y = a t + b tailor-made function * u(t+-..) or with r(t+-..) and .
With y = a t + b tailor-made function :

You can solve it with ramps:

Unit step function and ramp function


dojo tabbed container question

Question: I have a TabContainer with 3 tabs which I create using the declarative way.  The total number of tabs are 6 for the container, however the last 3 are added programmatically because of the size of the data, server calls, etc.  What I need is for the page to fully load, then make the ajax call to get the data and create the other tabs. I added the code for this in the addOnLoad method, however the ajax call is being made before the page loads.  How can I made the ajax call right after the page is loaded.  Thank you guys in advance, your response is greatly appreciated.
Answer: All you need to do to ensure your javascript code executes after the page is loaded is to use
<code>dojo.ready(function(){
//talk to server
//create new tabs
});
</code>

dojo tabbed container question


Calculating packet size in datagram network

Question: In a datagram network a packet travels from node A to D on the following route: A → B → C → D. Each link has data rate of 1 Mbps. The total end-to-end delay (from A to D) is 0.4 s. The total waiting time on the route is 0.25 s and the total propagation delay is 0.12 s. What is the  packet length expressed in bits ? I'm not sure how exactly to find this. Can anyone help?
Answer: From the point of view of the units, subtract all the latencies from the total time so that what you have left is attributable to the bandwidth. Multiply the result in seconds by the bandwidth in bits/second and the result is in bits. However I'm not convinced this is really a valid procedure.


How to solve the "What's my name" security question puzzle

Question: There is a giant rectangle floating above me that says 2 things:

Please answer this security question
Security question hint: my first half is what it is my second half is half of what made it

And there are 8 blocks on the grounds I'm assuming I'm supposed to arrange into a word. I've got all the letters written down by block but nothing is jumping out at me. Any help?
Comment: The rules: there are eight cubes, each with a "letter" on all four visible sides (can't see top or bottom). Jarrod listed the sides of each cube. They need to be organized in a 3-D space to answer the two hints above. It's possible that the "halves" referenced mean that there is one eight-character word (made of two four-character halves), but it's also possible that the cubes need to spell another word when viewing from the side.
Comment: Might help if we knew what the blocks had on them.
Comment: It's just a bunch of letters. Here they are grouped by block:
1. G M S A
2. T N H B
3. Z Q E X/K (not sure on this last letter)
4. M S A G
5. T N H B
6. V O I C
7. N H B T
8. R L F Y
Comment: @Jarrod You can edit additional information into the body of your question by hitting the "Edit" link, located in the lower left of the question here. It'll make the additional info easier to see if it's there rather than in the comments. :)
Comment: Intriguing puzzle.. perhaps if you explained the rules for solving these, someone could help you. I can only make two words from the first half: STEM and AHEM. The second half half NITY? As in "ETER-NITY", or something.
Comment: I can't edit, but here's a link to an image of the room from another thread: http://i.imgur.com/S6Ydr.jpg
Comment: I really want the answer to be metatron. Each time I try spelling it though - no dice. It would make sense, given that there's a Metatron's Cube, and meta could be a meaning for 'it is what it is'. Spelling spread out, packed in tight - either way it doesn't appear to solve it.
Comment: There are 2 cubes for "A G M S", 3 for "B H N T", 1 for "C I O U/V", 1 for "E K/Q X Z" and 1 for "F L R Y". We can rotate a cube by holding it and changing the perspective. I tried "NAMETRON" but it does nothing... >.<
Comment: There's also a thread on http://www.gamefaqs.com/boards/961239-fez/62533971 for this puzzle. No dice yet. I'm wondering if the "halves" aren't even. 5 letter word, then 3 letter word or something?
Comment: There are 8! arrangements of cubes with one set of 3 identical cubes and another set of 2 identical cubes so 8!/3!2! so 3360 different arrangements of cubes. Each of the 8 cubes can have one of 4 rotations so 4^8 = 65536 possible rotation arrangements so 65536*3360=220200960 possible answers if I remember my combinatorial math correctly. Brute forcing this one seems unpleasant especially when we can't rule out non-words or be guaranteed of how this breaks down
Comment: Even throwing the possible letter sets into an anagram generator that does dictionary look-up against real words would still require 40960 separate entries into the anagram generator and then you'd have to sift through the results to find those that fit the hints and that assumes that we're looking for a real word/words here.
Comment: I used a combination of egrep regular expressions and managed to get it down to 131 words, NONE of which was the actual answer! :o(
Recipe: Find 8-character words with only the matching characters:
`egrep -i '\b[msagnhbtzkqexicuvoyrlf]{8}\b' /usr/share/dict/words`
Then pipe its output to a series of subtractive commands that remove words with too many duplicate letters (>1 of [zkqex]|[icuvo]|[yrlf], >2 of [msag], >3 of [nhbt]):
`…/words | egrep -iv '([^zkqex]*[zkqex]){2}[^zkqex]*' | … | egrep -iv '([^nhbt]*[nhbt]){4}[^nhbt]*'` It sounds like talking to the owls was the clue I needed. Fun!
Answer: Move the blocks to spell out METATRON when read vertically (down) with your head tilted to the right. Do this within view of the entrance, and rotate the view to the back to finish the puzzle.

Afterwards...

 another red "heart" cube piece will appear. (image)
Comment: @TomThorogood You may have to rotate some of the blocks individually, by rotating the camera while holding a block.
Comment: Where does Metatron come from? Are we just supposed to find the answer or is it found by translating some text somewhere?
Comment: You need to translate the floating pillar. As per the hints in the question details, META "is what it is" and TRON "is half of what made it" (Polytron, the game dev). The trick was really reading the blocks vertically with your head tilted.
Comment: I cannot spell Metatron with the blocks i have, no matter which way I rotate my head. I do not have the same symbols that are shown above!
Comment: Oh wow. I never would have thought of that! Nice.
Comment: Man, the input on this is so picky. I got Metatron on my own, and then realized that it needed to be right-to-left, but wouldn't have ever gotten vertical or spin-to-back-to-submit on my own…
Comment: Confirmed multiple times @ http://www.gamefaqs.com/boards/961239-fez/62544821. This is the answer. Upvote at your leisure.
Comment: I can confirm that this worked for me, but only if I made "METATRON" face the door. The picture shows that but it is not clear from the answer that that is required.
Comment: Solving this puzzle is so not gratifying. You need to rely on the internet to solve it.
Answer: What this is=Meta
Second half is half of what made me=Tron (Half of Polytron)
Comment: It may be a reference to [Metatron](https://en.m.wikipedia.org/wiki/Metatron).
Answer: EDIT: Metatron is the correct answer, if it doesn't work right away, try rotating the screen.
I've tried both nametron and metatron without any luck (see pictures below).
Maybe there are several possible answer for this puzzle. I'll see if I can spell gametron next.
Comment: If you use the "edit" button near the bottom left area of your answer you can edit it to reflect the fact that Metatron is the correct answer. As of now your post doesn't answer the question.
Comment: Turns out I had to rotate the screen and back to the answer for it to work. (Metatron is the  right one)
Answer: You can actually find the awnser multiple ways. First is what @Sean said, the second way is to talk to all the owls. One of the owls says "the 64 bit god" and flys off. This was my thinking:

64 bit god translates to metatron.
Obelisk looks like thing from 2001 space odesy.
Monkeys worshiped obelisk in 2001.
Obelisk = god
God = metatron

PUZZLE SOLVED.
Comment: How do you come up with "64 bit god translates to metatron"?
Comment: Also, one of the owls sings something like "hexaedron, octaedron, dodecahedron, icosahedron", which in the end looks like to be a reference to Metatron's cube: https://en.wikipedia.org/wiki/Metatron%27s_Cube


Is it necessary for circuit to be closed in order for current to flow?

Question: In case of earthing, we attach a single wire to the earth and if some residual electrons remain in the instrument they flow to the earth until the potential of the instrument also becomes Zero. So if I have an open circuit in the form of a partial loop and I place it in changing magnetic field, then according to Faraday's law emf will be induced in it and hence some potential difference develops so why does current not flow through that open circuit?
Comment: An antenna that is not connected to anything still has currents sloshing back and forth.
Comment: Because a ground connection is not an open circuit.
Comment: Displacement current flows through capacitors just fine. The real problem is that we teach electrostatics and magnetostatics, which are both approximations of electrodynamics, first. This makes electrodynamics appear somewhat "magical" for the student. In reality it's the other way around: the only (mostly) self-consistent physics is that of classical electrodynamics. It's just too complicated to explain it in detail to the beginner. Educational needs often trump scientific logic.
Answer: Saying an emf is induced in a wire is really saying that an electric field is induced within that wire. This field will cause electrons to move within the wire (because it is a conductor) into a configuration in which the electric field within the wire is zero.
If the changing magnetic field is oscillating then the induced electric field will keep changing, so the electrons will keep moving around to try to keep a zero electric field in the wire.
This is not really a current in a circuit, because a partial loop is not usually a complete circuit. There are exceptions though. The partial loop can be analysed as a circuit if you regard the two unconnected ends and the space between then as forming a capacitor. And if the induced electric field between the ends is strong enough the air between them will become a conductor. In this case you may see the arc joining the two ends though the air.
Answer: A changing magnetic field always induces currents in a metal. The free-moving electrons are moved in one direction and an area with an excess of electrons and an area with a shortage of electrons is created in the conductor. See the Hall effects.
For an open conductor, this induction naturally has its limits. As the excess/deficiency of electrons increases, the electric potential at the ends of the conductor becomes stronger and the swelling magnetic field becomes more and more inefficient. But since we often use an oscillating magnetic field, the electrons are moved back and forth from one side of the conductor to the other. What we get there, by the way, is a magnetic loop antenna.


Can't connect to Azure DocumentDB using MongoDB Compass or MongoVUE

Question: I've created a DocumentDB instance on Microsoft Azure, but I'm unable to connect to it from MongoDB Compass (or MongoVUE).  In MongoDB Compass, I've entered all of the connection parameters and it is logging in, however then it opens a windows which just sits there with a loading icon forever.  I can connect to a MongoDB instance on the local machine, so I know that works.  Is MongoDB Compass incompatible with DocumentDB for some reason?  Is there another tool that I can use to connect and browse my DocumentDB instance?
screenshot
Comment: Have you enabled MongoDB support for DocumentDB (as per https://docs.microsoft.com/en-us/azure/documentdb/documentdb-connect-mongodb-account)? DocumentDB implements a subset of the MongoDB query language so I wouldn't be surprised if it doesn't work fully with tools expecting a MongoDB server. There is a tutorial for MongoChef, so that seems a more supported option to try: https://docs.microsoft.com/en-us/azure/documentdb/documentdb-mongodb-mongochef.
Answer: MongoVUE uses an outdated version of MongoDb drivers,and I'm guessing it doesn't support ssl. I also cannot connect using MongoVUE. I also cannot use MongoDB Compass.
With Robomongo and MongoBooster I can connect.
Be sure to en able SSL with self signed Certificate.


How can I make a Dynamic wallpaper (like the ones in macOS Catalina) in OS X Yosemite

Question: I am running OS X Yosemite (10.10.5) and I want to make a dynamic wallpaper (or use the one from macos mojave), is there an extension or something that allows me to do this sort of thing
Answer: I don't think there is a way to do this effectively because dynamic wallpapers were introduced in macOS Mojave (10.14) alongside dark mode. The dynamic wallpaper is reliant on that although you could try doing an AppleScript script that changes the wallpaper based on the time or whether you're in dark mode or not. Wallpapers are found at the path <code>/System/Library/Desktop Pictures</code>. You can try adding your wallpaper(s) there and then using AppleScript or Bash as a startup item that is always running in the background and changed the wallpaper based on the time.


Cache: How to exempt just one block

Question: I've got a Drupal 6.x install, and there is one block generated by the Station module which displays the name of the show currently playing. Is there a way to make just that block exempt from caching?  Alternatively, can I insert a 'refresh' for only that block at 00:59:00 ?
I'm not a php guy, but have found the place in the module where this block is generated, and think I can make the change if I new what to do.
Comment: this block marked as BLOCK_NO_CACHE, for why you want to get it from cache? i assume, show playing station is realtime...
Answer: If the block is a Javascript or jQuery widget the cache wouldn't bother you. eg: The page content is cached but runs a client side script that calls back to the server for the latest info and does an ajax thingy.
Alternatively, you could turn page cache off and set cache for some of the queries/element on that page. But if you're not a PHP guy that might be a struggle.
See:
http://api.drupal.org/api/function/cache_set/6
I'm sure there are other options people will help you with.

Cache: How to exempt just one block


Which insect is this? They crawl like caterpillars and get metamorphed into orange moths

Question:  They are like larvae which gets metamorphed into moth (orange colour with black spots) .They are multiplying rapidly and have spread all over our building.
Answer: Resembles wooly bear caterpillars while the moth you shown is very identical to black-banded orange moth (Epelis truncataria).


Upload files upto 2GB from Apex

Question: How to upload a file of size 2GB from Apex? Is there any sobject that I can make use of?
Answer: The 'File Size Limits in Salesforce' help topic indicates that the following support 2GB.

Files Tab and Chatter
Salesforce CRM Content
Feed Attachments

That said, getting this size of data file in programatically reduces this to 10MB for Visualforce / Apex. Apex is going to be the limiting factor, especially with its heap size limits 6/12MB (depending async) and callout limits of 3MB. So your basically going to struggle with this size, the way the browsers do it is to stream it over rather than load it all into memory which is basically only option you have in Apex.
I even had a look at the Bulk API, but this has similar restrictions, this looks like a gap in Salesforce's API strategy to me. You might be able to get some way further by moving the processing to something like a Heroku service, which you could feasibly still invoke from a callout or a Canvas app perhaps.
Comment: You can upload upto 10MB using apex:inputfile, just make sure its cleared out of the controller state before the page returns and you will avoid the view state issue. However this is a maximum of 10MB, as per the docs here, http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputFile.htm
Comment: I just want to upload a chatter file programatically. I use Connect API to post a comment along with an attachment. Once I upload a file using apex:inputfile, I want the BLOB content stored somewhere until I actually click on Post. I cannot have it in the memory since it will hit view state limits. So I want to store this in the database.
Comment: Uploading a file and clicking on Post will happen at different times. So, I cant clear the state until the user clicks on Post.
Answer: You can't be able to upload that much size of file in salesforce , due to salesforce storage limit.
 In order to do so you need to use 3rd party storage server for saving the file.Also you need to use some server level language (such as java,.net,python etc)and make the handler class(for handling the request from salesforce) as a web hook for uploading the file to storage server and hit your request to that hook from salesforce (vf page) for uploading/downloading request.
Cloud Drop is One such App that is some what following the same logic  in order to store any number and size of files that can
be associated with any salesforce object with Rackspace server.
Please check the following link for more information:
https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003IzEDEA0
http://mansasys.com/clouddrop
Thanks
Anchal Garg

Upload files upto 2GB from Apex


Past tense usage for continuous actions

Question: I stumbled upon this question when listened to an interview: "I lived there for two years". If described process happened in the past, isn't it better to use past perfect "I had lived there for two years", because the process happened in the past and was also finished in the past. If past simple can be used for continuous actions such as living, could you give me some advice, what continuous actions I can use past simple for?
Comment: Did you mean to write "what continuous actions I can use **past perfect** for"?
Comment: For me "I lived there for two years" felt like a process, even though I has now found out that it is just a fact and facts are described with past simple and not past perfect
Comment: Did you want to know *when to use the past perfect* or *for which specific continuous actions you can use the past simple*?
Answer: Use simple past to describe actions that happened in the past without referring to any other actions. Use past perfect to describe actions that happened in the past before some other specified action.
Like:
I lived there for two years.
Before I moved here, I had lived there for two years.
Simple past does not imply that the action continues into the present. Rather the opposite: it is usually used for actions that were completed in the past. If you want to say that an action began in the past and continues into the  present, use the present perfect continuous. Like, "I have been living there beginning two years ago." The present continuous is also used, depending on exactly what you are trying to say. "I am living there."
If you use the simple past, we normally understand that to mean that the action is not continuing. Like if I said, "I lived there for two years", this would normally be understood to mean that I no longer live there.

Past tense usage for continuous actions


Are there more instructions for LEGO Architecture Studio?

Question: I have a LEGO Architecture Studio set of 1210 pieces. The set have a book about architecture and techniques but it have no instructions for, e.g. build a pyramid, building or others. So I want to know if exists instructions for this, and where could I find them.
Answer: I don't think so.  I've found a few places that show nothing but the original book for it in terms of official LEGO content:

http://lego.brickinstructions.com/lego_instructions/set/21050/Architectuer_Studio
https://www.repubrick.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=451&virtuemart_category_id=38&lang=en
https://www.reddit.com/r/architecture/comments/1k108y/the_lego_architecture_studio_manual_via_legos/

Tom Alphin's book
While it isn't entirely instructions it does include lots of instructions: Tom Alphin's book The Lego Architect.  It has been a while since I flipped through it so I just gave it another skim.  I'd say that a third to a half of the pages are dedicated to detailed instructions.  The rest of it is lovely inspiration so it isn't like filler.

Brick Architect blog
Tom Alphin also has created a blog that has lots of LEGO architecture designs in it: http://brickarchitect.com/ but I didn't see any instructions there.  It is still probably worth checking out for inspiration.
Comment: Thanks, I´m out of ideas, I've been building many things with this LEGO set, and I wanted to find instructions to try other buildings.


If I file as head of household, how does my estranged wife file? (USA)

Question: My wife abandoned my kids and me mid July, 2014.  For 2014 the option of "Head of Household" was not available as the IRS says that the spouse has to not have lived with you for the last 6 months of the year to be "considered unmarried", so we ended up filing as "Married Filing Jointly".  For 2015, "Head of Household" is available to me, however I don't know how to tell her to file.  Is she then single, or Married filing separately?
Comment: I don't think filing is relevant - only a finalized decree of separate maintenance, or a finalized divorce, would matter.
Comment: Do you have a legal separation decree, or are you relying on the "considered unmarried" rule only?
Comment: Our state does not have legal separation (PA) however she did file for divorce in March of 2015
Answer: She is still married, so she cannot file as "Single" under any circumstances. If the two of you cannot agree to file as "Married Filing Jointly", then neither of you can file as "Married Filing Jointly".
Usually the only choice left for her is "Married Filing Separately". If she has a dependent in her household, she can also file as "Head of Household". If she also tries to claim the kids as her dependents, then the IRS will adjudicate which one of you has the right to claim the dependents, and, if the situation is as you describe, they will deny her claim to those dependents. She may or may not have other dependents that she can rightfully claim.
Answer: USER102008 sufficiently answered your question, but if I may provide a bit of a background for help in the future.
If this marriage is broken, then you want to finalize the divorce as soon as possible.  You should be given custody of the kids, and depending upon your agreement also have the right to claim them as dependents.  This will allow you to file Head of household and claim the children on your tax return.
Now she may try to do the same.  If this happens, you need to write to the IRS, with a copy of your divorce decree showing you have the right to claim the children as dependents.  Despite a lot of negative press the IRS is pretty responsive in this manner.  Keep a copy of your letter as you may need to use it in future years.
And this goes for all manner of agreements, if it states that one party can claim little Johnny in odd years, and the other person also claims that child the IRS will resolve the dispute.
By default the one who files first wins, but one just needs to provide evidence on who the rightful person is to claim a particular dependent.
Sorry if my PTSD in this manner has shown through.


Document sets and their usage

Question: What are the scenarios where you would want to use a document set. Can you create a content type for document set?
Comment: I'm going to see where this one goes. We are not entirely happy with  this kind of open questions, they usually doesnt bring alot of value to the site. I have marked it as Community Wiki
Answer: An example of using a document set would be for something like a RFP for a potential client.  There might be a Powerpoint Presentation, a Sales Document, and some Marketing material.  These can be rolled into a document set content type so that each new RFP contains these 3 files.  It helps organize process where multiple types of content define the function.
Answer: Document Sets are like folders, but it has some unique features as compared with folders. A Document Set can have a seperate view for welcome page and also the welcome page can be customized, We can also create reusable workflows associated with it.
Answer: As already answered: a DS (document set) gives you the possibility to group a specific set of related documents, much like in a folder.
For example: if you always use the same documents for a customer quote, you could create a Quote DS with perhaps 3 required documents:

Excel document with quote calculations
Word document with specifications
PDF with standard conditions

This way, if you create a new Quote for a customer using this content type, the required documents will be provisioned automatically. You don't need to upload or create them, just edit them.
Extra benefits:
Document ID: the DS is handled as a seperate entity, so using Document ID's, all the documents AND the DS itself will get Document ID's.
Workflow: you can use workflows for the entire DS. so you could use a approval workflow to approve (or reject) a DS, not just the seperate documents it contains.
Answer: DocumentSet is a new feature introduced in SharePoint 2010. For managing the multiple documents with a single user interface, common metadata, behaviours. So we can handle the multiple documents with a single content type.
We have to activate the Documentsets features in Site Collection Administration to enable the documentsets in Document Library. We can also create content type for DocumentSets and associate with Document Library.
Comment: In the same way we can also assign content types for document set, so that this content type will be available for only the document set and not out it, I mean in the document library.

Document sets and their usage


Add Directory Service to macOS image

Question: I'm trying to add an Active Directory service to macOS image. I know how to bind AD on a Mac but I was looking for an automated way to do it for a large deployment 50–100 Macs, i.e add it in an image profile. What's the best practice for this?
Answer: Depends on how you created the image.
If you're using the installer as your source then there's a pane for adding directory servers.
If you're using an installed system as the source then you may have to use something like the dsconfigad command in a script to bind.

Add Directory Service to macOS image


Creating a Strip of Light Using LEDs

Question: I am looking into creating an illuminated string of leds where the individual LEDs are not visible, but that a shape is illuminated. The shape would be a various sized rings the biggest being about 1ft in circumference. Here are some example pictures of what I am thinking of. Now, a caveat is that it has to be the same on both sides. That being that the top and the bottom both have to be illuminated. I am just asking what sorts of LEDs and materials that I should be looking into to achieve such a result.

Comment: look at diffusors. Because of my locale I currently only get german links, but this may be useful: http://www.beleuchtungsfolien.de/produkte/1-diffusorfolien
Answer: What you are looking for are flat, wide-angled SMD LEDs. It will be easier to diffuse the light that way and will allow you to place the diffuser closer to the LED. You need to make some sort of diffuser to have the look you are going for. This can be made out of plastics or silicon. Since I am guessing this will be a hobby project, you will probably want to use plastic. You need to have a matte finish on one side of the plastic to diffuse the light. Cutting a piece of acrylic or polycarbonate, then sanding one side should work.
I feel like that will give you a good start. There are many ways that you can diffuse the light, the best solution would be up to you though and your application.

Creating a Strip of Light Using LEDs


What to ask next when people tell me that my article is excellent?

Question: So I have an article and one person comments that it is excellent. To make sure that they just don't skim it I ask "thank you. Have you read all of it because I'm afraid it's long", and they say "yes of course". What can I ask next to have a more detailed feedback? Or perhaps asking them to share without being perceived as needy?
Comment: Is this person by role a reviewer from whom you would have expected more detailed feedback, or a reader who happened to leave some praise?
Comment: Well, in between you may say. They are just a random user, but happens to know some people I would like to have them read
Answer: "I really want to make this better; please could you tell me just one thing I could improve?"
This helps take the pressure off: you're not looking for a thorough dissection, but something that will take much less of the reader's time.
Like you, I find that a simple, "What do you think?" always gets back a polite, "Very nice, thanks."  I do have a few readers with some experience as informal copy-editors, who can return a page with useful notes all over it, spotting typos and complex over-running sentences.  But for someone without that experience, who hasn't been asked in advance to review, then asking them to choose just a single point is the most effective way I've found to get more feedback.
Answer: I agree with the other answer, that asking for a single area of improvement is a great idea, as it takes the pressure off and focuses on your hunger to improve.
In addition, I would suggest that you really need to get feedback from more than one person, as writing and reading is so subjective you need a range of opinions to get a sense of where there are genuine areas that could benefit from rewriting and which things are just someone's personal taste.
Further to that, it's worth getting feedback from people who are experienced in giving feedback, or at least interested in doing so - it sounds like this person you got to read it doesn't have that much interest in giving feedback.
Using a website like scribophile, where users give each other detailed critiques, could help you get good critique from a range of people.


ffmpeg: How to burn in the timecode from a stream's metadata

Question: I have a timelapse video from a GoPro and want to overlay the time of the recording on the current frame. For instance, a frame taken at 9am might show 09:00.
It seems like the drawtext filter is the way to go. I'm struggling to figure out the right invocation to grab the right time and make that work.
ffprobe shows that there's a timecode attached to each individual stream, but not the input's overall metadata:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GX010246.MP4':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2022-11-01T23:24:04.000000Z
    firmware        : H22.01.01.12.00
  Duration: 00:00:00.23, start: 0.000000, bitrate: 106869 kb/s
  Stream #0:0[0x1](eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 5312x2988 [SAR 1:1 DAR 16:9], 105367 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
    Metadata:
      creation_time   : 2022-11-01T23:24:04.000000Z
      handler_name    : GoPro H.265
      vendor_id       : [0][0][0][0]
      encoder         : GoPro H.265 encoder
      timecode        : 09:23:30:08
  Stream #0:1[0x2](eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2022-11-01T23:24:04.000000Z
      handler_name    : GoPro TCD
      timecode        : 09:23:30:08
  Stream #0:2[0x3](eng): Data: bin_data (gpmd / 0x646D7067), 408 kb/s (default)
    Metadata:
      creation_time   : 2022-11-01T23:24:04.000000Z
      handler_name    : GoPro MET

To make it even harder, this timecode is the end of the recording - when it was saved - so the timestamp on each frame has to be ((timecode from metadata) - (clip duration) + (time since start)).
Some attempts
This is a start, which overlays the local time when ffmpeg was run:
ffmpeg -i in.mp4 -vf "drawtext=text='%{localtime\:%T}': email@example.com: x=7: y=460: fontsize=96" out.mp4

This can't find timecode, maybe because it's not defined:
ffmpeg -i in.mp4 -vf "drawtext=text='%{timecode\:%T}': firstname.lastname@example.com: x=7: y=460: fontsize=96" out.mp4

This tries to reference metadata:s:v:0:timecode, but the reference is invalid somehow, even with the right amount of escaping:
ffmpeg -i in.mp4 -vf "drawtext=text='%{metadata\\\\\\:s\\\\\\:v\\\\\\:0\\\\\\:timecode}': r=29.97 : email@example.com:fontsize=96" out.mp4

The pts function could work, but I can't figure out how to invoke it or pass it the start time
There's also drawtext=timecode=<start timecode>, which seems promising:
ffmpeg -i in.mp4 -vf "drawtext=timecode='00\:00\:00\:00': r=29.97 : firstname.lastname@example.com: x=7: y=460: fontsize=96" out.mp4

but I also haven't figured out how to put this dynamic data into it:
ffmpeg -i in.mp4 -vf "drawtext=timecode='%{s:v:0:timecode}': r=29.97 : email@example.com: x=7: y=460: fontsize=96" out.mp4
# fails

Would really appreciate some help with this tricky problem!
Answer: A colleague just pointed this out to me
-vf "drawtext=text='%{metadata\:timecode}':box=1:boxcolor=black:fontcolor=white:fontsize=48:x=100:y=100"

Works with both timecode in SEI & MXF timecode track
NB: Doesn't work with ffmpeg 4


How can I modify the Joomla search component to use default search areas?

Question: I'm using a Joomla 1.5 installation and the Joomla search component allows you to search in certain "search areas": Articles / News Feeds / Sections / Categories / Web Links ...
I don't want my users to have to worry about these things however and I also don't want them getting "sections" or "categories" as results - it's just a simple site with about 5 fixed pages and some simple news/event announcements that I use articles for.
I want to set some default "search areas" to use, and hide the search areas from the search results page.  Hiding the search areas from the results page wasn't a problem - I just modified the default_form.php in the com_search component.
However, I have no idea how the "search areas" actually work and how I can change the functionality that the search function always only searches on "Articles" and nothing else...
There's two places where I can see it coming back:
In controller.php (in the com_search component) - you get the areas from the checkbox-list on the page:
<code>    $areas = JRequest::getVar('areas', null, 'post', 'array');
    if ($areas) {
        foreach($areas as $area)
        {
            $post['areas'][] = JFilterInput::clean($area, 'cmd');
        }
    }
</code>
In search.php (also in the com_search component) - you get the areas as specified and add them as "active areas" for your search query:
<code>    $areas = JRequest::getVar('areas');
    $this->setAreas($areas);
</code>
Instead I wish to add my own $areas variable, but I have no idea what it contains and how I might change it to a default value of only 'Articles'.
Answer: The areas are driven by the search plugins in the backend. Have a look at the list of plugins and disable the ones you don't want.


How to print a two color part with only one extruder

Question: I'm planning my first project. I want to print an iPhone case with a flush letter on the back, but I want the letter in a different color (single extruder printer). The thing is the two colors will be on the same level. Do I create two separate models, import them to a single model, mesh the parts and somehow specify which one to start on, then just change the filament when it's done with the first section? Will the letter be loose fitting in the cut out? Or will I need to print them separately and glue them together?
What is a good slicing software to accomplish this?
Comment: Good question! I've been 3D printing for about six months, and my first reaction was that it was not possible. However, it is indeed possible, as shown in the answer from @fred_dot_u. I have also found a technique where the model is designed and sliced for a multiple-extruder printer, but the gcode is modified to replace tool changes with pauses, and manual filament swaps. I haven't seen a clear writeup or tried it myself, but I want to try it and will post an answer myself if I can figure it out.
Comment: Greetings Joe and welcome the the 3D Printing community (both here and generally).  I submitted an edit to your post to clarify the subject and remove the salutation.  If you wonder why, look at https://stackoverflow.com/help/behavior.
Answer: What you ask may be easier than you think. The slicing software is unimportant, generally speaking. Consider especially that your requirements fit the solution spot on.
Take a look at this thingiverse snowman.

Each of the colors is a separate model. Each of the colors is only one layer thick (0.200 mm). Each of the colors is placed with zero overlap to the adjacent colors, as the extrusion multiplier will allow enough "squish" to cause a bond to its neighbor.
You would create a model with the necessary shape for your lettering and insert the appropriate color for them. Print that model but leave it on the bed. If the bed is heated, all the better, but don't let it cool to the point of release. If it's not heated, the adhesive should hold it until project completion.
For the main background color, your model would be normal but with a single layer subtracted at the base. The subtraction would have to be the shape of the lettering. Consider that you're creating indented or recessed lettering. Use appropriate modeling techniques to perform this action.
Keep in mind that you'll want the lettering to be mirrored, as you're printing it "upside down" on the build plate.
Swap out the filament to the main color and print.
You are color limited only by your determination and patience, as you have to swap out filament and also have to create appropriate models with recesses to take the first layer, of which you'll also have to create models.
I've created at least one of the snowman pictured and it came out quite good. The layman will not be as astonished as someone familiar with 3D modeling and printing, however. You get a better appreciation when you know what goes into the project to get this result.
EDIT to add more info, rather than fill the comments:
The above method works only because the inlay is a single layer deep. If your slicer supports changing layer thickness during a print, you could print the first layer at the max for your nozzle, say 0.3 mm then set layer 2 and upwards to the resolution you desire for the majority of your print. I use Simplify3D which supports such actions. I'm not sure of the others.
Relevant to the questions posed in the comments, your modeling software may be a factor in this process. The modeling software will create/assign a pivot point or some other name to a location of reference in the model. The slicer will use that to position the model on the bed.
Here's a concept I would use to perform this task. Start with your single layer lettering, ensuring that the thickness of the letters will match your first layer height. Save the model as an STL file. Leave the lettering on the screen in your modeling software.
Create or import the case file. Position it as you wish relative to the letters. Of course, both models will be flat on the build plane or all bets are off. Use the lettering in a boolean subtraction to remove the shapes from the phone case model.
If the above does not remove the lettering model, delete that and you have the recess. Save this model in STL.
When you load the models in the slicer, they should drop into the same location relative to each other.
When you print the letters, they will be on layer one. When you print the remaining model, the cut-out portion will be on layer one, while the rest is placed atop the two color portion. The print head will move up one layer to adjust for the extra depth.
If you require the letters to be thicker than a single layer, one of the options you have is also in your question. Create the letters in the thickness you wish, use them to create the recess in the case and print separately. In so doing, you will be counting on the printer's ability to make clean bridges. The letters may fit cleanly, may have some play or slop, or be too large to fit easily. It would behoove you to make a test piece or two, perhaps a simple slab with one or two letters to see how that concept works in the real world. I was pleasantly surprised to see how well the public library's genuine Prusa i3 MK2S performed a challenging bridging operation.
I apologize for overlooking the reference to first project. With that in mind, I would consider that this is a slightly advanced project. Your modeling software and modeling software skills will obviously come into play here and is a separate subject/question/topic for discussion.
Comment: J.B., please also note I added an edit to my answer to cover some of your new questions.
Comment: Fantastic answer, thank you! Let see if I have the idea down. I am printing an iphone case and I want the letter to be flush on the back. I simply do an extrude cut with the letter on the iphone case lets say 3 layers deep. Then add a 3 layer thick solid letter body to that recessed area. When I go to print, I print the letters first, change filaments, then print the case. Do I use two separate models?
Comment: If, so how do I make sure they are lined up correctly? I'm very worried the second model might print like on a 90 degree rotation. Remember, I've never printed anything before. I'm using a Makerbot Replicator 2 so I think it has a heated bed.
Comment: But how can I program the printer to print on top of the letters?
Comment: @JoeBlow The "inset" colors should only be one layer deep. Otherwise when going back and printing the body, the print nozzle is likely to move into them and mess something up. The alignment would be critical. If you look at the snowman example, the STL files have boxes around them to help ensure alignment (most slicers will attempt to center the model), and act as a skirt to prime the extruder after swapping colors.
Comment: @mbmcavoy How do you design a part that is exactly one layer thick in CAD software?
Comment: Decide what layer thickness you want to use. 0.200 mm is common for "blocky" or ordinary models with minimum details. The lettering you would create would then be set to 0.200 mm tall, presuming you're using an extrusion feature of your modeling software. Additionally 0.200 mm will not be as transparent as thinner layers for some colors. You may be able to go as high as 0.300 mm for your first layer and back to 0.200 mm for the remainder, if your slicer permits.  Please tell us your choice of modeling and slicing software.
Comment: Great answer!. I see recently Make Anything has posted a video about this. https://youtu.be/KV2AjyowXX4


Why use Apache in front of another web server?

Question: I've seen a lot of web server setups where Apache is in front of another web server. The most prominent examples of these are the Java web servers, e.g. Glassfish, Tomcat, etc. What is the point of this? I realize the point of putting Apache in front of, say, a Mongrel cluster is load balancing, but what about other servers? What are the reasons for doing this?
Answer: Web application servers are good at hosting their application (Ruby, Java, etc), but not as good as Apache at hosting static files, or providing load balancing/failover (mod_proxy), security/filtering (mod_security), rewriting (mod_rewrite) etc.  Therefore it's quite common to use Apache as the front end, possibly serving all the static content, and then proxying requests to the application server (mongrel, tomcat, etc).
Apache is a well-audited piece of code that has "been around the block" somewhat more than the newer servers, so it makes sense to have it as the server that faces the untrusted Internet.  It also means you can put your application servers inside your network, and your Apache servers in your DMZ.
Comment: Many use lighttpd or thttpd for the same reasons outlined above.
Comment: @joe: another one that's gaining popularity is NginX.  it's freakingly fast, and the config file is geared specifically towards being used as a load balancing frontend for several servers.
Comment: Another question, then: If I were to do this with, say, a Java server behind Apache, would I use multiple instances? Thanks.
Comment: +1 for Nginx, it is used by some really busy sites. Very popular as a reverse proxy in Ukraine, Russia, China and US, according to Netcraft.
http://news.netcraft.com/archives/web_server_survey.html
Answer: As to your other question -
Another question, then: If I were to do this with, say, a Java server behind Apache, would I use multiple instances?
Depends :)  Whats the load like? Whats the memory usage like? How would you distribute them - multiple Java app servers on the same box? Different boxes? The appropriate configuration depends on what the problem you're trying to solve is.
Comment: Well I'm just wondering if there would be any benefit to that. I understand that most Ruby web applications use a Mongrel cluster of about 9 Mongrel instances for various reasons; would that apply with Jetty (Java) as well? At this point I'm just using a web server and a database server, no application server, because I won't need it (not enough load).


How to apply the orient function on the geometry of a GeoPandas dataframe

Question: Given a GeoDataFrame where the geometry column contains both Polygons and MultiPolygons.
How can I force the orientation (left-hand-rule or right-hand-rule) on these geometries?
Answer: The orient functionality is included within shapely as function in the ops module from version 1.7a2 and onwards.
If you have this function you can do the following:
from shapely.ops import orient # version >=1.7a2
gdf.geometry = gdf.geometry.apply(orient, args=(-1,))

If you have an earlier version of shapely and cannot update to the latest version, try to emulate this new functionality with the following function:
from shapely.geometry.base import BaseMultipartGeometry
from shapely.geometry.polygon import orient as orient_
from shapely.geometry import Polygon

def orient(geom, sign=1.0):
    if isinstance(geom, BaseMultipartGeometry):
        return geom.__class__(
            list(
                map(
                    lambda geom: orient(geom, sign),
                    geom.geoms,
                )
            )
        )
    if isinstance(geom, (Polygon,)):
        return orient_(geom, sign)
    return geom

gdf.geometry = gdf.geometry.apply(orient, args=(-1,))

Comment: the `geom.__class__` bit is clever! I like it. A bit of note on dataframe best practices: while assigning dataframe columns with the dot-accessor _works_, it's not a good habit to have as you could overwrite the dataframe's methods or properties (for instance if you had a column called "max"). Best practice would be to use the `.assign` method (`gdf = gdf.assign(geometry=gdf.loc[:, 'geometry'].apply(orient, args=(1,)))`). Certainly more verbose, but safer and easier to incorporate into a longer chain of commands


Vacuum energy and perpetual motion

Question: The part of the Einstein equations of general relativity referred to vacuum energy, introduce a repulsive term in gravity. This means that as the space become bigger and bigger, vacuum part become more and more important, leading to an undefined accelerated growth of the universe. Why vacuum energy does not violate the principles of thermodynamic? This is a sort of perpetual motion, isn't it?
Comment: Related: http://physics.stackexchange.com/q/11800/2451 and links therein.
Answer: Energy conservation in GR only holds approximately in spacetime regions that are very small, compared to curvature radii. But in general, since parallel transport is dependent on the trajectory in spacetime, an observer cannot uniquely define the energy of another distant observer.
The so-called Universal Time in the FLRW cosmology is a convention. We choose to define a set of synchronized observers, so that the metric can be separated in two factors, one of them with only spatial coordinates. But that doesn't mean that the universal time can be used as an analogous concept to a newtonian $t$ that would allow to define conservation laws. You could slice spacetime in another way, defining a different set of synchronized observers.
Anyway, physics is all about mathematical models, and you are free to think in terms of the one called Newtonian Cosmology in astrophysics books. It has mainly didactical purposes, but it leads to some correct results (and it is what many people secretly have in mind when they talk about cosmology). In that framework, you may define a total energy and see if it is conserved. The problem is that Newtonian Cosmology doesn't have dark energy. How would you model the summand of the dark potential energy?
The conserved quantity in GR, in problems that do NOT deal with the cosmological-scale dark energy (for instance when studying neutron stars and black holes) is the energy momentum tensor of normal matter. I think that perhaps an equivalent statement to your question may be: Is there any way to include the dark energy as part of the energy-momentum tensor, so that its conservation law still holds? There is nowadays a very active theoretical research on how to model dark energy, so your question is eventually a very interesting one, and is still open.
Comment: Maybe it's worth noting that the "spacetime regions that are very small" are actually galaxy size :-)
Comment: I wonder if there are too any consequences close to black holes. So far I have never heard about anything related in accretion disks theory or any other astrophysical context.
Comment: (In fact, a classical observer might understand the additional precession of the perihelion of Mercury as an unexplained interchange of energy with some undetected source as the planet approaches/ goes far from the Sun)
Answer: You should read the question here  energy conservation in general relativity to get a feel of the complexity of the problem.
You ask:

Why vacuum energy does not violate the principles of thermodynamic?

Thermodynamics is an emergent theory from classical statistical mechanics and that is based on quantum statistical mechanics. General relativity does not enter in the derivation of the thermodynamic laws.
It is conservation of energy that can be questioned and the answer is in the link provided.
I quote  from the concluding paragraph:

What you can't have is a tensor quantity that is globally defined that one can easily associate with 'energy density' of the gravitational field, or define one of these energies for a general spacetime. The reason for this is that one needs a time with which to associate a conserved quantity conjugate to time. But if there is no unique way of specifying time, and especially no way to specify time in such a way that it generates some sort of symmetry, then there is no way to move forward with this procedure.

To violate a law one has to be able to define it, and it seems that this is not possible in general in General Relativity.
Comment: Thanx, anna but i know the problem of conserved quantity in curved spaces. In my opinion the question is actually more subtle, because in our universe we can define a universal time, indeed we can speak of the age of the universe.
Comment: You can define a simultaneity hypersurface in such a way that the metric can be separated, leaving the spatial coordinates apart.
Comment: But that doesn't mean that the so-called universal time is an analogous concept to newtonian t that would allow to define analogous conservation laws.
Comment: You could cut the metric in another way, defining a different set of synchronized observers.
Answer: Theoretically, you could use the accelerated expansion of the universe to create a perpetual motion machine. It would not be practical due to engineering issues, but in theory it is possible.  Imagine you had two large masses that are separated by a large distance and you had a monomolecular filament rope between the objects that could be lengthened at a negligible energy cost.  With that setup the accelerated expansion would cause a tension on that rope and you could let that force be exerted over a distance to extract work from the accelerated expansion.
First of all, the universe is expanding at 74 km/sec/Mpc (Mpc is a mega parsec which is 3.26 million light years). So let's take two heavy objects and place them far from any galaxy cluster or other influence and space them just one parsec apart (3.26 light years).  Then they will effectively be moving apart at 7.4 cm/sec.  Now imagine that your monomolecular filament rope between the objects puts a force on the objects that will decelerate the objects.  Then during the time that they are decelerating you can extract work from the objects. That work per second comes from the force the rope is exerting being applied over the 7.4 cm/sec that the objects are moving apart. However, once the force causes their relative velocity to drop to 0, you won't be able to get any more energy from the objects since they are no longer moving apart.  There will still be a constant force on your rope but you need to have a force applied over a distance to get work.
Now this is all from just the "Big Bang" expansion of space.  Once the rope's force has gotten their relative velocity to zero, the two objects are like a gravitational bound system and it will stop "expanding".  However, in addition to the "standard" expansion of space, we now know that there is dark energy which is causing an accelerating expansion of the universe.  This means that the two objects are not just "moving" apart at constant 7.4 cm/sec but that this velocity is actually increasing with time.  So if you setup your rope such that the force it is exerting on the objects results in an deceleration that is slightly smaller than this cosmic acceleration, you can extract work continuously and indefinitely.  Unfortunately, I have not been able to convert the dark energy measurements into units of acceleration in this particular case of objects at one parsec.  I suspect it is a small number but current estimates are that it is definitely positive.  Note that if your rope exerts more force that causes a deceleration larger than the cosmic acceleration then the objects will eventually stop moving apart and the work you can extract will drop to zero again.
Note that from just the normal expansion of the universe you can only extract a finite total amount of energy, but that with the accelerated expansion you can extract a small but positive amount of energy per second forever.  However, your rope needs to get longer and longer with time (at the rate of 7.4 cm/sec, in this example), so, as they say TANSTAFL (there ain't no such thing as a free lunch). The rope needs to get longer because you have to have your very small force applied to continuously moving objects to get work done.  Since it will take continuous energy to make a continuously lengthening rope, and you cannot win this battle by starting with objects that are further apart since then the rope is lengthening at an even faster rate than the 7.4 cm/sec of this example.  You can increase the energy per second you extract by making the objects more massive, but then the force on the rope increases so you need to make a thicker rope.
The bottom line is that I think this free energy project is impractical, even though it is theoretically possible.  The problem that needs to be solved is the energy cost of the continuously lengthening rope.
Comment: Similar to the answer [here](http://physics.stackexchange.com/a/46462/16725) to which I have the same objection: it would still be finite.

Vacuum energy and perpetual motion


GeoExt Toolbar Mouse Position

Question: I am new to GeoExt and OpenLayers world. I am currently using OpenLayers 2 and GeoExt 2. I want to add a mouse position on the toolbar. Currently my mouse position is on the lower right corner of the mappanel and where my map description is suppose to be, I have tried this and it is not working, complaining that GeoExt.ux is not defined.
I have also tried Get mouse position in OpenGeo then items: [pos] on the toolbar but still this is not working only creating a small button.
Comment: check this http://gis.stackexchange.com/questions/22240/openlayers-selectfeature-get-mouse-position
Answer: Create an Ext.toolbar.TextItem and create your OpenLayers MousePosition-Control in the render-Event of the TextItem, so you can pass the TextItems's Div to the Control.
Like this:
<code>Ext.create('Ext.toolbar.TextItem', {
    listeners: {
        render: function(textitem) {
            var ctrl = new OpenLayers.Control.MousePosition();
            ctrl.div = textitem.getEl().dom;
            // map is the ref to your OL map instance
            map.addControl(ctrl);
        }
    }
});
</code>

GeoExt Toolbar Mouse Position


How to show apps in salesforce1?

Question: How to show App in salesforce1?
For Example we have many apps which are being present on the right hand corner of Salesforce such as Sales,Marketing,Community etc. Than how can we show these apps in Salesforce1.
As we have requirement such as to show app which has only defined tabs to be visible in Salesforce1.
Any kind of help would be much appreciated.
Answer: You can only show visualforce pages (enabled for Salesforce1 Mobile) and Lightning pages/components in Salesforce1. They both require that you've created a tab for them. Once you've done that, they'll appear in a Dialogue as shown in the screenshot below.
Salesforce1 mobile only supports single page applications. For that reason, the "applications" you speak of such as "Sales", "Marketing", etc cannot be added to the Salesforce1 menu.

How to show apps in salesforce1?


Tenant level configuration changes using SPOL Powershell

Question: We can import the search configuration for a site collection to replicate the search settings. Can we do the same for tenant level search settings? Or can we change individual property of search configuration for eg
Search Center URL   using SharePoint online management shell?
Answer: The cmdlets for SharePoint Online are very limited and do not allow you to set search settings:
https://technet.microsoft.com/en-us/library/fp161364.aspx
You can look towards CSOM solutions on Technet Gallery or CodePlex. There are even some solutions that include additional SPO cmdlets, but I am not familiar with any search-related CMDLETS -> so scripting.
From the user interface you can modify the tenant level Search Settings under this link:
https://TENANTNAMECHANGEPLS-admin.sharepoint.com/_layouts/15/searchadmin/TA_SearchAdministration.aspx
Comment: It's worth adding for reference, that in that user interface, it does give the ability to export/import search configuration.
Comment: Can we use Powershell with CSOM to set tenant level settings.
Comment: can we do any tenant level changes(search) using SPOL powershell + CSOM or is it just for site collection level search config changes?


How to increase size of all glyphs in FontForge?

Question: I opened a font file in FontForge. I want to enlarge all glyphs by 20%. I tried Element, Transformation, and Transform, but they did not work for me. How can I accomplish this? I am using FontForge 11.21.
Comment: Hi. Welcome to GDSE. Why do you want to enlarge the glyphs in a font in fontforge?  Couldn't you just set a 20% larger font size and perhaps adjust the kerning when using the font in an application?
Comment: Also details matter. Scaling is sensitive to the point you scale about
Comment: I needed to do this before merging in glyphs from another font. There are reasons.
Answer:
Select all glyphs (ctrl+a)
From menu choose Elements > Transformation > Transform.
Change the second dropdown to Scale Uniformly...
Change X and Y to 120%

Default checkboxes will automatically increase the kerning and width too.


How many different ways can a number N be expressed as a sum of K different positive integers?

Question: How many different ways can a number $n \in N$ be expressed as a sum of $k$ different positive numbers?
Comment: How is this problem different than finding the "number of partitions of $n$ into $m$ distinct parts"? (see [A008289](https://oeis.org/A008289)) Answers here seem to use advanced tools compared to formulas on OEIS.
Answer: We  show how  to  establish a  recurrene for  the  number $Q(n,k)$  of
partitions  of  $n$  into  $k$  different parts  where  order  is  not
important. (If  it were  and with  all parts  distinct  we  could just
multiply by  $k!.$) Using the  Polya Enumeration Theorem (PET)  we get
for the answer that it is given by
$$[z^n] Z(P_k)\left(\frac{z}{1-z}\right)$$
where  $Z(P_k)$  is the  cycle  index  of  the unlabled  set  operator
$\mathfrak{P}_{=k}$ with OGF
$$G(w) = \exp\left(a_1 w - a_2 \frac{w^2}{2} + a_3 \frac{w^3}{3} - \right)
\\ = \exp\left(\sum_{l\ge 1} a_l (-1)^{l-1} \frac{w^l}{l}\right).$$
Differentiating we obtain
$$G'(w) = G(w)
\left(\sum_{l\ge 1} a_l (-1)^{l-1} w^{l-1}\right).$$
Extracting coefficients on [w^k] we find
$$(k+1) Z(P_{k+1}) =
\sum_{q=0}^k [w^{k-q}] G(w)
[w^q] \sum_{l\ge 1} a_l (-1)^{l-1} w^{l-1}
\\ = \sum_{q=0}^k Z(P_{k-q}) a_{q+1} (-1)^q
= \sum_{q=1}^{k+1} Z(P_{k+1-q}) a_{q} (-1)^{q-1}.$$
We get the recurrence
$$Z(P_k) = \frac{1}{k} \sum_{q=1}^{k} Z(P_{k-q}) a_{q} (-1)^{q-1}$$
with $Z(P_0) = 1.$ This yields for the present case that the substituted
cycle index
$$L_k(z) = Z(P_k)\left(\frac{z}{1-z}\right)$$
has recurrence
$$L_k(z) = \frac{1}{k}
\sum_{q=1}^{k} L_{k-q}(z) \frac{z^q}{1-z^q} (-1)^{q-1}.$$
Extracting the coefficient on $[z^n]$ we obtain
$$Q_{n,k} = \frac{1}{k}
\sum_{q=1}^{k} [z^n] L_{k-q}(z) \frac{z^q}{1-z^q} (-1)^{q-1}
\\ = \frac{1}{k}
\sum_{q=1}^{k} [z^{n-q}] L_{k-q}(z) \frac{1}{1-z^q} (-1)^{q-1}
\\ = \frac{1}{k}
\sum_{q=1}^{k}  (-1)^{q-1}
\sum_{p=0}^{\lfloor n/q\rfloor - 1}
Q_{n-(p+1)q, k-q}.$$
The boundary conditions here are $Q_{0,0}  = 1$ and $Q_{n,0} = Q_{0,k}
= 0$  and $Q_{n,1} = 1.$  There is a non-essential  boundary condition
which is that $Q_{n,k} = 0$ when $n \lt \frac{1}{2} k(k+1).$
Observe that we  can obtain an alternate form of  the recurrence by
writing
$$\frac{1}{k}
\sum_{q=1}^{k}  (-1)^{q-1}
\sum_{p=1}^{\lfloor n/q\rfloor}
Q_{n-pq, k-q}$$
which is
$$\bbox[5px,border:2px solid #00A000]{
\frac{1}{k}
\sum_{m=1}^n
\sum_{q|m\wedge q\le k} (-1)^{q-1} Q_{n-m, k-q}.}$$
This yields the following Maple routine:

with(numtheory);

Q :=
proc(n, k)
    option remember;

    if n=0 and k=0 then return 1 fi;
    if n=0 or k=0  then return 0 fi;

    if k=1 then return 1 fi;

    if n < 1/2*k*(k+1) then return 0 fi;

    1/k*add((-1)^(q-1)*
            add(Q(n-(p+1)*q, k-q), p=0..floor(n/q)-1),
            q=1..k);
end;

QX :=
proc(n, k)
    option remember;

    if k < 0 then return 0 fi;

    if n=0 and k=0 then return 1 fi;
    if n=0 or k=0  then return 0 fi;

    if k=1 then return 1 fi;

    if n < 1/2*k*(k+1) then return 0 fi;

    1/k*add(add((-1)^(q-1)*Q(n-m, k-q), q in divisors(m)),
            m=1..n);
end;

A := n -> add(Q(n,k), k=1..floor(sqrt(2*n)));
AX := n -> add(QX(n,k), k=1..floor(sqrt(2*n)));

This will produce the following  sequence for the number of partitions
into any number of distinct parts:
$$1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18, 22, 27, 32, 38, 46,
\\ 54, 64, 76, 89, 104, 122, 142, 165, 192, 222, 256, 296,\ldots $$
which  points  us  to OEIS  A000009  where
these data are confirmed. We get the following sequence for partitions
into seven  distinct parts starting at  $n=-1 + 1/2\times 7\times  8 =
27:$
$$0, 1, 1, 2, 3, 5, 7, 11, 15, 21, 28, 38, 49, 65, 82, 105, 131,
\\ 164, 201, 248, 300, 364, 436, 522, 618, 733, 860, 1009,\ldots$$
which   points  to   OEIS  A008636   which
again confirms the data and lists additional references.
Addendum. Starting from the generating function (first principles)
we  extract  coefficients  for  an  efficient  recurrence  for  strict
partitions into any number of parts:
$$P(x) = \prod_{q\ge 1} (1+x^q)$$
Differentiatinng we get
$$P'(x) = P(x) \sum_{q\ge 1} \frac{qx^{q-1}}{1+x^q}$$
and on extracting coefficients we find
$$(n+1) P_{n+1} = \sum_{m=0}^n P_{n-m} [x^m]
\sum_{q\ge 1} \frac{qx^{q-1}}{1+x^q}
\\ = \sum_{m=0}^n P_{n-m}
\sum_{q\ge 1} q [x^{m+1-q}] \frac{1}{1+x^q}
\\ = \sum_{m=0}^n P_{n-m}
\sum_{q=1}^{m+1} q [x^{m+1-q}] \frac{1}{1+x^q}
\\ = \sum_{m=0}^n P_{n-m}
\sum_{q=0}^{m} (q+1) [x^{m-q}] \frac{1}{1+x^{q+1}}
\\ = \sum_{q=0}^n (q+1)
\sum_{m=q}^{n}  P_{n-m}  [x^{m-q}] \frac{1}{1+x^{q+1}}.$$
This implies $m-q = p(q+1)$ with $p\ge 0$ and where
$m\le n$ or $p(q+1)+q \le n$ so that
$p\le \lfloor (n+1)/(q+1)\rfloor -1$ and we obtain
$$\sum_{q=0}^n (q+1)
\sum_{p=0}^{\lfloor (n+1)/(q+1)\rfloor -1}
P_{n-p(q+1)-q}
[x^{p(q+1)}] \frac{1}{1+x^{q+1}}
\\ = \sum_{q=0}^n (q+1)
\sum_{p=0}^{\lfloor (n+1)/(q+1)\rfloor -1}
P_{n-p(q+1)-q} (-1)^{p}
\\ = \sum_{q=0}^n (q+1)
\sum_{p=1}^{\lfloor (n+1)/(q+1)\rfloor}
P_{n-(p-1)(q+1)-q} (-1)^{p+1}
\\ = \sum_{q=0}^n (q+1)
\sum_{p=1}^{\lfloor (n+1)/(q+1)\rfloor}
P_{n+1-p(q+1)} (-1)^{p+1}
\\ = \sum_{q=1}^{n+1} q
\sum_{p=1}^{\lfloor (n+1)/q\rfloor}
P_{n+1-pq} (-1)^{p+1}.$$
This is
$$\sum_{k=1}^{n+1} P_{n+1-k}
\sum_{p|k} \frac{k}{p} (-1)^{p+1}
= \sum_{k=1}^{n+1} P_{n+1-k}
\sum_{p|k} p (-1)^{k/p+1}.$$
This finally yields a linear recurrence which is
$$\bbox[5px,border:2px solid #00A000]{
P_n = \frac{1}{n}
\sum_{k=1}^{n} P_{n-k}
\sum_{p|k} p (-1)^{k/p+1}}$$
where $P_0 = 1.$
Now for the inner sum its Dirichlet series is evidently
given by
$$-\zeta(s-1) \sum_{n\ge 1} \frac{(-1)^n}{n^s}
= -\zeta(s-1) \left(\frac{2}{2^s}-1\right)\zeta(s).$$
Multiplication by $\zeta(s)$ is summing  over the divisors in terms of
Dirichlet series  so we need to  examine the product of  the first two
terms. We get that for $n$  even the term $1/n^s$ appears twice, first
paired with $-2\times  n/2$ and second with $n$  for a contribution of
zero. For  $n$ odd the term appears  just once paired with  $n$, for a
contribution  of $n.$  Hence  the inner  sum  is the  sum  of the  odd
divisors of $k$ and we get
$$\bbox[5px,border:2px solid #00A000]{
P_n = \frac{1}{n}
\sum_{k=1}^{n} P_{n-k}
\sum_{p|k\wedge p\;\text{odd}} p.}$$
Comment: Do you have an upper bound for $Q_{n, k}$?
Comment: Good question. The OEIS entry has the asymptotics.
Comment: I found the asymptotics for the sum of the number of partitions of $n$ into at most $k$ parts in the OEIS entry. But, I need the asymptotics for the sum of the number of partitions of $n$ into exactly $k$ distinct parts. I post that question in:
Comment: http://math.stackexchange.com/questions/2078090/upper-bound-for-the-strict-partition-on-k-summands
Answer: As noted by Marko Riedel we can limit the analysis to $Q(n,k)$ = number of partitions of $n$ into $k$ distinct parts, where order is not important.
That is to say: Number of strictly increasing sequences, of $k$ terms, with sum = $n$, or
 (changing parameters notation for better clearness)
$$
\begin{gathered}
  Q(s,q) = \text{No}\text{.}\,\text{of}\,\text{sol}\text{.}\,\text{of}\left\{ \begin{gathered}
  0 < x_{\,1}  < x_{\,2}  <  \cdots  < x_{\,\,q}  \hfill \\
  \sum\limits_{1 \leqslant \,j\, \leqslant \,q} {x_{\,j}  = s}  \hfill \\
\end{gathered}  \right.\quad  =  \hfill \\
   = \text{No}\text{.}\,\text{of}\,\text{sol}\text{.}\,\text{of}\left\{ \begin{gathered}
  0 < y_{\,j} \left( { \leqslant s} \right)\quad \left| {\;1 \leqslant j \leqslant q} \right. \hfill \\
  \sum\limits_{1 \leqslant \,j\, \leqslant \,q} {j\;y_{\,j} }  = s \hfill \\
\end{gathered}  \right.\quad  =  \hfill \\
   = \text{No}\text{.}\,\text{of}\,\text{sol}\text{.}\,\text{of}\left\{ \begin{gathered}
  0 \leqslant z_{\,j} \left( { < s} \right)\quad \left| {\;1 \leqslant j \leqslant q} \right. \hfill \\
  \sum\limits_{1 \leqslant \,j\, \leqslant \,q} {j\;z_{\,j} }  = s - \frac{{q\left( {q + 1} \right)}}
{2} \hfill \\
\end{gathered}  \right. \hfill \\
\end{gathered} \tag{1}
$$
where the 2nd step comes from taking $y_{j}=x_{q-j+1}-x_{q-j} \; | \; x_0=0$.
We define Q to be non null only for positive value of the parameters, and to be $=1$ for the empty word $s=0,\;q=0$.
$$
Q(s < 0,q) = 0\quad Q(s,q < 0) = 0\quad Q(0,q) = [q = 0]
$$
(the square brackets indicating the Iverson Bracket)
so that it corresponds to the double generating function
$$
G(x,y) = \sum\limits_{\begin{subarray}{l}
  0 \leqslant \,q \\
  0 \leqslant \,s\,
\end{subarray}}  {Q(s,q)\;x^{\,s} \;y^{\,q} }  = \prod\limits_{1 \leqslant \,k} {\left( {1 + y\,x^{\,k} } \right)} \tag{2}
$$
From the second relation in (1) it is easy to deduce the recurrence
$$
Q(s,\;q) = \sum\limits_{1 \leqslant \,j\,\,\left( {\, \leqslant \,\,\left\lfloor {s/q} \right\rfloor \,\, \leqslant \,\,s\,} \right)} {Q(s - q\,j,\;q - 1)}  + \left[ {s = 0} \right]\left[ {q = 0} \right]  \tag{3}
$$
Answer: Number of integer partitions of a number n, denoted by p(n), is much harder to find and no easy formula available.
This wiki page gives various algorithms for finding p(n)
Approximate value for p(n) can be found using Hardy-Ramanujan Asymptotic Partition Formula
$p(n) \approx \dfrac{1}{4n\sqrt{3}}e^\left(\pi \sqrt{\dfrac{2n}{3}}\right)$
This tool generates number of integer partitions online and is very useful
This link is also is related to this.
Comment: Is it not also required that a particular integer appear in the partition only once?
Comment: @Kiran, fair enough. Just one of the flaws in the website design, I suppose
Comment: a particular integer can appear more than one time. for example, one of the integer partitions of $3$ can be $1,1,1$
Comment: Though interesting, this fails to answer the question, which specifically asks for each integer to appear at most once.
Comment: @goblin, i believe, the question was edited after I answered and when I answered, the word 'different'  was not there. Not sure though and I cannot verify now.


How to write the NFT contract for minting specified NFT?

Question: I found that the NFT contract normally for minting NFTs in order. Is it possible that I change the minting function to include the id of NFT as an input variable so that customers can mint the specified NFT that they want? Does anyone know how to write this kind of minting function please?
Thank you so much!
Answer: Yes, it can be done by creating a contract that inherits from ERC721PresetMinterPauserAutoId.sol preset. Then you can use the internal _mint(address to, uint256 tokenId) function to specify the id. If the preset is not needed, the plain ERC721 contract can also be used. Same is true for the ERC1155 standard. You can find these contract standards in the OpenZeppelin repo.
Sample code in solidity:
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

import "@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol";

contract NFTtest is ERC721PresetMinterPauserAutoId {

    constructor()
        ERC721PresetMinterPauserAutoId(
            "NonFungibleToken",
            "NFT",
            "https://example.com"
        )
    {}

    // Mint function with ID as an input
    function mint(uint256 _id) public {
        // Here you can add additional logic or pre-conditions.
        // _mint function already checks if the _id has been
        // used so no need to check again

        // Mint the NFT with the specified _id and set as the owner
        // the sender of the transaction
        _mint(msg.sender, _id);
    }
}

Comment: I just discover that I use ERC721A before which use `quantity` instead of `tokenId` in mint function. Now I change to use ERC721 and the problem is solved. But still thanks for your answer