I have made a custom command which includes an image if it exists and writes an missing file text if it does not. The problem is that if I use underscore in the file name or path it is does not print the path right.  \documentclass[a4paper, 10pt]{report}  \usepackage[utf8]{inputenc} \usepackage[export]{adjustbox}  \newcommand{\includegraphicsmaybe}[2]{     \IfFileExists{#2}         {\includegraphics[valign=c, width=#1]{\detokenize{#2}}}         {\fbox{\parbox[c][#1][c]{#1}{\center \textbf{File not found}\\ \detokenize{#2}} }}}  \begin{document} \centering \includegraphicsmaybe{0.4 \textwidth}{example-image} \includegraphicsmaybe{0.4 \textwidth}{something.png}\\[1cm] \includegraphicsmaybe{0.4 \textwidth}{something_1.jpg} \includegraphicsmaybe{0.4 \textwidth}{something_1.png}  \end{document}     How can I solve this?

I use LaTeX to take quick notes about my programming work.  I have a couple of frustrations:    I need to use underscore a lot because of variables named with underscores.  However, I have to escape each one of them "\_", thus making my notes less readable on the markup side. I commonly want to use "<" and ">" symbols - why oh why are the default representations of these symbols "¿" and "¡"?   Is there anyway I can alter LaTeX so that "_", "<", and ">" literally typeset as "_", "<", and ">"?


I want to access files that is on Windows since my laptop is dual booted. And I have been using Ubuntu 16.04 platform. But the problem is I'm unable to access my files. Following is the dialog box message appearing:  Error mounting /dev/sda4 at /media/iammnz/90502B6A502B566E: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda4" "/media/iammnz/90502B6A502B566E"' exited with non-zero exit status 14: Windows is hibernated, refused to mount. Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


How could a function a bit like basiceval be written to give a real number result as opposed to an integer, making the third calculation here more accurate?  \documentclass[american, a4paper]{report}  \def\basiceval#1{\the\numexpr#1\relax}  \begin{document}  \def\variableA{30} \def\variableB{10} \def\variableC{3}  \begin{itemize} \item \basiceval{360/\variableB} \item \basiceval{\variableA/\variableB} \item \basiceval{\variableB/\variableC} \end{itemize}  \end{document}

I am looking for a method to do minimal floating point / integer calculations in LaTeX, not for the purpose of package writing, but for the production of actual text.  Here is an example to illustrate. Given the following input text   The experiment included running a battery of \bind{T}{21} tests  on \bind{S}{13} subjects, for a total of \bind{V}{T*S} expected values.  However, since \bind{F}{37} values were defective, our successful   measurement rate per subject was \use{100*round((V-F)/T,2)}\%   it would be nice if was converted to:   The experiment included running a battery of $21$ tests  on $13$ subjects, for a total of $273$ expected values.  However, since $37$ values were defective, our successful   measurement rate per subject was $86$\%.   Where \bind{C}{expression} defines a new constant C whose value is expression, and returns C, while \use{C} simply returns the value of C.  Any tips?  I am aware of the spreadtab package and this question: , but I am looking for something more.


If photons have frequency then they must vibrate. So i was wondering, what kind of vibration do photons have? But according to physicists, photons do not vibrate. Can someone explain me, how is that possible?

I picture light ray as a composition of photons with an energy equal to the frequency of the light ray according to $E=hf$. Is this the good way to picture this? Although I can solve elementary problems with the formulas, I've never really been comfortable with the idea of an object having or being related to a "frequency". Do I need to learn quantum field theory to really understand this?


According to , Invisible, but unhidden enemies are sensed automatically. However, this seems to contradict the Ranger's Feral Senses ability.      FERAL SENSES: You are also aware of the location of any invisible creature within 30 feet of you, provided that the creature isn’t hidden from you and you aren’t blinded or deafened.   This suggests that being able to sense unhidden invisible enemies is something special that only rangers can do. Is there a consistent ruling under RAW?

In D&D 5e, the description of hiding (PHB p177) says an invisible creature needs to stay quiet and otherwise avoid leaving signs of its passing, while the "invisible" condition (p291) says the creature's location can be determined by any noise it makes. This seems straightforward: even a blinded creature can pinpoint the location of anything on the battlefield that isn't tiptoeing/holding its breath.   However, the Ranger's "Feral Senses" ability (p92) grants awareness of the locations of invisible creatures within 30 feet, provided the creatures aren't hiding and that the Ranger can both hear and see. I realize the ability also removes the disadvantage to attack rolls against invisible creatures, but the wording and limitations seem to imply that awareness of the location of an invisible, unhidden creature isn't a given.  I realize the hidden vs invisible question has , but I'm hoping someone can explain what changes for a Ranger when she hits 18th level. Is there a scenario where a creature who can see and hear would not be aware of the location of unhidden, invisible creatures within 30 feet? Or is this just the equivalent of giving a fighter the ability to add half of their proficiency bonus to attacks with simple weapons for which they don't already have proficiency?


I have recently been involved with many papers (related to black hole information paradox, etc) in which the concepts of (Euclidean) path integral and partition function are used extensively. Of course I have seen these in a standard QFT course (like Peskin), but still I feel uncomfortable and need to know more about the mathematical framework and physical applications and intuitions. Could you please introduce some good advanced textbooks (or book chapters) on this subjects?

I am looking for an introductory textbook on QFT in curved space-time via the path integral method. I want to understand the following:   How to build a generic perturbative QFT in curved space-time Are there some specific difficulties with normalization How to derive observables / particle states in curved space-time The Unruh effect The Hawking radiation   I would appreciate if the author would use path integrals instead of the canonical formalism when possible. The reason for this is purely aesthetic.


I have the following qualified class name stored in a string:   string className="Project.LogicLayer.FunctionsLayer.Medic";   Now I need a new instance of the class from using that string.  I tried this but it always returns null:  Type t=Type.GetType(className); object = Activator.CreateInstance(t);

Is there a way to create an instance of a class based on the fact I know the name of the class at runtime. Basically I would have the name of the class in a string.


In the Return of the King, there are the orcs that come from Minas Morgul. Were they produced in Mordor and transferred there, or were they actually created in Minas Morgul by the Witch King?

I've not seen/read any female Orcs mentioned in the movies or in the books. In one of the movies, an Uruk-hai is momentarily shown emerging from a giant, grown-Orc sized flesh packet. So are they created with spells, or do they follow the Standard Reproductive Model.


How can we find the quotient and remainder when:  $$f(x)= x^5-x^4-4x^3+2x+3$$  is divided by $$g(x)=x-2?$$  Could someone please show how to step-by-step using synthetic division?

Trying to find the quotient and remainder of the problem below..but keep getting to wrong. Could someone demonstrate how to solve this correctly?


How do you get into the first house in the village it says its locked, also what is in that house?  I need to get into the one on the left

I've 'completed' the game, but didn't find the key for the first house. (I got the one for the arcade machine house). Where can I find it?


I have two network interfaces which are a wireless and a mobile broadband. They have different networks or service provider. I plan to combine them for faster upload and download speeds. Is there  any good way of doing this?

My PC has a total of 4 NICs, 2 wired Gigabit Ethernet network cards and also 2 wireless network cards. (One Broadcom with proprietary drivers and Ralink with open source software, which works much better than Broadcom.)  My cellphone can share its connection wirelessly to my PC, but I also have a wired Internet connection. So I have multiple Internet connections to access the Internet. How can I merge 2 or more connections together and balance them to enjoy one unified Internet experience that it is the sum of all Internet connections connected to it.  For example if I have a modem with an Internet connection of 1024kB/s and another one that offers 512kB/s and one small one that offers 128kB/s, after load balancing and merging all connections (Bonding or Teaming), I could download at a speed of 1664kB/s using all 3 Internet connections as one for example.  This question has always intrigued me.


My understanding of how density functions work in R is that they are calculations of the absolute probability (continuous) or probability mass (discrete) of something occurring, instead of the cumulative probability distribution functions. For example, dbinom and pbinom. The cumulative dbinom is 'equivalent' to pbinom. > dbinom(0:6, 6, .2) [1] 0.262144 0.393216 0.245760 0.081920 0.015360 0.001536 0.000064 > cumsum(dbinom(0:6, 6, .2)) [1] 0.262144 0.655360 0.901120 0.983040 0.998400 0.999936 1.000000 > pbinom(0:6, 6, .2) [1] 0.262144 0.655360 0.901120 0.983040 0.998400 0.999936 1.000000  I'm trying to adapt some code that uses binomial distribution to use the beta distribution. But dbeta output doesn't follow the same pattern as dbinom output. I know the area under the curve must sum to 1, hence the larger outputs (see ), but what information does dbeta output give, if not a probability? > dbeta(0:6/6, 6*.2, 6*.8) [1] 0.000000000 2.560925578 1.259925621 0.457926694 0.103905114 0.007800186 0.000000000 > cumsum(dbeta(0:6/6, 6*.2, 6*.8)) [1] 0.000000 2.560926 3.820851 4.278778 4.382683 4.390483 4.390483 > pbeta(0:6/6, 6*.2, 6*.8) [1] 0.0000000 0.5019590 0.8149543 0.9508137 0.9926665 0.9997273 1.0000000  I've seen some other analyses use qbeta output as input to pbeta. Questions My question is how is dbeta output to be interpretted? And what way could I obtain 'absolute' probabilities from a beta distribution?

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


Hi im new the mtg and have a question about the deck im playing.  so I use "Ravenous Intruders" ability (sacrifice an artifact gain +2/+2 until the end of the turn)  the artifact I sacrifice is "Implement of Combustion"   "Implement of Combustion" has an ability where I can pay 1 red mana and sacrifice it to deal 1 damage  would I be able to activate "Implement of Combustion" ability on top of Ravenous Intruder's ability so I can buff him and deal the 1 damage or would sacrificing implement leave no target for ravenous intruder so he does not buff?

Say I have a Zombie token, , and  on the battlefield. Can I sacrifice the Zombie token to activate both the Altar's and Seer's abilities?  Similarly, if I have one card in hand, and  and  on the battlefield can I discard the one card to both of their abilities?  If I have a  with 3 charge counters can I activate both of its abilities by tapping it to add a counter, and tapping it to remove 3 counters and destroy a permanent without untapping it in between?


Mine is closely related to this one:   I ask the same question but with a solution for Windows. The mentioned solutions bibexport, and bibextract don't seem to be available. I think it's possible to run these programs through something like MinGW, but I'd like to be able to have something that works on the command line so that I can build it into my usual build command.  Any help is very much appreciated.

Normally, LaTeX will only create references for the BibTeX entries cited in the text. Is there a way of extracting these entries into a different .bib file automatically? For example if I have a .bib file with two entries, and only one is cited in a particular text, I need a way of creating a new .bib file with just that reference.


Suppose $x_0:=2\sqrt{2}$ and $x_{n+1}=x_n^2-2$ for $n\ge1$.  We have to show $$\lim_{n\to\infty}\frac{x_n}{x_0x_1\cdots x_{n-1}}=2$$  Establishing convergence is pretty direct but I'm having trouble evaluating the limit. I have tried using the relation $\frac{x_{n}}{x_{0}x_{1}\cdots x_{n-1}}=\frac{x_{n-1}^{2}-2}{x_{0}x_{1}\cdots x_{n-1}}=\frac{x_{n-1}}{x_{0}x_{1}\cdots x_{n-2}}-\frac{2}{x_{0}x_{1}\cdots x_{n-1}}=\cdots=\frac{3}{\sqrt{2}}-2\sum_{k=1}^{n}\frac{1}{x_{0}x_{1}\cdots x_{k}}$ but that doesn't really shed light on the exact value of the limit.  Any and all help appreciated. Thanks!

If $$\left\{x_{n}\right\}\mid x_{1}=5,x_{n+1}=x_{n}^{2}-2,\forall n\geq 1$$ find $$\lim_{n\to\infty}\frac{x_{n+1}}{x_{1}x_{2}\cdots x_{n}}.$$  If someone could help me out with tags, it'd be lovely. I think this is calculus and real-analysis, but I'm not sure--I had the problem scribbled down on a post-it, and I forget where it's from.


If someone posts the answer to a particular question (or the idea of the solution) in a comment, but has not posted this as an answer - can I post an answer using the same solution?  In particular, here are 2 cases:  1) I finished writing an answer and am ready to post it - only to realize that in the meantime someone else suggested the same thing in a comment 'x' minutes ago. (Maybe it depends on 'x'?)  2) The comment was written a long time ago - x hours/days etc - this time I saw the comment before writing an answer.

