Electrochemical protection for corrosion

Question: When we have a part that tends to corrode; Is it possible to apply an electrode on it to sense the excess or deficit of electrons on it that make it prone to corrosion and accordingly send a current that will drive that excess or deficit of electrons away? So that it will protect the part from corrosion?
Answer: I believe what you are suggesting is impressed current corrosion protection.  It is used commonly in pipeline and underground storage tank applications. Example
ICCP is superior to sacrificial anode protection but is an active process while the latter is passive.
If you do not coat the substrate I would think it would be corroding at a fairly steady state; so you would need to supply the current continuously.  The case of when the automobile is not running would need to be addressed.
If you do coat the substrate then you would be adding a redundancy which drives up cost and you still have to account for a power source during automobile downtime.
Either way it is important to note that they both require an anode.  If the anode in ICCP is less noble than steel then it will deteriorate.  If it is more noble then you would need constant current or galvanic attack on the substrate would occur.
Answer: There are two options: a passive method and an active method.

The Passive method is to use a sacrificial zinc anode. The zinc corrodes instead of the metal that it is attached to. More information about the mechanics of the system can be found on the Wikipedia page.
The Active method sounds more like what you are asking for in your question. This method imposes a DC current on the structure to effectively drive the chemical reaction away from reaction with the metal that it is protecting. As above, more information can be found on Wikipedia.

Both of these methods provide constant protection and aren't turned on and off.
Answer: What you're describing sounds like a galvanic cathode protection system.  In this system, a sacrificial anode is connected to the metal part to be protected.  The material in the anode is chosen such that it has a lower electropotential than the protected part so that it preferentially corrodes instead of the part.  The electrical connection between the part and the anode allows current to flow, which forces the part to become more cathode-like, which slows its rate of oxidation.


After applying a torque (on one side) of a mass in free space, are the rotational and kinetic energy equal?

