I installed A app called Tuxpaint But when I looked for it I could not find it. I know it installed because on the Lubuntu Software Center It showed up on installed Packages. Because I can't find the location I can not use the app.


Why does $\arctan(x)= \frac{1}{2i}\log \left( \frac{x-i}{x+i}\right)+k$?

Letting $x=\tan(u)$, $$\int\frac{1}{1+x^2} \, dx=\int\frac{1}{1+\tan(u)^2}\sec^2(u) \, du=u+k=\arctan(x)+k$$ Also,  $$\int\frac{1}{1+x^2} \, dx=\int\frac{1}{(x-i)(x+i)} \, dx=\frac{1}{2i}\int\frac{1}{(x-i)}-\frac{1}{(x+i)} \, dx$$ $$=\frac{1}{2i}\left(\ln(x-i)-\ln(x+i)\right)+c$$ $$=\frac{1}{2i}\ln \left(\frac{x-i}{x+i} \right)+c$$ Giving $$\arctan(x)=\frac{1}{2i}\ln \left(\frac{x-i}{x+i} \right)+q$$  Why is this correct? What is the nature of $q$ (is it 'flexible' so the equality doesn't really mean much)?  I think it probably has something to do with the relationship between $\log(z)$ and $\arg(z)$, but $\arg(z\pm i)$ is hard to calculate neatly.


Is there a program that can make live USBs for any distro, iso, you get the point. I can only find ones that make live USBs for other linux distributions and none for anything else.


High CPU Usage for "kidle_inject / x" in Ubuntu 16.10

After upgrading to Ubuntu 16.10 I am not able to use my laptop because of the high CPU Usage of "kidle_inject".    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                     7966 root     -51   0       0      0      0 S  35.2  0.0   4:27.77 kidle_inject/1              8327 xxxx      20   0 1906104 302952  69876 S  34.9  3.7   0:08.15 chromium-browse             7968 root     -51   0       0      0      0 S  34.5  0.0   4:31.28 kidle_inject/3              7965 root     -51   0       0      0      0 S  33.9  0.0   4:24.68 kidle_inject/0              7967 root     -51   0       0      0      0 S  32.6  0.0   4:28.50 kidle_inject/2               sudo rmmod intel_powerclamp stops the crazy processes but I need to execute it each time after restarting my PC.  Please help me. Thanks.


storing a directory name with spaces in a bash variable

(Note:  after some more research I have a partial answer, but I don't like having to write the actual commands against that variable differently depending on embedded spaces or not.  I'll accept better suggestions).  I like to store various work variables in bash as I am working on something.  This avoids having to type it up every time and also helps when you come back to work on it some time later (stick the assignment in a localprofile.sh file and source that later...).  I'd like to store a directory name with spaces in it.  I know how to do deal with spaces in file/directory names interactively, using either quoting or \-based escaping:  $ ls -1 /Users/myuser/Library/Application\ Support/ | tail -5 iTerm2 icdd org.videolan.vlc pip videosubscriptionsd   or  $ ls -1 "/Users/myuser/Library/Application Support/" | tail -5 iTerm2 icdd org.videolan.vlc pip videosubscriptionsd   Now I'd like to assign that directory to a bash $dn variable and that's not working so well.  Here are some various tries.  On purpose I stayed away from ~-based shell extension.  dn='/Users/myuser/Library/Application Support/' echo '' echo '' echo $dn ls -1 $dn  dn='"/Users/myuser/Library/Application Support/"' echo '' echo '' echo $dn ls -1 $dn  dn=/Users/myuser/Library/Application\ Support/ echo '' echo '' echo $dn ls -1 $dn  dn="/Users/myuser/Library/Application\ Support/" echo '' echo '' echo $dn ls -1 $dn   each one of these shows a variation on ls: /Users/myuser/Library/Application\: No such file or directory


I found the following identity when trying to prove something else: $$\sum\limits_{n=1}^\infty\frac{(n-1)!x}{\prod\limits_{k=1}^n (k+x)}\equiv 1,~ \forall x>0$$ I'm sure there's a name for it (or for a more general identity for which this is a special case). Does anyone know the name?


is the sequence $\{a_n\}$ is strictly increasing or strictly decreasing?

Given $a_n = (1 + \frac{1}{n})^{n+1}$ then  the sequence  $\{a_n\}$ is strictly increasing  or  strictly  decreasing ?  My attempts  : $\sqrt [n+1] e > 1 + \frac{1}{n}$ that  is  $e >(1 + \frac{1}{n})^\frac{1}{n+1}$  so  $\{a_n\}$ is  strictly  increasing  Pliz  verified  Am i right  /wrong ?  Any hints/solution  will be appreciated  thanks u


Redirecting from http to https impact SEO?

According to what I have learnt, when we take a decision of permanent redirect, the SEO is impacted like in the folowing example:   Redirect www.example.net to www.example.com Redirect www.example1.com to www.example2.com Redirect www.example.com/category1 to www.example.com/category2   The best thing to do is to take a solid and immutable decision from the beginning.  My question:  I am not prepared yet for https URLs, but it's programed in the midlle term, will I incure some SEO loss when I will redirect all http URLs to https ? Or bots are so smart to handle sush situations.


Error "The Apple ID has not yet been used in iTunes Store"

I have an iPhone 4. I have created the Apple ID. Now when I try to download anything from the App Store and I log in with my ID and password, I see the message "this ID has not been yet used". What should I do? I have no more knowledge about these procedures.


The picture show the threads I want to create on the highlighted object. Problem is I don't know how and tutorials really haven't helped much as most of them seem to be about creating a bolt. So I was hoping I could get some help on how to do this efficiently.While keeping the top flat like a water bottle. The picture shows the threads I'm after.


Suppose $G$ is finite, let $A_1,A_2,...,A_n$ be the conjugacy classes in $G$ and they are distinct. how do I show that if $a_ib_j = b_ja_i$ where $a_i$ is in $A_i$ and $b_j$ is in $A_j$, then $G$ is abelian  Thanks


Is an Unarmed Strike considered a Weapon attack?

For the purposes of the fighter Battle Master archetype, whenever a maneuver calls for a "weapon attack" does that include an unarmed strike?


cp runs from command line but file not found from script

I have a script to reorganize my directory structure that contains:  files=./*"$pattern"I{"$ifirst".."$ilast"}.ext cp ${files} ../"$pattern"/"$i"/   When I run the script, I get an error:  ./*S6I{001..129}.ext: No such file or directory   However, if I echo the command and then copy/paste it into the terminal I get the behavior I'd expect:  cp ./*S6I{001..129}.ext ../S6/1/   Why would this not run correctly from the script?


From a set of socks divided into two bins, what is the probability of pulling out no matching pairs?

You have $10$ different pairs of socks, one sock from each pair is put into one of two bins. So you now have two identical bins $A$ and $B$, containing one of each sock each. You randomly pull one sock from bin $A$ and one sock from bin $B$, and pair them. You repeat this until both bins are empty and you have $10$ random pairs of socks. The first pull is easy, you have a $1/10$ chance of making a matching pair. What's tripping me up is that if you don't pull a matching pair, you have destroyed two future potential pairs. The second pull is now much more complicated, because you could pull a matching pair (game over), you could destroy two more potential pairs, you could destroy one potential pair, or you could pull the complementary two socks from the first pull, leaving you with $8$ potential pairs still. It's very dynamic, I guess? Note: it definitely does matter that the socks are in separate bins. I've solved the situation for up to $5$ pairs laboriously using probability trees but haven't gleaned much about any generalisation I could use. Any help would be much appreciated. (also if you have any suggestions of what to tag this with please let me know. I've not studied maths in years, just taken this on for fun and hit a wall)


"Disputed low quality review" automatic flag reports more delete votes than "looks good" when it is not so

Looking at the flags in the moderator queue, I noticed the following automatic flag.    Clicking on the "review task" link I see the following.    The votes are actually one for deletion and one for "looks good." Such situation should not be reported as "more delete votes than 'looks good'"; either the text should be fixed to not indicate "more" reviews, or a flag should not be raised in this case.


How to loop over a python list using the index numbers?

I was trying to loop over a list in python using the indices but it drops error. Can you guys help me out with this? What could be the syntax that could fix this ?   abs = [10,20,40]   for i in abs:      new_abs = abs[i]+ abs[i+1]     print(new_abs)   So, i have managed to use hard code for the temporary use.   abs = [10,20,40]  new_abs = [ abs[0], abs[0]+ abs[1] , abs[1]+abs[2] ]  print(new_abs)   Can you please, let me know the proper syntax to loop over this index numbers?


What is $$\int \frac{1}{\sqrt{25-x^2}}$$ WolframAlpha says $\sin^{-1}(\frac{x}{5})$ while I got $\frac{1}{5}\sin^{-1}(\frac{x}{5})$. What is correct? Thanks in advance.


If $\sum a_n$ converges then for which $p$ does $\sum \sqrt{a_n}/n^p$ converge?

How can I show that for any sequence $(a_n)_{n\in\mathbb N}$ and $p>\frac12$, we have that $$\sum_n \frac{\sqrt{a_n}}{n^p}$$ converges if $$\sum_n a_n$$ converges?


Can I create a new and clean account without getting it merged with this account?

I want to create a new account on Stack Overflow, starting from scratch, focusing it on other kinds of questions. I dont want to merge my two accounts; I want to have the two accounts.  It is legal and safe to have them in Stack Overflow? Can I be sure that the accounts wont be merged?


Can anybody suggest programming examples that illustrate recursive functions? There are the usual old horses such as Fibonacci series and Towers of Hanoi, but anything besides them would be fun.


I'm not able to match \x00 or \x05 inside a string

Not able to match regex '\x00'  I have tried using the regular expressions \x[0-9][0-9], \x*, \x0* but nothing seems to work.  However it works when i use \x00 directly but not with regex. I need the regex to be working as the numbers may vary.  re.findall(r'\ \x[0-9][0-9]','abc\x00pqr') # Intentional space between \&\ as i was not able to post without it   This code doesn't match anything. The same problem even after compiling the pattern.


Please suggest me fixes for how can I hide the botton bar and merge it into side one? I want both left and bottom bars into one single unit and make it appear at bottom. Dash to Dock is not working for it, Thanks in advance.


My chat WebSockets are getting closed; what gives?

I've been hunting down a bug in  for quite a while now: sometimes messages would simply stop appearing, and I would have to refresh to make Chatception start working again.  Yesterday I finally got tired of it and decided to start logging every single WebSocket event (message, error, close) to see if any of that data could help in tracking down the bug.  Today the bug happened, so I immediately opened up my console and found:    Why are my chat WebSockets occasionally being closed (without a reason, even)? I haven't yet found a way to reliably reproduce this, but it happens at least a few times per day if I just leave a chat tab open in the background.  Here's how I'm opening the WebSocket, in case that's relevant (apologies for the terrible code):  function getSock() {     return new WebSocket(JSON.parse($.ajax({             type: 'POST',             url: 'http://' + location.host + '/ws-auth',             data: {roomid: CHAT.CURRENT_ROOM_ID,             fkey: fkey().fkey         }, async: false}).responseText)['url'] +         '?l=' +         JSON.parse($.ajax({             type: 'POST',             url: 'http://' + location.host + '/chats/' + CHAT.CURRENT_ROOM_ID + '/events',             data: {fkey: fkey().fkey},             async: false         }).responseText)['time']); }


Enchant Which Weapon Property: % Attack Speed or % Damage

As a Barbarian who is mainly playing WW build, I don't know which I should prioritize on:  weapon damage, IAS or % Damage?  This is the item I got:


What should I be aware of when installing Linux on a Mac?

I have a Macbook Pro and I am loving it, though I still miss my Linux box, there are many things I need which are not completely compatible with Mac OS X.  I heard many stories about installing Linux on a Mac OS, some say it's not a problem, but some others tend to say differently.   My question is, is it or is not fine to install Linux on a Mac OS machine? What are the pros and cons?  I am very well aware about virtual machines, but let's be honest, they do not run quite as well when running on a physical hardware.


how to implement File Locking in java 6 for both windows and linux

In my project, i need to imeplement file locking and the problem is that we need to use java 6 only so what are the ways through which i can implement file locking for both platform(windows/linux)


Solving $\sin x\cos3x+\cos x\sin3x=\frac{\sqrt{3}}{2}$ in the interval $[0, 2\pi]$. How to handle the interval?

Solve the following trigonometric equation: $$\sin(x)\cos(3x) + \cos(x)\sin(3x) = \frac{\sqrt{3}}{2}$$ in the interval $[0, 2\pi]$.  I don't know how to do this question because I am mainly struggling with intervals. How do we solve for a trig equation if we have to use the interval? Is the interval the restriction for $x$? I only started to expand the equation by using the compound angle identity of $\sin(a + b)$ but I don't know what to do next. I'd be thankful if anyone can help me out with this question!


Feedback Request: New Timeline Question View

There is an experimental timeline view for questions now available on meta ONLY! (Now working on SO, SF, and SU as well)  This is partially motivated by comments about how difficult it is to follow very active questions which have a lot of activity, and also the feedback on the API which was heavily dominated by "we need to know what happened in this time range" type responses.  It can only be accessed through URL hackery at the moment. To get to it, enter question URLs like so:  https://meta.stackexchange.com/posts/{id}/timeline  This is a chronological timeline of everything that happened on a question, including   initial question ask answers  revisions comments closure, deletion, reopen, undelete, etc votes   all based on when they happened in chronological order.  We are thinking about making this a fourth tab on the question, like so:  Timeline | Oldest | Newest | Votes  Please try it out and provide feedback. It is still a little rough, so we are not looking for highly detailed bug reports, just more general feedback.  Timeline view for this question:


Likert item as independent variable for ANOVA?

I am trying to analyze data based on a sample size of around 50 and would appreciate advice on which statistical test would be most appropriate. Participants, on a single questionnaire, were asked to complete two different sections. Variable 1: rating Likert items on a scale from 1-5 (strongly agree to disagree). Variable 2: rating Likert items of a validated tool on a scale of 1-9, which is averaged to obtain a single number.  My research question is: Do those who 'agree' with the statement in the first section significantly differ in terms of their scores on the variable 2, compared to those who 'disagree'? (ex. Do participants tend to 'agree' with "I like to read books for pleasure." have higher IQs (variable 2) than those who 'disagree'?)  I was advised by a colleague to run a one-way ANOVA with variable 1 (categorical) as IV and variable 2 (continuous) as DV.   Question 1: My independent variable is the three groups: 'agree', 'neutral', and 'disagree.' (I combined strongly agree with agree because of low frequencies and likewise for strongly disagree and disagree.) However, there are many more participants in the 'agree' category than in the 'disagree' category. The distribution is, on average, around 44 agrees, 3 neutrals, and 3 disagrees. Do the (very) unequal sample sizes prevent me from performing ANOVA, or any other tests? Which test would be most appropriate for this analysis?  Question 2: I would like to run analyses on all of the Likert items, which is more than 10 statements. (ex. Seeing how IQs correlate with agreement to many statements including “I like to read books for pleasure,” “I watch a lot of TV,” “I exercise more than 30 minutes each week,” etc.) I was planning to do a Bonferroni correction to adjust for the multiple tests. Would this be correct, and help make my analyses more robust? Note: The continuous data are not normally distributed (there is negative skewness), but I seem to be able to correct the skewness using logarithmic transformation.  Any advice or suggestions for papers to read would be appreciated. Thank you!


How do I find out what is happening during an upgrade

I was running 17.04 on my really ancient 256Mb PIII.  I use it mainly for reading pdf docs while I'm programming on other machines.  Since 2 years ago, it has been coming up with a software upgrade icon.  I decided to update 18.04 two days ago.  I know 19.04 is out but it did not give me that option.  Went through a question and answer session and then a reset.  After booting up, nothing has appeared on the screen since the reset.  The disk light flashes occasionally so I assume it is doing something.  Is there anything key sequence I can press (I've tried all the function keys already) to get it to show me what it is doing?   I'd just to know what it is doing.


I'm using Ubuntu 12.04 in VirtualBox on a MacBook. The current shortcut for the dash home launcher is the Command key (Super).  I'm trying to disable it. First, this option is not present in the .   I have already tried:   Changing it through  Changing it through    Even though when I press Super or Super+F it still launches the dash home.  Any ideas on what I can still try?


Referring to  I managed to turn night light on/off via console. I wonder if theres any option to check the state of the night light. I tried this:  gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled = true  I also tried to use echo to see what that line returns. Like so:  echo gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled  But I'm not doing this right either. Anyway I'm new to Linux. I'd appreciate if someone could help me out with this.


Show that $\log(x^2+y^2)$ is not a real part of analytic function in $z\ne 0$.

Show that $$u(z)=\log(x^2+y^2)$$ is harmonic in $z\ne 0$ and that $u$ cannot be the real part of an analytic function in $z\ne 0$.   My attempt:  Direct calculation shows that $u_{xx}+u_{yy}=0$ in $z\ne 0$.  The solution in the book to show that $u$ cannot be a real part of an analyitc function in $z\ne0$ is that if such $f$ exists then $f(z)=\log(z)+c$ for all $\arg(z)\in(0,2\pi)$ but I don't see why that's true.


The 'ok' on the 'Your Answer' dialog on unregistered sites is a bit too high:     You can see the top of the k is outside the actual box, increasing the margin-top by 10px in the containing div fixes it.


How do I answer apt installation questions non-interactively?

Some packages ask configuration questions when installed with apt-get. That makes life awkward when I want to install something non-interactively.  How do I find out what questions a package will ask, and provide answers automatically?  (Context: I'm installing things using configuration management tools. But this probably applies in a wider range of cases.)


If $2^n+1$ is prime how to show that  $n$ must be a power of $2$  Being at elementary level I am at a loss what to begin with?


How to install cuda 5.5 under Ubuntu 12.04 LTS 64-bit?

How to install CUDA 5.5 under Ubuntu 12.04 LTS 64-bit?


If U contains A and B, and X is 80% of A, how much percents is X in U?

Let's suppose that U is the universe set and it contains the sets A that is 60% of U and B that is 40% of U, so they are disjoints, the set A contains the set X that is 80% of A, how much in percent is X in U?


Next tag badge score is frozen and not updating

When you look at my  on Mythology.SE, it says in the "Next tag badge" progress that the  score is 5:        However, my actual tag score, if you slide down, is 13:        Is it something I hadn't noticed? A bug?


Using `M` instead of `k` when rep is >= 1M on https://chat.stackexchange.com/users

I read on  ()    Shouldn't it be 1.03m or (if we really follow the conventions of the metric system) 1.03M instead?


How can I launch a browser with no window frame or tabs/address bar

I am looking for a way to launch Chrome, Firefox, or IE9+ (any one will do) from a script or command line without any window frame, address bar, or tabs section.  Illustration:    For instance, I'd like to only be able to see the section that is comprized of the orange box, and the area inside of it.  The horizontal scroll bar won't be an issue (I control the html that will be displayed and I can ensure it won't need to scroll). Ideally I'd like to cut out the vertical scrollbar, but I could live with it if it were shown.  Does anyone know of any tool or script that would allow me to do this on Windows 7?


Redirect input to several different output files

I have an inputfile that looks like this:  <event> foo bar </event> <event> random text </event>   I would like to split this up into several output files, such that each file has exactly one <event>...</event>.  I tried doing this with awk, but it is not clear to me how I can redirect the output to different output files. Is it possible? Or do I have to resort to something like e.g. python?


Can someone explain what exactly this code does and how? Also, what is i set equal to? function negate (f) {     return function (i) {         return !f(i);   }; } var isNumber = negate(isNaN);  // function object alert(isNumber(5));            // => true


The "proper" way to test if a service is running in a script

My problem:  I'm writing a bash script and in it I'd like to check if a given service is running.  I know how to do this manually, with $ service [service_name] status.  But (especially since the move to systemd) that prints a whole bunch of text that's a little messy to parse. I assumed there's a command made for scripts with simple output or a return value I can check.  But Googling around only yields a ton of "Oh, just ps aux | grep -v grep | grep [service_name]" results. That can't be the best practice, is it? What if another instance of that command is running, but not one started by the SysV init script?  Or should I just shut up and get my hands dirty with a little pgrep?


Does the Linux kernel have knowledge of bind mounts?

I've been looking for a way to list bind mounts or at least determine if a particular mount is a bind mount. Several answers on this website say that because it is a parameter of a mount operation it will not appear in files like /proc/mounts or in the output of mounts. If the device node /dev/sda1 is mounted at / and the directory /etc is bind mounted at /etcetera, then the output from mount will look like:  /dev/sda1 / <some other stuff> /dev/sda1 /etcetera <some other stuff>   But the kernel must have some knowledge of a bind mount, otherwise it would not be able to bind one directory to another and keep a record of that particular directory being bound to some other directory. Any thoughts on this?  UPDATE: I am not asking about how to find bind mounts. I am asking how the kernel can possibly know about them.


Keyboard shortcut to autocomplete the user in comments

While commenting on posts, when we start typing @ and a few characters that match one of the earlier commentators, a suggestion appears above the comment text area. Is there a shortcut to accept that suggestion?


While using a  with dual boot installed, after booting up the Dell logo and grub root, Window does not show and the system boots straight to Ubuntu. Also, I can't mount the windows partitions while on Ubuntu.  How do I troubleshoot this?


I am interested in compiling a custom kernel in Ubuntu 20.04 so I can use the fingerprint scanner in my hp envy x360. Also I want to learn how to learn the process. Where do I start? How difficult is it? Any pointers and/or advice would be greatly appreciated.


How to re-install ubuntu that is pre-installed by manufacturer

Actually I wiped off ubuntu 12.04 lts that was pre-installed by manufacturer and want to just have it back is there any of doing this.


Is an entry level DSLR going to shoot nice portrait pictures?

I'm thinking of buying entry level DSLR Nikon D3500. I haven't used DSLR before, so I'm not sure if it is a good decision to buy DSLR. I would like to know if with this camera I can shoot portraits with blured background such as on the new smartphones with two cameras. Another thing I want to know if buying DSLR is good for beginners in photography and amateur photographers and is it worth the money.  I'm new in this community, so I'm not sure if this is the right place to ask this question.


What the most natural way to refer to a dead human body?

(Sorry for the macabre subject) I was wondering which of the following is the most natural way to refer to a dead human body in this sentence:      The detective kneeled down to inspect ....           1- Mike's body          2- Mike's dead body          3- Mike's corpse          4- the body of Mike          5- the dead body of Mike          6- the corpse of Mike...


Has the death sentence ever been introduced in Gotham?

With the amount of super villains roaming the streets of  and the massive body count that inevitably follows in their wake, has the death sentence ever been introduced to try and handle the crime epidemic?  Incarceration doesn't seem to work as [] escapes  /  whenever he / she feels like it.  Have we ever seen the death sentence put to use in Gotham, even for a short period of time?   * Extra points if you can tell me who that guy is on the left, in front of Killer Croc and behind Scarecrow in that rogue's gallery picture


Has anyone been able to get the Citrix Receiver running on Ubuntu 14.04 64bit?

I have installed the Citrix Receiver 13.0.0.256735 as described for Ubuntu 13.10 here:   The installation has succeded under Ubuntu 14.04 64 bit. But if I start the Citrix Receiver nothing happens.  Is there someone who has it running with Ubuntu 14.04?


How do I make chrome tell a website it's visiting say it's internet explorer

I want to make chrome tell a website the browser is not chrome, but IE 9 or 10. How is this done?


Number of $(0,1)$ $m\times n$ matrices with no empty rows or columns

I am looking to calculate the number of $m\times n$ matrices which have no empty rows or columns (at least one $1$ in each row and column).  I have looked at the answers to a few similar questions such as  and  but I am struggling to make these approaches work in this case.


Preservation of ideals in localized rings

Refer to localization of rings in Lang's Algebra p. 108. In particular, let $A$ be a commutative ring, $S$ a subset of $A$ that is a submonoid of the multiplicative monoid structure of $A$, containing the identity. Then  $S^{-1}A$ is the set of elements $\frac{a}{s}$ with $a \in A$ and $s \in S$.  We have $\frac{a_1}{s_1}=\frac{a_2}{s_2}$ if there exists $\bar{s} \in S$ such that $\bar{s}(s_2a_1 - s_1 a_2)=0$. Now consider the injection of $A$ into $S^{-1}A$ given by $x \mapsto \frac{x}{1}$. This is a ring homomorphism. Let $J$ be an ideal of $A$. Ring homomorphisms preserve ideals and so the injection of $J$ into $S^{-1}A$, call it $J^{*}$, will be an ideal. My problem is that i don't see why for any $\frac{a}{s} \in S^{-1}A$ and any $\frac{j}{1} \in J^{*}$ we will have that $\frac{aj}{s}$ will be in $J^{*}$, i.e. why there must exist an element $\kappa \in J$ such that $\frac{aj}{s}=\frac{\kappa}{1}$.


How's Monte Carlo different from random sampling with replacement?  Because Wikipedia page for Monte Carlo says:     Monte Carlo methods vary, but tend to follow a particular pattern:         Define a domain of possible inputs    Generate inputs randomly from a   probability distribution over the domain    Perform a deterministic   computation on the inputs    Aggregate the results      Isn't 2 about doing exactly the same thing as sampling with replacement?  Or is it Monte Carlo, because one does 3. and 4. in addition?


Sorting by "hot" - what does it mean and why are the sort option different between the homepage and the questions tab?

It has come to my attention that on the homepage on any given SE you can sort by "active", "hot", "week", and "month".  The tooltip says the latter three sort by "most views, answers, and votes" over different periods of time.  So it seems that this is uses a different formula than the "arbitrary hotness points" that create hot network questions.  What is the formula and what is the rationale for using views here, but not in the network hot questions?    Also, what is the rationale for offering such different sorting options between the homepage and the questions tab?  I have been active for ~4 months and never realized there was a sort by hotness option on a different screen (as I have always looked at the questions tab to see what was new) until today.


"did she tell" or "has she told": should we use simple past or present perfect here?

Stella isn't here, did she tell you where she was going? Stella isn't here, has she told you where she was going?  That is, should simple past or present perfect tense be used? It is an exercise from a grammar book and it seems to suggest (I don't have the answer key) that present perfect is the answer as it is also talking about the current status ("Stella isn't here"). But "did you tell" sounds better to me somehow. What do you native speakers think? Thanks!


Close reason and duplicate question list being removed when loading edits to answers on closed question

I opened  which has been closed as a duplicate. Prior to being closed it had received a single answer. After I had loaded the page an edit was made to that answer, resulting in the notification/live refresh link ("an edit has been made to this answer; click here to refresh") appearing at the top of the answer.  Upon clicking on the link to refresh the answer, the answer was updated (as expected) but the box containing the list of duplicate questions ("This question already has an answer here:") and the close reason were removed from the page.


When I try to install WampServer in linux system, I get this error message:  $ sudo apt-get install wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe [sudo] password for reem:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe E: Couldn't find any package by glob 'wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe' E: Couldn't find any package by regex 'wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe'   Please can I find the best solution for my little problem?


Why it's true? $\arcsin(x) +\arccos(x) = \frac{\pi}{2}$

The following identity is true for any given $x \in [-1,1]$: $$\arcsin(x) + \arccos(x) = \frac{\pi}{2}$$  But I don't know how to explain it. I understand that the derivative of the equation is a truth clause, but why would the following be true, intuitively?  $$\int^{x}_{C1}\frac{1\cdot dx}{\sqrt{1-x^{2}}} + \int^{x}_{C2}\frac{-1 \cdot dx}{\sqrt{1-x^{2}}} =\\  \arcsin(x) - \arcsin(C1) + \arccos(x) - \arccos(C2) = 0 \\  \text{while } \arcsin(C1) + \arccos(C2) = \frac{\pi}{2}$$  I can't find the right words to explain why this is true?    Edit #1 (25 Jan, 20:10 UTC): The following is a truth clause: $$ \begin{array}{ll} \frac{d}{dx}(\arcsin(x) + \arccos(x)) = \frac{d}{dx}\frac{\pi}{2} \\ \\ \frac{1}{\sqrt{1-x^{2}}} + \frac{-1}{\sqrt{1-x^{2}}} = 0 \end{array} $$  By integrating the last equation, using the limits $k$ (a constant) and $x$ (variable), I get the following:  $$ \begin{array}{ll} \int^x_k\frac{1}{\sqrt{1-x^{2}}}dx + \int^x_k\frac{-1}{\sqrt{1-x^{2}}}dx = \int^x_k0 \\ \\ \arcsin(x) - \arcsin(k) + \arccos(x) - \arccos(k) = m  \text{ (m is a constant)}\\ \\ \arcsin(x) + \arccos(x) = m + \arcsin(k) + \arccos(k) \\ \\ \text{Assuming that } A = m + \arcsin(k) + \arccos(k) = \frac{\pi}{2} \text{ ,for } x \in [-1,1] \end{array} $$ Using Calculus, why is that true for every $x \in [-1,1]$?    Edit #2:  A big mistake of mine was to think that $\int^x_k0 = m \text{ (m is const.)}$, but that isn't true for definite integrals.  Thus the equations from "Edit #1" should be as follows: $$ \begin{array}{ll} \int^x_k\frac{1}{\sqrt{1-x^{2}}}dx + \int^x_k\frac{-1}{\sqrt{1-x^{2}}}dx = \int^x_k0 \\ \\ \arcsin(x) - \arcsin(k) + \arccos(x) - \arccos(k) = 0\\ \\ \arcsin(x) + \arccos(x) = \arcsin(k) + \arccos(k) \\ \\ A = \arcsin(k) + \arccos(k) = \frac{\pi}{2} \text{ ,for } x \in [-1,1] \end{array} $$


A topological property $\mathcal{R}$ is contractive if $(X,\tau)$ has property $\mathcal{R}$ and if $\tau^{\prime} \subset \tau$, then (A, $\tau^{\prime}$) has property $\mathcal{R}$.  A topological space is $T_B$ if each compact subset  is closed.  A topological space is called a US-space provided that each convergent sequence has a unique limit.  A topological space is called a C- C-space provided that  the  compact subsets  are precisely the closed sets.     Is property C-C , US contractive,  hereditary?      Is property $T_B$  contractive?


Should this question begin with Whoever or Whomever:  W--- we trust the most is really our master.  Clearly the clause "W-- we trust the most" is in the subjective (nominative) position in the sentence as a whole, followed by "is" and a predicate nominative. However, if "We" is the subject of that clause, it would seem that the objective (accusative) case (therefore "Whomever") would be correct. Our current sloppy and hideously erroneous usage tends to obliterate objective forms ("whom") in most cases, but what is the correct usage?


Linked and related questions show same question with different score

From :    It's been stated that it's not a bug for the same question to appear in both lists. But shouldn't they have the same score?  For the record, it doesn't look like an issue with one being the question score and the other being the answer score, because at the time of this screenshot the question was +26 and the highest-scored answer was +22 (while the screenshot shows +26 and +23).


What's the difference between synchronized(this) and synchronized(some other object)

Public Class A {   private Object memberlockObject = new Object();    public doStuffapproach1(){        synchronized(this){                // Do something;       }   }   public doStuffapproach2(){        synchronized(memberlockObject){                // Do something;       }  }   public doStuffapproach3(Object parameterLockObject){        synchronized(parameterLockObject){                // Do something;       }  }  }   In the above code, do the methods doStuffapproach1, doStuffapproach2, doStuffapproach3 achieve the same type of block synchronization or not.  If not, how do they differ from each other. In what scenarios should each be used ?  P.S : I understand that method level synchronization is as good as synchronizing whole method body on (this).


I have code that ought to make my ListView clickable and bring my user to another activity. But I'm getting an error saying   Attempt to invoke virtual method 'void android.widget.ListView.setClickable(boolean)' on a null object reference   But I've no idea how it's a null object reference if the ListView is working. Here is my feed code:   public void populateList() {     DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();     DatabaseReference allBooksRef = rootRef.child("All_Books");     ValueEventListener valueEventListener = new ValueEventListener() {         @Override         public void onDataChange(DataSnapshot dataSnapshot) {             List<Book> bookModelList = new ArrayList<>();             for(DataSnapshot ds : dataSnapshot.getChildren()) {                 Book book = ds.getValue(Book.class);                 bookModelList.add(book);             }             ListView list = (ListView) findViewById(R.id.listView);             CustomListAdapter adapter = new CustomListAdapter(AdminFeed.this, bookModelList);             list.setAdapter(adapter);              list.setClickable(true);          }          @Override         public void onCancelled(DatabaseError databaseError) {}     };     allBooksRef.addListenerForSingleValueEvent(valueEventListener);      list.setClickable(true);     list.setOnItemClickListener((AdapterView.OnItemClickListener) this);  }   public void onItemClick(AdapterView<?> parent, View view, int position, long id) {      Intent i = new Intent(AdminFeed.this, BookIndexed.class);     i.putExtra("ValueKey", modelList.get(position).getTitle());     i.putExtra("ValueKey2", modelList.get(position).getAuthor());      startActivity(i);      title = bookModelList.get(position).getTitle();   }   Why is this throwing up such an error?


How to execute two grep commands on the same file?

I have a file. I want to select the lines that does not start with www. and does not contains slashes. I want to output the result into result.txt  To achieve the first requirement:   grep -v '^www\.' myfile.txt > result.txt.   To achieve the second, I will take result.txt and execute:  grep -v '/' result.txt > result2.txt   Is there any better shorcut to execute several commands on the file and store the result into one output file: result.txt  I am aware of | to execute several commands where the output of the command on the left of | is input of the command in the right of |. What I do not know is, in case of grep or any other command, should I use the file name in the command on the right of |. In other words, should it be:  grep -v '^www\.' myfile.txt | grep -v '/' > result.txt   OR  grep -v '^www\.' myfile.txt | grep -v '/' mfile.txt > result.txt


I'm trying to fit a spline for a GLM using R.  Once I fit the spline, I want to be able to take my resulting model and create a modeling file in an Excel workbook.     For example, let's say I have a data set where y is a random function of x and the slope changes abruptly at a specific point (in this case @ x=500).    set.seed(1066) x<- 1:1000 y<- rep(0,1000)  y[1:500]<- pmax(x[1:500]+(runif(500)-.5)*67*500/pmax(x[1:500],100),0.01) y[501:1000]<-500+x[501:1000]^1.05*(runif(500)-.5)/7.5  df<-as.data.frame(cbind(x,y))  plot(df)   I now fit this using  library(splines) spline1 <- glm(y~ns(x,knots=c(500)),data=df,family=Gamma(link="log"))   and my results show  summary(spline1)  Call: glm(formula = y ~ ns(x, knots = c(500)), family = Gamma(link = "log"),      data = df)  Deviance Residuals:       Min       1Q   Median       3Q      Max   -4.0849  -0.1124  -0.0111   0.0988   1.1346    Coefficients:                        Estimate Std. Error t value Pr(>|t|)     (Intercept)             4.17460    0.02994  139.43   <2e-16 *** ns(x, knots = c(500))1  3.83042    0.06700   57.17   <2e-16 *** ns(x, knots = c(500))2  0.71388    0.03644   19.59   <2e-16 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for Gamma family taken to be 0.1108924)      Null deviance: 916.12  on 999  degrees of freedom Residual deviance: 621.29  on 997  degrees of freedom AIC: 13423  Number of Fisher Scoring iterations: 9   At this point, I can use predict function within r and get perfectly acceptable answers.  The problem is that I want to use the model results to build a workbook in Excel.    My understanding of the predict function is that given a new "x" value, r plugs that new x into the appropriate spline function (either the function for values above 500 or the one for values below 500), then it takes that result and multiplies it by the appropriate coefficient and from that point treats it like any other model term.  How do I get these spline functions?    (Note: I realize that a log-linked gamma GLM may not be appropriate for the data set provided.  I am not asking about how or when to fit GLMs.  I am providing that set as an example for reproducibility purposes.)


Are the known exoplanets representative of the population of exoplanets?

An  states that most of the 715 newly announced exoplanets orbit very close to their host stars.   Do the theories predict that this is a representative sample and that most planets are very close to their host stars? Or is it just that our current detection techniques are predisposed to finding only those planets close to their stars (because the sensors look for dimming of the host star for example)?


A while ago I heard a preacher say during a speech the following personal anecdote:     When I arrived at the Atlanta airport, I saw a man with my name written on a card approach me and say 'are you reverend G…?' And I said 'He is I'…   He is I? Is that correct? I guess if we apply the rule “when the pronoun is the subject of a verb” it might be technically correct, but even Shakespeare wrote “Oh, woe is me.…” not “woe is I.”  I wonder if the preacher knocked at doors saying “it is I.”


Template Changes in C++ Visual Studio 10 to Visual Studio 13

I'll try to make this as short as possible without overloading on code. If you want more of the code, please comment.  I am running into a compiler error with some lines of code relating to templates. This code was written in 2005, but continued to work in Visual Studio 2010. While upgrading to VS2013, it no longer works.  The line with an error is   typedef typename LookupPow<POW - 1>::Evaluate<Pow_impl<ROOT, POW - 1 >> ::Value Next;   seeming to be an issue with the < after Evaluate, the compiler gives  error C2059: syntax error : '<'    It seems to be a complicated way to write a power function such that it evaluates at compile time instead of run-time.  The line is in this block of code  template <int ROOT, int POW> struct Pow_impl { /// <summary> /// The next recursive type to use to calculate the exponent /// This will count down from POW to 0 each time multiplying ROOT to the current value /// </summary> typedef typename LookupPow<POW - 1>::Evaluate<  Pow_impl<ROOT, POW - 1 >> ::Value Next;  /// <summary> /// Recursively calculate the next exponent /// POW will recursively count down from the value originally used to 0 /// This effectively multiplies ROOT together POW times /// </summary> enum { Value = ROOT * Next::Value }; };   With the Evaluate being defined in  template <int CNT> struct LookupPow { /// <summary> /// For the base case, just provide the template parameter as the typedef Value /// </summary> template <typename T> struct Evaluate {     /// <summary>     /// The Evaluate meta-function return value. This matches the template parameter     /// </summary>     typedef T Value; };  };   There are base case LookupPow templates as well, which I have not included.  Any advice would be incredibly useful.


Resampling GeoTIFF images to same resolution using QGIS

I have two geotiff images that I would like to resample the same resolution. If I use ArcGIS Desktop this is easy to do but how do I do this using QGIS?


When I run  mkdir ../../bin/Release_Linux/Resources   Im getting an error  $ mkdir ../../bin/Release_Linux/Resources mkdir: cannot create directory ‘../../bin/Release_Linux/Resources’: No such file or directory   Or just   mkdir Release_Linux/Resources mkdir: cannot create directory ‘Release_Linux/Resources’: No such file or directory


How can I do SSH port-forwarding only when the address/port is available?

I would like to use ssh with port forwarding by default. So I added the following ssh command to a script (with made-up server names): ssh -f -N user@server -L 8080:server:8080  where server is a remote server. Everything works except that if the script is run a second time, ssh complains that bind [127.0.0.1]:8080: Address already in use  Is there a way to tell ssh to test and do the port-forwarding only when the port/address is available?


import java.util.*; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Scanner;  public class SearchText {  public static void main(String[] args){     Scanner scan = new Scanner(System.in);     System.out.println("Enter file name: ");     String file = scan.next();     scan.close();      System.out.println("Reading the file named: " + file);     FileReader fr = null;     String fileContents = "";     try {         fr = new FileReader(file);     } catch (FileNotFoundException e1) {         System.out.println("Invalid file name. Terminating.");     }      BufferedReader br = new BufferedReader(fr);     try {         StringBuilder sb = new StringBuilder();         String line = br.readLine();         System.out.println("Searching for: " + line);         List<String> words = new ArrayList<>();          while(line != null){             sb.append(line);             line = br.readLine();             words.add(line);         }          fileContents = sb.toString();          List<String> wordsClone = new ArrayList<String>();         for(String string : words){             if(string.matches(line)){                 wordsClone.set(wordsClone.indexOf(line), "True");             }else                 wordsClone.set(wordsClone.indexOf(string), "False");         }         System.out.println(words);      } catch(IOException e){         e.printStackTrace();     } catch(NullPointerException e){         System.out.println("Test");     } finally {         try {             br.close();         } catch(IOException e){             e.printStackTrace();         }     }//end of try/catch/finally       }  }   I am trying to search a text file for a String. I made the input or "line" so that it is in the text file, and I want it to replace each element of the cloned array with either "True" or "False" depending on whether or not it matches the String or line. I was receiving a NullPointerException, so I decided to catch that exception and print out test, and low and behold it prints Test. The error is occurring on line 43 which is the line that says: if(string.matches(line)). I also tried printing out the String line prior to the cloning of the arrayList, and it is not null. I cannot figure out what is causing this exception to throw and where line is losing its stored data. Thanks!


I updated my iPad 2 to iOS 7. It blocked and asked me to plug it to iTunes. I did connect it to computer then I was asked to restore the iPad. I am afraid I lost all my data and I don't have the access now to syncronise it to computer.  Is there any way how to recover my data from iPad updated before restoring it?


Ubuntu for Android on Samsung Galaxy Note

Will Ubuntu for Android work on a Samsung Galaxy Note. And if so, where can I get a decent docking device with HDMI and usb interfaces


Undefined symbol to destructor only on MacOS

In a library i'm working on, I have something like this template class in a header file:  template <int something> class Base { public:     virtual ~Base();  // Implemented in c++ file }  class Derived : public Base<100> { public:     ~Derived() override = default(); }   The destructor is implemented like so:  template <int something> Base<something>::~Base() {     destroyBase(); }   This code is compiled as a static library.   Then, I have this code in a sample:  {    Derived x;    x.doSomething(); } // X gets destroyed   I compile the executable and link the static library. This works fine on Ubuntu, but when I try it on mac, the linking fails with  Undefined symbols for architecture x86_64:    "Base<100>::~Base()", referenced from:        _main in my_sample.cpp.o   In both cases, I'm using clang and compiling with the exact same cmake settings. All the other symbols defined in the cpp file are defined. This is the only undefined symbol. What is happening?


192.168.1.1 randomly switching between accessing VDSL modem, and accessing the wireless router.

I'm having trouble with my home network, since I've started using a new wireless router.  The setup is a Zyxel VDSL Modem pluged into the wall, and connected to a TP-LINK modem via the ethernet ports.   When I enter 192.168.1.1 - it will either access the modem, or the router, and it seems to switch randomly within seconds.   If I can access the modem, I can access the internet.   If I'm accessing the router, there's no internet available.  Any idea what's causing this?


Detecting superfluous #includes in C/C++?

I often find that the headers section of a file get larger and larger all the time but it never gets smaller. Throughout the life of a source file classes may have moved and been refactored and it's very possible that there are quite a few #includes that don't need to be there and anymore. Leaving them there only prolong the compile time and adds unnecessary compilation dependencies. Trying to figure out which are still needed can be quite tedious.  Is there some kind of tool that can detect superfluous #include directives and suggest which ones I can safely remove? Does lint do this maybe?


First of all, note that this is not a duplicate question of another one asking about the usage of so as to, since this one is asking about the structure of so . . . as to. . . .  I understand this might have been a better question at the , since I’m not a native English speaker. I am asking it here since I want to get some professional advice in regard to this question, since I don’t seem to have found anything similar to this on the Internet.  At the Oxford Dictionaries Online (OD) I have found the following definition of ludicrous:     So foolish, unreasonable, or out of place as to be amusing.   I understand the phrase so as to, simply meaning in order to and preceding the purpose for which an action is done.  So by itself is just therefore, hence, thus, or a way of emphasizing an adjective or adverb.  As to in itself means with regard to or according to, as pointed out in .  In the OD definition of ludicrous, the use of so looks fair to me, that is, it clearly emphasizes the high extent to which something is foolish or unreasonable.  The use of as to doesn’t work in any way I’ve mentioned in this case (neither as in with regard to nor according to). I think the dictionary I’ve referred to has missed one, if not more, meaning of the phrase as to.  In this case, it appears to have likely been used as an alternative to that when used in the form So X, that Y, meaning something is or happens X (a combination of adjectives or adverbs) enough to cause Y to happen.  Of course, I don’t mean that in the structure so X as to Y the phrase as to is absolutely equivalent to that, since substituting as to with that changes the structure of Y.  Does all this mean that the phrase as to is a great alternative to that (although changing the structure of Y) whenever the sentence is of the form so X, that Y (where X is a combination of one or more adjectives or adverbs)?  I am new here and so I’m not too familiar with the variety of existing tags here, so if anyone sees an additional one that would fit, please add it to this question. I would also be glad to see some other corrections of my grammar.


How to find the sum of the series $\sum_1^\infty{\frac{1}{n(n+1)(n+2)}}$?  I expanded it via partial fractions but it does not look like a telescoping series which I was expecting.   Am I missing something obvious or easy manipulation here?


I need to match the line before a particular string. I am using ^.+(?<=abc) regex to match, this works for greedy pattern. i am looking for non-greedy pattern.   e.g /123/345/abc/v2/xyz/abc/dgdes/aegweg  expected result: /123/345/abc  What i get is /123/345/abc/v2/xyz/abc/  Appreciate any help.


Let $$a^x \equiv b^x \pmod p$$ and $$a^y \equiv b^y \pmod p$$ and $\gcd(y, x)=1$ then prove that $$a \equiv b \pmod p$$ As it is given that gcd$(y, x)=1$ so by the fundamental theorem of arithmetic there exists integers $u$ and $v$ such that $ux+vy=1$. Now without the loss of generality let us assume that $a < b$ then $b=a+k$ for some positive integer $k$. Now $$a+k=(a+k)^{ux+vy} \equiv a^{ux+vy}=a \pmod p.$$ So we get $p$ divides $k=b-a$. So $b \equiv a \pmod p$  $$$$$ Is My Proof Correct???


How to print colored text to the terminal?

How can I output colored text to the terminal in Python?


Ubuntu 14.04. Wireless MEDIATEK Corp. MT7630e not working

The indicator applet does not display wireless as an option. I tried to unplug the wired connection and try the wireless one. Still Indicator applet does not display wireless Icon.   The results of the script given here    is as below


How can I prevent Overflow for the Gamma function?

I have a Dirichlet distribution from which I'm maximizing $\alpha$ by calculating the log likelihood with the following equation  $p\left(s|\alpha\right) = \sum\limits_{i=1}^O\log\left(\frac{n_i!}{\prod\limits_{j=1}^kn_{ij}!}\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)} \prod\limits_{j=1}^k \frac{\Gamma\left(n_{ij}+\alpha_j\right)}{\Gamma\left(\alpha_j\right)}\right)$  I have a python script to calculate the log likelihood. It works for small values, but when $n_{ij}$ gets high $\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)$ and $\Gamma\left(n_{ij}+\alpha_j\right)$ python runs into overflow error (the max for math.gamma is between 171 and 172).   Is there a way to change the likelihood function so that $\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)$ and $\Gamma\left(n_{ij}+\alpha_j\right)$ don't run into overflow errors. Can I just divide the values in $\Gamma$ by for example 100, if I then compare the likelihood between $p(s|\alpha)$ with different $\alpha$ values do the best $\alpha$ values still have the highest likelihood?


When I learned real analysis and topology courses, most of the spaces are Hausdorff. I only know Zariski topology and étale topology for non-Hausdorff ones that play important roles in algebraic geometry. Are there more important examples of non-Hausdorff topology? Any answers and references are welcome.


I am using the beta release of the  module, and I encounter a feature issue in the code.  My goal is to display a simple login label of the block rather than using the default provided by the module. To explain, in line #92 of the file , #value is defined as  '#value' => t('Log in with @client_title', [   '@client_title' => $client['label'], ]),   but I want to make it simplier, just #value' => t('Log in),  Is there any way to create and apply patch for beta release or other workaround how this can be handled? (Not hardcoding in the file itself)  The actual block displays the following.        What I want to show is the following.        How do I change the submission button text?


Do I need a visa to transfer flight in Seoul (Incheon Airport)?

I'm a Chinese citizen with Japan one-time tourist visa. I booked two tickets to go home, Okinawa to Seoul (Incheon Airport) and Seoul (Incheon Airport) to Dalian.   Do I need a South Korean visa to transfer between my flights?


How to teach a class that I've never taken?

I have the opportunity to teach an undergraduate class in statistics.  However, I've never taken statistics and the material and concepts are a little foreign to me.  I'm concerned, as a graduate student, that it may take up a lot of my personal time just to learn the material, much less teach it.  I really don't want to turn the opportunity down because I know its a good learning experience, but I don't want to become overwhelmed by it.  What are some effective strategies to teach a class that you've never taken before without overloading yourself?


This question led to a new package:      Is it possible to create headings in LaTeX where you don't specify what level of the heading you want, but rather if you want to go up, down, stay or start over in the hierarchy that the heading is going to be placed within?  That is, instead of writing  \section{Level 1} \subsection{Level 2} \subsection{Level 2} \subsubsection{Level 3} \subsection{Level 2} \section{Level 1}   write something like  \sectiontop{Level 1} \sectiondown{Level 2} \sectionstay{Level 2} \sectiondown{Level 3} \sectionup{Level 2} \sectiontop{Level 1}   If you would use something along these lines, it would be possible to make quick changes. For example, if you suddenly realized that you wanted to place the headings on row 2-5 under a certain heading, you could easily do this by placing a \sectiondown before them. If you instead was using the system where you had to specify the level of every heading you would have to make individual changes to all 4 rows.


I just received an old XP desktop computer that I am going to upgrade. If I take the old hard drive out and put a new one in will the systems user accounts, operating system etc, be saved or will everything be gone and the system like brand new? I ask cause I don't want anything that is currently on the hard drive and just want a new reliable hard drive.


I'm having some trouble identifying where specifically the following proof is incorrect:  Statement: Given any positive integer $n$, every n people have the same name.  "Proof:" We prove by induction. When $n = 1$, the statement is trivially true. Now, assume the statement is true when $n = m$. In other words, every $m$ people have the same name. We show the statement is true when $n=m+1$ in the following way. Consider the following list of people: $p_{1}, p_{2},..., p_{m+1}$. By the inductive hypothesis, the individuals $p_{1},..,p_{m}$ have the same name. But we also see that the list $p_{2},...,p_{m+1}$ consists of $m$ individuals, so they all have the same name as well. It follows that $p_{1}, p_{2},..., p_{m+1}$ all have the same name. Thus, since we have shown the statement holds when $n=m+1$, the statement holds for all positive integers.   I'm given the following options:   The basis step is incorrect The inductive step is wrong when $m = 1$ The inductive step is incorrect for every $m$ The inductive hypothesis is incorrect.   Any help would be greatly appreciated!


So i'm working a machine learning project thats goal is to produce music. Now for the data, I am using librosa to load wav files. Basically the data produced by librosa is the sample rate of the song along with a 1 dimensional array where each number in the array is the amplitude of the wave at that given point. So I decided to use an auto-encoder for this problem and the accuracy is absolutely terrible. I am feeding it a 1 dimensional array with 300 samples and am attempting (as of now) to recreate the same 300 samples just to get the network configured right. But I cannot figure out how to do this as I have never got an accuracy above 20%. Heres my current model encoder_input = keras.Input(shape=(300,)) x = keras.layers.Reshape((1,300))(encoder_input) x = keras.layers.LSTM(256, input_shape=(300,), activation='tanh')(x) encoder_output = keras.layers.Dense(128, activation='relu')(x)  encoder = keras.Model(encoder_input, encoder_output)  decoder_input = keras.layers.Reshape((1,128))(encoder_output) x = keras.layers.LSTM(128, input_shape=(128,), return_sequences=True, activation='tanh').  (decoder_input) x = keras.layers.LSTM(256, activation='tanh')(x) decoder_output = keras.layers.Dense(300, activation='relu')(x)  autoencoder = keras.Model(encoder_input, decoder_output)  autoencoder.compile(loss='mse', optimizer='adam', metrics=['accuracy'])  Even with normalized data it still preforms poorly. Im wondering what the issue is here and maybe if im even using an entirely wrong neural network structure for this problem. Any ideas on how I can improve this?


If everyone is infected with the zombie virus, would a non-life threatening "bite" turn a human into a zombie?

It seems to me that if everyone is infected so that even a natural death would turn a human into a zombie, why is there concern over non-lethal zombie bites?  For example, the need to cut off Herschel's leg.  Does the bite itself, no matter how insignificant, cause death?


What Ubuntu version or flavor should I use?

My objective is to have a Linux PC just to run TOR browser. My laptop has an Intel Centrino Processor 1.70GHz with 512MB RAM, ATi Mobility Radeon 9600 128Mb. Which flavour do you suggest?  I have already tried:   Lubuntu - freezes image on install Xubuntu - says processor is non-PAE Linux Mint - other problems and errors Puppy - other problems and errors   Also, every time I try to boot from USB, I get a boot error.


What is the benefit of Linear mixed effects models over GEE models?

I would like to know what would you say what is the benefit of an LME model over a GEE model in the following context: Variable eyes is a variable with 2 factors: right and left Variable visit is a factor with the visit number (can be 1, 2, 3, depending on the patient) An analysis of longitudinal data (or cross-sectional, really) where I analyse the eyes of a person. So I am including the same person twice in the study. In the context of a crossectional, I would include eyes as random effects. And in the context of a longitudinal, I would include a nested Visit/Eye. Which ones would you think are the benefits of LME over GEE? Thanks


Difference between OpenLayers 2 and OpenLayers 3?

Can anyone tell me the main difference between OpenLayers 2 and OpenLayers 3?  In other words, what are the main features in OpenLayers 3?


Different ways of performing the Wilcoxon rank sum test and the interpretation of the resulting W-statistic

What is the practical difference between wilcox.test(x,y, paired=F) and wilcox.test(x~y, paired=F) (i.e. using comma vs. tilde sign) in R, and how to interpret the resulting W-statistic? This should be the same statistical test, but the two methods produce different results.  I have a data frame with 24 rows, each containing information about the sex  and the length of an individual:  mydata<-structure(list(ID = 1:24, Sex = structure(c(2L, 2L, 2L, 2L, 2L,  1L, 2L, 1L, 2L, 1L,1L, 2L, 1L, 1L, 2L,2L, 2L, 2L, 1L, 1L,2L, 2L, 2L, 2L), .Label = c("F", "M"), class = "factor"),Length = c(63.8,79.6, 58, 140, 293, 28.6, 147, 31.3, 33.2, 4.55, 16.4, 19.5, 26.4, 3.34, 29.3, 42.9, 55.6, 122, 30.3, 48.4, 130, 64.7, 93.3, 76.1)), .Names = c("ID", "Sex", "Length"), class = "data.frame", row.names = c(NA, -24L))  I want to explore differences in length between the two sexes using Mann-Whitney U test.  Version 1:  wilcox.test(mydata$Length[mydata$Sex == 'M'], mydata$Length[mydata$Sex == 'F'], paired=F)          Wilcoxon rank sum test  data:  mydata$Length[mydata$Sex == "M"] and mydata$Length[mydata$Sex == "F"] W = 118, p-value = 0.0003698 alternative hypothesis: true location shift is not equal to 0   Version 2:  wilcox.test(mydata$Length ~ mydata$Sex, paired=F)          Wilcoxon rank sum test  data:  mydata$Length by mydata$Sex W = 10, p-value = 0.0003698 alternative hypothesis: true location shift is not equal to 0   They both give me the same P-value, but drastically different W statistics (118 vs. 10). I can't see why this is, or know which one to use for inferences or reporting. Should I not expect to get the same answer from both methods? And how would one go about interpreting the resulting W-statistics?


Which phenomenon makes the electrons revolve around the nucleus instead of crashing into it?

If the system has to gain stability, the electrons must crash into the nucleus but that's not the case.


What does this notation mean? $f(x) \equiv A$?

If $\lim_{x\rightarrow\infty}f(x) = A$, prove that $f(x)\equiv A$.  Any help would be appreciated! I just don't even understand the question.


Deriving the power series for $e$ simply?

The definition of $e$ is:  $$e = \lim_{n \to \infty} \left(1 + \frac{1}{n}\right)^n$$  If we use the Binomial Theorem on the function itself:  $$\left(1 + \frac{1}{n}\right)^n = \sum_{k=0}^{n} \binom{n}{k}\frac{1}{n^k} = \sum_{k=0}^{n} \frac{n!}{k!(n-k)! \cdot n^k}$$  At this point I am not sure where to go, how to both manipulate this expression and also have it be a valid input to the limit definition. Is there a simple approach that does not require Calc II knowledge, or is this one of those problems where there's really just one way to do it that everyone uses?


Is there a gender-neutral pronoun that can replace “his” or “her”?

This post has two parts: (a) a question and (b) a proposal.   (a) Often, particularly while writing technical papers or user's manuals, I have come across a situation where I need to say:      A user of this software may not need to use it from his personal computer. He can use it from a phone or even from his tablet.   I have seen many authors use female pronouns (i.e. “she” and “her”), but lately this trend seems to have ebbed somewhat.   I, and (I suspect) many other authors, do not want to use passive voice to avoid this.   Is there a gender-neutral way to describe the same situation?   (b) If there is none, I would like to propose using “ze” (for “he” or “she”) and “zir” (for “his” or “her”, rhyming with “fir”) as gender-neutral pronouns. I want to know how you feel about these words.


Since we know white dwarfs are made of electrons and neutrons stars are made of neutrons and quark gluon plasma. What can we say about the black hole in this sense since its properties are far stranger to any object in the universe? Can we say it is made of some exotic particles which we don't know of yet?


How to only print one row from table in a while statement?

Say this table :  User  id | username          | highest_score  1  | detectivepikachu  | 1000           2  | fullmetaljacket   | 4000           3  | sonicthegreat     | 8000 4  | inspectorgadget   | 2000 5  | themartian        | 8000   I need to loop through all users highest scores and pick the ones with a score higher to 5000. I'm using a while loop.  while($user = $user_result-> fetch_assoc()){  if($user['highest_score'] >= 5000){ echo $user['username']; echo '<br>'; }  }   This while statement will work and will display   sonicthegreat  themartian    But what I want is only displaying one of them randomly. How can I limit only one row to be displayed?


Does my wifi card Realtek Semiconductor Co., Ltd. Device d723 support Ubuntu?

I'm having a hard time getting Ubuntu MATE to connect to wifi. I'm starting to wonder if maybe my wifi card doesn't support Linux. when I type lspci into the command line i can see my Network controller is:  Realtek Semiconductor Co., Ltd. Device d723   I don't know how to tell if it supports Ubuntu so if anybody could let me know I would very much appreciate it :-)


Trying to write java code that allows me to check status of POBox and change name of box owner

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


The equation: 18 ÷ 3 ( 5 - 4 + 1 ) = 3 or 12? (order of operation)

the question might be simple to solve but when entered in google search as:  18/3(5-4+1)   you get 12! However, If it was done using the order of operation it is solved this way:  18 ÷ 3 ( 5 - 4 + 1 )  18 ÷ 3 ( 2 )  18 ÷ 6 = 3   What is the answer? and how can I explain that the other side is wrong? I read about the order of operation but no priority is given in terms of what comes first multiplication or division. So, how is this solved?


How to remove splash screen / logos when the game starts

Anyone managed to find out how to remove or skip the ads when the game starts?


I use Ubuntu 15.04, I have a SSD drive also. Very recently onwards the ubuntu is taking long to shut down nearly 1:30 minutes.  I checked the shutdown log messages and I get the follow message.  A stop job is running for Session c2 of user ***** (25s/ 1min 30 s)   It count downs till 1:30 minutes and then shutdown the machine.  Why is it happening.


How should I interpret relativistic mass?

If I have a mass that gets accelerated to a near the speed of light, before it gets I would think its relativistic mass would expand its Schwarzschild radius enough to turn it into a black hole. I have read on the internet that this is not actually the case and that relativistic mass shouldn't actually be interpreted as increasing mass.  the Wikipedia page mentions that relativistic mass is often misunderstood. what is typically misunderstood about this? (I think I am one of the ones that misunderstands it)  I also read that the Schwarzschild radius wont expand due to relativistic mass because if that were the case one observer may see the mass as a BH while a co-moving observer wont, and this cant be?  Why couldn't one observer see a BH while the other doesn't? I feel like that would make sense in relativity.


Ok, so I posted this up in this thread () but was instructed to post it up as an individual question. I get the answers in the previous thread but wanted more clarification on the subject.  I am fairly new to css, so the conversation over DIV and CLASS interests me. I have built a site using wordpress which has allowed multiple ID's. I am interested if there really is anything wrong with this? For example, this code displays four boxes in two columns, two rows within the container...
     <div id="sub_container"
     <div id="sub_container"
     <div id="sub_container"
     <div id="sub_container"
   If I have specific styling that is different to the WP theme, obviously then it can be applied to the div or the class?  So in the case above I might have  #sub_container {background: #ffffff; position: relative; float: left;}   So I want to figure is this OK? If not, what is the benefit of having the sub container as a class rather than a div? I get the 'unique' argument, but if this works fine, why not use it?  In my code I have used classes for some headings and sections where I want specific formatting that varies from the built in formatting, but that's about it..  ..I figure I would use class if I wanted to apply different styles to the sub_container div? e.g. might want the second one to have red fonts, or have the boxes a different size on another page etc etc?


if $\alpha\leq\beta$ then there is $\gamma$ such as $\alpha+\gamma=\beta$

I'm trying to prove the statement in the title, a.e existence of ordinal substraction. I think it can be done with transfinite induction, but do any of you have a better/easier way?  thanks


Why does Python 2.7 report incorrect ceiling value?

I recently transitioned one script to use Python 2.7 from 3.4 (at the request of a colleague), and I'm finding that the math.ceil function does not work the same...  When I divide 5/2 and round it up with math.ceil(), I expect to get math.ceil(5/2) = 3.  Given the following code:  from __future__ import print_function import math  a = 5 b = 2 c = math.ceil(a/b)  print("Ceiling output: {}".format(c))   Python 2.7 will report 2 as the answer, Python 3.4 reports 3 as expected.  Why is this?   I know I can get 2.7 to work if I cast a and b as float:  c = math.ceil(float(a)/float(b)   However, casting the division won't work either:  c = math.ceil(float(a/b))   How does 3.4 work around this?  Finding this makes me question how much math I need to re-check in the 2.7 version of the script.


How to write the equivalent of python's os.path.relpath() in java or groovy

If I have a path /a/b/c/d/e and I want to remove some of the path from the root  - for example remove /a/b/c from it to get just /d/e it is very simple in python:  os.path.relpath("/a/b/c/d/e", "/a/b/c")   The question is how to accomplish this in java. The best idea I have come up with so far is to create a Path for each, create an iterator, loop on it and create a Path array. Then check the size of each of the arrays (5 and 3 in the above example) and then rebuild the path from the 4th location ... very cumbersome..


Where is the preference list for "open with" applications?

I'm getting an (error code -10813) when trying to set file extensions to open with a certain app in Mountain Lion 10.8.5. Where is the plist file that has those preferences so that I can delete it and hopefully end this problem?


I've found a phrase "an additional $30,000 in income" in a government document. Is the article an correct there and why?


Can I travel to the UK on different dates from those on my entry clearance?

I have a "Standard Visitor Entry Clearance" for the UK and will be traveling there from Saudi Arabia.    Is it necessary to travel on the same date I provided on my application?  Will the Immigration Officer check?  Will it make problems if I travel on a different date?


Split columns in to rows in google spread sheets

I have following table:  ID    Event    Event2     Event3 102   181      182        184 103   5        7          8   I want to convert in into:  ID    Event 102   181    102   182  102   184 103   5 103   7 103   8   I tried with pivot table but no success. How to do this?


Prove that if $x,y \in R$, and $1 \leq p < \infty$ then $|x+y|^p \leq 2^p(|x|^p+|y|^p )$   what I'm thinking is  $|x+y|\leq |x|^p+|y|\le 2\cdot\max\{|x|,|y|\}$   Without loss of generality , let $\max\{|x|, |y|\}=|x|$  hence and $|x+y|\leq 2|x| \Rightarrow |x+y|^p \le (2|x|)^p = 2^p|x|^p $  $|x+y|^p \le  2^p|x|^p $ and since $|y| \ge 0 $, we have  $ |x+y|^p \le 2^p(|x|^p+|y|^p )$   Is there any idea I could have used here?


plz I want your help with java program  this program ask user to enter (day,month,year) of current day and give him the next day (day,month year ) . for example :  enter the day: 28 enter the month: 2 enter the year: 2014  the next day is: 1/3/2014


How to prove that every countable compact Hausdorff space is homeomorphic to a well-ordered set with its order topology?

I encountered this problem in a textbook: Let $X$ be a countable compact Hausdorff topological space, I was asked to prove that $X$ is always homeomorphic to a (necessarily countable) topological space $Y$ equipped with the order topology of a certain well-order $\leqslant$ on $Y$ (a well-ordering on $Y$ is a total order $\leqslant$ on $Y$ such that every subset of $(Y,\leqslant)$ admits a minimal element, or equivalently, an ordinal). But I had no ideal where to start (I guessed that firstly I had to prove $X$ is first countable, but I failed). Can anyone help me about it? Any useful hint will be appreciated.


What are the key differences between Gauge pressure and absolute pressure?  Are there any other forms of pressure?


Currently my text file looks like this..  David   Webb    Box 34 Rural Route 2    Nixa    MO  65714   (417)555-1478   555-66-7788 09-13-1970 Martha  Kent    1122 North Hwy 5    Smallville  KS  66789   (785)555-2322   343-55-8845 04-17-1965 Edward  Nygma   443 W. Broadway Gotham City NJ  12458   (212)743-3537   785-48-5524 08-08-1987 O'Reilly    Baba    123 Torch Ln    Joplin  MO  64801   (417)222-1234   456-65-3211 12-13-1999 Martin Bob  44 Boss Rd  Joplin  MO  64801   (417)888-4565   456-98-1111 01-01-2007   the dates are in the 9th field and I want to display them as January 7, 2017 instead of 01-07-2017 for example.  How should I do that? If using options please explain what they do briefly. Doing this in bash. Needing to put it in a script and output to a new file to preserve original.


Integrating USB C Power Delivery into a PCB

I am aware of USB C Power Delivery trigger boards that uses PD protocol to output the desired voltage from a PD source. But I was curious if it would be possible and feasible to design and integrate a USB C Power Delivery protocol into a PCB design. If I were to do it, how difficult would it be and what would I need to know? Thanks.


I am having trouble with my Geforce GT 840M on my brand new Ubuntu instillation, it does not seem to be listed as my graphics card.    However the card is listed under lspci    I have tried installing drivers for it from the Nvidia website but after going through the instillation process ( cntrl+alt+1 then,  sudo service lightdm stop , then sudo sh NVIDIA-Linux-x86_64-340.32.run ) My instillation no longer works. When logging into a user the top bar as well as the dock do not appear.   I also seem to be unable to get drivers for it from the software & updates menu as it tells me that there are no updates available.


How do HttpOnly cookies work with AJAX requests?

JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site?   Edit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFox later adopted this. So my question is: If you are using AJAX on a site, like StackOverflow, are Http-Only cookies an option?  Edit 2: Question 2. If the purpose of HttpOnly is to prevent JavaScript access to cookies, and you can still retrieve the cookies via JavaScript through the XmlHttpRequest Object, what is the point of HttpOnly?  Edit 3: Here is a quote from Wikipedia:     When the browser receives such a cookie, it is supposed to use it as usual in the following HTTP exchanges, but not to make it visible to client-side scripts.[32] The HttpOnly flag is not part of any standard, and is not implemented in all browsers. Note that there is currently no prevention of reading or writing the session cookie via a XMLHTTPRequest. [33].   I understand that document.cookie is blocked when you use HttpOnly. But it seems that you can still read cookie values in the XMLHttpRequest object, allowing for XSS. How does HttpOnly make you any safer than? By making cookies essentially read only?   In your example, I cannot write to your document.cookie, but I can still steal your cookie and post it to my domain using the XMLHttpRequest object.  <script type="text/javascript">     var req = null;     try { req = new XMLHttpRequest(); } catch(e) {}     if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}     if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}     req.open('GET', 'http://stackoverflow.com/', false);     req.send(null);     alert(req.getAllResponseHeaders()); </script>   Edit 4: Sorry, I meant that you could send the XMLHttpRequest to the StackOverflow domain, and then save the result of getAllResponseHeaders() to a string, regex out the cookie, and then post that to an external domain. It appears that Wikipedia and ha.ckers concur with me on this one, but I would love be re-educated...  Final Edit: Ahh, apparently both sites are wrong, this is actually a . IE6 & 7 are actually the only browsers that currently fully support HttpOnly.  To reiterate everything I've learned:   HttpOnly restricts all access to document.cookie in IE7 & and FireFox (not sure about other browsers) HttpOnly removes cookie information from the response headers in XMLHttpObject.getAllResponseHeaders() in IE7. XMLHttpObjects may only be submitted to the domain they originated from, so there is no cross-domain posting of the cookies.   edit: This information is likely no longer up to date.


Wavefunction and its derivative vanish at same point

It is stated that if $\psi(x_0)=\psi'(x_0)=0$ at some $x_0$, then $\psi(x)=0,\forall x$.  Hence, we cannot have the wavefunction and its derivative vanishing at the same point.  My question is, how to prove the above statement?


I was reading up of centripetal motion when I saw the relation that $mg=N\cos\theta$, as can be seen from , in the case of a frictionless plane.  This contradicted with what I was taught before.  A block sliding down a ramp has a normal force perpendicular to the surface, which is equal to $mg\cos\theta$.  This video here   says the same thing.  I am stumped by this contradiction!  Which one is correct?


matplotlib.plot.show continues shows plots even the script finished

There isn't duplicated answer because I was always blocked by solution below !!!!!!!  I want to plot a graph and still run following code without closing the graph automatically like Matlab.  I try  , it failed and appear in a small moment then close itself.  Code:  import numpy as np import matplotlib.pyplot as plt  if __name__ == '__main__':     plt.figure(figsize=(10, 10))     plt.plot(range(5), lw=2, label='Real')     plt.title('Prediction')     plt.legend(loc="best")     plt.show(block=False)     print("---Plot graph finish---")   I try  , it failed, too. Check the code below.  Code:  import numpy as np import matplotlib.pyplot as plt  if __name__ == '__main__':     plt.figure(figsize=(10, 10))     plt.plot(range(5), lw=2, label='Real')     plt.title('Prediction')     plt.legend(loc="best")     plt.draw()     plt.show()     print("---Plot graph finish---")   Above will block until I close it.  Code:  import numpy as np import matplotlib.pyplot as plt  if __name__ == '__main__':     plt.ion()     plt.figure(figsize=(10, 10))     plt.plot(range(5), lw=2, label='Real')     plt.title('Prediction')     plt.legend(loc="best")     plt.draw()     plt.show()     print("---Plot graph finish---")   Above will appear nothing, or it appear and disappear very fast.  My version is below:  user@ya:~/$ sudo pip freeze | grep matplotlib matplotlib==2.2.3 user@ya:~/$ sudo pip -V pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)   Environments:  I only execute script in Ubuntu ex: user@ya: python xxx.py Distributor ID: Ubuntu Description:    Ubuntu 16.04.5 LTS Release:    16.04 Codename:   xenial   Can anyone help me? I just want to do like Matlab which won't close the plotted graph even if the script finishes.


Writing to same file as part of a for-loop generates an empty file

I'm writing a command to prepend some text to a bunch of files which match a certain pattern:  for file in $(find . -name "*.txt"); do sed "1s/^/hello/" $file; done    If I write to stdout or a different file (e.g. "$file.bak"), everything works according to plan, but when I try to have the command write back to the same file, the content of the files gets wiped out:  for file in $(find . -name "*.txt");do sed "1s/^/hello/" $file > $file; done   I find the behavior surprising, could someone explain why this happens, conceptually? I'm on macOS and I've tried this in bash and zsh to the same effect.  (Note that I'm aware of sed -i "" for in-place writing, but I'd like to pipe the result to a different command before writing in-place.)


Objective-C: How to prevent a non-default initializer from being called?

I have created a different init method and would like that to be the designated initializer instead of the standard -init.  How can I prevent client code from instantiating the class using -init?  e.g.  /* everyone must call this */ - (id)initWithInfo:(NSDictionary *)info {   self = [super init];   if (self) {       _info = info;   }    return self; }  /* Don't want anyone to be able to create this using init */


Will I fit or need an extension?(first time flyer)

I am 5'5" tall and weigh 250 lbs. I have never flown before but am flying to visit my son who is in the Navy serving in Japan this month. I will fly American AirlinesExpress to Chicago and then ANA Premium Economy to Japan. I am sick worrying about it.    Do you think I will fit and do you think I will need an extension?    I have lost 80 pounds but still have more to lose. I'm sad I cannot get excited about my trip for worrying about fitting in my seat.


How to make an unrooted phone use or detect ad-hoc Wi-Fi?

I have an unrooted Android 2.3.6 phone and I want it to connect to the ad-hoc connection made on my Ubuntu. I referred to some already existing questions here but none seem to be the solutions for unrooted phones. How do I do this?


$$\int \frac{\sin\left(x\right)}{1+x^2}dx$$  I have tried to integrate by parts but it doesn't work. How do I evaluate it? Any advice, hint or well-thought solution will be appreciated.


Is it possible to edit a layer in QGIS while there is an active query?

I am new to Quantum and I am digitizing polygon layers using the editing features. I would like to apply simple queries ('date > 2012/08/01'), however while the query is active I cannot edit the layer. Is this possible?


Multiply list of strings by an integer value then append values from a second list

I have recently encountered a problem whereby if I multiply a nested list of strings by an integer value, then attempt to add strings from another nested list, the positions at which I expect these string values to appear are not consistent with the index I am providing (apologies, finding this quite hard to explain).  Essentially, this is what I have done.  a = 0 b = 2 c = 2  lst = [['a','b','c'],['d','e','f']] lst = lst*c  lst_2 = [['w','x'],['y','z']]  for item in lst_2:     for i in range(a,(a+b)):         lst[i]+=item      a+=b  print(lst)   My output is:  [['a', 'b', 'c', 'w', 'x', 'y', 'z'], ['d', 'e', 'f', 'w', 'x', 'y', 'z'], ['a', 'b', 'c', 'w', 'x', 'y', 'z'], ['d', 'e', 'f', 'w', 'x', 'y', 'z']]   What I want/expected is this:  [['a', 'b', 'c', 'w', 'x'], ['d', 'e', 'f', 'w', 'x'], ['a', 'b', 'c', 'y', 'z'], ['d', 'e', 'f', 'y', 'z']]   I can achieve my desired output if I define lst to be [['a', 'b', 'c'], ['d', 'e', 'f'], ['a', 'b', 'c'], ['d', 'e', 'f']] explicitly, however I need to be able to do this dynamically.  I hope this is clear enough, thanks in advance for the help.


Solving $\sin(\theta) + \cos(\theta) = -1$ using the T-Formula

In class we've learned 2 methods for solving trigonometric equations.   T-Formula: If you're not familiar with the T-Formula look here;  Auxiliary Method: If you're not familiar look    When I was trying to solve the equation $\sin(\theta) + \cos(\theta) = -1$, where $0 \leq \theta \leq 360$. When I used the auxiliary method I get the 2 answers of $180, 270$. But when I use the T-Formula I only get $270$. In the T-Formula I end up getting to the following equation:   $$\frac {2t + 1 - t^2}{1+t^2} = -1$$ $$2t+1-t^2 = -1-t^2$$ $$2t=-2$$ $$\therefore t=-1$$ But $t=\tan(\frac{\theta}{2})$, so... $$\tan(\frac {\theta}{2}) = -1$$  But there $\theta \neq 180$ as $\tan(90)$doesn't exist. But that is one of the answers.  What am I doing wrong? Why doesn't the T-Formula get all the answers (it should)?


Can LaTeX perform calculation like Excel formula table?

I wonder if this feature is available in TeX system? For example, given a formula within a table, it can apply the formula and display data after the calculation.


Display develops strange colour issue after system suspends [16.04]

For the last couple of months my system produces a strange problem with its display:    This will happen every time I close the lid or the system is left idle and suspends. The way I resolve the issue is a reboot and to just shut down whenever I'm planning on closing the lid.  Is there a way to fix this without the need to reinstall the OS? I don't have time to set everything up again at the moment but would obviously like the functionality back as this hasn't always happened.  Any help is much appreciated!


How to fix forbidden error in ubuntu18.04 LTS apt-get update?

Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease   403  Forbidden [IP: 91.189.88.174 80] Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease   403  Forbidden [IP: 91.189.88.174 80] Err:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease   403  Forbidden [IP: 91.189.88.174 80] Err:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease   403  Forbidden [IP: 91.189.88.174 80] Reading package lists... Done


Can someone recommend a good basic book on Geometry?  Let me be more specific on what I am looking for.  I'd like a book that starts with Euclid's definitions and postulates and goes on from there to prove thereoms about triangles, circles and other plane shapes.  I'm not interested (at this time) in a book that ties geometry in with linear algebra or explains non-euclidean geometry.  All the books I've seen seem to be of two types 1) Let us use linear algebra and other techniques to put geometry on a firm footing. Let us assume you already know Eucliean geometry and move on to more interesting stuff. These are probably too advanced for me. 2) Let us skip all that complicated postulates/proofs and make geometry fun.  Too easy.  When I was in 9th grade Honors Geometry way back in 1981/82 we had a textbook that, as I recall through my foggy memory, was very good and did systematically build up geometry from the propositions (5 of them?).  And it certainly didn't attempt to address Hilbert's contributions to geometry or explain non-Euclidean geometry. Unfortunately, I don't recall the title or author.  I suspect the book was used nationally though and for quite a number of years, so perhaps someone with a better memory than me can provide a title/author.  I do recall it had all the postulates and most major thereoms listed at the end of the book.  My motivation is two fold... 1.  Review the material myself in preparation for my advanced texts. 2.  Help my children in a few years when they take geometry.    Books I could get for the iPad/Kindle or free books (Google?) would be most appreciatied, but I'm not opposed to killing a tree either :) Thanks for all the help. Dave


