How Many EEPROM Write Cycles Left in My EEPROM

Question: I ordered some AT28C256 EEPROMs, but none of them were cleared, they all have some garbage programmed, probably from the last user. Obviously they're supposed to be clean and new. I wanted to ask, is there any way I can determine how many write cycles are left before the EEPROM becomes useless? I know they start with 100,000 writes from the factory, but can I figure out approximately how many writes I can have without knowing the history of the EEPROM's use? I wanted to decide whether I should return them or not. If they've been used a lot, I will. If they still have a long way to go, I'll avoid the effort of returning them.
Comment: If you think the usage has been the same on all the units, you could test one or two to destruction. I would not suggest used parts for anything where reliability is very important- for one thing you don't know if they have been handled carefully wrt ESD.
Comment: Even brand new EEPROMS may contain some garbage left over from the QA tests in the factory. They do test them, right? Does the datasheet contain any provision that EEPROMs are shipped clear?
Comment: Typically the use case that gets ppl in trouble is using eeprom as NV storage , e.g. as data logger writing to same blocks over and over again. When used appropriately as a configuration store there it is not any feasible way to wear out the eeprom write cycles.
Answer: No, there is no way to know how many times they have been programmed. A typical user will only program them a few times, so you should be OK. If you plan on programming them tens of thousands of times, you should get new parts.
EEPROMs from the factory are normally unprogrammed (all 1's).
100,000 writes is a "guarantee", they won't magically die at this number. A typical part will last much longer.
Answer: As others have indicated a typical EEPROM at room temperature can do many, many more than the guaranteed 100'000 write.
There have been many tests of these performed such as:
Hackaday EEPROM killer


Network Flow Optimization

Question:
Suppose we have a network with node set $N = \{1,\dots, n\}$ and arc set $E$. $(i, j) \in E$ if there is a link between node $i$ and node $j$. We need to send $L$ commodities
from their respective origin to destination node. The multicommodity flow
problem has the following specifications:

(a) There are $L$ origin-destination (O-D) pairs of nodes $(s_1, t_1), \dots,(s_L, t_L)$,
and $d^k$ is the amount of flow that must be sent from $s_k$ to $t_k$ for $k =
1, \dots, L$.
(b) $u_{i,j}$ is the capacity (shared by all commodities) on the arc $(i, j)$ for any
$(i, j) \in E$.
(c) $c^k_{i,j}$ is the cost of sending one unit of commodity $k$ through arc $(i, j)$.
Write down an optimization model for the above problem to minimize the
total cost.
Answer: This is the multicommodity flow problem.  A formulation is given here.

Network Flow Optimization


Capacitors role in an oscillator?

Question: I have a simple oscillator, as shown below. As far as I understand, a negative bais is induced on the base of either c1 or c2 which in turn pulls the base of the other transistor below 0 shutting it off. However, I am wondering how a difference in size of the capacitor affects the circuit. It appears that the current can flow to charge the capacitor as well as charge the base of the transistor so how does this work?
Comment: Do you understand how a capacitor works in say a standrard relaxation oscillator based around a schmitt trigger? Link: https://www.google.com/search?q=schmitt+trigger+oscillator&client=firefox-b&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwjumqPtt57OAhWDJhoKHUoVD4cQsAQIJA&biw=1208&bih=897
Answer: As far as I understand, a negative bais is induced on the base of either c1 or c2
No.  C1 and C2 are capacitors, which don't have bases.
which in turn pulls the base of the other transistor below 0 shutting it off.
One transistor turning on lowers the base voltage of the other.  It might or might not make it go below 0, depending on other parameters of the circuit, such as the power supply voltage.
However, I am wondering how a difference in size of the capacitor affects the circuit.
First see how the whole thing works.  For whatever reason, one transistor turns on, let's say T1.  This causes its collector voltage to decrease.  Instantaneously, the voltage on a capacitor stays the same.  The same decrease in collector voltage of T1 therefore shows up as a decrease in base voltage of T2.  This turns off T2.  The collector of T2 stays high, so T1 stays on.
However, eventually the right side of C1 charges up due to R2.  This will eventually get to a point where it turns on T2 at least just a little.  That causes its collector to go lower, which causes the base of T1 to go lower, which at least slightly turns off T1.  T1 turning off even slightly drives T2 harder, which turns off T1 even more, etc.  The net effect is that T1 and T2 flip states.
The same thing happens regardless of the sizes of the capacitors over a wide range.  However, the time to flip to the other state depends on how long it takes to charge up the base side of a cap.  Both a larger capacitance and a larger resistor increase this time.  The time to flip in one direction is related to the product of C1 and R2, for the other direction the product of C2 and R3.
Answer: This circuit is astable.  As long as power is available, any small fluctuation of voltage will build up
an oscillation, until the amplitude (say, at the collector of T1) of
the voltage repeatedly goes up to the power supply rail on the positive swings, then down
to the saturation minimum (about 0.1V) of a 2N3904 transistor.
As for the capacitor size, THAT is what sets the oscillation period.   That period, which has units of time, cannot be computed from voltages, transistor gains, resistor values, or ratios.  None of those quantities has any time-dependence, only by combining resistance and capacitance can a time scale
be established by these components.   If there were only ONE capacitor,
there would be no stable oscillation, because a single capacitor does not
determine an irreversible condition (oscillating means a positive peak followed
by a negative trough, not by another positive peak).  It takes two capacitors
to determine both a voltage level for the output AND define the future (by holding charge, and in a way, representing the past  history).

Capacitors role in an oscillator?


Is charge not quantized fundamentally and that is why we haven't come across magnetic monopole?

Question: If protons are getting charged from quarks.. then the charge in quarks is fractional and not quantized. Does this mean that the charge we see is not fundamental? And the charges in quarks are just adding up somehow to make integer charges in what we see and experience daily. Does this mean the charge is not quantized fundamentally and that's why we haven't come across a magnetic monopole?
Comment: Whether charges are integer multiples of $e$ or $e/3$, surely it doesn't make a difference.
Comment: Possible duplicate: [Why do physicists believe that there exist magnetic monopoles?](https://physics.stackexchange.com/q/4784/2451)
Comment: [A question on the unification of electricity and magnetism](https://physics.stackexchange.com/a/309408/46708)
Answer:
then the charge in quarks are fractional and not quantized.

This is not true. Charge is still quantized as multiples of 1/3. For example, you won't find an object with 0.17 times the elementary charge, hence, quantization of charge.

Does this mean that the charge we see is not fundamental?

PBS SpaceTime recently did an episode on this. Check it out.

And the charges in quarks are just adding up somehow to make integer charges in what we see and experience daily.

This is certainly true. Charge is still quantized, though.

and thats why we haven't come across magnetic monopole?

As far as I can tell, Dirac's original statement was: If magnetic monopoles exist, then electric charge is quantized. An equally true statement is: if electric charge is not quantized, then magnetic monopoles do not exist.
Nonetheless, the current state of science is that electric charges appear to be quantized and magnetic monopoles seem to not exist. That is not a contradiction of Dirac's hypothesis in any way.


Accidentally unlinked /usr/lib/libcrypt.a. Is there a way to recover from this?

Question: I have been upgrading OpenSSH and OpenSSL and I have accidentally deleted the file /usr/lib/libcrypt.a and now most features in AIX just doesn't work. Is back-up/restore the only way to recover from this?
Comment: That file is part of the `bos.rte.security` package, so if you can manually download the appropriate level, you could potentially `installp` it with `OVERWRITE same or newer versions` set to `yes`.  Haven't had to do that, so just a suggestion at this point.
Comment: Some files in /usr/lib are just symlinks to /usr/ccs/lib, so if you are lucky, it was only a symlink what you deleted. Otherwise you have to restore it from the backup. (Note: this `libcrypt` file is not related to `libcrypto` from openssl.)
Comment: Can you check if libcrypt.a is in another directory? Maybe /usr/lib64? or /usr/local/lib? Then you might need to re-create the soft link. Also check the output of `ldd /usr/bin/openssl` which should tell you about what is missing or not found.
Comment: I did an upgrade of the the `glibc` library, expecting the newer version to be in _/opt/freeware/lib_ but it's not in there either.
Answer: Choose from:

restore that file from a OS mksysb backup.
Copy from a working OS at the same fileset version.

Consider third party binary packages (rpm or installp format) for software not shipped with AIX. More reproducible than if you build from source, and easier to manage. Some can be installed in parallel to the OS packages.
Comment: Thanks for the suggestion but the missing libcrypt.a is a much lower level module than the libcrypto.a module, which I have also accidentally removed in an earlier event...
Comment: Edit your question to include this new lost file. Although, doesn't change the recovery.  If copying in working libraries (via nfs, ftp...) doesn't work, mksysb backups can restore entirely broken operating systems, via NIM if necessary.
Answer: The final solution was to do a system restore from backup as all users were practically locked out of the system...
Anyhow, I must reiterate libcrypt.a is NOT libcrypto.a. An accident with the former file means a full system restore. The other is merely an annoyance.
Answer: If you have session still open but commands do not work, i.e. have errors like
bash-4.4# ls
Could not load program ls:
Could not load module /usr/lib/libc.a(shr_64.o).
        Dependent module libcrypt.a(shr_64.o) could not be loaded.
Could not load module libcrypt.a(shr_64.o).
System error: No such file or directory
Could not load module ls.
        Dependent module /usr/lib/libc.a(shr_64.o) could not be loaded.
Could not load module .

Then you may try to restore it with echo bash built in, for example:
echo -n -e '\x3c\x62\x69\x67\x61\x66\x3e\x0a\x31\x30\x33\x33\x30\x20\x20\x20\x20\x20\x20\x20' > /usr/lib/libcrypt.a
echo -n -e '\x20\x20\x20\x20\x20\x20\x20\x20\x31\x30\x35\x32\x30\x20\x20\x20\x20\x20\x20\x20' >> /usr/lib/libcrypt.a
...

To generate such echo file you may use following c program (on other system where you can get a copy from libcrypt.a):
#include <stdio.h>

int main(int argc, char** argv)
{

    int c; // a single byte buffer

    FILE* fp = fopen("./libcrypt.a", "rb"); // open the file in 'read' mode

    int i;

    while (!feof(fp)) { // while not end of file

        printf("echo -n -e '");
        for (i = 0; i < 20; i++) {
            c = fgetc(fp); // get a character/byte from the file
            if (!feof(fp)) {
                printf("\\x%02x", c); // and show it in hex format
            }
        }
        printf("' >> /usr/lib/libcrypt.a\n"); // and show it in hex format
    }
    fclose(fp); // close the file
}


Why is there no git commit -A -m? It must have been deliberately omitted, but why?

Question: So I can combine git add -a and git commit -m "Add whatever" using git commit -a -m "Add whatever", but this will only stage tracked files. Why doesn't git offer git commit -A -m "Add whatever" so that I can also stage untracked files. It seems like an obvious shortcut so I'm wondering why it has been omitted.
Answer: Feel free to suggest it on the git mailing list, or even better send in a patch. Note though that many Git people discourage the use of -a for add and commit as you completely lose control over what you actually add.
That being said, you could also make an alias that does both:
git config --global alias.commitall "!git add -A && git commit -m $0"

Then you could just type git commitall "Add whatever" and it will add and commit everything.


Can i play installed games on xbox 360 without cd'

Question: My xbox only reads original discs it's pal region and i want to know if it's possible somehow to play installed games without discs
Answer: No. "Installing" games to the hard drive does not allow the console to play the game without the disc in the drive.
However, you can buy download versions of many (most?) games from the Xbox Live Marketplace, which you can play without needing to bother with discs.
Answer: Unless you flash the hard drive, and other modifications. There is no way to play games installed from disc without the disc.
Comment: Unless you **"flash the hard drive"**? What does that mean? Please explain in more detail.
Comment: Flash the hdd means you change the firmware on the hdd to circumvent M$ security measures. This voids warrenties, is technically illegal, and may result in being banned from Xbox live. Then again you may not get banned and then you can play burned games and games from a 2 tb external hdd. Just google flash xbox hdd and jtag Xbox hdd
Comment: *sigh* Look, my point is, you must pretend I know nothing as the Answer'er. You should add that information to your answer, not only will it look more professional, but the chances will be raised in getting upvoted/accepted answer.
Comment: Sorry new to this but I actively decided to not tell you to break the law as I am sure That constitutes conspiracy.
Comment: Well, it isn't breaking the law by explaining it. It's breaking the law **to do** it. It's good of you to be cautious of these risks though.
Comment: Advising you to though... to be honest im not sure either conspiracy or promoting a criminal act. I did tell you its possible. And did tell you the legality issues so who know but a lawyer. Good luck.
Comment: You too with your answer. :P


How to create an object/entity XOM-BOM using lists

Question: I need create object with an attribute that is based on a list of other objects. By default when creating a XOM using XSD, Rule Designer assigns lists as vector of java object. I need some orientation how to verbalize and instantiate the list and add the object members.
Answer: You need to create a separate Class of Objects you want to store in the list. After that you have to create a list type variable in your Request Class. "listOfMyObjects" as an example. Then, after updating your BOM instance, you will see a new member in it. You can verbolize it as you need. "{list of my objects} from {this}", where the "my object" itself have to be verbolized as well, as an example.
After that you can work with the list in your rules like that:
definition: make this object equals to any of My Object from list of my objects
if: your condition
then: add new object to list of my objects


Self resonant frequency of inductor in VCO

Question: I am designing nmos only LC VCO in cadence TSMC180. I have chosen the self-resonant frequency of the inductor to be twice the working frequency of the LC tank. Is it a proper design for LC tank? Or do I have to increase the SRF?
Comment: What is the centre frequency and range you hope to achieve from your VCO?
Comment: The centre freq is 900MHz. The oscillator I designed was oscillating from 900MHz to 1.3GHz
Answer: It's not possible to generalise, as it depends on what oscillator configuration you have chosen.
Twice the SRF means the effective shunt capacitance is 25% of the total you will need at the design frequency.
Some oscillator configurations will be quite tolerant of 25% of the tank capacitance being 'inaccessible' inside the inductor. If you want to apply the sustaining feedback by splitting the tank capacitance, then that may compromise how much intrinsic capacitance you can tolerate.
I suggest you simulate your proposed oscillator, first to see whether it runs, and then to see what margin there is before it doesn't. As long as there is reasonable margin, a fairly simple first order simulation should be adequate.
Answer:
Is it a proper design for LC tank?

It will work if the self-resonant-frequency (manifesting itself as extra capacitance in parallel with the varactor diode tuning) doesn't create a net capacitance that is too high at the highest DC control voltage.
So, work out the parasitic capacitance and add it to your varactor diode capacitance when controlled at the maximum DC voltage. Add also capacitance due to the PCB (maybe up to 1 pF) and calculate the oscillating frequency when the inductance is at its highest value (usually 10% high based on typical tolerances). If above 1.3 GHz then you should be OK.


Files Eternally Syncing, Never Uploading Completely on Web

Question: I use SharePoint on my computer and it connects with the online version on Office 365.  For two days, new files that I save to my computer's SharePoint folder are not uploading onto the web server on Office 365.  It always worked automatically before.  Now, when I save a file on my computer's SharePoint folder, there is a blue recycle picture that is permanently there for the new files.  When I go online, the files are not showing up like they should.  Any answers to this question?
Answer: There are a lot of articles on the for that particular question:

They contain the following characters: & { } ~ # % (there are other illegal characters too, but as they are also blocked from use in Windows Explorer, it is assumed you will not have files named with these characters in your file system.
They are 128 characters in length or over
They start with a period character
They end with a period character
They contain consecutive period characters

Im still searching for an easy tool to run and show me errors like above, but I found this one: http://get-spscripts.com/2011/11/use-powershell-to-check-for-illegal.html


What are the differences between 技術 and 技能?

Question: What are the differences between 技術 and 技能?
Comment: @Matt: It is more subtle than that.  For example, 運転技術 means "driving skills."
Comment: 技能 means skill and 技術 means technology.
Comment: So what is the correct answer to this question?
:)
Comment: @TsuyoshiIto: Nice, I didn't know that. That's why I only posted a comment. But I think it's fair to say that what I wrote above is *roughly* what it means. どう思いますか?
Comment: Thank you but I want to mean something like this: "京都以外の出身者の若い女性たちが、その芸術、芸能を伝承し、" or like this: "現在日本では、技術 技能の断絶への懸念が高まっている。"
Answer: There are several diffrences, and I am not sure if I can list them all. The following is what I feel.

技能 is for established techonology/skill (typically traditional ones), whereas 技術 is any kind of techonology (typically modern ones).
技能 is attached to a human, whereas 技術 can be done by using machinery, human skills, improved planning of process, or combination of these.
技能 is inherited from a master to a younger generation, and has the implication that, once acheived, it stays permanently for the person. 技術 does not have that implication.


In Windows 7, can the amount of RAM available for all tasks be temporarily limitted?

Question: My less-powerful computer has 6GB of RAM. I am writing software that performs a RAM-intensive task on some large data sets. I would like to establish that it will run on a computer with 3GB of RAM, and I don't want to borrow a computer every time I want to run a test. Is there a simple, easily reversible way of temporarily limiting the amount of RAM available to all processes running on a machine?
Comment: The above comment does not provide an answer to the question. *grin*
Answer: Yes, but it'll require a reboot.

Run msconfig
Click the Boot tab
Click "Advanced options..."
Check the "maximum memory" checkbox
Enter the number of MB you'd like the system to use (e.g. 3072 for "3 GB")
OK twice

Reboot and you'll be running with 3 GB RAM.
If you'd like to be able to select this at boot time without using msconfig over and over... then assuming you have a default Boot Configuration Database (BCD) with only one entry in it...

Open a command prompt running as Administrator
(details: From your Start menu, type cmd - you should see a shortcut for cmd.exe. Right-click it and click Run as administrator. If you already have a shortcut for command prompt on your taskbar, right-click it, then right-click command prompt from its context menu, then click Run as administrator. I always keep a command prompt shortcut on my taskbar for this purpose)
At the command prompt, type
bcdedit /copy {current} /d "Windows 7 limited RAM"
This copies the BCD entry that booted your current system to a new entry, and assigns a description string of whatever you put in the quotes. You could of course say "3 GB RAM" instead of "limited RAM".
Run msconfig. (Since you already have an admin command prompt, just type msconfig at the prompt.) This time you will see two entries in the Boot tab's window. (or maybe more, if you've modified the BCD before) Click the one that you added - the one that says "Limited RAM" (or whatever you set it to with bcdedit /copy) - and modify it as described above. Click OK twice.

The next time you reboot you will be offered a boot selection menu showing both "Windows 7" and "Windows 7 limited RAM" (or whatever). The default selection should remain the same, so if you just leave it alone it'll go ahead and boot your standard system after 30 seconds. You can change that timeout in msconfig's Boot tab. (I usually set mine to 10 seconds.)


call contract function without a fullnode?

Question: I have a contract that I deployed a while ago. My mist is like 6 months behind and I don't even think I have enough HD space for it to catch up. I can still launch it anyway to get contracts and wallets addresses etc. Is there anyway I can interact the same way I would when you click a contact and pick a function under the 'Write to contact' without having to download the fullnode?
Answer: I used MEW https://www.myetherwallet.com/#contracts using the contract address and pasting in the ABI/JSON that you can copy from mist by clicking on 'show interface'
Answer: You don't need tour own node to work with Ethereum nowadays.  All you need is Web3-enabled browser, such as Chrome + Metamask or Opera.  These browsers use free Ethereum nodes available in the cloud.
Then you need to open any Ethereum UI in such browser.  This could be MyEtherWallet or even etherscan.io in case your contract's source code was verified on it.
Let me know if you need more details.


Incompatibility between job and field of study

Question: Finding jobs for Ph.D graduate in mathematics is the main concern. Available options are namely in general industry and academia. I see, for instance, some Ph.D in math (algebraic geometry)  working in Bank sector! This incompatibility
between field of study and job might back to the rank of math department of graduated person.
There maybe exists some other reasons. But I want to know about the upper bound of ranks of departments might be considered as top ranks? Additionally, which university ranking is most reliable in industry sector and in academia?
Comment: There's also government jobs. Mathematics is not a profession (like engineering or dentistry) but a field of learning. There are niches within mathematics like actuary and perhaps statistician though. I don't really follow your question beyond that though.
Comment: I'm having trouble understanding your question the way you've written it.  Are you concerned that if you took an unrelated job in industry, that that might lower the ranking of the program you graduated from?  Are you asking if the ranking of the program you graduated from will affect your employability?
Comment: @aparente001 It is my confusion if someone takes an unrelated job in industry? How does a pure mathematics postgraduated can start a job in Banking sector?
Comment: @user40491 - I think you just submit an application.  You might want to brush up on your English grammar basics and have someone check your cover letter and CV.
Comment: @aparente001 !!!!
Comment: @user40491 - Again, I'm not sure what you're trying to convey.
Answer: As a graduate PhD your options are staying in academia and moving to industry, as you correctly point out. If you stay in academia, be it as research staff or as postdoc, it is generally because there is a interest in your field of study. In industry however, especially with rather specialized studies, you are not hired for your research to this point. With a PhD you have proven you are capable of independently solving challenging problems. And math/physics PhDs are generally considered as being good at working with numbers and abstract concepts. This is why they end up in the banking sector or working for insurance companies. It doesn't matter if your PhD is from a high ranking university or not, once you move past a certain point of specialization there is simply no demand for the research you are working on, you are hired for the skills you developed during your PhD


How to save settings when reinstalling Ubuntu 9.04?

Question: I'm going to install Windows 7 RC soon and want to save all (or at least almost all) of my settings that I have in Ubuntu 9.04. How can I do this?
Comment: Is your title correct?  Do you mean "moving from Ubunto 9.04 to Windows 7 RC"?
Comment: No I have ubuntu 9.04 installed right now and when I install Windows 7 RC then I will have to reformat my whole HD.
Comment: Please edit your title, it's currently incorrect and thus people won't be able to search for it.
Comment: Sorry I'm never good at making titles.
Answer: Ok this really depends what you use your machine for.
If it's just a desktop machine then backing up your home directory /home/username will be enough.
This will make sure you keep all of your documents, music, application settings, chosen theme and the like.
If you've been been installing services list apache, mail servers etc then I would advise also taking a backup of /etc also and cherry pick stuff to restore when you re-install. It's generally fairly obvious where things live (apache config lives in /etc/apache2, mysql config in /etc/mysql etc...)
Another thing you might want to do is to create a list of all the packages you have installed.
To do this do the following:
dpkg --get-selections > package_list.txt

Backup package_list.txt Then when you are ready to put ubuntu back on install as normal and do the following:
dpkg --set-selections < package_list.txt

apt-get dselect-upgrade

It will then go off an re-install everything you had on before.
Hope that helps.
Comment: As an addendum to this I would also save /etc/ in case there are any application configurations you need to save. Of course, restore with care as version changes may invalidate the files.
Answer: Copy your entire home directory (~/) and /etc.  All settings should be in those two folders.
Comment: **Most** settings should be in those two folders.  Bind, for example, has part of its configuration in /var/named/.  If you have Apache HTTPD running, your web pages are stored under /var/www/.
Comment: Also, backup '/var' . I contains mail spools, crontabs, web server hosts, database storage binaries (ideally you should dump these these in case of database software version changes) and some other stuff
Answer: Also see Ubuntu, how to setup a new machine like an existing one


What's the acceleration of pendulum when velocity is zero

Question: For a pendulum which has a light string to hang a bob, I know that when the bob swing to the leftmost or rightmost end, the velocity of the bob is zero and the acceleration should be maximized. But if you look at the formula of the angular acceleration $a = v^2/r$, but when $v$ is zero, acceleration will be zero too. So why in the text they said that the acceleration at that point is maximum?
Comment: $a=v^2/r$ is the *radial* acceleration, not the *tangential* acceleration.
Comment: @SachinShekhar Mike is correct. The acceleration can be resolved into two components in polar coordinates. One is radial and the other is tangential. The radial component has magnitude $v^2/r.$
Comment: Angular acceleration is $v^2/r$ only for uniform circular motion when $v$ is constant (and, acceleration exists due to change in direction).
Comment: @Alec I am not opposing Mike. I am just explaining to OP what elementary school textbooks mean. My comment and Mike's comment are basically same.
Answer:
When the pendulum swings, at the time when angle is $\theta$, I have listed the forces. In all there are two forces $T$(tension) and $mg$(weight)[shown in red]
You can resolve $mg$ into components along the motion and perpendicular to the motion[shown in green].
The string is inextensible, so net forces in the direction of string is $0$, so $T=mg\cos\theta$
The unbalanced force is $mg\sin\theta$ which causes the motion of pendulum. At the leftmost or rightmost point, $\theta$ is maximum. Hence $\sin\theta$ is maximum(it doesn't go up the point of suspension), so net acceleration in the direction of motion is $(g\sin\theta)_{max}$. The book probably says this.
Answer: WE know that the equation of motion of a simple pendulum can be written as
y= a sin(wt).    y= displacement of the pendulum at time "t" from the mean position
                 a= amplitude of oscillation
                 w= angular frequency of oscillation
remember in this case y=0, when time t=0.
now  (dy/dt)= aw cos(wt)= velocity =v
  again (dv/dt) = -aw^2 sin(wt)= acceleration=f
If T= time period then w= (2 pi/T)
now at time t= T/4, v=0
but at the same instant f= -aw^2= f(max)
Answer: I would say that the text is right, as the force on ot always equals mg and T at an angle. So, for the acceleration part, you can be SURE that T will not cancel mg, as there is an angle between them and the magnitude therefore has to be less than mg.  Moreover, since force is not zero, and this is the NET force, so there must be a net acceleration.
Furthermore, it is maximum, as T tends towards mg as theta reduces as the bob moves down. So, net force is zero for an instant when the bob is at the mean position.  So, we see that theta is directly proportional to acceleration, and this final statement should cover up this horribly long answer! :)
Comment: "T tends towards mg as theta reduces as the bob moves down" - $T$ does not become $mg$ at the bottom of the swing unless the speed of the bob is zero there.
Comment: Watch the simulation there.
Comment: http://en.m.wikipedia.org/wiki/Pendulum
Comment: Well, I believe, the main answer is not mg becoming or tending to zero, and I also believe that the main concern of the user has been addressed, if there's any inaccuracy wi regards to that, kindly bring it to my attention


Module vs. component design

Question: What is the difference between module vs. component design?
Comment: This depends on the language/environment you are talking about (e.g. a .Net module is something completely different than a perl module). Which are you interested in?
Comment: The only context i can think of that would make sense for this question is Joomla!, but til we get some clarification, i'm not gonna bother answering.
Comment: in terms of frameworks. Can you give me example of PHP framework that is module vs. component?
Comment: I'm also struggling with that separation. I'm thinking of it in terms of synthesis/analysis. Components are _put together_ (synthesis) to build a software. Modules are the result of _dividing_ (analysis) the code. So components are about the high-level design of a software, whereas modules are more about organization on the code level.
Answer: I'd like to share my idea about this difference.
Both component and module are used to refer to a group of functions or a part of a function. Module is more logical, for example: module Finance, module HR, module Manufacturing... in ERP system. On the other hand, component is more physical. In software, it can be a dll, ocx, exe,...
There is no criteria to measure which one is greater than the other. One component can contain list of modules, and one module also can contain many components. Components are used to model a system in technical view, and module is used to model the system in function view ( functionalities of the system)
Comment: This is definitely a wrong answer. Quoting from https://support.microsoft.com/en-us/kb/815065: "The use of DLLs helps promote modularization of code, code reuse, [...]" - you cannot say "component is more physical", DLLs are all about modularity and you cannot get more physical than that.
Comment: I agree to @Tin, the use of the term "physical" may be debatable but in general Tin's answer is much clearer.
Comment: Same for OSGI bundles https://www.osgi.org/developer/architecture/: "Therefore, modularity is at the core of the OSGi specifications and embodied in the bundleconcept. In Java terms, a bundle is a plain old JAR file" - again modules are physical.
Answer: Components and modules are too often confused with each other.  They
are, however, not the same, and the implications of one, does not
necessarily hold for the other.
Modularity is the partitioning of code into modules of related
functionality.  In many programming languages, a module is simply a
source file.  It is common practice that if the source file grows too
big, you can split it into two or more source files, and put these
into a new directory; while a directory is often not called a module,
this kind of decomposition is still modular.
A component, on the other hand, can be composed in different ways with
other components to form different programs.  That is, there is a
separate composition stage, where real people decide which components
should be used together.
I have seen component design being used to enforce some notion of hard
modularity.  This approach cannot be recommended because of the rather
significant overhead of composition: the composition complexity grows
polynomial with the number of components.  And the number of
components grows linearly with the number of functionality groups,
because once you get started with modularity by component
decomposition, you force yourself to create a new component whenever
you would otherwise just need a new module, because that new module
would otherwise not really belong anywhere.  At a 100 components, the
composition overhead became a full-time job, and each composition
iteration would take up to a couple of weeks, despite numerous
automation efforts.  This significantly impeded development.
My simplest recommendation is to stay away from components if at all
possible; well-knowing that components may sometimes be a necessity.
For instance if multiple independent organizations are involved in a
project, one component for each organization seem acceptable.
It is a matter of taste, how fine grained your decomposition into
modules should be, though everyone agrees that modularity is a good
thing.
If I know the name of a function, my editor will find it soon enough.
On the other hand, if for some reason I don't know the name of a
function (or a class for that matter), modularity becomes more
important.
I would expect the later case, to only be an issue for functionality that
you can experience from using the program, so try to make the
decomposition of your program into modules reflect an intuitive
decomposition of the behaviour of your program into areas of
functionality.
Answer: There is a reference in the «OSGi in Action» book, which, I believe, explains the differences well.

Modules vs. components
Doesn't it sound like modules and components have a lot in common? They both provide stuff to each other and consume stuff from each other. They're also packaged as independent deployment units. Couldn't these two be considered one and the same or at least be combined? Yes, they could, but components and modules serve different purposes and are somewhat orthogonal (they're not completely orthogonal, because  components are made from code that can ultimately be packaged into modules).
Modules deal with code packaging and the dependencies among code. Components deal with implementing higher-level functionality and the dependencies among components. Components need their code dependencies managed, but they technically don't need a module system to do it (often it's us programmers doing it via the class path).
A good summary is that you can think of modules as dealing with static code and compile-time dependencies, whereas components deal with instances and execution-time dependencies.
— «11.1.1 What are components?», «OSGi in Action» (page 347).
Comment: Agree; I just want to reinforce this view. The key to understanding the difference between modules and components is in how we view the system: a static view where the modules and the dependencies between them are derived directly from the code and an instance view where the components and the dependencies/links between them are result of runtime processing and/or a separate pre-execution configuration step.
Comment: I agree with you @arpadf
Answer: If you mean module in the sense of modularity there is a definition in the IEEE Standard Glossary of Software Engineering Terminology:

