Log Linear Models

Question: Can someone please explain why do we use Log Linear Models in very lay-man terms? I come from Engineering background, and this is really turning out to be a difficult subject for me, statistics that is. I will be grateful for a response.
Comment: Are you talking about loglinear models for proportions (generally in tables) or loglinear models for something else?
Comment: Glen, I am talking about tables.
Comment: @user1343318 If some of these answers gave you what you're looking for then maybe you should consider picking one of them so we can move on with our lives. :)
Answer: Log linear models, like crosstabs and chi-square, are usually used when none of the variables can be classed as dependent or independent but, rather, the goal is to look at association among sets of variables. In particular, log linear models are useful for association among sets of categorical variables.
Answer: Log-linear models are often used for proportions because independent effects on probability will act multiplicatively. After taking logs, this leads to linear effects.
In fact there are other reasons why you might use loglinear models (such as the fact that the log-link being the canonical link function for the Poisson), but I think the first reason probably suffices from a general modelling point of view.
Answer: Here's a list of related reasons why $\ln$ (aka $\log_e$) transformation may be used. Since all logarithms are proportional to each other, many people tend to use base $e$, since it has some nice properties. To quote John D. Cook,

I don't always use logs, but when I do, they're natural logarithms.

This list is taken from Nick Cox's Intro To Transformations (with some added commentary):

Reduce skewness - Gaussian distribution is regarded as ideal or
necessary for many statistical methods (sometimes mistakenly). Taking logs helps.
Equalize spreads - induce homoskedasticity when there's lots of variation in levels.
Linearize relationships - For example, a plot of logarithms of a series against time has the property that periods with constant rates of change are straight lines
The coefficients$\cdot$100 have a semi-elasticity interpretation: for a 1 unit change in $x$, you get b*100% change in $y$. For binary $x$ going from 0 to 1 effect, the effect is $100 \cdot(\exp\{\beta\}-1)$%. Some people find exponentiated coefficients easier to think about than elasticities. That gives a ratio of Y-values per unit change in X, assuming an exponential relationship (a kind of multiplier).
"Additivize" relationships - Trying to get the parameters of a Cobb-Douglas production function is a whole lot easier without non-linear methods. Analysis of variance also requires additivity.
Convenience/Theory - log scale may more natural for some phenomena.

Finally, logs aren't the only way to accomplish some of these goals.
Answer: A common interpretation, and way of seeing the difference, between a normal linear model and a log linear model is if your problem is multiplicative or additive.
A normal linear model has the following form $Y=\sum_{i=1}^M \beta_i X_i+\beta_0$
A log linear model has a log transformation on the response variable which gives the following equation
$\ln Y=\sum_{i=1}^M \beta_i X_i+\beta_0$
which turns into
$Y=e^{\beta_0}\prod_{i=1}^M e^{\beta_i X_i}$
Thus the effects are multiplied instead of added together.

Log Linear Models


Refactoring help...property-based object or lots of member fields?

Question: I'm currently refactoring a class which currently looks something like this:
 class SomeModel {
    private String displayName;
    private int id;
    private boolean editable;
    private int minimumAllowedValue;
    private int maximumAllowedValue;
    private int value;
    // etc. etc.... a bunch (10+) of other fields...

    // and then tons of setters and getters for these fields, some of the
    // setters have restrictions depending on other settings, like you can't
    // set the maximum lower than the minimum, etc.
    // ...
 }

My question is: is this really the best way to go or should I refactor all these fields into more of a property-based structure (with simply two methods setProperty and getProperty)?
Another possible refactoring would be to extract "properties" belonging together into classes of their own, such as the max/min structure into an "AllowedRange" object or something.
Ideas?
Answer:
You can take a look at BeanProperties - it supports constraints, events, etc.
Also check Project Lombok
You can have a Map and a bunch of constants as keys and use the setProperty to impose some of the limits. Or even to register validators.
If this object is supposed to be manipulated by other tools/frameworks (spring, hibernate, etc), then of course this refactoring is not an option - it should conform to the JavaBeans spec
ultimately, why do you need to refactor it in the first place? Isn't it doing its job well?
Answer: Of the fields you listed, I would  - as you suggest - refactor minimumAllowedValue and maximumAllowedValue into a Range class, then replace them with, say, allowedRange.  If I started to see that value and its allowedRange were a common pattern, I might move on to, say, a BoundedValue class.  It's impossible, without seeing all the other fields, to say what to do with them, but too many fields is definitely a smell.  The solution depends on their inter-relatedness, but the min & max --> range and value & range --> boundedValue examples give you some idea of the kinds of techniques to apply.
Also, keep the Single Responsibility Principle in mind.
Answer: Don't do it. It's fine.
In the future just use an IDE like Eclipse to autogenerate Javabean classes, properties and/or getters&setters in a few clicks so that you don't need to type all those code down again and again.
Comment: Don't let your IDE generate code. OK, you don't have to type it, but you still have to read it. And it is hard to find the one method you modified beween all those methods that are simply boiler plate.
Comment: @Roel Spilker: just hide them away deep in bottom of your class and make use of `Ctrl+O` to find them.


How do you organize your academic papers?

Question: I have nearly 1750 papers in PDF on one folder, all pertaining to medical research. What's the best way to organize them? I have thought about creating one folder for every subject/sub-category, but I want to know if there's anything more efficient that many academics use.
Comment: How do you usually access them? What kind of searches do you want to be efficient?
Comment: i do often use the same strategy...
Comment: Used to do filenames with author first, but find it now incredibly helpful to put the year first.  I found it really helpful to think of papers in terms of classics or recent ones.   Sorting them by subject into folders is something I am also doint, but this is sometimes tricky as subjects overlap.  Actually, I am thinking about sorting straight by journal, but have not come around to do it.
Answer: I highly recommend a software to manage this like Endnote, Zotero, or Mendeley. The last two are free if your library is small enough (depends on the size of the PDFs). That will make things much easier by cleaning up the metadata and helping you use search tools to find the right papers.
In each of these software, you can also sort the papers around. The key is that within these software, you can put a paper into multiple folders/categories/groups/whatever else they call it. I use this liberally. Note that the software will keep the reference as one reference with multiple links, and so if you do things like annotate or add notes to the file they will be visible at all locations where you can find the paper.

Before doing anything make sure the metadata is all correct. You can always last resort with using the search bar if it is.
First put each paper into a field. So I would make a folder like breast cancer, and then have a subcategory like metastasis if I have a bunch of papers specifically on that subtopic. Finding odd papers reduces to remembering what subtopic it's from, and finding that subtopic folder within the right topic.
If a paper works in multiple different places, I put it in each place.
Then add the papers to project folders. I make a master folder for each project, and subfolders for different parts of the project, put the appropriate references. The software can now automatically generate a file with all of the references for the paper which helps with citing.

Using this method, you can always dive down into a folder/subfolder that makes sense, either by project or by field, then sort by title/author/year/etc (and easily switch between these), or use the search in the subfolder, and always quickly find what you need.
But... you will need to take a day or two to set this up. That's a long and tedious task, but definitely worth it. Then I usually just do a minor fix up for new additions every few months to keep it tidy.
Answer: I sort papers by author, since the main times I need to look at them is if either it is cited somewhere and I want to check what precisely the paper says (in which case I am handed the authors by the citation), or I need to look at a specific paper because I recall there being something useful in it (in which case I almost always recall at least one author).
The more practical side of my system consists of a set of menus in my top bar, one for each of certain ranges of starting letters. Each menu then has an entry for each author belonging to that range, and each such entry has a list of papers by that author (so a paper with many authors will be listed once for each author). This way, any paper that I have already indexed like this is just three clicks away, and even when I only recall the author and not the precise title, it often helps to see a list of the papers by that author (especially as the list will be limited to papers I have added myself, rather than a full list of all the papers that author has ever written).
A similar system could of course be set up by subject if that would be more helpful, possibly with major subjects separated into subtopics (again listing papers several places if it belongs to several subjects).


Unable to open word file (MSWord 2007) when word automation program is running

Question: In my application i am using word automation to get the text content from the file.  It is working fine no issues.  But at the instant when word automation is processing, if i open the word file, it is throwing a dialog with message (any file)
"This file is in use by another application or user.
(C:\User\xyz\AppData...\Normal.dotm)".
When I am closing the dialog, it is asking for save the file "normal.dotm"...template file.
This happens only in MSWord 2007 not in MSWord 2003.   can any one tell the solution please.
Answer: This probably happens because one Word instance has locked Normal.dotm and your instance modifies it and tries to save it.
You can try to set the Saved property of your template to True. Try this: Application.NormalTemplate.Saved := True. Word will now think that changes to Normal.dotm are saved and should not try to save again.


Inputting amount of zoom manually

Question: Is is possible to input the amount of zoom manually in Blender, instead of using the Mouse Scroll or Ctrl + Mouse Scroll, as that does not seem measurable?
Comment: I don't think so, the only "measurable" way is to use ctrl + and ctrl - to make discrete zoom jumps...
Answer: A convenient way to do this doesn't seem to be available. But you can lock the camera to the view and then change the camera's position.

Press Num0 to view the scene from the active camera
(optional) Press Home to maximize the camera region in the viewport
In the 3D View's properties shelf select View > Lock Camera to View

Zooming with the mouse does not change the camera's focal length but its position. You should be able manually change the "zoom level" by scaling the camera towards / from the object that you're looking at.
As far as I can tell the camera scale is not considered for the values of Depth of Field, but as a precaution one can enable transformation lock for the scale value of the camera.

Inputting amount of zoom manually


iOS Enterprise OTA starts but results in "Waiting..." under icon