I run into  with rather simple solution which was placed as the first comment by SuperScript user.  Two minutes after this, another user literally copied this single sentence comment into answer with no added value. Since he is 113k rank and later other users commented with more useful notes, it seems to me like automated and rather parasitic behavior.  I've met situations like this before, but at least the answer added something useful. So what to do with situations like this? Is it desirable/honest to hijack the comment?


I'm starting to see more and more abuse of the tagging system. Not always intentional, but prevalent none-the-less. I think this started when people began adding the not-programming-related tag, which is odd...if it's not programming related (a condition for closing), then close it.  Today I am seeing tags like belongs-on-serverfault or do-my-homework-for-me. The first should be replaced with voting to migrate, or asking that others vote to migrate, and the second should just be discouraged altogether. If you feel somebody is asking a homework question, comment.  That being said, what is the appropriate action to take when we come across things like this?

I just looked on SO, and found that there are about 12,880 tags with only a single use. There are 26,250 used less than 10 times.  That's just too many for the community to fix. I think we need some automatic cleanup here.  I suggest you add a cleanup process to remove all tags used less than a certain number of times more than a month after their creation. That would give a legitimate tag a while to become used more, while removing those that will never be used more than a few times.    Edit: Here are the tags from page 512. I've highlighted the ones I think are most likely bad tags. I even fixed a few:   installer-class inspector installation-tools insert-worksheet insets insomnia-mysteries inorder inprivate inprocfactory inprocserver in-progress input-button input-buffer input-mask inputformsection insert-nested-select insert-parameters insert-img-to-option insert-data insertdate insert-delayed insertafter insertchildbefore input-mode input-simulation inputpanel inputrc input-redirection inquiry-management inputstreamreader input-string input-testing infocards infochannel infogrid inflector influence info-plist inforeader inform inform7 information-base information-card information-dispersal informed-search information-sources information-technology information-ownership information-science info-vis informx (fixed now) info-window infralution inheritence (typo - fixed) initialcapacity initial-context initialization-block initfileurlwithpath inline-comments inline-cpp inline-edit inlinec initialize-request-handl injectable injectors init-script inittab initwithcontentsoffile initwithcontentsofurl inlinks


I saw some code over the web like:  import static org.mockito.Mockito.*;   Can someone please tell me what this static means in this case?

When used like this:  import static com.showboy.Myclass;  public class Anotherclass{}   what's the difference between import static com.showboy.Myclass and import com.showboy.Myclass?


Let's say I have two files - file1 and file2. I want to compare those files, but output only lines that are in file1 and not in file2. How can I do it?

I have two files A and B.  I want to find out which lines of file B are not present in the file A.   How do I do this? The lines can be at any position in file A


I understand that   sudo cd /directory   will return:  sudo: cd: command not found   because cd is a shell builtin and not a binary. But then, why does   sudo echo 'this is a test'   works fine?  What is really going on here? How does sudo find the command echo if it's not a shell?

$ which echo echo: shell built-in command. $ which ls /bin/ls $ which cat /bin/cat   Why is echo not an independent utility like ls, ps, cat etc? Why is it shell specific? Any good reasons?


What is the probability that $THTH$ occurs before $HTHH$ in an infinite sequence of coin flips?    The expected number of flips until you first see $THTH$ is $6$, while the expected number until you first see $HTHH$ is $10$. Intuitively, I would guess that the probability that $THTH$ occurs before $HTHH$ is $3/4$. Is there a formal argument to compute this probability?  Probabilistic model: We denote by $(X_{n})_{n \geq 1}$ the random variable of coin flips, taking values in $\{H,T\}^{\mathbb{N}}$. We let $t_{THTH}$ be the first time that $THTH$ occurs in the sequence. We have $$ \mathbb{E}[t_{H}] = \frac{1}{2} \mathbb{E}[t_{H} | X_{1} = H] +  \frac{1}{2} \mathbb{E}[t_{H} | X_{1} = T] = \frac{1}{2}  +  \frac{1}{2} (\mathbb{E}[t_{H}] + 1  ). $$  $$ \mathbb{E}[t_{TH}] = \frac{1}{2} \mathbb{E}[t_{TH} | X_{1} = H] +  \frac{1}{2} \mathbb{E}[t_{TH} | X_{1} = T] $$

"An event less frequent in the long run is likely to happen before a more frequent event!"  How can I show that THTH is more likely to turn up before HTHH with a probability of  9/14, even though waiting time of THTH is 20 and HTHH, 18!  I would be very thankful if you could show me the way of  calculating the probability of turning up earlier,   and the waiting time. Thank you!


This is what I see:  Maybe I should add some files to some directory. I'm extremely new to ubuntu so please give a detailed solution.

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


I'm just starting with the concept of proving mathematical statements with induction.  The complete exercise with solution can be found under:    I'm struggeling with the translation from step 4 to step 5.  According to the notes its because we have 2^k elements (I got that part) which are >=1/2^(k+1) since its the smalles number.  However the part I don't understand is why we are using 1/2^(k+1) and not 1/2^k+1. shouldn't we calculate with the bigger number since we want to prove that H2^(k+1) is bigger than that?   Our tutor explained, that you are allowed to do the following:  H2^k+2>= 1 + k/2 + 1/2^k+1+...+1/2^(k+1) >= 1+(k+1)/2 and because of that you have to use the smaller term. However that education is not prooven as far as I get the concept, or am I wrong?  Any help is much appriciated!

My question is, for the question below, in the inductive step, where does $\dfrac{1}{2^{(k+1)}}$ come from?And where does $2^k$ come from in the third last step?


In Return of the Jedi we see Leia wearing a  helmet.     In   (By Inferno's Light) we see a prisoner wearing what appears to be the same helmet.   My question is: In DS9 episode 5.15 (By Inferno's Light) is one of the prisoners wearing Leia's Boushh helmet from Return of the Jedi?

We all know that there are a huge number of different alien species created for the Star Wars and Star Trek universes. I'm wondering if there's a pair of species that are so similar, it doesn't seem like it can be a coincidence.  The creators may be influenced, intentionally or not.   Or if there's evidence of plagiarism, that would be a good part of an answer. Before someone answers "people":  In order to satisfy the question, it means the candidates can't be human (obviously) and can't match some simple description whose conception predates Star Trek and Star Wars (examples: human with green skin; anthropomorphic lizard, etc).


Mount Everest is the highest peak in the world. The Nile is the longest river in the world. Lake Victoria is one of the largest lakes in Africa. London is on the Thames.   My question is why haven't we used the in Mount Everest and Lake Victoria? They are almost identical to the ones where the are used. Do we have to learn all the topics/things where the is used?

Possibly two questions in here: Are these sentence constructions logical, and if they are, why are they different?     I swam across the Ocmulgee River.   I swam across the Pacific Ocean.   I swam across the Red Sea.   I swam across Lake Winnipeg.   I can't think of a way of phrasing the lake example while using an article with a proper noun. I thought at first it was because Lake Winnipeg is different; it's generic portion (the "Lake") comes first and the name of that body comes second, but I swam across Falls Lake is the same.   Yet the sentence I swam across the lake sounds right to me. ...Why?


