I would like to configure my keyboard to work as close to a MacBook as possible.  Here are some examples of what I would like to do:  ---------------+------------------------------------------------ I press stroke |  App receives stroke ---------------+------------------------------------------------ Alt-Shift-[       Ctrl-PageUp (move to previous tab) Ctrl-Backspace    Delete Alt-Left          Home (move cursor to beginning of line) Super-Left        Ctrl-Left (move cursor left one word) Super-Shift-Left  Ctrl-Shift-Left (select left one word)   (Note that usually Mac keyboards have Cmd where PC keyboards have Alt/Meta, and Opt where PC keyboards have Win/Super)  How could I go about this?    I have  in the past intercepting keystrokes with Fluxbox, and emitting keystrokes with xdotool.  The problem with this approach was that the app would see the original modifier key I had pressed down, unless I cleared it, in which case that would lose my input state.  And sometimes when I let go, X would think the modifier key was still pressed down.  For this reason, I think I need a high-level layer (in X or in the WM) that can completely hide my actual keyboard state from apps, and simulate the keystrokes that actually get passed down to apps.  (Something WM-independent would be great, but I could live with a WM-specific solution.)  For bonus points (I can live without this), make it possible to switch behaviour depending on the app that currently has keyboard focus:  Alt-C             Ctrl-Shift-C on gnome-terminal or konsole                   Ctrl-C in other apps   I imagine some WM integration would be needed for this.

I switch back and forth between two computers constantly:   OSX Snow Leopard  Ubuntu 10.10    I'd like to be able to make Ubuntu use the same keyboard shortcuts as OSX System Wide, for the following keyboard sequences only (ie I don't want to make Ctrl act like Super)   Super+C -> Copy Super+V -> Paste Super+T -> Open a new tab in whatever browser I'm in.  Super+W -> Close a tab in whatever browser I'm in.    So in short, is there anyway for me to map just these keyboard sequences to the following, system wide ?   Super+C -> Ctrl+C Super+V -> Ctrl+V Super+T -> Ctrl+T  Super+W -> Ctrl+W   I know there are ways for me to do this for vim, and Firefox, and I'm sure specifically for most applications... but I would prefer to have to do this just once and have it work that way system wide!  I'm using a standard PC keyboard, that is "Generic 105 key (intl) PC" on Ubuntu. I'm also using the same keyboard on my Mac mini.


I am trying to find a program (for windows) that will automatically scan all my music files, and replace all of the IDv3 tags with the correct values, and album art (if possible). Most of my tags are incorrect, or have weird variables in them too like the year, or incorrect album information.  Has anyone found a program that can do this? I've used, and tried the following programs in the past and nothing has worked, or sets albums as compilations, rather than the actual album they came from.   MusicBee MP3 Tagger Mass Tagger Tag & Rename Magic MP3 Tagger Robot Butler MusicBrainz Picard TagScanner Sound Maven MP Tagger MP3 Tag   Among a few other, open source ones I can't recall right now. I have racking my brain for the last few weeks to find a program to do this for me, with over 80,000 songs I do not have time time, or energy to go through and do this.  Some of these programs will get the artist and title correct, but are way off on other things like year, lyrics, composer, etc.  Any help in the right direction would be greatly appreciated.

I have a ton of MP3s, but their ID tags are not filled in.  Going in manually to populate them is simply too much work.    I was wondering if there is a way to populate them automatically.  Perhaps by feeding the MP3s to Shazam or Midori or something like.  I am not above writing some code to make it happen, if someone can suggest a way.


I am writing my master thesis in Latex and was wondering whether it would be possible to render the document without any figures or tables. The goal is to get a feel for how many text pages I have as figures and tables don't count towards reaching the minimum page count requirement. I could obviously just comment out all figures and tables, but my goal would be to get this version rendered with no or only minor modifications to the document.

Is there an easy method to compile a LaTeX document ignoring contents of \begin{figure} ... \end{figure} blocks altogether?   I am looking for an equivalent for draft and demo options (as in \documentclass[demo]{article} or \usepackage[draft]{graphics}) that will ignore figure environment completely. Specifically, don't want to see any placeholders nor figure captions, just continuous text.   Is there a way to do the same thing for table environments?


I am using Windows 8.1 on Dell Latitude E5420 and I am interested to give a try to Ubuntu. So to use Ubuntu efficiently, whether would I need to remove Windows and then install Ubuntu or can install Ubuntu without removing Windows so that I don't get slower performance on both OS.

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


I'm working on a program using eclipse that generates objects for runners in a 100 m race.  each runner has a lane, name and three separate times for completing the race. However, when I try to generate the times for each object, I get java.lang.NullpointerException.  Here is the method for generating the times.   public double[] getTimes() {      for (int i = 0; i <= (times.length - 1); i++) {          rolled = 1.0 + roll.nextDouble() * 100.0;         // set rolled to a new random number between 1 and 100         times[i] = rolled;         // set index i of the array times to be the nearest         // double to roll's value.      }     return times; }   and then the code in which the method is called.   public void testGetTimes() {     double[] times = performance.getTimes();     assertEquals(2, times.length);     assertEquals(9.2, times[0], 0.01);     assertEquals(9.4, times[1], 0.01); }   I'd try to fix it through debugger, but every time i try to step-into the for loop, i get InvocationTargetException,(Throwable line: not available  initialization of times, roll and rolled:      public class Performance { private int lane; private String name; double[] times = new double[3];   int rolling;  Random roll = new Random();  double rolled;  double average;  double best;   and of performance:      public class PerformanceTest { Performance performance;  @Before public void setup() {     performance = new Performance(1, "", new double[]{9.2, 9.4}); }

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?


Suppose I have the following struct   struct Being{     int canFly;     int (*printFlying)(); }   And I want to do something like the following:  int main(){     struct Being * flyingThing = new_flyingThing();     struct Being * thingThatCantFly = new_Thing();      flyingThing->printFlying(); /* "I'm flying!" */     thingThatCantFly->printFlying(); /* "I can't fly!" */ }   It looks like I would need the printFlyingfunction to be able to access the canFly variable in the struct, but I don't know how to do this, or if this is possible.  Is there any way to get my code to do what I want? Thanks!!    I explained in the comments why this question is not a duplicate of the linked one.

Is there a way to write OO-like code in the C programming language?    See also:       Found by searching on "[c] oo".


As shown, there is a comment which said, "Repeat Spammer. Flagged as spam." But the answer was posted few days ago, so this would have been deleted. So I immediately knew that this was an audit. Could all comments be disabled on audits?

I recently received this rather amusing message while reviewing a user's first post:  Congratulations! This was only a test, designed to make sure you were paying attention. This post has already been removed, but thanks for taking time to leave feedback for the author.   What is the purpose of this test? How does the audit work? What happens if I fail? Why was the system expecting me to negatively review a good post, or positively review a bad post? A review is obviously an audit. Should I report it? Do review audits count toward the Reviewer badge? Do robo-reviewers dream of electric sheep?


I'm looking for a simple way to collect information for a participative plans (regarding landscape) and show them on Google Maps.  I'm thinking to a small web form for asking information to public (es: point of interest, ), then they have to digtize the refered point, line or polygon. After submit, the information are showed in a map.  Any ideas? Like using Joomla extension or similar.

I am looking at collecting spatial information from a range of stakeholders to identify opportunities within a landscape.  However, the data that we are collecting are not presently mapped and so we wish to use an interactive method to get this information onto a map.  Which online websites/methods would people recommend for circulating to a non-technical audience to try and get them to map what they know?    Where the emphasis is on ease of use by the stakeholder.


If i start heating an iron spoon with one lighter and i start adding more lighters to that "heating system", can the temperature increase so high that it would melt the spoon ?

The title question is rather illustrative. I suppose the real question would be:  Is heat cumulative?  Put back into an example:   If I have a lit candle right beneath an iron bar, assuming the candle will remain lit indefinitely, and that the heat-losing rate is below the heat-getting rate. Will the bar eventually reach the needed temperature for it to melt?  If the answer is no:  Once the iron bar reached the max temp the candle can get it to. Where does all of the energy (heat) go after?  EDIT:   The question "is heat cumulative?" can be ignored as it is out of place and is misleading. Althrough the answer for it is "yes", it doesn't mean the answer for the general question is also "yes".  The point is not if it is actually possible to melt iron with a candle. Iron and candle are mere parts of the illustration, their properties are irrelevant.  A better phrasing of the main question would be:  Could a heating object contained in a perfectly closed system push the temperature of the system above its own temperature?


Is it possible to have a file which has a modified date that is before its created date? What actions would cause this event to occur?

Due to some court cases in my jurisdiction, I often see court-appointed experts determining the creation date of a document. Is it really possible to do this via software methods? How could one prove a creation date if a fake date was used before the document was created?  I know this part doesn't belong to superuser but anyhow I was also curious if any hardware methodology would work (to any precision - day/month/year).


I have a long-term German National D Visa for research.  I have an upcoming short trip outside Germany to the Schengen Zone but I don't have a residence permit yet. I've been informed that I should get the residence permit before travelling abroad but that is contrary to what I've been reading online i.e. the D visa can be used for short-term stays in European countries outside Germany.   Does anyone have experience regarding this issue or can tell if I am allowed to travel outside Germany?

I have requested for a French long term (Type D) student visa from a consulate in India. It's a national Type D visa and not a Schengen visa. My question is that can we still go to other Schengen countries on this visa? If not then can we get a Schengen visa from a consulate in France?


Let $A = \{ 1,2,3,4 \}$ Let $F$ be a set of all functions from $A \to A$.  Let $S$ be a relation defined by : $\forall f,g \in F$ $fSg \iff f(i) = g(i)$ for some $i \in A$  Let $h: A \to A$ be the function $h(x) = 1 $ for all $x \in A$.   How many 1:1 functions $g \in F$ are there so that $gSh$ ?  Is it $4*3*2*1$ $($total $1:1$ functions)$ - 3*2*1 (1:1$ that don't connect to $1)$ the answer?

Let $A = \{ 1,2,3,4 \}$ Let $F$ be a set of all functions from $A \to A$.  Let $S$ be a relation defined by : $\forall f,g \in F$ $fSg \iff f(i) = g(i)$ for some $i \in A$  Let $h: A \to A$ be the function $h(x) = 1 $ for all $x \in A$.   How many functions $g \in F$ are there so that $gSh$ ?  My solution : $gSh$ means that $g(i) = h(i)$ for some $i \in A$. So $g(i) = 1$.  So number 1 always needs to connect to some x - 4 choices.  Then we have $3$ left-over numbers that can connect to $4$ numbers each.  So solution is $4 \cdot 4 \cdot 4 \cdot 4$. Is this correct at all? Thanks in advance !! :)