Question: Consider a mass of arbitrary form that's freely floating in space and stationary in our frame of reference. Can we say that after a force has been applied on one side of the mass, the linear kinetic and rotational energy are equal, in the same way, that the equipartition theorem states that the energy of a gas is equally distributed over all available degrees of freedom for the gas particles?
Answer: Your terminology is confused. Rotational energy is a form of kinetic energy. I think you are distinguishing between rotational and translational KE. Also, torque is applied to the whole body, not one side only. Probably you mean that a force is applied off-centre so that it causes rotation about the CM as well as translation.
Your question is similar to force applied not on the center of mass. The linear momentum imparted to the CM by an impulse is the same whether or not the line of impact passes through the CM. This is counter-intuitive, because it means that an oblique impulse of the same magnitude imparts additional (rotational) KE compared with an impulse which passes through the CM.
The equipartition theorem does not apply here. It is a statistical law which applies to the averages for many interacting molecules or bodies. It does not apply for each individual molecule or body at all times.
Comment: Yeah, I'm not sure where the leap to equipartition theorem came in.  Why would this behave just like gas molecules?
Comment: @sammy gerbil- I made an edit to the question. Suppose you attach a pulley with a long rope on it (both with zero mass) to an arbitrary point on the mass. If you apply a constant force (perpendicular to the axis that connects the pulley to the COM) to the rope, why doesn't the equipartition theorem [not for the average of many particles, but for the distribution of (two kinds of kinetic energy in this case) in one mass]  hold in this situation? Why doesn't the rope impart equal rotational and linear kinetic energy to the mass? Can you give an example that this isn't true?
Comment: There is no equipartition theorem for this situation. What is the difference between the new situation with the pulley and the old situation without it? Why do you think the rotational and translational KE should be equal in this new situation?
Comment: @sammy gerbil-I  understand the situation now. If instead of a pulley we use a rocket to apply the force on the outside of the mass, the mass starts to rotate, but if we apply this to a rod, the linear motion of the rod will be zero after one rotation due to the symmetry of the situation. After a rotation of 360 degrees, the linear motion is reduced by the same amount as the linear motion is increased after a rotation of 180 degrees. So the mass is only rotating if you turn off the rocket after a rotation of 180 degrees. Which contradicts my assumption. I don't know why I thought of the E.P.T.
Comment: If a constant force is applied at a fixed position and direction relative to the object, the situation is the same as [here](http://physics.stackexchange.com/q/285453).
Answer:
You need force not torque to calculate the translational kinetic energy (energy associated with the linear motion of the center of mass).
The equipartition of energy theorem has nothing to do here.
The rotational energy gained depends on the moment of inertia.

Therefore, the energy supplied will never be shared equally between rotational and kinetic components (in certain cases it may but this is just a coincidence).
Comment: @YashasSamanaga-I don't see how your conclusion follows from the three mentioned points.
Comment: Rotational kinetic energy depends on the torque applied while translational kinetic energy depends on the force applied. The rotational energy acquired depends on the moment of inertia while the kinetic energy acquired depends on the mass. I can change one parameter keeping the other constant. I can make a system  with a given ratio of rotational kinetic energy and translational kinetic energy.


Should the DM announce to the players they are in a skill challenge?

Question: I am completely new to DMing and I am considering including a skill challenge in my next game.  Most of the players are new to 4e and one of them is new to D&D in general. Should I explain to them the details of a skill challenge, or just roll with their role-play and ask them to roll skills as appropriate?
Comment: These were all good suggestions, so what I will probably end up doing is to explain at the start of the session what a skill challenge is but not tell them when they encounter one unless it becomes necessary to move the story if they are stuck and don't have any idea where to go from here.  I definately don't want to predict (or at least tell) the outcome as then it will feel staged to my players and I really don't want that.
Answer: I had success doing the following while refereeing anything involving skills or abilities.

Player(s) describe what they are doing as if they are there as the character.
Think about how to use the mechanics to resolve it, in this case the Skill Challenge system.
Tell the players how it going to be resolved.
Listen to any feedback
Have the players roll.

In short describe, make a ruling, and roll.
I personally don't mind feedback from the players. Often they think of things I don't. So after I tell them how it going to be resolved I will listen to what they have to say and make any changes I feel is warranted. But in the end the final decision is up to me.
Specifically 4e Skill Challenges often involve multiple steps and rolls, so you may want to make it more interesting by doing the roleplaying for the few rolls and if there is impending failure have the players figure out an alternative to the remaining rolls. Again the same describe, make a ruling, roll steps apply.
I can't stress enough how always making sure that the players describe things as if they were there before rolling is important for roleplaying. For me as well as the players. Often it leads to interesting details being revealed and enhances the encounter.
Comment: +1 for the describe advice. It is the single most important element of transitioning from boardgamish feel to story-feel.
Answer: Short answer: Don't tell them they are in a skill challenge.
I would say, just let them tell you what they want to do, and think of skill checks to suggest for them to roll. If they don't realise they should be rolling a skill, just let them know "you can use skill X to do Y". Don't tell them outright that they are in a skill challenge - it breaks immersion.
Optional: If you want to make it more close to roleplaying, and  would rather not tell them to "roll skill X" (which is a wonderful idea) then ask them how they deal with the situation at hand and decide which skills are better suited to what they describe, and roll them yourself in their stead, adding their bonuses, of course (this is just an idea, you might want to do it, you might not, I am not saying this is the best way to do it, it's only optional) and at the end of it, you can choose to inform the players you rolled skill X for them, or not inform them, up to you. (keeping immersion in mind)
Comment: Never roll for the players unless the player(s) shouldn't know the outcome of a roll. Players like to roll dice, and more important than breaking immersion it keeps them invested in the game.
Answer: There are some excellent questions around skill challenges on this site:

How do I make skill checks more than just sequences of die chucking?
How do you involve all players in a skill challenge?
How can you add more meaning to skill challenges through narration?

I'd suggest reading through those; some of the most salient points though.

Don't bring up the game mechanics in play until absolutely required.
A skill challenge is a complex situation or task that has multiple skill checks, but it's still meant to be a roleplaying scene.
You have to have a firm image in your mind of the challenge, and how that would be addressed by various skills. Then you have to convey that image to the players.

Once you know what sort of skill challenge will be, figure out how player might react depending on whether you announce it, or keep it secret for a while. When you (think you) know how players will react, plan accordingly, picking  the one they will enjoy the most.
Ultimately it's down to you, and the individual challenge and players involved.
Answer: Definitely tell them that they're in a skill challenge, or if they're about to take an action that would initiate a skill challenge.  You wouldn't withhold that they're in a combat, would you?
I would also summarize what the potential outcomes are, in a general way. Example, best case: the miners will help you go spelunking; worse case: they don't want anything to do with you, but will grudgingly sell you equipment at twice what its worth.
If you're dealing with new players, give an outline of how skill challenges work.
Comment: I agree totally, save the "secret skill challenge" for advanced players.
Comment: I agree, except for giving them a heads-up on the possible results. Tell them what they're trying to do, but don't give the power-gamers a chance to re-route until it's too late. :)


Stolen phone - does Android Device Manager's lock override the thief's password?

Question: I'm currently trying it on another phone and it seems that as long as I have a pattern lock set up, the ADM lock screen shows up but the old pattern is requested instead of the remotely set password. The stolen phone had a simple swipe lock (Android 5.1) - if the thief set up a pattern/pin in the meanwhile is the ADM lock basically useless?

Okay, in my case the thief can definitely still use the phone - he receives WhatsApp messages and can read them eventhough I've set up the remote lock over 50 times. This is absolutely revolting - an utterly useless feature. I can guarantee he's not circumventing it another way - if they were even at the least bit technically savvy they would have wiped the phone, switched the Google account or at least disabled ADM long ago.
Answer: There might be a case if the Thief has formatted your phone to factory settings. Then in that case, ADM will be useless. Also, Hard resetting a phone is so easy, He was a thief, He would have done that till now...


In winter is it a safer bet to take a flight from Delhi airport or from Dehradun/Chandigarh airports?

Question: At end December or beginning of January, there's the problem of flights being canceled due to fog. Even if a flight's departure is in the afternoon, would it be safer for hikers to travel from the hilly areas to Delhi airport by bus and take a flight from Delhi or would it be pretty much the same risk of flight cancellation even if they didn't have to travel so far to Delhi, and instead got a flight from Dehradun or Chandigarh?
Comment: Almost. I'm asking if flights are just as likely or more likely to get canceled at IXC and DED than at DEL even if they are afternoon flights. If they are, then it would be better to reach DEL by bus and then take a flight from there. I'm assuming the airport at DEL would have more advanced tech to handle foggy conditions, but there's also the fact that DEL currently has very high smog levels.
Comment: Fog can impair visibility till afternoon in which case incoming flights at IXC cannot depart from their respective source stations. The outgoing flights are consequently cancelled. DEL has CAT-3 ILS and flights are able to land/take-off in fog even though there may be delay. As a frequent flier out of IXC, I never book flights from IXC in peak winters because there is always a danger of them getting cancelled. DEL is what I go for even though it means 10 hours of bus journey
Comment: @RedBaron  I guess you could post that as an answer. Like pnuts said, it might be good to have some stats as well, so that others who search for this question will see your answer and be able to take decisions.
Comment: My personal experience says prefer Delhi over Chandigarh, as latter has flights cancelled even on normal days, where flights in Delhi suffer from fog only in December last two weeks to January 2 weeks, usually from 2am to 7-8am..
Answer: I don't have hard numbers w.r.t cancellations for the smaller airports, but I'd like to answer this based on my (limited) experience.
Given the situation that you've mentioned, I would always book flights in winter out of Delhi and never Chandigarh, the Chandigarh airport is relatively small and notorious in terms of flight cancellations even on days when the visibility is reasonably good. What's worse is that there are very few alternatives that you can rebook on (This of course depends on your destination). I have never flown in and out of Dehradun so I can't comment about that airport but I suspect that the situation would be similar.
The Delhi airport is severely impacted by fog in the winters as you know but unless the situation is exceptionally bad, it results in mostly delays and not cancellations. I would of course recommend that you book and airline that flies in and out of T3 to minimize the chances of cancellations.
As for getting to Delhi from Chandigarh, I'd recommend taking one of the early morning Shatabdi trains, which typically experience the minimum delays and getting to the airport from NDLS is quite easy with the Metro link.
Comment: For travel between Delhi and Chandigarh, [Haryana Roadways](http://hartrans.gov.in/ors/) operates Volvo starting from ISBT Sec-17 and going till IGI Airport (I think till public transport area from where you can get shuttles to terminals)
Comment: Thanks for the extra info about Shatabdi and metro. We were considering bus travel, but train would obviously be better. Wonder if there would be seats available for last minute bookings. Also, Chandigarh is indeed not yet CAT III compliant: http://airportchandigarh.com/info/chandigarh-international-airport-update
Comment: @Nav you should most likely be able to find seats as long as you have a couple of days to go. These are shorter distance trains; so not as congested as the longer distance ones which sell out months in advance. Best of luck for your journey.


Maps of star clusters

Question: Inside star clusters, there are regions where stars are within 1 light year of each other. I wish to create a sci-fi setting in one of these regions. To start, I have tried to find maps/charts of these star-dense regions, but I have not had much luck. Are there any resources that I could use that would show this information, including the distances between each star? I have been looking more at open clusters since those seem to be more viable for planets, but information on globular clusters could also be helpful.
Comment: Welcome to worldbuilding, good start.
Comment: There are no accurate maps, because our accuracy-of-distance measurement is **hopelessly** inadequate for the job. If stars are a few light-months apart, but our error in measurement of their distance is +-500 light years, any map will be  a lie.
Comment: Be aware that the globular clusters are literally older than rocks: they consist mostly of first-generation stars, which have few nuclei heavier than helium, hence expect no solid planets.  Young clusters like the Pleiades typically are not gravitationally bound: they will eventually drift apart.
Answer: Do you really need a spatial map of a real star cluster for your story? Stars tend to orbit and move around so the map would have to include hundreds of thousands of stars, each with a three dimensional spatial co-ordinates as well as velocities and accelerations in 3D as the picture would change over time.
This might not be exactly what you want but it's a start:
https://stars.chromeexperiments.com/
Answer: It's certainly difficult to find information on the locations of individual stars in globular clusters, given that none are in our stellar neighborhood - which is expected, as they occupy the galactic halo. Messier 4 is believed to be the closest globular cluster to Earth, and while its distance is disputed, a value of ~7200 light-years seems to be commonly used. Its diameter is on the order of 75 light-years, so while determining whether a star along its line of sight is a member of the cluster isn't impossible (and might be made easier by looking at the star's motion), it's certainly not easy.
Open clusters are easier targets, as they lie in the galactic plane and are, in general, closer to Earth. The Hyades cluster is a mere 150 light-years away. This means distance estimates to individual stars might be possible, and errors on those values are likely to be smaller. In many cases, individual stars within the cluster may be studied as objects of interest in their own right. All the same, a complete map of the cluster is not easy to create. In observational astronomy, our instruments are biased towards detecting objects which are more luminous, so many lists of stars in individual clusters might well omit the dimmer objects.
With that in mind, I did some digging and came across the Milky Way Star Clusters Catalog, which contains data from approximately 3200 open clusters in our galaxy. There are three subcatalogs (1, 2, 3); the first contains the bulk of the original catalog (~3000 clusters), and the others contain about 200 additional sources. Each of these three subcatalogs in turn contains a number of files, including bulk properties of each cluster (e.g. mean radial velocity, age, proper motion, etc.). It also contains a directory (example for the original subcatalog) containing one .dat file per cluster detailing the properties of individual stars, including:

Right ascension and declination (columns 1 and 2)
Apparent magnitude in the bands B, V, J, H and K (columns 3-7) and measurement errors for the J, H and K (columns 8-10)
Spectral type and luminosity class, if available (column 19)

These are detailed more in the README file for each subcatalog.
If you know the distance to each star, you can use its coordinates to find its location in space. Unfortunately, the distance to individual stars isn't listed, because it's quite difficult to determine en masse. You can do the calculations yourself if the star has a spectral type - look up the absolute magnitude of that spectral type in a given band (say, the V band) and then use the distance modulus equation:
$$m_V-M_V=5\log_{10}(d)-5$$
where $m_V$ and $M_V$ are the apparent and absolute magnitudes in the band, and $d$ is the distance in parsecs to the star. If you know $m_V$ and $M_V$, you can compute $d$.
In theory, this is all well and good, but there are some prominent limitations:

Magnitude uncertainties may lead to distance uncertainties greater than the typical separation between stars, particularly for clusters that are further away. To mitigate this, I'd recommend looking for clusters that are closer to Earth.
Very few stars in the catalogs have spectral types (at least for the few datasets I've looked at). That's not surprising; determining a spectral type is also nontrivial. The lists may be more complete for well-studied clusters; again, look for ones closer to Earth.

The Coma Star Cluster, listed under the name Melotte 111, appears to have a couple hundred stars with spectral types in its .dat file, presumably including the brightest members, and it lies a comfortable 280 light-years away. It may be worth looking at as a test case.
Comment: Surely the Hyades are far sparser than Giganym's desired setting?
Comment: @AntonSherwood Perhaps, but I think that might be a necessary trade-off, particularly since they'd prefer open clusters over globular clusters.

Maps of star clusters


Why are Vipers lacking FTL?

Question: In Battlestar Galactica, the main Colonial fighter, the Viper, lacks faster than light travel. Why is this? Raptors, ships not much larger than the Viper have the ability for FTL travel. Cylon raiders and heavy raiders both have FTL ability and have used them in many engagements. And from the usage of the Viper, it seems that these ships have not been designed for long range strike missions or to provide escort for the heavier Raptors during their missions. So can anyone explain why such a potent craft has been hobbled to only flying at sub-light speeds?
Answer: The FTL drive systems of the Cylons were far more efficient (and thus smaller) than the systems used by the Colonials. The FTL drive was too large to put into the narrow frame of the Colonial Viper and the smallest vessel that could carry a jump drive was the Colonial Raptor which acted as an electronic warfare, reconnaissance and short range transport.
There was a Viper design, made from scratch onboard the Galactica that did incorporate an FTL drive, by sacrificing weapons system space. The FTL drive would place significant stress on such a vessel and the design came with a number of other limitations.
The Cylon Raider entry at Wikipedia reports:

The Cylon Raider is also capable of making FTL jumps. After a Heavy
  Raider was captured by the Battlestar Galactica, its FTL drive system
  was discovered to be more efficient than those on the Colonial
  vessels. It could travel the distance of Kobol to Caprica in less than
  10 jumps (compared to the estimated 120 jumps the Colonial fleet would
  take). It is capable of atmospheric flight, as was its predecessor,
  and is far more maneuverable in spaceflight than the previous Raider,
  likely due to upgraded thrust-vectoring systems.
Comment: The difference is half a meter in size, but with the compression and reduction of their FTL drive (and the living nature of their ships) they do not have to make space for life support technologies for pilots AND weapons.
Comment: The Raptor FTL drive would fit within a Viper sized frame but the Viper used this space for weapon systems instead. See [Blackbird](http://en.battlestarwiki.org/wiki/Blackbird)
Comment: @HorusKol It's not a person-sized hole... it's a cylon-meatlump-raider-pilot sized hole.
Comment: Thank you for the reference. I have made an additional edit.
Comment: Cylon raiders also seem to be slightly larger than Vipers - thought there seems to be a person sized hole in the middle of their fuselage (for some unknown reason) - don't know if that's a factor

Why are Vipers lacking FTL?


How can I fix these peeling cabinets?

Question: Our house is less than 6 years old and our cabinets are peeling.  How can I fix it?
Comment: What are the cabinets made of: plywood, MDF, particle board, etc.? Are the doors made of a different material than the rest of the cabinet? If so, are they both having the same problem? What are they faced with: paint, polyurethane, melamine, etc.?
Comment: I agree more info needed, but anything peeling is going to require sanding or stripping before refinishing.
Comment: I'm going to say particle board...?  The peeling is happening to the " high traffic" cabinets, but it's not like they are being scratched.  The " finish" is flaking off.
Answer: You are going to have to re-finish. If it is just the doors, I have seen people leave the cabinet face-frames alone and just refinish the doors. If it really is particle board there will likely be no way to restore them to an acceptable "wood-look" finish; you will probably need to consider painting them.
To paint, make sure you sand all surfaces until any material that is peeling, AND any material that looks like it might peel, is removed. Fine sand to knock down any gloss, then wipe the surfaces clean with mineral spirits (paint thinner), turpentine, lacquer thinner, or some other solvent. Prime with a high-hiding latex binding primer like BIN 1-2-3, then use a good quality gloss or semi-gloss paint with a professional grade paint brush (don't skimp on the paintbrush for the finish coat, your end result will be way better).
it's a lot of work, but nothing good is ever easy.
Comment: it will be easier if you remove the doors and lay then on sawhorses outside for sanding and painting. And remember to ensure adequate ventilation when using solvents and extinguish sources of ignition.

How can I fix these peeling cabinets?


Affine term structure for CDS

Question: in papres such as  https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2686284 (Exploring Mispricing in the Term Structure of CDS Spreads by Robert A. Jarrow, Haitao Li, Xiaoxia Ye, and May Hu) a state space model is applied to the term structure of the CDS.  what are the variables that make up the state variables?
How can I calibrate the uscented kalman filter?
Have you some matlab examples?
Comment: Hi, I just had a look: isn't everything laid out in the paper, especially in the appendix? If you present your effort so far, we might be better able to help you.
Comment: Hi, I would like calibrate an affine term structure model on a matrix of CDS spreads where each column it's a specific maturity (6m,1Y,...,30Y) and each row it's an observation date. I haven't understood, principally, what are the parameters of input for the UKF. I've to use the CDS spread, directly, or the bootstrapped intensities?
Answer: In a (very small) nutshell, the estimation idea is the following:

Quoted CDS contracts are driven by a risk neutral default probability $PD_Q(\tau\leq T)$.
The default probability is again modeled via a default intensity process $\lambda_t$, i.e. $P_Q(\tau \leq T)=\mathrm{E_Q}\left(e^{-\int_0^T\lambda(s)ds}\right)$
The default intensity process may be modeled as a CIR process (strictly positive), i.e. $d\lambda_t=\kappa(\theta-\lambda_t)dt+\sigma\sqrt{\lambda_t}dW_t$

Thus we may observe (daily) CDS  quotes (at various, fixed, maturities, i.e. 1Y, 3Y, 5Y) but we cannot observe the underlying $-$ model-specific $-$ default intensities.  In order to estimate the latent level $\lambda_t$ for each observation time point $t\in(0,1,\ldots ,T)$ as well as all unobservable parameters $\kappa,\theta,\sigma$ we need to find a way to glue observations $CDS_t$ (potentially with an observation error $\epsilon_t$) onto the (latent) state space process and do some inference.

Linear world:
If the observation model (CDS quote) were a truly linear function of the underlying intensity, we could very easily make use of the standard Kalman filter machinery:

Discretize the state space process, i.e. $\lambda_{i+1}=a+b\lambda_{i}+\sigma_iz_{i+1}$
Formulate the (vector of) observations: $CDS_i=A+B\lambda_i+y_{i}$
Apply the Kalman Filter (If you want to do full inference (i.e. if you want to find the 'true' underlying distribution etc.), you may need to apply forward and backward sweeps of the Kalman Filter).
Optimize $\kappa,\theta,\sigma,\lambda_0,...$ so that the likelihood of the CDS observation errors is minimised.

As the CDS pricing equation is not linear in the underlying intensity state, we cannot simply invert the (linear) observation equations, but must resort to more computationally intensive means, e.g. the UKF or even brute force Markov Chain Monte Carlo.
Again: All this on a very high level.
Comment: Thanks a lot, it's a little bit more clearer now. Have you some example implementation in Matlab? Another question, how I can switch from the risk neutral measure Q to the objective measure P?
Comment: I did part of this during my PhD in Matlab, yes. PSA: it's a real pain; don't go there! Nevertheless, this could be starting point theorywise https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2512198. This is an MCMC implementation. You may 'strip out' the FX option components, drop the jump parts, and arrive at a very simple model of CDSs and default intensities. Should be not too hard from there (though, still a bit of effort involved)...

Affine term structure for CDS


Implicitly self-referring honorifics

Question: I am told that ご連絡します for "I will contact you" is not more polite than 連絡します but simply wrong because the honorific ご should qualify actions done by the interlocutor, not by myself. To make it polite I must use 謙譲語 and say 連絡いたしますinstead.
This makes perfect sense to me, but wouldn't it also apply to お願いします, where the お is honorific?
Comment: Also related: https://japanese.stackexchange.com/a/54417/9831 / https://japanese.stackexchange.com/a/56663/9831
Answer: I would say what you were told is partly correct but partly wrong. You should use a 謙譲語 verb いたします in business settings. But you can safely add ご/お to a 連絡 from yourself. Saying ご連絡いたします is perfectly fine.
ご/お as a prefix often forms a 尊敬語, but it sometimes forms a mere 美化語, too. ご連絡 is not a 尊敬語 but a 美化語, and you can safely use 美化語 to refer to things belonging to yourself.
For example, no one thinks you are paying respect to yourself if you said お尻が痛い or お腹が痛い. However you should not say お耳が痛い or お顔が痛い because these are 尊敬語.
Likewise, saying お願いします is perfectly fine, and it's polite enough when you speak to your colleagues. But you should say お願いいたします when you have to be more respectful.
See my previous answer for details: can 美化語{びかご} create implied subjects?
EDIT: Something like ご連絡を差し上げるのが遅くなり申し訳ありません is also perfectly fine. As Chocolate's links suggest, お/ご is commonly used in humble expressions, too. See this chiebukuro question, too.
Comment: Thinking about お尻・お腹 vs. お耳・お顔, it's quite interesting the words that have lexicalized (become "everyday" 美化語【びかご】 or 丁寧語【ていねいご】), and those that remain "special" (where adding the prefix creates a 尊敬語【そんけいご】).  Probably something to do with frequency of use, I'd imagine.

Implicitly self-referring honorifics


How to manage long journeys as DM

Question: I recently started running Hoard of the Dragon Queen as a DM and this is the first time for me. During the campaign there are a lot of journeys that take several days, even weeks, and in some cases nothing important happens. Now, my question is: how much time should I dedicate to them? Should I just say "You travel from A to B in X days", maybe adding some details about the road, or should I provide a longer and more detailed description? The same question holds when some important events are planned: should I move directly from one event to the other, like "two days after event A, event B occurs"? I read the advices in the DMG but I would like to have more specific indications on the typical approach. Also, I am afraid that if I start describing some elements of the environment (a waterfall, a big rock, a tree and so on) then the players start investigating about it thinking that it is important for the plot.
Comment: Possibly related: [What's the best way to make time spent travelling more interesting?](http://rpg.stackexchange.com/q/55406)
Answer: This largely depends on both you and your group. Do they want a lot of random encounters? Would they prefer to just play the module out? Do you want to throw things in the mix to interfere?
Hoard of the Dragon Queen, and the Rise of Tiamat, both allow for a lot of flexibility. In addition, they use milestone levels instead of XP based levels. So encounters can be fun, but with this being your first time, I strongly recommend sticking to the books. It will give you a good idea of what to do for encounters, how to tinker with the characters, setting up a good ambush, and most importantly, it will stop you from overpowering them with hordes of magical loot or ridiculously strong enemies.
As for worrying about descriptions, my advice is: Don't. If it's not important, just keep telling them, "It's still a waterfall. Your investigation skill reveals the water falling now is different from the water falling from before. Largely due to the fact that the water can not defy gravity and return to the top of the waterfall." or something like, "You turn the rock over and over, attempting to discern anything at all from it's bleak, soulless face. Getting frustrated you even try licking the rock and singing it a sweet song. Alas, it has a heart of stone, and forever rebukes your attempts by refusing to display even the slightest emotion." Then, when the players leave the area, you should pass the investigating player a note that just has, "I'll miss you.... :(" written on it. It's always good for a laugh.
They'll learn to ask about things, and you'll learn how to be descriptive, or sneaky, in setting up your terrain while they work through ways of using it to their advantage.
A piece of side advice if this is your first time: Don't be afraid to say, "Wait. I screwed something up. We need to rewind 5 minutes." Players are generally less mad at open admissions to a mistake than they are to underhanded retcons.
Answer: In my experience, unless a journey will have something happen during it, don't waste time on it. Tell the players "This will take 10 days, is there anything particular you want to do while traveling?" and then react accordingly.
If you want a chance of a random encounter, roll it at the start and throw it in, but don't make it go day-by-day if there is no point.
Comment: Although it should be noted that some the Hoard of the Dragon Queen does have a day-by-day random encounter chart for a particular journey. Groups I've seen playing it have gone around the table to have the players roll for random encounters every day.
Answer: Long journeys can be played as a series of transitions, rather than as a series of points with nothing in between. Rather than describing landmarks, you should describe the environment in general terms, giving it some effect that it is having during that transition. This means that players have to ask questions to get specifics, and won't think that the waterfall must be special just because it was mentioned.
People are then able to play out how their characters would behave during this transition, rather than playing their reactions to specific events.
The journey will therefore be a living, interactive environment, rather than just a series of random encounters, but you can still chew through multiple days at a time and control the tempo.
A few examples you could try; they are ongoing situations which can match the time frame of the travel. If somebody engages with one of these situations, that is the time to produce descriptions of specific things.

It is 3 days travel between the town of W and small outpost F. The sun is beating down, everybody is hot and sweaty. roll perception checks. Dodgy NPC X can be seen going around the merchants, buying up something in crates.
Over the next 6 days, the boggy ground slows your progress. The laborers are getting into an unusual number of fights.
As you spend the next 4 days travelling through the swamps, the insects are biting a lot more than anybody expected. People are disappearing.

Some of these events, depending on how they are played, can have consequences later in the journey:

As you travel between settlement M and settlement L, the weather turns to snow and sleet. Your clothes are constantly wet and you are cold. Dodgy NPC X seems to be the only merchant selling winter clothing and is making a killing while people freeze.
Answer: Create an Atmosphere
Most fantasy books include travel that describe the journeys with some level of detail, you can just imitate one or two of these. Atmosphere can give the players a feel of what they're fighting for: the simple peasants that don't understand the encroaching danger, the natural wonders that might be befouled. (Remind the party of the encroaching danger to these nice people and places, if needed.)

Also, I am afraid that if I start describing some elements of the environment (a waterfall, a big rock, a tree and so on) then the players start investigating about it

This isn't anything to be afraid of. If the party is interested in investigating everything they see, and if everyone's having fun, then let them.
Keep these things short: one quick encounter, or you can even hit the fast-forward button: "You thoroughly search the rock, and one of you finds a bag with 30 SP!"
"There's got to be something else!"
"You were quite thorough, and are confident you have discovered all the rock's deepest secrets."
Side Quests vs Main Quest
Where this can run into problems is when you have a party that always thoroughly investigates, the plot can really slow down. With a published campaign, too many side quests can get the party leveled up too such, and you have to buff the encounters.
If you use plot-based leveling, that encourages the party to stay on track -- make sure the party understands they won't level up until they hit a point in the main story.
The Meandering Plotline
But it's also fine, if nobody minds, for the main quest to be an overarching thing that the players come back to after looting every cave and abandoned castle they find along the way. Those games tend to have a lot more variety than ones where the party is laser-focused on their singular enemy.

How to manage long journeys as DM


UK self-employed, not VAT payee, EU client wants EU VAT number

Question: I am a UK-based self-employed consultant, not registed for VAT
An EU-based client wants EU VAT number otherwise they won't pay
If I register for the number, is it just a paperwork hassle, or do I have any other duties?
Can I de-register later?
It's only for this one contract and I do not intend do use it - no VAT is charged on my services
Comment: Can you check with them if they are happy with your tax id alone? I freelanced for my German employer, and they were fine with just tax id.
Comment: Have you explained to your client that you are exempt from VAT registration? It may be that the client is unaware of this (some EU countries require **all** self-employed persons to be VAT-registered).
Answer: The way I understand it VAT number in EU serves as EU-wide tax id. There is a VAT number database where you can check the validity of counter party VAT number. In Czechia you are required by law to acquire VAT number no longer than a month after you issue your first invoice to an EU counter party. I suggest you check your regulations as you might be required to get one anyway.
Answer: There's no obligation to be registered for VAT in the UK unless you meet the following conditions:

Compulsory registration You must register for VAT if:
you expect your VAT taxable turnover to be more than £85,000 in the
next 30-day period your business had a VAT taxable turnover of more
than £85,000 over the last 12 months You might also need to register
in some other cases, depending on the kinds of goods or services you
sell and where you sell them.

gov.uk

Of the ten years I've been freelance, I've been VAT registered for about eight of them. Since doing it, I've had the benefit of being able to claim back any and all VAT charged on any capital expense, software, hardware and expenses related to the business.
So really, for the hassle of slightly extra paperwork (Which my accounting software already does) you may as well just do it. If you work for large companies, they're not bothered by the extra 20%.
Against it though, they have tightened up the aspect where you could charge 20% and only have to pay 13% to HMRC (The old film & tv levels, now brought into line) so there's no more free money. But for my circumstances, it's still worth it.
Come December/January though, who knows. I just hope to be able to still work for EU companies...
Answer: In France a microentrepreneur is exempt from VAT below a certain yearly income. However some freelancing sites do charge VAT, unless one provides a VAT number. Requesting a VAT number is not difficult, but then you have to charge VAT consistently on all your contracts, despite being exempt (as far as I understand). There is no certainty on this issue.


Transit at Riyadh International airport

Question: I am Indian national and hold Dutch residence permit, travelling from the Netherlands via Riyadh (Saudi Arabia) to India.  My ticket shows self transfer (baggage claim & re-check in) at Riyadh. I don't know whether I am allowed to go in the baggage area or not. Can anyone answer?
Answer: To reclaim your baggage you'll need to clear Immigration; to do that you'll need a transit visa.
From Timatic https://www.timaticweb2.com/integration/external?ref=d975cfc59f5c0abd06d16e872198110b&clear=true:
"Visa required.
Transiting without a visa is possible for:
Passengers transiting through Dammam (DMM), Jeddah (JED) or Riyadh (RUH) with a confirmed onward ticket for a flight to a third country within 12 hours. They must stay in the international transit area of the airport and have documents required for the next destination.
Only one transit stop-over in Saudi Arabia is permitted."

Transit at Riyadh International airport


"Salty" in place of expensive?

Question: Someone I know was talking about 600gb hard drives and his description of the cost was "salty". When I asked him to clarify, he told me it meant that they were expensive. I have searched and can't find any reference to it being used that way. Where does that definition originate? Is it a regionalism?
Comment: "Salty" language is obscene, and high prices are also obscene.
Comment: There are a couple of references on urbandictionary.com that refer to _salty_ as being something that is "unreasonably/extremely expensive but possibly desirable" - but they have too few and largely negative votes to be counted as fact IMO.
Comment: In Turkish, we use 'Tuzlu' which means salty.
Comment: Coincidentally, I happened to say last night that at under £50, 1.5tb (1500gb) drives are now [cheap as chips](http://www.usingenglish.com/reference/idioms/cheap+as+chips.html). Someone else said that if global food prices keep rising, pretty soon they'll be *cheaper than chips*. :)
Comment: I've heard salty being used more as a synonym for unpleasant (and antonym of sweet). So in the context of purchasing something then salty would indeed indicate unpleasantly expensive but it's not associated with cost per se.
Comment: In French too, the expression "this is a salty bill" ("la note est salée") is very common.
Comment: 6th century: in the sub-Sahara, Moorish merchants routinely traded salt 'ounce for ounce' for gold
Comment: In greek salty price means expensive. Is your friend of greek origin?
Answer: The opposite of "salty" in this context would be "sweet" (for the buyer), that is cheap.
"Salty" (especially in excess), implies "unpleasant," which (for a buyer) in turn implies "expensive."
Comment: +1 for noting the contextually-suitable antonym *sweet*, though I don't think either word is used very often in relation to prices (*sweet* at least somewhat more, perhaps). There's also *sting[ing]* used in relation to high prices, which could echo [rubbing salt in the wound](http://en.wiktionary.org/wiki/rub_salt_in_the_wound)
Comment: I believe these are "figures of speech," as opposed to "accepted" English usage.
Comment: I believe "figures of speech" and "accepted usage" are not in any meaningful sense mutually exclusive. Personally I do not consider "accepted usage" even excludes slang or profanity, though others may take issue with that. Not that I ever mentioned "accepted usage" - I simply said that neither of these metaphorical usages are particularly common.
Comment: It makes sense to say that a cheap good item is 'sweet', but having never heard the OP's usage, even with the logical explanation, 'salty' just doesn't _feel_ like the opposite or expensive.
Comment: Actually, the opposite of "sweet" is generally considered to be "sour".
Comment: "Sweet" versus "sour." In most cases that's true. Here, the context was that of a "sweet" deal, so it functioned as the opposite of "salty" (expensive).
Answer: Although an old question I feel I might have something to add to the above answers and possibly help other confused visitors.
I don't know if 'salty' is used in the same sense in other languages, but at least here in Finland, we might use it like your friend did: "This apartment is way too small for the rent to be that salty", meaning that the rent of the apartment is too pricy and doesn't correspond to its surface area.
So if your friend was foreign (perhaps Finnish) he would have used a literal translation from Finnish to English in his sentence. It sounds a bit off in English because it's not a known or, at least not commonly, used phrase.
Comment: A very similar expression is used in Italian too, if something is [**salato** = *salty*](http://www.wordreference.com/iten/salato), it is "high" in price.
Answer: The most common slang meaning closely related to OP's example is salty = crude, [slightly] pornographic. The high, excessive meaning intended here is very similar, but I think this usage is not widespread.
I haven't looked anything up, but I imagine that in earlier times before widespread refrigeration, canning, etc., it would be quite common for foodstuffs to be excessively salty. This would quite naturally lead to a strong association between the word salty and the concept of excess.
Possibly fanciful, but it wouldn't surprise me to learn that children's well-known aversion to highly-flavoured foods might have encouraged the salty = smutty sense (not suitable for the young ones).

EDIT: I just watched The Rider (2017), where the last thing crippled ex-rodeo star Lane Scott says (actually, signs, since his injuries have severely limited his ability to speak) is Salty!
Lane's staunch friend Brady has just shown him a picture of him (Lane) riding a bull before being injured, and it's pretty obvious Lane has a very positive reaction to the picture - he means it's impressive, not excessive or annoying.
Answer: I've never heard this in a modern context, but in that past, salt used to be a very valuable mineral (because of it's abilities to preserve food), so maybe to say something is "salty" is to say it is valuable, like salt, though this might have made more sense hundreds of years ago.
Comment: Another reference is here: http://time.com/3957460/a-brief-history-of-salt/.  Salt was valuable as a food preservative for winters, and as an antiseptic. During wartime, one would attack an enemy's salt reserves, in an attempt to starve them out in winter.
Answer: Its origin might be related to the high cost salt had in the past.
In Spain "salty" is an expression frequently used (En esa tienda los precios son salados = In that store prices are salty), so it might have been a literal translation of that expression?
Answer: Given the context of talking about hard drives, it is possible the usage came from the gaming world. Although several sources talk about potential origins of the phrase, personal experience and some other sources make me think that currently this term is mostly used in the gaming world to mean "upset" because they are being beaten, sometimes to the point of toxicity (verbal and textual abuse of other players).
The impression I would have if someone described a hard drive price as "salty" would be that having to pay that price would make them "salty," or upset to the point of pouting about it.

"Salty" in place of expensive?


Minimum RAM needed for Minecraft server?

Question: What is the minimum RAM needed for a Minecraft server (without using custom servers)?
There will be at the most 5 players, the VPS will be OpenVZ.
Answer: Tip: If you want to spare more memory, you may set the -Xms parameter even lower, say:
<code>java -Xms32M -Xmx512M -jar minecraft_server.jar nogui
</code>
The parameter controls how much memory is reserved on startup. Your server will start with 32MB RAM and whenever it needs more memory it will allocate some until it reaches the maximum of 512M. However, this will result in a little slowdown whenever the allocation is done.
Source: https://minecraft.wiki/w/Tutorials/Setting_up_a_server#Less_than_1GB_free_RAM
Also you can check this website : http://www.canihostaminecraftserver.com/
With this you can have a small idea on how many players you can handle :D
Answer: If I remember correctly it's about 10 MB per expected user.  However, it is also assuming that the players will stay somewhat close together, if everyone spreads out then you'll need a signifigantly higher amount of ram.
Answer: 256 MB is most likely too little. Minecraft will start alright, but once the world becomes large enough by either exploration or lots of constructions (which your sons probably managed to achieve within said hour), 256 MB is too little and the machine will start swapping, i.e. re/storing parts of RAM to the disk, which both time-consuming and futile since here one single application requires all the RAM. From experience I'd say 512 MB is the absolute minimum for an acceptable performance for two players who don't stray apart too much. But as this other question suggests, even 768 MB purely dedicated to a standalone vanilla Minecraft instance (a server doesn't need all the RAM a standalone Minecraft (=client+server) needs, but probably not much less either; and remember, there's an OS running in addition, and even a tiny Linux distro will still use up some RAM) are too little.
So, no, 256 MB definitely won't do. 1 GB should be ok for small localized projects, but once you want to allow players to spread across the world, even 2 GB may not suffice. Of course, for larger communities, you should consider using e.g. bukkit with a permissions plugin such that only some dedicated areas of the world can be (permanently) modified, allowing the server to save a lot of RAM.
By the way, one interesting alternative to using a host is building a dedicated one of your own, e.g. on a ~50$ Raspberry Pi, which apparently can manage around ten persons at an acceptable performance. edit And maybe http://pi.minecraft.net/ will improve this even further...
Answer: I have 2 to 12 players, about 5 low-memory plugins (Lift, Dynmap (uses more mem I think), Spawn, Nicknamer,..).
The server has 16 GB Ram and I allocated 4 GB to minecraft.
Right now minecraft uses 1.5 to 3 GB.
I don't understand how someone saying 10MB per player. You need way more. I'd suggest 1 GB per 8 players at least.
I don't think I can host 100 player with my 16 GB.
Comment: FWIW I ended up playing Vanilla (5 players) with 256MB RAM allocated to Minecraft, and it worked very well
Answer: I have a VPS that have a 125MB ram and 256MB Swap I allocated 150M ram into the server, but It runs perfectly normal with ALOT of plugins include orebfucastor,essentials, group manger, spark tail, ETC.It will just pop up the message cant keep up, but it runs normally............
Comment: 125MB isn't enough to run *Windows*, let alone anything on top of that.
Comment: @Frank probably a barebones Linux distro.
Answer: 512mb Ram is good for alat least 5 plugins and 20 players, now you can predict how many you want, the best is 4gb: 40 plugins and 160 players with no lag


Immigrant Visa Interview

Question: If you answered no to the DS 160 question "Do you have any relative in the US?" and later in life, a relative in the US files an immigrant petition on your behalf, will the consular officer easily notice the discrepancy during an immigrant visa interview?
Comment: Knowingly telling a lie on a visa application can get you banned for life. You might be able to say you didn't know you had a third cousin second removed, but it might be hard to say you didn't know your brother was in the USA.
Comment: Are we to infer that the relative was already in the US at the time of the DS160 application?
Comment: So you say "no" to the question while your relative is actually in the US; and, at some later date, a US citizen or resident relative files a petition for you. Please keep in mind that people who can be petitioned for are: spouse, children, parents and siblings. It's hard to imagine that you don't know if you have any of them are in the US at the time of your application.
Comment: The way you phrase your question and your comments make it look like you're planning to lie on your form. We cannot advise you to do that.
Comment: In fact, it is strongly advised *not* to lie on any immigration forms. The consequences can be dire. Basically, they are looking for a reason not to grant you a visa - if they find even the possibility of a reason, they will run with it.
Answer: Firstly, cheating or being deceptive is an automatic rejection in almost all cases. If by later in life you mean "1 year ago" and the relative was a close relative, like a brother or sister - that's hard to justify why you "forgot" to mention them.
If your application was 10 years ago and the relative is some distant cousin (or you are now related legally for example you have a brother in law due to a sibling marriage), then this is not deception.
The form asks about your current status (not in the future or the past) and the declaration you sign confirms that you are giving answers truthfully as to the best of your knowledge at the time of submission.
Immigration interviews are generally quite comprehensive - chances are they are well aware of your previous travel history to/from the US - and as you have to provide passports they may also be aware of your other non-US travel history.
Only the immigration officer knows if they have access to the forms you fill when applying for visas and how back of an archive they keep, or even if such forms are reviewed during an immigration interview, so no one can answer definitively.

Immigrant Visa Interview


Additives in Engine Oil

Question: As oil is used in an engine, it ages, creating oligomers. Is there a way that we can separate these oligomers without affecting the additives in the oil???
Comment: I did a patent search for an additive that could solve that or an oil that would prevent it and didn't come up with anything that really addresses the issue.  One thing that's interesting is that the shearing effect of motorcycle transmissions, engine oil lubricates the tranny of most MC's, may have a physical effect that doesn't prevent it but breaks it down after it occurs as the oil is 'torn apart' by going through the transmission gears.  Just talking out loud.  I have no facts/citations to back that claim though.
Comment: This is interesting.  http://www.google.com/patents/US4282392
Answer: This is a little nebulous since an oligomer is basically a molecule made up of a limited number of any monomers, about a few dozen, is called an oligomer. this is different than a polymer which can have an unlimited number of monomers. A monomer is a molecule that can be linked to another identical monomer, approximately 2 to 36 of these linked together is called an oligomer. Polymers make the oils viscosity happen the longer they are the thicker it is. These polymers can be cut up while flowing through the engine and if cut small enough can be considered oligomers. But that is not the only form of oligomer there is in oil since you can have contamination oxidation additives that may cause reactions and a number of other things that can also create oligomers.
Now if someone has a list of oligomers that would be bad for an engine then there could be a study on how to eliminate them. If you can figure out how to eliminate one there is lots of money waiting for you from the oil or oil additive industry.
Also not all oligomers are bad for an engine. Engine oils have many different oligomers in it either as an additive, stabilizer, cleaner, etc. and also plain old sheared up oil.

Additives in Engine Oil


Oil constantly smoking. What is happening?

Question: Even on an medium low temperature! And it is refined sunflower oil. It also happens with butter and other types of oil. I've been using the exact same oils and cooking on the same heat in the past and this has never happened before, but now it happens every time regardless of the type of oil or heat. And it is always a different pan. The only thing I can think of is that the stove is adding more heat than it should. What do you guys think?
Comment: What kind of stove is it and when was it last cleaned?
Comment: Electric cooktops are notorious for getting dirty (for example with splattered or spilled oil, or melted plastic) then smoking every time they are turned on, even at lower heat.
Answer: I would suggest first heating the pan for the requisite time and the required heat depending on what you want to cook, then add the oil for only a few moments to heat it up. Then add any ingredients to the oil after its been in the pan for no more than 10-15 seconds. If you heat up a cold pan with oil in it, its much more likely for your oil to smoke since it has so much time to absorb heat.
Sometimes of course, you might want it to smoke, in which case, leave the oil in for longer.


Why can't I import Individual Prefixes into the database?

Question: When importing, Induvidual Prefixes don't seem to "take" and apply.
Why is this, and how does one get around it?
Answer: Why?, well I have no idea (sorry to dissapoint!)
How to get around - well, it would appear that civi requires the numeric Value (1,2,3), rather than the label (Mr, Mrs etc) for the option. To find the values for substitution one can go to:

administer > System Settings > Option Groups

and hit the "options" link to the right of "Individual Contact Prefixes". The prefixes in your csv will need to be substituted with these values.
Hope that helps...
Comment: As of 4.6.14 Civi is looking for the label (e.g. 'Mr') , not the value.  But of course the matching has to be exact, as Aidan points out below
Answer: Make sure the prefixes in the import exactly match the ones configured.
If you have "Mr." configured but the import has "Mr", the record is imported without error but the prefix is not set (as of 4.6.10)


Upgrading road and cyclocross bike with a single carbon cross bike

Question: I have the potential opportunity to buy a full carbon cross bike (fairly new Specialized Crux Pro, specs say around 17 pounds; not sure what it would be with pedals, etc.). I currently own (a mtn bike which is not part of this equation) a cruddy commuter, a Kona Jake 2010 (24 pounds!), and a Giant TCR2 2005 (21 pounds with aeros on). I race all of the bikes (ok, not the commuter), but my primary racing on the road bike is in triathlons where I throw on clip-on aerobars. My Jake weighs a ton, and I'd like to switch that over to being my commuter. But I also would like something a little lighter for my triathlons, and the compact geometry of the TCR2 doesn't work well with the aerobars. Would buying the carbon Specialized get me closer to my goals in one fell swoop (budget is very limited, but I'd get a second set of light road rims), or just get a new road or cross bike? I have some dream of someday buying a tri-bike, but that's a long way off. I'll also add that one of the things I really don't like about the Jake is that the brakes suck, and it can be downright scary on some trails. If it helps, I'm a female.
Answer: N + 1 is always the answer.
Seriously though, if you're going to actually use it for cyclocross then I'd advocate buying it as this would be a substantial upgrade.  Lugging 5+ pounds less of a bike over obstacles, up hills, etc, etc over the course of an hour means a ridiculous savings in energy.
Will this upgrade your cyclocross bike (Kona Jake)?  Yes.
Will this upgrade your road bike?  Doubtful.  The weight difference won't matter as much as the wheels/tires/cockpit/general configuration.
Will it double as a tri-bike?  Doubtful.  Tri-bikes are just too specialized.
Comment: Thanks for response. Yes, it would be a huge cx upgrade. I think it might be a decent road upgrade too. I've read a number of forums re: using cx for road, but they are all old - they don't account for carbon cross frames. I Strava'd a ride yesterday on the Specialized. I had it set up really poorly so I was dealing with a lot of knee pain, watching my knee track, etc., and I *still* blew my old PR on a hill out of the water. And my time on the flat part of the ride was almost identical... Not sure what it would be like if I tried to clip on aeros...Alas, I think the bike is too small.


Why is the inner product of -1,+1 binary variables at most $n-2$ and not at most $n-1$?

Question: In short, if $x \neq u_i \in \{\pm1 \}^n$ then why is:
$$ \langle x, u_i \rangle \leq n-2 $$
but not:
$$ \langle x, u_i \rangle \leq n-1 $$
?

To add context:
I was reading understanding machine learning from theory to algorithms and it had claim 20.1 section 20.3 on the section of the expressive power of Neural Networks. In the proof it said to consider "binary" vectors $\{ \pm 1 \}^n$ (which I will call Rademacher vectors). Let $f$ be a Boolean function and consider the Rademacher vectors that make $f$ output 1. If we consider some $x \in \{ \pm 1\}^n$ such that $u_i \neq x$ then they claim that:
$$ \langle x, u_i \rangle \leq n-2 $$
Which I think is false. Isn't the correct statement:
$$ \langle x, u_i \rangle \leq n-1 $$
The reason I think this is if $x \neq u_i$ then there exists at least one entry in the vector that are difference. Call it entry/index $j$. Thus $x[j] \neq u_i[j] \implies x[j]u_i[j] -1 $ since they must have opposite sign and both are entries in Rademacher vectors. Thus since we only need 1 entry for this to be true we get $-1$ instead of $-2$. In more detail an inner product is:
$$ \langle x, u_i \rangle = \sum^n_{j=1} x[j] u_i[j]$$
since there are n terms we are adding, if we have n agreements then we have a sum of n, but if we have a single disagreement then we have only a decrease of 1, right? Is that correct or am I missing something super dum?
Comment: You are replacing at least one +1 by a -1, the net effect is at least -2.
Answer: I just noticed that if we have one disagreement then we change one single entry from +1 to -1. Thus, the summation decrease by 1 because we are missing one of the +1's in the summation but on top of that because they are Rademacher vectors instead of simple binary 0,1 then it means that the +1 actually changes to -1, meaning the inner product decreases by an additional 1.
So it decreases by 2 cuz:

we lose a +1 in the summation
but we also replace the +1 with a -1

so total decrease is by two leading to $ \leq n-2$


Make [headstone] a synonym of [grave-marker]?

Question: headstone and grave-marker both exist. grave-marker has more uses and even a  tag wiki description, so I assume we would make headstone a synonym of grave-marker.
Comment: A headstone is at the head of a gravesite.  Often there are footstones at the feed of a gravesite.  Generally, when that is true, the headstone will have just the last name and the footstones will have first names and birth/death dates.
Comment: @Jeni I've never heard of that. Interesting.
Comment: @Jeni, presumably you're talking about the US? I don't think I've ever seen a footstone in England and Wales, although they exist. I have seen stone borders all round the grave, or the whole grave covered by the stone. Wikipedia says that footstones in the UK are for felons/murderers but shows a picture of a row of graves that have footstones, which makes me doubt they know what they're talking about. Either that or the village in question buried an infeasible number of murderers...
Answer: Given that the only two uses of headstone are also tagged with grave-marker, the question of synonymity is moot (in both senses). Creating the rule will have no discernible impact (other than preventing future confusion).
Comment: I think the not yet used but inevitable [tag:gravestone] should come into the mix too.
Answer: Rather than trying to deal with tag synonyms on an ad hoc basis, I suggest a more structured approach.

Identify a relevant area from which questions will be drawn.
Use a discussion such has occured here to identify "all possible" tags.
Arrange those possibilities in a logical hierarchy of specificity.
Nominate the appropriate tag for best use on each branch.
Make all terms below the selection synonyms.

In the case of funerary recognition, the heierarchy might look like this:

So if Grave marker is chosen to become grave-marker, then all the terms immediately to its right become synonyms. But plaque would be permitted to refer separately to the naming of cremated remains (for example).
If that decision seems "wrong" then the fault lies in the hierarchy and it should be rearranged to describe the desired logic for the whole area of memorialising ancestors; rather than just adding or subtracting individual tags.
(Note that I am NOT proposing separate tags for all those descriptions of symbols. It just so happens that the mind-mapping program allocated a style that resembles tags.)
Comment: I agree we need a structured approach -- I think it needs to be a top down structure. We can't answer this question until we've addressed some more fundamental ones.
Answer: What about Monumental Inscription? How would you include that? It might not be anywhere near the grave.
Comment: That's different. Is there even a tag for that?
Comment: I'm actually incubating a post on our tagging approach -- a sort of overview of where we are and what sort of structure is emerging.
Comment: From a *research guide* published by the National Library of Australia --- There are two main types of cemetery records:
Monumental Inscriptions - listings of gravemarkers, memorial plaques or church monuments that contain a memorial to the dead. Burial registers - sometimes known as burial records or undertakers' records, these are a more comprehensive listing of burials for a particular cemetery
Comment: @JustinY No, but I'd use MI for all three... Not entirely sure what the difference between headstone and grave-marker would be?
Comment: If the inscription is not near the grave it is a cenotaph. A cenotaph is a monument that is not at the grave site. (I've been spending my 'free' time on Find-A-Grave lately)
Comment: @Jeni, in England and Wales, everyone would think of The Cenotaph in Whitehall if you said cenotaph. All towns and villages (except the Thankful Villages) have War Memorials e.g. http://en.wikipedia.org/wiki/File:Down_Ampney_war_memorial_-_geograph.org.uk_-_353575.jpg. Any inscription on a gravestone or on a plaque in a church would be a Memorial Inscription.
Comment: @ColeValleyGirl Was your switch from *Monumental* Inscription in the answer to *Memorial* Inscription in the comment deliberate? If so, what are the implications?
Comment: @Fortiter, no significance -- just me being careless. I meant Monumental Inscription, I think this is one of those differences in terminology between UK and USA -- would be interested to know what's used in Australia.
Comment: I generally use 'gravestone' but that may be more South Australian than east coast.  I have not previously come across Monumental Inscription but can see that for War Memorials, statues, etc it would apply - but I think the actual place of interment should have a distinct tag.
Comment: @Fortiter, that's the classification I'm familiar with.


Is it OK to have a main character without a goal?

Question: Is it OK to have a main character without a goal? I was told that a good protagonist needs to have a strong goal. It's considered to be a common mistake among aspiring writers. This seems to happen when a character is part of a larger group, which has a goal, and that goal becomes the main character's goal also. Or when a character has an ever-changing goal that changes constantly. My question is in what situation could you have a main character without a goal and still make the story compelling enough? Was it ever done in literature: is there any famous work where the main character has no goal?
Comment: Thomas Covenant. But I detested not only the character but the books.
Comment: Sayaman, can you suggest two or three examples of writing you do or don't like?
Comment: Albert Camus's stranger had a main character who doesn't seem to have any goal whatsoever and yet it was an enjoyable read
Comment: I think "Catcher in the Rye" is the quintessential example
Comment: Doesn't this describe Holden Caufield perfectly? He was a loser kid, but still.
Comment: I was about to suggest Thomas Covenant when Keshlam snuck in before me.

The point there is that The Chronicles of Thomas Covenant, The Unbeliever are very well written, yet after (is it six?) lengthy volumes, ultimately pointless, precisely because the main character has no goal.
Answer: Seriously folks. This isn't my fight:
A protagonist can have a very humble goal, if their lack of a goal is central to the story. Consider the newest example, Bullet Train, where the character's goal is simply to commit a petty crime and get off of a train. Wild events and circumstance keep pulling them back into an ever more complex web that they keep trying to escape. There's often at least some comedic element to these stories.
Another example is if there is a reveal of a plot twist in the story. The character might, for example, appear to be stumbling through the story until you realize all their actions were secretly focused on a masterful goal. In this case, the character APPEARS to have no goal, but actually has an extremely powerful one.
Then there is the simple goal of staying alive in an uncontrolled crisis. This simple and primitive goal can be combined with a somewhat laughable goal (like finding a Twinkie amidst a zombie apocalypse) to make a complicated story where a very human goal seemingly takes precedence over a grand goal.
Comment: I haven't seen Bullet Train, but this sounds like the goal of the protagonist is to escape from the tribulations of the story.
Comment: This is true for Harry Potter. Harry is a pawn in Dumbledore's grand plan , and Harry is mostly reactive to Voldemorts attacks up until end of Book 5. He also has these smaller goals of winning a school match while the strongest dark lord actively hunts him.
Answer: It can be done. The Hitchhiker's Guide to the Galaxy is one of my favorite novels, and its protagonist, Arthur Dent, does not have a goal throughout the first book, other than surviving the few dangerous situations he winds up in.
The reason this works is because the book was never about Arthur's character arc. The book is first and foremost a comedy, so as long as we're laughing, we don't care much about what happens to Arthur. Second, the book is a satire highlighting the various similarities and contrasts between Douglas Adams's galaxy and the world we live in. Arthur's journey only gives us an excuse to peek into various facets of life in the galaxy through the eyes of an outsider.
And, indeed, this is a big reason why the movie version was a big flop with me, because they tried to make the movie about the story, and they cut out many of the jokes and satirical elements to keep things moving along. The result was a story that was much more dramatic, but not any more interesting, and certainly not any more fun to watch.
I would be remiss not to add that, as the series progressed, Adams did start giving his stories meaningful plots and character arcs, and then the reader does care about what Arthur wants and what he does about it. I think the series improved for it, but the first book nonetheless showed that such things are not strictly necessary. It's also worth noting that the first book was mostly an adaptation of a radio series, where it's easier to get away with writing sketch comedy even if your show is not technically a sketch comedy show. The parts that were not adapted from the radio series tend to adhere much closer to traditional storytelling.
In any case, if your story is not a comedy, then it would be much harder to make this work. For each scene in your story, you need to ask yourself, "Why would the audience care about this scene?" For Hitchhiker's, the answer is simple: the scene is funny. So long as the audience laughs, you win. But there isn't a comparable analogue for drama. You don't automatically win when the audience gasps or cries. You don't win until you give them catharsis, so everything in your story needs to work toward giving it.
This usually means having an arc that you can resolve, and that usually means having a character drive that arc. If this character isn't your protagonist, you might want to consider changing your story's point of view so that it is.
Comment: H2G2 doesn't even have much of a *plot*, let alone a protagonist goal. As you say, it's just about the laughs. Good laughs though.
Comment: I didn't care for (the novel version of) Hitchhiker's Guide because it felt aimless, but I think my main problem with it was that the ending didn't feel like an ending. A meandering middle section isn't such a problem if there's something at the end that ties it together. Even a quick scene where the main character thinks, "Well, this is my life now, may as well get used to it" could be enough.
Comment: @DLosc The reason the "Hitchhicker" books feel so disjointed is that they were originally loosely related episodes of a radio show, and were only later stitched together into books by Adams.
Comment: Yes, I agree that the first book needed a better ending. I would recommend to a newcomer to treat the first two books as a unit; they work well that way. My understanding is that Adams always intended them to be a unit, but deadlines and rights issues (the restaurant scenes in the radio series had been co-written with John Lloyd) meant they had to be split up.
Answer: The character doesn't have to have a goal.  The story must have a goal.
If your character just goes through daily stuff and just gets on with living, it'd be a really boring story.
If the character is just doing the usual mechanics of getting through the day, but keeps encountering obstacles that force the character to grow or to do interesting things, then that can be a very good story.
Your job as an author is to provide that goal - and the obstacles and the solutions.
Life doesn't provide goals - reality isn't there to teach us lessons.
A story (be it a novel or a short story) is not reality.  The story has a god (in the form of the author) who puts meaning into the events.
Write a story with the goal of teaching a jerk how to become a decent person.  That isn't the jerk's goal - but it is the goal of the story.  The jerk just lives through all the incidents that the author contrives and becomes a better person.
In dealing with individual incidents, the character will develop short term goals.  A character just getting through life may have to deal with an unexpected traffic jam on the way home from work.  The character has no real long term goal, but still has to plan a way to reach the short term goal of getting home on time (or at least not too late.)
Your characters can get along without specific goals as long as you the author have goals for them to reach and you goad them along a path to those goals.
Comment: "If your character just goes through daily stuff and just gets on with living, it'd be a really boring story." I would have to disagree. There are a number of stories - specially anime shows targeted to older folks - that thrive on just doing the day to day thing. You can have a very beautiful, very humane and very touching story by doing the small, relatable things in life, when presented in a soulfull manner. It's all about _presentation_.
Comment: @T.Sar Any examples?
Comment: @BsAxUbx5KoQDEpCAqSffwGy554PSah I recommend K-On! and Yuru Camp, the ultimate "feel good" anime.
Comment: @KCWong Less goes on in Non Non Biyori than the shows you listed.
Comment: I thought that was a very nice way to say it, agree fully. +1
Answer: The question is whether your story has any forward motion without such a goal.   Aimless rambling is very difficult to make compelling, so that the reader won't just stop reading.
Certainly stories about growing up often lack a clear overt goal, but this tends to produce complications about where to end.  Often the writer has the goal that the story will end when the character reaches a milestone or, more often, learns a lesson
Answer: I suppose that for a conventional story you should follow conventional advice. ;-)
In that case, the lead character drives the action and thus should have a goal, either one that is innate (they feel a drive to achieve something, like Captain Ahab in Moby Dick) or imposed (they are subject to circumstances that make them want to achieve something, like Odysseus who wants to return home).
But of course one can write less conventionally, and there are some famous examples for that as well. I think James Joyce's Ulysses, giving an account of a more or less ordinary day in the life, qualifies. The authors of the Beat generation (e.g. Burroughs, Kerouac) wrote stories whose protagonists didn't have much of a goal; Beckett's characters usually just endure their days.
If you plan to get published and earn any money I'd recommend to write more conventionally though ;-).
Answer: Neon Genesis Evangelion is a famous successful franchise that has a depressed protagonist that does not sees a reason to save the world. He would prefer to be let alone, but is too much apathetic at the beginning to actively avoid being thrown into someone else's problem again and again. Once there, he needs to do something, albeit not wanting to. And so the story progresses, until he finally becomes involved to the point of not being able to return or desist.
Comment: Stories that start out with an aimless protagonist who then discovers their motivation throughout the story are nothing unusual. But this question appears to be about a main character who starts without a goal, continues to have no goal and ends with no goal.
Comment: And to continue the decades old internet tradition of overanalyzing NGE: Shinji actually does have a goal. He wants to get closer to his father. Saving the world is just a means to that end. But the "saving the world from giant kaiju-aliens" arc is actually just a secondary sub-plot for the actual theme of NGE: connecting to other people.
Comment: NGE isn't a good example. Shinji **does** have a goal, and that goal is to be as normal as he can be with his mother dead and his father absent. Indeed, he pines for his father's affection and, when the story makes it clear that's not in his father's goals, he becomes sullen. Ultimately, Shinji has to find his goal at the end of the story. The original series was so rushed they just never made that clear (hence why the last two episodes are so divorced from everything else that happened in the series).
Answer: In my opinion, a character with a clear (to the reader) goal is common, and important, but not fundamentally important, because the character's goal exists to serve a larger story purpose...which is to create a conflict. Obstacles put in the character's way during the pursuit of their goal is what gives a story much of its drama, suspense, and compellingness...even, its relatability, since we all can empathize with someone trying to fulfill desires, whether they are grand or mundane.
I'm sure you realize, I'm not using "suspense" and "drama" as genre labels. Some form of not knowing what will happen next is probably fundamentally critical to any story, or there's no reason to read. Generally, things happen in stories, and we read them to learn just what.
So, by all means...if you can come up with a story framework where the character has no goals, but things happen, and it's compelling for readers (unless you don't want that) then go for it!
Answer: It's an interesting question, but it hinges on what you mean by a goal. There are plenty of examples (including the ones referenced in other answers here) of main characters who do not have a goal of their own but have one thrust on them by others, by prophecy, by circumstances, etc. Do you count that as the character's goal? If so, this answer probably isn't for you.
If by "main character without a goal" you mean someone who hasn't set themselves a goal, then there are plenty of examples.
Take for instance The Belgariad. Garion is, on face value at least, just some random farm boy. His goals in life include goofing off, stealing food from the kitchen, not getting caught by Aunt Pol and maybe one day marrying Zubrette. He then spends a bunch of time just trying to stay alive, trying to learn sorcery, trying not to let Ce'nedra get under his skin, etc. He's pretty much just surviving and helping out where he can, with no actual goal beyond getting through the next day.
Or perhaps the better example (depending on your perspective - I loathed the character) is Thomas Covenant. As a sufferer of leprosy, he's had a hard life. His entire existence is devoted to caution and self pity. After getting pulled into a world of magic, almost immediately cured of his leprosy and given phenomenal power (because his wife just happened to have a preference for white gold), does Covenant become a potent force for change and so forth? Like fun he does, he continues to piss and moan about his leprosy for most of the first trilogy while his companions do the work of getting him where he needs to be. (He's truly tiresome.)
And then there's the example that everyone should be familiar with: The Lord of the Rings. Although you might find my position a little controversial, I believe that the true protagonist of the series isn't the guy who is carrying the doomsday weapon around, it's the background character whose support is the main reason why they succeeded, and is literally the only reason Frodo was able to complete the mission he was set. Samwise Gamges' goal isn't to destroy the One Ring, or to defeat Sauron, it's to support his friend. He's not the smartest, he's not much for fighting, he's not a planner or a schemer, he's just a simple man. And every time Frodo falls, time after time, Sam is there to pick him back up.
Which is not to say that the story doesn't have a goal. They all do. Epic goals that draw entire nations into action. Goals that absolutely require the protagonist to perform mythic feats and challenge the gods themselves.
Ultimately though the goal itself can be secondary to the story telling. It's a reason why the story is happening, and achieving the goal is the point that the whole story is leading to, but the story of how that goal was achieved is the important part. We're not writing after-action reports or documenting dry facts after all, we're building worlds filled with fascinating characters, tension, laughter and tears, personal development and meaning.
Or at least we should be.
Answer: There's an odd movie called Being There adapted from the novel of the same name. It was one of Peter Seller's last roles, and it takes a long time to get going. The main character, Chance, has no real goals at all. He is simple-minded (think mental retardation, but high-functioning) and all he likes to do is garden and watch TV. When events force him out of the only home he's known, he struggles to figure out what to do until he is hit by the car of a wealthy woman.
The rest of the movie is a brilliant satire as Chance has only a few phrases he says, but the other characters around him promptly inject their meanings into them. For instance, Chance likes to watch TV so he states "I like to watch". There's a number of ways to take that phrase (Chance is never explicit about what he wants to watch), and thus characters show him things that he probably didn't intend. In one scene, an openly gay man is attempting to proposition Chance, and when Chance states he "likes to watch", the man excitedly goes off to fetch his partner for an exhibition (Chance is pulled away before anything can happen in that vein).
The satire is that, by the end, everyone thinks Chance is this brilliant man and they are making all sorts of goals for him (there's talk of trying to make him run for the office of US President), not realizing he cares nothing at all for any of it.
To put it a different way, DWKraus' good answer describes a main character who knows about, but is apathetic towards, the goal. Chance doesn't even know there is a goal, and simply exists within the story as a foil for others.


Orientation of asymmetrical brake pads on front vs. rear

Question: I'm replacing some old cartridge pads that I can't find inserts for with one-piece Kool-stops. Both are asymmetrical types, but the front set of old shoes are explicitly designated for "tail-forward" installation (see image). The only reason I can think of for doing this is for clearance of the fork when cable tension is released. Assuming that this isn't an issue in this particular case (it doesn't look like it would be) is there any other reason to follow this example, rather than installing in the more typical tail-behind orientation that the new pads are designed for? Context is cantilevers on suspension fork brake arch, if that makes a difference.
Comment: Think about it:  When you activate the brakes the top of the wheel is moving forward.  The pad will tend to twist slightly on the brake arm, forcing the "heel" of the pad into the rim.  The more "heel" you have, the more the brakes will tend to grab uncontrollably, in addition to squeaking more.
Comment: Isn't this the reason why the shoes should be mounted with the trailing (forward) end of the pads slightly toed in towards the rim so they contact the rim first and as the arms twist the pads become more parallel to the rim? Does the length of the pad in front of the arm (as the wheel turns, towards the back of the bike) make a significant difference as long as the toe in is adequate?
Comment: @DanielRHicks - I'm familiar with toe-in and other aspects of brake set-up. I'm not sure what exactly you're saying about the specific situation at hand, though. The forces acting on the front brakes are the same as the rear ones.
Answer: Some of the KoolStop pads have a ramp at the leading edge (facing in the direction that the wheel rotation comes from – i.e., towards the back of the bike) that is supposed to help sweep water and other contaminants off of the rim. If you have these you'd want to face them in the right direction if you can.
Other than that and clearance I can't think of a reason why it would matter unless the pads are the type with replaceable cartridges in which case you need to make sure that the open end of carrier faces towards the rear so that the pads are pushed forward against the stop.
Comment: Yep, the little plow-tip makes it pretty clear that the Kool-stops aren't designed to go tail-forward, hence my question. Also, these are one-piece Eagle2 types, so no worries about the forces acting on a sliding insert... whereas there would be if I swapped sides with the existing pads, obviously.
Comment: Making this the accepted answer, since no opposing points have been raised, and it agrees with my own reasoning and empirical experience.


How to understand this exception error in context?

Question: I have been trying to fine tune the performance of a heavy page:
see Category query very slow on multilingual site
It appears that my initial hope of getting the page under 2 seconds was not quite accurate.
After cache tagging the page the performance was great.
However I had left out an {% endcache %} tag - ie not closed it. This makes the performance in the network inspector less than 1 sec to load. Very nice.
However I am using Nginx microcaching set to 1 sec. As soon as I cleared the Nginx cache i started seeing the error in my template tag that was missing the closing cache tag.
So why does it load lightning fast with an unclosed tag?
When experimenting with placement of cache tags, I also managed to generate the following error in dev mode:
An exception has been thrown during the compilation of a template
("Node "body" does not exist for Node "Craft\Cache_Node".").

I was wondering what exactly this means / indicates and if there is some interaction effect I am getting between craft cache and my Nginx server cache?
Answer: If you leave off the closing {% endcache %} tag, then you should always get the error that you received with devMode enabled.  If devMode is disabled, you'll get the default 500 error template.
I would disable the nginx microcaching while you're testing this to make sure that you're not getting erroneous caching results.


The origin of "Battle Ends And Down Goes Charles' Father"

Question: The order of the flats is given by the mnemonic "Battle Ends And Down Goes Charles' Father", and the order of sharps by the reverse ("Father Charles Goes Down And Ends Battle").  What is the history behind this strange phrase?
Comment: Since I came across it, I've always preferred "Father Christmas Gave Dad An Electric Blanket - Blanket Exploded And Dad Got Cold Feet"
Comment: Interesting. I always was taught it as BEAD, Greatest Common Factor
Answer: From J.R.'s answer on the English Language and Usage Stack Exchange site it dates back at least as far as 1885 since J.R. unearthed a charming quote from Educational Plans in Music Teaching, in The Quarterly Music Review, Vol. 1, 1885 where it is attributed it to a "government schoolmistress".
Answer: Unlike other mnemonics for key signature layouts such as BEADGCF ( bead + Greatest Common Factor) or for sharps, fat cats go dancing at elegant balls, the mnemonic for flats, Battle Ends And Down Goes Charles' Father, can be reversed as "Father Charles Goes Down And Ends Battle" to give the order of sharps.  That doesn't help with the etymology, but it explains why it has endured despite its awkwardness.
Answer: It relates back to the circle of fifths;  in this case you are going backwards (counter clockwise in conventional diagrams).

E is a 4th above B
A is a 4th above E
...

I don't believe that the mnemonic has any deep significance; it just fits the pattern of letters.


How to add a matrix to a LaTeX document

Question: How do we add a matrix to a LaTeX document?
Comment: Also see: [Where is the \matrix command?](http://tex.stackexchange.com/q/26434/5764)
Answer: Ash's answer typesets the matrix inline with the text. A (perhaps) nicer way to do this is to use the smallmatrix environment in the amsmath package. Add to the document preamble:
\usepackage{amsmath}

And then you can do:
$M = \begin{smallmatrix} a&b\\ c&d \end{smallmatrix}$

If you want to bracket the matrix you can also do:
$M = \left( \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \right)$

The amsmath package also offers the shortcut matrix environments which default to centered alignment for their columns:

matrix: unbracketed matrix
pmatrix: matrix surrounded by parentheses
bmatrix: matrix surrounded by square brackets
vmatrix: matrix surrounded by single vertical lines
Vmatrix: matrix surrounded by double vertical lines

This info is found in "The LaTeX Companion", and the amsmath manual section 4.
Comment: Just to add some info, with `mathtools` package you have the environments `bsmallmatrix`, `psmallmatrix`, …
Answer: First: if you intend to do math in LaTeX, you SHOULD learn and use AMS LaTeX. The best reference is the Short Math Guide for LaTeX. In this guide, you will learn that there are many different matrix macros available when you use the amsmath package (e.g., \usepackage{amsmath} ).
To quote the document,

4.4. Matrices The environments pmatrix, bmatrix, Bmatrix, vmatrix and Vmatrix have (respectively) ( ), [ ], { }, | |, and || || delimiters built in. There is also a matrix environment sans delimiters, and an array environment that can be used to obtain left alignment or other variations in the column specs. [ed. To produce a matrix with parenthesis around it, use:]

\begin{pmatrix}
  \alpha     & \beta^{*}\\
  \gamma^{*} & \delta
\end{pmatrix}

To produce a small matrix suitable for use in text, there is a smallmatrix environment
  [ed. here was a matrix appropriate for text mode]  that comes closer to fitting within a single text line than a normal matrix.
  This example was produced by

\bigl( \begin{smallmatrix}
  a & b\\
  c & d
\end{smallmatrix} \bigr)

To produce a row of dots in a matrix spanning a given number of columns, use \hdotsfor.
  For example, \hdotsfor{3} in the second column of a four-column matrix will print a row
  of dots across the final three columns.
Note. The plain TeX form \matrix{...\cr...\cr} and the related commands \pmatrix, \cases should be
  avoided in LaTeX (and when the amsmath package is loaded they are disabled).

Finally, I'd like to mention that, while it is possible to set matrices without AMS LaTeX, just use it. It offers so many benefits that until you get the hang of LaTeX, it's the best single macro package for math.
Comment: Is there any way of adding in AMS to get boxed matrix? Ie. in array it would be with \begin{array}{rrr|rr}?
Comment: @PaulrBear the "Short Math Guide for LaTeX" link is to an FTP site, which your browser may not support accessing. But I can still access it as of 2019-03-13.
Comment: Hmm, I see. That's not a very accessible format (if you cannot open it in Chrome, at least two-thirds of internet users cannot open it!)
Answer: For a matrix of the form:
M = x y
    z w

use the LaTeX code:
$M =
\begin{array}{cc}
x & y \\
z & w \\
\end{array}$

Comment: I agree with Ashwin's simple approach. Sometimes you can't rely on amsmath being available, so if you're after straightforward matrices, then use straightforward Latex commands. See more at http://andy-roberts.net/misc/latex/latextutorial9.html for how to wrap your 'array' in brackets.
Comment: A complete tutorial can be found here http://en.wikibooks.org/wiki/LaTeX/Mathematics
Answer: For flexible typesetting of matrices with color, lines and justification done by formatting parameters see An extension to amsmath matrix environments.
Answer: $M =
\left[ {\begin{array}{*{20}c}
   x & y  \\
   z & w  \\
 \end{array} } \right]
$

$M =
\left( {\begin{array}{*{20}c}
   x & y  \\
   z & w  \\
 \end{array} } \right)
$

$M =
\left| {\begin{array}{*{20}c}
   x & y  \\
   z & w  \\
 \end{array} } \right|
$

Comment: What is `{*{20}c}` for here? I see only 2 columns.
Comment: @IgorKotelnikov I don't know either, but it seems to me, that it could be "20 columns centered if the content needs 20 columns, otherwise less".

How to add a matrix to a LaTeX document


Do I Need a Privacy Policy if I only request a username and password

Question: I have a website that you need an account to access. The signup process is very simple and all you need is a username and password. There is nothing stopping the user from entering a username having nothing to do with them. They could enter whatever they want and be 100% anonymous. Another thing is I am putting an app using the same login system in the app store. In the app store review guidelines it says you must have a privacy policy if you offer even a free subscription? Does that include a login in my scenario where it is only a username and password?
Answer: Many people use the same username + password on many sites. I'd expect that you keep passwords safe (storing the password salted + hashed, and if you don't know what that means then stop right now until you know it), and I'd want a privacy policy that states this clearly.
And you wouldn't need a username + password if there wasn't something stored about that user, right? So I'd want a privacy policy about whatever you store as well.
Answer: You should probably have a privacy policy, with at least the following things:

Do you collect the IP address form the site? If so, what do you do with the IP address?
Do you collect any data specific to that user when he is using the app?
Are there cookies? What do you do with them?
If you are in the USA, you need to warn the user that he can not register when he is under 13 years old because of the COPPA (Children Online Privacy Protection Act).

Warning: I'm not a lawyer, and in fact, I have never had any higher eductation related to law.


WiringPi - GPIO Output Vs PWM

Question: So in the GPIO utility from WiringPi there is a command to change the mode of the GPIO pins. There is input mode, output mode and PWM mode. What is the difference between output mode and PWM mode? Is output mode digital and PWM analog?
Answer: Input mode is for reading from the pin.
Output mode is for writing 0 or 1 to the pin.
PWM mode is for writing 0 and 1 to the pin in a rapid sequence.  The pin will be cycled between on and off many time a second.  For each cycle the pin will be on (1) for a time and then off (0) for a time. The proportion of time on for each cycle is called the dutycycle.
PWM output may be used to control the brightness of LEDs and the speed of motors.  In effect you can think of PWM as digitally changing the voltage.  Full on (100% dutycycle) give 3.3V at the pin.  Full off (0% dutycycle) gives 0V at the pin and half on (50% dutycycle) gives 1.65V at the pin.  This is a VERY SIMPLISTIC description.  Research on line for a more accurate description.
Comment: I also believe that setting the pin to PWM engages the hardware PWM output support of the BCM2835.  I also believe that only some pins may be eligible to be set to PWM.
Comment: @Kolban The Pi has two hardware PWM channels (0 and 1).  PWM channel 0 may be routed to GPIO 12 and/or 18.  PWM channel 1 may be routed to GPIO 13 and/or 19.  All those GPIO are available on the Pi's with the 40 pin expansion header.  The compute module is different in that GPIO 40, 41, 45, 52, 53 may additionally be used.

WiringPi - GPIO Output Vs PWM