I am trying to restart a service without being root. Here is the code snippet where the command being used template {   source      = "{{vault_template_dir}}/agent.crt.tpl"   destination = "{{vault_tls_dir}}/agent.crt"   command     = "/usr/bin/systemctl restart vault.service" }  after researching and reading similar issues, I've tried to give a limited sudo command for the group I an using (user=vault, group=vault) by editing the /etc/sudoers file and adding the following line: %vault ALL=(root) NOPASSWD: /usr/bin/systemctl restart vault.service  However, I am still getting an error when I try and run the command. error log file: Apr  4 23:27:41 xxxxxx vault[133973]: Failed to restart vault.service: Interactive authentication required.  vault.service [Unit] After=network.service hostname.service consul-init.service consul.service Description="Hashicorp Vault - A tool for managing secrets" Documentation=https://www.vaultproject.io/docs/ StartLimitInterval=200 StartLimitBurst=5  [Service] User=vault Group=vault ExecStart=/usr/bin/vault server -config="{{vault_server_config_file}}" ExecReload=/usr/bin/kill -HUP $MAINIP CapabilityBoundingSet=CAP_SYSLOG CAP_IPC_LOCK LimitNOFILE=65536 LimitMEMLOCK=infinity Restart=always RestartSec=30  [Install] WantedBy=multi-user.target  can someone please help me with this issue?

I have a service (kado-demo.service) that a normal user (kado) should be able to restart without entering any password.   I created /etc/sudoers.d/user_restart and added  kado ALL=NOPASSWD: /bin/systemctl restart kado-demo.service   Permissions:  -r--r-----   1 root root   585 Mar  5 10:47 user_restart   As user k, I now should be able to execute the given command, but this happens:  /bin/systemctl restart kado-demo.service  ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===  Authentication is required to restart 'kado-demo.service'.   Multiple identities can be used for authentication:   (...)   Which is the same result as before I added the file.   The /etc/sudoers contains  #includedir /etc/sudoers.d   And I even get the same result when I add content of the user_restart file directly to /etc/sudoers.  I'm running out of ideas...


I understood how to use \ label {} and \ ref} to get the number of a section or subsection. I would like to know if it was possible to also obtain the title of a section or sub-section. For example (see VI.1 Test) where Test the title of the subsection

In my document I am referencing a section, e.g.  \section{My Section}\label{test} Also see section\ref{test}   This gives me, e.g.     Also see section 1   but what I want is:     Also see section My Section   How can I do that?  [Edit: comment moved to question body]  Of course it makes more sense to have something like "chapter 1 My Section", therefore mentioning chapter number and title. Anyways, this is just an example and you can easily combine both.


I have a middle ware that looks like this:  function(middleWareData) { // has more args, middleware doesn't know how many     if(middleWareData.passes()) {         origFunction(/* call with the rest of the args? */     } }   I'm not actually sure the best way to pop off the first argument from arguments then pass the rest to the original function. The original function is very dynamic (it's a connector, either to RabbitMQ which uses 4 arguments, or Redis which uses 2, or a unit test driver which just needs 1) so the middleware doesn't know how many arguments it's actually going to receive.  Using this: var args = Array.prototype.slice.call(args, 1) seems like a good start to get the true arguments. However, I believe I just turned arguments 2 through however many into one argument, that's going to be passed as an array to the first variable. Not what I want. How to do this right?

I’m looking for a trick about this. I know how to call a dynamic, arbitrary function in JavaScript, passing specific parameters, something like this:  function mainfunc(func, par1, par2){     window[func](par1, par2); }  function calledfunc(par1, par2){     // Do stuff here }  mainfunc('calledfunc', 'hello', 'bye');   I know how to pass optional, unlimited parameters using the arguments collection inside mainfunc, but, I can’t figure how to send an arbitrary number of parameters to mainfunc to be sent to calledfunc dynamically; how can I accomplish something like this, but with any number of optional arguments (not using that ugly if–else)?  function mainfunc(func){     if(arguments.length == 3)         window[func](arguments[1], arguments[2]);     else if(arguments.length == 4)         window[func](arguments[1], arguments[2], arguments[3]);     else if(arguments.length == 5)         window[func](arguments[1], arguments[2], arguments[3], arguments[4]); }  function calledfunc1(par1, par2){     // Do stuff here }  function calledfunc2(par1, par2, par3){     // Do stuff here }  mainfunc('calledfunc1', 'hello', 'bye'); mainfunc('calledfunc2', 'hello', 'bye', 'goodbye');


I am given a matrix $ A = \begin{bmatrix}5 & 7 & 3\\ 1 & 5 & 2\\ 3 & 2 & 1\end{bmatrix}$ and I have to express it in the form $A^{-1} = A^2 + pA + qI$ I thought for a while but cannot think of anything else other than computing $A^{-1}$ and $A^2$ and then actually solving it. Or a better method to multiply $A$ on both sides and then compute the result requiring me to compute $A^3$ in that case. My question is, that is it possible to find out this expansion using a better and more efficient method because the one above seems quite tedious.

Let $A$ be an $n \times n$ matrix. Prove that if A is invertible, then there exists a polynomial $p$, such that $A^{-1}=p(A)$  Thus far:  Let $W$ denote the $k$ dimensional A-cyclic subspace spanned by a vector $v$.  Then, $I_n=\sum_{i=0}^{k} a_{i}A^i$ for some scalar $a_i$.  What I want to do is multiply both sides by $A^{-1}$, so that way it just falls into my hands, but Im not sure that is 'legal'.


i have the following jquery datatable column 'DOB' associated with a function  columns:[ {     'data': 'DOB',     'visible': false,     'render': function (jsonDate) {         var date = new Date(parseInt(jsonDate.substr(6)));         var month = date.getMonth() + 1;         return month + '/' + date.getDate() + '/' + date.getFullYear();      } }, ]   but when i retrieve the value it retrieves as Json date /Date(-133335000000)/ why this happens and how do i fix this?

I have a controller action that effectively simply returns a JsonResult of my model. So, in my method I have something like the following:  return new JsonResult(myModel);   This works well, except for one problem. There is a date property in the model and this appears to be returned in the Json result like so:  "\/Date(1239018869048)\/"   How should I be dealing with dates so they are returned in the format I require? Or how do I handle this format above in script?


I have this challenge which in my head seems easy enough, but I can't seem to get my function right.  The challenge is as follows:  Create a function that determines if a given name is amongst the names.  So here is my array and function -   var family = ["Steve", "John", "Dani", "Bob"];   function searchName(f){    for (i=0; i<family.length; i++){      if ((family.lastIndexOf(f) != family[i]))        {family[i]}    }  }   searchName("Moe");   Now all this returns is undefined. Which is better than errors I suppose. What I want it to do is when I pass through a name that is not in the array to have it return a false statement, and if a name that is in the array, true. I also know that I need to throw in .toUpperCase and .toLowerCase in there as well to account for the case sensitivity. My assumption is that rather than just an if statement, I need an if/else if/ else.

What is the best way to find if an object is in an array?  This is the best way I know:    function include(arr, obj) {   for (var i = 0; i < arr.length; i++) {     if (arr[i] == obj) return true;   } }  console.log(include([1, 2, 3, 4], 3)); // true console.log(include([1, 2, 3, 4], 6)); // undefined


How can I add the applications icon to the Ubuntu launcher? I have tried in the search engine but I can't find a way to do it. For example, in mac, you can add the complete apps folder to the bottom bar, and once you click in the folder you will see all the apps. Can you please help me?

How can I add new programs to the launcher (or the dock in Ubuntu 17.10 and later) in Ubuntu?


How did Sally destroy the Moon in the 2013 movie Oblivion?

Simple question. Is it ever explained how the Tet succeeded in destroying the moon ? I can't recall this being explained.


I have the following armature, and I want to write a code sets the position each bone pose to a new pose. In the image below I've added cubes to indicate the desired positions for the armature. However, I couldn't find any systematic way to set the bones position. I found a way using convert_space, however I can't set separatelly the position of the tail and bone. Does someone have a good idea? EDIT: There is a similar question that shows how to properly get the bones position, however my intention here would be to SET the bones position, and that I couldn't do succesfully.

I have written some code that calculates the world space coordinate I want to move the bone to but i am having trouble figuring out how to get that back into the bones coordinates.  from bpy import context, data from mathutils import Vector  def test_empty(matrix, name):     # view matrix by applying it to an object     obj_empty = data.objects.new(name, None)     context.scene.objects.link(obj_empty)     obj_empty.matrix_world = matrix   armature = data.objects["Armature"] pbones = armature.pose.bones root = pbones["root"] hips = pbones["hips"] test = pbones["test"]  # calculate root root_matrix = armature.matrix_world * root.matrix test_empty(root_matrix, "Root")  # calculate hips hips_matrix = armature.matrix_world * hips.matrix test_empty(hips_matrix, "Hips")  # calculate bone test_matrix = armature.matrix_world * test.matrix test_empty(test_matrix, "Test")  # get offset of hips from root bone offset = root_matrix.translation - hips_matrix.translation print(offset)  # calculate new location in local space new_position = test_matrix.translation + Vector((0,offset.y,0))  obj_empty = data.objects.new("TEST", None) context.scene.objects.link(obj_empty) obj_empty.location = new_position  # obviously something wrong here new_position = armature.matrix_world.inverted() * new_position  # move bone to new location test.location = new_position


Edit: I have found a solution at  so I'm voting for this to be closed. In Proposition 7.8 of Rotman's Homological Algebra, we are given a direct system of modules, that is a collection of modules $\{B_i\}_{i\in I}$ along with maps $\varphi_i^j:B_i\to B_j$ between some of them that satisfy $\varphi_j^k\varphi_i^j=\varphi_i^k$. (The statement of the proposition is that Tor of the limit is the limit of the Tors, but that doesn't really matter for this question.) The proof begins:  For the inductive step, choose, for each $i\in I$, a short exact sequence $0\to N_i\to P_i\to B_i\to 0$, where $P_i$ is projective. Since the index set is directed, Proposition 5.33 says that there is an exact sequence $0\to \lim\limits_\longrightarrow N_i\to\lim\limits_\longrightarrow P_i\to\lim\limits_\longrightarrow B_i\to 0$.  Proposition 5.33 says:  Let $I$ be a directed set, and let $\{A_i, \alpha_j^i\}$, $\{B_i, \beta^i_j\}$, and $\{C_i, \gamma^i_j\}$ be direct systems of left $R$-modules over $I$. If $r : \{A_i, \alpha_j^i\}\to\{B_i, \beta^i_j\}$ and $s: \{B_i, \beta^i_j\}\to\{C_i, \gamma^i_j\}$ are morphisms of direct systems, and if $$0\to A_i\xrightarrow{r_i}B_i\xrightarrow{s_i}C_i\to 0$$ is exact for each $i\in I$, then there is an exact sequence $$0\to\lim\limits_\longrightarrow A_i\xrightarrow{\overrightarrow r}\lim\limits_\longrightarrow B_i\xrightarrow{\overrightarrow s}\lim\limits_\longrightarrow C_i\to 0.$$  I have no problem choosing the modules $P_i$ and $N_i$ for each $i$, but in order to invoke the Proposition 5.33 we need $P_i$ and $N_i$ to be direct systems as well such that the necessary diagrams commute. It seems that we're missing the maps $\pi_i^j:P_i\to P_j$ and $\nu_i^j:N_i\to N_j$, and it is not clear to me that such maps exist. Is there some obvious way to define them that Rotman is assuming here? Or is there some more work to do to define them that's been swept under the rug?

In Cartan and Eilenberg's Homological Algebra, they claim the following     V9.5* If $A = \lim\limits_\longrightarrow A_\alpha$ then there exist projective resolutions $X_\alpha$ of $A_\alpha$ forming a direct system such that $X = \lim\limits_\longrightarrow X_\alpha$ is a projective resolution of $A$.     I'm assuming they intend for a direct system to mean, as usual, that the index set is directed and that there are maps so that we have maps $\phi_{\alpha \beta}: A_\alpha \rightarrow A_\beta$ for any $\alpha \leq \beta$ respecting transitivity and being the identity in case $\alpha = \beta$.    I really want to believe this lemma, but I'm having trouble with their brief proof.  This result surprises me because it would immediately imply that Tor commutes with filtered colimits, and the proofs of that known to me are both a good deal more involved than this.     The idea of the proof is simple.  They construct the projective resolutions $X_\alpha$ simultaneously, and one step at a time just like any projective resolution. At each step they claim that the partially constructed resolutions form a directed system with maps induced by the previous step.  This is where I get lost.    Consider the first step.  Cartan and Eilenberg start the resolutions off with $F_\alpha \rightarrow A_\alpha \rightarrow 0$.  They claim that the maps $A_\alpha \rightarrow A_{\alpha'}$ induce maps $F_\alpha \rightarrow F_{\alpha'}$.    But why, I wonder, should it be the case that $F_\alpha \xrightarrow{\phi_{aa'}} F_{\alpha'} \xrightarrow{\phi_{a'a''}} F_{\alpha''}$ is the same map as $F_\alpha \xrightarrow{\phi_{aa''}} F_{\alpha''}$??.  The induced maps come from nonuniversal lifts, so, as far as I can tell, we can only say that $\phi_{a a'}\phi_{a' a''} - \phi_{aa''}$ maps to $\ker(F_{\alpha''} \rightarrow A_{\alpha''})$, but we haven't actually constructed a directed system of modules $F_\alpha$.    Is there something I'm missing here? Is their argument perfectly fine as is and I'm just being dense? If not, is there a fix to it?