I have a Windows 8 laptop that I installed an Ubuntu partition on. I am going to donate this laptop and so was trying to uninstall Ubuntu.  In the middle of it the laptop rebooted and now it starts up with grub rescue.  I have tried many commands, but because all but one partition (zero size) is gone it won't take any of the commands.  Any advice?  I've got a Windows 8 rescue disk so I could try to fix the boot order, but the laptop will not boot from it.  Is there a grub command to boot from the CD?

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


I know a good proof, but i want to proof it in my way, im asking if its right. Say $1 = g^2$ is a Group, so $p\cdot p = 1$ with $p$ element of $P,$ prove that that the group is commutative?   $1 = e,$ the neutral element. $1.$ so we know for every group exist associativity. $e = g\cdot g,$ from that we can conclude that every is the inverse element of itself.   i proof that $(g\cdot a) = (a\cdot g)$  $g\cdot a$ is also inverse to itself, so $(e\cdot g)\cdot(e\cdot g) = e.$ now the rest.  $$(g\cdot a)^2 \cdot (a\cdot g)^2 = e $$ $$(g\cdot a) \cdot(g\cdot a)\cdot (a\cdot g)\cdot(a\cdot g)=e$$  because of associativity $$(g\cdot a)\cdot g \cdot(a\cdot a)\cdot g)\cdot(a\cdot g)=e$$ $$g\cdot(a\cdot g)\cdot (g\cdot a)\cdot g=e$$ because of associativity i can also start with $(a\cdot g)$ and $(g\cdot a)$ and for that its only true if they are the inverse off another thus the same.

If the order of all nontrivial elements in a group is 2, then the group is Abelian. I know of a proof that is just from calculations (see below). I'm wondering if there is any theory or motivation behind this fact. Perhaps to do with commutators?    Proof: $a \cdot b = (b \cdot b)  \cdot (a \cdot b) \cdot (a \cdot a) = b \cdot (b \cdot a) \cdot (b\cdot a) \cdot a = b \cdot a$.


want to ask a simple thing that when I separate the one face of the cube and now want to apply the material to only that one face but it's applying on the whole cube any reason what I am doing wrong

How do you add more than one material to a mesh?   I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it.  I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal.


I'm trying to understand how Linux's desktop environments made and how they work but I can't know where exactly they're installed and can't find any answers on google search.

I would like to know where to find the source code of Ubuntu. I'd like to see how far it is "open source".


Can anyone summarize calculations that have been done about the theoretical probability of a detectable black hole collision happening in the observable universe within the time that LIGO has been operating?  I mean, given what we know about processes and parameters in the universe - about densities of black holes, rate of explosion of stars etc - how often would we expect an observable event?  This question is looking for an analysis independent of observations of actual GW events.  It's the scientific "what does theory predict" question.  If we just think for a moment about black hole mergers (as opposed to other GW events), the types of thing that obviously need to be taken into account is "what is the density of black holes throughout the lifetime of the universe?", to determine what is the chance that they merge.   This is a complicated question in itself, because the relevant density comes from earlier and earlier in the universe's life the further away the event is (obviously?).  But interestingly, there's also the problem if the planar nature of GW wave fronts.  What is the chance that Earth happens to be in the plane of the GW event at the time - it seems to me that this aspect alone must dramatically reduce the number of probable observations...  It appears to be an obvious question, but googling the exact question, and creative variants I could think of, does not uncover anyone else asking it or addressing it.  Similarly, ligo.org does not appear to have any material talking about this topic.  The consideration is alluded to in , but not given any direct elaboration that I could find.  Interestingly, the answers in  are massively different.  One says "possibly daily" and the other says "should see one by 2020".  Neither offer any justification.

My question is a more detailed version of the one found , which elicited some good information but the question was never really answered.   From table 4 in a  we see the estimated rate of BH-BH mergers ranged from $10^{-4}$ to $0.3 \rm \,Mpc^{-3} Myr^{-1}$. This corresponds to $10^{-10}$ to $3\times10^{-7} \rm\,Mpc^{-3} yr^{-1}$. They write:      For BH–BH inspirals, horizon distances of ...2187 Mpc are assumed. These distances correspond to a choice of ... 10M for BH mass.    In the left panel of figure 4 found in  there is a plot of BH mass vs horizon distance. For 2015-2016 sensitivity levels and 10M mass, the horizon distance is 300 Mpc. So we need to multiply the above numbers by $300^3=2.7\times10^{7}$. This gives a range of $2.7\times10^{-3}$ to $8.1$ detectable mergers per year, given the prior assumptions that a typical signal would come from black holes with ~10 solar masses. Also, in the  we find:      We present the analysis of 16 days of coincident observations between the two LIGO detectors from September 12 to October 20, 2015.    Therefore the duration of the experiment was $16/365$ years. This gives an expected rate ranging from $1.18\times10^{-4}$ to $3.55\times10^{-1}$ mergers during the experiment. As far as I can tell, this can be taken as an upper bound, since not all of these events will really be detected (due to non-optimal location, coincident noise, etc).   Are there other factors to take into account?


I want to find out how many  $2 \times 2$ involutory matrices are there over $\mathbb Z_{26}$. $ $ Is there any formula to calculate this?   $ $  Thanks for your help.

I'm currently trying to introduce myself to cryptography.  I'm reading about the Hill Cipher currently in the book Applied Abstract Algebra. The Hill Cipher uses an invertible matrix $M$ for encryption and the inverse matrix $M^{-1}$ for decryption. The book recommends to use a matrix $M$ for which it holds that $M=M^{-1}$, since we then have the same key for encryption and decryption.  In the book, they use a $2 \times 2$ matrix $M$ over $\mathbb{Z}_{26}$ as example, and state that for there are 736 $2 \times 2$ matrices for which it hold that $M=M^{-1}$.  I'm trying to pick up on as much as possible when reading things, since I find it counter-productive for learning to skip something, when you don't get the theory behind it. Can someone enlighten to me, as to why it is that there are 736 possible $2 \times 2$ $M=M^{-1}$ matrices and how to find them?


I have array of random numbers. How can I calculate  segment? I am interested in finding the exact formula so I be able to use it in my work, please help me finding this formula with the next declarations:   $N$ - the number of random numbers in the array $S$ - the sum of the numbers in the array. $array_{min}$ - the minimum number in the array $array_{max}$ - the maximum number in the array $E$ - the average number in the array.   We are looking for $y = mx + c$. So you need to find a formula to represent $m$ and $c$ with the above declarations.  The array of random number are the $Y$. $X$ is just neutral numbers from $0$ to $N$

How was the formula for Ordinary Least Squares Linear Regression arrived at?  Note I am not only looking for the proof, but also the derivation. Where did the formula come from?


I've read tens of SEO guides and none of them seem to talk about this kind of stuff, I understand that if I have a static website like a blog, I got to pay attention to keywords, title, relevancy all that.   But, what if my website uses dynamic content with query parameters, and all that content is generated from the back-end, like here on stack for example, you go to "question" and then ther's a query string that pulls the data.  Can pages like that be crawled, because they don't really exist.  Every guide I've found seems to talk about static websites, I understand that all that is applicable too but, is there some other steps you need to do for dynamic content that affects SEO?

I have a very stupid question. I developed a website that has only one page at the public html directory(index.php).  all content are dynamically loaded as different pages.   How can i SEO my pages for google?  i mean like the what we type in this site are .............i believe stored in database and search engine find these pages like any static pages...  Just a little tip would be appreciable.......!


I have some html that uses a few "pre" tags to preserve code snippets, using "html" as the lang. For the most part, it works, but in one specific instance, namely:

Images

   Instead of preserving the snippet, it shows a bullet and a hyperlinked "Images" - what the deuce?  The whole shebang can be seen, malformed, beneformed, and/or mutilated at:

I'm trying to write a blog post which includes a code segment inside a <pre> tag. The code segment includes a generic type and uses <> to define that type. This is what the segment looks like:  <pre>     PrimeCalc calc = new PrimeCalc();     Func<int, int> del = calc.GetNextPrime; </pre>   The resulting HTML removes the <> and ends up like this:  PrimeCalc calc = new PrimeCalc(); Func del = calc.GetNextPrime;   How do I escape the <> so they show up in the HTML?


Good Morning! I have a question, my website is using https:// protocol. When I send an email to client using Gmail, the mail always goes into the spam folder rather than the inbox. What causes this problem? Can you answer this question please. Thanks before and Best regards.  My code is :          $to = $_POST['email'];         $from = "pendaftaran@universitasbosowa.ac.id";         $subject = "Informasi PMB 2017 - 2018";         $headers = 'From: pendaftaran@universitasbosowa.ac.id (Panitia PMB Unibos 2017-2018)' . "\r\n";         $headers .= "Reply-To: ". strip_tags($email) . "\r\n";         $headers .= "CC: pendaftaran@universitasbosowa.ac.id\r\n";         $headers .= "MIME-Version: 1.0\r\n";         $headers .= "Content-Type: text/html; charset=UTF-8\r\n";          $message = "";         $message .= "";         $message .= "
Terima Kasih ".$_POST['nama'].",

Selamat Anda telah melakukan sign up selanjutnya login ke Universitas Bosowa Admission dengan memasukkan user Anda berikut ini
";         $message .= "
";         $message .= "
User Login
";         $message .= "
Username: 	".$_POST['email']."
";         $message .= "
Password: 	".$_POST['password']."
";         $message .= "
No. Handphone: 	".$_POST['handphone']."
";         $message .= "
Waktu: 	".$date."
";         $message .= "

";         $message .= "
Tertanda,

Panitia PMB Unibos 2017-2018";         $message .= "";         $ok = @mail($to, $subject, $message, $headers);

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


Inspired from a troll in Facebook    credits :     Can 11 players from a team create a circle and keep the ball inside the circle and play? Are there any official rules that disallow such thing? Did this kind of thing happen in past?

Imagine all our football team except one player form a tight circle, with our hands on the shoulders of the people next to us.  Inside the circle there is the eleventh person with the ball. The whole "construction" is moving slowly towards the opponent's goal. It is inevitable that we will score.  Is this illegal? If yes, according to what rule?


Can any one help me out? What is the difference between Salesforce1 and Salesforce? Can we create an app based on the requirement in Salesforce1 as we do in Salesforce? Salesforce1 is used in Mobile. Can any one brief me about Salesforce1? Any help is very much appreciated.  One of client is using the app exchange application which is a unmanaged package and would like to change the look and feel app with related to the Android device. Also would like to connect with the third party e-commerce site. Can it be done on Salesforce1 app with the SDK devices?