"Modularity is the degree to which a system or computer program is composed of discrete components such that a change to one component has minimal impact on other components."

And Dr. Bertrand Meyer stated five criteria for modularity:

Decomposability of the problem into sub-problems
Composability of modules to produce new systems
Understandability of a module in isolation
Continuity - small changes have localized effects
Protection - fault isolation
Comment: If you're going to quote an official source, it would be preferable to get the quote right: `The degree to which a system or computer program is composed of discrete components such that a change to one component has minimal impact on other components`
Answer: For digital development and UI consideration (HTML/CSS/JS), I use this approach to ensure I'm staying organized and thinking before doing. Has proven to create cleaner, more organized code which translates nicely to doing more with less.
In a typical stylesheet, I'm currently setting up like this:
/* Style Guide – Mobile First
   1. =Setup
   2. =Modules as independent units made up of components
   3. =Components as group of reusable code containing more than one element
   4. =Classes
   5. =Responsive as enhancement
*/

Modules as independent units made up of components: Header, Footer, Sections, Articles, Aside, etc. A house is made up of many rooms, all with special styles and functions to create an independent whole.
Components as a group of reusable code containing more than one element: Unordered Lists, Quotes, Cards, Tables, etc.

I wrote a fuller explanation you can read here.
Hope this helps!
Answer: Component is a runtime entity (can be made up of modules), independent runnable unit
Module is a partitioned system into implementation units, independent task assignment. Modules might or might not be a component
Answer: In my view, Module and Component are all just a couple of functions and assets.
And the different between them is:
Component has business logical and module not.
For example,this text input area is just a Module, but when there was some post api called,it become a Component. you can put a module everywhere and it will work fine, but Componet just can be used in a specific page or view(coz it has a specific api call)
Comment: I like the assertion that a component contains business logic and a module doesn't
Comment: Me too @ESR, that's a point.

