Is gauge structure necessary for topological order?

Question: All of the famous theories with topological order have some kind of gauge structure, for example the $Z_2$ lattice gauge theory or in QHE. So my question is that whether the existence of a kind of gauge structure is a necessary condition to have topological order in a system or not? If the answer is no, can you mention an example of such model which have no gauge structures but its low energy theory is described by a TQFT?
Answer: First of all, it is dicey to say physically what it means for a system to be a gauge theory. Indeed, the gauge group itself is often just an artifact of how we describe the system. S-duality in SUSY Yang-Mills theories for instance change the gauge group (as do a number of finite gauge group dualities explained in my paper with Anton Kapustin.)
Probably the strongest question one can really ask along these lines is whether a system can be modelled with a local Hilbert space at low energies. That is, one which admits a factorization into a tensor product of local "atomic" Hilbert spaces. Note that deconfined gauge theories don't satisfy this condition because the Hilbert space is a set of charge zero states inside some local Hilbert space, and the charge operator is not at all local.
But note further that fermionic systems also don't satisfy this factorization property, since the fermionic creation operators anti-commute at arbitrarily large distances. And indeed, it has been shown that fermionic Hilbert spaces and operators can be exactly mapped to something like a higher $\mathbb{Z}_2$ gauge theory, so the difference between a theory of fermions and a gauge theory is even blurred.
Something with topological order intrinsically also lacks this factorization property due to the presence of nontrivial string and membrane operators, for basically the same reason as the fermionic systems.
One can maybe say a bit more. It is known that deconfined gauge theories come about from spontaneously broken higher symmetries (also explained in our paper above and in this paper) and various aspects of abelian Chern-Simons TQFTs can be explained from this perspective. This spontaneously broken higher symmetry idea precisely encodes what it means for a system to lack a model by local Hilbert spaces.
There's no reason one can't immediately extend this to the setting of arbitrary (extendable) TQFTs using the cobordism hypothesis. Indeed, Z(point) acts on Z(X) for all spaces X and the cobordism hypothesis roughly says that the TQFT behaves as the regular representation of Z(point), meaning this higher symmetry is completely broken in the TQFT ground states. Whether this is actually a useful perspective, probably it isn't but I think it's kind of cool.
For instance, a dimer model on a square lattice has "topological degeneracy" and doesn't look like a gauge theory but actually can be mapped to one.
Comment: Very nice answer! I guess one could extend your notion to a system being $q$-factorizable, meaning that the system admits a factorization into a tensor product of Hilbert spaces which are defined/localized on a $q$-dimensional physical subspace. I.e. then your definition of gauge theory is 'not being $0$-factorizable'. I guess usual gauge theories are not factorizable for any $q < D$, with fracton order being a counter-example (i.e. for fracton order there is some $q_\textrm{frac}< D$ such that the system is $q$-factorizable iff $q \geq q_\textrm{frac}$ (?)).
Comment: Hi! Is this the same as restricting the dimension of the logical operators somehow?


What are the differences between multi-link suspensions and double-wishbone suspensions?

Question: There are a multiple of different kinds of suspension, multi-link suspensions and double-wishbone are popular in some performance groups.  What are the main difference between these two?  What advantages and disadvantages does each offer over the other?
Comment: This is a very broad question: for example, which two specific suspensions are you comparing? Without more specificity, a perfectly reasonable answer to the first question would be "geometry" and the second would be "it depends."  However, if you were to ask something more specific, it might be more useful: e.g., "Which better preserves camber throughout the various g-loads in a corner?"
Comment: This is one of the proposed questions at the Area 51 proposal [Motorsports & Performance Tuning](http://area51.stackexchange.com/proposals/66334) It is offered here to gauge if that proposal is in fact [a duplicate of this site](http://discuss.area51.stackexchange.com/questions/13794)
Answer: Aside from the obvious bits, the difference is that a multi-link suspension allows you to adjust one setting independently from the rest, e.g. camber, caster, toe in/out and ride height, giving you greater control over the final setup. Dual wishbone suspensions on the other hand don't offer quite as much flexibility, but they make up for it by being pretty good from the start.
Some people claim that multi-link setups are more forgiving when driving over bumpy surfaces, and I have no reason to argue with them, but I personally believe that has more to do with relative spring and compression rates as well as shock absorber type than anything else. In other words, I don't think you'll feel much of a difference between the two setups in the same car if they are tuned for the exact same conditions.


Why couldn't one combine rules from languages for sentences with the same intended meaning?

Question: Why couldn't one combine rules from languages for sentences with the same intended meaning?
So that I could, for example, write Finnish with the same comma rules as in English?
Rather, one must subscribe to the rules of a particular language.
Answer: You can if you want; nothing is stopping you.
But if you're writing in Finnish, it's presumably because you want Finnish-speaking people to understand you, and Finnish-speaking people are used to the rules of Finnish, not English. So if you want to be best understood, you should stick to the rules and customs of Finnish.
Σιμιλαρλυ Ι κουλδ ωριτε θις ανσωερ βυ (αβ)υσινγ θε Γρεεκ αλφαβετ, βυτ θατ ις νοτ εσπεσιαλλυ υσεφυλ ιφ Ι ωαντ Ενγλιση-σπεακερς το υνδερστανδ με. ("Similarly I could write this answer by (ab)using the Greek alphabet, but that is not especially useful if I want English-speakers to understand me.")
Or, I the rules syntactic of language another in English use could, because I the verb at the end of the sentence put like might. This to speakers of English similarly be difficult would. ("Or, I could use the syntactic rules of another language in English, because I might like to put the verb at the end of the sentence. This would similarly be difficult to speakers of English.")
The purpose of language is generally to convey information and be understood, and the "rules" of language aren't defining what you're allowed to do, so much as what you should do if you want people to understand you as much as possible.
Answer: Why can't Australians drive on the right side of the road, and Americans drive on the left? Why can't soccer players pick up the ball? Why can't orchestral musicians choose which key they want to play?
Just like all of these, language is cooperative. Sometimes a choice may be largely arbitrary, but it still matters that everyone cooperate and follow the same rules. There are varying levels of importance to these rules and conventions; punctuation is of low relative importance, as is spelling. Anyone on the internet (or who knows children) will have experience with reading misspelled or poorly punctuated text. Grammar and vocabulary is much more important for effective communication. If you use lots of words from another language then only those familiar with both will be able to understand. If you don't follow the grammatical standards of a language, then people either won't understand, or probably worse, they'll misunderstand, as they try to make sense of what you've said or written. English for example has a fairly strict word order. Swapping the order of the subject and object won't always appear ungrammatical, instead it can be grammatical, but just communicate the opposite meaning of what you intended.
Answer: We can - it's all just a tradition... In fact, most of "western" world uses the same punctuation and capitalization rules (minus some minor differences). Note how in both English and Finnish you start the sentences with a capital letter, end them with a dot (or a question or an exclamation mark); words are divided by spaces (but not in front of commas), quotation marks work in the same way (though a bit different visually), typography is more or less identical. Even Greek and Cyrillic based languages follow almost the same rules (minor details like a different question mark aside). OTOH, Arabic and CJK languages have very different rules (but still, they imported quite a lot of European "rules").


Sapling tree to a mesh and follow the treeArm Animation like the leaves?

Question: The tree is a curve and has a windSway modifier. The leaves is a mesh and has a windSway modifier. How I convert the tree to a mesh and make it to follow treeArm & animation like the leaves?
Comment: Convert it to a mesh using Alt-C. But I'm not sure if the modified data will stay intact.
Comment: I know how to convert to a mesh, but the windSway modifier is lost then and it cannot be found in the modifiers.
Answer: I had this exact problem, and I just found out the solution. In the Operator panel for the Sapling, simply check the "Make Mesh" box in the Armature menu and there you go! If you want to edit the mesh, you have to look for the Skin modifier that is created in the Outline under's the tree's mesh and apply it.
Hope this solves your problem!


how to fix jagged vertices

Question: I've been having trouble with jagged vertices happening in more detailed parts of my sculpture. I've tried just selecting those jagged areas and subdivided so I could just using the smoothing tool, but they don't divide, the other areas around will though. I've also tried just smoothing the area then trying again, but because its all one area, it comes up together and is all jagged again. The only other option I see at this point is to subdivide the whole sculpture, but I'm afraid if I do that once or twice again I feel like that will create to many vertices and crash the program forever, this is what happen to my last version of this project. If you have any solutions, please let me know
Comment: A similar problem happened to me 1-2 days ago. I feel like making your settings lower so Blender doesn't crash and then subdividing the whole sculpture might work. But that's just a guess so it might crash it forever as you said.
Comment: Hey I'm new to blender, what exactly does 'making my settings lower' mean and how do I do it? Also thank you for answering for my question in the first place.
Comment: Like, lower your graphics settings so it doesn't lag much and doesn't crash.
I don't exactly know how else to explain it.
Answer: Thoose jagged artifacts are happening because you're trying to push the geometry over its natural boundaries: the mesh should remain evenly spaced, manifold, without overlapping and intersecting geometry.
This can be reached with more subdivisions and an accurate building of the strokes.
3k vertices is extremely low for a sculpt, this level should be used only for defining main planes and forms, further details need lot more geometry, it's usual to go up to 100K for a mid detailed model, and more than 1 milion for a full detailed one.
Make some experiments to check which is the number of vertices your machine can handle without crashing or lagging, and make use of Dynamic Topology, which adds geometry only where you sculpt.
During learning process, I find it useful to turn on the geometry viewport overlay, to better see the effects of strokes and dynatopo.
Be aware anyway that fixing the problem with so little geometry is simply impossible.

how to fix jagged vertices


Clustering sets based on common elements

Question: I am looking for a clustering algorithm for the purposes of combining routing information.
Suppose we have the following sets:
A={1,2,3,4,5}
B={2,3,4,6}
C={3,4,7,8}
D={8,9,10,11}
If we want 3 groups, you could have arranged a variety of combinations ({1A;2B;3CD},{1A;2BC;3D}, etc.).  If we consider the overlap in elements as a scoring metric, something like 1A, 2B, and 3CD would have a score of 2 since only one element (8) overlaps between C and D.  However, if we group 1AB, 2C, 3D then the score would be 6 since three elements (2,3,4) overlap between A and B.  If we specified 2 groups, you might get even higher: 1AB, 2CD with a score of 7.  I should also mention that the initial sets can also be weighted, representing multiple occurences of the set equal to its weight.  The output of the algorithm would provide a table of set assignments to a group index.  Is there any algorithm that can accomplish this efficiently (there are hundreds of million records to cluster).
I have looked into the Apriori algorithm, which appears to be doing something similar but doesn't provide final clusters (just counts of instances for overlaps, it doesn't do the assignment; though I could be misunderstanding).  Other similar threads have taken an approach of conducting k-means clustering based on a distance metric of overlap--however this doesn't seem quite right either because it doesn't tell you which elements are overlapping (again I could be missing something here).  It seems like hierarchical (agglomerative) clustering would be a good approach in principle, but again it is unclear what metric would be clustered on (again since overlaps don't actually contain any information about the elements in the sets).
Answer: You can use any clustering technique by defining an appropriate distance metric. In the case of set data, one common distance metric is Jaccard. Jaccard Index is defined as the size of the intersection divided by the size of the union.


How to make a dial up connection disconnect automatically after downloading + uploading 90 MB data in Windows?

Question: I am using a modem (ZTE USB Modem FFF1) to connect to internet and I want it to disconnect automatically after completing 90 MB (Downloaded data + Uploaded Data). Can anyone suggest how can I do this. I am using a desktop computer running on Windows 8 Consumer Preview. There's no router. I am using a dial up connection to connect. I just want to limit the data usage of my internet connection, considering sent data + received data.
Comment: I see no one has to limit their DATA consumption while surfing the internet, but I want to do so.
Comment: Is the 90mb the expected file(s) size you want to regularly transfrer? Like log in, transfer x files and logout. Or do you want to monitor data usage and limit it to 90mb per session? Log in, watch data flow, when 90mb transferred, disconnect.
Comment: @jdh Yes, exactly, I want to monitor data usage and limit it to 90mb per session. Log in, watch data flow, when 90 MB transferred, disconnect.
Answer: What you are looking for is called a bandwidth monitor tool or utility. There are a few out there. However, based off a simple search, it seems one of the better (and free) ones is Softperfect's NetWorx. One of the its feature is, it's able to end a dial-up connection when a cap is reach.


What are the little bugs at my foundation?

Question: The north side of my house is in the shade of some big spruces, and we're in a valley, so the area that they come from is quite shaded. They are little red ant-like insects that I never see until they swarm. A couple times a year they come above ground in great quantities. They must live deep, for they also come up on the other side of the foundation, in my unfinished basement. When they come out, they cover the ground and climb slowly up the wall. They are very delicate and cannot support their weight well. After they climb up waist to head height, they drop off and fly. They flutter and dive and wobble in circles. Half of them bump into the wall and fall back down The others fly somewhere else. They don't all have wings, and some have only one. They have a stinging bite, which is surprising because of their weakness. This whole process is done in a few hours in the afternoon. Unfortunately, I do not have a picture. What are they, and how do I keep them from pulling down my lily of the valley (what I have for a foundation planting)?
Comment: Maybe [Larger Yellow Ants](http://bluejaybarrens.blogspot.com/2012/03/ant-swarm.html)?
Comment: Thrips, maybe?  Probably not chiggers, but check images.  Probably not spider mites - you must know them.  Bright orange-red?
Comment: @EdStaub Dull clear orange red. Also, they smell like lemon mint.
Answer: Sounds like they look, smell, and behave like Larger Yellow Ants, also known as Large Yellow Ants, Citronella Ants, or for the nimble of tongue, Acanthomyops interjectus.  The ones with wings are queens.  The queens shed their wings after mating.
A fellow in southern Ohio named Steve Willson just published a splendid blog post on these guys - a great read whether you have them or not!


What are .S files?

Question: I've seen .S files in various projects such as in the Linux Kernel, FreeBSD kernel, or in some other projects.  What do these files do and why can't we have .c files instead ?
Answer: .S files are source code files written in assembly. Assembly is an extremely low-level form of programming. The files contain assembly instructions to the processor in sequential order and are typically compiled based on a selected architecture. Examples of such files are often seen in the linux kernel for specific architectures, e.g. x86, sparc, ARM, etc.
For more information about assembly language:

X86 Assembly/GAS syntax
x86 Instruction list
TLDP Linux Assembly Howto
Example in the Linux kernel: arch/x86/net/bpf_jit.S
Comment: Why isn't it called ````.asm````?
Comment: Because someone preferred `.s`.
Comment: @Liga: IDK why `.s` / `.S` was originally chosen by Unix assemblers, but these days on modern x86 it's normal to use `.asm` for NASM/YASM/FASM/MASM/JWASM/etc source files (using directives like `dd`, and `.S` for GAS/clang asm source files (using directives like `.long`, and defaulting to AT&T syntax).  I think some people *do* use `.asm` for GAS source files, though, especially for other architectures like ARM, perhaps especially for embedded development. (Certainly for non-GAS ARM assemblers like Keil's that use different syntax.)
Answer: .S files are usually assembly language.
Something nobody mentioned is, why capital S?

.S (capital S) stands for assembly code that must still pass through a pre-processor. That means it can have #include and #define among other macros. It may also be written as .sx.

.s (lowercase s) is pure assembly code that can be compiled into an object.

Why not use .c? Well, being an operating system, it is impossible to write everything in C. Actually, that would be ideal, and C language itself has a background history linked to help creating operating systems and diminish the amount of assembly needed to code it. But many low-level operations are too dependant of the machine.
Here a nice example of a memory copy routine for the Linux boot that uses #include <linux/linkage.h>.
Comment: Yes, this answer is very important. I just encountered the ".s" issue recently. The code is a copy from other projects, I just changed `.S` to `.s`. I have to change the `#define SOME_CONST 1` to `SOME_CONST = 1` and put it into the `.s` file. It puzzled me a lot. I inspected the compilation flags, no clue...then I was guessing probably the suffix matters? Then a search hit this link and answer :)
Answer: .S files are assembly files.

