I used to think [ would spawn /usr/bin/test and [[ was a builtin, but apparently, it doesn't:  $ strace bash -c " [ -z "$FOO" ] && echo yes " 2>&1 | grep test   and  $ type [ [ is a shell builtin   [ is a shorter and seems more portable too. I'm on GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu).

I see I can do  $ [ -w /home/durrantm ] && echo "writable" writable   or  $ test -w /home/durrantm && echo "writable" writable   or  $ [[ -w /home/durrantm ]] && echo "writable" writable   I like using the third syntax. Are they equivalent in all ways and for all negative and edge cases? Are there any differences in portability, e.g. between bash on Ubuntu and on OS X or older/newer bash versions, e.g. before/after 4.0 and do they both expand expressions the same way?


I need to prove that  if $\sum_{n=0}^{\infty}a_n$ absolutely convergent $\Rightarrow \sum_{n=0}^{\infty}(a_n)^2$ convergent.  Do you have any idea haw can I prove it?  Thank you!

I'm trying to re-learn my undergrad math, and I'm using Stephen Abbot's Understanding Analysis. In section 2.7, he has the following exercise:  Exercise 2.7.5 (a) Show that if $\sum{a_n}$ converges absolutely, then $\sum{a_n^2}$ also converges absolutely. Does this proposition hold without absolute convergence?  I'm posting about this here because my answer to that last question about whether the proposition holds without absolute convergence is "Yes", but my suspicions are raised by him merely asking the question. Usually questions like this are asked to point out that certain conditions are necessary in the statement of propositions, theorems, etc. I just want to see if I'm missing something here.  Anyway, here's how I prove the absolute convergence of $\sum{a_n^2}$, and note that I never use the fact that $\sum{a_n}$ is absolutely convergent:  Proof: Let $s_n = \sum_{i=1}^n{a_n^2}$. I want to show that $(s_n)$ is a Cauchy sequence. So, let $\epsilon > 0$ and $n > m$, and consider, \begin{equation}   \begin{aligned}     |s_n - s_m| &= |(a_1^2 + a_2^2 + \cdots a_n^2) - (a_1^2 + a_2^2 + \cdots a_m^2)|\\                 &= |(a_{m+1})^2 + (a_{m+2})^2 + \cdots + a_n^2|\\                 &= |a_{m+1}|^2 + |a_{m+2}|^2 + \cdots + |a_n|^2\\   \end{aligned} \end{equation} Now, since $\sum{a_m}$ converges, the sequence $(a_m)$ has limit 0. Therefore I can choose an $N$ such that $|a_m| < \sqrt{\epsilon/n}$ for all $m > N$. So for all $n > m> N$,  we have, \begin{equation}   \begin{aligned}     |s_n - s_m| &= |a_{m+1}|^2 + |a_{m+2}|^2 + \cdots + |a_n|^2\\                 &< \left(\sqrt{\frac{\epsilon}{n}}\right)^2 + \left(\sqrt{\frac{\epsilon}{n}}\right)^2 + \cdots + \left(\sqrt{\frac{\epsilon}{n}}\right)^2\\                 &< \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2 + \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2 + \cdots + \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2\\                 &= \epsilon   \end{aligned} \end{equation} Therefore $(s_n)$ is Cauchy and $\sum{a_n^2}$ converges. And since $\sum{a_n^2} = \sum{|a_n^2|}$, the series $\sum{a_n^2}$ is absolutely convergent. ∎  Am I doing something wrong here? Am I right in thinking that $\sum{a_n}$ need not be absolutely convergent for $\sum{a_n^2}$ to be absolutely convergent?


I'm refining my code and noticed that at some places I had optional parameters with the default value of an empty string. I changed that to a default value from the class for empty string and guess what! Apparently there's a difference between empty quotation marks and string.Empty. What the duck?! (typo intended)  private void Khaboom(String parameter = "") { ... }  private void Bazinga(String parameter = String.Empty) { ... }   Can someone explain to me why the duck does Khaboom work while Bazinga doesn't?!  The error message whines this:      Default parameter value for 'parameter' must be a compile-time constant.    Well... It is!

In .NET why is String.Empty read only instead of a constant? I'm just wondering if anyone knows what the reasoning was behind that decision.


I have an array within an array, and I can call its values just fine. However, whenever I try to change the value of something in the second array it changes it for all of the arrays in the first array.  for yAxis in range(len(g.WORLD)):     if yAxis == yPos:         yRay = g.WORLD[yAxis]         print("=====")         print(yAxis)         print(yPos)         print("====")         for xAxis in range(len(yRay)):             if xAxis == xPos:                 print("-------")                 print(xAxis)                 print(xPos)                 print(yRay)                 print("-------")                 yRay[xPos] = 1    This does the same thing    g.WORLD[yAxis][xAxis] = 1

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I am using a custom script (stream.sh) which starts on boot. However, I want to check after every 5 minutes if the script is running. If it is not running, I want to run it again. How can I configure it in crontab or else?  I am using Ubuntu 18.04.

Is there a script or a way in linux that when I try to execute a shell script/process, if the same is running, it will prompt that same is running and will exit otherwise it will continue.


I am a Ghanaian by birth but have Argentine citizenship. In 2015, I first went to Ghana, then went on to France where my passport was stamped.   I spent one month in France,  2 weeks in Germany, 2 weeks in Italy, 2 weeks in Belgium. When I took the bus from Brussels to London, I didn't get an exit stamp. I returned to Argentina from England; my passport was not stamped on exit there either.  I traveled from Argentina to Ghana and on to Turkey, where I am now, and my passport has an entry stamp. I'm planning to take a bus from Turkey to other areas in Europe.   Can I enter the Schengen area without a problem, since I didn't get an exit stamp from any of the Schengen states I visited in 2015 before going to London?

I'm a US citizen traveling through Europe visa-free. I started my trip in Spain and got an entry stamp there. Later, I took the IDBUS from France to the UK and got an exit stamp from France and an entry stamp from the UK. (They made us all get out and go through two separate passport checkpoints.) Yesterday I took the night IDBUS bus back from the UK to Amsterdam. This time, we didn't have to get off the bus for passport checks: a UK official and a French official got on the bus and quickly checked everyone's passports, but no stamps were given. The last stamp in my passport is now my entry stamp into the UK, even though I'm in the Schengen Area again.  I'm confused: at the very least, shouldn't I have gotten an entry stamp from the French official? Is this common? What does this mean in practice? Will the burden of proof be on me to show that I haven't overstayed my 6-month period in the UK or my 3-month period in the Schengen region whenever I go through another border checkpoint?


Have a 2017 quad core processor, 8gb ddr4 ram but 1tb hdd. How to create a triple-boot with Win 10, Ubuntu 18.04 & Tails (or any other highly recommended distro)?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I'm rendering HTML template for email  demo_test.module  use Drupal\Component\Utility\SafeMarkup;  function demo_test_theme() {   return [     'contact_mail' => [       'variables' => ['params' => NULL],     ]      ];  }  function demo_test_mail($key, &$message, $params) {    $render_email = [     '#theme' => 'contact_email',     '#params' => $params,   ];    $mail = drupal_render($render_email);    $message['body'][] = $mail;      break;  }   contact_mail.html.twig            <meta name="viewport" content="width=device-width">     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">     <title>Test</title>
test
       Tried:  $message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed; delsp=yes';   But still not working.

I am trying to use the MailManager class in Drupal 8 to send HTML mail. I got it working, but it isn't parsing the HTML markup. I think something is wrong with the headers of the email.  What I have is a custom module (Custom_forward) that contains a form and that calls Mailmanager::mail() in its submitForm() method, which contains the following code.          // Email body         $header = $sender . ' thought you would like to see this page from the website.';         $personal_message = $form_state->getValues()['message_body'];         $entity_url_value = 'toString() . '">Go to article';         $message = $header . '
' . $personal_message . '
' . $entity_url_value;          // Email         $langcode = 'en';         $mailManager = \Drupal::service('plugin.manager.mail');         $to = $form_state->getValues()['recipient'];          $params['title'] = 'Forward';         $params['message'] = $message;         $result = $mailManager->mail('custom_forward', 'forward', $to, $langcode, $params, NULL, true);          if ($result['result'] !== true) {             drupal_set_message(t('There was a problem sending your message and it was not sent.'), 'error');             \Drupal::logger('mail-log')->error($message);         }         else {             drupal_set_message(t('Your message has been sent.'));         }   According to Drupal you also need the hook_mail method in mytheme.theme to be able to send message, you can see this method here:  function custom_forward_mail($key, &$message, $params) {   $message['body'] = [];   $message['subject'] = [];   $message['headers'] = array(     'content-type' => 'text/html',     'charset' => 'UTF-8',     'format' => 'flowed',     'delsp' => 'yes',     'from' => \Drupal::config('system.site')->get('mail')   );    switch ($key) {     case 'forward':       $message['subject'] = $params['title'];       $message['body'][] = '' . $params['message'] . '';       break;   } }   As you can see, I am setting the content type to text/html and that should tell the mail system to parse the content as an HTML, but this is not working for some reasons.  This is a testing email. All the HTML markup is not shown, but also not working.  Bassem thought you would like to see this page from the website. personal message Go to article [1] [1] http://myhost/node/81


Today on Puzzling SE I earned close to 200 rep. In fact, I was at 198 reputation, and then one of my answers got upvoted, but I only got 2 rep. I totally get this, because 200 is the cap.  But then, I decided to answer another question (it was actually the same question but I decided to post two answers-it was the How can the baby live? question). Then, I got downvoted on that answer so I got -2 reputation. But, then my total for today became 198.   Shouldn't it still be 200 because the upvote that only gave me 2 rep should have given me the maximum amount it could before I reached 200 a.k.a 4 rep this time?  Am I misunderstanding something about the reputation thing? I'd appreciate any help. Thanks!

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


Windows 7: I twice uninstalled Update for Miscrosoft Windows KB3035583, but it was repeatedly installed, although it has been marked "Hide update". Additionally, settings for install updates was set "Check for updates but let me choose whether to download and install them" - so Windows completely ignored this settings. Also, although I marked optional update "Upgrade to Windows 10 Home" as "Hide update", the checkbox was unmarked by itself after short time, even without rebooting PC. How to reliably disable this updates?  I applied the following keys, but it's still not helped:  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade] "AllowOSUpgrade"=dword:00000000 "ReservationsAllowed"=dword:00000000  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade\State] "OSUpgradeState"=dword:00000001 "OSUpgradeStateTimeStamp"="2015-08-06 19:53:58"   Edit: I tried play with update settings, changed it from "Check for updates but let me choose.." to "Never check for updates", then after some time changed it back to "Check for updates but let me choose.." - and seems this helped. KB2952664 has been moved from "Important" to "Optional" updates, and KB3035583 disappeared completely, and none of updates has been marked for installation. Also picture on Windows Update page has changed color from orange alert color to normal green. So, it seems, this issue somehow linked with Windows Update Client functionality.

A customer running Windows 7 Home must have reserved or okayed the Windows 10 upgrade because I am seeing daily messages that the upgrade is failing to install.   This customer is not ready for Windows 10 so it's good that the install is failing. But how to make it stop trying?  Once permission is granted for the upgrade, how do I revoke that permission so it stops attempting to upgrade?  I ran the Windows Update troubleshooter to clear out updates, and I uninstalled and hid KB3035583, but it is still trying to upgrade. In Task Manager, there is no GWX.EXE process.  Event log failure message:  Log Name:      System Source:        Microsoft-Windows-WindowsUpdateClient Date:          8/5/2015 1:28:58 AM Event ID:      20 Task Category: Windows Update Agent Level:         Error Keywords:      Failure,Installation User:          SYSTEM Description:   Installation Failure: Windows failed to install the following update with                 error 0x80240020: Upgrade to Windows 10 Home.   Relevant lines from WindowsUpdate.log:  2015-08-05  01:28:57:885    1068    6698    Agent   ************* 2015-08-05  01:28:57:885    1068    6698    Agent   ** START **  Agent: Installing updates [CallerId = AutomaticUpdates] 2015-08-05  01:28:57:885    1068    6698    Agent   ********* 2015-08-05  01:28:57:885    1068    6698    Agent     * Updates to install = 1 2015-08-05  01:28:57:885    1068    6698    Agent     *   Title = Upgrade to Windows 10 Home 2015-08-05  01:28:57:885    1068    6698    Agent     *   UpdateId = {27E79986-1150-4342-BDD2-76DF82C768D5}.201 2015-08-05  01:28:57:885    1068    6698    Agent     *     Bundles 1 updates: 2015-08-05  01:28:57:885    1068    6698    Agent     *       {FCD6621E-F5D4-4A95-AD43-28F0C58DD2F3}.201 2015-08-05  01:28:58:181    1068    6698    DnldMgr Preparing update for install, updateId = {FCD6621E-F5D4-4A95-AD43-28F0C58DD2F3}.201. 2015-08-05  01:28:58:181    27280   6f84    Misc    ===========  Logging initialized (build: 7.6.7601.18917, tz: -0700)  =========== 2015-08-05  01:28:58:181    27280   6f84    Misc      = Process: C:\Windows\system32\wuauclt.exe 2015-08-05  01:28:58:181    27280   6f84    Misc      = Module: C:\Windows\system32\wuaueng.dll 2015-08-05  01:28:58:181    27280   6f84    Handler ::::::::::::: 2015-08-05  01:28:58:181    27280   6f84    Handler :: START ::  Handler: Windows Setup Install 2015-08-05  01:28:58:181    27280   6f84    Handler ::::::::: 2015-08-05  01:28:58:181    27280   6f84    Handler   : Updates to install = 1 2015-08-05  01:28:58:181    1068    5ecc    AU  >>##  RESUMED  ## AU: Installing update [UpdateId = {27E79986-1150-4342-BDD2-76DF82C768D5}] 2015-08-05  01:28:58:181    1068    5ecc    AU    # WARNING: Install failed, error = 0x80240020 / 0x00000000 2015-08-05  01:28:58:181    27280   6f84    Handler   : WARNING: Exit code = 0x80240020 2015-08-05  01:28:58:181    1068    5ecc    AU  Write OSUpgradeState =14 with OSUpgradephase =2 2015-08-05  01:28:58:181    27280   6f84    Handler ::::::::: 2015-08-05  01:28:58:181    27280   6f84    Handler ::  END  ::  Handler: Windows Setup Install 2015-08-05  01:28:58:181    27280   6f84    Handler :::::::::::::


We can define the integration of Brownian motion $W_t$ wrt t as $$Z_t=\int_0^t W_sds.$$  We have know that $Z_t\sim N(0, t^3/3)$, but I am still not so sure  that $Z_t$ is a Gaussian process or not. I don't have clue to follow by definition of a Gaussian process.  Indeed, we can define the integral in Riemann sense: for $0\le i\le n$, let $t_i=\frac {t} ni$, then \begin{equation*} Z_t=\lim_{n\rightarrow \infty}\sum_{i=0}^{n-1}\frac {t} nW_{\frac {t} ni}. \end{equation*} Since $W$ is a Gaussian process, the  linear combination $\sum_{i=0}^{n-1}\frac {t} nW_{\frac {t} ni}$ is also a Gaussian process. What about the limit as $n\rightarrow \infty$?

Let $(\Omega,\Sigma,P)$ be a probability space and $X: [0,\infty) \times \Omega \to \mathbb{R}$ be a Gaussian process (i.e. all finite linear combinations $\sum_i a_i X_{t_i}$ are Gaussian random variables). If the process is continuous, it seems to be clear that the process $Y_t (\omega) = \int_0^t X_s(\omega) ds$ is a Gaussian process.   Is it true that $Y_t$ is a Gaussian process even if $X$ is only assumed to be measurable? I am working through the derivation of Kalman Filter in the text by Bernt Oksendal Eq 6.2.10 (fifth edition) and this seems to be a way to show that $M_t$ (in the book) is a Gaussian process.


My server receives 6 bytes of data: 2 bytes of head and 1 variable consist of last 4 bytes in Big Endian order (in example below variable is 100000 decimal)    00000001 head   00000001   10100000 start  4 bytes of variable (100000 decimal)   10000110   00000001   00000000   I want to read this variable using this code below (buf contains data  above)   unsigned char buf[MAX_s];   int32_t var = (buf[2] << 24) | (buf[3] << 16) | (buf[4] << 8) | buf[5];  printf("  %u \n",var);   but expected result isn't 100000, but some other larger number. What i do wrong?

How do I convert between big-endian and little-endian values in C++? For clarity, I have to translate binary data (double-precision floating point values and 32-bit and 64-bit integers) from one CPU architecture to another.  This doesn't involve networking, so ntoh() and similar functions won't work here.  Note: The answer I accepted applies directly to compilers I'm targeting (which is why I chose it).  However, there are other very good, more portable answers here.


I have a computer running Ubuntu 12.04 and would like to dual boot Windows 8. Is this possible without harming the Ubuntu installation? Everywhere I have looked said to install windows 8 first. Thanks

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I heard that there's an achievement when you make a complete run with no damage taken.  So my question is if soul heart's damage is actual damage? Does losing soul heart prevent me from getting this achievement?

In the Binding of Isaac, there are various things that decrease total health in some way. Which of those things count as damage for the "Complete the X without taking damage achievements" (Basement Boy, Spelunker Boy, Dark Boy, and Mamas Boy)?  For example, if I take damage going into and out of a , can I still get the achievements? Or if I use a blood donation machine?


What is best oil/fat for seasoning cast iron cookware?  I've read veg oils, lard, combinations of oil/fat types. Anyone out there help?!

I just cleaned up a rusty cast-iron skillet and I would like to season it. The thing is that I don't have lard handy and I'm wondering whether any of my other oils and fats would do.   I have: canola, olive, sesame and almond oil.   Also, I've heard that appying the oil and reheating multiple times improves the seasoning. Is it true? How many times does it make sense to repeat the process?


I need to log a bug against the 12.04 installer (the installation wizard that you run off the CD/DVD). What is the package name for this application?

Sorry if somebody has already asked this question, I haven't found anything else.   When you install Ubuntu, some sort of program is run, like where you set different options for your OS installation.  Does anyone know what the software is being run?  Thanks.


So I'm trying to cite an "author" that has "and" in its name. By "author", I mean more like a department. I'm citing a paper written by the U.S. Department of Health and Human Services along with the Food and Drug Administration. I looked all over the paper and I could not see any other author but regardless, how do you cite an author that has "And" in its name. I feel like I may be able to do it if I go with "@manual" in the .bib file but I'm trying to see if its possible with "@online" or "@author".

I have a quick question on how to reference organizations that contain more than one word.   For example, I am using this syntax,  @misc{Directive2010, address = {Brussels}, author = {European Parliament and Council of the European Union}, keywords = {Manual,fix}, mendeley-tags = {Manual,fix}, number = {4}, pages = {1--12}, publisher = {European Parliament}, title = {{Directive 2010/30/EU}}, year = {2010} }   The output I get in the text is: (Parliament and of the European Union, 2010)  and I want it to show as: (European Parliament and Council of the European Union, 2010)  Thank you for your help!!


I decided to update OS to 14.04. While downloading packages i noticed download totally stopped and had to interrupt it, and that happened several times. Then it started installing everything and it froze again. I waited for few h and it didnt changed anything. So i restarted pc and problem happened(knew that i shouldn't do it). Now when login to my account, after 1 second it just logs out.Only thing that i can do is login as guest user, but as a guest i can't use sudo in terminal.Guys, please tell me what should i do,i'm not so fammiliar with linux and i need to change os to windows.Do i need to reinstall linux first and how ?I need help asap,thanks.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Say I have something like this:  set -e; echo 'doing some stuff' false; status=$? post_hook send-message-elsewhere-with-status $status   One way to do what I want is:  set -e; echo 'doing some stuff' ( set +e false; status=$? post_hook send-message-elsewhere-with-status $status )   but is there some other way?

I have set -e turned on for my script. The only thing is there is one command here that I don't want causing the script to exit if it fails, but I want everything else to do that. How can I keep set -e on, and not have my script exit when an error code is thrown?  script in question:  native=$(pacman -Qenq -)   If stdin has a non-native package name an error code gets written to stdin.


Im trying to defined a generic LinkedList of type int but it throws me a compile errror  List<int> I = new LinkedList<int>();

Specifically, with a SortedMap<Vector<String>, int> I get "dimensions expected after this (int) token." Help!


What is the problem in training on accuracy when balancing classes during training? I Understand why accuracy is not a good metric for the test data evaluation of the model, as in the test data we have no control over class imbalance. This should be the same reason why F1/Dice score is bad for evaluating classification in the test set (although currently used in most segmentation challenges -BRATS, ISLES,...-).   But I see no problem in optimizing on accuracy over training samples, for which we can control class imbalance through selective sampling.  Is there any reason not to use accuracy as the training metric, while being careful not to use it for evaluation of generalization?

This is a general question that was asked indirectly multiple times in here, but it lacks a single authoritative answer. It would be great to have a detailed answer to this for the reference.  , the proportion of correct classifications among all classifications, is very simple and very "intuitive" measure, yet it may be a . Why does our intuition misguide us here and are there any other problems with this measure?


I want to create an extension method that converts any enum into a Json string.  I'd like to be able to attach an extension method to Enum that I can pass an enum-type into, so that it can be called on  Enum in the way that you can call Enum.GetValues(Type enumType), so it might look like:  Enum.ToJsonString(Type enumType)   It seems that this is not possible -- Enum is an abstract class; how could you extend that? -- and that I'll have to create my own static type to implement this.  Can anyone either confirm that I cannot extend Enum this way (and please explain, technically, why), or tell me how I can?  Clarification (update)  I know I can do this with my own static type. For example, it would be fairly easy to create EnumExtensions.ToJsonString(Type enumType) but I'd rather have the method listed alongside GetValues() et al with VS intellisence auto-complete.

I'm a fan of extension methods in C#, but haven't had any success adding an extension method to a static class, such as Console.  For example, if I want to add an extension to Console, called 'WriteBlueLine', so that I can go:  Console.WriteBlueLine("This text is blue");   I tried this by adding a local, public static method, with Console as a 'this' parameter... but no dice!      public static class Helpers {     public static void WriteBlueLine(this Console c, string text)     {         Console.ForegroundColor = ConsoleColor.Blue;         Console.WriteLine(text);         Console.ResetColor();     } }   This didn't add a 'WriteBlueLine' method to Console... am I doing it wrong? Or asking for the impossible?


I opened a question about index.php which can be read here:    A user called Taxicala answered on me, but he started to insult and said something which looked like: Haven't you learned to read at summercamp? (He said that because another user talked about Templates and according to him I read something particular wrong, but I can't recall what and he removed his comment), and treated me like I was stupid because of my question. I just started learning to build websites 2 weeks ago so how should I already know everything in this stage? I told him that I would downvote his answer if I could because it wasn't useful and respectful.  For some reason nothing was left of his answer and comments and all my questions received a -2 downvote.   Is this allowed at Stackoverflow and am I allowed to downvote all someones questions or is this against the policy?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I was playing minecraft and got lucky that my portal was near the fortress but I got the one lava chamber with no indoor loot areas and i looked north and south for the other nether fortress but I could find any. I need help finding nether warts because I'm trying to start making potions for zombie villagers I looked for the piglin chamber and still havent found any nether warts. I'm getting so desperate to find this stuff that I copied my world went on creative and still have fould a single nether wart. Any thing I can do to get nether other than those two?

The new Nether update has been released. I am asking about what is known about how the generation of nether fortresses will've been affected by this update. My old strategy for quickly locating a nether fortress was to travel in the x direction as one is most likely to appear this way. I've launched up multiple worlds and have attempted to use that strategy but it is to no avail - I often travel thousands of blocks without finding one. What is the most efficient way to now locate nether fortresses in Minecraft 1.16? Are they significantly rarer? Is it inevitable that on runs of Minecraft I'm pretty much always going to have to travel thousands of blocks for them?


There can be small cube planets or asteroids, but as they get bigger, the gravitational force compresses them to a sphere. But what is the maximum size?

I took this question from Quora because it seems interesting and this community would have some fun with it. I would assume that one would use the modulus formulas for force to counteract the gravity, but given that the question details allow for "a solid cube, although internal structure is fine (honeycomb, etc)," this might get more complicated.


i have this blender file and i am trying to make a chain with is stucked in the ceiling so the first chain link is passive, all others are active. Unfortunately the second chain is "breaking" out the passive one and i have no idea why it happens and how to fix it. Can anybody give me an advise? Before:  After:

I have made some chain links. I used the Rigid Body Tools and made the two end links passive and the others active. They are all set to shape Mesh. I've tried setting the weight to acrylic, cardboard, etc to lessen the pull they have when falling. How do I prevent these links from coming apart? I've even tried scaling up the scene but that also doesn't work.  Peter


I am unclear on this: Are WUBI Installations supported on Ubuntu 14.04? Yes; I know it is on the disk, but I find myself confused why it was put back on there, and questioning whether this was an accident or not. After it was taken off of 13.04, I worked under the assumption that it reached end of life, and that people hence forth should be advised to not use it as a tool.  Is there any official explanation?

Is there any Windows installer (wubi) for Ubuntu 14.04 LTS?  When I mount the .iso file with Daemon Tools and run wubi.exe, it just asks me if I want to reboot (I think that's useful only when the .iso  is burned on CD), so is there no "real" installation?


What is the syntax for expanding a parameter pack where the types I want are dependent on the types directly in the pack? For example: template <typename T> struct foo {    typedef T value_type; };  template <typename ... T> struct aggregate_of_foo {    typedef std::tuple<foo<T>::value_type...> tuple; // MSVC compiler error here };

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


I look over internet for the file contents but I couldn't where can I find /etc/inputrc contents for Ubuntu 20.04

I would like to restore LightDM to its default state, because for some reason /etc/lightdm/unity-greeter.conf is now an empty file.  Deleting /etc/lightdm/unity-greeter.conf and then running sudo apt-get install --reinstall unity-greeter doesn't create a new config file as you might expect.   How can I restore a missing config file?


I have an stored procedure in MySQL Database that execute a query like "SELECT * FROM table" and return this rows.  I want to create a JSON with this information, how can i do that? This is my code: Main <?php   include "config.php";  include "utils.php";   $dbConn =  connect($db);   if ($_SERVER['REQUEST_METHOD'] == 'GET'){     $sth = $dbConn->prepare("CALL consulta_administrador()");    $sth->execute();     $result = $sth->fetchAll();    var_dump($result);    echo json_encode($result); }  ?>  config.php <?php    $db = [   'host' => 'myDBHost',   'username' => 'myUsername',   'password' => 'myPassword',   'db' => 'myDB'    ];  ?>  utils.php <?php  function connect($db) {   try {       $conn = new PDO("mysql:host={$db['host']};dbname={$db['db']}", $db['username'], $db['password']);       $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);              return $conn;   } catch (PDOException $exception) {       echo "Error:" , $exception->getMessage(), '<br>';       die();   } } ?>

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Tried installing npm on ubuntu 14.04 however the following error has occurred   gwt@gwt-Aspire-E1-571:~$ sudo apt-get install npm  Reading package lists... Done  Building dependency tree   Reading state information... Done  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:   npm : Depends: nodejs but it is not going to be installed         Depends: node-abbrev (>= 1.0.4) but it is not going to be installed        Depends: node-ansi but it is not going to be installed        Depends: node-archy but it is not going to be installed        Depends: node-block-stream but it is not going to be installed        Depends: node-fstream (>= 0.1.22) but it is not going to be installed        Depends: node-fstream-ignore but it is not going to be installed        Depends: node-github-url-from-git but it is not going to be installed        Depends: node-glob (>= 3.1.21) but it is not going to be installed        Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed        Depends: node-inherits but it is not going to be installed        Depends: node-ini (>= 1.1.0) but it is not going to be installed        Depends: node-lockfile but it is not going to be installed        Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed        Depends: node-minimatch (>= 0.2.11) but it is not going to be installed        Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed        Depends: node-gyp (>= 0.10.9) but it is not going to be installed        Depends: node-nopt (>= 2.1.1) but it is not going to be installed        Depends: node-npmlog but it is not going to be installed        Depends: node-once but it is not going to be installed        Depends: node-osenv but it is not going to be installed        Depends: node-read but it is not going to be installed        Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed        Depends: node-request (>= 2.25.0) but it is not going to be installed        Depends: node-retry but it is not going to be installed        Depends: node-rimraf (>= 2.2.2) but it is not going to be installed        Depends: node-semver (>= 2.1.0) but it is not going to be installed        Depends: node-sha but it is not going to be installed        Depends: node-slide but it is not going to be installed        Depends: node-tar (>= 0.1.18) but it is not going to be installed        Depends: node-which but it is not going to be installed E: Unable to correct problems, you have held broken packages. gwt@gwt-Aspire-E1-571:~$    Kindly advice a solution to this problem as unable to proceed further.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I'm searching for an example of a measure space $(X,\mu,A)$ and a decreasing sequence $E_n$ of sets in $A$ that satisfy: $$\mu\left(\bigcap_{n=1}^\infty E_n \right)\neq \lim_{n\to\infty}\mu(E_n)$$ I looked at   But these are different contexts. My question is not about Lebesgue measure. I understood that taking $X=R$ and $E_n=[n,\infty)$ So  $E_n$ is a decreasing sequence and $\bigcap_{n=1}^\infty E_n=0$ and thus $ \mu(\bigcap_{n=1}^\infty E_n)=0$. And $\lim_{n\to \infty} E_n=\infty$. But how can I define $\mu$ formally (by definition of a measure), what is my $(X,\mu,A)$ in this case? Can you suggest another possible example or explanation for me .

Let $(X,\mathcal{A})$ be a measurable space, with measure $\mu$. Let $\{E_n\}_{n \in \mathbb{N}} \subseteq \mathcal{A}$ be a sequence of measurable sets, with $E_{n+1} \subseteq E_n, \ \forall n \in \mathbb{N}$, that is a decreasing sequence, and $\mu(E_n)=+ \infty, \ \forall n \in \mathbb{N}$. Let $E=\bigcap_{n \in \mathbb{N}} E_n$ the limit set of the sequence, $E$ is measurable for definition. Is true that $\mu(E)=+\infty$? If not in all cases, is true with $X=\mathbb{R}^{N}$, $\mathcal{A}$ the collection of Lebesgue-measurable sets, and $\mu$ the Lebesgue measure on $\mathbb{R}^N$?


By default, the  font joins "st" into a single ligature.  \documentclass{article} \usepackage{humanist} \begin{document} \hminfamily Compare: straight versus s{}traight \end{document}   I've tried to use the microtype package to remove this, but it doesn't seem to work with this particular one.  Any ideas how to change this throughout a document rather than doing it one instance at a time?

I'm trying to reproduce an old book with XeLaTeX, and it has the  but not the . The Ligatures=Rare option seems to turn either both on or off. Is there a way to select which ligatures to use in XeLaTeX? I am using the Adobe Caslon Pro OTF fonts. I know the microtype package may be able to do this but it is not supported by XeLaTeX. Any help is appreciated.  Another question I have is, is it possible to change ligature options midway through a document? Or perhaps temporarily change the ligatures for one occasion?


How do I install snap using the terminal?  I would like this questions answer to be as comprehensive as possible.  This is a very specific question, its not a duplicate!  I want to have an answer page that addresses installations on "all" versions of Ubuntu (a list of which can be found )  The purpose of this question is so that anyone that types the question above and forgets to add the version number will be directed to a response that covers all versions of Ubuntu.  I want the answer to address whether the person asking can(or can't) install snap on their version of Ubuntu, and if they can, the answer should provide terminal commands that they can copy and paste to achieve the intent of installing snap on their particular system.  If you want more information, just ask!

Completely confused with this new feature snap. I know this might be detailed question-answer but I need to know some info regarding it.   I have read that new application format, snap which can be installed by default in the latest long-term support release alongside traditional deb packages. So, Does it mean are there packages with .snap extension like .deb? Then, How to install?   The user can use newer versions of apps on older versions of Ubuntu without forsaking the stability of your entire system.  Is this the only difference between deb and snap? Does it only exist to LTS version or for non-LTS too?   With this, it is also said that Creating snaps is simplified for developers with the introduction of a new tool called “snapcraft” to easily build and package applications from source and existing deb packages. Is it useful to desktop user or only for developers ?


The main Q & A listings do not show whether I have voted on a given item, and if so, whether up or down.  This feature request is to do that: show whether I have voted on a question or answer already, and if so, whether I voted up or down.  (I don't think this is a duplicate -- AFAICT, other, related questions concern only reordering or filtering to show questions or answers that I have voted on.)  The main Q & A listings currently show the following:   The number of votes and the number of answers, for each question (or the number of votes, for each answer). Whether there is an accepted answer. Whether I have visited a given item listed (though I'm not sure whether that is persistent or just a browser-visitation thing).   On the page for an individual question, we show the user's up/down vote info by highlighting the up/down arrow.  This could be done on the main listing as well.  This should be independent of filtering and ordering.  Being able to see which things I have voted on is independent of being able to filter which things are listed and what order they appear in.  IMO, this would provide a big benefit.  Just as indicating whether I have visited a given question or answer helps me avoid clicking it again later, this would help me determine which of them I might want to visit or revisit in order to provide an answer.

There's been several times where I have been surfing the site, and noticed a question that I am not sure I've checked. Even if I've checked the question before, I can't recall off-hand whether or not I've voted on it or its answer.  Is there a way we can have our personal voting history reflected to some degree or another, in the Questions listing? For example, could there be an indicator as to whether or not we have already voted (up or down) on a question, and perhaps maybe an additional indicator as to whether we've up-voted any of its answers?  It would be very convenient to have some of this data available up-front, without actually having to view the question again.


I thought that I understand closures, but this example made me confused.   function f() {   let x = 1;    const g = () => {     console.log(x);   }   x = 100;    g(); }  f()    I think that the result should be 1, but it is 100. I thought that g in the moment of a declaration should take x that exists in the outer scope. But it took x value after reassignment. Why is it working like this?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  >>> [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  >>> from itertools import chain >>> list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]


What is the difference between the two sentences below?:  They have arrived back home. They have arrived home.  Thanks for the answers!

One can say "get back home" or "went back home" to talk about going back home after hanging out with friends.      In response to this question: Who do you usually like to hang out   with? I say: Back home, I used to hang out with my collage colleagues, but nowadays, I usually go out with my work colleagues   "back home" refers to my country and the listener know that I am a foreigner. Is this a correct usage of the phrase. Is it idiomatic?


i have to use "et" instead of "&" in my article's citations. I am using Natbib and Har2nat.      some text  (Author, A. et Author, B.)   but i get just     some text (Author, A. & Author, B.)   Is there any possibility to do this.

I'd like to change the separation between multiple article/book authors from '&' to 'and' in natbib.  eg:  @book{lee2009global,   title={{Global Marketing Management}},   author={Lee, K. and Carter, S.},   isbn={9780199239429},   lccn={2009005337},   comment={http://books.google.com/books?id=ZBkPOQAACAAJ},   year={2009},   publisher={Oxford University Press} }   then:  \usepackage[longnamesfirst]{natbib}  \begin{document} \bibpunct{(}{)}{;}{a}{,}{,}  \citep{lee2009global}   produces:   (Lee & Carter, 2009)   I'd like it to produce:   (Lee and Carter, 2009)


Recent news events in the US have resulted in many headlines about "nude photos of young women" and variations.   Obviously it's the women who are nude, not the photos, so why does this phrasing persist? Is it an idiom, or does it just flow better, or is it some other nuance of usage that I haven't seen in other situations?  Edit: I don't think the linked question is directly on point (though I do see the connection), nor do I think just saying "nude photos are photos of nudes, duh" is an informative answer or comment. Defining nude photos as photos of nudes ignores the fact that the headline refers to photos of women.

There's a verse in Bob Seger's song Mainstreet that has this wonderful little seemingly-nonsensical word pairing:     There was this long, lovely dancer in a little club downtown;    I loved to watch her do her stuff.    Through the long, lonely nights she filled my sleep,    her body softly swaying to that smoky beat.   On face-value, the word "smoky" to describe a "beat" just doesn't make sense; smoky isn't really a quality that a [musical] beat can have. And yet, the the words do make sense together and evoke a clearer (err, smokier) image of the nightclub.  Is there a term for this literary device? Are there other examples that come to mind?


Why does this print False in Python 3  >>> 1 == int False   Thanks for your help!!!!

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


I have an ArcGis Desktop Standard license and I would like to perform an operation to find out the difference between 2 features classes geometries (Something like symmetrical difference in Arcgis advanced version). Unfortunately symmetrical difference is not available for Arcgis desktop standard. The operation should be performed using Arcpy. Has anyone a tip for me, how to perform such an operation on Arcgis Standard?  Thanks

I'm wondering if there's a way to intersect two polygon layers, take the intersection, and remove that from one of the polygon layers, making a new layer out of whatever is left over? Basically, the idea I have is one of "punching holes" in a map of Africa where the holes are points around which I construct some sort of buffer. I have QGIS and ArcGIS 10.0. Is there a built-in or user created script for this?


I wish to run Ubuntu from my thumbdrive. Is there a "Flavor" that you would recommend? I truly thank you!  Larry

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


when you point your mouse over a taskbar pinned icon - there is some action happens - in Windows 7 you can see the windows opened (if its running) or there is a tooltip with the program name (if its not running).  There is considerable delay for the tooltip and very short delay for list of running instances.  Can I change the delay to open the list of the program running instances ?

I really love the preview feature of the Windows 7 taskbar. There's only one reason I don't use it more often -- it takes a relatively long time to display the actual window.  There is a registry trick () to reduce the delay used by general menus, and make the submenus open instantly when hovered upon. I'm wondering if there's a similar trick that can be used for the Windows 7 taskbar's previewing.


Kindly help me with this error. All the applications on the software centre are not loading and package manger has error too.

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


Our application is growing fast so now we need to scale the infrastructure to don't slow down the entire website without worrying on how many users we have  The backend system is based on many curl calls lasting 1-10 seconds and they need to be executed in parallel  We currently have a 4GB ram 4 core vps but sometime we get 503 error when all the 50 channels start in parallel (we setup 50 cron job) that execute 5 curl call/each  These numbers are going to increment fast so we need to find a solution to don't let the end user wait more than a minute to get his things done  Do we need a dedicated server, or it won't make much difference? Or set up aws lambda functions with sns queue? Amazon would be the best solution because whatever amount of sns messages we put in the queue and instantly they will get processed by enabling the trigger, but the lambda function currently don't support PHP so we would to rewrite all the code in Python  How would you manage this situation to improve the performance?

Our application is growing fast so now we need to scale the infrastructure to don't slow down the entire website independently on how many users we have  The backend system is based on many curl calls lasting 1-10 seconds and they need to be executed in parallel  We currently have a 4GB ram 4 core vps but sometime we get 503 error when all the 50 channels start in parallel (we setup 50 cron job) that execute 5 curl call/each  These numbers are going to increment fast so we need to find a solution to don't let the end user wait more than a minute to get his things done  Do we need a dedicated server, or it won't make much difference? Or set up aws lambda functions with sns queue? Amazon would be the best solution because whatever amount of sns messages we put in the queue and instantly they will get processed by enabling the trigger, but the lambda function currently don't support PHP so we would to rewrite all the code in Python  How would you manage this situation to improve the performance?


It would be great to be able to pull projects from your  profile as well.  I've authored several open source tools as part of my employment, so they're stored under my employer's GitHub account, but published to NPM under my account.

It would be a very useful idea to be able to import PEAR projects that somebody maintains to their careers.stackoverflow.com profile. Most of what is required could be gleaned from the user specific rss profile URL; this takes the form of {username}.rss


For one of my homework, I was given this question.   Married couples in a community only have children until the first boy is born (we neglect cases of twins). What is the ratio of sexes in this community? How is it about independence of sexes of children?  So for the first part, I expected it to be a 1:1 ratio which was correct but for the second part, I don't really understand the second part but I thought it will be independent.  Here is the answer given: But children within a family are not anymore independent as the youngest child is always a boy and his siblings, if any, are always girls.  Surely the events are still independent? Why does being in a family change that...  Edit: Sorry, I dont see why this is a duplicate. The first part of the question which is identical about the expectation being 1/2, I already knew. It is the second part that I'm stuck at and interested in. (It doesn't talk about multiple generations in this question like it does in the duplicate.)

I am having a few doubt on the interpretation of this problem that I have read on book about interviews questions.  Here the text:  A mythical city contains N=100,000 married couples but no children. Each family wishes to continue the male lane but they do not wish to overpopulate. So, each family has one baby per annum until the arrival of the first boy. Assume that all the children are equally like to be born male and female (and independent). Let $p(n)$ be the percentage of children that are male at the end of the year n. How is this percentage expected to evolve through time?  This is the problem and the solution says that the percentage is expected to remain constant at a level $\frac{1}{2}$.  Thanks in advance; if something is not clear, just ask.


Why is Space a THREE DIMENSIONAL ENTITY? I know that In physics and mathematics, the dimension of a mathematical space is informally defined as the minimum number of coordinates needed to specify any point within it I'm a student and I have tried to find the answer to this question but I probably didn't get any answer that I understand... So pls help me with this as I'm still a beginner here! P.S : There's a similar question at  but I kinda didn't get my answer there if there's anyone who can explain in a simpler manner request you to

Possible Duplicate:          Regardless of your favorite theory of how many dimensions the universe has in total, the universe seems to have a deep preference for displaying three fully interchangeable large-scale spatial dimensions (plus time) within any given frame of reference.  But why? That is, has anyone ever come up with a persuasive argument for why the number three is or is not the required number of large-scale spatial dimensions in a universe?   appears related, but after reading through it I'm pretty sure it is only pointing out that the known laws of electrostatics have three spatial dimensions built into them, which is most certainly true. But universes with fewer or more than three large-scale spatial dimensions would presumably have different force rules reflecting their different geometries, so this kind of analysis only shows self-consistency within a universe.  (I should also warn responders in advance that while I respect the right of some theorists to suggest that it is three "because our universe evolved that way out of a fractal multiverse," I also respect my own position that such statements are equivalent to saying "We haven't the foggiest idea why." An answer along those lines would at the very least need some powerful anthropic principle support, e.g. a proof or near-proof that universes with less or more than three large-scale spatial dimensions would have extreme difficulty supporting life.)


Icons can be arranged manually on the desktop, but I can't find any way to do it inside any other kind of folder. This is a big shame, as I used to (in 12.04) manually lay out and change the icons within some special folders. Also, I remember the zoom in level (ctrl +) used to get saved for particular folders, e.g. so icons would display uniformly bigger in a particular folder. Anyone have an idea how to get this functionality back, and why it went away in the first place? Thanks

Is there for Linux a file manager where you can place icons in your window anywhere you want?  I see only managers (for Win&Lin) where icons are aligned in a grid by name, size, date etc. However, on the desktop you can place an icon everywhere and eventually sort.   Why not for a different map? Does something like this exist?


The Euler equation is usually expressed in a local body frame: $$ τ_b=I_b \dot{\vec \omega}_b + \vec \omega_b \times I_b \vec \omega_b  $$ Where the subscript $b$ indicates that the respective term is expressed in the body frame $b$. Assuming the body frame is both rotating and translating (over time) with respect to the inertia frame, how can we express the Euler equations in the inertial (fixed) frame? Related to the previous question, in such a case, how would the Inertia tensor expressed in the inertial frame ($I_I$) be related to the constant one expressed in the body frame ($I_b$)?  discusses a related question, however, it seems that the answer only treats the case where the body frame is rotating with respect to the inertial frame. If possible please include references to detailed discussions on the topic and how the result is derived.

I am in search of a simplified version of the derivation of  (both translational and rotational) for a rigid body (3D block) that has a body fixed frame and where the center of mass of the body is not at the center of gravity.  I can find elementary derivations for the same system when the center of mass is at the center of gravity, but not for my system in question.    I am using the derivation as background research for a rotordynamics project that I'm working on.  Any help and or references would be greatly appreciated!  :)


I had lxappearance crash a few times when trying to install icon themes as described here:    The first few times there was crash report i could read, then it stopped appearing i think because the crash report window had pre checked the option to not display future reports from this app. How do I change that preference back to being able to see the reports?

The system crash dialog is annoying me, how can I turn it off? I'd also like to know how to turn it back on just in case I need it to report a problem.


Suppose I have the following scenario:   Leaving Vietnam for USA. Registered with the airline using my Dominican Passport which has a valid US visa. Successfully did exit immigration with my EU passport which I used to successfully enter. Leaving USA for EU. Registered with the airline using my EU passport so that they know I can go to EU without a visa in my Dominican passport. I also show them my Dominican passport which I used to enter the US so that they can do the immigration exit procedure.   Given that the US is paperless when it comes to entry / exit, how can I confirm that the airline successfully did the paperwork for me?  Thank you!

My father visited US on visitor's visa in 2007 for 20 days and submitted his I-94 while leaving. I am now in the process of applying his visitor's visa again. His old passport which had the visa stamp was renewed however, he did not get his old passport. but the new passport has the old passport # referenced. I was checking the online website to get previous travel history/I-94 record for him, however looks like they have only past 5 yrs record available online.   I have been reading online and it looks like if there is no record found, the person is considered to have overstayed in US and when reentering, one may face complications at Port of Entry. Don't they have a list of overstayers? Does this mean USCIS or DHS does not have the record of I-94 submitted in 2007?   As my father's old passport is not with him, he won't be able to show the stamp of arrival at his country. Would he be subjected to questioning about his previous visit and prove that he did not overstay?   I do not want him to face any humiliation at the POE. I don't mind his visa getting rejected.


I have the following on the host machine $ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  I would like second in a line device to be passed through to the machine. Also $ lsusb -t /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M     |__ Port 3: Dev 3, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M  What should I write in qemu command line? I wrote -usb -hostbus=1 -hostport=3  and in failed to run with qemu-system-arm: -hostbus=1: invalid option   I wrote -usb \ -device usb-host,hostbus=1,hostport=3 \  And got libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/003: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/003: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.  errors during boot under conventional used. If ran under sudo I got no errors, but also got no USB working under quest. # lsusb unable to initialize libusb: -99  Full command line sudo qemu-system-arm \     -kernel kernel-qemu-4.4.34-jessie \     -cpu arm1176 -m 256 -M versatilepb \     -serial stdio \     -append "root=/dev/sda2 rootfstype=ext4 rw" \     -hda myimage.img \     -usb \     -device usb-host,hostbus=1,hostport=3 \     -redir tcp:5022::22 \     -redir tcp:5080::80 \     -no-reboot    I have recompiled QEMU with ./configure --enable-libusb  but this didn't help. lsusb still gives an error. Also no rows about usb in dmesg. On real raspberri pi there are many usb rows including dwc_otg.

I'm launching a VM using qemu-system-x86_64. I know two ways to pass through a USB device.  Say for example, I had a mouse that showed up in lsusb like  Bus 003 Device 011: ID 6ade:9582 Amazing Mouse Maker   I could pass it through using  -device usb-host,vendorid=0x6ade,productid=0x9582   or  -device usb-host,hostbus=3,hostaddr=11   Neither of these I really like. If I grab it by Vendor/Product ID then I will never be able to reclaim that mouse until the VM is turned off.  If I grab it by BUS and Device number, then I will have to tell Qemu to reacquire it if I unplug it.  Is it possible for me to send it by Port (the actual physical slot)? Say it's plugged in to Bus 3 Port 2. Can I pass it by that?


In A New Hope, Grand Moff Tarkin and Vader exchange the following words:  VADER Don't underestimate the Force. TARKIN: The Jedi are extinct. Their fire has gone out of the universe. You, my friend, are all that's left of their religion.  Did Tarkin know that Vader was once   the Jedi Anakin Skywalker?  Or had "Jedi" become a catch-all term for Force users, good or evil, by this point in time?

It seems as though, by the time of A New Hope Darth Vader's real identity was unknown by most people. Were Anakin and his alterations kept secret from everyone? Who knew who Darth Vader really was?  As far as I can tell these are the few:   Vader (of course) Obi-Wan Yoda Palpatine   I can't think of anyone else who specifically knows.  Who else knew, and was Vader's true identity (and past life as Anakin) kept secret?


Hello so I'm visiting the parents for the holidays and they do not have Internet so I have been using offline mode to play a few games. Last night it was working just fine but now when I try to launch the game it repeatedly brings up the connection error message screen even after I select "start in offline mode" as if I selected "retry connection". Why is it doing this?

So when I got Steam working offline I had 26 games listed in my library but only 2 installed. Recently I brought a bunch more so I want to update my library on my Offline PC with the full list that's on my Online Laptop.  I thought that all I would need just copy the data from userdata/[ID]/config/localconfig.vdf however when I do the number goes down to 2 (the number of games I do have installed) and also the OST I got with Monster Monpiece doesn't appear. When I restore just that file the list and the music listing returns.  So what do I need to copy over from my Online Laptop to the Offline PC to update the list of games in the library?


I use GNU Screen tool to keep my sessions alive on the system.  To switch between windows I use Ctrl+a N where N is the number of the window.  I want to use similar keystroke to access windows with numbers in two digits.  As of now I have to go to window list by Ctrl+a " and then select the window.  Is there a way to achieve what I'm trying to?

Using GNU-Screen for a long time.  C-a 1 2 n p   to navigate to other tabs. This works till 9. I often have 10, 11 etc. Is there any way to go to them quickly ?  Currently, i have to do:      C-a 9, C-a n which is quite a pain. Thanks.


I am using windows 10 extend mode for my second monitor. I am using full screen browser mode on my primary monitor to play a game and have dragged a video to my second monitor.   After I have dragged my video (which is now playing) to my second monitor, I want to forbid my mouse pointer to be able to cross over from my primary monitor on to my second monitor which is the default behaviour with this extend mode.   Is there any way I can assign prefferably a hotkey to disable this behaviour and lock my mouse pointer to my primary monitor?

In multiple monitor setup mouse often unintentionally leaves the screen e.g. when trying to click close, trying to click the scroll bar.   Is there any way (on Windows OS) to snap the mouse to the edge of the screen like snapping windows so that it only leaves the current screen when really required to?


If a creature like the  (MM, page 173) has to do an opportunity attack against a PC that is moving out of the Grick Alpha's reach (10 ft), can the DM choose which attack to use?  The Grick Alpha has 3 different attacks and all are described as Melee Weapon Attacks:     Tail. Melee Weapon Attack: +7 to hit, reach 10 ft., one target. Hit: 11 (2d6 + 4) bludgeoning damage.      Tentacles. Melee Weapon Attack: +7 to hit, reach 10 ft., one target. Hit: 22 (4d8 + 4) slashing damage.      Beak. Melee Weapon Attack: +7 to hit, reach 10 ft., one target. Hit: 13 (2d8 + 4) piercing damage.

Take for example a Ruffian CR 1/2 creature, he has a Multiattack Action of 2 Shortswords both with a reach of 5 ft so when something provokes an Opportunity Attack against it, it is obvious that the Ruffian will take one Shortsword attack on the provoking creature because he only has one type of attack. But, what about an Adult Dragon with a more complicated Multiattack Action of 1 Bite, 10 ft range that deal 2d10 + Str; and 2 Claws, 5 ft range that deal 2d6 + Str? In addition to the Multiattack, the Dragon also has a Tail attack with a range of 15 ft and deals 2d8+Str. So, how do I know which attack to use? Does a creature provoke an Opportunity Attack when it moves 10 ft away? (i.e. Bite) Or does it provoke an Opportunity Attack when it moves 5 ft away? (i.e. Claw)


I’ve never used a clarifier when I brew. However a friend used one of those Mangrove Jack kit packs for his first time. I noticed it comes with a packet of beer clarifier. On inspection I noted this seems to be no more than gelatine(?). Essentially 5g (18oz) per 23L (6gal). Does that really work?

Does gelatin work for clarifying beer?  If so:   How much do you use?   When do you add it?   How do you prepare it? (Do you boil it in water? How much water to dissolve the gelatin?)


Please note: This may be a complex question, references would be great, search engines do not help with "of the".  Looks like we can remove the use of "of the" with a noun adjunct switching the order of a couple of names, at least sometimes. Examples:   The name of the hotel → The hotel name The handle of the teapot → The teapot handle The use of the "of the" digram → The "of the" digram use The use of the digram "of the" → The digram "of the" use (?) The dog of the house → The house dog (?)   Looks like sometimes (when?) we need the use of the Saxon genitive. Examples:   The dog of John → John's dog. The bag of the child → child's bag The beginning of the day → the day's beginning (?) The mistakes of the people → people's mistakes (?)   The questions are:   First and foremost: is this correct? (or "what is incorrect here?") Which use is preferred? Using "of the" or the noun adjunct. What rules apply in this context? There may be some cases when the only correct option is using "of the", are there such cases?

Is there any rule for when it is better to use genitive case or noun as adjective? I'm not sure if there is any difference in meaning in this example:     The department of accounting       The accounting department   Can I also use both forms in situations like:     The restaurants of Paris / The Paris restaurants      The room window / The window of the room


I define a preamble as follows: \newcommand\BuildingX{Building-X{}}\  When I use the preamble in sentences like as follows:  First, \BuildingX provides ...   The output is "First, BuildingXprovides ..."  There is no space after 'BuildingX'. How can put a space there?

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


Let $p$ and $q$ be linearly independent vectors. How can I prove that the matrix  $$pq^T +qp^T$$  always has rank $2$? I've tried several experiments, but still cannot prove it.

Let $p, q \in \mathbb{R}^n$ such that $\|p\| = \|q\| = 1$ and define $$A = pq^T + qp^T$$ Find the null space of $A$.    I am not having very much luck. I have managed to show that $p + q$ and $p - q$ are eigenvectors, but I can't seem to connect those two. I know that since $A$ is generated by an outer product, it is of rank one. That implies that the rank of the null space is $n - 1$, but I can't seem to get any further. Can anyone help?


There are plenty of guides on how to , but I can't find any on when to bother with it. Certain levels may have many of the same type of monster which will drop much of the same types of items (ex, ). Turn management can be critical in many places, say, bad circumstances, early game,  , , , etc.  Obviously, this can be highly circumstantial - say needing a particular drop -  but I'm more interested in the best general approach to the best general bell-curve of turns/circumstances vs items.  I'm also interested in addressing the item hoarder's fear: "I didn't try on every [common monster]'s drops - what if I missed something good?"   When should I be taking the time to identify items, and which items should I not bother with? What about cursed items? What about shops, which can have a wide variety of items? What about when there are hordes of the same monster?

In NetHack/Roguelikes you run across wands/rings/potions/etc. that you need to identify before you can know what they do.    Is there a safe or recommended way of handling these items without turning myself into a puddle of goo?


I have a problem with following proof:  $$\gcd(n^a - 1, n^b-1) = n^{\gcd(a,b)} - 1 $$  The only thing that I can show is fact: $$n^{\gcd(a,b)} -1 | n^a - 1$$ $$n^{\gcd(a,b)} -1 | n^b - 1$$ And $k={\gcd(a,b)} $ is the biggest number that $n^k-1 | n^a - 1$ and $n^k-1|n^b-1$ But how to show that $n^{\gcd(a,b)}-1$ is $\ the\ biggest\ $ divisor or alternatively that every divisor is form $n^k-1$?


I'm having a small problem here.  I'm running wampserver and I'm trying to access it externally so I could use it as a webserver for others to view my projects using my external IP  I forwarded the port 8080 in my router to my internal IP address, I made sure my IP address is static, I forwarded the port in my firewall to allow private and public traffic on it  If I access it using localhost:8080, 127.0.0.1:8080, it works perfectly. If I try to access it using my external IP it redirects to my router page, if I try to access it using myIP:8080 it says that the page was not found  So why is my external IP being redirected to my router page and how can I solve the issue so others can connect to my IP like a webserver?  I'm using an Aztech 605EW router

I have a Belkin F5D7230-4 router, and I don't have many problems with it, however one thing which has always bugged me is that its admin page is accessible locally via two locations: 192.168.2.1 and my IP address (e.g. 76.216.174.73). If I am at the library, etc. I cannot access it at all, and that's fine because if I really need to, I can use an SSH tunnel.  My issue is that I can access it at my remote IP address while on my local network. I would like to only be able to get to it by 192.168.2.1 while within my local network. This is because if I'm writing a script which connects to my server, I have to use 127.0.0.1 or 192.168.2.1, but before distributing must switch it to my external IP address (or my no-ip address.) Is there anyway to prevent my remote IP address from resolving to the router's admin page while I am on the local network (that is, connected directly to the router by ethernet cable or wifi), and instead have it forward me to the correct computer and port as it normally would if I were not on the local network?  I've looked through the Belkin settings and haven't been able to find anything.  Thanks.


I am looking for a particular linguistic term for this process of turning nouns like food into verbs like feed. For all I know, it may be older than English, perhaps even going back all the way to OE. English has a bunch of noun-verb pairs like these: food, feed blood, bleed brood, breed doom, deem? What is going on there? What does it mean?

"Foot" is a curious word in English because it is pluralized in an unusual way; the "oo" in the word is changed to "ee".  Did this once use to be a standard way of pluralizing things in English (or a language that contributed to English), which would mean that the plural of "book" was "beek" instead of "books"?  Or, is "feet" just a one-off?


I tried googling, but I may not be searching with correct terms.  $$\sum_{k=1}^{n} k^k = 1^1 + 2^2 +3^3 + 4^4 + \cdots + n^n$$  So, is there a formula to calculate this?

Is there a way of finding a formula for $\sum\limits_{k=1}^n k^k$? Maybe I'm missing something really obvious, but I've looked around a bit on the Internet and I haven't been able to find anything.  So, what I'm looking for is a formula in closed form to generate the sequence $1,5,32,288,3413,\dots$


True or false? a) Let $(x_{\alpha})_{\alpha\in A}$ a net over a space $X$ and $(x_{h(\beta)})_{\beta\in B}$ a subnet, where $h:B\to A$ is monotone and final. Let $\mathcal{F_1}$ be the filter generated by $(x_{\alpha})$ and $\mathcal{F_2}$ the filter generated by $(x_{h(\beta)})$. Then $\mathcal{F_2}$ is a refinement of $\mathcal{F_1}$. b) Let $\mathcal{F}_1\subseteq \mathcal{F}_2$ two filters over $X$ and $(x_{\alpha})_{\alpha\in A}$ the net generated by $\mathcal{F}_1$, and $(y_{\beta})_{\beta\in B}$ the net generated by $\mathcal{F}_2$. Then $(y_{\beta})_{\beta\in B}$ is a subnet of $(x_{\alpha})_{\alpha\in A}$.  a) Let $F\in\mathcal{F}_1$. Then there exists $\alpha_0\in A$ with $\{x_{\alpha}:\alpha\ge\alpha_0\}\subseteq F$. By cofinality, there exists $\beta_0\in B$ such that $h(\beta_0)\ge\alpha_0$. By monotonicity, $\{x_{h(\beta)}:\beta\ge\beta_0\}\subseteq \{x_{\alpha}:\alpha\ge\alpha_0\}$ and so $F\in\mathcal{F}_2$. So $\mathcal{F_1}\subseteq \mathcal{F_2}$, hence $\mathcal{F_2}$ is a refinement of $\mathcal{F_1}$. b) This is harder, so I think it is false. To clarify, here $A=\{(p,F):p\in F\in\mathcal{F}_1\}$, where $(p_1,F_1)\le (p_2,F_2)$ iff $F_2\subseteq F_1$ and $(x_{\alpha})_{\alpha\in A}$ is the net defined by $x_{(p,F)}=p$. Same way it is defined $(y_{\beta})_{\beta\in B}$. I don't really know how to show $(y_{\beta})_{\beta\in B}$ is a subnet of $(x_{\alpha})_{\alpha\in A}$. Anyone knows if there's a counterexample?

Suppose $G$ is a finer filter than $F$ in a topological space $X$.  Is the net base in $G$ a subnet of the net base in $F$?  I am using the definitions of General Topology of Willard:     Definition 12.15. If $(x_\lambda)$ is a net in $X$, the filter generated by the filter base $\mathscr C$ consisting of the sets $B_{\lambda_0}=\{x_\lambda; \lambda\ge\lambda_0\}$, $\lambda_0\in\Lambda$, is called the filter generated by $(x_\lambda)$.      Definition 12.16. If $\mathscr F$ is a filter on $X$, let $\Lambda_{\mathscr F}=\{(x,F); x\in F\in\mathscr F\}$.   Then $\Lambda_{\mathscr F}$ is directed by the relation $(x_1,F_1)\le(x_2,F_2)$ iff $F_2\subset F_1$, so the map   $P\colon \Lambda_{\mathscr F} \to X$ defined by $P(x,F)=x$ is a net in $X$. It is called the net based on $\mathscr F$.   The definition of subnet used in Willard is the second one from this post:   Thank you


The title says it all. I want to resize windows with an right click while holding the alt key, instead of the new default alt+middle click.  I have found no way to enable this behaviour in 13.04. The gconf-Key suggested in this , doesn't seem to exist any longer.

I love how you can resize windows by pressing alt+middle-mouse-button and drag.  Though now I got a mouse which doesn't support pressing the middle mouse button..   How do I do to change the combination from alt+middle-mouse-button to alt+right-mouse-button?  (On Ubuntu 11.04 with unity)


I was trying to create a mug where the outside is one solid color and the inside is the color of the drink. I found  which said I just needed to go into edit mode and select the faces I wanted for color 1 and click assign and do the same for color 2. But whenever I try this my entire object becomes the new color.   How do I get only certain faces to change color?

How do you add more than one material to a mesh?   I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it.  I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal.


Dammit Jim, I'm a photographer not a computer expert!  I have tried to use GIMP's Auto-Image-Alignment plug-in and everything's there but I just do not get how it works!  I have 100 pictures of our garden in different seasons, all taken from the same exact spot, but subtle shifts in the camera placement make the animated version of these images too jittery to watch.  I was hoping the auto-align plug-in for GIMP would solve my problems, but I just do not get how it works.  I've been tring for like three weeks now.  Can some kind soul PUH-LEEZE just write down the steps for you you would align and crop and save, say, 100 similar but slightly misaligned photos?

Do you know any open source tool to automatically align images, similar to the auto align feature in Photoshop?


I have been reading  and , but I don't understand how one of the steps works.     Let $a_n=\frac{a_1+a_2+\cdots+a_{n-1}}{n-1}.$   How do you set $a_n$ to meet certain criteria and not lose generality?

The AM-GM inequality: $$a_1a_2\cdots a_n\leq\left(\frac{a_1+\cdots + a_n}{n}\right)^n$$  the trivial case: $a_1a_2 \leq \left(\frac{a_1+a_2}{2}\right)^2 $ is self-evident.  then cauchy use this fact repeatedly. He get: $$a_1a_2\cdots a_{2^m} \leq \left(\frac{a_1+a_2+\cdots +a_{2^m}}{2^m}\right)^{2^m}.\tag{$\ast$}$$  This is easy to understand, and natural, but next step:  he let  $$b_1 = a_1,\ b_2=a_2,\ \ldots,\  b_n=a_n,\  b_{n+1}=\cdots=b_{2^m}=\frac{a_1+a_2+\cdots a_n}{n}$$  replace $a_1, a_2,\ldots ,a_{2^m}$ with $b_1, b_2, \ldots b_{2^m}$ in $(\ast)$ and simplified both left and right. He get the answer. I can repeat his proof, but I don't know why Cauchy can got this idea. How does he got it?


So far I came across cases that the usage of the possessive pronoun "whose" refer to human being. For instance:      "The man whose horse was strongest, won the competition".   Then my question is if it's possible to use the determiner "whose" for things that are not human being, it means for inanimate things.   For instance:      The pan whose lid is transparent, is now now on the stove."   n.b. I saw the claim that it's a duplicate of another question here on ELL but as well as the question there is not clear as you can see, also the answers are not clear and actually after I read there the answers I didn't really succeeded to understand what is the answer for my question.

Whose is used for people (e.g. "Whose that girl?"), but is it acceptable to use whose for objects too? Is there another word I should use for objects?  To make the question clearer, when I ask "Whose that car?" I am expecting an answer similar to "It's X's car." where X refers to a person. I could say "a man whose opinion I respect." and whose opinion would refer to the opinion of a person. Could I say "the desk whose drawer was broken by my brother"? Should I replace whose with another word?


I found this explanation in my math textbook and haven't found this method in any online tutorials. Here are the first few lines of finding the derivative of $\sin^{-1} (x)$ using First Principles:  Let $y = \sin^{-1} (x)$. Then, $x = \sin (y)$ and so $x + \delta x = \sin (y + \delta y)$  As $\delta x$ -> $0$, $\delta y$ -> $0$  Now, $\delta x = \sin (y + \delta y) - \sin y$  ∴ $1 = {\sin(y + \delta y) - \sin y}/\delta x$  or, $1 = { \sin(y + \delta y) - \sin y / \delta x }$  $\delta y/\delta x$  and the limits on both sides are taken and lived happily ever after.  My Question: In the last step, where does the $\delta y/\delta x$ come from?  Any help is greatly appreciated.

Because $\sin'(x)=\cos(x)$ we can prove that $\arcsin'(x)=\frac{1}{\sqrt{1-x^2}}$. but, by definition we have $$\arcsin'(x)=\lim_{h\to0}\frac{\arcsin(x+h)-\arcsin(x)}{h}\tag{1}$$ therefore, $$\lim_{h\to0}\frac{\arcsin(x+h)-\arcsin(x)}{h}=\frac{1}{\sqrt{1-x^2}}\tag{2}$$ My question: Can we prove $(2)$ without using $(1)$? How?


I am trying to implement the following circuit. I am trying to understand how the resistance values are calculated. I followed this -     According to my optocoupler (SFH6202) datasheet, following are the calculations:  VF(typical) = 1.25V  If = 60mA  So  Vres = V - Vf = 230 - 1.25 = 228.75  R = Vres / If = 228.75/.06 = 3812.5  But the circuit shows two 100K resistors. Am I doing something wrong here?  Also the Power dissipation is:  P = Vres * Ifmax = 228.75 * 0.06 = 13.72 W  The power dissipation seems too high for 1/4, 1/8 or 1/10 W resistors. Am I doing something wrong in this calculation also? Or do I need some special kind of resistors?

I'm using an optocoupler () to sense the On/Off state of an electrial appliance  using a microcontroller ATmega16L. How do i go about doing this? My mains supply specs are 230V, 50Hz. How do I design the surrounding circuit and select component values, like the resistors?   EDITED on 13th June 2012  Note: This is the first time I'm solving a circuit like this. Please send any helpful feedback. (including things I did wrong or any improvements)  Referring to the above schematic. The idea is to use this circuit to determine whether the load is on or off. The output pin from the optocoupler connects to an external interrupt of the Microcontroller I'm using which is ATmega16L. The interrupt will Monitor the state of the load. After monitoring I can toggle the state of the load using a relay (relay acts as a Control mechanism) which connects to the same microcontroller.  Now, I tried calculating the resistor values for R1, R2 and Rc.  Note, microcontroller's VIL(max) = 0.2xVcc = 660mV and VIH(min) = 0.6xVcc = 1.98V and VIH(max) = Vcc+0.5 = 3.8V.  To calculate Rc is quite easy. When the transistor is not conducting the output is high (at 3.3V). When the transistor conducts the output is pulled low. so from microcontroller's point of view, output high means load is switched OFF and output low means load is switched ON.  Looking at the datasheet for SFH621A-3, using 34% minimum CTR at IF = 1mA. Therefore, at 1mA input, the output is going to be 340uA. So in order for the microcontroller to detect low voltage from the output of the optocoupler can I use resistor value of 1Kohm? So that the output from the optocoupler will have a voltage of 340mV (which is below VIL(max))  More on this later, been a long day.  EDITED on 15th June 2012  Note: Solving for resistors on the power line (R1 and R2). Please check my calculations and any appropriate feedbacks.  Aim: the aim is to keep the LEDs *ON** for maximum period of time in a 10mS half period (20mS full period of 50Hz). Lets say LEDs have to be ON for 90% of the time, that means LEDs require at least 1mA of current for 90% of the time for that half period which means LEDs will be active for 9mS in a 10mS half period. So, 9mS/10mS = 0.9 * 180(half period) = 162 degrees. This shows the current will be 1mA between 9deg and 171deg (and less than 1mA from 0deg to 9deg and 171deg to 180deg). Did not consider ON time to be 95% as working with whole numbers is neat and 5% doesn't make any difference not in this application at least.  Vpeak-peak = 230V x sqrt(2) = 325V. Taking tolerances into account. Minimum tolerance of 6%. 325 x 0.94 (100-6) x sin(9) = 47.8V  So, R1 ≤ (47.8V - 1.65V) / 1mA = 46.1 Kohms Choosing a value one smaller than 46.1 Kohms of 39 Kohms (e12 series). Now that a smaller value resistance is chosen compared to what was calculated, means current through the diodes will be greater than 1mA.  Calculating new current: ((325V x 110%) - 1.25V)/39 Kohms = 9.1mA (too close to max If of diodes). Coming back to this in a moment [Label - 1x]  First calculate the power ratings of the resistor (considering 39 Kohm) ((230 + 10%)^2) / 39K = 1.64 Watts (too high).  Going back to calculation [Label - 1x] Lets choose two 22 Kohm resistors. Together they add upto 44 Kohm which is quite close 46.1 Kohm(calculated above)  checking power rating of the two resistors combined: ((230 + 10%)^2) / (2 x 22) Kohm = 1.45W. choose 22 Kohm resistors each with 1W power rating.  Now, after all this the initial CTR was 34% which means 1mA in will be 340µA out. But now because of 2x22 Kohm resistors the current will be slightly more on the output. That means higher potential across the pull up resistor Rc. Would there be an issue to get a volt drop below 500mV on the output of the optocoupler??


I want to bind an onclick event to an element I insert dynamically with jQuery  But It never runs the binded function. I'd be happy if you can point out why this example is not working and how I can get it to run properly:    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"                     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">                             <title>test of click binding</title>
Test of click binding

problem: to bind a click event to an element I append via JQuery.

The link is created, then added here below:

Another is added here below:

                         EDIT: I edited the example to contain two elements the method is inserted to. In that case, the alert() call is never executed. (thanks to @Daff for pointing that out in a comment)

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


When I want to screenshot something I can't becuase I don't know how.

Is there a way to take a screenshot of an Android device and save it as an image file?


In cycles render, I would like to make a textured surface emit light while the texture is still showing. Tried various methods (some suggested here) but haven't really found a solution. The ideal resolution would be if I could make the surface emit light but not lighting itself (so the texture remains visible). Is something like that possible?  This is what I have:

I am trying to make a computer monitor. This means I have to have an image texture for the screen. My image texture is currently connected to an Emission BSDF shader. Unfortunately, when the emission is bright enough to emit light, the image is white-washed. I tried adding a Brightness/contrast node to the image before pushing it into the Emission BSDF, but it seems to directly counter the Emission's strength.  The desired light level   The desired image brightness


I want to create this folder: $HOME/a/b/c/d while $HOME/a has not yet been created! Is it possible with one line in Terminal?

When I run  mkdir ../../bin/Release_Linux/Resources   Im getting an error  $ mkdir ../../bin/Release_Linux/Resources mkdir: cannot create directory ‘../../bin/Release_Linux/Resources’: No such file or directory   Or just   mkdir Release_Linux/Resources mkdir: cannot create directory ‘Release_Linux/Resources’: No such file or directory


When I read the answers to "", I was wondering why he would use a magazine at all to kill her.  As an android, he is stronger and faster than humans. He could crush her throat by choking her. He could crush her skull with his bare hands. He could grab something and quickly stab her chest far faster than it would take to roll up a magazine and stuff it in her throat. He could move his hands fast enough to break her ribs inward and puncture her chest organs. He had so many other options that were quicker and more likely to succeed.  Edit: This is not a duplicate of "", since that asks about Ash's intentions, but this one asks why he uses an inefficient method to kill her. None of the answers there mention that Ash could have used a different murder weapon/technique.

In the movie Alien, Ash      turns out to be an android. At one point, he freaks out, rolls up a magazine, and stuffs it into Ripley's mouth.    What in the world was he trying to do?


I'm trying to write a shell script that does a lengthy batch job on a remote server. I'll be running the script over SSH.   The thing is, I intend to start the script in the evening and collect the results the next morning; I'd prefer not to have my local computer have to run all night, as it's not needed as part of the batch process. As such, is there a way I can close the SSH connection and still have the shell script continue to run on the remote server?

ssh can use to run remote commands.  ssh me@server.com 'long-script.sh'   I run a long script that will take a lot of time, but I want to close my computer and keep running the script in the remote server. I know how to achieve this with , but I need do it via ssh.  Can I do that without interrupting my script?


Im a complete amateur at photography. I recently bought a Nikon d3200 SLR with the 18-55mm lens kit. I've bought it specifically for my trip to Lapland to hopefully see the northern lights. Could someone please advise me on what lens would be best based on a low end budget?

A friend has been kind enough to lend me a DSLR for a few months.  It's my first foray into DSLR photography, or indeed any kind of photography beyond simply aiming my Canon IXUS at something and clicking the button.    Over the last few weeks, I've been busy studying, practising and trying to learn as much as possible ahead of a planned trip to Norway where I hope to see, and get some photos of, the Aurora Borealis.  I currently have:   Canon Rebel Xsi (450D) Canon 50mm f/1.4 L  Canon 18-55m kit lens Aluminium full height tripod with ball head Cable release Spare battery & memory cards   I'm prepared to spend the night wrapped up outdoors, in the hope that they will make an appearance. I'd like some advice on how to get the most out of this kit for the trip:   How should I go about setting up to get pics of the Aurora?  How might I achieve optimum focus? From what I've read, I'll need to use the tripod and cable release, with IS turned off, on continuous shooting mode with long exposure times. But I'd like some more specific tips in terms of which aperture and ISO settings might work best? Should I use one of the lenses above, or would it be worthwhile renting a better, wide angle lens; if so, which would you recommend?


Is it possible to add keyframes and animate geometry without Shape Keys? Just like regular objects? Like moving vertices, edges and such?

I would like to animate a mesh's geometry without using . Is this possible?


I managed to hide both the tool bar and the menu bar in my print composer (Mac version 1.8.0). To get the tool bar back I saw you need to click on the menu bar. What then when you also miss the menu bar?    Here what I see. I right-clicked everywhere. I can't get the the check-box has described .

I unfortunately deleted the menu (Qgis 1.8.0) in print composer (settings for labels etc) . Now I am wondering how to display it again? The menu is gone in all my projects and I could not find a solution for this.  Any suggestions? Thank You!!


I'm revising for an exam and would appreciate any answers to this question. Thanks

As can be seen  (exercise 1), Terry Tao gives an exercise to find the Minkowski Dimension of the Quadnary Cantor Set, and of a special Quadnary Cantor Set.  The two sets are: $$C := \left\{\sum_{i=1}^{\infty} a_i4^{-i} : a_i \in \{0,3\} \right\}$$  and   $$C' : = \left\{\sum_{i=1}^{\infty} a_i4^{-i} : a_i \in \{0,3\} \, \, \text{if} \, \, (2k)! \leq i \leq (2k+1)! \,\, \text{and arbitrary otherwise} \right\}.$$  I managed to find the Minkowksi Dimension of the first one by noting that $C_\delta$, the $\delta$-fattening of $C$, has $\text{vol}(C_\delta)$ equal to the $n^{th}$ iteration of the Quadnary Cantor set.    For the second one, I've found a closed form expression for the volume if $\delta_n = 4^{-(2n)!}$, since I suspect this should be a lim sup, but I'm not sure.   The closed form I found is:  $$\text{vol}(C_{\delta_n}) = \sum_{k=1}^{n-1} \sum_{j=0}^{2k(2k)!} 2^{-(2k-1)!+2j)},$$  but I'm not sure how to even begin manipulating the expression  $$ \frac{\log(\text{vol}(C_{\delta_n}))}{-(2n)! \log(4)}. $$  In particular, we are to show that the upper MD of $C'$ is $1$, while the lower MD is $\frac{1}{2}$, but it seems to me that the worst sequence we can use is $4^{-(2n+1)!}$, since this would give a volume of  $$\text{vol}(C_{\delta_n}) = \sum_{k=1}^{n} \sum_{j=0}^{2k(2k)!} 2^{-(2k-1)!+2j)}.$$  To note how I got my closed form expression, at the $i=(2k)!$ iteration, we are removing  $$2^{(2k)! + ((2k)! - (2(k-1)+1)!)}$$ intervals of length $$4^{-(2k)!}$$ note that we must remove $((2k)! - (2(k-1)+1)!)$ more intervals, since we did not remove anything for some time and also that $$(2k+1)! - (2k)! = 2k(2k)!.$$  Also it is clear that the lim inf (lower MD) is at least $\frac{1}{2}$, since $C \subset C'$, but it's unclear why it isn't strictly larger.