To show that for every rational $p>0$ such that $p^2<2$ one can get a rational $q$ with $p^2<q^2<2$ and $p<q$ Rudin writes,     We now examine this situation a little more closely. Let $A$ be the set of all positive rationals $p$ such that $p^2<2$ and let $B$ consist of all positive rationals $p$ such that $p^2>2$. We shall show that $A$ contains no largest number and $B$ contains no smallest.      More explicitly, for every $p$ in $A$ we can find a rational $q$ in $A$ such that $p<q$, and for every $p$ in $B$ we can find a rational $q$ in $B$ such that $q<p$.       To do this, we associate with each rational $p>0$ the number $$q=p-\frac{p^2-2}{p+2}=\frac{2p+2}{p+2}.$$ Then $$q^2-2=\frac{2(p^2-2)}{(p+2)^2}.$$   This appears many times in analysis, so if the answer can be generalized/a general method can be given then that would be the best thing. My question is how does one come up with the quantity  $$p-\frac{p^2-2}{p+2}$$  My intuition is that can come from any of the rational approximation possibles, by for example using Newton's method, though I'm lacking when it comes to the details.

First, my apologies if this has already been asked/answered.  I wasn't able to find this question via search.  My question comes from Rudin's "Principles of Mathematical Analysis," or "Baby Rudin," Ch 1, Example 1.1 on p. 2.  In the second version of the proof, showing that sets A and B do not have greatest or lowest elements respectively, he presents a seemingly arbitrary assignment of a number $q$ that satisfies equations (3) and (4), plus other conditions needed to show that $q$ is the right number for the proof.  As an exercise, I tried to derive his choice of $q$ so that I may learn more about the problem.  If we write equations (3) as $q = p - (p^2 - 2)x$, we can write (4) as   $$ q^2 - 2 = (p^2 - 2)[1 - 2px + (p^2 - 2)x^2]. $$  Here, we need a rational $x > 0$, chosen such that the expression in $[...]$ is positive.  Using the quadratic formula and the sign of $(p^2 - 2)$, it can be shown that we need   $$ x \in \left(0, \frac{1}{p + \sqrt{2}}\right) \mbox{ for } p \in A, $$  or, for $p \in B$, $x < 1/\left(p + \sqrt{2}\right)$ or $x > 1/\left(p - \sqrt{2}\right)$.  Notice that there are MANY solutions to these equations! The easiest to see, perhaps, is letting $x = 1/(p + n)$ for $n \geq 2$.  Notice that Rudin chooses $n = 2$ for his answer, but it checks out easily for other $n$.  The Question:  Why does Rudin choose $x = 1/(p + 2)$ specifically?  Is it just to make the expressions work out clearly algebraically?  Why doesn't he comment on his particular choice or the nature of the set of solutions that will work for the proof?  Is there a simpler derivation for the number $q$ that I am missing?


Let $$f(x)=\sum_{i=0}^n a_nx^n$$ be a polynomial with $$a_n \in Z,n>0,a_n\neq0$$ Prove that there exists some natural number $$m>2010$$ such that $$|f(m)|$$ is not a prime number.  I tried to look at f(m) mod m, and i assumed m is relatively prime to a0, so f(m) is reversible mod m. but I didn't know how to continue to prove it is not a prime number.  I would like to get help with that. Thanks

Let $$f(x) = \sum_{i = 0}^n a_ix^i$$ be a polynomial with $a_i \in \mathbb Z, n > 0, a_n \neq 0$. Prove that there exists some natural number $m>2010$ such that $|f(m)|$ is not a prime number.  I tried to look at $f(m) \bmod m$, and I assumed $m$ is relatively prime to $a_0$, so $f(m)$ is reversible $\mod m$, but I didn't know how to continue to prove it is not a prime number.  I would like to get help with that. Thanks.


This is test.html File as follows    $(document).ready(function(e) {     $("#get").click( function() {      $.ajax({       type: 'GET',       url: 'temp.html',       success: function(data){        $(".month").html(data);       }      });     });          $("#month").change( function() {      alert($(this).val());     });         });  <button id="get">Get Months</button>

     This is temp.html file as follows    <select id="month">  <option>--Select Month--</option>  <option value='1'>Janaury</option>  <option value='2'>February</option>  <option value='3'>March</option>  <option value='4'>April</option>  <option value='5'>May</option>  <option value='6'>June</option>  <option value='7'>July</option>  <option value='8'>August</option>  <option value='9'>September</option>  <option value='10'>October</option>  <option value='11'>November</option>  <option value='12'>December</option> </select>     When user click on button, it will get dropdown button for months I just want to get alert when user change month from dropdown. I could not change temp.html as it is from other server.

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


