Can we estimate the size of a neutron star based on direct observation?

Question: Are there any neutron stars near enough for astronomers to get a good size-estimate, based on direct observation? I know that there are many theories regarding what happens inside neutron stars, but I want to know if there are any direct observations of nearby neutron stars which give us a clue as to their actual size and density.  Other answers have not helped me, because they were based on THEORY, not DIRECT OBSERVATION !!
Comment: Possible duplicate of [Size and density of neutron stars](http://physics.stackexchange.com/q/264995/)
Comment: Related question by OP: http://physics.stackexchange.com/q/265006/2451 Related Astro.SE question: http://astronomy.stackexchange.com/q/16559/476
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/42638/discussion-on-question-by-perfesser-creek-water-can-we-estimate-the-size-of-a-ne).
Answer: I think if there is a binary system of stars then the size of neutron stars can be estimated. This method i would call direction estimation because even for most direct observations various theories are always involved.
When the neutron star passes over the burning star its intensity is dimmed. How much it is dimmed depends on the size ratio of visible and neutron star, how long it remain dimmed will depend on the velocity of the neutron star (or star binary) and diameter of the visible star.
The binary star rotates about its center of mass with some speed and that can be estimated from Doppler shift.
Combining these factors can give you the size of neutron star.
This article may be helpful
Comment: @PERFESSER I have take issue with you again. It is incumbent upon you to learn something about scientific methods. The estimation of the sizes of stars through eclipsing binary systems is a fundamental, geometric method of measuring stellar sizes. Your objection is incorrect. However, unfortunately, there are no eclipsing binaries with a neutron star that have a measurable secondary eclipse.
Comment: To expand on what Rob said about secondary eclipses: even though neutron stars emit little light, this is because they are small. Per unit area they emit lots, and so the eclipse we are interested in is the lesser one (compared with the NS going behind the other star). In fact, this secondary eclipse will block out the same fraction of the larger star as an equal-sized planet. We have a hard enough time measuring transits of Earth-sized planets, and this signal would be 1000 times smaller.
Comment: @PERFESSER Furthermore, if we were to do science your way, the only star with a known size would be the Sun, since no other star, bar just about Betelgeuse, has a resolvable disk with a telescope.
Comment: I understand what you are saying, but need to remind you that the amount of radiation which the objects should emit is based on theory, so that the amount of dimming would also be based on theory ... I want to know if there is a neutron-star near-enough to get a clear, disk-like, image ... from what I've learned since asking this question here, I believe that there are no such observations !!
Comment: @ChrisWhite Yes, I agree that you are both right about the possibility of measuring the size of a neutron-star by "eclipsing binary" method:  I stand corrected, and thank you for correcting me ... my aim is to LEARN, not to promote any pet theory


Different meanings of '儿'

Question: I know 儿 can be a diminutive suffix, and can convey endearment or smallness but when used as a suffix for 这 to change the meaning from 'this' to 'here' I don't think this applies. (Same with 那  changing the meaning from 'that' to 'there'.) In this instance, what is the 儿 actually denoting?
Answer: 儿 denotes nominalisation, ie a nominal instance of the preceding character.
A nominal instance of what is already a noun will often imply a diminutive connotation of said noun (eg 猫儿, kitten).
But a nominal instance of a part of speech that's not already a noun will quite simply imply nominalisation. A verb like "eat" (吃) will simply become "food; something to eat" (吃儿). A demonstrative, like 这 in your question, will simply become a locative (ie a noun of location), like "here" (这儿).
The fact that the nominalisation of a demonstrative should be a locative is pretty logical (and lexically apparent in many other languages). If you think about it, the meaning of a demonstrative implies location, because its meaning is "the [thing] that is here/there". Now, if a demonstrative serves to denote location in a pronominal or attributive sense like that, then it makes sense that the nominalisation of the demonstrative through 儿 will simply denote a nominal instance of that location, ie just "here/there".
Please note that in dialects of Chinese that do not employ 儿 as a nominaliser in that way, an explicitly locative suffix is used to mean "here/there" (ie 这/那+里). Since the 儿-nominalisation of a demonstrative produces a locative, as I argue above, the two forms (这/那+里 & 这/那+儿) are meaningfully equivalent.
Answer: The 儿 in 这儿, similar to its presence in some other scenarios like 一份儿菜, or 村儿里, or 我的事儿 etc, is mostly a regional accent related suffix.
In the north of the country, it would be much more common to have the 儿 appended to certain words, but in the south of the country, it's often not used. A very obvious giveaway if someone is from the south / Taiwan region would be when they say 我这里 (often said as Wo-Ze-Li as well). It would be very rare for them saying this in their 普通话 adding a 儿.
To be clear, 儿 serves no grammatical or linguistic purpose in these cases.
Comment: Incidentally, if you hear someone say 密码儿 instead of 密码, they are likely from Tianjin. Even old Beijingers wouldn't be saying it like that!
Comment: Like everything sense in grammar,  I should think 儿 serves some kind of linguistic purpose, even if not grammatical. But I for one would say its purpose is grammatical, ie to mark noun status. This is illustrated by the fact that it's appended to nouns rather than verbs (you can say 画画儿, but not 画儿画, because 儿 is there to mark out the noun). You could argue that such a grammatical marker is redundant in Chinese (and in fact it isn't found in most dialects), but some dialects do use it for the grammatical purposes of marking out some nouns, whether for clarity or for a diminuitive effect.
Comment: In your example, the fact that 画画 and 画画儿 has no difference in meaning, and both express exactly the same idea, would lend me to say 儿 indeed has no linguistic purpose. It's also not true that it only applies to nouns - north western dialect could say 紧绷绷的 as 紧绷绷儿的. I would find the idea that different dialects apply different grammatical logic hard to accept.
Comment: 儿 may be semantically redundant, but redundant features aren't without purpose or they wouldn't be redundant (ie we wouldn't be able to say that their purpose is served elsewhere in the sentence). Equally, 儿 distribution may be random across the lexicon (and indeed geography) but its emergence must have a functional origin.
Comment: Grammatically, that the 儿 suffix denotes instances of nouns, often or originally in a diminuitive sense, isn't an opinion but an established fact of Chinese grammar, as rightly acknowledged in the premise of the question itself and illustrated in any dictionary as well as in the examples given above. The presence or absence of certain grammatical features across different dialects can hardly be said to affect the overall grammatical logic of the language.
Comment: You raise a good point with 紧绷绷儿的! It may well be that this understanding of 儿 needs reviewing in light of similar exceptions. I'm still unconvinced though, because the exception you give relates to a stative verb, and one used as a reduplicated verbal complement - very far indeed from a "prototypical verb".
Comment: I see that r13, in a different answer to this question, also notes that this type of 儿 is a meaningful suffix as opposed to 儿化. He therefore seems to offer a compromise position between us to the effect that there are two different 儿s. I'm
not too convinced by this view either, but it's very interesting to note.
Comment: I dunno man, as a native speaker that's my viewpoint, whether 儿 is there or not it makes no difference to me in this context. I don't think any language is a cumulative product of perfectly applied rules, so in my mind "must have function" isn't a given. You may well have a better academic analysis though.
Answer: 这儿 =  这里/裡/裏 (here) 汉典
那儿 =  那里/裡/裏 (there) 汉典
Note:
Here, 这儿 & 那儿 are "dialectal sysnonms" of 这里 & 那里. It shouldn't be confused with "儿化" of the word immediately in front of 儿, which mostly occurs in the northern dialects, such as 花ㄦ,草ㄦ,牛ㄦ,羊ㄦ,狗ㄦ. Here, the adding of ㄦ does not change the meaning of the word proceeds it but adds "r" sound to the proceeding word, for instance, 花ㄦ(huar) = 花(hua). https://zh.wikipedia.org/wiki/%E3%84%A6
Comment: It's easy to think that 儿 is just a phonetic reduction of the suffix 里, but I personally believe that to consider the use 儿 as a nominaliser is necessary and sufficient to explain 这/那/哪+儿, especially in the absence of any other lexical example where 里 is pronounced like that. (Can you think of any other instance of the locative suffix 里 reduced to 儿? 家里? 村里? ) The two forms you mention (这儿 = 这里, etc) are simply equivalent because a nominal suffix that turns a demonstrative into a locative will naturally be equivalent to the more standard practice of straight-up using a locative suffix instead.

Different meanings of ‘儿’


How would I change the docker's base directory

Question: All my docker related folders are saved in /var/lib/docker. But my / space is very limited. Hence, I would like all of the content present inside this location to go to say /home/User/my_space. How would I do that? I could use symbolic link. But, that will only move the current contents of the location. I would like to move the future changes of the docker also. Please help me :)
Answer: Symlink is an universal solution which works, I've successfully used it plenty of times. I do not recommend using the path you suggested, though, since the files should be owned by either the root or docker users, depending on your distro/OS. Therefore, if you want to use the /home partition, then:

shut down docker
mv /var/lib/docker /home/
ln -s /home/docker /var/lib/docker
start docker

This will usually persist through upgrades unless you uninstall and reinstall Docker.
Now, more recent versions of Docker support an option in /etc/docker/daemon.json, namely the data-root option. So just edit the file and add
{
  "data-root": "/home/docker"
}

You can find the whole schema for the file in the docs.


What is SPI Interrupt (SPIE) in SPI control register?