Can someone verify my assertion from this english sentence?

This is from Discrete Mathematics and its Applications   This is the book means when mentions a list of common ways to express conditional statements   After going through the list, I immediately recognized "q is necessary for p". Translating to the "if p, then q" form, I got "If you want to get promoted, you must wash the boss's car.   Another interpretation of this that I got - from what I learned on  is   "You can get promoted only if you wash the boss's car". This means the only path to promotion is washing the boss's car. If you managed to get promoted(get there) without washing the car, the contract is broken.  Does all of that sound right?


In part of a theorem that I do not bother to mention  writer supposed that there are two metrics on (0,1) (called d ,D) such that set of all open sets of d is equal to set of all open sets of D and also (d,(0,1)) is complete while (D,(0,1)) is not complete. I ,  could not find any example for such metric spaces(d, D) I will appreciate if some one can give an example .


Why does round sometimes produce extra digits?

Occasionally, when selecting aggregate data (usually AVG()) from a database, I'll get a repeating decimal such as: 2.7777777777777777  When I apply ROUND(AVG(x), 2) to the value, I sometimes get a result like: 2.7800000000000002  I happen to know that the actual sample has 18 rows with SUM(x) = 50.  So this command should be equivalent: SELECT ROUND(50.0/18, 2)  However, it produces the expected result (). Why does rounding sometimes produce wrong results with aggregate functions?  In order to verify the above result, I wrote a : declare @temp table(   x float )  insert into @temp values (1.0); insert into @temp values (2.0); insert into @temp values (1.0); insert into @temp values (1.0); insert into @temp values (1.0); insert into @temp values (1.0); insert into @temp values (1.0); insert into @temp values (8.0); insert into @temp values (9.0);  select round(avg(x), 2),        sum(x),count(*) from @temp  I'm aware of the , but this simple case seems not to be subject to those.