Why .S & why not .c files?

Its because machine dependent stuff and early initialization such as setting up cache and memory can only be done with assembly level instructions such as I/O instructions.
The kernel doesn't have the luxury of the libc library to take care of the initial set up of various resources.
And hardware resources at any point even during application execution in turn call system calls which call I/O routines coded in assembly language.
Answer: The .S extension indicates an assembly language file.

Why cant we have .C files instead?

Because the raw source code — be it human-entered or compiler-generated — is assembly, not C.
Answer: They are assembler code files:

An assembly language is a low-level programming language for
  computers, microprocessors, microcontrollers, and other programmable
  devices in which each statement corresponds to a single machine
  language instruction. An assembly language is specific to a certain
  computer architecture, in contrast to most high-level programming
  languages, which may be more portable.

and so these files are not the same as C code files.
Note that C files can be inlined with assembly instructions.
Answer: .S files are code written in assembly language i.e low level of programming. In linux kernel source code, .S are generally the starting files which the kernel runs when the linux kernel starts booting (for eg.:- head.S) . We write this in .S and not in .C because we are not ready to run .C compiled .O file at this time. We need to work with architecture dependent registers and start the kernel.
Answer: .S files are assembly language files. They are a form of machine code. It is at a low level of programming.
All machine dependent code is written in assembly language.The assembly language is different for different processors.
Answer: For completeness sake: There is ANOTHER ".s" file, that is not assembly, but rather an "SREC" binary file (encoded in ASCII) used to program microcontrollers.
https://en.wikipedia.org/wiki/SREC_(file_format)
Upon opening such a file, you would see lines of text that looked like this:
S315000000500C9413110C94D510189518950C949710B0
S31500000060189518950C941010189518950C946A10FC
S31500000070189518950C9403131895189518951895B6
S315000000800C940B1218951895189518950C944912FE
S315000000900C943D101895189518951895189518955F

Comment: .s37 files are also SREC files ... encountered when working with Silicon Labs MCUs

What are .S files?


Reducing noisy data from non normal distribution of data with std deviation?

Question: I have used MATLAB code and get the two different row vectors A=1×18 and B=1×350. From both row vectors separately I need to remove the noisy data by using standard deviation. But the problem is that data in both row vectors are NOT normally distributed. Is there any way that I used standard deviation for reducing noise from non normally distributed data. Any guidance will be appreciated. Thanks
Answer: First, good practice to raise validity concerns here when removing outliers and/or filtering data. This may have strong affects of validity of results. An intro is here: When to remove outlier in preparing features for machine learning algorithm .
Second, is it possible to address the small dataset problem -- Can you collect more data? Redefine the population to produce more data? Use another data set that is similar in developing the model?
Lastly, this seems to be a filter problem, to get started on a solution, check MATLAB documentation for filters.
If the results are going to be used anywhere, probably a good idea to document all of your decisions and the first two concerns. Absent much more detail, experience says there is a pretty high risk to any conclusions based on this model.
Comment: @ davmor thanks for your guidance. First I will try what you have mentioned in your answer, then will discuss. thanks


How does a quasar convert mass to energy?

Question: I'm trying to understand where the energy for a quasar comes from and specifically if it comes from converting mass to energy.
I know that as matter falls into a black hole gravitational energy is converted to heat and other kinds of energy but that is not converting mass to energy.
I keep seeing statements like "The process of converting mass to energy from falling onto a black hole has an efficiency that
is over ten times as large as the efficiency of nuclear fusion."  That sounds like there is some other process by which mass is
converted to energy, some mechanism other than nuclear fusion.  But what is that process?
Comment: have you had a look at the wikipedia article on quasars?
Comment: Gravitational mass defect: https://en.m.wikipedia.org/wiki/Binding_energy
Answer: If something falls in the gravitational field of a black hole it gains kinetic energy. The total mass-energy of the system is unchanged.
If the falling object thermalises in an accretion disk, close to the black hole, and emits radiation that escapes, then the total mass-energy of the black hole plus falling object is diminished.
A way of characterising this is to calculate how much energy escapes as a fraction of the rest mass energy of the falling object. In a similar way, you can characterise the "efficiency" of nuclear fusion in terms of the escaping energy (as photons, neutrinos etc) as a fraction of the rest mass energy of the initial reactants.
Very roughly, a falling object might thermalise at the innermost stable circular orbit of the black hole at the center of a quasar, at 3 times the Schwarzschild radius, $r_s$. Its kinetic energy is split between emitted radiation and the kinetic energy of its orbit; so in a Newtonian approximation, the emitted radiation energy would be
$$E \sim \frac{GM_{\rm BH} m}{6r_s},$$
where $m$ is the object rest mass and $r_s = 2GM_{\rm BH}/c^2$.
Dividing by $mc^2$, the efficiency is therefore as high as
$\epsilon \sim \frac{1}{12}$
This compares with 0.7 per cent for nuclear fusion via the pp chain.
Answer: As I understand it the core of your objection is: conversion of gravitational potential energy to heat is not conversion of mass to energy.
I won't address that directly, but there is some background that I think is relevant:
In terms of general relativity there is the following property: when you have a bound system (such as two black holes orbiting each other) then all of the energy of that system contributes to the gravitational mass of that system. That includes the kinetic energy of the orbiting motion, and the binding energy.
Let's say that double black hole system has an orbital period of days, and that there are stars orbiting that double black hole with orbital periods in the order of years. The gravitational potential for those orbiting stars arises from the total energy of the double black hole. When the black holes eventually merge there is a very large emission of gravitational waves. The resulting single black hole does not have the same gravitational potential as the previous double black hole system because of the amount of energy that was radiated away. Assuming the orbiting stars survived that event: their orbits will be different from the moment the different potential reaches them, as it is a different potential.
The current simulations for the astrophysics of black hole mergers are sufficiently developed to allow assessment of how much difference in gravitational potential there will be before and after the event.
That is how astrophysicists arrive at statements such as: "In first black hole merger that was detected by LIGO the amount of gravitational energy emitted was the equivalent of three solar masses."
More generally:
Quasar physics is so extreme that the physics is fully in the realm of relativistic physics, and the mass-energy equation takes center stage.
I think that is the background of why astrophysicists feel it's justified to make a comparison between mass conversion in nuclear physics, and energy conversion in quasar physics.


