What is the AdS dual of a CFT vertex operator?

Question: I am wondering about the space-time dual of a CFT vertex operator in the context of AdS3/CFT2-correspondence. In particular, a boundary CFT2 with vertex insertion should be dual to some AdS3-space, possibly with excitations propagating through it. Does a precise description of these AdS3-spaces exist?
Comment: Vertex operators are features of CFT in 2 dimensions. Is your question specifically about 3d gravity in AdS space, then? A quick googling returned for instance [this paper](https://arxiv.org/abs/hep-th/0008253), maybe you can find answers there?
Comment: My question is indeed specifically about AdS3/CFT2, thank you for pointing that out. The paper you link to describes a relation between AdS3 and LFT. Do you know if this LFT is the CFT that is dual to AdS3, or is this a particular limit of the full CFT?
Answer: The "duality" between $AdS_3$ gravity and Liouville theory goes back to the brilliant work of Brown and Henneaux which predates AdS / CFT. By https://arxiv.org/abs/hep-th/9910013 this idea had become quite well developed. It unifies an impressive range of research directions by using the Chern-Simons formulation of $AdS_3$ gravity to argue for a WZW model on the boundary. Then the imposition of extra boundary conditions results in a gauge fixing of this WZW known as Drinfeld Sokolov reduction. However, it's important to remember that this is all still semi-classical. At minimum, the exact dual would need to depend on the full $AdS_3 \times M_7$ background which provides a UV completion.
So Liouville theory is only an approximation to holographic duals in two dimensions. Recently, https://arxiv.org/abs/1912.00222 provided an explanation for its universality. If you want to use this, you are necessarily describing heavy operators. And then it doesn't look like vertex operators will have a special property anymore. Most heavy operators will just be dual to black hole microstates.
There could be something interesting about holographic theories with light vertex operators but finding an example might be hard. First, the theory needs to have free fields otherwise what is meant by "vertex operator"? Second, it needs to have many free fields because a weakly coupled gravity dual only occurs for large central charge. The symmetric orbifold theory is something like this which gets discussed in the AdS / CFT context. But the dual of string theory on $AdS_3 \times S^3 \times K3$ is actually not this theory but something more strongly coupled which lives on the same moduli space.
Comment: Pure gravity is where Brown and Henneaux's $c = \frac{3L}{2G}$ formula was first derived. If it exists as a quantum theory (which I'm still not convinced of) its dual needs to have a huge gap with no primary operators for the reason you mention. The first would be at weight $\frac{c}{12}$ and correspond to the massless BTZ black hole. Recent modular bootstrap work seems to indicate that this constraint rules out a dual which is a single CFT and forces us to expand our search into ensembles of CFTs.
Comment: This is a really useful and extremely illuminating answer. Thanks a lot for sharing this with us!  A little question about your last paragraph. What about just pure gravity in $AdS_{3}$? Your argument that a macroscopic gravity dual only exists at large central charge seems to be correct, but how can it be that that pure gravity in $AdS_{3}$ has a dual when by definition there are no other bulk fields, apart from the metric?
Comment: Awesome! I've taken the existence for a CFT dual to pure gravity in this context (and its completeness) for guaranteed. Thanks again for your kind answer.
Comment: Thank you for your answer, this clarifies it a lot.


Dynamic Voltage controlled Capacitor

Question: I need a sinusoidal varying capacitor to test a differential capacitance circuit. I will use the circuit to test MEMS gyroscope/accelerometer capacitance change. But right now I do not have the gyroscope/accelerometer prototype. Is there any available chip or method by which capacitance can be change by varying the input voltage by function generator.
Comment: For relatively small capacitance values, a varactor diode does the job.
Comment: @PeterSmith But the capacitance is not directly proportional to applied voltage in the varactor diode. A linear relation is needed between voltage and capacitance to do this job.
Comment: A MOSFET perhaps. It wont be linear though.
Comment: Then you'll have to find a way to precompensate the control voltage so that the capacitance varies linearly. Given that you probably only need frequencies up to the tens of kHz, I would use a microcontroller running a DDS algorithm to generate the frequency, followed by a waveform lookup, followed by a linearization lookup, followed by a DAC that drives the varactor.
Answer: This is what a varactor diode does.  The width of the depletion layer changes with applied reverse voltage.  This changes the capacitance seen by small signal relative to the DC offset.
Such diodes used to be popular for fine-tuning radio receivers, the resonance of crystal oscillators, etc.
Answer: If the bias voltage change won't bleed through too much you can use a varactor or indeed any reverse-biased diode. It's preferable to use two varactors back-to-back so that nonlinearities cancel out to a first order (for the signal, not the bias).
If you need very small or very large capacitance you may have to use a part that is not designed as a varactor.
You might want to consider a motor driving an air dielectric capacitor. Keep the separation constant and change the overlap between the plates like an old-school tuning capacitor. Keeping it sinusoidal would be an interesting field solver project.

Dynamic Voltage controlled Capacitor


Extract list of outstanding changes from Vim swap file

Question: I end up with swap files from crashed Vim sessions (typically ssh session timeouts) often enough, and I'm wondering if there is a way to determine exactly what changes are describe by the swap file. (I can remember what I was working on, but I don't always know how far I got.)
I know that I can save the original to a different name and launch Vim again, with the "recover" option, and then save the result, and compare it to the original to find any changes which didn't get saved before. Is there a way to generate that list of changes without actually modifying the file in question?
(I found this question, Examine swap file, and there is a program given in one of the answers there, but it only prints out basic summary information, not the details about changes.)
Answer: I recommend you the recover plugin that add a diff function between the current file on disk and the underlying swap content.


Are questions on copyright on topic?

Question: I was going to ask about using an excerpt from a classical piece that was not in public domain in a song was on topic. In more detail, my question was going to be about how much I would have to change in order to steer clear from a copyright claim if that would be a problem. I don't know if that would fit in this community, so if it doesn't, could I be directed to where I could ask this question and have it be on topic?
Comment: It's worth noting that the world of music copyright has been in transition the last few years, with some record labels blocking the use of even just tiny fragments of their music in educational YouTube videos, and also a lot of controversy about a few recent court cases in the USA where songwriters have been convicted of plagiarizing songs that are only vaguely similar to their work. See e.g; https://www.youtube.com/watch?v=0ytoUuO-qvg
Comment: @YourUncleBob And at a frightening pace, too. Lately, seems all the music educators have said something on this lawsuit or that one, and from what I can tell, there seems to be a surge in copyright disputes recently. Good point.
Answer: Unfortunately, legal questions are off-topic on this site in general as stated in the FAQ. The reason is that it's typically out of the knowledge domain of a typical musician and even if one knows their local copyright laws, they may vary depending on where exactly you live.
The Law SE may cater to these types of questions and already seem to have a trove of music related copyright questions.

Are questions on copyright on topic?


Does increased neural complexity slows down brain operation speeds?

Question: If a sensory input is perceived, one needs to process this input from the sensory end organ (sensation) up to the brain (perception). Does a more more complex neural network consume more time than a simple one? For example, does a house fly process visual images faster than a human being?
Answer: Short answer
Increasing neural complexity only increases processing times when neurons are serially linked together.
Background
Neuronal conductance of action potentials takes time, as neuronal signals travel at a speed of 0.5 to 150 m/s through the axon (Purves et al., 2001). Furthermore, synaptic transmission between neurons takes time. A chemical synaptic transmission takes approximately 0.5 ms (Katz & Miledi, 1965). As a consequence, stringing neurons together increases processing time.
For example, if we look at the pain response, the reflex arc is very short, covering as little as two synapses (Fig. 1). The moment you touch a hot pan, you pretty much instantly draw away your hand. This process precedes even before you become consciously aware of the fact you touched something painful. This is because conscious awareness happens in the brain, involving a longer distance to be covered from your finger, and because it involves many more synapses including the brainstem, lower cortical areas and higher cortical areas (Fig. 2).
Processing time does not necessarily have to increase when processing complexity is increased, as long as the processing takes place in parallel. For example, multiple visual pathways in the human brain run in parallel, for example the 'what' and 'where' processing in the brain in the ventral and dorsal streams (Van Polanen & Davare, 2016), as depicted in Fig. 3.

Fig. 1. Pain reflex arc. source: Owlcation

Fig. 2. Conscious pain pathway. source: neuwritewest

Fig. 3. Parallel processing of 'what' and 'where' information in the visual system. source: Brainscape
References
- Katz & Miledi, J Physiol (1965); 181(3): 656–70
- Purves et al. (eds), Neuroscience, 2nd ed. Sunderland (MA): Sinauer Associates
- Van Polanen & Davare, Neuropsychologia (2015); 79: 186–91


Which of the TLS/SSL and IPsec protocols is effective?

Question: Which of those two protocols is the most effective for sending data from a client to a server on a local network (knowing that I aim to use it for FTP traffic)?
Comment: My grammar is litlle bad. I'm so sorry!
Answer: Both will do what you need effectively.
Whether you need to use one over the other depends on your use case. From what you have described, as long as there aren't other requirements, I'd go with TLS, as it requires very little additional work on most network architectures.
IPSec is just a little more convoluted to set up - but it does provide additional security options.
Comment: I'm making FTP server and I send my data to the FTP server. I have dilemma. By the way, please don't use complex sentence, write simple sentence, because I cannot catch your mind clearly.
Comment: summary - use TLS in this case :-)
Answer: Both are effective.
I feel it depends on how nicely you configure your protocols.
The Better you configure the better security you get.
example: better algos (example hmac_md5 in place of md5), public -key-cryptosystems etc
Like choosing main mode in ipsec in place of aggressive mode for more security etc.
Choosing Certificates in place of preshared key etc
It also depends on the use case.
On local TLS/ssl as ipsec has more options .
Answer: First, quit using FTP entirely.
The most common choice is to use SFTP instead

Disable weak cipher suites like ones using RC4.
There are other hardening steps you can take as well.

The next common choice is to use FTPS instead.

Disable weak cipher suites like ones using RC4.
There are other hardening steps you can take as well.

If you would like, you can ALSO use OpenVPN or another TLS based VPN, or an IPSec VPN, as an additional layer.

Properly configured, IPSec and OpenVPN are equally effective

Use good, modern cipher suites
Use certificates whenever possible, rather than password based authentication

You can also encrypt the files themselves.
More layers helps

