Let $x$ be a real number. If $|x|< \varepsilon$ for any $\varepsilon>0$, then $x=0$. That was a lemma in my lecture today. My Dr. proceeded as follows:  Suppose that $x≠0$ Choose $\varepsilon =|x|/2>0$ We have $|x|<|x|/2$  (according to our assumption) Which is a contradiction Thus $x=0$  But I have a little question here:  If I took $\varepsilon=1>0$  I have $|x|<1$  Then $-1<x<1$  Thus we can't assure the value $x=0$, it has more values, since $x$ is a real number in the interval $]-1,1[$ Is my Dr.'s solution accurate or am I missing something?

For any $\epsilon$, if $\epsilon>0$ and $|x|<\epsilon$, then $x=0$.  I understand that supposing  $\epsilon=\frac{x}{2}$ will lead to a contradiction, but let’s take a correct case: Let $\epsilon=3$, then $x$ would have a whole set of values. Can you explain what is going on?


I will want to install minion pro under ibuntu but I did not succeed, because it asks me for the .otf file that I do not have, I am looking for a step by step method to install minion pro very clear and easy.    I tried a lot of times but nothing at all, under windows and ubuntu, it seems to me that it's very difficult to install this package, it's a real headache, I'm looking for any solution to this problem, may be a latex IDE which contains by defaul minion pro, or a vmware image which is preconfigured for the edition of latex documents.      thank you for giving me an emergency respon