Automatically acquire a checkout lock when checking out (tfs2012)?

Question: When using a server workspaces is there any way to automatically acquire a checkout lock. I know you can go through Tools-->Options and under "Check-in Items-->Edit" specify "Prompt for lock on checkout" but we want it to automatically happen and not have to throw a dialog in their face and make them choose a checkout lock. We are in the process of migrating to TFS from sourcesafe and we have a few users that don't need the flexibility of local workspaces and/or multiple checkouts. They are going to freak out if they ever get a merge conflict dialog. Any way to make tfs act just like sourcesafe?
Answer: Disable multiple checkouts
Team -> Team Project Settings-> Source Control -> Untick "Allow Multiple Checkouts"
Set Server Workspaces to be the default
Team -> Team Project Collection Settings-> Source Control -> WorkSpace Settings -> Server Workspaces
Comment: Are you using TFS2012 with local workspaces? they work completely different. You need to use server workspaces to enable the locking features.
Comment: I want to make exclusive locks too, but even after doing these two things you said, "check out lock" option doesn't appear (not to mention no exclusive check out happens) when right clicking and chosing "check out". Only "unchanged" and "check in". What else am I could be missing?
Comment: If using VS Online, you need to connect from Visual Studio, and in the Team Explorer window go to Settings.  There will be two "Source Control" options under settings, the one under Team Project Collection contains these settings.
Comment: I'm using TFS 2015 with VS 2012 and VS 2015 and this does not seem to be sufficient. I can still checkout files on both VS's. Before we where using TFS 2012 which was working.


On the properties of a family of submatrices

Question: Let $n$ and $k \le n/2$ be positive integers, and consider a family $\mathcal{F}$ of $k\times k$ sub-matrices of an $n\times n$ matrix such that every two elements of $\mathcal{F}$ intersect. What non-trivial (I know I'm already annoying people by this term) properties of $\mathcal{F}$ one could claim? (in particular related to its cardinality).
Comment: You state "On the _size_ of a family of submatrices" in the title and ask "properties of F" (as opposed to "properties of |F|") in the body of the question.  Which is correct?
Comment: This isn't really about matrices so much as it is about grids, right?  I.e., these 'matrices' don't have any values in them, you're effectively just talking about pairwise nondisjoint square subgrids of an $n\times n$ grid...
Comment: What would be a good upper bound on the size of such family?
Answer: As @Steven Stadnicki points out in his comment, acording to your question, the contents of the matrices are not important here, but the number $k$ and $n$. Therefore, you can look at $\mathcal{F}$ as a family of intersecting $k$-subsets of $\{1,\dots,n\}$.
You can derive properties from something called a Sunflower.
Definition: A sunflower with $m$ petals and a core $Y$ is a collection of sets $S_1,\dots,S_m$ such that $S_i\cap S_j=Y$ for all $i\neq j$. Moreover, the sets $S_i\setminus Y\neq \emptyset$.
Sunflower Lemma: Let $\mathcal{F}$ be a family of sets each of cardinality $k$. If $|\mathcal{F}|>k!(k-1)^k$ then $\mathcal{F}$ contains a sunflower with $k$ petals.
You can make relaxations to the sunflower, like the petals not being intersected by a set of size smaller than $c$. In this case we have the following lemma.
Lemma: Let $\mathcal{F}$ be a family of sets each of cardinality $k$. If $|\mathcal{F}| > (c-1)^k$ then $\mathcal{F}$ contains a flower with $k$ petals.
There are more properties that you can look for in the book:
Extremal Combinatorics with Applications to Computer Science by Stasys Jukna.
The definitions and lemmas above are from chapter 7. Take a look at the excercises, and maybe also chapter 8 on Intersecting Families.


Rational curved lying in the boundary of Deligne-Mumford compactification $\bar M_g$

Question: Let $\bar M_g$ be the Deligne-Mumford compactifiction of the moduli space of complex genus $g$ curves $M_g$. Is this correct that through every point of the boundary $\bar M_g\setminus M_g$ passes a rational curve that lies in the boundary $\bar M_g\setminus M_g$?
Answer: It seems unlikely.  Say $g \geq 24$ (or so).  There's a divisor $\Delta_g$ on the boundary $M_{2g+1}$ corresponding to curves with a single node consisting of two genus $g$ curves glued at a point.  This component is birational to $M_{g,1} \times M_{g,1}$, which is of general type by the assumption on $g$.  Thus through a general point of $\Delta_g$ there is no rational curve.  For that matter there is no rational curve on $\bar{M}_g$ through this point at all.
Comment: I see now my mistake (that led me to the question). I was assuming (without any reason) that Satake compactification of $M_g$ is a smooth space. And since Deligne-Mumford is birational to Stake compactification I was thinking that boundary divisors in $\bar M_g$ should be ruled since they have larger dimension than in Satke. This sounded strange to me. But now I see that Satake is singular and so not surprisingly its blow up does not need to contain additional rational curves. Thank you for the answer again.
Answer: The irreducible components of the normalization $\mathcal{B}^{\nu}$ of the boundary $\mathcal{B}\subset\overline{\mathcal{M}}_{g,n}$ are finite images of the moduli spaces:

$\overline{\mathcal{M}}_{g_{1},S_{1}\cup\{n_{1}+1\}}\times\overline{\mathcal{M}}_{g_{2},S_{2}\cup\{n_{2}+1\}}$, where $g_{1}+g_{2} = g$ and $S_{1},S_{2}$ is a partition of $\{1,...,n\}$,
$\overline{\mathcal{M}}_{g-1,n+2}$,

Therefore any component of the boundary can be interpred as a moduli space of curves and you question can be rewritten in this way: For which $(g,n)$ is $\overline{\mathcal{M}}_{g,n}$ uniruled?
It is well known that $\overline{\mathcal{M}}_{g,n}$ is of general type for $g\geq 24, n\geq 0$. Then it is not uniruled. In lower genus, at the best of my knowledge:

$\overline{\mathcal{M}}_{0,n}$ is rational for any $n\geq 3$.
$\overline{\mathcal{M}}_{1,n}$ is rational for any $1\leq n\leq 10$, P. Belorousski, Chow rings of moduli spaces of pointed elliptic curves, Ph.D. thesis, Chicago,
1998.
$\overline{\mathcal{M}}_{g,n}$ for $g = 2$ and $1\leq n\leq 12$, $g = 3$ and $1\leq n\leq 14$, $g = 4$ and $1\leq n\leq 15$, $g = 5$ and $1\leq n\leq 12$, http://arxiv.org/abs/math/0504249.
$\overline{\mathcal{M}}_{g,n}$ is rational for $g=6$ and $1\leq n\leq 18$, and it is unirational for $g=8$ and $1\leq n\leq 11$, $g=10$ and $1\leq n\leq 3$, $g=12$ and $n=1$, http://arxiv.org/abs/math/0701475.
In Section $7$ of A. Logan, The Kodaira dimension of moduli spaces of curves with marked points, Am. J. Math. 125 (2003), 105–138, the author determines for
$g = 2, . . . , 9, 11$ an integer $f(g)$ such that $\overline{\mathcal{M}}_{g,n}$ is unirational for $n \leq f(g)$.
$\overline{\mathcal{M}}_{g}$ is unirational for $g\leq 14$, $\overline{\mathcal{M}}_{15}$ is rationally connected, $\overline{\mathcal{M}}_{16}$ is uniruled, http://arxiv.org/abs/0805.2424.
$\overline{\mathcal{M}}_{22}$ is of general type. The Kodaira dimension of $\overline{\mathcal{M}}_{g}$ for $17\leq g\leq 21$ and $g = 23$ is not know, http://arxiv.org/abs/0805.2424.
$\overline{\mathcal{M}}_{g,n}$ is uniruled for $g = 12$ and $n \leq 5$, $g = 13$ and $n \leq 3$, $g = 15$ and $n \leq 2$, http://arxiv.org/abs/1206.1424.


Mining not working in Dwarf Fortress v0.43

Question: Whenever I try to mine, it doesn't work. I press D for designate, then D again for mine. Then I press Enter, and it makes the green cross. But once I press Enter in a different place, it just gets rid of the green cross and doesn't make a highlighted box. I've tried using <and >, but going onto a different level doesn't help either.
Comment: Could you provide a screenshot?
Answer: First of all, they key combination is dd, not DD. But you already know this, because the first part ("green cross") worked.
It seems that you have accidentally selected "automining" (a), and the area you are trying to mine doesn't contain useful minerals - if so, press a a few more times until it chooses "normal mining".


Determine irreducibility of polynomial over finite field

Question: My questions are the following:

How does the reducibility a polynomial $p(x)$ in $\mathbb{F}_{p}[x]$ relate to its reducibility in $\mathbb{F}_{p^{n}}$, for some $ n \in \mathbb{N}$? I was thinking that if $p(x)$ is reducible in $\mathbb{F}_{p}[x]$, then it is reducible in $\mathbb{F}_{p^{n}}[x]$. But irreducibility in $\mathbb{F}_{p}[x]$ does not imply irreducibility in $\mathbb{F}_{p^{n}}[x]$.

Also, I was wondering about the relationship of roots of a polynomial in $\mathbb{F}_{p^{n}}[x]$. In order to find a root of a polynomial in $\mathbb{F}_{p^{n}}$, does one have to construct the field of that order by finding irreducible polynomial of degree $n$ and consider the quotient field?

Specifically, how does one find the roots and determine the irreducibility of $p(x) = x^{4} + x^{3} + 1$ in $\mathbb{F}_{4}, \mathbb{F}_{8}, \mathbb{F}_{16}, \mathbb{F}_{64}$. I know that it is irreducible in $\mathbb{F}_{2}$ because the irreducible polynomials in that field do not divide it. But I don't know how to proceed on the higher order fields
Comment: Note that $p(x+1) = x^4+x^3+x^2+x+1$, whose roots are exactly the fifth roots of unity, excluding 1. $p(x)$ will have a root in your field if and only if $p(x+1)$ does. Now $\mathbb{F}_{p^k}$ has $\gcd (n, p^k-1)$ $n$-th roots of unity in it (consider a generator of the multiplicative group). From this we see that $\mathbb{F}_{16}$ has all the fifth roots of unity in it, so $p(x)$ splits completely here. I'm not quite sure what to do about the other fields.
Comment: To find the roots, you may use that in $\mathbb{F}_{p^n}$ we have $x^{p^n} = x$ (and any non zero element satisfies $x^{p^n-1} = 1$). So for example, in for $x \in \mathbb{F}_4$ we have $p(x) = x^4+x^3+1=x^3+x+1$, and if $x \ne 0$, then $p(x)=x$. So $p$ clearly has no root in $\mathbb{F}_4$.
Comment: Hints 1) You know that any of the zeros of $p(x)$ generates $\Bbb{F}_{16}$. Because $\Bbb{F}_{16}$ is a quadratic extension of $\Bbb{F}_4$, the minimal polynomials of those zeros must be quadratic over $\Bbb{F}_4$. But those minimal polynomials must  also be factors of $p(x)$, so.... 2) $\Bbb{F}_{64}$ contains $\Bbb{F}_4$, so... For odd degree extensions, see DonAntonio's answer.
Answer: Observe that $\;p(x)=x^4+x^3+1\;$ has no linear factor in $\;\Bbb F_2\;$ since none of the elements in this field is a root, and also the unique irreducible quadratic polynomial over $\;\Bbb F_2\;$ , namely $\;x^2+x+1\;$ , divides it. Thus, $\;\Bbb F_2[x]/\langle p(x)\rangle\cong\Bbb F_{2^4=16}\;$ is the splitting field of $\;p(x)\;$, and from here that $\;p(x)\;$ remains irreducible over $\;\Bbb F_{2^3=8}\;$, otherwise:
We would be able to write $\;p(x)=g(x)h(x)\in\Bbb F_8[x]\;$, with $\;g,h\;$ of degree exactly two (as none of the roots of $\;p\;$ in $\;\Bbb F_8\;$, otherwise it would split on this field...), and since all the roots of $\;p\;$ are in $\;\Bbb F_{16}\;$, this last field would would be a splitting field of $\;g,\,h\;$ over $\;\Bbb F_8\;$ , which is absurd since this last field is not even a subfield of $\;\Bbb F_{16}\;$ (because $\;3\,\nmid\,4\;$).
Try now to deduce the situation in $\;\Bbb F_{2^6=64}\;$, taking into account that $\;4\,\nmid\,6\;$...
Comment: What I am thinking is that since $p(x)$ factors linearly in $\mathbb{F}_{16}$, but $\mathbb{F}_{16}$ is not a subfield of $\mathbb{F}_{64}$ by the divisibility argument, so it has no roots in $\mathbb{F}_{64}$. But is it irreducible in $\mathbb{F}_{64}$? I think so because if $ p(x) = \prod_{i=1}^{4} (x-a_{i})$, then $ (x-a_{i})(x-a_{j}) \notin \mathbb{F}_{64}[x]$. Also, could a similar argument be applied for $p(x)$ is $\mathbb{F}_{32}$. That is, it is irreducible in $\mathbb{F}_{32}$ by a similar argument to $\mathbb{F}_{64}$?
Comment: Your explanation about $\Bbb{F}_8$ is on the money. But the hint about $4\nmid6$ feels strange. The gcd of the degree of the polynomial and of the degree of the field extension is more relevant. May be you had a different idea in mind, but I found that point a bit opaque.


