Long story short: I accidentally deleted the default content that the 64-bit Ubuntu 20.04 installer had put inside of /etc/crontab during Ubuntu's installation on my computer, so now I'm trying to find out if it's possible to obtain an exact copy of such file from either the interior of the Ubuntu ISO installation file (e.g. a "local repository" such as ubuntu-20.04-amd64.iso) or from a remote repository (e.g. hosted at ubuntu.com or something) so I can put this default crontab file back in /etc. I mounted the Ubuntu 20.04 ISO and ran sudo ls -lR | grep -i crontab inside of it, but no crontab file was found, thus I imagine that it may be compressed inside one of the files inside of such ISO file, or maybe a system crontab is available for download somewhere at the ubuntu.com network or Launchpad's PPA: I just don't know.  Short story long: While using pipelining with |, in order to append the 1-line output of a command to /etc/crontab, I accidentally typed: | sudo tee /etc/crontab  ...instead of: | sudo tee -a /etc/crontab  ...and therefore ended up replacing the entire content of /etc/crontab with just 1 line, instead of adding such 1 line to the end of such file. Despair! To my luck, though, this was the first time that I was attempting to modify such file, therefore its content was the default one created by Ubuntu during its installation. But what content is it? I decided to run info crontab and found what seems to be the same default content of /etc/crontab (but I'm not really sure): # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d.  These files also have username fields, # that none of the other crontabs do.  SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin  # Example of job definition: #.-------------<-------- minute (0 - 59) #| .------------<------- hour (0 - 23) #| | .-----------<------ day of month (1 - 31) #| | | .----------<----- month (1 - 12) OR jan,feb,mar,apr ... #| | | | .---------<---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat #| | | | |  .-------<--- user #| | | | |  |     .--<-- command #| | | | |  |     | #v v v v v  v     v 17 * * * *  root  cd / && run-parts --report /etc/cron.hourly 25 6 * * *  root  test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7  root  test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * *  root  test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) #  I then decided to save the above code in a brand-new /etc/crontab file with owner:group = root:root (sudo chown root:root /etc/crontab) and then restore its permissions with sudo chmod 755 /etc/crontab. After I did this, I also created a backup copy of it with sudo cp /etc/crontab /etc/crontab.bak and also created a skeleton (i.e. template) of it with sudo cp /etc/crontab /etc/skel/crontab... ...but I can't help but wonder if the code above is indeed the exact same one that the Ubuntu 20.04 installer had created inside of /etc/crontab during Ubuntu's installation, nor do I know how to obtain an exact copy of such original/default file (if any is available somewhere).

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?


$\frac{3}{1⋅2⋅4}+\frac{4}{2⋅3⋅5}+ \frac{5}{3⋅4⋅6}+...\text{(upto n terms)}$  The general term seems to be $$T_r= \frac{r+2}{r(r+1)(r+3)}.$$  I see no way to telescope this because the factors of the denominator of the general term are not in arithmetic progression.  Do I have to use something else? Or am I missing some easy manipulation?

Show that $$\dfrac{3}{1\cdot2\cdot4}+\dfrac{4}{2\cdot3\cdot5}+\dfrac{5}{3\cdot4\cdot6}+\cdots+\dfrac{n+2}{n\cdot(n+1)\cdot(n+3)}\\=\dfrac{1}{6}\left[\dfrac{29}{6}-\dfrac{4}{n+1}-\dfrac{1}{n+2}-\dfrac{1}{n+3} \right]$$   Trial: I proceed in this way $$\dfrac{3}{1\cdot2\cdot4}+\dfrac{4}{2\cdot3\cdot5}+\dfrac{5}{3\cdot4\cdot6}+\cdots+\dfrac{n+2}{n\cdot(n+1)\cdot(n+3)}\\=\dfrac{1}{6} \left[\dfrac{18}{1\cdot2\cdot4}+\dfrac{24}{2\cdot3\cdot5}+\dfrac{30}{3\cdot4\cdot6}+\cdots+\dfrac{6n+12}{n\cdot(n+1)\cdot(n+3)} \right] $$Then stuck how to break $6n+12$ so that we get the following result.


I am having trouble wrapping my head around how command substitution works when part of the command's parameters come from a variable.  To illustrate, I'll just present a series of commands:  I'll first create a directory A B C in my tmp directory, in the new directory I'll create a new file abcfile:  user@desktop /tmp $ pwd /tmp  user@desktop /tmp $ mkdir "A B C"  user@desktop /tmp $ ls 'A B C'  user@desktop /tmp $ touch "A B C"/abcfile  user@desktop /tmp $ ls "A B C"/ abcfile   I'll new assign the value A B C to a variable $DIR and attempt to call ls to list the contents of this directory using various ways of calling the command  user@desktop /tmp $ DIR="A B C"   With the variable unquoted, the command fails as expected  user@desktop /tmp $ ls $DIR ls: cannot access 'A': No such file or directory ls: cannot access 'B': No such file or directory ls: cannot access 'C': No such file or directory   With the variable quoted, it works as expected  user@desktop /tmp $ ls "$DIR" abcfile   If I want the output of the command as a string  user@desktop /tmp $ echo $(ls "$DIR") abcfile   This command works, but why does it work? According to shellcheck this is actually not correct, the variable should be outside of double quotes  user@desktop /tmp $ echo "$(ls "$DIR")" abcfile   If the inner variable is not double quoted, the command fails  user@desktop /tmp $ echo "$(ls $DIR)" ls: cannot access 'A': No such file or directory ls: cannot access 'B': No such file or directory ls: cannot access 'C': No such file or directory

In my Bash environment I use variables containing spaces, and I use these variables within command substitution. What is the correct way to quote my variables? And how should I do it if these are nested? DIRNAME=$(dirname "$FILE")  or do I quote outside the substitution? DIRNAME="$(dirname $FILE)"  or both? DIRNAME="$(dirname "$FILE")"  or do I use back-ticks? DIRNAME=`dirname "$FILE"`  What is the right way to do this? And how can I easily check if the quotes are set right?


I need to add an user able to read all my databases. So I create:  create user 'reader' identified by 'password'; grant select on *.* to 'reader';   The problem with this is that the user is able to read also system tables like mysql.user, which I think is a security problem. I tried to revoke the select privilege on that table:  revoke SELECT ON mysql.* from 'reader';   But I get   ERROR 1141 (42000): There is no such grant defined for user 'reader';   What am I doing wrong? Is there another way to achieve what I want?  Or manipulating the grant tables is the only way?

DBMS allows the admin to grant table access to a user using something like:  GRANT ALL ON mydb.mytbl1, mydb.mytbl2 TO 'someuser'@'somehost';   However, is it possible to grant all tables to a user and explicitly block access to some of them? For example (The BLOCK key word is a fake one and is only used for illustration.):  GRANT ALL ON mydb.* TO 'someuser'@'somehost'; BLOCK ALL ON mydb.mytbl3 TO 'someuser'@'somehost';   Another idea is to add a where clause to the GRANT statement. However, it seems that the GRANT statement syntax does not allow that ().  This kind of access control might be convenient if the admin trust the user in most cases (e.g. 1000 tables) and only want to block access to a small number of top sensitive tables.    Could you please tell me whether such kind of mechanism exists?


I am a German citizen visiting my girlfriend in the US for 2 x 50 days a year under the Visa Waiver Programme (VWP). I already read that some immigration officers might make problems here due to the duration, if there are not at least 6 months between those 2 visits. But I believe 6 months should be feasible.   Now: Can I work remotely (telecommuting) for my German employer under the Visa Waiver Programme? I have an indefinite work contract with my German employer and would work via email and skype, mostly. The employer is ok with this. I have absolutely no intention to settle on US soil, my life centre is in Germany. But how to prove that?  Additionally, if I earn money in the US for more than 30 days, I need to pay US taxes, as far as I understand. That means I need to disclose that I am working to border officers, or do I not? I d be afraid I else might become a tax criminal and tax crimes are major offenses with jail time and all.  If I work for more than 30 days telecommuting, do I need to pay taxes in Germany and the US? That would be a heavy tax burden.

I would like to travel in the USA for a period of 3 - 6 months. But I want to spend some time working for my employer (remote work) and getting paid by the employer. Is this possible under a tourist visa (B1/B2)?  I hope this is OK since I will not be getting paid by a US employer. I am in the IT trade so all that I will be needing is my own laptop and a connection to the internet. The money I earn would actually help me pay for the expenses I get during the holiday.


I've installed BlueGriffon on Ubuntu 13.04 x64bit. I've add it to Unity Launcher by creating a "bluegriffon.desktop" file. Now I want to launch bluegriffon directly from terminal; assuming that the prgram folder is on the path /home/username/programs/bluegriffon and assuming that the laucher's file name is bluegriffon, which code I have to add to .bashrc and .profile?   Note: I tried to add PATH to .profile, but it doesn't work.

How do I add a directory to the $PATH in Ubuntu and make the changes permanent?


I have tried searching for an answer and looked online, but I'm just getting more confused.  I have a DMM that measures temperature with a thermocouple lead, with a resolution of 1 degree C (shows 020) for 20 degrees C and manual states accuracy of ±1%+3 digits. I understand the 1% of the reading, but I cannot figure out the 3 digits part.  For 20 degrees C, 1% is 0.2. Does this mean I should add 3 to the 0.2 meaning ± 3.2C or add 0.3 to the 0.2 meaning ±0.5C? Or is it something I am missing?  Also temp reading always flickers between 2 readings. Does this mean temp is in between the two?   Thanks

I have a digital multimeter and its accuracy for VDC is marked like this:      ±0,03%+10Digit   This multimeter has maximum display of 80000. So in the 80 V range it can show for example 79.999V.  0.03% of 80V is 0.024V - that is clear for me. But what does the +10Digit mean?  The device in question in .