Is there a simple way to see that $SO(4) \simeq SO(3)\bigotimes SO(3) /\mathbb{Z}_2$ ?

Why is $SO(3)\times SO(3)$ isomorphic to $SO(4)$?


Is there a command, or maybe ls has a flag that also display the filesystem the contents of a directory is mounted on?

I am looking for a quick way to find the mount point of the file system containing a given FILE.  Is there anything simpler or more direct than my solution below?  df -h FILE |tail -1 | awk -F% '{print $NF}' | tr -d ' '   A similar question "" uses the current disk's device node as input, and not an arbitrary file from the disk ...


Jack Daniels Tennessee honey,  in the freezer for over a year. Is it okay to drink?

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


I have looked at several solutions to solve my issue but nothing seems to be working for me. I want my out put to align all the names, numbers chosen, and prize winnings on this code. Currently it outputs this:   3454 Atkins, Joe  7  6  5  4  3  2  1         7         $20.00     4321 Barber, John      11  22  7  8  45  12  10         1         $0.00     8976 Dollar, Kim      44  33  22  11  10  9  4         1         $0.00   I believe I would need the names to right align to fix this issue but nothing I have tried is working. Here is my code:    cout << student_info[i].id_num;  cout << setw(10) << student_info[i].student_name << setw(10);   for(int j = 0; j < LOTTERYNUMBERS; j++)      cout << student_info[i].lotteryNumbers[j] << "  ";   cout << setw(10) << student_info[i].lotteryMatches << setw(10) << setprecision(2)       << fixed << showpoint << "$" << student_info[i].prizeMoney << endl;

I'm pretty sure this is a simple question in regards to formatting but here's what I want to accomplish:  I want to output data onto the screen using cout.  I want to output this in the form of a table format.  What I mean by this is the columns and rows should be properly aligned.  Example:  Test                 1 Test2                2 Iamlongverylongblah  2 Etc                  1   I am only concerned with the individual line so my line to output now (not working) is  cout << var1 << "\t\t" << var2 << endl;  Which gives me something like:  Test                 1 Test2                  2 Iamlongverylongblah         2 Etc                  1


Is there a way to permanently block sites from showing in Google search results?  By permanently I mean that I don't want to exclude websites manually in every search.  When I search for some web development questions, I like to see results from Stackoverflow and some other websites, but I hate to get results from OSDir and other websites that just duplicate SO content on their side (which btw I think is ridiculous).  Any idea?

I regularly find sites that copy content from elsewhere (mailing lists, etc) while not providing any added value. Quite to the contrary, they are pretty heaped with ads.  I'd like to remove those sites as permanently as possible from my Google search results. Any ideas?


I am not looking for an answer on this. Just need to clarify why my approach is failing -  $N_1 + N_2 + N_3$, i.e. single digit, double digit, 3 digit  single $= 2, 4, 6, 8$, i.e 4   double = X non-zero $= 8 \cdot 4 = 32$ X zero $= 9 \cdot 1 = 9$  Now the confusing part three digit, breaking into 4 cases   X zero zero $= 9$   X nz nz $= 7 \cdot 8 \cdot 4 = 224$   X z nz $= 8 \cdot 1 \cdot 4 = 32$   X nz z $= 8 \cdot 9 \cdot 1 = 72$  Three digit total comes to $= 9 + 224 + 32 + 72 = 337$. This answer is wrong and it should be $328$. What am I missing in the logic? Please suggest.


I have a home server running Centos 7 that I'm using to host various different servers - a webserver, two Minecraft servers, and a PLEX server. Currently I have a  4TB HDD which serves as the primary storage, housing the OS and all files, and a 240GB SATA SSD which I'm using as a cache drive with Lvmcache. I've begun to run out of space on the 4TB disk, so I'm looking for a way to migrate this single disk to RAID 5 without needing to reinstall and reconfigure the OS and all software. I've chosen RAID 5 as it appears to be the best balance of price, performance, and redundancy for me.  If I were to purchase 3 additional drives and build a RAID 5 array with them, is there any possible way to clone the data and OS from the existing drive onto the array, verify that this worked correctly, then erase the single drive and join it into the array? Alternatively, should I purchase an additional, smaller drive to house the OS and clone it there, then simply use the RAID array for mass storage?  I have never previously had the occasion to use a RAID array, so I have no prior experience with them. I did find a piece of software called "Raider" that looks like it might possibly be up to the task, but, again, I have no experience with it; better safe than sorry!  Edit: output of "lvs -a -o +devices && df":

I have a Virtual Host server build with Ubuntu and Xen  SO   Ubuntu 12.04.1 LTS 64Bits xen-hypervisor-4.1   Disk   Hitachi SAS 15K 147GB (x2) in a Volume group sda1 1GB /boot  sda2 146GB lvm sdb1 147GB lvm   Every virtual machine has minimum two LV (root, swap)  I have available three new disks Hitachi SAS 15K 600GB I want to create a RAID5 with this disk and migrate all partitions from the VG. Is this is possible and how?  I know how to create a simple RAID with  but I want have the flexibility of the VG on my RAID. Is this is possible and how?  My need is to have the flexibility of VG but RAID redundancy.


This question is not a duplicate. Please read it before you mark it as such.  Is it possible to assign nicknames or aliases to users on a Linux sever and SSH into the server using the nicknames? I am thinking something along the lines of the aliases for various commands that get added to the .bashrc or the .bash_aliases file, e.g.:  alias grep='grep --color=auto'   For example, if there is a requirement (business rule) to set up users on the server with their full name, e.g., john_smith instead of just their first name (john) but we want to nickname john_smith fruitloops and we want John to be able to:  ssh john_smith@ip_address   as well as:  ssh fruitloops@ip_address   If it is possible, where would the mapping between a user and their nickname be set up? Would the user fruitloops also need to exists on the sever?  This question is about setting up an alias for a user, not a host.

There are a few SSH destinations I will frequently be connecting to and I'm wondering if rather than remember the IP address I can create a host alias for them.  I'd like to be able to use...  ssh -p xx user@domain.ssh  I've tried establishing this host in /etc/hosts and unless there's a service I needed to restart it had no effect.


Find the minimum of the square of distance between   $a=(u,\sqrt{2-u^2})$ and $b=(v,\frac{9}{v})$   This is a preparation Question PUTNAM contest. The theme of the section is "inequality". I can not make the problem from inequality. Is anyone is able give me a hint (using inequalities)?  Actually I have $(u-v)^2+ (\sqrt{2-u^2}-\frac{9}{v})^2 \geq  (u-v+\sqrt{2-u^2}-\frac{9}{v})^2$ by Arithmetic and Geometric Means Inequalities.

Find the minimum of $\displaystyle (u-v)^2+ \left(\sqrt{2-u^2}-\frac{9}{v}\right)^2$ for   $0<u<\sqrt{2}$ and $v>0$.   I think I have to use the Arithmetic and Geometric Means Inequalities. Or $\displaystyle \frac{1}{2}(u-v)^2+ \left(\sqrt{2-u^2}-\frac{9}{v}\right)^2 \geq  \frac{1}{4}\left(u-v+\sqrt{2-u^2}-\frac{9}{v}\right)^2$ by Chebychev inequality. Is anyone is able to give me a hint how to finish it?  I think I have to use the Arithmetic and Geometric Means Inequalities.