Question: I have been trying to understand SPI Interrupt i.e. what does it do and why is it used ? Reading about it on the web has not helped me. Can some one please explain it in a simple terms ?
Comment: you list both stm32 and arduino.  These are fairly different platforms, and to some extent, the behavior you're asking about will be platform specific.
Answer: SPIE or "SPI Interrupt Enable" is used to enable the interrupt.
(Assuming you are in Master mode) There are two ways of transferring data using SPI:
1.Polling: Here you write data in SPI's data register (SPDR) and then poll on the flag for SPI Transmission complete (SPIF).
2.Interrupt based: In this case, when you enable Interrupt for SPI, you write data in SPDR. Controller will transmit the data and will raise an interrupt when transmission is completed.
A question may arise that why there is interrupt for transmission but not for the reception, I am tempted to answer but It would be better if you figure that out! :-)
Comment: Thanks for your response, few followup questions: 1. Does every micro controller allow for 2 ways of transferring data ? 2. What happens if interrupt is not enabled (does it lead to errors) ? 3. Why is interrupt for transmission mode but not for reception  ?
Comment: @user44776 I would suggest you to read about SPI on Wikipedia and some other websites.
Answer: Assuming you are talking about AVR, the SPIE (SPI Interrupt Enable) bit is to enable SPI related interrupts.
The number of interrupts an SPI peripheral can have will vary depending on the device, but if we take the Atmega8L as an example, it only has one interrupt.
Looking at the datasheet for what SPIE does, it says the following :

• Bit 7 – SPIE: SPI Interrupt Enable
  This bit causes the SPI interrupt to be executed if SPIF bit in the SPSR Register is set and the if
  the global interrupt enable bit in SREG is set.

Basically when SPIE AND SPIF AND the global interrupt enable bit is set, you will get get an interrupt.
What's the interrupt ? Well lets see what SPIF does. In the datashet, it says the following:

• Bit 7 – SPIF: SPI Interrupt Flag
  When a serial transfer is complete, the SPIF Flag is set. An interrupt is generated if SPIE in
  SPCR is set and global interrupts are enabled. If SS is an input and is driven low when the SPI is
  in Master mode, this will also set the SPIF Flag. SPIF is cleared by hardware when executing the
  corresponding interrupt Handling Vector. Alternatively, the SPIF bit is cleared by first reading the
  SPI Status Register with SPIF set, then accessing the SPI Data Register (SPDR).

The text here (I think) is pretty self explanatory, so I won't repeat it.
If you don't understand what a particular register or bit does, flip through the datasheet. Sometimes you might have to jump from bit to bit in order to get the full picture of how it works or what its supposed to be doing.
Answer: In a typical application that uses SPI communications, the microcontroller needs to receive data at some point. To receive data, the microcontroller has to read and write the SPI signals in a specific way as dictated by the protocol.
Now since you can't have the microcontroller constantly busy doing this, microcontrollers sometimes are equipped with a hardware module solely responsible for the SPI communications. This allows the microcontroller to work on other stuff instead of handling SPI.
The interrupt is raised by the SPI module and it is used to notify the microcontroller that a byte (or more) was received and it is ready for processing.
Comment: Thank you for your response, is an interrupt raised when a byte is transmitted or received ? What happens if an interrupt is not enabled ?
Comment: Depending on the microcontroller you could have a receive interrupt or transmit interrupt or both. If it is not enabled then there is no way to get a notification (alternatively you can poll the received flag) that a byte has arrived. If you fail to read the data out of the buffer, it could get overwritten or cause overflow.


Current balance capacitor