I've seen a lot of mentions of  coming out of Dreamforce this year.   As a developer, what is it and why(or when) would I want to use it?  I get the impression it is a refinement of the chatter-mobile app with additional APIs and the primary idea is to provide mobile access to chatter, CRM and custom apps. It appears to natively target iOS and Android devices. Did I miss anything important? (I've picked this up from various twitter accounts so I could be off the mark here)    A couple of interesting URLs to come out of  to directly access Salesforce1 and the SalesforceA admin app in any browser.      /one/one.app    and      /one/admin.app


When "Questions that may already have your answer" (similar questions) appear as a right column, it overflows and overlaps the footer.  (shown in the figure)        This happens on all SE network sites on which I have asked questions.  Also this happens to other columns also like "How to Format".

Sometimes, when you create a question which returns a lot of similar questions, it makes the height of the floating "Similiar Questions" box too big to fit on the page. As a result, it blocks some of the footer on the right hand side. It's actually doing it as I type this question.  I think a max height based on the view port - footerHeight should fix it.


I ran the command sudo killall pulseaudio  because I read it here:  Now my sound doesn't work at all, when it was working before I ran this command.  How do I fix it?

I was listening to music, and my sound suddenly went dead in all my applications. I'm using Ubuntu 12.04, which uses pulseaudio, so I tried sudo /etc/init.d/pulseaudio restart, but nothing happened. According to lsof | grep pcm, nothing is using the soundcard at the moment, although I'm not entirely sure if  is applicable.   Is there a way another way to restart Ubuntu 12.04's sound system from the command line without rebooting the system?


I'm making a program that tells the day of the week for any date in the past or future. In order to split the 4-digit year into the first 2 numbers for century and last 2 numbers for year in order for the formula to work right I used the following 2 lines of code: Int  y = yANDc / 100; Int c = yANDc % 100;  The problem is when I display the final output. If they typed in a 4-digit year between "xx00" and "xx09", it chops off any preceding "0"s. So, if they entered "2009", the final output would be written as "209".  Any ideas on how to fix this and format it to where it doesn't drop preceding "0"s?

How do you left pad an int with zeros when converting to a String in java?  I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).


In the spells description it only says Will negates but i can't find it's DC's.

My group is new to table top RPGs, and one thing we haven't figured out is Spell DC.  One player was a cleric, and channel energy does force the undead monsters to make a saving throw, but I don't think that is Spell DC. So what is Spell DC, and what does it do? Does it mean the enemy can do a saving throw against the DC to determine whether the spell hits? If that's the case, does melee or ranged attacks have a similar DC?  I did a simple search that told me Spell DC is calculated by spell level + 1/2  class level + WIS for cleric or INT for wizard. Is that right?


The function $d(n)$ gives the number of positive divisors of $n$, including $n$ itself. For example, $d(25) = 3$ because $25$ has three divisors: $1$, $5$, and $25$. Prove that $d(n)$ is odd if and only if $n$ is a perfect square. I need to prove this by proving that $d(n)$ is odd if and only if $n = k^2$ for some integer $k$.

I believe I have the solution to this problem but post it anyway to get feedback and alternate solutions/angles for it.  For all $n \in \mathrm {Z_+}$ prove $n$ is a perfect square if and only if $n$ has odd # of positive divisors. Thought to use induction but the perfect squares don't increase by 1.    $\Rightarrow$: If $n$ is a perfect square it must consist of 1+ prime factors each to an even power.  If $n$ consists of 1+ prime factors each to an even power it must have an odd # of positive divisors.  $\Leftarrow$: If $n$ has an odd number of positive divisors it must consist of 1+ prime factors each to an even power.  If $n$ consists of 1+ prime factors each to an even power it must be a perfect square.  Thanks.


If you haven't seen Alien Covenant don't ruin it by reading the spoiler!  I just saw Alien Covenant. If David "created" the traditional xenomorph that follows the face-huger-type gestation, and since Prometheus and Covenant are prequels (albeit loosely based prequels) than how does - millennia later - the crew in Alien (1979) encounter the same type of species given that the spaceship originated from LV-223 (Prometheus world) and crashed in LV-426 (Alien 1979 world).

How did another Engineer ship with a chest-burst Engineer and lots of facehugger eggs end up on LV-426 (Alien) when       all Engineers are supposed to be dead before David created the first facehugger eggs himself?   Wasn't the idea of Xenomorphs shown to exist before Alien: Covenant (2017) by the murals in the Ampule Room on the ship on LV 223 in Prometheus which might explain who piled up the bodies of Engineers on LV 223?


It wont let me open the flash drive to get the files I need. Anyone know the line of code I need to put me as root. I would like to stay root.

When I'm doing something that requires root be typed in dozens of times in a row, I prefer to switch my session to a root session. In the various tutorials and instructions I have used on the Internet, I see sudo su, sudo su -, sudo -i and sudo /bin/bash being used to open a root session, but I'm not clear on the difference between these and when or if that difference matters.  Can someone clear this up for me?


Earlier today, I came across a strange phenomenon involving a just-washed wine glass and a countertop. The gist of it is: when you place a warm wine glass upside-down on the wet countertop, it starts wiggling and sliding towards the edge.  I've repeated it several times, and found it only works when the glass was recently ran under hot water and it works best if there's already some water on the counter.   Because of the fact that it always moves in  kind of the same direction, I'm guessing there is a slight incline on the countertop responsible for this. I'm trying to figure out exactly what is going on, since it's a pretty interesting thing that I've never seen before.   My current hypothesis is that the warm air inside the glass creates a pressure difference and a slight vacuum that pulls water under the lip of the glass, reducing friction to the point where gravity can pull it down. However, my friend thinks that the incline isn't enough for gravity to account for the speed at which the glass moves, and seeing that the speed is relatively constant (no observable acceleration) I'm thinking he might be right. Any thoughts or suggestions on further tests to find out what might be going on?

I think everyone should have seen a bowl of hot water moving by itself on a flat surface such as glass(seems like it is moving by itself but maybe there are some external force applied to it when it moves). What is the explanation of this phenomenon?  Hypotheses :   Since the bowl is heavy, for it to move the friction between the bowl and the surface must be very very low. I have heard that water may form a thin layer between the bowl and the surface, but l'm not sure whether it is the case or not. I think the bowl can move by itself because heat makes the air below the bowl expand.   Edit : I will re-experiment those again and update the question in few days. Maybe I will take a video clip too. and I am not talking about a magic trick whatsoever.


What is it called when you swap the first letters of two words?, for example - red truck is what is intended...instead ted ruck is what comes out.

People often make these mistakes in speech on purpose, just for amusement. Sometimes, however, they are unintentional and prove even funnier.  In this case, is there a specific term for them?  e.g.        "belly jeans"  for  "jelly beans"   "a can of boot reer"  for  "a can of root beer"   "a wottle of bine"  for  "a bottle of wine"   "holed and sealed"  for  "soled and healed"    "cling spreaning"  for  "spring cleaning"


I'm using Cycles as render engine for rendering image and when I'm rendering it, my whole screen shuts down that I need to restart my computer. I have Radeon RX 480 8GB as my GPU, tried to use Radeon ProRender from plugin but it doesn't have somes functionalities. Is my GPU too weak ? Really don't want to use Eevee.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