VPN first
secure file transmission second
encrypted files third.
Comment: What's wrong with FTP over IPSEC?
Comment: @NeilMcGuigan Technically, if there are no flaws or compromises, FTP over IPSec should be fine.  However, any internal audit is going to throw up a huge flag for having FTP, an insecure protocol, even turned on, which has to be explained every time.  Any failure in the firewall configuration opens up the data, usernames, and passwords as well (it's not as uncommon as you might think when people are in a hurry, or Sales/Marketing says "Just get this file transferred right now - I promised it to them by FTP today").  Lastly, there's no reason to use FTP when SFTP, or even FTPS, is available.
Comment: While I agree SFTP is the much better choice, this doesn't answer the question at all.
Comment: @RoryAlsop - added direct answer.
Answer: FTP over SSL/TLS is usually known as FTPS. The problem with this is that, by default, the initial socket connection is used for control, and a second socket is established for data transfers. This second socket may use a range of port numbers making it more difficult to restrict access and requires close integration between the application and SSL layer (you can't simply point your FTP client at stunnel). Although it's possible to use a single channel (passive mode) enabling this at both ends can pose complications.
This is less of an issue with IPSEC, and, depending on how it is configured, will give lower latency, but you need to disable end point authentication if your connection crosses NAT. IME there is more effort in configuring an ipsec connection, although it has been some time since I did such a thing, hence FTPS might be easier for infrequent transfers.
Really you are comparing apples and oranges here. And we can't say what is more effective without knowing what your criteria for effectiveness are.


Find and replace multiple blank lines

Question: How do I use the find and replace function in notepad to delete multiple blank lines in a text file?
Comment: So only if there's more than one blank line between paragraphs?
Comment: possible duplicate of [How to remove linebreaks in Notepad++?](http://superuser.com/questions/518229/how-to-remove-linebreaks-in-notepad)
Answer: Within notepad there is no way to use the Find and Replace and target blank lines. Consider Notepad++ and the regex search and replace.
You can use \r\n to find blank lines from text files made within Windows, \r for Mac and \n for Linux.
I believe a default install actually comes with TextFX to make your life even easier, it has an option to delete blank lines:
Comment: Sounds to me that the next option, "Delete Surplus Blank Lines" might be what's needed here? (The question asker is not too clear about that, but otherwise the question could read: "How to delete a single blank line, and repeat that multiple times".)
Comment: Good answer, but it might as well be noted that Mac OS X uses `\n` to terminate lines, not `\r` as classic did.
Comment: Notepad++ has Edit→Line Operations→Remove Empty Lines , but it's very slow with a 600k line file.  TextFX "Delete Blank Lines" seems much faster?  But doesn't handle whitespace lines.  Whereas Notepad++'s "Trim Trailing Space" seems faster than TextFX's?
Answer: I think you can't do it in notepad; when I have such a problem, I open the text file with Word (any other word processor should go) and replace two consecutive paagraph marks with one of them. Repeat several times (until there is nothing more to replace) and you're done.
You should replace ^p^p
with ^p
Answer: since the original notepad is a real pita (and everyone else is suggesting their own fav anyway):
vim ftw with:
:g/^\s\+$/d

Answer: There is a AutoHotKey tooltip extension for the purpose.
But, you could also change to Notepad++ and get better control.
Answer: In Notepad++ V7.7.1, in the Edit Tab, in the subgroup "Line Operations" there's the option "Remove Empty Lines".
Answer: 7 Step Excel Solution:
Objective: Filter out all rows with data, leaving only the blank rows and then delete those blank rows.

Copy your text file (Ctrl-A to select all and Ctrl-C will copy it) and paste into MS Excel, cell A1
Highlight all rows with data in it.  (with the cursor in cell A1 press Ctrl-shift-end)
With the data highlighted, click on the Data tab, then click on Filter. (Cell A1 now has a drop    down box on it.)
The first item in the drop down box is "Select All" (uncheck it)
The last item in the drop down box is "Blanks" (check it)
(The worksheet now looks blank, all your data is hidden except for the blank lines in your data.
Look at the row numbers on the left.  The first row in your data with a blank in it is now at the top of your spreadsheet.  Let's say it is line 330.  The next line could skip to say line 775, the next line in your data with a blank and so on.)
Place your cursor in cell A330.  Press Ctrl-Shift-End.  Which will highlight all blank lines in your data.
While keeping the cursor in the highlighted area, Right click and select delete row. (Now would be a good time to go back and put the check mark back in the "Select All" box.)
Comment: Also, the question seems to be asking how to change `line A`, `line B`, `blank line`, `blank line`, `line C`, `line D` to `line A`, `line B`, `blank line`, `line C`, `line D`. Your answer deletes _all_ blank lines, doesn't it?
Comment: Why should one purchase Excel for that purpose?

Find and replace multiple blank lines


Through a C++ program, how to prevent making network connections, accessing/modifying server files?

Question: I have created a web server on amazon cloud EC2 for online compilation and running C++ code. However, I am afraid anyone can access the server files through the C++ program, or can make network socket. Is it possible to execute a program on server in a way that is harmless to the server itself.
Is there a way to block certain commands to be compiled through the GCC-C++ compiler? I have heard of sandboxing through plash (http://plash.beasts.org/index.html), however, this seems to be a very old project not under development.
Answer: Run the code in a separate process, as an user with limited rights.


Which software is best to create banner/billboard?

Question: Which software is best to design a large banner/billboard? I know how to use Photoshop, Illustrator and InDesign CS6, but have never done a project with large designs. Which one is better to use for this project?
Comment: Possible duplicate of [I need to print an image at a certain size. What dimensions and resolution should I use?](https://graphicdesign.stackexchange.com/questions/26354/i-need-to-print-an-image-at-a-certain-size-what-dimensions-and-resolution-shoul)
Comment: Hi. Welcome to GDSE. Any of these could be used.  "Best" is subjective. What kind of graphics does the banner contain?  For example, is it predominantly vector, or raster graphics?
Comment: I would otherwise not reply to this question, but the OP asks for software selection advise, rather than dimensions and resolution. The advice in the answer you link is valuable to jiru00255, of course, even though it does not appear to be software specific.
Comment: This question: https://graphicdesign.stackexchange.com/questions/27594/should-i-design-business-cards-in-indesign-illustrator-or-photoshop/27624#27624 contains a lot of information with regards to the differences between InDesign, Illustrator and Photoshop, albeit in a different context.
Answer: will you be printing this banner/billboard? Your printer resource (person) would likely advise for you to use Illustrator, as the images created will scale nicely without aliasing or artifacts, when properly done.
Answer: First of all, it depends upon what kind of file your billboard company would ask for, I would strongly recommend illustrator as it is a vector graphic software leading your output to be of a good quality.
When you will try to work for such high-resolution files in photoshop it will load your file to be a .psb file that can be a very heavy file and you might face issues with such files, but If you are using images in the billboard designs then I would suggest you to edited the images in photoshop first on a larger scale and then import it to illustrator because an illustrator is a vector graphics software that works on points and the images contains pixels so for images photoshop is the best option and that way the quality of image would remain high.
I would strongly recommend Illustrator as it is the best for print media.
I would not suggest photoshop as when you will try to take a high-resolution file in photoshop for such large dimensions it will be converted to a PSB file and it will be a very large and heavy file making it hard to work with.
Also, when you will work for the same in illustrator the file would be less large and the quality of the vector would be better.


How can I measure runtime memory requirements of an application on windows platform?

Question: How can I measure runtime memory requirements of an application on windows platform?
Answer: Perfmon.exe will monitor the usage of a process.
Run perfmon.exe, right-click Add counters, pick Process for the Performance Object, then choose things like Virtual Bytes, Working Set, and Page File.
Answer: I'll assume you mean memory use at a particular point in time, not how much it could potentially ever need.
You can get the information about how much a process is consuming through the windows API, for example GetProcessMemoryInfo. Windows allocates memory in blocks so it may be more accurate than just checking how much memory or heap space is used.
See more details from MSDN
Answer: "Memory requirements" are not very well defined, in the first place. WHen you start, your executabel will be linked to many DLLs. Together with the first stack, this forms your initial process. Then, your proces might start extra threads, allocate more memory, and/or memory map some files.
Now Wwindows won't give you real RAM for all these needs. Many DLLs are already loaded for other reasons, so you'll share that RAM. Extra RAM for stacks is allocated when you get soft stackoverflows. Memory mapped files get RAM allocated when those pages fault.
So, one of the important questions is what you really want. You have to answer that first.


How to reset GNOME default theme?

Question: I wonder and I needed it sometimes. Some time we install many themes and it gets worst.
Comment: Hey, is this still a problem for you, or did you get it fixed. If it's fixed, then you should accept one of the answers below to draw a line under this question.
Answer: DO NOT

rm -rf ~/.*

You will delete your configurations for every application in your profile, not just the gnome theme settings.
Instead, do:

rm -rf .gnome .gnome2 .gconf .gconfd
  .metacity
Answer: If by default theme, you mean the one that came preinstalled with 10.04 and 10.10, that's called Ambiance, and it can be found in System -> Preferences -> Appearance. The installed themes will be listed here in alphabetical order.
Answer: Assuming you mean the theme that comes with a default install of Ubuntu, go to System->Preferences->Appearance and click on Ambiance (dark theme) or Radiance (light theme).
If you instead want the non-Ubuntu-default theme that GNOME ships by default, click on Clearlooks.
Answer: Use the following commands to change the theme. Ambiance is the default theme as people have mentioned above
<code>gsettings set org.gnome.desktop.wm.preferences theme "Ambiance"
gsettings set org.gnome.desktop.interface gtk-theme "Ambiance"
</code>
Comment: What is the equivalent for Ubuntu 22.10?

How to reset GNOME default theme?


Being punished for things beyond bechira point

Question: According to Rabbi Dessler's idea of a "bechira point", if something is beyond my bechira point and I transgress it, does that mean that I won't be punished for it because it is beyond what I'm currently capable of?
Comment: Great Q, ... I assume part of the formula revolves around how that guy acts with the things that are within his bechira point? :)
Comment: @DavidKenner the idea as far as I understand it is that the "bechira point" is the zone of decisions that you need to make - anything above that is something that is too much for you and anything below is something that you won't even consider (eg. murdering a random person in the street).
Answer: Let me explain my understanding of Qunterus haBechirah by example...
Someone who smoked for the past 20 years will have a very hard time quitting. It is so far from their nequdas habechirah. (Although it is in reach! If anyone reading this is addicted to smoking, don't give up!)
So, Hashem won't judge them for endangering their lives with the next cigarette as He would if I were dumb enough to take my first one.
But why is the person addicted today?
Were they raised by a couple of heavy smokers, so that they never pictured anything else? Well, they are a tinoq shenishba (like a child who was raised by in captivity, who couldn't know any better than the example their captors set). And Hashem makes allowances.
But if they had a moment where they had a real choice whether or not to smoke that first cigarette, then their second... With those puffs, they put on the table the current addiction and the cigarette they are now smoking without even considering on the table. They knew addiction to a dangerous substance was the probable outcome and chose it anyway.
So today's mistake is part of 20 years ago's sin. And any punishment would be for that.
In the reverse, for me, refraining from shoplifting isn't much of a challenge. To me, the challenges related to theft hit when it comes to parts of my income tax form. To a tzadiq, that's easy, the challenge lies on something more refined.
This is why Rabbi Abba says (Yevamos 121b):

הַקָּדוֹשׁ בָּרוּךְ הוּא מְדַקְדֵּק עִם סְבִיבָיו כְּחוּט הַשַּׂעֲרָה

The Holy One is exact with those who surround Him [i.e. when judging tzadiqim] like the [width] of a strand of hair.

Because that is where their challenges lie.
Our current judgement lies in simply one thing: Are we getting close to the Tzelem Elokim we were made to be? Which direction is the nequdas habechirah moving in?
(Being judged on your spiritual "velocity" rather than on where you are was the topic of an answer I wrote yesterday.)
Comment: Thanks - another great answer that gives me more food for thought!  I would think that even someone who chose to start smoking years ago with the knowledge that it was a bad thing to do and now regrets that but finds it difficult to stop wouldn't necessarily be punished for each extra cigarette though as they have now got to the point where they want to do teshuva for that?  I would imagine that these things are quite complicated as well - eg. if someone started smoking as a way to deal with intense stress then they may have some degree of leniency vs someone who did it just to "be cool".
Answer: I don't remember where but I saw that Rav Hutner writes that the  answer is "no" but it makes zero practical difference when it comes to doing Teshuva because no one can know if what they did was really beyond their point of bechira.
The Mishnas Rav Ahron (who doesn't seem to completely agree with  the nekudas hebcahira concept to begin with) says that not doing Teshuva may in itself be the cause of punishment because showing you don't regret the behavior is  showing acceptance of the fact you did it. (an example of that would be, knocking someone over because you lost your balance due to  some other force  isn't a reason for him to be upset at you , not saying "you're sorry"  afterwards gives him a reason to be upset .
Comment: "no" I won't be punished, or "no" that isn't correct and I will be? :-)
Comment: I also feel that it does make a practical difference because I don't feel quite as much guilt, dread and inadequacy if that is the case.
Comment: "no" you won't be punished but point is you shouldn't feel less guilt. Dread and inadequacy should be removed by Teshuva
Comment: There is only so much teshuva a person is capable of doing at once, and I don't think that covers more than a fraction of the aveiros for most people


How much weight can a person carry to avoid being blown over by wind?

Question: I wonder if there is a certain amount of weight that I could carry in a rolling bag to help prevent me from being knocked over by the wind. I have balance problems and some lack of muscle strength in my legs and sometimes it feels like strong wind gusts here in Boston, MA may knock me over, especially when I walk in a wind tunnel between buildings. I have a rolling bag that I pull along that weighs 6 lbs. when it has a pair of shoes in it. I also fill it with kids' books and toys for work but they don't usually weigh very much. The handle extends 20" above the bag and I can keep a good grip on it. Would the bag have to weigh more than I do in order to be of any help? Thanks for any ideas.  Donna
Comment: It does get windy between the buildings in Boston (or anywhere). I would go with @Carl's [*suggestion of a cane*](http://www.fashionablecanes.com/), especially one that is adjustable and collapsible, and that has a strap or hook so you can free up both hands without dropping it. The trouble with a rolling bag is just that - it rolls, so it may not give as much stability as you'd like. Good luck. (Just thought of another possibility - a 4-wheel bag that you can lean on while it rolls - maybe?)
Answer: Pretty much no.  The problem is that you are not (pardon me :-) ) a rigid body, so you're going to feel a certain amount of force from the wind regardless of what sort of weights you're carrying.    What can help is walking with your feet farther apart, which gives you a more stable base to work from, and to learn to turn your body sideways to the wind as much as possible, to reduce the surface area facing the wind.
If you're not worried about appearances, then you could try using a cane to provide essentially a three-point support system (cane plus two legs) which will help stabilize yourself further.
Comment: I just got a Hurrycane which has 3 points on its tiny base but have not used it on a windy day yet. If that is on my right slightly in front of me and my rolling bag is on my left, then if the wind is already coming from the side, is that the best I can do to reduce surface area? If the wind is coming from the front or back of me, I can now  picture trying to turn sideways and side-step to get to a building entrance. When in danger, appearances become less important.  :)
Comment: In other words, for purposes of reacting to the wind's force, if the 3 objects (bag, cane, person) are in close proximity to each other, are they equivalent to one object in terms of looking at surface area? Also, from side view, does my bag get counted along with me as surface area? If so, it'd be important for me to line up the bag exactly next to me. And if I'm side-stepping, I'd need to have the bag turned so it will roll sideways. In that position, the bag is 18" wide, which is more than I am from side view, so that increases surface area somewhat. Thanks, guys, for your thoughts! Donna


checkout as a guest and delayed account creation

Question: if a customer decided to create an account after a guest check out (Delayed account creation), would the order that they ordered at that time be saved in their account?
Comment: As a user, yes please. Sometimes I do guest checkout because I don't think I'll need to come back, and then of course I'm wrong and I need to make an account to see a Your Orders page in the hope that it'll link up...
Answer: It's a common practice in e-commerce and booking flights, and it's technically feasible using email or phone number mapping. For example, during the checkout process for buying shoes, customers could be asked for their email or phone number for the purpose of receiving an e-receipt. If they later use the same email or phone number to create an account, all their previous orders should be visible.
To make the process of linking guest orders to customer accounts seamless, it's important to provide a clear message during the checkout process about the benefits of creating an account. Additionally, creating a password could be made part of the checkout process to make creating an account completely frictionless.


Importing citation style to Zotero from Citavi

Question: I am a Mac user so I can't use Citavi.
My institute has its own citation style but they only provide a Citavi citation file. I don't know a way to import a Citavi citation file into Endnote, Zotero or Mendeley so I don't have to use Windows....
Do you have a tip for me?
Answer: I'm sorry to say that there is no way to do that. Citavi citation styles are in their own format and there is no conversion tool.
There is a tool for Zotero/Mendeley styles that let's you find close matches that you may found useful.


gtalk Windows client trouble: permanent disconnect/reconnect

Question: I have a trouble with my gtalk client on Windows. After signing in it's permanently starts disconnect/connect approximately each 1 minute. It's annoying and I don't understand what is the core of problem. This is observed on different Windows PC's, so it cannot be the problem of a specific PC. Waiting your help... Thanks
Comment: Try changing the password on your Google account?
Comment: @Kevdog777 - how is it connected to the password???
Comment: Well the first thing I thought of, was maybe someone has hacked in... I don't know - as you said it's not one PC specific.
Comment: Does this: http://help.trillian.im/discussions/windows/890-google-talk-keeps-disconnecting help at all?
Answer: When you said "This is observed on different Windows PC's" , I can think of 2 things depending on what these different PC's are part of :
1. These different PC's are part of the same home/office network :
In this case it would most likely be your internet connection that was going crazy. But on the other hand I suppose you would notice that since other internet applications would start to misbehave as well.
2. The person you were having a conversation with reports the same issue :
Then it is simply Google's server going berserk, which is(was) not a rare occurrence at all. Well by the time of writing this answer, I think the situation has improved substantially since you have posted the original question.
Take a look at this resource for example, to see that it is a "global phenomenon".
Now that Google-Talk has been replaced by Hangouts, you can follow this website in case such occurrence reappears and you want to know whether it's just your connection, or it is the application provider that has server issues. Or this website for Google applications generally.
Answer: Several months ago I found a solution - the gtalk server port should be set 80 instead of default ~5000. Now it works. Do not understand why nobody in community do not complain.


Do allenes form rings?

Question: I was wondering whether allenes can form rings; geometrically speaking, this seems like it would be energetically unfavorable due to their 180 degree linear geometry.
Comment: Related: [A monocyclic 6 carbon ring with 6 double bonds](http://chemistry.stackexchange.com/q/33497/7951)
Comment: Cyclonona-1,2-diene is the smallest allene in a ring that has been isolated (it's stable at room temperature, but dimerizes at higher temperatures).  Trapping experiments have suggested the possible  intermediacy of cycloocta- , cyclohepta- and cyclohexa-1,2-diene.
Comment: Strictly speaking, cumulenes with even numbered of C=C bonds (odd numbers of carbons) are tetrahedral, so the bond angle strain not automatically a show-stopper.

That being said, these kinds of systems are not common.
Answer: Yes they do. Such compounds are even found in nature, e.g. vernonallenolides.
Comment: I think OP means "Do allenes react with themselves to form rings," not "Do allenes exist within rings?" I like the post, I just don't think it answers the question's intended meaning. Actually, I may well be wrong. Maybe OP could elaborate.
Comment: Well, I guess my main question was whether rings of allenes would be stable enough to exist at all, which was answered by the examples above...However, your question is an interesting one too that I would love to know the answer to.
Answer: As small as six-membered rings with allenes can exist, albeit fleetingly. Cyclohexa-1,2-diene has been known since a 1966 report by Georg Wittig (Angew. Chem. Int. Ed. 1966, 5 (9), 846), in which it is prepared by direct elimination of HBr from a vinyl bromide using t-BuOK:

For a more modern take on the matter, see e.g. Nat. Chem. 2018, 10 (9), 953–960 where Neil Garg and coworkers report the generation of azacyclic six-membered cycloallenes. The allene is generated by treatment of a 1,2-silyl triflate with CsF (this strategy will be familiar from benzyne chemistry). The cycloallene intermediates are trapped in various cycloaddition reactions.

Do allenes form rings?


How many times I should repeat plank?

Question: I am 25 year male. I can hold the plank position for 1 min.
How many times should I repeat that?
What should be the interval? I am a beginner so please enlighten me with the correct info so that I won't end up in the hospital by overdoing things.
Comment: Is your only concern not ending up in the hospital, i.e. safety? Perhaps you want to achieve a goal other than not going to the hospital? What else are you doing, just planks?
Answer: Without knowing more, it's hard to say, but it would seem as though you need to challenge yourself more. Either add weight to the plank, or modify the body weight version (or both). To modify, you could do a wall plank or mountain climbers as two examples.
Comment: I agree with this. If you can do the plank for a minute, start doing variations instead. Not just by adding weight, but there are also a lot of dynamic variations instead of just a static hold.
Answer: There is no training system that works for everyone, but the one that I tend do and which works for me is to do three sets of planks a day. Using a timer, hold the plank for a minute (or about 10 seconds less than how long you can stay up) and then rest. To know about how much rest you need and to work your core evenly, do a side plank (as illustrated here) on your left and then your right side for half the time you do your forward plank. You can choose to go back to your plank right after your side plank, or let your core rest and do it later in the day.
I would aim to do three sets a day, two or three days in a row before taking a rest day to allow your muscles to repair. Once the one minute plank gets easy, slowly increment how long you stay up, or challenge yourself with a variation of the plank (as seen here).
To address your fear of ending up in the hospital, it's highly unlikely that planks will wind you up there. Moderate discomfort is good while doing your plank: it means that your muscles are working. Even if you try to hold it too long, the worst thing that can usually happen is your core "collapsing" (giving out) and ending up lying down on the ground. Unless you have severe pain over the course of multiple days, there shouldn't be any reason to panic over planks.
Best of luck in your training!
Comment: That is really helpful advice Andrei. Thank you so much for your response. :)
Comment: glad i could help makul!

How many times I should repeat plank?


Quickbooks: how to keep track of mortgage installments as expenses?

Question: I am new to Quickbooks. Anyone can help answer this quick question? I need some help figure out mortgage installments bookkeeping rules.
Answer: Dunno about QuickBooks, but in Quicken I just set up the loan account and record payments as transfers to it. It may not be getting the principal/interest split exactly right, but it's close enough until year-end taxes.


How can a forward biased diode be off?

Question:
Give that Vx is 3v.Diode cuttoff V=0.7V.It is said that that the diode is in off state for a specific value of R1 and R2.What is the criteria for R1 and R2 such that the diode remains off?
Answer: Lets draw the forward current thru the diode on a logarithmic scale of current:

simulate this circuit – Schematic created using CircuitLab
Notice the diode is never off; instead the current drops by 10:1, e.g. from 1mA to 100uA, for each 0.058 volts reduction in the forward diode voltage.
That factor of 0.058 depends on steepness of the internal doped junction, and upon the junction temperature.
Answer: It is common for a diode to be considered to have an 'on'/'off' threshold at 0.7V in early school work. This is an oversimplification, but useful prior to understanding the junction characteristics more fully.
There is an almost infinite number of R1/R2 values that meet the simplistic criterion. What you really want to know is the minimum ratio of R1, R2 that results in the voltage across R1 being less than 0.7V.
Let's do a back of the napkin …..set the current through the R1-R2 network at 1mA, this give a total resistance of 3 / 0.001 --> 3000 Ohms.
Since the threshold for diode 'on' is considered 0.7V, then the value of R1 must be 0.7 / 0.001 --> 700 Ohms. This means R2 is 1300 Ohms and gives a ratio of 7:13. Or simplistically R1 = 0.538 * R2
Notice at this point the diode would be considered 'on', but in reality no current (in the simplistic model) flows through it.
Answer:
How can a forward biased diode be off?

That's an oxymoron.

There must be a misunderstanding.  0.7V is the switched "ON" voltage.  Perhaps it is just an arbitrary threshold for 1 Amp for some diode or some other reason and the question doesn't want you to think too much about the knee of the threshold.
=> 0.7V is the normal saturated ON condition for a Silicon diode.
0.6V is a low current threshold so less than 0.6V may be considered "off" for some
 or < 0.5V for others with high values of R resulting in << 1uA.
So what R ratio gives < 0.6V drop from 3V or 2.4V across R2?

How can a forward biased diode be off?


MapView MultiTouch zoom (Pinching) unreliable and chaotic

Question: I use the MapView from Google and have real bigger problem with it. Especially with the multitouch zooming. I am using an Android 2.2 Tablet. First thing needed to make this working was specifing in the AndroidManifest that xlarge screens are supported.
So what happen now. 90 % of the time zooming works. But sometimes it does not work and all my overlays (I also use Views from mapballons project to display on top of the map) are moving around while the tiles stay at the same position. Zooming does not work anymore. After some seconds and touching around as dump it begins to work again.
I don't know why that happens, and there are no exception in the logcat.
I have also attached an SimpleGestureListener on the MapView but don't consume gestures which are important (only Double Tap). But the problem also occurs without a GestureListener.
It would be helpful if someone had also such strange behaviour and know why that happens.
EDIT: While in that strange mode, it is also not possible to zoom with the zoom button and toggle to satelite. It totally reacts strange
EDIT2: I can confirm this is in more application i have on the 2.2 Tablet. It also occurs mainly when you start pinnching in the left side of the map
Answer: This sounds like the same problem posted here: Weird MapView problem; PixelConverter Error
Comment: It could be the problem, but i got no logcat outputs and no white banner what they mention. Also it occurs mainly on the left side of the MapView
Answer: The reason that it happens on the left side of the MapView is because your thumb is registered as a multi-touch. Some caculation gets fudged up when that happens.


Java - equals method in base class and in subclasses

Question: I have a simple base class, which is later extended by many separate classes, which potentially introduce new fields, but not necessarily. I defined an equals method in the base class, but also overriden that for a few subclasses. Is it OK to mix definitions in base/subclasses? In my case it was to avoid code duplication checking the same fields.
Comment: Can you explain what you mean by mixing definitions.  Thanks.
Comment: Having one definition in base class, which might/might not be overriden. I meant to say "mixing approaches of base class defines vs subclass defines"
Answer: Take a look at "Implementing equals() To Allow Mixed-Type Comparison" from Angelika Langer .
Here is a brief explanation of some problems and a possible solution:
The equals contract says (amongst others):

It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.

That means you might get problems if your sub class is introducing new fields and you're comparing an object of the base class (or another sub class that doesn't override equals) to an object of this sub class.
Do NOT do the following:
class BaseClass {
    private int field1 = 0;

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof BaseClass) {
            return field1 == ((BaseClass) obj).field1;
        }
        return false;
    }
}

class BadSubClass extends BaseClass {
    private int field2 = 0;

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof BadSubClass) {
            return super.equals(obj)
                    && field2 == ((BadSubClass) obj).field2;
        }
        return false;
    }
}

because you get
BaseClass baseClass = new BaseClass();
BadSubClass subClass = new BadSubClass();

System.out.println(baseClass.equals(subClass)); // prints 'true'
System.out.println(subClass.equals(baseClass)); // prints 'false'

A possible solution:
Replace the instanceof-check with a class comparison:
obj != null && obj.getClass() == getClass()

With this solution an object of BaseClass will never be equal to an object of any subclass.
If you create another SubClass without an @Override of the equals method, two SubClass-objects can be equal to each other (if the BaseClass.equals check decides so) out of the box, but a SubClass-object will never be equal to a BaseClass-object.
A good implementation could be as follows:
class BaseClass {
    private int field1 = 0;

    @Override
    public boolean equals(Object obj) {
        if (obj != null && obj.getClass() == getClass()) {
            return field1 == ((BaseClass) obj).field1;
        }
        return false;
    }
}

class GoodSubClass extends BaseClass {
    private int field2 = 0;

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof GoodSubClass) {
            return super.equals(obj) && field2 == ((GoodSubClass) obj).field2;
        }
        return false;
    }
}