Fix type erasure after matching a list

Question: Consider the following recursive function:
def example (param: List[Int]): Int = {
    case Nil => 0
    case x :: xs => example(xs)
}

This leads to the following error:
type mismatch;
[error]  found   : List[Any]
[error]  required: List[Int]

From the declaration of parameters it should be clear that the result of the decomposition will be an Int and a List[Int], but obviously the compiler does not think so. How can I make this work?
Comment: You're missing a `param match` after the `=`.
Answer: You have missed param match statement. Try this:
def example (param: List[Int]): Int = param match {
  case Nil => 0
  case x :: xs => example(xs)
}

Answer: As the accepted answer indicates, you're missing a param match after the =. Alternately, you can avoid the param match part by defining example as a function value :
val example: List[Int] => Int = {
  case Nil => 0
  case x :: xs => example(xs)
}

The block with case statements is treated as anonymous function by the compiler.

Fix type erasure after matching a list


are there piano pieces where the hands play in different keys?

Question: Do you know music for piano where the two hands don't have to play in the same key?
Comment: I've heard people play that way, but don't think it was written as such...
Comment: I was tempted to add a trivia tag, since I can recognize no practical impact of the question, but there seems to be none.
Comment: @guidot I think a question asking about the existence of polytonality is a little more than "trivia", considering it has sparked an entire movement of contemporary composing...
Comment: @TreFox: I would agree more, if the question contained at least a hint of a level beyond trivia. Note that it is a closed question, where a simple *yes* would be a valid answer.
Answer: Yes.
The term for such music is polytonality.
Keep in mind that polytonality may not necessarily apply to the entire composition. It would not be un-common for a composition to have only parts which are polytonal.
Many polytonal works will be from the early 20th century. You will see some of the composer names in the wiki article: Stravinsky, Bartok, Milhaud, Ives, etc.
Here is one the cited examples from Milhaud: Copacabana. Right hand is in B major and the left hand is G major.
Some things to keep in mind:

Each part separately is pretty clear and simple (diatonic within their respective tonalities.)
The listener should be able to hear each part is in a separate key. From examples I have seen, that separation is largely contingent on the clarity of the separate parts. You should need to strain to hear the two keys.
Some counterpoint/rhythmic contrast between parts will help with perceiving the separation.
A large tonal contrast help with separation. The difference between G (one sharp) and B (5 sharps) is 4 accidentals. That's a pretty large contrast of tones. It's hard for G to be confused with B. But, compare C and F major. The difference is only 1 flat. When combining those two keys the results could sound like extended harmonies of 9th or 11th chords, or perhaps a C tonic with a variable natural ^7 or b^7 scale degree. A similar point could be made about blues tonality. It isn't polytonal, it's a idiomatic blending of major and minor and 'blue' notes, but clearly there is only one tonic.

That's probably the essential point with polytonality: you really need to hear two (or more?) simultaneous tonics.
Comment: @coconochao - modal mixture is a little semantic as far as polytonality is concerned.
Comment: At sound checks, I like to play 'The Entertainer' r.h. in original C, l.h. in C#. It works - in a weird way. And if anyone comments, I ask if the piano's been tuned lately..!
Comment: There is polytonality (or maybe polymodality according to you reference) even in popular music. This song was a summer hit here in Brazil last year: https://www.youtube.com/watch?v=lYxcW8jtFw0. Melody is in Ab major, and harmony in Ab minor.
Comment: FWIW, I have sometimes played with taking a given piece of music - like a classical piece with simple alberti bass or a familiar song like Jingle Bells - and just transpose one of the hands to hear a "polytonal" rendition. Kinda silly, kinda fun.
Comment: Do you know the story about Charles Ives' father who was a band leader? He would have two marching bands play in different keys. Apparently an influence on the son's crazy music.
Comment: @michael: no, never heard about this. do you know which march it was?
Comment: I don't recall if a specific tune was mentioned. Scan this page for 'polytonality' http://www.ryangarber.com/ives.html, it has the type anecdotes I recall.
Answer: Bela Bartok Mikrokosmos Vol. IV
99)   cm / am
101)  am / Ebm
103)  B  / am
105)  em / c#m (both pentatonic)
There are some others: It's obvious that two hands play in different keys, even it is not signed as such.
But the title will say it clear.
Answer: Surprised that there's been no mention of the Blues, where often the left hand (accompaniment) is played in a major key, while the right hand is played, in a fashion, in the parallel minor, more or less, with the addition of a tritonal b5, putting it into maybe an unknown key.
Comment: I just made an edit to my post, re. blues. In the strict academic sense it's not polytonal. There aren't two tonics simultaneously.
Comment: @MichaelCurtis - OP's question asks - different keys.
Comment: up vote for mentioning the blues!
I always thought improvising in G above E or C above A was my invention ;)


Reinstall Safari

Question: How can I reinstall Safari if one got corrupted?
Answer: I tried that but it wouldn't install.
I had this problem in Mac OS X 10.6.8 Snow Leopard. I downloaded the latest version from Apple, but the installer said that I had a newer version already installed.  I had to use the application called Pacifist.  It installs applications when the installer won't.  It worked great.
Answer: That works for me on OSX Lion with all updates:

downoad latest Safari. Image with safari will mount automatically when download is complete otherwise you should click on it to get it mounted.
backup existing Safari (the one that you want to replace)
remove existing Safari using Terminal:
sudo rm -rf /Applications/Safari.app/
just install it as usual application
Comment: That's exactly what I just did with the only intention to help guy in this question:  http://apple.stackexchange.com/q/47217/14692?stw=1

Reinstall Safari


indent python file (with pydev) in eclipse

Question: I'm a newbie in eclipse. I want to indent all the lines of my code and formatting the open file by pressing a shortcut or something like that...
I know the CTRL+SHIFT+F (as it actually doesn't work in pydev!!)
I've been searching for hours with no success. Is there any way to do that in eclipse. kind of like CTRL+K,D in visual studio, which formats and indents all the source code lines automatically?
Answer: If you want to change from 2 space to 4 space indentation (for instance), use "Source->Convert space to tab" with 2 spaces, then "Soruce->Convert tab to space" with 4 spaces.
Answer: I ... don't think this question makes sense.  Indentation is syntax in Python.  It doesn't make sense to have your IDE auto-indent your code.  If it's not indented properly already, it doesn't work, and the IDE can't know where your indentation blocks begin and end.  Take, for example:
# Valid Code
for i in range(10):
  b = i

for j in range(b):
  c = j

# Also Valid Code.
for i in range(10):
  b = i

  for j in range(b):
    c = j

There's no possible way that the IDE can know which of those is the correct version, or what your intent is.  If you're going to write Python code, you're going to have to learn to manage the indentation.  There's no way to avoid it, and expecting the IDE to magically clean it up and still get the desired result out of it is pretty much impossible.
Further example:
# Valid Code.
outputData = []

for i in range(100):
  outputData.append(str(i))

print ''.join(outputData)

# Again, also valid code, wildly different behavior.
outputData = []

for i in range(100):
  outputData.append(str(i))

  print ''.join(outputData)

The first will produce a list of strings, then print the joined result to the console 1 time.  The second will still produce a list of strings, but prints the cumulative joined result for each iteration of the loop - 100 print statements.  The two are both 100% syntactically correct.  There's no problem with them.  Either of them could be what the developer wanted.  An IDE can't "know" which is correct.  It could, very easily incorrectly change the first version to the second version.  Because the Language uses Indentation as Syntax, there is no way to configure an IDE to perform this kind of formatting for you.
Comment: This is correct. Python relies on indents for meaning, unlike C++ or Java. This means that Python cannot be "auto-indented", while others can.
Comment: Actually, if make a function call several lines long, indentation can be more loose.
Comment: every ide should provide indentation or unidentation shortcuts and eclipse also have as said by @fivef below
Comment: Well not truly automatic indentation is possible, but selecting a code block and increasing the indentation of every line by 1 indentation or decreasing by 1 indentation should be.
Answer: Although auto-indentation is not a feature of PyDev because of the language design you should be able to indent with a simple tab. Just select the lines you want to indent and press Tab. If you want to unindent lines you have to press Shift+Tab.
Thats all.
Comment: I did not know about "Shift+Tab". It will help surely :)
Answer: It is much easier:

Select multiple lines
Press Tab to indent (move right), Shift + Tab to unindent (move left) all selected
lines.
Answer: Indentation is syntactically significant; consider the difference between
for i in range(5):
    print i
print "done"

and
for i in range(5):
    print i
    print "done"

However, it certainly makes sense for the IDE to be able to normalize the existing indentation (e.g. apply a consistent number of spaces/tabs at each level).
Currently PyDev does not support such a feature; Pydev author Fabioz at one point expressed interest in adding it in the future and indicated that for now you can use the supplied reindent.py script to do it.
Answer: Obviously this is only for Pydev, but I've worked out that you can get the very useful functions "Shift Right" and "Shift Left" (mapped by default to CTRL + ALT + .  and CTRL + ALT + ,) to become useful by changing their keybindings to "Pydev Editor Scope" from "Pydev View". This effectively indents/dedents all lines that you've selected as much as you'd like
Answer: I think that what you're looking for is some kind of shortcut in Eclipse/PyDev so that the selected code can be idented all at once. Just like when you create a new "if" or a "for" loop above a block of code and then need to rearrange the identation. The IDLE Editor has the "Ctrl + ]" shortcut that works exactly that way. It seems that the PyDev in Eclipse doesnt have something like that as far as I know.
Answer: One can also select the lines, right click, then shift right / shift left
Answer: It seems source formatting is still not available in PyDev.
For one off instances I found this web app does the job nicely.
http://pythoniter.appspot.com/
Answer: Like earlier said python requires to indent your code, so for other things like: space between variables passed as arguments to methods, etc., one can use ctrl+shift+f to format the code. This what is used for java, I tried for pydev and does some formatting.
Comment: First time user's opinion. If the interpreter reports / knows about "unexpected indentation"  that implies it should be able to indent the text correctly, doesn't ? Am I asking to much from interpreter developer ?


Books on philosophical questions underpinning Halachah

Question: In Deuteronomy, Moses says "For this command that I command you today is not a wonder to you and it is not distant..."   I want to explore the (possible) tension between this sentiment and laws whose logic may not be clear to us or where modern understanding changes the original rationale (e.g., using non-porous dishware going against practice of maintaining two sets).
I'm sure this has been explored and would just appreciate the best source that lays out the arguments.  Thx.
Comment: Sorry, what non-porous dishware has to do with philosophy?
Comment: Why should the rules of kashrut involve maintaining two sets of silverware--why can't I just use a non-porous utensil once with milk and then wash it carefully before using it with meat?  I gather there are a number of philosophical responses to this question, such as honoring your forbears, etc.  In my mind, they clash with the spirit of what Moses said--that  the logic of laws should be clear to us.
Comment: In addition to the answer below: Louis Jacobs' 'A Tree of Life'. For another side of the spectrum 'Likkute Halachos' from R. Nosson, student of R. Nachman of Breslov. Enjoy.
Answer: Theoretically it is possible to switch from dairy to meaty utensils every time and perform hagala in between. We don't do it for practical reasons, to avoid mistakes, based on a gemara in Chulin 8b (see here for details).
I don't know if you meant to ask specifically for this or more generally about the fundamental rationale of mitzvot, you might enjoy the following books

Sefer HaChinuch which explains all mitzvot and their rationale (Sefaria, artscroll translation, summarized book)
R David Silverstein's Jewish Law as a Journey which, in easy language, explains the philosophical underpinning behind many mitzvot
The mitzvot: The Commandments and Their Rationale
Comment: He's not talking about hagala. He's saying use non porous utensils so you don't even need hagala to switch back and forth since there's nothing absorbed. You can't make a mistake if it's always pareve.
Comment: Undoubtedly, they exist scientifically. To what extent they are commonly available and to what extent rabbis are willing to accept the relevant scientific proof is another question. Stainless steel absorbs less than you can imagine but rabbis for the most part still pretend it absorbs substantial amounts.
Comment: Do these things exist for cooking utensils? Glass?


Does Thunderwave 'blind' creatures that rely on tremorsense?

Question: Can you use the "Thunderwave" spell to temporarily blind creatures that rely on tremorsense? It would be akin to hitting a sighted creature with a blinding flash of light. Could you also overcome a creatures "Scent" ability with say a blast of perfume or essential peppermint oil or a skunk's spray?
Comment: Are you asking from the perspective of a player or as a DM looking to make a ruling?
Comment: @KorvinStarmast how would that affect answers?
Comment: @Mindwin Because if a DM, it becomes a matter of addressing how and why to make a ruling. Because if a player, you have to be advised to discuss with your DM if you want a ruling, or are hoping that the spell works in a particular way.  A player can't just say "we rule it this way" in 5e.  But the player can recommend a ruling ...
Comment: Why would tremorweave be like a bliding flash of light?  Tremorweave works through air, does not break/penetrate barriers. It is more a (non-deafening) sonic boom than a ground shockwave.
Answer: RAW, no.
Nothing in the spell description specifies that.
RAF (Rules as Fun)
I'd call that a creative use of resources, and allow it, at least to give the tremorsensor disadvantage on attacks for a round or two.  (And possibly summon all its brethren from miles around.)
Advantage and Disadvantage (Chapter 1; PHB)

Advantage reflects the positive circumstances surrounding a d20 roll,
  while disadvantage reflects the opposite.

Advantage and Disadvantage  (Chapter 7; PHB)

The DM can also decide that circumstances influence a roll in one
  direction or the other and grant advantage or impose disadvantage as a
  result.
Comment: summon all it's brethren... +1
Comment: Maybe save vs Constitution on casting and again at end of each of the affected creature's turns
Answer: No, it doesn't
There are multiple ways to deal with creatures with tremorsense, check the Tremors series. But none of those are relevant to Thunderwave, as the spell says:

A wave of thunderous force sweeps out from you. Each creature in a 15-foot cube originating from you must make a Constitution saving throw. On a failed save, a creature takes 2d8 thunder damage and is pushed 10 feet away from you. On a successful save, the creature takes half as much damage and isn't pushed.
In addition, unsecured objects that are completely within the area of effect are automatically pushed 10 feet away from you by the spell's effect, and the spell emits a thunderous boom audible out to 300 feet.

As we can see, there is nothing about blinding or deafening creatures, even though the spell creates a boom audible from 300 feet away. If the creature with tremorsense is within the spell radius, it will have to make a save to reduce the damage, but no additional effect happens.
If anything, this could mean that creatures with tremorsense could probably sense your character from further than normal (if they also have ears), due to the sound generated above the ground.
Keep in mind that the maximum distance travelled by a standard human (you and me) voice while still being intelligible is about 560 feet. That is much further than the distance of this boom. While the spell description does make it sound like its a very loud explosion sound, it is not that big of a deal, as the sound of a real thunder can be heard from miles away.
Answer: "Blinding" tremorsense should only work, if you make the creature or the ground tremble for a longer period, like Thaumaturgys tremor or an Earthquake, or somehow "disconnect" your standing ground from the creatures ground, even for a short period. And even then, it should be DM decision.
With the "Scent", that could be possible in real life application, but still it is not described in the rules afaik, so it should be DM decision.
Answer: Being not stated in the rules, it is up to the DM but remember that the duration of Thunderwave is instantaneous, so its effect ceases immediately after being cast.
As for the "Scent" ability, I would say that the DM could assign disadvantage to a Perception check based on smell.


How to save parsed data into sqlite database in iPhone

Question: I am new in iphone, i am developing an ipad application (like offline mode application) in which data are comes from server and i have parsed these data and store into nsmutable array, now i want to insert these data into sqlite database how to do please give me some sample code. Any one help me please.
Answer: Check out this link
It provides multiple tutorials on how to accomplish your goal.
PS: In the future, type your Stack OVerflow question into Google first and see if that solves your problem. If not, post it.
Answer: Try reading this  http://www.icodeblog.com/2011/11/04/simple-sqlite-database-interaction-using-fmdb/  tutorial its the easiest way to perform sqlite operations. you will just need to fire queries like SQL.


Ruby on Rails - Railscast #213 Calendar sort by datetime not date

Question: I am building an app that involves a calendar. I found that the railscast for building a calendar although dated proved to be very helpful. I have everything up and running I am just trying to allow for the contents on each date to be organized by the datetime and not just the date so they appear in the right chronological order.
My current controller looks like this:
<code>def index
  @lessons = Lesson.all
  @lesson_by_date = @lessons.group_by { |i| i.lesson_date.to_date }
  @date = params[:date] ? Date.parse(params[:date]) : Date.today
end
</code>
Any help would be greatly appreciated. Thanks
Comment: What's your question?
Answer: I'm going off the assumption your question is how do I organize my @lessons by datetime. There are a few different scenarios I'll mention. I'm a bit limited since I don't know from your post how you've organized your schema for the table, but I think the controller gives me a ballpark idea.
1)
You should replace:
<code>@lesson = Lesson.all
@lesson_by_date = @lessons.group_by { |i| i.lesson_date.to_date }
</code>
with something that's quicker:
<code>@lesson_by_date = Lesson.order('lesson_date')
</code>
2)
If you're wondering why your current code isn't working it's because your group_by block is trying to convert i.lesson_date to a date IE to_date. Instead you may want to try to_datetime.
3) I would review http://apidock.com/rails/ActiveRecord/QueryMethods/order


Speedcontrol for a 14.4V DC 20A motor