I have a class with an init function that needs ~20 variables passed to it. Instantiations of the class are rather ugly:  some_var = MyClass(param1=mydict('param1')                    param2=mydict('param2')                    param3=mydict('param3')                    ...                    param20=mydict('param20')   I keep all of those parameters in a dictionary for easy handling already. Not all parameters are necessary so I don't want the class to accept only a dictionary object I don't think.  I'm wondering if I there's a nice trick to clean this up by specifying that the parameters to init are to be taken from the dictionary?   I'm just looking for tips and tricks on tidying this up a little. I have quite a few long/ugly instantiations of this class.

I'd like to call a function in python using a dictionary.  Here is some code:  d = dict(param='test')  def f(param):     print(param)  f(d)   This prints {'param': 'test'} but I'd like it to just print test.  I'd like it to work similarly for more parameters:  d = dict(p1=1, p2=2) def f2(p1, p2):     print(p1, p2) f2(d)   Is this possible?


How to select all the columns whose names begins with "img" from a PostgreSQL table?  I wrote that, but doesn't work  select 'img%' from mytable

I'm looking for a precise piece of information in a database which I have no knowledge about. The database is on a separate machine, but I can log into it, and launch a psql command line, with administrator rights. It's a third-party product, and they are slow to answer questions. I know the data is inside that database, so I want to do a little bit of reverse-engineering. Given a table name, is it possible to get a list of the names of the columns in that table? For example, in SQL Server, it's possible to dump a table into a reusable CREATE statement, which textually lists all the columns the table is composed of.


$$\sum_{r=0}^{3n-1} \frac{(-1)^{r-1}r}{\binom{3n}{r}}$$  I tried, $$\frac{r}{\binom{3n}{r}}=\frac{(3n-r)!r!*r}{3n!}$$ And tried to make a telescopic series out of this, but couldn't proceed further. Any help would be appreciated

Find $$S=\sum_{r=1}^{3n-1}{ (-1)^{r-1}r\over{3n \choose r}},~ \text{if $n$ is even}$$  The answer given to me is ${3n\over3n+2}$ , the main problem I am facing is that the binomial coefficients are in the denominator, and so I can not use any of the usual techniques I used to use , like using integration or different on any binomial series. Although I tried by rewriting the sum in reverse order and then adding it to the original expression, this gave me : $$2S=3n\sum_{r=1}^{3n-1}{ (-1)^{r-1}\over{3n \choose r}}$$ This is sure simpler than the original problem but still no good , I could not figure out a way to solve the rest . Could someone please help me in solving thi problem ? Thanks !


My Ubuntu keep prompting this: Sorry, Ubuntu has experienced an internal error.  and the messages are:  ExecutablePath   /usr/lib/evolution/evolution-calendar-factory Package   evolution-data-server 3.6.0-0ubuntu2 ProblemType   Crash Title   evolution-calendar-factory crashed with SIGFPE in g_cclosure_marshal_VOID_OBJECTv()   I am running Ubuntu 12.10 on my i3-3220 3.8GB memory  Any suggestions? please. I don't know why that happens..

Why do I, after having installed Ubuntu 12.10 for nearly 3 months, still every second log-in have this evolution epiphany calendar error. I know more people have this issue.   All upgrades applied, 3 months passed, I'm sending reports every time errors appear and no one can do anything with it there at Canonical?  PS. i read the log that being send to Canonical and theres the following written "no upgrades applied, probably fresh install" Which isn't true, because i apply all upgrades available, since fresh install was like 250MB or so. Why isn't this fixed yet?


If $a+b=1$, show that $a^{4b^2} + b^{4a^2} \leq 1$. It's given that $a,b \in \mathbb{R^+}$.  I couldn't get the equality case actually. I couldn't get a rigorous way to get the equality case.          EDIT: New method     For the inequality, WLOG assume $a>b$.     Then $a^{4b^2} + b^{4a^2} \leq a^{4a^2} + b^{4a^2} \leq (a+b)^{4a^2} \leq 1$      Is it correct?  Thanks a lot StackExchangers!!

Let $a$ and $b$ be positive numbers such that $a+b=1$. Prove that: $$a^{4b^2}+b^{4a^2}\leq1$$ I think this inequality is very interesting because the equality "occurs" for $a=b=\frac{1}{2}$ and also for $a\rightarrow0$ and $b\rightarrow1$. I tried to work with a function of one variable, but the derivative is not easy. I also don't get something solvable by Taylor series.


I'm getting a weird referencing issue. This works: ret = { "values": [{"value": None}, {"value": None}, ]} foo = [5,6] for i, val in enumerate(foo):     ret["values"][i]["value"] = val print(ret)   {'values': [{'value': 5}, {'value': 6}]}  But if I set ret like this: ret = {"values": [{"value": None}]*2} print(ret)   {'values': [{'value': 6}, {'value': 6}]}  Why, and what's a more appropriate way of setting a list of (potentially long) dictionary items with identical values?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


When I click preview, when asking a question, the app crashes.  I've tried on multiple sites but crashes on all.  Version 0.1.25

Post a question, tap edit, tap preview. Boom.   Version 0.1.25


I want to write sth like:  aaaaaaaaaa  [empty line]  bbbbbbbbb  but instead I often get this:  aaaaaaaaaaaa  [empty line]  __bbbbbbbbbb  When I try skips inbetween, they do not start where they should, but rather in the middle of the text.

I'm using a template that I can't/shouldn't modify. This template forces that every time a new paragraph begins, there is an indentation added. In some rare cases this is just looking really ugly and that's why I'd like to avoid this indentation. Is there any way to do this without changing the template?


I have the following setup:    I would like to be able to ssh or vnc from home computer to work computer. I think that I could setup some permanent ssh (reverse) tunnel to get this all going, but I am not sure how to make this work.

I connect from my home PC thru an Internet server I own to a restricted client (that I also own) using a reverse ssh tunnel.   I have a script that sets up the restricted client to middleman leg of this ssh tunnel. It works fine if I execute the script manually. Here it is:  #!/bin/sh autossh -M 12399 -oPubkeyAuthentication=yes -oPasswordAuthentication=no -oLogLevel=error  -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -i ~/.ssh/named_id_rsa -R 12345:localhost:22 client@example.com -p 22   I want to have it run automatically whenever the network is up on this machine.   To accomplish this I thought about saving it as: /etc/network/if-up.d/reverse_ssh_tunnel.sh  I know I would have to remove "~/" and specify the full path to the private key as home/username/.ssh/named_id_rsa.  I suspect I'll have to use su -c my_script_name username, but I can't get that to work. Solving this part of my question is the most important. It needs to be fully automatic & unattended.  To connect from my home, I do two manual steps:  A. ssh home -> middleman B. ssh middleman -> restricted client  Can A & B be done in a single step? (This would be nice, but not essential.)  In summary:   Ideally, I'd like to do A & B in one step, manually. And I need the restricted client -> middleman autossh connection to be fully automatic.


Let $a$ and $n$ be integers greater than $1$. Suppose that $a^n - 1$ is prime. Show that $a=2$ and $n$ is prime.

I was doing some basic Number Theory problems and came across this problem :     Show that if $a$ and $n$ are positive integers with $n\gt 1$ and $a^{n} - 1$ is prime, then $a = 2$ and $n$ is prime   My Solution : (Sloppy)        $a^{n}-1$ = $(a-1)$ . $(a^{n-1} + a^{n-2} + ... + a + 1)$   This means that $(a-1)$ | $(a^{n}-1)$    But $(a^{n}-1)$ is prime   So , $(a-1)$ = 1 $\Rightarrow$ $a = 2$   Now , let $n$ be composite   $n = kl$ , where $1 \lt k \lt n$ and $1 \lt l \lt n$   Now , $a^{kl}-1$ = $(a^{k}-1)$ . $(a^{k.{(l-1)}} + a^{k.{(l-2)}} + ... + a^k + 1)$   This means that $2^{n} -1$ is composite    Hence , we have achieved a contradiction      My Question : Am I correct ?


Let f:A→R and suppose that sup{∑a∈F|f(a)|:F is finite subset of A}<∞ then {a∈A:f(a)is not zero} is countable.  and show that Define these element of { a ∈ A : f(a) is not 0} a1, a2, a3, ... then ∑(n=1 to infinity)|f(an)| is determined, Regardless of the method of arrange    Its question may similar to

Let $f:A \to \mathbb R$ and suppose that $$ \sup\Big\{\sum_{a\in F}\lvert\, f(a)\rvert :  F\text{ is finite subset of }A\Big\} < \infty $$ then the set $\{ a \in A : f(a) > 0\}$ is countable.  My try: Define these element of ${ a ∈ A : f(a) > 0}$, then $∑_{n=1}^\infty\lvert\, f(a_n)\rvert$ is determined, regardless of the method of arrangement.


Let $S$ be the set of all $3 \times 3$ matrices $A$ with integer entries such that the product $AA^t$ is the identity matrix.  Then $|S|$ is :   23. 24 48 60   Answer is $48$ but I don't know how to solve it.

Let $S$ be the set of $3 \times 3$ matrices $\rm A$ with integer entries such that $$\rm AA^{\top} = I_3$$ What is $|S|$ (cardinality of $S$)?   The answer is supposed to be 48. Here is my proof and I wish to know if it is correct.  So, I am going to exploit the fact that the matrix A in a set will be orthognal, so if the matrix is of the form \begin{bmatrix}         a_{11} & a_{12} & a_{13} \\         a_{21} & a_{22} & a_{23} \\         a_{31} & a_{32} & a_{33} \\         \end{bmatrix}  Then each column and row will have exactly one non-zero element which will be +1 or -1. Thus, I have split possibilities for the first column into three cases and counted the possibilities in each case as follows :- $$a_{11} \neq 0$$ or $$ a_{21} \neq 0$$ or $$ a_{31} \neq 0$$  In case 1), we obviously have two possibilities(+1 or -1) so we consider the one where the entry is +1. Now, notice that the moment we choose the next non-zero entry, all the places for non-zero entries will be decided because of the rule 'each column and row will have exactly one non-zero element'. Meaning, if b and c are remaining two non-zero entries, we only have two possibilities left  \begin{bmatrix}         1 & 0 & 0 \\         0 & b & 0 \\         0 & 0 & c \\         \end{bmatrix}  or  \begin{bmatrix}         1 & 0 & 0 \\         0 & 0 & c \\         0 & b & 0 \\         \end{bmatrix}  Using the fact that b and c are simply $$\pm1$$  In each of the above matrices, we get 4 possibilities for each of the matricies. Thus, 8 possibilities in totality. Basically, we are getting 8 possibilities on the assumption that  $$a_{11} = 1$$  Thus, we get 16 possibilities on the case that $$a_{11} \neq 0$$  Following, the second and third cases analogously, we get a total of 16 possibilities in each of them and 48 possibilities in total.    Source :- Tata Institute of Fundamental Research Graduate School Admissions 2016


According to the thesis guidelines set out by my university, the Chapter names in the table of contents must be bold. But all sections in the prefatory sections must be normal font (unbold) in the table of contents.  How can I unbold the table of contents entries in just the frontmatter?  \documentclass{book} \begin{document} \frontmatter \chapter{Abstract} The ``Abstract'' entry (and entries for other frontmatter chapters) in the table of contents should be unbolded. \tableofcontents \mainmatter \chapter{Chapter name} But the mainmatter chapters should still be bold in TOC. \end{document}

I am looking for a way to change the style of chapters in the TOC that belong to the front matter. Below I posted a minimal example code to illustrate my goal:  \documentclass{scrbook} \begin{document} \frontmatter \chapter{Preface} \chapter{Acknowledgements} \tableofcontents \mainmatter \chapter{First Chapter} \chapter{Second Chapter} \end{document}   Here, I would like to have the two frontmatter chapters Preface and Acknowlegements to be written in non-bold italics in the TOC, including their page numbers. I manage to write their names in the required style by simply using e.g.  \chapter[\itshape\textmd{Preface}]{Preface}   but this does not change the formatting of the page number.