What strategies is your school using to the reduce summer melt? OR What strategies are your school using to the reduce summer melt?

Over at stats.stackexchange we are having a minor kerfuffle over whether a title is using incorrect grammar. It has been edited and re-edited several times. It would be great to get some arbitration and a clear explanation.   The original title was "What questions is your data team hoping to answer?" which was edited to "What questions are your data team hoping to answer?", then edited back. See the question .


I recently installed Ubuntu 20.04 after using 16.04 for a while. I'm trying to install the school's VPN client which needs these 3 packages: libqtcore4, libqtgui4 and libgnome-keyring0. When I try to install with sudo apt install libqtgui4 I get this error Package libqtgui4 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'libqtgui4' has no installation candidate  The other two packages threw similar errors. I manually tried installing packages from copying them over from the 16.04 installation I had with no luck. I tried downloading manually as .deb files but quickly realized there is no end to the dependency chain. Is there a way I can install these packages at all? Or are they not compatible with 20.04?

Ubuntu 20.04 dropped qt4 and all libqt4-* dependencies in its official repos. My knowledge about version conflict and install-breaking actions is limited, so before any unthoughtful action is taken, I would want the community's take about this.  Would it be possible to get qt4 to install on Ubuntu 20.04, and if so, which source would not end up breaking the install?  Alternatively, what container method would be the lightest for apps relying on qt4? My usecase for qt4 is solely for some Xilinx ISE components, nothing else, so the lightweight criteria is really important.


I create a custom lightning component and have some unsaved data.  I'd like to show a warning and optionally prevent the navigation when clicking to a navigation bar (such as Home, Account,.. ).  I already tried with aura:locationChange and beforeunload, but it didn't work.  Does anyone have any solution for this case?        <aura:handler event="aura:locationChange" action="{!c.handleLocationChange}"/>      handleLocationChange : function (cmp, event, helper) {         confirm('You have unsaved data. Do you want to leave?');         event.preventDefault();      }       window.addEventListener('beforeunload', function (e) {        confirm('You have unsaved data. Do you want to leave?');        e.preventDefault();     }

We have a Lightning Community and would like to prompt the user to "Save Changes" if they try to click one of the community's navigational components (home link, or other menu item) but they have unsaved form changes on a custom Lightning component.  Ideally, we'd have a window.confirm popup asking if they want to leave without saving their changes, and if they click Cancel, the URL navigation would be aborted.  Is this possible via custom Lighting Components and Lighting Communities, and if so, how? If not, are there any patterns to work around this?


I was curious what happens when you try to alter an object retrieved through a class getter  class A {     constructor () {         let props = { foo: { hello: 'world' } };          Object.defineProperty(this, 'foo', {             get: () => props.foo         });     } }  let a = new A();     a.foo; // { hello: 'world' }     a.foo.hello = 2;      a.foo.hello === 2; // true or false?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


I'm just playing FTB Infinity and my cheat mode For NEI dose not work. I could really use some help. If anyone would know how to fix it I need the answer. I have image of my config if that helps

When I heard that you could look up recipes and cheat items with Not Enough Items, I downloaded NEI. It worked, and then I got another mod and the all of a sudden NEI still worked, but it was locked in recipe mode only. I tried fixing it by putting it into cheat mode again, but it was still in recipe mode.  I knew the only reason this happened was probably because of a change in the mod. Then I was watching a YouTuber who had the same exact mod as me and NEI was working and not locked in recipe mode for him. I tried redownloading NEI and getting it again but I was still stuck in recipe mode.  How do I get NEI in cheat mode?


So, I'm making a trap for a friend and I thought it would be easier to have a prefilled dispenser with the named bucket of pufferfish so yea, and I'll use this info for later for something else. Any suggestions would help. The command I'm using is this, but I would check and the bucket of pufferfish isn't named. /give Arjaysee dispenser 1 {BlockEntityTag:{Items:[{Slot:0,id:pufferfish_bucket,Count:1,tag:{display:{Name:"God"}}}]}}  So I was wondering if it was even possible.

I am in 1.13 Pre-Release 7 trying to make a one command creation and I need an item with a specific name. The command I use is /give @p diamond_sword{display:{Name:"Sword of Power"}} and it gives my a diamond sword, but it doesn't have the name.   This is me running the command.   This is the command not working.


So I'm new to Ubuntu and I want to dual boot it with Windows 8.1.So first I installed my Ubuntu in my laptop and it is installed successfully(I think) so it's working well now. I have my Windows 8.1 in my flashdrive and when I try to run the setup.exe I got this error:     An error occurred while loading your archive   And so my question now:   Is it the same to make a dual boot from Windows to Ubuntu? (Because mostly what I've searched is FROM Windows to Ubuntu) and in my case is Ubuntu to Windows (I installed Ubuntu first because IN Windows normally the second OS will be the primary OS) e.g. when Windows is installed and you try to install Ubuntu and so the priority OS now will be Ubuntu. And I want to boot automatically to Windows that's why I installed the Ubuntu first.  How to install Windows 8.1 now after installing Ubuntu? How to make partition in Ubuntu ?

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


I have a "message" element which should be resized if text doesn't fit its width with some limits(just like in messengers).   .message  {     position: relative;     color:white;     background:#182533;     border-radius:10px;     padding-top: 5px;     padding-bottom: 5px;     padding-left: 10px;     margin-left: 70px;     margin-bottom: 10px;     top: 40px;     left: -10px;     max-width: 320px;     min-width: 70px;     font-family: 'Open Sans', sans-serif;     font-size: 14px;     }       <div class="message">       </div>      Why it still gets max width even if it's empty? How it looks like:  How it should look like:

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.


Is there a latex command that can be included in a file compiled with pdflatex that can direct the *.aux, *.log files resulting from the compilation process, to a specific folder ?  I have seen several posts on this question in stack-exchange however all of them have solutions which involve making changes in the latex front-end used. I repeat, I am looking for a command that we can just include in the tex file.  The reason for doing this is that I wish to collaboratively edit tex files with another person over dropbox. We may be using different editors or operating systems even. So, I want the change to be made on the tex file that accomplishes the task of redirecting of *.aux, *.log files to a specific folder.

I have asked a  about how to manage all the files generated when my LaTeX files are compiled but the approach in the answer I accepted is still unsatisfactory for the many small documents I generate.    I realize the LaTeX  all the files it generates so I can't prevent their creation.    However is there a way to configure pdflatex to make all but the .tex and .pdf files hidden files (i.e., preceded by .)?   (Edit: The two main systems that I use are tex live on Ubuntu Linux and BasicTeX on OS X)


Can I omit "that" in the following sentences?  1: It was such a terrible experience that I will never forget it.   2: It is such nice weather that I would like to go to the beach.   Thank you very much!

I have often read people using sentences like...     Assume you are given a ball.   in place of      Assume that you are given a ball.   While both sound correct while speaking, the first sentence does not sound quite right while writing. Is it correct to use the first sentence in writing?


I need to change values inside the input and select field in AJAX loaded form. I have JSON object stored in Local Storage and I am parsing it into a regular object. This object properties called as the select and input fields classes, but jquery can't find them or something. The code is like this: $('#product-edit-popup').find('select.choose').val(JSON.parse(localStorage.getItem(currEdit)).cutName).trigger('change');          let currModalObj =  JSON.parse(localStorage.getItem(currEdit));     delete currModalObj.cutName;     for (let key in currModalObj) {         if (key == 'material' || key == 'thickness' || key == 'cover' || key == 'color' || key == 'colorSide') {             let selectId = 'select.' + key,                 currVal = currModalObj[key];             $('#product-edit-popup').find(selectId).val(currVal).trigger('change');         } else {             let inputId = 'input.' + key,                 currVal = currModalObj[key];             $('#product-edit-popup').find(inputId).val(currVal);         }     }  The first line is working fine, after this select is changed the form is being loaded using ajax, and inside this form jQuery .val() isn't working.

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.


How do I /kill a colored block that is thrown on the ground? For example, if I drop a green wool on the ground, a repeating command block will /kill it and the block entity will be deleted.

This question was recently split into different questions for each workaround. See   meta posts for more information.   Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}} summon tnt ~ ~ ~ {Fuse:20s}


What is the best way to add javascript to Drupal theme now that drupal_add_js is gone?  I want to use specifically jQuery ui animate, which I suspect is in Core, but I cant find out how to add it to my theme.

In Drupal 7, I can use drupal_add_js within a theme's template.php file as a theme_preprocess_html(&$vars) function:     drupal_add_js(drupal_get_path('theme', 'mytheme') . '/js/scripts.js',         array(           'group' => JS_THEME,           'preprocess' => TRUE,           'weight' => '999',         ));    $vars['scripts'] = drupal_get_js();   In Drupal 8, I've tried converting this using attached in my theme's .theme file as such:    $vars['#attached']['js'] = array(     array(       'data' => drupal_get_path('theme', 'mytheme') . '/js/scripts.js',       'options' => array(         'group' => JS_THEME,         'preprocess' => TRUE,         'every_page' => TRUE,       ),     ),   );   ... but that did not work and there were no errors in watchdog / console or otherwise.  According to the  for drupal_add_js:     Deprecated - as of Drupal 8.0. Use the #attached key in render arrays   instead.   There was not much more info that that however. It seems that drupal_add_css will also use this method. I know it's still early days for Drupal 8 but I was hoping to get a jump on this.


a small question regarding grep.  I'm doing :   find . -type d   And I have three directories :   ./backup-2013-11-27 ./backup-2013-11-26 ./backup-2013-11-28   If I only want to retrieve the one from 11/26, I do :   find . -type d | grep "2013.*11.*26"   and it works.  However, I can't understand why :   find . -type d | grep "2013*11*26"   doesn't work ... Indeed, I'm not using regexp here, I'm using pattern, so * should be used as wild card, or not?

