A certain interaction between Han Solo and Finn has really been bothering me lately. While infiltrating Star Killer Base, just before they go in to rescue Rey, Finn reveals to Han that he doesn't actually know how to lower the shields like he had promised. Han is obviously upset by this, and the dialog is as follows:  Han Solo: People are counting on us. The galaxy is counting on us. Finn: Solo, we'll figure it out. We'll use the Force. Han Solo: That's not how the Force works!  My problem is that this is exactly how the Force works, and Han Solo knows it! In fact, for the majority of the original films, it is hypothesized that Han uses the Force (whether he realizes it or not) in situations exactly like this. And in The Force Awakens, we learn that Han does believe in the Force, and he must understand that the Force has been with him in most, if not all, of his past adventures, including his most recent escape from the Guavian Death Gangs. For the sake of clarity, let me specify that I am not saying that Han actively uses the Force, like a Jedi would. Rather, I am saying that the Force is with him, and he is using it for "good luck". So why would Han say this? He has knows that the Force does, in fact, work like that.

In The Force Awakens, the following conversation takes place, on Starkiller Base:     Han Solo: People are counting on us. The galaxy is counting on us.      Finn: Solo, we'll figure it out. We'll use the Force.      Han Solo: That's not how the Force works!   Finn was willing to lead Han and Chewie behind the enemy lines, without really knowing what he was about going to do. At the site, he figured they'd use the Force – of which he was never even supposed to have heard of! Where did he get the idea the Force would help them? And in what way? As a Stormtrooper of the First Order, where did he get any thoughts regarding to the Force, and how it works?


I want to have this     var myobject = {         'a': [{ 'b': 2 }]       };        var myother = {         'a': [{ 'c': 3 }]       };   to become :   {'a' : [{'b': 2},{'c': 3}]}   how can I achieve this ?

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


I'm pretty new to LaTex, so please forgive my sloppy code. I'm trying to create a table from a csv file, and pass a list of colors in so that LaTex will color each cell of the a column of the table differently depending on the corresponding element in the list. I can't get it to work. Any suggestions?  \documentclass{article} \usepackage{pgfplotstable,filecontents} \RequirePackage{listofitems}   \begin{filecontents*}{test.csv}     ColA, ColB, ColC     0.17, 0.91, 0.67     0.15, 0.17, 0.92     0.48, 0.1, 0.28 \end{filecontents*}     \begin{document}     \pgfplotstabletypeset[col sep=comma,     ]{test.csv}     \def\mylistOne{green, blue, orange}     \readlist*\mylistTwo{\mylistOne}     \newcounter{myCounter}     \setcounter{myCounter}{-1}     \foreachitem\x\in\mylistTwo[]{         \stepcounter{myCounter}         \pgfplotstableset{             every row \themyCounter column 1/.style={                 postproc cell content/.append style={                 /pgfplots/table/@cell content/.add={\cellcolor{\x}}{},             }         }     } } \end{document}

How do I use xcolor to color a specific cell from a table in pgfplots? Is xcolor the best tool to use here? I'm trying to loop over a list of colors and color the cells in the column individually.  \documentclass{article} \usepackage{pgfplotstable,filecontents} \RequirePackage{listofitems} \usepackage{}  \begin{filecontents*}{test.csv}     ColA, ColB, ColC     0.17, 0.91, 0.67     0.15, 0.17, 0.92     0.48, 0.1, 0.28 \end{filecontents*}     \begin{document}     \pgfplotstabletypeset[col sep=comma,     ]{test.csv}     \def\mylistOne{green, blue, orange}     \readlist*\mylistTwo{\mylistOne}     \newcounter{myCounter}     \setcounter{myCounter}{-1}     \foreachitem\x\in\mylistTwo[]{         \stepcounter{myCounter}         \pgfplotstableset{             every row \themyCounter column 1/.style={                 \cellcolor{\x}         }     } } \end{document}


I am not a native English speaker. What I would like to understand is - if a non native speaker who’s got a fairly decent command on the language (in this case say English) speaks to his or her kid in English, would it increase their kids grasp on English and the ability to comprehend the language better. In essence, does interacting with kids in a foreign language increase the kid’s grasp on a foreign language? I understand accent, pronunciation, modulation, intonation all these aspects play an important role but my question is primarily about the usage, and by that I mean the usage of words, grammar, phrases, idioms.  I would like to add one more parameter, If the family is not resident in a native English speaking country, and in future if the kid travels to an English speaking country would they be able to seamlessly integrate into the English speaking community (nothing to do with cultural values, in this context), and would their ability to comprehend, read, write and speak be as good OR nearly as good as the native speakers. Have you come across such cases wherein someone mastered a foreign language even without staying in the country to which the language is native?