While preparing my tutoring group on (currently) measure theory and Lebesgue integration on $\mathbb R^n$, I by chance came across the following result (at least I hope this is a result and my proof is valid) which I don't recall seeing up until today.     Let $(a_n)_{n\in\mathbb N}$ be a monotonically increasing sequence of positive numbers such that $\lim_{n\to\infty}a_n=\infty$. Then    $$\sum_{n=2}^\infty \frac{a_n-a_{n-1}}{a_n}=\infty\,.$$   The proof I found for this relies on dominated convergence and goes as follows:  Proof. Given the sequence $(a_n)_{n\in\mathbb N}$ in question, define a sequence of functions $(f_n)_{n\in\mathbb N}$ via $$ f_n:[0,\infty)\to [0,\infty)\qquad x\mapsto \frac1{a_n}\mathbb 1_{[0,a_n]}(x) $$ with $\mathbb 1_{A}$ being the usual  for arbitrary $A\subseteq\mathbb R$. Obviously, $\int_0^\infty f_n(x)\,dx=1$ for all $n\in\mathbb N$ and $(f_n)_{n\in\mathbb N}$ converges pointwise to zero as $\lim_{n\to\infty}a_n=\infty$ by assumption. This however implies $$ \lim_{n\to\infty}\int_0^\infty f_n(x)\,dx=1\neq 0=\int_0^\infty0\,dx=\int_0^\infty\lim_{n\to\infty} f_n(x)\,dx $$ so by (the converse of) Lebesgue's dominated convergence theorem, no dominating integrable function $g$ for $(f_n)_{n\in\mathbb N}$ can exist. This in turn means that every dominating function $g$ we find has to be non-integrable. The obvious choice here is (written in a sloppy way but it should be clear how $g$ operates) $$ g:[0,\infty)\to[0,\infty)\qquad x\mapsto \begin{cases} \frac1{a_1}&\text{ if }x\in[0,a_1]\\\frac1{a_2}&\text{ if }x\in(a_1,a_2]\\\cdots \end{cases}\,. $$ Note that $g$ is well-defined as $(a_n)_n$ is assumed to be monotonically increasing and unconditionally convergent and, evidently, $|f_n|\leq g$ for all $n\in\mathbb N$. Finally, $$ \infty=\int_0^\infty g(x)\,dx=\operatorname{vol}([0,a_1])\cdot\frac1{a_1}+\operatorname{vol}((a_1,a_2])\cdot\frac1{a_2}+\ldots=1+\sum_{n=2}^\infty \frac{a_n-a_{n-1}}{a_n} $$ which concludes the proof.$\quad\square$    Of course the above result is trivial if $\lim_{n\to\infty}\frac{a_{n-1}}{a_n}\neq 1$, but assuming $(a_n-a_{n-1})/a_n\to 0$ as $n\to\infty$, I did not see an easy way to obtain this in an elementary way - admittedly, I didn't think about an alternate proof for too long. Given a quick glance I also did not find a similar result on this site just yet. Hence my question is:     Is there a simpler way to show this result (assuming it holds and I did not make a mistake)? If so, was this maybe already discussed somewhere on math.SE?   Thanks in advance for any answer or comment!    As a final remark (or rather small example), a direct application of this to the sequence $a_n:=\sum_{k=1}^n \frac1k$ immediatly yields the divergence of the series $$ \sum_{n=2}^\infty \frac1{n(\sum_{k=1}^n \frac1k)}=\infty\,. $$ Given the divergence of $\sum_{n=2}^\infty \frac1{n\log(n)}$ this is of course not surprising but nontheless this (at least in my opinion) is interesting to play around with.

So I've been trying to figure out how to prove the following.     Let $(a_n)$ be a sequence of positive numbers such that $\sum\limits_{n=1}^\infty a_n =\infty$, and define $s_n=\sum\limits_{i=1}^n a_i$. Then $\sum\limits_{n=1}^\infty\frac{a_n}{s_n} =\infty$ as well.   I can prove it by comparing it to $\int_1^\infty \frac{1}{x} \, dx $ if the sequence $a_n$ is bounded by some $M$, but that's as far as I've been able to get.


Can someone point out to me, on what could be done different in this code, so the On('click') event can be bound to the newly inserted link. Right now there is a link which gets replaced at the end of the function. But after it has been replaced, it doesn't have ON('clicked') attached to it any more. Any suggestions greatly appreciated.   (function(){     var form, $this, info, modal;     modal=$('#addPreviousCrop');     form=modal.find('form').first();     $("a[data-target='#addPreviousCrop']").on('click',function(){         modal.find('.panel-heading h4').first().text('Update Previous Crop');         $this=$(this);         if($this.data('method')==='PATCH'){             //get the record to be updated             resetForm(form);             $.get('dairyCrops/'+$this.data('id')+'/edit',function(data){             populateForm(form,data,data.id);         });         }         form.find('#company_field')                 .html(' <strong>'+$this.data('company_name')+' - '+$this.data('field')+'</strong>');         form.find('input[name=acreage]').val($this.data('acreage'));         form.find('select[name=dairy_crop_variety_id]').on('change',function(){             var selVal=this.options[this.selectedIndex].text;             form.find('input[name=seeding_rate]').val(getSeedingRate(selVal));         });         info = {property_id:$this.data('property_id'),status:'previous'};     });       //submit previous crop     form.on('submit',function(e){         e.preventDefault();         $.when(submitAjaxRequest(this,info)).then(function(data, textStatus, jqXHR){             modal.modal('hide');             $this.closest('td').html(data.crop).slideDown('slow');         });     }); })();

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


Is there any data analysis that can be performed on both paired and independent data? For example, we have scores on a questionnaire for individuals who were exposed and not exposed (control) to a particular disease, these are independent of one another. However, we also have pre/post data for individuals (they were given questionnaire before being exposed to the disease and after being exposed). I know this is a weird design but it is what we have to work with. My question is do we have to analyze the pre/post and independent samples separately (using paired and independent t tests respectively) or can we combine them together and perform some analysis? Combining them together is preferred because of the fact that we have a very low sample size. For example we would add the pre group with the non-exposed group (because the pre group wasnt exposed) and the post group with the exposed group (because the post group was exposed). What data analysis could you do here?   I found a paper (Derrick, Russ, Toher and White (2017)) that covers this case of partially overlapping data for normal data. However, what would you do if your data didn't meet the normality assumption?

An investigator wishes to produce a combined analysis of several datasets.  In some datasets there are paired observations for treatment A and B.  In others there are unpaired A and/or B data.  I am looking for a reference for an adaptation of the t-test, or for a likelihood ratio test, for such partially paired data.  I am willing to (for now) to assume normality with equal variance and that the population means for A are the same for each study (and likewise for B).


This is a prelim problem which I did not get correctly.  Let $p: X\to Y$ be a closed map. Suppose that $p^{-1}(\{y\})$ is compact for all $y\in Y$. Show that if $Y$ is compact then $X$ is compact.  In the prelim $p$ is not described as continuous so I assumed that it is not necessarily continuous. However I only get to the point where $p(X)$ is compact and I couldn't see how to use the assumption that $p^{-1}(\{y\})$ is compact for all $y$. Any help will be appreciated.

I was assigned the following homework problem for an introductory course in topology:  Let $p:\ X\to Y$ be a closed continuous surjective map such that $p^{-1}(\{y\})$ is compact for each $y\in Y$.  Show that if $Y$ is compact, then $X$ is compact.  My question is, are the assumptions that $p$ be continuous and surjective even necessary for the result to hold?  I've done the following:  Let $U$ be an open set containing $p^{-1}(\{y\})$.  Since $X-U$ is closed, $p(X-U)$ is closed in $Y$.  Then $W=Y-p(X-U)$ is an open set that contains $y$.  Since $(X-U)\cap p^{-1}(W)=\varnothing$, $p^{-1}(\{y\})\subset p^{-1}(W) \subset U$.  Let $\{U_\alpha\}$ be an open cover of $X$.  Then $p^{-1}(\{y\})\subset \bigcup_{k=1}^{N}U_k$.  For each $y\in Y$, define $W_{y}$ as above; then $\{W_y\}$ is an open cover of $Y$, so can be covered by $W_{y_1},...,W_{y_m}$, and $p^{-1}(\{y_j\})\subset p^{-1}(W_{y_j})\subset \bigcup_{k=1}^{N}U_k$.  Since $X=p^{-1}(Y)$, $X=\bigcup_{j=1}^{n} p^{-1}(W_{y_j})$.  Since each $p^{-1}(W_{y_j})$ is covered by finitely many $U_k$, so is $X$, so it is compact.  If we dispense with surjectivity of $p$, the only thing that happens is that $p^{-1}(\{y\})$ may be empty, but then $p^{-1}(\{y\})\subset p^{-1}(W)$ holds vacuously, and the empty set is still compact.  If $p$ is continuous, then $p^{-1}(W)$ is open, but I don't use the fact that it is open at all in my proof.  I know that all 3 assumptions make a map "perfect" so that may be why they were mentioned, but can we dispense with continuity and surjectivity?  Thanks.


Square complex matrices can be classified up to similarity where similarity is defined like so: $A\sim B$ if there exists invertible matrix C such that $CAC^{-1}=B$ All matrices are similar to some matrix in   Say we instead consider this definition of similarity known as : $A\sim B$ if there exists invertible matrix C such that $CAC^T=B$ (just as it is defined in wikipedia, I make no assumptions on C other than invertiblility) Is there a similar classification theorem for this notion of similarity?

As we known, for matrix similarity $A= P^{-1}B P$, we can classify equivalence class in $M_n (\mathbb{C})$ by .  , $A = P^T B P$ with $P$ invertible, is also an equivalence relation. How does one classify the equivalence classes in $M_n(\mathbb{R})$ under this relation?  For symmetric real matrices, it's easy, since we can use orthogonal transformation to diagonalize it, which gives both matrix similarity and matrix congruence. Then we use a scaling matrix to make the diagonal elements to be $\pm 1$ and $0$. Therefore, for a symmetric real matrix, we classify the matrix by the number of $\pm1$ and $0$. What about for general real matrices?


I'm trying to get back to my graduation after a long time and i'm stuck on this problem using vectors: I want to find $\vec{x}$ knowing that $e = \vec{c}.\vec{x}$ and $\vec{v} = \vec{c} \times\vec{x}$. What is the best approach?

I was wondering if $\mathbf{A}\times\mathbf{C}=\mathbf{B}$ and $\mathbf{A}\cdot{\mathbf{C}}= p$, is it possible to express C in terms of A, B, and p?  Note: A, B, C are vectors and p is a scalar.  Sorry if this question has been asked before. If so, can anyone give me a link to it?


The question:  An international society has 1994 members from 6 countries. The number of members from each country is arbitrary, but never 0. The members are numbered as 1,2,3...,1994. Prove that there will always be at least one member whose number is the sum of the numbers of 2 other members of his own country, or twice as large as the number of one member of his own country.  Attempt at solution:  I have no approaches. Don't understand how to do it. However I feel that since the number of possible ways in which either condition can be fulfilled exceeds the ways one can place the countries (??), it is true.  A hint in the right direction is appreciated.

Numbers 1 to 1994 are divided into 6 sets.Show that at least in one  group there will be two numbers whose sum is also in that group ?  We can prove that at least one group will contain more than 332 elements.  A set is called sum free if it DOES NOT  CONTAIN sum of any two of its elements or does not contain twice of an element If a set contains natural numbers from 1 to $2n+1$ its sum free subsequence will contain $n+1 $elements.Or in other word if we take the last half numbers $(\frac{n}{2} $ or $\frac{n+1}{2}$ according to number of elements of the set) it will be free.  But I cannot proceed further because my selection need not be consecutive numbers.   I have to prove that if a set contains more than 332 numbers it cannot be sum free..But How..?


Am I not able to install Candy Crush game on my HTC Desire.  The telephone is not rooted and just hard reset How can I solve it?

I own a Motorola Flipout, Android 2.1 stock ROM. According to the market the app "" is not compatible with my phone. The required Android version is 1.5 or above. How can I tell why the app will not work for me?    The Flipout has a comparably small screen. Is it possible that the publisher just forgot to mark my phone's display resolution as supported?  Note: Users from outside Germany see a different message. I believe, those country-restriction are unrelated.