I'm curious about the JQuery html selector limitation. For a test, I wrote a simple code that add before/after an element something else. And I found that the new element isn't detected by the selector.              $("li").dblclick(function() {                 $(this).before("
*****
");                 $(this).after("
*****
");             });   I add two
 when I click on a
 (one before and one after). The code work for all of them excepted the new one. If I click on a
*****
 nothing happen.  Does JQuery use a list of all html tags and forget to update it when adding some code ?  If someone can explain that for me, I dind't find anything useful on the web :/  EDIT: I don't ask how to use it, I want to find documentation on why there are a difference between previous element and new one


I'm fairly new to Ubuntu, and I'm trying to get it working on a computer of mine. It's an older PC that I've had windows 7 on. Currently, when I boot to the desktop, within a few moments, the screen shows nothing but small horizontal bars everywhere. Using graphic failsafe mode is the only way I can do anything within it at the moment. So I'm trying to install the appropriate NVIDIA driver downloaded from their site, which is a .run file.  I got a few errors at first concerning the x server running, but was able to overcome them by using Cntl + ALt + F1, sudo service lightdm stop  Now, when I try:   $ sudo ./NVIDIA.run --kernel-source-path=/usr/src/linux-headers-3.16.0-33 ERROR: Neither the '/usr/src/linux-headers-3.16.0-33/include/linux/version.h' nor the '/usr/src/linux-headers-3.16.0-33/include/generated/uapi/linux/version.h' kernel header file exists.   The most likely reason for this is that the kernel source files in '/usr/src/linux-headers-3.16.0-33' have not been configured.   I used tab when typing the path so that it would complete it for me.  Here's the full log:  nvidia-installer log file '/var/log/nvidia-installer.log' creation time: Mon Mar 30 21:38:44 2015 installer version: 304.125  PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  nvidia-installer command line:     ./nvidia-installer     --kernel-source-path=/usr/src/linux-headers-3.16.0-33  Using: nvidia-installer ncurses user interface -> License accepted. -> Installing NVIDIA driver version 304.125. -> Running distribution scripts    executing: '/usr/lib/nvidia/pre-install'... -> done. -> The distribution-provided pre-install script failed!  Continue installation anyway?     (Answer: Yes) -> Performing CC sanity check with CC="cc". -> Performing CC version check with CC="cc". -> Using the kernel source path '/usr/src/linux-headers-3.16.0-33' as specified by the '--    kernel-source-path' commandline option. ERROR: Neither the '/usr/src/linux-headers-3.16.0-33/include/linux/version.h' nor the     '/usr/src/linux-headers-3.16.0-33/include/generated/uapi/linux/version.h' kernel header file     exists.  The most likely reason for this is that the kernel source files in '/usr/src/linux- headers-3.16.0-33' have not been configured. ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for   details.  You may find suggestions on fixing installation problems in the README available on  the Linux driver download page at www.nvidia.com.

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


On a Ubuntu 16.04 headless system, I have two directories. I want a cronjob to move every file from directory A to directory B (same partition, same hard drive, same file system etc.). The problem is/might be: The files will be quite large and for some reasons the cronjob has to run quite often, like every minute or so.  So, the following scenario is quite likely: cronjob starts for the first time, finds a big file in directory A, starts moving it to directory B. While the mv process is still running, the cronjob is executed for the second time. Will this cause any problems?  I've found this question and ansers , but I think that's about simultaneously started processes. I hope, there is a way for cronjobs to prevent unwanted behavior.

I am looking for a simple and generic solution that would allow you to execute any script or application in crontab and prevent it from running twice.  The solution should be independent on the executed command.  I assume it should look like lock && (command ; unlock) where lock will return false if there was another lock.  The second part would be like if it acquired the lock, run command and unlock after command is executed, even if it returns error.


See "qandasys dot info"  Which say Question and Answer is proudly powered by WordPress. Theme "The Fundamentals of Graphic Design" by Arjuna Icons by FamFamFam  And I don't see any Creative Commons acknowledgement.

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I need to stop the foreach loop which continues will creating items if they are posted. Because my design is small,  I want to show 1 item. The others items, I can show it in a new iframe when they click on the button "Show more", Which I created.  <?php foreach ($this->items as $item) { ?>     <?php if ($item->published == 0) continue;?>       //code   <?php }?>

I have a loop that is doing some error checking in my PHP code. Originally it looked something like this...  foreach($results as $result) {     if (!$condition) {         $halt = true;         ErrorHandler::addErrorToStack('Unexpected result.');     }      doSomething();  }  if (!$halt) {     // do what I want cos I know there was no error }   This works all well and good, but it is still looping through despite after one error it needn't. Is there a way to escape the loop?


Let $X_1,X_2,\dots X_n$ be a random sample from the density $$f(x;\theta)=\theta x^{-2}, \quad 0<\theta \le  x<\infty$$ Find the method of moments estimator of $\theta$. My attempt $ E(X) = \int_{\theta}^{\infty}\theta x^{-2} = 1 $ I think that the integral bounds aren't correct.

Exercise :     Using the method of moments, find the estimator for $\theta$ for a random sample $X_1, \dots, X_n$ that follows the distribution with pdf $f(x) = \theta x^{-2}, \; 0 < \theta \leq x < \infty$, where $\theta$ is the unknown parameter.   Attempt :  $$m_1' = \bar{X}$$  $$μ_1' = \int_\theta^xu\theta u^{-2}\mathrm{d}u=\int_\theta^x\theta u^{-1}\mathrm{d}u=\big[\theta \ln u\big]_\theta^x =\theta\ln x - \theta\ln\theta$$  Thus, the estimator is given by :  $$m_1' = μ_1' \Rightarrow \theta\ln x - \theta\ln\theta = \bar{X}$$  But we cannot solve that equation with respect to $\theta$, so we'll take the moments of bigger order :  $$m_2' = \frac{1}{n}\sum_{i=1}^nX_i^2$$ $$μ_2' = \int_\theta^x u^2 \theta u^{-2} \mathrm{d}u = \int_\theta^x \theta \mathrm{d}u = \big[\theta u\big]_\theta^x =\theta x - \theta ^2 $$  Thus the solution of the following quadratic equation for $\theta >0$, gives as the estimator of $\theta$ :  $$\theta^2-x\theta +\frac{1}{n}\sum_{i=1}^nX_i^2$$  Question : Is my solution correct ? Shall the upper bound be $x$ or $\infty$ ?


I'm new to Java. I'm updating a function that work on files. What I want to do is to move processed files to another folder (to create it if does not exist) If File is c:\abc\efgh\ijkl\xyz.txt the it should be moved to c:\abc\efgh\Backup\xyz.txt   String fileName = "c:\abc\efgh\ijkl\xyz.txt";   Path f = Paths.get(fileName);   String parentDir = f.getParent().getParent().toString()+"\backup";    Files.move(Paths.get(filename),     Paths.get(parentDir ));   However, the system crashes error>>Caused by: java.lang.NullPointerException  How do I move the file? I wnat to know how to move the file. it is not about the pointer

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?


Two person, $A$ and $B$,  each holding one end of a long solid rod.   Now person $A$ pushes the rod on one end.  Question: Is it correct that the information that the rod has been pushed will travel to the other end at the speed of light whereas the actual 'push' will travel at the speed of sound in the rod?   i.e. If the rod has length $ ct $ , then will person $B$ feel the push in time $t$ or $ct/v$? ($c$ is speed at which EM waves propagates in this experiment, and $v$ is the speed of sound in the rod.)

Is it possible for information (like 1 and 0s) to be transmitted faster than light?   For instance, take a rigid pole of several AU in length. Now say you have a person on each end, and one of them starts pulling and pushing on his/her end.   The person on the opposite end should receive the pushes and pulls instantaneously as no particle is making the full journey.  Would this actually work?


I am working on a Existing code and i found a Strange Behavior while checking a String is null or Empty. The existing code :   System.out.println("Length: " + value.length()); if (value != null && value != "") {    //code }   Output:  Length: 0   But the if statement becomes true and its executing the code.  When i replaced the if statement with this one:  if (value != null && value.length() > 0) {    //code }   It works perfectly. Any idea why the previous one failed and Why value != "" returns true?

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?


My monitor has 2 inputs, an HDMI input (which is plugged into my Windows machine) and a USB-C input (which is plugged into my Macboook Air). I switch between these inputs often, but everytime I switch into to the USB-C input mode mode (which again, is plugged to my macbook) it blanks the screen. I need to unplug and replug the usb-c cable to get the screen working.  When I switch inputs to the Windows Machine, it works consistently. I can switch back and forth between HDMI and USB-C, and the HDMI mode will always show my Windows Desktop. It's just the USB-C input that's troublesome. Switching out of USB-C to HDMI, and then back again causes the screen to just blank.   Mac recognizes the two displays however, but my monitor just says there's no USB-C input. I need to manually unplug and replug the cable each time I switch inputs for it to work as expected.  Additionally, The USB-C cable from my monitor charges my macbook and provide additional USB ports, all of which work fine. It's just the video feed that drops each time

MacBook Pro (15-inch, 2016) with 2 USB-C to HDMI adapters. The setup works great if I start up in that configuration.   If I connect the adapters while the machine is running or simply sleeping, one of the monitors will never get a signal and stay in low power mode. The OS sees the monitor, it shows in the display arrangement settings and I can move the mouse into it, but until I restart, I can't see anything on it.  Once I have restarted I can let the machine sleep or whatever, and the display still works unless I disconnect the adapter. As soon as I do that a restart is required to use it again.   Using MacOS Sierra (10.12.4)  Using this adapter:


In my program, the name of the file with the values (at most 2-digit numbers) to be read is given in the terminal and my main() is as below:  int main ( int argc, char *argv[] ) {    //assume argv[1] is a filename to open    ifstream the_file ( argv[1] )    if ( !the_file.is_open() ){       cout<<"Could not open file << endl;       return 0;    }     char x;    int array[10];    int x_int;    while ( the_file.get ( x ) ){         for (int i=0; i<10;i++){              array[i] = (int)x;         }    }  }   However, I am getting some odd number.   My mistake is definitely at array[i] = (int)x; line, but   how can I convert read char value to int? Or is there any other method to read them as int type?  I want to have the values taken from input file work as integers, not as a single digit  My actual input file (.txt) is:  75 95 1 2 45 65 98 6 7 9

I have a string of digits, e.g. "123456789", and I need to extract each one of them to use them in a calculation. I can of course access each char by index, but how do I convert it into an int?  I've looked into atoi(), but it takes a string as argument. Hence I must convert each char into a string and then call atoi on it. Is there a better way?


This youtube video from Numberphile,   shows how the value is derived. In the video, one interviewee claims that "this result is used in many areas of physics". In the video, only string theory is mentioned.  Which areas of physics use or depend on the sum $$1 + 2 + 3 + 4 + 5 + 6+ 7+\ldots= -1/12?$$

If $D$ is critical dimension of Bosonic strings, a particular derivation goes like the following, where we arrive finally at  $$ \frac{D-2}{2}\sum_{n=1}^\infty n + 1 = 0. $$ Now mathematically this is clearly a divergent series, but using zeta function regularization here we are taking  $$ \sum_{n=1}^\infty n = \zeta(-1) = -\frac{1}{12}. $$ And obtain $ D = 26 $ where $\zeta $ is the analytic continuation of the zeta function we know. But it makes no sense in putting $ s = -1 $ in the formulae $$ \zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}. $$ As the above is only valid for $ Re(s) > 1 $. So what is going on in here? Can anyone give me a reasonable explanation about obtaining $ -1/12 $?


This is the output of update-grub :      Generating grub configuration file ... Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported. Found linux image: /boot/vmlinuz-4.2.0-18-generic Found initrd image: /boot/initrd.img-4.2.0-18-generic Found linux image: /boot/vmlinuz-4.2.0-16-generic Found initrd image: /boot/initrd.img-4.2.0-16-generic Found linux image: /boot/vmlinuz-3.19.0-32-generic Found initrd image: /boot/initrd.img-3.19.0-32-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin done   Should I do something to the grub configuration ?

I tried to update Grub so I run:  sudo update-grub  Generating grub configuration file ... Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.   What exactly this warning wants to be changed? (I upgraded from 12.04 to 14.04 before)  This is my /etc/default/grub file:  GRUB_DEFAULT="0" GRUB_HIDDEN_TIMEOUT="0" GRUB_HIDDEN_TIMEOUT_QUIET="true" GRUB_TIMEOUT="10" GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""


I just wonder how someone in StackOverflow can earn a large number of points in a week but just with 1 question and 5 upvotes.  I found  as one of those who earned the highest number of the reputation for the week (315 during the last 4 days).  I tried to analyze his activities to see what sort of activities he was involved to earn such a large reputation in a short time. But I was astonished to see that he has asked only 1 question during his lifetime and the question has 5 upvotes.  Also, he has answered his own question to earn points worth 300? How comes someone can earn such huge points for his own answer? Who will accept the answer? Can someone enlighten me?  I also have questions open for a while on StackFlow without an answer. I have found an answer myself. Will I earn such huge points if I answer my own question?  Thanks Rinsad

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


I have problems when calculating this improper integral   $$\int_{-\infty}^{\infty}\frac{e^{-x^2}}{1+x^2}e^{\frac{2x^2t}{1+t}}dx~= ~?~~~|t|<1$$  assistance would be helpful.

I do not know how to solve this integral and then expand the result in powers of $t$  $$(1-t)^{-1/2}\int_{-\infty}^{\infty}\frac{\exp\left(\frac{2x^2t}{1+t}\right)}{1+x^2}dx=?,~~~~|t|<1.$$  any idea?


So I never really post questions in forums like these but this one has got me stumped. So I upgraded my windows 7 computer to Windows 10 and didn't like it plus things were messing up. I decided to go back to factory defaults because the one month grace period had expired. After restoring my system the only account that shows up when turning the system on is the user account which is password protected. I'm assuming the store we got the system from, Colortyme, had set up these defaults because the password hint was "STORE". Needless to say guess and check hacking meathods are very unreliable. I know about the exploit where you can rename the command prompt something accessible through the ease of access such as the sticky keys and then run it at the login screen with admin privileges which would allow me to change passwords but the only problem is the only way I know how to access those files before login is by crashing the computer and booting system repair. Unfortunately Windows has patched that... So my question is how should I go about this? I can only think of two options right now the first is to boot the system off a flash drive with a Windows iso file on it and change the settings that way. The other is reset the password using a password reset disk iso file on a flash drive. I don't have an actual password reset disk so yeah... Please help and let me know if any of those options would work or if there is a better option

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


.  For easy reference, the comment was @Dukeling- I ... on someone else' post. The comment wasn't edited.  This comment does not appear in my inbox or under .  I posted 2 comments and deleted one before that was posted (or was it 3 and 2), might that have something to do with it?  Might the - have something to do with it? Doesn't this classify as ? If not, shouldn't it?

I just received the following in my Response pane (from ), but you can see it was meant for another user.  The @Robert line seems to have found 'Robert' in my name first, instead of Robert C. Cartaino.  I think the comment notification feature should match based on the closest match from the first character in a name (in posting order), and not just the first match found in posting order.


I have a device that says it takes a 23A, 12V battery. I ordered a new battery and was mistakenly sent one with 27A and 12V - same voltage, higher current. Is it safe to use this battery in the device, or will it break things? Apologies for what must seem like a noob question; I'm not an electronics person. I have found  but it talks about capacity instead, and I'm not 100% sure whether that changes the answer or not.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


Consider the following story: User Alice has a Stack Overflow account having a good reputation. When Alice creates a new account on another site from SE platform she will get 101 points of reputation because of association bonus (that is 100). On Stack Overflow Alice has images in profile description. On the new account the Stack Overflow profile will be cloned having the same images. In the new account Alice opens a bounty of 100 points and award the points to Bob. Alice remains with 1 point of reputation. Now the problem: Alice wants to change her username. She changes her username in the textbox and clicks Save Profile button. She will get the following error:  Oops! There was a problem updating your profile:  we're sorry, but as a spam prevention mechanism, new users aren't allowed to post images in their profiles. Earn more than 10 reputation to post images.    Is really Alice a new user not to be able to post image in her profile just because she awarded a bounty of 100 points to Bob? Is this a good reason for what Alice will have to change her profile description? Why until changing her username was Alice allowed to have images in her profile description even she had only 1 point of reputation? I do not agree with this...

My rep went over 2,000 today which meant I could edit other people's posts. Great! Then I added a bounty to a previous question, which brought me back down to 1,984...and I can no longer edit other posts. Should this changed? Or is this ideal?


import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np  my_image = mpimg.imread('mountain.png') print('The image is:- ',type(image),           'dimensions is:-', image.shape)  print(image[:,:,0]) print(image[:,:,1]) print(image[:,:,2])   I am unable to understand what image[:,:,0] or image[:,:,1] mean ?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Why does this happen??  $$ y = \sqrt9 \implies y=3$$  $$ y^2 = 9 \implies y=+3,-3 $$  While both equations are in same sense.

I am aware that 1/0 is undefined for two reasons:   If you would have to give an answer to this it is infinity which is not a number but a concept; The limit of 1/x for $x \to 0$ is either positive or negative infinity and since it has two limits we cannot state what its exact value is   How can we use this for square roots? It has multiple answers so why do we pick the positive one? if $x^2 = 16 \implies x = \sqrt{16} $ or $x = -\sqrt{16}$ for respectively the positive and negative solution. This implies that the square root function has a single answer and we must negate its answer to obtain the second solution. I understand this is extremely practical but it feels like 'cheating' since we know that there are 2 solutions, but in the function we simply ignore one of them. Is this correct?


I'm currently in first year math and got given this question, but I have absolutely no idea how to go about it.   After asking me to write the permutations given by $f$ as a product of disjoint cycles, it asked me to find the least number $m\in\mathbb{N}$ such that $f^m=\mathrm{id}$, where id denotes the identity function.  I tried composing it again and again so I saw what was obtained for $m=2,m=3,...$, but it seems like it's going nowhere: I cannot spot any patterns in the lengths of the cycles corresponding to the value of $m$. I was wondering if I could get a hint that could take me in the correct direction?  Thank you!

Prove that the order of an element in $S_n$ equals the least common multiple of the lengths of the cycles in its cycle decomposition.  Proof: Let $\sigma \in S_n$. Then $\sigma = (a_1a_2...a_{m_1})(a_{m_1+1}a_{m_1+2}...a_{m_2})....(a_{m_{k-1}+1}a_{m_{k-1}+2}...a_{m_{k}})$ represents the cycle decomposition of $\sigma$. Suppose $|\sigma| = n$ is the order of an element in $S_n$. So $\sigma^n = 1$. Can someone please help  me?  I don't know how if I am doing this fine. And I am stuck. Thank you for any help.


I realize this is frowned upon.  Many will suggest they don't recommend doing a server restart from cron because it's not being monitored.  In my case I would like to do this, the reason is because the server is used for only one task, in a node server environment.  The server runs out of memory and I've been advised to just restart the whole server.  I'm ok with this.  Currently in my cron file I have the following.  (I got this off another stack question) .   0 */4 * * * /usr/bin/reboot   However it doesn't work.  When I manually go to this directory /usr/bin/ then type "reboot" it works.  But executing like this /usr/bin/reboot from chron doesn't restart the server.  When I do ls /usr/bin/reboot the return is /usr/bin/reboot When I do which reboot the return is /sbin/reboot  How would I restart the server on centos 6 using cron?

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I asked a similar question in high school and people started laughing as they thought like it's trivial.  We only learn to memories the values cosine function but not even in college we're we taught how exactly it works.  Trig functions as far as I was taught in college were defined as infinite series. But if I plugged pi in that infinite series I see no reason why it would converge to - 1 for the cosine function trig series or why that series definition would be equivalent to the geometric one.   The relation to the geometric definition is not the central point but if you will talk about it I would appreciate AVOIDING COORDINATES IN YOUR ANSWERS AND COMMENTS, I find them extremely detrimental to conceptual reasoning.   I think it probably the easisent explanation lies in complex numbers, but I don't know if that would be satisfactory.

Sine $\theta$ = opposite/hypotenuse   Cosine $\theta$  = adjacent/hypotenuse   Tangent $\theta$  = opposite/adjacent      In order to calculate the sine or the cosine or the tangent I need to know $3$ sides of a right triangle. $2$ for each corresponding trigonometric function. How does a calculator calculate the sine, cosine, tangent of a number (that is actually an angle ?) without knowing any sides?


Not understanding why the memory location is being printed when I run. When I satisfy the 'if' statement I have in my code, the message I get back is "Your total is [I@5f184fc6". I would appreciate if someone could help get this issue resolved as well as explaining to me to help me understand and not run into this issue again.   import java.util.Arrays; import java.util.Scanner; public class steakShop {    public static void main(String [] args){     Scanner scanner = new Scanner(System.in);     String items[] = {"burger", "pizza", "shrimp", "nachos","stir fry"};          enter code here`int selection[] = {5,10,8,7,9};              for (String it: items) {                 System.out.println("Would you like to order a " + it + "?");                String itemSelected = scanner.nextLine();                   if (itemSelected.equals("yes"))                    System.out.println("Your total is " + selection + ".");   }  } }  Thanks for all comments and answers!

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


If you leave a slow cooker cooking for 10 and a half hours on slow, and the food takes 8 hours, will it damage anything?

I made beef stew last night in my slow cooker. At seven hours I felt like it wasn't ready so I set an alarm to wake me up at ten hours and moved it into the fridge around 1 AM.   Let's say I left it in the pot the whole night, would 17-18 hours be too much? Is there such a thing as overcooking stew, and how long does it take until you reach it?


Certain monsters have the Shapechanger trait. For instance, here it is on the Werewolf:     Shapechanger. The werewolf can use its action to polymorph into a wolf-humanoid hybrid or into a wolf, or back into its true form, which is humanoid. Its Statistics, other than its AC, are the same in each form. Any Equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies.   I note that nowhere in this description is the word "magical" found.  Contrast this with a metallic dragon's Change Shape feature, which does feature the word "magical".     Change Shape. The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form.   In an Antimagic Field, can a Werewolf use its Shapechanger trait?

Often confusion arises when the  spell is used, an  is worn, or the 's anti-magic ray is employed, whether a given character's ability will still function.   The spell does give you some guidelines on how to adjudicate the effects of the loss of magic but says very little about how to determine what is affected.  In short, how do I tell if an ability is magical?


I know that   component.find(AURA:ID_VALUE);   will work, but does anyone know if there is a way to do a find by type instead of id?  What I am referring to would look similar to   component.find("ui:inputcheckbox");

I have 2 components. VariationComponent and PGP_Tab_bar_item. I create PGP_Tab_bar_item in the markup of VariationComponent . Want to perform some action on PGP_Tab_bar_item if event is fired from PGP_Tab_bar_item component.  I am using component.find({instancesOf:}) but it is giving an empty Array[].  VariationComponent :  <aura:attribute name="projects" type="Project__c[]" />  <ul class="slds-tabs--default__nav" role="tablist"> <aura:iteration items="{!v.projects}" var="project" indexVar="index">     <c:PGP_Tab_bar_item project="{!project}" isProgramme="false" variationId="{!v.variationId}" active="false"/> </aura:iteration> </ul>  <ui:button label="Save" press="{!c.handlePGPTab}" class="slds-button slds-button--brand" aura:id="handle" />   Controller:  handlePGPTabEvent : function(component, event, helper){     var tabs = component.find({ instancesOf : "c:PGP_Tab_bar_item" }) ;     console.log(tabs); // output Array[] in console }


I have booked a ticket with British airways as follows.   April 28, 2018 Hyderabad to London Heathrow. May 2, 2018 London Heathrow to Boston.   Do I need a transit visa to get into London? If yes, what is the procedure and what documents are required? Kindly advise. I have a valid US visa and a valid passport.

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I saved and closed my project, but after opening again there are only 52 actions in my Action Editor instead of the 72 I made? How is this possible?

I created a model and added some Actions in the DopeSheet editor (more or less 5).  I exported the model to my game engine, saved the .blend file (Ctrl-S) and closed it.  Then I opened it again, and all the actions were gone, it just had the one I was using last.  The same happens with some preferences (for example, I disabled mip-maps on User Preferences -> System, and I have to re-enable it every time I open the .blend file again.  Does somebody knows how to restore the Actions and save everything? Thanks.


For convexity :  $$e^{ta+(1-t)b} \leq t \cdot e^a+(1-t)e^b \Rightarrow e^{(a-b)^t} \leq te^{a-b} + 1 - t$$  Now I'm stuck on how to solve it further.

I need a help with proving convexity  of $e^x$ function. $f(x)$ is a convex function, If it satisfies following condition.  $$f(c\cdot x_1+(1-c)\cdot x_2) ≤ c\cdot f(x_1)+(1-c)\cdot f(x_2), \quad    0 ≤ c ≤ 1$$


I have some code, in Java, to time the average of 10 tries of an insertion sort. It sorts the same array but up to 100 words, 200 words etc. up until the full lenght of on array. The code below is for 100 and 200 words respectively but it all looks the same with just the variables changed.  However every next average time seems to get shorter and shorter. Eg. 9658233ns for 100 words, 4273459ns for 200 words, 3716726ns for 300 words, 2965091ns for 400 words and 2842528ns for 459 words. However if I inverse the order, sorting through whole array first and array of 100 words last, it takes the longest amount of time to sort through the full array and shortest amount of time to sort through the array of 100 words.  Would using a different way to time the insertion sort lead me to more consistent results?      long i1AverageTime = 0L;     for (int i = 0; i < 10; i++) {         long start = System.nanoTime();         insertionSort(myArray, 100);         long end = System.nanoTime();         long timeTaken = end - start;         i1AverageTime += timeTaken;     }     i1AverageTime /= 10;      long i2AverageTime = 0L;     for (int i = 0; i < 10; i++) {         long start = System.nanoTime();         insertionSort(myArray, 200);         long end = System.nanoTime();         long timeTaken = end - start;         i2AverageTime += timeTaken;     }     i2AverageTime /= 10;

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


I am storing Time Series Data in a Postgresql database.  I am wondering what the performance ramifications are of the following two proposed design patterns.  Option 1:     A single table with a timestamp and many columns ( maybe 100 ) containing various measurement data.  TABLE measurement (id, timestamp, measurementA, measurementB, measurementC ...)    Option 2:  Two tables. One with an id and timestamp and another table which contains a reference to the measurement table and then multiple fields describing the recorded data.  TABLE measurement (id, timestamp) TABLE measurement_data (id, measurement_id, description, type, value)   I like the idea of option two. As my table structure is much smaller and simpler. However I have concerns of the effects of queries on the table. Will there be a huge performance hit for a simple query such as the following?  Using Option 1s Design  SELECT measurementA  FROM measurement  WHERE timestamp > X AND timestamp < Y   Using Option 2s Design  SELECT value  FROM measurement_data  WHERE description = 'measurementA'    AND measurement_id IS IN (SELECT id                              FROM measurement                              WHERE timestamp > X AND timestamp < Y )

Input Data  Multiple Tests Beds generate measurement data of various complexity.   In it's most basic form, not considering any meta-data, one measurement on a Test Bed will be a small (1 - a few thousand samples) time-series with a couple of dozen channels/signals/attributes per sample.  Measurements across time and Test Beds will have a similar set of signals, but not always the same as sensors are added and removed for the test setups.  Data volume  Currently we estimate our data rate at 6 testbeds x 4 test per hour x 12 hours a day x 4000 samples per test == 1,152,000 samples per day x 365 == 420,480,000 samples per year  _ x 48 columns per sample (currently 32 bit floats, mostly) ~~~ 75 GB per year  (columns in this case refers to channel/signal)  If/When more testbeds are added the data volume might increase accordingly.   Data Input  The test beds generate the data locally and the data is then imported asynchronously into the db. (A few thousand samples might be generated in a the time of one second, then reviewed locally and then either scratched or imported.)  Queries  We expect queries to be mostly on aggregates of the single measurements. I.e., you like to find all measurements (each having 4k samples) where e.g. the mean of channel_output_voltage is within a certain range.  Database layout?  What is a good way to set up tables for this? What factors have to be taken into account?  Theoretically I could go with one table per measurement generating 100,000 tables per year, but it doesn't strike me as a good idea.  Or I could stick everything into one big table (with hundreds of columns) that has room for all channels and channels get added as needed: One row per sample. Unused channels remain NULL.  MEASUREMENTS ------------ measurement_id } PK time_stamp     } channel_1 (may be NULL for a certain measurement_id ...) channel_2 ... channel_n(+1)   Or I could go with an approach of having one table for the samples (timestamps) and one table containing all the values: (one row per sample in MEASUREMENTS table and n rows per sample in the SAMPLE_VALUES table)  SAMPLES            SAMPLE_VALUES ------------       ------------- measurement_id     sample_id time_stamp         channel_id (links to a channels table where there is a name etc.) sample_id          channel_value   What other options are there? How to further investigate which option we should choose?  Database products  Due to customer constraints we would like to put this in MS SQLS or Oracle.    From :     Don't store the raw data, only store aggregates. Seriously.   This assumes that there is a meaningful way to determine ex antes what queries the customer is going to want to run against their data. No way :-)


If I have a few areas of expertise (that can't fit a classification of services/products) and I'd like to make use of those and provide products or services based on those, should I do it as an individual or should I register a business?  Examples of things I have in mind:   Gardening work Teaching Computer Programming in community colleges or private institutes Selling art work of mine and possibly of some friends and family Marketing for other businesses   Examples of concerns:   Tax complications Liability (in case someone decides to sue me) Other benefits or issues I may not be thinking about   So instead of providing the above services as a person, could I provide it under LLC/LLP/Inc where I am the sole contributor. There are somewhat similar questions but here I don't have a fixed business category and it is also a mix of selling things and services.  Another point that I want to focus on is if there is a point beyond which establishing a small business (instead of an individual provider) doesn't make financial sense - tax (esp when the business may make losses on consecutive years).

I am doing quite a bit of sidework this year and wondering at what point would it be a good idea to "start a business" and bill through that.


My data:  (USGS circa 2003 data on aquifers in the contiguous U.S.) Program: ArcGIS 10.1   The shapefile has no coordinate system or spatial reference. The metadata specifies NAD 1983 and in decimal degrees. My goal is to render this in such a way as to obtain 'normal' area/length/etc. values in meters for the purposes of calculating overlays with other spatial data. I cannot project the data because it has no coordinate system (error: no input coordinate system specified; paraphrasing)...batch/define doesn't work correctly either (the former same error, the latter (technically for use with rasters?) defines the projection, but reprojecting using the project tool doesn't do anything substantive (i.e. areas for huge swaths of the U.S. "46.1" etc. etc.).

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 can't figure out what kind of connection it would be if i put resistors like this  Can someone please explain how they are connected, like is R1 and R2 in series and R4 and R5 in series and then I make a parallel of R12 and R45 and R3?  And what if I replaced R3 with a capacitor would it be connected in parallel with these resistors so I could get the charge on the capacitor by doing $q = C * U$

What's the equivalent resistance in this circuit (between points A and B)?


I have a few Java tests that I'd like to run by doing java <test-name>.  But, all of the files are either .class or .java.    How do I trim off the end in a Bash script or in the terminal so that the command reads java <test-name>?

Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the fizzbuzz portion of said string?


I want to be able to generate a distance line between two points on the map, which also has the distance as a label (similar to the second image seen on Google maps or in the first image from the red point to Aberdeen).I have used the measure line tool and it has provided myself with a distance, however I am yet to figure out how to produce a line with the classified distance labeled on it. does anyone know how to solve this issue. I am using QGIS versions 3.2   I want to record the distance from the red point to the location of Aberdeen so that when I go into {print composer} I can make a map which has a line running between the two distance with its distance e.g 100km recorded I don't have the distance recorded in my {attribute table} would I need to download that data then once collected, I would be able to draw the line?


I just started set theory (ncert maths 11th grade) and it had a question:  Let $A = \{1 , 2 , \{3,4\} , 5 , 6\}$ Is $\{3,4\}$ a subset of A?  The book said no. I think the answer should be yes, since $A$ contains a set which contains the elements $3,4$ hence $A$ contains $3,4$ and by the definition of subset $\{3,4\}$ should be a subset of $A$.

I have came across this in a textbook:     $\{2\}\nsubseteq\{\{2\}\}$ but $\{2\}\in\{\{2\}\}$   I understand that $\{2\}$ is an element (member) of the other set but considering $\{2\}$ is a set itself, why is it not a subset?


Im learning programming with my group of friends and we are seriously stucked with something that looks pretty easy at first sight.  Basically we have a for loop that runs once. Inside we get some user input. Then we use a conditional to establish if we should add +1 to countM (Male count) or +1 to countF (Female count) instead.  PROBLEM -> The issue comes on the conditionals. When the user input is "F", the programm should be executing countF++, (if the requirements are fullfiled) however countM++ is the one executing everysingle time even if the user input is F and not M.  public static void main(String[] args) {      int countM = 0;     int countF = 0;      int peso;     int estatura;     String sexo;       for (int i = 1; i <= 2; i++) {           if(i == 2){            JOptionPane.showMessageDialog(null, "El nº de chicos aptos es " + countM);           JOptionPane.showMessageDialog(null, "El nº de chicas aptas es " + countF);           break;         }           JOptionPane.showMessageDialog(null, "Teclea los datos del alumno nº "+ i);           estatura = Integer.parseInt(JOptionPane.showInputDialog("Teclea la estatura del alumno (cm)"));         peso = Integer.parseInt(JOptionPane.showInputDialog("Teclea el peso del alumno en kg"));         sexo = JOptionPane.showInputDialog("Teclea el sexo del alumno (M o F)");            if(sexo == "F"){             if(estatura>160 && peso>60){             countF++;             }         }          else{             if(estatura>170 && peso>70){             countM++;             }         }                    }        }

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?


We will leave tomorrow morning to Brno. Are there are any road works that might cause jams? I saw that just before Brno there is a long part of workings, it's possible to Block the cars flow.  Any alternative routes?

According to Google maps there is road work on E50 from Prague to Brno. We are going to drive that route next week, how bad is it? Would it be better to take a different route? Google maps also show road work on road 12.  Anyone that has any information about the route Prague -> Brno.


On my Windows 7 computer, I had noticed that one of the four CPUs was running around 100%, spending ±25% of my PCs CPU. As the number was slightly changing, I knew that it was not an infinite loop, so I started investigating.  Using standard Windows task manager, I saw that the process which was doing this, was a "svchost.exe" process. Following its process ID (PID) to the "Services" tab, I could derive that the "netsvcs" Windows service group was responsible. In order to know which of the subscribed services was responsible, I started up "Process Explorer" (a third-party extended task manager), which led me to the "wuauServ" Windows service. I have stopped it and the CPU dropped immediately, so I've found the service, causing the issue.  Now I would like to go further: the Windows Update service (wuauServ) seems to have problems (hence the high CPU), but nothing seems to be written to the event log (at least not to the "Windows Logs/Application" event log).  Does anybody know how I can find out what is causing the high CPU load of the Windows Update Service?  Thanks in advance

I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen.    I tried running the tools in , but this did not fix the issue either:  No matter what I do it just hangs on the "Checking for updates..." screen and goes no further.


Back when I was in high school, which was a long time ago, I recall my math teacher telling me that the definition of $i$, the imaginary unit, is $\sqrt{-1}$. Knowing little, at the time, I accepted it without thinking twice.  Several years later when I was in my Complex Analysis class, one of my classmates asked for the distinction between defining $i$ in the normal way, i.e., $i=\sqrt{-1}$, and more ambiguous way, $i^2=-1$.  Now that I thought deeply about it, I have some suspicions about what my high school teacher taught me at the time.  Firstly, at least at the level of high school, one normally defines a square root of $x$, $\sqrt{x}$ as the positive quantity of either number that satisfies the property $\sqrt{x}\sqrt{x}=x$. Clearly, when $x<0$, such notion of sign makes no sense, so one cannot honestly talk about $\sqrt{-1}$ with the naive definition of the square root.  Fine, we are better than that, and we may say that $i$ is the principal root of the equation $x^2=-1$. We then just denote it by $\sqrt{-1}$. But this way of denoting $i$ brings with its convenience a litany of disasters, including the famous $1=-1$ fallacy.  Namely, one can show that $1=-1$ by $1=\sqrt{1}=\sqrt{(-1)(-1)}=\sqrt{-1}\sqrt{-1}=i^2=-1$.  Many a people have pointed out the haphazardness of assuming that the familiar law $\sqrt{x}\sqrt{y}=\sqrt{xy}$ holds when $x,y<0$. But at the same time we have no shame in writing $\sqrt{-5}$ as $\sqrt{5}i$ (in fact, I think this is the very reason of inventing the imaginary unit). Is it not terribly unnatural that the law holds for odd number of negative factors, and not so for the even ones? In fact, is there an example where this native rule (that when you have a negative radicand, you can pretty much apply the familiar laws of exponents)? (I guess it makes the first question.)  Secondly (so this officially marks the second, and the last question), which ought to be the definition of $i$, in your opinion? I believe that many people choose to write $i=\sqrt{-1}$ as it gives some illusion of determinancy, whereas $i^2=-1$ does not. But I still prefer the latter definition, and it seems to be the consensus of every complex analysis textbook that I've ever laid my hands on.  Better yet, I believe that the complex numbers shold be defined as the algebraic completion of reals or an isomorphic field to $\mathbb{R}\times\mathbb{R}$, with some special addition and multiplication rules, but I guess it is a little bit out of high school students' league (at least for most of them).  EDIT: Thank you all for your insightful responds, but there still one thing none of you has yet answered... Is there a conunter example to the law where we have $\sqrt{-A}$ for $A>0$, we have $\sqrt{A}i$?

So I am about halfway through complex analysis (using Churchill amd Brown's book) right now.  I began thinking some more about the nature and behavior of $i$ and ran into some confusion.  I have seen the definition of $i$ in two different forms; $i = \sqrt{-1} $ and $i^2 = -1$.  Now I know that these two statements are not equivalent, so I am confused as to which is the 'correct' definition.  I see quite frequently that the first form is a common mistake, but then again Wolfram Math World says otherwise.  So my questions are:   What is the 'correct' definition of $i$ and why?  Or are both definitions correct and you can view the first one as a principal branch? It seems that if we are treating $i$ as the number with the property $i^2 = -1$, it is implied that we are treating $i$ as a concept and not necessarily as a "quantity"? If we are indeed treating $i$ as a concept rather than a "quantity", how would things such as $i^i$ and other equations/expressions involving $i$ be viewed?  How would such an equation have value if we treat $i$ like a concept?   I've checked around on the various imaginary number posts on this site, so please don't mark this as a duplicate.  My questions are different than those that have already been asked.


$\mathbb{F}$ is a field. What can we learn if $f(x)$ is irreducible while $f(g(x))$ is reducible for $f,g\in\mathbb{F}[x]$? It seems likely to be a duplicate, but I've not been able find previous questions on this problem, so I'm here... Any reference is welcome. Possible outcome, maybe close (as much as I can conjure up):  Then the degree of any irreducible factor of $f(g(x))$ is divisible by $\deg{g}$.

Let $f(x)$ a irreducible polynomial of degree $n$ over a field $F$. Let $g(x)$ be a polynomial in $F[x]$. Prove that every irreducible factor of the composition $f(g(x))$ has a degree which is divisible by $n$.  I don't know even how to begin. I really need help. Thanks


I had to find the Taylor series for the function $f(x)=\cos(x)$ centred at $a=\frac{\pi}{4}$.  I found the pattern but the only part I'm missing is the sign. Since the series is centred at $\frac{\pi}{4}$, no value of $f^{\{n\}}(a)$ is equal to zero, and the pattern is $+, -, -, +, +, -, -, +$.  I have checked the answer that my teacher put in the document, but he just wrote      $$f(x) = \sum_{n=0}^{\infty}{\text{sign} \frac{\sqrt{2}}{2(n!)}}\left(x-\frac{\pi}{4}\right)^n$$   here $\text{sign} =+--++--++--+ \cdots$   which I find rather disappointing...      Is there a mathematical way to insert the sign pattern into the series, similarly to $(-1)^n$ for a normal alternating series?

I am working on a Taylor series question and I have created a series which alternates however, it does so in doubles. in other words it follows the following pattern: $x$, $x$, $-x$, $-x$, $x$, $x$,...   My goal is to write this series using summation notation.  I know that to produce a normal alternative series I simply use $(-1)^n$. However, I've found this significantly harder to create in summation notation because any manipulation to the $(-1)^n$ part of the sum only moves the position where the alternating series starts. Any suggestions are appreciated!  edit: please note that in my example, "$x$" is just an arbitrary function and each other $x$ does not equal the other $x$'s.


I have multiple problems. I wan the wing to emit light. But it doesn't iluminate the body at all. Also is there a way to make the colours visable when it emits light (or only make the parts that aren't black emit light)?

The closest I can get to making mesh lights affect their environment in Blender Eevee is giving them an Emission material and turning on "Bloom". But this isn't emitting proper light, it just looks like it is, but it doesn't light the surroundings whatsoever.     I would like to be able to light a scene with meshes without having to put point lamps everywhere just to make them emit light.


There's a table titled "movies". . (Please scroll down to the bottom of the page to see the table).  I want to find the list of first movies directed by each director in the list.  I've written the following query  SELECT director, title AS first_movie, MIN(year) AS year FROM movies GROUP BY director;   I did get the desired results but I'm wondering if there's any better way to do this.  Same way I want to find the list of second movies directed by all the directors in the list. How do i do it?  And finally, is there a general way to arrive at the list of nth movie directed by all the directors in the list?

I have found a query to find the nth highest salary from Employee table , but i don't understand the logic of (N-1)?  EmpID         Salary 1             90000 2             80000 3             54000 4             37000 5             12000 6             69000 7             50000  SELECT * FROM Employee E1 WHERE (N-1) = (                 SELECT COUNT(DISTINCT(E2.Salary))                 FROM Employee E2                 WHERE E2.Salary > E1.Salary               )   If N= 4, then how does the query work? I'm a complete beginner in SQL, please help!


, recently hit the necessary requirements to begin the beta stage.  But it does say it takes some time to launch the site.  How long does it typically take for a beta site to launch?     This proposal has reached 100% commitment. We are preparing for its launch and expect to create it soon.   How long would "soon" be?    EDIT:  For clarification, I didn't know there was a "private beta" for only people how committed...  Here is a list so you know what I'm asking:   How long does it take for the private beta to launch How long does it take for a site to go from private to public?

I've heard bits and pieces from various sources, but I would really like to know, what does the Stack Exchange staff do to launch a new site? What are the milestones? I'm talking about Area 51 milestones, reviews to leave private and public beta, other reviews that might happen along the path during a public beta, etc. I'd just like to get an idea of what Stack Exchange Employees do when when it comes to launching a new site.  If possible, I would like to know approximate days of the week, site milestones, etc, with the understanding that things change based off of holidays and other special occasions.


I'm struggling to prove that a (dot product) b < |a| |b| . I have to prove this algebraically and I can't use the equation of dot product involving the cosine.  I wrote each side in terms of the vector components and then squared each side.  Any help would be amazing!  Thanks

QUESTION  Show that $$|\mathtt{u} \cdot \mathtt v| \le |\mathtt u||\mathtt v|$$  ATTEMPT  Let $ \mathtt {u,v} \in \mathbb R^n$ such that $ \mathtt u = u_1 x_1 + u_2 x_2 + ... + u_n x_n, \mathtt v = v_1 x_1 + v_2 x_2 + ... + v_n x_n$   Then  $$|\mathtt{u} \cdot \mathtt v| = | u_1 v_1 + u_2 v_2 + ... + u_n v_n | $$ $$ |\mathtt u||\mathtt v| = \sqrt{ {u_1}^2 + {u_2}^2 + ... + {u_n}^2}\sqrt{ {v_1}^2 + {v_2}^2 + ... + {v_n}^2}  $$  This is where I get a bit stuck. Instinctively I do know that (2) is in fact larger or equal to (1). I'm just not sure which lemma/theorem/rule to use to show this.   Or am I going about this just the wrong way?


The question is:  Proof that if $c(n-1, 2) + 1 < |E|$ then $G = (V, E)$ is hamiltonian (Use Ore theorem)  My solution is: Since $c(n-1, 2) + 1 < |E|$ we find $n^2-3n+4 < \sum \limits_{v\in G}deg(v)$. If $G$ is not hamiltonian then there are $u,v$ belonging to $V$ with $u + v < n$ Then $n^2-4n+5 < deg(v)$... Who do I progress from here?

given the simple graph $G=(V,E)$ thats has $|V|=n≥3$ vertices. we need to prove that if $|E|>$ ${n-1 \choose 2}+1$ then $G=(V,E)$ is hamiltonian (tip Ore's theorem) the first part of the question was to prove that if $u,v∈V$ and they are not adjacent nodes and given H = (V/{u,v},F) the graph that we will get from G after removing u,v and all the edges adjacent to them would be $|F|$=$|E|$$-$$(deg_G$(u)+(deg_G$(v)$$)$. this is what i tried (after proving the first part) - the number of edges on a complete graph of n-2 nodes  is - $|E_kn-2|$ = $\frac{(n^2-5n+6)}{2}$ = $|F|$ $|E|>$ ${n-1 \choose 2}+1$ $=$ $|E|>$ $\frac{(n-1)(n-2)(n-3)!}{2!*(n-3)!}$+1 $=$ $|E|>$$\frac{(n^2-3n+4)}{2}$ and from the first part of the question we will use |F|=|E|−(degG(u)+($deg_G$(v)). and get that |F|-|E|=degG(u)+($deg_G$(v). lastly we will do $\frac{(n^2-3n+4)}{2}$ $-$  $\frac{(n^2-5n+6)}{2}$ and get a wrong answer of $n-1>n$ according to ores theorem .. i cannot figure where i went wrong or if everything is wrong and how to fix it thanks to any help , sorry for english mistakes if there are mistakes i will edit


So Ive just faced this issue when my array goes broken after I delete last element from it delete array[key] and then try to push new one.  So before deleting the element it looks like this:      guests:      [{ id: 263457,         avatar: '...',         name: 'Moamal' }],   After deleting this element it looks like this:  guests: [  ]   and after pushing new one:      guests:      [ ,      { id: 263459,        avatar: '...',        name: 'HalloweenD' } ]   and I'm pushing new element to this array like this  self.actives.push({ id: 263459,        avatar: '...',        name: 'HalloweenD' });

What is the difference between using  on the array element as opposed to using ?   For example:  myArray = ['a', 'b', 'c', 'd'];  delete myArray[1]; //  or myArray.splice (1, 1);   Why even have the splice method if I can delete array elements like I can with objects?


I finished this year with a cumulative GPA of 2.498 (pretty low, not gonna lie). The main concern that I have is that when rounding to 2 digits, it will be pushed to a 2.5, and I'm worried that in interviews when I say that I have a 2.5, and if the interviewer checks my transcript, he/she may think that I am bumping up to meet requirements, even through it's very close to the line.   I am already aware of past questions regarding gpa rounding, but those seem to deal with round from 2 digits to 1 digit, which doesn't fit my situtation. Am I wrong in thinking I shouldn't do this? I don't want to want anyone to think down on me.

I am applying for a master's program in the US and am not sure how I should present my GPA ethically when discussing it. I have an undergrad total GPA of 3.394 and when asked to put in my undergrad GPA it only gives room for 2 digits and nothing more. EX: 3.0. Can I round up my GPA since it's so close to 3.4, or would this be unethical and I should round down to 3.3?  To make this as general as possible: How should one round their GPA when only 2 digits are accepted, and they're less than .05 away from the next digit?


I have Ubuntu 14.04.3 on a Dell Studio 1558 laptop with wi-fi adapter Broadcom Corporation BCM43224 802.11a/b/g/n (rev 01). My home modem/router is an EasyBox 803.  Suddenly my Ubuntu doesn't even show my network on the list. It normally shows and connects to other networks and my phone normally connects to this network.  Strange clue: I tried booting to a live Ubuntu 14.04.2 session on my laptop and it works as expected!

I'm using Ubuntu 14.04 on my laptop and I can't connect to a specific WiFi networks. I managed to connect to others wifi networks in the past without any problem, and other devices (another laptop with Windows 7 and some Android smarthphones) were also able to connect to this WiFi network. Furthermore, this laptop can connect to the same router through the ethernet cable. So, as a resume, the problem is just between this particular device and this particular WiFi network.  Any hint about what may be happening?  I already tried solutions proposed on these questions but it didn't worked:     It seems that I don't have the iwlwifi but the wl instead. I also tried following those steps but replacing "iwlwifi" with "wl" but nothing.  Edit:


Does the keyword 'break' only jump out of one layer of loop? In this piece of code, there are 3 layers loops, which I want to jump out completely. Is there an easy to do that?   while(){     while(){         for(){          if(a==b){            // I want to jump out of the outer while() loop.           }          }     } } // and the logic continues from this line.

I have four foreach loops that iterate through the collections and based on a condition do something.   Here is the code that I am writing now:  boolean breakFlag = false; String valueFromObj2 = null; String valueFromObj4 = null; for(Object1 object1: objects){   for(Object2 object2: object1){     // I get some value from object2     valueFromObj2 = object2.getSomeValue();     for(Object3 object3 : object2){       for(Object4 object4: object3){        // Finally I get some value from Object4.        valueFromObj4 = object4.getSomeValue();        // Compare with valueFromObj2 to decide either to break all the foreach loop        breakFlag = compareTwoVariable(valueFromObj2, valueFromObj4 );        if(breakFlag){break;}       } // fourth loop ends here       if(breakFlag){break;}     } // third loop ends here     if(breakFlag){break;}   } // second loop ends here   if(breakFlag){break;} } // first loop ends here   The main object (objects in the code) comes from a third-party provider SDK, so I cannot change anything on that portion. I want to ask the Stack Overflow community if there is a better approach to break all the four foreach loops. Or if there is any other way to refactor this code to make it more readable and maintainable.


I'm fresh physics graduated student from University of Jordan -Middle East-, My GPA is below 3, so Can I get a scholarship from graduate school in physics at -US- if my GPA below 3, If yes what is the Admission Requirements for it ?!

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


I just turned 18. I have a bank checking account and I'm thinking of starting a Roth IRA with some of the money I am earning this summer. I have a credit card linked to my parents account (I use this to make small purchases here and there) which is think is showing up on my credit history (I use credit karma to check). I have no real steady job (just some hourly work here and there) and am going to college in the fall (luckily my parents will pay for my college tuition). Is there something else I should be doing and is opening a Roth IRA a good idea?  Note I'm pretty inexperienced with financial matters (being a young adult) but I do have time to research.

I'm trying to avoid asking a duplicate question, but I feel my situation is more specific than general beginner's saving or investing.  I am a university student with a part time job that does not offer 401k options.  However, I would still like to start saving (and investing) for (possibly early) retirement.  I am already saving 15% of my income to this end and putting it in a regular savings account.  I would like to know what other places I could put this money at my age so I can earn a higher return on my investment.  I am considering, for example, the following options:   High yield savings account IRA Lower risk investing (mutual funds or something like that; I'm not an expert)   What are the advantages and disadvantages of each considering my situation?  Are there any other options I should consider?


How do I prove that if A is set and each of f and g is a function from A to A, then f o g = g o f?  Edit: If this is not true how can I prove that it is false using sets?

I've read that function composition "generally does not commute."  Not counting compositions involving the identity function, and compositions of a function and its inverse, are there examples of functions on the reals (for example) $f, g$ where $fg = gf$ outside of these cases?


Is there any word that applies to a person who has lost their sibling, such as widow/widower for a married person who has lost their partner?

As per title - is there such a word?  Either a noun:     John is an ??????  (his only brother died when he was 3)   or verb (or past tense as an adjective):     John  was ????ed today (his only sister died today)


The question is      An insurance company supposes that the number of accidents that each of its policyholders will have this year is Poisson distributed, with a mean depending on the policyholder: the Poisson mean $\Lambda$ of a randomly chosen person has a Gamma distribution with the $\Gamma(2, 1)$-density function $f_\Lambda(\lambda) = \lambda{e^{-\lambda}} $ ($\lambda > 0$). Find the expected value of $\Lambda$ for a policyholder having $x$ accidents this year ($x = 0, 1, 2, \ldots$)   I am very unsure of how to solve this problem. I know that we need to solve for $E(\Lambda\mid X=x).$ I am pretty sure, but not sure what comes after this.

An insurance company supposes that the number of accidents that each of its policyholders will have this year is Poisson distributed, with a mean depending on the policyholder: the Poisson mean Λ of a randomly chosen person has a Gamma distribution with the Γ(2, 1)-density function fΛ(λ) = λe−λ (λ > 0). Find the expected value of Λ for a policyholder having x accidents this year (x = 0, 1, 2, . . .).  I am not sure how to incorporate the gamma parameters. So far I have found P(X = n|Λ = λ) = Poisson(λ) and fΛ(λ)= Exp(λ) so by integrating P(X = n|Λ = λ)fΛ(λ) then letting the integral of Gamma (n + 2, 2) equate to 1, I have worked out P(X = n) = (n + 1)/2^(n+2). How do you find the expected value of Λ from that? I have seen that a Gamma-Poison mix has E(X) = αβ which would give 2 but I have tried integrating fΛ(λ) and can't seem to get 2.


I'm faced with a conceptual problem, where I am supposed to describe the motions of the following system (two masses on each end of a totally inelastic rope hanged on a pulley):  I understand that there is the gravitational force acting, and also a second, opposing force in the rope. My problem is that I don't understand the nature of this second force. Where does it come from? How do I summarize it for each of the masses? From my solutions manual I know that it must be equal $|T_1|=|T_2|$ for each masses, but that sounds plain counterintuitive for me. Can you please shed some light on this? UPDATE: the problem is formulated so that the pulley and the rope are both massless, and the bearing has no friction.

Assuming $T_1$ is the force that acts on box $1$ and $T_2$ is the force that acts on box $2$.  Exactly what causes the Tension? Why does $T_1 = T_2$?  The problem is we are told to memorize that $T_1 = T_2$ for mass less ropes, but I do not understand why, especially in an Atwoods machine.  When I think about it, I know it has something to do with the force $m_2g$ which causes the box with mass $m_1$ to rise, and vice versa.  But I cannot apply physics terminology to this, or really understand whats going on.


To the Dutch, milk and cheese are staples, as essential a part of the weekly shop as rice is for a Chinese shopper or teabags are for an Englishman.  This is the sentence from CNN's one article. I don't understand why it is not "an essential part of the weekly shop".  Can you tell me about any rules or grammar in this phrase, please?

To the Dutch, milk and cheese are staples, as essential a part of the weekly shop as rice is for a Chinese shopper or teabags are for an Englishman.   This is a sentence from an article on CNN. I don't understand why it is not "an essential part of the weekly shop".  Can you tell me about any rules or grammar in this phrase, please?


I am running pstree on MacOS Majave and wan to Show branches of processes using VT100 graphic chars:  $ pstree -g 2 | head -n 3 ─┬◆ 00001 root /sbin/launchd  ├──◆ 00049 root /usr/sbin/syslogd  ├──◆ 00050 root /usr/libexec/UserEventAgent (System)   Tried to show it from less  ESC(BESC)0^Nqw`^O 00001 root /sbin/launchd ^N tqq`^O 00049 root /usr/sbin/syslogd ^N tqq`^O 00050 root /usr/libexec/UserEventAgent (System) (END)   How could I solve such a problem?

When I use less at the command line the output is like   but when I use less from within a bash script I get:   How can I use less in a bash script and not get all the escape characters and have it work like it does at the interactive command line?


\documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage{physics} \usepackage{lmodern} \usepackage{amsmath} \usepackage{amssymb} \usepackage[version=3]{mhchem} \usepackage{subcaption} \usepackage{float} \usepackage{xcolor} \usepackage[section]{placeins} \usepackage[normalem]{ulem} \usepackage{gensymb} \usepackage{mathrsfs} \usepackage[tmargin=20mm, bmargin=20mm]{geometry} \usepackage{lipsum} \newcommand{\vect}[1]{\boldsymbol{1}} \usepackage{parskip} \usepackage{graphicx} \usepackage[font={small, it}]{caption} \usepackage{siunitx} \usepackage{float} \usepackage{babel} \usepackage{mhchem} \usepackage{dblfloatfix} \usepackage{multicol} \floatstyle{plaintop} \restylefloat{table}   \title{Semester assignment 241} \author{Some guy} \date{April 2019}   \begin{document}  \maketitle \vspace{2em} \begin{multicols}{2} \raggedright   \section*{Introduction} As the world's demand for power increases, so does the need for lower carbon emissions. The way the world is going today, it does not seem like humanity will be able to keep their ''two degree'' goal. By using renewable energy, one can both lower emissions and increase power generation. But some issues renewable energy face are that they often take up a large area, and that they can be inconsistent. The sun isn't always shining, the wind isn't always blowing and the dams are reliant on regular precipitation.   Then there are nuclear power plants, which produce large amounts of power with no release of CO$_2$. Fission reactors produce about 11\% of the worlds power \cite{worldnuclear}. Relative to carbon emissions, they are good for the environment, but they have one major drawback, which is the nuclear waste left behind. The nuclear waste can stay radioactive for hundreds of years, and needs the be treated and stored in a special way.  But in the last 10 years, a new kind of nuclear reactor has been looking more promising, and that is the fusion reactor. They have the possibility of producing even more energy, but without any nuclear waste or carbon emissions. The main difference between fission and fusion is that fission is about splitting atoms into lighter ones, while fusion is about fusing atoms into heavier ones.  On the basis of this, one can raise the question: Can fusion power plants replace fission power plants if nuclear fusion becomes feasible?  \section*{Theory}  One of the most interesting aspects of fusion reactors, is the potential amount of fuel available, and the theoretical amount of power it can produce. If you look at the amount of energy produced by fission of \ce{^{235}_{92}U}, its about 200 MeV, which is 0.85 MeV/u \cite{lecture}. Fusion on the other hand, produces a lot more energy. \begin{equation}     \ce{^{2}_{1}H} + \ce{^{3}_{1}H} \xrightarrow{} \ce{^{4}_{2}He} + \ce{^{1}_{0}n}  \; \; \; \; \; \; \; \; Q = 17.59\;MeV \end{equation} From equation (1), one can see that the amount of energy released is lower, but if you compare the mass involved, its $\frac{17.59}{5} = 3.5\;MeV/u$ which is more than 3.5 times more than that of fission \cite{lilley2013nuclear}.   Compared to mining Uranium, it is a lot easier to acquire deuterium, as it makes 0.03\% of all the water in the ocean \cite{serway2004physics}.   \bibliographystyle{plain} \bibliography{References.bib} \end{multicols} \end{document}   I have the problem that I'm using two columns, and cite something at the middle of the page on the left side, then on the top of the right side. The citations on top right gets numbered [1] and [2], and the first citation on the left side gets numbered [3]. This is probably because the citation order is decided by which citation is the top-most one, not necessary the first one you'd read. Its annoying because the first citation you read is then marked as [3].  I'm using Overleaf and BibTeX  Any way to fix this easily?  Sorry for the amount of code  .

I'm using TeXnicCenter to write all my documents and generate my bib file by using JabRef. However I noticed that my references are out of order. It seems the addition order to JabRef file forces the numbering in my file. Is there a way to see my references sequentially in my paper?  For example,  In my bib file:        Berkay et al. Using References efficiently.   Alan  et al. Asking better questions in TeX exchange.      In my tex:     Berkay et al [2] proposed a solution for references and recently  Alan et al. [1] criticized him.   My question refers having them [1] and [2], sequentially, in order.


There were forty-nine messages, the first of which was “Is it true that you moved to Florida?” sent to my cell phone.   It seems like there should be another comma after Florida, but you've already got the question mark and quotation mark there. Is it okay like this?

The American convention in quotations is (typically) to place punctuation inside quoted text. But I always run into situations where the punctuation of the quote interferes with the punctuation of the sentence. How would you punctuate this (American, non technical)?     When my friends ask, "What do you want for your birthday?", I never know how to respond.   It seems odd to place the last comma outside the quote simply because of the question mark. Is that the preferred (i.e. most often accepted) standard?


After I downloaded Ubuntu 12.10 on to my laptop running windows 8, it appeared as a removable disk drive (DVD Drive).   I then clicked on the wubi application, but it did not respond, so I restarted my computer.   After I restarted and opened my computer the Ubuntu files are missing. I couldn't search for them either.   My laptop- Sony SVF5212.    Is Ubuntu still there?  How can I install now?

I tried to use the usb-creator.exe from Ubuntu 10.10 desktop i386 ISO image and it does create an USB stick that doesn't boot. When I try to boot from it I get:     Operating System not found.   I try to do this from Windows 7 x64. I'm not looking to create a live Ubuntu media, only an installation USB disk.  I repeated the process several times and I even tried to reformat the USB drive (FAT32), no success yet.  The USB stick is a 8GB one.


Because the ground in my scene is very large a big portion is being cut off in the camera view.     When I adjust the scale the camera other mesh cut from the scene.    I do not want to change the angle of the view. The ground is huge yet its not visible in the camera. Any suggestions on how to resolve this would be appreciated.

I have created a simple model here   When rendering it the end of it is cut off   How can I get the camera to render a longer distance?


I have a server running with Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz cpu, the main board have more PCI slots which I needed to use but it only works with a second CPU. here is the 2 important questions - should the new CPU be like the running one exactly?  - will I need to upgrade the Esxi licence too? now it is only for 1 physical CPU with any number of virtual CPUs.  thanks

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


I do not why but my precedent question was closed. So i post new question. I need your help to write the test class for the code below. I tried millions of time but nothing works, i reached the limit of my beginner knowledge in triggers. here is my triger: trigger UpdateLeadLastMQLDate on Event (before update) { Map<Id, Lead> leads = new Map<Id, Lead>(); for(Event record: Trigger.new) {     if(record.WhoId?.getSObjectType() == Lead.sObjectType) {         leads.put(record.WhoId, null);     } } leads.putAll([SELECT Last_MQL_Date_Time__c FROM Lead WHERE Id = :leads.keySet()]); for(Event record: Trigger.new) {     record.Lead_Last_MQL_Date_Time__c= leads.get(record.WhoId)?.Last_MQL_Date_Time__c; }  } Here the test class: @isTest (seeAllData=false) private class TestUpdateLeadLastMQLDate { static testMethod void testEventTrigger() { // set up leads List testLeads = new List(); Lead lead1 = new Lead(); lead1.Company = 'Test 1 New Company'; lead1.LastName = 'Aigul'; lead1.LeadSource = 'LeadIQ'; lead1.Status = 'SQL'; lead1.Email = 'test@test.com'; lead1.Country = 'France'; lead1.Last_MQL_Date_Time__c = DateTime.parse('17/06/2020 13:00'); //lead1.Business_Type__c = 'App/Business'; //lead1.Lead_Role__c = 'Product'; testLeads.add(lead1);     Lead lead2 = new Lead();     lead2.Company = 'Test 12';     lead2.LastName = 'Jordan';     lead2.LeadSource = 'LeadIQ';     lead2.Status = 'SQL';     lead2.Email = 'test23@test.com';     lead2.Country = 'France';     lead2.Last_MQL_Date_Time__c = DateTime.parse('17/06/2020 13:00');     //lead2.Business_Type__c = 'App/Business';     //lead2.Lead_Role__c = 'Product';     testLeads.add(lead2);     insert testLeads;          // set up Events     List<Event> events = new List<Event>();     Event event1 = new Event();     event1.WhoId=testLeads[0].Id;      event1.Subject= 'Test0';     event1.Type='Autre';     event1.STARTDATETIME=System.today();     event1.ENDDATETIME=System.today();     event1.Sales_Rep__c = '0052o000009lZyVAAU';     event1.Description = 'bla';     events.add(event1);               Event event2 = new Event();     event2.WhoId=testLeads[1].Id;      event2.Subject= 'Test1';     event2.Type='Autre';     event2.STARTDATETIME=System.today();     event2.ENDDATETIME=System.today();     event2.Sales_Rep__c = '0052o000009lZyVAAU';     event2.Description = 'bla';     events.add(event2);      Test.startTest();     insert events;     Test.stopTest();          /*List<Lead> leadResults = [SELECT Last_MQL_Date_Time__c FROM Lead WHERE Id IN :testLeads];*/     List<Event> eventResults = [SELECT Lead_Last_MQL_Date_Time__c FROM Event WHERE Id IN :events];     for (Event e : eventResults) {         //System.assertEquals(true, l.SQL_Scheduled__c);         System.assertEquals(e.Lead_Last_MQL_Date_Time__c, DateTime.parse('17/06/2020 13:00'));     } }  }

I need help to create a test class for my trigger below: trigger UpdateLeadLastMQLDate on Event (before update) {   Map<Id, Lead> leads = new Map<Id, Lead>();      for(Event record: Trigger.new) {         if(record.WhoId?.getSObjectType() == Lead.sObjectType) {             leads.put(record.WhoId, null);         }     }     leads.putAll([SELECT Last_MQL_Date_Time__c FROM Lead WHERE Id = :leads.keySet()]);     for(Event record: Trigger.new) {         record.Lead_Last_MQL_Date_Time__c= leads.get(record.WhoId)?.Last_MQL_Date_Time__c;     } }  Here the test class: @isTest (seeAllData=false) private class TestUpdateLeadLastMQLDate {     static testMethod void testEventTrigger() {         // set up leads         List<Lead> testLeads = new List<Lead>();         Lead lead1 = new Lead();         lead1.Company = 'Test 1 New Company';         lead1.LastName = 'Brian';         lead1.LeadSource = 'Website';         lead1.Status = 'MQL';         lead1.Email = 'test@test.com';         lead1.Country = 'USA';         lead1.Last_MQL_Date_Time__c = DateTime.parse('17/06/2020 13:00');         //lead1.Business_Type__c = 'App/Business';         //lead1.Lead_Role__c = 'Product';         testLeads.add(lead1);                  Lead lead2 = new Lead();         lead2.Company = 'Test 12';         lead2.LastName = 'Jordan';         lead2.LeadSource = 'Personal';         lead2.Status = 'New';         lead2.Email = 'test23@test.com';         lead2.Country = 'France';         lead2.Last_MQL_Date_Time__c = DateTime.parse('17/06/2020 13:00');         //lead2.Business_Type__c = 'App/Business';         //lead2.Lead_Role__c = 'Product';         testLeads.add(lead2);         insert testLeads;                  // set up Events         List<Event> events = new List<Event>();         Event event1 = new Event();         event1.WhoId=testLeads[0].Id;          event1.Subject= 'Test0';         event1.Type='New';         event1.STARTDATETIME=System.today();         event1.ENDDATETIME=System.today();         event1.Sales_Rep__c = '0052o000009lZyVAAU';         event1.Description = 'bla';         events.add(event1);                           Event event2 = new Event();         event2.WhoId=testLeads[1].Id;          event2.Subject= 'Test1';         event2.Type='Other';         event2.STARTDATETIME=System.today();         event2.ENDDATETIME=System.today();         event2.Sales_Rep__c = '0052o000009lZyVAAU';         event2.Description = 'bla';         events.add(event2);              Test.startTest();         insert events;         Test.stopTest();                  /*List<Lead> leadResults = [SELECT Last_MQL_Date_Time__c FROM Lead WHERE Id IN :testLeads];*/         List<Event> eventResults = [SELECT Lead_Last_MQL_Date_Time__c FROM Event WHERE Id IN :events];         for (Event e : eventResults) {             //System.assertEquals(true, l.SQL_Scheduled__c);             System.assertEquals(e.Lead_Last_MQL_Date_Time__c, DateTime.parse('17/06/2020 13:00'));         }     } }


I've seen this question on stackoverflow, but without a clear answer. How do you disable JDWP on linux server? We had a security team recommend to disable JDWP due to RCE.  Ref:   Thank you.

I know there's some JAVA_OPTS to set to remotely debug a Java program.  What are they and what do they mean ?


I am looking for a way to copy the entire code block using jquery, I already have a script for copy to the clipboard which utilizes the select() method. But according to the jquery docs select event is limited to  fields and  boxes.  So I am seeking for a standalone solution to copy all the elements inside the codeblock at once.  This is how my HTML looks like.
'core/base.html' #some more html
' <button type="button" class="btn btn-primary btnFloat" id="copybutton"></button>   Script     $(document).ready(function () {                     $("#copybutton").click(function () {                 console.log("clicked");                  $("#texttocopy").select();                 document.execCommand("copy"); })

What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData("Text", text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");         const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using :


someone can tell me what is the best downloader in ubuntu? (same IDM is best) !!

This question exists as it fills a specific criterion.  While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will likely be closed per the . More information on the .   What download managers are available for Ubuntu? Can you provide the link as well?


I have these two classes that need each other and inherited from the same class. Wehn I compile Seller.h, it compiles fine but when I compile Buyer.h I get errors from Seller.h.  So when i compile Buyer.h I get errors such as :  Seller.h:14:16: error: âBuyerâ has not been declared    void addBuyer(Buyer*);                  ^ Seller.h:15:14: error: âBuyerâ was not declared in this scope   std::vector<Buyer*>  getBuyers() const;  Seller.h:20:17: error: âOrderâ has not been declared   void fillOrder(Order*);              ^   They are #included but it still says out of scope.  #ifndef SELLER_H #define SELLER_H #include "Entity.h" #include <string> #include <vector> #include "Inventory.h" #include "Buyer.h" #include "Order.h" class Seller : public virtual Entity { public:         Seller(const std::string &, const std::string &, double=0.0);         virtual~Seller(){}         void addBuyer(Buyer*);         std::vector<Buyer*>  getBuyers() const;         void setInventory(Inventory*);         Inventory* getInventory() const;         virtual void list() const override;         virtual void step() override;         void fillOrder(Order*); private:         Inventory* inv;         std::vector <Buyer*> buyers; }; #endif   Buyer.h   #ifndef BUYER_H #define BUYER_H #include <string> #include "Entity.h" #include <queue> #include "Order.h" #include "Seller.h" class Buyer : public virtual Entity { public:         Buyer(const std::string &, const std::string &, double =0.0 );         virtual ~Buyer(){}         void addSeller(Seller *);         std::queue <Seller *> getSellers() const;         void addOrder(Order *);         std::queue <Order*>  getOrders() const;         virtual void list() const override;         virtual void step() override;  private:         std::queue <Order*>  orders;         std::queue <Seller*> sellers; }; #endif

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


I really want to know how can I prevent a program to connect to Internet with Windows 7 firewall?    I have smart security nod32 business edition installed on my computer. should i do this job with nod or there is a way in Windows Firewall?

There are some .exe and .dll files belonging to some programs on my laptop which communicate with the internet without my permission (for self-update generally). I want to prevent those files one by one from accessing the internet. I don't want to install any external firewalls. I'm using Windows 7 Home Pro and if this can be done by Windows Firewall, it's OK. I took a look at Windows Firewall but couldn't find a setting to disable file access.


I am flying from India directly to Zagreb and flying back from Zagreb to India, on an unused single-entry Schengen visa. Will I be allowed entry? I have an Indian passport.

I am traveling first to Greece then to Croatia. But I have Schengen with single entry. So is it allowed to enter Croatia with this visa?


Integrals and derivated are related as an indefinite integral is an anti-derivative, however, I found it always perplexing that derivatives can be always found easily (well, at least the ones I saw during the past years) and there are so many ways to set a very challenging integral or even one that can't be solved at all (example when the integrand is $e^{x^2}$), is there any mathematical explanation behind this or it is just a "that is how things are" type of thing? I tried going back to the definition of both and couldn't find anything helpful.

If a function is a combination of other functions whose derivatives are known via composition, addition, etc., the derivative can be calculated using the chain rule and the like. But even the product of integrals can't be expressed in general in terms of the integral of the products, and forget about composition! Why is this?