Question: I have followed all of the instructions and when installing from a web page link I get the install propmt on my iPhone but then the app icon shows up and the "Waiting..." status shows under the icon. No progress is made on the progress bar -- it just stalls. Any ideas?
Comment: Can you give the webpage link which you have used?
Answer: Check for bad files as Owen mentioned. Also check the file permissions of the ipa and supporting plist on the server where you are hosting them.
I had this file permission issues.
Answer: Sound like a bad file, either the ipa file or the supporting plist.  Check your build process for any errors.  Make sure you have all the right files in the download package.


Is there a word for a characterizing feature?

Question: By characterizing feature, I'm referring to an attribute of something that uniquely identifies it. Is there a single word that describes such a feature?  Characterizing and distinguishing come to my mind, but I feel as if there are a lot more terms for this that I'm missing.
Comment: One might use "trademark" (in a metaphorical sense).  Also, "brand", "distinction", "peculiarity", "badge", "distinction", "essence", "hallmark", "trait".
Comment: It seems to me that the answer is contained in your question.
Comment: ***Feature***:  "a typical quality or an important part of something" https://dictionary.cambridge.org/dictionary/english/feature
Comment: Are you talking about odd features, or just any attribute? Odd features may be called quirks. What are you looking for that words like feature, attribute, trait, quality, property, etc. don't achieve? Maybe you're looking for stereotype. Perhaps characterization. Do you mean something that identifies that person and no one else? It's hard to answer this question without more information here.
Answer: Characteristic

a distinguishing trait, quality, or property

the characteristics of this breed of dog
Answer: The term in logic is definiens—that which distinguishes an entity from all other entities. The term is traditionally employed to speak of predicates—verbal or symbolic expressions—but there is no reason you cannot extend it to the properties which the expressions signify.
But this is unlikely to be a single "feature" or "characteristic", since an entity may share such properties with other entities: it is more often a set of properties which is unique to the individual. In this case we may speak either of the set as the definiens or of the individual properties as plural definientia, each distinguishing the entity from some but not all other entities.
Comment: A two word version of this might be 'defining trait/characteristic'.
Answer: I imagine there are different words depending on context, area of study. In marketing, the nearest is probably USP.

a feature of a product that makes it different from and better than other similar products and that can be emphasized in advertisements for the product

In medicine or biology, I think they are referred to as defining or diagnostic features.
Comment: I've never seen "USP" used in this sense before.  In the US it generally means "US Pharmacopeia".
Answer: In bird watching these are usually called "distinguishing" or "distinctive" features.  You find them both used for example on this page of the Audubon Society site on how to identify birds.
https://www.audubon.org/content/how-identify-birds
Answer: endemic (to) -

natural to or characteristic of a specific people or place; native; indigenous:

endemic folkways; countries where high unemployment is endemic.

belonging exclusively or confined to a particular place:

a fever endemic to the tropics.
typical (of)

of the nature of or serving as a type or representative specimen.
conforming to a particular type.


What is the difference between V-るほうがいい and V-たほうがいい?

Question: I would  like to know the difference in nuance between V-るほうがいい and V-たほうがいい. For example, I have heard both 休むほうがいいand 休んだほうがいい. Over the years I have heard different explanation about the difference among these two grammatical forms, but I am still not really sure about it. From what I gather, V-るほうがいい is stronger than V-たほうがいい and it can imply that it is a general advise that can be applied in different situations, and thus, it doesn not only apply to the present situation. Moreover, V-るほうがいい does not refer only to the listener, but it can also refer to the speaker him self, such in the case of 休むほうがいい that could also mean "we should take a break".  Is it correct?
Answer: Normally, the simple statement 'we should rest' would be 僕たちは休んだ方がいい。
There is a good answer on Yahoo 知恵袋 here, which draws a comparison between 「カゼのときは、早く寝るほうがいい」and 「きょうはもう帰って寝たほうがいいよ」. Look under ベストアンサーに選ばれた回答.
Basically, the difference detailed in the explanation is between 'what you (personally) should do' and 'what one should normally do in this situation'.
Answer: These are basically the same thing, with a slightly stronger nuance for た方がいい. But they both express "had better".


Is it possible to print from within Chrome Package Apps?

Question: Is it possible to print from within Chrome Package Apps?
I'm looking for a solution where the user can print and it will automatically print to their default printer with prompting with the print dialogue.
I did quite a bit of research on this topic and wasn't able to find a definite answers or the answers is a bit old. If possible could possible provide a small snippet on how you can go about accomplishing it.
Thanks in advance.
NOTE: The window.open() solution isn't going to really work in this situation.
Answer: Just call window.print();, it will show the print dialog.


Can the Kan-Thurston theorem be turned into some kind of equivalence between groups and spaces?

Question: I not really familiar with these subjects. I read  this question and I was really surprised by the answer. My question is probably vague (so please do bear with me).
The cited question/answer suggests that any integral homology of a simply connected space can be realized as integral homology of some Eilenberg-MacLane space. Does it mean that connected spaces are the same thing (up to ?) as groups in some sense ? My question is vague, very vague. I will be happy to see a correct formulation of my question (if it makes sense).
Comment: I think the question you really want to ask is : does there  exist an equivalence (up to some localization) between the category of spaces and groups behind Kan-Thurston?  And I guess the answer is no, Kan-Thurston construction not being functorial.
Comment: Groups up to isomorphism are the same thing as path-connected aspherical complexes (i.e. $K(G,1)$'s) up to homotopy equivalence. This is much more elementary than the Kan-Thurston theorem, however.
Comment: I'm afraid I don't understand what your specific question is that is not answered by the statement of the Kan-Thurston theorem.
Comment: @MarkGrant I added "simply connected" to avoid your remark.
Comment: @JeremyRickard That is why I was apologizing for my vague question. I was asking for a correct formulation. I thought I have been clear about the intuition. May be I was wrong, sorry.
Comment: @user43326 What do you mean by localization ? I have heard about this terminology but it is far from my. :)
Answer: Here's something that might be considered an answer.
In Section 11 of Baumslag, Dyer, Heller, "The topology of discrete groups", the following theorem is proved, basically building on the ideas of the Kan-Thurston theorem.
A perfect homomorphism of groups $G\to H$ is a surjective group homomorphism such that the kernel is a perfect group.  Let $\mathcal{C}$ be the category whose objects are perfect homomorphisms, and whose maps are commutative squares.
The theorem is:

There exists a class $\mathcal{F}$ of morphisms in $\mathcal{C}$ such that the category of fractions $\mathcal{C}[\mathcal{F}^{-1}]$ is equivalent to the homotopy category of pointed connected CW complexes.

The functor from $\mathcal{C}$ to spaces is defined by the Quillen plus construction to $BG$ with respect to $P=\mathrm{Ker}(G\to H)$, and the class $\mathcal{F}$ is just the maps that become equivalences after applying the plus construction; the class $\mathcal{F}$ can also be characterized as the maps $\phi\colon (G'\to H')\to (G\to H)$ such that $H'\to H$ is an isomorphism and the induced maps $H_*(G',\phi^*M)\to H_*(G,M)$ in group homology are isos for every $H$-module $M$.


Is it possible to "hack" a mobile phone just because it's WIFI is enabled?

Question: I heard about a conference about security, where everybody who had his phone's wifi enabled (not connected) was "hacked" and their phone's pin number (PASSCODE) were shown on the screen's conference (2 last digits).
Is it possible?
What other data could that hacker get?
Comment: Was it *all* phones (very unplausible) or just *some* phones of a certain model or a certain OS (more plausible)?
Comment: sounds like a lie. my phone unlocks with a doodle, not a pin...
Comment: I have no pin to unlock my phone, I have password but I think he is referring to mobile operator's pin for the sim.
Comment: No, I mean the pin for unlocking the phone. I'm asking this question because It's hard for me to believe :)
Comment: In that case... a lot of phones has no pin to unlock... is hard to believe this... anyway, look at my answer, other things can be done.
Comment: I call bulls$@t just being wifi enabled? About the only thing they could potentially get is your phones wireless MAC address but that's not remotely close to what I would consider a 'hack'
Answer: AFAIK, it is a common demo in security conferences. While one of the conferencers starts speaking, another one starts a WiFi dump tool to identify phones with an open WiFi. Then he offers them to connect on his network by trying to provide an expected SSID => fine he has immediately done a MITM. As smartphones often carry many apps that try to sync as soon as a network is available, it is likely that attacker will soon get valuable informations on the sytems and applications. Assuming that the attacker is a specialist in pentesting (common for security conferences), the risk that he can find a vulnerable system or app is... rather high if the Wifi was opened - read the owner of the phone is probably not very cautious about his device security.
Then he just tries to get various informations to prove that a hack was possible in a short time and shows the results, with a real impact on people who were hacked, which is the goal of the demo.
Now for the questions:

is it possible is Wifi is closed: no
is it possible on any smartphone with an open Wifi: probably not, because you still need talkative and vulnerable apps
what is the risk on your smartphone? Just count the installed applications that can automatically sync data, and try to evaluate how much you can trust their developper
Comment: To add a technic to evaluate the last risk: [return]
1.  configure an open Wi-Fi network with a well known public name like "Wayport_Access" on a PC which will act as a rogue AP, [return]
2. fire a `tcpdump` or `Wireshark` on it and filter everything which could come from your phone Wi-Fi MAC address, [return]
3. activate Wi-Fi on your smartphone and bring it within reach of your rogue AP PC, [return]
4. look at your `tcpdump` or `Wireshark` to witness or not the size and content of the dataleak.
Comment: If you are good at filtering with `tcpdump` or `Wireshark`, just connect your rogue AP PC to Internet. Your dataleak will be much bigger and in need to be filtered to get only the interesting part.
Answer: Is possible to sniff the probe requests packets from the phone looking for its known networks... That's very easy to do. With your wifi network card in monitor mode and any tool like Airodump (from aircrack suite) you can see this. In theory, you can set up a network with that data (bssid, ssid, etc) and the phone can connect to that wireless network. Is hard to automatize all of this stuff of course, but is possible.
After that, if the mobile connected and that network has internet access, the mobile is going to do its normal operations... auto syncs of apps, etc. You can be sniffed, the attacker who created the network has the MITM (man in the middle) already done and the hack depends of a lot of factors. All passwords in plain can be easily hacked (pop, ftp, etc). And if they do some technique like sslstrip could hack you even some ssl site password, it depends.
But could be possible in my opinion... anyway not in all devices. It will depend of a lot of factors.
Comment: Is it possible to spoof a password protected WiFi access point? I'd assume the client would try to authenticate with your AP and fail.
Comment: is it so easy to be the MITM if not automated? just need to  sniff the packets for known network, and create a network with that data? the passwords in plain then can be sniffed? how can they be sniffed, with aircrack tools or with something else like wireshark?
Comment: The hard part is to sniff the probes with airodump, analyze that info and create fake ap with that data. Then is easy... once you are on an "evil network", the MITM is already done, probably the same linux machine which is creating the fake AP will act as a router (gateway of that network) and you can sniff with the tool that you want... wireshark, ettercap, bettercap, tcpdump or whatever sniffer.
Comment: Yes, I get it thanks. but why is it hard to sniff the probes with airodump and analyse it? is it because of encryption?
Comment: Because I know how to check some part of probes... the SSID which the client is asking for is easy to see... but not sure how to check the BSSID of the AP which client is asking for. I guess this can be done too, but not sure how. :/ I guess using wireshark or any other more advanced tool than airodump, but I didn't tested it, sorry.
Comment: Still doesnt explain how you would get the PIN, though. I see no reason why it would be sent over the network.
Comment: Yeah, I guess only hacking the device first this could be done... maybe you can cheat on some users after a "bad click" on some kind of captive portal or something like that... but of course it won't happen on "all devices"


When were full-body cyborgs first prototyped, and mass produced?

Question: As I know at least in the late 60s full body cyborgs exist (thus a cyborg with just a metasapient brain). I'm wondering though when the first ones existed (prototypes and also mass produced). Is there any info on that?
Answer: Around 2065 and 2070
Aparently, their development started around 2065. From 4ed Augmentation (page 148):

Cyborgs
Posted By: The Smiling Bandit
Ever since MCT began internally deploying their anthropomorphic Otomo drones back in '65, folks have commented that things didn't seem quite right about them.
(...)
OTOMO Product Announcement
Limited Distribution: Full Mitsuhama Subsidiaries Only
Clearance: Secure Sensitive Information (SSI) Only
Draft v.2.1
Since the dawn of optional cybernetic implantation, some have pushed their bodies to the limits. As technology advanced, so did those limits. With the advent of cyborg technology, the bar has been raised to a whole new level. Through our exclusive cerebral containment unit (CCU), a metahuman brain can be conveniently implanted in an entirely cybernetic body.

The exact date when mass production started is unclear, but by 2070, you could buy your own cyborg. (page 151):

The preceding fiction introduces Shadowrun players to three different technological breakthroughs that showcase and exploit the cutting edge of augmentation technologies in 2070: biodrones, cyborgs, and cyberzombies.
(...)
A cyborg requires access to delta-grade implants. This essential modification raises the entry price of a CCU to 250,000¥.
Comment: @Adeptus: what's the relation between cyberzombies and fullbody cyborgs? Unless I'm mistaken they are fundamentally different things, though the CCU may have been invented to circumvent the issue of cyberzombies.
Comment: Cyberzombies are metahumans who have sub-zero essence. Fullbody "cyborgs" aren't really cyborgs at all by the traditional definition - they're a brain-in-a-jar operating a human-shaped drone. There's very little "org"anism to go with the "cyb"ernetics.
Comment: I'm not sure, but I *think* there might have been prototypes earlier. Cyberzombies featured in fiction from 2nd Ed days, which were set some time in the 2050s.
Comment: It's been a while since I read the books, but from memory, cyber zombies are basically failed/insane prototypes of full-bodied cyborgs
Comment: I'm not close to the cyborg idea.  but cyberzombies start human and progressively have parts replaced. losing essence all the time.. but through magical means are kept alive.  My guess is that the Cyborgs aren't 'alive' in the same sense.


Energy to momentum

Question: Is there anyway to convert energy to motion IN SPACE? Let's say a satellite collects electric energy from sun using solar panel. Is it possible to convert it to Linear motion? The only way I know to change linear motion in space is by throwing stuff out (Ions, burned propellants etc).
Answer: Yes, light has momentum, so you could use your collected electrical energy to create a beam of light to propel the satellite. However, you need to bear two points in mind- firstly, the recoil from the beam  would be tiny compared with the energy taken to produce it, and secondly the collection of light from a solar panel would involve the transfer of momentum from sunlight to the satellite, so you would be propelled away from the Sun in any event.
Answer: Conservation of momentum implies that you can only use reactive acceleration. However if there are planets moving around you can use gravity assist.
The now ongoing ESA Bepi Colombo mission to the planet Mercury uses this method extensively to decelerate its fall towards the Sun.
Answer: There is such a thing as a Photon Rocket or Photon Drive. This takes advantage of the fact that photons have momentum. However, you are not going to get a lot of thrust out of one.
Answer: The most direct method is to use the Earth's magnetic field.
It is generally used only for attitude control (i.e. generating angular momentum), but nothing (except the low efficiency, of course) stops you from using if for generating linear momentum as well.
Think about Earth as a big stator magnet and your satellite as a rotor with a coil.
(it is still throwing stuff away, in this case the "stuff" is the Earth, but it is not throwing stuff that you have to carry with you)
Answer: You should read up on solar sails, electric sails, and magnetic sails if you are interested in propulsion near stars. A solar sail uses the momentum of solar photons to drive a ship, while electric and magnetic sails use the momentum of the solar wind (charged particles) to do the same.
Answer: You're right, the only way to change linear motion in space is by throwing stuff out, and why is that a problem?
Instead consider, most obviously, a nuclear submarine which any number of people think somehow moves directly on nuclear energy. Really?
It would be just as accurate to brand the critter a "steam submarine" or by the same token to rename the earlier railway "steam" trains as "coal" or "wood" engines.
Either actually turns its energy into power through steam boilers, whether the boilers happen to source their heat energy from nuclear reactors or coal or wood fires.
In principle, yes, your craft uses solar energy to generate electricity, uses that to boil water then exhausts steam to create motive force.
No few writers pay lip-service to that principle by referring to "reaction mass" but how is that more useful than referring to nuclear or solar energy in the first place?
Please remember, none of that says anything about efficiency or sustainability.

Energy to momentum


Fridge starting up turns TV on/off

Question: I think this is simply because its old, but whenever the fridge "kicks on", it being on the same circuit as the TV makes the TV turn off/back on.  Just curious if there is anything I can do other than a new fridge or getting them off the same circuit (not possible).  Any advice appreciated!
Comment: Could be this: http://diy.stackexchange.com/q/28002/23448
Comment: it could be the starting cap on the compressor, if it has gone bad the motor will work really hard for a lot longer to get to speed and draws down the line. this would be my first item to look at
Comment: @mbeckish, agreed. I would about guarantee it is on the same circuit.
Comment: @mbeckish, yeah, that sounds like it.  Unfortunately, being on another circuit is not an option (out in the countryside of France, in a house with a wide open floor plan, so the wires go around the house with zero plugs that are not on this circuit).  And this fridge is old, so I'll bet its just pulling more when it kicks on.  I'll see if I can find a voltage stabilizer.
Answer: Your cheapest option besides a new fridge might be a UPS for the TV.
Make sure you get at least a line interactive type. The offline / standby versions will just pass the dropout spike through to the TV. https://en.m.wikipedia.org/wiki/Uninterruptible_power_supply#Line-interactive
My neighborhood power had some lines rubbing together when it was windy. The power would drop just for an instant but long enough to reset my TiVo causing a 5 minute dropout in any program I was recording. I got a UPS for it and solved the problem until the power company fixed the lines.
Electronics are sensitive to even the shortest drop in power. A UPS could smooth out the spikes and let your TV ride through the dropouts.
Good luck!
Comment: If the fridge is what's occasionally drawing more power, wouldn't it make more sense to put the Fridge on the UPS?
Answer: Get a Surge & Brown-out power strip, kind of tough to find but that might be enough. Or, do what other people do, which isn't really the safest conditions. Run an extension cord from another outlet on a different circuit. Make sure the run doesn't cross any door ways or traffic areas & rides the wall(s).
Other than that, you could get an electrician & see if the fridge circuit could be refreshed with a new outlet or higher rated one. Which leads to my next point. If this situation hasn't always been present & is fairly recent. Then, an Appliance Repairer might be the real solution. Your compressor motor might be starting to fail & pulling much more power than it should be.

Fridge starting up turns TV on/off


What is the Smalltalk equivalent of Java's static?

Question: What is the Smalltalk equivalent of Java's static fields and methods? IOW, what do the Smalltalkers do when they need class level data and/or methods?
Comment: Not worthy of a "formal" answer, but I stumbled across this page that might help you: http://per.bothner.com/papers/smalltalk.html .
Answer: We use class-side methods/instance variables. A class is an object, after all, so can have methods.
For instance, the Rectangle class has a method #origin:corner: so you may write
Rectangle origin: 0@0 corner: 100@100

to create a Rectangle. This is just the message #origin:corner: sent to the object called Rectangle (a class is an object!) with the two Points as parameters.
Class-side instance variables work much the same way. A class, being an object, may have instance variables. From the SUnit library:
TestCase class
  instanceVariableNames: 'history'