Last year was my first year in business.  I spent a good chuck of time developing my business plan, designing the company website, and developing policies and procedures for my employees.  I'm about 65% done with everything needed before actually getting clients.  I will be calming a loss this year on my business taxes.  The business is a registered LLC and I am the only member (thus pass-through taxes).  Should (and can) I write off my time spend on the business as a loss as well?  If so, how would I determine the pay rate and document such activity legally?  Thanks in advance for your help!

So, I'm a freelance web programmer by trade, which means that my time really is money. I, occasionally, work on side projects of my own and forgo the possibility of earning direct income for that time.   I wonder, can my freelancing business bill my side project (as a business) for time spent? Could I deduct that expense from the side project's taxes?  This is in regards to U.S. tax law.


Prove: For all sets $A$ and $B$, ( $A \cap B = A \cup B \implies A = B$ )  In the upcoming proof, we make use of the next lemma. Lemma: For all sets $A$ and $B$, $A = B$ iff $A - B = B - A$. Proof: Let $A$ and $B$ be arbitrary sets and let $S = A \cap B$ and $T = A \cup B$. If $S = T$, then $S$ and $T$ have got the same elements. Thus, by simplification law, Towe can state that $\forall x \in A \cup B \, ( x \in A \cap B ) \tag 1 \label 1$ To prove $A = B$ we might as well harness our lemma and establish that $A - B = A - B$, which we can be verified through the axiom of extension by showing that $\forall y \in A - B \,( y \in B - A )$ and $\forall y^* \in B - A \, (y^* \in A - B )$. So, let $y \in A - B \tag 2 \label 2$ and let $y^* \in B - A \tag 3 \label 3$ From \eqref{2} we rest assured that $y\in A$ and $y\not\in B$. Furthermore, by \eqref{1} we know that $y \in A \land y \in B \tag 4 \label 4$ Nonetheless \eqref{4} is an antilogy since from \eqref{2} we deduced, inter alia, that $y\not\in B$. Notice thus far we are trying to prove that \eqref{3} and $F$ implies $y \in B - A $ and $y^* \in A - B$. Therefore, it’s vacuously true that $A = B$ Q.E.D I believe I could've done this proof more easily by using the contrapositive method, but my question is, is this proof right?

Question:  Show that if $ \ A \cup B = A$ and $ \ A\cap  B = A$ then $ \ A = B$  My attempt:  Proof by contradiction:  Assume $ \ A \cup B = A$ and $ \ A\cap  B = A$ and $ \ A \neq B$   Case 1: $ \exists \ x \in A, x\notin B$  If $ x \in A \implies x\in A \cap B \implies x \in A \ and \  x\in B  \implies x\in B$, a contradiction.   Case 2: $ \exists \ x \in B, x\notin A$  If $ \ x \in B \implies x\in A \cup B \implies x\in A$, since $ \ A \cup B = A$. Contradiction.   Is this approach correct? Could someone please show me how to do a direct proof?


Everyone I need assistance regarding a connection in Gatwick, I have Morrocan passport with polish visa allows me to travel within europe. I have an easyjet flight from Spain connecting in London, I called embassy and airline if I will need visa for this connection and they both agreed that since I don't have check in luggage Iwont have to pass through security. However on easyjet website and gatwick website, it says that Its mandatory to pass through security. So do I need a uk visa to do this connection?  Please advise if u ever had such situation in London Gatwick.. I appreciate your help

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


I don't know of that is the correct terminology but by this I mean in the way that $\phi$ can be put into the equation $(1+\sqrt 5)/2$. I have heard that it has never been achieved but I was wondering if there was anything to show that it was imposible. If so, would anyone mind providing links to studies, webpages, etc. Thanks!

Most math texts claim that $\pi$ is an irrational number. However, I'm having a little bit of trouble understanding that.  Since nobody has calculated all of the digits of $\pi$, how can we know that either:   one of the digits repeats (as in $\frac{10}{3}$) the number eventually terminates     Note: Please be very descriptive in your answers... I don't have anything beyond high school math.


How to simplify $\sum_{i=1}^{k}\binom{n + i - 1}{i}$? I tried reducing the sum to $\binom{n}{1}, \binom{n}{2}, \binom{n}{3}$ and so on but couldn't get a pattern.

Let $n$ be a nonnegative integer, and $k$ a positive integer. Could someone explain to me why the identity $$ \sum_{i=0}^n\binom{i+k-1}{k-1}=\binom{n+k}{k} $$ holds?


When we say that light behaves as a particle and as a wave, we say that light is an electromagnetic wave, and it's a photon. Both EM waves and photons have physical definition. On the contrary an electron wave is just the probability amplitude, in other words the definition for the so called wave nature of electron is not physical as it is for a photon. My question is how can we physically define the photon? Is a photon just a lump in the electromagnetic wave, or is it a point on the wave?

Consider the question, .  The answers say, "an elementary particle" and not much else. They don't actually answer the question. Moreover, the question is flagged as a duplicate of,  – the answers there don't tell me what a photon is either. Nor do any of the answers to  mentioned in the comments. When I search on , I can't find anything useful. Questions such as,  look promising, but bear no fruit.  say things like, "the photon is an excitation of the photon field." That tells me  nothing. Nor does the , which says:     The photon is the quantum of the electromagnetic four-potential, and therefore the massless bosonic particle associated with the electromagnetic force, commonly also called the 'particle of light'...   I'd say that's less than helpful because it gives the impression that photons are forever popping into existence and flying back and forth exerting force. This same concept is in the  too - but it isn't true. As , "Virtual particles only exist in the mathematics of the model." So, who can tell me what a real photon is, or refer me to some kind of authoritative informative definition that is accepted and trusted by particle physicists? I say all this because I think it's of paramount importance. If we have no clear idea of what a photon actually is, we lack foundation. It's like what :     Photons seem to be one of the foundation ideas of quantum mechanics, so I am concerned that without a clear definition or set of concrete examples, the basis for understanding quantum experiments is a little fuzzy.   I second that, only more so. How can we understand pair production if we don't understand what the photon is? Or the electron? Or the electromagnetic field? Or everything else? It all starts with the photon.   I will give a 400-point bounty to the least-worst answer to the question. One answer will get the bounty, even if I don't like it. And the question is this:    What exactly is a photon?


I have the next problem. Prove that any base $a>1$, each positive integer $m$ has a unique expression as the form $$a^nr_n+a^{n-1}r_{n-1}+...+ar_1+r_0$$ where the integers $r_k$ satisfy $$0\le r_k \lt a,  r_n\neq0.$$  I have tried this.   Proof: By induction above n $$m_1=ar_1+r_0$$  We suppose that it is true for n=k  $$m_k=a^kr_k+a^{k-1}r_{k-1}+...+ar_1+r_0$$ Prove for n=k+1. By hypothesis $$m_k=a^kr_k+a^{k-1}r_{k-1}+...+ar_1+r_0$$ We add $a^{k+1}r_{k+1}$.  $$m_k+a^{k+1}r_{k+1}=a^{k+1}r_{k+1}+a^kr_k+a^{k-1}r_{k-1}+...+ar_1+r_0$$  As $a^{k+1}r_{k+1}$ and $m_k$ are positive integers then be  $m_{k+1}=m_k+a^{k+1}r_{k+1}$ a positive integer, hence      $$m_{k+1}=a^{k+1}r_{k+1}+a^kr_k+a^{k-1}r_{k-1}+...+ar_1+r_0$$  but I am not sure and still I need to prove the uniqueness.Thank you for your advices.

Base-b Representation of an Integer: Why can I make the assumption about number of terms in expansions in uniqueness part?   Reading the book of Koshy I have come across the below theorem. It states that I can write any integer $N$ in a base $b\ge2$ representation $N=a_kb^k+...+a_1b+a_0$ such that $0\le a_i<b$, $a_k \neq 0$ for some $k\ge0$.  In the uniqueness part, why can I assume the expansions contains the same number of terms ? I must prove that all expansions of $N$ equal the one in the theorem, but if I add terms to the expansion by zero coefficients, well, then the expansion is not in the proper form anymore ? (the greatest term in the expansion is $0$ if I add zero coefficients) .  Can someone help clear this out ?     Why can I assume the expansions contain the same number of terms ? If I add terms to the expansion, well then I've violated the form of the expansion ?


Given is $X$ is coprime to $Z$ and $Y$ is coprime to $Z$ prove $XY$ is coprime to $Z$.  I know you can use Bezout's lemma to say $1=aX+bZ$ and $1=cY+dZ$ but I don't know how to actually do the proof.  Any ideas?

How do I go about proving this?  If $\gcd(a,b)=1$ and $\gcd(a,c)=1$, then $\gcd(a,bc)=1$. I'm very confused with gcd proofs.


According to the Wikipedia description of      First, a cyclic group G of prime order p, along with a generator g of G, is chosen publicly as a system parameter. (Typically, one takes a subgroup of (Zq)*, where q is a prime such that p divides q-1.)   Why is it necessary to use a generator g in this process? What is the procedure to be followed to implement a method which produces this generator for a given prime order group Zp?


This is my first shell script program, so i think this is more likely a silly question for you all.  Overview of problem My need is to write a shell command for installing our Node.js server.    Server needs to install 3 crons as dependency. We offer 3 different environment.   Problem So when i try to assign cron(string) to variable then all the star in the string are replaced by filenames in the current working directory.  VAR1="*/1       *       *       *       *      /usr/bin/wget -O /var/tmp/output-folder-path  https://my.server.com:12000/cron/push >> /dev/null 2>&1"   Now, when i do echo $VAR1 then output  is like following  */3 file1.txt file2.txt generated.txt sample.sh file1.txt file2.txt generated.txt sample.sh file1.txt file2.txt generated.txt sample.sh file1.txt file2.txt generated.txt sample.sh /usr/bin/wget -O /var/tmp/output-folder-here https://my.server.com:12000/cron/push >> /dev/null 2>&1   Output of ls command in that directory is   file1.txt  file2.txt  generated.txt  sample.sh

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


Let $\mu$ be the Lebesgue outer measure I want to prove $\mu(X \cup Y) = \mu(X) +\mu(Y) $ so far I have used properties of this measure to show $\mu(X \cup Y) \leq \mu(X) +\mu(Y) $ so what remains is to show $\mu(X \cup Y) \geq \mu(X) +\mu(Y) $ however I am unsure how to proceed. All I have that I have yet to use is that $X,Y$ are subsets of real numbers and that they are disjoint and non empty.  Any help??