When I click Mintty's shortcut, it opens, if I click it again, it just returns focus to the window it had opened earlier. This is the shortcut's command I am using (I came to use it because it avoids a short wait before Mintty starts up as compared to mintty.exe -):  C:\cygwin64\bin\mintty.exe /bin/sh -lc 'exec bash'   How do I have the start shortcut for Mintty open another window instead of bringing focus to the old one?  I am using Windows 8.  Note: if I just enter the above command in Run or cmd it works fine – I can open multiple windows.

When selecting an application from the Windows 8 Start screen, if I already have that application running the default behavior is to set the focus to the most recently opened window.  Is it possible to change this behavior so it will always open a new instance of the application without having to right-click and select "Open new window"?


When viewing the home directory with Nautilus, files and directories starting with '.' are now visible.  Some examples of files/dirs that could earlier only be viewed by running ls -a, but are now even visible in Nautilus are - .bashhistory, .git, .gitignore, .config etc.  I am not sure how this happened and could not find an option to revert this under Nautilus preferences menu.   Help in reverting to old system would be appreciated.

When opening a folder, by default it always shows hidden files. I can uncheck the view option and they disappear but reappear on the next opening with the hidden files option re-checked. Have I inadvertently changed an option or is this a bug? No-one else seems to have encountered this.


i would like to know if the following explanation is already correct in order to determine the complexity of Fibonacci function ?

I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been trying to figure out the computational complexity of the naive version of the Fibonacci sequence:  int Fibonacci(int n) {     if (n <= 1)         return n;     else         return Fibonacci(n - 1) + Fibonacci(n - 2); }   What is the computational complexity of the Fibonacci sequence and how is it calculated?


I am specifically interested in whether all proteins and nutrients lose their structure permanently because of the very high temperature of ultra-pasteurization.  What is the case for pasteurized milk?

What is the effect of pasteurization and ultra-pasteurization on proteins, enzymes, and nutrients found in milk and other dairy products?


I have a mid 2011 MacBook air with 128 gb but from every app it says im only using 98 gb while the system has 76.45 gb that its taking that I cannot locate anywhere. I have tried everything I can think of from listing local snapshots to putting it into recovery mode. Nothing works. I am not the most tech savvy but any way to help would be amazing.

On my MacBook Pro Retina late 2014 running OS X Yosemite, there's something weird going on.  If i look at the storage tab in the "About my Mac" menu, I use only 67 gigabytes of storage but it says 151 gigabytes are used on apps alone.   Maybe this screenshot is a better explanation:    Is someone else experiencing this problem?


Prove that $\dfrac{\mathbb{Z[i]}}{(1+4i)} \cong \mathbb{Z_{17}}$. My attempt: $\phi:\mathbb{Z} \rightarrow \mathbb{Z_{17}}$ be the natural (onto) ring homomorphism, sending $a \mapsto \bar{a}$. Hence by universal property of polynomial rings there exists a (onto) ring homomorphism $\phi':\mathbb{Z[X]} \rightarrow \mathbb{Z_{17}}$ such that $\phi'(x)=\bar{4}$  and $\phi'(n)=\phi(n)$ for all $n \in \mathbb{Z}$. Clearly, $(1+x^2) \subset \operatorname{Ker}\phi' \implies$ we can obtain a (onto) ring homomorphism $\phi'':\mathbb{Z}[X]/(1+x^2) \rightarrow \mathbb{Z_{17}}$ where $\bar{x} \mapsto \bar{4}$ Since $\mathbb{Z}[X]/(1+x^2) \cong \mathbb{Z[i]}$ with $i \mapsto \bar{x}$, one can conclude there is an onto ring homomorphism $\Phi:\mathbb{Z[i]} \rightarrow \mathbb{Z_{17}}$ where $i \mapsto \bar{4}$. $1+4i \mapsto 0$ one has $(1+4i) \subset \operatorname{Ker}\Phi$. How can I conclude the reverse inclusion?

A very basic ring theory question, which I am not able to solve. How does one show that    $\mathbb{Z}[i]/(3-i) \cong \mathbb{Z}/10\mathbb{Z}$. Extending the result: $\mathbb{Z}[i]/(a-ib) \cong \mathbb{Z}/(a^{2}+b^{2})\mathbb{Z}$, if $a,b$ are relatively prime.   My attempt was to define a map, $\varphi:\mathbb{Z}[i] \to \mathbb{Z}/10\mathbb{Z}$ and show that the kernel is the ideal generated by $\langle{3-i\rangle}$. But I couldn't think of such a map. Anyhow, any ideas would be helpful.


My question is does this series $\sum_{n=1}^\infty$ $\frac 1{n^{1+{1/n}}}$ converge or diverge?  My immediate thought was that this looks like $\sum_{n=1}^\infty \frac 1n$ which I know diverges.  My thinking was that my series diverges as well because for $n$ large, the series would tend to the $\sum_{n=1}^\infty \frac 1n$, but I wasn't sure.

There's a rule of thumb that if $a>1$ then the series: $\displaystyle\sum^\infty_{n=1}\frac 1 {n^a}$ converges.  Now the series: $\displaystyle\sum^\infty_{n=1}\frac 1 {n\cdot n^{\frac 1 n}}=\sum^\infty_{n=1}\frac 1 { n^{1+\frac 1 n}}$ diverges (by the limit comparison test) but we have here a series such that the exponenet is larger than $1$ for all $n$.   So my question is why is the rule of thumb doesn't work in this case?


I have heard about the usage of "be" in specific situations like 2 days, 5 dollars,...  For example:     Two days ____ enough for us   Should I use "is" or "are"? I see both of them are appropriate.

Is the following correct?     Can I get some chocolate for myself? Yes, you can but not much.   Is two bars OK?   Is there any rule to explain the sentence above?  The dialogue's taken from Grammar Textbook Round-Up Level #3.


My Gmail address is my full name with a dot between my first and last name. I periodically receive emails for another person with the same name add me however his address DOES NOT have a period between his first and last name.   I usually inform the sender that the email was delivered to the wrong person (ray.mckenzie@)and to make sure they do not put a dot between the first and last name (raymckenzie@). The sender replies that they have in fact NOT put a dot between first and last name and still the email gets delivered to me.   Can you look into this and let me know what's going on?

I'm not really sure how email routing works, but someone ordered something on Amazon and I received the email instead of them.  Or maybe we both got it, I don't know.  The order doesn't show up in my account, so I'm certain I wasn't charged for it, but I shouldn't be getting other peoples' emails.  We'll say that my email is johndoe1@gmail.com, and somebody who's email is john.doe1@gmail.com places an order on Amazon.  The confirmation email is sent to me at johndoe1@gmail.com.  I checked the email header, and it did say To: john.doe1@gmail.com which is not my email address.  At first I thought that Google ignores periods in email addresses, but I tested the account setup and it doesn't give any error when you put a period in the address.  I didn't create the account; I just used the "check availability" function and the address I chose with a period was fine.  Maybe someone with knowledge about how Email works could tell me why this happened.  Is this a bug in the way Amazon sends emails?  Or is it a bug in how Google receives them?  Who should I report this issue to?


I have read the following post, and have some questions:    I see you can choose between PDO and MySQLi. Is there any difference, and how do I choose between them?  In the example code they use :name for PDO queries and ? for MySQLi. What shall I replace those with? Just a PHP variable?  Finally, how do I prepare to begin using PDO on my website? Is there any thing I need to install or add, or can I just begin, and use the same code as provided in the examples?  Thank you

In our place we're split between using mysqli and PDO for stuff like prepared statements and transaction support. Some projects use one, some the other. There is little realistic likelihood of us ever moving to another RDBMS.  I prefer PDO for the single reason that it allows named parameters for prepared statements, and as far as I am aware mysqli does not.  Are there any other pros and cons to choosing one over the other as a standard as we consolidate our projects to use just one approach?


I'm Thu and i'm from Viet Nam.This is my problem: My computer was setup dual the Windows 7 and Windows 8.1 So how can i install ubuntu in my computer. Thank!

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


could anyone help me with the limit of the following sequence : $S_n=\sqrt[n(n+1)]{\prod _{k=0}^{n}\binom{n}{k}}$ Using the GM-AM inequality, we can prove that : $S_n\le \frac{2}{(n+1)^{\frac{1}{n}}}\rightarrow2$  and I've been trying to find a sequence $u\le S$ that converges to $2$ (eventhough I have no reason to believe such a sequence exists !) but I can't find any. Thank you in advance for your help !

$\{{C_k^n}\}_{k=0}^n$ are binomial coefficients. $G_n$ is their geometrical mean.   Prove  $$\lim\limits_{n\to\infty}{G_n}^{1/n}=\sqrt{e}$$


This happens in all questions on all Stack Exchange sites.   App Version: 1.0.85 Device Manufacturer: Motorola Device Model: Nexus 6 OS Version: 6.0.1 (2756745)

Since the last update (v1.0.85), I am getting all the question pages blank on the Android app. For those who are confused with the image, I'm using RtL (Right-to-Left) layout.        If I scroll down (quite a bit) I can see the question. But even then I cannot see the question title, the related comments or answers.         App Version: 1.0.85 Device Manufacturer: LGE Device Model: LG-D620   OS Version: 5.0.2 (152541901f156)


In Vista file explorer, how can I use the search to find only directories matching my input?  The find is quite useful and convenient, but I cannot find a way to restrict the result list to directory items as I could in XP.

I've had some issues with the new search function in Windows 7. The Search in Windows XP was packed with so many more options. The only option I can access now are Date Modified and Size.  Any pointers to how to get more options in the Windows 7 Search, or links to external programs that can make my life easier?


I try to do the following:  I have a script that uses diffrent codes to retrieve from a xml file. I try to store those in the database.  An example is:  str_replace(array_keys($replace), $replace,preg_replace('!\s+!', '-', $permanameproduct))   When I retrieve this frome the database I get this it as a string, but i would like it to return the value from expression.  Is there a way I can do this in PHP, I was trying to use eval() but i could not get it working so far.  Thanks :)