I followed the instructions to install MinionPro fonts from this website.   However, when I tried to run the tex file at the bottom, I have this error message:  ! LaTeX Error: File `MinionPro.sty' not found.   Running the command kpsewhich MinionPro.sty gives the following output:  /usr/local/share/texmf/tex/latex/MinionPro/MinionPro.sty   So the system knows where MinionPro.sty is, so why can't the file compile?


I can't compile the document with stix font.   \documentclass[10pt,a4paper]{book} \usepackage[utf8x]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage[T1]{fontenc} \usepackage{stix}  \begin{document}     Package stix.     \[y=X\beta+\varepsilon\] \end{document}   Error message:  miktex-makemf: The stix-mathrm source file could not be found. Running ttf2pk.exe...  miktex-makepk  : PK font stix-mathrm could not be created.  Process exited with error(s)   Any help?

Every once in a while after updating MiKTeX, the installation gets into an inconsistent state. This might be a problem with the packages (an example is described in ), but sometimes packages are split or renamed. The cases I remember are when  and when miktex-etex-base-2,9 was renamed to miktex-etex-base-2.9 (if I recall correctly; I am sure it was either that or something very similar). In each case the MiKTeX Update process suggested to remove the "old" packages but it didn't give the user any hints about him having to manually add the respective replacement packages back in the package manager to get one's MiKTeX installation back into a usable state.  What are best practices for keeping MiKTeX up to date? Note that I'm not asking about installing new packages or fonts in general; there are other questions covering this area.   In which order should one execute the Update process and the Synchronization of the repository? , it is recommended to check the MiKTeX homepage before updating. What else should one do? When and in which order (and why) should one execute the "Refresh FNDB" and "Update Formats" processes within the MiKTeX Options menu? What else can happen? Other advice?


How can I take long exposures on a Nikon D7000 with a wireless remote? I've read the   on this, but the answers there are not working for me. "Bulb" shows up when the shutter control is set to single mode, once I change to remote mode, the display changes to "---". Further, when I open the shutter with the remote, the shutter shuts on its own 30 seconds later - I do not get a chance to keep it open for longer.  What could be the difference between my setup and those of the earlier question which worked for the poster?

I have recently tried to take pictures of stars using my wife's D7000, but I couldn't get it to expose for more than 30 sec. In my old D70 I used the wired remote to do long exposures, but now I have only the wireless one. How can I get it to work?


I am only going to share a bit of the code from this as I do not want to leak what I am currently making, if you require more please do tell, but for now I'll just have to put this.  private void Log(object sender, LogMessageEventArgs e)     {         Console.WriteLine(e.Message);     }     static void Main(string[] args)     {         DiscordClient discord;         discord = new DiscordClient(x =>         {             x.LogLevel = LogSeverity.Info;             x.LogHandler = Log; // Error CS0120         });   I am trying to achieve logging any errors or anything that happens so I can make a discord bot, for the people who asked.

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


If a nine digit number is formed by the nine non zero digits with units digit $5$, prove that it must not be a perfect square.   Greetings, I was continuing on with my number theory, and a question came again which I could not solve.  Here's what I've done so far:     Since the units digit of the 9 digit number is $5$, it is a multiple of $5$. Therefore the number is divisible by $25$ and hence the last two digits are $25$ and now I'm stuck.   Any help would be appreciated.   Thank You  EDIT: Thanks to John Omielan, Toby Mak, Community♦ for pointing out that this is a duplicate. See the first link on the top. There is an answer there.

If "x" is a 9 digit number , which contains digits from 1 to 9 which ends in 5 . Prove that it can't be a perfect square ( digits are not to be repeated).  Please suggest the solution of this question.


I need to know whether a particular file exists on a given FTP server when I run a job that calls the said SSIS package. Currently I'm employing a script task(within SSIS) that subsumes the following code:          string userName = Dts.Variables["User::ftp_username"].Value.ToString();         string password = Dts.Variables["User::ftp_password"].Value.ToString();         string fileName = Dts.Variables["User::download_file_name"].Value.ToString();         string ftpURL = String.Format("ftp://abc.def.com/{0}", fileName);          try         {             FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(ftpURL);             ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile;             ftpRequest.Credentials = new NetworkCredential(userName, password);              using (FtpWebResponse ftpResponse = (FtpWebResponse)ftpRequest.GetResponse())             {                 Dts.Variables["User::fileExists"].Value = true;             }         }         catch         {             Dts.Variables["User::fileExists"].Value = false;         }          Dts.TaskResult = (int)ScriptResults.Success;   However, this is calling the WebRequestMethods.Ftp.DownloadFile method, which according to the MSDN website is used to is used to download a file from an FTP server. I just need to know if the file exists, not download it.   Also, is there a better way to check for file existence?  PS. I'm new to C#, so I'm sorry if sound naive!

I need to use FtpWebRequest to put a file in a FTP directory. Before the upload, I would first like to know if this file exists.   What method or property should I use to check if this file exists?


I know this is really bad, but I have accidentally deleted the init.d folder from my system. I am using VMWare player to load Ubuntu 14.04 LTS. Now my system is not starting properly. I don't have CD to boot from.  Can anyone tell me how to get this folder back by any means?

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


when using arrows with Triangle Caps, tikz draws the part surrounding the junction between the line and the tip twice. This leads to unwanted results when using opacity; in addition, the part appended to the tip is not bendable.  \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,arrows.meta}  \begin{document} \tikz {      \draw [line width=10mm,opacity=0.5,-{Triangle Cap[]}] (0,0) -- (6,0);     \draw [line width=7mm,opacity=0.5,-{Triangle Cap[]}] (0,1)                                 .. controls (1.5,0.5) and (1,4) .. (2,4); }  \end{document}   Result:    Any thoughts, solutions?  Thanks in advance!  uzahnd

Drawing a semi-transparent arrow should be easy enough, right?  \documentclass{article}  \usepackage{tikz} %\usetikzlibrary{arrows} % this doesn't change the result  \pagenumbering{gobble}  \begin{document}  \begin{tikzpicture}   \draw[-stealth,line width=12pt,opacity=0.5] (0, 0) -- (0, 2); \end{tikzpicture}  \end{document}   However, this produces the following result:    Note that the arrow is darker than it should be where the rectangle and arrowhead overlap.  How can I get an arrow of this shape and size without this artifact? (Clean solutions preferred.)


How can I use a broken Y-Axis in Microsoft Excel like in this image below?

I want to break the Y-axis in an Excel sheet. How can I do that?  For example, suppose I have the data in a range from 0-7000 and then range from 22000-28000. I want a break in the Y axis from 8000-20000.


I was wondering, what the threshold is for a dataset to be called 'imbalanced'?   Technically every dataset where the target-classes aren't evenly distributed is not balanced. Yet small imbalance seems to have little effect in the used methods (i.e. decision trees, Cluster Analysis, etc.) and outcomes. So when do we call data truly imbalanced so that we have to adjust our procedure (different sampling methods / algorithms)?  Is there a value of percentage, that should be kept in mind?

We already had multiple questions about unbalanced data when using , , ,  and a number of other similar questions, what makes it a very popular topic! Unfortunately, each of the questions seems to be algorithm-specific and I didn't find any general guidelines for dealing with unbalanced data.  Quoting , dealing with unbalanced data     (...) heavily depends on the learning method. Most general purpose   approaches have one (or several) ways to deal with this.   But when exactly should we worry about unbalanced data? Which algorithms are mostly affected by it and which are able to deal with it? Which algorithms would need us to balance the data? I am aware that discussing each of the algorithms would be impossible on Q&A site like this, I am rather looking for a general guidelines on when it could be a problem.


I got a few brand new 32GB micro-SD cards with included adaptors. I then tried moving some data to it, but there was a problem, so I tried removing the write-only properties so i could complete the move. I have tried two of them, and when I did it with a CMD script, it made my micro-SD card unreadable - Windows cannot access this disk. It is currently in read-only mode. It had nothing stored on it. I'm worried it's faulty forever at this point, I cannot find any help online.

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


Is one of them the correct option? Or they mean different things?  On Google maps I got these results:   (9K results)   (3K results)  Example sentence:     Without permission, he slumped on/onto my bed and lay on his back.

I wrote this sentence: "I buy a bottle of beer and slump on/onto the last stool."  A native English speaker told me that "slump" doesn't work here. That you can't slump on a bar/barstool.  Is this correct? If so, why?


I have an
 with a text-decoration of underline, I was able to make it the same width as text via display: table-cell like so: #login h1 {     color: #FFF;     border-bottom: 2px solid #15b6e5;     text-transform: uppercase;     font-weight: 700;     text-align: center;     display: table-cell; }  Now I am trying to center it, I tried adding a wrapper and add display: table, it centers it but the underline is not same width as the text: #login .heading-wrapper {     display: table;     width: 100%; }  Here is the HTML

Login

  What am I doing wrong?

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


Given the power series $f(x)=\sum_{n=1}^{\infty }\frac{x^n}{na^n},a>0$ find $f(a/2)$. Calculating the radius of convergence we see that $f$ converges in $(-a,a)$ and $a/2 \in (-a,a) $ so it exists. Any hints on calculating $\sum_{n=1}^{\infty }\frac{1}{2^nn}$ We can't use geometric series in this case because we have $n$ on the fraction right?

Just encountered a problem in my BC Calculus sequences and series unit that I just can't figure out.   I don't know the latex, but the problem was to find compute  $$ \sum_{n=1}^\infty \frac{1}{2^nn} $$ The handout was just on convergence, so it was easy to see that by ratio test, it does converge, but I think I'm missing some ideas to be able to calculate the sum.   We have done Taylor series, I just don't quite know how to go backwards, although my guess is that you find a way to write the partial sums and find it's value as the limit approaches infinity.  How would you go about solving this?  Thanks!


Let $f$ there be a real-valued differentiable function everywhere in the interval $]a,b[$.  Does $\frac{df}{dx}$ need to be continuous somewhere in the interval $]a,b[$? Or can a differentiable function $f$ exist so that $\frac{df}{dx}$ is continuous nowhere in the interval $]a,b[$?

There is a well-known result in elementary analysis due to Darboux which says if $f$ is a differentiable function then $f'$ satisfies the intermediate value property.  To my knowledge, not many "highly" discontinuous Darboux functions are known--the only one I am aware of being the Conway base 13 function--and few (none?) of these are derivatives of differentiable functions.  In fact they generally cannot be since an application of Baire's theorem gives that the set of continuity points of the derivative is dense $G_\delta$.  Is it known how sharp that last result is?  Are there known Darboux functions which are derivatives and are discontinuous on "large" sets in some appropriate sense?


If hash table is an array of linked-list elements and hash code is index of the element in the array then why hash table does not maintain the order of insertion ??

I'm looking for an explanation of how a hash table works - in plain English for a simpleton like me!   For example, I know it takes the key, calculates the hash (I am looking for an explanation how) and then performs some kind of modulo to work out where it lies in the array where the value is stored, but that's where my knowledge stops.  Could anyone clarify the process?  Edit: I'm not asking specifically about how hash codes are calculated, but a general overview of how a hash table works.


So below i have an issue that i cant wrap my head around as to why its not working. The first block of java code works exactly how i wanted it to (e.g. set salary amounts to whatever, and if its not in range give an error and repeat the initial question.)  My problem is this in the second block of code I assumed making a boolean again and emulating the above code to check whether or not my inputs were == "", and if not rinse and repeat like before but it doesnt? i wrote it out exactly the same (of course changing the values) but i simply cant get t to function.  If anyone can help or point me toward the right path id appreciate it :)           //First Block.....  boolean salaryState = false;          while (salaryState == false){              System.out.print("Salary: ");          salary = (input.nextDouble());                  if(salary >= 45000 && salary <= 49999) {    //if salary amount in this range                 this.coachCategory = "Junior";          //then set coaches category to this                 salaryState = true;          }             else if(salary >= 50000 && salary <= 59999) {   //if salary amount in this range                 this.coachCategory = "Youth";               //then set coaches category to this                 salaryState = true;          }             else if(salary >= 60000 && salary <= 70000) {   //if salary amount in this range                 this.coachCategory = "Senior";              //then set coaches category to this                 salaryState = true;           }             else {  //if invalid salary amount then print error                  if (salary <= 45000 && salary >= 70000);                     System.out.println("ERROR: Salary range needs to be within 45 000 - 70 000.");   //Second Block...           boolean isName = false;      while (isName == false) {          System.out.print("Name: ");      name = (input.nextLine());         if(name != "") {             this.name = name;             isName = true;         }         else {             if(name == "");                 System.out.println("ERROR: Please enter a name.");         }

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?


$$\int^{\infty}_{-\infty} \exp \{-\frac{1}{2} y^2\} \; dy$$  I tried letting $u = -\frac{1}{2} y^2$ then $dy = - \frac{1}{\color{red}y} du$... but theres still a $y$ term in $dy$?

How to prove  $$\int_{0}^{\infty} \mathrm{e}^{-x^2}\, dx = \frac{\sqrt \pi}{2}$$


I am already aware of the cp command.   Here's my goal:  I have a USB flash drive with some music on it, for example. Along with a full system backup, I keep some photos, music, etc. on a separate drive. Is there a command with which I can only copy files which are not already contained on the drive? (So I don't have to delete everything and/or copy all the new files manually)    E.g. I have a "file x" on my drive and computer, but only "file y" on my computer, which I want to copy to the drive; can I only copy file y to the drive without copying x too? (Obviously assuming there's more than 1 file)   Let me know if my wording is confusing, and I'll try and explain better.

I want to do one way synchronization.  I am having Folder A on my computer which is constantly updated with content. Another Folder B is used for backup purpose which is on external HDD.  Now what I expect is that whatever extra which is present in folder A should go to folder B. However something which is present in B and NOT in A ""shall NOT be copied to A"".  In a nutshell, the backup folder may copy everything from the source folder, however nothing should be copied form backup folder to the source.


I removed the BB (Shimano BB-93) from my Canondale Trail and found the drive side thread is stripped on BB and frame. See  and  What are the options for me to replace the BB? Is there an alternative Hollowtech II compatible part which will reach the good thread or other alternative? I'm aware there could be a machining/welding/tapping option, but would guess that would not be worthwhile on an ageing bike. Are there any alternative parts I could use?  mentions a Velo-orange option that clamps in place, but if possible I'd like to keep my recently replaced Hollowtech II crankset if possible I'm baffled by all the combinations, hoping someone has been down this path already and can suggest if there's a practical solution.

The bottom bracket of my bike was completely stripped to the point that when you push the left side crank arm, the right crank moves and you can see the bottom bracket lock move out the frame. The bike shop tried putting Teflon tape but it's temporary. It's a 26' xc hard tail. For all I know both sides of the bottom bracket(square tapered) are stripped clean hence the Teflon tape put by the previous owner. Can I fix the problem by changing into a hallow tech cranks because it works like a thread less bb, or should I just buy a thread less square tapered bb? Any suggestion on what to do?


Given a string, return true if the first instance of "x" in the string is immediately followed by another "x". It will not work for the case of doubleX("axxbb"). It should return true but gives false.  boolean doubleX(String str) {   for (int i = 0; i < str.length(); i++) {     if (str.substring(i) == "x") {       if ( str.substring(i) == str.substring(i + 1)){       return true;       }      }    }   return false; }


while I use the ccmake, I got the error message, which is   ccmake: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: Error 40   libssl.so.1.0.0 even exists in lib/x86_64-linux-gnu/ but it doesn't work.  I already tried to reinstall that with  sudo apt-get install libssl1.0.0:amd64   and  sudo apt-get install libssl1.0.0   The command was worked properly but I don't have an idea where the file was installed and whether it could fix the problem.

Im trying to use twoBitToFa, which is a small program released by the University of California Santa Cruz, that uncompresses large genome files and I get this error:  error while loading shared libraries: libssl.so.10: cannot open shared object file: No     such file or directory   I tried searching for what package provides it. I switched from Fedora which had yum provides but when looking for the Ubuntu equivalent, I came across apt-file search but when I tried that I got a command not found error.  How can I get this libssl file, and more generally, how can I search for what package provides a file so I can do this by myself in the future?


Has the USA started allowing tourists from the United Arab Emirates (Dubai)? I want to visit the USA in the beginning of November. I heard they are not allowing tourists only from certain countries in Europe/UK. But what about other parts of the world such as Dubai?

This community wiki explains the current restrictions by the United States of America on the entry of individuals who may pose a risk of transmission of the SARS-Cov2, the virus which causes the Covid-19 disease.


"I am not pretty sure about what to do" what does PRETTY exact meaning out here?   What places we can use it?

Today I saw an idiomatic road sign: "Pretty Muddy". I found this lack of strict English on a road sign unusual (on par with my "Dead Slow" official speed limit sign in Leeds, pic below), but as it turned out it's a charity race and the signs were merely directions.  This got me thinking however, how do words like "pretty" and "dead" as   end up in English? Taking "pretty" as an example, when did this first appear?     I wonder how fast you have to be going before they stop you. How would this hold up in court?


How do I make a .desktop file? I have tried making one our of another one, but it does not work. Can someone link me to a page on an entire guide to making one?

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.  How can I create such launchers now?


I'm having a hard time understanding where to use: $$\lim\limits_{x \to a} \frac{f(x)-f(a)}{x-a}\qquad\text{and}\qquad \lim\limits_{h \to 0} \frac{f(a+h)-f(a)}{h}$$ My textbook seems to use either one of these in similar exercises and from what I've tried they produce the same result. Any help?

I wanted to verify that for definition of the derivative it is true that:  $$ \lim_{x \to a}\frac{f(x)-f(a)}{x-a}= \lim_{h\to 0}\frac{f(a+h) -f(a)}{h}$$  If I denote $h=x-a$,  we can  let $x\to a$, this means that $h \to 0$. Also notice that $f(x)=f(a+h)$ $$ \lim_{x \to a}\frac{f(x)-f(a)}{x-a}=\lim_{h \to 0}\frac{f(a+h)-f(a)}{h}$$ As desired. Is the main idea here really just to use a variable substitution? I suppose there is some formal theorem I also use here that when $f(x) \to y$  we can let $g(f(x)) \to g(y)$ if the function $g$ is continuous.


hello people here is my ajax output...  $(function(){     //after ajax request     success:function(data){         $('#inbox').html('
'+data+'

')     } })   Div is creating successfully,so Iam very sure no issues with ajax code....but now i have to give click event to class .inbox_user ,,,its not working with no error message on console... click event for #inbox works fine.....  any idea to fix this??  i am trying in normal way $('.inbox_user').click(function(){})

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 making a really basic Login prompt GUI for revision for my Java exam next week (this exercise could possibly come up in the exam so that's why I'm trying to ace it first). Basically when you type in a certain name, in this case 'joe' it'll say verified, otherwise it'll say unverified. However, even when I type in joe it'll still say unverified. Can anyone see where I've gone wrong? Thanks.   package gui.eventHandler;  import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane;   import javax.swing.JPanel; import javax.swing.JTextField;  public class EventHandlerExample2_NameConfirmation {  private JFrame frame; private JPanel panel; private JButton button1; private JLabel label; private JTextField fname;  public EventHandlerExample2_NameConfirmation() {      frame = new JFrame("Log In");     panel = new JPanel();     label = new JLabel("First Name: ");     fname = new JTextField(20);      // Actions for when the OK button is clicked     // Implementing the ActionListener as an anonymous inner class     button1 = new JButton("Submit");     button1.addActionListener(new ActionListener() {         @Override         public void actionPerformed(ActionEvent e) {              String inputname = fname.getText();              if (inputname == "joe") {                 JOptionPane.showMessageDialog(null, "Verified user " + inputname);             } else {                 //selects this option regardless of entry                 JOptionPane.showMessageDialog(null, "Invalid user " + inputname);             }          }     });      panel.add(label); // add the label     panel.add(fname); // textField     panel.add(button1); // and button to the panel      frame.add(panel); // add panel onto the frame     frame.setVisible(true); // By default its invisible     frame.setSize(600, 70); // 600 width 70 height     frame.setLocation(350, 350); // roughly center screen     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // exit when closed  }  public static void main(String[] args) {     EventHandlerExample2_NameConfirmation app = new EventHandlerExample2_NameConfirmation(); }  }

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 phones internal memory is full, how do i move it to my secure digital card? How can i get  my files  off my secure digital card if i took it out wrong, I did a factory reset?

If you're not used to seeing the 'low on internal storage' notification, what is it that you're doing to keep your phone's internal memory from filling up so quickly?   The 'SD Card and Phone Storage' menu in the settings doesn't really tell me much other than how much is free. And, I don't really have that many applications installed. The top 5 storage hogging apps on my phone are Gmail (18.6 MB), Twitter (17.5 MB), Facebook (12.55 MB), Maps (9.63 MB), and Swype (6.06 MB).  So, are there apps out there (besides your normal file manager ones, like Astro) that will help monitor internal phone storage? Is there something I should be doing to keep my phone storage use to a minimum?


This is so simple to describe, but being new to GIT I haven't been able to find a gif-filter-repo solution.  I have a repository 'old' with two directories 'part1' and 'part2'.  I want to create two new repositories, 'new1' which will contain everything from 'part1' directory (except the part1 directory itself) and 'new2' which will contain everything from 'part2'.  Can someone show me how to accomplish this? I have: old   .gif   /part1     /A     /B   /part2     /C     /D  and I want to extract the subdirectories and build new repositories: new1   .gif   /A   /B  new2   .gif   /C   /D

I have a  repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository.  How can I do this while keeping the history of the files within the subdirectory?  I guess I could make a clone and remove the unwanted parts of each clone, but I suppose this would give me the complete tree when checking out an older revision etc. This might be acceptable, but I would prefer to be able to pretend that the two repositories doesn't have a shared history.  Just to make it clear, I have the following structure:  XYZ/     .git/     XY1/     ABC/     XY2/   But I would like this instead:  XYZ/     .git/     XY1/     XY2/ ABC/     .git/     ABC/


Find $$\lim_{x\to 0} \frac{(1+x)^{1/x} - e}{x}$$.  I tried applying L'Hopital's rule but had difficulty with deriving $(1+x)^{1/x}$, and it seemed to me that there is probably a more elegant solution than the horrible derivative WolframAlpha gave (which was also not useful, as the derivative contained $\frac{1}{x}$ as an exponent). Any help would be appreciated.

Find the following limit: $$\lim_{x\to 0}\frac{(1+x)^{1/x}-e}{x} \tag{1}$$  The following is my approach, although is full of incorrect assumptions (statements etc).  $$f(x)= \lim_{h\to 0}(1+x+h)^{1/(x+h)}\\$$  From here we can say $f(0) = e$.  $$\ln(f(x)) = \lim_{h\to 0}\frac{1}{x+h}\ln(1+x+h)$$  Near $x=0$, we can use the series of logarithm: $$\ln(f(x)) = \lim_{h\to 0}\frac{1}{x+h}\left(x+h-\frac{(x+h)^2}{2}...\right)$$  Differentiating we get:  $$\frac{f'(x)}{f(x)} = \lim_{h\to 0}-\frac{1}{2} +\frac{x+h}{3}  ... \tag{2}$$  Now we note that $(1)$ is actually $f'(0)$ (?) and so from $(2)$ we get:  $$f'(0) =\frac{-1}{2} f(0) = \frac{-e}{2}$$  While the answer is seemingly correct, the method is absolutely not. It looks like this is fluke than anything else.  I also tried computing taylor series of $(1+x)^{1/x}$ near $x=0$ but couldn't do it.


A proton and an antiproton annihilate at rest (or in a $p\bar{p}$ atom in an S state) into pions.  Show that the decay into a $\pi^+\pi^-$ final state is possible from a $^3S_1$ state, but not from a $^1S_0$ state. (Here we use the spectroscopic notation $^{2S+1}L_J$.) Consider C, P, and CP, where C is the charge conjugation operator, and P is the parity operator.  I deduced that $P_{\pi^+\pi^-}=1$ and $C_{\pi^+\pi^-}=1$, and that $P_{p\bar{p}}=-1$, $C_{p\bar{p}}=-1$ for $S=1$ and $C_{p\bar{p}}=1$ for $S=0$.  It does not seem like the proposal given in the problem is true, given what I found, so I am not sure where I have gone wrong and how to proceed.  Note: I asked this question already, but cannot edit it. I have made a better attempt.

I'm having a difficult time with this particular problem. I'm really hoping for some guidance.  A proton and an antiproton annihilate at rest (or in a $p\bar{p}$ atom in an $S$ state) into pions.  (a) Show that a $\pi^0\pi^0$ state cannot be produced by strong interactions.  I know that a way to do this is to show that the interaction is not symmetric under parity, but am not sure how to go about doing that.  (b) Show that the decay into a $\pi^+\pi^-$ final state is possible from a $^3S_1$ state, but not from a $^1S_0$ state. (Here we use the spectroscopic notation $^{2S+1}L_J$.) Consider $C$, $P$, and $CP$, where $C$ is the charge conjugation operator, and $P$ is the parity operator.  I don't even know what "spectroscopic notation" is.


I'd like know how to write max/min over condition in inline math mode (i.e. $...$). So far I found only the way to write it in the  (i.e. begin{equation}.....end{equation}) and in the  (i.e. \[....\]).

I would like to put some text in math mode below a mathematical operator (or a symbol), similar to \substack in \sum, as the red text below the \max operator in the following image  How to do this?


I've been recently reading a book on Java design patterns and have come across classes inheriting from other classes and being instantiated by putting  Superclass s = new Subclass()   as opposed to  Subclass s = new Subclass()   My initial thoughts were that it's more from a design point of view and due to abstraction or information hiding. However, I'm still unsure and haven't been able to find a clear explanation.   Why would someone instantiate by using Superclass s = new Subclass(), and is it ever acceptable to use Subclass s = new Subclass()?  I'd greatly appreciate any help from someone who can help shed some light on this for me.

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


Does anyone have proof that $\lim_{n\to \infty }\left(1+\frac{z}{n}\right)^n=e^x(\cos y+i\sin y)$ because the proof I have is unclear and/or incorrect.  $$z=x+iy \in \mathbb C$$  For a large enough $n$: $\left|\arg\left(1+\frac{1}{n}\right)\right|<\frac{\pi}{2}$ (Why/how?) Lets look at the real sequences $z_n=\left(1+\frac{z}{n}\right)^n,|z_n| \text{ and } \arg z_n.$  It is proven that $\lim_{n\to \infty }|1+\frac{z}{n}|^n=e^x$  then it says, which makes no sense to me from here on(I'll highlight what lines are unclear):   $$\arg (z_n)=\arg\left(\left(1+\frac{z}{n}\right)^n\right)=$$      $$n\arctan\left(\frac{y}{x+n}\right) \text{ then it's just some blank space and }  \mod2\pi \to y \text{ and again some blank space} \mod 2\pi \text{  when } n\to \infty, \text{therefore }\lim_{n\to \infty  }\left(1+\frac{z}{n}\right)^n=e^x(\cos y+i\sin y) $$

We are dealing with $z \in \mathbb{C}$. I know that $$ \left(1+ \frac{z}{n} \right)^n \to e^{z} $$ as $n \to \infty$. So intuitively if $z_n \to z$ then we should have $$ \left(1+ \frac{z_n}{n} \right)^n \to e^{z}. $$ If $z_n \in \mathbb{R}$ I would be happy writing $$ \exp \left(n \log\left(1+ \frac{z_n}{n} \right) \right) = \exp \left(z_n \frac{\log\left(1+ \frac{z_n}{n} \right)-\log(1+0)}{\frac{z_n}{n}-0} \right) \to \exp(z \cdot 1) $$ where here we are using the definition of derivative. But if $z \in \mathbb{C}$ the logarithm is multivalued and I'm not sure that the same calculation is allowed. Is there a different way to show this for complex $z$?


I have lost my Hong Kong landing slip. What will happen when I exit Hong Kong? Can I get a visa for mainland China without the landing slip? Can the Hong Kong landing slip be replaced?

I'm currently in Mainland China and in one week plan to leave for Hong Kong to depart to Canada. I just noticed that I cannot find my landing slip and possibly lost it.  Is there anything I can do? I cannot leave HK without presenting the landing slip, can I?


I installed a new version of Force.com IDE to (Eclipse Kepler for Java Developers) and switched to Force.com perspective. I do not see "run tests" as an option anymore.  I tried  and it broke my Eclipse. Please let me know how I can fix this so I can run tests on my test classes in Eclipse. I know I can run tests in developer console as well but I want to have the option here as well.

Force.com IDE 35.0.0.201510211056 and Force.com IDE Debugger 35.0.0.201510211056 in eclipse but it doesn't show this option to run test class, is their any way i can see it because it show the Apex_Test_Result panel but running a test class option is missing. plz help


After reading the documentation to implement the Dropbox library in my project, I want the user, when confirming the authorization through the browser, his Access Token is passed directly to the app, without the user making copy/paste of the code. The documentation is unclear on how to use HttpServletRequest and HttpSession and therefore I get this error.  public class DropboxGenerateToken {  public static DbxAuthFinish authFinish; public static DbxAppInfo appInfo; public static DbxAuthInfo authInfo; public static DbxRequestConfig config; public static String ACCESS_TOKEN = "";    public static void main(String args[]) throws DbxException, FileNotFoundException, IOException {      String accessToken = "";     String userLocale = null;      // Select a spot in the session for DbxWebAuth to store the CSRF token.     HttpServletRequest request = null;     HttpSession session = request.getSession(true);      String sessionKey = "dropbox-auth-csrf-token";     DbxSessionStore csrfTokenStore = new DbxStandardSessionStore(session, sessionKey);     String redirectUri = "http://my-server.com/dropbox-auth-finish";       DbxRequestConfig requestConfig = new DbxRequestConfig("text-edit/0.1", userLocale);     DbxAppInfo appInfo = new DbxAppInfo("mycode", "mycode");     DbxWebAuth auth = new DbxWebAuth(requestConfig, appInfo);       // Build an auth request     DbxWebAuth.Request authRequest = DbxWebAuth.newRequestBuilder()             .withRedirectUri(redirectUri, csrfTokenStore)             .build();      String authorizeUrl = auth.authorize(authRequest);      System.out.println("1. Go to " + authorizeUrl);     System.out.println("2. Click \"Allow\" (you might have to log in first).");     System.out.println("3. Copy the authorization code.");      try {         URL authenticationURL = new URL(authorizeUrl);         Desktop.getDesktop().browse(authenticationURL.toURI());      } catch (Exception e) {         // TODO Auto-generated catch block     }     String code = JOptionPane.showInputDialog(DropboxGenerateToken.class, "Inserta el codigo de verificación.");     System.out.println(code);     code = code.trim();      try {         DbxAuthFinish authFinish = auth.finishFromCode(code);          accessToken = authFinish.getAccessToken();      } catch (Exception e) {      } }}   this is the error  Exception in thread "main" java.lang.NullPointerException at login.DropboxGenerateToken.main(DropboxGenerateToken.java:61)   this line:HttpSession session = request.getSession(true);

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?


Unlike  I'm searching for reason why query works fine when load is low and does not work on heavy load. I would like to know if three is a way to solve it in my domain code or in eclipselink.  In eclipselink 2.5.2 under heavy load (while running tests) sometimes I'm receiving NullPointerException. I'm not able to reproduce it manually. Application runs on Linux platform with jdk-1.7.0-111_H03-linux_x64.  The stacktrace is:  Caused by: java.lang.NullPointerException at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:904) at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:851) at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:734) at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:688) at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:795) at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:890) at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:509) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1215) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258) at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469)   The query is simple select:  SELECT location FROM LocationEntity location " +         "WHERE  location.locationId IN :locationIds " +         "AND    :validityDate BETWEEN location.effectiveFrom AND   location.effectiveTo   from dao class annotated with:  @Stateless(name = "LocationDao") @TransactionAttribute(TransactionAttributeType.SUPPORTS)   The entity is annotated with:  @Entity @Table(name = "LOCATION") @Cache(coordinationType = CacheCoordinationType.NONE) @ReadOnly   It looks like bug in eclipselink. Similar bug is registered under , but stacktrace is different, so in my opinion it is not the same problem.


This is a very naive question. Every manifold (assumed to be paracompact) is a CW-complex?  Thanks.

What is the strongest known theorem (if any) that classify which manifolds can be built as CW complexes? Thank you guys. This is just  a question I thought of during class, obviously not homework...


k is the modulus of the vector k. Please help me to integrate the above tensor expression in the infinite domain of the vector k. I have tried to let u in the direction of kz and then transform the current integral into a spherical coordinate with the following relation:    And I find Q is a symmetric tensor, and Qxy=0,Qxz=0,Qyz=0. However,Qxx=Qyy≠0,Qzz≠0,and Qxx≠Qzz. I guess Q has relevance to the tensor uu, the assumption that u is in the direction of kz is just a simple case.How to conduct this integral in the general case is my question.Thank you very much.

$$Q=\int_{\text{all space}} \frac{\hbar \nu_g \mathbf{k}\mathbf{k}}{\exp[(\hbar \nu_g |\mathbf{k}|-\mathbf{k}\cdot\mathbf{u})/k_B T]-1}d\mathbf{k} $$   Please help me to integrate the above tensor expression in the infinite domain of the vector $k$.  I have tried to let $u$ in the direction of $k_z$ and then transform the current integral into a spherical coordinate with the following relation:  $$ k_x = k \sin \varphi \cos \theta $$ $$ k_y = k \sin \varphi \sin \theta $$ $$ k_z = k \cos \varphi $$  And I find $Q$ is a symmetric tensor, and $Q_{xy}=0,Q_{xz}=0,Q_{yz}=0$. However,$Q_{xx}=Q_{yy}\neq 0,Q_{zz}\neq 0$,and $Q_{xx}\neq Q_{zz}$. I guess $Q$ has relevance to the tensor $uu'$, the assumption that $u$ is in the direction of $k_z$ is just a simple case.


I got an idea for Quadratic Sieve improvement, but I don't know if someone already tried it or how efficient it is. Please tell me if it can work. Let $N$ be the number we wish to factor. We can look at the congruence of squares $x^2 \equiv y^2\pmod{N^2}$, if we can find such $x,y$ we can compute the gcd of $x+y$ and $N$ to find a nontrivial factor of $N$(if it's trivial we just need to find more $x,y$ pairs) $y$ can be stated as $x^2-N^2 = y^2$ -> $(x-N)(x+N) = y^2$ We can then find a pair of $a,c$ such that $x+N=ac$ and $a,c \approx \sqrt{N}$, let's call the $x$ that satisfy this $x`$, then for each $x$ in $f(i)=ia+x`$ we can write $y$ as $(ia + x`-N)(x`+ia +N) = y^2$ -> $a(ia + x`-N)(c+i) = y^2$ Finally, we can start searching for $x,y$ pairs that satisfy $x^2 \equiv y^2\pmod{N^2}$ in $$f(i)=a(ia + x`-N)(c+i)$$ When $f(i)$ is a square then $gcd(\sqrt{f(i)} + ia+x`,N)$ has a high chance if being a non trivial divisor of $N$ If we start running on $f(i)$ from $i\approx \frac{N-x}{a}$ then $ia+x`-N\approx{\sqrt{N}}$ and also $c+i\approx{\sqrt{N}}$. We can use the same technics as we use in QS . Leveregix Dixon's factorization method together with sieving and loggaritmic approximation for faster sieve. The only difference is that we are building two squares instead of one, we are looking for $(ia + x`-N)$ to be a square and also $(c+i)$ to be a square, as they cannot have any commonly dividing values, except $2$ and the factors of $N$. Proof: If a prime $p$ divides $(x-N)$, $(x+N)$ then it must divides $(x-N + 2N)$ since it equals to $(x+N)$. And so it must divide $2N$, that can only happen if $p=2$ or $p$ is a factor of $N$ My theory is that the sieving should be much easier since we are not dealing with squares like in the classing QS where we are searching for $f(x)=x^2-N$ to be a square or SIQS where we are searching for $f(x)=a(ax^2-bx+c)$ to be a square. However from the other side, we need to make two numbers to be a square, so I am not so sure it's indeed easier and hence asking the question here.