In the Lebesgue outer measure we have the following properties: the length of the empty set is $0$, monotonicity and countable subadditivity.  My question is, is it possible to use the above properties to show finite additivity?  I have no idea where to begin (or even if it's true) so any hints are definitely appreciated.


I have Ubuntu 18.04 installed on my Lenovo Thinkpad L560. When I close the lid nothing happens. I want the system to suspend. The settings for this are turned on. So when I close my lid and reopen it nothing has happened. I'm not logged out or anything.  Can you help me?

Since my upgrade to Ubuntu 17.10 there's no option in the settings about what to do when the notebook-lid is closed any more.     Before this function had the options "do nothing" and "suspend" and maybe "shutdown".  The "do nothing" function did something: when the lid was closed, the display went dark and the screen was locked with the password.  My question is how to change the setting so that it's like I'm used to, so that the screen just locks but doesn't suspend when closing the lid.


I entered the command ~/.bashrc and got the message Permission denied. I logged into 'sudo', tried it again, and got the same message.   What can I do to gain access to this file and edit it?

I have an issue with accessing my ~/.bashrc file. I did and obtained the following:  yuve@YuveSys:~$ ~/.bashrc -bash: /home/yuve/.bashrc: Permission denied yuve@YuveSys:~$ sudo su root@YuveSys:/home/yuve# ~/.bashrc bash: /root/.bashrc: Permission denied   Can anyone help?  NB: I am using Ubuntu 14.04 LTS. Thanks.


guide us to find this symbol, we are struggling to find this symbol ,   we used $\mathfrak s$ for this, but no exact output came.

hi i need the text mode of a latex symbol, in a reference pdf doc i found the exact symbol   which is categorized under "text" category. attached the screenshot of the pdf. i need a   different output of \mathfrak s


I have 3 icons in my Ubuntu 18.04 MATE top panel. I can't get rid of them but they do nothing. The image below shows just part of the top panel containing the circular images.     One contains a vertical line with up and down arrowheads, the middle one contains the numeral 9 and the right one contains a capital A.  How do I get rid of them and do they serve any purpose?

I have no indicator LEDs on my keyboard to show whether Caps-Lock is on (I don't have Num-Lock and Scroll-Lock keys so the best option would be to have an indicator only for Caps Lock, but three indicators would be better than none)  I would really like to see the lock-keys status in the indicator panel so I can tell at a glance whether I'm typing my passwords correctly    I'm using Ubuntu MATE 16.04. I've seen  but it relates to Unity DE.


I am trying to replace matching string with other string. This is what I have  ZKHOSTS="host1,host2,host3" old_string="tsd.storage.hbase.zk_quorum*" new_string="tsd.storage.hbase.zk_quorum = $ZKHOSTS"  sed -i '/$old_string/c\$new_string' /etc/opentsdb/opentsdb.conf   which isn't working as excepted.  I even tried following   sed -i 's/$old_string/$new_string/g' /etc/opentsdb/opentsdb.conf  sed -i '/${old_string}/${new_string}/g' /etc/opentsdb/opentsdb.conf   I dont know what wrong I am doing here.

I want to do:  cat update_via_sed.sh | sed 's/old_name/new_name/' > new_update_via_sed.sh   in my program.  But I want to use variables, e.g.  old_run='old_name_952' new_run='old_name_953'   I have tried using them but the substitution doesn't happen (no error). I have tried:  cat update_via_sed.sh | sed 's/old_run/new_run/' cat update_via_sed.sh | sed 's/$old_run/$new_run/' cat update_via_sed.sh | sed 's/${old_run}/${new_run}/'


Before telling about my background, I'd like to say that I did look at several similar questions, but neither involved my case (at least, not as far as I could see).   Now the background: I majored in Computer Engineering. I have expected more of Computer Science, but it was mostly business-oriented coding education (maybe I am being a little too harsh on this). So in my second year, I applied for a double major in Physics, thinking it might be more satisfying. In fact, I did enjoy Physics more than CS (or, CE in my case), and found it much more challenging and meaningful.  However, I ended up finishing my main major (CE), before Physics, so I applied for MS in CE in the same university, feeling the workload might be too little otherwise. I got accepted, and am currently enrolled in this program while taking 2-3 courses left from undergraduate Physics program. (My subject in MS is Computer Vision.)  But one thing I noticed over these years is that, for Physics I do not feel like I have the right mindset (seems that I lack a practical approach to things), and CE feels a little meaningless. Considering that I focused on Mathematical Physics, and more of the mathematical stuff in CS, I thought maybe Mathematics is the right place for me. But I cannot yet tell if I genuinely want Maths, or just whining about what I have at my hands.   So I have two questions, actually:   What are my chances if I apply for PhD in Number Theory? Do you recommend changing the field? Can you share other people's experiences in similar cases?   For the application part, I must add that I do not have an outstanding transcript in neither of my majors (around 3.4 GPA in both fields -Physics might be around 3.5 too), although I did get a paper published which was about relativistic quantum mechanics.   Edit: This question is different from what is suggested as duplicate as this particularly involves the case of a double major background. Specifically, whether the case of double major suggests the admission committee a versatility in working different fields or not. So I do not think this should be regarded as a duplicate question.  Edit2: Experience in proofs I have taken Discrete Mathematics and Formal Languages and Abstract Machines, in which we mostly used induction to prove things. Apart from that, in the mathematical methods courses we have gone through the proofs of Stokes' theorem, divergence theorem, etc. Although I mostly can understand a proof reading through it, and working out some things that seem off, I would not say that I am good at mathematical proofs, nor that I am much experienced with them.

Can I be admitted to graduate school in a different field from my degree?  Specific cases include:   If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field?  Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment?   Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them.


Disco dingo - mysql workbench - issue in installing  Getting following:  prashant@prashant-ubuntu:~$ sudo apt-get install mysql-workbench Reading package lists... Done Building dependency tree        Reading state information... Done Package mysql-workbench is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'mysql-workbench' has no installation candidate

Installing MySQL workbench on 10.04 or 10.10 is not a problem, as the deb packages are available on MySQL's website.  But there is no 11.04 deb package available.  So, how do I install MySQL workbench on 11.04 and keep it updated automatically when updates become available to ubuntu via apt-get update.


I see people asking similar questions since the beginning of Stack Exchange, for different reasons.  What I think, especially after the latest events, seeing up and downvotes as a way to agree or disagree with someone anonymously: it made sense at the beginning, when it was about technical questions, but MSE is more like a social network, with lots of issues being discussed, and a lot of people pouring their emotion into their posts. Some can feel endorsed by a high number of upvotes, and think they are winning an argument because of the sheer number of supporters. That's not how a civil discussion should work, IMHO. I think this hampers inclusion, because users whose opinions are different from the majority don't feel welcome to participate.  It's not about "useful" vs "not useful", and I am not suggesting to remove the possibility of upvoting or downvoting. What bothers me today is that every question and answer has a big number of "likes", and that's the first thing I see. The signature on each answer has a name, a number of medals and a score. It's ok when you share some information and get feedback, not if you try to contribute your point of view on a particular subject.  This kind of gamification works well for technical Q&A sites (mostly), but I don't find it appropriate for general discussions like here in MSE. It keeps people from posting their opinion and risk becoming a downvote magnet, because upvoting someone else is cheaper.

On the per-site-metas, users don't have a reputation score different from their score on the site (so a user's meta.stackoverflow reputation is just their Stack Overflow reputation). But meta.stackexchange has no base site, so it just has its own reputation score. But why?  The recurring theme on meta is that votes on meta mean different things. Most relevantly, feature request voting is completely different:     On posts tagged feature-request, voting indicates agreement or disagreement with the proposed change rather than just the quality or usefulness of the post itself.   Reputation by its very nature is using gamification to create incentives. On most of the sites this incentive is clear: have users contribute quality content. On meta, it's less clear. A user who submits an unpopular feature request on meta gets the double frustration of having their request denied and losing a bunch of reputation in the process. Additionally, given how the site-specific-metas work in terms of reputation, I'm left wondering whether meta was ever supposed to have reputation in the first place.  So what is the intended incentive of reputation on meta? Is discouraging users from submitting unpopular feature requests by design or an oversight?  Note: This question is not about functionality. I understand that privileges are unlocked with reputation, but that could easily be done via a Stack Exchange-wide reputation rather than a meta-specific one. This question is just about the incentives that reputation on meta creates.


Consider $f(x) = |x+1|$. I want to show that for every $x_0\neq-1$ , $\lim_{h \rightarrow 0}\frac{f(x_0+h)-f(x_0)}{h}$ is exist. So far i just wrote the definition, and looked on 2 options:When $x>-1$ and $x<-1$. But, i got stuck when i go the definiton of differentiabily in those points, because what the meaning of $\lim_{h \rightarrow 0}\frac{|x_0+h+1|- |x_0+1|}{h}$? tnx!

The definition of a derivative is the slope of a function tangent to a point. It is also defined as $$\lim_{h\to0} \frac{f(x+h)-f(x)}{h}$$ If we apply this to $f(x)= |x|$, we get that it is $\lim\limits_{h\to 0} \dfrac{|h|}{h}$, which is undefined. However, if we look at the graph of $|x|$, we see that there can exist a tangent line at x=0, with slope 0. So why is the derivative undefined instead of 0?


Calculate the number of nonnegative integer solutions of $$3x+y+z=23.$$

If the equation is $x + y + z = 24$ then it is solvable with stars and bars theorem.  But what to do if it is $3x + y + z = 24$?


I need to draw a schematic similar to that shown in the figure attached in . Are there softwares that allow to graphically design a schematic like that?

Documenting an electronics project is also an important task if it will be used by someone else other than the hardware designer(s). Right now I need to draw a diagram for a breakout board in order to show what functions are available on each pin. Something like the following diagram (of mbed):    Can someone recommends me a program that allows me to easily draw such diagrams?


I have Windows 7 and my computer has become very slow over the years. I am looking into switching over to Ubuntu or possibly Lubuntu. I was hoping to get some advice. I enjoy playing computer games and searching the web quickly, but right now my computer starts up incredibly slow and takes a while to open programs. I have never used a Linux OS as my main OS so I need a good transition between Windows and Linux. Which is better for this Lubuntu or Ubuntu?   Also, I want a way that I can switch over to Ubuntu/Lubuntu, but have the option to easily switch back if I decide that I do not like it. What is the best way to do this?  Thanks for your advice!  Edit: I also see that Xubuntu is an option for faster gaming performance. Could this be an even better option?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I think it's easier if I break this question into parts.   Is there a way to find lines that have the same values in the first field and the same values in the last field? - but not necessarily equal to each other?   Lines:    AAAAA stuff in between BBBBB   AAAAA more stuff in the middle CCCCCC   AAAAA even more cool stuff BBBBB   Lines of interest:    AAAAA stuff in between BBBBB   AAAAA even more cool stuff BBBBB    Is there a way to remove all but one of the lines that have the same first and last fields duplicated?   Before:    AAAAA stuff in between BBBBB   AAAAA more stuff in the middle CCCCCC   AAAAA even more cool stuff BBBBB   After:    AAAAA stuff in between BBBBB   AAAAA more stuff in the middle CCCCCC   I can process the file a little bit in order to simplify the solution - say set a fixed number of fields.  Currently, the file does not have the same number of fields in each line, but the first and last fields are of interest.  Spaces are between all the fields.  I have searched and have found some references to awk but I could not find examples of awk using multiple fields in this way.  Big thanks.

It took me a while to word this best.  Problem 1:  Is there a way to find lines in a text file that have the same string at the beginning and the same strings at the end?   Beginning and end strings not necessarily equal to each other.  Text between the two strings is not consistant in number of characters or number of hyphens.  A hyphen is in between notable strings (which I added to my large text file).  For example:  File:    AAAAA-tjhut-ghyut-FILE1.txt   BBB-fhuj-dnbhg-frt76-FILE2.txt   AAAAA-ghtujukr-hgute7gr-xhyutt-FILE1.txt   AAAAA-VGYT-4d7tt-xhyutt-FILE1.txt   CCCC-fjuk-dryy-fhuj-FILE3.txt   Lines to detect:    AAAAA-tjhut-ghyut-FILE1.txt   AAAAA-ghtujukr-hgute7gr-xhyutt-FILE1.txt   AAAAA-VGYT-4d7tt-xhyutt-FILE1.txt   Problem 2:  Is there a way to remove all but one of the lines containing the duplicate strings at the beginning and end from above?  Before:    AAAAA-tjhut-ghyut-FILE1.txt   AAAAA-ghtujukr-hgute7gr-xhyutt-FILE1.txt   AAAAA-VGYT-4d7tt-xhyutt-FILE1.txt   After:    AAAAA-tjhut-ghyut-FILE1.txt   Big thanks for any advice.  Note: I think using the occurances of the first hyphen and last hyphen can be used to locate the duplicate strings.


Firstly, General Relativity states that Spacetime is dynamic and is consonant with the distribution of matter/energy. How does String Theory predict gravity, when it is background dependent, that is it starts off with a fixed, and presumably flat space-time?  Secondly, String Theory predicts the existence of a graviton, but seeing we don't have a quantum theory of gravity, how do we even know that this is the correct quantization of gravity? In other words how do we verify that the graviton should have the properties that String theory says it does, that is what grounds do we have for believing in the properties of the graviton?  Thirdly, how do we go from the existence of gravitons to the curvature of space-time? When we talk about gravitons aren't they already existing in some space-time framework?

First, I'll state some background that lead me to the question.  I was thinking about quantization of space-time on and off for a long time but I never really looked into it any deeper (mainly because I am not yet quite fluent in string theory). But the recent discussion about  got me thinking about the topic again. Combined with the fact that it has been more or less decided that , I decided I should give it a go.    So, first some of my (certainly very naive) thoughts.  It's no problem to quantize gravitational waves on a curved background. They don't differ much from any other particles we know. But what if we want the background itself to change in response to movement of the matter and quantize these processes? Then I would imagine that space-time itself is built from tiny particles (call them space-timeons) that interact by means of exchanging gravitons. I drawed this conclusion from an analogy with how solid matter is built from atoms in a lattice and interact by means of exchanging phonons.  Now, I am aware that the above picture is completely naive but I think it must in some sense also be correct. That is, if there exists any reasonable notion of quantum gravity, it has to look something like that (at least on the level of QFT).  So, having come this far I decided I should not stop. So let's move one step further and assume string theory is correct description of the nature. Then all the particles above are actually strings. So I decided that space-time must probably arise as condensation of huge number of strings. Now does this make any sense at all? To make it more precise (and also to ask something in case it doesn't make a sense), I have two questions:        In what way does the classical space-time arise as a limit in the string theory? Try to give a clear, conceptual description of this process. I don't mind some equations, but I want mainly ideas.   Is there a good introduction into this subject? If so, what is it? If not, where else can I learn about this stuff?      Regarding 2., I would prefer something not too advanced. But to give you an idea of what kind of literature might be appropriate for my level: I already now something about classical strings, how to quantize them (in different quantization schemes) and some bits about the role of CFT on the worldsheets. Also I have a qualitative overview of different types of string theories and also a little quantitative knowledge about moduli spaces of Calabi-Yau manifolds and their properties.


i am trying to iterate over a large list of features and making a screenshot of the selected feature. My problem is that it seems to be a delay between the refreshing of the canvas and the taking of the screenshot. In other words, the screenshot taken does not correspond to feature i but to feature i-1, sometimes i have several identical screenshots. Is it possible to explicitely wait until the rendering is done by the mapCanvas before calling the saveAsImage method?  This is globally the code that i am using to do this task.   for i in range(n):   layer.select(i)   iface.actionZoomToSelected().trigger()   qgis.utils.iface.mapCanvas().zoomScale(1000)   iface.mapCanvas().refresh()    imgname = '_'.join(['','object',str(i)])   imgname = ''.join([imgname,'.png'])   iface.mapCanvas().saveAsImage(imgname)

I have the following function:  def createScreenshots(layer):   counter = 0   for feature in layer.getFeatures():     counter += 1     point = feature.geometry().asPoint()     qgis.utils.iface.mapCanvas().setCenter(point)     qgis.utils.iface.mapCanvas().refreshAllLayers()     qgis.utils.iface.mapCanvas().saveAsImage("D:\\\\m\\testing\\" + str(counter) + ".png")   Screenshots are not in real coordinates, .pgw header is not in right coordinates, therefore resulting png images are shifted.  Question: How to wait for rendering of canvas after setCenter is called?


I have a system-generated HTML email that includes base-64 images in the content.  <img style='display:block; width:100px;height:100px;' id='base64image'                         src='data:image/jpeg;base64, <!-- base64 data -->' />   After reviewing the original system-generated email, I need to make edits (to the text, not the image) and send the email to others.  However, when I try to copy or forward it to someone else, the image is missing.  How can I re-send the email after editing it, without losing the base64 images?

I have created an HTML page with modified from a template I got.... I want to send as a HTML based newsletter in Outlook 2016.  However the guides I see as "insert as text" do not apply to Outlook 2016 as there is no dropdown for inserting files for that in the 2016 version.  I am wondering how I go about being able to send this HTML email?


While reading through the significant difference between Thread and Runnable from , I encountered a difference that is:  When you extends Thread class, each of your thread creates unique object and associate with it. where as   When you implement Runnable, it shares the same object to multiple threads..   There is code give :   class ImplementsRunnable implements Runnable {    private int counter = 0;    public void run() {     counter++;     System.out.println("ImplementsRunnable : Counter : " + counter);   } }   class ExtendsThread extends Thread {     private int counter = 0;     public void run() {      counter++;      System.out.println("ExtendsThread : Counter : " + counter);    }  }   public class ThreadVsRunnable {     public static void main(String args[]) throws Exception {      //Multiple threads share the same object.      ImplementsRunnable rc = new ImplementsRunnable();      Thread t1 = new Thread(rc);      t1.start();      Thread.sleep(1000); // Waiting for 1 second before starting next thread      Thread t2 = new Thread(rc);      t2.start();      Thread.sleep(1000); // Waiting for 1 second before starting next thread      Thread t3 = new Thread(rc);      t3.start();       //Creating new instance for every thread access.      ExtendsThread tc1 = new ExtendsThread();      tc1.start();      Thread.sleep(1000); // Waiting for 1 second before starting next thread      ExtendsThread tc2 = new ExtendsThread();      tc2.start();      Thread.sleep(1000); // Waiting for 1 second before starting next thread      ExtendsThread tc3 = new ExtendsThread();      tc3.start();    }  }   The output is something like this:  ImplementsRunnable : Counter : 1 ImplementsRunnable : Counter : 2 ImplementsRunnable : Counter : 3 ExtendsThread : Counter : 1 ExtendsThread : Counter : 1 ExtendsThread : Counter : 1   It proves differences given above. I make a slight modification in code given below:  class ImplementsRunnable implements Runnable {    private int counter = 0;    public void run() {     counter++;     System.out.println("ImplementsRunnable : Counter : " + counter);   } }  class ExtendsThread extends Thread {    private int counter = 0;    public void run() {     counter++;     System.out.println("ExtendsThread : Counter : " + counter);   } }  public class ThreadVsRunnable {    public static void main(String args[]) throws Exception {     //Multiple threads share the same object.     ImplementsRunnable rc = new ImplementsRunnable();     Thread t1 = new Thread(rc);     t1.start();     Thread.sleep(1000); // Waiting for 1 second before starting next thread     Thread t2 = new Thread(rc);     t2.start();     Thread.sleep(1000); // Waiting for 1 second before starting next thread     Thread t3 = new Thread(rc);     t3.start();      //Modification done here. Only one object is shered by multiple threads here also.     ExtendsThread extendsThread = new ExtendsThread();     Thread thread11 = new Thread(extendsThread);     thread11.start();     Thread.sleep(1000);     Thread thread12 = new Thread(extendsThread);     thread12.start();     Thread.sleep(1000);     Thread thread13 = new Thread(extendsThread);     thread13.start();     Thread.sleep(1000);   } }   Now the output is :  ImplementsRunnable : Counter : 1 ImplementsRunnable : Counter : 2 ImplementsRunnable : Counter : 3 ExtendsThread : Counter : 1 ExtendsThread : Counter : 2 ExtendsThread : Counter : 3   I understand the fact that, here same object (extendsThread) is shared by three threads. But I'm confused here that how it is different from implementing Runnable. Here, even if *ExtendsThread * extends Thread, we are still able to share the object of this class to other threads. In my thinking the above difference does not make any sense.  Thanks.

From what time I've spent with threads in Java, I've found these two ways to write threads:  With implements Runnable:  public class MyRunnable implements Runnable {     public void run() {         //Code     } } //Started with a "new Thread(new MyRunnable()).start()" call   Or, with extends Thread:  public class MyThread extends Thread {     public MyThread() {         super("MyThread");     }     public void run() {         //Code     } } //Started with a "new MyThread().start()" call   Is there any significant difference in these two blocks of code ?