This program basically iterates a hashset collection of greetings. The greetings are stored in the manager class in a hashSet called greeters. What I have to do is create a method that iterates a over the greeters and prints it out depending on a set of variables (isHappy and greetTimes). Is happy determines whether or not the greetings will have an exclamation point or not and the greetTimes determines the number of times the greeting will show up. However, when I run the allGreet method I keep getting a null pointer exception. Any help is appreciated :) Here is the exact text of the error message:  java.lang.NullPointerException     at Manager.allGreet(Manager.java:51)  Here are the classes:  import java.util.HashSet; import java.util.*; /**  * Class manager  */ public class Manager {  /**  * Constructor for objects of class Manager  */ public Manager() {     HashSet <Object> greeters = new HashSet<Object>();      // add elements to the hash set     greeters.add("Hola");     greeters.add("G'Day");     greeters.add("Ciao");     for(Object greeter : greeters){         System.out.println(greeter);     } }  /**  * all the different greetings for the Greeter  */ public static void main(Object args[]) {     Manager hi = new Manager();     hi.allGreet(); }    public String greeting = "Bonjour"; public int greetTimes = 6; public boolean isHappy = true; public HashSet greeters;  /**  * allGreet Method   */ public void allGreet()  {          if(greetTimes < 0) {             System.out.println("Invalid number of greetings!");         }          else {             if(isHappy == true){                 for(Object greeter : greeters){                     System.out.println(greeter + "!");                 }             }             else {                 for(Object greeter : greeters){                     System.out.println(greeter);                 }             }         }     }   }   /**  * Class Greeter:  *  * Hello-world program to demonstrate BlueJ.  */ class Greeter { /**  * Method that does the work   */ public void go() {     if(greetTimes < 0) {         System.out.println("Invalid number of greetings!");     }     else {         if(isHappy == true){             for (int i = 0; i < greetTimes; i++) {                 System.out.println(greeting + "!");              }         }         else {             for (int i = 0; i < greetTimes; i++) {                 System.out.println(greeting);              }         }     } }  public String greeting = "Bonjour"; public int greetTimes = 6; public boolean isHappy = true;  public Greeter(String greeting, int greetTimes, boolean isHappy) {     this.greeting = greeting;      this.greetTimes = greetTimes;     this.isHappy = isHappy;  }  public Greeter() {     this.greeting = greeting; }  /**  *  main method for testing outside BlueJ   */ public static void main(String[] args) {     Greeter hi = new Greeter();     hi.go(); }  public String getGreeting() {     return greeting; }  public void setGreeting(String greeting) {     this.greeting =  greeting; }  public int getgreetTimes() {     return greetTimes; }  public void setgreetTimes(int greetTimes) {     this.greetTimes = greetTimes; }  public boolean getisHappy() {     return isHappy; }  public void setisHappy(boolean isHappy) {     this.isHappy = isHappy; }  }

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?


Page:   Even the hint on question submission is practically the same.  Furthere investigation shows that has been made by these people:

Since the source code for this site isn't available for purchase or external use, I'm looking for software that can run a Q&A environment similar to Stack Exchange. Are there any such pieces of software available?


I would like to create a public/private keypair and upload the public key to a server that I want to log onto.  However, that server has already been configured to allow no password authentication of any kind - only key based authentication is allowed.  How do I upload my public key to that system ?  I have no way to log in ...  Just to be clear - I understand very well how to scp my public key to the remote .ssh/authorized_keys file - that is not the issue - the problem is, if password auth is disabled, how can I get the key to them in the first place ?

How can I add public keys to a host from unauthorized clients after disabling PasswordAuthentication?  I have one client registered to the host via public key. I need to add additional clients. Do I need to turn on PasswordAuthentication every time I need to add a new key?  Is there a different scheme for accomplishing this task that I'm not aware of?


I am trying to send email  with help of my web page. I am using my Gmail id for that. I am getting error :   A connection attempt failed because the connected party did not properly respond after  a period of time, or established connection failed because connected host has failed to  respond 74.125.129.109:25   here is my c# code      using System;     using System.Collections.Generic;     using System.Linq;     using System.Web;     using System.Web.UI;     using System.Web.UI.WebControls;     using System.Net.Mail;     namespace sendmail     {       public partial class _Default : System.Web.UI.Page       {       protected void Page_Load(object sender, EventArgs e)       {       }       protected void btnSubmit_Click(object sender, EventArgs e)            {             MailMessage Msg = new MailMessage();             Msg.From = new MailAddress("email@gmail.com");             Msg.To.Add(txtToMail.Text);             Msg.Subject = txtSubject.Text;             Msg.Body = txtMessage.Text;             Msg.IsBodyHtml = true;                 SmtpClient smtp = new SmtpClient();             smtp.Host = "smtp.gmail.com";             System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential();             NetworkCred.UserName = "email@gmail.com";             NetworkCred.Password = "mypassword";             // smtp.Timeout = 10000;             smtp.DeliveryMethod = SmtpDeliveryMethod.Network;            smtp.UseDefaultCredentials = false;             smtp.Credentials = NetworkCred;             smtp.Port = 25;             smtp.EnableSsl = false;             smtp.Send(Msg);        lblMsg.Text = "Email has been successfully sent..!!";             }        }  }

Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show.   Is it possible to do it?


I would like to increase the depth of my table of contents in the following (or a similar) way:   Part I  Chapter 1  A.  1.  1.1  1.1.1  1.1.1.1  B.  2.  2.1  ... and so on.  How could I do that? Thanks.

I have a table of contents (\tableofcontents) in my document. How can I hide subsections in it? I want that only names of sections are displayed there.


I want to have river paths and Parks/natural/Landscape shapefiles in our region:   How should I export this layer to a shapefile?  Before this I googled it a lot but I couldn't find anyway.

I do not want to download the whole map of an area. I just want rivers and other waterbodies present in an area in shapefiles so that I can use them in QGIS. I tried geofabrik but it is giving whole map and that also of full country while i need data of a city. Right now I am trying JOSM. will update you when it will works.


I am a photography buff. I got my first DSLR camera 5 months ago ...and I need a flash to improve night-portraits  and indoor shots! the problem is that I don't have enough information about external flashes and as I read more about it, I'm more confused.. so I would be glad if somebody would tell me what is the basic functions and factors I should look for, and it would be nice if you suggest types and names with a price around 300$-420$. (I have nikon D7000 with 18-300mm 3.5-5.6)  Thanks:)

I have read a lot about the SB-800/SB-900 but I am on a low budget (around ~120$). Is there an external flash that I can have to start learning to use it? I do not need TTL compatibility so it can be an older model. I have a Nikon D5000.


Evaluate $$\sum_{n=1}^{\infty}\frac{(-1)^n}{(2n+1)3^n}.$$  -A solution related to converting it into power series and then applying integration will be appreciated! I cant seem to express it as a power series.

Why is $\arctan(x)=x-x^3/3+x^5/5-x^7/7+\dots$?  Can someone point me to a proof, or explain if it's a simple answer?  What I'm looking for is the point where it becomes understood that trigonometric functions and pi can be expressed as series.  A lot of the information I find when looking for that seems to point back to arctan.


I believe I read on the internet that quantum mechanics predicts that the fundamental laws are time invertible. The web page probably really meant one theory predicts that. Does that theory combined with the big bang theory or some other beginning of time theory really predict an arrow of time at the macroscopic level? If so, how is it possible that it predicts that?

This is an attempt to gather together the various questions about time that have been asked on this site and provide a single set of hopefully authoritative answers. Specifically we attempt to address issues such as:   What do physicists mean by time? How does time flow? Why is there an arrow of time?


this is my first post on this site (but I will have more, have no doubt), so if I have posted in the wrong section or something please forgive me.  Anyway, I am currently doing a battery powered pc build and I have wired up a DPDT mechanical relay to automatically switch between a battery and a 12V regulated powersupply. The problem I have run in to is that the amount of time when the relay actually switches over from one pin to the next is too long and it will shut off my dc-dc powersupply for the computer (it is an M4 ATX PSU). My first thought was to try to find a make-before-break relay but those seem scarce and may damage my lithium battery. The other idea that I had was to maybe use a capacitor bank to supply the necessary 20A at 12V for about 10-50 milliseconds, but I have honestly no idea how to find the right size of capacitors for the job. I might have to deal with the shut-down when plugging it in if the capacitor bank is too large because space is tight in the case I'm building.  Thanks for your help, Kevin

Two sources of power:   12V switched power supply (primary) 12V deep cycle lead acid battery (secondary)   Note: In practice the switched power supply voltage will be adjusted to match the actual voltage across the battery when it is connected to the load.  12V Relay:   NO connected to secondary power supply NC connected to primary power supply Relay coil connected to primary power supply   Load (12V):   Surveillance cameras Network attached storage Router Assume Total 10A   Simplifications:   safety precautions such as fuses ignored for now, battery Ah, run time etc. ignored for now, why am I doing this ignored for now.   Question:   When the relay switches from one power supply to the other there will be a temporary open circuit.  How do I calculate capacitor size to use? The open circuit time is unknown but can I assume it is say 10ms?   Solution? Charge:  $$Q = 10\text{ms} \cdot 10\text{A} = 0.1\text{C}$$  $$Q = C \cdot V$$  Capacitor size:  $$C = \frac{Q}{V} = \frac{0.1}{12} = 8,333 \mu \text{F}$$  Now I realize that this means that at the end of 10ms the Voltage is zero. So I figured I'd ask for some advice:)


Given the following series:  $$\sum_{n=1}^{+\infty} \frac{|\cos n|^n}{n}$$  (being a series with non-negative terms), does it converge or diverge?  Unfortunately, I can't prove in any way or convergence or divergence of this series. Any ideas?

Is the series  $$ \sum_{n=1}^\infty \frac{|\sin n|^n}n\tag{1}$$  convergent？  If one want to use Abel's test, is   $$ \sum_{n=1}^\infty |\sin n|^n\tag{2}$$  convergent？  Thank you very much


How do you show that the infinite product of $(3n+1)/(3n+2)$ converges to zero without using the gamma function (as I can tell the gamma function solution has already been presented here)?  I've tried using a number of different strategies, but I still don't seem to be able to land on a good approximation.

I managed to prove it by rewriting the partial products in terms of $n!$ and then applying Stirling's approximation. But I was wondering if there is a more elementary method to show that the limit is zero, without using such heavy machinery.  Also, is it true that in general $$\prod_{n=0}^\infty \frac{an+b}{an+c}=0, \qquad a>0\ \textrm{and}\ c>b$$


I am building a signUp page in which i want a date picker but whenever i click on User Fragment to open Sign up Page then the app crashes, and the error is nullPointerException in EditText. Please Help me to solve it.  Here is the Code of UserFragment.java  public class UserFragment extends Fragment { public EditText et_Date; public static final int REQUEST_CODE = 11; String selectedDate; private OnFragmentInteractionListener mListener; public DatePickerDialog.OnDateSetListener setListener; View view; public UserFragment() { } public static UserFragment newInstance() {     UserFragment fragment = new UserFragment();     return fragment; } @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     view = inflater.inflate(R.layout.adduser_fragment, container, false);     et_Date  = (EditText) view.findViewById(R.id.etdate);     final FragmentManager fm = ((AppCompatActivity)getActivity()).getSupportFragmentManager();     et_Date.setOnClickListener(new View.OnClickListener() {          @Override         public void onClick(View v) {             AppCompatDialogFragment newFragment = new DatePickerFragment();             newFragment.setTargetFragment(UserFragment.this,REQUEST_CODE);             newFragment.show(fm, "DatePicker");         }     });     return view; }  @Override public void onActivityResult(int requestCode, int resultCode, Intent data) {     if(requestCode == REQUEST_CODE && resultCode == Activity.RESULT_OK){             selectedDate = data.getStringExtra("SelectedDate");             et_Date.setText(selectedDate);     } }  @Override public void onAttach(Context context) {     super.onAttach(context);     if(context instanceof OnFragmentInteractionListener){         mListener= (OnFragmentInteractionListener) context;     }else{         throw new RuntimeException(context.toString()+"must implement OnFragmentInterationListener");     } }  @Override public void onDetach() {     super.onDetach();     mListener = null; } public interface OnFragmentInteractionListener {      public void onFragmentInteraction(Uri uri); } }

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 want to use the Fourier package for my personal LaTeX class but when MiKTeX wants to install it, it did not succeed... When compiling my minimal document, MiKTeX echoes me an error message (strangely only in the log file):  !pdfTeX error: pdflatex (file futr8r): Font futr8r at 604 not found  ==> Fatal error occurred, no output PDF file produced!   How can I solve this problem?  --  My example:  \documentclass[a4paper,11pt]{article} \author{Nicolas T} \date{\today} \title{CMWE}  \usepackage{lmodern} \usepackage{fourier}  \begin{document} \maketitle  This is a test. \end{document}   An other warning message:   Thanks for 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?