I'm wondering what's the difference between using * and .* in a regex string.  I guess, * stands for "0 to n characters" but I don't see what .* stands for.  For example, what is the difference between: "2013*11*27" and "2013.*11.*27"? If I take a look to   find . -name [pattern]   As pattern I tried : "2013.*11.*25" and it didn't find "2013-11-25" however, with "2013*11*25", it finds it.   Why ?  In unix, 0 or n occurences of wildcards is : *, in regex .* so why doesn't it work ?


The picture I've  received via Viber deleted already 40 times appears over and over again in camera roll and photo stream !  How do i delete?

I've been using iPhone for many years now but this is the first time I've this problem.    I received a picture from a friend, who is on Android. Since then that particular picture copies by itself multiple times during the day in my camera roll.  Any idea why this may be happening? A virus, malware?  I am on iPhone 6 with iOS 8.3.


We have 11 people sitting on 11 chairs. They then get up and rearrange themselves. I need to calculate the expected value/mean of the pairs who swapped places.   I haven't really got a good grasp on how to even approach this problem... counting the possible states seems far too complex.

I am struggling with this probability/combinatorics problem.  the problem states: "11 people are seated around a round table. At some point, everyone stands up and sits again at a randomly chosen seat. Show that the expected value of the number of pairs which swapped places (A sat at B's place and B sat at A's place) is 1/2."  I struggle with calculating the number of orderings in which pairs switch places. I know we have 10! possible permutations for 11 people sitting in a circle, and there are $11\choose2$ possible pairs that could switch places. But I'm not sure how to count for example the number of permutation in which only one couple switches places.


So, I am trying to update Ubuntu on my external HDD, but it doesn't update, and it shows this. I tried to find something on Google, but no efficient results. This is what sudo apt-get update -y returns:

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I'd like to make .search() case insensitive for a variable I've entered into it. From the documentation on W3 it appears I can only hard code case insensitive searches. The example on W3 goes:  var str = "Mr. Blue has a blue house"; var n = str.search(/blue/i);   My code looks like:  var searchTerm = $("input").val(); var source = $("#page5").html(); var found = source.search(searchTerm);   If I were to code it like the W3 example then the .search() command would look like:  var found = source.search(/searchTerm/i);   However, when I do that it appears to attempt to search for the literal text of "searchTerm" instead of the value within the variable searchTerm. Is there a way to use the case insensitivity on the search method while inserting a variable into it?

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


Let $a$ and $b$ be positive interger such that $a|b^2$ , $b^2|a^3$ , $a^3|b^4$ , $b^4| a^5$ ... Prove that $a=b$.  Here how I tried to do it, I think it isn't the best way to approach it but anyway I failed in proving it:  EDIT: Let $a = p_1 ^{a_1} p_2 ^{a_2}  ... p_k ^{a_k}$ and $b=  p_1 ^{b_1} p_2 ^{b_2}  ... p_k ^{b_k}$ and $a_i, b_i \geq 0$ for $i$, $ 0 \leq i \leq k$. Then for a specific prime $p_i$, $a_i \leq 2b_i$, $2b_i \leq 3a_i$ , $3a_i \leq 4b_i$ and $4b_i \leq  5a_i$.... I tried to get some information from that but didn't get anything.  This question has been marked as a duplicate but it is in fact different, or maybe that's what I can directly deduce from the conditions. Just look carefully at the titles to realise that they are different.

Let $a,b \in {\mathbb{Z_+}}$ such that $$a|b^2,  b^3|a^4, a^5|b^6, b^7|a^8 \cdots$$  Prove $a=b$


I'm confused between these two sentences:  Till what time of the day does the registration remain open?  Till what time of the day does the registration remains open?   I understand that 'does' is always used with a singular noun. But my confusion is with the form of verb for 'remain'. Please also explain your answer to prevent future conflict of the same sort.

I was watching this video about Cyclopia on youtube and noticed this sentence: How does an animal that normally has two eyes develop just one in the center of its face.   I tried to google it but I couldn't find an answer, and it's really nagging me. So, shouldn't it be "develops" being the subject of the verb "an animal"? Btw, I also heard someone saying "It doesn't seem safe", instead of "It doesn't seems safe" in a movie. Can someone explain to me the proper usage, and if you can keep it simple, please... I'm not a native speaker, and most of my English I learned from watching movies and tv shows, I'm just now trying to learn about grammar and stuff.    Ps: Was this post to lengthy? That's my first time here on stackexchange and I'm not really sure how I should approach writing my questions.


I am trying to correctly convert (parse) a string to float in java, for the number 5755.1115, example:  float fl = new BigDecimal("5755.1115").floatValue(); float fl = (float)5755.1115d;   The issue is that it always prints 5755.1113. It seems it loses precision (I also tried using MathcContext(10) for example but didn't work)  But if I try this in javascript it seems it is working:  var fl = parseFloat('5755.1115'); var str = "" + fl.toPrecision(8); console.log("number: " + str);   It prints the number correctly even if I don't use toPrecision() function.  Can anyone explain how can I achieve this also in Java?  EDIT: My mistake, I forgot to specify that I do not want to use double because I need to keep the data transmission at minimum.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


In the film (3.15), the Eye of Sauron sees Frodo on the corner of Mount Doom.  Maybe he didn't think that they are the ones trying to destroy the ring, but at least he sees someone who is a stranger in his land.  Shouldn't he react this situation in some way?  Edit: I am talking about this scene:

Sauron literally put his eye directly on Frodo and I'm sure he knew Frodo had the Ring, and even if he didn't, why didn't he signal the Orcs to go after Frodo and Sam?  He literally just let them pass.  I mean, even if he did, by some miracle know that Gollum was following them, why would he trust Gollum with taking down two hobbits?  Does he think the Orcs would take the Ring? If so, how does he think he'll get it anyway, he doesn't have a physical form.


Explain me please why do i have these very very small points (like pixels) after rendering. Is it connected with lightning and how to fix it?

I know that this question is a bit old or maybe overdone, but I'm running the latest edition of Blender and when I use the Cycles engine I get really fuzzy results and I can't find a simple, non-compromising solution to the quality.  I don't know exactly what I'm doing wrong here, but I'm sure others share my frustration.  Leaving everything in default settings, I started a new project and switched to the Cycles render.  I duplicated the cube and set colors for two Diffuse BSDF shaders, then went ahead and made walls and a floor all sharing the same diffuse shader.  I made two windows to emit blue light.  The screenshot has gaps between the walls because of the setup:  I'm aware that it's considered very incomplete and many have come to terms with some amount of noise, but is this normal?  Furthermore, with default settings or not, I can't change the amount of noise produced.  Supposedly, using "progressively refine" in the rendering tab should make it refine itself indefinitely, however Cycles only counts to 10 refines and then stops, creating a render which is a pixel-perfect match of the ordinary rendering method when it's completed.  I understand that there are tricks that can be used to reduce noise, but at the cost of extra processing time and usually small quality conflicts, like blurring.  My question essentially boils down to is this Cycles' current limit?


I was able to add  name-link inside (or top-of) the section related to "Setup Java Environment Variable" in my own answer. My answer post is a bit longer, and this "JavaEnvVar" section is located in much bottom side. When I'm writing an answer for another question, I want to show a specific link into that specific bottom-side section "JavaEnvVar" in my own long answer. How can I do this? See this LONG  (I used this link https://stackoverflow.com/a/62874205/3553808 in above line, to link into the specific answer, this link was obtained from the "Share" option/button which is shown at bottom side of that answer) In my long answer, the line which has "Java ENV-VAR (ENVIRONMENT VARIABLE)" is the "JavaEnvVar" section, that has the name-link which I displayed here in the top/first line of this post/question. I want to reach that "JavaEnvVar" section quickly, to show only the specific instructions related to How to setup JAVA_HOME ENV VAR (which was created by me with some specifics), and then it will be easy for a user to find it & understand it. I'm trying to use such link (to specific-section of a answer), into my another answer . I have tried to use this https://stackoverflow.com/a/62874205/3553808#JavaEnvVar, but that does not work! it goes into top/beginning of my answer. I created a DIV such as this:
SECTION-NAME:
 but that also does not work, the Stack... parser removes it! So it seems (after using Firefox > main-menu > Tools > Web Developer > Inspector ) that Stack Exchange / Stack Overflow parser is removing the  name-link from that section in the webpage HTML code! But when I use "Edit", then src of answer still shows the name-link.

Stack Exchange sites use  for questions and answers. Per the Markdown specification, intermixing HTML and Markdown tags is allowed, but not all the HTML tags are allowed, to avoid . Which HTML tags are allowed on Stack Exchange sites?


I am writing a code which uses realloc(). The following is a simplified version of the problem. Though the code looks obvious yet it doesn't seem to work. // Program for implementing variable length integer array.  #include<stdio.h> #include<stdlib.h>  void add(int* ptr,int len,int ele){     ptr = (int*)realloc(ptr,len);     *(ptr+len-1) = ele; }  void main(){          int max_len = 10;          int* arr = (int*)malloc(sizeof(int));          for(int i=0;i<max_len;i++)         add(arr,i+1,i+1);          printf("The elements are...\n");          for(int i=0;i<max_len;i++)         printf("%d\n",*(arr+i)); }  The program runs for max_len=8 or low but not beyond it. Why is this happening? Thanks in advance.

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


I'm on a laptop with a bluetooth keyboard connected. When I changed from Windows 7 to Xubuntu 14.04 (now using KDE 4 with it) I could no more use Ctrl+Alt+(key) to make symbols as  @£$½¥{[]}   I instead have to use Alt Gr+(key) to make them, which becomes irritating because my bluetooth keyboard has NO Alt Gr key.  How can I do so Ctrl+Alt acts the same as Alt Gr?  I am using the danish keyboard (default) layout on a German keyboard.

The title pretty much says it all: how can I type Unicode characters - specifically the em-dash —?


I have Windows 7 Professional. Will the system ask me with which OS it will start (Windows or Ubuntu) on startup or will it load only Ubuntu?

I would like to see a full how-to guide on how to install Ubuntu.


I have a problem with pgfplots where the addition of a contour plot at the bottom of a 3D plot changes the coloring of the surface plot. This is a simple example:  \documentclass[preview=true]{standalone} \usepackage{pgfplots} \usepackage{tikz} \begin{document}  \def\zmin{-6} \def\zmax{8}  \begin{tikzpicture}       \begin{axis}              [                  zmin=\zmin,                  zmax=\zmax,              ]              \addplot3[                  contour gnuplot={                      output point meta=rawz,                      number=20,                      labels=false,                  },                  domain=-5:5,                  y domain=-5:5,                  samples=20,                  z filter/.code=\def\pgfmathresult{\zmin}              ]              {%                  min(x+y, \zmax)              };              \addplot3[                  surf,                  samples=20,                  domain=-5:5,                  y domain=-5:5              ]              {%                  max(min(x+y, \zmax), 0)              };         \end{axis}     \end{tikzpicture} \end{document}   This example turns out like this:   Without the contour, the resulting image is:   What I would like to have is an image with the contourplot, but using the coloring of the surfplot as it is shown in the image without the contourplot. Any help is greatly appreciated.

I am trying to get a surface graph with two colormaps.  Instead of using the full Z range i want to give the first surface its own colormap  and the second surface should receive its own colormap too (it may be even the same)... however the current version takes the full range of Z-Data and calculates the colormap. Is there any way?  \begin{tikzpicture}     \begin{axis}[grid = major, colormap={bw}{gray(0cm)=(0); gray(1cm)=(1)}, view={-30}{15}]   \addplot3[surf]    table     {DATA1.dat};   \addplot3[surf]    table     {DATA2.dat};  \end{axis} \end{tikzpicture}   Right now it looks like that:   I want each of the surface to be scaled individually... just to see more clearly how the amplitude changes :)  Any ideas?  Thanks, Alex