How do I add multiarch support to install Packet Tracer 7.2.2 on Ubuntu 20.04?

I am attempting to install Packet Tracer on my machine running Ubuntu 20.04, and I keep running into the same issue. While going through several different tutorials on installing Packet Tracer 7.2.2, I run into the same problem: I keep getting the 404 Error message when I get to the part of adding multiarch-support. The line in terminal that is causing me the errors is: wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.29-0ubuntu2_amd64.deb  Does anyone have any idea how to correct this? Or what am I doing incorrectly? Thanks for the help!


Can you beat eggs inside their own shell?

A random thought: can you shake an egg vigorously enough to beat it inside its own shell?  Aside from  I can find nothing about this. Any thoughts, recipes?


How to move Ubuntu installation from one hdd to another?

I currently have Ubuntu 10.04 server running on a portable HDD. Want to move it to internal sata HDD. I've got 3 partitions /, /home and swap. On the new HDD I plan to have different partition sizes. What's the correct way of doing these two things (move and resize)?


What is the reason for the top secret two space newline markdown weirdness?

Possible Duplicate:          In markdown a <br> is inserted if you end a line with a double space I find this feature particularly confusing.   Is there a reason why markdown swallows new lines?  Should SO make a modification so new lines are treated with respect without the double space hack?


drawing some simple circular, rectangular and triangular shapes