I have made some changes to effects using compiz config, however ever since doing this the launcher, taskbar, and borders around windows has disappeared.   I have tried reinstalling unity and compiz through terminal (via ALT-F1), but to no avail, any advice would be greatly appreciated.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


When TeX shrinks an equation, it only uses the shrink component of glue "at the outer level".  For instance, numerator/denominator of fractions are not shrunk, as shown by the example below: first I put the output of the code then the desired output (obtained by scaling \thinmuskip, \medmuskip, \thickmuskip by 0.8, it turns out).  \shipout\vbox{\hsize=140pt\relax   $${1+2+3\over 2-1}=1+2+3={1+2+3}$$} \bye     Is it possible in LuaTeX to make TeX shrink such glue that is in a sublist when necessary?  (I don't think it is possible in other TeX engines unless one takes over control of the full math typesetting, like in breqn.)  (This question is inspired by  where it was asked whether TeX could combine boxes in parallel.)

As generally acknowledged TeX offers superb formatting capabilities for math in an automated fashion. Nevertheless there are some areas with clear deficiencies  that one either has to accept or manually improve on a case by case basis.  One of the biggies in that respect is TeX's handling of sub-formulas (i.e., material inside a brace group, e.g., and index, but also any group on top-level). TeX sets such sub-formulas always in natural width even if the whole formula is subject to severe stretching or shrinking otherwise. As an example, consider the following (not very sensible) example:  \documentclass{article}  \newlength\x  \begin{document}  \newcommand\formula{$ a+\mathbf{b+c}+d+e+f = \sum_{i=1}^{n-x-y-z} x_{i+j}$}  \settowidth\x{\formula}  \hbox to \x{\formula}    % natural width  \addtolength\x{-20pt}  \hbox to \x{\formula}   % now shrink it a lot  \addtolength\x{100pt}  \hbox to \x{\formula}   % now stretch a lot in the opposite direction  \end{document}   The formula here has a number of obvious sub-formulas in the subscripts and superscript, but for illustration I also added a sub-formula via \mathbf. Of course the usage of \mathbf in this way is wrong!!! (it should not be applied to several symbols), but I'm sure you would find this in documents. In any case just {b+c} would have had the same effect here. Now what do you think happens if we run this?  This:    As one can see the naturally "boxed" sub-formulas are very wrong the moment the rest of the formula is subject to stretching or shrinking.  Until recently no TeX engine successor addressed this issue. With LuaTeX opening up a lot of the internals of TeX I had some hope that this would be different. However, upon studying the manual my conclusion is that this area (sor far it least) has not been addressed (or considered).  As far as I can see the only way something could be done in LuaTeX about this issue would be to  use the mlist_to_hlist callback. However, this would really mean replacing the full math typesetting algorithm, which of course could be a way to solve the problem but ... but what is needed is not that (as 99% of this algorithm is next to perfect) but to add support to not simply box sub-formulas at their natural width.  So long text ... here is the short question:   Is this analysis correct, or did I overlook something? And in case anybody knows: are there plans to look into the sub-formula issue and provide support for it eventually? (it is not listed on the "to-dos" for math)    In case somebody wonders that I talk about "this sub-formula issue" as if it is something like a known thing ... it is, it was already raised way back in  which at the time a some thorough (if not say heated) discussions.


$ U = \{A \in M_n\Bbb R : A^t = -A\}$ I need to show if the above subset of $M_n\Bbb R$ is actually a subspace So to show a subset is a subspace it must agree with the following criteria:     $U$ is not empty $u+v \in U$ for all $a \in \mathbb R$, $au \in U$   So my thinking is that U is not empty because if we let $A^t$ = 0 vector then $-A$ is still equal to the zero vector.  I am unsure of proving whether not criteria 2 or 3 is valid or not. Looking for some help.

Looking for some help with the following question. I have begun to understand the concept of subspaces, but not sure how to deal with transverse matrices.  So I need to determine which of the subsets of $M_n(\Bbb R)$ are actually subspaces:  1) $ U = \{A \in M_n\Bbb (R) : A^t = A\}$, 2) $ U = \{A \in M_n\Bbb (R) : A^t = -A\}$, 3) $ U = \{A \in M_n\Bbb (R) : A^t \neq A\}$.


I have to prove for (n > 0 and k >= 0, whole, non-negative numbers) that:  $$\binom{n+k}{k+1}=\sum_{l=1}^n \binom{n+k-l}k$$  Thanks for your help :)

Given the identity  $$\sum_{i=0}^{n} \binom{k-1+i}{k-1} = \binom{n+k}{k}$$  Need to give a combinatorial proof   a) in terms of subsets  b) by interpreting the parts in terms of compositions of integers  I should not use induction or any other ways...  Please help.


I have just bought a new HP 290 G3 Small Form Factor pre-built Desktop. Instead of dual-booting, I would like to erase the disk to install Ubuntu as the hard disk is not that big and I would like to save the space for storing a Windows OS. Have used Ubuntu for a few years, from 14.04 to 20.04 and I have never needed to switch back to Windows although I have dual-boot settings in my previous PC. The only concern is that with new hardware, I am not 100% sure if Ubuntu supports all the hardware and just in case if I need to switch back to windows, is there a way I can reinstall the windows that come with the pre-built PC? If yes, any preparation I will need to do before I install the Ubuntu?

I am new here. And I may replace a laptop's hard disk with Ubuntu. It's an HP Compaq notebook which has Windows 7 installed. So If I choose that install option, will it replace the screen that says F12 for boot options [actually it was esc]. I am just asking. I know that choosing that options erases your other partitions. I am assuming it gets replaced by grub2?


In Star Wars 3 after Order 66 was given, the clone troops were following their chain of command in service to the commander-and-chief of the Republic, Chancellor Palpatine. If their purpose was to serve and defend the Republic, regardless of the faked jedi uprising (in which they believed they were following orders), why didn't the clones turn on Palpatine to defend the Republic when he converted it to a Galactic Empire? Was it because the formation of the Empire was voted on by the Senate (where Padme said "So this is how liberty dies, with thunders applause.")?

From Chapter Twenty of the book Star Wars Republic Commando: True Colors:  In the event of Jedi officers acting against the interests of the Republic, and after receiving specific orders verified as coming directly from the Supreme Commander (Chancellor), GAR [Grand Army of the Republic] commanders will remove those officers by lethal force, and command of the GAR will revert to the Supreme Commander (Chancellor) until a new command structure is established.  After execution of Order 66, Palpatine might had explanations how Jedi were acting against the interests of the Republic. But, how did he explain the Empire which wasn't a new command structure but a fully different non-republican system? By announcing about his new Empire, he did act against the interests of the Republic himself. Why did GAR accept it? Despite Palpatine was commander of GAR (which was also as per laws of The Galactic Republic), clones weren't logic-less robots just to follow orders. In Star Wars: The Clone Wars TV series, clone troopers once ignored laws just to capture a dark Jedi. Why didn't GAR overthrow Palpatine after knowing the Republic was at risk?


My old adapter input is 100-240 V and 0.6 Amps;  output is 12V and 0.5 amps  My new adapter input is 90-270V and 0.7 amps;  output is 12V and 1.5 amps  polarity matches  Is it safe to use? I know that output is OK, but what about the input? Is it required to be the same?

Possible Duplicate:        I have a Dell Vostro 1500 laptop, but unfortunately I lost the power supply in Indianapolis last month. I have a power supply for an old Sony laptop lying around, that looks like it fits in the same port.  Is it safe to use the old power supply in the new laptop? If they're not compatible will it simply not work, or will it reverse the polarity and open a gate to Zuul or something similar?  (A new PSU is on order, but UPS failed to deliver it yesterday and I need it today, hence this stopgap solution.)  Thanks!


