How to put this particular constraint on this link table in MySQL?
How to represent it with UNIQUE indexes and foreign keys?
How can I iterate, loop, process, or otherwise do something, with each element from a comma separated list of things?  This question       , and the are already lots of very good answers everywhere. However I think it would also be valuable to have a single reference point where all such alternative techniques are explained in detail, with their advantages and disadvantages discussed.  All of plain-TeX, LaTeX, LaTeX3, LuaTeX, Context, etoolbox, pgffor, etc. answers are invited. Please consider explaining, for example:   How does the command/method deal with whitespace around items? How does the command/method deal with empty/missing items? (e.g. a,b,,c) How does the command/method deal with a trailing comma? Can the command/method work of a list stored on a macro? Is each iteration evaluated globally or on a local group? (i.e., if a command is defined during an iteration, does the command survive the loop?) Do items get expanded or somehow mangled before being processed? What about lists where items are key=value or some other kind of pairs? Does the method work for lists separated with something other than a comma? Any other thing I should know before deciding to use this method? How to calculate number of days between two given dates? If I have two dates (ex. '8/18/2008' and '9/26/2008'), what is the best way to get the number of days between these two dates? Cannot Delete Item "Could Not Find This Item" issue A friend sent a long a file (a .rar) he wanted me to check out for him before he installed it.  I downloaded it and unrared it with no problems, but it was full of .exe's instead of the intended contents (fonts) so I advised him to delete it immediately and not use.  I then proceeded to do the same, but the folder simply will not delete. Oddly the files went fine, and I never ran anything, but this is what I'm seeing:   Could not find this item  This is no longer located in C:\Users\This_User\Desktop. verify the item's location and try again.   I've tried the following things with no help:   Using "Unlocker" to Unlock and delete Using move on reboot and rebooting Using PendMoves (from sysinternals) and rebooting Elevating a cmd line, doing a dir /x to get the short name of the folder, and then del 'shortna~1' Moving the folder to a new folder and then trying to delete the parent folder   I'm on Windows 7 RTM, very fresh install. Any thoughts?  Update: Just to confirm, I've run Hijack this and half a dozen other malware detectors, and everything came back clean (no extra processes, no other obvious badness). Rebooting in safe mode didn't help either. Pacf lag axe , is not an integer I'm trying to use ARIMA process to predict the behaviour of a time series, the probleme I face is that I can't get the order of each component of ARIMA, the lag is between 0 and 1, same goes for the acf. The time series has no tendency, and I guess no seasonality.     My question is : Does this mean that ARIMA orders are all 0s, and if so, is the HoltWinters a good (or the best) solution for modelling this kind of TS ? How to center column values in a table? How can I center the column values in this code?  \documentclass[conference]{IEEEtran} \begin{document} \begin{table}   \centering   \begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|}     \hline     Reconstruction strategy &amp; aa          &amp; bb( \%) \\ \hline     Classic                 &amp; 3342 voxels &amp; 68 \%   \\ \hline     VC                      &amp; 4296 voxels &amp; 87 \%   \\ \hline     V m=7                   &amp; 4745 voxels &amp; 96 \%   \\ \hline   \end{tabular}   \newline\newline    \caption{title}\label{tab1} \end{table} \end{document} In a Feistel cipher structure, what exactly does the "round function $F$" do? In a Feistel cipher structure, what exactly does the "round function $F$" do to the right half of the data, before taking XOR of the output with the left half of the data? Sounds of the letter a How can I know, precisely, when to differentiate the sounds of the letter a, like in: apple and vault? Show that, in any finite graph with at least two vertices, there must be two vertices with the same degree.  HINTS ONLY! I want to monitor the output of a command and whenever it contains a certain string I want to run another command.  Example: when command1 outputs 1234 I want to run command2 Anti-Cheat for MMOs issues and solutions? Most online games suffer for this problem and there are some  out there to cover this but recently from what I've seen most companies are trying to avoid those programs creating their own system (blizzard with warden, aion with their own checking, etc...) but it is a very difficult case to prevent such ...  Just wanted to say i made another question topic as community wiki specific for posting applications and it is features and the ideas behind this question here is not to list those but instead to know more about what were your attempts, issues along the road and possible solutions, piece of codes if application and so forth.  What sort of protection do you guys use in order to (try to) prevent such acts:   Anti-cheat Software ? (please state which, why and possible problems you faced, for example aion stopped using GameGuard at beta stage due to a huge amount of compatibility problems and complains from their users) Your own code ? (what sort of verification do you usually run to make sure of the bad-faith players, for example speedhack, verify new location against speed+last location, etc...) None, i dont care ? (any personal reason or input you did like to share ?)   Any interesting piece of code related to the issue you would like to post ?  Feel free to rework my text my english inst that great  ?** How do I add myself into the sudoers group? Possible Duplicate:          I've added myself back into the admin's group I think, by following   But I still can't do commands like:  sudo aptitude update   I get the message  oshirowanen is not in the sudoers file.  This incident will be reported.   How do I add myself into the sudoers group now that I am in the admin group? Most efficient way to see if an ArrayList contains an object in Java I have an ArrayList of objects in Java.  The objects have four fields, two of which I'd use to consider the object equal to another.  I'm looking for the most efficient way, given those two fields, to see if the array contains that object.  The wrench is that these classes are generated based on XSD objects, so I can't modify the classes themselves to overwrite the .equals.    Is there any better way than just looping through and manually comparing the two fields for each object and then breaking when found?  That just seems so messy, looking for a better way.  Edit: the ArrayList comes from a SOAP response that is unmarshalled into objects. "Literally" and "Decimate" misuse Recently I've heard American TV commentators say "[a person] was literally decimated" and "[a Senator] was literally thrown under the bus". In the first case I think the person was not actually 10% killed, but in the second, I believe they meant that 57 members of the US Senate carried #58 onto Constitution Avenue and threw him under a (hopefully moving) bus.  Are usages like these normal or acceptable now? I find them grating, myself. Group of even order contains an element of order 2 I am working on the following problem from group theory:     If $G$ is a group of order $2n$, show that the number of elements of $G$ of order $2$ is odd.   That is, for some integer $k$, there are $2k+1$ elements $a$ such that $a \in G,\;\; a*a = e$, where $e$ is the identity element of $G$. I have a shell script with this code:  var=`hg st -R "$path"` if [ -n "$var" ]; then     echo $var fi   But the conditional code always executes, because hg st always prints at least one newline character.   Is there a simple way to strip whitespace from $var (like trim() in )?   or   Is there a standard way of dealing with this issue?   I could use  or , but I'd like to think there is a more elegant solution to this problem. "As a beginner, I am happy that I learned a new thing."  You will recognize this as your DoReMi-s.( at 4:52)  What is the meaning of the "AS" there and when do we use that?  In depth answers would be appreciated.  Similarly:     Do I have your word as a lawman not to shoot me down like a dog in the street?    Can you explain this sentence?   Can I understand it as a lawman wouldn't shoot down people on the street or wouldn't have his word or what? I have question about ArcGIS and python script. There are following sample code, So I would like to change Another Field , not OIDFieldName. Please let me know how to change Another Field.  import arcpy import itertools  arcpy.env.workspace = r"C:\path\to\workspace"  base_shapefile = "some_shapefile.shp"  oid_field = arcpy.Describe(base_shapefile).OIDFieldName feature_count = int(arcpy.GetCount_management(base_shapefile).getOutput(0))  for (i, j) in itertools.combinations(range(feature_count), 2):     arcpy.Select_analysis(base_shapefile , "combination_%i_%i.shp" % (i, j), '"%s" in (%i, %i)' % (oid_field, i, j))   These sample code is combination for 5C2. I want to create all combiantions 5C3 , 5C4 , 5C5. $\Bbb RP^2$ as the union of a Möbius band and a disc I spent some time trying to understand that the projective plane, $\Bbb RP^2$, can be viewed as the union of a Möbius band and a disc. I consider this using Homogeneous coordinates. But I still hope to really 'see' this fact in some way. How to force file download with PHP I have a quite wide monitor and it's quite annoying to see the login dialog in the login screen on the far left side of my screen. I literally have to turn my head around to look at it!  Is there a way to center the login dialog?