Question: So, for a small home-made engineering project I have cannibalized a 14.4 V DC 20 A motor from a Bosch battery powered screwdriver/powerdrill to spin a flywheel. I'm still using the trigger (drillswitch) from the powerdrill to control the speed of the motor but I want to switch this control for a variable resistor w/ potentiometer for preciser control. In other words, I am trying to make a speed control. How do I do this? What do I need? I will still be using the 15 V 1.5 Ah battery.
Comment: You can find PWM motor controllers on ebay and aliexpress, or any shop that does RC (radio control) toys like cars etc.
Answer: If it is truly a DC motor you simply apply power to and it runs, then you can PWM the DC.  I'd use a suitable N channel MOSFET as a low side switch controlled by whatever generates the PWM.  Put a Schottky diode in reverse across the motor to give the inductive kickback current a safe place to go.  Start with a PWM frequency in the 24-30 kHz range.
If it's a brushless DC motor, then you need something more complicated because the circuit has to do the commutation too.
The drill already has a suitable motor controller in it.  The first approach might be to see what the trigger control does and either actuate it directly or mimic its effect.

Speedcontrol for a 14.4V DC 20A motor


Backbonding in phosphorous pentoxide

Question: I read this today in a book that $\ce{P=O}$ in $\ce{P4O10}$ consists of a coordinate bond and pπ-dπ backbonding, but why does this happen?
Can't phosphorus share its lone pair with one of the lone pairs available in oxygen to form the double bond?
Comment: Get a better book.
Comment: There are two different phosphorus oxygen bonds in this molecule. Please clarify which one you are talking about. Please also cite the source for that claim.
Comment: Phosphorus can share its lone pair with oxygen to form a bond $\ce{P-O}$. The same thing happens  in a lot of compounds of phosphorus at oxidation number $+5$. This bond may be considered as double or as simple, according to the book you are reading.
Answer: Coordinate bonds are covalent bonds where both bond electrons stem from only one of the two bond partners. They are formed when a Lewis base donates two electrons into accepting orbitals of the Lewis acid. That's not what you're looking at in this case, where both $\ce{P}$ and $\ce{O}$ contribute one electron to the common $\sigma$ bond. The interesting part is about everything that is to be described beyond the bond order of $1$. For example, everything that contributes to PO bonding beyond that single $\sigma$ bond.
I will further regard to phosphane oxides $\ce{P(=O)R3}$, where the question was originally asking about $\ce{P=O}$ bonds in $\ce{P4O10}$. The problem might be reduced to PO bonding in phosphoric acid, as $\ce{P4O10}$ is nothing more than its anhydride. The general observations regarding the $\ce{PO}$ bonding situation are unaffected. Kutzelnigg noticed in $1977$ already:

[The PO] bond is somewhere between single and triple and [...] only by chance it may happen to be a double bond.

What we know about the '$\ce{P=O}$ bond':

Its length is remarkably shorter than the P-O bond ($\pu{1.43 Å}$ compared to $\pu{1.60 Å}$ for $\ce{P4O10}$ according to Wikipedia).

It is highly polar.

Its bond strength of about $\pu{540 kJ/mol}$ is higher than for a corresponding single bond.

A critical review regarding the bonding situation in phosphane oxides was given by Gilheany. If it comes to Lewis valence formula, one might find three reasonable structures:

None of those is suitable to represent all theoretical and experimental findings regarding the characteristics of the $\ce{PO}$ bond!
Some scientists prefer to use the zwitterionic representation A, where the predominant $\sigma$ character of the $\ce{PO}$ bond is highlighted, while its dipolar character is also taken into account. If one chooses to write a Lewis structure as shown in B, one implies (besides one  $\sigma$ bond) the contribution of a $\pi$ bond between oxygen p orbitals and phosphorus d orbitals. However, the $3$d orbitals of phosphorus are no suitable $\pi$ accepting orbitals for $2$p orbitals of oxygen, as they are quite high in energy. Besides compatible symmetry, atomic orbitals (AOs) of the atoms in question require to be somewhat similar in energy to allow for a combination to form molecular orbitals (MOs).
If one allows $\pi$ back bonding from oxygen into $\sigma ^*$($\ce{P-R}$) (anti-bonding orbitals between P and its substituents R), one might come up with Lewis valence formula C. However, it should be noted that the $\pi$ bond order for $\ce{Me3PO}$ is only $0.7$ - and not $2$, what is implied by structure C!

Backbonding in phosphorous pentoxide


Why does my water leave this pink film?

Question: I have noticed that my water will leave a slimy pink film on certain surfaces like a sink drain, bath toys, or dog water bowl. What would cause this and how can I fix it?
Answer: What you're most likely looking at is a bacteria called Serratia Marcescens.

According to Wikipedia it is commonly found growing in bathrooms (especially on tile grout, shower corners, toilet water line, and basin) as well as many other places.
From that source (and others), the best way to get rid of it is regular cleaning by soaking & scrubbing with bleach-based disinfectants.
Comment: X-14 spray cleaner, or Tile-X bathroom cleaner, both of which contain bleach, so don't get it on your clothes or rugs. Spay it on and leave it there, no scrubbing etc. for a few minutes.
Answer: I've also been doing research for a school project (relating to reddish and bluish stains on water fixtures) and some sources had said that the red stains are from copper. In other words i'm assuming copper has entered your water through the pipes and the only way to fix the issue would be to essentially replace the pipes in general. Bluish stains resort from iron as well.
Comment: Copper staining isn't usually a problem— rust staining is much more common in some places from cast-iron pipes— but the "pink stuff" in question is much more slimy and slippery to the touch than mineral deposits are, in my experience.
Answer: It is an airborne bacterium that grows in moist environments. This kind of bacteria is harmless and you can wipe it off easily. You can also disinfect areas affected by it by using vinegar and water. There is no way get rid of it totally since you can never get rid of bacteria in the air. You can prevent it to reappear often by keeping moist/damp areas in your home dry and clean. Ventilation is key. For things that are wet most of the time like bath toys, dog bowls, etc. Take the time to clean them every once in a while and dry it out completely.

Why does my water leave this pink film?


What was the first Giant Monster vs Giant Robot fight?

Question:
There's been plenty of Giant Monster vs Giant Robot fights, it's almost its own genre. What started the trend? What was the first Giant Monster vs Giant Robot fight?
Answer: Godzilla vs Megallon is a film from 1973 that features a human size robot called Jet Jaguar. This robot is able to grow to a gigantic size if needed.

Prior to this there's also a 1967 japanese movie that features King Kong and his robotic nemesis Mechanic Kong: King Kong escapes.

But the earliest depiction of a giant robot fighting a giant monster I can find in japanese productions is the 1956 comic (and 1964 anime) Tetsujin 28-go, known in the USA as Gigantor (by the way, probably the first giant robot of japanese pop culture). He fights a gigantic octopus in his episode "Gigantor Vs. The monster of the deep".
Comment: Is that Mario in the background?
Answer: Probably the earliest widely seen show with a giant robot fighting giant monsters was Ultraman.
From the link:

Ultraman (ウルトラマン Urutoraman?) is a Japanese Tokusatsu television
  series that first aired in 1966. Ultraman is a follow-up to the
  television series Ultra Q, though not technically a sequel or
  spin-off. The show was produced by the Tsuburaya Productions, and was
  broadcast on Tokyo Broadcasting System (TBS) from July 17, 1966 to
  April 9, 1967, with a total of 39 episodes (40, counting the
  pre-premiere special that aired on July 10, 1966).

Ultraman, shown on left:

Story background:

One day, Shin Hayata, the Patrol's most capable member, was patrolling
  near a lake when he witnessed a space monster named Bemular, who had
  come to Earth in an orb of blue energy, being chased by an orb of red
  energy. Hayata also gave chase to Bemular, but the orb of red energy
  collided with Hayata's ship, causing both to crash land and killing
  Hayata in the process. Ultraman, who was generating the red orb, felt
  guilty for killing the capable scientist/soldier, and to make up for
  the terrible thing he had done, chose to revive Hayata in exchange for
  him becoming his host, who would contain him while he was on Earth.
From that day forward, Ultraman staunchly defended Earth against
  aliens and monsters, with Hayata and the SSSP assisting him.

I remember watching these as a kid and loving them.
Comment: But Ultraman is not a robot; just looks like one. He's an alien superhero from the planet Ultra. The Ultramen are beings of light who are known for their great powers and strong sense of compassion and justice (and humongous size). http://ultra.wikia.com/wiki/Land_of_Light
Comment: Yup, what @Ginasius said. With the exception of a very recent manga, Ultraman have never been depicted as robotic.
Comment: But it's my proposition that the series Ultraman likely was the inspiration for the Giant Robot vs. Giant Monster theme.  But clearly that doesn't answer your specific question.  I'll do a little more digging.  I have a horse shed to shovel right now.
Comment: About Ultraman and his roboticity: https://pbs.twimg.com/media/DYYn_xiU0AEULB-.jpg


How to listen for location providers becoming enabled / disabled?

Question: Is it possible to get notified when a location provider becomes enabled or disabled, without it actually looking up the device's location (because doing so might use a lot of power)?
Answer: In android there is LocationListener interface which provides a abstract method onProviderEnabled(String provider). So you have create your own listener and implement the onProviderEnabled(String provider) method. It is very must your listener must be register with location manager.
If do same as described above then onProviderEnabled(String provider) will called automatically when location provider became enable.
Answer: Locationmanager.isProviderEnabled() doesn't seem to require actually looking up the location. It won't be too efficient as you'd need to poll it, but it's better than getting the actual location.
Actually, reading a bit more on the topic, it seems you'd be able to use requestLocationUpdates() to do this. It will send you a bundle with KEY_PROVIDER_ENABLED when the provider is enabled or disabled. You can set the minimum time and distance for notification to extremely high values. This way you'll get a location notification once in a while and mostly just enabled/disabled notifications.


Show the following limit, using the definition of epsilon-delta.

Question: Show the following limit, using the definition of epsilon-delta.
$$\lim_{x\rightarrow\sqrt{2}}\frac{\big[|x|\big]+x}{3+x-x^{2}}=1$$
I have problems with the floor function, I do not know if I should work in the numerator like: $ 1 + x $ directly or I'm doing it wrong.
Answer: As $x$ is confined to a sufficiently small neighborhood of $\sqrt{2}$, what can we say about the sign of $x$?  And what then would be $|x|$?  And what would be $\lfloor | x | \rfloor$?
If the above reasoning lacks sufficient rigor, compute a radius $\rho > 0$ around $\sqrt{2}$ for which, whenever $|x - \sqrt{2}| < \rho$, we would have $1 \le |x| < 2$, consequently $\lfloor |x| \rfloor = 1$.  Then when $\delta < \rho$, we can consider instead the behavior of the function $$\frac{1+x}{3+x-x^2}$$ in a neighborhood of $\sqrt{2}$ with radius $\delta$.
Answer: I will provide a hint:  ¿Can you find a $\delta$ such that given any (small) $\epsilon$, say $\epsilon=1$ (not particularly small...but just perfect here)
$$\left|\left\lfloor x\right\rfloor - 1\right| < 1 = \epsilon$$
for all $\left|x-\sqrt{2}\right| < \delta$.
Second hint:  $0 < 1$...and by definition $0 < \epsilon$.
Comment: I have a doubt, because I discard the denominator or can I find a dimension for that? ... and thanks