Please refer to the article mentioned above for more advanced problems and their solutions.
Comment: Thanks for the Angelika Langer article link. Though this violates the Liskov substitution principle, AFAIK. See again "Effective Java" by Joshua Block. (I haven't read the full article yet, though.)
Comment: what's wrong with o.getClass() != this.getClass() ?
Comment: @Mukul I think it's actually better because you avoid the need to override the equals method if you don't do additional checks plus you can call `super.equals()` without breaking everything. I just submitted an according edit
Comment: In `GoodSubClass`'s `equals()`, do we need to check for `obj instanceof GoodSubClass`?
Isn't `super.equals(obj)` already covering that?
Answer: No, it's not possible to conform to the equals contract when introducing new fields which are relevant to the equals method. See "Effective Java" by Joshua Bloch for more information.
Edit:
I don't have the book at hand right now, but I think it's ok if the base class is abstract/ cannot be instantiated.
Comment: +1 because of the everseen reference to Bloch. And because that's true
Comment: It's not possible with inheritance but possible with a composition (stated in the same item of Effective Java)
Answer: While the following doesn't handle every case, I've found it to be quite practical.  I've used this many times when I have both a SuperClass and a SubClass in play.  I don't want to inter-compare them, but I also don't want to re-implement all of SuperClass equals() for SubClass.  It handles:

a.equals(b) == b.equals(a)
Does not duplicate field comparison code
Easily generalized for any subclass depth
Subclass.equals(SuperClass) == false
Superclass.equals(SubClass) == false

Code example
// implement both strict and asymmetric equality
class SuperClass {
   public int f1;
   public boolean looseEquals(Object o) {
      if (!(o instanceof SuperClass)) return false;
      SuperClass other = (SuperClass)o;
      return f1 == other.f1;
   }
   @Override public boolean equals(Object o) {
      return looseEquals(o) && this.getClass() == o.getClass();
   }
}
class SubClass extends SuperClass {
   public int f2;
   @Override public boolean looseEquals(Object o) {
      if (!super.looseEquals(o)) return false;
      if (!(o instanceof SubClass)) return false;
      SubClass other = (SubClass)o;
      return f2 == other.f2;
   }
   // no need to override equals()
}

Answer: You could use the super() method to call the method of class that you're extending to prevent any need of code duplication
public class BaseClass {
  public boolean equals(BaseClass other) {
    return (other.getBlahblah() == this.Blahblah && .....);
  }
}

public class DerivedClass extends BaseClass {
  public boolean equals(DerivedClass other) {
    return (super(other) && other.getNewAttribute() == this.NewAttribute.....);
  }
}

Comment: +1 for advice to call super first. One note - it's not a valid Java code, it would be cool to correct it (i understand it may be just a pseudo code as an example).
Comment: Thanks. I just mashed it out without doing checks on most stuff. Its been a little while since I've been doing Java and must've meshed some other syntax and calls inside it.
Comment: You are not overriding Object's equals but rather overloading it
Answer: Quite a valid approach.  The issue is in one of your subclasses it must retain the definition of equals as is bound by its parent.  Else you have a broken equals function, which can cause some very unique scenarios during run time.
Answer: I guess, That's perfect to provide the equals(Object obj) and hashCode() method implementation in super class as Java did. We all know that Java provide the hashCode() and equals(Object obj) method implementation in the base class java.lang.Object, and when ever required we override them in our class.
Answer: If you do not write you code correctly it will creates a serious problem, called
asymmetry (violates contract for equality) so lets see our options.
Best Practice – Same Classes Strategy. If B is a subclass of A
and each class has its own equals method, implemented
using the same classes strategy, then the class B should be
declared final to prevent the introduction of an asymmetric
definition of equals in any future subclass of B.
Question. What if we don't wish to make B final?
Use Composition instead of Inheritance. Whenever classes B and
A, where B is a subclass of A, require different equals methods,
using composition instead of inheritance is a good strategy, and
if making the class B final is not an option, it is the only safe way
to handle equals.
How?
 public class A{
public boolean equals(Object ob){
//write your code here
}
}

class B{
A a= new A();
public B(A a){
this.a= a;
}
public boolean equals(Object ob){
//...write your code here
if(!((B)ob).a).equals(a)) return false;
//...write your code here

}
}