Module vs. component design


How to "manually" sort items in Digikam

Question: Digikam includes the option to sort files in an album by "manual and name" or "manual and date." However, I haven't been able to find any way to "manually" reorder files. The official documentation doesn't seem to elaborate on this. Has anyone used this feature?
Comment: Have you try with drag and drop?
Comment: Yes, that does not work.
Answer: I've got Version 6.4.0, and
there I was able to reorder images by dragging
after I had switched to "By Manual and name" in "View"|"Sort Items".
However, this was only possible in "Thumbnails" and "Preview" view mode,
not in "Table" view.
And I had to drag the thumbnail onto the thumbnail of the target position,     not between two thumbnails.
And the new ordering was persistent after restarting Digikam.

I would love to be able to persist this to disk, ie rename the files according to the displayed ordering. If anyone has got any suggestions, please do let us know.
Comment: sunito's answer works also in 7.1, but not in the most recent release 7.2. It seems there is a bug!
EDIT: it works again in the weekly snaphot digiKam-7.3.0-20210613T170955-x86-64.appimage
Comment: Edit: for renaming, check Andreas answer, way better solution. OA: You can sort the images as you do. Then create a presentation of all the images. The presentation will have the same ordering. Save the presentation. Now you can open the presentation in your favorite multi-caret (hopefully) text editor and use the file paths to create mv commands.
Answer: Reorder the images as described above. Mark all images. Press "F2" or select menu "item", submenu "rename". A box appears with intuitive controls to rename the files. Usually, I use "number, three digits". After that, I end up with files numbered in the correct order.