Question: Most series capacitors needs balancing resistors to keep the same voltage across them, but in my case, I'm using with three capacitors of 45uF in parallel that are working very close to its maximum RMS current rating. I'd like to know, is it necessary to put any resistor or inductor to balance the current of the capacitors? If so, could you please guide me on how to do that.
Comment: It's difficult to understand your application. Are you feeding AC through these or is it for a DC power supply voltage smoothing? Post a schematic or add one using the CircuitLab button on the editor toolbar.
Comment: I have some difficulties understanding the issue as well. Are you concerned with the current capability of the capacitors, i.e. any small difference between the parallel ones would lead to a higher current in one of them? That's why you would use "balancing resistors"?
Comment: @HorrorVacui exactly. This capacitor bank will be charged with DC voltage and then switched to discharge onto a load. According to the datasheet the peak current is OK but its RMS current during the work period is very close to the rating. So I needed to be sure that the RMS current in each capacitor will be the same.
Comment: See my commentrs on Neil's answer.
Answer: Three capacitors in parallel will necessarily have the same voltage. As the charging current through each is C.dV/dt, they will also be necessarily equal, if the capacitances are equal.
That's at low frequency. At high frequency, the currents will split according to the impedances, which include the ESR and the ESL.
Unfortunately the OP has included no information as to the speed of the discharge (and the charge for that matter), or whether he is a hobbyist making a one-off, or a professional designer aiming to sell a product with a warranty, all of which are critical to the answer.
Unlike in a series connection, where imbalances in leakage current are dependent on dielectric impurities at very low levels, and so can vary by orders of magnitude between otherwise nominally identical components, the imbalances for a parallel connection, capacitance, ESR  and ESL depend on geometry, and show much less variation between components. They are also likely to be stable, whereas leakage might be expected to vary wildly with time and temperature.
To see whether ESR, ESL or capacitance are going to dominate the RMS current, the nominal discharge and charge currents need to be determined, either by measurement, or modelling with SPICE into the specific load.
If the discharge RMS is shown by modelling to be strongly dependent on ESR, and if the chosen capacitor shows a large ESR variation between units, and if that variation is significant in terms of the ratings, then there are two approaches, swamping, and trimming. In swamping, you would connect a resistor in series with each capacitor an order of magnitude larger than its ESR. This them dominates the split of current. It's also likely to change your experimental setup, and need a redesign. The alternative is trimming, where you measure all the capacitors, and add external resistance to those measured to have low ESR.
Calculations for ESL would follow a similar, though more difficult to measure, path. As a first step, to keep the external inductance equal, you'd obviously wire your capacitors symmetrically with respect to the terminals, and not use a long bus fed from one end. A star arrangement would be best, or a long bus but fed from opposite ends.
With capacitance variation, there's no practical external balancing that can or should be done. In theory, a large external series capacitor could trim the net capacitance. In practice it would probably be more trouble than it's worth. You can't trim with external resistance, though you can swamp for the dependence on current. However, as R is at right angles to C, you'd need a significant series R, which would almost certainly change the discharge into the load, and need a redesign. I wouldn't suggest you try to trim the C with external L, unless you model it thoroughly, and know exactly what overshoots are going to do in terms of discharge current and capacitor overvoltage.
The only two practical responses to capacitance tolerance are to either derate the datasheet RMS current limitation by the capacitance tolerance to get your working limit, or to design for a significant and discharge determining series resistance to be used with each capacitor. Manufacturers of pulsed power equipment like spot welders and motor magnetisers use the 'designed with a series resistor' approach to allow the discharge to be well controlled, even in the presence of varying external inductance, which also means the capacitors can be guaranteed to be operated well within their limits.
Are you a hobbyist or professional? If a pro, then you already know the answer. Don't use those capacitors. Use more, smaller ones in parallel, and lower voltage types in series if necessary, until the calculated RMS current is far enough below the rating that you meet your customary derating factor.
If you are a hobbyist, then I'd say just go for it, as it is. By checking the specifications, you've already shown yourself to be far better than the typical power hobbyist, for which the mantra is 'turn it up until it catches fire, then back off a bit'. You may get a shorter life than expected from the caps, does that matter? That's not a flippant question, expected lifetime is a significant specification when designing power electronics.
Comment: I'd like to query my esteemed colleagues (several) responses in this case. The OP is concerned about overall RMS current so charge and discharge may matter. Knowing the charge & discharge conditions is a good idea.  If three substantial capacitors ate connected in parallel then a say sudden step discharge load will lead the Vcaps all identical but if cap ESRs, Rexternals, Linternal and L External all vary somewhat then the delta discharge impedance may differ. ...
Comment: Worst case one cap (say in a bank of caps side by side physically but fed side on electrically may lead to higher charge and discharge peak and RMS currents. While I'd not expect the differences to matter in practice in most cases, minimisation of different paths may help.
Comment: This answer does not considers capacitor parasitics and capacitance value variation, and thus missing the question of the OP.
Comment: @HorrorVacui This answer now considers parasitics. Does it help?
Answer: No, when you put resistor in parallel it have load sharing behavior. Just put it close together and low resistance (thick pcb trace) if one of these have lower voltage current form other will flow to change to equilibrium or point simultaneously . It will response faster than any active or passive component.
Comment: He considers adding resistors in SERIES to balance the current through the caps.
Answer: An exact answer would depend on many other factors, so it is possible that engineer A has an opinion which does not conclude with the opinion of engineer B.
I can't answer whether you need to add any resistors, but my answer(s) will hopefully lead you to the right path:

If possible, just buy a higher rated component.
The rated operating parameters are stated for the all possible variations during production. Being at or slightly above the limit will not cause malfunction in most of the cases. It will have a finite probability though. You have to decide how much risk you are willing to take.
If the caps are from the same rail, then they will have similar parameters with a very high probability, so unless there is a significant temperature gradient, no balancing is needed. Here was also an assumption, but a fair one.
If none of the aboves are not the case, you should check the capacitance value accuracy and the ESRs and ESL. The PCB traces will contribute to it as well. Also a question is whether you would like to design for worst case, or just for acceptable yield. The last case would require some tests.

Note: that any resistance in series with the cap reduces its quality factor, and increase its losses, and reduce the peak currents it is capable of supply. So try to avoid it if possible.
Answer: A significant factor in current handling capability relates to heating effect.
One way to ensure that small excesses in rated RMS current have minimal effect is to ensure that all 3 capacitors are well cooled thermally. Two easy methods of ensuring this are:
(1) Have short leads to wide copper traces over a Ground plane. The Gnd plane is needed so the hot traces can dump heat thru the PCB epoxy-fiberglass into the sheet of copper foil underneath. Then you may need METAL MOUNTING POSTS or METAL SLIDERS, to remove Gnd Plane heat to the metal case (or chassis of the satellite). Decades ago I worked on satellite systems; we always had heat removal guys advising/mandating the foil coverage, so heat would flow to the PCB edges where the card cage sliders (or equivalent) passed the heat to the outside.
(2) Have good air access - either passive air flow or if a fan is present try to provide some moving air.
An usual but useful and occasionally used concept is to add external heatsinks to capacitors with high peak currents.
Comment: +1 Edited. Answer was OK as was albeit a bit terse. Downvotes not appropriate.
Comment: see my comments on Neil_UK's answer.
Comment: Quite a change in votes. From -5 to 0 with 4 current downvotes. Shouldn't have happened.

Current balance capacitor


hilti PX 10 TRANSPOINTER working principle

Question: Sorry to ask this here. But I really got wondered what is this product's working principle. Anybody share what would be the core  idea behind this product PX 10 TRANSPOINTER from hilti.
Click here to find the product official page
Answer: A low RF induction field is created by the torroid in the sender.
The receiver torroid being PLL tuned to same frequency detects strongest signal when both are parallel and concentric.
Thus you can determine ideal location for drilling on hard to get side with sender and locate center on the easy side. Range is given as 2" to 4ft.

parallel surfaces are essential with greater distance and may be influenced by iron near/between the path loss.


Why would there be flight restrictions when the barometric pressure exceeds 31 inHg?

Question: FAR 91.144 states that flight restrictions may be issued by notam when barometric pressure exceeds 31" Hg.  Why would such a restriction be necessary?
Comment: I presume this is an issue with safety of flight, but I don't understand what unsafe condition might occur.  It seems to me that an abnormally low barometric pressure might be more of a problem, but perhaps that is skipped because the thread of adverse weather is more obvious, and dealt with elsewhere in the regulations.
Answer: It is because standard altimeters are not adjustable beyond this range. The AIM 7-2-2 contains information on how to handle it:

When the barometric pressure exceeds 31.00 inches Hg. The following procedures will be placed in effect by NOTAM defining the geographic area affected:

(a) For all aircraft. Set 31.00 inches for en route operations below 18,000 feet MSL. Maintain this setting until beyond the affected area or until reaching final approach segment. At the beginning of the final approach segment, the current altimeter setting will be set, if possible. If not possible, 31.00 inches will remain set throughout the approach. Aircraft on departure or missed approach will set 31.00 inches prior to reaching any mandatory/crossing altitude or 1,500 feet AGL, whichever is lower. (Air traffic control will issue actual altimeter settings and advise pilots to set 31.00 inches in their altimeters for en route operations below 18,000 feet MSL in affected areas.)
(b) During preflight, barometric altimeters shall be checked for normal operation to the extent possible.
(c) For aircraft with the capability of setting the current altimeter setting and operating into airports with the capability of measuring the current altimeter setting, no additional restrictions apply.
(d) For aircraft operating VFR, there are no additional restrictions, however, extra diligence in flight planning and in operating in these conditions is essential.
(e) Airports unable to accurately measure barometric pressures above 31.00 inches of Hg. will report the barometric pressure as "missing" or "in excess of 31.00 inches of Hg." Flight operations to and from those airports are restricted to VFR weather conditions.
(f) For aircraft operating IFR and unable to set the current altimeter setting, the following restrictions apply:
   (1) To determine the suitability of departure alternate airports, destination airports, and destination alternate airports, increase ceiling requirements by 100 feet and visibility requirements by 1/4 statute mile for each 1/10 of an inch of Hg., or any portion thereof, over 31.00 inches. These adjusted values are then applied in accordance with the requirements of the applicable operating regulations and operations specifications.
EXAMPLE-
  Destination altimeter is 31.28 inches, ILS DH 250 feet (200-1/2). When flight planning, add 300-3/4 to the weather requirements which would become 500-11/4.
   (2) On approach, 31.00 inches will remain set. Decision height (DH) or minimum descent altitude shall be deemed to have been reached when the published altitude is displayed on the altimeter.
NOTE-
  Although visibility is normally the limiting factor on an approach, pilots should be aware that when reaching DH the aircraft will be higher than indicated. Using the example above the aircraft would be approximately 300 feet higher.
   (3) These restrictions do not apply to authorized Category II and III ILS operations nor do they apply to certificate holders using approved QFE altimetry systems.
(g) The FAA Regional Flight Standards Division Manager of the affected area is authorized to approve temporary waivers to permit emergency resupply or emergency medical service operation.
b. At or above 18,000 feet MSL. To 29.92 inches of mercury (standard setting). The lowest usable flight level is determined by the atmospheric pressure in the area of operation as shown in TBL 7-2-1.

So because most altimeters do not have this kind of range, the altitude readout will be inaccurate. This is especially problematic for IFR operations where you do not have visual reference to the ground.
Answer: I think I found the answer.  The Standard governing manufacture of sensitive altimeters is TSO-C10b.  TSO-C10b cites SAE Aeronautical Standard AS 392C.  This standard specifies two types of altimeters:

Those with a range to 35,000 feet.
Those with a range to 50,000 feet.

Both are required to be adjustable for barometric pressures between 28.1 and 30.99 inches of mercury.  FAR 19.144 specifies an atmospheric condition which exceeds the specifications required for altimeters.


A question on Eisenbud-Green-Harris conjecture

Question: Let $I$ be a homogeneous ideal in a polynomial ring $k[x_1,\ldots,x_n],$ $I$ contain a regular sequence $f_1,\ldots,f_n$ such that deg$(f_i)=a_i$ and $a_1\leq\ldots\leq a_n.$ Let $d$ be a non-negative integer. Then there exists a unique lex-plus-power ideal $J$ of the form $J=({x_1}^{a_1},\ldots,{x_n}^{a_n})+L$ where $L$ is a lexicographic ideal generated by monomials of the same degree $d$ with the property $H(I,d)=H(J,d).$ ($H(I,{-})$ is the Hilbert function).
In the paper here "Some cases of the Eisenbud-Green-Harris conjecture" by Giulio Caviglia and Diane Maclagan (page 431), it is written that the following is known:
the Eisenbud-Green-Harris conjecture holds (EGH conjecture is mentioned in the paper) if and only if for any $I,d,J$ defined above, the condition $H(I,d+1)\geq H(J,d+1)$ is also satisfied.
I am unable to prove the above statement. I also could not find any reference for that.
Answer: You may find this appearing many times. See if the sketchy argument in
helps (the first 2 pages suffice).


Principal Component Analysis and Yield Curves

Question: I've been tasked with researching trading strategies relating PCA to trading fixed income futures instruments. Apparently PCA is frequently used in this area. I'm just looking for some references for obtaining a basic idea of what a strategy might look like. I'm not looking for a winning strategy -- just an outline of how PCA might be useful in generating trading signals. I understand the mathematics behind PCA and have used it in other areas, but its applications to finance are new to me.
Answer: One of the best pieces ever written on this topic is Salomon's "Principles of Principal Components," which is readily available on the Internet. I won't go into the details, since this paper is ridiculously comprehensive, but the fundamental idea is straightforward -- if you run a PCA based on yields, the first three components capture most of the variances, with the three factors roughly interpreted as the level, slope, and curvature of the curve.
The most widely used application for PCA is butterfly trading (e.g., you may buy the TY contract against FV and WN; or you may buy EDZ6 against EDZ5 and EDZ4). PCA allows you t compute the "risk weights" needed so that the structures are neutral to the first two principal components. This allows you to focus on trading the curvature of the yield curve, without taking on level/slope risks.
Comment: It's an empirical observation, but very much a result of how yield curve is traded & behaves. If do decompose bond portfolio returns over long horizons, you'll almost always find that the duration (i.e., yield level) pretty much is the single most important factor; it is also what people talk about the most ("10-year yield did BLAH today"). Slope is definitely the next thing that's on people's mind ("The yield curve bull flattened/bear steepened/etc. today). Curvature is almost never mentioned in the press, and is indeed a much smaller factor in driving daily yield curves movements.
Comment: Followup question: I've read and heard this claim that the first three factors correspond to level, slope, and curvature. Is this a mathematical fact, or an empirical observation? I find it hard to see why that should be the case mathematically, although it doesn't seem too farfetched.


Why we need to read memory on a write-miss?

Question: I noticed that in write-back caches, when the cpu wants to write to a block, it fetches the block from memory and then updates it. If the block is going to be overwritten and changed by processor, why does the cpu need to read that block from memory?
Answer: Because write-miss happens only with just a word  missing in a block. So all of the block which contains that word must be fetched and then that special word must be updated.
Answer: While it would be possible to construct a 128-bit wide memory bus with a separate write-enable control for each octet (sixteen in all), doing so would generally be more expensive than designing the bus to require that any operation which writes to any byte in a 128-bit cache line must supply data for all sixteen.  Although there are times when being able to update some bytes in a line without having to read the others would yield a performance advantage, in many cases the penalty of having to fill a cache line from memory sometime between when the fist write gets posted and when the line gets flushed will be minimal, and the benefits of eliminating that penalty may be insufficient to justify the cost of the extra write-control logic.
Answer: There are several issues involved in this design decision. Since conventional DRAM does not support finer-grained write enable (graphics memories often do), when the data was eventually written back if an entire memory access chunk (often cache block sized) was not written then a read would be necessary. Since conventional DRAM interfaces have significant read-write turnaround latency (and the DRAM row is kept open), performing a read-merge-write at cache block writeback can reduce memory throughput.
Even with finer-grained write enable, cache blocks would have to track validity at the granularity of writes (assuming write allocate). This would add some overhead in cache metadata (e.g., 64-bits for a straightforward byte granular validity tracking of a 64-byte cache block, potentially nearly tripling last level cache metadata — a 4 MiB 16-way cache for a 40-bit address space would have 22 tag bits per block and a few bits for coherence).
The common case is assumed to be the presence of spatial locality and non-complete overwriting. I.e., other data in the written-to cache block will be read before it is written back. Streamed writes are a somewhat frequently occuring case where complete cache blocks are overwritten, but such are also often non-temporal writes that one would prefer not be allocated to the cache. While determination of non-temporal write streams is usually pushed to software, because of the temporal proximity of such writes it would not be extremely difficult for hardware to manage them. (Some x86 string operation implementations do exploit complete overwriting of cache blocks.)
Some instruction sets provide cache block zeroing and/or cache block allocating instructions which allow software to avoid reading memory when entire cache blocks are overwritten (or will have "don't care" data values). Such could be useful for smaller streaming writes (where the buffering benefit from cache allocation is greater than the cache pollution penalty or where reuse while in cache is more likely) and memory allocation (where hardware zero initialization would be a benefit beyond the avoidance of read for ownership).
Having per-byte validity for cache block contents would also complicate cache coherence and consistency. With block-granular data presence, a read coherence request need only specify the cache block. Even if only a single caching agent can hold a partially dirty block (similar to the single owner model for cache coherence), multiple caches might need to provide the data for a request as clean bytes might be resident in another cache with the dirty bytes invalidated.
(Finer-grained validity tracking can have an additional benefit in reducing false sharing.)
Another waste of bandwidth in typical caches is the writeback of modified memory with dead values. For example, when a stack frame is freed, the values are dead but hardware does not know that the modified cache blocks have no modified live values and so it must writeback such blocks (writebacks to memory would only happen if the extent of the stack was smaller for a long enough period). Similarly, when a program ends it will typically leave a lot of modified dead values in cache. Such are not common occurances, but they demonstrate that there is potential for improvement.


How to setup a 16 x 12 foot Photoshop document

Question: I have to layout a 16 x 12 ft (size of tarpaulin) document in Photoshop, but when I change the resolution to 300 it's too large and it takes time to render the layout. What should I do?
Answer:
Talk to the printer (the person not the machine). They will likely tell you what scale and/or resolution to work at.
You most likely do not need to work at 300ppi at full scale. It is more common for large format printing to work at a smaller scale or lower resolution (refer to point 1.)
Read through the answer here: I need to print an image at a certain size. What dimensions and resolution should I use?
Answer: They will likely print at 200 or 100dpi, depending on the type of print format. I would call the printer and ask for their file specifications as the person stated above.


IOS bluetooth, Apple wireless keyboard

Question: I'm writing an IOS ZX Spectrum emulator, and so far all is going well. I've got the spectrum keys on the touch screen, and input feeding into the games, etc.
I'm wanting to add bluetooth keyboard support and am struggling to understand how to do this - I've got an Apple wireless keyboard, and this pairs to my iPad without problems (in the ios bluetooth setting panel). However, if I query the connectedAccessories property of a [EAAccessoryManager sharedAccessoryManager], it returns an empty array.
From reading around I think this means the Apple wireless keyboard is not mFi certified?
(I think if I was using a standard text input field e.g. UITextField, then this would work OK - problem is I'm not, and don't really want to - I don't want to use the IOS keyboard at all).
I'm not really interested in enumerating and adding / removing devices in my app (unless I really have to?), but I thought that it should be simple enough to get the key press/release states from the keyboard that's already paired in the iOS bluetooth settings panel.
To summarise, my question is:
Can I easily get the keyboard state for an iOS attached bluetooth keyboard (thats not necessarily MFI certified).
I don't want to use private API's or jailbreak (I'm baseline IOS 7 too if that helps).
(I've searched around but not found anything similar to this exact situation).
Thanks in advance for any help offered.
Answer: A partial answer: The UIKeyInput protocol will give me key presses on the attached bluetooth keyboard (even though it's not MFi compliant).
However, it doesn't give me key state info (key down and key up events), and consequently isn't much help for my needs.
Just trying to work out if UIResponder can give me more (as UIKeyInput is a subclass of UIResponder).
Any help or insights appreciated.

IOS bluetooth, Apple wireless keyboard


floating point random number generation in verilog.

Question: Is there a way to generate random floating point numbers in either verilog or system verilog? More specifically through some hardware implementation?
Answer: A floating point number is just a number of bits. As such generating a random floating point number can be done by generating random bits and then interpreting them as a float (Or real as they are called in both VHDL and Verilog).
A standard way of generating a series of random bits in hardware is using a PRBS generator (Pseudo Random Bit Sequence generator): A linear feedback shift register with special feedback to get the maximum sequence. There are various polynomial depending on how long a PRBS you want to have.
For exact implementation I suggest you search for PRBS.


Best way to remove an entry from a hash table

Question: What is the best way to remove an entry from a hashtable that uses linear probing? One way to do this would be to use a flag to indicate deleted elements? Are there any ways better than this?
Answer: An easy technique is to:

Find and remove the desired element
Go to the next bucket
If the bucket is empty, quit
If the bucket is full, delete the element in that bucket and re-add it to the hash table using the normal means. The item must be removed before re-adding, because it is likely that the item could be added back into its original spot.
Repeat step 2.

This technique keeps your table tidy at the expense of slightly slower deletions.
Comment: The trouble is this may require an O(n) operation to fill the hole in the hash table, where n is the number of slots in the hash table.
Answer: It depends on how you handle overflow and whether (1) the item being removed is in an overflow slot or not, and (2) if there are overflow items beyond the item being removed, whether they have the hash key of the item being removed or possibly some other hash key. [Overlooking that double condition is a common source of bugs in deletion implementations.]
If collisions overflow into a linked list, it is pretty easy.  You're either popping up the list (which may have gone empty) or deleting a member from the middle or end of the linked list.  Those are fun and not particularly difficult.  There can be other optimizations to avoid excessive memory allocations and freeings to make this even more efficient.
For linear probing, Knuth suggests that a simple approach is to have a way to mark a slot as empty, deleted, or occupied.   Mark a removed occupant slot as deleted so that overflow by linear probing will skip past it, but if an insertion is needed, you can fill the first deleted slot that you passed over  [The Art of Computer Programming, vol.3: Sorting and Searching, section 6.4 Hashing, p. 533 (ed.2)].  This assumes that deletions are rather rare.
Knuth gives a nice refinment as Algorithm R6.4 [pp. 533-534] that instead marks the cell as empty rather than deleted, and then finds ways to move table entries back closer to their initial-probe location by moving the hole that was just made until it ends up next to another hole.
Knuth cautions that this will move existing still-occupied slot entries and is not a good idea if pointers to the slots are being held onto outside of the hash table. [If you have garbage-collected- or other managed-references in the slots, it is all right to move the slot, since it is the reference that is being used outside of the table and it doesn't matter where the slot that references the same object is in the table.]
Answer: The Python hash table implementation (arguable very fast) uses dummy elements to mark deletions.  As you grow or shrink or table (assuming you're not doing a fixed-size table), you can drop the dummies at the same time.
If you have access to a copy, have a look at the article in Beautiful Code about the implementation.
Answer: The best general solutions I can think of include:

If you're can use a non-const iterator (ala C++ STL or Java), you should be able to remove them as you encounter them.  Presumably, though, you wouldn't be asking this question unless you're using a const iterator or an enumerator which would be invalidated if the underlying collection is modified.
As you said, you could mark a deleted flag within the contained object.  This doesn't release any memory or reduce collisions on the key, though, so it's not the best solution.  Also requires the addition of a property on the class that probably doesn't really belong there.  If this bothers you as much as it would me, or if you simply can't add a flag to the stored object (perhaps you don't control the class), you could store these flags in a separate hash table.  This requires the most long-term memory use.
Push the keys of the to-be-removed items into a vector or array list while traversing the hash table.  After releasing the enumerator, loop through this secondary list and remove the keys from the hash table.  If you have a lot of items to remove and/or the keys are large (which they shouldn't be), this may not be the best solution.
If you're going to end up removing more items from the hash table than you're leaving in there, it may be better to create a new hash table, and as you traverse your original one, add to the new hash table only the items you're going to keep.  Then replace your reference(s) to the old hash table with the new one.  This saves a secondary list iteration, but it's probably only efficient if the new hash table will have significantly fewer items than the original one, and it definitely only works if you can change all the references to the original hash table, of course.
If your hash table gives you access to its collection of keys, you may be able to iterate through those and remove items from the hash table in one pass.
If your hash table or some helper in your library provides you with predicate-based collection modifiers, you may have a Remove() function to which you can pass a lambda expression or function pointer to identify the items to remove.
Answer: A common technique when time is a factor is to have a second table of deleted items, and clean up the main table when you have time. Commonly used in search engines.
Answer: How about enhancing the hash table to contain pointers like a linked list?
When you insert, if the bucket is full, create a pointer from this bucket to the bucket where the new field in stored.
While deleting something from the hashtable, the solution will be equivalent to how you write a function to delete a node from linkedlist.


Opengl Es 1.1 Setting Different Transformations For Different Parts of Array

Question: I have the following code:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glPushMatrix();
glTranslatef(.03f * state, 0.0f, 0.0f);

state = 0;

glDrawArrays(GL_TRIANGLES, 0, LOC);

glPopMatrix();

I pop the matrix at the end so that I can apply a different transformation to a different part of the array. The problem is, when glPopMatrix() is present at the end of this code, the object drawn keeps wiggling instead of moving like its supposed to.
Note: State is set somewhere out of the loop and does not cause the draw function to stop working (as the function works without glPopMatrix()).
Answer: I can't comment, and you did not supply enough information. From what I can see though, state never changes, since you set it to 0 in the display loop. Thus, the object will not move.


Is it possible to use the credit card BIN to find the bank's ABA?

Question: I am trying to determine the correct institution ABA based on the credit card's BIN.  There are several resources which can determine bank's name and some other info based on the card BIN but many banks have multiple routing numbers (e.g. Chase and Wells Fargo).  Is it possible to determine a single correct ABA for the account?
Answer: I'm assuming the context for your question is a checking account in the US with a debit card, and you know the BIN on the debit card and are trying to determine the ABA routing number for the checking account.
Unfortunately, the answer is no - there is no inherent relationship between BIN and routing number, and there are inconsistencies from bank to bank because of differences in the way financial institutions are structured. For instance, some larger banks may have different routing numbers for accounts opened in different regions, but only one BIN that they use for all cards. Other banks may have only one ABA for all checking accounts, but different BIN numbers for different card products attached to different types of accounts. Still other institutions will have only one routing number and one BIN.
If you are a customer of the bank, you can just call and ask, or look on their website (many online banking portals display the routing number prominently - for my bank, it's at the bottom of every page). If you are not the customer, and the only piece of information you have is a BIN, you are effectively out of luck. You can always try calling the bank and asking - if they have only one routing number, they will tell it to you. But if the bank has multiple routing numbers, they may need you to give them other information in order to provide you the correct number (such as, which state the account was opened in).
Comment: Thanks for the reply.  I am actually talking about true credit card accounts and not debit card accounts.  i am a developer for a smallish credit union and we are working on a simplified solution for letting our members transfer their credit card balance from another account to a credit card with us.  The process on our end requires the cc-num and routing number.
Comment: @nurdyguy Ok I guess that makes sense if you want to send the payoff to the other FI as an ACH. But can you look up the FI's mailing address from the BIN and send it as a bill pay check? Or some other payment method other than ACH?
Comment: Right now the requirement is to generate the ACH payment.  I know how to get _a_ routing number for the FI in question but I don't know if that is sufficient.  Nobody here even seems to know what would happen if we used the "wrong" routing number (a number for that FI but maybe not the correct one for the account).  I assume the ACH would just fail?
Comment: I suppose it depends on how they process ACH exceptions. Technically, they should probably reject it with R03 unable to locate. It is risky though - consider if they have the same account number under different routing numbers, if you just pick a routing number you may end up with money sent to the wrong account.


Include files in Apache HTTP Server Version 2.2 httpd.conf

Question: I have a large httpd.conf file, most of which is virtual hosts. Is there a way to make a file, say virtual_hosts.conf, and include it from httpd.conf? I've googled a bit, but can't seem to find much as far as includes, just module loading.
Comment: Don't google for this.  Read the [Apache docs](http://httpd.apache.org/docs/2.2/).
Comment: @AndrewSchulman: You know I asked this question over 3 years ago... right?
Answer: Information on apache httpd.conf files can be found at here.
Some snippets have been copied from this website to ensure that the information is not lost if the link would deprecated:
Include /usr/local/apache2/conf/ssl.conf
Include /usr/local/apache2/conf/vhosts/*.conf

Relative paths:
Include conf/ssl.conf
Include conf/vhosts/*.conf

Wildcards:
Include conf/vhosts/*/*.conf

Comment: Note that "relative paths" are relative to the defined [`ServerRoot`](https://httpd.apache.org/docs/2.4/mod/core.html#serverroot).
Answer: I separate each virtual host into it's own vhost config file, that way you don't wind up searching through a giant document looking for one little directive. Similar to Quanta's post:
Include /etc/apache2/vhosts.d/*.conf

Just place it as the last line in your httpd.conf
then just split your single vhosts.conf into individual files for each domain, i.e.
domain1.conf
domain2.conf
domain3.conf
etc....

much easier to manage.
-sean
Answer: You can do it with Include directive:
Include /path/to/virtual_hosts.conf

Answer: IncludeOptional
Also you can use IncludeOptional directive
IncludeOptional conf/vhosts/*.conf

So in such case there can be no any appropriate file. Or as exactly said in documentation,

It works identically to the Include directive, but it will be silently
  ignored (instead of causing an error) if wildcards are used and they
  do not match any file or directory or if a file path does not exist on
  the file system.

BUT!
Pay attention that some versions of Apache really fails to start in cases when "file path does not exist on the file system". Like on example above if there is no directory conf/vhosts/.
So, in such a problem you may be restricted in fact in safe usage of this directive by non-using some subdirectories when you are not sure if they exists
Like such a manner:
<VirtualHost *:80>

DocumentRoot    "/var/www/example.com"
ServerName      "example.com"
ServerAlias     "www.example.com" "example.com"
...

IncludeOptional /var/www/example.com/*.httpd.conf

</VirtualHost>

<VirtualHost *:80>

DocumentRoot    "/var/www/other.org"
ServerName      "other.org"
ServerAlias     "www.other.org" "other.org"
...

IncludeOptional /var/www/other.org/*.httpd.conf

</VirtualHost>

When some like
IncludeOptional /var/www/other.org/*.httpd.conf

will works good (have you any file matching given mask or not), but
IncludeOptional /var/www/other.org/config_optional_subdir/*.conf

will fail if there is no such subdirectory config_optional_subdir.
Note that
IncludeOptional /var/www/other.org/extra.httpd.conf

will fail too if at least one of sites will not have exactly specified file extra.httpd.conf. Wildcards are the key.

So, if common site configuration created and can be recreated automatically by some template, but some concrete site requires an extra apache configuration that cant be wrote just in a .htaccess file - you can use this approach.


Piece Identification, 3x6 white horizontal cylinder

Question:
I have these 4 white pieces from a large lot of pieces I purchased. Any idea what set they may be from? Most of the other sets have been Batman, Superman or super heros.
Answer: These appear in 4s in many iterations of the Imperial Shuttle, and also many of the X-wing, as well as the
MT-201 Ultra-Drill Walker and the SP Undercover Cruiser. I can't say for certain which of these sets originally contained those pieces, but this should get you closer. This list also shows sets that contain the piece in smaller quantities.
Answer: That is a
Cylinder 3 x 6 x 2 2/3 Horizontal
Item No: 30360.
In white it appears in a number of sets as listed in the already existing answer.
Answer: According to brickset, this piece is either the 3x3x6 engine or this other 3x3x6 engine piece. They are both pretty similiar, but I think they differ in the amount of studs in the tubes on the side. Alternately, you could check out their group/piece class here for the first piece that I mentioned above, or here for the second piece. I might be mistaken though, since I have that piece at home, and Brickset may be referring to the same piece, but at different angles/sides. You can check what set they come in simply by clicking on "sets" on the side bar labelled "part details". If you are checking out my 3rd or 4th link, simply click on each link that you would like to open, and click on "sets" as I mentioned above.
Answer: It must be parts from the set LEGO X-Wing 9493. Here it is on Bricklink.


Port forwarding from router for external remote desktop

Question: I am trying to set up the server at an organization I work with to allow me to access a remote desktop from home (or where ever).  I tried to set up a port on the internet Gateway to forward to the local IP address of the server.  However, there is a router between the Gateway and the server, so the Gateway only recognized the IP address of the router.  How can I set it up to remote into the server?
And yes, I am using the ip address from the ISP--not the local ip address of the gateway, router, or server--from external locations.
Answer: You need to setup port forwarding on both - router and gateway.


Transferring from MS to PhD in usa

Question: I will be starting my MS in CS in spring 2017. At the time of admission, I was not sure of PhD and hence applied only for MS program. However, I would want to transfer to PhD program. Is it possible to transfer/convert the MS program to PhD? I am start my studies after a gap more than 6 yrs and don't want to wait another semester.
Since I am an engineering undergraduate, I am eligible to apply PhD without MS program.
Comment: Just write to the dean of graduate studies.  I imagine that they may say sure, and just put a different tag on your file, or they may ask you to bring it up again after *x* semesters.  I think it depends on the department.
Comment: Years ago when I went to grad school, while one applied for the PhD program you were not considered a full PhD student until you had passed your qualifiers (and received your Masters at that time). But that is all very university and department specific. Just call and ask...
Comment: If your goal is to switch within the school you're already attending, then you really need to talk to your department's graduate advisors.
Comment: I have completed almost all the formalities for the admission in MS, like i20 and visa. I want to switch to PhD at the same university. I just want to know will they even entertain such a request or I have to apply only once I obtain MS?
Answer: It depends on the university.  At mine you have to submit a "Letter of Intent" to the graduate office stating that you wish to continue on to another graduate degree in the university without having to file a formal application. I would talk to the department about how this process works, and your school's graduate office for more information - they may require another formal application, they may not.
Comment: Thanks everyone for the information. I will contact the department once I enroll to the MS course formally.

Transferring from MS to PhD in usa


Can opened cooking cream in frozen state go bad?

Question: I opened this cooking cream 2 months ago and it stayed in the refrigerator in an almost fully frozen state (right under the cold air blowing fan). It also has lost its flavour (not bitter, doesn't have a taste) and doesn't have an odour (slightly smells like flour). When I first opened it 2 months ago, it had solidified into some kind of thick whipped cream (probably age gelation). 5 minutes ago I gave it a stir and now it looks like this:
Comment: First, I'm not sure what cooking cream is. Can you say what it is? Heavy cream? Second, from the looks of it in the pictures, it would be in the trash in my house. I am going to upvote the current answer.
Answer: Typically cream that you buy from the supermarket is homogenized and stabilized so that the cream looks and behaves uniformly when you want to use it. If you get milk from a cow, the cream tends to separate from the water component and create a layer of fat (the cream) on top of the water (largely milk).
The reason it separates is that it is full of small lipo-spheres (think tiny ball-shaped droplets) of fat which are less dense than water, so they float and interact with each other to form larger balls which then from the top layer, kind of like when you shake a vinaigrette and the oil separates at the top over time. When you have homogenized cream, this doesn't happen because the lipo-spheres are even tinier and too small to interact effectively or even to float well.
Now you  are probably wondering where I am going with this - well, what is happening in your frozen cream is that the water component (about 70% of cream) freezes and creates ice crystals and these crystals disrupt the tiny lipo-spheres allowing the fats to again interact and separate out from the water when defrosted. This is a bit patchy in how it happens so the cream appears clotted and looks funny as not all those tiny lipo-spheres are disrupted, so some remain in suspension and still won't interact effectively, while others come apart and form the clumps that you see.
If it was frozen while still cold from when you first opened it, then it should be fine to use, just give it a shake to break up the lumps as much as you can and then beat as you would normally.
As you indicate that there is no smell, this is probably fine to use (I know this advice is late for OP, but maybe it will help someone else later). If it had a smell, that was sour or "bad", then like always, I would advise not to use.
Answer: yes.  definitely
the butterfat can go rancid even if it's fully frozen
almost frozen is like almost sterile, so there's surely plenty of microorganisms doing their happy little lifecycles, albeit more slowly than at room temperature
it looks like it's gone more towards becoming crème fraîche, but since you didn't intentionally inoculate it, you have no reason to trust that it's not going to hurt you
high risk, no reward.  you'd be smart toss it out


Overlapping Questions

Question: Certain logical questions belong as well in Philosophy Stack Exchange as they do in Mathematics Stack Exchange.  For example this question and this question both fall within the purview of both stackexchanges.  But, the people who will read Philosophy Stack Exchange are by no means the same as those who read Mathematics Stack Exchange.  Does there exist a way to make it so that questions can appear on both Stack Exchanges?  If not, can that get done?  If neither of those can get done, how does one communicate the question to both sets of people?
Comment: In general, the different StackExchange sites try not to have multiple posts or overlapping questions. I do see that these questions relate to both math and philosophy, but the characters of these two exchanges are very different from each other. I believe that every question should be asked in a place where it is more likely to get the better (and more intended) answer. And if that fails, then we can migrate it or the OP can cross-post it
Comment: If these questions are different (they seem to be now, but I'm no math whiz), they can both be open and posted on whichever site. If they are the same question, but worded differently (tailored to each site), then [it's still OK](http://meta.stackexchange.com/questions/65931/cross-posting-on-stackexchange-sites). But one should only be closed if they are exact duplicates.
Comment: @stoicfury Will you please vote to reopen this then http://philosophy.stackexchange.com/questions/1365/why-is-this-set-cqcpq-ccpcqrccpqcpr-ccnpnqcqp-the-most-common-set-of-axioms?
Comment: Just to summarize: it appears the consensus reached here is that these are duplicates and not tailored for philosophy.se -- @stoicfury please let me know if you feel differently about these?
Comment: In passing if you would unpack or develop the question a bit more and try to identify the specifically philosophical concern I will certainly reconsider my close vote.
Comment: @JosephWeissman As they currently stand (and I intend to keep them this way), the math question asks a question about a 9 letter axiom which given conditional proof, conditional elimination, and substitution comes as sufficient for all of propositional calculus.  The philosophy question asks about the commonality of the axiom set {CqCpq, CCpCqrCCpqCpr, CCNpNqCqp}.  The consensus reached concerned earlier versions of the questions.  Stoicfury no doubt has seen this.
Answer: Cross-posting is an issue that has been addressed on stackoverflow:

cross posting
c-p etiquette
c-p rules
c-p faux pas

To summarize,

cross-posting (having an identical question, either by copy/paste or by an implemented mechanism in the system) is strongly discouraged (and a feature to implement it has been stated will not happen).
it is not a terrible thing to 're-ask' a question, specifically tailored to each site ("each site is autonomous"), but it is discouraged.
if your question turns out to just not be appropriate to the site you are posting too or is not getting the expected answers, there is a mechanism to move a question to another site (flag to a moderator and they can 'reassign' the question).
Comment: @Doug: Oh and it is my opinion that both questions would have been better suited and better answered from the beginning at math.SE, because they are involve a lot of mathematical judgement (despite the technical overlap between the two domains on this question).
Comment: But what if the question doesn't need any tailoring?  In other words, what if it comes as appropriate to ask it in the exact same way on both sites?
Comment: @Doug: I'm just reporting what I read (that cut and paste is not wanted). I'd say work with the spirit of the rule, tailor as mich as is needed, but you'll have to judge for yourself.
Comment: Thanks.  The comments here http://math.stackexchange.com/questions/73184/why-is-cqcpq-ccpcqrccpqcpr-ccnpnqcqp-the-most-common-axiomization-of-proposi perhaps might indicate tailoring  as possibly contentious to some.
Comment: @Doug: Wow... my multiple comments: that question sure generated a lot o comments, 2) and it seems I must have been too weak in my answer here, and 3) principle is not the same as execution (meaning, you may have thought you tailored but they didn't).
Comment: You weren't necessarily too weak.  Some questions might get really tricky to tailor.  It does seem at least possible that some question can get written which needs absolutely no, nada, zero, tailoring between stackexchanges.  What does do with overlaps in the case of such a question?  At the time I posted it, I couldn't ask it on math.stackexchange.  But, I do think that philosophically-inclined people might have as interesting of answers as mathematically-inclined people to such a question.

Overlapping Questions


using an int to control events

Question: Let me explain -- I'm just looking for a way that I can link a number to a set of methods. I want to randomly generate a "difficulty" int, and pick out an event based on the number I get. IE, if I get an int of 3 I want that to point to a specific event. What's the best way to accomplish this? I was thinking of story the events in lists, but methods can't be in lists. I thought about making the methods into delegates and putting those in lists but that seems unnecessarily complicated. Also, in the future I think I'd want to put multiple events at each level which would sort of make putting them into array or lists difficult.
Comment: Delegates are not that complicated. You might want to take another look. Multiple options at each level just means a list of lists.
Comment: I can suggest also a dictionary of delegates : http://stackoverflow.com/questions/11503887/dictionary-with-delegate-as-value
Comment: Does Unity accept delegates on a array as component? If so, this could be used.
Answer: Provided all the events have the same signature:
delegate return_type Event(parameter_list);
Event[] events = { new Event(Event1),
                   new Event(Event2),
                   //.....
                   new Event(EventN) };

//in your caller method
events[random_int](parameters);

Delegates are the fastest and easiest method to accomplish what you want. And if you add more events, just add them to the array. It shouldn't be too difficult ;)
Answer: So you want to generate a random integer, and use the number generated to choose between a set of events. Seems like the best thing you could use would be switch case?
Switch :
int caseSwitch = X; //your random generated integer

switch (caseSwitch)
{
    case 1:       //if it's equal to 1 then
        Console.WriteLine("Case 1");
        break;
    case 2:         //if it's equal to 2 then
        Console.WriteLine("Case 2");
        break;
}

Is this what you're looking for?

using an int to control events


Automotive Embedded System

Question: I really need some guidance on this, first of all, I have intermediate knowledge in programming, specifically Java. I have an idea of creating a tool for cars just like the diagnostic testers that we see mechanics use when they need to diagnose cars' issues. I want to create a tool for cars (Not exactly the same as the testers), but I do not know what I need to learn, I know I need to learn C, but what else do I need though?, I don't mind one or two years of self-teach since I am a self-taught programmer. Thanks
Answer: You will be fine with C. The language which you use might, to some degree, be influenced by the hardware which you use to interface to the CanBus.
Read up on CanBus. Look at OpenCan. And (eventually) - spend some money and buy some hardware to interface you with your vehicle. Google until you find what suits you, but, for instance, this is cheap and a good start-point.
Comment: Thanks alot Mawg, yeah, I know low level programming language is very machine specific. But at least, I now know what I need to know. Thank yoy
Comment: BUT, you won't be programing directly on the embedded system. You will connect an interface device, to your PC, almost certainly by USB. That interface device is embedded, but you can code on PC. This device lets you use MS Visucal C++ or MS Visual Basic http://www.vitalsystem.com/web/dnet/can.php   Other devices will let you use other languages.
Comment: Btw, if you use Linux, look at http://en.wikipedia.org/wiki/SocketCAN
Comment: And here's a good tutorial http://fabiobaltieri.com/2013/07/23/hacking-into-a-vehicle-can-bus-toyothack-and-socketcan/    By now you have enough idea to be able to Google for more. Good luck!
Comment: And, for Windows, there is a DLL, so you could program in any language which Windows supports(!) - http://faq.vscom.de/index.php?action=artikel&cat=8&id=78&artlang=en

Automotive Embedded System


Change password without root access

Question: I have an access to my account on VPS over SSH. Some time ago, I changed my password and forgot it. But still, I can log over my SSH key. It was enough for a while, but now I need to login from another device, so it's time to recover my password. How do I change my password without knowing the old one (without root access)?
Comment: Are you root, or do you have the ability to perform tasks that require root privileges?
Comment: Who is your VPS with? They likely have a method to reset the password.
Comment: I would say it depends on the type of VPS. If it's a true VPS and they have spun up a dedicated VM for that instance, I highly doubt they have direct access to the account. However, if they simply allocated an account for you to use on a shared server instance then yeah, they should be able to reset it.
Comment: Can you load an Live ISO, if so I'd assume the fix is relatively trivial, also depending on your kernel version look into using dirty cow
Comment: login to rescue shell at the grub boot screen . there the shell will be root. then change passwd. "sudo passwd user1"
Answer: The short answer is, without knowing your current password and without root/sudo access, you can't change your password.  The basic *NIX security model does not allow mortal users to change passwords for accounts they lack the rights to access.
Doing what you want would requite root (sudo) access or at least read access to the passwd and shadow files if you wanted to run cracking software on them.
If you can access your account over your SSH key (not sure what you mean by that), then you will have access to your account and thus, MIGHT be able to change your password with some finagling.  For example, creating a trust relationship using .rhost that will allow people with the same username access without requiring a password.  Needless to say, this is a dangerous vulnerability and is discouraged.
Most distros that I am aware of require users to know their current password before they can change it.  This, again, is part of the basic *NIX security model that has been in effect for around 50 years.
The moral to the story, of course, if to have some sort of a standard username/password management plan so that forgetting your password is recoverable.
Comment: @Seth I agree but this answer was commenting on general *nix security and not specifically SSH. `Most distros that I am aware of require users to know their current password before they can change it. This, again, is part of the basic *NIX security model that has been in effect for around 50 years.`   That is a general statement, not about SSH, and is incorrect. If your data isn't encrypted it's usually quite simple to bypass passwords, which is why if you want true security you need to encrypt.
Comment: It's actually relatively simple to change any password you want on (most) Linux systems you have physical access to. Encrypted file systems can stop it but unencrypted systems aren't that difficult to recover. If you have physical access.
Comment: @Will The system in question is a VPS so your comment doesn't seem relevant...
Comment: @Will With physical access, yes. Without it, no. This answer is right. There is no easy way to change your password purely from the software standpoint (aka ssh level access) without the root/sudo password. If it were then it would be a huge attack vector.
Comment: As the answer doesn't make clear that it's ONLY under ssh that passwords cannot be bypassed, I respectfully disagree @Seth. The answer suggests that you simply cannot bypass the password in `Most distros that I am aware of` which isn't true.
Comment: @Will Ah, fair enough. I see what you're getting at now.

Change password without root access


Which fields of physics should I know in order to understand how diodes and transistors work?

Question: I want to learn principles of work of devices like diode, bipolar junction transistor and MOSFET. I tried to find answer on google and I found it, but problem is I don't understand branch of physics dealing with pn junction and other things. Which field of physics is neccessary to understand in order to be able to understand principle of work of devices I mentioned? Just to mention that I have not problems understanding mathematics behind it, I have problems with physics.
Answer: Basic, generic physics. You don't even need to understand or know about the cloud model for electrons. You can pick even that much up as you go along, really. You need to understand all the basic SI units, what they mean, how they are used and applied, the basic idea of dimensional analysis, etc. The first volume of Feynman's Lecture series on physics is more than enough, I'd imagine.
I'd recommend volume 1 of Feynman's lecture series on physics (volume 2 if you want to get into electromagnetism, too), a book by Jacob Millman called "Microelectronics" (nearly any edition is fine) for diode and transistor discussions that are easy to follow, a book called "Matter & Interactions" with at least the 3rd edition as it is provides a very intuitive understanding of rather deep physical ideas,...
But to be honest? Just Jacob Millman's Microelectronics, and even then only perhaps the first four or five chapters, is enough to get the basic ideas in your head.
I've found the web to be near to useless on this, though.
Comment: Jacob Millman's Microelectronics is probably one of the easier books on diodes and transistors to follow. Even then, though, take it slow and make SURE you think carefully through each step and get a feel for the meaning behind things. When he early talks about the electric field, in volts per meter, you should stop yourself and make sure you _understand_ the idea and why those units might make sense. (And remember that a volt is really a Joule per Coulomb of charge.) Just take it slow, think, test out the ideas in your head. Don't go forward until you have the idea. Then go to the next step.
Comment: No. In this case, they recently (year ago?) placed all three volumes on the web. That's PERFECT to use. The books are, in my opinion, worth having in book form, too. But it's money. So use the web versions. That's great.
Comment: Bohr's atomic model and basic electromagnetic field theory should be sufficient IMO, and maybe some elementary quantum mechanics. When I studied electrical engineering I hadn't even heard of Richard Feynman.
Comment: Thanks a lot! I found Feynman's Lecture series on feynman's official site. Is it enough or I should find somewhere book, first volume of Feynman's Lecture series?
Comment: @Bart: Millman manages to cover what's needed in the first few chapters without any electromagnetic theory (which is covered, though, in vol 2 of Feynman's lecture series), at all. The ideas are very simple. Work functions, a fraction of an idea about atomic bonds, some basic idea of thermal agitation, and a near trivial idea of  a cloud model for electrons. And a basic idea of position, velocity, acceleration, and collisions. The Hall effect might need some idea of electromagnetism. But you can get the idea without much to go on.
Comment: Is it possible to learn p–n junctions without a basic understanding of, at least, electrostatics?
Answer: Millman's microelectronics is definitely great. But, most people find it difficult to understand, either the language or so. If you face any such problem, prefer 'Streetman & Banerjee, Solid State Electronic Devices'. It is very comprehensive and the same goes for this book as well; a clear understanding of first few chapters is sufficient for the topics you mentioned.
For MOSFET, check out Adel Sedra and Kenneth Smith's Microelectronics. The basics are laid down very clearly with all the physics associated, in an easy to understand language.


Is there a way to play poker in peace?

Question: In an attempt to go for the million dollar achievement, while it hurts to sit from how hard this game has been violating me, the most painful part is that it never gives me a moment's silence. The characters, especially GlaDOS, are constantly chattering and interrupting, preventing me from actually playing the game. The dialogue was entertaining once upon a time, but has grown increasingly repetitive. I recall from farming hands in the first Poker Night that right clicking the mouse would skip dialogue and that there was also an option to reduce the frequency of the chatting, but I am finding that neither of these seem to be available this time around. Does there exist some way that I'm not finding to skip the talking so I can actually play the game?
Comment: Mute is your friend? :p
Comment: Sadly, mute just leaves them talking in silence and still prevents me from playing during their dialogue.
Answer: I feel your pain. It seems like the conversations in Poker Night 2 are not only more frequent, but far more repetitive than in the original; adding an additional character (GlaDOS) to the mix only increases the chatter.
Also, there's another unfortunate change that was made from Poker Night at the Inventory to Poker Night 2; there is no dialogue skipping during play or conversation frequency setting in the options menu. The best you can manage, sadly, is just muting the game.
Disclaimer: I uninstalled this game a short while back, so it's entirely possibly, though unlikely, that they've patched the option in. I did some searching and people are still having the same complaint everywhere, leading me to believe this is still an issue.
Comment: I was just playing it and I could find no skip (hence the question) so I don't believe it was patched. I thought maybe I had missed something. Listening to them chatter is fine and there are certainly volume options for that if the noise were much of an issue, but the interruptions of play are the real pain. I can't even do other things on my machine while I wait for them to let me play again because the game pauses whenever it loses focus. I eventually found a save-scumming-like exploit to hold out for a winning hand so I just cheated to the $1 mil so I could be done with it.
Comment: Apparently, it is possible to skip the dialogue by clicking left and right click at the same time, as the answer below states. I can confirm this also works, since I tested this out myself.
Answer: Right and left click at the same time skips the dialogue.

Is there a way to play poker in peace?


How can we get the list items from multiple lists using Batch REST API?

Question: I need to load all master data from multiple lists and bind it to from in form dropdown. For that I need to call every list separately.
Is there any option to call all the list in one query using REST api batch.?
I tried to search but Batch requests are available only for Add,Update and Delete.
Please help..!
Comment: @sergie take a look at simple batch utils https://github.com/anomepani/sp-rest-util/blob/master/BatchUtils.ts
Answer: The simplest way is to use PnPJS library for that purpose. $batch itself is a bit complicated when it comes to response parsing, etc. however PnPJS library hides all complicated logic inside.
This is how you can query multiple lists in one HTTP request with PnPJS:
import { sp } from "@pnp/sp";

const batch = sp.web.createBatch();

sp.web.getList("sites/<your site>/Lists/List1").items.inBatch(batch).get()
.then(items1 => {
    console.log(items1);

});
sp.web.getList("sites/<your site>/Lists/List2").items.inBatch(batch).get()
.then(items2 => {
    console.log(items2);

});;

// this line executes actual HTTP request to $batch endpoint
batch.execute()
.then(data => {
    // at this point all requests will be completed
    console.log('done');
});

I recommend you to install Chrome SP Editor add-in.
Then open your SharePoint site with targeted lists.
Then Open developer tools.
Go to the SharePoint tab and select PnPJS console in the left menu.
Copy\Paste my code (don't forget to fix urls) and hit CTRL+D.
In a console you will see the result.
Comment: The data object in batch execute method is undefined. Is it possible to retrieve & utilize items1 & items2 objects together, something like a common object for utilizing the values from both the requests?
Comment: I am trying to use the same example but instead of multiple lists, I am trying to fetch from top level site and multiple subsites.
I am getting data from the top level Sites. But not from the subsites.


2.4 million killed according to Rashi in B'shalach. Why does no one talk about it?

Question: In the begining of Parshat B'shalach, Rashi says that one p'shat for "Vachamushim" means one fifth, because during Makas Choshech, 4 out of 5 were killed out, and it happened during the time it was dark so that the Egyptians shouldn't see (although, I'm sure once that darkness went away,they would have noticed a HUGE difference in the Jewish population). If you do the math, 600,000 went out of Mitzrayim, which means that four fifths = 2,400,000. My question basically is, why is there no mention of this anywhere? Why were these people killed out? Why are we celebrating the g'ulah of 600,000 while 2.4 million were killed out? This has always bothered me.....
Comment: @Gershon, I think BFree wants to know whether anyone addresses the enormity of this holocaust or the implications thereof.
Comment: An otherwise unknown user named Yosef would like everyone to know that 600000 was just the number of males aged 20 and up. The total number that left Mitzrayim was around 2-3 mil.
Comment: Probably most don't mention it, because a literal interpretation of this Midrash is somewhat difficult for a couple reasons. The first is your very question; if so milliions died, why does the Bible not mention it (instead using a term _chamushim_ which on a pshat level means "armed"). Furthermore, one needs to say that the population growth was even more extraordinary than it was. The Midrash itself suggest that it is not literal as it mentions IIRC a view that only 1 in 5o or one in 500 left! According to the latter count, at least 300 mil. Jews were in Egypt and > 294 mil. would have died!
Comment: It seem inconceivable that there were 300 mil. Jews in Egypt, as the whole world population was probably not even close to that.
Answer: The Jews that died, did not want to leave Mitzrayim.

Because of these problems Rav Shwab
  says that the Medrash should not be
  understood literally - rather only a
  relatively small number died, but had
  they lived they would have given birth
  to millions of people over several
  generations. The three opinions are
  arguing about how many descendants
  would have come from those that died.
  He suggests that perhaps all they
  disagree about is how to make an
  accounting of the survivors - one
  holds that we measure up to a certain
  point in time such as the building of
  the Beis HaMikdash, and another
  measures to a later point and
  consequently there are more
  descendants over that longer period.

http://rabbiygefen.blogspot.com/2011/01/long-term-consequences-bo.html
Comment: Thank you so much for that article. It touches on all my questions, and is the first real article/drashah I've ever heard on this topic that actually makes sense. I would upvote you twice if I could!


In what order are triggered abilities executed?

Question: When in a player window where triggered abilities can take effect, how do players determine the order of execution of the triggered abilities?  Can they be in any order, i.e. player 1 triggers 2 abilities, then player 2 triggers 1, then player 1 again triggers 1?  Or do they follow certain restrictions such as particular abilities requiring all triggerings for that to be done atomically or, in the case of a disagreement among players, defaulting to the player who controls the lead investigator to decide who goes when, or in player order etc.?  I would think the answer is likely in the order the players decide, with disputes resolved by the lead investigator.
Comment: Do you have any actual examples for this? In all of my games, this honestly hasn't been an issue, since most triggered abilities don't have the same triggers... If they did, I think you could do them in any order you want.
Comment: Naw, most abilities in the game are only triggered by the player who has control of the card. Very few are triggered out of turn (although some characters use these windows to great effect - e.g., giving Agnes horror in multiple phases to deal damage).
Comment: I don't have any examples. I just assumed there would be plenty of cases of abilities that could trigger in someone else's turn and certainly even more that can trigger during one's own turn so there must be some resolution of turn order as far as executing those.  If I come upon an actual one, I'll elaborate on this question.  It does seem reasonable to make it a 'team decision deferring to lead investigator' though.
Answer: Form Rules Reference, p.17
Priority of Simultaneous Resolution
If an effect affects multiple players simultaneously, but the players
must individually make choices to resolve the effect, these choices
are made in player order. Once all necessary choices have been
made, the effect resolves simultaneously upon all affected entities.

If two or more forced abilities (including delayed effects)
would resolve at the same time, the lead investigator
determines the order in which the abilities resolve.
If two or more constant abilities and/or lasting effects
cannot be applied simultaneously, the lead investigator
determines the order in which they are applied.
Answer: If multiple triggered abilities trigger at the same time by the same player, those abilities can be placed onto the stack in the order of that players choosing resolving in reverse order. If multiple triggered abilities from multiple players trigger at the same time, first the active player orders their abilities in the order of their choosing onto the stack, then the next player in turn order does the same for their abilities, going around until each player has done this. This is active non-active player order.
The abilities begin to resolve in reverse order one by one from how they were put on the stack (meaning the last ability from the player furthest from the active player would resolve first). If a triggered ability or abilities were to then be triggered during the resolution of one of the stacked abilities, the current ability would finish resolving first. Before the next ability on the stack resolves, the new triggered abilities would be put onto the stack in active non-active player order again, and the last of these added triggered abilities would be the next one to resolve.
Comment: Are you sure this applies to Arkham Horror LCG? There is no such thing as "stack" in it.
Comment: yes, this is stack exchange
Comment: A game must have a stack predefined in this platform as it is stack exchange


Set RS232 port options from MacOS X CLI

Question: Does anybody know the magic command to set baud rate, parity, flow control, etc. for an RS-232 port on the MacOS X CLI?
Comment: http://stackoverflow.com/questions/3918032/bash-serial-i-o-and-arduino
Answer: To read from my arduino or attiny, I use this simple program:
<code>#include <unistd.h>
#include <fcntl.h>
#include <termios.h>

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

    int fd;
    ssize_t len;
    unsigned char buf[8192];
    struct termios tio;

    fd = open( argv[1], O_RDONLY | O_NOCTTY | O_NONBLOCK );
    cfmakeraw(&tio);
    cfsetispeed(&tio,B9600);
    cfsetospeed(&tio,B9600);
    tcsetattr(fd,TCSANOW,&tio);

    for(;;) {
        len = read( fd, &buf[0], 8192 );
        if( len > 0 ) write(1,buf,len);
        sleep(1);
    }

}
</code>
On the mac, using the FTDI chip (Arduino Duemilanove) for serial means that the stty command has no lasting effect.  Once the port is closed, it reverts to default parameters.  While this program is running, you can use stty to alter parameters.
Here is the default:
<code>$ stty -f /dev/tty.usbserial-* -a
speed 9600 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel -brkint
oflags: -opost -onlcr -oxtabs
cflags: cs8 -parenb
</code>
Then if the C program is running:
<code>$ stty -f /dev/tty.usbserial-A6003SHf -a
speed 9600 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel ignbrk -brkint
oflags: -opost -onlcr -oxtabs
cflags: cs8 -parenb -hupcl
discard dsusp   eof     eol     eol2    erase   intr    kill    lnext
^@      ^@      ^@      ^@      ^@      ^@      ^@      ^@      ^@
quit    reprint start   status  stop    susp    werase
^@      ^@      ^@      ^@      ^@      ^@      ^@
</code>
You can change the baud rate if for instance the Arduino is using Serial.begin(19200) for faster transmission.
<code>$ stty -f /dev/tty.usbserial-* 19200
$ stty -f /dev/tty.usbserial-*
speed 19200 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel ignbrk -brkint
oflags: -opost -onlcr -oxtabs
cflags: cs8 -parenb -hupcl
discard dsusp   eof     eol     eol2    erase   intr    kill    lnext
^@      ^@      ^@      ^@      ^@      ^@      ^@      ^@      ^@
quit    reprint start   status  stop    susp    werase
^@      ^@      ^@      ^@      ^@      ^@      ^@
</code>
Once the C program is closed, the serial port reverts back to its default.
Comment: OK, slowly starting to make sense. So if I wanted to use your code to just write a utility in C to let me interact with my Arduino board, I'd create a command-line projected in XCode, based in C, and then paste that in. Compile it, then what would I do to run it? Just ./ProgramName /dev/tty.usbserial-XXX?
Comment: Hmm, after much googling around I may have figured this out. I found this: http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/

Which I was able to modify to output the data I need, and compile. It seems to be working! :)
Comment: @Myk - To your first comment, yes.  To your second comment, good to hear!  You might want to read up/learn about the communication chain between the two ends (Mac <-> Arduino) and all the interfaces inbetween to ensure you have an idea of what's going on here.  There's a lot of interfaces between the USB port and the Arduino to understand.  :)  I take it from your blog that you dabble in a lot of different technological things.  If you plan on doing more with a serial port in the future, I'd either find an expert to help, or learn up on this stuff more.
Comment: Yeah, I'm mostly a flash/flex guy - I'm just trying to find a way to build a reusable Arduino -> Flash/Flex bootstrapper for use on a project I'm doing. Generally speaking the established practice is to run something like tinkerproxy or serproxy and just use local socket connections to interface with Arduino - but with AIR2 we have the ability to run native processes through ActionScript, so that's what birthed this experiment. Thanks!
Answer: I don't know in bash (or whatever shell OS X uses), but it's probably achievable in Python with the pyserial library.
Update: How about this answer on StackOverflow: https://stackoverflow.com/questions/3918032/bash-serial-i-o-and-arduino/3926278#3926278
Oh, wait, you wrote that. Does it work?
Comment: Yeah.  I'm asking around.  I'm like 80% sure stty will work - it's the traditional UNIX way of doing it.  But I was hoping someone who uses OS X and would know for sure. :)
Comment: Ah, I see. Very thorough.
Comment: Thanks for all your help, @sheep! I'm still having trouble with this and am beginning to think I'm just insane. Even using the various stty arguments, I put those in and it just hangs. I feel like there's some fundamental paradigm I'm not getting. ><

Set RS232 port options from MacOS X CLI


Grub not loading after Windows 8 Install

Question:
Possible Duplicate:
How can I repair grub? (How to get Ubuntu back after installing Windows?)

My system was configured to dual boot Ubuntu 12.04.1 LTS and Windows 7. Today I got my hands on the MSDN release of Windows 8 and I installed it over my Windows 7. Now the computer just boots to Windows 8 directly without loading the GRUB screen.
So I followed the steps as suggested in: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows. Running this command:
    ls -l /dev/disk/by-label/

gives the following output:
    total 0
    lrwxrwxrwx 1 root root 10 Sep 11 07:51 Entertainment -> ../../sda2
    lrwxrwxrwx 1 root root 10 Sep 11 02:45 PENDRIVE -> ../../sdb1

Also fdisk -l command gives this as the output:
    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x1246aa23

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048   319582199   159790076    7  HPFS/NTFS/exFAT
    /dev/sda2       319582208   602906623   141662208    7  HPFS/NTFS/exFAT
    /dev/sda3       602908672   625135615    11113472   83  Linux

    Disk /dev/sdb: 1939 MB, 1939865600 bytes
    64 heads, 63 sectors/track, 939 cylinders, total 3788800 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xc3072e18

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *        2248     3788799     1893276    c  W95 FAT32 (LBA)

So I assume that I have to run this: sudo grub-install /dev/sda3 to get GRUB up and running. But I am getting this error:
    /usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).

Can anyone please guide me in the right direction? The current Ubuntu installation is far too customized to my needs to lose it to a boot manager issue! Any help is much appreciated!
Answer: The GRUB needs to reside in front of all partitions on the device, therefore you should run
sudo grub-install /dev/sda

whereas using /dev/sda3 would install it only to the third partition. See the guide Recovering Ubuntu After Installing Windows you referred to:

From here, find only the drive name, ignore the partition number, that is, for partitions labeled "root", "data2", "fat", "home" and "swap" it's all still just sda. This is due to the fact that GRUB is installed in the MBR of the drive, and not on a partition.
Answer: You might have to run
sudo grub-install /dev/sda

instead. It will find your /boot/ folder on any of the partitions.
If this does not work, you can try the following (assuming you do not have a separate boot partition, as it should show from your commands):
Boot into the live cd and open a terminal.
sudo mount /dev/sda3 /mnt

This will mount your ubuntu install to /mnt
Then run this command
sudo grub-install /dev/sda --root-directory=/mnt/boot/

This will tell grub that it should install grub to sda, and that it should not look for /boot/, as this is located on sda3.
Comment: When I try to mount the drive it says I have to specify the filesystem type. Any suggestions?