Answer: I think it is perfectly fine as long as you follow eqauls() and hashcode() contracts.


How does facebook handle resizing of images

Question: Hello I am building a social network similar to facebook and I really need some help on how to handle the images in my website.  I would like to know how sites like facebook manage the resizing of their images. An example would be looking at someones photo album. The length and width are not just simply changed. They are done in a more professional way to make the image still look clear and not stretched.  Do they use a special tool for this. Another example would be profile pics when they are loaded to your message wall.  Your friends profile pics are centered and cropped accordingly and then re sized. How do they go about doing this.  Any help would be greatly appreciated.
Answer: They resize proportionally with an imaging library like GD, Imagick or others.
The presentation in the gray area is just that, presentation so HTML and CSS.
Answer: They stretch the images proportionally so that they don't look wrong; if you make the image 37.5% wider... you also make it 37.5% taller.
If we knew what language you are familiar with, we could probably suggest something to help with this.


Hourly timeline for the Exodus

Question: In order to get an idea of what it was like to have participated in the Exodus, I would like to see an hourly timeline for the process, starting after noon on the 14 Nissan 2448. The timeline should include as a minimum the time that matzos were baked to be eaten with the Korban Pesach, the time of the sacrifice and roasting of the Korban Pesach and the time that matzos were baked before Klal Israel left Egypt in the morning. I would also like to know what did  Klal Israel do after eating the  Korban Pesach and before leaving.
Answer: So far, I have found from Rav Zvi Silber's sefer:
Comment: When you have the chance, consider using the new tables feature and writing this out, to make it accessible to the visually impaired and search engines.