I'm trying to write a page that calls PHP that's stored in a MySQL database. The page that is stored in the MySQL database contains PHP (and HTML) code which I want to run on page load.  How could I go about doing this?


$f(x)=\int_{0}^{x}\cos(1/t)dt$  Then$f'(0)=?$  I tried $f'(x)=\cos\left(1/x\right)$, but then I get into trouble.  Hope for your help

I'm trying to prove that $$\lim_{h \to 0}\frac{1}{h}\int_0^h{f(t)dt} = 0$$ where $$f(t) = \begin{cases}\cos{\frac{1}{t}} &\text{ if } t \neq 0\\ 0&\text{otherwise}\end{cases}.$$ Can someone give me a hint where to start? Darboux sums somehow seem to lead me nowhere.  NOTE: I cannot assume that $f$ has an antiderivative $F$.


I have Ubuntu 16.04, my problem is that when the correct Password is entered I get the following message:  Failed to start session   Any other entry returns:  Invalid Password   I am locked out from the computer, how can I fix this?

While upgrading to 14.04 using sudo do-release-upgrade my network connection was interrupted and several packages failed to upgrade.  Running do-release-upgrade again reported No new releases found but apt-get listed many packages "kept back", so it seemed the system was in an intermediate state. I ran apt-get dist-upgrade which installed those packages again, then apt-get autoremove after which apt seemed happy.  However, after restarting I cannot log in at the GUI prompt. After entering my password the error "Failed to start session" appears in red. I am still able to log in from the command prompt, but I don't know what to do to solve or debug the GUI log in failure.


I did a fresh install of Ubuntu 14.04 and tried skype, it worked.  Now I decided to install the video driver from NVIDIA website, install went successful but now Skype is not starting anymore, no error, nothing.  Any help to diagnose this problem, please?  Thank you.

just installed Skype 4.3 on my laptop (Dell Inspiron N5110) running Ubuntu 14.10 following all the instructions from every possible source  but when I try to launch it absolutely nothing happens.   What can I do to get it working? Here's what I get:  andi@Andi:~$ skype skype: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory


Am using the  and  module on my site.  I have indexed users on my site and added the corresponding view to display the search result.  My question  is how do i add the user picture. This does not appear to be included in the views field by default.

I am building a drupal site using Views, search API module and user-points module.  I created the "database server", and indexed many fields of nodes.  I created a search page using views and the search API, that present content (image, title etc.) In addition, I want to add to every content in this search view the name of the author that wrote it, his author picture.  I add the Indexed Content: Author relationship. Unfortunately, I can't find a way to add the author picture and the current total point to my view.  Can somebody advice how to do that?


how do I install Pro Lighting Sky and Studio in Blender 2.8?

There is this addon that was built called Window Generator 2. It can be . However, when I go to the download link it shows up in a new tab as a bunch of code.  How can I download and use this addon in Blender?


For a historic text, how can I typeset a lower case e above another vowel, like e over u?  The oldgerm package provides that, but only for its fonts like Fraktur:  \documentclass{article} \usepackage{oldgerm} \begin{document} \frakfamily *a *o *u       \end{document}   How do I get that in a modern font like Helvetica?

I'm trying to display the above mentioned symbols. These are German historical letters which I need to mention in my thesis. I just found how to display letters with an "o" above them, but nothing with an "e". Any ideas?


I have installed Ubuntu 12.04 in my computer with windows 7 on it. Most of my games are installed in windows.So I would usually load into windows. After installing Ubuntu, it is the loader of Ubuntu that shows up before that of windows. I this question I would like to know to make the windows loader to appear before that of windows and to have a link in the windows loader to the Ubuntu loader like the one that is in the Ubuntu Loader.

How do I set the bootloader so that in my dualboot with Windows 7/Ubuntu 11.04, Windows start up as standard instead of Ubuntu?


In the original model there isn't any edges there, but there are some edges on render. What's happening here?  File:

I think my question relates to a fundamental of 3D modeling that I haven't picked up on yet. It's very simple:  Let's say I have a flat quad. A plane on the XY plane inserted into am empty blender file is a great example. Now let's say I start moving each of the 4 vertices around on in any direction, especially the Z axis.   At this point, there would still be one face, but its extremely unlikely that the face would be planar (I just learned this word). So blender does its best to make sense of what this should look like.  The problem I'm having is that it seems like my quads are always like this, but they never look the way I want. There are edges and seams that look like they are dangling in space, and what tends to happen is that my mesh looks great when viewed from most angles, but if you look at it from just the right angle, you notice the dangling edges or sometimes even some kind of impossible geometry. And so I might try to nudge the problematic vertices around, but this often seems to either make it worse, or just hide the bad geometry until you see it from a different angle.  For me, this always seems to happen whenever I'm trying to move vertices to add roundness to something that is originally square.   There is another question on here about how to actually flatten the quads. That's great, and I might use some of the techniques mentioned there. My question is:   Why does this happen? (Can someone explain this better?) What are some tips and tricks to avoid this situation? What are some tips and tricks to mitigate this situation?   EDIT Here is an illustration:  The overall mesh as viewed from a distance looks decent (for my skill level)    But if you get closer and look from a certain angle...    Super close up:    The "edge" that is pointed to by the arrow is not actually an edge, but some kind of artifact created when blender tries to show the quad. The way the vertices are positioned, it shouldn't actually be possible to see the sliver of the face that I marked in red, since this face is supposed to be around the corner from the edges. The edges should form the silhouette on the right side of my figure.     Here is the side view. Maybe it is the angled topology that skews the face in a funny way?  But I'm not looking for help with this one particular issue, but rather a better understanding of why this happens, and ideas to prevent this in future models.


I am running the following command, but it is not performed recursively:  find . -name *.java   I know there are java files further down in the current directory but it is performing the find on the current directory only. I am using OS X, 10.9.

find . -name *.jks -print 2>/dev/null   returns files of extension jks that do not have underscores as part of their name.  Much to my surprise, I have just discovered that * does NOT substitute the underscore.  find . -name *_*.jks -print 2>/dev/null   returns files of extension jks that have one underscore.  How do I search for files that have 0 or more underscores?  Using OSX Mountain Lion.


I have problem answering this question. I know the answer is not possible but I by simply substitute the 3 and 4 but I have clue why so. Can anyone give me an explanation or a correct way to answer this question properly.  Any help is appreciated. Thanks :)

I have seen other criteria for divisibility by 7. Criterion described below present in the book Handbook of Mathematics for IN Bronshtein (p. 323) is interesting, but could not prove it. Let $n = (a_ka_{k-1}\ldots a_2a_1a_0)_{10} = \displaystyle{\sum_{j=0}^{k}}a_{k-j}10^{k-j}$. The expression $$ Q_{3}^{\prime}(n) = (a_2a_1a_0)_{10} - (a_5a_4a_3)_{10} + (a_8a_7a_6)_{10} -\ldots  $$ are called alternating sum of the digits of third order of $n$. For example,  $$ Q_{3}^{\prime}(123456789) = 789-456+123=456 $$ Proposition: $7 | n \ \Leftrightarrow \ 7 | Q_{3}^{\prime}(n)$.  proof. ??  Thanks for any help.


How can I ensure that any mail received or sent via our Google Apps domain, is automatically forwarded on to the domain administrators mailbox?

Is it possible to create an autoforward rule and/or a mirror-like service for current users? We use Google Apps for Enterprise (paid version—includes Postini).  I need that emails sent from/to a specific user will also be sent to another email. Of course, this needs to be discrete, without the user knowing that.  Is it possible in any way?   Having a forward address in the user's settings box is, of course, not an option.


I have filled the form and paid the application fee for a standard visitor visa on GOV.UK website. I am an Indian national planning to visit the UK for tourism. When I visit the VFSglobal website to book an appointment, it does not list "Standard Visitor Visa" as an option. Kindly help.

I am trying to purchase priority service through vfs for my standard visa application in USA. However, no option related to visitor visa under "reason for visit" box. How shall I proceed?  Thanks!


I was just wondering what the bests way to include variables in printed-lines.  For example would it be better to do:  print("The cost will be $" + str(cost) + ".")   or  print("The cost will be ${}.".format(cost))   Thanks,  David  P.S. when explaining, note that I am new at programming in general, thanks :D

In Python, the where and when of using string concatenation versus string substitution eludes me. As the string concatenation has seen large boosts in performance, is this (becoming more) a stylistic decision rather than a practical one?  For a concrete example, how should one handle construction of flexible URIs:  DOMAIN = 'http://stackoverflow.com' QUESTIONS = '/questions'  def so_question_uri_sub(q_num):     return "%s%s/%d" % (DOMAIN, QUESTIONS, q_num)  def so_question_uri_cat(q_num):     return DOMAIN + QUESTIONS + '/' + str(q_num)   Edit: There have also been suggestions about joining a list of strings and for using named substitution. These are variants on the central theme, which is, which way is the Right Way to do it at which time? Thanks for the responses!


For each article, I get a .bib file, then I have to copy it to the main bib file I'm using with bibtex. Is there tool, even outside of latex programming, to merge all .bib files to a single one and avoid duplication of references in the main bib file?  It may require to use another programming language to do it. I'm asking if there something already done. Otherwise I will code it in Python.  My code is like that:  \documentclass[12pt]{report} \usepackage[backend=bibtex]{biblatex} \addbibresource{main.bib} \begin{document} \cite{Dick2009} \end{document}

I was constructing a BibTeX file for my Thesis. At the middle of that I had copied that bib file to another document I had to produce, I had to add some new citations to the copy of the original.  Now I have 2 bib files that have a lot in common but differ in some citations. Is there a way to merge them? So that I have one single file with all the citations from both files but no duplicates?