could someone help me to achieve this specific floor? I'm trying with the Noise Texture but I don't know how to do the metalic edges.

I have to make texture like this and have no idea how to make it. I tried voronoi + brick and nothing makes it look like this.


I am trying to install sage but hit problems when I enter "apt-get update" and consequently "apt-get install sagemath-upstream-binary." What should I do?

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I was wondering if it's possible to have Blender render visible light that fade away the farther it gets from the light source in Cycles render?

So generally people tend to agree that the intensity of light has a fall-off that is the inverse square of the distance to the light.    Something like:  intensity  = 1.0 / (distance * distance);    I'm fairly certain from what people say that this would be used in OSL/Cycles since it's supposed to be physically based however it's useful to have control over this when a scene is being difficult or even just to give more control when using several fill lights.  I'd like to find a node setup that can help modulate(or replace) the current falloff with something that is a bit more linear.    intensity = 1.0 / distance;   So does anyone have an idea on how to control the intensity falloff using what we have available to us already?


What is the best practice for casting between the different number types? Types float, double, int are the ones I use the most in C++.  An example of the options where f is a float and n is a double or an int:  float f = static_cast<float>(n); float f = float(n); float f = (float)n;   I usually write static_cast<T>(...) but wondered if there was any consensus within the C++ development community if there is a preferred way.  I appreciate this is may end up being an opinion based question and there may not be a "standard" way, in which case please let me know that there is no standard way so at least I know that :-)  I know this question has  in relation to casting in general, however, I am interested specifically in numbers and whether there are specific best practices in the approach for number types.

What are the proper uses of:   static_cast dynamic_cast const_cast reinterpret_cast C-style cast (type)value Function-style cast type(value)   How does one decide which to use in which specific cases?


This question is a question in my textbook, and I cannot stop thinking about it. The question: Is $\pi$ even or odd? I don't know if even or odd is defined for decimals or for irrational numbers, or if it is, how to find whether $\pi$ is even or odd. Can somebody help?

My sister just asked this question to me: "Is an irrational number odd or even?" I told her that decimals are not odd or even and that does imply that not recurring and non repeating decimals will also not be odd or even. But I want a rigorous math proof for this. Can someone help me with this proof? Also, can I do this proof by contradiction?


Can someone please help me in automating file upload on this page-    I tried everything, but the file upload is very dynamic.

This is a canonical question, intended to provide a comprehensive answer to many related questions  During the course of a Webdriver test, I want to upload files. However, this opens a native file picker, which Webdriver doesn't seem to support interacting with. How do I interact with it?


I am a graduate student freshman.I am reading some papers. I want to know what software this kind of graph is drawn in? Can someone tell me? Thanks.

I would like to have suggestions of good software for drawing illustrations in research papers. I already know about , but this works only on Linux and is at times, clunky when it comes to text. Moreover the resolution is not always perfect making it difficult to manoeuvre the objects. Besides it is tough to learn and master, with all its weird click procedures.   I would love to know about better alternatives. Not talking about graphs here, just block diagrams and explanatory illustrations.


I have a question on Microsoft Partner Network benefits but I can't find an obvious site to ask the question without probably getting down-votes. Should I just pick a site and hope for the best? My question is,  My company is a member of the Microsoft Partner Network (MPN) and I would like to submit a Windows Azure technical support ticket using these benefits, something we've never done before. When trying to submit a technical support ticket through Azure's support system, via a Program Benefits Support link that's specifically meant for MPN members, it leads me to a dead end by asking for an Account ID and Contract ID which I don't know. I have tried to contact both the MPN support and Azure billing support channels to understand how to proceed past this, but both support channels are referring me to the other support channel. I am stuck in an endless support feedback loop Where or how can I obtain the Account ID and Contract ID?  I am questioning whether any SE sites can help me with this question, not trying to decide for MPN whether they should or shouldn't be using SE as their support system.

I recently saw a question about a problem (or possible bug) with some product on Stack Overflow. At first, I wanted to suggest that the asker post his question to that product's support forum.  When searching for the URL of that forum, I noticed that the product developer closed its support forums and now advises users to post all their questions on Stack Overflow instead.  Is this within the intended use cases of Stack Overflow, or is this abuse?


There are lots of pictures of an RGB colorspace atlas designed by Tauba Auerbach: . I wonder if there are such things in stock somewhere? I don't mean authors originals but probably there are some analogues? Maybe it's called something another than "colorspace atlas".

I am making my own cards to sell, however, I would like to use some graphics and or backgrounds once in a while without having to make them all the time.   Where is the best place to buy graphics, images and backgrounds for a low cost that I can use in some of my cards that I will be selling?   Sometimes I just need to add one image or graphic and would like to purchase some but not sure where I can get them  so that I can use them in a card that I will sell.


I am working in my homework where there are a lot of figures.  I have a visual problem with figures which they must only placed inside a specific section, but they are shown in the next section. This is because I have a little text, and LaTeX tries to arrange my paragraphs and text for the best.  Is there any solution for that? I have tried with \hspace and \newpage, but doesn't work. I am working with \documentclass[11pt,a4paper]{article}, maybe I have to use another kind of document for my homework.  Please help me.

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?


What is the exact formula for $a_n$ in the sequence $a_{n+1} = 2a_n + 1/a_n, a_1=1$? I discovered that there are no elementary answers, but I don't know how to solve it.

For $n\in\mathbb N$, $$a_{n+1}=2a_n+\frac{1}{a_n},\quad a_1=1. $$ Can any one give an explicit formula for all $a_n$? If such an explicit general formula doesn't exist, please explain it. I've tried to figure out the $n$-iterated function $f^{(n)}$ where $f(x)=2x+1/x$ or even $f(\tan(t))$. But in either cases, I failed.Since the recurrence isn't linear nor homogeneous,the generating function method doesn't apply here.


I have been staring at this question for about half an hour now.  EDIT  If you were wondering, this is not a dupe of the question "How to solve $\int \frac {dx} {e^x + 1}$ "

How do I solve evaluate $$\int \frac{\mathrm{d}x}{e^x + 1}\ ?$$  I know that I have to use $u$ substitution but I can't seem to find something to substitute with.


Does the train from Beograde to Budapest stop at the border or does the passport controller come into the train?

I have lost my passport here in Beograd. Can I travel just with my Czech ID card from Belgrade to Budapest?


How can I achieve a similar look to   I want to capture the sunlight streaming through the window and the lense sunspot type of effect like in the middle of this image.  Anyone had experience doing this before?  Thanks

I usually try to avoid lens flare, usually by avoiding shooting directly into bright lights (or using  to minimize it). However, sometimes I find a situation where lens flare actually adds to the image.  What can I do to effectively incorporate lens flare into my image? Also, are there any ways to do so while minimizing loss of contrast?


I'm at the moment studying quantum physics and I came across $$E=hf.$$ My question is: how come there are only certain energies allowed if in this formula $f$ can be any number, and therefore, energy could be any number? Are there only certain values of $f$ allowed?  What am I not understanding correctly?

I'm aware that there're some questions posted here with respect to this subject on this site, but I still want to make sure, is frequency quantized? Do very fine discontinuities exist in a continuous spectrum like the black body spectrum?


I almost broke my Ubuntu installation trying to install python 3.7 from the source using checkinstall. My question is how to install python 3.7 and it's equivalent ipython   alongside with python 3.5 without breaking everything related to the native python installation ?

I have several systems. Some are 16.04 mini-servers and I cannot update the OS yet. The others have been updated to Ubuntu 18.04. (The 18.04 version I used has Python 3.6.5 on it).