I want to draw these shapes, would u please help me? thanks a lot.   @peter It is so useful, thanks a lot for your attention, but actually I want to draw this figure, sorry for inconvenience I am a little amateur.


How can I pair my Apple keyboard and mouse to multiple Macbooks Pro?

I would like to use my Apple wireless keyboard and mouse with my work and personal Macbook without having to pair them every time. Is there a simple way to pair with multiple Macbooks and switch between them?


How to manipulate a string to lower case and store in same variable

I have a piece of code that asks for user input, it is type "string" and its a really simple process, i want whatever the user inputs to be converted using the tolower() function. It does exactly as its supposed to do, but i can't seem to assign it to the same variable. Any help please?  #include <locale> #include <string> #include <iostream> //maybe some other headers, but headers aren't the problem, so I am not going to list them all  while (nCommand == 0)         {               locale loc;             string sCommand;             cin >> sCommand;              for (int i = 0; i < sCommand.length(); ++i)             {             sCommand = tolower(sCommand[i],loc);             cout << sCommand;             }   For example if the user types in Help sCommand would be h  How I want it to look like it that if the user types in HELP or Help or HeLp  sCommand should be 'help' either way


Inserting text at begining of each line of text file using shell script

I have a task to enter word http:// at begining of each line of text file. How this can be done using shell script  My text file is like:  agr.nc.in mpi.ni.in ir.o.in chemis.go.in da.ni.in dgt.go.in dgn.go.in   output file should be like:  http://agr.nc.in http://mpi.ni.in http://ir.o.in http://chemis.go.in http://da.ni.in http://dgt.go.in http://dgn.go.in


Prove that $2^n \ge n^3 \ \forall n\ge 1$

$$2^n \ge n^3  \ \forall n\ge 1$$ My effort:  Check the base case: $P(1): 2\ge1 \ \text{(true)}$ supposing that $P(n) \Rightarrow  P(n+1):$ $2^{n+1} \ge (n+1)^3$ I'll try the induction step: $$2^{n+1} = 2^n \cdot 2 \ge 2n^3 = n^3 \cdot 2 \ge n^3 \cdot \frac{1}{(n+1)^3}$$ I'm not sure about the last step, but in any case, I can't find any way to get to $(n+1)^3$ and prove the induction step.  How can I do?


Derive a type at runtime for invoking a generic function

My use case is this: There are a number of implementations of an interface, ICommand, that are JSON-serialized and sent to another system where they are deserialized and used. Part of the interface spec is a string property with the name of the specific type, since a type is needed for deserialization. Reading the type name from the JSON string and switching based on that is simple and it works, but it's also ugly and the switch needs to be updated every time a new implementation is added or a type name is changed for any reason: Match match = Regex.Match(json, "\"TypeName\":\".*?\""); if (match.Success) {     // Add cases here as new command types are defined     switch (match.Value)     {         case "\"TypeName\":\"TypeNumberOne\"":             return JsonConvert.DeserializeObject<TypeNumberOne>(json);          default:             break;     } }  What I'm hoping to be able to do is generalize the deserialization in some way. What I'm trying right now is reading the type name out of the JSON and using Type.GetType to get the type, which I'd like in some way to pass to JsonConvert.DeserializeObject<T>. I can get the type just fine, but I can't figure out how to pass it as the T. This return JsonConvert.DeserializeObject<Type.GetType(string.Format("namespace.{0}", typeName))> (json);  and this return JsonConvert.DeserializeObject<Type.GetType(string.Format("namespace.{0}", typeName)).MakeGenericType()> (json);  won't even compile; Intellisense says Operator '<' cannot be applied to operands of type 'method group' and 'Type' - evidently it's not seeing the Type-valued expression as a usable T. Assigning the result of the expression to a variable: Type commandType = Type.GetType(string.Format("VITL.Library.Commands.{0}", typeName)); return JsonConvert.DeserializeObject<commandType> (json);  results in 'commandType' is a variable but is used like a type. Is there a way to derive a type at runtime such that it can be used in invoking a generic function?


I want to shedule a task for 8.30am every Monday, for every month, for every year...  What would the UNIX Crontab format be?  Many thanks  O.


CREATE SEQUENCE using expressions with psql variables for parameters

I've been playing with Postgres for a week or so and I'm seeing if it's possible to set the min/max values for a sequence using an expression. The specific goal is to automate create-scripts for disjoint ranges between servers to avoid key-conflicts in a multi-master setup.  For example, using psql:  CREATE SEQUENCE key_seq MINVALUE (:servernum * :stride)                         MAXVALUE ((:servernum + 1) * :stride - 1);   This gives me a syntax error. Variables are interpolated verbatim, no calculations happen.  An alternative would be to set a variable based on the output of an expression:  \set minvalue (:servernum * :stride)   But the \set statement doesn't evaluate expressions.


I have installed lampp and in Firefox. No /var/www

I have installed xampp (Ubuntu 16) and http://localhost shows everything is working fine. But there is no /var/www directory .


Prove that if G is a group, g∈G is a fixed element and H = {a∈G | aga^-1=g}, then H≤G.   Trying to study for my final and I missed this question on the first test (just marked wrong with no feedback). I'm completely stuck on showing that H is closed. I have no issue showing that the identity is in H since that's trivial. I think I'm okay with the inverse too its really just closure that is stumping me.