Quadratic sieve is an improvement for the , it is searching for b-smooth values on the polynomial $ax^2-bx+c$ (See the ) where $ax^2-bx+c$ is of the size of $N^\frac{1}{2}$. I got an idea of how to reduce this size to $N^\frac{1}{3}$. By doing this I hope to dramatically improve QS running time. Let $N$ be the number we wish to factor.  Let $F(x)=x^2−N^2=(x+N)(x−N)$ Let $H(x) = F(f^2db−N+f^2dx)$ where $b,d,f$ are positive integeres  $$H(x)=(f^2db−N+f^2dx+N)(f^2db−N+f^2dx−N)=f^2d(b+x)(f^2db+f^2dx−2N)$$  Let $f^2db−2N=−c^2$ Let $Q(x)=H(dx^2)$  $$Q(x)=f^2d(b+dx^2)(f^2db+(fdx)^2−2N)=f^2d(b+dx^2)((fdx)^2−c^2)=f^2d(b+dx^2)(fdx−c)(fdx+c)$$ If we manage to set up the system such that $b,fd \approx N^\frac{1}{3}$(it implies that $d=1$), then we will be working on 3 polynomial of the size of $N^\frac{1}{3}$. We can use the same sieving and congruence of square technics as we used in QS, with one additional requirement that all of the three polynomials need to smooth in order for some $Q(x)$ to be smooth. This idea raises two questions:  How to pick $b,c,d,f$? How much harder is it to sieve on three polynomials compare to one?  While I still need help with 2, I found an answer for 1.  Pick a prime $p$ in quadratic residue mod $2N$ with a size about $N^\frac{1}{6}$, Find what is the smallest $c$ in $f`(c)=f^2db=N-c^2$ that is going to be divisible by this prime. It can be efficiently computed using Tonelli's 1891 note. Then you got a $c$ of the size of $N^\frac{1}{3}$ and $f$ of the size of $N^\frac{1}{6}$ and $db$ of the size of $N^\frac{3}{6}$, with some luck and repeating this process multiple times, it's possible to extract a square out of $db$ such that $f$ becomes $N^\frac{1}{3}$  I tested this idea with a random 300 bits numbers,  is far from being optimized, but after running for an hour I was able to generate $f$ of $73$ bits. This already allows making a sub-quadratic setup with b 116 bits, $f$ 73 bits, and $d$ 40 bits.  - N 1656661855224614241967626091052145902421605836026342398847614444684800200797305356470390167  - c 570181232531678014712574953020  - f 6934515693275786467781  - db 68901963423007279523881523815951134611979711694  Please tell me what do you think about this idea and help me solving 2.


I am trying to figure out the best way to publish my elderly father's life work. He says he would be considered a "fringe" scientist or an independent researcher. Should we self-publish? The subject matter would be of great interest to those interested in earth-moon systems, and the Egyptian Pyramids. How should we proceed?

My father wrote some papers on cosmology that remained unpublished at the time of his death.  I have been looking for a publisher for them. I contacted IOP publishing but they said that, while Dad’s writings were interesting, they were not ready for publishing in any of their journals. For example, they need a reference list citing other current published research on the same topic.  I am not a scientist and have no idea how to do this. Where can I get help with this? Would something like  be a good idea?


I need to load pins to a map (Google Maps Android API v2) as the user changes its location, but I wanted to load them "smoothly" instead of having to wait for the entire result set being downloaded to add all pins at once.  Is there any web service or a different technology that allows me to read data (like JSON) from the server as a stream and asynchronously add pins to the map?  Thanks.


I'm usually at Arena 4, then I got higher to 5. I got the wizard and the zap. However I dropped back to 4.  I wanted to get more 'Zap's which is in Arena 5 but its not possible in chests as Im in a lower arena. Is it possible to get them (Zap) in the shop on a lower arena (Arena 4).

Will cards from a higher arena than you appear in the card shop, or will only cards from the arena you are in (or below) when it refreshes be available to purchase?


Prove that $$\sum_{k=0}^r {m \choose k} {n \choose r-k} = {m+n \choose r}.$$  This problem is in the chapter about discrete random variables, but I have no idea what to go about substituting.  I can't get it to be a featured formula without screwing stuff up, sorry about that.

How can we prove that     $$\sum_{k=0}^{n}\binom{R}{k}\binom{M}{n-k}=\binom{R+M}{n}?$$   (Presumptive) Source: Theoretical Exercise 8, Ch 1, A First Course in Probability, 8th ed by Sheldon Ross.


Some standard object does not support trigger. So when I start writing trigger and then it gives error. Is there any proper way/ documentation which I can refer to decide whether any salesforce standard object supports trigger or not?  I know we can rely on Developer Console where before writing trigger we need to select salesforce object, but I am looking for some kind of documentation which clearly gives idea about whether trigger can be written or not.

When architecting a solution, I often find myself wanting to know which (of the less-used) standard objects support triggers.    Does anyone know of a single compiled list of standard objects that are not triggerable, for quick reference?  The emphasis here is on quick reference.


Duplicate question. I found some answers but no one works.  I want to send email using Php Mailer or wp_mail with attachment PDF file in WordPress. In both techniques PHP Mailer or wp_mail, Email goes with attachment but every time in spam.  Code using PHP Mailer 1  $mail->From = "from email"; $mail->FromName = "name"; $mail->AddAddress("to email"); //$mail->AddReplyTo( 'from email', 'name' ); //Line add or not doesn't effect. $mail->AddAttachment("filename.pdf");     $mail->Subject = "Email Subject";                   $mail->Body = "Email Body"; if(!$mail->Send()) {    echo "Message could not be sent. <p>";    echo "Mailer Error: " . $mail->ErrorInfo; } else {    echo "Message sent"; }   Code using PHP Mailer2  $mail->isSMTP();                                       $mail->Host = 'smtp.gmail.com';   $mail->SMTPAuth = true;                              $mail->Username = 'email user name';                  $mail->Password = 'password';                                           $mail->Port = 587; //587 or 25   $mail->From = "from email"; $mail->FromName = "name"; $mail->AddAddress("to email"); //$mail->AddReplyTo( 'from email', 'name' ); //Line add or not doesn't effect. $mail->AddAttachment("filename.pdf");     $mail->Subject = "Email Subject";                   $mail->Body = "Email Body"; if(!$mail->Send()) {    echo "Message could not be sent. <p>";    echo "Mailer Error: " . $mail->ErrorInfo; } else {    echo "Message sent"; }   Code using wp_mail  global $wpdb; $to = 'to email';  $from = 'from email';  $name = 'name'; $headers = 'From: name <from email>' . "\r\n";  $subject = 'SUBJECT';  $msg = 'CONTENT';  $mail_attachment = array('filename.pdf');    wp_mail($to, $subject, $msg, $headers, $mail_attachment);

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


Say I have an improper multivariate normal distribution with singular precision matrix $Q$. I can compute the pseudo-inverse of $Q$ and use this as a covariance matrix, i.e. $\Sigma = Q ^{+}$. I seem to be able to sample from this distribution using the standard approach of transforming a sample from a standard normal using some decomposition of $\Sigma$. But what am I actually sampling from here?  Since this is improper there must be some effective constraint on the kernel of $Q$.  What is that constraint? Is it any consequence of taking a pseudo-inverse or is it just the usual limits of what my computer can actually sample from as an approximation of something improper? More generally, how can I think about using a pseudo-inverse parameterisation beyond just thinking to myself, "the inverse doesn't exist so I use the pseudo-inverse instead"?  This is basically what I do when I use a pseudo-inverse.

Let random vector $x = (x_1,...,x_n)$ follow multivariate normal distribution with mean $m$ and covariance matrix $S$. If $S$ is symmetric and positive definite (which is the usual case) then one can generate random samples from $x$ by first sampling indepently $r_1,...,r_n$ from standard normal and then using formula $m + Lr$, where $L$ is the Cholesky lower factor so that $S=LL^T$ and $r = (r_1,...,r_n)^T$.  What about if one wants samples from singular Gaussian i.e. $S$ is still symmetric but not more positive definite (only positive semi-definite). We can assume also that the variances (diagonal elements of $S$) are strictly positive. Then some elements of $x$ must have linear relationship and the distribution actually lies in lower dimensional space with dimension $<n$, right?  It is obvious that if e.g. $n=2, m = \begin{bmatrix} 0 \\ 0 \end{bmatrix}, S = \begin{bmatrix} 1 & 1 \\ 1 & 1\end{bmatrix}$ then one can generate $x_1 \sim N(0,1)$ and set $x_2=x_1$ since they are fully correlated. However, is there any good methods for generating samples for general case $n>2$? I guess one needs first to be able identify the lower dimensional subspace, then move to that space where one will have valid covariance matrix, then sample from it and finally deduce the values for the linearly dependent variables from this lower-dimensional sample. But what is the best way to that in practice? Can someone point me to books or articles that deal with the topic; I could not find one.


Our group had some confusion about preparing spells for a Wizard and Cleric. The rules say that you prepare a number of spells from your list and that you tick off spell slots when you cast a spell. In D&D 3.x, if you wanted to cast a spell multiple times you had to prepare it multiple times, but we couldn't figure out from the rules whether or not this was the case in D&D 5e.   So can a spell be prepared once and then cast multiple times?

In 3.X wizards had spellbooks, while clerics had their entire spell list, but they both memorized/prepared spells every day from those lists, and had a certain number of slots for preparing spells in.  Now in 5e preparing spells and spell slots aren't the same thing. What's going on here? How does their spellcasting work now?


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

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


I'm writing a set of pure virtual classes that act as interfaces. The idea is that the code implementing such interfaces could be built with a different build configuration, compiler, or even a different STL implementation to code making use of such an object via such an interface.  Plain old data like uint32_t is standardised as is double and float. (bool is not since the standard does not state its size.)  Which category does std::size_t come in? Is it purely a function of the machine architecture? For example, on a 32 bit machine, could it ever be such that sizeof(std::size_t) is not 4?

I notice that modern C and C++ code seems to use size_t instead of int/unsigned int pretty much everywhere - from parameters for C string functions to the STL.  I am curious as to the reason for this and the benefits it brings.


13 equal charges, q , are placed at the corners of a 13 sided regular polygon. What is the force on a test charge Q at the centre?   I couldn't figure out from where to start solving it. It would be very messy to do vector addition of 13 forces. So I think, there must be some trick behind it? Can you please help me?

Assume a test charge with charge $Q$ is placed at the center of a 13-sided regular polygon, the vertices of which are charges with equal charge $q$. What is the electrical force on the center charge?  To start we write this as our electrical force... $$ \vec{F}_{Q} = \sum^{13}_{n} \frac{1}{4\pi\varepsilon_{0}}\frac{qQ}{R^{2}} \left(cos\left(\frac{2n\pi}{13}\right)\hat{i} , sin\left(\frac{2n\pi}{13}\right)\hat{j}\right)  $$   and with some simplification we get... $$ \vec{F}_{Q} = \frac{1}{4\pi\varepsilon_{0}}\frac{qQ}{R^{2}} \left\{1-2cos\left(\frac{\pi}{13}\right) + 2cos\left(\frac{2\pi}{13}\right)-2cos\left(\frac{3\pi}{13}\right) + 2sin\left(\frac{\pi}{26}\right)-2sin\left(\frac{3\pi}{26}\right)+2sin\left(\frac{5\pi}{26}\right), 0\right\}$$ ...more simplification... $$ \vec{F}_{Q} = \frac{1}{4\pi\varepsilon_{0}}\frac{qQ}{R^{2}}  \left\{ 1.11022\times10^{-16}, 0 \right\} $$ Now we have an electrical force on the test charge, however, in a ring of equidistant charges such as the one mentioned above, shouldn't the $\hat{i}$ component be equal to zero? Does anyone have any ideas as to why I'm getting a non-zero number for my $\hat{i}$ component?


So after I got to the point in Omega Ruby where I had to catch primal groudon, I simply couldn't and after trying to catch it for about two hours, I gave up and let it black me out, so I could train more. When I went back to the cave of origin to catch it, it would not give me the cutscene where I ride on it's back and go to the other room to catch it. Is there anyway to fix this other than starting a new file?

My brother failed to save before battling the legendary (Groudon), and saved afterwards when his team had been wiped out by Groudon. Upon returning to the Cave of Origin, to the same spot that Groudon first spawned, he is not there. What can be done to make him respawn so he can be battled again, in order to advance in the story?


I have string type value like "e2ddfa02610e48e983824b23ac955632". I need to add - in this code means convert in Guid.  EntityKey = "e2ddfa02610e48e983824b23ac955632"; Id = (Guid)paymentRecord.EntityKey;

I want to try to convert a string to a Guid, but I don't want to rely on catching exceptions (   for performance reasons - exceptions are expensive for usability reasons - the debugger pops up  for design reasons - the expected is not exceptional   In other words the code:  public static Boolean TryStrToGuid(String s, out Guid value) {     try     {         value = new Guid(s);         return true;     }     catch (FormatException)     {         value = Guid.Empty;         return false;     } }   is not suitable.  I would try using RegEx, but since the guid can be parenthesis wrapped, brace wrapped, none wrapped, makes it hard.   Additionally, I thought certain Guid values are invalid(?)    Update 1   had a good idea to catch only FormatException, rather than all. Changed the question's code sample to include suggestion.    Update 2  Why worry about thrown exceptions? Am I really expecting invalid GUIDs all that often?   The answer is yes. That is why I am using TryStrToGuid - I am expecting bad data.  Example 1 . I might be parsing folder names, checking to see if the text after the final . is a GUID.  c:\Program Files c:\Program Files.old c:\Users c:\Users.old c:\UserManager.{CE7F5AA5-6832-43FE-BAE1-80D14CD8F666} c:\Windows c:\Windows.old   Example 2 I might be running a heavily used web-server wants to check the validity of some posted back data. I don't want invalid data tying up resources 2-3 orders of magnitude higher than it needs to be.  Example 3 I might be parsing a search expression entered by a user.     If they enter GUID's I want to process them specially (such as specifically searching for that object, or highlight and format that specific search term in the response text.)    Update 3 - Performance benchmarks  Test converting 10,000 good Guids, and 10,000 bad Guids.  Catch FormatException:    10,000 good:     63,668 ticks    10,000 bad:   6,435,609 ticks  Regex Pre-Screen with try-catch:    10,000 good:    637,633 ticks    10,000 bad:     717,894 ticks  COM Interop CLSIDFromString    10,000 good:    126,120 ticks    10,000 bad:      23,134 ticks   p.s. I shouldn't have to justify a question.


My area of interest is not so well-researched in the US, but it attracts more interest in some developing countries where the topic is more relevant, but also where academic standards tend to be different, and I must proceed with much more caution.  In EBSCO, recently my searches have turned up a number of articles published in journals abroad that either: (1) contain no in-text citations, but present entries in the reference list related to material discussed earlier in the paper or (2) contain no citations at all and no reference list at the end.  Is the lack of citations in an article sufficient criteria for casting aside a paper, even if I think some of the ideas relate to a paper I am writing?

I (an undergrad) and 2 other profs from my department have been working on something and we were thinking of submitting our work to a conference (a pretty well known one) this week. The fact is there is no related work that has been done on the problem we are solving and therefore there is no paper which we can cite as a starting point for our work. The only existing things that we make use of are trivial definitions from mathematics (like Riemann Integral) and also definitions that are pretty well known in my area (CS). So again, we do not think there is a need to cite any particular papers for that.   Now my question as stated was - is it acceptable to have a paper with no references? Or do you think we should just mention some papers (we never had to use them) where those definitions were actually proposed?  PS: I'm sure some of you might suggest me to ask those profs. But quite frankly none of them have much experience as far as publishing papers is concerned. So it would be great if some one could give me a good advice and help me out.   Edit: Thanks everyone for the answers. Of course somewhere a little sarcastic and ridiculing, but I can understand since this is a little weird. Actually yes, I had the notion that a paper wasn't worth citing unless I use some results from it (say an algo or some theorem). But I guess that isn't the only reason why I should be referencing as many seem to suggest here. The fact is we had seen quite a few survey papers before we started this out and I was under the impression that there wasn't a need to cite them since anyone could find them. But now, things are bit more clear and I guess I should cite them and I will :)


Inspired by  to "" I want to know in universe why the Rebel Alliance fighter names are based on Latin alphabet characters, and not, for example Aurebesh (one of the more common in-universe alphabets).  From the Wikipedia :    For example, why isn't the Y-wing actually called a 'Vev-wing', an A-wing  a 'Xesh-wing', etc. in universe?

I was reading about , the standard language in Star-Wars. This lead me to the article about , the alphabet that is used to write it, and that is used all over the Star-Wars franchise.    I noticed that there is no X shaped letter in this alphabet. This seems to cause a problem for the name of the , which got its name from the "X"-shape of it's four wings.   The out of universe reason behind that is obvious, but is there a in universe explanation for the name of the X-Wing, and the others [letter]-Wing starfighter, which take in to consideration the Aurebesh alphabet?


Let $X = X_{1} + X_{2}$ be a random variable where $X_{1}$ is the result of rolling a first die and the $X_{2}$ of rolling a second die. The possible outcomes are         1  2  3  4  5  6    1    2  3  4  5  6  7   2    3  4  5  6  7  8     3    4  5  6  7  8  9   4    5  6  7  8  9 10   5    6  7  8  9 10 11   6    7  8  9 10 11 12   It is easy to see that there are $11$ different possible outcomes: $2, 3, 4, \dots, 12$.  I would like to calculate the probability mass function of $X$. From the table, I can see that $$n(2) = 1, n(3) = 2, n(4) = 3, n(5) = 4, n(6) = 5, \\ n(7) = 6, n(8) = 5, n(9) = 4, n(10) = 3, n(11) = 2, n(12) = 1$$   where $n(x)$ is the number of occurrences of a particular outcome.  Since there are $11$ different outcomes, I would intuitively think that the pmf is $p(x) = n(x) / 11$. For example, $p(2) = 1/11$ since there is $11$ possible outcomes and only one way of having $2$ occurring.  However, $$\frac{1+2+3+4+5+6+5+4+3+2+1}{11} = \frac{36}{11}$$  so my logic is wrong since it should come as $1$.  What is the correct way of thinking about this? (I can see what the answer is but not how to get there.)

I want to calculate the probability distribution for the total of a combination of dice.   I remember that the probability of is the number of combinations that total that number over the total number of combinations (assuming the dice have a uniform distribution).   What are the formulas for   The number of combinations total The number of combinations that total a certain number


How to make a command (without testing) that contains a foreach loop that may count from 1 to 1 if necessary ?  \documentclass{minimal} \usepackage{tikz}  \newcommand{\boucle}[1]{%     \foreach \x in {1,2,...,#1} {\x }      }  \begin{document}  From 1 to 5 : \boucle{5}  From 1 to 2 : \boucle{2}  From 1 to 1 : \boucle{1}  \end{document}

See the following MWE to understand what I mean better.  \documentclass[preview,border=12pt]{standalone} \usepackage{pgffor,multido} \begin{document} \section*{foreach} \foreach \ix in {0,1,...,3}{%     \foreach \iy in {0,1,...,\ix}{(\ix,\iy)\ }\endgraf}  \section*{multido} \multido{\ix=0+1}{4}{%     \multido{\iy=0+1}{\the\numexpr\ix+1\relax}{(\ix,\iy)\ }\endgraf} \end{document}     Why cannot \foreach \x in {0,1,...,0}{} discharge the second iteration?


I would like to address this as a non-duplicate because I could not find any answers on google. There are similar questions but the answers are not what I wished for.  Below is what I believe is important for the animations  here is whats inside my player class:  ... ... Animation ani; Animation ani2;  public Player(double x, double y, Texture tex, StarDestroyerAlpha game, Controller c) {      super (x,y);      this.tex = tex;     this.game = game;     this.c = c;      ani = new Animation(3, game.getSpriteSheet(), game.getSpriteSheet1(), game.getSpriteSheet2(), game.getSpriteSheet3(), game.getSpriteSheet4(), game.getSpriteSheet5());     ani2 = new Animation(3, game.getSpriteSheet21(), game.getSpriteSheet22(), game.getSpriteSheet23(), game.getSpriteSheet24(), game.getSpriteSheet25(), game.getSpriteSheet26());  }  }  public void tick() { //movement of player     x += velX;     y += velY;      if (x<=0)          x = 0;      if (x>= 1280 - 70) //there will be space because of the sprite size         x = 1280 - 70;     if (y<=0)          y = 0;     if (y>= 800 - 85) {         y = 800 - 85;     }      ani.runAnimation(); }   here in my mouse event class:      ...     ...     Player p;     ...  public MouseInput(StarDestroyerAlpha game, ShipSelection ship, Texture tex, Player p) {     this.game = game;     this.ship = ship;     this.tex = tex;     this.p = p;  }     ...     ...     ...     if(my >300 && my < 500 && shipRotation == 1) {         game.setDestroyerLogo(game.getDestroyerLogo2());         game.setPilotImage(game.getPilotImage2());         game.Health = 300;          p.ani = null;         p.ani2.runAnimation();           }      }   So my logic is that the player is able to select 2 skins, which have their own unique animations.   I set up 2 animations and the first one(ani) is the default. Once the player selects the second skin, the animation images will change. However, it gave me an error after I select my 2nd skin. (the game is able to keep going but the with the skin being default)  Here is the error:   Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at star.destroyer.alpha.MouseInput.mouseClicked(MouseInput.java:107) at java.awt.Component.processMouseEvent(Component.java:6536) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)   My possible guess on the cause of this issue is that you can not switch images in an animation?    If anyone knows the answer on the fix please answer down below. Thank you!  If you are unsure what I am asking, feel free to ask in the comments.

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


I forgot to get my mince beef out of the freezer to cook tonight, so it's still frozen...Can I cook it straight from frozen or does it need to fully defrost?

I wonder if it is bad to cook frozen meat (chicken, fish, beef,...) without waiting for it to thaw?  Sometimes, I realize I forget to take meat out of my freezer beforehand, when I am too hungry already.


I have one container div 'full-h' named with 100vh min-height.  Inside that I have a 'content' div with unknown height.   Inside content div I have 2 items with unknown height.  I'm trying to centering this two item vertically on desktop for 100vh min-height. If the height of the content is higher than the screen height on mobile devices, I want the height to be determined automatically according to the content. So I used min-height instead of height.   I have tried many different methods as a result of my research on the internet for hours. I tried to use flexbox and table content. But whatever I do it doesn't work. I thought that the problem might be related to my computer and I restarted my browser and computer. I've run my code on JSFiddle. But the result is the same. Many thanks to all of you in advance.  Here is JSFiddle:   Here is the code:  HTML    body {   margin: 0;   padding: 0; }  .full-h {   min-height: 100vh;   background-color: #666; }  .v-center {   display: table; }  .content {   display: table-cell;   vertical-align: middle;   background-color: #999; }

Hello World!

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat, quidem. Expedita, aperiam, molestiae sequi necessitatibus, natus dolorum enim laborum incidunt praesentium itaque a. Nobis sint nisi accusamus omnis, est perspiciatis.

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I'm trying to figure out exactly when I created a file. Windows 7 thinks I don't know how to subtract two times, and tells me it was created "1 hour ago." I need a little more detail than this, but I can't seem to find a setting to toggle this "feature" off.  Example below:

Anyone know a way to immediately show the seconds of a file's date modified property in the GUI? So if you create a file, any file in any directory, right-click and choose Properties, the date modified (if it's recent) will say something like "dd/mm/yyy hh:mm, one minute ago" - reminder this is in Windows 7. Windows XP did it normally. Then they changed something.  If you wait a while, eventually you'll see the seconds, I'm not sure how long a while is, but this is incredibly annoying if you want to troubleshoot something that relies on the seconds of timestamps... is there a setting? registry key I can change perhaps?  I'm literally using Chrome, pasting in the path of the directory to be able to see the seconds quickly (as a workaround) but would be nice to be able to use Win7.


Searching at Google I see several options to install my HP printer, including starting the HPLIP installation, but I understand that Ubuntu 20.04 already brings HPLIP installed, version 3.20 So I understand the best option is with the command hp-setup is the best option to install my HP printer?

Let's assume that one has some HP printer and/or scanner and checked its support status on the corresponding page of HPLIP site - .  So one have the following information: the device Model name, Min. HPLIP Version and Driver Plug-in need.   What should one install to make Ubuntu fully support the HP printer and/or scanner?


Since to become excited an electron in its ground state have to absorb a particular frequency of light otherwise they will just pass through each other, I'm thinking how can the electron measure the photon and decide whether to absorb it or not? I even read that 1 single photon with sufficient high energy can excite 2 or more electrons at once and one of the electron may be quite far away unbelievable as I only know it is very rare for an electron to absorb 2 photons at once so that makes me believe that electron can sense nearby photons.

This might be a stupid question, but nonetheless, it has been bothering me.  If you take a photon, make it go through some atoms in a solid, liquid or whatever, then you have the chance of this photon being absorbed by an electron, and thereby exciting the electron. This requires the photon to have enough energy to actually excite the electron to another energy level.  My question is then: How does the photon know if it has enough energy or not? Do they interact very quickly to determine if it's okay or not, or is it just something it "knows?"


So here is a question.  I have HTML  Callback   I have external Jquery-file (with Bootstrap.js included)  $(".callback").on('click', function() { var myModal = '

'; $(myModal).modal('show'); }); $("#callback").on('click', function() { //some actions });   So ".callback"-event works fine because that link we have in the current DOM. But "#callback"-event does NOT work. Maybe cos of that element appears after JS-file has loaded (seriously?).  Please, could anyone answer why "#callback"-event does NOT work?  Thanks a lot!

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.


This is my first every java project.All was going well and my program compiled. I got a 3D looking object on my screen. But when I use my moveTo(int x,int y) method I get a null pointer exception. I've looked it up and it's obviously a huge issue for a lot of people. But I still can't grasp the concept of it and any of the fixes that worked for other people don't seem to fit my program. I have tried using if statements to check for null and stuff like that but I can't get the syntax right or something. for example the base is an ellipse , the ellipse class has a moveTo(x,y) method.but when I call on it using base.moveTo(x,y) im getting the error. Can anybody help? cylinder1.moveTo(8, 8);     Exception occurred. java.lang.NullPointerException     at Cylinder3D.moveTo(Cylinder3D.java:57) Is this what you ment by stack trace? Here is the code for the moveTo method in the rectangle class. public void moveTo(int x, int y)     {         xPosition = x;         yPosition = y;         makeVisible();         draw();     }  public class Cylinder3D {         private int diameter;     private int height;     private Ellipse top;     private Ellipse base;     private Rectangle wall;     int xPosition;     int yPosition;       public Cylinder3D(int diameter, int height)     {         int x = 0;         int y = 0;         Ellipse top = new Ellipse();         int xdiameter=diameter;         int ydiameter=diameter/2;         int xPosition = 0;         int yPosition = 0;         top.setState(xdiameter,ydiameter,xPosition,yPosition,"black");          Ellipse base = new Ellipse();         int yPositionBase = yPosition + height;         base.setState(xdiameter,ydiameter,xPosition,yPositionBase,"black");           Rectangle wall = new Rectangle();         int xSideLenght = diameter;         int ySideLenght = height;         int yPositionWall = yPosition + (diameter/4);         wall.setState(xSideLenght,ySideLenght,xPosition,yPositionWall,"black");         //....      }        public void moveTo(int x, int y)     {         wall.moveTo(x,y); //here is where I get the error.         base.moveTo(x,y);         top.moveTo(x,y);     } }


My bank's app has stopped working after an update. Trying to open the app gets the error "The device is rooted. For security reasons the application cannot be run from a rooted device". Then the app immediately closes.  I'm not really sure how there's security issues from being rooted. Especially compared to accessing the regular website from a desktop computer, which has no such kind of check. However, I don't really care. It's my device. So how can I get around this restriction (without unrooting my phone)?

I have to install an application that has discovered my device to be rooted.  So this is a two part question.   How did it discover in the first place that my phone has been rooted How to prevent the application from discovering my phone as being rooted


There are 300 points around circle. A fly sits in one of the points. It starts moving clockwise. At first the fly moves to the next point. Then it skips one point. Then it flies skipping 2 points, then 3 points and so on. Will the fly eventually visit all the points? I am not sure where to start. I have tried to shown it for a smaller case with the number of points being 6, but it doesn't seem to work. How can I generalize it?

Consider $n \ (>1)$ lotus leaves placed around a circle. A frog jumps from one leaf to another in the following manner. It starts from some selected leaf. From there, it skips one leaf in clockwise direction and jumps to the next one. Then it skips exactly $2$ leaves in clockwise direction and jumps to the next one. Then the frog skips $3$ in clockwise direction and so on. Suppose it turns out that if frog continues this way all leaves are visited by the frog. Show that $n$ cannot be odd.  My attempt,  Let frog be initially placed at leaf named $0$, and name the remaining leaves $1$, $2$ , $3$... $n - 1$  in clockwise direction. After $k$ moves the frog will be on label number $0+(1+1)+(2+1)+\ ...\ + (k+1) = k (k+3)/2$.  Thus the question reduces to proving that there does not exist any $i$ such that $n = 2i+1$ and the congruence stated below is satisfied for all $t$ for some value of $k$:  $k(k+3)/2 \equiv t \,\pmod n, \;\; 0\leq t \lt n$


I see the governor limits for maximum no. of sendEmail invocations per transaction as 10 in this article  But it does not say how many emails I can send per sendEmail invocation.

I was recently trying to answer a question about email limits. I remember there being a cap on the number of emails sent per invocation (100), but I couldn't find any documentation that still mentions that limit. Has it been lifted?


This process is deprecated/on indefinite hold. See  post for updates from the DAG team, and  for more context on the changes in the process.  On a weekly basis,  vets a handful of feature requests to be sent over to the engineering team and estimated, scheduled into next month's plan, and built (or sometimes rejected for technical reasons). We try to select things that we think can make the most people happy, and can also be done in about one to three days by a developer. Or, in other words, something relatively self-contained that doesn't require an elaborate spec, a lot of discovery by/with many other teams, and doesn't really alter the product itself in major ways. We usually send over around 10 of these a month. Some of these are grabbed from the various Metas across the network, some are written by the Community Team themselves. Some have a lot of visibility in all sites of the network, some are only minor tweaks to background stuff, some are improvements to moderator tools, and some are improvements to the tools the Community Team themselves use. The team keeps track of these in a Trello board that looks like this:  We'll start posting monthly updates on what features from that board were built, rejected, or punted, as answers to this question (one answer per year), with the objective of giving you some insight into our process.

Mid-2017  started publishing monthly updates. This post will continue that effort into 2018. (.)  Updates are posted at the beginning of the month. They cover what was done last month, what is still in progress and new work that will be started in the current month.  Updates:      (CoC, nav, OpenID, responsive design, bugs, campaigns)  (CoC, comment flags, nav, OpenID)  (question wizard, nav, user survey, OpenID)  (tag watching, GDPR)  (responsive design, tags, teams)  (responsive design, OpenID, teams, sponsorship)  (responsive design, facebook auth, question lists, teams)  (newsletter, sign up, Documentation reputation, channels)  (top bar issues, hats, question template)


I have the following problem.  I have installed latest git version from source, but maybe I have done something  wrong, because now when I am trying to install/uninstall any stuff using apt-get I get the following message:  You might want to run `apt-get -f install' to correct these:  The following packages have unmet dependencies:  git-core: Depends: git (> 1:1.7.0.2) but it is not going to be installed  E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   Well, after sudo apt-get -f install, it proposes to install git:  The following extra packages will be installed: git   and after typing 'Y' I get another error:  dpkg: error processing /var/cache/apt/archives/git_2%3a2.3.6-1avh1~lucid1_amd64.deb (--unpack):  trying to overwrite '/etc/bash_completion.d/git', which is also in package git-core 2:2.3.6-1avh1~lucid1  Errors were encountered while processing:  /var/cache/apt/archives/git_2%3a2.3.6-1avh1~lucid1_amd64.deb  E: Sub-process /usr/bin/dpkg returned an error code (1)   How can I fix it?