Hourly timeline for the Exodus


Let P be the transition matrix of a Markov chain, and there exists an integer $r \geq 0$ such that every entry of $P^r$ is positive

Question: I would like to show this assumption implies that the Markov chain is irreducible and aperiodic. I was able to show the irreducible part but I'm having trouble proving the aperiodicity. I tried to prove there must exist an odd cycle, but I couldn't seem to proceed. Any help?
Answer: Aperiodicity is immediate from the fact if  a set  $A$ of integers contains two consecutive integers then its gcd is $1$. Note that $P^{r+1}$ also has all entries positive as shown below:
Suppose $M$ is a stochastic matrix . Suppose some element $\sum_k m_{ik} P^{r}_{kj}$ of the product $MP^{r}$ is $0$. Then $m_{ik}=0$ for all $k$ contradicting the fact that $\sum_k m_{ik}=1$. Apply this with $M=P$.


How to Calculate SqrtPriceX96 for a Specific Percentage Change in Uniswap v3?

Question: I am working with Uniswap v3 and need to calculate the sqrtPriceX96 value that is exactly 5% (or any other percentage) above or below the current pool price. I understand that each tick in Uniswap v3 represents a price movement of approximately 1 basis point. Could I use this understanding to calculate the sqrtPriceX96 for a price that is a certain percentage above or below the current price by simply moving a corresponding number of ticks? What are the potential accuracy or resolution trade-offs with this approach?
Answer: To calculate a sqrtPriceX96 that is a specific percentage (e.g., 5%) above or below the current pool price in Uniswap v3, you can indeed use the tick-based approach. Each tick in Uniswap v3 roughly corresponds to a 1 basis point change in price. To adjust the price by, say, 5%, which is 500 basis points, you can add or subtract 500 ticks from the current tick to get the approximate sqrtPriceX96 that is 5% from the current price.
Here's a general approach in Solidity:
import { TickMath } from '@uniswap/v3-core/contracts/libraries/TickMath.sol';

function calculateAdjustedSqrtPriceX96(uint160 currentSqrtPriceX96, int24 basisPointsDelta)
    external
    pure
    returns (uint160 adjustedSqrtPriceX96)
{
    int24 currentTick = TickMath.getTickAtSqrtRatio(currentSqrtPriceX96);
    int24 adjustedTick = currentTick + basisPointsDelta;
    adjustedSqrtPriceX96 = TickMath.getSqrtRatioAtTick(adjustedTick);
}

Accuracy and Resolution Trade-offs:

Precise Tick Calculation with Logarithms: The use of logarithmic calculations for determining the number of ticks corresponding to a specific percentage change is more precise. Since price movements in ticks follow a geometric progression, logarithms accurately capture the necessary tick adjustments. So in the 5% price delta example, the actual number of ticks is 488 and not 500. See this answer for more detail.

Challenges with Solidity Computations: Implementing logarithmic calculations in Solidity can be complex and gas-intensive. Solidity's lack of native support for floating-point arithmetic and advanced math functions like logarithms makes on-chain calculations of this nature less straightforward.

Quantization in Tick Spacing: While the logarithmic approach is mathematically precise, the fixed tick intervals in Uniswap v3 still introduce a quantization effect. This effect can result in small deviations, especially when dealing with very fine price movements for e.g. within 1 bsp(0.01%).

Precomputed Lookup Tables for Efficiency: To balance precision and computational efficiency, using precomputed lookup tables for common percentage changes is a practical solution. This approach avoids complex on-chain calculations by referencing off-chain computed values.


if $G$ has no Nash equilibrium in pure strategies then $G$ has single Nash equilibrium in mixed strategies.

Question: Let $G=(S,T,\pi _1 ,\pi_2)$ be a 2 player game with strategies $T$ for player 1 and $S$ for player 2 such that $|T|=|S|=2$, and payoff functions $\pi _1 ,\pi_2$.
prove that if $G$ has no Nash equilibrium in pure strategies then $G$ has single Nash equilibrium in mixed strategies.
I noticed that in this case the payoff for the Nash equilibrium for each player is always between the second worst case and the second best case for them, yet I don't know how continue.
Answer: Let $T=\{t_1,t_2\}$ and $S=\{s_1,s_2\}$. Let payoffs be as follows:
$$ \begin{array}
\hline
 & s_1 & s_2 \\
t_1 & a,w & b,y \\
t_2 & c,x & d,z \\
\end{array}$$
We know that a Nash Equilibrium must exist (Nash proved this!), but that it does not exist in pure strategies (given by the problem). For there to exist a NE in strictly mixed actions, any player mixing must be indifferent between his two actions. If we denote $p_{t_1}$ as the probability weight P1 puts on $t_1$, and similarly for other actions, it must be that:
$$ p_{s_1}a + (1-p_{s_1})b = p_{s_1}c + (1-p_{s_1})d $$
$$ p_{t_1}w + (1-p_{t_1})x = p_{t_1}y + (1-p_{t_1})z $$
where the first equation (on P2's mix) guarantees that P1 is indifferent between his two actions (and thus willing to mix), and where the second equation (on P1's mix) guarantees that P2 is indifferent between his two actions (and thus willing to mix).
Now the argument to make is that each of the above equations above solves for a unique $p_{s_1}$ and $p_{t_1}$ respectively, as this would then imply a unique equilibrium. Well, solve for$p_{t_1}$ and $p_{s_1}$, and :
$$ p_{s_1} = \frac{b-d}{b+c-a-d} $$
$$ p_{t_1} = \frac{x-z}{x+y-w-z} $$
As you can see, they both have a unique solution, so there must be a unique NE in mixed strategies.
Answer: A detail needs to be added to the previous answer. We need to explain why the system of linear equations that one obtains when writing down the indifference conditions does not have more than one solution. Without loss of generality consider the first equation. It will have more than one solution if $b+c-a-d=0$ and $b-d=0$. This is equivalent to: $a-c=0$ and $b-d=0$. This means that player 1 is indifferent between both strategies, regardless of what player 2 does. But if this were the case, then the game would have pure strategy Nash equilibria. For example, $(t_1,s_1)$ (if $w\geq y$) or $(t_1,s_2)$ (if $w\leq y$) would be a pure strategy Nash equilibrium. Because by assumption the game has no pure strategy Nash equilibrium, we have obtained a contradiction.


Expectation function of random variable Lebesgue integral

Question: If $X$ is a random variable and $h$ a Borel measurable function, let $\mathbb{P}^{x}$ be the distribution of $X$. I now have problems proving that $h(X)\in L^1(\Omega,\mathcal F,\mathbb{P})$ if and only if $h\in L^1(\mathbb{R},\mathcal B,\mathbb{P}^{x})$, in which case $$\mathbb{E}h(X)=\int_{\mathbb{R}}h d\mathbb{P}^{x}.$$
Answer: We use the definition of Lebesgue integral: first, as the sum of two integrable functions is integrable, and $f$ is integrable if and only if so are $f^+:=\max(f,0)$ and $f^-:=f^+-f$. So we just have to show the result when $h$ is non-negative.