How to "manually" sort items in Digikam


Polygamy and Hindu Marriages

Question: In the Mahabharata ,most people married more than once. Then why is there a Hindu law now which prevents Hindus from marrying more than once?
Comment: Customs change, everything changes in time. What was the custom in one age is not the custom in another. The only absolute is Brahman.
Answer: Even after Mahabharata for several hundreds of years the polygamy was allowed. We still see the property cases mostly happening in outskirts/villages in some part of India, where a (Hindu) husband has multiple kids through polygamy and the land is into a court dispute!
After independence of India when the country became democratic, the abuse of polygamy got much due attention. Usually the polygamy was seen as quite unjust to the female counterpart in times of equal rights.
On other note, just imagine a society where female foeticide is so high and the gender ratio is significantly low; now if the people start marrying multiple women then it will just add to the imbalance.
This is the reason why such provisions are made. Also refer Hindu Marriage Act, Conditions.
Comment: If a law was created after the independence then why only for Hindus, it should have been for all religions. Muslims still can follow polygamy as it was allowed in their law but Hindu can't follow. Muslim women can feel the same problems as was faced by Hindu women.
Comment: @Aby, true. Islam is facilitated across world with polygamy due to cultural influence. Except Islam, in India other religions aren't allowed polygamy. There is a strong demand for Uniform Civil Code across India after the win of new 2014 government.
Comment: @Aby The supreme court ruled about a year ago that Muslims could not marry more than one wife.
Comment: That's a good news and great that atleast now we all have the same law.
Answer: Hindu cannon comes in two forms Shruti and Smriti. Shruti is divine revelation while Smritis are human constructs.
Human laws or Dharmashashtras are part of Smriti. There are many dharmashastras including the one by Manu, Vishnu, Narada etc. Smritis are context dependent and becomes obsolete after a 'yuga' has passed. The current constitution can also be considered a dharmashastra for the current yuga written by enlightened men of our age.
So, the legality of polygamy/polyandry in Hinduism is decided by the current dharmasastra which happens to be Indian constitution, which we all know forbids a man or women to have multiple partners.

Polygamy and Hindu Marriages


Can I Combine Two Lights from Separate Breakers Into One Switch?

Question: I have two outdoor lights that are separate switches.  I want to combine them under one switch, but Light A is on Breaker #3 and Light B is on Breaker #2.  Can I put these lights on the same switch or do I have to keep them separate since they are on different Breakers?  If I can combine them, what type of switch do I need?
Answer: Yes, you can do this. You will need a double pole single throw switch. They are commonly available at your home stores.....  be careful not to get a 4-way switch... they look almost identical.
Comment: However, now the 2 breakers must be handle-tied. 2 circuits, 1 yoke.
Comment: @Harper-ReinstateMonica  Good catch!


MS Project (2013): How to assess impact of overtime?

Question: I have set up what I think is a relatively simple 2013 project using the default settings. I start with some manually scheduled milestones at the beginning followed by a bunch of auto-scheduled tasks. I have 5 people on a team, and each person can work any task so I set up one resource that maxes out at 500%.
I now need to see what the impact to the project end date would be if everyone worked 50 hours per week rather than the default 40. I go into Project Options - Schedule and change Hours per day and Hours per week to 10 and 50, respectively. The auto-scheduled task durations change as expected (i.e. a 5 day task reduces to 4 days), but the start and finish dates do not (they still represent the original 40hr/wk timeline). Also, after changing the default hours per day and week, if I go manually change the duration the start and finish dates no longer update like they did prior to changing the hours per day/wk. Any idea what happened and how I can get the desired result (which is to shorten the project length by working more hours)?
Comment: 25% overtime for the duration of a project will have a lot of implications (including everyone leaving the project). What is the actual purpose of this exercise?
Answer: I was able to get some help on a different thread but figured I'd post the solution here in case anyone else has the same questions I did: the baseline calendar updates I made as described only got applied to the tasks, not the resource. I had to create a custom 10hr/day calendar and apply that to the resource. Although it may not be the best or most elegant solution, it seems to have had the desired effect.
Comment: You may want to mark your answer as the correct one.


Decline in JavaScript prompt() usage?

Question: I've been seeing less and less use of javascript's prompt function. I find it very useful but I was curious as to why the decline of usage. I see something very similar to it used everyday ( iOS password prompts ) and I'm wondering why it's not used more often on the web? Is it just not customizable enough for designers? Do users not prefer these cause it's hard to tell what page it originated from ( in some browsers )?
Comment: I don't know how you could be seeing it less and less. It was a pretty rarely used feature from the get-go because of how annoying it is.
Answer: There are many reasons to avoid the prompt box. There's a good list in this programmers.se answer but here are the reasons it's not helpful:
It's not customizable, full stop. You get to word your prompt and you can't even specify the wording to use for "okay" or "cancel," regardless of whether the prompt is for "Send Email" or "Kill my family". It's also impossible to style visually, while things like Jquery UI give you richer functionality while being fully customizable as well.
They're annoying, and they are always modal. With Jquery and other libraries you can make windows that aren't modal or windows that disappear when you click outside them.
When all prompts look the same and all prompts have the same options, you're training people to click okay (if that's the one that lets you continue); the okay button loses it's impact and just becomes the "shut up and let me finish this form" button.
There's some other more technical reasons, but that should be more than enough reason to never use them.
Comment: Why isn't inline validation an option if it's just a "you forgot your password" alert? If the form is all visible on one screen just show some red text when the field is passed over/left empty to clarify that it's needed. You can leave the password input right near the submit button and give a notification "you forgot your password!" when they click submit too.
Comment: Sometimes a modal window is exactly what you need.
Comment: The programmers.se answers were good but the examples are what mostly make the use of them look awful to me. I'm just prompting the user for their account password since it's needed to update their account (not my choice). It's an absolute necessity and people overlook entering it when it's not presented to them like that. I have the field I need in a `noscript` for now but I feel like this actually keeps the annoyance level down cause they don't get the error "You forgot to enter you password".
Comment: I just took a look at how Google does it on login and they seem to do it along the lines of what you suggest. I just hope it doesn't get lost with so many more fields there. It is already by the submit button so that should help. Thanks!
Comment: Lots of fields can make it complicated, Fark.com's profile editor is annoying for the reason you state; the password field is at the top and it's needed only once you hit the submit button at the bottom...if their functionality is married their physical location should usually be too =)
Comment: @BillCriswell also, all that said, if your question was *really* about making your password field stand out more without being annoying, that's how you should phrase your question =)
Comment: I was mostly just interested in the use of `prompt()`.
Answer: When I have my developer hat on, I used to use them quite a bit since they were incredibly easy to implement.
When I have my UX/UI hat on, I can appreciate the fact that they are quite limited in terms of visual presentation.
That said, we're now using them quite a bit more again in our mobile web sites. The advantage on them mobile side is that the JS alerts and confirm boxes are much more native to the device, so offer a sense of familiarity for the user. That and roll-your-own modals, while certainly doable, aren't necessarily a good UI element on a lot of mobile devices.
Answer: Ach. I bloody hate alerts. Having to answer a yes/no question by choosing ok/cancel is just a terrible experience. If you can use an alternative, please. It's not always possible, though.