Whether to use ‘a’ or ‘an’ before acronyms/initialisms  I think I understand the issues and principles as expressed by various contributors on this question.  But here’s an interesting one: is it equally correct to write ‘an SSSI’ and ‘a SSSI’?  The former would be articulated as ‘an es es es I’ and the latter ‘a triple S I’. If the latter is equally acceptable are there any similar cases? Thank you.

99% of the time, I'm clear on when I should use "a" versus "an." There's one case, though, where people & references I respect disagree.  Which of the following would you precede with "a" or "an," and why?   FAQ FUBAR SCUBA   [Note: I've read the questions  and , but the rules given there don't necessarily apply here.]    [Edited to add]  Here's a shorter (and hopefully clearer) version of the question…  In written English, which is correct (and why): "a FAQ" or "an FAQ"?  Some references with differing opinions:   an: the  and  a: the Microsoft Manual of Style for Tech Publications, 3e either: the  and


What is the difference between a 100mm lens and 100mm macro lens? To the best of my understanding, the more mm your lens has, the bigger the zoom is. But some lenses are labeled 100m macro, others aren't.  These are the examples causing confusion:  and

I've read a few threads on here that mention some  of macro lenses and found some marketing fluff in the box for my Canon about them as well, but being a complete novice I was left a bit confused.  Can someone please provide me with a top-to-bottom explanation of what a macro lens does?


let $f,g$ be continuous functions on $[a,b]$ and suppose that $g$ is non-negative. then there exists apoint $c \in [a,b]$ such that $\int_{a}^{b} f(x)g(x) dx = f(c) \int_{a}^{b} g(x) dx.$  I have seen a solution similar to my problem in the link below, except that this solution assumes that $g>0,$ but my problem assumes that $g \geq 0$, does my problem contain a mistake? or the result is true also if g is non negative?

Suppose $f : [a,b] \to \mathbb{R}$ is continuous and $g \in \mathcal{R}[a,b]$ with $g(x) \ge 0$ for all $x \in [a,b]$. Show that there exists a $c \in [a,b]$ such that $$\int_a^b f(x)g(x) \, dx = f(c) \int_a^b g(x) \, dx.$$   My attempt:  My class proved a theorem which states that $f$ attains its minimum and maximum ($m$ and $M$, respectively), since $f$ is continuous on a closed interval like $[a,b]$. So we would have $m \le f(x) \le M$. Multiplying both sides by $g$ and integrating, we get $$m \int_a^b g(x) \, dx \le \int_a^b f(x) g(x) \, dx \le M \int_a^b g(x) \, dx.$$  I am stuck after this. Where can I go from here?


I've tried several things below, but when there is a - in the path it seems to screw with the environment variable that I'm setting:  leeand00@somehost MINGW64 ~/OneDrive - Some Company Somewhere/mycsvdb (develop) $ export CSVFILE="/c/Users/leeand00/OneDrive\ -\ Some\ Company\ Somewhere/mycsvdb/.mycsv.sys.csv"  leeand00@somehost MINGW64 ~/OneDrive - Some Company Somewhere/mycsvdb (develop) $ cat $CSVFILE cat: unknown option -- \ Try 'cat --help' for more information.  leeand00@somehost MINGW64 ~/OneDrive - Some Company Somewhere/mycsvdb (develop) $ export CSVFILE="/c/Users/leeand00/OneDrive\ \-\ Some\ Company\ Somewhere/mycsvdb/.mycsv.sys.csv"  leeand00@somehost MINGW64 ~/OneDrive - Some Company Somewhere/mycsvdb (develop) $ cat $CSVFILE cat: '/c/Users/leeand00/OneDrive\': Is a directory cat: '\-\': No such file or directory cat: 'Some\': No such file or directory cat: 'Company\': No such file or directory cat: Somewhere/mycsvdb/.mycsv.sys.csv: No such file or directory  leeand00@somehost MINGW64 ~/OneDrive - Some Company Somewhere/mycsvdb (develop) $ export -- CSVFILE="/c/Users/leeand00/OneDrive\ -\ Some\ Company\ Somewhere/mycsvdb/.mycsv.sys.csv"  leeand00@somehost MINGW64 ~/OneDrive - Some Company Somewhere/mycsvdb (develop) $ cat $CSVFILE cat: unknown option -- \ Try 'cat --help' for more information.  leeand00@somehost MINGW64 ~/OneDrive - Some Company Somewhere/mycsvdb (develop) $ export CSVFILE="/c/Users/leeand00/OneDrive\ -\ Some\ Company\ Somewhere/mycsvdb/\.mycsv\.sys\.csv"  leeand00@somehost MINGW64 ~/OneDrive - Some Company Somewhere/mycsvdb (develop) $ cat $CSVFILE cat: unknown option -- \ Try 'cat --help' for more information.   Is there a way around this?

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I am unable to view any screen in my ubuntu, Also, when i do apt-get update.  I get below errors :-   Failed to download repository information. Check your internet connection   Details  W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release Unable to find expected entry 'restricted/source/Sources' in Release file (Wrong sources.list entry or malformed file), E:Some index files failed to download. They have been ignored , or old ones used instead.   How can i solve the issue.

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


On 10.10.2, several times a day, I hit F3 ("Mission Control"?) to see all my windows, in order to quickly navigate to one.  And I notice empty desktops keep getting created:   I know I can hold down the option key, to get the X on each of them to more easily delete them one at a time.  But this can still take a while.  I've seen it get as high as 112!  112 empty desktops?!  Why are they created in the first place? Is it some keystroke I don't realize I'm hitting? Do they not consume system resources?  Can new desktops just be permanently disabled, leaving me only ever with desktops which actually correspond to my screen and two external monitors? (I've frankly never understood the point of virtual desktops anyway.)

Since upgrading to Yosemite I've been having issue with OS X creating additional desktops on my main monitor for no apparent reason. I usually have 3 different desktops setup on my main monitor and just one on my second monitor. By the end of the day, OS X will usually have created 2-3 extra desktops automatically.  I can't find any setting or shortcut that might be causing this to happen. There also doesn't seem to be any reason for it since it can happen as soon as I boot up my computer.  Is there a way to set a maximum number of desktops so I can prevent this from happening?  Image from related question -


For now I have the following \begin{align*} \left(\sum_{i=1}^n x_i\right)^2 & \le n\sum_{i=1}^n x_i^2 \\ \sum_{i=1}^n x_i^2 + 2\sum_{i<j}x_ix_j & \le n\sum_{i=1}^n x_i^2 \\ 2\sum_{i<j}x_ix_j & \le (n-1)\sum_{i=1}^n x_i^2 \\ \end{align*} Then I'm thinking about using Cauchy-Schwarz inequality. But I feel stuck.

How can I show that $n\sum_{i=1}^n {x_i^2} \ge (\sum_{i=1}^n{x_i})^2$ for any natural number $n$ and $x_i \in\mathbb{R}?$ I assume there is something about Cauchy-Schwarz and induction, but I really don't see it.


This is my code import datetime str = "2020-12-24 14:05:56.449122" e = datetime.datetime.strptime(str, '%y-%m-%d %H:%M:%S.%f') print(e)  It shows this error--  time data '2020-12-24 14:05:56.449122' does not match format '%y-%m-%d %H:%M:%S.%f

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I recently purchased an iPhone 6s. It's the first iPhone I’ve owned with a Touch ID scanner.  After setting it up I’ve found it to be very accurate, fast and reliable. But sometimes I get prompted for my passcode instead of just being able to use my fingerprint. This appears to be random. It usually happens when I first use it in the morning, but not always!! And sometimes it happens at other times too.  I read this  but I’ve already tried deleting and adding my fingerprints again, but I didn’t notice any improvement.   Is my fingerprint Touch ID scanner faulty? When should I be prompted for my passcode?

Occasionally, when unlocking my iPhone or iPad, I get the following message:     Your passcode is required to enable Touch ID   Now this is not after a number of failed attempts or turning the device off. The device was used within the last 12 hours. Two of the devices are less than 2 months old, and one is a year old. Everything is up to date. It appears to be happening more-or-less at random.  Does anybody know why this message might appear?


I have been looking for this story for years.  I read it from an anthology around 1997, but the story could be older.  The story is about kids who are tested (I believe) and placed into job descriptions based on how they test.  I don't believe the protagonist gets what he is looking for, but he ends up getting selected for a "game".  In this game, there is a group of kids that go into a game world.  Each of the kids contributes to the group based on a skill that they have.  The world is simulated, but when one of them "dies", they wake up and try to figure out how to do it better the next time around.  One of the kids has a photographic memory and starts to draw up maps of what he remembers.  Another creates fishing gear with hair and a thorn (since they can only use what they find in the environment).  In the end, the game ends up being a trial run for sending the same group to a real planet to begin colonizing it.

I'm trying to recall the title of a young adult-targeted book. It was probably published by Scholastic, or at least sold through their take-home pamphlets, which means it was probably published before I started high school in 1996. It's about a group of teenagers who receive invitations to play a game at an invitation-only arcade. When they go there, they are put in an immersive VR game in which they must learn to survive on an alien planet. I believe the game ends and they wake up back in the real world after they fall asleep on the alien one. They are invited back the the game a couple times, and then it turns out…      …they go to play the game again, but they are unable to exit it. Eventually they realize that they actually are on an alien planet now, and that the previous game-playing sessions were just training for the real thing. I believe the epilogue states that all of the players have coupled up and the females have become pregnant, and they are optimistic about populating the new planet.   I think it was told in the first-person perspective of a female player. I don't think there was a real protagonist or strong conflict; just the group of players learning how to survive in the game. One of the other players had a photographic memory and used it to map the planet's surface. I think the cover art featured of a girl wearing a VR headset over her eyes, with her hair being blown back and her mouth open in surprise.


My cousin was supposed to fly back to Poland on May 27, but we just found out yesterday that her flight is cancelled and the earliest flight back is mid July - her six-month travel visa will expire June 12. We must extend her travel visa - we have no choice - how can we do this and not have to pay any fees... this all is due to the coronavirus.