I have the following table which I have readjusted using adjustbox. However, the font size is too small now. How to solve this issue? \begin{table}[htbp]   \centering   \caption{Add caption}   \begin{adjustbox}{width=\textwidth}     \begin{tabular}{rrrrr}     \toprule     \toprule           &       &       &       &  \\ \cmidrule{2-5}          & \multicolumn{1}{l}{Professional, Managerial, Technical} & \multicolumn{1}{l}{Clerical, Sales} & \multicolumn{1}{l}{Production, Operators} & \multicolumn{1}{l}{Service} \\ \cmidrule{2-5}    \multicolumn{1}{l}{\textit{Non-routine cognitive}} &       &       &       &  \\     \multicolumn{1}{l}{O*NET non-routine cognitive analytic} & \multicolumn{1}{c}{1.19} & \multicolumn{1}{c}{-0.30} & \multicolumn{1}{c}{-0.38} & \multicolumn{1}{c}{-0.93} \\           & \multicolumn{1}{c}{(0.43)} & \multicolumn{1}{c}{(0.69)} & \multicolumn{1}{c}{(0.67)} & \multicolumn{1}{c}{(0.98)} \\     \multicolumn{1}{l}{O*NET non-routine cognitive interpersonal} & \multicolumn{1}{c}{1.03} & \multicolumn{1}{c}{-0.34} & \multicolumn{1}{c}{-0.38} & \multicolumn{1}{c}{-0.42} \\           & \multicolumn{1}{c}{(0.87)} & \multicolumn{1}{c}{(0.65)} & \multicolumn{1}{c}{(0.82)} & \multicolumn{1}{c}{(0.75)} \\     \multicolumn{1}{l}{\textit{Routine cognitive and manual }} &       &       &       &  \\     \multicolumn{1}{l}{O*NET routine cognitive} & \multicolumn{1}{c}{-0.23} & \multicolumn{1}{c}{0.45} & \multicolumn{1}{c}{0.19} & \multicolumn{1}{c}{-0.52} \\           & \multicolumn{1}{c}{(0.81)} & \multicolumn{1}{c}{(1.09)} & \multicolumn{1}{c}{(0.69)} & \multicolumn{1}{c}{(0.91)} \\     \multicolumn{1}{l}{O*NET routine manual} & \multicolumn{1}{c}{-0.86} & \multicolumn{1}{c}{-0.48} & \multicolumn{1}{c}{0.98} & \multicolumn{1}{c}{0.05} \\           & \multicolumn{1}{c}{(0.57)} & \multicolumn{1}{c}{(0.64)} & \multicolumn{1}{c}{(0.66)} & \multicolumn{1}{c}{(0.69)} \\     \multicolumn{1}{l}{\textit{Non-routine manual }} &       &       &       &  \\     \multicolumn{1}{l}{O*NET non-routine manual} & \multicolumn{1}{c}{-0.81} & \multicolumn{1}{c}{-0.59} & \multicolumn{1}{c}{0.95} & \multicolumn{1}{c}{0.14} \\           & \multicolumn{1}{c}{(0.55)} & \multicolumn{1}{c}{(0.51)} & \multicolumn{1}{c}{(0.76)} & \multicolumn{1}{c}{(0.47)} \\           &       &       &       &  \\     \bottomrule     \end{tabular}%     \end{adjustbox}   \label{tab:addlabel}% \end{table}%

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


I have read that in Mexico there is a project to build a network of distribution lines (over 1000 km), generators and substations using direct current rather than alternating current. These are rated to provide 3000 MW.  As far as I understand this would require too many substations to compensate for losses (due Joule effect) and the physical size of the lines would be too large.    Isn't this highly inefficient and too expensive?

In  (scrolled to 5:55) there's a claim that replacing an AC high voltage transmission line with a high voltage DC transmission line allows for having seven times fewer powerlines (the video shows how seven lines evaporate, then one line appears and the cutting in the forest gets narrower).  How is that possible? I've read the  and it claims that     The power delivered in an AC system is defined by the root mean square (RMS) of an AC voltage, but RMS is only about 71% of the peak voltage. The peak voltage of AC determines the actual insulation thickness and conductor spacing.   but that doesn't explain seven times less power lines.  How is such massive (seven times) saving possible when switching from AC to DC transmission?


Can I use a Canon 430 ex speedlite with a Nikon d90 DSLR? I want to buy a Nikon D90 and use the existing Canon 430 ex.  Would it work in TTL or manual mode?

I was just thinking about this problem and was wondering if anyone knew if/how to use a competing flash unit (EX or SB series) on a Nikon or Canon (respectively) camera.  I would assume a lot of the brand-specific flash features may not work (wireless for example) but would the manual flash-on-the-hotshoe work fine?  If it is possible, what features are or are not available?  I was thinking about how, for example, in a teaching situation, you could use a single flash on both brands of camera.


The following MWE  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*}         F_1(p) & = 1-\frac{L_0(\underline{c}_1-p)+\mu \underline{c}_1}{\mu p} & \text{ for } p\in \left[\frac{cL_0}{L_0+\mu},c \right] \\         F_{02}(p) & =\begin{cases} 1-\frac{L_1\left(\frac{cL_0}{L_0+\mu}-p\right)+\mu \frac{cL_0}{L_0+\mu}}{\mu p} & \text{ for } p\in \left[\frac{cL_0}{L_0+\mu},c \right) \\                                     1 & \text{ for } p\geq c,                      \end{cases}     \end{align*} \end{document}   produces    How can I modify the code to achieve alignment at the equals signs and the "for" statements?

I have the following code:  \begin{align} & a+b+c+d+e+f = 15000 & \text{for } a = 1 ... 15  \\ & D_t=  \begin{cases}    \text{equation} , & \text{for } t = 1 ... 10 \\    \text{another equation} , & \text{for } t = 1 ... 10 \\ \end{cases}  \end{align}   This produces the following:   However, I would like the "for" arguments in cases to be aligned to those in the align environment, which would look something like:    I was wondering if there is a way of doing this automatically, rather than using manual spacing. I have tried using arrays, however it didn't seem to solve the issue.  Thank you.


How to remove the text "LaTeX tutorial/STA9700 Project/fig1.jpg" above the figure:    my code:  \usepackage{graphicx} \usepackage{float}  ......  \begin{figure}[H]     \centering     \includegraphics[height=3in]{E:/Dropbox/learning Latex/LaTeX tutorial/STA9700 Project/fig1.jpg}     \caption[Optional caption]{CHN vs. US in 2008 Olympics}     \label{fig: Cover Picture} \end{figure}

I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces.   also discusses this subject, but there is no solution there.  My compilation routine is latex->dvips->ps2pdf (because of PSTricks).


I want to print Multiple characters from a txt file. Example: I have a test.txt , inside a long string HELLOWORD HELLOWORD HELLOWORD HELLOWORD HELLOWORD HELLOWORD HELLOWORD HELLOWORD HELLOWORD HELLOWORD   I want to print the first byte H then then skip 5 bytes and print the O then skip 5 bytes and print L until the end. I tried cat test.txt | cut -b 1,7,13... but I want to know if there is an other command to do it without giving the position of each byte knowing that I have to skip 5 bytes and print the byte after.

This line of code does exactly this except I want it to start at the first character not the 7th. $ echo 1234567890abcdefghijklmnopqrstuvwxy | sed 's/.\{1,7\}\(.\{0,1\}\)/\1/g'  What I'm looking for is 19gow


---- Minecraft Crash Report ---- // I let you down. Sorry :(  Time: 6/08/18 5:18 PM Description: mouseClicked event handler  java.lang.OutOfMemoryError: Java heap space   A detailed walkthrough of the error, its code path and all known details is as follows: ---------------------------------------------------------------------------------------  -- Head -- Thread: Client thread Stacktrace:     at cjs.a(SourceFile:433)  -- Affected screen -- Details:     Screen name: cmn Stacktrace:     at cjs.a(SourceFile:433)     at cfk.a(SourceFile:83)     at cfk$$Lambda$774/849031967.invoke(Unknown Source)     at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36)     at org.lwjgl.system.JNI.invokeV(Native Method)     at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3108)     at cfs.a(SourceFile:320)     at cfi.c(SourceFile:872)     at cfi.a(SourceFile:392)     at net.minecraft.client.main.Main.main(SourceFile:144)  -- System Details -- Details:     Minecraft Version: 1.13     Operating System: Windows 8.1 (amd64) version 6.3     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 15300784 bytes (14 MB) / 268435456 bytes (256 MB) up to 268435456 bytes (256 MB)     JVM Flags: 10 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M -Xmx256M     Launched Version: 1.13     LWJGL: 3.1.6 build 14     OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.3574, Intel     GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.      Using VBOs: Yes     Is Modded: Probably not. Jar signature remains and client brand is untouched.     Type: Client (map_client.txt)     Resource Packs:      Current Language: English (US)     Profiler Position: N/A (disabled)     CPU: 2x Intel(R) Celeron(R) CPU N2840 @ 2.16GHz

Similar to  on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved.


For $S_6$,the possible orders are 1,2,3,4,5,6.  While for $A_6$, the possible orders are 1,2,3,4,5 but not 6.  Why does $A_6$ neglects the 6-cycle in $S_n$ which also has 0 number of 2-cycles and hence an even permutation .  I was going to upload the image of possible orders of $S_6$. but error pops up that I can't upload it .

$$\sigma=\begin{pmatrix} 1 & 2 &3 & 4& 5& 6&7 &8 &9 &10 & 11 \\ 4&2&9&10&6&5&11&7&8&1&3    \end{pmatrix}$$  (1) I am asked to write this permutation in $S_{11}$ as a product of disjoint cycles and also as a product of transpositions.   (2) Also find the order of the element. Is this permutation even or odd?  I think these are the disjoint cycles  $E_{1}=(1,4,10)$, $\;\operatorname{order}E_1 =3$  $E_{2}= (3,9,8,7,11),\;$ $\operatorname{order}E_{2} =5$  $E_{3}=(5,6),\;$ $\operatorname{order}E_{3} =2$  $S_{11}$=  $E_{1} \cdot E_{2}\cdot  E_{3}$  The order of $\operatorname{order}E_{3}$ is even so the order of the permutation is even. Why are they asking this? And what is the significance of it being even or odd?  Transpositions – I have read this a couple times but the one example in my textbook is rather unclear, I am not sure what this means?  I think the transposition for $E_{1}$ is $(1,4)(1,10)$ but I'm not sure what this means.


Is it the same as the iphone 6 or is the iphone 8 stronger? Does it still use 2 LEDs?