Decline in JavaScript prompt() usage?


Did Bach ever use melodic minor keys in chorales?

Question: For example, E Melodic Minor would have C#, allowing for a ii7-V-I cadence.
Comment: Historical note: If you're talking about the chorales proper (rather than any other vocal music by Bach), the melodies of the chorales (set in the soprano voice by Bach) were not written by Bach himself, but rather come from various composers early in the Reformation (including Luther himself).  Music back then was still modal, and the only scales allowed are the modal ones (including the possibility of B-flat/B (i.e. B/H) ambiguity).  It's not possible to make melodic minor using the modal scale, so none of the chorale melodies will be in melodic minor.
Comment: There is no such thing as a melodic minor key.  There are major keys and minor keys.  The melodic minor scale was not even identified until probably a century after Bach died.  @AlexanderWoo but Bach's chorale melodies sometimes employ chromatic alteration; *Christ lag in Todes Banden* is a famous example, where the *fourth* degree of the (Dorian) scale is raised.  Surely there's one somewhere that has chromatic alteration of both sixth and seventh scale degrees.  Also, some melodies were composed later, or have chromatic alterations added later but before Bach.
Answer: Yes and no.
"Yes" because there are certainly moments where he uses the raised sixth and seventh scale degrees of a minor scale. In fact, a recent question discussed such an example: Functional analysis of chorale 'Wie wunderbarlich ist doch diese Strafe' BWV 244/46
But it's also "no" because there really aren't "melodic minor keys." Minor is just minor, and the fact is that music (especially by someone like Bach) rarely sticks to one "form" of minor. In practice, music in minor flows freely between the natural, harmonic, and minor forms of the minor scale. So it's a bit of a misnomer to ask whether Bach ever used a "melodic minor key"; instead, we simply acknowledge that music is in a minor key, and scale-degrees six and seven have a particular fluidity that allows them to be adjusted at various points.
Answer: Yes, all the time.  Because Bach (although he was quite prepared to be 'modal' at times) set down the foundations of functional harmony, built on dominant-tonic resolutions.  And if you want a perfect cadence in a minor key, you need a major dominant chord including the leading note.  And, for smooth voice-leading, that implies a melodic minor scale. ('Scale', not 'key'.  'Harmonic minor' isn't a key.)
Comment: But how would Bach use both C and C# or D and D# for instance?
Comment: Well, he probably wouldn't use them both in the same phrase!
Comment: More than likely he'd use C# and D# going up and C and D natural coming down. This is because it's what a singer would naturally do, it's comfortable such that the  notes lead onwards smoothly and it allows the required harmonies. . .
Comment: "Bach set down the foundations of functional harmony": those foundations were well in place decades before Bach was born.  The raised leading tone (in modes that have a whole step below the final) was used for *centuries* before Bach, long before tonal harmony was anywhere close to being on the scene.
Answer: The raised 6ths and 7ths in minor are mostly used when the line is ascending toward the tonic. Bach used this very often. When the line is descending away from the tonic, the 6th and 7th degrees are often used as they would be in the natural minor. It is quite common to have both the natural and raised 6th and 7th degrees in the same phrase, depending on how the line flows. One line can easily go up and down in relation to the tonic within the same phrase, and the notes would be adjusted accordingly.
Comment: This answer describes melodic minor nicely, but it does not address the question, which is about Bach's *use* of melodic minor.


Is there a difference between OP_PUSHBYTES and OP_PUSHDATA

Question: In some documentation about Script we sometimes have to use OP_PUSHBYTESx or OP_PUSHDATAx to indicate that some number of bytes will be an element to read.
They seem to do the same thing so is there a reason they have different names ?
Comment: In what documentation ? I believe you are talking about how `rust-bitcoin` refers to the OPs `> OP_FALSE` and `< OP_PUSHDATA1`
Comment: When you click on "Display Script" on this page https://tbtc.bitaps.com/3dd3d1ec850769aac2359efd642ebe292e60502fc17dc33d7be1bc3cc6678621/mvEg6eZ3sUApodedYQrkpEPMMALsr1K1k1 and https://en.bitcoin.it/wiki/Script
Comment: Ok; it's what rust-bitcoin does too. Writing an answer.
Answer: In what documentation? I believe you are talking about how rust-bitcoin refers to the OPs > OP_FALSE and < OP_PUSHDATA1 and will answer as such.
There are multiple OP codes pushing bytes to the stack, defined as integers.
Special case: pushing small integers
There are dedicating OP codes for pushing integers from -1 to 16 (named OP_1NEGATE, OP_0 and OP_1 to OP_16 and valued 0x4f, Ox00 and 0x51 to 0x60).
They are used for instance for (smallish) multisigs as it saves you 1 byte per number pushed compared to using a "real" push opcode.
"PUSHBYTES": pushing small byte arrays
The (not named in the reference implementation) OP codes valued from 0x01 to 0x4b allow to push from 1 (0x01) to 75 (0x4b) bytes to the stack.
They are commonly used to push pubkeys and signatures.
PUSHDATA: pushing byte arrays
The PUSHDATA1, PUSHDATA2 and PUSHDATA4 (0x4c, 0x4d and 0x4e) operands are used to push a byte array to the stack which size is defined as a variable-length integer .
Further: too many encodings!
This flexibility of encoding introduced malleability in the scriptSig, which was not protected by the signature (which it carries).
BIP62 proposed to restrict this encoding to avoid possible malleation.


RDWeb icons showing rdp instead of native icons

Question: I have a server with Windows 08 R2 on it and it is dedicated as an RDS server for RDWeb. The programs that have been installed show as RDP icons instead of their native icons. I have tried several things to try and resolve this but I am drawing a blank on what is causing this issue. Can anyone help me with this?
Answer: Resolved!
This was fixed by adding the corresponding ICO file to c:\Windows\System32. This allows RDWeb to access the files from a local directory instead of a network path.


deriving covariance of SDE from fokker-planck

Question: In the book 1 the covariance of an SDE is derived. I am not sure about a particular step. Let me describe it in a TLDR version, then in a longer version.
We have an SDE
$$dx = f(x,t) dt + L(x,t) d\beta $$
where $x$ is a vector, $\beta$ is a Brownian motion and $L$ is a matrix.
In the derivation of the variance of the SDE, we want to use the following identity which holds for any function $\phi$ (Fokker-Planck / forward Kolmogorov)
$$\frac{dE[\phi]}{dt} = E\left[\frac{\partial \phi}{\partial t} \right] +\sum_i E \left[\frac{\partial \phi}{\partial x_i} f_i(x,t)\right]+ \frac{1}{2}\sum_{i,j}E\left[\left(\frac{\partial^2 \phi}{\partial x_i \partial x_j}\right) \left[L(x,t) L^T(x,t) \right]_{ij}\right]$$
So we define
$$ \phi(x,t):= x_u x_v -m_u(t)m_v(t) $$
where $x$ is a vector $x_u, x_v$ are two components and $m_u(t) := E[x_u(t)]$ is the (time-dependent) expectation of the $u$-th component.
The book makes the assumption that

$\frac{\partial \phi}{\partial x_u} = x_v -m_v(t)$, so they assume in particular $\frac{\partial m_u(t)}{\partial x_u}=1$... but $m_u(t)$ is the expectation of $x_u$ so it is in particular independent of $x_u$ and hence its derivative should be 0?

They assume $E[\frac{\partial \phi}{\partial t}]=0$... but why can we say that? Both the random variables $x_u, x_v$ depend on time and so do their means $m_u(t),m_v(t)$. Further, since  $L$ is not necessarily the identity, $x_u$ and $x_v$ may be dependent.

1 eq. 5.49 on p.70 of  Simo Särkkä and Arno Solin (2019). Applied Stochastic Differential Equations. Cambridge University Press the full book has been uploaded by the author legally HERE
The description above should be complete, but let me give for context the section in the book below. My question arises in Eq. 5.49, where the described assumptions above have been made.
Comment: What have you tried? Your assumptions $\frac{\partial m_u(t)}{\partial x_u}=1$ and $E[\frac{\partial\phi}{\partial t}]=0$ are false.  Give it another try with my answer. (The first assumption does not make sense, because $m_u$ does not have $x_u$ as an argument.)
Comment: Besides that, you probably want to avoid stating that the authors assume "this and that". Just communicate that you couldn't derive (5.49) and what thoughts you had along the way of trying to derive it.
Answer: It holds
$$
\begin{aligned}
\frac{\partial \phi}{\partial t}&=-\frac{\partial m_u}{\partial t}(t)m_v(t)-m_u(t)\frac{\partial m_v}{\partial t}(t)\\
\frac{\partial \phi}{\partial x_u}&=x_v\\
\frac{\partial \phi}{\partial x_v}&=x_u\\
\frac{\partial^2 \phi}{\partial x_v\partial x_u}&=\frac{\partial^2 \phi}{\partial x_u\partial x_v}=1\\
\end{aligned}
$$
Plugging these into (5.47) yields (5.49). Notice that
$$-\frac{\partial m_u}{\partial t}(t)m_v(t)=-E[f_u(x,t)]m_v(t)=E[-m_v(t)f_u(x,t)]$$
by (5.48) and since $m_v(t)\in\mathbb{R}$.


Why in Variational Auto Encoder (Gaussian variational family) we model $\log\sigma^2$ and not $\sigma^2$ (or $\sigma$) itself?

Question: In theory the encoder in VAE (assuming that variational family is Gaussian) generates the $\mu$ and $\sigma$ (or $\sigma^2$). But, in practice, I have seen people assuming the output is $\log\sigma^2$. Why this is necessary or useful?
Answer: it brings stability and ease of training.
by definition sigma has to be a positive real number. one way to enforce this would be to use a ReLU funtion to obtain its value, but the gradient is not well defined around zero. in addition, the standard deviation values are usually very small 1>>sigma>0. the optimization has to work with very small numbers, where the floating point arithmetic and the poorly defined gradient bring numerical instabilities.
if you use the log transform, you map the numerically unstable very small numbers in [1,0] interval to [log(1), -inf], where you have a lot more space to work with. calculating log and exp are numerically stable and easy, so you basically gain space where your optimization variable can move within.
please do not confuse: people do not use the log(sigma) value as the sigma value, but always transform it back to the original space. also in VAEs, you need the log(sigma) value in the Kullback-Leibler divergence term, so you need to calculate it anyways...
Comment: Thanks - no I wasn't confusing the two. I was just wondering what is to be gained by modelling the $log$. Your answer makes it clear :)!
Comment: "no I wasn't confusing the two", yeah I figured you got it right, but still wanted to write for other people reading this as well.


Is a tiny dent in a compressor tank a safety concern?

Question: I saw some questions and answers on air compressors so I thought I would ask one: I just purchased a Chicago Pneumatics 21 gallon compressor and I noticed a tiny dent about 3+ inches from the upper seam, (almost unnoticeable, like the edge of something hit it or the tank fell on it). Again, it is really shallow, but is this something to worry over?
Comment: And it's *Chicago* Pneumatic?  I ask because CP is a top-shelf supplier to industry, oil rigs, factories etc. at par with Ingersoll-Rand.   I find it a bit surprising that a CP dealer would let a dinged unit out of their shop.   Reason I ask is that certain purveyors of Cheese junk love to use confusingly similar brand names, such as Central Pneumatic, which is a house brand of Harbor Freight.
Answer: As the reservoir for an air compressor holds air under pressure, the forces on the dent will be outward. If the dent is not on a seam or other metal discontinuity, and is shallow enough, little will happen. When it is pressurized the first time, if it does not "un-dent" itself, you likely have little about which to worry. Even if it does pop out, it won't go beyond flush and again, no worry.
Keep an eye on the dent. If the paint is scratched and the metal under begins to rust, not so good. If the paint is cracked or scratched, consider to apply primer and topcoat to remove future rust problems.
Rust is a problem over long periods of time, especially on the inside, so drain your tank frequently and examine it for outside rust and damage as well.
Comment: I would be afraid to use the tank if it pops back out. If the paint was not damaged the dent may have been there prior to being finished, pressure tanks are tested to 5/3 working pressure and on low pressure tanks they are usually much stronger than this value.


Coefficient of the leading term of a polynomial by multiplication of two polynomials

Question: Let $f(x)=a_{0}+\cdots+a_{m}x^{m}$ and $g(x)=b_{0}+\cdots+b_{n}x^{n}$. Polynomial multiplication is defined by $$f(x)g(x)=d_{0}+d_{1}x+\cdots+d_{n}x^{n}$$ where $d=\sum_{i=0}^{n}a_{i}b_{n-i}$. Intuitively, the leading term of $f(x)g(x)$ is $a_{m}b_{n}x^{m+n}$. But using the formula, $$d_{n}=\sum_{i=0}^{m+n}a_{i}b_{m+n-i}.$$ This suggests that $$\sum_{i=0}^{m+n}a_{i}b_{m+n-i}=a_{m}b_{n}.$$ How do I prove this?
Answer: The "convolution formula"
$$
 d_k = \sum_{i=0}^{k}a_{i}b_{k-i}
$$
for the coefficients of the  product of
$$
 f(x)=a_{0}+\cdots+a_{m}x^{m} \\ g(x)=b_{0}+\cdots+b_{n}x^{n}
$$
requires that we define $a_i = 0$ for $i > m$ and $b_j = 0$ for
$j > n$. Then
$$
\sum_{i=0}^{m+n}a_{i}b_{m+n-i}=a_{m}b_{n}
$$
holds because in the sum all terms with $i \ne m$ vanish.
Answer: Calling
$$
\left(\sum_{k=0}^m a_k x^k\right)\left(\sum_{j=0}^n b_j x^j\right) = \sum_{k=0}^m\sum_{j=0}^n a_k b_j x^{k+j}
$$
making now
$\nu = j + k$ we have
$$
\sum_{k=0}^m\sum_{j=0}^n a_k b_j x^{k+j} = \sum_{\nu}^m\sum_{k=0}^{\nu}a_k b_{\nu-k}x^{\nu}\Rightarrow d_{\nu} = \sum_{k=0}^{\nu}a_k b_{\nu-k}
$$
NOTE
This summation is performed over a rectangular lattice so care should be taken at the limits.  This operation is known as convolution.


Can I create a custom DialogPreference based on a pre-existing custom Dialog?

Question: In my Android project I've already created a custom dialog: A class named SelectColorDialog, extending Dialog, that allows the user to view a large matrix of color cells in order to select a particular color.  The dialog returns the selected color value (as Integer) to the dialog initiator – typically an Activity – via a callback function.
I've a similar custom dialog, SelectTypefaceDialog, to allow easy font selection. A list of available typefaces are shown, as ListView rows, each identified by name and with an associated short sample text rendered in that typeface. The available typefaces include usual droid fonts, such as NORMAL,  MONOSPACE, etc. as well as any externally sourced TTF font files that the user cares to load into a particular subdirectory on the SDCard.
These custom dialogs were not initially designed to be used directly in conjunction with SharedPreferences, preferences definition XML files  or with any PreferenceActivity.  Instead of, each dialog can be popped up from any activity, via the user pressing a button or via a menu item.  The activity classes that create these dialogs also have internal callback classes, selection event listeners, to detect when the user selects a color or font.
These two dialogs do not have OK and Cancel buttons.  Instead, the user just clicks on an item - a view of some kind - in the dialog to select the corresponding color or typeface value (implicit OK) or else presses the device's back button to dismiss the dialog with no action taken (implicit Cancel).
I would now like to go further and incorporate these two custom dialogs into the shared preferences framework via a preferences.XML and an associated PreferenceActivity.
I would prefer to base two DialogPreference subclasses directly on these existing dialogs if possible, but I cannot see how to do so.  I suspect that I cannot, and that I'll need to start all over again, and copy or adapt all the java code that is presently in the custom dialog classes – for color or font display and selection – directly into the custom DialogPreference classes instead, perhaps by overriding onCreateDialogView() and/or other methods?
Answer: This question may be a bit old, but I hope to help those, looking at the same problem in future: just extend Preference instead of DialogPreference. DialogPreference is designed badly and expected "official" way to use custom Dialog - overriding protected showDialog method does not work, because this single method contains half of class logic.


Input focus stays with vmware guest when host gets locked

Question: I am using a combination of xautolock and slimlock to automatiacally lock my machine if it does not receive input.
~/.xinitrc:
xautolock -locker /usr/bin/lockify.sh -time 5 &

/usr/bin/lockify.sh:
#!/bin/bash
DONTLOCK=false

if pidof gnome-mplayer
then
    DONTLOCK=true
else
    echo "gnome-mplayer is not running"
fi

if $DONTLOCK
then
    echo "Watching Video, not locking screen"
else
    /usr/bin/slimlock
fi

Only recently I discovered that this is a problem, when I have a VMWare guest running in the foreground. What happens is that when the lock-screen is engaged the keyboard input seems to remain with my vmware-guest so I cannot unlock my host system.
Does anyone know how I could ensure that input focus is transferred back to my host before the system is locked?
Answer: The easiest way to deal with this is to install VMware Tools in the guest, so that your system never has to lock the keyboard/mouse to the guest in the first place.
If you don't want to do a full VMware Tools install, you can probably get by with just enabling the vmmouse X driver in the guest in /etc/X11/xorg.conf, something like:
Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice "Mouse0" "CorePointer"  # Add this line to this section
EndSection

# Add this section
Section "InputDevice"
        Identifier "Mouse0"
        Driver "vmmouse"
        Option "Device" "/dev/input/mice"
EndSection

This sample was taken from a working system where I had to manually enable the guest integration as it wasn't autodetected.
Comment: Interesting. Thought I had installed the tools. Will recheck. Thx.
Comment: Nope. Didn't help :-/
Answer: I had the same problem on my windows pc. To be able to enter the password, I had to press Ctrl + Alt to transfer focus to the unlock screen. This is not a real solution, because there is no way to see why the keyboard is not working in the unlock screen. But I hope this might help someone. See also this VMware KB entry.


Chi-squared test and logistic regression

Question: Is there a relation between chi-squared test and logistic regression model in a similar manner between ANOVA and linear regression?
Comment: @Jeremy can you show a small example?  I wouldn't expect it to be actually true (except approximately) and I can't seem to generate an example that shows it. I'd have expected that maybe it could happen with the G-test rather than the ordinary chi-square.
Answer: If the setting is a $r\times 2$ contingency table, crossclassifying a binary variable with an (unordered) factor with $r$ levels, you can use binary logistic regression or a chi-squared test, and you will get very similar answers.
The logistic regression will give the likelihood-ratio test, and the Pearson Chi-square is the corresponding score test. Details:  G-test vs Pearson's chi-squared test.  For an $r\times c$ contingency table (both factors unordered) much the same will be true replacing multinomial logistic regression.  So logistic regression can be a good starting point if you need some extensions/generalizations to these chi-squared tests.


Submission for IEEE-template-based paper in Arxiv

Question: Can we submit our journal paper(formatted in IEEE-paper style) in arXiv which is already submitted in IEEE journal for review(the paper's decision is not yet made)? or it's mandatory to publish the paper only in arxiv format
Regards
Comment: You should first check whether a preprint is allowed to be submitted or not by the journal. Few Journals do not allow it. Otherwise there is no template restriction on arXiv.
Answer: There are two main points to your question that I will address.
IEEE policy for preprints
For IEEE, you are in general allowed to post the submitted version of the paper on arXiv while it is undergoing peer review (provided your specific journal doesn't have policies prohibiting that, e.g. if it is a double-blind journal). This is outlined in the IEEE author's rights document (https://www.ieee.org/publications/rights/rights-policies.html, with a nice summary here http://journals.ieeeauthorcenter.ieee.org/wp-content/uploads/sites/7/IEEE-Article-Sharing-and-Posting-Policies.pdf). Specifically, the policy says:

IEEE seeks to maximize the rights of its authors and their employers to post preprint versions of an article on the author's personal Web site, on a server operated by the author's employer, or on a server operated by an approved not-for-profit third party as specified in 8.1.9.G.2 below.

arXiv is one of the approved third-party hosting servers for the IEEE.
The main stipulation is that once the article has been accepted and issued a DOI, the posted preprint needs to be updated to include that information, as stated in the preprint policy:

D. E-PRINTS
Before submitting an article to an IEEE publication, authors frequently post preprints of their articles to their own Web site, their employer's site, or to another server that invites constructive comment from colleagues and provides a publication time stamp. Upon submission of an article to IEEE, an author is required to transfer copyright in the article to IEEE, and the author must update any previously posted version of the article with a prominently displayed IEEE copyright notice (as shown in 8.1.9.B). Upon publication of an article by IEEE, the author must replace any previously posted electronic versions of the article with either (1) the full citation to the IEEE work with a Digital Object Identifier (DOI), or (2) the accepted version only with the DOI (not the IEEE-published version). IEEE shall make available to each author the preprint version of the article that the author can post and that includes the DOI, IEEE's copyright notice, and a notice indicating that the article has been accepted for publication by IEEE.

This means that you are allowed to post the author-accepted version of the manuscript on arXiv (i.e. the one from after all peer-review is completed but before you submit the final files to IEEE for their formatting), but it must contain a link to the DOI of the IEEE manuscript. arXiv provides a mechanism to include the DOI on a submission, so you need to update the submission to have that.
Format of papers for arXiv
There is no "arXiv template" that must be followed, and so the exact formatting of the paper is entirely left to you as the author. If you want, you can use the same IEEE template you used for the original journal submission, or you could change it to be a different type (e.g. simply the LaTex article class, SIAM template, etc.).
Answer: No, that is often not allowed. Once an article is published, it becomes the property of the publisher (check with them first). In your case though, it may still be problematic after it is accepted. Therefore, you may come into problems if you make it available on ArXiv, i.e. if the content is usually behind a paywall but you make it available for free on ArXiv.
Comment: This is not true for IEEE papers, which the poster is specifically asking about. IEEE specifically lets you post to arXiv and still transfer the copyright to IEEE with no future problems (see my answer below).
Answer: ArXiv has no "format". You can publish using whatever format you want there.
Do check your journal's preprint policy though, because they might ask for certain things once your paper is accepted (e.g. to credit them as the copyright holder).


Can we change the "down for maintenance" page?

Question: Right now the down for maintenance page looks like key mappings for some sort of video game.  Shouldn't we have a more relevant down for maintenance page?
Answer: I am guessing that what you see is a generic 'downtime page' that is common for all beta SE sites. Once we get out of beta then perhaps we will/can have our own customized page.
Answer: The offline page wasn't intended to be site specific (was trying to show controls of arbitrary complexity) but it was interpreted that way.
I have changed it to a simple flat grid background now.


Can I skip the last leg of the journey?

Question: I live in Detroit and I'm flying into Toronto from an international destination. My last leg of the journey is from Toronto to Chicago. Instead of taking the last leg of the journey, can I exit the Toronto airport after completing Canadian immigration/customs and drive to Detroit? I save a ton of time. Thanks
Comment: Does this answer your question? [May I get off in an intermediate city of my route during transfer?](https://travel.stackexchange.com/questions/131324/may-i-get-off-in-an-intermediate-city-of-my-route-during-transfer)
Comment: Will you have any checked bags?
Answer:
can I exit the Toronto airport?

Two things to consider. This will violate the terms and conditions of your ticket. Since it's your last leg, the airline cannot easily retaliate by cancelling your other leg, but they may ding your status, revoke miles etc. In rare cases the airline has actually sued a passenger but so far without success.
Read up on "hidden city ticketing" for more information.
The second thing to watch out for is that Toronto has US pre-clearance. That implies that your bags will be checked through to the US and not unloaded in YYZ.  I'm  not entirely sure whether you officially enter Canada for International->US connection in a pre-clearance airport.  The airlines typically provide passenger lists to immigration. You getting off in Toronto may create discrepancies between what these lists and what actually happened. I have no idea whether this is a potential problem or not.
Comment: "I'm not entirely sure whether you officially enter Canada for International->US connection in a pre-clearance airport." When you arrive at a Canadian airport, you must either go through US preclearance or go through Canadian immigration, so if the OP doesn't go through US preclearance (or goes through US preclearance but wishes to leave the airport), he will have to go through Canadian immigration and officially enter Canada.
Comment: I understand that. The question is whether a US bound passenger will be reported to the Canadian immigration as "entering Canada" as well or not. I don't know how this is recorded on the passenger manifest and what happens if the manifest and the actual behavior at the point of immigration are in conflict
Answer: The airline doesn't like when you do this because of Hidden City Ticketing. They will cancel the rest of the trip (if you have a return ticket, that will also be cancelled). You may suffer more consequences if you do this regularly, like cancellation of frequent flyer program, etc and even a ban.
Comment: If you have evidence of a ban actually happening to someone, please add an example here: https://travel.stackexchange.com/questions/107019/have-any-airlines-ever-banned-anyone-for-exploiting-hidden-city-or-throwaway-tic. As far as I know this is an old wives tale.
Comment: While what you say is correct, the OP wants to skip the last leg, so there is nothing left to cancel.
Comment: @PeterM True as this journey, but not completely correct: we have read here of travelers who have had their frequent flyer accounts cancelled or received a ban from that airline.
Answer: One thing you might want to consider is calling the airline and asking if you can change the flight to stop in Toronto.  In particular, if you are flying Air Canada for example (if that's why you flew through Toronto), the odds are the Toronto flight is much cheaper than the Chicago flight - for example, LHR-YYZ is much cheaper than LHR-YYZ-ORD, less than half the price.  Obviously last minute it's more expensive, but it's possible they'd prefer to sell the YYZ-ORD flight to someone else.
Comment: The whole idea of hidden city ticketing is that the pricing is often the other way around. Flying A->B->C is often a lot cheaper than just flying from A->B. Example: DUS->AMS->BOS used to be half the price of just AMS->BOS. This is clearly NOT intuitive but just the bizarre way airline dynamic pricing works . Airlines hate it when passenger actually take advantage of their non-sensical pricing.
Comment: @Hilmar Yes, I understand that, but it doesn't sound like that was necessarily the intent here - it is not clear from the OP but it may be they just changed their mind.  Obviously if this isn't the case then this isn't the answer for them :) Air Canada often is cheaper directly from Toronto though, which is the biggest major airline that makes much sense to fly through Toronto as a hub.
Comment: Your mileage may vary but in my experience flight changes tend to be expensive. United once charged me $250 for NOT taking a flight that I already had paid for. No refund, no credit, no voucher but in essence a $250 penalty. I had to cough it up since I had another international segment on that ticket.

Can I skip the last leg of the journey?


Rim tape size for 17mm rims(internal)

Question: Just a short question is 18mm enough to cover the rim entirely or do I need a bigger size like 21/23mm?
Answer: If you are using a tubeless tape (whether or not you'll be setting the wheel up tubeless), going 5mm-6mm wider than the internal width is a good rule of thumb. Inner width plus 5mm is ideal if you have that exact size tape at hand, but if you don't then it usually works better to go a little wider than narrower. There's some variation among tire and rim manufacturers in what they recommend generically - for example, Stan's says inner width +2mm and WTB is inner width +5mm, even though their rims and tape are both very similar in design. I tape a lot of random and OEM tubeless rims, usually with little time to deliberate, and usually just do the +5mm, which is also usually basically the same as the outer rim measurement. A little bit riding up the inner sidewall is okay as long as you can get it to conform neatly and it doesn't curl on to itself.
For non-tubeless tape, all you usually care about is will it cover the spoke holes and sit neatly in the rim well. Some low-end rims have vent holes or other rough spots that need to be covered as well. Most non-tubeless rims have a range of tape widths that can work, but I usually go for whatever width goes from sidewall to sidewall on the inside, such that it can't possibly squirm out of place and leave a spoke hole uncovered. This is usually a few millimeters wider than the inner width measurement (since the inner width is going from hook to hook). 18mm tape on a 17mm internal will usually be good. The main exception is some rims in the world have a more defined channel type area in the middle where the tape is intended to lay, so use whatever neatly fills in that channel for those rims.
Answer: This is a personal preference. You certainly need to go wider than inner rim width. This is to account for:

The channel in the middle of the rim
The tape stretch. Some tapes are "stretchier" than the others and as you  pull on the tape it will become longer and narrower. The effect is minor but not negligible.

There is no "rule of thumb" to decide how much wider the tape should be, but I would say 18mm is too narrow. 20 should be OK.
Take the tires into consideration. If you will be running tubeless, then you don't want the rim tape to go onto the rim sidewall where the tire/rim interface is. If you run inner tubes, then it is perfectly normal to have rim tape "too wide and overlapping the rim sidewall a bit. For this last scenario it is in fact much easier to apply the oversized tape...

Rim tape size for 17mm rims(internal)


differentiability at a point (0,0) based on partial derivatives

Question: For $$
  f(x,y)=\begin{cases}
    y^2 sin\left(\frac{x}{y}\right) & \text{if } y\neq0 \\
    0 & \text{if } y=0
\end{cases}$$
i've shown that it is continuous and that the partial derivatives exist in $\mathbb{R}^2$. However, it appears that the partials are not continuous at $(0,0)$; is this sufficient to show that $f$ is not differentiable at $(0,0)$?
Comment: Isn't. Partial derivatives can be discontinuous while the function is differentiable.
Answer: Absolutely not and here's a good counterexample. To prove that a function is continuous but not differentiable, you have to demonstrate there is no linear mapping that satisfies the limit operation in $R^3$. This can be tricky, as it involves showing this limit doesn't exist at at least one point and this can be true even if the partial derivatives exist.
Answer: No it is not. A function is continuously differentiable on an open set iff it is partially continuously differential on that set. But there are certainly functions, which are differentiable, but not continuously differentiable.
You have to show that the partial derivatives do not coincide with a common linear map applied to the direction of the derivation.


Which camera is better for Arduino

Question: I  am looking for a CAMERA ( CMOS + Shield ) to implement on my Arduino project. I was using the LinkSprite JPEG but now is broken, I want to buy a new one but I am not sure that the LinkSprite is the better camera to use with Arduino.
The issue that I found on Linksprite was the slowness to download the picture and I couldn't to change the bitrate ( there is the command but didn't work ).
I found that there is the camera C328 that it was used for a lot of projects but now it's seems that is out of stock.
If you suggest me to rebuy the LinkSprite, do you have any example that I can take a look?
Answer: AVRcam looks nice.
Comment: Yeah but I am looking something that the people know how to implement it on Arduino. The most supported camera for Arduino :)

Which camera is better for Arduino


Showing an ideal is a projective module via a split exact sequence

Question: Let $R=\mathbb{Z}[\sqrt{-6}]$ and $I=(2,\sqrt{-6})$ the ideal generated by $2$ and $\sqrt{-6}$.

I want to show that $I$ is a projective $R$-module by producing a short exact sequence that splits, has a free $R$-module as the middle term, and with $I$ as one of the other terms.

I first tried to produce an $R$-module homomorphism $g:R^{2}\rightarrow I$ by $(r,s)\mapsto 2r+\sqrt{-6}s$, then find another $R$-module homomorphism $h:I\rightarrow R^{2}$ such that $g\circ h=id_{I}$, but I failed.
Comment: Linking this with  [a closely related thread](https://math.stackexchange.com/q/321255/11619).
Answer: Alex Youcis gave the general result. A mechanism for expressing an ideal $I$ of a Dedekind domain as a direct summand of a free module is to use the inverse in the class group. If $J$ is a fractional ideal representing the inverse, then we can (by scaling) arrange things such that $IJ=R$. This means that we can represent $1$
$$
1=\sum_{t=1}^k i_tj_t
$$
as a finite sum with some elements $i_t\in I, j_t\in J$. By the definition of the inverse, all the products $ij, i\in I, j\in J$ are elements of $R$. It is then easy to show that the elements $i_t$ (resp. $j_t$) generate $I$ (resp. $J$) as an $R$-module. Therefore we have the following covering of $I$ by a free $R$-module:
$$
p:R^k\rightarrow I, (r_1,r_2,\ldots,r_k)\mapsto \sum_{t=1}^k{r_ti_t}.
$$
This is split by the mapping
$$
s:I\rightarrow R^k, i\mapsto (ij_1,ij_2,\ldots,ij_k).
$$
As $s$ is clearly a monomorphism $s(I)\simeq I$, and we can conclude that $R^k\simeq s(I)\oplus \mathrm{ker}\, p$.
In the specific example case we can use the fact that $I$ is of order two in the class group. More precisely,
$$
I^2=(4,2\sqrt{-6},-6)=(2)
$$
is principal. Thus we can use $J=\frac12 I$ as the inverse fractional ideal. So $J$ is the $R$-module generated by $1$ and $\sqrt{-6}/2$. We can write
$$
1=4-3=4\cdot1+\sqrt{-6}\cdot\frac{\sqrt{-6}}2
$$
in the prescribed way, where in all the terms the former factor is from $I$ and the latter from $J$. The general recipe gives us a cover mapping
$$
\begin{eqnarray*} p:&R^2&\to I\\
& (r_1,r_2)&\mapsto 4r_1+\sqrt{-6}r_2\end{eqnarray*}
$$
that is split by the $R$-homomorphism
$$
\begin{eqnarray*} s: &I& \to R^2\\
 &i&\mapsto \left(i,i\,\frac{\sqrt{-6}}2\right).\end{eqnarray*}
$$
Comment: By the way, there is no need to check *a priori*  that the elements $i_t$ generate $I$. This follows from $p$ being surjective, since $p\circ s$ is the identity of $I$.
Comment: Just to make sure. My answer was intended to give an argument for the general result cited by Alex (all the contents of his +1 OP). Then we both added details more pertinent to the example case in the original question. Unfortunately our edits intertwined on the time axis in a way that may make it unclear what the point of each addition was :-)
Comment: I had never realized that the equality $IJ=R$ allows you to explicitly pin down  $I$ as a direct summand of a free module: thanks for posting this wonderful trick ! (And +1, needless to say)
Answer: Note that since $-6\equiv 2\text{ mod }4$ we have that $\mathcal{O}_{\mathbb{Q}(\sqrt{-6})}=\mathbb{Z}[\sqrt{-6}]$ and so $\mathbb{Z}[\sqrt{-6}]$ is a Dedekind domain. It is then a common fact that an integral domain $R$ is a Dedekind domain if and only if every ideal is projective.
Here's how one might proceed:

Theorem: Every ideal of a Dedekind domain $R$ is projective.

Let's prove this.
Let $R$ be a Dedekind domain and let $I$ and $J$ be nonzero ideals of $R$. We proceed as follows:
a) Show that there exists $j\in J$ such that $I+jJ^{-1}=R$, hence there exists $i\in I$, $j\in J$, and $k\in J^{-1}$ such that $i+jk=1$.
b) Let $M$ be the matrix $\begin{pmatrix}i & j\\ -k & 1\end{pmatrix}$ and let $N=\begin{pmatrix}1 & -j\\ k & i\end{pmatrix}$. Show that the map $(x,y)\mapsto (x,y)M$ maps $R\oplus IJ$ to $I\oplus J$, and that $(x,y)\mapsto (x,y)N$ is the inverse map. Thus, $I\oplus J\cong R\oplus IJ$ as $R$-modules.
c) Show that $I$ is a projective $R$-module.
PROOF:
a) We rewrite this equation as $IJ+(j)=J$. Now, since $R$ is a Dedekind domain we know that $IJ$ is $2$-generated, say $IJ=(\alpha,\beta)$. Now, looking at the proof that every ideal in a Dedekind domain is $2$-generated one can see that we, in fact, can prove that if $I$ is an ideal and $\alpha\in I$ then there exists $\beta\in I$ such that $(\alpha,\beta)=I$ (in other words, we can choose one of the generators arbitrarily). Thus, note that $\alpha\in IJ\subseteq IJ$ and so by prior remark we can find $\gamma\in J$ such that $(\alpha,\gamma)=J$, we see then that $IJ+(\gamma)=(\alpha,\beta,\gamma)$ and since $(\alpha,\gamma)=J$ and $\beta\in J$ we see that $(\alpha,\beta,\gamma)=J$ as desired.
b) We note that
$$(x,y)M=(ix-yk,jx+y)$$
Now, $ix\in I$ since $i\in I$, and $yk\in I$ since $y\in IJ\subseteq I$, and thus we see that $ix-yk\in I$. Similarly, $jx\in J$ since $j\in J$, and $y\in J$ since $y\in IJ\subseteq J$. Thus, we see that $M$ really does give a map $R\oplus IJ\to I\oplus J$. Now, we see that
$$(x,y)N=(x-yk,yi-jx)$$
Now, evidently $x-yk\in R$. Note then that $yi\in IJ$ since $y\in J$ and $i\in I$, and $jx\in IJ$ since $x\in I$ and $j\in J$--thus, we see that $yi-jx\in IJ$. Thus, we see that $N$ really is a map $I\oplus J\to R\oplus IJ$. Now, one just computes that
$$MN=NM=(i+jk)I=I$$
and thus $M$ and $N$ are inverses of each other as desired. Since $M$ is a linear bijective map it follows that it is an isomorphism $R\oplus IJ\xrightarrow{\approx}I\oplus J$.
c) We can find an ideal $J$ of $R$ such that $IJ$ is principal, and thus a free $R$-module. We see then that $I\oplus J\cong IJ\oplus R\cong R\oplus R$ and thus $I$ is a direct summand of a free module, and thus projective.
Comment: @AlexYoucis +1 For your answer. However what puzzles me is whether we can always find an ideal $J$ so that 1) $I + J =R$ and 2) $IJ$ is principal. If this is true, my answer below then shows that every ideal in a Dedekind domain is a projective $R$ - module.
Answer: First we note that your ring $R$ is the ring of integers of $\Bbb{Q}(\sqrt{-6})$. Now suppose we can find an ideal $J$ so that

$I + J = R$
$IJ$ is principal equal to $(x)$, for some $x \in R$.

Then we claim that $I \oplus J \cong R \oplus IJ$ and thus $I$ is a direct summand of a free $R$ - module, hence projective. Indeed to see this, first we establish the existence of an ses
$$0 \longrightarrow I \cap J \stackrel{(x,-x)}{\longrightarrow} I \oplus J \stackrel{x+y}{\longrightarrow} R \longrightarrow 0.$$
The surjectivity of the map $I \oplus J \to R$ is established because $I + J  = R$, while the injectivity of $x \mapsto (x,-x)$ is clear. Exactness at $I \oplus J$ is clear, so this shows that the sequence above is indeed an ses. Because $R$ is free, by the splitting lemma the ses above is a split ses and so
$$I \oplus J \cong IJ \oplus R.$$
In your example above we can simply take $J = (3,\sqrt{-6})$. This is because $1 = 3-2 \in I+J$ and $IJ= (6,2\sqrt{-6},3\sqrt{-6},-6) = (\sqrt{-6})$.