I was admitted to the US as a visitor for a period which expires soon.  Until tonight, I had solid plans to return to Europe soon, prior to the expiration of the visa entry, but that is no longer an option.  I do not wish to overstay or do anything that would cause problems with future admissions or visa applications.  However, I can't go back to Europe because of new travel restrictions put in place by the US government (/resulting flight cancellations).    My passport still has years of validity left.  What is the best course of action? Is there any official guidance on this subject?  I am a little concerned that contacting officials to explain the situation would just lead me to be flagged for prompt enforcement action, but I don't want future problems.    Related:  and .    Update: OP now planning an escape to Canada.  The question still stands, though.


Is there any reason why the speed limit (light speed) is what it is?   Also, doesn't gravity and electromagnetism travel at the speed of light? What can we infer from this. (Is gravity massless?)

This is meant to be a generic question of the type that we get repeatedly on this site, in different versions:        Why do universal constants have the values they do? Can we predict their values theoretically? Do they change over time? How would the world be different if a particular constant had a different value?


I have been trying to use the Image  Module. I have installed all the required modules like    Imagecache Autorotate  Original image with style    Also changed the image field property     Apply style to image after upload = Image EXIF Autorotate   Nothing is happening I upload the image and no changes and it just upload the image as it is and if I try to rotate it manually nothing happens.  My requirements are as the image is uploaded the user sees the image and if wants to rotate it by clicking on it to do so.

On my site, users are able to upload images one at a time as nodes of content type Picture.  The Picture content type uses the core (D7) image field.  Some of my users have pictures which are taken such that they need to be rotated 90 or 180 degrees.  These users do not have easy access to image editing software, so I'd like to allow users to rotate the image on the edit node screen.  After the image is saved, I want to apply an image style (that forces scaling and cropping, etc.)  I'm also using the  module to allow users to crop the image if necessary.  Is there a module for this, or some easy way to do it in code?  (I'm not a developer.)  I would prefer to have a solution where I can present users with a button to rotate the picture; I don't want to give them a full image editor.  If such a solution is impossible, is there an easy way to rotate the images on the back end (for admins)?  I'm happy to do it myself, as I have to check all the images anyway.


I am trying to connect with Xero using Named Credentials. I am using oAuth2.0 authentication protocol.   I have created a Auth. Provider and Named credentials as shown in the image below     The Named Credentials Authentication Status is showing as pending. How to make it authenticated?  I have checked "Start Authentication Flow on Save" but once i hit on save i am getting this url "" and error code 500.  I think i am missing some steps. Please help.  Quick Update : Call back url i have in auth provider in Salesforce and in Xero connected app are different. Can it be the reason?  Thanks, Soumen

I am trying to do the integration between Salesforce and Xero by using Named Credentials (Authentication Protocol is OAuth 2.0). I created an Auth provider -    Then created Named credentials of OAuth 2.0 type and authenticated with required scopes mentioned in the Xero developer document.    When I am trying to run the below code to get the Account details from Xero, I am getting "AuthenticationUnsuccessful".  HttpRequest req = new HttpRequest(); req.setEndpoint('callout:XeroDev/api.xro/2.0/Accounts'); req.setMethod('GET'); Http http = new Http(); HTTPResponse res = http.send(req); System.debug(res.getBody());   This is the response -      {"title":"Forbidden","status":403,"detail":"AuthenticationUnsuccessful","instance":"707450d8-b455-47ec-a1b4-85bcb2cf80c9"}   Any suggestion on how to make it work by using Named Credential?  Xero URL -


I have string Put a "string" between double quotes. I have regex ".*"  Why it matches only "string" and not "string" between double quotes ?  I see step by step execution of  as:   Regex part " means: find first " in string. Regex part .* means: find any symbols afterwards in any count.   I see that  ".*" ends with ". But it is before .* and by logic everything after .* should just be ignored and every symbol should be matched ( .* stands for match any symbol any times). So can you please explain step by step execution of ".*" on Put a "string" between double quotes string?

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Why do we call $f(x) = \sqrt x$ a function, if by definition $y = \sqrt x$ is not a function since for included values of $x$, it gives us more than one value of $y$ considering the positive and negative answers in the radicals?

Why $f(x) = \sqrt{x}$ is a function (as I found in my textbook) since for example the square root of $25$ has two different outputs ($-5,5$) and a function is defined as "A function from A to B is a rule of corre- spondence that assigns to each element in set A exactly one element in B.", so $f(x) = \sqrt{x}$ is not a function?


I am in a situation where I am inside the following function:  CreateSomething<TI>(TI inputInterface) {     Type unknownType = SettingsSystem.GetTypeBasedOnInterface(inputInterface);     object otherInformation = SomeClass.GetInformation();     return base.CreateSomething<TI, T>(inputInterface, otherInformation); }   where  base.CreateSomething  returnObject CreateSomething<TI, T>(TI interface, object otherInformation = null)     where TI : class     where T : class {     return externalDll.DoStuff<T>(interface); }   What I need is a way to pass into T the class of the type unknownType like so:  return base.CreateSomething<TI, unknownType>(inputInterface, otherInformation);   instead of something like this  if(version == v1)     return base.CreateSomething<TI, MyClassV1>(inputInterface, otherInformation); if(version == v2)     return base.CreateSomething<TI, MyClassV2>(inputInterface, otherInformation);

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I just observed this random series of dots on the :        When I zoom in a lot, it looks like an arrangement of epsilon characters. I'm pretty sure it's a problem with the user's name because if you observe the text "answered x minutes ago by...", it's missing the username:        It remains on top of the sandbox post: now that there are new items on the front page, it has moved downwards.  I've tested this while signed in on Brave 0.24.0 for Windows 10 and signed out on Google Chrome 69.0.3497.100 for Windows 10. It doesn't disappear after reloading the page and it doesn't show up on other sites.

After viewing  (which contains a lot of Unicode) I had the idea to test if usernames allow ZALGO. To my dismay they do.  Is this wanted? Together with ShadowWizard we did a quick test. ZALGO has the ability to "break" comments.        Shouldn't that be avoided before someone start abusing it?    EDIT: little clarification: I asked around and it seems that some time ago Zalgo didn't work in usernames. So it seems that some "recent" change broke that rule. While it is true that missuses could be handled manually, it could be worth to check why the behaviour changed suddenly (assuming my sources where right).


I'm Getting white screen of death only for administrator user for the Drupal site i'm working on. I don't have any problem with users of other roles.  Once I try to log in using admin credentials I'm getting white screen of death (In Chrome - "This site can't be reached"). Then I have to type www.mysite.com/user/logout to logout admin session.  I have removed last two modules I installed to make sure that those modules does not interfere. Please help me regarding this. Thanks

I have a issue with my Drupal installation, for example:   when I enable or disable the modules, It redirects me to a blank page, when I create a new content type and save it, redirects me to a blank page, when I add a new view and save it, it redirects me to a blank page, when I try to clear the cache, it redirects me back to a blank page, or in similar cases.   Basically all the confirmation pages redirect me to a white screen. When I refresh it again, it shows me the page. I tried to increase the PHP memory value but it doesn't help.  Are there any other solutions for this?  The error which I'm having:      Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 8192 bytes) in sites/all/modules/views/plugins/views_plugin_localization_none.inc on line 1


Since I installed Ubuntu 20.04 the printer "has no connection" although it shows to be as chosen

Let's assume that one has some modern HP printer and/or scanner which is not supported by HPLIP package from official repository. Currently Ubuntu versions have :  trusty (14.04LTS): 3.14.3-0ubuntu3.4 xenial (16.04LTS): 3.16.3+repack0-1 bionic (18.04LTS): 3.17.10+repack0-5 focal (20.04LTS): 3.20.3+dfsg0-2 groovy (20.10): 3.20.5+dfsg0-3build1 hirsute (21.04): 3.21.2+dfsg1-2   What can one do if printer is supported in newer version of HPLIP (checked this in )?


I am trying to find someone that knows how to work the 14.04 Password Recovery.  I have tried a million ways can someone please help me with a walk-through that actually makes sense?  I have tried to mount and remount and add new password through command prompt I have used the "Standard way" and I don't know everything seems to do what it should but I think I am doing something wrong.  I basically just need to know the way to do a password recovery without being able to access admin account prior.  I changed the password and have no idea what it is because I was very tied when doing so would be awesome to get the appropriate and most efficient way to do recovery for password in a form that I can actually understand

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


Need to show all the record types created on Task object assigned to the logged-in user. I did not find any relation between the RecordType object and profile which can give me the details. Tried querying record type object with different users of different profile but always getting all the available records types irrespective of record types assigned to the logged-in user. How do get the assigned record types?

I would like to be able to execute a SOQL query that will allow me to see which users have access to a certain record type for a certain object.  For example, if I have a case record type called Phone Team, I would like to make a query that returns the names of all the users that have been assigned the Phone Team record type, as can be seen in the native user interface in a profile's Object Settings page.  So far I have managed to get a query that can get the names of all the users that have, for example, read access to the case object:  SELECT Assignee.Name FROM PermissionSetAssignment      WHERE PermissionSetId IN          (SELECT ParentId FROM ObjectPermissions WHERE SObjectType = 'Case'               AND PermissionsRead = true AND Parent.IsOwnedByProfile = true)   However, there doesn't seem to be any way to access record type assignment in the same way that you can object permissions.  I see from  that the info can be obtained via the metadata API, but I would much prefer to do it by SOQL if possible.  Thanks