The iPhone 6 has a dual-LED flash. What are the color temperatures of the two LEDs? Are there any commonly occurring light sources or scenes that are outside this range? For example, a sodium vapor lamp at 2700K?


And how do I change it, to the current year, 2019?

My iPhone 5's Calendar shows the year as 2559 BE and I'm unable to change that to the current year.


I have a question is there a way to downgrade from ios 7 to ios 6 with an iphone 5?  please tell me yes i hate this update lol

I recently attempted to follow  to upgrade my device (iPhone 4) to iOS 7 without being a developer or registering a UDID.   I loaded and installed iOS 7 and got to the configuration screen. However efter attempting to go through the configuration process it says:     We’re unable to complete your activation. This device is not   registered as part of the iPhone Developer Program. If you are a   member of the Program, please register your device in the iPhone   Developer Program Portal.   The problem is this is also what it says on iTunes so there is no way to access it from the computer.   How can I downgrade back to 6.1.3? I suppose I could register as a paid developer for iOS 7, but that involves forking over $99 and I'm not even sure I could revert to iOS 6 even then.  Additional Information:   I started with an unjailbroken iOS 6.1.3. I downloaded iOS 7.0 CDMA for iPhone 4 from  I have Verizon I Have the iOS 6.1.3 version for my iPhone downloaded from , but I am unsure how I can restore from it because iTunes will not let me do anything because of the above mentioned message.    Update: I managed to entere recovery mode by pressing "power" for 3 seconds, "home" and power for 10 seconds, and just "home" until it had entered recovery mode. I have then begun to restore the phone which requires iOS 6.1.3 to download again through iTunes. Note that the first time you restore it may not work. Mine still booted to iOS 7 until I tried again.


I would like my [a,o,i,e] to appear correctly if I type the letter after an '.  Right now, I get an accent character as shown in the subject. Is there any way to turn this off?

Whenever I try to insert " or ' I have to validate it by space, otherwise strange things happen as with ' followed by an a becomes áinstead of just 'a, similar behaviour with double quotes. I find this annoying and want to disable it. How do I do that?


Looking at converting from Windows XP to Ubuntu.  Need to know if Ubuntu can open and update Microsoft Word files.

Can I open Microsoft Word and Excel files with Ubuntu?


The basilisk venom is one of the few things that can destroy Horcruxes. In Harry's encounter with Tom Riddle, he ends up getting bitten by his basilisk which should've destroyed Voldemort's piece in Harry which ends up becoming a big plot twist in later books. Therefore, the venom should've destroyed Voldemort's soul. Why didn't it?

As the title asks, why didn't the basilisk bite received in the Chamber of Secrets destroy the Horcrux inside the bitten person?   Yes, I know Fawkes quite quickly healed the bite wound with his phoenix tears, but when Harry used the basilisk fang to destroy Tom Riddle's diary the destruction of that Horcrux was immediate. When Ron hit the locket with the Sword of Gryffindor, it was destroyed immediately. Although the destruction of the ring occurred off-page, Dumbledore used the Sword of Gryffindor to destroy it, so presumably, like the locket, it was gone right away. Nagini died straightaway when Neville decapitated her. The destruction of the Hufflepuff cup happens off-page. The diadem seems to have been destroyed by Fiendfyre immediately as well, as when Harry examined it outside the Room of Requirement it was already leaking a blood-like substance, and then it cracked in half. When Voldemort hit Harry with Avada Kedavra in the forest, Harry woke up in limbo with the last fragment of Voldemort's soul - that awful flayed baby-like being - separated from him immediately.   Is there a logical/canon-based explanation for why the fragment of Voldemort's soul residing in Harry wasn't destroyed upon Harry being bitten by the basilisk?  NOTE: I've read the HP Wiki's entry on Horcruxes; however, I find the HP Wiki to be inconsistent in its accuracy, so I'm hesitant to accept the Wiki's explanation on the matter. I'd prefer an explanation constructed from information in the books or a statement by JKR, or the like.


I think that making reputation temporary will increase constant participation, since the reputation will slowly decrease if they do not participate and gain more reputation. I thought of two ways to do this: deterioration and expiration. Deterioration Deterioration is basically taking a certain amount or fraction of your reputation away after a period of inactivity. Some examples of rules would be like taking away 5 rep. per every 30 days of inactivity or 5% of your rep. for every 45 days of inactivity. This would force you to be active so you would not lose rep. Expiration Expiration is basically when reputation (specifically from upvoting) expires at a certain date after retrieval. It is not based on inactivity. The idea is that you gain reputation about everyday to keep it at a stable level. Deterioration and expiration can be combined so only a certain part of the total rep. gained will expire. The Questions at Hand Is the constant decreasing of reputation a good idea? Even if the answer to the previous question is wrong, would deterioration or expiration be better? What rules would be used? And in addition to all those questions, why so? Note: I thought of specifically applying this to voting only.

While looking at the SO question  It occurred to me that this was an extremely simple question with an extremely simple answer.  And yet, it has garnered the OP thousands in upvote points, simply because he was the first one to ask this question in the early days of SO.  There are many examples of these simple questions and I believe they don't accurately model a user's participation in the SO community.  People shouldn't be getting thousands or even tens of thousands of points from a question just because they were lucky enough to get it in the system a while ago.  Another related issue is that the non-expiring point system rewards users for seniority.  Simply put, the longer you're around SO, the higher your score will be.  While there's some merit to this, it seems to have a disproportionate effect.  So what can we do to limit these effects?  I'm just brainstorming but here are a couple ideas:   Automatically close voting on questions after a certain time period.  Good questions will still be rewarded, but they won't give disproportionately large rewards simply because they are really old questions. Expire users' points after a certain time period.  If you expire users' points after, say 3 months, then this will force them to stay active and their points will be more a reflection of "How much have you participated lately"?  It forces old users to stay active rather than resting on their laurels, and allows junior members a chance to catch up to senior members of the community by putting in a lot of effort.  Currently, there is no chance at all for junior members to ever catch up with senior members and their only 'sin' is that they didn't register 5 years ago.


I have a script that allows a cube to be moved using WASD. I'd like to avoid having to use actual keyboard input for that and thought about creating a separate file with commands like "Wkey" and such. I'd then have a function read through the file and have the agent respond to the commands in the file accordingly. Is this possible/if so, how would I go about doing it? (New to blender/still relatively new to python honestly)  Script below:   import bge   def main():      cont = bge.logic.getCurrentController()     own = cont.owner      keyboard = bge.logic.keyboard      wKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.WKEY]     sKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.SKEY]     aKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.AKEY]     dKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.DKEY]      if wKey:          own.applyMovement([0,0.2,0],True)      if sKey:          own.applyMovement([0,-0.2,0],True)      if aKey:          own.applyMovement([-0.2,0,0],True)      if dKey:          own.applyMovement([0.2,0,0],True)  main()

I need to run some basic physics simulations on a headless machine and I'd like to program agent movements based on function outputs (e.g. "move left")-I have some code that programs WASD to move a cube that I'd like to modify such that it doesn't actually require me to press any keys but rather, if the program receives "Wkey" as an input (from another function) it's able to move the agent in the desired direction. Is this possible? (I also want to try to avoid using the logic editor to run the script if possible, any help on that would also be appreciated)    Current code below:   import bge   def main():      cont = bge.logic.getCurrentController()     own = cont.owner      keyboard = bge.logic.keyboard      wKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.WKEY]     sKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.SKEY]     aKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.AKEY]     dKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.DKEY]      if wKey:          own.applyMovement([0,0.2,0],True)      if sKey:          own.applyMovement([0,-0.2,0],True)      if aKey:          own.applyMovement([-0.2,0,0],True)      if dKey:          own.applyMovement([0.2,0,0],True)  main()


We are using Ubuntu Server 18.04, and is supposed to have 5 years of support, but we also need a graphical GUI and we want to install Xubuntu packages.  Since Xubuntu 18.04 only has 3 years of support, what's going to happen with this server after those 3 years?. Are we going to face security issues? All the server is "downgraded" to only 3 years of support?.

I still have Ubuntu 10.04 LTS Desktop on my systems.  10.04 Desktop has reached end of life.  I understand that means there will be no more security updates for this product.  Is that correct?  Ubuntu 10.04 LTS Server is still supported for another year.  Will the security updates for the Server work for the Desktop?   If I do an update from the 10.04 LTS Desktop, what gets updated?  Any kernel updates?


Could someone assist me in proving that the maximum of a convex function is also convex using the below definition? I cannot figure out how this proof would work and would appreciate some help!  $$ f(\lambda x +(1-\lambda)y) \le \lambda f(x)+(1-\lambda)f(y) $$  $$ \lambda \in[1,0] $$  Thank you!

Here's a homework question I'm struggling with:  Let $f,g$ two convex functions. Prove that $h(x)=\max\{f(x),g(x)\}$ is also convex  I don't know where to begin. The only thing I had in mind was was to try proving that if a function is convex on two sets $A$ and $B$, it is also convex on their union. That does not seem right though, for example, if I glue together $f(x)=x^2, g(x)=\frac{x^2}{1000}$ where $f$ is defined on $[0,1]$ and $g$ on $(1,2]$. Anyway, that was the only thing I thought about. Any better ideas? thanks!


Q. A class has 100 students. Let a[i], 1≤i≤100, denote the number of friends the i-th student has in the class. For each 0≤j≤99, let c[j] denote the number of students having at least j friends. Show that ∑a[i] = ∑c[j].   1≤i≤100 and 0≤j≤99  My attempt: if we consider a class of 2 students, A and B, such that both are friends of each other. a[1]=1 and a[2]=1. Therefore, ∑a[i]=2, 1≤i≤2. And, c[0]=2 and c[1]=2. Therefore, ∑c[j]=4, 0≤j≤1 so, ∑a[i] ≠ ∑c[j]. Am I making any mistake in my attempt. Please help me out.

In a class there are 100 student. We define $A_i$  as the number of friends of $ i^{th}$ student and $C_i$ as the number of students who has at least $i$ friends.  Prove that: $\sum_1^{100} A_i = \sum_0^{99} C_i$


I've observed two Poisson processes and my goal is to determine whether they came from the same process or not. Is there a test to determine this?

