Audio bit rate for youtube Short Film

Question: I am planning out a Horror Short Film for youtube. Since youtube will compress the audio and video quality. Is it better to record the audio and sound effects at 48k/24bit or 96k/24bit?
Answer: This is probably going to be opinion-based, but I only use 24 bit 48kHz for broadcast, let alone YouTube.
If, heaven forfend, Hans Zimmer or Skywalker Ranch rang me to engineer their next multi-million-dollar movie soundtrack, then obviously I'd reconsider.
Until then… 24/48k is good enough.
Comment: Thank you for your opinion. I think i'll stick with 48kHz/24 bit then.
Answer: 24bit and 96kHz are entirely unnecessary for listening purposes.  24bit gives you the headroom (assuming suitable equipment) to exploit what your equipment can handle without unnecessarily risking quantisation noise or distortion.  96kHz when recording comes into play only when doing operations that may bleed into the audible region.  Any pitch shifting (including autotune) can be affected here.  Parametric equalisers implemented via IIR filters will have more natural behavior even in the audible high frequencies below 20kHz.  Any kind of non-linear distortion is also prone to cause frequency bleeding where the results will be better when not just processing at a higher frequency but actually including (even if lower-quality) ultrasound components of the actual sound.
If your audio interface is capable of producing 96kHz (and with a quality better than a mere marketing gimmick), chances are that its analog circuitry is built for cutting off at higher frequencies, and that its own reduction in sampling frequency is designed for low latency rather than high quality.  So even if you are doing all your processing at 48kHz, letting the hardware deliver at 96kHz might slightly improve the high frequency parts of the results.
That's audiophile talk, and you are doing a horror film.  Unless you have extraordinary delicate film music, 48kHz editing should not really be a concern unless you have some specific audio effects that work better at 96kHz for whatever reason.  The headroom of 24bit, however, should likely prove useful for most editing as well as recording tasks, assuming that your equipment does not deliver decidedly less than 16bit of resolution.
In particular since horror film audio tracks will likely feature a lot of dynamic compression, bringing up sounds like leaf rustling and heart beats to large volumes.  Reducing only the final mix to 16bit (or whatever Youtube is going to work with) will improve your chances of getting a smooth result.

Audio bit rate for youtube Short Film


Expresso Store: Creating orders on behalf of other members

Question: My client needs to be able to invoice customers, have them pay online, and then see payment history. I was planning on having the client enter an unpaid order and assign it to the right member. Then the member could login in, see unpaid orders, and pay them. I'm not very familiar with store. Do you see any major problems with this approach? Is this even doable out of the box? Thanks.
Answer: That would be possible with Store, there are a couple of ways to achieve it.
The easiest way is if your client just logs in as the member in question to place the order. This would be possible using EE's "login as member" function in the control panel.
The other approach would be if they create the order under their own account, then assign the order to the other member. Store doesn't have the ability to create new orders from within the control panel, but this would be easy for them to do on the front end of your website. You can use the "Manual" payment gateway to allow the order to be completed without payment. Then, to assign the order to the new member you would just need to write a simple plugin/extension which changes the member_id in the exp_store_orders database table to the correct customer.
Finally, you can allow the customer to log in and view their orders, then use the payment tag to let them pay for the existing order.


Could a failing GFCI result in loud refrigerator compressor noise?

Question: I am doing a remodel on a future home. On the initial walk thru we noticed the loud compressor noise from the frig. 2 months later frig died. Diagnosed by tech as bad GFCI or bad compressor inverter. I replaced GFCI and noticed much quieter compressor noise for 3 days so far. But my gut feeling is that the compressor inverter board is bad?
Comment: I don't see how a GFCI can effect a compressor in a refrigerator.  further, you said the refrigerator died, but then say the noise is quieter?   I think you need to be more clear with the information.
Comment: tell us more about "Diagnosed by tech as bad GFCI". A GFCI is either on or off, it can nuisance trip on inductive/capacitive or active loads but there is no bad in-between where it interferes with downstream circuits.
Comment: After replacing the GFCI the refrig has ran ok for the last 3 days with much lower compressor noise…levels I would expect. My concern is that originally frig was very noisey…so my gut feel is compressor inverter board is the problem. I guess time will tell?
Answer: If the inverter board was faulty it could cause noise in the compressor motor, so your current solution seems to have possibly solved the problem.
Inverters generate pulse trains or sinusoids that are tuned to ramp up and ramp down and further adjust a compressor's motor "gently" - compared to an on/off relay switch.
Sometimes when we replace one thing a different problem comes to light. And sometimes a different previously hidden issue is unintentionally fixed, for instance a loose connection is redone, a loose mounting screw is tightened, etc..
But the GFCI had very likely nothing to do with the cause. The GFCI may have been nuisance tripping with the old board, and now with a new board and a new GFCI that problem has gone away.
Should you be bothered by GFCI nuisance tripping, then depending on then electrical code in your area you may be able to (or even have to) remove the fridge from the GFCI either by plugging the fridge in a different circuit or replacing the GFCI breaker/receptacle with a non-GFCI variant.
The electrical code must be applicable to your country, your state/province and even your municipality may have variations.
If removing a GFCI breaker, again check the code to determine which outlets must be protected (esp. plugs near sinks), and make sure they remain on a protected circuit, and get dedicated GFCI receptacles for those cases.
Comment: I have only changed the GFCI outlet to date…the cheap fix before changing the compressor inverter board. But also I don't know if the output temp is correct either…haven't checked it. Maybe only the fan is running…low noise.
Comment: As a followup, the output temp on refrigerator after GFCI replacement was found not correct. The tech was called back and he had found he did not plug in 1 of the connectors to the compressor inverter after he checked the input voltage. Once connected the frig temp started to decrease, frost starting in the freezer compartment. So long story short…it was only the GFCI outlet to date…not the compressor inverter…but will check both output temp and noise levels in the days to come. Has be baffled why high compressor noise levels attributed to GFCI going bad…but I am no electrical engineer.
Comment: did you move the fridge to replace the GFCI?  what does the connector of the inverter have to do with replacing the GFCI? In other words, if GFCI was the only work done, why did anything with the connector change?
Answer: A GFCI does not make any effect on downstream devices, it is on affected by the type of load whether its resistive or capacitive/reactive and that is only in regarding to tripping characteristics.
Most likely your fridge/compressor is going out, when you turned off the fridge you reset the controller and hence reset the program operation of the thermostat in the fridge and hence it went quieter.


How to use a relay node as a wallet for faster transactions

Question: So I have set a relay node up on a vps. Now I want to connect it to my wallets in order to send transactions faster. How do I do that? Thanks
Answer: It is a common myth inside the NFT community that a node sends transactions 'faster' than a wallet. Daedalus is a node itself so there is no difference between sending a TX via Daedalus and sending it via cardano cli wallet aside from a TON more manual effort in the latter and the risk you'll overwrite and lose your payment keys and permanently lose access to your funds... That said, it seems as though you've bought into this myth, so very well.. here are the answers:
First, you'll want to become familiar with the cardano-cli wallet commands. They can be found here, https://input-output-hk.github.io/cardano-wallet/user-guide/cli
Specifically, you'll want to 'create a wallet from recovery phrase' to restore a wallet into your VPS and then you'll want to use the "cardano-cli transaction" command to send a TX to the NFT vendor.
Examples:
<code>cardano-wallet wallet create from-recovery-phrase [--port=INT] <name> [--address-pool-gap=INT]

cardano-wallet transaction create [--port=INT] WALLET_ID [--metadata=JSON] [--ttl=SECONDS] --payment=PAYMENT...
</code>
Comment: He only asked how to connect a wallet not necessarily create a new one.
If you have an existing node running and fully in sync, you can use Nami to point to your node under settings - then submitting any tx goes through your node and not blockfrost.
Answer: Before setting up your own cardano-node to use it as an submit-api endpoint, you might want to take a look at https://www.freeloaderz.io/.
This is a group of SPOs offering to the community submit-api endpoints that users can set in their wallets exactly for this purpose.
Answer: If you don't want to create an HD wallet using the command line and just want to submit transactions to your custom node from existing wallets, check this link out on how to connect Nami/ CCVault (Eternl) to your own node.
HowTo


How to get rid of color behind text on Word for Mac?

Question: The background of every text is yellow and I just would like to have it normal. It's not highlighted or the text color. The page color option is grey, so I can't click on that. The image is an example of what it looks like. When there is more text, more yellow and the rest of the page is just white like normal, it's just behind the text.
Comment: You should be able to change the background color of the text back to white. If you cannot, please post an example Word document.
Comment: I cannot, see the example above. In any other word document it's not a problem, only in this template.
Comment: Template or document? You might have changed the text style, but that shouldn't stop you from changing it back. You would best post the document. If you cannot, storing the document as `rtf` and then back to `doc(x)` can sometimes get rid of some artifacts.
Comment: If you could upload an example file this would be easier to solve, otherwise we have no way of knowing what caused it.
Answer: I would say that's a Character Style with a yellow Pattern foreground shading set at about a 30% opacity. It's not a paragraph style because white background is showing between lines. If it was a paragraph style setting the entire block would be yellow.
The line spacing is also sightly more than 1, probably 1.15. If it was set to single spacing the shading would bleed into the space between lines.
Unless a custom VBA routine was used to set a specific RGB value on a custom highlight, the default highlight colors have a lot more vibrance and clarity ... so I'd also rule out it being a highlight.
To verify this, from the Home tab (I assume you are using Office for the Mac 2016 or later) open the Styles pane. The button looks like this:

Select one of the words with this yellow shading and check its Style Name.
Assuming I am correct, then Modify the Style to how you want it to look, OR ... select the entire paragraph(s) of text and change the Style of text to something else, such as Body Text or Normal.


What is the difference between \paperheight, \paperwidth and \pdfpageheight, \pdfpagewidth?