EDIT: The original question is: Let $N$ be a countable set and $f$ a function that maps $N$ onto a set $M$. Prove that $M$ is countable.   Consider a countable set $N$ which the function $f$ maps [on]to a set $M$. I want to prove that the set $M$ also is countable, if $N$ is. The thing I am unsure about, is if $f(N)=M$?  Here is my proof, though:  Proof. Let $N \subset X$ be a countable set and $f:X \rightarrow Y$.  Therefore, $N\cup f(N)=\left \{ x_1, f(x_1), x_2, f(x_2),...,x_n,f(x_n) \right \}$ which can be expressed as  $N\cup f(N)=\left \{x_1,f(x_1)  \right \}\cup\left \{x_2,f(x_2) \right \}\cdots \cup\left \{x_n,f(x_n)  \right \}$.  Theorem (*), picked from Set Theory and Matrices by I. Kaplansky : A countable union of countable sets is countable.  Since we have a union of $n$ sets in which there is two elements, $N\cup f(N)$ is therefore countable according to (*).  Since $N$ is defined as countable and $N\cup f(N)$ is countable, thus $f(N)$ is countable.   The question is though, is $f(N)$ referred as "the same thing" as $M$? If the purpose is proving that an arbitrary set $M$ is countable, I am totally lost.  Does anyone here have any suggestions?

Is there anybody who can help me to prove that if $D$ is countable, and $f$ is a function whose domain is $D$, then $f(D)$ is either finite or countable?


I have got a computer running Windows 8.1 and Ubuntu and I can't change it via grub.


let us assume that i want to change the color of text given to element through css class. i want to change color from white to red. Please give answer in pure javascript my css code is like .input { background-color: black; color:white; }

How can I change the class of an HTML element in response to an onclick or any other events using JavaScript?


I have a list of objects in which each object has a property called "Frequency" and I want to be able to pick the top 10 objects that have the highest frequencies.   I saw some solutions that are kind of similar to what I am looking to solve using LINQ so any help is appreciated.

I would like to use Linq to query a bus schedule in my project, so that at any time I can get the next 5 bus arrival times. How can I limit my query to the first 5 results?  More generally, how can I take a slice of a list in C#? (In Python I would use mylist[:5] to get the first 5 elements.)


I'd like double bars over my X, that I can get using these overline symbols  \[\overline{\overline{X}}\]   I also tried the bar symbols, but they're misaligned over the X.  \[\bar{\bar{X}}\]   What I end up with is two bars, but the spacing seems too large between the bars. How do I decrease the spacing with double bars?

\overline{\overline{ABC}} produces a double bar over ABC, but it takes up too much vertical space.   How can I make the top bar closer to the bar below it?


Excuse my brevity, posting from mobile.  I noticed this when trying to edit my saved site list -  The size of each list item is nearly the size of the screen itself.

There is some unwanted extra spaces in between each site in the Your Sites section.  Steps to reproduce:   Touch the Nav Icon in the left top corner Touch the EDIT link in YOUR SITES Scroll the screen; there is unwanted spaces in between the each site   For reference I recorded the same:    Configurations:   App Version: 1.0.85 Device Manufacturer: Motorola Device Model: XT1033 OS Version: 5.1 (2)


In  &  it is said that it should be:  fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;   But in my Ubuntu (/etc/nginx/fastcgi_params), the setting is:  fastcgi_param   SCRIPT_FILENAME     $request_filename;   I am using the Ubuntu setting and didn't have any issue. What are the pitfalls?

I can't notice any difference if in my config file I set   fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;   Or:   fastcgi_param  SCRIPT_FILENAME    $request_filename;   What do they do respectively? Is one of the two better than the other?  Thanks in advance.


What directory does Xfce use when it mount Samba connection via own GUI File Manager (NetWork)? I try to look /mnt, /media. They are empty. I just want to use this mount point in a script and don't mount a new point.

Please note: I am two weeks old in Linux. I have found a lot of answers to this question on the internet, tried many, but all failed one way or another. Therefore I dare to ask once again in the hope that someone here could explain it simply :)  Pre-conditions:  In my institute, we have a Samba server. In Windows, it is accessed by going to \\xyz.220.131.233\ and entering the login abc and the password def.   In Ubuntu, I was able to do exactly the same using Nautilus, pressing Ctrl+L and entering smb://xyz.220.131.233/. It then asks for the login and the password and connects. I can even drag a folder from here to the 'Places' and have a shortcut to the remote location.   So far so good. I've just installed Matlab and want to open this remote location. Trying to cd to smb://xyz.220.131.233/ returns      Cannot CD to smb://xyz.220.131.233 (Name is nonexistent or not a directory).   A Mac user in my group told me I first mount the location, but he didn't know how to do it.   Is it true and how do I do it?


Somewhere on Stack Exchange I saw the equation     $$\gcd(2^m-1,2^n-1)=2^{\gcd(m,n)}-1.$$   I had never seen this before, so I started trying to prove it. Without success...  Can anyone explain me (so actually prove) why this equation is true?  And can we say the same when replacing the '$2$' by any integer number '$a$'?


I tried everything, the port and IP address way, and the main multiplayer way, but my LAN games won't work. Please help me.

My LAN server won't let my cousin join me or me join my cousin. It won't show up on the multiplayer screen - it keeps saying "scanning for LAN servers" but it never finds it. I am at his house and we use different computers but it won't connect. How can I fix this?


I have a question similar to a  about ejecting before shutting down.  Is it necessary or recommended practice to eject external drives before putting a Mac to sleep, whether it be via an explicit sleep command (e.g., from the Apple menu or other equivalent means), if Energy Saver puts the Mac to sleep, or the closing of a lid on a laptop Mac?  Edit: To add a clarifying point, I do not plan to physically disconnect the drive before waking the Mac from sleep?

Is it necessary or recommended practice to eject external drives before logging out, restarting, or shutting down? (The drives are not being unplugged.)  BTW, I am aware that I need to eject my external drives before unplugging them, I just don't know if it's necessary when logging out or shutting down. It seems to me this should be obvious, but I can't find an explicit answer to this question anywhere. I am interested in answers for Snow Leopard, Lion & Mountain Lion OS versions, as I have 2 machines, one with Snow Leopard, the other with Lion, & I'll soon be upgrading Lion to Mountain Lion.


Related to this question:    Will this bring a random selection of the data across for each object I select? Can I exclude the record data on an object or would I have to just delete it using dataloader?

We have a partial copy sandbox that we're using for development and testing.  This is really helpful as some of our applications internally store Salesforce id's.  However, there is a limitation with the partial copy as it only brings in 10,000 records per object from the production environment.  Unfortunately some of the id's we internally store are not being brought down into our partial copy which causes errors.  The 10,000 records that it did copy over aren't needed; I realistically only need 1 or 2.  Is there any way I can achieve copying over a specific record from the production environment?


I can find primary decomposition of ideal generated by two elements . For example ideal $\langle xy, y^2\rangle=\langle x, y^2\rangle  \cap \langle y\rangle $  But I face problem when I tried to find primary decomposition of the ideal $\langle x^3, x^2y, yz, xz^2\rangle $  in $K[x, y, z]$ . Can someone help me how can I find primary decomposition of ideal which is generated by 4 elements?   Thanks.

Can anyone give me an idea about the primary decomposition of the ideal $I=(x^3y,xy^4)$ of the ring $R=k[x,y]$?    I am trying to connect the primary decomposition with the set Ass(R/I) which i have find before..


I am working on a project that requires me to extract values from  rasters (viz the slope and TWI) for a set of point dataset that I have. I tried calculating the Slope, Flow accumulation and the TWI from the DEM (using ArcGIS 10.1) but somehow the slope and the TWI raster outputs seems erroneous!  For  slope, I get values ranging from 0 to 89 (file attached here) and for TWI, I get values between 19.58 and 9.40 (file attached), with no data data for most of the area! However, while extracting values for both slope and TWI to my point shape file, I mostly get 0 as the RASTERVALUE for most of the point data.  Could anyone kindly review  where exactly I am going wrong and how do I correctly get the slope and the TWI?

I am calculating Topographic Wetness Index for a study area using SRTM DEM (90 and 30m).   I've seen several versions of TWI (CTI).  I have been using: TWI = ln(As +1 / tanB)       where As = catchment area, B = slope (degrees/radians??)  When I run this function, the output contains negative values (using slope in degrees and radians).  Are negative values acceptable? Or does this indicate an error in the analysis??  I understand the output should be scaled to 1-10, but negative values seems counter intuitive. Could someone explain what negative values could mean (due to flat areas, no data values?)  On a side not, the calculations are being run on on a very large area, which overaps several watersheds. Is it appropriate to run TWI over such a large extent?


is, in my opinion, a really peculiar Aura, from the point of view of ruling's exceptions.    While the controller of the Aura remains the one who cast it, it is also true that the ability granted to the enchanted creature can be activated by the creature's controller only.    What happens, then, if after casting Singing Bell on an opponent's creature, I cast , choosing the opponent controlling a creature enchanted by Singing Bell   Singing Bell Strike returns to its owner's hand Singing Bell Strike goes to the graveyard   Although i think the correct answer is 2,I question it just the same because it is not easy to entangle like others. This question is different from others, in the way that a beginner may do not understand that paying the activation cost of an Aura placed on an opponent's creature does not mean that the Aura's controller is the opponent itself.  There is a point in the rule 303.4e : -"Only the Aura’s controller can activate its abilities" - that can be read in ways that lead to bad interpretations of this situation, and this in my opinion should be clarified.

If a player casts e.g.  on enemy creature, who is the controller of the ? And in case the enchantment on enemy creature has activated abilities, who can activate them? The enchantment owner, or creature controller?  I am asking because of . What happens to enchantments on creatures the player controls when  is cast on them? Do they go to owner's graveyard or hand?


Is there any reason why there are specifically Nine Riders? The Council of Elrond appointed Nine Walkers in response to the Nine, but why nine?