If $h(X)\in L^1(\Omega,\mathcal F,\mathbb P)$, then we can find a sequence $\{h_n\}$ of simple functions such that $h_n\uparrow h$ almost everywhere. We get by Fatou's lemma
$$\int_{\Bbb R}h(x)d\mathbb P^x\leq \liminf_{n\to +\infty}\int_{\Bbb R}h_n(x)d\mathbb P^x.$$
We can show that for each simple function $s$, we have $\int_{\Bbb R}s(x)d\mathbb P^x=\int_\Omega s(X(\omega))d\mathbb P(\omega)$ (by definition of integration of simple functions and pullback of a measure). Since $h_n\leq h$ for all $x$,
$$\int_{\Bbb R}h(x)d\mathbb P^x\leq \liminf_{n\to +\infty}\int_\Omega h_n(X(\omega))d\mathbb P(\omega)\leq \int_{\Omega}h(X(\omega))d\mathbb P(\omega)<\infty$$
Conversely, if $h\in L^1(\Bbb R,\mathcal B(\Bbb R),\mathbb P^x)$, we have by a similar argument
$$\int_{\Omega}h(X(\omega))d\mathbb P(\omega)\leq \liminf_{n\to +\infty}\int_\Omega h_n(X(\omega))d\mathbb P(\omega)\leq\int_{\Bbb R}h(x)d\mathbb P^x <\infty.$$
This proves the equivalence.

The last two displayed equations show that when one of the two conditions is satisfied, we have equality. (actually, we have equality in $\overline{\Bbb R}$)
Comment: Yes, such a method will work (and is not fundamentally different from what I did).
Comment: It's actually more or less similar than what I did. First, show that equivalence holds when $h$ is the characteristic function of a measurable set. Then that it's still the case when $h$ is a simple non-negative function, then for non-negative one. But you have to prove equivalences in each case, so it's probably not shorter.
Comment: I was wondering if it could also be solved using the standard machinery for $h$, i.e. first show that it holds true for indicator functions, then extending it to nonnegative simple functions etc till you find that it holds true for all functions $h\in L^{1}(\Omega,F, \mathbb{P})$??
Comment: And how would I tackle it this way?


drupal_add_js() 'setting' not being set on form submit

Question: I have a form and on that form the #submit action it calls a function that saves some data.   Now what I need to do is  I need to pass some data back to the website confirm page to be used by JavaScript. To do this I used drupal_add_js() 'settings' but this does seem to work? The data never gets set.
From what I've read I think it might be something with the form redirecting during the submission process and the JS is getting lost?
Comment: yes - but that's without s ;)
Comment: i think it's setting not setting*s*
Comment: No I mean "settings" as in the method of adding JS http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_add_js/7
Answer:
it might be something with the form redirecting during the submission process and the JS is getting lost?

Yes, you are absolutely right! Normaly, after form submitting user is redirected with drupal_goto() function. Messages which set with drupal_set_message() are stored in $_SESSION so they are not lost, but drupal_add_js() doesn't use session.
You can prevent redirect in your submit function:
// In this case your form hanler will be able to see flag $form_state['submitted'] and
// other data from previous form processing to indicate that form was submitted.
$form_state['rebuild'] = TRUE;
// Will work.
drupal_add_js(array('myModule' => array('test' => 'test-value')), 'setting');

Or with:
$form_state['redirect'] = FALSE;
// Will work, too
drupal_add_js(array('myModule' => array('test' => 'test-value')), 'setting');

But I would have used $_SESSION as it is more flexible.
$_SESSION['js_settings'] = array('myModule' => array('test' => 'test-value'), 'setting');

Then you have to process $_SESSION yourself in accordance with your site logic.
Answer: if you have a form attaching js or css could be more painless with
'#attached' option this can attach css js library and settings documentation here
you may use hidden form element to save some data it will always  appear on form_states. Setting some values to hidden field is easier solution IMHO
Answer: You can set a session in form submit:
function my_form_submit($form, $&state) {
  $_SESSION['js_value'] = 5;
}

Then you can check if this session variable is set in your theme's template.php file and theme_preprocess_page() hook. This hook is executed everytime you load a page (and only after form redirect, not before), so you can add the js variable into your html here. But do not forget to unset the session variable after adding js varible, otherwise it will be loaded on every page request, not only after form submit.
function theme_preprocess_page($&vars) {
  // check if the session variable exists
  if (isset($_SESSION['js_value']) {
    drupal_add_js(array('myModule' => array('js_value' => $_SESSION['js_value'])), 'setting');
  }
  // optionally you can add a js file that will process the variable (if not added by default)
  drupal_add_js('path/to/js/file.js');

  // do not forget to unset the session variable
  unset($_SESSION['js_value']);
}

You can then access the variable in file.js, that will be loaded after form submit:
jQuery(document).ready(function () {
  // check if the variable exists and finally do some action
  if(typeof Drupal.settings.myModule.js_value != 'undefined') {
    alert(Drupal.settings.myModule.js_value);
  }
});

This way your js variable will be present in any page and only at the page that comes first after the form submit.
Answer: In the submit hook you should set a variable ( variable_set("name", "value") ) and read it / add it to js settings in the hook_init() using variable_get("name", "dafault_value");
Please take into consideration that saving variables using variable_set() will save them to the database. You should delete them if you don't need them anymore. If the value you want to save will be used one time only you might want to use sessions instead.


How do I replace a broken light fixture?

Question: One of the claws on my 3-clawed light fixture, sheared clean off while I tried to pry it open to remove the dome in order to replace a light bulb. Do I need to replace the whole fixture? If so how do I remove it?
Comment: Can you post a photo?
Answer: In hindsight, I think this past question might have also helped out:
How can I change the bulb in this three-clawed, ceiling-mounted dome light fixture?
A picture of what you currently have would allow us to help you out more, but I'll go on the assumption that it needs to be replaced..
In this case, it's a pretty simple process. Switch off the power back and the breaker and finish removing the dome if you haven't yet, again the above question link could help. If you're able, test the sockets with some form of voltage tester (or even a good bulb that works on another lamp) to ensure that the power is off. Then on the base that is mounted to the ceiling, there will either be some screws holding it up or a center threaded rod which will have a nut and washer holding the fixture to the ceiling. In either situation, unscrew it, but keep a hold on base as it will only be held up by the wires after it has been disconnected from the support. You should be able to pull it down enough to see the wiring above the base within it's electrical box. Disconnect the light from the wiring and you're good to go. Follow the instructions that are included with your replacement fixture and you'll have light back in no time.


Can you delete your own chat comment for any reason of concern?

Question: You can delete at any time (main and meta page) personal answers and comments and sometimes questions. But to delete your own chat comment, after a very short time period, you need to flag it for deletion and wait for approval.
Why is there such a stricter rule for chat comments? Can you request to delete your own comment for any various reasons in the case something bothers you (not for fun)?
Answer:
Can you request to delete your own comment for any various reasons in the case something bothers you (not for fun)?

Yes, just click the arrow next to it and use the "flag for moderator" box and request deletion there. That usually can get it deleted pretty quickly.

Why is there such a stricter rule for chat comments?

I don't think there's a reason; the systems were probably just designed that way (and can be changed if you put up a feature request).
However,  there is something to be said for keeping chat conversations untampered. Comments are supposed to contain suggestions and short discussions, nothing more. They are ephermal, so SE doesn't care much about deleted comments. Mass deletion of comments generates a flag. On the other hand, if someone went and mass-deleted their past chat messages, nothing would happen (there's no framework for auto flags in chat). Now, I'm not sure how much we care about chat deletion. But given that chat comment deletion after the 5 minute period is a rare case, the current system seems OK to me :)
Answer: I'm not sure what the "reputation points threshold" is, but higher-rep users can certainly delete their own comments without moderator intervention.
One possible justification is that deleting your own comment may "invalidate" comments from other users. Only moderators can delete other people's comments, but it's not unreasonable to suppose high-rep users might be more aware of the problems that can be caused by removing only part of an interconnected exchange of comments.
That's to say, perhaps TPTB think low-rep users might inadvertently cause the remaining entries in a "comment thread" to become incomprehensibly disjointed, whereas they trust high-rep users to flag any "orphaned" comments following a deletion, so a mod can tidy things up properly.
Comment: You appear to be describing the rules for deleting comments on questions and answers.  However, this question appears to be about the [chat system](http://chat.stackexchange.com/), to which different rules apply.


Unable to edit videos recorded in default mode on iPhone 13 mini on iPad 2020 8th generation - iOS v15.5

Question: I am using default apple photo & video & camera apps on both devices. Devices run ipadOS 15.5 and iOS 15.5.
Video is recorded in "normal" video mode on iphone 13. After syncing the video to icloud and trying to edit the video in photos app on ipad 2020 i get the error message:
"Unable to edit video" This video cannot be edited because it is unsupported.
The official apple forum leaves this question unanswered for 6 months (pic 1) with several people reporting the same problem.
Is there a way how to enable editing of iphone 13 default video format using the ipad 2020 photos app? if not, what is the work around?
Answer: The workaround is to use iMovie app for ipadOS. The videos are fully editable using the iMovie app.


How to override LWC lightning record form Cancel button

Question: I'm using a lightning record form to create a new cord in a Customer Community. Just wondering is there any way to override the standard 'Cancel' button behaviour?
Answer: Short answer is No.
From the documentation, This event has no default behavior that can be canceled. You can't call preventDefault() on this event.

You can customise only onload and onsubmit events. If you need more customized usage, you need to implement lightning-edit-form
Answer: I have used like as steated below and it is worked for me
 <lightning-record-form  object-api-name='Contact' fields={layoutfields}
                    columns="2" mode="edit" onsubmit={handleSubmit} oncancel={closeModal}  onsuccess={handleSuccess} class="full forcePageBlock forceRecordLayout">
                </lightning-record-form>

Lightning:recordForm cancel button unresponsive
Answer: As stated in documentation, use the oncancel attribute to do anything we want in the js file.
In my case, I used the function which closes the modal pop up window.
.HTML file

    <lightning-record-form object-api-name="Tissue_Log__c" record-id={recordId} columns="2" mode="edit"
        layout-type="Full" onsuccess={handleSuccess} oncancel={customHideModalPopup}>
     </lightning-record-form>

.js file
    @track customFormModal = false;
    customShowModalPopup() {
        this.customFormModal = true;
    }
    customHideModalPopup() {
        this.customFormModal = false;
    }


How to unlock my iPhone without knowing my password?

Question: I locked myself out of my iPhone, I don't know my password... it isn't disabled, but when I try to connect to iTunes I get this message: "To allow access, please respond on iPhone". I can't respond on my iPhone because I cannot get into it! Someone help me please. I've been trying to do this for over 3 hours and nothing is working!
Comment: Start at https://iforgot.apple.com. No one else can help.
Comment: @Tetsujin, isn't iforgot.apple.com for resting one's Apple ID password or can one also reset an iDevice passcode from there as well?
Comment: @user3439894 - the OP said password - I never even thought of pass*code* tbh
Comment: @user3439894 - my excuse is it was 5.30 am & I was on my phone, hugging my first coffee of the day ;-)
Answer:
I locked myself out of my iphone