What's the interpretation of the probability of default implied from CDS spreads?

Question: What's the time horizon of the probability of default implied from a CDS spread? Given CDS = PD*(1-R), if I use a 5yr CDS spread in the formula, is the implied PD the probability that that name defaults within the next 5 years or 1 year given it represents the annual premium?
Comment: The statement $CDS\approx PD(1-R)$ is only a very *rough* estimate. An $N$-year CDS conveys market-implied / risk-neutral default probabilities for a default at any date up until the maturity date of the CDS. You can use a series of increasing maturities to back out risk-neutral conditional default probabilities, i.e. implied probabilities of default *during a year $N$*.
Answer: CDS quotes are observable. But none of: probabilities of default, hazard rates, loss given default/recovery, etc are observable.
To get some kind of (risk-neutral)  probabilities of default,  many people make a lot of assumptions, in particular, that the hazard rate is constant (or if you're lucky enough to have CDS quotes at more than one tenor, then piecewise constant between quotes). Then they solve numerically for the hazard rates that explain the obsevable quotes and assumptions. Interest rates play a minor role. Some people use more sophisticated assumptions, such as term structure of recovery, or fancier curve shapes.
Once you have the hazard rates, it's easy to read off both the probability that there will be a default within $n$ years and the marginal probability that, provides there has not been a default until $n$, there will be one between $n$ and $m$.
The formula you cite is a very rough approximation of the probability that there will be a default before the maturity if the CDS.
Comment: Just to clarify, if I have as data only the spread of a 5yr CDS, would it be a better approximation to calculate the probability of default within the next 5 years with which of these two methods? 1) Derive 1yr PD from CDS = PD*(1-R) and then multiply this by 5 (mentioned above) or 2) Derive 1yr PD from CDS = PD*(1-R) and then using compounding of survival probability based on P(A and B) = P(A)P(B|A) = 1- (1-PD)^5
Comment: I don't llike either calculation. :) How about you assume some _R_,  and walk through the [SDA CDS Standard Model](https://www.cdsmodel.com/cdsmodel/)?


Flying United from Kansas City to Dublin

Question: Flying United from Kansas City to Dublin and have 41 minutes in Newark to make connection.Is 41 minutes enough time
Comment: First question, as always, is it one ticket or did you buy each leg seperately?
Answer:
Is 41 minutes enough time

Assuming one ticket, the answer is maybe. (Two tickets = NO WAY)
United thinks it's doable: They sold you the ticket and are responsible for getting you to Dublin, even if you don't make the connection.
41 minutes is doable, but it's on the low side. The Gate closes typically 15 minutes before departure so you have 26 minutes to get off the plane, into the terminal, and to the new gate. Both of your flights are likely to be out of Terminal C, which is large. Walking distance can exceed half a mile (900m) so you should plan for this, especially if you have some mobility constraint or carrying a lot of stuff. If your Kansas flight arrives in Terminal A, you would have to take the shuttle, and you probaby won't make it.

Is 41 minutes enough time

No connection is every guaranteed so it comes down to a risk assessment. What's the likelihood of making the connection and what's the consequences of missing it. I would put the likelihood at of missing it at about 10%-20%, with the main risk being a delay on the incoming flight. Even a smallish delay will jeopardize the connection. If you miss it, most likely United will put you up in a hotel for the night, you will fly the next day and arrive 24 hours later. If you have high status or a Polaris ticket, they may reroute you to get their earlier.
If you ok with that scenario, go for it. If there are significant problems with getting late to your destination, I would look for alternatives.
Answer: If you are on one ticket, it should be now problem - the flights to Europe nearly always get out an hour late anyway, because they wait for connecting passengers.
If they don't, the airline would be responsible for your missed connection, which is expensive for them, so they avoid it.
If you booked two separate tickets, your chances are very bad, mainly because you would need to pick up your luggage and recheck it - no way to do that in 41 minutes.
Comment: Your mileage may vary. United has been absolutely brutal with NOT waiting for anyone.  They closed a gate of the last red eye for six delay passengers while they were already in the terminal and within sight of the gate. (6 hotel rooms for the night). I once had my incoming delayed but was fast and got the gate with 2 minutes to spare. My boarding pass beeped red. Gate agent: "Oh, Mr. Hilmar, we didn't think you would make it, so we already gave away your seat".
Comment: @phoog. Sure, but it's still a major inconvenience to spend the night in LA instead at home in Boston, just because you just can't run fast enough by 2 minutes.. I've seen United close the gate in front of woman going from LAX to Melbourne, Australia. The plane is still there, the jet bridge  is still docked, the cabin door is still open and the woman is sobbing. No mercy. Yes, you will get there eventually (or cancel) but it's painful and it doesn't even make sense financially for the airline.
Comment: @Hilmar it's important to note though that if the passenger doesn't make the connection, the airline will put the passenger on another plane if both legs were booked on the same ticket.
Comment: @Hilmar that's absolutely true.  Some novice travelers here, however, seem to be under the mistaken impression that missing a connection means not making it to the destination, so it's worthwhile to keep the actual consequences in mind.


What are the main conditions to have a housing loan in the USA?

Question: Apart from having 1 year of work in the same company and a good credit score... Once that's okay... For example I earn $5000 a month, can I borrow $4500 a month if I want ? Or is there a limit based on a percentage of my net incomes a month ? And is there a limit on the duration of the real estate loan ?
Comment: I'm voting to close this question because it belongs on https://money.stackexchange.com/
Comment: This is probably more appropriate for the personal finance site.  But, yes, for a conventional mortgage, there will be front- and back-end ratios that limit the amount of the mortgage and the amount of your total debt payments to a fraction of your income.
Comment: To clarify, this question is asking about "mortgage underwriting" (i.e.  the customary economic conditions to allowing someone to take out a mortgage loan). Questions about the usual terms and conditions of the mortgage itself once entered into might be pertinent in this forum.
Comment: These questions are influenced, in part, by legal banking regulations and informed by the history of government intervention in the mortgage banking industry, but neither of those issues are really responsive to this question.
Answer: This is more of a bank policy question, but typically they won't loan you more than can be covered by around 30% of your income.
In your example, depending on current interest rates and the number of periods in the loan, (i.e. 15 or 30 years) your cap might be a monthly payment of $1500 per month.
Answer: There are limits imposed by federal banking regulations on loans made by FDIC-insured banks, and on loans made that can be processed by FHA or other government programs. These limits were tightened after the wave of mortgage defaults in the 2000s.
But many, probably most, lenders have their own standards, often moire restrictive than federal regulations would require. These will vary from one lender to another, but will often be based on a percentage of the borrower's income, perhaps nor permitting a loan for which the payment would be more than say 25% or 30% of the borrower's income. length of the loan, value of the property, and the loan-to-value ratio will all influence this to some degree, as will the borrower's credit standing and history.
Comment: One of the main changes arising from the Financial Crisis of ca. 2007-2008 was to prohibit commercial banks from making "hard money loans" which are based solely upon loan-to-value in the property, rather than upon evidence of a borrower's credible ability to repay the loan from income.


Definition of multiplication intuition (Set theory)