I read about a security flaw in Git, which was fixed in version 2.2.1. I currently have Git 2.1.0 on my system (Ubuntu 14.10), and tried to reinstall it with apt. However, apt told me that I currently have the latest version.  The Git website does not have prebuilt versions for Linux. They say that you can install it with package managers. Without building from source, how would I install the latest version of Git?


I am going to buy a laptop that has FreeDos installed. I want to create a bootbale USB drive that will install UBUNTU on it.   Can a create this USB drive using my Macbook Pro? Will it be compatible?  Thanks, Adam

I have a netbook that I want to install Ubuntu onto. I do have a good Mac computer that I can make a bootable USB drive from, but I'm confused on how to go about making it.


I'm developing an ASP.NET MVC 5 app with Visual Studio 2015, C# and .NET Framework 4.6.1.  I have this _Layout.cshtml page:  <!DOCTYPE html>       <meta charset="utf-8" />     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>@ViewBag.Title - My product</title>     @Styles.Render("~/Content/css")     <link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900' rel='stylesheet' type='text/css'>     <link href="~/css/common.css" rel="stylesheet" type="text/css" media="all" />     @RenderSection("Styles", required: false)     @Scripts.Render("~/bundles/modernizr")

                     Versi&oacute;n 2.0

                     ¡Hola, @User.Identity.Name!

         @RenderSection("Body")