I'm having some difficulties with a template function within a class I'm writing. I've boiled it down to a concise set of examples to make it easy to demonstrate (and this proves that I'm missing or screwing up a fundamental concept here).  Basically, if I define this function outside of the class, or if I set it up as a member function, it works perfectly. These two examples work:  As a member function...  // testing.hpp:  class testing { public:     template <typename T>     T getVal(std::string szKeyName, T TDefaultVal) {         return TDefaultVal;     } };  // main.cpp:  #include "testing.hpp" int main(int argc, const char * argv[]) {     testing x;     std::string st = x.getVal("ConfigKey", "ConfigVal");      std::cout << "Returned value is: " << st << std::endl;      return 0; }   Stand-alone...  template <typename T> T getVal(std::string szKeyName, T TDefaultVal) {     return TDefaultVal; }  int main(int argc, const char * argv[]) {     std::string st = getVal("ConfigKey", "ConfigVal");      std::cout << "Returned value is: " << st << std::endl;      return 0; }   However, if I separate declaration and implementation of the testing class, it does not work:  // testing.hpp  class testing { public:     template <typename T>     T getVal(std::string szKeyName, T TDefaultVal); };  // testing.cpp  #include "testing.hpp"  template <typename T> T testing::getVal(std::string szKeyName, T TDefaultVal) {     return TDefaultVal; }  // main.cpp  #include "testing.hpp"  int main(int argc, const char * argv[]) {     testing x;     std::string st = x.getVal("ConfigKey", "ConfigVal");      std::cout << "Returned value is: " << st << std::endl;      return 0; }   The above fails to compile with:     Undefined symbols for architecture x86_64:   "char const*   testing::getVal(std::__1::basic_string, std::__1::allocator >, char   const*)", referenced from:         _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see   invocation)   It's really frustrating because I feel like I really should be able to identify the problem, but after a fair bit of tinkering I can't, so I'm hoping someone can square me away here. It's worth noting that regardless of what type I use -- std::string, int, etc. -- I get the linker error. I've also tried calling the function with  std::string st = x.getVal<std::string>("ConfigKey", "ConfigVal");   but this did not help, either. Any help or clarification would be greatly appreciated.   Thank you.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'm looking for an easy way to build a list in a txt file of the filenames inside a given directory. Filenames only preferred, though I could trim other fields if necessary.

I need to get a text list of all the files (hidden and visible) off a hard drive, subfolders included. Ideally the list would have the filename, path, size, and creation (or last modified) date if possible. Can someone please tell me what command I need? Also, is it possible to have this created as a .csv file or something similar for use in Excel?  I am not super proficient with Ubuntu so an explanation of each command item would also be greatly appreciated.


Like a  but without being an expert in each subject.     A pantomath (pantomathēs, παντομαθής, meaning "having learnt all",   from the Greekroots παντ- 'all, every' and the root μαθ-, meaning   "learning, understanding") is a person whose astonishingly wide   interests and knowledge span the entire range of the arts and   sciences.   Update  I don't think this question is a duplicate of  as "not specialised" isn't a synonym of "superficially". Also the referred question has many answers not related to this one in terms of content and quality (as this one already has), and has been marked as a duplicate of ) so it won't make sense to mark this as a duplicate.

Is there an appropriate word for the antonym of "full-stack", as in programming? Someone who knows a lot of things just as a full-stack programmer, but without mastering them.


I live in the UK and generally a word that adds flavour or describes a verb , will have the adverb ending applied eg run quickly (not run quick) , eat healthily (not eat healthy) etc  But when I watch the many US TV shows on in the UK, I almost never hear Americans using adverbs in this way. They just seem to use the adjectival form of the word.  This seems to be so common as to be standard in the US. Is this viewed as correct speech in the US ?

Is it acceptable to say "We'll get back to you as quick as we can"? Is "quick" a flat adverb in this case?


My current idea is the following: practically we want to get the distribution of the sum of $n$-times of a discrete uniform distribution between $1,...,m$ .  It is practically the discrete convolution of these, which is a multiplication in the space of the Laplace/Fourier/$z$-transformations. Going in this direction I found complicated formulas whose de-transformation was already hopeless. (I could write them here on need.)  Was it a good direction? Maybe somebody knows the formula, or can show me a better way?

Assume the dice are numbered from $1$ to $k$. My hunch is that this will form a normal distribution with a median at $n\cdot\frac{k}{2}$. However, I have no idea as to    turn this fact into an answer (I have a minimal knowledge of stats, but I know that I am missing the standard distribution) and this is probably the wrong approach   How can I approach and solve this problem? (Aside, this is not for a class, stats or other, so any and all approaches welcome).  *Edit: * I want to find the number of ways that the sum of the numbers that are rolled has a particular value, if $n$ dice are rolled, and each has $k$ sides, numbered $1$ to $k$.


I was wondering if it is a good thing to have a fixed menu on top of the screen after the user scrolls, this seems to be a growing tendency and I'm not sure what to think about it.  Example:      Your opinion is different if the ?

A client of mine is insisting on two things for a website I am designing:    That every single link is shown in the header – about 10 links or so with no sub-categories. ie. no drop-downs, rollovers, or sub-navigation.   That the header is always visible and static up the top. The content below it will scroll independently but the header is always up the top.    Now, to me, I don't like the idea of the navigation being always up the top. It means I have to go to lengths to reduce the height so that you can see enough content below it on smaller monitors. I believe that users know to find navigation up the top intuitively and don't need to have the nav forced on them at all times. In the client's eyes – this is "easier" – but in mine, it's treating the audience as stupid and smacks of Web 1.0 principles (namely frames).  So my question is – is it bad UX to have a fixed-position header?


I'm trying to understand what a pointer to an object means. I'm wondering if A is an incomplete type, why is a pointer to A a complete type. Consider the following program:  #include <stdio.h>  class B; //B is incomplete type here  int main() {     printf("%d\n",sizeof(B*));//4 }   Please explain why does sizeof(B*) return 4? What exactly does a pointer to an object represent in memory?

This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles. Please edit the accepted answer to provide quality books and an approximate skill level — preferably after discussing your addition in . (The regulars might mercilessly undo your work if they disagree with a recommendation.) Add a short blurb/description about each book that you have personally read/benefited from. Feel free to debate quality, headings, etc. Books that meet the criteria will be added to the list.  Books that have reviews by the Association of C and C++ Users (ACCU) have links to the review. *Note: FAQs and other resources can be found in the  and under .


I'm trying to create a bootable windows 7 installation USB drive through Ubuntu. I was recommended to use PowerISO to do this, however the software isn't recognizing any of my USB flashdrives. I've tried using Unetbootin, WinUSB, Startup disk creator, and Universal USB Installer, but have had several problems with those too. I don't have a disk drive or another computer with windows otherwise I wouldn't have this problem in the first place. Thanks in advance.

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


So this is a chronometer that I am trying to implement in my application but since the build in chronometer doesn't display milliseconds I wrote this one, well the idea is not mine but anyway: `import android.content.Context;  public class Chronometer implements Runnable { public static final long MILLIS_TO_MINUTES = 60000;  private Context mContext; private long mStartTime; private boolean mIsRunning; public Chronometer(Context context) {     mContext = context; }  public void start() {         mStartTime = System.currentTimeMillis();     mIsRunning = true; } public void stop() {     mIsRunning = false; } @Override public void run() {     while(mIsRunning) {          long since = System.currentTimeMillis() - mStartTime;           int seconds = (int) (since / 1000) % 60;         int minutes = (int) ((since / (MILLIS_TO_MINUTES)) % 60);         int millis = (int) since % 100; //the last 2 digits of millisecs          ((MainActivity) mContext).updateTimerText(String.format("%02d:%02d:%03d"                 , minutes, seconds, millis));          try {             Thread.sleep(30);         } catch (InterruptedException e) {             e.printStackTrace();         }     } } }`   So the code above is in a class of it's own. And here is the method that updates the textView that contains the chronometer and which is located in another class      public void updateTimerText(final String time){     runOnUiThread(new Runnable() {         @Override         public void run() {                 mTvTime.setText(time);         }     }); }   So the problem is Process: com.example.user.myap, PID: 6131                   java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference                       at com.example.user.myap.MainActivity$2.run(MainActivity.java:105)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I've stumbled across this problem that asks, given this series whose sum is that:  $$\sum_{n=1}^∞ \frac{1}{n^2} = \frac{{\pi^2}}{6}$$  Find the sum of this series: $$\sum_{n=1}^∞ \frac{1}{(2n-1)^2} $$ The second function is just the odd function of the first function, however, I do not know where to proceed from there.

$$ \sum_{n=1}^\infty \frac{1}{n^2}  = \frac{\pi^2}{6}$$  I want to evaluate this sum when $n$ takes only odd values.


Note: Its not a duplicate. The other one talks about triple integrals... while I am only doing a single one..!  So to get the area of a cube I can do the following integral,  $$\int_0^a a^2 \, dh = a^3$$  So I try to do the same thing for the square pyramid-- taking the area to be $a\cdot a$, I do the following integral.  $$\int_0^h b^2 \left(1 - \frac{h}{H}\right)dh$$   Thinking that the factor $(1 - h/H)$ should take care of the reducing cross section.  Evaluating this integral gives me $b^2H/2$ while the correct volume happens to be $b^2H/3$.  I looked at the solution of calculating the volume and I get what its doing (calculating the area as a function of height) But I can't still get around why my reasoning is wrong.  Thanks and regards, Dhruv Kapur.

I am just studying triple integrals in my calculus class and I have the following problem as homework and I am not sure how to start: Let $P$ be a pyramid defined by the base [-2,2]x[-2,2] in XY plane and tip (0,0,5). Compute the volume in 2 ways using triple integrals:  once as $dzdxdy$ and then as $dxdydz$.  Since I am new in this type of problems I would appreciated some help. Thank you


I have gone through the existing answers, and none of them work for me.  I am using Ubuntu Gnome 16.04. In Ubuntu, Kubuntu, and even Xubuntu, there is an entry in Settings->Mouse to "disable touchpad while typing".  I have looked in Settings, Gnome tweak tool, and dconf-editor. None of them have any such option.  Here is the output of xinput:  ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)] ⎣ Virtual core keyboard                     id=3    [master keyboard (2)] ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)] ↳ Power Button                              id=6    [slave  keyboard (3)] ↳ Video Bus                                 id=7    [slave  keyboard (3)] ↳ Power Button                              id=8    [slave  keyboard (3)] ↳ Video Bus                                 id=9    [slave  keyboard (3)] ↳ Laptop_Integrated_Webcam_HD               id=10   [slave  keyboard (3)] ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)] ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]   Please help me in solving this.

When searching for solutions to cursor jumping around, I found a lot of references to touchfreeze - a package that disables the touchpad while typing. But it is no longer part of any repository that I can find. All links to it are invalid.  How can I disable the touchpad while typing?