Question: We define how to multiply two integers using set theory as follows
[(a,b)][(c,d)] = [(ac + bd,ad + bc)] what is the intuition behind defining multiplication like this?
Comment: What part of set theory are you talking about? The usual definition of integer multiplication as part of Peano arithmetic is nothing like this.
Answer: The pair $(a, b)$ (where $a$ and $b$ are both positive integers is supposed to represent the integer $a - b$. (The pair $(a+1, b+1)$ is an equally good representative, as are many other pairs). We know, from our experience with numbers in everyday life, that
$$
(a-c)(b-d) = ab + cd -ad - bc = (ab+cd) - (ad + bc)
$$
This tells us that $(ab+cd, ad+bc)$ would be a good representation for the product...provided that both entries of the ordered pair are positive integers. Fortunately, they are in fact both positive, so we're good.
(Your book may specify "nonnegative" rather than "positive" ... both can be made to work).
You might want to ask yourself "What's wrong with choosing $(ab-ad, cd - cb)$ as the representation?" as a way to verify that you understand what's going on here.
Comment: Well...not really. The problem with that second formulation is that if $d > b$, then $ab - ad$ isn't defined (because we're working only with POSITIVE integers, and the result of this subtraction would have to be negative).
Comment: the reason if we specify that (ab - ad,cd - cb) is that (we would have (a + c)(b + d) = ac + ad + cb + cd so we have that (ab + cd) + (ad + bc) this would work only for positive numbers not for negatives aswell right?


Talmud Yerushalmi M'nukad

Question: I'm currently looking to buy a Talmud Yerushalmi M'nukad individual/set (not Artscroll/Schottenstein). Are there any out there?
Comment: Probably not what you're looking for, but according to the Hebrew Wikipedia, [the Steinsaltz Talmud](https://he.wikipedia.org/wiki/%D7%AA%D7%9C%D7%9E%D7%95%D7%93_%D7%A9%D7%98%D7%99%D7%99%D7%A0%D7%96%D7%9C%D7%A5) has _Pe'ah_ and _Sheqalim_ of the Yerushalmi, which should be _Menuqad_.
Comment: similar to this http://www.oz-vehadar.com/en/new-products/292
Answer: Heinrich Guggenheimer's translation of and commentary on the Yerushalmi includes a menuqad text (although not in tsurat hadaf). It can be found here (and is now on Sefaria, if you want to check it out before buying).
Comment: You can also download a PDF here https://www.degruyter.com/serial/jertal-b/html#volumes The print edition also includes a critical apparatus on some volumes, introductions, etc.

Talmud Yerushalmi M'nukad


Chattering weird noise!

Question: My 1year old cat has started to chatter makes a weird movement with his mouth, mainly when hes doing nothing!  Not like hes seen something to catch, the total opposite!
Could this be anything to worry about?
Comment: Welcome to stackexchange. This sounds like the chattering at bugs that cats seem to be genetically programmed to do. You can probably find a video of it quite easily by searching for "cat chattering at fly" or somesuch. And just because you can't see something edible, doesn't mean the cat can't.
Comment: According to the linked question, it is mild frustration :)
Comment: i want you to know different cats chatter for different reasons,and they can often start or stop to chatter at what we might see as random times.it is simply not possible to make an answer that fully explains a cat`s vocal comunication.
Answer: I've always heard of this as "charming." My cats do it all of the time if they see a bird. They hunch down and make a soft kind of broken meow. I don't know if it's an old wives tale, but my Grandmother told me that the cat is trying to mimic the bird noises to lull it into a false sense of security.
Comment: Yea, they also make a clicking noise by chomping on their teeth hard. I've seen them do it at prey and other cats/dogs; even sort of barking like a dog. Lots of licking and weird sorts of singing and stuff. Recently there have been some youtube videos remixing the meowing with beats and stuff. Cats make some pretty interesting sounds.

Chattering weird noise!


Insufficient Privileges error when creating community user

Question: I am getting an "Insufficient Privileges" error when I try to create a user with profile "Customer Community User",after going to "Enable Customer User" from "Manage External User" on the contact page.
Comment: Have you checked that you(your user record)  have any role on user record?
Comment: Any solution to this?
Answer: I had this on a trial org's sandboxes. I was able to create community users against "Customer Community Plus" license type profiles, using "Enable Customer User" on the Contact, but I would get this "Insufficient Privileges" error when I tried the same against "Customer Community" license type profiles.
I contacted Salesforce who enabled both "High Volume Customer Portal" and "Lite Portal" licenses on the trial org (which I then matched down to the sandbox).
This resolved the problem for me but your mileage may vary.
BTW, to directly use the standard "Customer Community User" profile with a Digital Experience (community) you must now go to Setup > Digital Experiences > Settings and enable the Allow using standard external profiles for self-registration and user creation preference as covered here.


First layer of print comes out poorly even when placed on a raft (which prints fine)

Question: I'm printing PLA with the Creality Ender 2 and my print comes out totally fine with the exception of the first layer.
Here's the weird part though, if I place a raft or a brim below/around the print - the raft or brim will print perfectly cleanly. Even on a raft though, the very first layer of the actual print comes out ugly, as seen in the photo below, but the raft itself will be perfectly printed.
Following that first ugly layer of the actual print, the rest of the print will be 100% clean. This happens consistently every time I print any object.
The perfectly printed raft can be seen on the right and the ugly first layer that printed on top of that raft can be seen on the left. Be sure to click the image to see the details of what I mean.
Comment: Please add which material you are printing. E.g. PLA does not require a raft.
Comment: Edited - I am using PLA but read my comment below on why I added raft. Cheers
Answer: Turns out it had to do with the nature of the small holes that I was printing. I had to slow the speed of the initial layer down from 25mm/s to 15mm/s and also set Cura to 'optimize wall printing order' so that it didn't jump back and forth between holes constantly.
I also sped up the travel speed to 50mm/s on the initial layer to minimize oozing (although I'm not sure this actually did anything). Print came out beautifully.
Didn't even need the raft.
Comment: The first layer of your product is always more rough when printing on a raft than on the plate or glass. It is the nature of the raft.
Comment: @0scar it wasn't just the raft though, I initially tried printing on the bed and had the same issue so I added the raft because I thought the issue was caused by poor bed adherence
Comment: SInce you had success at two different speeds, it would appear speed is irrelevant.  You might want to edit your answer accordingly.
Comment: @Carl I didn't have success at 25mm/s - I was saying I had to lower the speed to 15mm/s from the initial 25mm/s in order to print successfully
Answer: Sounds like you need to get the printing nozzle closer to the bed. In the case of the raft you can adjust the 'air gap' which is how much it raises off the top of the raft before starting the print.


one high-end server with one Application Server or multiple Application Servers?

Question: If I have a high-end server, for example with 1T memory and 8x4core CPU...
will it bring more performance if I run multiple App Server (on different JVM) rather than just one App Server?
On App Server I will run some services (EAR whith message driven beans) which exchange message with each other.
btw, has java 64bit now no memory limitation any more?
http://java.sun.com/products/hotspot/whitepaper.html#64
Comment: do you mean multiple JVM on a single machine?
Comment: Yes, for some setup reasons (limited physical space to install machines), I would like to try run multiple JVMs on a single *super* machine.
Answer:
will it bring more performance if I run multiple App Server (on different JVM) rather than just one App Server?

There are several things to take into account:

A single app server means a single point of failure. For many applications, this is not an option and using horizontal and vertical scaling is a common configuration (i.e. multiple VMs per machine and multiple machines). And adding more machines is obviously easier/cheaper if they are small.
A large heap takes longer to fill so the application runs longer before a garbage collection occurs. However, a larger heap also takes longer to compact and causes garbage collection to take longer. Sizing the VM usually means finding a good compromise between frequency and duration (in other words, you don't always want to give as much RAM as possible to one VM)

So, to my experience, running multiple machines hosting multiple JVM is the usual choice (and is usually cheaper than a huge beast and gives you more flexibility).
Answer: There is automatically a performance hit when you need to do out-of-process communications, so the question is if the application server does not scale well enough so this can pay off.
As a basic rule of thumb the JVM design allows the usage of any number of CPU's and any amount of RAM the operating system provides.  The actual limits are JVM implementation specific, and you need to read the specifications very carefully before choosing to see if there is any limits relevant to you.
Given you have a JVM which can utilize the hardware, you then need an app server which can scale appropriately.  A common bottleneck these days is the amount of web requests that can be processed per second - a modern server should be able to process 10000 requests per second (see http://www.kegel.com/c10k.html) but not all do.
So, first of all identify your most pressing needs (connections per second? memory usage?  network bandwidth?) and use that to identify the best platform + jvm + app server combination.  If you have concrete needs, vendors will usually be happy to assist you to make a sale.
Answer: Most likely you will gain by running multiple JVMs with smaller heaps instead of a single large JVM. There is a couple of reasons for this:

Smaller heaps mean shorter garbage collections
More JVMs means lesser competition for internal resources inside JVM such as thread pools and other synchronized access.

How many JVMs you should fit into that box depends on what the application does. The best way to determine this is to set up a load test that simulates production load and observe how the number of requests the system can handle grows with the number of added JVMs. At some point you will see that adding more JVMs does not improve throughput. That's where you should stop.
Yet, there is another consideration. It is better to have multiple physical machines rather than a single big fat box. This is reliability. Should this box go offline for some reason, it will take with it all the app servers that are running inside it. The infrastructure running many separate smaller physical machines is going to be less affected by the failure of a single machine as compared to a single box.
Comment: This is experience plus general smarts. Also, when I was working for BEA we used to recommend the same configuration for WebLogic. I am sure you can look it up online if you'd like.
Comment: @Slava - is this conjecture, or can you point to some studies (with real performance figures) that back this up?


Why has data.table defined := rather than overloading <-?

Question: data.table has introduced the := operator. Why not overload <-?
Comment: @Michael "Overloading" roughly speaking meant replacing `<-` with another version of `<-` that works differently. Making `<-` work differently, somehow. Instead, we used a new operator, `:=`, for clarity amongst other reasons. Almost everything in R is a function, even `<-` and `[` etc.
Comment: I guess! We couldn't choose any operator, it was just that (fortunately) R allows := to be defined. Otherwise we could have fun and define +=, -=, ~= etc :)
Comment: Could someone please explain what "overloading <-" means?
Comment: Let me guess: In homage to Pascal!!!
Comment: @Michael But probably 'overloading' was technically incorrect, as Owen pointed out in comments. I meant it in a loose sense.
Answer: There are two places that <- could be 'overloaded' :
x[i, j] <- value           # 1
x[i, {colname <- value}]   # 2

The first one copies the whole of x to *tmp*, changes that working copy, and assigns back to x. That's an R thing (src/main/eval.c and subassign.c) discussed recently on r-devel here. It sounded like it might be possible to change R to allow packages, or R itself, to avoid that copy to *tmp*, but isn't currently possible, IIUC.
The second one is what Owen's answer refers to, I think. If you accept that it's ok to do assignment by reference within j like that, then which operator?  As per the comment to Owen's answer, <- and <<- are already used by users in j, so we hit upon :=.
Even if [<- didn't copy the whole of x, we still like := in j so we can do things like this :
DT[,{newcol1:=sum(a)
     newcol2:=a/newcol1}, by=group]

Where the new columns are added by reference to the table, and the RHS of each := is evaluated within each group. (When := within group is implemented.)

Update Oct 2012
As of 1.8.2 (on CRAN in Jul 2012), := by group was implemented for adding or updating single columns; i.e., single LHS of :=. And now in v1.8.3 (on R-Forge at the time of writing), multiple columns can be added by group; e.g.,
DT[, c("newcol1","newcol2") := .(sum(a),sum(b)), by=group]

or, perhaps more elegantly :
DT[,`:=`(newcol1=sum(a),
         newcol2=sum(b)), by=group]

But the iterative multiple RHS, envisaged for a while, where the 2nd expression could use the result from the first, isn't implemented yet (FR#1492). So this will still give an error "newcol1 not found" and need to be done in two steps :
DT[,`:=`(newcol1=sum(a),
         newcol2=a/newcol1), by=group]

Comment: Just a minor thing, `x[i, j] <- value` isn't actually overloading `<-`, rather `<-` does what it always does by delegating to `[<-` (based on the expression, not the value type).
Comment: @Owen Ah yes, good point. Have edited and added quotes around 'overloaded'.
Answer: I don't think there is any technical reason this should be necessary, for the following reason: := is only used inside [...] so it is always quoted. [...] goes through the expression tree to see if := is in it.
That means it's not really acting as an operator and it's not really overloaded; so they could have picked pretty much any operator they wanted. I guess maybe it looked better? Or less confusing because it's clearly not <-?
(Note that if := were used outside of [...] it could not be <-, because you can't actually overload <-. <- Doesn't evaluate its lefthand argument so it doesn't know what the type is).
Comment: Yes, that's pretty much it. We tried <- first actually but that didn't fly because user code already used <- in j e.g. incrementing a group counter. Then we tried <<- but people already use that in j too, to assign to .GlobalEnv. So then we hit upon :=.


Microsoft Service Configuration Editor - Could Not Load File Or Assembly

Question: I'm getting stumped by a very basic error.  I'm trying to add endpoints to a service through the WCF Service Configuration Editor, and it can't find the default output.  Here's every step I can take to reproduce the error.
Add New WCF Service Application

Build Solution

Edit WCF Configuration

Create New Service

Browse to Project Directory for Service Type

Error Message

This should work, but instead I get the following error message:

Could not load file or assembly
  'file://...\emptyservice\bin\EmptyService.dll'
  or one of its dependencies.
  Operation is not supported.
  (Exception from HRESULT: 0x80131515)

What am I doing wrong?
Answer: Make sure you open the 'EmptyService.dll' library in your 'bin\Debug' folder.
I had the '... Operation is not supported. (Exception from HRESULT: 0x80131515)' message when trying to open the library in the 'publish' folder.  I published my service from within Visual Studio using the 'Publish Web Site' option.