Question: I couldn't find any existing answers to this question.
So, what's the difference? Are there any advantages to using one duo over the other?
Comment: Please tell us which TeX engine you use: pdfTeX, XeTeX, or LuaTeX?
Comment: @Mico sorry for the late response - i had no idea so i had to check. it's PdfLaTeX.
Answer: \pdfpageheight was introduced by pdftex (and it prefixes most of its "new" commands with \pdf) It sets the vertical size of the mediabox in the resulting PDF.  xetex also supports this primitive and passes the information to the xdvipdfmx dvi driver. luatex has a command with identical functionality but it is called \pageheight.
LaTeX has a command \paperheight that is usually set with documentclass options such as a4paper it is used mainly for adjusting the size of the text block, e.g. \textheight is \paperheight minus some space for top and bottom margins. If packages that "know" about driver-specific code (graphics, hyperref, geometry) are loaded then by default \(pdf)pageheight will be set based on the value of \paperheight by the package code.
So, setting \paperheight in the preamble will normally have no effect at all, as the value has already been used to set \textheight and changing it has no effect. The exception, as noted above is if a package uses the value of \paperheight in the preamble to set \(pdf)pageheight at \begin{document}.  Conversely setting \(pdf)pageheight has an immediate effect of changing the dimensions of the generated PDF, although again if a package re-sets the value at \begin{document} then the value you set directly may not be used.
Answer: Yes, there's a big difference between \paperheight and \paperwidth on the one hand and \pdfpageheight and \pdfpagewidth on the other. The differences are engine-specific:

With pdfLaTeX, all four macros are defined. However, whether or not \paperheight and \pdfpageheight (and \paperwidth and \pdfpagewidth) coincide depends on your system settings. E.g., my MacOS-based computer is currently configured to treat A4 as the "standard" paper size. But if I run
\documentclass[letterpaper]{article} % letterpaper: 8.5" wide, 11.0" tall
\begin{document}
\obeylines
\the\paperheight
\the\pdfpageheight
\the\paperwidth
\the\pdfpagewidth
\end{document}

through pdfLaTeX, I get 794.96999pt and 614.295pt -- the equivalent of 11" and 8.5" -- for \paperheight and \paperwidth. However, I get 845.04684pt and 597.50787pt -- the equivalent of 297mm and 210mm, or 11.69" and 8.27" -- for \pdfpageheight and \pdfpagewidth, respectively. (Aside: 297mm and 210mm are the correct values for A4 paper.) Put differently, selecting the document class option letterpaper managed to change the values of \paperheight and \paperwidth, but not those of \pdfpageheight and \pdfpagewidth.
Under XeLaTeX, the macros \pdfpagewidth and \pdfpageheight both exist, but they are both set to 0pt by default. The values of \paperheight and \paperwidth both depend on whether a4paper or letterpaper is provided as a documentclass-level option.
Under LuaLaTeX, \pdfpagewidth and \pdfpageheight are, by default, both undefined. The values of \pagewidth and \pageheight will either coincide or differ from \paperwidth and \paperheight depending on whether your system settings coincide with the paper-size option (a4paper or letterpaper) you specify at the document class level.
The values of \paperheight and \paperwidth both depend on whether a4paper or letterpaper is provided as a documentclass-level option.
Answer: Do you want to read or to write those dimensions?
In PdfLatex and XeLatex changing \pdfpageheight and \pdfpagewidth will actually change the document page size beginning with the current page. In LuaLatex you have to use \pageheight and \pagewidth i.e. without pdf.
\paperheight and \paperwidth seem to be copies or preliminary variables for the real ones. Which package/option/macro reads or sets which during what is better explained in the other answers.—Having two pairs might make sense if you want margins etc. to be calculated having different paper dimensions in mind than the actual output area. Maybe.
By the way, only the PDF path allows mid-document changes. DVI and Postscript do not support this.


USO1 call options

Question: I am new to trading and confused. I have (5) $6 call options of USO1 that expire  7/17. I am wondering if I have the right to buy the 500 shares for  $6 and sell them  at current  $25 price? Note I am  using  Robinhood.
Answer: The current quote for you 7/17 USO1 $6.00 call is $0.01 x $0.03.  It is near worthless because USO underwent a 1 for 8 reverse split last month.  When that occurs, the terms of the contract are adjusted and a "1" is added to the root symbol.
You can read the details here:
Answer: Yes, a call option gives you the right to buy at the Strike Price of $6.00.  So if the stock is at $25, you can exercise the option to buy the stock at $6, and later after you have received it sell that stock for the market price.
Alternatively you can sell the option in the market.  If there is still time value left in the option, you would probably get more than $19 for it.
Comment: USO underwent a 1-for-8 reverse stock split.  These are adjusted options.   The OP's $6 call is $0.01 x $0.03.

USO1 call options


Can fungi metabolize pluronic polyol f127?

Question: I am looking for a gelling agent that can be used in place of agar, where its carbon must not be bioavailable for fungi. I have read about pluronic polyol f127 as substitute for agar. Can fungi metabolize carbon from this polymer?
Answer: It is known that some species of fungi can use hydrocarbons as their carbon source. Polyethers like pluronic are less chemically inert than hydrocarbons. Indeed, degradation of polyethylene glycols by microorganisms is a well studied process (see DOI: 10.1007/s00253-001-0850-2 for example). Gloeophyllum trabeum is known to degrade poly(ethylene oxide) by a non-enzymatic, oxidative process (Proc. Natl. Acad. Sci. USA. 1998, 95(18):10373-7). Given those facts, there is a very good chance that some species of fungi can metabolize pluronics and similar compounds.
Comment: When you said that there is a very good chance that some fungal species can metabolize pluronics does that mean that most fungal species will not be able to metabolize pluronics? If that's the case then pluronics is ideal substitute for agarose as gelling agent for my study given that most fungi survive in agar. By the way, based from the structure, how can I tell whether carbon in a polymer is available for microorganisms?
Comment: Well I can't tell exactly how many species is able to metabolize polyethers, but I wouldn't be surprised if most of them can. About stability: anything that contains hydrolysable bonds (amides, esters and hemiacetal ethers) is potentially prone to biodegradation. Also chemical groups that can be oxidized - like alcohol groups in pluronics are good targets for enzymes. But that free-radical oxidation system described in the second reference is able to attack practically any organic molecule, so your only choice is to test several gelling agents with your particular species of fungi.


Product commenting system

Question: Can you guys suggest me any good FREE product review system? The functionality should include commenting on the reviews by customers, Something like 'Disqus'.
Answer: I don't know of any free ones, however this appears to be a decently priced extension at 9.99EU:
http://shop.tentura.eu/magento-extensions/disqus-for-magento.html
It implements Disqus into Magento, providing the exact functionality you're looking for.
Also, it appears they've released a "light" version of this plugin for free as well:
https://github.com/involic/Magento-DISQUS-Comments-Integration-Light
Seems a little out dated, but may still work.
Answer: Yotpo is a startup that seems to be picking up some steam - they've been at a few Magento conferences.
Having demoed their platform I think it provides the functionality you're looking for. The plugin is free; the SaaS solution is free up to a certain number of visitors monthly. So this may cost you money in the end if you have a large amount of traffic.
http://www.magentocommerce.com/magento-connect/yopto-reviews-5759.html

Product commenting system


can you use metal pans in combo convection/microwave ovens

Question: can you use metal pans in combo convection/microwave ovens
Comment: Obviously not when you're using them with microwave..
Answer: Can... possibly, if they don't spark too much.
Be used successfully... no.
They will block the microwaves, making the exercise rather futile.
If you're using only conventional heat, then fine, but not if you need the microwave energy.


My truck died while driving

Question: I had to get a jump yesterday to start my truck (2000 Ford Explorer). I stopped by O'Reilly's but they couldn't find anything wrong. I was told to go to AutoZone to have the battery, alternator, and starter checked. I think it's the alternator. It didn't make a clicking noise when I went to start it and all my lights come on fine. Suggestions?
Comment: Did it start when you jumped it?
Comment: What was Auto Zones view of battery, alternator and starter?
Comment: Yes it started when I jumped it although it took a couple tries. I didn't get to Auto Zone ... I live in the sticks (it's about a 25 mile drive from my house).
Comment: Have a quick look to make sure the alternator's belt is tight. With the truck off, pop the hood, and press down on the alternator belt. You shouldn't be able to move it with just your fingers.
Comment: In this case, jumping is the first move. You may want to have your vehicle checked for any code.
Answer: If you have a multi-meter, get the truck started then take a voltage reading at the battery posts. You should get about 14 VDC with all your accessories off, about 13 VDC with all your accessories on (headlights, heater fan on max, rear defrost if you have one). If your voltage reading is lower than that, your alternator isn't charging your battery.
If your voltage readings are fine, turn the truck off and immediately take a voltage reading of the battery. It should be above 12.4-12.6 VDC, if it's lower, your battery isn't holding a charge.
Comment: thank you for your advise, I appreciate it.  My son works at AutoZone (about 6 hours away, lol) and he advised me to do the same. I'm just nervous because it's about 25 miles from my house.  I guess I can drive with two feet there and have someone follow me with jumper cables just in case. :)
Comment: Sounds easy enough ... If I had a multi-meter.  LOL
Comment: Single chick here with no tools. Are multi-meters expensive? I truly hope it's just the battery, that I can afford!!
Comment: @S.Motto Mulitmeters are $15 at WalMart :) It's a rudimentary version of the test AutroZone would do. Their's is more comprehensive. If you need to drive into town for a multimeter, may as well drive to AutoZone instead and get the better test. :)
Answer: The first thing to do is check if all battery connections are clean and tight. A connection that is intermittent can be the problem. Rarely a cable can be corroded inside the plastic cover and not making good contact. ( My 98 GMC died a few times on the interstate ,caused by a bad battery connection.)

My truck died while driving


Timing etiquette of asking for update on book manuscript review

Question: I submitted a book manuscript to Springer. The editor told me that it looked great and that they would send it for peer review and would contact me in due course. But I haven't heard of the project for 7 months. I don't even know if it's under peer review, since it's not an article and therefore I don't have the journal's progress bar to check on. A month ago, 3 days before the six-month mark, I sent an email asking about status (because when I've been given a deadline to review a full book, it's been 6 months). I received no answer. Question: is it OK if I insist with another polite email on the 7-month mark?
Answer: Yes, you can ask. Ask if it is under review. Ask when you can get some feedback. Ask if there is anything you can or should do at this time.
You could even ask why it is taking so long. You should have heard something in seven months even if the review is taking longer than expected.
Comment: @FedericoPoloni, no, it isn't a long time for completion, but it is a long time with no feedback at all. The editor should have better communication with an author they are considering publishing. Should and author just shut up and take it no matter what? They might have other publishing options. The author has offered something of value to the publisher. No communication is insulting.
Comment: I disagree with the premise that this is a long time. Six months seems to be the normal amount of time given to a referee to review a book in OP's field.
Comment: Thanks, Buffy. These things take so long that one can be at a completely different stage in their personal or work life when they get back to you. The manuscript has already changed a bit even, but I will wait to make the changes when and if they ask for edits.
Comment: But seven is 16% more.
Comment: @all Ok. I'll write and get back to you!