&copy; @DateTime.Now.Year - My Company

      @Scripts.Render("~/bundles/jquery")     @Scripts.Render("~/bundles/bootstrap")     @RenderSection("scripts", required: false)     All my pages won't have vertical scrollbar and I want to show  always at the bottom of the page.  How can I do it?

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


Why are some deamons run out of service and some out of initctl?  Do both tools do the same thing and it is just a matter of personal preference of the user what they will use?  E.g.  sudo service --status-all  vs  sudo initctl list  In my particular instance cron runs out of initctl, and ssh runs out of service.  But on Fedora, for example, both of those will be in systemctl.

I've been managing server installations both on and off Ubuntu flavor for some time - I've become quite adjusted to /etc/init.d/ for restarting servcies. Now I get this message:  root@tatooine:~# /etc/init.d/mysql status Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql status  Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the status(8) utility, e.g. status mysql mysql start/running, process 14048   This seems to have been brought about in the latest LTS of Ubuntu - why? What's so bad about /etc/init.d/ and what/is there a difference between service and /etc/init.d/?


What happens if I keep cash sent to me instead of keeping a portion of it and returning the rest to  an address in the United States? They have my address but no other information that I can recall. They did not ask me to send them a card or deposit into my account. I was told to keep $100.00 and return the rest of the cash to them.