My husband and I can speak daily conversational Mandarin, probably at the fluency and vocabulary of a native 3rd grade speaker.  So decent, but not great.  We speak 99% of the time in Mandarin to our son (though we speak English to each other in front of him).  As he is a toddler now and getting older, I find my limited vocabulary more of an issue than when he was younger (e.g. at the zoo, we see a polar bear... I didn't know "polar bear" in Mandarin and had to just call it... a "white bear").  I worry that I will cause him developmental issues since I've read that the amount you speak to children impacts their learning (more is better).  Unfortunately, the studies I've seen are unclear whether it is purely volume or also diversity of words.  Anyone with info or personal experience with this?


i wrote a code to print a list of a number's prime factorization, and for example, if the user input was "18", it would output "[2, 3, 3]". how do i make it print in such a way that it follows this format: "18 = 2x3x3"?

What is the best approach to calculating the largest prime factor of a number?  I'm thinking the most efficient would be the following:   Find lowest prime number that divides cleanly Check if result of division is prime If not, find next lowest Go to 2.   I'm basing this assumption on it being easier to calculate the small prime factors. Is this about right? What other approaches should I look into?  Edit: I've now realised that my approach is futile if there are more than 2 prime factors in play, since step 2 fails when the result is a product of two other primes, therefore a recursive algorithm is needed.  Edit again: And now I've realised that this does still work, because the last found prime number has to be the highest one, therefore any further testing of the non-prime result from step 2 would result in a smaller prime.


I've found multiple stack overflow solutions that suggest to use align stretch in order to make one child occupy the rest of the available container height, but can't make it work for now.   P.S: I would like to keep the position absolution on the parent container.        .parent {   position: absolute;   top: 0;   left: 0;   bottom: 0;   right: 0;   height: 100%;   width: 100%;   display: flex;   flex-direction: column;   align-items: stretch;   justify-content: stretch;   background-color: lightgrey; }  .child-1 {   background-color: green;   width: 100%; }  .child-2 {   background-color: yellow;   width: 100%;   align-self: stretch; }

no need to stretch

would be nice to stretch to rest of available height

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


My teacher told us that : $$\sum_{k=0}^{n-1} \cos\frac{2k\pi}{n}=0$$ Without giving any proof If someone could tell me how to approach this that would be great !

Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$


I asked this question,  (10k-only link), Sep 10th, 2010. It was closed Oct 23rd, 2012. How can it be closed two years after the fact? Is there no rule for grandfathering in early questions?  (I rarely go on SO, and just noticed it today.)

I just stumbled upon a question from 2009 (that's what I mean by 'old'), .  I think we can all agree that by Today's standards this question would be closed (with a couple of valid reasons to choose from).  However, things were different back then - well from what I can gather, I see quite a few questions like this from back in the day. This kind of question was clearly acceptable at one point.  So, should I vote to close it or leave it be? And just for extra understanding, what would happen to any rep for that question and the answers if it was closed?


I am trying to write an essay which is a couple of pages long I have 10 pages including the first page but I want it to not say a page number on the first page and on the second page say  "Page 1 of 9" how do I reflect this behaviour in Word 2007?

I show the number of pages as 1 / 4, with 4 being the total number of pages. But I do not want to count the first page.  Important: I know how to do it for the current page number (Starting at ..), I mean the total number of pages.  So if the document has one cover page + 3 pages, I want to show it as 1/3, 2/3 ..., not as 1/4.


I have a laptop with lubuntu. It's great but I wish LXDE was optional instead of autostarting.  So my question is, what can I do to make it boot directly into a text only mode, not loading anything extra until I do something like start x ? My goal is to have my system be as lightweight as possible until I need the extra stuff.

I have installed Debian wheezy on my machine with a netinst image, now I would like to deactivate the desktop and boot straight to the command line, not only that but I would like to not waste any resource on the X11/gnome/gdm at all if not needed.  I tried ( as root )  update-rc.d -f gdm remove update-rc.d -f gdm3 remove update-rc.d -f wdm remove   but Debian keeps booting into the login manager, I really don't need that, how I can deactivate this kind of boot and start X only when needed ?


Well i installed apache2 by typing   sudo apt-get install apache2   now i am tring to uninstall apache2 by this command  sudo apt-get autoremove apache2   Well my apache2 is still running. And when i stop it vie typing  sudo service apache2 stop   it stops, and i can also start it typing   sudo service apache2 start   Whats the point of auto remove anyway? and how to remove apache2 ?

It seems a simple apt-get remove apache2 does not completely remove apache2 as I can still see it on one of the processes when running top. How does one remove apache2 completely on his ubuntu server?  It's not removed indeed:  ~# which apache2 /usr/sbin/apache2 ~# whereis apache2 apache2: /usr/sbin/apache2 /etc/apache2 /usr/lib/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz   But when I do apt-get remove apache2 again:  # apt-get remove apache2 Reading package lists... Done Building dependency tree Reading state information... Done Package apache2 is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I have an array that looks like this:  $scope.quotes =     [         {             'quote': 'foo',             'author': 'bar',             'source': 'foobar',             'first': 'slideout',         },         {             ...         },     ]   I'm trying to remove the key-value first: slideout from the array. like this:  delete $scope.quotes[0][first];   I also tried:  delete $scope.quotes[0].first;

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


In a card deck of $52$, I want to count the ways for $12$ card-hands to contain 4 cards in each of three suits.    I thought that it'd be:  The ways of picking first suit $\to 4$  The ways of having 4 cards with this suit $\to \binom{12}4$  The ways of picking first suit $\to 3$  The ways of having 4 cards with this suit  $\to \binom{12}4$  The ways of picking first suit $\to 2$  The ways of having 4 cards with this suit $\to \binom{12}4$    So total ways is: $4\cdot 3\cdot 2 \cdot \binom{13}4 ^3$.    My notes say this is incorrect but do not say why.

Problem: Find the number of twelve-card hands containing four cards in each of three suits.   My solution:   pick a suit : 4 ways. choose 4 cards from the 13 in that suit: ${^{13}}{C}_{4}$ ways. pick another suit: 3 ways. choose 4 cards from the 13 in the new suit: ${^{13}}{C}_{4}$ ways. pick the final suit: 2 ways. choose 4 cards from the 13 in the final suit: ${^{13}}{C}_{4}$ ways.   Hence, total number of ways is $4\cdot{^{13}}{C}_{4}\cdot3\cdot{^{13}}{C}_{4}\cdot2\cdot{^{13}}{C}_{4} = {^{4}}{P}_{3}\cdot\left({^{13}}{C}_{4}\right)^3 $ total hands.   This is the incorrect answer. Why?


Say I have these lists:  a = [1, 2, 3, 4] b = [6,7] c = ['a', 'b', 'c']   I would like to create a 3-Dimensional data structure that contains new lists combining all the elements of each list together in all possible ways. I would then like to access these new list using matrix like indexing.   So for example, say f is a function that does what I want. Then I could do this:  m = f(a,b,c)   Then m[0][0][0] would give [1,6,'a'], m[1][0][0] would give [2,6,'a'], and so on.   Basically, I know I can already do this using nested for loops.  jList = [] for j in a:     kList = []     for k in b:         lList = []         for l in c:             o = [j,k,l]             lList.append(o)         kList.append(lList)     jList.append(kList)   This gives me a list of lists of lists of lists.  [[[[1, 6, 'a'], [1, 6, 'b'], [1, 6, 'c']],    [[1, 7, 'a'], [1, 7, 'b'], [1, 7, 'c']]],   [[[2, 6, 'a'], [2, 6, 'b'], [2, 6, 'c']],    [[2, 7, 'a'], [2, 7, 'b'], [2, 7, 'c']]],   [[[3, 6, 'a'], [3, 6, 'b'], [3, 6, 'c']],    [[3, 7, 'a'], [3, 7, 'b'], [3, 7, 'c']]],   [[[4, 6, 'a'], [4, 6, 'b'], [4, 6, 'c']],    [[4, 7, 'a'], [4, 7, 'b'], [4, 7, 'c']]]]   This is fine, but I have to do this for dimensions higher than 3, and the many nested for loops just seems like it can't possibly be the best or most efficient way to build this type of data structure. I can't help but thinking there must be a better solution, something in some library like the function I made up above, maybe numpy function, but I've done a lot of searching and have not found something for lists of varying sizes and data types like I have.   Any ideas?

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


Create  two variables assign month as one variable and year as another variable and pass into next request using JSR223 post processor am getting issue while doing this,can anyone please suggest me

Assign month as one varaible and year as one variable pass into next requst  For the above thing needed using bean shell post processor  and dummy sampler


I have followed the steps on the Ubuntu website as it says, and it gets stuck halfway through 'phablet-flash -b'. What makes it worse i then when i try to put it into recovery, and run the code 'adb devices' it doesn't show any devices?  Any help please?

I have installed the Ubuntu Touch Developer Preview on my Nexus 4. It is the problem when I want to get back to my android 4.2.2 but I wipe all my data first, from factory reset, cache partition and also the dalvik cache.  Now, I cannot root my phone to android neither ubuntu because the pc cannot recognize my phone. Can you tell me what is my problem and how can I fix this? Thanks!


In my QFT course, we studied the Klein Gordon equation, and we found that the field operators verifies : $[\phi(x), \phi^\dagger (y)]=-i \Delta(x,y)$  With $$\Delta(x,y)=i \int d\widetilde{k} (e^{-ik(x-y)}-e^{+ik(x-y)})$$  Where $d\widetilde{k}=\frac{d^3k}{2k^0(2\pi)^3}$.  And we said that : if $(x-y)^2<0$ then $\Delta(x,y)=0$  But I don't know how to prove this ? I tried to manipulate the integral to show this but nothing very useful...  How to prove this ?  And as I understand the property, it means that if we have $x$ and $y$ that have space-like separation, then they commutes.   So in more physical way, it means that if I measure $\phi$ in $x$ and then in $y$ or in $y$ and then in $x$ in a faster way than light could reach the distance between $x$ and $y$, I will have the same result. Which is logic because in thoose configurations, the field "can't be aware" of a previous measurement as $(x-y)$ lives outside of the light cone.  So my two questions :   How to prove that $\Delta(x,y)=0$ for $(x-y)^2<0$. Is my physical interpretation of this entirely correct?

Related post   In Peskin and Schroeder's QFT p28, the authors tried to show causality is preserved in scalar field theory.  Consider commutator $$ [ \phi(x), \phi(y) ] = D(x-y) - D(y-x) \tag{2.53} $$ where $D(x-y)$ is the two-point correlation function,  $$D(x-y):= \langle 0 | \phi(x) \phi(y) | 0 \rangle  = \int \frac{d^3 p}{ (2\pi)^3} \frac{1}{ 2E_{\mathbf{p}}} e^{-ip(x-y)}\tag{2.50}$$  P&S argued that each term in the right-hand-side of (2.53) is Lorentz invariant, since $$\int \frac{d^3p }{ (2\pi)^3} \frac{1}{2E_{\mathbf{p}}} = \int \frac{ d^4 p }{ (2\pi)^4} (2\pi) \delta(p^2-m^2)|_{p^0>0} \tag{2.40}$$ is Lorentz invariant.  Since there exists a continuous Lorentz transformation in the spacelike interval $(x-y)^2<0 $ such that $(x-y) \rightarrow - (x-y) $ and $D(y-x)=D(x-y)$, (2.53) equals zero in the spacelike interval. In timelike interval, since such continuous Lorentz transformation does not exist, (2.53) is non-zero in general.  My question is, consider a non-continuous Lorentz transmation in the timelike interval, $PT$, namely time reversal times parity transformation. I can also let  $(x-y) \rightarrow - (x-y) $. Why (2.53) in the timelike interval is non-zero?  I guess $PT$ will let (2.40) go to $p^0<0$ branch. But I am not sure if it breaks the Lorentz invariant of (2.40) and (2.50).


I have just installed Ubuntu for the first time  I cant get my bluetooth to turn on.  I ran a couple of commands and these are the results:  $ sudo rfkill list   0: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 1: brcmwl-0: Wireless LAN     Soft blocked: no     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   $ sudo rfkill unblock bluetooth $ sudo rfkill list  0: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 1: brcmwl-0: Wireless LAN     Soft blocked: no     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   $ dmesg | grep Blue  [   16.575002] Bluetooth: Core ver 2.21 [   16.575014] Bluetooth: HCI device and connection manager initialized [   16.575016] Bluetooth: HCI socket layer initialized [   16.575018] Bluetooth: L2CAP socket layer initialized [   16.575021] Bluetooth: SCO socket layer initialized [   19.060274] Bluetooth: hci0 command 0x1001 tx timeout [   27.056612] Bluetooth: hci0: BCM: Reading local version info failed (-110) [   27.061648] Bluetooth: hci0: BCM: chip id 70 [   27.077663] Bluetooth: hci0: BCM43142A [   27.077667] Bluetooth: hci0: BCM (001.001.011) build 0000 [   27.535077] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found [   34.933334] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [   34.933337] Bluetooth: BNEP filters: protocol multicast [   34.933341] Bluetooth: BNEP socket layer initialized   $ lspci -knn | grep Net -A2; lsusb  04:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a]     Kernel driver in use: wl Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 138a:0050 Validity Sensors, Inc. Swipe Fingerprint Sensor Bus 001 Device 003: ID 064e:930a Suyin Corp.  Bus 001 Device 002: ID 0a5c:216d Broadcom Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


I am trying to write a program from removing spaces in a string in C. I tried to debug using gdb but I guess I am not very knowledgable in using that tool. My code is as follows:  #include<stdio.h>  void RemoveSpaces(char * str){     char *var1, *var2;     var1 =  str; var2 = str;     while(*var1 != '\0'){         if(*var1 != ' '){             *var2 = *var1;             var2++;         }         var1++;     }     *var2 = '\0'; }  int main(){     char *str = "abc de";     printf("Before: %s\n", str);     RemoveSpaces(str);     printf("After: %s\n", str);     return 0; }   I tried to set watch on var1 and var2 but I get SIGSEGV on line where *var2 = *var1; I looked for some code  before writing my own. Of course, the answer states that its untested but I am doing a similar statement on the line where I get error. Why wouldn't (thereotically) *i = *j++; give an error while *var2 = *var1; would? (I don't want someone to remove my error. I just want to know why I might be getting this error so that I can avoid it in future. )

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


import java.util.*; public class Solution5 {     public static void main(String args[])     {         int voterId;         String voterName;         int voterAge;         boolean isVoteCasted;         String constituency;                  Scanner sc = new Scanner(System.in);                  Vote v[] = new Vote[4];                  for(int i=0;i<4;i++)         {             voterId = sc.nextInt(); sc.nextLine();             voterName = sc.nextLine();             voterAge = sc.nextInt();             isVoteCasted = sc.nextBoolean(); sc.nextLine();             constituency = sc.nextLine();             v[i] = new Vote(voterId, voterName, voterAge, isVoteCasted, constituency);         }         String con = sc.nextLine();         sc.close();                  int total = findTotalVotesCastedByConstituency(v, con);         if(total == 0)             System.out.println("No votes casted");         else             System.out.println(total);                  Vote[] search = searchVoteByAge(v);         if(search == null)             System.out.println("No such voters");         else             {             for(int i=0;i<search.length;i++)                 System.out.println(search[i].getVoterId());             }     }          public static int findTotalVotesCastedByConstituency(Vote v[], String con)     {         int c=0;         for(int i=0;i<4;i++)         {             if(con.equalsIgnoreCase(v[i].getConstituency()))             {                 if(v[i].getIsVoteCasted())                     c++;             }         }         return c;     }          public static Vote[] searchVoteByAge(Vote v[])     {         Vote temp[] = new Vote[4];         Vote t;         int c=0;         for(int i=0;i<4;i++)         {             if(v[i].getVoterAge()<30)                 temp[c++]=v[i];         }         //for(int i=0;i<c;i++)         //  System.out.println(temp[i].getVoterAge());         if(c==0)             return null;         for(int i=0;i<c;i++)         {             for(int j=0;j<c-i-1;j++)             {                 if(temp[j].getVoterAge() > temp[j+1].getVoterAge())                 {                     t = temp[j];                     temp[j] = temp[j+1];                     temp[j+1] = t;                 }             }         }         return temp;     } }  class Vote {     private int voterId;     private String voterName;     private int voterAge;     private boolean isVoteCasted;     private String constituency;          public Vote(int voterId, String voterName, int voterAge, boolean isVoteCasted, String constituency)     {         this.voterId = voterId;         this.voterName = voterName;         this.voterAge = voterAge;         this.isVoteCasted = isVoteCasted;         this.constituency = constituency;     }          public int getVoterId()     {         return voterId;     }     public String getVoterName()     {         return voterName;     }     public int getVoterAge()     {         return voterAge;     }     public boolean getIsVoteCasted()     {         return isVoteCasted;     }     public String getConstituency()     {         return constituency;     } }   In this code, I am trying to return array objects (in ascending order) of those voters whose age is less than 30. Since I am new to this concept, so I did not use List and Collection. Rather opted for simple bubble sort. The results displayed are perfectly correct. Still I get an additional line which says: Exception in thread "main" java.lang.NullPointerException: Cannot invoke "Vote.getVoterId()" because "search[i]" is null at Solution5.main(Solution5.java:40)

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 previously thought that RAW format is just a one format and any Ps version works with it. But now I know that different RAW formats from newer cameras are not supported by the Ps version that exists at the time the cameras is released. Anyway, I found a  which what ACR and LR versions support this specific camera's RW2 files are mentioned. (It says ACR 9.8 & LR 6.8 support RW2s from the FZ2000, right?) So, how can I know about what Photoshop version that supports FZ2000's RW2s? And, is the ACR (in this case, version 9.8) integrated in it?; do I need to get the ACR (9.8) separately?..

I am a beginner photographer with a Canon 7d and MacBook Pro. I'm not sure if Adobe camera Raw is compatible with either and really need advice on how to go about downloading the correct version.


The badges for editing posts explicitly exclude tag edits. I understand why - they are supposed to reward substantial edits.  At the same time, tags are useful, necessary, for how Stack Exchange works: they are needed so people can find relevant questions, and so people can be notified there's a question they might be able to answer. So, it follows that someone who spends time correcting tags on questions does a service to the community.  So could there perhaps be some separate badge for editing tags? "Edited tags on 250 questions - Silver, Edited tags on 1000 questions - Gold", or something like that?

I've been busy retaggin questions since I got my retag privileges.  Shouldn't there be an incentive to retag wrongly tagged questions, other than the urge to do things right?  I'm mean, the only "badge incentive" for retagging are "Firs edit" (Organizer) and "Creation of a tag used 50 times" (Taxonomist). The first one is easy to get, and the second one, right now in SO is almost impossible to get without cheating, that's editing 50 questions with an unlikely tag. Taxonomist I guess, could encourage wrongly tagging.  Is this really a problem?  We could have an "Tagged 200 question" badge, so people go for that badge, instead of taxonomist.


I created local empty folder structure and I don't see folders in Unstaged Changes view   I can't commit and push folders to repository, why can't it be done in Eclipse?  In git command line I can git add empty folders

How can I add an empty directory (that contains no files) to a Git repository?


The decision for refusal  Please advise me on when next to apply and how to go about a fresh application without getting refused again, in a few weeks' time I'm going to be through with my university undergraduates course.

I am a Nigerian citizen. I was refused a visitor visa to the UK. Here is my rejection letter:     How can I apply again so as to not be refused? How soon can I apply? My university undergraduate course will be finished in a few weeks.


This Association’s standards are to be used globally for all ABC related Engineering issues. My question is that is ''are to be used'' passive structure? And if it is, what type is it. Because I can not see this kind of structure when I check the passive voice chart.

Several times I've heard sentences like You are not to be here. whereas I'd expected something with should. Or He is absolutely not to know..  What is this form? When should I use it?


Me and my daughter are dependents who got our ITIN in April, but did not get our passports back after 100 days.  We called the call center and got different answers at all times and twice they said it has been sent. Yesterday the customer care lady told me to ask the congressman of my place. Its been only 1 year since we came from India. My daughter is two.  We went to Bellevue IRS office but they did not help. We called taxpayer advocate but they said they don't take document missing cases. Now who is congressman of Bellevue Washington? Can he really get passports back? We can't get help from our embassy since the office is a 10 hour drive, and I don't think I have any original documents for myself and daughter. Hope to see reply. Worried to even call customer care since July.

I have filed my 2012 tax return jointly with my wife, along with my wife's ITIN application, back in late March.  In April, I got a letter for IRS ITIN department saying that we should send my wife's original passport to them. So we sent my wife's passport on May 15th. USPS tracking number confirmed that IRS received it on May 20th.  However, last week (end of June) we have received another letter from IRS ITIN department saying that our ITIN application has been rejected, rejected because we have not sent the original identification document that they requested!  Okay, let's put our tax return and ITIN aside. Where is my wife's passport? Right now my wife does not have her personal identification, nor proof of legal status in U.S. Could IRS have lost it?  I tried to call the IRS several times. One time I waited for 1 hour and 20 minutes to talk to a person, and that person said he has only 10 minutes to talk before he has to leave. He said they'll investigate and someone(?) will call us back soon, but never called back. I wrote them a letter, but no response. I tried calling several times more, but machine is saying 'sorry too many calls right now, we can't accept your call'.  What can I do?


Hello I have been searching for ways to update my apps & download without having to use a credit card which I don't have and I don't have the "none or Paypal" option in the payment section and I don't know what else to do. Is there any way without having those options that I can update my apps or even download any??

I  want to download free app in my iPod touch device and i have the following doubts.  Kindly resolve me doubts.   when i try to download it asks my credit card security number. since i am trying to download free app , why do i need to provide my credit card security code? Will i be debited for downloading the free app from app store?   I cant able to find any information regarding this on apple.  Please provide me some references about this from apple and please resolve my doubts.  Thanks a lot.


How do you prove the following limit?  $$\lim_{n\to\infty}\left(\sum_{k=1}^n\frac{k}{2^k}\right)=2$$  Do you need any theorems to prove it?

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


The linked question is exactly what my problem was but it is not having any solution still.   In the above image we can see the comment box going out of the dialog box in every Stack Exchange Sites,when we click other (needs ♦ moderator attention) in flag section.

To reproduce:   Click Flag (question or answer) Click other (needs moderator attention)   The textarea is too wide:  StackOverflow        AskUbuntu        StackExchange        Most probably affects other sites, but didn't check. I think it's enough. :-)  Reproducing on:   Chromium Version 40.0.2214.111 Ubuntu 15.04 (64-bit) Google Chrome Version 41.0.2272.76 (64-bit) Firefox 36.0   (I'm using Ubuntu 15.04)


I've been playing  and casting spells but there's no xp bar for the magic.  I have checked the options but that's not it, I can move it but can't see it.  I'm also not levelling - I've killed like 20 mobs with just magic and I'm still level 1 with 100 mana and like 11 burnout.  Ars Magica is a Minecraft mod and is part of some of the Feed the Beast packs for 1.6.4 and i can cast the spells

I took with my first skill points "Self" and "Regenerate" and "Projectile". Now I can make only 2 spells - "Self Regenerate" & "Projectile Regenerate" - which I both can't cast. The first uses 270 Mana, the second uses 540 mana - but I have only 100.  How can I progress further? I don't have any points to unlock other spells and I can't cast my current ones because I don't have the mana - thus I can't progress.   How do I level up so I can unlock more points?


Windows has a certain format, and if a file is to be used in Linux, the line endings have to be converted. Isn't the line ending just a character like any other? Why is it treated specially?

Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix?  And now that Mac OS X is Unix (-like), did Apple switch to \n from \r?


I know they can be $\frac{0}{0}$ or $\frac{\pm\infty}{\pm\infty}$, but what do they mean in English?  For example, $$\lim_{n\rightarrow \infty}A$$  In the context of limits, when the above example get a limit that is an indeterminate form. I assume it means that $A$ does not give enough information to "determine" a limit. Fine.   But why is it that when we cancel out some terms out in $A$, *poof* now we have enough information to get a definite limit even though no extra information (i.e. additional expressions) have been added to $A$.  Another example:  $\lim_{x\rightarrow3}\frac{(x-3)(x+3)}{x-3}=\frac{0}{0}$, not enough information to determine the limit.  $\lim_{x\rightarrow3}\frac{(x-3)(x+3)}{x-3}=\lim_{x\rightarrow3}(x+3)=6$, Hey! Now we have enough information to determine the limit! (I thought you said you didn't have enough information)

We can apply l’Hôpital’s Rule to the indeterminate quotients $ \dfrac{0}{0} $ and $ \dfrac{\infty}{\infty} $, but why can’t we directly apply it to the indeterminate difference $ \infty - \infty $ or to the indeterminate product $ 0 \cdot \infty $?  Furthermore, why can’t we call $ \infty + \infty $ and $ \infty \cdot \infty $ indeterminate forms?  I’m new to calculus, so please clear up my concepts if you can. Thanks!


I have a private comparator in Level class:    bool positionCmp(Entity* a, Entity* b);  and when I try to use this in another Level class method: void Level::drawEntities(std::vector<Entity*> entities) {     sort(entities.begin(), entities.end(), positionCmp);     for (int i = 0; i < entities.size(); ++i) entities[i]->draw(); }  Visual Studio 2019 compiler says: 'Level::positionCmp': non-standard syntax; use '&' to create a pointer to member. If I add the '&', I getting '&': illegal operation on bound member function expression void Level::drawEntities(std::vector<Entity*> entities)     {         sort(entities.begin(), entities.end(), &positionCmp);         for (int i = 0; i < entities.size(); ++i) entities[i]->draw();     }   What should I do?

I'm using an API that requires me to pass a function pointer as a callback. I'm trying to use this API from my class but I'm getting compilation errors.   Here is what I did from my constructor:  m_cRedundencyManager->Init(this->RedundencyManagerCallBack);   This doesn't compile - I get the following error:      Error  8 error C3867: 'CLoggersInfra::RedundencyManagerCallBack': function call missing argument list; use '&CLoggersInfra::RedundencyManagerCallBack' to create a pointer to member   I tried the suggestion to use &CLoggersInfra::RedundencyManagerCallBack - didn't work for me.   Any suggestions/explanation for this??  I'm using VS2008.  Thanks!!


I've followed all the instructions for installing rabbitvcs and am running nautilus3 but do not get right-click svn options (I believe it worked under 10.10).  I should add that I'm running 12.04 under VMware Fusion. Any suggestions (I've searched the web but no luck).

I was evaluating  RabbitVCS as replacement  of RapidSVN to connect to my SVN repository on Ubuntu server.   This what I did on my 12.04   Opened the Ubuntu software centre Searched for RabbitVCS-Core and RabbitVCS-nautilus. They were listed. Installed both of them and they are successfull installed.   Then,    I used the dash home to see if I can find these programs. Opened Home folder and right clicked on certain folders which was checked out using Rapid SVN. I could not find any options to use RabbitVCS in nautilus from here. I restarted my machine and repeated both process again.   So How can I use RabbitVCS?   Am I seeing everything as it is expected or some thing weird?


1st, I added a shapefile with projected coordinate system SL_grid_99 to Table of contents.   2nd, I added my points (excel file) to the table of contents. I displayed XY data and exported point data as shapefile. This is the coordinate system for the points:    It seems that both, point and polygon, have the same coordinate system. However, they are not lining up. As can be seen in the map, the points are in the lower left-hand corner:   How can I make the points and polygon line-up?

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


I just came across an exercise, however I don't know how to find the limit of $$\lim_{n \to \infty} \frac{2^n}{n!}$$ can any body help?  Of course this is not homework, I'm only trying out example myself, from  page 38.  I know that the limit exists, and it is $0$, checked it in on the wolfram, but I don't know how to solve it.  thanks in advance!

Why is     $$\lim_{n \to \infty} \frac{2^n}{n!}=0\text{ ?}$$   Can we generalize it to any exponent $x \in \Bbb R$? This is to say, is     $$\lim_{n \to \infty} \frac{x^n}{n!}=0\text{ ?}$$     This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


I have a problem with my account 1 day ago I changed my password and than I forgot my password. I check some solution in many website and I found something as follow:   Enter to grub and selected Advance option for Ubuntu. Selected Ubuntu,with Linux\ 3.8.0-11-generic (recovery mode) Than I selected root Drop to root shell prompt Then I write these commands mount -rw -o remount / Then sudo passwd -u (my account username) Then passwd (my account username) Then vi /etc/lightdm.conf Then greater-show-manual-login=true   And I saved the new configuration but, after restart I was unable to login when I logged in and add my password there was a flash black screen and I was back to the greeting screen? please tell me the solution

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


Thor hammer cannot be lifted by anyone except Thor but in movie Avengers: Age of Ultron, vision lifted the hammer (Mjolnir) of Thor not any other avengers even when all the avengers are strong?

In some scenes in Avengers: Age of Ultron Iron man, War Machine, and Captain America try to lift Thor’s hammer but they end up failing. At some point Vision lifts it easily. How can Vision lift it?


I am so confused as to what is happening. I have a Java application for android and am having trouble with one if statement. The if statement is within a for loop that is looping through an ArrayList of objects that I have created earlier in the code. Each object has a type variable which is a string and a method to access the variable. In the for loop I printed out the variable for each object to check what it is, and it prints out "0" as a string. I then check it with an if statement within that for loop stating, if b.getType() == "0", and while I know that it is for sure 100% that the statement is true, it will not run the code within made sure by the fact that I had it print out the word "true" if it ran the code. I have no idea what is happening.      public Level(String level, Bitmap[] images){     String[] types = level.split(" ");     this.images = images;     int x = 60;     int y = 48;     for(int i = 0; i < 276; i++){ //creates new block objects based on the text file         blocks.add(new Block(x, y, types[i]));         x += 32;         if(x >= 796){             x = 60;             y += 32;         }     } }   This is where I initialized the objects, passing in a string value of type to the block object.   public void draw(Canvas canvas){     for(Block b: blocks){ //loops through the blocks and draws them to the canvas         System.out.println(b.getType());        if(b.getType() == "1"){            System.out.println("true");            canvas.drawBitmap(images[1], b.getX(), b.getY(), null);        }     } }   This is the block of code that is being run and is causing me much trouble.  public class Block {  private int x; private int y; private String type;  public Block(int x, int y, String type){     this.x = x;     this.y = y;     this.type = type; }   public int getX(){     return x; }  public int getY(){     return y; }  public String getType(){     return type; }   }  I/System.out﹕ 0   This is the block class where type is stored. Below is what is printed out as it says in System.out.println(b.getType()); Much help would be appreciated.

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?


How should I convert historic local time to UTC taking into account of daylight saving?  The main problem is the daylight saving doesn't occur at a fixed period every year and hence I cannot think of a way to do this task.

I currently use the following to get a local datetime from a UTC datetime:  SET @offset = DateDiff(minute, GetUTCDate(), GetDate()) SET @localDateTime = DateAdd(minute, @offset, @utcDateTime)   My problem is that if daylight savings time occurs between GetUTCDate() and @utcDateTime, the @localDateTime ends up being an hour off.  Is there an easy way to convert from utc to local time for a date that is not the current date?  I'm using SQL Server 2005


There was a homework about inequalities (that why I ask a bunch of inequality problems). But I couldn't solve the following:  If $0<a,b,c<1$ and $a+b+c=2$, prove that $8(1-a)(1-b)(1-c)\le abc$  I tried many times, and finally I used Muirhead, but it failed!  $\begin{split}L.H.S.-R.H.S.&=8(1-a)(1-b)(1-c)-abc\\&=8-8(a+b+c) +8(ab+bc+ca)-9abc\\&=-(a^3+b^3+c^3)+(a^2b+b^2c+c^2a+ab^2+bc^2+ca^2)-3abc\\&=\frac{1}{2}\Bigg(\sum_{sym}a^2b-\sum_{sym}a^3\Bigg)+\frac{1}{2}\Bigg(\sum_{sym}a^2b-\sum_{sym}abc\Bigg)\end{split}$ But as $(3,0,0)$ majorizes $(2,1,0)$ but $(2,1,0)$ majorizes $(1,1,1)$, so it fails.  Could someone help? Any help is appreciated!

Let $a$, $b$, and $c$ be positive real numbers such that $a+b+c = 1$. Then how to establish the following inequality? $$ (1-a)(1-b)(1-c) \geq 8abc.$$  My effort:   Since $a+b+c =1$, we can write $$  (1-a)(1-b)(1-c) = 1 - (a+b+c) +(ab+bc+ca) - abc = 1 - 1  +(ab+bc+ca) - abc =  (ab+bc+ca) - abc = abc(a^{-1} + b^{-1} + c^{-1} ) - abc = 3abc (\frac{a^{-1} + b^{-1} + c^{-1}}{3}) - abc.$$ What next?


For a charged particle moving in free space, we can say from the homogeneity of space-time, that it moves along a geodesic.  Is there an analogous principle for the evolution of the electromagnetic field in space-time?

Considering the fact that electrons tend to take the maximum conductance path to flow from A to B. This is justified by saying that $\vec{E}$ is larger in conductors. But once similarly it was thought for gravitation, that if in a region the gravity was stronger, the mass more likely took that path, then later it was found it is actually a geodesic in space time as gravity curves space time. So is there some underlying geodesic for motion caused by electromagnetic force?


Is there a way to make a certain word bold every time in comes in the document?   Thanks.

Is it possible and furthermore constructive to make LaTeX automatically format specific words in specific way? Let's say, for example, I'd like to have every occurrence of the word "hello" in a bold cyan monospaced font, whereas the rest of the document remains normal, sans serif and black.   How can I achieve that without having to do a search&replace to place "hello" into a custom command every time before I compile the .tex file?


How should I decide if the following sequence is convergent or divergent?  $$a_n = \frac{\sum\limits_{k=1}^{n} \frac{1}{k}}{\log n}$$ I would appreciate any approach. Thanks.    I was misunderstood series and sequence so I edited the post accordingly.

I'm not completely new to convergent series and sequences, but proving the above gave me some troubles. Would appreciate some help :) Show that: $$\lim_{n\to\infty} \frac{\sum\limits^n_{k=1} \frac{1}{k}}{ \ln(n) } = 1$$


A physics student is currently enrolled in a PhD program in the US, 1.5 years into yet. After few months he will have received his MSc degree and will start working on his thesis. While his physics department is relatively strong, he is unhappy (perhaps even disappointed) because his very sub-field of interest is particularly weak and researchers in this sub-field very rarely publish decent papers.   He's seriously considering starting again from scratch and apply for a new place where people are stronger at his field. Can he apply while still being enrolled in his PhD?  How much negativity does the fact that he plans to drop the current PhD add to his application?  Is it better to apply to UK universities, since in US he will be required to repeat the coursework?

I've heard of people transferring between graduate schools because of their advisor moving to another school and taking their students with them.   Do students ever transfer for other reasons? If a student isn't happy at the school they choose, could transferring be an option? Presumably they would frame it as something positive such as "turns out I really want to work with Professor X" rather than "I hate my school", but does this ever happen? Is there a certain timeframe in which this is possible? (Assume it's a 5 year PhD program.)  If the answer varies by subject please mention the subject in your answer.  (Context: many friends have told me that if it turns out I'm not happy with my choice, I can always transfer. My impression is that this is actually difficult since many schools don't accept transfer students and in any case not being able to stick with a program looks bad -- but I don't have evidence either way so wanted to ask people who are in academia. Of course the ideal would be to pick a school one is happy with in the first place!)


I had the idea, to make a custom card game based off an Anime i like. I was wondering if it would be legal to have such printed out (using a custom card/board game service) for personal use. I would only play it with friends and not make any money off of it.

I've played around in the past of the 2D Flash fan-made version of the popular Valve game Portal.  It has basically the exact same mechanics, but as a 2D side-view flash game.  Lately I've toyed around with creating a simplified flash version of some of my favorite franchises (such as Zelda, Mario, Splinter Cell, etc.).  Of course, nothing is "stopping" me from just using the same mechanics and just changing the name to something not copyrighted.  I have witnessed projects that have tried to directly port a 3D game into a 2D simplified version, with the exact same plot and puzzles (Ocarina of Time in 2D comes to mind), and I have seen them being shut down.  But I am not likely going to exactly duplicate any game...just borrow some of the source material and basic underlying mechanics.  For example, if I were to make a Zelda-influenced fan game, I would have items such as the Hookshot, Boomerang, and all other sorts of ones from the Gameboy Zeldas; just with a custom plot and dungeons.  With likely the same mechanics.  What are the legal issues involved in this?  I used to think it was a "Don't do this ever; it's a bad idea."  But then I've seen the Portal clone, and now I'm curious.


So, I am but a semester away from graduating from college as a Computer Programmer in Canada. All is well in the grades department - I've completed all assigned work and maintained a ~4.0 GPA throughout the course of my studies. However, I still feel anxious and have a sense that I'm entering the workforce without the base skill-set requisite for success.  Is it commonplace for students to feel lost and/or potentially inadequate prior to graduation? Are these types of thoughts and feelings common among new graduates?

I am a third year (starting fourth year in the fall) PhD student in mathematics. I've passed all qualifying exams and am currently doing research. As far as I can tell, I am not doing poorly. I have the good fortune of having a great advisor, being in a very supportive department, and having friends and family who genuinely care about my success.   The fact is research is hard. It appears to consist primarily of staring at a problem for days and days and days without getting anywhere. Sometimes, rarely, I do figure something out and that feels wonderful, but the overwhelming majority of my time appears to be spent banging my head against a mostly figurative wall. I am not complaining about the material being hard, and I am not averse to putting in hard work, but I get frequently discouraged when I realize the vast volumes of mathematics that I yet know nothing about (and probably never will). It's very hard to quantify progress - in particular, there are too few tangible returns after too many hours worked. I find myself thinking along the lines of "Oh, if only someone actually smart were thinking about this problem they would have solved it in moments" and so on.   I've talked about this to some number of people; here is some advice I have received:   Take a day off. Putting in hours upon hours of trying things doesn't magically lead to a solution, particularly if the brain is tired and just wants to sleep. Have a hobby. Since math research doesn't exactly provide instant gratification, a hobby might provide some instead.  Talk to other graduate students. Realize that many graduate students go through this.   I'm interested to know how other folks have dealt with being discouraged as a graduate student. Does it get better with time and experience? Is this a sign that research is not for me and that I should seriously consider a life outside academia?


I am traveling from Delhi to Kiev( Ukraine) via Vienna. Do I need a transit Visa? Transit time is 2 hrs.  I hold an Indian passport and Visa for Ukraine.

I am travelling form Delhi (DEL) to San Francisco (SFO), I have to make a connection flight in Vienna that would take me to Frankfurt (FRA). My flight to SFO is from FRA, I have one ticket for entire journey and the flights are operated by Lufthansa or its subsidiaries.  Do I need a transit visa? My flight arrives at Vienna international airport and leaves from the same, and for second leg it arrives at Frankfurt international airport.  I asked this question as an addendum to my  but was advised to make a new post.  I hold Indian passport and valid US visa.


We have equivalent symbol \equiv, but how to write unequivalent like this

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I'd like to find out which process is responsible for Unity panel and launcher.. In case I'd like to close one of them, which process to I have to kill?  Thanks!

I'm being hit (quite often) by that bug where you can't click on some indicators. It's easy to fix by restarting unity, but that usually also means running to the risk of upsetting some window on re-parenting (rare, but I'd rather avoid any such problems).  So, I know there is `unity-panel-service', and I'm guessing this might have something to do with the solution?  Is it possible to restart the unity panel (or the entire unity plugin) without restarting compiz itself?


So let’s say I bought a ps4, bought fifa 19, red dead redemption 2 and Spider-Man on my psn account, downloaded the games on my console and can now play the games. And then I decide to transfer my games and other data to my friend who just got a ps4 console. If I sign out of my account and sign into his console to activate the games I had purchased with my psn account. Provided I do not go online with my own console, can I still play these games on the first console (mine)?

Both myself and my boyfriend have PS4s.  Can I just get a single PSN account and sign both consoles into the same account, or do I need to get two separate accounts?


I am trying to prove that the set of zero divisors of the ring $\mathbb{Z}/_{b\mathbb{Z}} $ is equal to $\{[x] \in \mathbb{Z}/_{b\mathbb{Z}}: \gcd(x,b)>1\}$. Therefore I started with the set of zero divisors equals: $\{[x] \in \mathbb{Z}/_{b\mathbb{Z}}: cx = db \, \space \text{for some} \space  c,d \in \mathbb{Z}\backslash\{0\}\}$. And now to my question: Do we have: $x$ divides $db \implies \gcd(x,b)>1$. If this holds (why/why not?), I would be done.

Let us consider the ring $\mathbb{Z}_n$ where $\bar{m}\in\mathbb{Z}_n$  Could anyone help me prove that $\bar{m}$ is a zero divisor in $\mathbb{Z}_n$ if and only if $m,n$ are not coprime  So far I have:  Assume $\exists \bar{a}: \bar{m} \bar{n}=n \mathbb{Z} \Rightarrow$ for some $b\in\mathbb{Z}:am=bn$  I then assumed $n,m$ were coprime and attempted to use $\exists a',b'\in \mathbb{Z}:a'm+b'n=1$ to come to a contradiction, however haven't found one, the most promising thing I have found so far is that  $a=n(a'b+ab')$ and $b=m(a'b+ab')$ $\Rightarrow n|a$ and $m|b$


[  I need to be able to represent these symbols, how would I do this? thanks


Power sum is given by $$ 1^m + \cdots + n^m = \frac1{m+1} \sum_{k=0}^m (-1)^k \binom{m+1}kB_k n^{m+1-k}$$ and negative zeta values are given by $$\zeta(-m) = (-1)^n \frac{B_{m+1}}{m+1}$$ But heuristically, $\zeta(-m) = 1^m + 2^m + \cdots $. So it feels as if taking $\lim_{n \rightarrow \infty}$ in the power sum formula should give us the negative zeta value.   All this is obviously mathematically not rigorous ($\zeta(s)$ with $\text{Re}(s)\le 1$ must be calculated using reflection formula and taking such limit is impossible). But to me, the occurrence of Bernoulli number in both expressions seems too suspicious for a coincidence. Is it really just a coincidence?

I was messing around with some math formulas today and came up with a result that I found pretty neat, and I would appreciate it if anyone could explain it to me.   The formula for an infinite arithmetic sum is $$\sum_{i=1}^{n}a_i=\frac{n(a_1+a_n)}{2},$$ so if you want to find the sum of the natural numbers from $1$ to $n$, this equation becomes $$\frac{n^2+n}{2},$$ and the roots of this quadratic are at $n=-1$ and $0$. What I find really interesting is that $$\int_{-1}^0 \frac{n^2+n}{2}dn=-\frac{1}{12}$$ There are a lot of people who claim that the sum of all natural numbers is $-\frac{1}{12}$, so I was wondering if this result is a complete coincidence or if there's something else to glean from it.


Let $f:\mathbb{R}\rightarrow \mathbb{R}$ be continuous, on-to, and 1-1. Prove that if $A$ is a Borel set, then $f(A)$ is a Borel set.

Suppose $f: \mathbb{R} \to \mathbb{R}$ is a continuous function which is 1-1, then does $f$ map Borel sets onto Borel sets?


I have a WinForms application raising exceptions from code in an EventHandler (E.G. a Button click subscriber);  I have a try..catch block around the invocation of the ShowDialog of the Form;  The exception does not propagate to the try..catch block, but it just stops at the handler and the Form gets closed.  1) How can I propagate the exception to the block?  2) What is the best practice in these cases?  This is a new VS 2010 AddIn probject with a simple Tools menu entry added by the wizard:      Public Sub Exec(ByVal commandName As String, ByVal executeOption As vsCommandExecOption, ByRef varIn As Object, ByRef varOut As Object, ByRef handled As Boolean) Implements IDTCommandTarget.Exec         handled = False         If executeOption = vsCommandExecOption.vsCommandExecOptionDoDefault Then             If commandName = "MyAddin1.Connect.MyAddin1" Then                  Dim form1 = New Form1                  Try                     form1.ShowDialog()                 Catch ex As Exception                     MessageBox.Show(ex.Message)                 End Try                  handled = True                 Exit Sub             End If         End If     End Sub   The only content of the Form is a button with a static handler raising a "New Exception()".  When I click the button, the exception is not caught.

I have a child form that is throwing an ApplicationException in the Load event handler (intentionally for testing purposes).  The parent form wraps the ChildForm.Show() method in a Try...Catch ex As Exception block.  The catch block simply displays a message and closes the child form.  All works as expected when debugged in visual studio 2008 (.net 3.5 sp1).  However, when I run it outside of visual studio, the Catch block seems to get missed and an unhandled exception occurs.  Any idea why that is?  Thank you.  Example Code:  Public Class Form1      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim f2 As Form2          f2 = New Form2          Try             MessageBox.Show("Opening form 2")             f2.ShowDialog()         Catch ex As Exception             f2.Close()             MessageBox.Show("Form 2 closed.")         End Try     End Sub  End Class  Public Class Form2      Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         Throw New ApplicationException("Test Form_Load")     End Sub      Public Sub New()          ' This call is required by the Windows Form Designer.         InitializeComponent()          ' Add any initialization after the InitializeComponent() call.     End Sub  End Class   Stack Trace:    System.ApplicationException:  Test Form_Load   at WindowsApplication1.Form2.Form2_Load(Object sender, EventArgs e)  in UnhandledExceptionTest2\WindowsApplication1\Form2.vb  System.Windows.Forms.Form.OnLoad(EventArgs e)  System.Windows.Forms.Form.OnCreateControl()  System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)  System.Windows.Forms.Control.CreateControl()  System.Windows.Forms.Control.WmShowWindow(Message& m)    at  System.Windows.Forms.Control.WndProc(Message&> m)    at  System.Windows.Forms.ScrollableControl.WndProc(Message&> m)    at  System.Windows.Forms.ContainerControl.WndProc(Message&> m)    at  System.Windows.Forms.Form.WmShowWindow(Message&> m)    at  System.Windows.Forms.Form.WndProc(Message&> m)    at  System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&> m)    at  System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&> m)    at  System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr  lparam)


Can someone help me how to write test class for the below trigger. trigger AccountOwnerUpdate on Account (before insert, before update) {     Set<Id> accIds = new Set<Id>();     List<Contact> updatedConList = new List<Contact>();     List<Account> accList = new List<Account>();     Map<Id, String> newOwnerIds = new Map<Id, String>();              for(Account acc : trigger.new) {         system.debug('entered here');         accIds.add(acc.Id);         newOwnerIds.put(acc.Id, acc.Coverage_Lead__c);                  if(acc.Coverage_Lead__c != NULL) {             acc.OwnerId = acc.Coverage_Lead__c;         }         if(acc.Coverage_Lead__c == NULL){             acc.OwnerId = acc.LastModifiedById;                         }     }          for(Account accs : [SELECT Id, LastModifiedById, (SELECT Id, Owner.Id FROM Contacts)                         FROM Account WHERE Id IN:accIds]) {                             String newOwnerId = newOwnerIds.get(accs.Id);                             //String oldOwnerId = oldOwnerIds.get(acc.Id);                                                              if(newOwnerIds.get(accs.Id) != NULL) {                                 system.debug('Coverage_Lead__c !=');                                 for(Contact con : accs.Contacts) {                                     con.OwnerId = newOwnerIds.get(accs.Id);                                     updatedConList.add(con);                                 }                             }                             if(newOwnerIds.get(accs.Id) == NULL) {                                 system.debug('Coverage_Lead__c ==');                                 for(Contact con : accs.Contacts) {                                     con.OwnerId = accs.LastModifiedById;                                     updatedConList.add(con);                                 }                                }                                                      }     update updatedConList; }  I am new to test apex so please help me how to write test class for the above trigger. Thanks in Advance.

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


I know git branch has the --contains option that allows us to know what branches contain a certain branch/revision. Is there an option to do the opposite? In other words, provided a branch/revision X, list the branches that are included in its history.... more or less something like I want to get the list of branches that have been merged into main so that I can safely delete them.

I have a git repository with multiple branches.   How can I know which branches are already merged into the master branch?


Several of the winterbash hats have criteria that are "non-binding," for example "Witticism" requires 5 upvoted questions.   If such a criteria no longer applies, such as an upvoted question or answer getting downvoted later and no longer qualifying for a hat, will the user keep the affected hat or will it no longer be available?

During Winter Bash, users can earn hats. But sometimes it seems that a hat was awarded even though its requirements weren't (yet) met, or vice versa.  What could be the reason for this?


I read in  and that it does not include accepted answers. However it can be read in 2 ways:   The 15 points for accepted answer is not included The upvotes on accepted answer are not included   Which way of reading is correct? Could the FAQ be clarified?

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


I am confused with the derivatives of modulus function.

Okay, so $\displaystyle \frac{d}{dx} |x| = \frac{|x|}{x}$. But I have trouble seeing why.  Here's what I've tried: $$\frac{d}{dx}|x|=\begin{cases} \frac{d}{dx}x & \text{if }x > 0 \\ \frac{d}{dx}(-x)&\text{if }x < 0 \end{cases} = \begin{cases} \,\,\,\,1 & \text{if }x > 0 \\ -1&\text{if }x < 0 \end{cases}$$ But I do not see how that far-right expression can be used to arrive at $\displaystyle\frac{|x|}{x}$, besides graphing.


I am not sure what the issue is when I enter a box for the first choice a it returns

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?


Let $M=S^2$ then the hairy ball theorem, states that there is no non-vanishing smooth tangent vector field on even-dimensional $n$-spheres. Hence, we can multiply any smooth vector field $v\in\Gamma(TS^2)$ by a function $f\in \mathcal{C}^\infty(S^2)$, which is zero everywhere except where v is, obtaining $fv=0$ despite $f\neq 0$ and $v\neq 0$. Therefore, there is no set of linearly independent vector fields on $S^2$ over $C^{\infty}(S^2)$-module. I think the same argument goes for the vector space over an algebraic field $K$. Moreover we can not express all the vector field as $g = fv$ where $f \in K \text{ and }v,g \in \Gamma(TS^2)$. If I am right does there exist any basis for vector space over the sphere?

Let $M$ be a smooth ($C^\infty$) manifold. Let $\mathfrak{X}(M)$ be a set of all vector fields on $M$ and let $\mathfrak{F}(M)$ be a set of all real smooth functions on $M$. $\mathfrak{X}(M)$ is a real vector space and it is also a module over $\mathfrak{F}(M)$. We know that partial derivatives constitute a basis for tangent space at any point $p\in M$. Is there some sort of basis for $\mathfrak{X}(M)$ (as a vector space or as a module)? Do partial derivatives constitute a basis here as well? I think this question  is similar to mine, but because of the way it's written, I'm not really sure I understand the question and I'm not sure we're asking about the same thing.


I am running a Java application and faced an error Out of memory. .hprof file is generated. What do I use to analyse what's in the file? How to read that file? Any suggestion?  Thanks in Advance!!!

I have a production server running with the following flag: -XX:+HeapDumpOnOutOfMemoryError  Last night it generated a java-38942.hprof file when our server encountered a heap error. It turns out that the developers of the system knew of the flag but no way to get any useful information from it.  Any ideas?


There was another alien species that was invading Earth, and the little furry aliens helped us out. I think they liked having sex all the time and ended up having sex with the humans as well.

I read a book when I was young, it was about space alien cats. I believe the title was Quzzles, but I really don't know. The book was stolen from me before I was finished. I don't know much else about it.


I am having trouble with understading how inverse totient function works. I know it can have multiple solutions but I don't understand how to find all of them for bigger numbers. For example how would one approach to problem of solving this equation:  ϕ(n) = 180  I do understand that one should represent ϕ(n) by product rule and somehow conclude numbers by combining product rule expression for ϕ(n) to get all numbers n. But it seems as very long process that I don't understand. My question is how I should think when looking at prime numbers expression for ϕ(n) and how should I eliminate some results? I was trying searching other similiar question and I still can't find some general algorithm for solving this problem.  Thanks!  EDIT: I would like to know how to calculate this problem by hand

Let $\phi(n) $ is the numbers of number that are relatively prime to n.   Then, how could we solve the equation $\phi(n) = k, k > 0?$   For example:    $\phi(n) = 8 $  I can use computer program to check all numbers that are relatively prime to $n$, but I think there must be an easier way to approach this problem.    Base on this formula: $$\prod_{i=0}^{k} p_{i}a^{a_i} $$ The only thing I can see is n must not have a prime factor > 9, otherwise $\phi(n) > 8 $. I really don't know where to start :( ? A hint would be greatly appreciated.


Adobe Illustrator gradients are not smooth. I have tried to export in high resolution, and applying a blur effect to the gradient, but still it is not working.  Did I mess up some setting?    There seem to be circles in the gradient:

How to get Rid of Banding in illustrator while using Gradient


I used select in if for example :    select IF (LEAVETYPE = 1 , (select test1,test2 from TableName),(select test3,test4 from TableName where id = 2)  FROM TableName     I Wanne Used Select in IF

How do I perform an IF...THEN in an SQL SELECT statement?  For example:  SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product


I recently bought a new SSD for my computer and installed a windows 7 on with a help from my friend. We plugged it in, and set the computer to boot from that version of windows. I'm wondering about what exactly happened to all the programs and games of my "previous" windows? We left it untouched at the original C, which is now F-drive. They don't show up on programs, but their files can be found.  Steam, where most of my games are, works after a little trickery, but for example L.A.Noire, a non-steam-game, fails to launch because it "Could not locate game executable on local machine". Because it doesn't show up on removable programs and there's no uninstall file, there is no way for me to remove it, only the files.   What happens if I do so to it, or other programs with same situation? Are they really gone? What should I do here?

Changing hard disk with ssd, can I migrate contents so that I can switch drives without a hassle?  For instance, keep my Windows configuration and installed programs and documents


I recently decided to dual boot Ubuntu and Windows, but I am unable to see GRUB on system start-up. To remedy this, I tried to install boot-repair, but now I have the error:  E: could not get lock /var/lib/dpkg/lock-frontend. It is held by process 3427 (unattended-upgr).  I cannot install any software from the command line or use GRUB, so I am concerned.

I'm trying to run this command in the terminal:  sudo apt install software-properties-common   This is the error message I get:  E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)   E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend),     is another process using it?


As I understood, this tool normally shows distance in the project CRS units, not the geodetic meters (despite it actually says the distance is in meters).  However,  (Section III, 4 - Measure some distances) that in the Measure Tool Options you can change the "Ellipsoid for distance calculation":     Does it mean it can actually finally compute correct geodetic distance?  However, I don't see this option in the QGIS ver 1.9.0-Master.

I am playing a bit around with Qgis 2.14.6 to understand how it deals with distance measurement.  I took a line-shapefile that I saved in 3 different coordinate systems (4326, 32642 and a national one that doesn't exist in Qgis yet).  Using 32642 and the national one, the length is quite similar (6442m vs. 6428m)  But using 4326 (unprojected WGS84), I get 8057m  In all cases, I just used the Field Calculator and introduced $length.  I was already positively surprised that the result using 4326 was in meters and not in degrees.  To calculate the distance on the dataset in 4326, I assume that Qgis does some kind of re-projection in the background. Does anyone know which one?   Shapefiles here if anyone wants to play around:   EDIT - adding more info after more tests  As you can see, now both my shapefile and the project are in EPSG:4326, so unprojected:    Here the rough measurement of my shapefile, with the Qgis measure tool:   When I use the field calculator, the preview gives me a value in degrees, while the result seems to be in meters:      This would mean that the function $length, like the measurement tool, always gives a result in meters, but using a very coarse approximation of the degrees => meters transformation:    Is this a bug? or should it really behave like this? I find it at best counter-intuitive (but maybe it's just me) and, at worse, completely misleading (it makes very little sense to use, everywhere on earth, the length of 1 degree at the Equator). Any input or opinion here? Should I open a bug report (at least for the inconsistency between the preview and the actual result)?


The question is to evaluate $$\int \log(1+2m \cos x+m^2) dx$$ when $m > 0$   I noticed that $(1+2m \cos x+m^2)$ can be written as $(1+me^{-x})(1+me^{ix})$ and then I can apply the Taylor expansion of $\log(x)$ but I am not sure if the approach is correct.

For $a\ge 0$ let's define $$I(a)=\int_{0}^{\pi}\ln\left(1-2a\cos x+a^2\right)dx.$$ Find explicit formula for $I(a)$.   My attempt: Let  $$\begin{align*} f_n(x) &= \frac{\ln\left(1-2 \left(a+\frac{1}{n}\right)\cos x+\left(a+\frac{1}{n}\right)^2\right)-\ln\left(1-2a\cos x+a^2\right)}{\frac{1}{n}}\\ &=\frac{\ln\left(\displaystyle\frac{1-2 \left(a+\frac{1}{n}\right)\cos x+\left(a+\frac{1}{n}\right)^2}{1-2a\cos x+a^2}\right)}{\frac{1}{n}}\\ &=\frac{\ln\left(1+\dfrac{1}{n}\left(\displaystyle\frac{2a-2\cos x+\frac{1}{n}}{1-2a\cos x+a^2}\right)\right)}{\frac{1}{n}}. \end{align*}$$ Now it is easy to see that $f_n(x) \to \frac{2a-2\cos x}{1-2a\cos x+a^2}$ as $n \to \infty$. $|f_n(x)|\le \frac{2a+2}{(1-a)^2}$ RHS is integrable so $\lim_{n\to\infty}\int_0^\pi f_n(x)dx = \int_0^\pi \frac{2a-2\cos x}{1-2a\cos x+a^2} dx=I'(a)$. But  $$\int_0^\pi \frac{2a-2\cos x}{1-2a\cos x+a^2}=\int_0^\pi\left(1-\frac{(1-a)^2}{1-2a\cos x+a^2}\right)dx.$$ Consider $$\int_0^\pi\frac{dx}{1-2a\cos x+a^2}=\int_0^\infty\frac{\frac{dy}{1+t^2}}{1-2a\frac{1-t^2}{1+t^2}+a^2}=\int_0^\infty\frac{dt}{1+t^2-2a(1-t^2)+a^2(1+t^2)}=\int_0^\infty\frac{dt}{(1-a)^2+\left((1+a)t\right)^2}\stackrel{(*)}{=}\frac{1}{(1-a)^2}\int_0^\infty\frac{dt}{1+\left(\frac{1+a}{1-a}t\right)^2}=\frac{1}{(1-a)(1+a)}\int_0^\infty\frac{du}{1+u^2}=\frac{1}{(1-a)(1+a)}\frac{\pi}{2}.$$ So $$I'(a)=\frac{\pi}{2}\left(2-\frac{1-a}{1+a}\right)\Rightarrow I(a)=\frac{\pi}{2}\left(3a-2\ln\left(a+1\right)\right).$$  It looks too easy, is there any crucial lack?  $(*)$ — we have to check $a=1$ here by hand and actually consider $[0,1), (1,\infty)$ but result on these two intervals may differ only by constant - it may be important but in my opinion not crucial for this proof.


In abstract algebra we define $\mathbb{Q}(\sqrt{2})$ to be the smallest field that contains $\mathbb{Q}$ and $\sqrt{2}$. In the most of textbox they usually write that this is. $$\mathbb{Q}(\sqrt{2}) = \{a+b\sqrt{2}\mid a,b\in \mathbb{Q}\}$$ But can I prove that this is the smallest field that contains $\mathbb{Q}$ and $\sqrt{2}$.?

This was an assertion made in our textbook but I have no idea how to show that either statement is true.  Also would like to show that that $\mathbb{Q}(\sqrt{2})$ is strictly larger than $\mathbb{Q}$, which was the second part of the assertion.


white-space bug at bottom of page! happening on every page on meta.SE that I've tried!

I just noticed that here on meta the footer doesn't stick to the bottom of the page, I know that it's not that big of a deal but it does look a bit clumsy.    Shouldn't there be an easy fix for this?  EDIT:  Since this has been reproduced and discussed by some members I was wondering if anyone is actually trying to fix this?  EDIT: (imported from , )  #footer.categories #svnrev has margin-bottom: 10px;. It should have margin:0, or be moved alongside #copyright.


asasasasasasasasasasas  \begin{table}[ht]      \centering      \begin{tabular}{|r|l|}         \hline         7C0 & hexadecimal \\         3700 & octal \\ \cline{2-2}         11111000000 & binary \\         \hline \hline         1984 & decimal \\         \hline     \end{tabular}     \caption[You-table]{Table for you}     \label{table: me}  \end{table}   Measuring AC heat capacity is an excellent radiation

this is my first time here, and I have this question:  I'm writing my thesis, that includes many tables and figures in a float environment, with the caption at the end of it. I defined the space between the end of float's caption and the next paragraph. This works fine, but when I forced to stay when I tiped (with [h]), this space (between caption and next paragraph) is bigger. Of course, one of the items that will be evaluated, is the spaces (they all must be the same).  So, my question is: How can I solve this?  There is an example of the code I'm using: (TexShop —Mac Os 10.6.8)  \documentclass[letterpaper,12pt,oneside]{book} \usepackage[spanish,es-lcroman]{babel} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[font=small,format=hang,parskip=1pt]{caption} \usepackage{ctable} \usepackage{float} \raggedbottom \begin{document} \setlength{\textfloatsep}{10pt}  \setlength{\abovecaptionskip}{10pt} \setlength{\belowcaptionskip}{5pt} ... \end{document}


Is it wrong to fully charge your android phone in general to 100% will it hurt battery life? and is it also to drain your battery to below 20% will it also hurt the battery life?

The comments in  say that I shouldn't wait until low battery charge level before I charge, because that reduces battery life (this is contrary to my understanding before that the faster we charge (without waiting for battery to discharge) the worse it will be for battery life). My question is, when I should generally start charging to avoid this effect? 20%?   Interesting question: If we always limit the usage of the battery only 20% and above, won't we, in effect, reduces our battery capacity to 80%, because we will only use the battery in 20%-100% state?


I want to read the manga of naruto because i want to read more anime than just sit down and watch on my computer so can you help me try to find what chapter is episode 150?

For both the original Naruto series and Shippuuden, which episodes should I watch if I want to avoid the filler? I'm only interested in core plot and character developments.  To make this question a bit more concrete: Which episodes are directly based off the manga, and which were produced with unique content for only the anime? At what points did the anime "catch up" to the manga and require non-manga-related content to continue airing episodes while the manga produced new content?


I'm trying to show that       If $a,b$ are positive rational numbers and $\sqrt a+\sqrt b$ is rational, then both of $\sqrt a,\sqrt b$ are rational numbers.   I squared the number $\sqrt a+\sqrt b$ and found that $\sqrt {ab}$ is rational…

Inspired by , I was wondering if there is a simple logical argument to   Show that $ a,b, \sqrt{a}+ \sqrt{b} \in\mathbb Q  \implies  \sqrt{a},\sqrt{b} \in\mathbb Q $  Note that the original link is using a computational method, where as I am looking for a simple logical argument.  I tried (unjutifiably) to argue that if some of two square roots is rational then each one is rational, this is a different than the (incorrect) argument that if sum of two algebraic numbers is rational then each one is rational ( counter example $a=1-\sqrt{2},b= 1+\sqrt{2} $)


This is an elementary question that probably admits an elementary counterexample, but ...  Let $G$ be a compact Lie group and $G_0$ its identity component. One then has a short exact sequence $$ 1 \to G_0 \to G \to \pi_0(G) \to 1; $$ the last object is the component group.   Does the component group embed as a subgroup?

I've believed for a long time that every Lie group can be decomposed as the semidirect product of a connected Lie group and a discrete Lie group. However, in , it is mentioned that this is not true, and that there exist obstructions to this decomposition. Unfortunately, the level of complexity in the answers goes a bit over my head.  This type of decomposition is also addressed in .  With this loss of faith in my intuition, I have three questions:   Is it true that Lie groups do not necessarily decompose into the semidirect product of a connected group and a discrete group? If this decomposition doesn't always work, then is there a particularly nice argument as to why it doesn't? If this decomposition doesn't always work, then is there a nice example I can use to convince myself that my intuition is wrong?   Edit: As much as I love Qiaochu Yuan's answer, which is thorough and (as usual) a role model among Stack Exchange answers, this is not what I'm looking for. I'm aware of the general extension problem, and that not every short exact sequence splits, but my intuition has led me to think that each Lie group can be decomposed this way. I will certainly play around with his outline for a construction, but I would much prefer a more concrete answer. Once again, thank you!  Edit: As of yet, playing with the construction suggested by Qiaochu hasn't yielded anything interesting. This question is still open to answers!


I'm admittedly rather new to the world of interchangeable lenses, and have just purchased a Panasonic GH4 and adapted it to a full frame lens with a Metabones speed-booster. I've been using a 50mm lens, under the impression that what I was seeing through the viewfinder was truly a 50mm shot. I have since read that a Micro 4/3s sensor shoots everything effectively 2x the focal length of the lens, so is my 50mm truly acting as a 100mm lens, despite my adapter? I apologize for my ignorance, and appreciate any light you can shed.

I'm reading that a 50mm lens is recommended as a first prime lens for DSLR owners as it's supposed to give a 'natural' perspective, but when used on (most) DSLRs, the view is cropped, as if you were zoomed in by 1.5-1.6x, so it's more of a telephoto lens when used on a DSLR. I've also read however that the 50mm lens gives the same perspective on a DSLR and a 35mm, and shouldn't really be considered to be 'equivalent' to an 80mm lens as the crop factor isn't really a magic focal length changer.  Can someone explain how the image is different from (for example) a 50mm lens on a DSLR and an 80mm lens (assuming 1.6x crop factor) on a 35mm camera?


This doesn't seem to be specificed in the docs and the FAQ.  I see this suggested in  (10.2016) and mentioned as an existing feature (!) in  (10.2010).

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


Find all the polynomials $p(x)$ with real coefficients such that :-  $(x-8)P(2x)=8(x-1)P(x)$  I tried putting different values to P(x) to find any roots, here's what I found out.  $P(2)=P(4)=P(8)=0$  So,  $P(x)=(x-2)(x-4)(x-8)Q(x)$, Where $Q(x)$ is some polynomial.  Now I don't know what to do next.  Any help would be appreciated.

Find all polynomials $p(x)$ such that for all $x$, we have $$(x-16)p(2x)=16(x-1)p(x)$$  I tried working out with replacing $x$ by $\frac{x}{2},\frac{x}{4},\cdots$, to have $p(2x) \to p(0)$ but then factor terms seems to create a problem.  Link:


Is it possible to transmit the redstone power with a lever, vertically, and from top to bottom?

I'm making a door with piston sliding sideways that reacts to pressure plates. As the pressure plates are sending the current to redstone at a very low level, I need to raise it somehow, and this leads to awkward stairs of redstone.    So I'm wondering whether there are better ways of sending the redstone current up, maybe even vertically.


Why do we say "Did she have a big family" though "Did she has a big family" looks like the correct form? Could someone explain to me why we switch has to have in questions like that?

Should I use the past tense with did? For example, I was to say:     The important question is: Did they knew what it means or not?   Or should I say:     The important question is: Did they know what it means or not?   In other words: Should I use past tense with did?  I looked at this:    but it didn't really answer my question.


I'm trying to install Ubuntu for the first time using a USB stick.   But i keep getting this timeout   Nouveau 0000:01:00.0: DRM: base-2: timeout   Any ideas? It stops right there, even when I try to do a disk check.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I have installed ubuntu 15.04 and 14.04.  First i had installed 14.04 after that i installed 15.04 and the grub boot menu changed to 15.04. Now i want to revert it, that means i want to change the grub that appears on startup to grub of 14.04. How to do it?

I installed a mainline kernel for testing purposes. I would like to set grub to boot from the older kernel by default.  I know I can set the GRUB_DEFAULT=0 setting for the first page of grub but how do I set it to boot by default from one kernel in the second page (Advanced page)?  I would prefer doing this without installing other software (ex. grub-customizer).     Related Questions:


It's widely know that HTML5 offers some elements primarily for semantic purposes. These include: section, article, aside, header, footer, nav, figure, figcaption, time, mark & main.  Do any of these offer SEO benefits? If so, what are some of the best practices for using these semantic elements?  I've tried to read articles on the subject, but most of the material is non-committal on whether there exist actual SEO benefits of using these tags or not. Almost all WordPress websites (including Instagram.com) use these tags however. I'm sure other platforms do too.   So would love to hear educated opinions from industry experts on how best to use these tags (and which ones are more important than others).

What are the rules of engagement with respect to SEO in HTML 5?  Examples of things we have been mulling over with no conclusion:   Are you penalised for not using <head> and <body> tags? Do links in <nav> blocks get prioritised for follows? With <aside> (no bside though), <section>, <summary> and <details> which ones carry the most weight for content, one-liner descriptions and keyword tags are there search engine implications? If you use CSS to put a <footer> element at the top and a <header> element at the bottom (not that you would but it may be construed as such by an incomplete spider implementation)? Does the use of placeholder attributes on <input> show you are more user focused?   At the minute we are haphazardly pinning the content on the donkey with regard to tag usage but would be interesting to know if anyone has any insight into the "correct" tags to use with regards to SEO.


If ambient light isn't enough and I don't have a tripod with me for long exposure, which one should I prefer to increase the brightness of my photo?   I know high ISO comes with noise. Is there any side effect of high exposure compensation?  What I do is open full aperture & increase exposure till 1/10s. If not enough, increase ISO till about 300. After that noise is noticeable so I resort to exposure compensation, all the way up to +5. Then back to ISO. Last option is flash, if possible. Is this the best  practise? Should I increase Exposure compensation before increasing ISO?

When should I use exposure compensation, rather than ISO, shutter speed or aperture?


I have a diagram of 4 nodes in my beamer slide.    \begin{figure}[h]   \begin{centering}   \begin{tikzpicture}[system/.style={draw,rectangle,rounded corners=3,minimum width=2cm,text width=1.8cm,text centered}]     \node [system] (fe) {Feature Extraction};     \node [system] (am) [right=of fe] {Acoustic Model};     \node [system] (lm) [right=of am] {Language Model};     \node [system] (d) [below=of lm] {Decoder};      \draw[->] (fe) |- (am);     \draw[->] (am) |- (d);     \draw[->] (lm) -- (d.north);    \end{tikzpicture}   \end{centering}   \end{figure}   How can I in a second slide "highlight" one of the nodes, like I can do with <alert@n> for a item in a list?  With highlighting I mean for example giving a color and thickening the lines.


I follow all instructions in , and never see the chance to go to 18.04.2.  The command:  ubuntu-report show    "Install": {   "Media": "Ubuntu 18.04.1 LTS \"Bionic Beaver\" - Release amd64 (20180725)",     The update manager told me about 18.10 because I had changed the option to all updates instead of only LTS.  When I have it set to LTS, it shows nothing is available to update.      31: cat /etc/lsb-release     DISTRIB_ID=Ubuntu     DISTRIB_RELEASE=18.04     DISTRIB_CODENAME=bionic     DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"   As you can see, I do have 18.04.2.  I just can't figure out in the StackExchange UI how to say my problem is solved.  If someone could mark it as such, I'd appreciate it.

There are so called "point releases" for LTS versions of Ubuntu. 10.04.3 for instance.  What are those "point releases" releases?


I created a @HttpPost API end point called SampleAPI that doesn't return an object. Instead I am populating RestResponse like so:  @RestResource(urlMapping='/SampleAPI/*') global class SampleAPI{      @HttpPost     global static void verifyData() {          RestResponse response = RestContext.response;         response.statusCode = 200;         response.responseBody = Blob.valueOf('response body');     } }   In my test class I add the request body like so:  @IsTest static void TestBehavior() {     RestRequest request = new RestRequest();     RestResponse response = new RestResponse();     request.requestURI = '/services/apexrest/SampleAPI';     request.httpMethod = 'POST';     request.requestBody = Blob.valueof('test body');       RestContext.request = request;     RestContext.response = response;       SampleAPI api = new SampleAPI(); }   How can I get the response body in my test method? I tried RestContext.response but that comes back as [headers={}, responseBody=null, statusCode=null] when I am actually expecting the statusCode and responseBody to not be null.

I´m having problems with url parameters (req.requestURI) in my test class.  This is my code.  REST CLASS:  @RestResource(urlMapping='/Accounts/*') global class StoreController {       @HttpGet     global static String getAccounts() {           integer pageNumber=integer.valueof(RestContext.request.params.get('page'));         string  ptime=RestContext.request.params.get('time');         string  hash=RestContext.request.params.get('hash');      }   REST TEST CLASS:  @isTest private class StoreControllerTest {      static testMethod void testGet() {       //do request     RestRequest req = new RestRequest();      RestResponse res = new RestResponse();      req.requestURI = 'https://dev-my-my.cs14.force.com/mine/services/apexrest/Accounts?page=0&time=1390296387&hash=1wer2547';         req.httpMethod = 'GET';     RestContext.request = req;     RestContext.response = res;          String results = StoreController.getAccounts();      } }   When i run test class i get the error:  System.NullPointerException: Argument 1 cannot be null    for line :  integer pageNumber=integer.valueof(RestContext.request.params.get('page'));   Looks like parameters are not taken from url ''  when i run the test class.Please can you help me with this?


Let $n>2$ and $\sigma^2>0$. A math exam was held with $n$ participants. The score follows the normal distribution with the mean $\mu_X$ the variance $\sigma^2$. Scores of the math exam are $X_1,...,X_n$. $$\overline{ X }=\frac{1}{n}\displaystyle \sum_{i=1}^n X_i$$ For each $i = 1,...,n$, what is the value of covariance between $X_i-\overline{X}$ and $\overline{X}$?  (What I have tried) $\operatorname{Cov}[X_i-X,\overline{X}]$ $ = E[(X_i-X)\overline{X}]-E[X_i-X]E[\overline{X}]$ $=E[X_i\overline{X}] - E[\overline{X}^2] - (E[X_i]-E[\overline{X}])E[\overline{X}]$ $=E[X_i\overline{X}] - E[\overline{X}^2] - (E[X_i]-\mu)\mu$ and I don't know how to deal with the rest of term with $E[]$. Can anyone help me?

How do you prove Cov $\left( \bar{X} , X_i - \bar{X} \right) = 0$ given $ X_1 ,..., X_i$ are i.i.d. each with variance $\sigma^2$ and $\bar{X}$ is the sample mean?? In other words, how do you show that the sample mean and the differences of the observations from that mean are not linearly correlated???  Am I on the write track?  I've written  $Var \left( \bar{X} + \left( X_i - \bar{X} \right) \right) = Var  X_i =  Var \bar{X} + Var \left( X_i - \bar{X} \right) + Cov \left( \bar{X} , X_i - \bar{X} \right)$ .   I know  $Var  X_i = \sigma^2 , Var \bar{X}= \frac{\sigma^2}{n}$, so all I need left to find the covariance is $Var \left( X_i - \bar{X} \right)$.   I don't know if this is right, but I wrote  $Var \left( X_i - \bar{X} \right) = E\left( \left( \left( X_i - \bar{X} \right) - \mu_{ X_i - \bar{X}} \right)^2 \right)=E \left( \left( X_i - \bar{X} \right)^2 \right)=s^2$, but I don't know if that's right or helpful at all.   Am I on the right track??