This is an elementary question, but I wasn't able to find the answer.  I have two measurements: n1 events in time t1 and n2 events in time t2, both produced (say) by Poisson processes with possibly-different lambda values.  This is actually from a news article, which essentially claims that since $n_1/t_1\neq n_2/t_2$ that the two are different, but I'm not sure that the claim is valid.  Suppose that the time periods were not chosen maliciously (to maximize the events in one or the other).  Can I just do a t-test, or would that not be appropriate?  The number of events is too small for me to comfortably call the distributions approximately normal.


Which is correct:     I am excited to see these guys growing up.   or      I am excited to see these guys grow up.   Having hard time figuring out how to use gerunds in a sentence.

"Heard me [infinitive]" vs. "heard me [present participle]"             At that time, you wouldn't have heard me talk about it.   At that time, you wouldn't have heard me talking about it.         At that time, you wouldn't have heard me condemn it.   At that time, you wouldn't have heard me condemning it.         Which one of the above sentences are incorrect and why?


The Shannon entropy $I(P)$ of a probability vector $P \in [0,1]^{n}$ is given by $I(P) = - \sum_{\gamma = 1}^{n} P_{\gamma} ln(P_{\gamma})$ I want to show that $I(P)$ is well defined i.e., $lim_{x \rightarrow 0} xln(x) = 0$ Does someone have any idea how can I do that? Thanks!

Is there a way of showing this limit without using L'Hopital's rule? Specifically using the substitution $u = -\log{x},$ with knowledge of the limit of $\lim_{x\to0+}\log{x}.$ Thank you.


My hard drive got full yesterday and some weird things started to happen, like uGet not working anymore and the trash can not emptying. I switched to another OS and cleaned some stuff in the Xubuntu's partition. However, when I restarted the computer, the login GUI changed to this and I can't fix it.    Does anyone know how to get back the original Xfce interface?

The login screen appears in a much older style:    Output of cat /etc/X11/default-display-manager:  /usr/bin/xdm   How can I change it back to normal?


In an application I am writing, I require the user to state a contact's full name.  I have a disagreement with my marketing director regarding the correct wording for when the user doesn't know the full name. I want to help this user and so I am giving him a tip on what to do when the contact's full name is not known. The tip has a title then a body with an explanation of what to do.   My question is, what should be the title of this tip? Is it “Not sure what the contact’s full name is? or “Not sure what is the contact’s full name"?  When is it correct to use either? There is a similar question here but I didn't fully understand it or whether it pertains to my phrase:    Thanks.

I believe the sentence in the title is grammatically correct.   Recently I've seen too many people writing it this way:     I'm not sure what is the right way.   Is it grammatically correct as well? Maybe in a different sense? Or simply misuse by non-native speakers?


In my application (PHP) I am going to request ~3000 rows from an API and insert these in a MySQL table using the PDO driver.  Although the data to be inserted isn't user input, it is out of my hands how the data is handed to me.  Because it is important that the ~3000 inserts go as fast as possible I want to use a multiple insert like so (?,?,?),(?,?,?),....  I was wondering whether doing a multiple insert has effect on the vulnerability for a MySQL injection? Because I 'build' the query using PHP code.  My 'test' code is:  <?php      class DBCon {         private static $instance = null;         private $db;          private function __construct() {             $this->db = new PDO('mysql:host=localhost;dbname=test;charset=utf8mb4', 'root', '');             $this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);             $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);         }          public static function getDB() {             if (self::$instance === null) {                 self::$instance = new self();             }             return self::$instance->db;         }     }      function createItems($array) {         $sql = 'INSERT INTO `table`(`text`, `int`, `bool`) VALUES ';          $insertArray = array();         foreach ($array as $arrayItem) {             $sql .= '(';             foreach ($arrayItem as $arrayItemItem) {                 array_push($insertArray, $arrayItemItem);                 $sql .= '?,';             }             $sql = rtrim($sql, ',');             $sql .= '),';         }         $sql = rtrim($sql, ',');          var_dump($sql);         var_dump($insertArray);          try {             $query = DBCon::getDB()->prepare($sql);             $query->execute($insertArray);         } catch (PDOException $e) {             echo '

query failure';         }     }      $array = array(array('a piece of text',123,0),array('a piece of text',123,0));      createItems($array);   $sql contains:  index.php:36:string 'INSERT INTO `table`(`text`, `int`, `bool`) VALUES (?,?,?),(?,?,?)' (length=65)   $insertArray contains:  index.php:37: array (size=6)   0 => string 'a piece of text' (length=15)   1 => int 123   2 => int 0   3 => string 'a piece of text' (length=15)   4 => int 123   5 => int 0

Let's say I have code like this:  $dbh = new PDO("blahblah");  $stmt = $dbh->prepare('SELECT * FROM users where username = :username'); $stmt->execute( array(':username' => $_REQUEST['username']) );   The PDO documentation says:     The parameters to prepared statements don't need to be quoted; the driver handles it for you.   Is that truly all I need to do to avoid SQL injections?  Is it really that easy?  You can assume MySQL if it makes a difference.  Also, I'm really only curious about the use of prepared statements against SQL injection.  In this context, I don't care about XSS or other possible vulnerabilities.


I was rendering a bezier curve made on Blender Cycles in 4K resolution but it looks pretty awful, it looks too pixelated and the image doesnt even looks like the curve on preview, how can i configure this?

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