What exactly are emotions ontologically?

Question: We put categories on things that we see outside in the world. We say an explosion is an event, a happening in time and space. We say stuff is made out of matter. Yet we all know that emotions exist too. Are they events in time and space? If yes should they be categorised as events? Could they be classified as matter? If yes, is it a specific structure of matter which is common among everyone experiencing that emotion, say sadness? Would intuition be categorised as a structure of matter in the necessary context? Or should we really give emotion ontological status?
Comment: There's a whole philosophical literature on this. You may find some useful discussion here: https://www.iep.utm.edu/emotion/
Comment: A short answer is that they are mental states. The issue of what physical basis mental states supervene on is controversial. But after Putnam most philosophers doubt the type identity theory, i.e. that there is a single type of brain state that instantiates a particular type of mental state, like sadness. There can be many types of brain states that do that, this is known as multiple realizability, see [SEP, Mind/Brain Identity Theory](https://plato.stanford.edu/entries/mind-identity/).
Comment: Is emotion not a state of consciousness? In this case the question would seem to be about the ontology of consciousness.
Comment: @PeterJ I feel that emotions themselves have a quality of consciousness to them. By definition of an emotion, emotion cannot exist without experiencer. It is meaningless to say that sadness exists without someone being sad about it. Consciousness then becomes ontologically equivalent to emotion. If I am to assign any reality to emotion, then I have to do the same for consciousness.
Comment: @Weezy - I'm with you on this. But here's the thing. Physical objects must also  always have a quality of consciousness about them, or at least all those we know about. So as a metaphysical study ontology is always ontology, never the ontology of this or that. This makes your question a little dangerous, as I expect you're aware. . . .
Answer: Emotions are a feature of our consciousness, so this question is basically asking what the ontology of consciousness is.  That is the central question of the Philosphy of Mind, and it has been a focus of much philosophic thought for the last century. This is because, as your questions note, the dominant movement in philosophy over the last century, physicalism, struggles to answer what consciousness is.
Most physicalists assume some version of Identity Theory, and if one does that, then emotions are a reflection of physics, and are themselves causally irrelevant, as are all conscious events.  Property dualism gives some additional ontology to emotions, and awareness, but in most forms (dual aspect theory) it has similar causal irrelevance, in that the real causal work is done by the physical aspect of matter.
Substance dualism asserts there are mental and physical substances in the universe, and emotions are a mental substance, which our minds host.  Substance dualism involves an interface principle, in which the mater of our brains can affect the thoughts and emotions in our minds, and vice versa.
A "physicalist" version of this is a strong emergence theory, that mind emerges from some unique matter structures, but is then at least partially causally independent of its substrate.
Physicalism has a similar problem with ideas (math, ethics, Beauty, logic, causation, time, etc), in that they seem to be important in the universe, but don't seem to have any role in physicalism.  Frege, and the Popper, therefore proposed that the ontology of our universe is triplest -- IE, matter, mind, and ideas all have their own existence.  Popper combined his triplism with strong emergence for mind.  https://tannerlectures.utah.edu/_documents/a-to-z/p/popper80.pdf


Why do inverse ETFs reset daily?

Question: I looked at some of the popular inverse ETFs such as ProShares Short S&P 500 (SH), ProShares UltraShort S&P 500 (SDS), Direxion Daily S&P 500 Bear 3X Shares (SPXS), ProShares Short Dow 30 (DOG), etc. I notice that they are only designed to be held for one day, because they are rebalanced daily, and that rebalancing may introduce losses. I looked up even more inverse ETFs, and I notice that practically all of them reset daily. So my question is: why do they have to reset daily (and not weekly or monthly or yearly)?
Comment: There are monthly leveraged funds.  They will have "monthly" in the name.  An example is RMQHX.
Answer: Leveraged ETFs  aim to provide a multiple of the daily return of  the underlying index. Price movement in the underlying changes the exposure and the ETF needs to rebalance the portfolio in order to maintain the desired leverage.  This tends to occur daily.

Most leveraged/inverse ETFs reset their leverage daily, but some have monthly reset periods. PowerShares and Deutsche Bank offer a number of monthly leveraged commodity ETNs, including products focusing on gold (DGZ), agriculture (DAG), and base metals (BDD). There are also 3x and -3x ETNs offering exposure to long-term Treasuries (LBND, SBND)

Why do inverse ETFs reset daily?


Does total time exercising matter for cognition more than the time exercising continuously?

Question: Will my brain benefit from cardio equally if I exercise at the same intensity level for 12 10 minutes sessions as it would for one 120 minute session?
Comment: We know that exercise does benefit our mental health. As a healthy body benefits a healthy mind, then the cautious answer is yes (in the long term) - Norwegian researchers conducted a long term experiment and found that even [short duration high intensity exercises increased the life span](https://www.nytimes.com/2020/12/23/well/move/high-intensity-exercise-workouts.html) of the elderly. ([Link to the actual research](https://www.bmj.com/content/371/bmj.m3485)).
Answer: Before giving my gut feeling as an answer in the final paragraph I'll first have to explain why I don't think the question can be answered in absolute terms (at least not without additional restrictions).
To start with I'll remind you that our bodies don't just flick over to exercise mode but instead ramp up and down in response to the demands put on them. As a result to make a proper comparison between bursts and sustained exercise isn't as simple as multiplying there duration.
If we take our [calculated MHR][1] as a basic measure of exercise intensity then say a respectable level is 50% to 70% of MHR, the quickest we are going to be able to get into that heart rate zone is with an all out sprint (a very bad idea without warming up) at which point our heart rate will overshoot the mark (sometimes reaching well over 100% since the MHR calculators are pretty rough without doing a full fitness workup) and then drop and eventually settle on a rate after maybe 2 minutes.
But the more likely and sensible scenario  is that we will start exercising at what we feel is the correct intensity and our heart rate will eventually increase over the space of several minutes so that it may be 5 to 10 minutes before we get in the zone.
So while I completely understand where you are coming from with your question it is one that I see a way of testing experimentally - and so i will just give you my subjective answer in what follows.
Since the physiological changes in the brain ([such as increased blood flow, seratonin, BDNF][2]) would I believe happen toward the start of the exercise session and then your brain would adapt to the new exercise demands and stop producing extras of all those goodies leaving them to begin dissipating before you ended the session and for a duration of time after means you would be better off doing bursts of exercise throughout the day to keep triggering that brain response that re-releases the goods.
Comment: There are a lot of bold claims in your answer without corroborated evidence. We work differently to many SE sites, where we have a strict policy that [all answers should be backed up with reliable references](https://psychology.meta.stackexchange.com/q/201/7604) so that the answer can be independently verified, regardless of the reader's/answerer's background. If you still have trouble with this, feel free to visit the [help] or [meta]. Unreferenced claims can be challenged and lead to deletion of your answer.


What is the meaning of "the inner leaflet of their lipid bilayer corresponds to the outer leaflet of the plasmalemma."

Question: The whole quote is, "Their lumen corresponds topologically to the outside of the cell; consequently, the inner leaflet of their lipid bilayer corresponds to the outer leaflet of the plasmalemma." The "they" corresponds fo the vacuolar apparatus of a cell. My question here is, how is it possible for the inner leaflet of the vacuolar apparatus to lie on the outer leaflets of the plasma membrane? Wouldn't this mean that the vacuolar apparatus partly lies outsides the cell? Or am I mistaken? The excerpt is from Chapter 4 of Principles of Neural Science by Kandel et al.
Comment: If an answer is helpful to you, the thing to do is to upvote and/or accept it (generally it's good to wait a bit for other answers before accepting, though). See also https://meta.stackexchange.com/questions/130046/when-should-i-vote and https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work
Comment: I understand it now. Thank you for clarifying!
Answer: I don't have Kandel in front of me but I am pretty sure I know what your book is trying to say. The specific language they've chosen for this section is quite odd and I believe old-fashioned, though, which might be leading to your confusion.

Transferring membrane-bound material from intracellular organelles to the surface of a cell involves or vice-versa involves fusing vesicles with the plasma membrane or budding vesicles from the plasma membrane. The process is more or less the same, just in reverse. See the diagram below:

Adapted from https://en.wikipedia.org/wiki/Golgi_apparatus#/media/File:0314_Golgi_Apparatus.jpg
Notice how the "protein" has its purple plus-shaped domain on the outside of the cellular membrane? If it were to be secreted in a vesicle (as pictured here) or taken up by endocytosis (just imagine the arrows pointing the other way), fusing or pinching the membrane would mean that this "outside" part is actually on the inside of the secretory vesicle, Golgi apparatus, any lysosome/endosome, etc. What stays constant is the part facing the cytosol.
Therefore, you can say that the "inside" of any of these compartments "looks like" the outside of the cell, whereas the outside of these compartments (facing the cytosol) looks like the inside of the cell membrane (also facing the cytosol).
For another intuitive way of thinking about this, imagine you have an inflated balloon. You press a marble into the side of the balloon and pinch inside so now the marble is entirely inside this little bubble inside the whole balloon. It's still covered by "outside balloon", but yet it is inside this little compartment you've created.
For more general thoughts on "topology" (what is referred to by "topologically") see the general mathematical concept: https://en.wikipedia.org/wiki/Topology

What is the meaning of “the inner leaflet of their lipid bilayer corresponds to the outer leaflet of the plasmalemma.”


How is 儿化 represented in other romanization systems like Wade-Giles, Zhuyin Fuhao, etc.?

Question: I just realized that I have no idea how other romanization systems (besides pinyin) deal with 儿化 (er hua).
What would be the Wade-Giles or Zhuyin-Fuhao equivalent to 电影儿 (diànyǐngr)?
Comment: @Alenanno I think stevendaniels is correct. "影" is ying3, and for 儿化音, you simply add an "r".
Comment: Hello Steven and welcome to CL&U! You wrote "diànyǐngr", did you mean "diànyǐner"? I'm not sure about this either, but "gr" seems unlikely. :D
Answer: This is not a complete answer, but the Wade-Giles example chart on this Chinese-language Wikipedia entry includes "kêrh" as a transcription of the rhotacized "哥儿." I do not know the general rule.
The GR (Gwoyeu Romatzyh) transcription system, which was used officially in China from 1928-1958, has complex rules for 儿化 spellings. I can't find a complete chart online, but, again, Chinese Wikipedia has some details. GR uses "l" to represent rhotacization, but the precise rules for how the resulting work is spelled differ depending on the syllable final and tone.
Answer: Mr Giles' phrasebook uses -r, the same as Pinyin. The phrasebook was published after he created the Wade-Giles system, so presumably it uses this system.
(EDIT: I previously said "I think this might have been before the Wade-Giles system was formalized", but then found that the date of publication was 1901, while Wikipedia says Wade-Giles "was given completed form with Herbert Giles' Chinese–English dictionary of 1892")
Comment: That phrasebook is awesome!
Answer: Specifically for Zhuyin Fuhao they add "ㄦ" as an erhua marker after the Zhuyin tone mark of the erhua-ized syllable e.g. 电影儿 is transcribed "ㄉㄧㄢˋㄧㄥˇㄦ".  Usually this ㄦ is added with no tone mark (which in Zhuyin otherwise marks first tone) but some dictionaries will instead mark ㄦ with a neutral tone marker i.e. "ㄦ˙" instead.  Note that the full syllable 儿 never by itself is pronounced in either the first tone or neutral tone so in either case there is no possible ambiguity with the full syllable ㄦ.
Surprisingly hard to find Yale Romanization erhua rules or even erhua examples online.  Might need to go to library and physically look at old books published (by Yale Press) in the US before the 1980's.
Answer: 兒化 is the process of adding a 兒 at the end of words in some Notĥern Chinese dialects like the Beijing's one. There is no specific transcription for that other than adding a "r" in pinyin and a "ㄦ" in Zhuyin Fuhao. Although, in Taiwan, it's almost never seen since people don't do 兒化…
Comment: So, it's just not transcribed at all?
Comment: it is, only with the "r" in pinyin as I said. A dialect is supposed to be more oral too so, outside of chats softwares, you don't see that often.


How to minimise sugar in meringue

Question: My wife just complained that she can't eat my meringue because they have too much sugar in them. She suggested I cook them with less sugar. However, without sugar the meringue won't work right. What is the minimum ratio of egg white to sugar required to get a stable meringue.
Comment: What do you mean, "won't work right"? You can create a stiff foam out of eggwhites without using any sugar at all. What's the specific problem with that?
Comment: My wife and I diverge the opposite way, though we each will eat the other's meringues - they are just quite different. She uses about 6 times the sugar I usually do (I vary a bit) and gets a much harder meringue as a result. There's also a huge variaton in results (separate from sugar content, though affected by it)  depending on cooking method - hot and fast, low and slow, somewhere in the middle...they are all good in their own way, unless you manage to burn them (that's just not good...)
Comment: The sugar in a meringue caramelise when cooked and make a sort of toffee. Without any sugar you would just have dried out egg.
Comment: @Ecnerwal - do you have a method I could follow? I'm still learning meringue but you sound quite experienced!
Answer: Technically, the minimum ratio of sugar is zero. You can definitely create a stable meringue without any sugar at all, although you'll have to mind your conditions and preparation - use a spotlessly-clean bowl, room-temperature egg whites (separated when chilled), initially foamed up on low speed with an acid such as vinegar or cream of tartar, superfine sugar (if you're using any at all) added very slowly after the soft peak stage, and a starch (e.g. corn starch or icing sugar) at the end for added stability.
The main problem, of course, is that as you allude to, when you bake it you'll basically end up with dried-out egg. It won't have any flavour at all. If you're just reducing the sugar then maybe this isn't a problem. If you're trying to eliminate the sugar entirely or almost entirely then you need to replace it with something - generally, a savory bomb, like very old cheese (for example Reggiano and chives), or very dark chocolate if it must be a dessert.
To do that, just grate or finely chop the strong/savory elements, whip the eggs up to the shiny peak stage, and fold in the shavings at the very end. The meringue will hold up.
But again, and I'm going to repeat myself here - you don't need a lot of sugar for stability. You can easily halve the sugar measurement for a traditional meringue recipe and still have it come out OK (albeit less tasty) - especially if you make one of the more stable meringue types, such as an Italian meringue where the sugar is combined as boiling sugar syrup. But you don't have to do that; simply reducing the sugar is fine if you're careful.
Answer: I  have found this method to achieve a decent meringue with less sugar:
Set a pan of water to simmer.
Using a metal bowl or the top of the double boiler, place your egg whites over the simmering water.Add about half the usual amount of granulated or superfine sugar and stir until the sugar is dissolved. I  don't use a thermometer.
Take the egg white sugar mix back to the mixer bowl  , add a small amount of something acid like cream of tartar or lemon juice and start whipping. Continue whipping until the bottom of the bowl is cool even if the peaks look good.
You can add additional sugar, but if you do so, use confectioner's sugar (powdered sugar, or sugar which has a bit of corn starch/corn flour) in it. That avoids graininess. However,  confectioner's sugar tastes sweeter to me.
I add flavor such as vanilla once the peaks have formed.
This meringue also can form the basis for a butter cream frosting by adding room temperature but sill cool butter in one tablspoon increments after the stiff peaks form.
Comment: What is a 'small amount' here?
Answer: I found that by adding some vanilla extract at the end that it added flavor to compensate for less sugar.
Answer: It's also possible to replace some (or all) of the sugar with Isomalt. It behaves a lot like sugar, but isn't sweet.
Answer: You could always use brown sugar. Just dump everything in and whip it up. Make sure the equipment is spotlessly clean though. Brown sugar generally gives the meringue a caramel/toffee like flavour but it's richer and far less sweeter than a normal meringue.

How to minimise sugar in meringue


udev does not correctly mount USB stick

Question: I have an ARM-based ODROID XU4 running Ubuntu 16.04. I want to automatically mount USB sticks on /media/usbdisk when they are inserted. Now I'm facing the problem that the devices don't seem to be correctly mounted.
I can mount and access the stick manually using
sudo mount -t ntfs /dev/sda1 usbdisk/

Then I added the following rule as /etc/udev/rules.d/11-media-by-label-auto-mount.rules
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/usbdisk", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/usbdisk"
# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/usbdisk", RUN+="/bin/rmdir /media/usbdisk"
# Exit
LABEL="media_by_label_auto_mount_end"

When I add a USB stick the folder /media/usbdisk gets created, however the file system is not mounted correctly. ls on /media says:
/media$ ls -la
ls: cannot access 'usbdisk': Transport endpoint is not connected
total 24
drwxr-xr-x  4 root root  4096 Feb 11 16:51 .
drwxr-xr-x 22 root root  4096 Feb 11 17:03 ..
drwxr-xr-x  3 root root 16384 Jan  1  1970 boot
d?????????  ? ?    ?        ?            ? usbdisk

and I cannot cd into it
cd usbdisk
-bash: cd: usbdisk: Transport endpoint is not connected

dmesg output is:
[  221.871579] [c2] usb 4-1.2: new SuperSpeed USB device number 3 using xhci-hcd
[  221.885847] [c2] usb 4-1.2: Parent hub missing LPM exit latency info.  Power management will be impacted.
[  221.887582] [c2] usb-storage 4-1.2:1.0: USB Mass Storage device detected
[  221.888007] [c2] scsi2 : usb-storage 4-1.2:1.0
[  222.886208] [c2] scsi 2:0:0:0: Direct-Access     SanDisk  Extreme          0001 PQ: 0 ANSI: 6
[  222.887373] [c2] sd 2:0:0:0: Attached scsi generic sg0 type 0
[  222.887626] [c2] sd 2:0:0:0: [sda] 250085376 512-byte logical blocks: (128 GB/119 GiB)
[  222.888235] [c2] sd 2:0:0:0: [sda] Write Protect is off
[  222.888257] [c2] sd 2:0:0:0: [sda] Mode Sense: 53 00 00 08
[  222.888830] [c2] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  222.893348] [c2]  sda: sda1
[  222.897331] [c2] sd 2:0:0:0: [sda] Attached SCSI removable disk

Edit - found out some more details:
I minimized the udev rule to basically just the mount and unmount commands. The problem persisted.
Using journalctl -f I could see a message from udev, the mount command exits with an error, return code is 21.
Even more surprising - I have a script running on startup of the device through systemd that is supposed to log to the usb disk. This script succeeds and writes something to the stick. So obviously the device is mounted but I don't have the rights to access it. Any idea in what mode / for which user udev runs?
Thanks for your help!
Comment: Does this help? https://www.linuxquestions.org/questions/linux-mint-84/usb-issues-exit-code-21-kills-mounting-hd-how-to-usb-diskcheck-943156/
Answer: udev run scripts as root. So change the permissions of the created folder /media/usbdisk before mounting the block device.

udev does not correctly mount USB stick


Wine runs fine from .wine folder, but not from flash drive

Question: I've done some reading on this and found out that there are some complications with Wine running on flash drives. While I don't completely understand why these complications exist (meaning that I'm a dummy and don't understand why the instructions were telling me to do certain things, therefore I may have botched it) I did follow instructions to solve the issue to no avail.
What I'm trying to do is run games on my Chromebook. I installed crouton, gnome terminal, and then Wine. The chromebook is limited by a very small internal drive, meaning that I can't store all of the games I want to play on the device itself, I have to load them onto a flash drive and play them from there. I was able to get some games working when I copied them into the .Wine/drive_c/Program\ Files/(game directory).exe and ran the command:
 wine ./(game directory).exe

but I want to get them to work by running:
wine /media/removable/USB20FD/(game directory).exe

but it won't work, instead giving me this:
(precise)matthew@localhost:~/.wine/drive_c/Program Files$ wine /media/removable/USB20FD/halo/halo.exe/
err:module:import_dll Library vorbisfile.dll (which is needed by L"Z:\\media\\removable\\USB20FD\\halo\\halo.exe") not found
err:module:import_dll Library binkw32.dll (which is needed by L"Z:\\media\\removable\\USB20FD\\halo\\halo.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\media\\removable\\USB20FD\\halo\\halo.exe" failed, status c0000135
(precise)matthew@localhost:~/.wine/drive_c/Program Files$

So far this same (or really similar) error message has been generated regardless of the game I try. So I know the problem isn't just with this particular game.
Any help would be really appreciated, or if you have suggestions on how I could do this better I am open to ideas. Thanks everybody.
Note:
    I failed and am retaking my college linux class for good reason. I am not a genius on this system and I fail to grasp certain concepts. Therefore I'd really appreciate simple steps, maybe some definitions of things as you go along, and I'm sorry if I have to ask dumb questions. Thanks you.
Answer: I installed, or at least tried to install Wine on my chromebook and it just wouldn't work.  It appears the chrome flavor of linux is bastardized to not comply with wine, and I suspect this limitation was intentional on the part of Google, but I admit that is speculation.
Comment: Thanks for your answer, although I'm fairly certain the Chromebook isn't the problem exactly, since Wine works on Windows .exe files on my Chromebooks internal drive. I think it's just difficult to get Wine to work with a flash drive.


How to get rid of the redundant "utilize" and "use"

Question: Is there any way to restate "Please utilize for productive use" without the redundant utilize and use?
Comment: "Please make good use of ..."  It seems to me the sentence is triply redundant since "to be productive" already implies the effective *use* of something.  Unless this is just an exercise, of course.
Comment: This depends on the context. Does it mean "Please utilize for productive use only"? Are there unproductive uses?
Answer: I can think of a few alternatives:

Please utilize productively
Please use productively
Please refrain from applications which are not productive
Please refrain from unproductive applications

etc.
Answer: It's not clear in what context the phrase appears, but, "Please utilize for production." is sufficient.
Comment: "Production" and "productive", while related, are not directly synonymous, and "productive use" carries connotations that the noun simply doesn't have..
Comment: That is why I prefaced the answer with "context." It seemed like the kind of statement that would be posted at a factory. It is, indeed, redundant. If someone is "utilizing" something, then they are making use of it. If they are making use of it than it is presumed they are using it for some kind of productive activity. If the statement has some purpose other than using item A to produce item B, I apologize for misunderstanding the question.
Comment: Not all uses are productive ones. Example: any game ever.


Is there a command-line method to split a multi-page PDF file into single pages?

Question: I have a single PDF file 6 pages long that I want to split into six seperate pdfs (1.pdf, 2.pdf, 3.pdf) such that each file produced represents one page from the input. I would love to be able to do this simple task from the command line.
Comment: A good command-line solution is from [this SE answer](http://stackoverflow.com/a/10509904/208704). You can install ghostscript using [Homebrew](http://brew.sh).
Comment: I've updated this question to differentiate it from https://superuser.com/q/437148/11116
Answer: This can be achieved by using pdfseparate. You can install poppler with homebrew, by brew install poppler. This will also install pdfseparate. To split the PDF document.pdf into into single pages 1.pdf, 2.pdf, etc. use:
pdfseparate document.pdf %d.pdf

Comment: This worked perfectly, but mind that `brew install poppler` downloads the Internet.
Comment: Just installed `poppler` a day ago for being able to convert PDF documents to SVG with [`pdf2svg`](http://www.cityinthesky.co.uk/opensource/pdf2svg/). Didn't notice that `poppler` comes with `pdfseparate` command. Since the accepted answer above (dragging and dropping all PDF pages with preview to desktop) requires me to "click around" and since I like solutions on terminal that work automagically by just a single command line, `pdfseparate` is exactly what I need. Thanks a lot for that hint!
Comment: Interestingly, pdfseparate produces pdfs whose total size is much much larger than the size of the original pdf. I had a 400 pages document with 1.9 MB. After splitting, I got something around 60 MB.
Comment: `gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=document-compressed.pdf document.pdf` both _before_ and _after_ splitting (i.e., then replace `document.pdf` by `1.pdf`, etc) helps to decrease the size (see also [Rastapopoulos's comment](https://superuser.com/questions/1321515/splitting-pdf-files-using-pdfseparate-poppler)). Also it is expected to be bigger if some resources are shared among the pages, such as font inclusions.
Comment: Just tested Konstantin's comment and he's right. Sizes from pdfseparate were ~9x bigger than those produced from just dragging pages out using preview.app
Comment: Not sure if this is due to an update since the earlier comments, but I just split a 13 page PDF of scanned documents (created from an iPhone using Preview's Scan function) and the individual filesizes add up exactly to the original 13 page PDF as you would hope.
Comment: `brew install poppler` is really too big just for doing a very simple job! Seems like it downloads and installs the whole Internet!
Answer: Open up the pdf in preview and then on the view menu select thumbnails. Ctrl select the pages that you want now drag and drop them to the desktop.
Comment: This worked well.  Took me about 30 seconds to do this after flailing about for around 30 minutes.  Some people are using this technique in conjunction w/ Automator but I haven't tried it yet.
Answer: If you're interested in doing this from the command line, you can look at Benjamin Han's splitPDF python script to do the job. For instance:
splitPDF.py in.pdf 3 5

would split the file in.pdf into 3 files, splitting at pages 3 and 5.
Comment: something like `python splitPDF.py MyPDF.pdf $(seq -s ' ' 1 10 411)` worked for me
Comment: Words great. I confirm this works directly on MacOS 10.13.3
Comment: This is good, and a bit more flexible in what you can output than pdfseparate above. Though it is mainly for splitting a pdf into chucks of pages, if you did want to split each page, you could easily use `seq` to produce a range of numbers in your command. Thanks!
Answer: In ubuntu you'll need to install pdftk:
sudo apt update; sudo apt install pdftk

Then to have your problem solved, just:
pdftk input.pdf burst

Comment: As of 8/16/2023, this should be the accepted answer. With Nix, it even work without installing pdftk: `nix-shell -p pdftk --run 'pdftk multi_page.pdf burst'` (on Mac too).
Answer: If you want to extract a range of pages, you can use the following script which you call like this (assumed that you save it to file pdfextract.py somewhere on your system's PATH, e.g. /usr/local/bin, and assign it execution permission with chmod 744 pdfextract.py):
pdfextract.py --file-in /path/to/large/pdf --file-out /path/to/new/pdf --start  --stop
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import argparse
import os
import subprocess as sp

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--file-in', required=True, type=str, dest='file_in')
    parser.add_argument('--file-out', required=True, type=str, dest='file_out')
    parser.add_argument('--start', required=True, type=int, dest='start', default=-1)
    parser.add_argument('--stop', required=True, type=int, dest='stop', default=-1)

    args = parser.parse_args()
    assert os.path.isfile(args.file_in)
    assert not os.path.isfile(args.file_out)

    # remove temporary files
    for el in os.listdir('/tmp'):
        if os.path.isfile(os.path.join('/tmp', el)) and el[:12] == 'pdfseparate-':
            os.remove(os.path.join('/tmp', el))

    sp.check_call('pdfseparate -f {:d} -l {:d} {:s} /tmp/pdfseparate-%d.pdf'.format(args.start, args.stop, args.file_in), shell=True)

    cmd_unite = 'pdfunite '
    for i in range(args.start, args.stop + 1):
        cmd_unite += '/tmp/pdfseparate-{:d}.pdf '.format(i)
    cmd_unite += args.file_out
    sp.check_call(cmd_unite, shell=True)

    # remove temporary files
    for el in os.listdir('/tmp'):
        if os.path.isfile(os.path.join('/tmp', el)) and el[:12] == 'pdfseparate-':
            os.remove(os.path.join('/tmp', el))

if __name__ == "__main__":
    main()

Answer: I have started to put together a tool to provide a simplified interface to common actions.
You can split PDFs into individual pages like this:
$ npm install @lancejpollard/act -g
$ act split my.pdf -o outputDirectory

If nothing else check out the source and see how to write your own script to do this in JavaScript.
Answer: A simple Node.js script to achieve this (requires Node.js to be installed):
# Customise this:
export PDFPATH=/path/to/input.pdf

npm install pdf-lib &&
cat << 'EOF' | node --input-type=module - "$PDFPATH"
import { readFile, writeFile } from 'fs/promises';
import { PDFDocument } from 'pdf-lib';

const pdfPath = process.argv[2];
const sourceDoc = await PDFDocument.load(await readFile(pdfPath))

for (let i = 0; i < sourceDoc.getPages().length; i++) {
  const outDoc = await PDFDocument.create()
  outDoc.addPage((await outDoc.copyPages(sourceDoc, [i]))[0])
  await writeFile(`${pdfPath}-${i}.pdf`, await outDoc.save());
}
EOF

NOTE: the script will create a node_modules directory in your CWD and install the pdf-lib dependency there.
Answer: For another alternative, see this answer. This uses the ImageMagick command line tools.
convert x.pdf -quality 100 -density 300x300 x-%04d.pdf

However, you have to be careful with the quality.
Comment: Because there are quality and density options, it sounds like this renders each page to an image. I think people here would prefer the option which preserves the original PDF data which might include text/fonts/vector graphics.


First point of difference rule 1,6-dimethylcyclohex-1-ene

Question:
According to the first point of difference rule, second one should be correct right?
Comment: Please note that the 'lowest sum rule' that is mentioned in the picture does not exist. See also: https://chemistry.stackexchange.com/a/28009/7951
Comment: The name on the right is incorrect because it gives the locant 2 to the first substituent, whereas the one on the left gives locant 1 to the first substituent.
Answer: First of all, the 'lowest sum rule' mentioned in the picture in the question does not exist in IUPAC nomenclature.
As already explained in a related answer, the most important simplified criteria for the numbering in such cases are:

lower locants for the principal characteristic group that is expressed as suffix
lower locants for multiple bonds
lower locants for prefixes
lower locants for substituents cited first as a prefix in the name

The corresponding actual wording in the current version of Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book) reads as follows:

P-14.4 NUMBERING
When several structural features appear in cyclic and acyclic compounds, low locants are assigned to them in the following decreasing order of seniority:
(…)
(c) principal characteristic groups and free valences (suffixes);
(…)
(e) saturation/unsaturation:
  (i) low locants are given to hydro/dehydro prefixes (…) and 'ene' and 'yne' endings;
  (ii) low locants are given first to multiple bonds as a set and then to double bonds (…);
(f) detachable alphabetized prefixes, all considered together in a series of increasing numerical order;
(g) lowest locants for the substituent cited first as a prefix in the name;
(…)

The compound that is given in the question doesn't have any principal characteristic group that could be expressed as a suffix. Therefore, Rule (c) is not relevant in this case.
Thus, a low locant is assgined first to the double bond according to Rule (e). Therefore, the name of the parent structure without any further substituents is cyclohex-1-ene. (Without further substituents, however, the locant '1' would be omitted.)
Finally, low locants are assigned to the remaining substituents as a set according to Rule (f).

P-14.3.5 Lowest set of locants
The lowest set of locants is defined as the set that, when compared term by term with other locant sets, each cited in order of increasing value, has the lowest term at the first point of difference; for example, the locant set '2,3,5,8' is lower than '3,4,6,8' and '2,4,5,7'.

Thus, the correct name is 1,6-dimethylcyclohex-1-ene rather than 2,3-dimethylcyclohex-1-ene since the locant set '1,6' is lower than '2,3'.
Comment: @ Loong +1 for elaboration.In several of your posts ,you have quoted Blue Book .Would it be possible to obtain pdf for the same.If possible a link would help.
Answer: The highest priority is double bond for this compound. And then consider to give lowest sum for substituents on double bond. Here is only one substituent present on double bond (methyl group), hence it should get the lowest number. Therefore, 1,6-dimethylcyclohex-1-ene is the correct name (1,6-dimethyl-1-cyclohexene is also correct). In either way, note that there should not have a space between 1,6-dimethyl- and cyclohex-1-ene.
Answer: No, the right one is incorrect as the numbering starts at the double bond, it is suppose to start at the first substituent.


Wolfenstein: New Order Uber Hero Trophy - can I start from Chapter Select?

Question: I'm going for Platinum in Wolfenstein: The New Order. All that's left is the Uber Hero trophy (beat the game on Uber). Can I start my run through the chapter select menu, thereby keeping all the upgrades I've already earned?
Comment: I know I shouldn't be doing this but the game you were looking for in the deleted question is Subterfuge. Enjoy.
Comment: hahaha much appreciated!!
Answer: To get the achievement/trophy for completing the game on Uber, all you need to do is select the last chapter (Chapter 16) from any of the two timelines and go through it. Both this achievement and Super hero achievement will unlock simultaneously (assuming you completed the campaign on normal or a lesser difficulty).
You will also keep all the upgrades you've earned so far.
I have also gained both achievements by using the chapter select.
Here is a rough guide for the boss fight


90 days in the US under the VWP - is it possible to leave after say 60 days for 2 weeks and then return for a week

Question: I am travelling to the states on a UK passport and I intend on being there for under 90 days. Then Leave and come back for the remainder of the 90 days. Is this possible ? Is it ok to be out of the states for only 2 weeks and then return ?  I have a course I need to attend in July and then a friends wedding in October. Thanks for helping
Answer: Yes, it's fine. If you travel back to the UK, in fact, or anywhere other than Canada, Mexico, or the Caribbean, your subsequent visit should be on a new 90-day period, so you could be in the US for 60 days, in the UK for two weeks, and then in the US for 30 days or even 45 or 60.
If you travel for a short time to an adjacent country, however, your subsequent stay would need to be within your initial 90-day period. For example, if you spend 60 days in the US and then go to Canada for 15 days, you'll only be able to stay in the US for 15 days after you return.
The other thing you'd need to be careful of is border officers deciding that you're trying to use the visa waiver program to live in the US.  If you spend a lot of time in the US with short trips to other countries, you can expect the questioning your receive on entry to the US to become more probing and more skeptical.  If your second trip to the US is a short one for a wedding, this is unlikely to be a problem, particularly if you can prove your itinerary.


How to partition an Oracle table with 65 million rows?

Question: The table that needs partitioning contains a list of Components and their Values.
So one table is tblComponents.  Another is tblFields.  Then this table, tblValues, contains the values of the Components/Fields, so it has a Component foreign key as well as a Field foreign key.  Right now this tblValues table contains 68,000,000 values.  Components table contains ~80,000 rows.  Each component has around 500-800 fields of inventory.
I was thinking about creating a partition by hash on the field id.  As the user will query, they will pick something like.. ."Show me the components where field id 5 = '03530'"  Something along those lines.
Sample queries are below that are common:
select * from tblComponents comp inner join tblValues v on comp.comp_id = v.comp_id
where v.field_id = 55 and dbms_lob.substr(v.value, 2000, 1) like '%brick%'

Also, the values are currently stored as CLOB's and can have numeric values or string values.
Any tips regarding how you would partition or index this would be great, especially for optimizing querying.
Comment: Don't spend a fortune licensing the partitioning option for such a small amount of data. Are you having performance problems?
Answer: Partitioning is a licensable option for the Enterprise Edition.  This makes it expensive.  Unless you already have purchased it this is not the way to go.  And even it you have purchased it, it might not be the right approach.
Why not start with more straightforward tuning?  Obviously you have neglected to provide even cursory information regard data distribution (how many distinct values of FIELD_ID?) or database version, let alone something as useful as an explain plan, so the following are guesses.

"Show me the components where field id 5 = '03530'"

That sort of query would most likely benefit from a compound index on:
tblValues(field_id, comp_id)

dbms_lob.substr(v.value, 2000, 1) like '%brick%'

Is the sort of thing which is bound to suck.  You show those sorts of queries are common.  In which case you need to use Oracle Text.  That is designed for indexing and searching large free text fields.   Find out more.
In your case I think you need a CTXCAT index; in Oracle 11g we can build Composite Domain Indexes which mix CTXCAT indexes with regular columns.  You might get some good results from creating a CTXCAT index on value ad creating sub-indexes on (field_id) and perhaps (field_id, comp_id).  Find out more.


Can I deviate from my fellowship proposal?

Question: I got the prestigious Marie Curie individual fellowship (postdoc). The proposal I wrote is good but I'm not sure if I want to stick to it 100%. What is the expectation for such fellowships in this regard?
Comment: The question about expectations should be answered by the organization behind the fellowship, rather than by strangers on the internet.
Comment: What did the grant officer say when you called them?
Comment: @henning: I will let you know when I do. The grant is still to start in a few months, so it's quite early to ask formally now.
Comment: I cannot answer for your case, but my experience is that fellowships are generally pretty flexible in terms of what you actually do while on them.
Comment: I agree with the comment of @DavidKetcheson and I'd add that the answer will probably depend on how far you want to deviate from the proposal. I can easily imagine the grant agency being much happier with a deviation from set theory to model theory than with a deviation from set theory to differential equations (or to biology, or to archaeology).
Answer: As stated in the comments, it depends of the funding institution (and of the (researchers of the) institution which received you, if distinct from the former), but in my experience, nobody is checking that a research proposal is followed to the letter (at any level), and even less so at the post doctoral level.
The writing of the research proposal itself is an exercise to show that you are able to propose your own research topics: if you were awarded a post doctoral fellowship, you passed the test. Your next step is to publish on you own or at least without your PhD advisor, so that you show independence: it does not really matter if you follow your research proposal (albeit if you wrote it well, that should be the easiest way!) or not, and you should definitely take advantage of any opportunities that you find on your way: you are in the business of doing research, not of implementing research programs!
Answer: US-based research administrator here.  What you are referring to is called "change in scope".  This applies to any type of research agreement. When you want to change the scope, it can invalidate your agreement.  In all cases, fellowship or funded grant or contract, you need to go back to the terms of your agreement and see what is required in the case of a change in scope.  Often it requires prior approval from the sponsor.
In US Federal grants, this case is written into all of the terms of agreement, and is often tied to budget items as well.  E.g., you may be able to rebudget your funds to buy an unexpected piece of equipment, but does it change the scope?  If you had a machine and it failed and you need to replace it, that is different than you suddenly deciding to buy equipment to follow a new line of research that you hadn't proposed.  The approval in this case isn't so much for the rebudget as it is for the change in scope.
While I cannot comment on exactly what your agreement says, I can say unequivocally that the only answer to your question is to examine the contract.  Even in cases where sponsors routinely give out the same award, technically every fellowship, grant, or contract is unique.  They may refer you back to common terms, but your institution's policies may also dictate additional rules that you must follow.  At my institution, I would be looking to see if you are actually working on your PI's science instead and then would need to discuss whether or not that is ok.  The NIH fellowships are very particular about such things, and the NSF fellowships are more silent.  This type of analysis isn't always written into an agreement, but it is a basic principle of allocation methodology in research administration.  Find your local research administrator for help--they should be trained to do this work on your behalf.  If you do not know who that is, check in at your department's staff and ask them.  They should be responsible for helping you understand what is allowable, allocable, and reasonable.
As for someone checking in on you -- you have to report back in your progress reports.  What I always say to my PIs when they ask questions like this -- Will you be embarrassed to report this in your progress report without having checked in first?


In what situations would I need state management like redux in my e commerce app?

Question: I am new to React and web development generally so please try to understand if the question seems dumb.
So, I am currently making a simple e-commerce app and I was thinking of using state management either using redux or react context.
However, I also thought if I have a database, why would I need global state management if I can retrieve the data or sessions I need from the database? For example, if need cart information for the currently logged-in user, I can retrieve it from the database, if I want information related to the order list, I can retrieve it from the database.
I know I am missing something because it doesn't sound right to completely avoid using state management tools but at this point, I just don't know when will I need such state management specifically in e-commerce.
Can you please tell me if there are situations where I would need to use state management?
Answer: In a nutshell, the client app states have little to do with the business data. Of course, some business data might be referred or held by the client's state, but it's contextual. Not mandatory.
When we refer to the client app state, we think about the last page visited, the last button clicked, pre-filled and unsubmitted forms, the number/badge of items in the cart, the number/badge of notifications in the built-in message inbox, etc. It's somewhat a snapshot of the client at a given point in time.
For example, say the user was searching for products, filling the cart and, at some point, it goes afk; the token/session expires. When the user is back, the shop redirects to the login page. Allowing the user to continue with his/her activity/process from where it was haltered, will take you to "remember" a few things like: the last page, the last search, items in the cart, etc. By doing so, after the login, the app can fetch all this info and lead the user to the precise app state he/she was before going afk.
If you have multiple clients (web, mobile, tablet, smartwatch, etc.) and you want them to share the state, then the state can not be held by the client apps individually; it has to be sent to the server to allow other clients to synch and reproduce the same state. Whether the server persists this data in a database or in memory is an implementation detail.
Another use case is the offline mode. Say one of the clients goes offline due to connectivity issues. By managing the state on the client side, you allow the user to keep "buying" (filling the cart) until the connection is back or stable and the current state can be synced with other clients through the server.
Note that all of this is only relevant when the server (backend) is stateless or we want it to be so. No need to say that server and client states aren't and don't need to be the same. That's another good reason for managing the client app state on the client side, to keep server-side complexity low.


BSOD: 0x7F on XP

Question: The machine in question is a Dell PP22L laptop.  After logging on, the system will act normally, but slowly, for about 5 minutes before going to a BSOD with the following details: (shown by using BlueScreenView)
Answer: The only way to know for sure is to get a kernel dump and use WinDbg.exe to get the stack trace and find out what kernel mode code was involved in the crash. Most likely it is a driver.
To properly diagnose this error you need to configure your machine to create a proper  Kernel Memory Dump (not a mini dump) and make sure your page file is large enough to hold it (physical ram + 1mb).
Once you have a proper dump, you can use the downloadable Debugging Tools for Windows to install WinDbg (pronounced wind-bag by the cool people). Debugging kernel dumps is not for the faint hearted. Here is a guide to get you started.
Answer: From TROUBLESHOOTING WINDOWS STOP MESSAGES:

0x000000F4:
  CRITICAL_OBJECT_TERMINATION
One of the many processes or threads
  crucial to system operation has
  unexpectedly exited or been
  terminated. As a result, the system
  can no longer function. Specific
  causes are many, and often best
  resolved by a careful history of the
  problem and the circumstances of the
  error message. One user, who
  experienced this on return from
  Standby mode on Win XP SP2, found the
  cause was that Windows was installed
  on a slave drive; compare KB
  330100.

If this doesn't help, please supply additional information:

Are there any error messages in the Error Log?
Have you added/replaced any hardware just before this started?
Have you installed any software or drivers just before this started?
You might run Memtest86+ to check the computer memory
Answer: I have had 2 pc's go through my shop in the last 2 weeks with the same bsod.  One had a faulty hp printer driver causing the issue, a quick removal and re-installation of the software and driver resolved it.  The other had some minor partition problems that were resolved by running a 5 stage check disk, the guide is for vista but the steps are the same in xp anyway.
Past that some further internet research had another 2 computers, one fixed his issue by replacing the bios battery (unfortunately not easy on a laptop).  The other resolved the problem by running memtest86+   and discovering a faulty memory module.
Please run some tests and tell us if you find anything.
Good Luck!

BSOD: 0x7F on XP


How can I have a Time field in Dynamics CRM 4.0?

Question: I know nothing about CRM but have been asked to add some fields to a form. One of these is for a time but with no date element. How can I do this?
Answer: CRM does not provide this functionality out of the box.  You'll need to customize it.  I'd add a new DateTime attribute and a new Text attribute.  capture the data you need in the DateTime attribute so you can report off of it.  Then using Javascript, display only the time portion from the DateTime attribute in the Text field.
-Mikeyb
Answer: I would add a datetime field with a format of date and time. On form load, you can add javascript to populate the date part with a constant value then hide it so that it only shows the time part.


Does the number of records have any impact on performance

Question: does the number of records from a db affect the speed of select queries?
i mean if a db has 50 records and another one has 5 million records, will the selects from the 2nd one be slower? assuming i have all the indexes in the right place
Answer: Yes, but it doesn't have to be a large penalty.
At the most basic level an index is a b-tree.  Performance is somewhat correlated to the number of levels in the b-tree, so a 5 record database has about 2 levels, a 5 million record database has about 22 levels.  But it's binary, so a 10 million row database has 23 levels, and really, index access times are typically not the problem in performance tuning - the usual problem is tables that aren't indexed properly.
As noted by odedsh, caching is also a large contributor, and small databases will be cached well.  Sqlite stores records in primary key sequence, so picking a primary key that allows records that are commonly used together to be stored together can be a big benefit.
Answer: Yeah it matters for the reasons the others said.
There's other things that can effect the speed of Select statements to, such as how many columns you're grabbing data from.
I once did some speed tests in a table with over 150 columns, where I needed to grab only  about 40 of the columns, and I needed all 20,000+ records. While the speed differences were very minimal (we're talking 20 to 40 milliseconds), it was actually faster to grab the data from All the columns with a 'SELECT ALL *', rather than going 'Select All Field1, Field2, etc'.
I assume the more records and columns in your table, the greater the speed difference this example will net you, but I never had a need to test it any farther in more extreme cases like 5 million records in a table.
Answer: Yes.
If a table is tiny and the entire db is tiny when you select anything from the table it is very likely that all the data is in memory already and the result can be returned immediately.
If the table is huge but you have an index and you are doing a simple select on the indexed columns then the index can be scanned then the correct blocks can be read from disk and the result returned.
If there is no index that can be used then the db will do a full table scan reading the table block by block looking for matches.
If there is a partial map between the index columns and the select query columns then the db can try to minimize the number of blocks that should be read. And a lot of thought can be placed into properly choosing the indexes structure and type (BITMAP / REGULAR)
And this is just for the most basic SQL that selects from a single table without any calculations.


Does every function whose curve is rectifiable have to be piecewise smooth?

Question: After this question and this, I'd like to know an example of a function $f:\mathbb{R}\to\mathbb{R}$ which is not smooth in any open interval in its domain, but $(x,f(x))$ being a rectifiable curve in any open interval in its domain.
Comment: I request you to kindly provide an example for such a function rather than merely saying that it could be like this or that.
Comment: Your second link goes to an error page.
Comment: I added what might be an example to my answer, but you may not be too thrilled with it (I'm not) since it fails to be everywhere continuous.
Comment: @Rahul : yes I know, and have raised a request about it on meta here : http://meta.math.stackexchange.com/q/2984/2987
Comment: In my second link it has been stated that : "A function with a rectifiable curve has to be continuous everywhere and has to be differentiable almost everywhere". I have re-stated this here for your reference as the second link is not opening.
Comment: @all : I had asked this question keeping in mind the definition of a rectifiable curve includes requirement of continuity, as is stated in my second link by Robert Israel. Unfortunately the second link was not opening at the time this question was answered by Mike. Mike had provided an example of a function which is not continuous. Although I had learned from this example that such rectifiable function albeit discontinuous, exist. But my primary interest in this question is to find continuous functions, Hence please suggest what to do with this question and answer.
Comment: @all : and wikipedia definition does not include continuity, hence if i want to find examples that are continuous should I post it as a seperate question by explicitly mentioning the condition of continuity ?
Answer: If $f$ is increasing (ie $x < y \Rightarrow f(x) < f(y)$) then $f$ is rectifiable on any open interval of its domain. Such a function needs to be differentiable almost everywhere, but I think they can still be nasty enough for differentiality to fail on, say, the rationals.
Added. Here's an idea that might work: enumerate the rationals as $q_1,q_2,\ldots$. Define $f(q_n) = 1/2^n$ and $f(x) = 0$ for $x \notin \mathbb{Q}$. Hopefully the convergence of the geometric series will make $f$ bounded variation. However, $f$ is discontinuous (hence nondifferentiable) at exactly the rationals.
Comment: Also, if we do not require continuity (e.g. if we just ask that the graph over any compact interval has finite one-dimensional Hausdorff measure), then the function doesn't have to be continuous or differentiable anywhere. For example, consider the map on the unit interval that takes the rationals to one and the irrationals to zero.
Comment: thank you for the answer, but i need an example.
Comment: In my second link it is mentioned that a function with rectifiable curve has to be continuous. For some reason the second link is not opening.
Comment: Indeed, usually "rectifiable curve" includes the condition that the curve be continuous.
Answer: To expand on the answer by Mike, and make a function that is continuous, consider the following.
1) An increasing function that is discontinuous on a dense set.
At first it may be difficult to imagine that, but actually with the right point of view it is quite easy if you know a little bit of topology. (That's the motivation, it is not necessary for the answer below.) Take the standard "middle thirds" Cantor set C, which is a subset of the closed unit interval I=[0,1]. Let us collapse each of the complementary intervals (i.e. the intervals of $I\setminus C$), including the endpoints, to a point. Then we get a compact topological (even metric) space which, upon some thought, has to be homeomorphic and order-isomorphic to the interval I. So we have a projection map $p:I\to I$, and we can define an "inverse" $q:I\to I$ of this map, which is uniquely defined except on the countably many points that correspond to collapsed intervals. For each of these, we can e.g. choose the image to be the mid-point of the collapsed interval. Then this map is increasing (since p is order-preserving), and of course it is discontinuous at a countable dense set of points.
We can do this explicitly, without any reference to topology, as follows. Define $q:I\to I$ as follows. If $x\in I$ is a dyadic rational, i.e. $x$ is an integer multiple of $1/2^n$ for some $n$, then we set $q(x) := x$. Otherwise, $x$ has a unique dyadic expansion, that is,
   $$ x = \sum_{i=1}^{\infty} \frac{s_i}{2^i}, $$
where $s_i\in \{0,1\}$. In this case, we define
   $$q(x) := \sum_{i=1}^{\infty} \frac{2s_i}{3^i}. $$
It is easy to see that this map is increasing, and it is clearly discontinuous at dyadic rationals.
Remark. For the purpose of the proof, it might be easier to choose a convention for the expansion of dyadic rationals, and use the same definition for all $x$. But somehow it seems more elegant and natural to use the midpoint of the interval.
2) An increasing and continuous function whose graph is rectifiable but whose set of points of non-differentiability is dense:
Just integrate the function $q$ given above; i.e., define
$$ Q(x) := \int_0^x q(t)dt.$$
This function is continuous by definition, but it is not differentiable at dyadic rationals (the left- and right-sided derivatives exist, but do not agree).
I hope this helps!
Comment: Nice work! A slightly less-involved way to get a function of type 1) might be to just enumerate a dense subset $(d_i)_{i=1}^\infty$ of $[0,1]$ and then define $q(x) = \sum_{d_i \leq x} 2^{-i}$.
Comment: Good point - I still quite like the geometric interpretation using the Cantor set, but your suggestion makes for an easier proof.


Which is better for tax saving purposes whilst in a contract that is inside IR35: a limited company, or an umbrella?

Question: I am about to take a job that is inside IR35. I have been trading via a limited company and all my contracts have been outside IR35 for the past 12 years.
I'm half way through my tax year and I would like to know if it would be better to bill via my limited company and my accountant calculates my PAYE for me and the limited pays me. Or, going through an umbrella company and leaving my limited company open for trade and possibly working a second contract that is still outside IR35.
I'm confused and the recruiter is telling me that if I go through my limited company, I will pay tax twice, once when the company that is inside IR35 and a second time when my limited company pays me.
Thank you.
Answer: Get yourself a tax adviser who knows what they are doing. Or better, do whatever you can to get a position outside IR35. This will mess up all your tax planning.


Would like to change a 230 Volt 12/2 into 2 each 115 Volt separate plug lines without having to run another 12/3 from panel?

Question: Would like to use an existing 12/2 line from a now defunct water heater running 230 Volt to this junction box. Would like to change or split this 230 Volt 12/2 into 2 each 12/3 lines to run 2 separate 115 Volt plugs.  How do we do that without having to run another new 12/3 line from the panel?
Comment: 12/2 or 12/3 sounds like cable and not separate wires in a conduit.  12/2 is only good for one 115(it is now a standard 120v) circuit, hot and neutral.  You need a 12/3 from the panel to make a MWBC circuit, or two 12/2 for two 120v circuits.  The hot water heater used the white wire as a second hot to have 240v plus the ground.
Comment: Please read and edit your question so it is clearer what you want to do.   You wrote that you want to "split" a 12/2 into "2 each 12/3", without running any new wire.  You must mean something else.  You obviously can't magically turn 2 wires into 6 without running new wire.
Comment: Trying to guess and interpret .... if what you want is 120V rated for more than 20A, you need to run new cable.
Comment: _If_ you have 2 hots, neutral and ground at the water heater, you're good to go with some additional work at the panel. If you only have 2 hots & ground, then no, you can't do this. We need more details. If you're not sure what you have, _turn the breaker off_, then open up the outlet & pull it out _without removing any wires_ and take a pic, then [edit] the pic into your question. Loads of people here will be able to interpret it for you.
Comment: As the old saying goes: "You can't get there from here".   All you can do without running a new cable from the panel is ONE as in ONE (1) 120 volt circuit.  You'd need to re-wire the cable in the panel to a new, single pole breaker and connect the white wire to the neutral bus, removing any code tape in the process. There are dangerous and not code legal ways of doing it, but I'm certainly not going to say what they are....but believe me, they are dangerous.  + to @crip659 for his comment.
Comment: If you wanted to do it unsafely and as dangerous as possible then you would use the black and white as hots going to different breakers on the panel and the ground wire as a neutral+ground.
Comment: It appears that you've now created two accounts. Please follow the [instructions here](https://diy.stackexchange.com/help/merging-accounts) to get the accounts merged.
Answer: You don't.
There is no safe way to get two 120V circuits from 12/2 cable, unless you are willing to install a transformer and a panel.
What you can do is get a single 120V/20A circuit out of it, by moving the white wire to the neutral bar and installing any number of NEMA 5-15 or 5-20 receptacles. (you can keep using the same breaker).  That will carry a fair amount of load, though not quite as much as you'd hope for.
Comment: This is, of course, assuming that OP really has a 20A 12/2 and not a 30A 10/2 (not realizing it is 10 AWG) or a 30A 12/2 (which should never be, but...)
Comment: Emphasis on no _legal_ and **SAFE** way to do this. Ungrounded circuits were outlawed in the US in, what.. the early 1970's?
Answer: Your question has some confusing details, but I will try to answer what you are likely asking.
Most likely you have 240v being fed by 12/2 (or 10/2) cable, if done properly the white should be re-identified (marker,paint,taped) and connected in the panel as a hot.
You can't practically get two dedicated 120v circuits from 12/2 (or 10/2) cable because you would need 4 wires, which are two hots fed from opposite legs in the panel, one neutral, and the ground. What you have is two opposing hot legs, a ground, and no neutral conductor.
If your cable is black/white/bare then if you can remove the re-identification from the white, re-terminate the white wire in the panel to the neutral bar, and then could run multiple receptacles on the same single 120v pole of a 15 or 20 amp breaker.
It is a little odd to have 12/2 feeding a water heater, a majority of water heaters are fed by a 30A circuit with 10/2. If this is the case you could (somewhat impractically) re-terminate the white as above, mount a small electrical panel (or fused disconnect) and feed both legs of the panel with the same hot and feed two 120v 15A circuits.


Is there an experimental value for the magnetic moment of the Kaons?

Question: I can't find (Google, PDG etc.) an experimental value for the magnetic moment of the Kaons $K^{⁺/-}$. They are u/s mesons so shouldn't there be a non-zero value even if total spin is zero? Lifetime is ~ $10^{-8}$s, good enough to measure magnetic moment in case of the baryons. Is there a particular problem measuring this?
Comment: As you state, no values are recorded in the PDG , which tries to give with errors all measurements in particle physics. IMO it is not only the lifetime that allows or not measurement, but the decay products too.
Answer: Yes, it appears that no one one has made an explicit measurement of the charged kaon magnetic moment as they have for various hyperons. A limit on any $K^-$ magnetic moment could be set using existing kaon exotic atom spectroscopy measurements, but again it seems that no one has bothered to do so.
This lack of interest is presumably because kaons are spin-0 pseudoscalar mesons, so no magnetic moment is expected.
If the $K^-$ did have a magnetic moment, then the spectral lines of kaonic atoms (where a $K^-$ has replaced an electron) would have fine structure, just as regular atoms have fine structure lines corresponding to whether the electron and proton magnetic moments are parallel or antiparallel.
No one has reported any such fine structure, despite there being many kaonic atom spectroscopy experiments, so there is an implicit limit on any magnetic moment that could be made explicit if somebody wanted to analyze the many published spectra.
There is, however,  one old limit on the $\pi^-$ magnetic moment from pionic atomic spectroscopy.
Answer:
They are up/strange mesons, so shouldn't there be a non-zero value even if total spin is zero?

No. A spin-zero quantum system is not orientable: it remains unchanged under rotations. A nonzero magnetic dipole moment, on the other hand, cannot remain unchanged under rotations. The kaon can't have a magnetic moment because the kaon field and the magnetic field have different symmetries.
This rule is a consequence of the Wigner-Eckhart theorem. A two-state spinor  field, like an electron, has enough complexity to carry a dipole moment, but not a quadrupole moment. A vector field has enough complexity for a quadrupole  moment, but not an octupole moment. In another answer, I suggest some ways to think of these restrictions.
Comment: Rob, I realize I have never had the Wigner-Eckhart theorem's implications for composite systems clear in my head, so I just posted a question asking [When can spinless "particles" have magnetic moments?](https://physics.stackexchange.com/q/737163/145491).
Comment: @David Bailey "Composite systems" is a good point. When I referred to "up/strange" I had constituent quarks on my mind which seem still the best way to describe magnetic moments of particles. So I don't know if the given arguments such as the Wigner–Eckart theorem are strictly applicable.
Maybe it is just that conventional magnetic fields can not break the symmetry of $K^+=-\frac{1}{\sqrt{2}}\left(u\uparrow\bar{s}\downarrow-u\downarrow\bar{s}\uparrow\right)$?
Comment: @qatch Yes, that is what I am wondering.


Show notification from list form on list view

Question: I have a custom display/edit form for my list. After the form is submitted and the user is redirected back to list view, I want to show a notification that 'new item has been added' or 'changes were successfully saved'. I was thinking about using the SP.UI.Status or SP.UI.Notify, but not sure how to use that on list view. Perhaps some js web part and a query string parameter to determine if notification should be added?
Answer: You can use Query String Parameter.
Add query string Status=Saved or Status=Update
Now use below JavaScript code
jQuery(document).ready(function(){
    var param = getParameterByName("Saved");

    if(Status == "Saved") {
        SP.UI.Notify.addNotification("new item has been added", false);
    }
    else if(Status == "Update") {
        SP.UI.Notify.addNotification("changes were successfully saved", false);
    }
});

function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
        results = regex.exec(location.search);
    return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}


Can't login to account on guest or standard

Question: Using Ubuntu 12.04
Up until recently my mother has been using the Guest Session when she logs on; now, the Guest Session will not log in. When I try to log in to it, it bounces me back to the login screen.
I then tried to log in on a Standard account (Alberta) which I made prior to not being able to login to Guest, and it turns out I cannot log in there either - it gives the "Invalid Password" error.
So then I tried to change her password from my own account (Rory) which is the master account. Under the Login Options where the Password option is, it says "Account disabled" and it will not let me change this; I try to apply a password, get no error, but it just still says "Account disabled".
Then I tried to delete the Alberta account altogether, but got this error:
Answer: To unlock the the user account, run the command below from a Terminal, from your own account:
sudo passwd -u <username>

(Altrough it seems that your system has bigger problems, like cannot read /etc/shadow etc.)


conversion of htm file into a ppt file

Question: I need to convert a .htm file to a power point presentation(ppt) using Apache POI. But later on I realized that Apache POI can only convert raw data into a ppt. For that we have to extract the data from the htm file and correspondingly enter it to the ppt file. Can we automate that using Apache POI? so that is there any other option to convert htm file to an ppt file? please guide me.thnks in advance.
Answer: Another option for what you want to accomplish is pandoc, which can convert from HTML or Markdown (among other things) to a huge variety of formats. If I recall correctly, it does not support Powerpoint, but it supports many other presentation formats, including HTML5 and PDF slides.
Answer: Since you mention POI, I assume you're interested in doing this in Java.
docx4j uses xhtmlrenderer (Flying Saucer) to convert XHTML to docx, so you could also use it to convert XHTML to pptx (in conjunction with either POI or docx4j).
But writing such a converter is not a job for the faint hearted.
Another possible approach would be to use OpenOffice/LibreOffice, but on a quick look, that works better for importing HTML into documents. See also help.libreoffice.org/Impress/Importing_HTML_Pages_Into_Presentations

conversion of htm file into a ppt file