The problem is on HackerRank under algorithms named Sparse Arrays. I am new to java and this is really messing up, I have tried Googling but I cannot figure out what is wrong here. public class Solution { private final static Scanner sc = new Scanner(System.in);  public static void main(String[] args) {     List<Integer> integers = new ArrayList<Integer>();     List<String> strings = new ArrayList<String>();     List<String> queries = new ArrayList<String>();     int n = sc.nextInt();     sc.nextLine();     for( int i = 0; i < n; i++) {         strings.add(sc.nextLine());     }     int q = sc.nextInt();     sc.nextLine();     for( int j = 0; j < q; j++) {         queries.add(sc.nextLine());     }          for( int k = 0; k < q; k++) {         int count = 0;         for( int m = 0; m < q; m++) {             if(queries.get(k) == strings.get(m)) {                 count++;                 integers.add(count);             }         }              }     integers.forEach(System.out::println); }  }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


"I haven't completed any official course, but I did read a number of books on the subject."  Is this sentence grammatically correct?

Example: You do need to drink more water.   or   You need to drink more water.   What is the difference?


i am tyring to wake on lan via my windows mobile phone so i can remote, i have port forwarded my 3389 port on my router correctly and allowed access via public in the firewall and it works however when i port forward port 9 for WOL and check via portchecktool.com the port remains blocked, i have created a rule in windows firewall called wol and allowed port 9 access but alas its still blocked port 3389 is open on the same site and works but port 9 is not. is there any solution for me to be able to wake on lan over the internet and allow port 9 to be unblocked?

If yes, how does it work? The pc still has no ip, so where should I forward the port?


Please confirm if my following attempt is correct  Let x ∈ (A − B) ∪ (B − A) ⇒ x ∈ (A – B) ∨ x ∈ (B – A)      ⇒ (x ∈ A ∧ x ∉ B) ∨  (x ∈ B ∧ x ∉ A)   ⇒ ((x ∈ A ∧ x ∉ B) ∨ x ∈ B) ∧ ((x ∈ A ∧ x ∉ B) ∨ x ∉ A)  by distributive law  ⇒ ((x ∈ A ∨ x ∈ B) ∧ (x ∉ B ∨ x ∈ B)) ∧                                  ((x ∈ A ∨ x ∉ A) ∧ (x ∉ B ∨ x ∉ A))                      by distributive law  ⇒ ((x ∈ A∪B) ∧ TRUE) ∧ (TRUE ∧ x ∉ (B ∧ A))  (As  P ∨ ¬P = TRUE)   ⇒  x ∈ A∪B) ∧ x ∉ (B ∧ A)      (As P∧TRUE = P)  ⇒ x ∈ (A∪B) − (B∩A)  ⇒ (A − B) ∪ (B − A) ⊆ (A∪B) − (B∩A)   Conversely,  Let y ∈ (A∪B) − (A∩B)   ⇒  (y ∈ A ∨ y ∈ B) ∧  y ∉ (A∩B)   ⇒ (y∈A ∨ y∈B) ∧ (y∉A ∨ y∉B)  ⇒ ((y∈A ∨ y∈B) ∧ y∉A) ∨ ((y∈A ∨ y∈B) ∧ y∉B)  ⇒ ((y∈A ∧ y∉A) ∨ (y∈B ∧ y∉A)) ∨ ((y∈A ∧ y∉B) ∨ (y∈B ∧ y∉B))  ⇒ (FALSE ∨ y∈(B−A)) ∨ (y∈(A−B) ∨ FALSE)   (As P ∧ ¬P = FALSE)   ⇒ y∈(B−A) ∨ y∈(A−B)      (As P ∨ FALSE = P)  ⇒ y∈((B−A) ∪(A−B))   ⇒ (A∪B) − (A∩B) ⊆ (A − B) ∪ (B − A)   … (ii)  Therefore from (i) and (ii) we get;           (A−B)∪(B−A) = (A∪B) − (A∩B)   Proved

Is $A\triangle B := A\cup B-A\cap B $ a suitable definition for the symmetric difference of two sets $A$ and $B?$ Or is $A\triangle B := (A-B) \cup (B-A) $ only allowed?


I have the next code:  $(document).ready(function(){     $('#dl-cat').mouseenter(function(){     $.ajax({         type: "POST",         url: "../control/Controlador.php",         data: {lang: $('html').attr('lang'), cat: $(this).text(), prov: "none"},         success: function(resp) {             $(".og-grid").html(resp);          }     });        });  $(".og-grid li").on("mouseenter", function(){     console.log("it exists"); });   });  Where the "og-grid" class is an "ul" tag and after the ajax response I put some html code like "li" tags, but when I program an event like "mouseenter" to the new added code It does not show me anything, as If It does not exist

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.


I want to move all the *.txt files from all the subdirectories located in a given directory to one destination-directory.  When doing it as below, it moves EVERY file - how can I reduce it to all the *.txt files only?  find -type f -print0|xargs -0r mv -it "/path to my folder/destination-directory"