Is there any data in Tolkien (books/letters/etc..) to explain why there were precisely 9 Men rings and 7 Dwarf rings and 3 Elf rings? (the latter assumes that Sauron planned the number of Elvish rings to be 3 before he was thwarted by Elves making the rings themselves)  Was it because of the amount of tribes/kings he needed to deal with? Some magical/power limitations? Magical properties of numbers 9 and 7 (ala 7 Horcruxes)? A whim of Sauron's?    UPDATE: Looks like 3 and 7 are explained in the answers (3 elf lords and supposedly 7 Dwarf houses, though nobody provided canon proof).  What was NOT explained was why there were 9 Man rings?    If 9 was a meaningful amount, why? If it was merely "19-7-3" leftover, then why were there 19 total non-One rings made?


I have an issue where i am trying to write 'Hindi/Chinese' string to MySQL database. PHP is converting that to '????' and that is what i can see in mysql. To isolate issue when i directly put that string in mysql it writes it correctly. does anybody have any idea how i ca resolve this issue.   (my database and tables are in UTF8, PHP configuration set to UTF8)   for every connection to mysql i use set name and set character etc to UTF8  before interacting with mysql, send this two querys:  SET NAMES 'utf8'; CHARSET 'utf8';   When people dont know answer they will not accept the fact but start -ve voting or saying possible duplicate.. without understanding the problem.. which is not good..have great day...   Solution :-  i was using below queries after connection.  SET NAMES 'utf8'  SET CHARACTER SET 'utf8'   which was causing issue somehow i am not able to understand why?? but if i remove  SET CHARACTER SET 'utf8' and only keep SET NAMES 'utf8' everything works fine.  Thank you everyone for your help, for those to who said it is possible duplicate and -ve voted.

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.


I was trying to make a partition on my 1TB drive for installing Ubuntu 14.04. I had to remove an older partition in order to do it from my old Elementary OS distro. As I was restarting my computer and wiping the old partition I accidentally erased the Windows bootloader. As result my Windows can't boot. My problem with this is the partition I intend to install Ubuntu on. I'm using EaseUS to "cut" 50GB for Ubuntu. When I restarted my computer in order to apply the settings the error with the bootloader occurred and I don't know if the partition is actually ready to install Ubuntu.     (I’m working from "Try Ubuntu" right now.)  As you can see I have 3 drives. ⠀One 80GB for the Windows 8 ⠀The master storage which the partition is based ⠀and the Ubuntu partition on which I want to install Ubuntu.    Is it possible to see if the partition is safe?

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


I am getting a strange compiler error when trying to cast an argument in a templated constructor. Here is a minimal example:  #include <Eigen/Dense>  class Plane { public:     template <typename TVector>     Plane(const TVector& coefficients) {         coefficients.cast<double>(); // compiler error on this line     }  // This compiles fine //    Plane(const Eigen::Vector3d& coefficients) { //        coefficients.cast<double>(); //    } };  int main(){return 0;}   The error is:  expected primary-expression before 'double' expected ';' before 'double'   Since this class is never instantiated (main() is empty), I thought that the compiler wouldn't even see the function template at all, so I'm very confused as to how there is an error in this expression?

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'm currently using the following query to insert data into a table $query = mysqli_query($connection, "SELECT * FROM booked_activities INNER JOIN activities ON booked_activities.activityID = activities.activityID WHERE booked_activities.customerID LIKE $_SESSION['customerID']"); I've been instructed to use prepare statements for the $_SESSION['customerID']. Does this mean by just naming $_SESSION['customerID'] = $db_id? Or do I need to do something else to protect the data.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Every now and then, I receive a download link for a 6 GB .zip data archive that I'd like to:  download  unzip  recompress with 7z, with a password   I'd like to avoid using temporary files for each step, because it would use ~ 18 GB of write operations on my SSD, whereas only 6 GB are necessary at the end. On Linux, it would probably be wget ... | unzip ... | 7z ... with pipes. How to do this on Windows?  Note: this question is linked to  but not a duplicate, because the linked question only covers the "7z temp" part of the question, whereas I'm speaking about a download+unzip+7z chain. Also I'm looking for a command-line solution, and not a drag'n'drop GUI solution like .

Whenever I extract an archive using 7-Zip, it performs a two step operation. First it extracts the contents of the archives to a temporary folder, then Windows copies the files from the temporary folder to the target directory.   The second part of this operation can take some time, especially if there were a large number of small files in the archive. It seems like the operation could be sped up if 7-Zip just extracted the files directly to the target directory to start with. Is there a way to make it do this?


A line of 100 airline passengers are waiting to board a plane. Everyone has an assigned seat. Assume we know that the first, drunk passenger did not choose his own seat. All other passengers will go to their proper seats unless it is already occupied. In that case, they will randomly choose a free seat. You are person 100. What is now the probability that you end up in your own seat?

This is a neat little problem that I was discussing today with my lab group out at lunch. Not particularly difficult but interesting implications nonetheless  Imagine there are a 100 people in line to board a plane that seats 100. The first person in line realizes he lost his boarding pass so when he boards he decides to take a random seat instead. Every person that boards the plane after him will either take their "proper" seat, or if that seat is taken, a random seat instead.  Question: What is the probability that the last person that boards will end up in his/her proper seat.  Moreover, and this is the part I'm still pondering about. Can you think of a physical system that would follow this combinatorial statistics? Maybe a spin wave function in a crystal etc...


I watched this video by Matt Parker recently:    He calculates $i^i$ and his answer is around ~1/5 well more precise $e^\frac{-\pi}{2}$ which uses  $e^{i\theta} = \cos(\theta)+i\sin{\theta}$  where $e^{i\frac{\pi}{2}} = i$  so that $i^i = e^{\ln{i^i}} = e^{i\ln{i}} = e^{ii\frac{\pi}{2}} = e^{-\frac{\pi}{2}}$ which is around 1/5  whatever. If you use   $e^{i\theta} = \cos(\theta)+i\sin{\theta}$  you can also argue that  $e^{i\frac{5\pi}{2}} = i$  and so  $i^i = e^{-\frac{5\pi}{2}}$   which is obviously different to $e^{-\frac{\pi}{2}}$.  Where is the error?  WolframAlpha btw agrees with Matt ;)

According to WolframAlpha,  but I don't know how I can prove it.


$x\in\mathbb{R}$. I can prove that both sides converge, and maybe we should show  $\limsup\limits_{n\rightarrow\infty}\left|\sum\limits_{k=0}^{n}\frac{x^k}{n!}-\left(1+\frac{x}{n}\right)^n \right|<\varepsilon$, but the construction of the right hand side is a little tricky for me.

The Problem :  We state the following two definitions of the real exponential function from the . We're interested in showing that the two definitions are valid $($i.e. the defining sequence/series does converge to a unique real number$)$ and that the two definitions are equivalent.   I'm stuck at a couple of points $($which are described in highlighted lines$)$. Any help would be much appreciated. Thank you!     Definition $1$. The exponential function can be defined as the following limit of a sequence $$\exp x := \lim_{n \to \infty} \left({1 + \frac x n}\right)^n$$      Definition $2$. The exponential function can be defined as a  $$\exp x := \sum_{n = 0}^\infty \frac {x^n} {n!}$$   My Progress and two places where I'm stuck : Essentially the solution consists of three parts,  namely validity of definition $1$, validity of definition $2$ and equivalence of the two definitions.     Validity of Definition $1$. I'm stuck here! Can we show that the sequence $(a_n)$ given by $a_n = \left(1+\frac{x}{n}\right)^n$ converges for every $x \in \mathbb{R} ??$ Is it eventually monotone and bounded $??$   Validity of Definition $2$. The  of the power series is $$r=\lim_{n \to \infty}\left| \frac{\frac{1}{n!}}{\frac{1}{(n+1)!}} \right|=\lim_{n \to \infty}\left| \frac{(n+1)!}{n!} \right|=\lim_{n \to \infty}(n+1)=+\infty$$ Thus the infinite series in the right-hand side of Definition $2$ converges to a unique real number for all $x \in \mathbb{R}$. Hence the definition is well-defined.  Equivalence of Definition $1$ and Definition $2$.  There's this  of Definition $1$ $\implies$ Definition $2$ in the Pr$\infty$fWiki page, but it's kind of under construction and I'm not really convinced by it. So I decided to try to take my own shot at it.  For all $n \in \mathbb{N} \cup \{0\},$ let  $$T_n=\left(1+\frac{x}{n} \right)^n, ~S_n=\sum_{k=0}^n \frac{x^k}{k!}$$ We have to show that $\lim_{n \to \infty} T_n = \lim_{n \to \infty} S_n$  Now, \begin{align} T_n &= \left(1+\frac{x}{n}\right)^n\\ &= 1+n\cdot\frac{x}{n}+\frac{n(n-1)}{2!}\cdot\frac{x^2}{n^2}+\cdots +\frac{n(n-1)\cdots 1}{n!}\cdot\frac{x^n}{n^n}\\ &= 1+x+\left(1-\frac{1}{n}\right)\cdot \frac{x^2}{2!}+\cdots +\left(1-\frac{1}{n}\right)\cdots \left(1-\frac{n-1}{n}\right)\cdot \frac{x^n}{n!} \end{align}  Clearly, $$S_n-T_n=\left\{1-\left(1-\frac{1}{n}\right)\right\}\frac{x^2}{2!}+\cdots +\left\{1-\left(1-\frac{1}{n}\right)\cdots \left(1-\frac{n-1}{n}\right)\right\}\cdot \frac{x^n}{n!}\geq 0$$     I'm stuck at this point. Can we show that $S_n-T_n \leq B_n$ such that $B_n \to 0$ as $n \to \infty ??$


I have a radio button with an id="pay" and a function that i need to be executed if the radio buttton is selected.Any help?  function getMn() {     var int = document.getElementById("pay").value;     return int; }

How do I call onclick on a radiobutton list using javascript?