In some examples in which I have an example (especially a multi-tier one) made in an example environment with gb4e, there's a huge gap between the the \glt line and the one directly above it. This looks terrible on the page. I'm not sure why this happens.  \begin{exe} \ex  {\glll  x y z\\  \{ x-acc y-decl z-nom \\ eks why zee\\}  \sn{\glll a b c. \\  a b c \}\\ ay bee see \\ \glt `Chickens like catfood, in my pasta factory.' [Garbo-R124-1]} \label{pastafact} \end{exe}

I notice if I take away some letters, the translation line goes to where it should be, but this big block of white space is pretty untenable. Ideas?    \documentclass[11pt,a4paper]{book}  \setcounter{secnumdepth}{4} \usepackage{gb4e} \usepackage{tipa} \usepackage{setspace} \usepackage[T1]{fontenc} \begin{document} \begin{exe} \ex \glll Jichax    Qamaqix lij parki,  aynacha,    amsta,  parki, q'awanaks,   khuyt'asis  sarawjchix. \\ \{jicha-x(a)    Qamaqi-x(a) lij(u)  parki   aynacha amsta   parki q'awa-nak(a)-_{c}$\oslash$-s(a)   khuy(u)-t'a-s(i)-s(a)   sara-wj(a)-ch(i)-i-x(a)\}    \\ now-\textsc{top}    Fox-\textsc{top}    all acclivity   declivity   ascent  acclivity ravine-\textsc{pl-acc-ad} whistle-\textsc{m}-\textsc{refl}-\textsc{subr} go-\textsc{bfr-cnj-3sim-top}\\ \glt `And so, Fox must've gone whistling on all the ascents, slopes, ascents, mountainsides, and even in the ravines.' \end{exe} \end{document}


Is there anything special to know before using powdered vanilla?  I use the liquid vanilla extract quite a bit in making a lot of things, especially chocolate and key lime puddings but am looking for alcohol free and organic form. It sounds like the powdered form provides a stronger flavor which sounds good to me. Thank you for being there.  This is a tremendous offering for people who want to create great foods...

What is the difference among the vanilla extract and the powdered vanilla?  When I'm making a certain recipe if it required vanilla extract, is it ok to replace it with powder, and what is the proportion among them?  I am intending to use powdered vanilla in a buttercream recipe from , is it recommended to substitute?


In Program 1 I have declared two String and initialized them as "MADAM". When running I am checking the equality of their reference variable (by '==' operator') then I am getting a "true" response.  But in Program 2  I am declaring a String 'S' and initialize it as "MADAM". After that i am running a reverse loop and storing the characters of 'S' in reverse order in other String variable.  Now i have again tried to check the equality of reference variable (by '==' operator') and am getting the response as 'false'.  As both the String objects are of same value and are stored in constant Pool Area so both the variable should equate and the output in both the scenario should be 'true'. But WHY it is not same?  Program 1: class Reverse {     public static void main(String[] args) {              String s="MADAM";     String rev="MADAM";      System.out.println(s==rev);   } }   Output - true  Program 2: class Reverse {     public static void main(String[] args) {              String s="MADAM";     String rev="";        for(int x=s.length()-1;x>=0;x--)     {         rev+=s.charAt(x);     }      System.out.println(s==rev); }   }  Output- false

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?


In SPPS, how does one interpret the last two symbols/letters 'E4' in an arithmetic mean? For example, mean monthly family income is shown as 3.79E4. What does E4 symbolise? How can we interpret it?

I have a problem with the interpretation of a test result in which the p-value is 8.6e-28. How should it be interpreted? What is the e for?  Specifically, I used White's Test for the homoscedasticity assumption of a linear regression:  White's general test statistic :  150.0535  Chi-sq( 9)  P-value =  8.6e-28


The speed of light is the same constant $c$ as seen by any inertial frame in SR. But, is the speed of light same in all frames (inertial or otherwise) in GR?

The speed of light is the same in all inertial frames.  Does it change from a non-inertial frame to another? Can it be zero?  If it is not constant in non-inertial frames, is it still bounded from above?


this is the code: 3nd line is giving error.  class RawMassegeForm(forms.Form):     subject = forms.CharField(widget= forms.TextInput(attrs={'placeholder':'Enter your Subject'}))     name = forms.CharField(widget= forms.TextInput(attrs={'placeholder':'Enter your Name'}))     email = forms.EmailField(widget= forms.EmailInput(attrs={'placeholder':'Enter your email'}))     message = forms.TextField(widget= forms.Textarea(attrs={'placeholder':'Enter Your Message      here...'}))

When I compile the Python code below, I get      IndentationError: unindent does not match any outer indentation level     import sys  def Factorial(n): # Return factorial     result = 1     for i in range (1,n):         result = result * i     print "factorial is ",result     return result   Why?


The shift keys, left and right, are stuck ON.  This causes MANY problems.  An external keyboard works, but the internal keyboard is the default on reboot, so it boots in safe mode and Safari stumbles badly with the shifters stuck ON.  Be gone internal keyboard!

This is an attempt to write a canonical QA for this issue, as per the Meta post:   I expect it to be periodically edited with the goal of becoming a comprehensive information resource.  I have a MacBook Pro that has a key(Shift, Return,   Command, P, etc.) that doesn’t respond when pressed or is stuck in the down position.    It's possible that my favorite beverage was spilled (or some other liquid damage).  It's also possible that I have no idea what happened.  It was working yesterday and suddenly today it's no longer working.  Is there any way to bypass or remap the key?  Can I  have the system ignore it completely?  (This question can also apply to external USB keyboards or the Bluetooth keyboards)


In a bash shell, consider this: $ x="-name 'foo bar'" $ find $x find: paths must precede expression: `bar'' $ find -name 'foo bar' ./foo bar  What can I put in $x to make find $x behave like find -name 'foo bar'?

I'm trying to merge the output of 2 find commands and pipe it to the next operator. The arguments passed to both find executions are very similar so I'd like to keep it DRY  FIND_CMD_ARGS="-type f \( -iname \*.m -o -iname \*.swift \) -print0" CMD_OUTPUT=`{ find $PROJECT_PATH -not -path '*/Pods/*' $FIND_CMD_ARGS; find . -path '*/Pods/MyProject*/*' $FIND_CMD_ARGS }`   For some reason this doesn't work and this is the output I get  find: illegal option -- n usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]        find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression] find: -type f \( -iname \*.m -o -iname \*.swift \) -print0: unknown primary or operator   I think the issue is related to how the args in the FIND_CMD_ARGS environment variable are escaped but I can't figure out the right way to do it.  Any ideas? Thanks!


I decided to through the Firebolt cantrip into the "Attacks and Spellcasting" box on the character sheet. I understand I use my Char modifier, but do I also apply a proficiency bonus as well to the Atk bonus? Thanks in advance.

I'm not entirely sure I understand what the PHB is telling me about spell attacks.  Say I'm a wizard who's casting Fire Bolt (I could also be a Cleric casting Inflict Wounds or what-have-you), the spell itself doesn't say anything about making an attack roll or the enemy making a saving throw.    So do I make an attack roll and then add in my INT mod + proficiency bonus?  Or does the target have to make a saving throw against a DC of 8+ my INT mod + proficiency bonus?  And, assuming I hit, do I add my INT mod + proficiency bonus to the damage?


I need to print my lists on multiple lines every N element without splitting the original list in smaller lists.  For example, with N = 3  Given this:  MY_LIST = [ 'A', 'B', 'C', 'D', 'E', 'F']  I want python to print THIS:  A B C  D E F   Thank you for your help

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I prefer my Blender set up with four view windows, like in this example:    However, every time I begin a new model, I'm presented with the default single view, and I have to re-establish the other three windows and perspectives, as well as reset other preferences, like the grid size.  How can I get Blender to remember my settings across models?

Is there a way to lock screen layouts so that when you change them while working, such as by switching editors around or resizing them, those changes don't affect the original state of the active layout?   I like Blender's versatility in allowing me to organize my workspace any way I want. I'm often doing this on the fly, but sometimes things get weird and I just want to go home. (sniffle). Only I find out that my original home (layout) doesn't exist in this scene anymore, because I've fouled it up beyond all recognition.   The only way I've found to combat this is to immediately create a new "junk" layout when I open a new scene and keep creating new "junk" layouts any time I switch to one of my default layouts. It kind of works if I remember to do it, but I usually don't, and it kind of defeats the purpose of having layouts. Any solutions or workarounds or possible scripting ideas would be much appreciated. Thanks.


I am a new user to LaTex. Is there an upper limit to the PDF generable from Latex?  What about performance? Suppose I would want to write a 500 pg long book on PDF, at what point is it going to seriously hinder the speed for viewing my PDF file?

Are there some limitations regarding the pdflatex command with respect to the count of pages of the input files?  My highest page count, when compiling, was 90 without any troubles. (2008)  Currently another document will be prepared which will be approx. 170 pages in sum.  EDIT: Thanks to all answers. They were helpful.


I am facing following issue:  Input:  F=`date +%Y%m%d`  echo $F   Output:   F=20131231   But when trying this(File Name:A.sh):  C=`date`  G=`$C +%Y%m%d`  echo $C  echo $G  Output:  A.sh[6]: Tue:  not found  Tue Dec 31 06:14:12 EST 2013   I want to pass the date in a variable and then extract only date in a specific format.

Let me explain you the problem   $ date +%c -d "$d" Tue 31 Dec 2013 01:13:06 PM CET $ date +'Today is %F' -d "$d" Today is 2013-12-31   This solution corresponds to current date.  But I have one variable which stores date other than current date  $Prev_date="Wed Dec 25 06:35:02 EST 2013"    I am looking for solution to read this date as 2013-12-25 and store it in a variable.  I have tried this:  a=`date --date=$Prev_date '+%y/%m/d'` echo $a   It's giving this error:  date: illegal option -- date=Wed usage: date [-u] mmddHHMM[[cc]yy][.SS] date [-u] [+format] date -a [-]sss[.fff]


I am currently running Ubuntu 18.04.3 LTS. Recently, my laptop crashed during a Kernel upgrade (I did it via apt update then apt dist-upgrade). I then ran dpkg --configure -a after it told me that I had broken the automatic update process.  Afterward, I ran apt update && apt dist-upgrade && apt autoremove, which I always do, but I guess for that reason I can't revert back to the older Kernel version. It ran fine, but since reboot, my Internet doesn't work anymore. It's not the wifi adapter, which is a common issue. Also, LAN doesn't work - the cable is shown as unplugged.  I figured, since updating the system/installing an older Kernel version Etc. is gonna mess up the tweaks I made to my system over time anyway (Is that correct?), I might as well update to Ubuntu 19.10, which I can do directly from 18.04, right? Which should hopefully fix the issue. Do you share my optimism about that helping?

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


Let $\mu$ be a measure defined on a $\sigma$ algebra $\sum$. I am trying to prove if $E_n $ is an increasing sequence in $\sum$ then $\mu(\cup^\infty_{n=1} E_n) = $ lim $\mu $ $(E_n)$  This is the proof.   We assume that $\mu(E_n) < +\infty$.  Let $A_1 = E_1$ and $A_n = E_n \backslash E_{n-1}$ for $n \geq 1$  Then $A_n$ is a disjoint sequence of sets in $\sum$ such that $E_n = \cup^n _{j=1} A_j$ and $\cup^\infty_{E_n} = \cup^\infty_{n=1} A_n$  Why do we have to introduce another sequence $A_n$?  $\mu$ is countable additive so $\mu(\cup^\infty_{n=1} E_n)=\sum^\infty_{n=1} \mu(A_n)$.  Why does this last step equal lim$\sum^m_{n=1} \mu (A_n)$?  How does the proof then jumps to saying $\mu(A_n) = \mu(E_n) - \mu(E_{n-1})$ and hence $\sum^m_{n=1} \mu(A_n) = \mu (E_m)$?

Show that if $A_1\subseteq A_2\subseteq A_3\subseteq\cdots$ is an increasing sequence of measurable sets (so $A_j\subseteq A_{j+1}$ for every positive integer $j$), then we have $$m\left(\bigcup_{j=1}^\infty A_j\right)=\lim_{j\to\infty}m(A_j)$$  Here is my proof: According to the $\sigma$-algebra property, $\bigcup_{j=1}^{\infty}A_j$ is a measurable set, so it makes sense to talk about $m(\bigcup_{j=1}^{\infty}A_j)$. Firstly, I prove that $\lim_{j\to\infty}m(A_j)\leq m(\bigcup_{j=1}^{\infty}A_j)$. This is because for any given positive integer $N$, $A_N\subseteq \bigcup_{j=1}^{\infty}A_i$, according to monotonicity, we have $m(A_N)\leq m(\bigcup_{j=1}^{\infty}A_i)$. Take the limit,we will have $\lim_{j\to\infty}m(A_j)\leq m(\bigcup_{j=1}^{\infty}A_j)$. Secondly, I prove that $m(\bigcup_{j=1}^{\infty}A_j)\leq \lim_{j\to\infty}m(A_j)$. For any given positive integer $N$, $\bigcup_{j=1}^N A_j = A_N$. According to monotonicity,we have $m\left(\bigcup_{j=1}^N A_j\right)=m(A_N)\leq \lim_{j\to\infty}m(A_j)$. Take the limit, we will have $m\left(\bigcup_{j=1}^\infty A_j\right) \leq \lim_{j\to\infty} m(A_j)$. Combine the above two arguments, we will see that $$m\left(\bigcup_{j=1}^\infty A_j\right)=\lim_{j\to\infty} m(A_j)$$$\Box$  The above is my proof, unlike many books, my proof does not use the property of countable additivity. So I doubt my proof is correct. Who can point out where are my mistakes?


I'm trying to plot some figures from databricks , but can't seem to control the figure size . All the commented-out stuff doesn't do the trick , possibly as the plot is wrapped by 'display'.  import matplotlib.pyplot as plt f, axes = plt.subplots(2,1) axes[0].hist(deltas,bins=200,log=False)  axes[0].set_title('hist') axes[1].hist(deltas,bins=200,log=True) axes[1].set_title('loghist') plt.xlabel('epochtime') #plt.figsize=(30,10) #plt.figure(figsize=(30,30)) #plt.show() #f.figsize=(30,20) display(f,figsize=(30,20))   Anyone have the magic?

How do you change the size of figure drawn with Matplotlib?


I am trying to make a Palindrome checker in Java but my when I check the reverse method compared to the input string to see if they are equivalent, I am getting false. Even when I use obvious palindromes like "racecar". My reverse method uses recursion to reverse an input string.  public class Palindrome {     public static String reverse( String input )     {         if( input.length() == 1 )             return input;         return reverse( input.substring( 1 ) ) + input.charAt( 0 );      }      public static boolean isPalindrome( String input )     {         if( Palindrome.reverse( input ) == input )             return true;         return false;     }      public static void main( String args[] )     {         System.out.println( Palindrome.isPalindrome( "racecar" ) );     } }

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?