I have a secret message which I want to encrypt such that any of several different keys can open it independently.  The keys can't know about each other and it has to be able to work completely locally without a network. In short I want two functions   encrypt(message, key1, key2, key3, ...) -&gt; code decrypt(code, keyX) -&gt; message                   for keyX in (key1, key2, key3...) decrypt(code, keyY) -&gt; random                    for keyY not (key1, key2, key3...)   Ideally these functions would also have the property that  encrypt(message, key1) -&gt; code1   decrypt(code1, key1) -&gt; message encrypt(code1, key2) -&gt; code2     decrypt(code2, key1) -&gt; message, decrypt(code2, key2) -&gt; message   This seems like it should be relatively possible to do but I can't figure out how to do it yet. In my research I came across similar problems which many people were calling broadcast encryption but when I read up on it, it seems like for most broadcast encryption schemes require that you broadcast some information about what set of people are allowed to unlock the content and this is used by everyone to calculate their new keys.  This isn't want I want. I need that the "locks" can't change and that adding a new lock doesn't invalidate the old ones.  A physical metaphor would be if you were locking a box lid to bottom using some number of padlocks.  The system I am looking for would be like a chain of padlocks so that opening any of them separates the top from the bottom of the box.  Furthermore, if you add another new padlock on the end of the chain somehow, any of the original keys are still just as useful at opening the whole box.  Anyone have some ideas or links to read up on? Thanks.
Is it possible to encrypt a message in such a way that multiple keys can independently decrypt it?  In other words:  Having knowledge of $key_1, key_2 ...key_N$, which are different symmetrical keys, is it possible to generate a ciphertext that can be independently decrypted using either $key_1$ or $key_2$ or $key_N$, in such a way that the length of the ciphertext is less than directly proportional to $N$?
Creating System-Wide Keyboard Shortcut To Launch Applications I recently switched from Ubuntu, and I was feeling very comfortable with using Ctrl + Alt + T to launch terminal. Can I assign Shift + Cmd + T to do the same thing in Yosemite? Specifically, I want a new terminal window to be opened. is this set a regular surface? I'm reading "Differential Geometry of Curves and Surfaces of Manfredo Docarmo" I'm doing  the exercises of the chapter 2. Here is the definition of regular surface that we are following:   I have problems with this exercise:   Is with the first part, I think that it's not true that it's a regular surface (the second it is). I don't know how to prove that something is not a regular surface. I want to executed command from file (which is script) in current shell in terminal.  Example: I have file ch_dir contains following:  #!/bin/bash cd /usr   Now if I execute file usually as following then it executes commands in different shell:  pandya@pandya-desktop:~$ ./ch_dir pandya@pandya-desktop:~$   Here cd /user is executed in different shell.  But I want to execute in Current shell. How do I do that?  Note: Here cd is only used to explain. Question's aim is to execute any command in current shell JavaScript curry: what are the practical applications? I don’t think I’ve grokked currying yet. I understand what it does, and how to do it. I just can’t think of a situation I would use it.  Where are you using currying in JavaScript (or where are the main libraries using it)? DOM manipulation or general application development examples welcome.   mentions animation. Functions like slideUp, fadeIn take an element as an arguments and are normally a curried function returning the high order function with the default “animation function” built-in. Why is that better than just applying the higher-up function with some defaults?  Are there any drawbacks to using it?  As requested here are some good resources on JavaScript currying:    Crockford, Douglas (2008) JavaScript: The Good Parts  (Takes a detour into ML so skip the whole section from “A crash course in ML” and start again at “How to write curried JavaScript”)    (Mr. Resig on the money as per usual)    I’ll add more as they crop up in the comments.    So, according to the answers, currying and partial application in general are convenience techniques.  If you are frequently “refining” a high-level function by calling it with same configuration, you can curry (or use Resig’s partial) the higher-level function to create simple, concise helper methods. How do electromagnetic waves wave? Electromagnetic waves have a physical crest and trough as observed in microwaves and radio waves. I understand that is electromagnetic field vectors that wave, not the photon. But how do they wave? What does causes them to change direction? In my class design, I use abstract classes and virtual functions extensively. I had a  feeling that virtual functions affects the performance. Is this true? But I think this performance difference is not noticeable and looks like I am doing premature optimization. Right? `find` with multiple `-name` and `-exec` executes only the last matches of `-name` Cannot create PostGIS extension with Ubuntu 18.04 What is a "Nested Quantifier" and why is it causing my regex to fail? I have this regex I built and tested in regex buddy.  "_ [ 0-9]{10}+ {1}+[ 0-9]{10}+ {2}+[ 0-9]{6}+ {2}[ 0-9]{2}"   When I use this in .Net C#   I receive the exception  "parsing \"_ [ 0-9]{10}+ +[ 0-9]{10}+  +[ 0-9]{6}+  [ 0-9]{2}\" - Nested quantifier +."   What does this error mean? Apparently .net doesn't like the expression.  Here is the regex buddy so u can understand my intention with the regex...  _ [ 0-9]{10}+ {1}+[ 0-9]{10}+ {2}+[ 0-9]{6}+ {2}[ 0-9]{2}  Match the characters "_ " literally «_ » Match a single character present in the list below «[ 0-9]{10}+»    Exactly 10 times «{10}+»    The character " " « »    A character in the range between "0" and "9" «0-9» Match the character " " literally « {1}+»    Exactly 1 times «{1}+» Match a single character present in the list below «[ 0-9]{10}+»    Exactly 10 times «{10}+»    The character " " « »    A character in the range between "0" and "9" «0-9» Match the character " " literally « {2}+»    Exactly 2 times «{2}+» Match a single character present in the list below «[ 0-9]{6}+»    Exactly 6 times «{6}+»    The character " " « »    A character in the range between "0" and "9" «0-9» Match the character " " literally « {2}»    Exactly 2 times «{2}» Match a single character present in the list below «[ 0-9]{2}»    Exactly 2 times «{2}»    The character " " « »    A character in the range between "0" and "9" «0-9»   In short...  What is a Nested quantifier? What are your favorite English language tools? To prevent myself from asking an obvious, silly question multiple times: What are the English language tools you found most useful?  I found  extremely useful for looking up .   Please, one tool per answer. What level are spells cast at if a warlock multiclasses as another caster? Is there a way to forget node names between TikZ pictures? I have a document with several TikZ pictures in it.  I generally use simple names for the nodes such as:  \node (A) at .....  \node (B) at .....   and so forth.  Because of this I have name clashes between the various pictures.  That's generally not a problem.  However I find myself in a position where I may or may not have defined a certain node within a given picture.  So I use the following snippet to test whether the node has been defined:  \makeatletter \long\def\ifnodedefined#1#2#3{%%   \@ifundefined{pgf@sh@ns@#1}{#3}{#2}} \makeatother   Unfortunately this fails if I've already created a node by the same name in another picture.  Is there a way to scope the definitions of nodes or is there a way to undefine nodes once you no longer need them?  P.S.  I'm aware that I could embed each picture in a standalone file and import it using \includegraphics.  Unfortunately, this approach will not work for the document I'm creating.  MWE  \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc}  \makeatletter \long\def\ifnodedefined#1#2#3{%%   \@ifundefined{pgf@sh@ns@#1}{#3}{#2}} \makeatother  \setlength{\parindent}{0pt} \pagestyle{empty} \begin{document}   There's no node \textbf{D} here, so I draw a triangle:\par \begin{tikzpicture}    \coordinate (A) at (0,0);   \coordinate (B) at (1,0);   \coordinate (C) at (1,1); %  \coordinate (D) at (0,1);    \ifnodedefined{D}     {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }     {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }  \end{tikzpicture}     There is a node \textbf{D} here, so I draw a square:\par \begin{tikzpicture}    \coordinate (A) at (0,0);   \coordinate (B) at (1,0);   \coordinate (C) at (1,1);   \coordinate (D) at (0,1);    \ifnodedefined{D}     {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }     {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }  \end{tikzpicture}      There isn't supposed to be a node \textbf{D} here.  I'm expecting a triangle, but get a square.\par \begin{tikzpicture}    \coordinate (A) at (0,0);   \coordinate (B) at (1,0);   \coordinate (C) at (1,1); %  \coordinate (D) at (0,1);    \ifnodedefined{D}     {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }     {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }  \end{tikzpicture}  \end{document}   produces: In the following code, I need to use +/- where I have used it, and plus/minus where I have used it.  \documentclass{amsart} \usepackage{lipsum} \usepackage{calc} \parindent=0 pt \parskip=12 pt plus 0 pt minus 0 pt \def\headsep{25pt} \newcommand{\LAYOUT}[5]{%   \setlength{\hoffset}{0pt}   \setlength{\voffset}{0pt}   \setlength{\topmargin}{#1 - 1in - \voffset - \headheight - \headsep}    \setlength{\oddsidemargin}{#2 - 1in - \hoffset}   \setlength{\evensidemargin}{\oddsidemargin}   \setlength{\textheight}{#3}   \setlength{\textwidth}{#4}   \setlength{\marginparwidth}{#5} } \newcommand{\FULLPAGE}{\LAYOUT{1in}{1in}{9in}{6.5in}{0.75in}}  \FULLPAGE \begin{document} \lipsum[1-10] \end{document}   If I replace the plus and minus in line 5 with + and - I get an enigmatic  "missing begin{document}" error.    If I replace the minus's in lines 10-11 with "-" I get an equally enigmatic error:  "Missing number, treated as zero. Illegal unit of measure (pt inserted)."   Can somebody please explain when one can use +/- and when one can use plus/minus?  Presumably there's a good reason why latex's error messages are so completely mystifying, and why inconsistencies like these keep appearing? It's really hard to explain to my coauthors, who regularly complain that latex is the most infuriating program ever devised by mankind.  Thanks very much for any advice!   Leo The question is as follows:      Let $A'$, $B'$ and $C'$ be the midpoint triangle of triangle $ABC$. In other words, $A'$, $B'$ and $C'$ are the midpoints of segments $BC$, $CA$ and $AB$, respectively. Show that triangles $A'B'C'$ and $ABC$ have the same centroid.    My reasoning was through the means of the Midline Theorem. After drawing the diagram, we can see, for example, $C'A'$ is a midline of $\triangle ABC$, which means that $C'A'$ is parallel to the base $AC$ and half the length of it as well. Therefore, the median $B'B$ would pass through the midpoint of $C'A'$, including the midpoint of $AC$.   Is my reasoning valid or, at least, is it on the right track? Any advice on solving this problem will be greatly appreciated. Harry was never a Horcrux of Voldemort     I have heard this line on SE a lot &amp; also vaguely read about that discussion.     My question is if Harry was not Voldemort's Horcrux &amp; if all the other 6 (5 inanimate objects &amp; Nagini) were destroyed beyond repair &amp; Harry tries to Avada Kedavra Voldemort, would he die? What would happen to Voldemort's soul inside Harry.  I've asked this question keeping in mind Harry isn't a technical Horcrux but only a part of Voldemort's soul is in him. So can Voldemort resurrect from this soul?    If its a duplicate, please mention the relevant discussion link in the comments I am trying to find out how to approach a relief type project. I have a background image and a flat plane mesh to sculpt on, but I actually don´t see any changes looking straight on top. When I tilt the perspective a bit the image disappears.  Is there a way to make the image appear at all perspectives? Why would the command "ls *" generate an error about invalid options? There is a thread that talks about ls "*" not showing any files, but I actually wonder why the simple  ls *   command doesn't output anything in my terminal other than  ls: invalid option -- '|' Try 'ls --help' for more information.   while   ls   will list all the files in the current directories as    1                  ferol                      readme.txt  2                  fichier                    sarku  2018               GameShell                  Templates  22223333          '-|h4k3r|-'                 test  3                  hs_err_pid2301.log         test2  CA.txt             important.top.secret.txt   toto.text  CA.zip             JavaBlueJProject           tp1_inf1070  countryInfo.txt    liendur                   'tp1_inf1070_A19(2) (1)'  currency           liensymbolique             tp1_inf1070_A19.tar  curreny            LOL                        Videos  Desktop            Longueuil                 'VirtualBox VMs'  Documents          Music                      words  douffos            numbers                    Zip.zip  Downloads          Pictures  examples.desktop   Public   Any ideas as to why the globbing doesn't take effect here? I'm on Ubuntu, working in the terminal, I don't know if it makes a difference.  Thanks. How to get the native version of Spotify running? A while ago Spotify (the streaming music service) came out with a preview for Linux of their client.  So what should I do? I am currently learning electromagnetism and I am getting really annoyed using a physical hand to accomplish the right hand rule. I get it, i've seen diagrams, and i've solved problems with it but still somehow I mess up because I bend a finger or twist my wrist a strange way. I am tired of using my hand.  So my question is can I find an entirely mathematical basis for this?  Lets say for any given diagram I define the positive $x$ axis as going to the right, the positive $y$ axis as going up and the positive $z$ axis as going into the page. Then I just did unit vectors for everything to determine the missing component?  As I understand it $\vec{F} = q (\vec{V}\times\vec{B})$ and with that definition I am confident I could find out the direction of the electric field given the velocity of a particle of charge and the magnetic field but how can I re-arrange this so I can solve for other variables? For example what does $\vec{B}$ equal in terms of a cross product involving $\vec{V}$ and $\vec{F}$? Broken screen while debug mode was disabled. How can I re-enable adb? The screen of my phone is physically broken, so it doesn't display anything, but the touch aspect does seem to be working, as I can unlock my phone, and get haptic feedback.  Before I go to get it replaced, I'd like to back up some personal data from the built-in memory to the SD card. I'm fairly certain that if I can get adb to recognize the device, then I can use  to see where I am touching the screen and do what I need to do. Problem is, when I plug it in, it's not recognized, while my emulator is.  I suspect that I might not have USB debugging enabled, which I think is necessary for adb to work. If this is the case, can someone give me screenshots of their Droid X (running 2.3.X) going from the home screen, through all the menus, to activating debug mode? Hopefully I can do it by dead reckoning and adb from there.  Edit: I haven't changed anything about the ROM or launcher; it's all stock.