That was silly of you

I don't know my password...

Even sillier. You are required to know your password. It's 2015 - passwords are as essential to modern life as keys.
Take your phone, contract, purchase receipt etc. to the nearest Apple store. They can reset your account access.
Note that if your next comment is "I lost my paperwork" then you will probably end up buying a new phone.
Answer: Another option is to erase the iPhone.
If you have a backup of your iPhone, you can load a backup after you erase the iPhone.
If you don't, and you erase it, you are out of luck.
Here is a guide on how to erase the iPhone.
Good luck
Answer: If you have access to the computer that this iPhone is synced to, then you have a chance to recover the data.
When you plug the iPhone in, despite it being locked, it should still perform a sync and backup.
Double check that it did do that, by noting the time when it was last backed up in the Summary section.
Check again that it did, in fact, backup recently. This is the last chance before erasing your iPhone.
Now you can perform the restore, gain access to the iPhone and restore from the backup you just made.
If you were really cautious, you could use a different phone that can be erased, to restore this just made backup to test it will work.
Comment: To address the OP again, it sounds like they are trying to use a computer that this iPhone had not been synced with. Try and find the computer that the iPhone was synced with previously and try again. If you don't have that computer anymore, or it was reinstalled or such, then you are indeed out of luck. You can certainly erase the iPhone and start again, but I'm afraid your data is gone, unless your had a local backup or iCloud backup.


The example question on the tour is about unicorns

Question: The current example question on the about page is the Stack Exchange default example: "How to prevent unicorns from eating daisies". This is quite unhelpful and makes the site look less professional.
Answer: Guess we forgot to update it.. I've set to a question from Super User now. Probably can change it to something else in required
Comment: @psy i updated the question couple of times
Comment: weird it was not showing unicorns here, it was showing a , , , proper question (gone), now changed to the virtual machine question.  I lost what it was showing on the refresh, it was some shutdown or standby type of question.
Comment: The unicorn question shows up when I open SE tour page. It is 3 years since it was changed (I suppose).


Java 8 CompletableFuture - fan out implementation

Question: I was wondering what is the best way to implement a fan out type of functionality with Java 8 Completable future. I recently rewrote a function that had a bunch of old Future instances and then calling get in a loop, blocking on each one, to a somewhat cleaner variant using CompletableFuture. However I am seeing about 2x drop in performance so I am assuming something is not quite right in the way Im using the new API. The code looks something like that:
<code>if (!clinet.login()) {
        throw new LoginException("There was a login error");
    }
    CompletableFuture<List<String>> smths = CompletableFuture
            .supplyAsync(client::getSmth);

    CompletableFuture<List<Data>> smths2 = smths.thenApply(client::getInformation)
            .thenApplyAsync((list) -> list.stream().map(obj -> mapper.map(obj, Data.class)).collect(toList()));

    List<CompletableFuture<Map<String, AnotherData>>> waitGroup = new ArrayList<>();
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getIvPercentileM12M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getIvPercentileM6M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getIvPercentile2M6M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getIvPercentile2M12M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getIvPercentile2M24M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getHvPercentileM6M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getHvPercentile2M6M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getHvPercentileM12M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getHvPercentile2M12M));
    waitGroup.add(notablesFuture.thenComposeAsync(clientb::getHvPercentile2M24M));

    CompletableFuture
            .allOf(waitGroup.toArray(new CompletableFuture[waitGroup.size()]));

    List<Data> data = smths2.join();
    Map<String, Set<AnotherData>> volPercent = waitGroup.stream()
            .map(CompletableFuture::join)
            .flatMap((e) -> e.entrySet().stream())
            .collect(groupingBy(Map.Entry::getKey,
                    mapping(Map.Entry::getValue,
                            toSet())));

    data.forEach((d) -> {
        Set<AnotherData> asdasd = volPercent.get(d.getSymbol());
        if (asdasd != null) {
            d.add(asdasd);
        }
    });
    return stocks;
</code>
client::getInformation is a blocking network call returning a List, all the clientb.* are doing is something like:
<code> return CompletableFuture.supplyAsync(() -> blockingNetworkCall(params, symbols)
            .entrySet().stream()
            .collect(Collectors.toMap(Map.Entry::getKey, value -> new Data(value.getValue(), TimePeriod.M1, TimePeriod.Y1))));
</code>
The original code looked something like that:
<code> List<String> symbols = client.block().get();
    Future<Map<String, Data>> smth = client.block2(symbols);
    Future<Map<String, Double>> ivM6MResultsFuture = clientB.getIvdataM6M(symbols);
    Future<Map<String, Double>> ivM12MResultsFuture = clientB.getIvdataM12M(symbols);
    Future<Map<String, Double>> iv2M6MResultsFuture = clientB.getIvdata2M6M(symbols);
    Future<Map<String, Double>> iv2M12MResultsFuture = clientB.getIvdata2M12M(symbols);
    Future<Map<String, Double>> iv2M24MResultsFuture = clientB.getIvdata2M24M(symbols);
    Future<Map<String, Double>> hvM6MResultsFuture = clientB.getHvdataM6M(symbols);
    Future<Map<String, Double>> hvM12MResultsFuture = clientB.getHvdataM12M(symbols);
    Future<Map<String, Double>> hv2M6MResultsFuture = clientB.getHvdata2M6M(symbols);
    Future<Map<String, Double>> hv2M12MResultsFuture = clientB.getHvdata2M12M(symbols);
    Future<Map<String, Double>> hv2M24MResultsFuture = clientB.getHvdata2M24M(symbols);
    Map<String, Data> doughResults = smth.get();
    Map<String, Double> ivM6MResults = ivM6MResultsFuture.get();
    Map<String, Double> ivM12MResults = ivM12MResultsFuture.get();
    Map<String, Double> iv2M6MResults = iv2M6MResultsFuture.get();
    Map<String, Double> iv2M12MResults = iv2M12MResultsFuture.get();
    Map<String, Double> iv2M24MResults = iv2M24MResultsFuture.get();
    Map<String, Double> hvM6MResults = hvM6MResultsFuture.get();
    Map<String, Double> hvM12MResults = hvM12MResultsFuture.get();
    Map<String, Double> hv2M6MResults = hv2M6MResultsFuture.get();
    Map<String, Double> hv2M12MResults = hv2M12MResultsFuture.get();
    Map<String, Double> hv2M24MResults = hv2M24MResultsFuture.get();
</code>
with a big for loop to map all the futures together and aggregate a result. Hopefully its clear from the code what its doing, but essentially:

I make one network call that gets a list
Based on this list i
call an internal service that generates some objects
Based on the first list i spawn a bunch of tasks to fetch various data
I populate the objects generated in 2 with the items in 3 -
essentially 2 and 3 can run concurrently since they are not
dependent.

Two main problems:

Do you see any problems with my CompletableFuture usage and any room to improve the implementation based on the outlined criteria, currently its about 2x slower than regular blocking .get() old Futures, that is given as reference
I am a little bit annoyed by the way joining is done, by having to call .allOf() with a void result, is there a better way to do that in the API that I am missing.

As a sidenote, I realize I'm doing a bit more work in the Java8 variant with a bunch of streams and mapping happening, but the time difference is from 22sec in the old to 45secs in the new and total items is about 200, so the majority is actually spend in networking and waiting and not the stream operations.
Thanks!
Answer: It's difficult to say, as there are some parts of the code missing, but I would avoid the .join()s (as they block), and instead iterate through  waitGroup and use combineAsync passing smths2. Something like:
<code>    Stream<CompletableFuture<AnotherData>> map =
         waitGroup.stream().map(
                cf -> cf.thenCombineAsync(
                       smths2, (m, l) -> {doWhatever(m, l)}
    ));
</code>
Just an idea...


How does Java standard libraries comunicate with native code?

Question: Do they use something like Mono's PInvoke? Or is it more like internal calls registered before the runtime is started? Does java have a base library for handling native calls like mscorlib.dll? If I want to invoke a JVM in C code will it libraries look for the .so/.dll files? Does it make a difference to Java standard libraries if I statically link all of the JRE natives libraries?
Answer: They use JNI, exactly as it is publicly documented, to invoke native shared libraries for the specific platform.
As far as invoking a JVM from C code, the JVM uses shared libraries (DLL, SO, etc).  A quick search of the JDK 6 source code does not reveal any System.loadLibrary() for the core native support (like native methods in Object, String, etc).  That suggests to me that the native code for these methods, which appears to be in DLL's judging from the contents of the JRE/bin directory, is explicitly linked by java.exe (and javaw.exe in Windows).
When I last looked at this stuff, the requirements for invoking a JVM from C code was a well documented part of JNI - I strongly suggest you refer to that doco to proceed further.  We even went so far as successfully writing a native C wrapper/loader for the IBM AS/400 Java 1.1 JVM.
Answer: They use the Java Native Interface (JNI).
I've never called the JVM from C, so I don't know about that.
Answer: There is an example here about how to start a JVM from inside your C program:
http://www.inonit.com/cygwin/jni/invocationApi/c.html
Answer: "Java Native Access (JNA)  provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code" (quotation from their homepage).
Personally never tried it so far.


Why is change in volume of the solution zero in case of an ideal solution?

Question: In my textbook it is written that $ΔV_{mix} = 0$ for ideal solutions i.e. $V_{solution} = V_{A} + V_{B}$. But why is this true? There is literally no explanation in my textbook as to why this is true. I am so confused. Please can someone explain it rigorously. Please help.
Comment: In simple words because the average intermolecular interaction is the same in X, in Y, and in X+Y. It is the analogue of the ideal gases case.
Answer: If you have two component mixture of A and B, most important reason for volume of mixing being zero is that when solution is ideal heterogeneous interactions (A - B) are the same as homogeneous (A - A and B - B). If interactions are the same than volume doesn't change when you mix components. Other reasons which contribute to non - ideality of mixing is size and shape of the molecules. If you mix water with some liquid polymer, you can expect that  due to big difference in size and shape of water and polymer molecules, volumes will not be additive because water molecules being much smaller than polymer molecules can easily fit between them in free volume of polymer liquid. Such packing/fitting of water molecule is quite different than if you just look at water molecules in pure water or if you look at pure polymer since bulky polymer molecules can't just fit easily in free volume of other polymer molecules like water can.