and then TestCase class exposes this in the usual way, with a getter/setter (#history and #history:).
EDIT: The @ I used has caused a fair bit of discussion. It's what's called a binary message, which allows one to define selectors that look just what other languages would call infix operators. For instance, 3 + 4, or 0@0. In the case of @, the Number class defines a method called @ taking a parameter y, defined as ^Point x: self y: y - "return a Point whose x coordinate is my own value and whose y coordinate is the parameter".
Point is an ordered pair, but of course there's nothing stopping one from defining higher-dimensional versions. Point might define a method called @ that looked like this, for instance: ^Triple x: self x y: self y z: z - "return a point in R^3 whose x, y coordinates are my own, and whose z coordinate is the given parameter".
Comment: Do any languages other than Smalltalk use @ to delimit the different coordinates of a point? I don't believe I've seen that specific syntax before.
Comment: Does that `@` indicate a tuple?
Comment: @ is a "binary message" - a message that takes a single parameter, but doesn't need the usual trailing :. Number defines a method called @ that returns a Point: ^Point x: self y: y (where y is the sole parameter, obviously).
Answer: The most important mind-shift needed if you come to Smalltalk from Java or such, is that classes are objects.
A static in Java-like languages can have many different semantics. Usually this has to do with visibility. You need an object that is independent from any instances of a class, but you want to restrict the visibility of this object to within the class, that is: only visible from instances of the class or the class itself (in Smalltalk, because in Java classes are not first-class objects).
In Smalltalk you usually have more options for this:

Class instance variables
Class variables or pool variables (depending on your Smalltalk dialect)

A class instance variable is indeed just like an instance variable of instances of any class: the class has this property, and this can be made accessible for any instance of the class by providing a getter method on the class (not on the instances, we call this a class method). This is useful if you have default values and such. Example:
Define a class Car, with instance variable colour, PLUS a class instance variable defaultColour (which of course would have the value "BLACK" ;-))
Smalltalk defineClass: #Car
    superclass: #{Core.Object}
    indexedType: #none
    private: false
    instanceVariableNames: 'colour '
    classInstanceVariableNames: 'defaultColour'
    imports: ''
    category: ''

This is a class definition (actually a message to the object Smalltalk) in VisualWorks Smalltalk.
If you create a subclass of Car, it inherits the class instance variable defaultColour, as a normal object would do as well. If the defaultColour class instance variable has a value, the subclass also inherits this value!
Answer: In most types of Smalltalk you have class variables. Typically class variables are used for e.g. singletons. There are differences in the types of variables that you can use between flavors of Smalltalk though, so read the documentation on this point for your particular implementation.


What does "be running off of" mean?

Question: I saw it in "Jurassic park" movie. Character of Sam Jackson says "Vehicle headlights are on and not responding. Those shouldn't be running off of car batteries".
Answer: I found this version:

Vehicle headlights are on and they're not responding. Those shouldn't be running off car batteries. Item one fifty-one on today's glitch list. We have all the problems of a major theme park and a major zoo, and the computers aren't even on their feet yet.

The person in the movie says that the headlights should not rely on car batteries. They should use the centralized source of power, but for some reason they do use car batteries as a source of power.
I found this definition in the American Heritage Dictionary of Phrasal Verbs:

To operate using something as a source of power: This CD player is portable and runs off batteries.

There's a whole page dedicated to the explanation of this "glitch" in the movie.
As to why it could be "off of", I'm not sure, but I do sometimes come across such combinations. Here's a question over on ELU SE about "off of". It might be an issue of style.
In your example, the overall meaning is the same for "off" and "off of", IMHO.
Comment: Why do we say "running off batteries" but "running on fumes"?
Comment: @TRomano - I never heard this expression. Interesting. Maybe because "batteries" are containers, they contain electricity. We would say "it runs on electricity", not "off electricity". Fumes are the contained thing. "I run off my fumes cylinder".
Comment: I believe that could be expanded to"running on power drawn off of the car batteries," which explains both idiosyncrasies: It runs *on* its fuel, which is drawn from (*off of*) the fuel source.

What does "be running off of" mean?


I have a txt file labelled private key, inside is what i assume to be base64 string ending with =

Question: I have a txt file labelled private key, inside is what i assume to be base64 string ending with =, is there any way I can access the wallet I assume this is the private key for?
Answer: Presuming you are in possession of an actual private key and not a random Base64 string, consider this answer to convert it manually yourself or use an external program like this or this to convert it to the Wallet Import Format (WIF).
It would be preferred if you do this in a virtual machine disconnected from the internet for security reasons.


Can Ferengis grow hair?

Question: Ferengis always appear hairless. Can they grow hair (but merely choose not to), or are they physically incapable of doing so?
Answer: Grand Nagus Zek has ear hair. Does that count?
Comment: @Adamant the OP used the term 'hairless', not 'bald'. As the question is phrased, I think this is the right answer, it proves the Ferengi *can* 'grow hair'.
Comment: I don't think that's really what the question was asking.... It was more about whether they had hair on their heads.
Answer: No
According to Deep Space Nine executive producer Ira Behr, as recounted in the Deep Space Nine Companion:

Responds Behr, "Robert had this feeling that given the way Ferengi look, the style of
body with big heads and ears and little eyes and no hair, that they
would live in a moist climate."
Deep Space Nine Companion

This would definitely seem to confirm that they don't have any hair as an innate quality due to having evolved on a wet planet, not by choice.
Comment: I disagree. That quote doesn't say whether "no hair", in-universe, is prescriptive or descriptive. There could be a Ferengi custom that growing hair makes you a weakling, so they all make sure to shave their heads. Or it's simply *more convenient* to go hairless when living in a moist climate.
Comment: @Randal'Thor - Well, the big ears and little eyes are presumably not prescriptive. I read the whole quote as one part, referring to intrinsic characteristics of the Ferengi.
Answer: Notwithstanding the answer above that implies by design physiology that the Ferengi are without hair a priori, the following book I read some years ago goes some way to explain (from a fashion point of view) why some Ferengi will not even have hair in the ears and nostrils. In short, they purchase a Gweemo Lobemaster
Star Trek \ DS9: Legends of the Ferengi

Can Ferengis grow hair?


What is this pipe sticking out of the ground?

Question: This is connected to my sprinkler system. It has a crack in the side and leaks when the water to the sprinkler system is turned on, even when the sprinkler system isn't running. Does anyone know what it is, and if I can fix it by repairing the pipe or if there is an issue somewhere else in the system?
Answer: It's probably a stub-out for a drip irrigation line. You'd cut it off slightly below grade, hookup a drip line and run the drip irrigation line on top of the ground.
Answer: It must be a water supply meant to extend existing but before the valve so that is why it is leaking when off or if its a slight leak after water has been turned on, it maybe just water syphoning for what is left in the lines. Either way I would shut off your water and replace the area or cut it low and cap it.


How to get XML station list from shoutcast directory?

Question: Currently, I am fetching data in my radio app from another online radio source, and filtering the results by implementing:
 DDXMLNode* rootNode = [xmlDoc rootElement];
    NSArray* nodes = nil;
    nodes = [rootNode nodesForXPath:@"child::Station[Genres/Genre='POP']" error:nil];
    for(DDXMLNode* node in nodes)
    {
        Station* s = [[Station alloc] init];
        DDXMLNode* nameNode = [[node nodesForXPath:@"Name" error:nil] objectAtIndex:0];
        s.name = [nameNode stringValue];
        DDXMLNode* bitRateNode = [[node nodesForXPath:@"Streams/Stream/BitRate" error:nil] objectAtIndex:0];
        s.bitRate = [bitRateNode stringValue];
        DDXMLNode* streamNode = [[node nodesForXPath:@"Streams/Stream/StreamUrl" error:nil] objectAtIndex:0];
        s.streamURL = [streamNode stringValue];
        [array addObject:s];
    }

This filters out all the rest and only gives me the stations that are POP. This is working well with the current stations, but I need to be able to get station listings from Shoutcast. I have searched but can't find a specific place to get this directory / XML. I have tried going to the shoutcast website and "becoming a partner" but I get a message saying that they are working on the next version of shoutcast and are not allowing any new partners (although this message has been appearing for the last year). Is it even necessary to join in order to get access to all the shoutcast stations XML so that I may integrate them into my app?
The end result for me needs to be that I have a URL that lets me get the list of all radio stations from shoutcast / as well as an Update URL so that users are able to drag down and update all the listings URL to ensure that they work. (I have already implemented the refresh function with my current stations)
Update: By looking at the API Documentation you can find here: LINK They seem to make a reference to a Dev ID again, but then again this takes me to what I mentioned before about Becoming a partner
Answer: The only way is to become a Partner.
Answer: To get an access from the radio listing or to Shoutcast's APIs, you will need a Developer's ID (DevID). This DevId will be sent to you upon approval of your Partnership Request.
To become a partner, state your proposal on your application.
Here's the direct link, https://www.shoutcast.com/Developer.


Limit Transactions to certain states

Question: I'd like to exclude any users from California or Texas from purchasing our products. How do I accomplish this?
Answer: I can give you steps to do it, you need to do coding against it:

First you need to show a popup through header file (Use in header to appear it on all pages not just home page)
Popup will get area of user
Popup then send a request to a controller through ajax
Controller will validate input of user and create a session/cookie against given value
Now before showing popup again, you need to check if session/cookie is assigned, if it is assigned then you wont show popup again
In add to cart file, you can add check of you session/cookie and hide add to cart and quantity from product page
You can also add this check in cart initialize and checkout initialize event (Check available events list for this) or you can simple add this check on controller and redirect user to home with a splash message that you can't order from  California or Texas

Hope this will help you out

Limit Transactions to certain states


Suppose i want to track S&P500 index using 15 stocks, how do i adjust their weights?