I have seen many questions like:      My question is: what happens if you receive this money (without doing anything or giving your bank account number) but do not do anything scammer wants?  I especially want to know about what happens with the money you got and possible legal consequences.    Is it considered yours because scammer transfered it to you? Do you have to return it? If yes, to whom and in what form? And finally, how is it that scammers are just sending money to random people? Aren't they scared that someone will simply not return it? I understand that this may be stolen money, but it surely took some effort (cash/time) to "acquire" it, so why are they just sending it away?


I have installed an iPhone app from the AppStore that takes a phone number and searches an online database then returns a name that belongs to the entered phone number (and vice versa).  Is there a way for me to know what is the back-end server this app is talking to? (a hostname, or an IP address)?

I want to monitor HTTPS network traffic on the Internet and not Intranet.  I would use a tool like Charles or Fiddler and setup a proxy but I could only host through Intranet. Plus, I have the issue of decrypting https traffic.  Ideally, I would like to monitor all http requests on the ios device, log to a file and then I can monitor the full data in that file.  Also, I am working Cordova/Xcode ObjectiveC code to create webviews, so the application I want to monitor is not a full browser like Safari.  I would be monitoring webrequests through that webview.  Is there a way to do this?  What applications in iTunes/Store are available to print out decrypted https requests.  ...