Acer aspire X; AXC-603G-UW15

Question: I believe i was hacked, and somehow my C drive was LOCKED, running win8.1, and when i rebooted my computer, windows couldn't be found, the comp. did not come with a recovery disk, and i have tried all the things said to recover or fix, nothing works.  So i brought a new hard drive, but can't install anything cause of factory safeguards, which can only be accessed from the original hard drive, which is dead til i get an OS loaded to the new hard drive, how can i get passed the factory safeguard, nothing in CMOS changes the setup access.
Answer: The CMOS settings of many computers can be accessed by one of the programs you can run before choosing which operating system to boot (if you have more than one installed, but not on the same disk partition).  Explore what's available.  For Windows, the D drive usually contains a separate operating system plus the files needed to install Windows on the C drive plus a number of files useful for fixing problems that keep the C drive from booting.  It often also contains a program for creating a recovery disk.
This partition could allow you to install the original operating system on your new drive, but you'll need to get past the rather different way it names the various drives and partitions.
I don't have any Acer computer available to check if this should work for you, though.
I've seen some computers where the back or the bottom of the computer has a label that includes the computer's serial number and MAY contain some other information needed to get past the factory safeguards.

Acer aspire X; AXC-603G-UW15


Zone for planting a Chicago Fig tree outdoors. I am in zone 5

Question: I have 2 Chicago fig trees and I need to know planting, soil type and zone safe to plant outdoors.
Answer: Chicago Hardy is an unusual fig in that is it is cold hardy to zone 5.   This medium sized fig produce fruit on old wood, they ripen in late summer - late fall, depending on your heat index.  Even though it is hardy to zone 5, it still requires heat & sunlight to ripen fruit.   It should be planted in a location that gets no less than 6-8 hours of direct sunlight each day from Spring until Fall.
Dig a hole that is twice as deep & wide as the pot or the bare roots.   Fill the hole back in with a mixture of half native soil to half a good rich compost like a fish compost.  Or whatever you can get.  Fill the hole to the depth of a little higher than the bottom of the pot. (If you were to hold the pot in the hole, the top of the soil line of the pot will be a little higher than the soil line of your planting hole. When you are done there will be a small mound higher than the rest of the soil around it.
As the plant grows, the ground under it will settle, eventually the mound will disappear, becoming even with the soil around it.)   Take the plant out of the pot.  Hold the plant in place while you fill in the rest of the hole with that same mixture of native soil with compost.   You will end up with a small mound.
If the trees are tall they will need staking.  Place two stakes on either side of the tree use women's leggings or hose to attach the tree to the posts.  This elastic material will not damage your tree as it rubs against it.  It will also move some with the wind, so the tree does not break.   Even if you tree it not very big now, figs do grow fast, so you may need to stake it in a few months.
Learn about hardy Chicago Fig at Gardening Know How
Answer: The most important thing for you to prepare to do is acclimation before planting. What size pot are your figs?  Make sure you understand fertilization.  Do not plant any deeper than the root ball.  Don't dig any deeper than the root ball height, leave the subsoil undisturbed.  Do not add any weird soils or sand or compost.
Supervise the watering.  Do not over do nor under do.  Send pictures of your plants and where you would like to move them out of doors.  Begin taking your plants out of doors in the direct sun for 5 minutes the first few days.  Increase to 10 minutes for a few days...20 minutes (for a few days), then 30 minutes, then an hour.  Up to 4 hours in the sun and you should be good to plant out of doors.  Keep weeds away from the base of your tree.


Trouble scanning on HP 3051 and OS X

Question: I've got my printer scanner, copper properly installed, but I can't seem to figure out how to scan a document. I'm on a Mac mini and use OS X 10.9.4. Before my laptop died, I had an icon in the dock that I could simply right click on and there you'd go.
Comment: We need more information and what steps you've already taken. What kind of scanner is it, have you installed the drivers, etc?
Comment: What OS did your laptop run?
Answer: There are several methods of scanning from HP all in ones.
Using System Preferences > Printers & Scanners, selecting Scan and the Open Scanner button which will open a Scanner Window.
In the Printers & Scanners preference pane there's a Printers List on the left hand side where you can drag the icon of a scanner equipped printer to the desktop.  When clicking that Desktop icon (a short cut) a window will pop up for that printer with a Scanner button that will open the same Scanner Window.
Some HP printers at least historically came with HP applications which included a Scanner App (e.g. HP Scan.app) where you could have created a short cut to an  HP Scan.app and placed it on the Desktop. If your Applications or other installation Folder had been dragged to your Dock, that could have been done as simply as dragging the icon to the Desktop. (I have a set of HP Applications that came with my old HP 5610 that includes OCR, so I keep that around. You may find you have better control over resolution a well.)
If you have an application open, you can keep it available in the Dock by right clicking it > Options and selecting Keep In Dock. You can then launch it from the Dock as well as select it if it is running.
While in the Finder, you can select Help in the Toolbar, enter the search term scanner and you'll see various Help Topics on performing scanning.

Trouble scanning on HP 3051 and OS X


How do I get my Twitter direct messages back?

Question: I've downloaded all my old tweets, but I'm still not sure on how to get my old direct messages back. Can someone please tell me how to do that?
Comment: What has caused you to lose them?  Why can you not just log in to Twitter and see them?
Answer: Direct messages are not a part of the Twitter archive, it only contains your tweets and retweets. If you have deleted a direct message, there unfortunately is no way to get it back.
Answer: I am not sure what you mean by "get back" your direct messages. Like Zedinc pointed it, the DMs are not part of your archive (because I guess it would require to contain tweets from other people of your conversations to make sense).
If there are not deleted and you just would like to download them to keep them offline, there are two ways to do this:

Use the Twitter API and deal with its limitations: only the latest 200 direct messages can be retrieved.
Use a tool to simulate the browsing of a conversation and parse the result.

Maybe I can help you with the second idea. I have created a tool (https://github.com/Mincka/DMArchiver) to download my direct messages, with the ability to also download the uploaded images and GIFs (as MP4).
Because it does not rely on the API, it is possible to download more than 200 messages. The script just simulate the "scrolling method" and parse the result.
The main idea is to make requests in loop by calling the following URL with a valid auth_token cookie value for the authentication and parse the json response:
https://twitter.com/messages/with/conversation?id=1337&max_entry_id=1337
The max_entry_id value is not required for the first request. You need to use the value of the min_entry_id variable in the response as the new max_entry_id in each subsequent iteration to get the next 20 older tweets. When max_entry_id is not in the json response, you are at the begin of the thread.


Can I install puppet modules through puppet manifest?

Question: Primary goal is to add all puppet modules automatically, so that all dev-env's and prod-env could be started with one command. How can I install puppet modules through puppet manifest?
Answer: We've been happily using librarian-puppet to sync all 3rd party modules, it supports setting the modules' locations and versions. So production and dev run the exact same code.
The usage is one liner
librarian-puppet install

In other cases we have a shell script that runs puppet two times, one time a minimal module that is only responsible for fetching the required modules, and then the full blown puppet flow when all modules are available.
Comment: i still can't understand this module purpose. does librarian also installs puppet modules not just custom one? when using git sub modules you can update all of them with one command? to install standard puppet modules I just created install-me.sh script. just want checkout & run method, without additional fuss.
Comment: ok so this is basically same as librarian-chef. I've migrated to chef, but your answer is still valid
Comment: it seems to me this doesn't actually answer the original question, as the module is *not* installed by the Puppet client, but by a third-party tool. So it requires users to install that library first, and you can't install that with Puppet! The best solution would be something builtin the Puppet client itself...
Answer: The "Puppet module" type and provider does exactly that:
module { 'author/mymodule':
  ensure   => present,
}
module { 'puppetlabs/stdlib':
  ensure => '2.6.0',
}
module { 'puppetlabs/stdlib':
  ensure     => present,
  modulepath => '/etc/puppet/modules',
}

Recent versions of Puppet also have a puppet module command that allows you to install arbitrary Puppet modules from the Puppet forge, example:
$ puppet module install rcoleman/puppet_module
Notice: Preparing to install into /home/anarcat/.puppet/modules ...
Notice: Created target directory /home/anarcat/.puppet/modules
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/home/anarcat/.puppet/modules
└── rcoleman-puppet_module (v0.0.3)

Other alternatives include:

librarian
r10k (cited as a replacement for librarian), supports dynamic environments and much more

r10k is now part of Puppet Entreprise 2015.03, so it can certainly be considered best practice.
Comment: This looks easy and great, but has [issues](https://github.com/ryanycoleman/puppet_module_provider/issues/4) with newer version of puppet
Comment: @vikas027 i have added other options that are now available, including the `puppet module` command and put a stronger emphasis on r10k.
Answer: Here is an example of mine:
  $module_stdlib = 'puppetlabs-stdlib'
  exec { 'puppet_module_stdlib':
    command => "puppet module install ${module_stdlib}",
    unless  => "puppet module list | grep ${module_stdlib}",
    path    => ['/bin', '/opt/puppetlabs/bin']
  }

Where $module_stdlib is a module I whant to install.
The /bin path is a path where the grep comes from.
And the /opt/puppetlabs/bin is a path where for the puppet binary exists in my installation.
Answer: Seems that writing module for installing puppet modules is possible - it'll be just wrapper for puppet module tool. However, I didn't hear about such module yet.
I suppose this mechanism of installation is not popular because often you need to modify installed module, do some customizations. Practical tool for management of such modifications is version control system. For example, in our team we keep /etc/puppetlabs/puppet directory in git repostitory. After installation of any module from Puppet Forge we add its files to version control and push it to remote git server. Our internally developed modules are also kept in this repository. This way, several puppet masters (dev and prod environments) are synchronized with this central repository and always have up-to-date versions of all modules.
Answer: I did this and it seemed to work
exec { 'puppet-fstab':
    path => '/bin:/usr/bin',
    command => 'puppet module install -i /usr/share/puppet/modules/AlexCline-fstab >>/tmp/err.log',
}

Comment: Of course I will just note that right after I got this to work, I realized that puppet has built in "mount" which does what I wanted to, so I removed this module, but hopefully this other points someone in the right direction.