Question: I am given 15 stocks (which is listed in NYSE), and want to track/replicate the S&P500 index. So i am currently have the information about the stock price, and given some capital to invest in (all must be in stocks), how do i determine the weights? I know that these 15 weights must equal to one, but if i take directly from current market, it won't be 1 (because there is 500 stocks in S&P, while i only have 15). Do i re-adjust, and if yes, how?
Comment: What is the position time frame? hours, days, months, years?
Answer: Hint: you are looking for weights w1,w2,⋯,w15
such that the linear combination of the 15 stocks daily returns is maximally correlated with the S&P500 index returns published by S&P. There are method(s) in statistics that can find these weights. Some of these techniques restrict the weights to be positive and some do not. There is plenty of historical return data available.
As a shortcut (if you don't know how to do regressions, PCA, minimizing a quadratic subject to constraints, etc.) you could indeed re-normalize the market cap weights so they add up to 1 (divide each marketcap by the sum of the marketcaps of the 15 stocks), but this is not recommended because it assumes that the 15 stocks have been chosen to be representative of the mix of stocks in the S&P (the right number of tech stocks, oil stocks, big companies, small companies, etc). which in general will not be true. So the resulting weights will be biased. Do this only if the 15 stocks have been carefully chosen for diversification and balance.
Finally, in 1987 Wm. Sharpe published "An Algorithm for Portfolio Improvement,". This algorithm could be used, starting with an equal weighted mix of the 15 stocks, to modify the weights until the portfolio tracks the S&P 500 as well as possible (in the sense of minimizing the mean-square of the tracking error). I think this could be the best solution.
Answer: Maginn et al. (2007) suggest one of two approaches: optimization and stratified sampling.

Optimization. First, you select some factor model which (you believe) best captures major risk factors in your universe. Then you select portfolio of 15 stocks so that this resulting portfolio would minimize expected tracking risk of original portfolio (S&P500 in our case). That's quite standard task performed by, say, built-in Bloomberg portfolio optimizer.
Stratified sampling. You apply "Morningstar style box", or similar multidimensional structure to S&P500. Again, to do it you have to select factors (i.e. dimensions) which you believe to best describe your universe (i.e. S&P500). Then you'll have weights for each cell: for example, 10% of original index cap would be small-cap value stocks; 20% mid-cap value etc.etc. Then you select, say, 2 representative stocks in each cell (for total 18 stocks) and balance its weights so that style box for these 18-stock index would be similar to the one of S&P500.
Answer: Well, at first, if you find the way to track it perfectly, let me know, we start a fund, and then we talk about percentages....
You are talking about something called "smart beta". You want to replicate an index using the minimum number of stocks with the greatest correlation, and R^2.
I did an approach when I was studying, it was simple, just using excel and solver.
For a certain date, you multiply the returns of each stock to a weight (w1,w2..). Then, you add all the resulting multiplications into a cell. Finally, using solver, make that cell to be 1 (with a minimum error). And there you go!
Comment: "Smart beta" is a simple rule-based strategy aiming at exploiting market inefficiencies. It tries to achieve alpha-like returns for a beta-like costs. As far as I understand user24645 wants to replicate and index, i.e. achieve unit "beta" to it, just "beta", not "smart". The goal here is achieving tradability, not exploiting inefficiencies. At least that's what Investopedia thinks: investopedia.com/terms/s/smart-beta.asp


Determining total blocks solved

Question: How do you determine the total blocks solved among all clients in the source code of an Altcoin? Is there a file in the code that can be viewed to see how many blocks have been solved in the meta data? How can this be determined or where can one look in the source code?
Answer: To determine the current blockheight of any coin, you will need to pull data from the network itself. The source code that runs a node for any coin will not include this information.
A full node will download the blockchain history, so your node could then report the current blockheight back to you. The source code basically contains instructions telling your computer how to do this, but the explicit block height is not contained within the source code.
Comment: Thank you so much for the response... I forked a coin and have the main server node a VPS where other nodes connect. Is this information on the .mycoin directory on the VPS? Thank you so much again.
Comment: You'll want to query your node for the current blockheight. You'll need to check the docs for the software you forked to find exactly how this is done.

Determining total blocks solved


How do the Lord of the Rings Roleplaying Game and the One Ring Roleplaying Game Compare?

Question: I am very familiar with the Star Wars RPG Saga Edition and have GMed many adventures and created many PC's. I love Tolkien and LOTR and am wanting to branch out into this universe. I looked on Amazon and found these two core rulebooks and have no idea how they compare. The types of campaigns my group enjoys is a decent mix of story telling and combat with encounters leaning more toward combat, but with a strong focus on character building. No one I play with enjoys simply throwing a character together and just hacking their way through an encounter. But, combat is important, not just skill checks and detective work.
Comment: Note for future readers: This is about *The Lord of the Rings Role-Playing Game* by Decipher Inc. from 2002, not about the similarly titled *The Lord of the Rings Roleplaying* system by Free League Publishing (which was just [announced last month](https://us3.campaign-archive.com/?u=2dcfb24fb7c8d0fb9c2f52040&id=9fac1d9d53) and hasn't been released yet).
Answer: They are based on different  sources.
LOTR RPG is based on the movies whereas The One Ring is based on Tolkien's books. This may seem like a small distinction, bit it influences everything from character building to narrative mechanics and conflict resolution.
LOTR RPG's structure and mechanics resembles D&D 3.5
The system is based around d20 rolls, class skills, and features prestige classes. There are a lot of subsystems  for any things, but most class features are combat oriented.
The One Ring closely mirrors the structure and feel of the books.
Gameplay is focused on making journeys through the taking on the forces of Sauron and resisting temptation. Focus is on the story aspects and personal character struggles.


How to use the word "purge"

Question: I've seen the word "purge" used in conjunction with "of" and "from" or being used on its own. However, would it be appropriate to say something like "I purged the information out from my brain?"
Comment: It looks like you're asking whether "purge" plays nicely with "out" (and, by extension, "out from" and maybe "out of") given that it does play nicely with "of" and "from" on their own.
Comment: https://books.google.com/ngrams/graph?content=purge+it+from%2Cpurge+it+of%2Cpurge+it+out+of%2Cpurge+it+out+from&year_start=1800&year_end=2000&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Cpurge%20it%20from%3B%2Cc0%3B.t1%3B%2Cpurge%20it%20of%3B%2Cc0%3B.t1%3B%2Cpurge%20it%20out%20of%3B%2Cc0
Answer: Here is a definition of this meaning of purge from the Oxford dictionary.

Rid (someone) of an unwanted feeling, memory, or condition

Here are two examples of the usage of purge from the Cambridge dictionary:

Party leaders have undertaken to purge the party of extremists.
  Hard-liners are expected to be purged from the administration.

of denotes what you are getting rid of, and from denotes where you are taking it from. You could therefore express yourself as follows:

I purged the information from my brain.
  I purged my brain of the information.

Note that the word out is not required in either sentence and its usage would sound uneducated.
Comment: @lightweaver - "out" really isn't necessary here, because *purge* always means to take something out of something else.  It sounds non-fluent.
Comment: Out is perfectly acceptable and it sounds fluent to me, it adds emphasis to the act of removal.
Comment: `Purge out therefore the old leaven, that ye may be a new lump, as ye are unleavened. For even Christ our passover is sacrificed for us` - 1 Corinthians 5:7
Comment: How about "I purged the information out *of* my brain?"
Comment: @lightweaver: possible, but why use more words than you need to?
Comment: @SLC: your reference is somewhat dated (KJV:1611). This Ngram indicates that, ever since 1800, usage of **purge the** has been significantly greater than **purge out the**, and that **purge out the** has declined continuously to present, whereas **purge the** has been stable since 1880. https://books.google.com/ngrams/graph?content=purge+out+the%2C+purge+the&year_start=1800&year_end=2000&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Cpurge%20out%20the%3B%2Cc0%3B.t1%3B%2Cpurge%20the%3B%2Cc0
Answer:
I purged the information out from my brain

Yup this is correct.
You can also say:

A) I purged my brain of information

and

B) I purged the information from my brain

They all mean the same thing.
A emphasises purging your brain. B emphasises purging the information.
Your original sentence, 'out' is not necessary but it is not incorrect. It just emphasises that the information came out.

Purge verb (used with object): to remove by cleansing or purifying (often followed by away, off, or out

Dictionary.com (Taken from Random House Dictionary)
Comment: **out from** is not idiomatic, at least not with **purge**.
Comment: `to remove by cleansing or purifying (often followed by away, off, or out).` from Dictionary.com
Comment: But not by **out from**.
Comment: `And I will purge out from among you the rebels, and them that transgress against me: I will bring them forth out of the country where they sojourn, and they shall not enter into the land of Israel: and ye shall know that I am the LORD.` Ezekiel 20:38
Comment: But we're not talking that way any more.   Would you advise the OP to use "ye"?  https://books.google.com/ngrams/graph?content=purge+out+from&year_start=1600&year_end=2008&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Cpurge%20out%20from%3B%2Cc0
Comment: It's unsurprising that the ngrams are low for an uncommon three word phrase. The alternative is *purged the information out my brain* which sounds incorrect, it needs a modifier such as *of* or *from*. Because *purged* doesn't mean something was taken *out*, you can *purge* a plagued town by killing its infected population. This specifically explains that the information was removed by taking it out.
Comment: "The stubbornness was purged out from him" wants "of", not "from".
Comment: We will have to agree to disagree.
Comment: That's not really how it works. You need to find a few modern English attestations to support your view that "purged {something} *out from*" is standard usage nowadays.
Answer: Purge means "to remove all unneeded/unwanted items" or "to make empty."
Purge is weird because it takes an object, but that object can be the thing X needing items Y removed, or it can be the items Y that need to be removed from X.
Of and from allow us to tell which is which.

I purged the file of old data.  (We're removing old data from the file.)
I purged old data from the file.  (We're still removing old data from the file.)

However, would it be appropriate to say something like "I purged the information out from my brain?"

Out isn't technically needed since purge already means "to remove", which means the unwanted items will be outside of what they are removed from already, but it can be there for emphasis if desired.  By emphasizing, you are creating the impression that it took much effort to purge the information from your brain, for example.
Comment: Does this imply that the "out" of "purge out" does *not* function like the "out" of "take out"?  I still have to wonder whether "purge out the tank" or "purge out the impurities" functions the same as "take out the garbage", which is itself distinct from "take the garbage"
Comment: Not really.  *Take out* means/impiles *to carry* whereas *purge out* doesn't.  But you can see how a speaker/writer might use *purge out* in a related sense, e.g. "purge out the impurities" - impurities are a form of trash, but it does not mean physically carrying anything out like "take out the trash" does.
Comment: Granted, the object of "take" is always the thing removed while the object of "purge" is sometimes the thing removed and sometimes the container.  On its own, "take" resembles "acquire".  "Take out" resembles "remove".  Neither needs to resemble "accompany", but either may.  I'm just trying to verify that you see no semantic difference between "purge" and "purge out" by comparing it to the clear semantic difference between "take" and "take out".
Comment: @GaryBotnovcan, you can "take out information" and you can also "take in information": the qualifier is necessary. You cannot "purge in information", so the **out** is redundant with **purge**.
Comment: One might clear a room, one might clear a room out, but I doubt that anyone might clear a room in.  It doesn't seem that every use of "out" is paired with a use of "in".  The sense of clearing a room can be limited to one's own presence, while the sense of clearing a room *out* cannot.    The lack of a contrasting "in" isn't sufficient to label the "out" as redundant or uninformative.

How to use the word “purge"


Direction of the frictional force

Question: Why is it said that friction always acts in the direction opposite to the relative motion at the point of contact with the surface?
When a sphere is rolling down an incline for example, the friction acts upwards in order to create a torque which increases the sphere's angular velocity to prevent rolling without slipping. The thing is, the relative motion between the point of contact and the sphere is also upwards.
Answer: When the sphere is rolling without slipping there is no relative motion between the sphere and the surface at the point of contact.
The ball "wants" to slip, such that there will be a relative motion between the surfaces however what prevents this slipping is the static friction force, acting against the potential direction of motion.

Direction of the frictional force


standardized mean difference vs raw mean difference

Question: Is there a difference between standardized mean difference and raw mean difference when conducting meta analysis or systematic review  and the measurement scales are same, would SMD and raw mean difference be the same ?
Comment: If you have questions that are not about programming and that are about statistics alone, you should ask them over at [stats.se], not here.
Comment: thank you, I am new to these forums. I will keep that in mind for the future.
Answer: The purpose of using SMD is to uniform scale before they are combined. So if you already have same measurement scale, SMD is not necessary. According to this Cochrane page, the standardized mean difference is used as a summary statistic in meta-analysis when the studies all assess the same outcome but measure it in a variety of ways (for example, all studies measure depression but they use different psychometric scales). In this circumstance it is necessary to standardize the results of the studies to a uniform scale before they can be combined. The standardized mean difference expresses the size of the intervention effect in each study relative to the variability observed in that study.
Answer: It is best to base your decision on the underlying science of the problem. If the scales are different then clearly you have no choice but to use a standardised measure. If they are the same then the advantage of the weighted mean difference over the standardised one is that the summary is reported on the original scale and so will be more understandable to your audience. You need to be careful though that the scales are genuinely the same. For instance suppose each study has compared the salaries of men and women in euros. If the studies had taken place in very different environments so there were big differences in salaries between studies you might still want to standardise here even though one euro is one euro everywhere because you might feel that a difference between men and women of 1000 euro is more important in a low salary environment than a high salary one. You could argue both ways here but the important thing is to pick the method which corresponds to your scientific question.
Comment: thank you for the answer, I am working with a harmonized data so the scales are already standardized, so i was confused if i would need SMD or raw mean differences would work.


Gnome extensions not working after upgrade to 19.10

Question: I had a couple of extensions installed in ubuntu 19.04. After upgrading to 19.10 they are all disabled (I look them up in Tweaks app). Beforehand, I had installed them using a firefox extension, but now when I try to install the same items it is not possible, probably it finds the previous installations and refuses to do a new install.
Thanks
Comment: Are these extensions 19.10 compatible?
Comment: GNOME extensions do not always work in different versions of GNOME; and thus get disabled.  You need to check for each extension that it works in GNOME 3.34 (19.04 used 3.32) or if you need to get a newer version of the extension (if available, or switch to a different extension that achieves your goal).  *Ubuntu only does this for the supported extensions found in the installation; for any you've added you need to do this yourself*
Comment: You may need to experiment with different versions of gnome. For example "Put Windows" required version 26. See this answer to a question https://askubuntu.com/a/1181164/307670 Don't forget to restart gnome after any changes Alt+F2+r
Answer: I found in Tweaks in the top right, there's a switch that was turned off. Turning this on activated all my extensions.
Comment: Not sure if your answer helped to topic starter, but it sure did help me :-)
Comment: Thank you, this helped for me too! But it's still a mystery why this switch was suddenly turned off from one boot to the next...
Comment: Thank you! It look me a long time to find this - it really should be shown on the Gnome Extensions webpage. An equivalent command is `gsettings set org.gnome.shell disable-user-extensions false`
Comment: It worked. This was my problem.
Answer: Download the extensions you want from https://extensions.gnome.org/
Select the latest version of that extension.
Most of the time they will be in zip format so extract the file from the zip folder.
Open the extracted folder and locate the metadata.json file.
In that file, replace the shell-version with the one you currently have and save. Also copy the uuid and use it to rename the extracted folder.
After you've done this, copy and paste that extracted folder(with the uuid as it's new name) in the extensions folder located in .local/share/gnome-shell
Once you've done this, restart your gnome shell and your extensions should be working. Don't forget to enable extensions in the Tweaks app.
Comment: After a Gnome crash, all my extensions were disabled. Re-enabling them on extensions.gnome.org didn't help. This answer helped me solve the problem: re-enable the Extensions support on the Tweaks app.
Comment: Oh man, I have been struggling with this since making the upgrade to 19.10 and it never even occurred to me to look in the Tweaks app. Sure enough, extensions were disabled there. Flipped the switch to turn them on again and all my extensions came right back.

Many thanks @FábioBatista!
Comment: This was the case for me as well with 20.04 - I had to re-enable the support in Tweaks. Thanks @FábioBatista


REST: 403 forbidden for file entities

Question: Ok, so this is a weird one...
I have a HEADless Drupal that I'm using to serve webform submissions. The webform module stores all files as private files.
The issues I'm having is if I view the submission in the angular app as the user that submitted the webform (owner) all the files come back fine. If I try to view the submission as a different user the files come back 403 forbidden. All of the other REST data comes back fine.
Then if I go back and view the submission as the owner again the files are now 403 forbidden for the owner as well. The only way I can get the owner to get a 200 response and see the files again is to flush the cache.
Other users viewing those files seem to lock the files down for the owner as well.
Viewing the webform submission in the actual Drupal has no issues.
Answer: Well, found my issue. I didn't enable the File entity module under Media which exposes the permission I needed to set for viewing private files.

REST: 403 forbidden for file entities


Is it possible to dissolve concrete with acid

Question: So I have this question. Can you dissolve concrete with acid? I know that there are many types of concrete, but the common and dominant component, as far as I know, is $\ce{Ca3SiO5.H2O}$ (hydrated tricalcium silicate). Will the acid react with it? What kind of acids are best for the job? Specifically I'm interested in nitric acid ($\ce{HNO3}$). If the reaction is possible, I also want to know, will it generate heat and how much?
Comment: Well, chlorine trifluoride would ignite most of things, including human body. Not much suitable for home experiments.
Comment: From experience, Nitric Acid will happily react with concrete producing NOx. Cannot give the exact reaction and the generated heat, so will leave it to others to answer.
Comment: There is a thing called chlorine trifluoride which is able to ignite sand and concrete.
Comment: @Jeppe Nielsen  I suppose HNO3 will not dissolve concrete, but at the best will convert it to some silicate / hydrated silica based residue.
Answer: Concrete is frequently treated with dilute hydrochloric acid to etch the surface prior to painting or coating with epoxy. After treatment with acid, good rinsing is suggested. This etch treatment will react with CaCO3 at the surface (Ca(OH)2 produced as a product of the hydration of cement reacts with CO2 in the air to form CaCO3 over a period of months), and it will likely bubble up a little. Then the acid will react with Ca(OH)2 which is deeper in the concrete, and some sand and stones will be loosened. If you brush these away, the acid can go deeper.
Nitric acid offers no better results.
Silica is generally formed after acid treatment, but is so finely divided that it can be rinsed off. If you want to dissolve the silica, you would use hydrofluoric acid, carefully, because of its human health hazard.
The sand and stone will not be affected much at all.
If you have lots of time, you could use mild reagents, like sugar dissolved in a little water. The concrete beneath tanks where sugar is purified suffers degradation as this very weak acid just complexes the calcium into solution. Months, years, maybe, depending on how much sugar and how much rinsing away there is.
Heat generated is fairly small because the reaction is slow with bulk concrete, especially if it is strong, but can get larger if you grind up the concrete first.
Comment: Hmm, I would think that Nitric Acid would perform significantly better.
Comment: In commercial practice, concentrated muriatic acid (HCl) is diluted to acid wash concrete or mortar. Nitric acid is more expensive, more hazardous when concentrated and turns your skin yellow if it doesn't burn it off. (The rinse-off would be a better fertilizer if it were neutralized enough so as not to kill vegetation!) You might think faster is better, but not only would nitric acid be no faster, a slower etch is often desired for better control. Hydroxyacetic acid is used for slower etch and complexation of multivalent metals to prevent discoloration of concrete.


Ordinal addition being closed in infinite initial ordinals

Question: I am having real trouble proving that $\alpha + \beta < \omega_\gamma$ for any infinite initial ordinal $\omega_\gamma$ and any ordinals $\alpha < \omega_\gamma$ and $\beta < \omega_\gamma$.
That is, that ordinal addtional is closed in any infinite initial ordinal.
This is pretty easy to show for $\omega_0 = \omega$ since the addition of any two natural numbers is clearly still a natural number.
However, I am not sure how to approach this for larger initial ordinals.
I feel like cardinality has to play a role in this since pretty much all I know about infinite initial ordinals is in terms of cardinality.
But there is no clear link between ordinal addition and cardinality.
Any hints would be very helpful here!
Comment: Do you know that $|\alpha+\beta|=|\alpha|+|\beta|$ for ordinal numbers (or order types) $\alpha$ and $\beta?$
Comment: @Andrés: It's definitely a better result, but it requires a bit more hands-on ordinal arithmetic and induction. With the case of initial ordinals, you just need to know the fact stated by bof two comments up, which in itself is not very difficult to prove.
Comment: Show that if $\kappa $ is an infinite cardinal, then there is a bijection $\kappa\times2\to\kappa $. Think of even and odd ordinals.
Comment: Anyway, a better result is that an ordinal is an ordinal power of $\omega $ iff it is closed under ordinal addition, and that every infinite cardinal is an ordinal power of $\omega $.
Comment: What is your definition of ordinal addition?
Comment: The following is overkill but maybe someone finds it interesting: For $\gamma > 0$ take an elementary substructure $(M; \in) \preceq (H_{\omega_{\gamma+1}}; \in)$ such that $\alpha+1 \cup \beta+1 \subseteq M$ and $|M| < \omega_{\gamma}$. Fix $\delta \in M$ such that $(M; \in) \models \alpha + \beta = \delta$. Now observe that $\alpha + \beta = \delta$ and $\delta \subseteq M$.
Comment: Appreciate all the suggestions, I will definitely explore some of these ideas. FYI the definition of ordinal addition I am using is recursive: $\alpha + 0 = \alpha$, $\alpha + (\beta + 1) = (\alpha + \beta) + 1$ where $+1$ denotes successor, and if $\beta$ is a limit ordinal then $\alpha + \beta = \sup \{\alpha + \gamma \,|\, \gamma < \beta\}$.
Answer: We prove this by induction on $\gamma$. For $\gamma=0$, this is just the fact that a union of two finite sets is finite. If $\gamma$ is a limit ordinal, then $\alpha,\beta<\omega_\gamma$ means that there is some $\gamma'<\gamma$ such that $\alpha,\beta<\omega_{\gamma'}$ and therefore $\alpha+\beta<\omega_{\gamma'}$ by the induction hypothesis.
Finally, suppose that $\gamma=\gamma'+1$. Then $\alpha,\beta<\omega_\gamma$ means that there are injections $f\colon\alpha\to\omega_{\gamma'}$ and $g\colon\beta\to\omega_{\gamma'}$. Define the following injection from $\alpha+\beta$:
$$h(\xi)=\begin{cases}\delta_{f(\xi)}+2n_{f(\xi)} & \xi<\alpha\\ \delta_{g(\xi')}+2n_{g(\xi')}+1 & \xi=\alpha+\xi'
\end{cases}$$
Where $\delta_\eta$ is the largest limit ordinal smaller than $\eta$, or $0$ otherwise; and $n_\eta$ is the finite difference between $\eta$ and $\delta_\eta$ (so if $\eta<\omega$, $n_\eta=\eta$, for example).
Easily, $h$ is well-defined since the two cases are mutually exclusive, and $h(\xi)\leq f(\xi),g(\xi')$ so these are always ordinals below $\omega_{\gamma'}$. Moreover, it is injective, since $g$ and $f$ are each injective and $h(\xi)$ is always an even ordinal where $\xi<\alpha$, whereas $h(\xi)$ is always an odd ordinal for $\alpha\leq\xi$. So $h$ is the union of two injective functions with disjoint domains and disjoint ranges, and thus an injective function on its own.
Therefore $|\alpha+\beta|\leq\omega_{\gamma'}<\omega_\gamma$.    $\square$

Remark 1. Note that really $\alpha+\beta$ is just the disjoint union of a copy of $\alpha$ with a copy of $\beta$. Therefore by definition, $|\alpha+\beta|=|\alpha|+|\beta|$, so by basic cardinal arithmetic results on $\aleph$ numbers, $|\alpha+\beta|=\max\{|\alpha|,|\beta|\}$ when at least one of them is infinite.
Remark 2. We could have worked harder and defined $h$ to be a bijection between $\alpha+\beta$ and $|\alpha+\beta|$. But this requires separation into cases and whatnot, and I don't see the point of that, as an injection is enough to establish that the cardinality is strictly less than $\omega_\gamma$.
Comment: Hi, is it possible that there is a problem in the definition of $h(\xi)$, because $f(\xi)+\omega$ need not be injective?  Different $f(\xi)$ may give the same ordinal when adding $\omega$ on the right.
Comment: Yes, thank you, you're absolutely right. I will correct this later today. Just need to finish "booting up"... :-)
Comment: Okay, this should fix it. Thanks for the attention for details!


What does Java EE compliant means?

Question: We often say that the particular application server is a Java EE compliant server. But I am still not completely aware of what it means exactly. Need more information on this.
Answer: It means that it passes the Java EE Technology Compatibility Kit.
Sun (now Oracle) created the specification for Java EE (previously called J2EE) along with a large test suite checking that the application server behaves as the specification requires.  This is a non-trivial test to pass, but means that if you write your application according to the Java EE specification it will be able to be deployed and executed on any Java EE application server (of that level).
Note that the configuration is outside the specification.  This means that the configuration of the application server to provide the things your application needs, is non-standard and it may be a quite substantial effort for you to add support for a new application server.
Answer: What Thorbjørn Ravn Andersen said is perfect. Also, the Java EE 6 Technologies page lists the technologies included in Java EE 6 specification. You can consider any Application Server fully implementing these to be Java EE-Compliant.
Also the Compatible Implementations page lists the list of AS compatible to each Java EE version.

What does Java EE compliant means?


English translation of "Onomasticon" by Julius Pollux of Naucratis?

Question: Is there an English translation of the Onomasticon by Julius Pollux of Naucratis?
Answer: Apparently it exists, but you might have a hard job finding a copy.
WorldCat has an entry with the following description:

Onomastikon Iouliou Poludeukou = the Onomasticon of Julius Pollux : an introduction to translation
Author:   Julius Pollux; Leland A Hall
Publisher:    1960.
Edition/Format:    Manuscript  Archival Material : English

With notes which seem to confirm that it's an English translation (in case you might think the "English" above is an archiver's error):

"Prepared as an Honors Thesis for the Department of English, University of Oregon ... May 15, 1960."
Typescript (carbon copy)--with handwritten corrections.
Translation of various sections of the Onomastikon.
"The translation has been made from the Lexicographi Graeci series, volumes IX and X, edited by Eric Bethe (Leipzig, 1932)."--Page iv.

Apparently, the manuscript is available to borrow from University of Oregon libraries.
I tried to find a Leland Hall who studied in the University of Oregon, and came across this fellow:

Studied at University of Oregon
School year 1960

I don't have a Facebook account to see any more info about him, but it's possible he might respond to an interested reader about his work of sixty years ago.

The original Greek text, as well as a Latin translation, are readily available online.
Comment: According to https://www.worldcat.org/title/onomastikon-iouliou-poludeukou-the-onomasticon-of-julius-pollux-an-introduction-to-translation/oclc/37870057 this thesis has 53 leaves (= pages), while the work of Pollux comprises more than 120.000 Greek words!
Comment: Thanks! I was hoping for an online interlinear Greek/English version as Oregon is a bit of a ride from Tucson, AZ., where I currently am!
Comment: It's described as "Translation of various sections" so it's clearly not complete.


Is it ok to have huge page life expectancy?

Question: Recently I have buffer issue for my SSIS package.
When i started to monitor metrics in perfmon i noticed the PLE is nearly 500000.
Is it ok to have this huge PLE.
Comment: You might make the other DBA's jealous.
Answer: Page Life Expectancy is simply how long (in seconds) a page will remain idle in the buffer before being removed to make room for another page.
There's no active harm in a very large PLE. It's possible that you've got more memory going to SQL Server than is absolutely required, but that's still not necessarily a bad thing.


Enabling/disabling/changing Oracle auditing without a shutdown?

Question: I have a large database that needs auditing on a very detailed level (every select, update, insert, and delete, along with the actual text of the statement) for about half the users.  I know how to do this (here is a related question for anyone interested), but I also realize we cannot do this for any extended amount of time because of how much quickly we would be collective massive amounts of data.  So while there is a scheduled downtime coming up that we can implement the auditing, to change it to fine tune it (as management changes the request of what data they desire) or to disable it once we have enough data would require us having to take the database down to disable this.  While this wouldn't be too horrible to do if we were able to schedule a short downtime late at night, it would be really nice if this could be avoided altogether, but every reference I've seen so far requires the database to be brought down and back up.
So, my question (which I believe to be general enough for the purposes of this site, even though the back story is specific) is if there is a way to enable/disable/change auditing without shutting down the database.
Edit:  Oracle version 11r2.  As for AUD$ vs. FGA, I'm not sure what FGA is, but AUD is the table which will hold the data, so I am assuming that one.
Comment: What Oracle version? Makes a big diffence, as auditing is on by default in 11r2. Also, what kind of auditing? Traditional AUD$ or FGA?
Comment: FGA - http://docs.oracle.com/cd/E11882_01/network.112/e16543/auditing.htm#DBSEG60681
Answer: AUDIT_TRAIL is an initialisation parameters and needs a database restart. Anyway by default AUDIT_TRAIL is set to DB. This could be enough.
With this AUDIT_TRAIL you have just to issue:
AUDIT SELECT TABLE

to start the audit on any table for any select. As you stated this activity has an overhead from the database point of view. you have to pay attention to you SYSAUX tablespace growth where by default resides the sys.aud$ table. To move sys.aud$ you have to do:
SQL> BEGIN
 DBMS_AUDIT_MGMT.set_audit_trail_location(
 audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,--this moves table AUD$
 audit_trail_location_value => 'AUDIT_TBS');
END;
/

FGA is much more than AUDIT and lets you specify the conditions necessary for an audit record to be generated. Furthermore FGA policies are programatically bound to the object (table, view).
Apart from this you should consider a different solution like an third party tool for DAM (Direct Access Monitoring). Oracle has its own solution today called Oracle Firewall. Otherwise you can check for other products like IBM Guardium, DBProtect, etc.


Does CiviDiscount no longer work with new releases?

Question: We are on WordPress 6.4.2 and  CiviCRM 5.69.2
We have used the CiviDiscont extension for years. Now it is no longer available to download and install through the extension manager. Also the existing install that we already had appears to be missing. It was never uninstalled or deleted, however clicking the link in the menu just takes us back to the CiviCRM homepage and I cannot find any trace of CiviDiscount anywhere on the CiviCRM install.
Answer: Jan 22, 2024, WordPress 6.4.2, Powered by CiviCRM 5.69.2, free and open source AGPLv3 software.

Please check CiviCRM (and the webserver) logs for oddities.


Is tacit programming possible in the statistical programming language R?

Question: Is tacit programming also known as point-free style - an option in R?
Comment: `Negate`, `Vectorize` and identity are available without any additional addon packages.  The functional package has `compose` and `Curry` and some others. Also see the lambda.r package.
Answer: Check magrittr package since it seems closest to what you are asking. Wikipedia quotes an example:

For example, a sequence of operations in an applicative language like
  the following:
def example(x):
   y = foo(x)
   z = bar(y)
   w = baz(z)
   return w

...is written in point-free style as the composition of a sequence of
  functions, without parameters:
def example: baz bar foo

In R with magrittr it could be written as
x %>% foo %>% bar %>% baz

where %>% operator is used to compose a chain of functions, so that the output of a previous function is passed as a first argument of subsequent function. See the magrittr vignette for learning more.
The function could be defined
# explicitly
example <- function(x) x %>% foo %>% bar %>% baz

# or simply (as @bergant noticed)
example <- . %>% foo %>% bar %>% baz

Comment: To define a function: `example <- . %>% foo %>% bar %>% baz`.


How to determine the order of SARIMA Model?

Question:

I am trying to forecast hourly wind speeds for a couple of years. My dataset contained trends and seasonality so a applied a difference of 24 to remove seasonality and then another difference to remove trends. This is the resulting autocorrelation and partial autocorrelation function. I would like to know how to determine the order of the SARIMA model= (p,d,q)*(P,D,Q)[s]?
Answer: My best suggestion would be to feed your series into R as a ts object and then let auto.arima() from the forecast package select an appropriate seasonality. This is an established piece of software that will almost certainly do a better job than if you applied something you read about here. (If you do want to "roll your own", you can read up on the OCSB test for seasonality that auto.arima() uses.
However, and more importantly, you may have multiple-seasonalities, since wind speeds may not only show day-over-day patterns, but also year-over-year ones, so you have cycles of length both $24$ and $365.25\times 24=8766$. Multiple seasonalities can be modeled and forecasted using the bats() and tbats() function in the forecast package. See also the multiple-seasonalities tag info.
Comment: My dataset only consists of a year & a half hourly wind speeds, would that mean that there is a monthly seasonality?
Comment: There is probably no intra-month seasonality, since months are human constructs and not tied into natural cycles, in contrast to years, where there is the summer-winter cycle. I don't know how `bats/tbats` deals with having seen less than two full outer cycles. Try it!


Do I need to worry about Min/Max footprint length values in datasheets

Question: I'm currently generating a set of pads for a footprint found in a datasheet. All of the length values in the footprint have min/max values e.g. 1.8 +- 0.1
Should I be using the 'middle' value, and if so, why do manufacturers bother with the min/max values?
Comment: It somewhat depends on the part.  The answer is different for a gull wing IC than an SMT capacitor.  Post a link to the datasheet please.
Comment: For Example the LTC3824 DC/DC step-down I'm currently looking at http://cds.linear.com/docs/Datasheet/3824fg.pdf

Not only does it have several +- values, in the footprint, it has a height of 5.2 MIN, and the pads have a width of 3.05 +- 0.038 TYP.
I'm assuming the MIN means minimum and TYP means typical, but that would mean the height can be anything over 5.2, and the pad widths vary even after the +- 0.038.
Answer: It may be a bit confusing that there's a difference between who's job it is to guarantee that the manufactured sizes are within spec:

The component manufacturer has to make sure that the actual part complies to the package drawing and lies within the tolerances.
You, being the one who is responsible for the PCB, are the one who has to make sure that the actual, real PCB is within the specification of the recommended solder pad layout. The tolerances are there to help you: As with anything real, you won't be able to manufacture a board with 1.8 mm and +/- zero tolerance, but you can make a board with 1.8 +/- 0.1 mm.

What the datasheet tells you is that any part within worst case tolerances will be good on any real board within worst case tolerances. If they just gave you nominal values, you would be facing the impossible task of making a real board with theoretical, ideal tolerances. Thus, again, the tolerances are there to help you, they're not created to have you worry: Specify the nominal (typ.) values when creating your decals, and relax in the comfort of +/- 0.1 mm when having the actual board made.
Sometimes, you will find different drawings between various manufacturers for a part that's practically derived from the same standard case outline. If you wish to have decals that are good for parts sourced from multiple companies, you can attack this problem from two sides:

Start with the available drawings and specifications: It helps a great deal to compare similar drawings from a number of different manufacturers; say, for example, 0805 capacitors from AVX, murata, Kemet and whatnot, or MSOP-8 ICs from TI, Fairchild, Linear and whoever. Then, try to create footprints that agree with any of these manufacturers' standards and min/max tolerances. If you have access to sources that are not specific to one single manufacturer, like IPC (Association Connecting Electronics Industries) or JEDEC, and you can bring them to agree with what you've figured out, even better.
Start with information based on practical experience: Ask your place-and-solder shop what works best for their soldering processes (reflow?, wave?) and machines (temperature profile?, type of solder?). They will likely know that pads with a slightly larger or smaller dimension in one or another orientation help them to avoid unwanted things like tombstoning of chip capacitors or resistors.

Ideally, all the information you can gather will not contradict and you end up having Your Pefect DecalsTM.
Related, but not a duplicate: The "right" 0805 footprint land pattern
Comment: Many manufacturers do provide recommended footprints in their data sheets.
Comment: Thanks! So if I'm using a manufacturers datasheet, do I need to recalculate all the values to allow for the Max range. If so, why don't the manufactures just specify the exact footprint to be used?
Comment: @PDug: Answer is updated to consider your comment.
Answer: Of course you have to pay attention to min and max values!  This should be self-evident.  Every manufacturing process has variations.  There is no such thing as a fixed exact dimension.  With the min/max values, the manufacturer is telling you what range the parts you will receive will fall within.  You could get a whole batch right at one end or the other of that range.  If you want your board to be reliably produced, it has to work properly with parts anywhere within that range.  This should be obvious.
For example, if some surface mount chip is specified with a nominal .3" distance between the ends of the pins with a 10 mil tolerance, what exactly does the .3" spec mean?  Nothing.  It's only there to give you a quick conceptual idea of the size, but otherwise they are saying the size falls from .290 to .310 inch.  Let's say you center the chip at the origin when defining the package in your CAD system.  That means the absolute coordinate of the ends of the pins will be half the width.  The ends could extend as far as .310"/2 = .155" from center.  Of course there will always be some placement error and you want the pad to extend a little past the end of the pin for a good solder miniscus and possibly to ease manual soldering in case you ever need to.  My general rule of thumb is to add 20 mils for all the above.  That's a general rule.  There are reasons you might want a bit more or less depending on how the chip will be placed and soldered and some details of the process.  In this example, we'll go with the general 20 mil rule.  That means the ends of the SMD pads need to be at the absolute coordinate .175".
The same logic applies to the inner edge of the pad.  Again you look in the datasheet and find the minimum distance from the center of the chip where the pin can come down and touch the board.  On the inside, you don't need 20 mil of additional length.  I usually add about 10 mil, although particular processes may dictate something different.
Using this logic, you end up with a footprint that will nicely accept any chip the manufacturer sends you.  If it's a standard footprint you may only want to enter it into your CAD system once (at least for the general case).  There may be slight spec differences between manufacturers.  It is a good idea to check datasheets from a few different manufacturers for the same supposedly standard footprint.  This gives you a better idea of the true variation out there.  Usually they are close, but there can be small differences.
Comment: Are there any issues related to being liberal with sizes? Giving them an extra bit of room seems like a great idea, but that obviously means you can't pack them as tightly on the PCB. Maybe there are thermal issues?
Comment: @PDug: Yes, you don't want to make the footprint too big.  The surface tension of the molten solder will pull the part.  If the pads are only a little bigger than the pins, this will pull the pins to where they should be.  If the pad is a lot bigger, the final placement becomes unpredictable.  A little more solder paste in one area can even pull pins off of pads in another.  I use 20 mil extra in part to allow for hand soldering or rework in case needed.  I can't see a reason to go bigger except for where the pad acts like a heat sink.  That's special case you have to think about carefully.