So effectively, I am working on creating my very own TTRPG rulebook based on my own setting and universe. The only question I got is how much of mechanics am I allowed to be inspired by?  Effectively, Warhammer 2E was a HUGE inspiration for this. I loved the percentiles, the combat mechanics, how your character begins as a no one and climbs up to being a hero. Or easily dies. I loved how the skills worked and everything.  I ask as I would really enjoy using the percentiles and combat. Not necessarily the same skills, (Read/Write is an example of one I wont be using) and more flavored to my own setting, with new skills coming in and old skills going away. I would also be changing how advance skills work entirely as well. Magic System would also be entirely changed from it, so mainly I am asking if it would be legal to use the main attribute system, secondary attribute system, and the combat system and, if so, to what degree.

To what extent is it permissible to use aspects of a given system (for commercial use)? Say I wanted to have rules for how a skill check works, do I have to be careful that I am not using the same as an existing system? Are names of things such as skills, feats, classes, and spells copyrighted?


I am trying to set alarm and notify user at the user's specified time. But I get NullPointerException at boundService.setAlarm(cal). I checked this  with a similar question but the solutions did not help me. Any help will be much appreciated.  Thanks a lot in advance!  DateAndTimePickerActivity  public class DateAndTimePickerActivity extends FragmentActivity implements     OnClickListener {     public Calendar cal;      private ScheduleClient scheduleClient;   @Override     protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.main);      scheduleClient = new ScheduleClient(this);     scheduleClient.doBindService();    }     @Override   private DatePickerDialog.OnDateSetListener mDateSetListener = new    DatePickerDialog.OnDateSetListener() {     public void onDateSet(DatePicker view, int yearSelected,             int monthOfYear, int dayOfMonth,int ) {         year = yearSelected;         month = monthOfYear;         day = dayOfMonth;      } }; private TimePickerDialog.OnTimeSetListener mTimeSetListener = new TimePickerDialog.OnTimeSetListener() {     // the callback received when the user "sets" the TimePickerDialog in     // the dialog     public void onTimeSet(TimePicker view, int hourOfDay, int min) {         hour = hourOfDay;         minute = min;         }         }; @Override public void onClick(View v) {       cal = Calendar.getInstance();         cal.set(year, month, day);         cal.set(Calendar.HOUR_OF_DAY, 0);         cal.set(Calendar.MINUTE, 0);         scheduleClient.setAlarmForNotification(cal); //NullPointerException   } }   ScheduleClient  public class ScheduleClient {  private ScheduleService boundService; private Context context;  private boolean isBound; RemindMe remindme; public ScheduleClient(Context context) {     super();     this.context = context; }  public void doBindService() {     // TODO Auto-generated method stub     context.bindService(new Intent(context,ScheduleService.class), Connection, Context.BIND_AUTO_CREATE);     isBound=true;  }  private ServiceConnection Connection = new ServiceConnection() {      @Override     public void onServiceConnected(ComponentName name, IBinder service) {         // TODO Auto-generated method stub         boundService=((ScheduleService.ServiceBinder) service).getService();      }      @Override     public void onServiceDisconnected(ComponentName name) {         // TODO Auto-generated method stub         boundService=null;      }   };    public void doUnbindService() {     // TODO Auto-generated method stub     if (isBound) {         // Detach our existing connection.         context.unbindService(Connection);         isBound = false;   }     }      public void setAlarmForNotification(Calendar cal) {       // TODO Auto-generated method stub        boundService.setAlarm(cal); //NullPointerException    }   }

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?