I have all my music in a folder /media/kalenpw/MyBook/Music/ABunchOfOtherFoldersWithFilesInside. I want to copy all of the mp3s to /media/kalenpw/HDD/Music so I used:  cp -R /media/kalenpw/MyBook/Music/*.mp3 /media/kalenpw/HDD/Music   however this only copied the mp3s in the root music folder and did not open any of the artist subdirectories and copy those files.  I was under the impression -R would recursively copy all the files. How can I achieve said goal?


Scenario: You're going to buy a/an SSD.  Do you use "a" or "an" before an abbreviation that is pronounced with a vowel first, but written with a consonant first?  When spoken, you would say "an ess-ess-dee", but when written, should you use "a SSD" because there's actually a consonant as the next letter?

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


On my Windows 7 machine, I am an administrator. I see, when I right click an app, it has an option Run as Administrator. What does this mean?  Also, if I am logged in as administrator, what significance does this have: Run as Administrator? Why does it need to be mentioned explicitly?

If my account is already a member of the administrator group why do some functions on Windows 7 require me to run them as administator? I kind of thought that was implied?


I am making a backup of some files and am creating a checksum file, checksums.txt, to later check the integrity of my data. However pasting each checksum manually into the file is inconvenient since my backup consists of hundreds of files, so asking around I got the suggestion to simplify the process by redirecting the output to the checksum file:  $ md5sum file > checksums.txt   or  $ sha512sum file > checksums.txt   However doing this replaces the contents of the checksums.txt file with the checksum of, in this example, the file file; I would like, instead, to append the checksum of file to checksums.txt without deleting its contents. So my question is: how do I do this?  Just one more thing. Since I am a basic user, try (only if possible) to make easy-to-follow suggestions.

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


Sorry - I always think the question is obvious when plainly it is not.    Should I use "important" or "importantly" in the introductory phase of this sentence:  "Appellant's argument is premature.       More important, the argument lacks merit.   or      More importantly, the argument lacks merit.

Should I use important or importantly in the introductory clause of the second sentence:      Appellant's argument is premature. More important, it lacks merit.   Google NGram shows a significant preference for "more important."  Recently, however, it appears the democracy of usage has swung slightly in favor of "more importantly."   I prefer the former, but I am more concerned about learning which one is grammatically proper, and the particular rules that control the analysis. Can someone walk me through it?


Is there a Optional in C#?  Sub notify(ByVal company As String, Optional ByVal office As String = "QJZ")   How would you implement the above code in C#? I have seen optionalstr optionalint but what about other datatypes and custom object?

Note: This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4).  We're building a web API that's programmatically generated from a C# class. The class has method GetFooBar(int a, int b) and the API has a method GetFooBar taking query params like &a=foo &b=bar.   The classes needs to support optional parameters, which isn't supported in C# the language. What's the best approach?


Hello and I'm a secondary student doing a math exploration, but I'm currently stuck with this problem...  Can anyone kind enough to show me the derivation of the relationship between the circumscribed sphere radius and the edge length in a dodecahedron?  The formula I looked up is this...     $$r = a \; \frac{\sqrt{3}}{2} \cdot \frac{1 + \sqrt{5}}{2}$$   where $r$ is the circumscribed sphere's radius and $a$ is the edge length. (Taken from this reference: )  I notice that the $(1 + \sqrt{5})∕2$ is the golden ratio, but I do not understand the rest of the formula and how to give reasons for using the golden ratio. Can anyone kind enough to explain the reasoning for using golden ratio, and possibly the derivation for the whole formula?  Thank you for your effort to help.

I am trying to find the maximum length of a diagonal inside a dodecahedron with a side length of $2.319914107\times10^{89}$ meters.  I am not sure if any other information than that is needed, if it is I probably have it and will give it, but if you could help that would be great.  I am really just trying to find the distance between opposite vertices.


I am thinking about buying couple powerline networking adapters. It all sounds good however I am wondering about one particular issue.  Given that this stuf works over the electrical lines, can someone at the power company or someone who access the lines coming to the house access the network? Considering that all these lines are somehow connected, it might be true. I am more worried about the security implications naturally.  Are there encrypted connection adapters?   thanks

I just bought myself an Ethernet-over-power adapter, and plugged it in. It seems to be working great, but now I'm concerned that my neighbours may be able to access my network.  I live in a rowhome complex; is it possible they can access my network? If so, how can I secure it?


'Funny if it weren't so sad' is used to describe situations which are very sad, for example because of utter incompetence in a serious situation, so sad in fact that one goes on to say it could be deemed funny.  I am specifically looking for a word which emphasises that the funny or comic part follows from the sad or tragic part. Full disclosure: this clarification was added after the first answer. This is also where the question differs from   One word to describe this is pathetic, however I feel that word isn't quite strong enough. :     "causing feelings of sadness, sympathy, or sometimes lack of respect, especially because a person or an animal is suffering"   Example sentence (the bold is to be replaced by another word, the [would be] could be left out or replaced for a form of to be):     So at that point we lost the nuclear football, apparently it has been put on some commercial flight and it's now travelling at 10 kilometres over the Atlantic, this situation [would be] funny if it weren't so sad.

What's a word for conflicting emotions that are felt at the same time? For example, loneliness, sadness, happiness, being content but also feeling as if something isn't right?  To sum up: What's a word for something that is sad and funny at the same time?


Im trying to wrap my head around some basic MVC OOP coding concepts.  Consider the following.  private $notfound public function __construct(){         $this->notFound = function($url){             echo "404 - $url was not found!";         };     }    $this->notfound = function($url) So the way Ive been taught is that a function should start with the reserved keyword function name(params) In the statment $this->notfound = function($url)obviously there is no name after function...Im pretty sure I get the gist of the code but for readability sake would like to understand it a bit deeper. Why use a function after $this->notFound...? Why cant it be something like $this->notFound = $var[$url] Usually the closing parenthesis of If, Functions etc does not require a semicolon ; Why do I get an error when I omit the ; for the closing parenthesis for the statment $this->notFound = function{};`   Thanks

For a person without a comp-sci background, what is a lambda in the world of Computer Science?


I'm having problems to connect my android 4.1.2 device to my recently installed Ubuntu 13.10. The system just don't recognizes the device to mount, but when I run dmesg it's pretty clear than the system catch all info about the attached device, see:  [  336.008777] usb 1-1.2: USB disconnect, device number 5 [  363.119059] usb 1-1.2: new high-speed USB device number 6 using ehci-pci [  363.212290] usb 1-1.2: New USB device found, idVendor=22b8, idProduct=64b5 [  363.212294] usb 1-1.2: New USB device strings: Mfr=2, Product=3, SerialNumber=4 [  363.212297] usb 1-1.2: Product: X91x [  363.212299] usb 1-1.2: Manufacturer: Motorola [  363.212301] usb 1-1.2: SerialNumber: (DEVICE_SERIAL_NUMBER) [  363.213303] cdc_acm 1-1.2:1.1: This device cannot do calls on its own. It is not a modem. [  363.213339] cdc_acm 1-1.2:1.1: ttyACM0: USB ACM device   I also tried to install programs like gMTP but without any success... So, what's going on? How can I make that stuff to work?  Thanks!  P.S.: Sorry my (terrible) english, I'm from Brazil.

Since Ubuntu 13.04 storage access to external devices via MTP is supposed to work out of the box via a GVFS-MTP module.      While this question is about the Galaxy Nexus, other Android devices as well as Windows Phones and MTP enabled media players are also supported.      For troubleshooting see .     I am having quite a bit of problems getting file-transfers working over MTP with the Galaxy Nexus. I am using Kubuntu 11.10 64-bit, and this is what I have done and the results I get:   Added rule for device in /etc/udev/rules.d/51-android.rules. The rule is the following and works for adb:  SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666", OWNER="leob" #Galaxy Nexus  Restarted udev (and computer just to make sure).   Adb works, and all methods for reading from the device via MTP seems to work (I have tried mounting with mtpfs, gmtp and using the mtp-tools package directly). When I try to write to the device however, nothing I have tried works.  As an example, running mtp-newfolder test_dir 0 0 gives the following output:  libmtp version: 1.1.0 Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1. Folder creation failed. ERROR: Could not close session!   If I run mtp-folders after a failed mtp-newfolder without re-plugging the device, I get the following output:  Attempting to connect device(s) Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1. PTP_ERROR_IO: failed to open session, trying again after resetting USB interface LIBMTP libusb: Attempt to reset device mtp-folders: Successfully connected Friendly name: (NULL) Error 1: Get Storage information failed. Error 2: PTP Layer error 02fe: get_all_metadata_fast(): could not get proplist of all    objects. Error 2: (Look this up in ptp.h for an explanation.) Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles. Error 2: (Look this up in ptp.h for an explanation.) LIBMTP_Get_Storage() : Resource temporarily unavailable OK.   Accompanied by the following in dmesg:  [ 1000.912082] usb 2-4: reset high speed USB device number 7 using ehci_hcd [ 1001.045877] usb 2-4: usbfs: process 3166 (mtp-folders) did not claim interface 0 before use   Does anyone have any idea about what to do?  EDIT:  I also tried the PTP mode. Again, reading works fine, but I cannot write anything to the device.


I am traveling from San Francisco to Mumbai via Zurich Airport, where I have 18hrs halt.  I have an Indian Passport and a valid US F1 visa.    Can I leave the airport and do some sightseeing in Zurich?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I am building a web page in Romanian language and I want to appear on the web page the special Romanian characters (ș, ț, ă, î, â). I have introduced in the head of the html file the following code:  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">   but it does not work. Can somebody support me?

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'm a noob when it comes to using particle systems to create grass, so I've been trying to improve those skills. However, on my latest test render...something rather strange has appeared. Or rather, two of the very same strange somethings...    As you no doubt see, there are two-ish black and whitish-yellow squares of speckledinest that have randomly appeared on the render. I have not the least idea of from whence they came, as they do not even match the tile size that I used. I am using 128 samples and  a denoiser. The grass is using the Principled BSDF node.  Could somebody please give an explanation of where these came from?

Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.


I am trying to solve the following problem from a textbook: Let $S$ be a set with cardinality $2m$. Give a closed-form expression for the number of equivalence relations on $S$ where every equivalence class has two elements. My approach thus far: Every equivalence relation partitions $S$ into $m$ different subsets/classes. Thus, counting the number of equivalence relations is equivalent to counting the number of ways of choosing $m$ different objects in a $2m$-element set. And this is given by $\binom{2m}{m}$. Is my approach correct? If not, how can I solve this problem? I would appreciate any help on this!

I know that the partition of $2n$ items into $n$ pairs has something to do with double factorial, but I am not sure how many possibilities we exactly have.   We can choose such a partition into pairs by first choosing $n$ elements to be in one half and the remaining $n$ in the other half, which gives ${{2n} \choose n}$ possibilities. Then we can take a permutation of both sets and match them accordingly.   This gives $${{2n} \choose n} n! n!=\frac{(2n)! n! n!}{n! n!}=(2n)!$$ possibilities. But with this we overcount, since we do not want the pairs to be ordered. Each of the $n$ pairs is counted twice, wherefore we have to divide by 2 for every pair, hence $\frac{(2n)!}{2^n}$?   Well, another possiblity to do that is just to iteratively pick $2$ elements among the remaining ones, which gives ${{2n} \choose 2} {{2n-2} \choose 2} \dotsb {4 \choose 2}$  I am not sure, but I do not think that this is the same and also, I do not see the connection to double factorial. Would be very glad if you could help me with these 3 possiblities.   Thank you.


After trying in google for almost 2 days I came here to post this.  I had Windows and linux in my hard disk. I tried to format linux but mistakenly deleted the partition. It got hung and forcefully restarted it. Then while system startup      grub rescue   cmd prompt is coming.   I tried to use bootable USB with Windows and linux (one at a time) to repair/boot from it but getting stuck at initial stage itself and not going to the partition phase.  I googled and tried a lot no. of ways of how to use grub rescue to find the boot partition and boot but no solution. My initrd.img is missing for errorneously deleting the partition.  What can I do right now? I just want to get inside, format and install any OS.  Thanks in advance.  Edit : Solutions that are present in other sites includes using windows recovery cd or boot repair cd etc. but these things works only when your CD/USB gets booted in your PC, that is happening in my case. Whenever I try to use a bootable CD/USB to repair/format, but it is getting stuck in initial phase itself. It does not reach the screens where you get options.

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


For the longest time I have been instructed to put on 100nF decoupling capacitors between the VCC and GND pins whenever I lay out a board involving an MCU. I could not find the exact reason as to why they are needed. However, after some research online I did find a few reasons for their use. Below I explain the main reason, as I understand it, why decoupling capacitors are needed. I would like some feedback and would also like to know if this explaination is satisfactory or not.   Consider a pin of an MCU which has a single LED connected to it through a resistor. Lets say that the pin toggles from low to high, that is it turns the LED on. Now with the LED on, it will draw current which the MCU will have to provide. In return, the MCU draws more current (i.e power) from the power supply i.e. its VCC and GND pins. However, a sudden current draw by the power pins causes a voltage drop across the resistance of the power traces. Since the power supply is slow as compared to the microcontroller, it senses the drop in voltage after a little time and then changes the voltage back to its constant value again ( since it is to behave as a constant voltage source). That is where the decoupling capacitors come in. Whenever the MCU draws in a current pulse, the capacitor makes sure that the voltage across the power pins remain essentially constant till the power supply voltage stabilizes again.  That is all I have understood. Now I do not know how to calculate the exact value of the decoupling capacitor but have been told that 100nF or any value in that neighbourhood is pretty safe to use.  I am waiting for your comments.

I'm a beginner in electronics from the software industry. With some self-taught things, I'm trying to implement some basic Arduino circuits. My confusion is about capacitors mainly. My understanding about capacitors is that they act as power storage for few seconds or milliseconds.  I found that most IC's must have capacitors connected to their pins.  My confusion is how to find out which pins need a capacitor, and how to find the correct capacitor for a circuit or a capacitor for an IC.  Finally, why are capacitors necessary in a circuit in such situations?


Suppose I have just created a ~.blend file, and I want to include in the file a copyright notice. Two ways I can think of to do it off the top of my heard are to create a plane mesh object, and assign an image texture to it, where the image is a copyright notice; and to create a text object, where the object itself is the copyright notice. I'm sure if I think about it more, I can come up with several other methods, too.  Is there a recommended or generally accepted way to put a copyright notice in a Blend file, perhaps in the file's metadata?

I was wondering - what options are there to include metadata, copyright information, and/or comments/notes in a .blend file?  I realized late that in the main dropdown (where 3D view is), one can select "Text Editor", and then do Text / Create Text Block (these are then shown under Outliner > Datablocks / Texts). I'm guessing these are for scripts, but when I see, say :     make visible upon loading one small text file which lists layers and objects   ...   make your licensing expectations clear: artistic license, creative commons, etc.   ...   sign your work, stable email address or website url if possible   ... I simply cannot see where else could I add this information, but in a "text block" as described above. The Outliner / Datablocks view looks like it might contain some metadata, but seemingly it is not editable.   So my question is - what is the preferred way to enter metadata (e.g. key/value combinations like author, license, date, etc), and to enter notes/comments in a .blend file?


Under which conditions is the sum of a finite number of Gaussian random variables a Gaussian?

In comments following  to a related question, Users ssdecontrol and Glen_b asked whether joint normality of $X$ and $Y$ is necessary for asserting the normality of the sum $X+Y$? That joint normality is sufficient is, of course, well-known. This supplemental question was not addressed there, and is perhaps worth considering in its own right.  Since joint normality implies marginal normality, I ask     Do there exist normal random variables $X$ and $Y$ such that   $X+Y$ is a normal random variable, but $X$ and $Y$ are not   jointly normal random variables?   If $X$ and $Y$ are not required to have normal distributions, then it is easy to find such normal random variables. One example can be found in my previous answer (link is given above). I believe that the answer to the highlighted question above is Yes, and have posted (what I think is) an example as an answer to this question.


Four cards are drawn from a pack of 52 cards. What is the chance that no two cards are of equal value? Each belongs to a different suit? My try-- Total probability =$^{52}C_4$ In the pack of 52 cards there are 4 aces, 4 1s and so on. So, there will be 13 groups of 4 cards containing same value. $\therefore$ Probability that no two cards are of equal value =$\frac{^{13}C_4\times ^4C_1}{^{52}C_4}=\frac{44}{4165}$ But given answer is=$\frac{2816}{4165}$ I think I did it wrong, please help me. I also couldn't solve the 2nd problem.

4 cards are drawn from a pack without replacement. What is the probability of getting all 4 from different suits?  Here's how I tried to solve:  For the first draw, we have 52 cards, and we have to pick one suit. So, probability for this is $\frac{13}{52}$.  For the second draw, only 51 cards are left. The second suit has to be selected, so there are 13 cards from that suit. The probability is $\frac{13}{51}$.  Similarly, the third and fourth draw have probabilities $\frac{13}{50}$ and $\frac{13}{49}$ respectively.  Since the draws are independent, the total probability becomes $$\frac{13}{52} \times \frac{13}{51} \times \frac{13}{50} \times \frac{13}{49}$$  But my book says the answer is $\frac{{13\choose 1} \times {13 \choose 1} \times {13\choose1} \times {13\choose1}}{52 \choose 4}$.  My answer differs by a factor of $4!$. What did I do wrong?


I have a Macbook Pro 16" and recently purchased a 24" (HD) Dell monitor via HDMI (via a USB-C to HDMI converter) After about 20m of usage, my mac comes to a crawl and really slows down. It becomes impossible to work on the machine. Plugging out the monitor fixes the issue in no time and I can see the kernel_task process (in Activity monitor) hit 900% to 1500% of CPU. Specs I am running macOS Big Sur It is a 2019 model with Intel Core i9, 16 Gigs of RAM and  the AMD Radeon Pro 5500M 4 GB graphics processor

Occasionally my machine will have a kernel_task instance max out the CPU:    This can last from minutes to sometimes hours. The machine is effectively unusable in this state. Restarting doesn't help; a new kernel_task pops up again until it finishes whatever it's doing.  How can I find out what this process is doing?


I will ask my question in a way that's all handwaving and no math, and I will welcome handwaving answers. I'm interested in visualizing the concepts. We had an idea about the atom as a massive nucleus with positive charge, surrounded by lightweight negative charges. But we knew that opposite charges attract. So why didn't the electrons fall into the nucleus? We had a model for that. Masses attract, and the earth doesn't fall into the sun because it's in orbit. Maybe the electrons were in orbit around the nucleus. But accelerated charges always radiate. Accelerated electrons would radiate away their energy. They would fall into lower and lower orbits until they fell into the nucleus. So that model failed. At that point there were various alternatives available. We could figure that charges don't always attract, and look for a reason that the attraction didn't happen in this specific case. We could figure that accelerated charges don't always radiate, and look for a reason that these particular charges don't radiate. We could postulate a hidden repulsive force, a sixth force, that balances away the charge attraction in this particular case. Why not? We did that for the strong force and the weak force. Why not one more? Or we could use the following reasoning: Since accelerated electrons always radiate, electrons must be mostly stationary. They continually absorb random radiation from elsewhere and radiate it away again. So they jostle around, but they don't have any consistent velocity and they give as good as they get. They are mostly stuck in place near specific areas, and we can statistically estimate where those areas are. It takes a set quantum of energy to get from one of those areas to another (or the energy is lost as radiation to go the other direction.) Those are the only places electrons can be close to a nucleus, so they can't fall in. Free electrons don't have to emit quantized radiation. Electrons in a radio tower can emit any frequency the tower operator chooses. But electrons in an atom do. What is it about an atom that keeps the electrons from falling into the nucleus? Why are they stuck in quantized orbitals? Opposite charges attract, that's the biggest fundamental force, what is the opposing force that keeps it from happening this particular time?

I'm having trouble understanding the simple "planetary" model of the atom that I'm being taught in my basic chemistry course.   In particular,    I can't see how a negatively charged electron can stay in "orbit" around a positively charged nucleus. Even if the electron actually orbits the nucleus, wouldn't that orbit eventually decay?  I can't reconcile the rapidly moving electrons required by the planetary model with the way atoms are described as forming bonds. If electrons are zooming around in orbits, how do they suddenly "stop" to form bonds.     I understand that certain aspects of quantum mechanics  to address these problems, and that there are  of atoms. My question here is whether the planetary model itself addresses these concerns in some way (that I'm missing) and whether I'm right to be uncomfortable with it.


I want to answer a question, but I need clarification from the author first. But I don't have enough reputation yet to comment, I can only answer. So how can I answer if I can't get clarification? Should I just move on to another question or am I missing something?

Users with less than 50 reputation points cannot write comments on questions and answers that they don't own.  Why does this limit exist? But I want to contribute now. What should I do instead? But I can't write a good answer without more information! Shouldn't I be allowed to post comments if I have reputation on a different site? But I saw a new user posting a comment! How did they do it? Why do I need 50 reputation to comment on my own post?   See also:    in the Help Center


I would like to join 2 tables in 2 different databases in using their id.   $new_url = "SELECT * FROM {one.url_alias} a     INNER JOIN (one_old.url_alias} b     ON a.pid = b.pid";   print_r($new_url);   But I'm not getting any results. I did configured 2 databases in settings.php  $databases = array (   'default' =>   array (     'default' =>     array (       'database' => 'one',       'username' => 'root',       'password' => '',       'host' => 'localhost',       'port' => '',       'driver' => 'mysql',       'prefix' => '',     ),   ),   'external' =>    array (     'default' =>      array (       'database' => 'one_old',       'username' => 'root',       'password' => '',       'host' => 'localhost',       'port' => '',       'driver' => 'mysql',       'prefix' => '',     ),   ), );   Any help would be appreciated.

How can I execute a query that connects to different databases?  I have the following query, and I need to rewrite it for Drupal.  SELECT a.empid, b.empname FROM db1..empidmaster a, db2..emplist b WHERE a.empid = b.empid   How can I rewrite the query using db_query(), or db_select()?


The HOT NETWORK QUESTIONS section in the sidebar shows a lot of Marvel Universe questions from the movies SE site right now.  spoil (little) parts of the story. This is annoying. What can be done about it?  This is a significant problem because those spoilers are shown to literally millions of people all over the SE network.  Also: It is the aspiration of Stack Exchange to eventually reach pretty much everyone on the planet with their network of sites. Is it their secret diabolic plan to build a gigantic spoiler distribution machine?

I've noticed that occasionally "hot questions" from SciFi and the Movies & TV network contain major spoilers about the movie/show discussed.  The Matrix spoilers:      (just now there's something about Cypher betraying Morpheus in the Matrix, which is a big deal for people who haven't seen the movie).   I like browsing through those but fear that one day one of these questions will spoil a show I'm excited about and yet to finish   Breaking Bad spoilers:      (like the finale of Breaking Bad, imagine a question asking why did one character betray another at the end or something).   Can users posting such questions be asked to label those with a tag (such as 'spoilers') and then somehow have the network hide those from the "hot questions" list? Or possibly format them differently?  Similarly, this could apply to the Arcade network too.  P.S. Love how this question spikes in popularity around the time GoT starts running again. I swear it should be fairly simple technically to ban questions that have a tag that says 'spoilers' from appearing in the Hot Network Questions.  P.P.S. Oh, and with every fresh release of Star Wars (The Last Jedi being the most recent one)!  P.P.P.S. Another year, another Game of Thrones, another spike in popularity!


I'm trying to convert "9999999999999099" into a number/float in javascript. The problem is that both parseFloat(X) and Number(X) return 9999999999999100.  This is not the same number. Does anyone know why this happens and how to avoid it? Thanks in advance.

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


A derangement of a set $A$ is a bijection from $A$ to itself with no fixed points. Is it the case that every infinite set has a derangement?

I cannot prove this statement so need help. This problem is one of exercises right after the chapter about Hausdorff's maximal principle and Zorn's Lemma. Thus, you cannot use the concept of cardinal number. I found the exact same question on this website, but the proof is done by using the concept of cardinal number. Please make sure that this question is at right after introducing the axiom of choice and Zorn's lemma.  Let $A$ be any set with more than one element. Prove that there exists a bijective function $f:A \to A$ such that $f(x)\neq x$ for every element $x$ in $A$.


Let $S_n = a_1 + \ldots + a_n$ where $a_n > 0$ for all $n$. I'm trying to prove that $\sum_{n=1}^\infty a_n$ converges if and only if $\sum_{n=1}^\infty \frac{a_n}{S_n}$ converges using a comparison test.  I succeeded for the if part: If $\sum_{n=1}^\infty a_n = \lim_{n \to \infty}S_n = S$ then $S> 0$ and $S_n > S/2$ for all $n > n_0$ and $a_n/S_n < (2/S)a_n$. By comparison test it holds that $\sum_{n=1}^\infty \frac{a_n}{S_n}$ converges.  For the only if part I am having problems. Assuming $\sum_{n=1}^\infty \frac{a_n}{S_n}$ converges I don't know that $a_n < a_n/S_n$ because there is no restriction that $S_n > 1$. The limit comparison test fails because I don't know that $a_n/(a_n/S_n) = S_n$ converges yet either. Any help is appreciated.

The last problem I posted had a wrong statement. I recovered the correct one.  Let $(a_n)$ be a sequence of positive real numbers. Prove that $\sum_{n\geq 0}a_n$ converges iff $\displaystyle \sum_{n\geq 0} \frac{a_n}{\sum_{k=0}^n a_k}$ converges  The direct statement is easy to prove using comparison test. I'm (again!) stuck with the converse. I tried summation by part, without success. Note that the convergence of $\displaystyle \sum_{n\geq 0} \frac{a_n}{\sum_{k=0}^n a_k}$ implies $\displaystyle \frac{a_n}{\sum_{k=0}^n a_k} \to 0$ I don't know what to do next ...