If temperature is related to average kinetic energy in an ideal gas, then does speeding up the gas container affect its temperature?

This question is related to the following textbook question:     The temperature of an ideal gas is directly proportional to the average kinetic energy of its molecules. If a container of ideal gas is moving past you at $2000\ \frac{\mathrm{m}}{\mathrm{s}} ,$ is the temperature of the gas higher than if the container was at rest?  Explain your reasoning.   My approach to this problem was to refer back to the derivation of the kinetic energy- temperature relation. The equation $E_\mathrm{kin} =\frac{3}{2}nRT$ was derived in the containers reference frame, with the momentum transfer from particles impacting the wall playing an important role. So even if the container is moving 2000 m/s, the particles inside will be moving relative to this speed as well, so the momentum transfer would be the same in the box's frame of reference, and we'ed get the same temperature.  I guess first I'd like to know if this reasoning is accurate and/or if I've missed any pieces?  Moreover, as an extension, I'm wondering what would happen if we suddenly stopped the container while letting the interior gas retain its original speed. Going off my original argument w/ the equation being derived in heavy part from the momentum transfer and reference frame considerations, for a short period of time the particles inside should still be going much faster w.r.t. the container, and so we'ed expect the temperature to jump up upon stopping the box due to an increased rate of collisions. In the physical world, im guessing this heat would probably be lost pretty quickly though, assuming the container can take the stress without breaking.  TL;DR box and particles move at same speed, but if box stops particles fast, so temp increase. Am I on the right track?


truecrypt 7.1a requires Mac OS X 10.4 or later on Yosemite 10.10

After reading articles about the state of Truecrypt in February 2015, I decided to download the last stable version of Truecrypt that allows full usage of Truecrypt: that is, version 7.1a     7.2 version that can only be used to view, but no longer to create new, TrueCrypt volumes.   see   I then proceeded to install this on my Mac, running on Yosemite 10.10  But I got the error message "truecrypt 7.1a requires  Mac OS X 10.4 or later", see below.    I guess it's simply a schoolboy error from a developer of the Truecrypt team, as it considers 10.4 being above 10.10, or maybe it's rather Apple who messed up & should have consistantly used 2 digits after the dot (i.e. use 10.04 rather than 10.4).  In any case, I find myself unable to install Truecrypt. Anyone found a solution for this?


I am trying to split a single string, with spaces, into three separate strings. For example, I have one string (str1). The user inputs any 3 words such as  "Hey it's me" or "It's hot out".  From there, I need to write a function that will take this string (str1) and divide it up into three different strings. So that (taking the first example) it will then say:  Hey (is the first part of the string) it's (is the second part of the string) me (is the third part of the string)   I'm having difficulty which manipulation I should be using to split the string at the spaces.   This is the code I have so far, which is just how the user will enter input.I am looking for the most basic way to accomplish this WITHOUT using istringstream! Using only basic string manipulation such as find(), substr().   ** I am looking to create a separate function to perform the breaking up of string ** I figured out how to get the first section of input with this code:   cout << "Enter a string" << endl; getline(cin, one);  position = str1.find(' ', position); first_section = str1.substr(0, position);   But now I have no idea how to get the second section or the third section of the string to be divided up into their own string. I was thinking a for loop maybe?? Not sure.    #include <iostream> #include <string> using namespace std;  int main() {    string str1;    cout << "Enter three words: ";    getline(cin, str1);    while(cin) {         cout << "Original string: " << str1 << endl;         cin >> str1;    }     return; }


Installed Ubuntu alongside Windows 7, can't boot Ubuntu

I've downloaded the iso for ubuntu, put it on a bootable usb stick, installed ubuntu alongside windows 7 (allocating disk space during the installation, taking it from the hdd on which my windows 7 is installed). Installation worked fine but after rebooting it always starts up windows 7. no bootloader menu is shown during booting and inspecting the boot devices in my bios only lists the hdd that should now contain win7 & ubuntu.  What do I need to do in order to boot ubuntu/display the bootloader menu when i turn my computer on?


Blender Math Nodes: which input is which (numerator vs denominator)

Is there documentation associated with the cycles nodes, in particular the math nodes? The current documentation in the manual seems to only indicate that there are two values, but not which is which. That's fine for functions that are communicative, but some (like matrix multiply and divide and power) are not.   For example:     is this $\frac{1}{input}$ or $\frac{input}{1}$? The same question for a power function, is this:    $input^\frac{1}{2}$ or $\frac{1}{2}^{input}$?  Sorry for the beginner questions and I admit I didn't look through the manual in depth, but the section on nodes didn't indicate this. Thanks!


Prove there exists a $c \in (a,b)$ such that $\frac{f'(c)}{f(c)} = \frac{1}{a-c}+\frac{1}{b-c}.$

Let $f$ be continuous on $[a,b]$, differentiable on $(a,b)$ and positive for all $x \in(a,b).$ Prove that there exists $c\in(a,b)$ such that  $$\frac{f'(c)}{f(c)} = \frac{1}{a-c}+\frac{1}{b-c}.$$  This seems like just an application of the mean value theorem, but it doesn't seem to work out when I try.  My first attempt was to find an explicit equation for $f(x)$ since $$f'(x) = f(x)\left( \frac{1}{a-x} + \frac{1}{b-x}  \right)\Rightarrow f(x) = e^{-\ln((a-x)(b-x)} \left( \frac{1}{a-x} + \frac{1}{b-x} \right)$$  But applying the mean value theorem doesn't quite work here because $f(a)$ and $f(b)$ are not defined so $f(x)$ isn't continuous on $[a,b].$  Any help would be appreciated.


Which startup applications can I safely disable?

Which startup elements can be safely deleted (for home desktop users)?    I use this terminal commands to see the whole startup list:  cd /etc/xdg/autostart sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop


A criterion for independence based on Characteristic function

Let $X$ and $Y$ be real-valued random variables defined on the same space.  Let's use $\phi_X$ to denote the characteristic function of $X$.  If $\phi_{X+Y}=\phi_X\phi_Y$ then must $X$ and $Y$ be independent?


Hi, I am thinking about acceleration. Let's think we have a force of $1$ N and a particle of $1$ kg, then acceleration will be $1$. So the speed gets higher every second and $c$ seconds later, in Newtonian mechanics, the particle will  reach the speed of light. In relativity, of course, something like that cannot happen.  So, what are the equations that describe acceleration in relativity?


What is source of Infrared Radiation from some solid object?

I use a Fluke infrared temperature measurement meter for various applications.  I have not thought too much about the source of that infrared radiation until recently.  Assume some solid with maybe a crystal structure or not (such as a block of wood) -- I can measure the temperature via the infrared radiation given off by the object.  What is the source of this radiation?  I mean, is it one of (or all of) the following:   charge acceleration (such as charged particle changing direction, striking something, being struck by something). Photon given off by electron in atom changing energy levels. Some other kind of source unknown to me.   If item 3 is the answer, can someone explain.  Thanks.


Dell Latitude D830 unable to connect to the internet

My Dell Latitude D830 (BCM4311 wireless chip) is unable to connect to any wireless connections or even detect them. I was able to find a driver for it but I don't know what to do with it. The driver is a .tar.gz file.


My flashplugin-nonfree (on Debian Stretch) is outdated... what to do?

I use the version of Iceweasel on Debian Stretch GNU/Linux on an x86_64 machine. Sadly, I need to use Adobe's abominable Flash technology.  I know that the way you install the Flash plugin on Debian is using the flashplugin-nonfree package, after making setting the appropriate APT source settings. Well, I have, and it's installed and up-to-date - as far as the package goes, but, woe is me, when I open sites with Flash in Firefox it tells me that my Flash player is out-of-date!  So, first question:   Is this my fault somehow (e.g. misconfiguration or what not), or is it just that the Stretch package maintainers haven't updated their version?   And then:   Should I manually install the up-to-date plugin from adobe.com, or is there some other Debian-ish alternative? If the answer to the previous question is "yes", then - should I just overwrite /usr/lib/flashplugin-nonfree/libflashplayer.so with the downloaded version, and overwrite the local settings, like Adobe's .tar.gz's README suggests, or should I do something else and Debian-specific?


Show that the set $\mathbb{Q}[\sqrt{2}] = \{a + b \sqrt{2} \mid a, b \in \mathbb{Q}\}$ is a field with the usual multiplication and addition.  It is easy enough to show that it is closed under addition and multiplication ( $\forall a,b \space)$ we have $a+b \in \mathbb{Q}\sqrt{2}$ and $a * b = ab \sqrt{2} \in \mathbb{Q}\sqrt{2}$.  However, I had trouble proving the other axioms (associativity, commutativity, unique neutral element, unique inverse, and distributivity of multiplication over addition). I would really appreciate it if someone could help me with those.


How to find that how many select tags are there in a div?

In the html I'm having a div tag. Between this div tag there are many other tags like span select and p tags shown like below:
   Span text   Span text   Span text   <select id="select1">     <option>1</option>   </select>   <select id="select2">     <option>1</option>   </select>
   Now how we find that how many select tags are in the div id having id="show" using jQuery.Can anyone help me to find out this.


Automating a mount operation that requires user input

I want to mount a directory on a file server at startup. This is my /etc/fstab entry:  # mount the fileserver https://fsrv.company/ /mnt/fileserver davfs user,auto 0 0   Manually mounting it with mount /mnt/fileserver works fine. However, because of an outdated certificate this issues a prompt which I always have to answer with yes:  /sbin/mount.davfs: the server certificate does not match the server name /sbin/mount.davfs: the server certificate is not trusted [...] Accept certificate for this session? [y,N] y   This device should be mounted when starting Ubuntu (due to the auto option). However, the device is not mounted, probably because of the required input. The owner of the fileserver wont update its certificate.   How can I automate this process, such that the device is mounted at startup with the answer being always y\n?  EDIT: I did download and place the certificate in .davfs2/certs/ and edited the entry in .davfs2/davfs2.conf (as hinted below by @Oli), but the interactive input remains.


Should I make decisions based on micro-averaged or macro-averaged evaluation measures?

I ran a 10-fold cross validation on different binary classification algorithms, with the same dataset, and received both Micro- and Macro averaged results. It should be mentioned that this was a multi-label classification problem.  In my case, true negatives and true positives are weighted equally. That means correctly predicting true negatives is equally important as correctly predicting true positives.   The micro-averaged measures are lower than the macro averaged ones. Here are the results of a Neural Network and Support Vector Machine:    I also ran a percentage-split test on the same dataset with another algorithm. The results were:    I would prefer to compare the percentage-split test with the macro-averaged results, but is that fair? I don't believe that the macro-averaged results are biased because true positives and true negatives are weighted equally, but then again, I wonder if this is the same as comparing apples with oranges?  UPDATE  Based on the comments I will show how the micro and macro averages are calculated.   I have 144 labels (the same as features or attributes) that I want to predict. Precision, Recall and F-Measure are calculated for each label.   --------------------------------------------------- LABEL1 | LABEL2 | LABEL3 | LABEL4 | .. | LABEL144 ---------------------------------------------------    ?   |    ?   |    ?   |   ?    | .. |     ? ---------------------------------------------------   Considering a binary evaluation measure B(tp, tn, fp, fn) that is calculated based on the true positives (tp), true negatives (tn), false positives (fp), and false negatives (fn). The macro and micro averages of a specific measure can be calculated as follows:      Using these formulas we can calculate the micro and macro averages as follows:      So, micro-averaged measures add all the tp, fp and fn (for each label), whereafter a new binary evaluation is made. Macro-averaged measures add all the measures (Precision, Recall, or F-Measure) and divide with the number of labels, which is more like an average.  Now, the question is which one to use?


I have Gateway LT4010U With INtel Atom N2600 IGB DDR3 memory and 320 GB HDD witch version would be the best...I am thinking of Puppy but I have used Ubuntu before and would like to choose a version from here is there any suggestiolns


Distribution of hitting time of line by Brownian motion

I came across the following question:     Let $T_{a,b}$ denote the first hitting time of the line $a + bs$ by a standard Brownian   motion, where $a > 0$ and $−\infty &lt b &lt \infty$ and let $T_a = T_{a,0}$ represent the first hitting time of the level $a$.      1) For $\theta > 0$, by using the fact that $\mathbb{E}e^{-\theta T_a}=e^{-a\sqrt{2\theta}}$, or otherwise, derive an expression for $Ee^{-\theta T_{a,b}}$, for each $b$, $−\infty &lt b &lt \infty$.       2) Hence, or otherwise, show that, for $t > 0$,    $$\mathbb{P}[T_{a,b}\leq t] = e^{-2ab}\phi\left(\frac{bt-a}{\sqrt{t}}\right)+1-\phi\left(\frac{a+bt}{\sqrt{t}}\right).$$   For the first part, I ended up, by changing measure, with the (unverified) expression  $$\mathbb{E}e^{-\theta T_{a,b}}=\exp\left(-a\left[b+\sqrt{2\left(\theta+\frac{b^2}{2}\right)}\right]\right).$$  What's the cleanest way to do the second part? It seems I could either do some kind of inverse transform on the moment generating function, or calculate the moment generating function of the given distribution. Both of these seem difficult. Am I missing something, or do I just need to persevere?  Thank you.


How to prove Euler's formula: $e^{i\varphi}=\cos(\varphi) +i\sin(\varphi)$?

Could you provide a proof of Euler's formula: $e^{i\varphi}=\cos(\varphi) +i\sin(\varphi)$?


I do not understand how you can earn the . What do you have to do and where?


Hi Stackoverflowers,  I wanted to know if anyones aware if the Stackoverflow team is working on a printable view for the Q&A's.  It'd even be cooler to have it output to PDF format for a very nice print job.  :)  It would be awesome to have a feature like that.


I was trying to use spyder 3 in ubuntu. I installed spyder3 using pip3 install spyder. But it doesn't open. When I open in terminal it gives me the following error.    Traceback (most recent call last):   File "/usr/local/bin/spyder3", line 11, in <module>     sys.exit(main())   File "/usr/local/lib/python3.5/dist-packages/spyder/app/start.py", line 144, in main     from spyder.app import mainwindow   File "/usr/local/lib/python3.5/dist-packages/spyder/app/mainwindow.py", line 49, in <module>     requirements.check_qt()   File "/usr/local/lib/python3.5/dist-packages/spyder/requirements.py", line 40, in check_qt     package_name, required_ver = qt_infos[qtpy.API] KeyError: 'pyside'


What is the difference between "-" and "--" in text mode?

I'm interested in all the difference, that means:   appearance: If there are common rules across fonts like distance from baseline, length and so on. typographical rules: If they are handled differently when the compiler chooses where to break lines/pages. semantically: The meaning of them, that is also when I'm supposed to use them.   Googling it I've found that exist a lot of similar glyph, even if I never seen them in any LaTeX document. Some of them - all usable in text mode without external packages - are: \--, \---, \----, \textendash, \textemdash. So if you want to expand your answer you could also clarify what are those symbols and when they should be used.


Place GNOME Dash to top of screen instead of left side

On the home screen I would like to display the Dash (circled in yellow below) of the , the bar of applications, across the top of the screen instead of down the left side of the screen.   How can I do this?


I'm writing some codes that test if there is "xx" in a string. For instance, doubleX("aaxxbb") should return true, and doubleX("axabb") should return false.  Here is my code:  private static boolean doubleX(String str) {   for(int i=0;i<str.length()-1;i++){       System.out.println(str.substring(i,i+2));       if(str.substring(i,i+2) == "xx") return true;   }   return false; }   Why does doubleX("aaxxbb") return false?


I'm developing a web-application for iPhone and Android. It works flawlessly on the iPhone but when I try to run it on an Android device, it just does not work.  But to the point… I need to access the (JavaScript) error console in the Android default browser. Is there a way to do that?  I tried changing the "Enable tracing" setting after accessing the hidden about:debug menu in the browser but nothing seems to change.  UPDATE: by the way, I'm using the Android Virtual Device software from the Android SDK.


Group Theory innG is normal subgroup of autG

Any hints for proving that innG $\triangleleft$ autG for any group G.  where innG(Inner automorphism of G) and autG(Automorphism of G) and H $\triangleleft$ K (H is normal subgroup of K).


Extension of the Lebesgue measurable sets

My question is the following :   is there a $\sigma$-algebra $\mathcal{T}$ (of subsets of $\mathbb{R^n}$) that contains strictly the $\sigma$-algebra $\mathcal{L}$ of  Lebesgue measurable sets (in $\mathbb{R}^n$), and such that there is a measure on $\mathcal{T}$ that extends the usual Lebesgue measure on $\mathcal{L}$ ?  I guess not, but I did not find a reference.


My question is exactly as the title says: can I match-case when searching? If so, what search parameters should I use?  If there is no such feature, could it be implemented?


Is it possible to turn off radio without turning of wifi on Lenovo k900?

I am currently having a look at the power consumption of a lenovo k900 phone and on the hardware side it seems Radio and Screen is using most of the power.  I am planning to use wifi but not the radio. Are they disconnected ? If so, can I use just the wifi, but no radio/telephony ? Are the settings or commands/intents to access these settings ?  Thanks!


how to uninstall/remove abaqus from Ubuntu

What should I do to uninstall/remove Abaqus from Ubuntu 14.04 LTS?  I did not install abaqus by commmand "sudo apt-get ....", now I don't know how to remove it from ubuntu. I followed instruction as shown in the following . Could anyone help me to solve?


How does java store infinite recursive object

The code below shows a data structure in leetcode. We can see the node1 store a list with node2 and node3, node2 will store a list with node1 and node4. In this case I think node1 and node2 will store the object of each others, which will cause an infinite recursion. How does java store the data structure like this, doesn't it cause a memory exceed? class Node {     public int val;     public List<Node> neighbors;      public Node() {         val = 0;         neighbors = new ArrayList<Node>();     }      public Node(int _val) {         val = _val;         neighbors = new ArrayList<Node>();     }      public Node(int _val, ArrayList<Node> _neighbors) {         val = _val;         neighbors = _neighbors;     } }  public static void main(String[] args) {         Node node1 = new Node(1, new ArrayList<>());         Node node2 = new Node(2, new ArrayList<>());         Node node3 = new Node(3, new ArrayList<>());         Node node4 = new Node(4, new ArrayList<>());          node1.neighbors.add(node2);         node1.neighbors.add(node4);          node2.neighbors.add(node1);         node2.neighbors.add(node3);          node3.neighbors.add(node2);         node3.neighbors.add(node4);          node4.neighbors.add(node1);         node4.neighbors.add(node3);          Solution solution = new Solution();         solution.cloneGraph(node1);     }


How accurate is Google Maps for travel times?

I have this  planned in Google Maps as a rough plot for travel times to 4 locations from Tokyo Tower, it's by no means finished.  Now I am well aware that there are other factors such was road works, traffic conditions, rest stops, etc. but would the travel times listed on Google Maps be an accurate estimate?   i.e. From Tokyo Tower to Hachiman Shrine, can I expect it to take at least 14 h 28 min on a perfect non-interrupted drive with the route Google Maps suggests?


My Anatomy and Physiology professor is charging for the outline

My class already requires two books for the lecture and one for the lab. Is it actually legal to charge $15 for the course outline, written by the professor and published by the community college. I think its unreasonable and kind of suspicious considering it could easily be uploaded to blackboard these days...at no cost and no excuse for any student not looking at the doc or powerpoint. Also, who would i need to speak to at my college concerning the matter and try to persuade for the syllabus.


Do we need an airport transit visa to wait in 3 different airports in Europe, if the final destination is Brazil?

I am Brazilian and my fiancé is Filipino. We are planning to go to Brazil from Singapore, and the few cheap flights we found have 3 different stops in 3 different European countries: London, Romania, and Portugal. We are only going to wait in these airports for the next flight. Does it require us a transit visa? We won't dispatch any luggage, just bring hand bags with us.  The flight itinerary is SIN > LGW > OPT > LIS > POA. This is the image:


How to center a div with all of its elements in html/css

i read that you can just use .all {   margin: auto;   width: 50%; }  but that doest work for  my case because the browser make it auto margin left and right , and it make the width to 50% but it doesnt make my div start from the center. it do that and start in the left ,also all items get messed up. this is my html code

             1

         Januarry 1 2016

  this is my css code .all{     display: inline-block;     border: 1px groove;     box-shadow: 5px 5px 10px black;   }  .one {     background-color:green;     color:white;     font-size: 150px;     display: inline-block;     padding-right:120px ;     padding-left: 120px;     padding-top:40px;     padding-bottom:40px; }   .text {     font-size:25px;     text-align: center;     padding: 30px;  }  so how can i center all of the div (class ("all"))


How to make from var_str import var_str in python

Let me explain..  I want to do this:  a = "somedir.somefile" b = "someclass" from a import b   Well, I want to do this to import automatic all classes inside a directory, and I don't know how many classes are there.


How do people understand astromech droids?

In all the Star Wars movies, R2D2 just boops and beeps his way around. And everyone understands him perfectly, though he is obviously not speaking Basic.  How do people understand him - is there like an astromech language? If so, then would one have to learn it, or is it comprised of feelings and emotions (expressed in beeps), essentially making a tonal language?  If I may be permitted to use an example from the prequels without too many lynch mobs forming, Anakin Skywalker converses frequently with Artoo while in the Naboo fighter, but he couldn't have had much schooling at the age of eleven, especially because he was a slave.  So how would people, Anakin especially, be able to understand astromechs?


Even tho I am new to Blender, I have tried many techniques posted on stack. However, I can't find a way to make this shape with a solid element (with faces).


Is there a repository containing packages for old versions of gcc, for the latest Ubuntu. I want to install gcc3 alongside gcc 4, for programs that need gcc3 specifically.


Does Air India provide any compensation for delayed flights?

A flight I was flying on 24th December was delayed in 3 steps, initially 1 hour, then an additional 55 min followed by an additional 15 min.   The last delay occurred 5 minutes before the departure time post the 55 min delay.    Was I entitled to anything for this or not?  This was for flight AI 951 from Hyderabad to Dubai  (possibly irrelevant info follows)  When I received the notification for the 2nd delay, I asked if refreshments would be provided (to avoid buying the insanely priced airport food) and was told to wait near the gate where they will announce the refreshments. 1 hr 40 min into the delay they said they won't provide anything since the delay is less than 2 hours, and I couldn't really go and buy anything at this time since it would have been only 15 min before departure.   When the additional 15 min delay was announced, they said that there is not enough time to arrange for refreshments and hence will not be providing them.    The primary reason I ask is if I should or should not expect refreshments to appear in such situations in the future…  It wasn't pleasant being hungry for so long.


The durability of iron tools is really starting to annoy me, but in all my hours of playing I've only stumbled across one deposit of diamond ore that provided around 7 Diamonds. What's the best way to locate more in Survival mode? Where is it most commonly found?


Hey I have a list where I would want to get all the different permutations of it i.e [A,B,C].  I want all different combinations of it. like so [A,C,B], [B,A,C], [B,A,C], [C,A,B] and [C,B,A] i tried using itertools.combinations and I get all combinations just not the ones with all letters in use.  matriks = ["A","B","C"]     combs=[]     for i in xrange(1, len(matriks)+1):     els = [list(x) for x in itertools.combinations(matriks, i)]     combs.append(els) print(combs)   this gives the following output  [[['A'], ['B'], ['C']], [['A', 'B'], ['A', 'C'], ['B', 'C']], [['A', 'B', 'C']]]


I use a chess application called "Lucaschess" and it needs PyQt4 module to work. Is it possible to install Pyqt4 on Ubuntu 20.04? I understand that Ubuntu no longer supports this package but is there anyway which I can work around?


Show that $f(x)=\frac{x}{1+|x|}$ is uniformly continuous.

I tried to use the definition and arrived this far:  $|f(x)-f(y)|=\left|\frac{x}{1+|x|}-\frac{y}{1+|y|}\right|=\frac{|x-y+x|y|-y|x||}{(1+|x|)(1+|y|)}\leq|x-y+x|y|-y|x||$.  Any suggestion for ending the proof?  I also tried to prove that $\frac{x}{1+x}$ is uniformly continuous on $[0,\infty[$ and that $\frac{x}{1-x}$ is uniformly continuous on $[-\infty,0[$, but I wonder if we can use the definition with the function $f(x)=\frac{x}{1+|x|}$ itself.


Sudo not avaliable, cannot sudo su and root is not enabled

So im stuck in a loop after do something stupid  i had a / in a sudo chown command due to my fat fingers, i CTRL-X the operation but not before /etc was changed to a non root user.  so now trying to run sudo i get the following  sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialise policy plugin   trying to run the command  pkexec chown root:root -R /etc   doesnt work as this happens  ozhound@UbuntuServer:/$ pkexec chown root:root -R /etc ==== AUTHENTICATING FOR org.freedesktop.policykit.exec === Authentication is needed to run `/bin/chown' as the super user Authenticating as: ozhound,,, (ozhound) Password:  polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie ==== AUTHENTICATION FAILED === Error executing command as another user: Not authorized  This incident has been reported.   I cannot login as root as i never enabled root  any suggestions? the other threads similar to this assume i have sudo access or the pkexec works.  ubuntu server 16.10


How can I get a shapefile from a postgis query?

My data is in a PostGIS database. I would like to generate a shapefile from a query. How can I do that?


How can you put items on one line and center them?

Is there an easy way to make the items appear horizontally and not vertically and also be centered? I have tried the following code but the points are squahed to the left side and there is no space in between them. \documentclass{article}  \usepackage[inline]{enumitem}  \begin{document}  \begin{itemize*}   \item Item 1   \item Item 2 \end{itemize*}  \end{document}  I am thinking something like the one below where o is the "dot" made. (space from the left side) o Item 1    (space here)   o Item 2


I am currently using Microsoft Visual Studio 2019 to compile these code below  #include<iostream> using namespace std;  double hamTinhTienDien(int kWH) {     if (kWH >= 0 && kWH <= 100) return kWH * 1242;     else if (kWH >= 101 && kWH <= 150) return 100 * 1242 + (kWH - 100) * 1304;     else if (kWH >= 151 && kWH <= 200) return 100 * 1242 + 50 * 1304 + (kWH - 150) * 1651;     else if (kWH >= 201 && kWH <= 300) return 100 * 1242 + 50 * 1304 + 50 * 1651 + (kWH - 200) * 1788;     else if (kWH >= 301 && kWH <= 400) return 100 * 1242 + 50 * 1304 + 50 * 1651 + 100 * 1788 + (kWH - 300) * 1912;     else if (kWH >= 401) return 100 * 1242 + 50 * 1304 + 50 * 1651 + 100 * 1788 + 100 * 1912 + (kWH - 400) * 1962; }  int main() {     int kWH;     cout << "Nhap so dien tieu thu: ";     cin >> kWH;     cout << "So tien phai tra la: " << hamTinhTienDien(kWH)*1.1 << endl; }   When i put 251 as the input, the output is 399452 but it is supposed to be 399451.8 I dont understand why . Please help!!!


Collections.sort for multiple conditions

I have a list of objects which I want to sort. But I have three different conditions. That is why I have this code:  Collections.sort(myList, new Comparator<MyObject>() {     @Override     public int compare(MyObject o1, MyObject o2) {         // my code     } });   Three times. First sorting all elements with condition x to the bottom of the list. Then a second time sorting all elements with condition y to the bottom and again for condition z.  Now I wonder how I could combine multiple conditions in one compare-method. So I don't have to do this three times.  Edit: To be more clear about the conditions. I want to sort all objects that have the criteria x to the bottom of the list. If an element fulfills criteria y it should be even below x and the same applies analog for z.


Google Play: Error downloading app - insufficient space

After one of the latest updates (not sure if it was the last one or a previous one) of the Google Play app, I am having an error trying to update a large app (42MB). It says:     Error Downloading . There is insufficient space on the device.   My device is a Samsung P1000 running Froyo. It's rooted, but the error was there before rooting it.  A quick Google search showed several Samsung users having the same problem (the app in question that was giving me the headache is Smurf's village). Some said that removing the updates to the Android Market (Google Play) app would fix it, but to me it was of no avail.  I also tried the procedure in  to no avail.  Now I am stuck with a prehistoric version of the Market (that works on small apps) and still cannot update Smurf's Village or install big apps. How can I fix this?  EDIT: device has over 2GB of internal SD storage, 27GB of external SD card, so space is not an issue.


How to obtain the cost time of each **def**?

I create a decorator to time the cost of every funcions : def timmer(func):   def wrapper(*args, **kwargs):       start_time = time.time()       res = func(*args, **kwargs)       stop_time = time.time()       print('Func %s, run time: %s' % (func.__name__, stop_time - start_time))       return res return wrapper  And use it every def , for example : @timmer def Test_func(*args,**kwargs):    return "hello !"  Then I can obtain the cost time of every func. But if I do this , I have to use @timmer in every def .If this .py file has 100 defs , then I must use @timmer for 100 times. How can I get the running time of each method conveniently ?


About a year and a half again, I purchased this wonderful game "Machinarium" from Amanita Design at the Ubuntu Software Center. Now, after I got a new Laptop Computer, I wanted to re-install my previously purchased game. However, it is not available anymore in the Software Center. I contacted Canonical Customer Service about this. No answer. I wrote to Amanita Design as well. No answer!   The answer to the marked duplicate question was: "In the Ubuntu Software-Center, go to File > Reinstall previous purchases but this did not work for me.  What can I do?


How can i resolve the logical error in destruction of objects?

Here i am faced with problem in destructor of objects. In the program given below i am trying to make object with the base class pointer dynamically and when i am trying delete that pointer than pointer just delete object of A. So how can i delete all the objects at the end of program?  class A{          public:             A(){             cout<<"Object A is created "<<endl;             }             ~A(){              cout<<"Object A is destroyed"<<endl;              }        }; class B{         public:           B(){           cout<<"object B is Created \n";           }           ~B(){            cout<<"Object B is Destroyed"<<endl;            }        }; class C{         public:           C(){           cout<<"constructor of C class"<<endl;           }           ~C(){            cout<<"destructor of C "<<endl;            }        }; class D:public C, public B, public A{      public:        D(){        cout<<"Object D is created "<<endl;        }        ~D(){         cout<<"Object D is destroyed "<<endl;         }   }; int main() {    A *a;    a = new D();    delete a;    return 0; }


Just finished the final book last night. I understand that (spoilers)     Snape was a double-agent spy for Dumbledore, but what usefulness did he bring? What information did Snape bring to Dumbledore about Voldemort or his Death Eaters?


I caught an Eevee, which of its evolutions will it evolve into?

So I just caught an Eevee. Now, I need 25 candies to evolve it. The fact is that in the GameBoy color versions, that Pokémon needed a stone to evolve instead of experience. Depending of the stone he was fed with (thunder, water or fire), he was evolving in a different Pokémon.   Is the stone feature also in Pokémon Go? If not, what decide the evolution of this Pokémon?   Bonus point : If it's possible, how can I get a stone?


How to change the range of questions appearing in my feed in Stack Exchange iphone app?

I am using Stack Exchange latest iOS app and below is what my default screen looks like when I open the app:    I just would like to see questions only from Stack Overflow.com and salesforce.stackexchange.com but right now it shows questions from all other network sites which I am not interested. So how do I change this behaviour?  Apologies if this is a very basic question. I tried googling but did not have any success.


Positive series problem: $\sum\limits_{n\geq1}a_n=+\infty$ implies $\sum_{n\geq1}\frac{a_n}{1+a_n}=+\infty$

Let $\sum\limits_{n\geq1}a_n$ be a positive series, and $\sum\limits_{n\geq1}a_n=+\infty$, prove that: $$\sum_{n\geq1}\frac{a_n}{1+a_n}=+\infty.$$


Whenever I start Tor in Ubuntu 13.04, the Vidalia Control Panel opens, loads up and displays a status of "Connected to the Tor network!". However, the tor-infused firefox, does not pop up like it should.  Tor log:  jul. 04 02:09:11.859 [Notice] Tor v0.2.3.25 (git-17c24b3118224d65) running on Linux. jul. 04 02:09:11.860 [Notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning jul. 04 02:09:11.861 [Notice] Read configuration file "/home/joren/.tor-browser/App/../Data/Tor/torrc". jul. 04 02:09:11.872 [Notice] Initialized libevent version 2.0.21-stable using method epoll (with changelist). Good. jul. 04 02:09:11.873 [Notice] Opening Socks listener on 127.0.0.1:9150 jul. 04 02:09:11.873 [Notice] Opening Control listener on 127.0.0.1:9151 jul. 04 02:09:11.937 [Notice] Parsing GEOIP file ./Data/Tor/geoip. jul. 04 02:09:12.178 [Notice] No AES engine found; using AES_* functions. jul. 04 02:09:12.178 [Notice] This OpenSSL has a good implementation of counter mode; using it. jul. 04 02:09:12.235 [Notice] OpenSSL OpenSSL 1.0.0k 5 Feb 2013 looks like version 0.9.8m or later; I will try SSL_OP to enable renegotiation jul. 04 02:09:12.740 [Notice] Reloaded microdescriptor cache.  Found 8497 descriptors. jul. 04 02:09:12.740 [Notice] I learned some more directory information, but not enough to build a circuit: We have no usable consensus. jul. 04 02:09:13.758 [Notice] Bootstrapped 5%: Connecting to directory server. jul. 04 02:09:13.761 [Notice] Heartbeat: Tor's uptime is 0:00 hours, with 1 circuits open. I've sent 0 kB and received 0 kB. jul. 04 02:09:13.908 [Notice] Bootstrapped 10%: Finishing handshake with directory server. jul. 04 02:09:14.252 [Notice] Bootstrapped 15%: Establishing an encrypted directory connection. jul. 04 02:09:14.507 [Notice] Bootstrapped 20%: Asking for networkstatus consensus. jul. 04 02:09:14.615 [Notice] Bootstrapped 25%: Loading networkstatus consensus. jul. 04 02:09:16.446 [Notice] We'd like to launch a circuit to handle a connection, but we already have 32 general-purpose client circuits pending. Waiting until some finish. jul. 04 02:09:16.447 [Notice] Bootstrapped 45%: Asking for relay descriptors. jul. 04 02:09:16.448 [Notice] I learned some more directory information, but not enough to build a circuit: We have only 113/3851 usable microdescriptors. jul. 04 02:09:17.755 [Notice] We now have enough directory information to build circuits. jul. 04 02:09:17.755 [Notice] Bootstrapped 80%: Connecting to the Tor network. jul. 04 02:09:17.810 [Notice] Bootstrapped 85%: Finishing handshake with first hop. jul. 04 02:09:17.818 [Notice] Bootstrapped 90%: Establishing a Tor circuit. jul. 04 02:09:18.156 [Notice] Tor has successfully opened a circuit. Looks like client functionality is working. jul. 04 02:09:18.157 [Notice] Bootstrapped 100%: Done.   How do I proceed solving this issue?


Can't install AMD Radeon R9 M265X drivers on ubuntu 20.04

I have an AMD Radeon R9 M265X gpu in my laptop. I downloaded the latest (2015) ubuntu drivers (fglrx-core_15.302-0ubuntu1_amd64_ub_14.01.deb) for the card from the AMD Page (). At first it gave me an error for not having libqtcore4 installed. I managed to install that and now it just gives me this error: ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/fglrx-core.0.cr ash' Error! Bad return status for module build on kernel: 5.4.0-42-generic (x86_64) Consult /var/lib/dkms/fglrx-core/15.302/build/make.log for more information. dpkg: error processing package fglrx-core (--configure): installed fglrx-core package post-installation script subprocess returned error exit status 10 Errors were encountered while processing: fglrx-core E: Sub-process /usr/bin/dpkg returned an error code (1) I tryed the linux universal radeon-crimson-15.12-15.302-151217a-297685e.zip installer, but after unziping in /tmp/ and running sudo ./amd-driver-installer*.run (as seen in this tutorial: ) it gaves me this error: error: Detected X Server version 'XServer 1.20.8_64a' is not supported. Supported versions are X.Org 6.9 or later, up to XServer 1.10 (default:v2:x86_64:lib32:XServer 1.20.8_64a:none:5.4.0-42-generic:) Installation will not proceed. Does anybody know a fix or something? Thanks.


'apt-get' always fails with ERROR 404: Not Found over a package (flashplugin-downloader)

the following error is preventing me from installing anything on Xubuntu 11.10. How can I fix it??  $ sudo apt-get install meld Reading package lists... Done Building dependency tree        Reading state information... Done meld is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? Y Setting up flashplugin-downloader (11.0.1.152ubuntu1) ... Downloading... --2012-02-06 21:23:36--  http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.0.1.152.orig.tar.gz Resolving archive.canonical.com... 91.189.88.33 Connecting to archive.canonical.com|91.189.88.33|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2012-02-06 21:23:36 ERROR 404: Not Found.  download failed The Flash plugin is NOT installed. dpkg: error processing flashplugin-downloader (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  flashplugin-downloader E: Sub-process /usr/bin/dpkg returned an error code (1)


How can we see black holes form and gain mass if nothing can cross a horizon (when viewed from our reference frame)?

As things approach the horizon of a black hole, their time dilation approaches infinity. How then can we observe black holes gaining mass if, according to our reference frame, nothing can pass the horizon of a black hole? Even more so, in order for a singularity to form, material must compress until there is a horizon, which should take an infinite amount of our time to happen, again due to time dilation. Since we can observe black holes and they can gain mass, this is obviously flawed. How so?


What is Moment generating function in layman terms. I am not able to understand what MGF is.


Tracking Low Quality Posts you Recommend Deletion on

On the beta , I can "Recommend Deletion" of answers. It currently doesn't do much, just .   To me, deleting a post is pretty serious stuff, so if I "recommend" such an action, I'd like to be able to track the post. I've been doing this by raising "Not an answer" flags, and keeping track of the posts from my Flagging Summary page. Moderators usually handle those flags pretty fast. And seeing if my flags were helpful or not is valuable feedback to me for deciding how to act on future posts.  But, you cannot flag from the Low Quality review queue, and the posts you Recommend Deletion on simply vanish after you click the button and confirm. I understand the beta tool wants to keep things more simple and focused, and probably also reduce the load on moderators. That's great! But we should have a way to track the posts we Recommend Deletion on.  I was thinking it could be shown on activity > reviews, together with the suggested edits:    The red answer link would indicate a deleted answer so we can easily spot them. If I Recommend Deletion, and it's still blue after a while, I go back there and flag it.  Do you think that could work? Or maybe we should just have a regular flag link on the Low Quality Posts task, like in ?    UPDATE  So now the activity tab on my profile is logging more review actions, such as "Close", "Edit" (improve), "Edit" (from low the quality posts task), and "Looks good". But no sign of "Recommend deletion". Will that be added too?


I'm currently baking a batch of sourdough bread. My last batch turned out perfectly with a hard crust and chewy inside. My problem is how to store the bread such that the crust stays hard. If I put it in a plastic bag the crust goes soft in a matter of hours and I'm afraid that the bread will turn dry if I leave it without some kind of protection. Note that I'm not looking for a long term storage solution.  What is the best way to store my bread, such that the crust stays hard and the inside stays chewy?


How to set up mic volume to a fixed level

Lately, I am holding a lot of vconfs on Google Hangouts. I'm using a headphone set but the internal mic is capturing the input sound. Apparently, if I move a bit away from my iMac or if I speak softer, the system increases (adjusts) that volume automatically. That is all very nice except that then, I start hearing my own echo on the other end! (I mean, transmitted back to me from my vconf partner amplified and delayed).  Does anybody know of a way to prevent that (automatic) behaviour? For instance, to limit the volume instead of just setting it up.


Where should I put the comma? Inside or outside the quotation marks?

I need to put a quote in my research paper. My friends give me different answers so I'm confused now...  Would it be      According to "Title", "blah blah blah."   or     According to "Title," "blah blah blah."


Prove that $F_{n} \subset U$ for some $n \in \mathbb{N}$

The question reads:  Let $U$ be an open subset in the compact metric space $X$.  If $\{ F_{k} : k \in \mathbb{N} \}$ is a collection of closed subsets of $X$ such that $F_{k+1} \subset F_{k}$, for all $k \in \mathbb{N}$, and $\bigcap_{k=1}^{\infty} F_{k} \subset U$, then show that $F_{n} \subset U$, for some $n \in \mathbb{N}$.  I think I have a proof for this but it seems way too easy considering how much information I am given.  I should add that my definition of compact means that every open covering has a finite subcovering.  $\cap_{k=1}^{\infty} F_{k} \subset U \Rightarrow \forall k \in \mathbb{N}, \exists \ x_{0} \in U$ such that $x_{0} \in F_{k} $  Let $F_{n} = \{x_{0}\}$, $n  \in \mathbb{N}$  $F_{n} \subset U\ \ \ $  Q.E.D.


How to overlay date and time onto the corner of photos?

Is there any utility which will read a photo's date and time from its EXIF data and embed it into the corner of the photo?


I am wondering what is the optimal crit chance/damage ratio? After plugging in numbers into the equation below, I noticed that the magic value appears to be around 1:3. Is my math flawed?   Equation: z=1+xy where z = damage output, x = crit chance, y = crit damage.


What happens when the Beholder beholds a Drunk Seer who was drunk that night? Does he see what they beheld before they blacked out, or does he just see that they were drunk?


Perl resets the EUID only when executing multiple commands through `env - /usr/bin/perl -e 'system("...")'`?

I was playing around with setuid perl for command execution (insecure).   I learned from another question, that env - /usr/bin/perl -e 'system("...")' doesn't reset the EUID to RUID, like it's the case for modern implementations of /bin/sh.  However, I cannot execute multiple commands, separated by && or ;, using the above command without perl resetting the EUID?  kube@ctf4-deploy1-65d9686c54-7x2zh:~$ ls -la /usr/bin/perl -rwsr-xr-x 1 root root 3197768 Mar 31  2019 /usr/bin/perl kube@ctf4-deploy1-65d9686c54-7x2zh:~$ env - /usr/bin/perl -e 'system("id")' uid=1000(kube) gid=1000(kube) euid=0(root) groups=1000(kube) kube@ctf4-deploy1-65d9686c54-7x2zh:~$ env - /usr/bin/perl -e 'system("id && id")' uid=1000(kube) gid=1000(kube) groups=1000(kube) uid=1000(kube) gid=1000(kube) groups=1000(kube)


I do not want to use XeLaTeX or LuaLaTeX, can I use the Arial font anyway?  According to  the Arial font can be used when using XeLaTeX or LuaLaTeX. When I use XeLaTeX I get new problems like my copyright signs are not recognized. What can I do?


why is the statement in finally block executed despite using return in try block

I don't get why is the statement in finally block being executed despite using return statement in try block. The return statement, as i know, returns the execution to the main.  If am using return in try block that means execution of try ends at that point and control goes into the main. Then why statement in finally is executed?  class a {  public static void main(String arr[])  {      try  {  System.out.println("hello1");  return;  }      finally     {     System.out.println("hello2");      }  } }


I am trying to write a generic Parse method that converts and returns a strongly typed value from a NamedValueCollection.  I tried two methods but both of these methods are going through boxing and unboxing to get the value.  Does anyone know a way to avoid the boxing?  If you saw this in production would you not like it, how bad is it for performance?  Usuage:  var id = Request.QueryString.Parse<int>("id");   Attempt #1:  public static T Parse<T>(this NameValueCollection col, string key) {     string value = col[key];      if (string.IsNullOrEmpty(value))         return default(T);      if (typeof(T) == typeof(int))     {         //return int.Parse(value); // cannot convert int to T         //return (T)int.Parse(value); // cannot convert int to T         return (T)(object)int.Parse(value); // works but boxes     }     if (typeof(T) == typeof(long))     {         return (T)(object)long.Parse(value); // works but boxes     }     ...      return default(T); }   Attempt #2 (using reflection):  public static T Parse<T>(this NameValueCollection col, string key) {     string value = col[key];      if (string.IsNullOrEmpty(value))         return default(T);      try     {         var parseMethod = typeof(T).GetMethod("Parse", new Type[] { typeof(string) });          if (parseMethod == null)             return default(T);          // still boxing because invoke returns an object         var parsedVal = parseMethod.Invoke(null, new object[] { value });         return (T)parsedVal;     }     // No Proper Parse Method found     catch(AmbiguousMatchException)      {     }      return default(T); }


Converting/using ArcGIS *.style file for/in QGIS (QML or SLD)?

I have downloaded a dataset from a government organisation. it comes with a .style file.  I use QGIS 1.8 on windows 7.    Is there a way to use the .style file as a qml or sld? I have tried simply changing the extension but to no avail.


What should we do If we wanted to increase the angular velocity of a planet?

We could hit it with really fast objects, but could we manipulate the orbit of a large satellite to speed up its rotation?  What would be the easiest way?


Prove or disprove.  If $f: \mathbb{R} \rightarrow \mathbb{R}$ is a differentiable function, $f'(x) > f(x)$ for all $x$, and $f(0) = 0$, then $f(x) > 0$ for all $x>0$.  If I could be pointed in the right direction, it would be highly appreciated.


iPhone 7, iOS 10.1.1: Missing new wallpapers

I just got the new iPhone 7 and the new wallpapers which I have seen on ads and Apple's website are missing.   How to get them on my iPhone?  Current OS: 10.1.1  I don't want to download them from the internet because of quality issue. New wallpapers look like this.


Unmet dependencies with AppImageLauncher

On 18.04 LTS, I am trying to install AppImageLauncher. When doing so, the following error appears: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies:  appimagelauncher:amd64 : Depends: libc6:amd64 (>= 2.27) but it is not installable Depends: libcairo2:amd64 (>= 1.2.4) but it is not installable Depends: libcurl4:amd64 (>= 7.16.2) but it is not installable Depends: libfuse2:amd64 (>= 2.6) but it is not installable Depends: libgcc1:amd64 (>= 1:3.0) but it is not installable Depends: libglib2.0-0:amd64 (>= 2.39.4) but it is not installable Depends: libqt5core5a:amd64 (>= 5.9.0~beta) but it is not installable Depends: libqt5dbus5:amd64 (>= 5.0.2) but it is not installable Depends: libqt5gui5:amd64 (>= 5.7.0) but it is not installable Depends: libqt5widgets5:amd64 (>= 5.2.0~alpha1) but it is not installable Depends: librsvg2-2:amd64 (>= 2.14.4) but it is not installable Depends: libstdc++6:amd64 (>= 6) but it is not installable Depends: zlib1g:amd64 (>= 1:1.1.4) but it is not installable E: Unable to correct problems, you have held broken packages.  I have already tried to follow several solutions such as checking the Software & Update configurations and then sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install --install-recommends  Also, I have tried to find the broken packages by: sudo dpkg -l | grep ^..r   And then try to remove them by: sudo dpkg --remove --force-remove--reinstreq package_name  Moreover, because of dependencies again, it doesn't allow it. Even if trying to apply the same to the dependencies. Would anyone know how to solve this? Thank you very much in advance.


Is there a simple way to cut a face or add an edge to an existing face?

Subdivide takes a single face and divides it into quads. I only want to add a single edge to the face off to the side.  Most of the answers I found on the internet recommend using the Knife tool but the knife tool does not cut a single face the way you would think. In fact I have no idea what logic the knife tool uses but it's not at all intuitive: (below gif).  I'm trying to add a single box to the bottom of this desk object to extrude into a drawer box, but I cannot get a face to work with on the bottom of the desk.


Arranging solenoids into a sphere to create a magnetic monopole?

[I believe that this question is very different than the question about arranging magnets into a sphere. Solenoids are ruled by Ampere's Law and magnets are not. Ampere's Law is what could make it work.]  I am wondering if Ampere's Law can be a loophole around Gauss's law of magnetism (Gauss's Law not allowing for magnetic monopoles). With solenoids arranged in a sphere, particularly if you had two of these solenoid-sphere's (one positive and one negative), couldn't the field lines be induced to extend out rather than loop back around on themselves?  Arrange solenoids into a sphere so that the outside of the sphere is made only of the positive ends of the solenoids, and the inside of the sphere only has the negative end of the solenoids (or vice-versa). Doesn't Ampere's Law suggest that there would be no place for the field lines to reconnect? The contour integrals have a maximum capacity that is used up by the field lines moving towards (or away from) the center. Could this not create a magnetic monopole?    Whether or not this would work, surely someone has done the experiment, right? I cannot find evidence of this experiment. I really want to know how this experiment turned out, does anyone know?


Is python confused, or is the programmer?  I've got a lot of lines of this:  some_dict[0x2a] = blah some_dict[0xab] = blah, blah   What I'd like to do is to convert the hex codes into all uppercase to look like this:  some_dict[0x2A] = blah some_dict[0xAB] = blah, blah   So I decided to call in the regular expressions.  Normally, I'd just do this using my editor's regexps (xemacs), but the need to convert to uppercase pushes one into Lisp.  ....ok... how about Python?  So I whip together a short script which doesn't work.  I've condensed the code into this example, which doesn't work either.  It looks to me like Python's regexps are getting confused by the brackets in the code.  Is it me or Python?  import fileinput import sys import re   this = "0x2a" that = "[0x2b]"  for line in [this, that]:     found = re.match("0x([0-9,a-f]{2})", line)      if found:         print("Found: %s" % found.group(0))   (I'm using the () grouping constructs so I don't capitalize the 'x' in '0x'.)  This example only prints the 0x2a value, not the 0x2b.  Is this correct behavior?  I can easily work around this by changing the match expression to:      found = re.match("\[0x([0-9,a-f]{2}\])", line)   but I'm just wondering if someone can give me some insight into what's going on here.  Running Python 2.6.2 on Linux.


Solving the equation $1! 3! 5! ... (2n-1)! = m!$, via a combinatorial method

How could we solve the following equation (for (m,n)) via a combinatorial method? $1! 3! 5! ... (2n-1)! = m!$ , wherein m and n are positive integers.  Thanks in advance for your help.


Why does the non-negative matrix factorization problem non-convex?

Supposing $\mathbf{X}\in\mathbb{R}_+^{m\times n}$, $\mathbf{Y}\in\mathbb{R}_+^{m\times r}$, $\mathbf{W}\in\mathbb{R}_+^{r\times n}$, the non-negative matrix factorization problem is defined as: $$\min_{\mathbf{Y},\mathbf{W}}\left\|\mathbf{X}-\mathbf{Y}\mathbf{W}\right\|_F^2$$  Why is this problem non-convex?


What subjects did Dumbledore teach in Hogwarts?

What subject did Professor Albus Dumbledore teach when he was recruited as a teacher in Hogwarts. Also, till his death, what other subjects did he teach.


Reference for the subgroup structure of $\rm{PSL}_2(q)$

This material is covered in detail in Dickson's "Linear Groups with an exposition of the Galois Field Theory", chapter XXII and Huppert's "Endliche Gruppen", chapter II, paragraph 8. Since I don't speak german and Dickson's treatment often requires deciphering, I was wondering if there is a "modern" account of this somewhere.


How to prevent smoke detector from triggering while using my air fryer

I'm using an air fryer to make things like potatoes, fish or carrots.  Every single time some amount of smoke (apparently oil) comes out of it and some almost translucent smoke probably from the food.  The annoying part is having the smoke detector being triggered every single time.  Any good tips to avoid this?  Thanks,


Writing methods in the implementation file with templates

I'm trying to write a class which can have about 50+ methods. The class is templated like this:  template <typename T> class xyz<T> { private:     void method1(int x, int at); public:     xyz();     ~xyz();     void method2(T a);     void method3(T a);     void metho(T a);     .. //Other methods };   Now I would like to implement these methods in a separate implementation .cpp file, so i would have to do something like this:  #include "xyz.h" template <typename T> xyz<T>::xyz() { }  template <typename T> xyz<T>::~xyz() { } template <typename T> void method1(T a){ .. } template <typename T> void method2(T a){ .. }   So as you can see, I have to make a template each time I implement a new method. Do I have any better way of doing this than making the template 50+ times?  So that I'd only make it once and can reuse it every time? Sorry if this is too obvious (I believe it is).


Cannot open gedit using sudo in Ubuntu 16

Command used:  sudo gedit /var/www/html/testphp.php Failed to register: Timeout was reached


I had a file   run.php  the code is as followed  <?php  $shell_cmd = '/usr/bin/aria2c --on-bt-download-complete ./hook.sh "http://sometorrent.com/file.torrent"';  shell_exec($shell_cmd .' 2>&1 > out.log');  echo $shell_cmd; ?>   I tried run this script via website which is   http://mywebsite.com/run.php   My browser continue loading buffering sort of, until the torrent finish, how do i run in background so it execute right away in background.


Is There a Difference Between Entering an Active Stargate on One Side Or The Other?

Related Questions:      When people dial a gate, they generally enter from the 'front' of the stargate. For convenience's sake on most planets, the 'front' of the gate is defined as the end that faces toward the DHD. Its also the side that has the 'kawoosh' splash out effect.  Even when 'space gates' were introduced in Atlantis, we get treated to a scene where some darts are guarding a gate, from only one side:    But what happens if an object entered from the 'back' (i.e., the other side) of an active gate?  Note: I'm not talking about  directions. I'm assuming a "we dialed out, now we're gonna walk around the gate and enter from the wrong side" scenario.


What is the average number of moves it takes to solve every 3x3 rubik’s cube position if only random moves are made?

Hope my question is clear enough. I’m just curious.


How to recover files from a hard drive that fell down

My external hard drive fell down two days ago and since then, if i connect it to my computer it would not be visible. it stopped spinning but making funny beeps. i'll be very glad if anyone can assist me.


How can I change the precision in the attribute table?

I'm working with QGIS, v. 2.0.1.  I opened a csv-table (from an Excel-file) and now the precision is very high but I don't need this. At the moment the values are for example 15.00000000000000, how can I change this to 2 decimals? And is it possible to set the precision before I open the table in QGIS?  The methods suggested by simo just worked partially... I opened the table and it looked good but as I wanted to create a shapefile of the layer the precision switched back to many decimals. What can I do?  There are only two decimal places in the csv file and there are also only two decimal places when I load the csv file into QGIS. But as soon as I create a shapefile, there are 14 decimal places.


The value of a, b and c for this integral

Find out the value of $a, b$ and $c$, for which $$ \lim _{x\to 0}\:\:\frac{1}{x^5}\left(\int _0^x\:\left(a+b \cos\left(t\right)+c \cos\left(2t\right)\right)dt\right)=\frac{1}{5} $$  My first thought was to separate the integral into multiple ones because i thought that it is pretty clear that each integral is a common one and a,b,c are constants and can be taken out . After I solved the integral, that's where I had the problem. I couldn't do the limit of the result that I've got in order to find out the value of $a,b$ and $c$ .


I'm a begginer in statistics. I came across a problem, please help me out. Is expectation always mean arithmetic mean of a variable?


When I found missing '=' in codes, I cannot edit coz of Edits have limitation, at least 6 character must change.


If $\lim_{x\rightarrow x_{0}}f'(x)=a\in{\mathbb R} $ then $f'(x_{0})=a$

The statement is stated by our teacher as follows :  Suppose $$\lim_{x\rightarrow x_{0}}f'(x)=a\in{\mathbb R} $$ then $$f'(x_{0})=a$$  , here we do not assume $f'(x)$ is continuous at $x_{0}~.$ The statement is so strange to me . But our teacher claims that this exercise can be found in the text book of Apostol


So, I have a sentence in a paper I'm writing that looks like this:     This result was first discovered by Person X (PaperX 1915).   The issue is, the paper I cite, let's call it Paper X, written by Person X, is in German, and I have not read it. I know that the result is there, because another paper, let's say Paper Y, also cited Paper X and stated that this result was there.  Do I need to cite Paper Y as well as Paper X, since it is where I found the citation and the result? Or is this not necessary, as the information which I am repeating from Paper Y is information that they themselves repeat from Paper X, which I cite?


What did I do wrong in my proof that 2/(3-2/(3-2/(3-... = 1?

I was watching a Mathologer video on a proof that $\pi$ is irrational that used continued fractions. At one point in the video, the person presenting the proof challenged the viewers to prove that $\frac{2}{3-\frac{2}{3-\frac{2}{3-...}}}=1$. I attempted this the following way: Let $x=3-\frac{2}{3-\frac{2}{3-...}}$.We can then see that $x=3-\frac{2}{x}$. We can then solve for $x$, arriving at $x^2-3x+2=0$, which we can solve with the quadratic formula, yielding $x=1$ or $x=2$. Now, $1-3+2=0$; $3-\frac{2}{1}=1$, and the coefficient of $x^2\neq0$, so $1$ should be a valid solution for $x$, however in that case $\frac{2}{x}=2\neq1$ (which we were trying to prove), which is a bizarre result, seeing as a continuing fraction should only have one result (or so I think...).  I'm still only a high school student, and my formal math education is around Algebra I and Geometry level, so it's possible I may be missing something obvious. Clearly, my reasoning is flawed. Can someone please help me see where I'm wrong here, and what I missed? Is my approach completely wrong?


Would it be possible to change past perfect into simple past

She invited me to dinner. But it _____ two years since I _____ to her house. So I lost my way.      The answer is "was", "had gone" but would it be possible to change "had gone" into "went" because if he  lost his way, may be he only went to her house only one time and "went" refers to a single event.


If $p \equiv 3 \ (\text{mod} \ 4)$ is a prime, show $(\frac{p-1}{2})! \equiv (-1)^{t} \ (\text{mod} \ p)$

If $p \equiv 3 \ (\text{mod}  \ 4)$ is a prime, show $(\frac{p-1}{2})! \equiv (-1)^{t}  \ (\text{mod} \ p),$ where $t$ is number of positive integers less than $\frac{p}{2}$ that are nonquadratic residues of $p.$  My attempt: Since $p-1 \equiv -1,  \ p-2 \equiv -2, ..., p-(\frac{p-1}{2}) \equiv \frac{p-1}{2} \ (\text{mod} \ p)$ and $1 \equiv 1, \ 2\equiv 2,..., \frac{p-1}{2} \equiv \frac{p-1}{2} \ (\text{mod} \ p),$ it follows that $((\frac{p-1}{2})!)^2 \equiv-(p-1)! \equiv 1,$ by Wilson's theorem.   I am not sure how to continue from here. How do I relate it to $t?$ Appreciate if anyone could advise. Thank you.


It is about Gerunds and present participle

Please clarify if what I have mentioned below is correct.   I like painting. - Gerund?  I like painting pictures. - Present participle?


How do I convert two lists into a dictionary?

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


If light is considered a wave, then what exactly is a photon?

So according to google:      a photon is a particle that transmits light.    Ok, but light is considered a wave, not a stream of particles(I'm pretty sure that this is what Young's double slit experiment proved?)  So what is it exactly? I assume something like wave-particle duality comes into play here, but i don't know much about it, other than the name, and what I can infer from the name.   Thanks for reading and hopefully answering. I'm really new to physics, but trying my best to learn it!!


Prove $\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$

I am trying to prove  $$\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$$  This problem is a classic, but I seem to be missing one step or the understanding of two steps which I will outline below.   $$I_n := \int\cos^n x \ dx = \int\cos^{n-1} x \cos x \ dx \tag{1}$$  First question: why rewrite the original instead of immediately integrating by parts of $\int \cos^n x \ dx$?  Integrate by parts with $$u = \cos^{n-1} x, dv = \cos x \ dx \implies du = (n-1)\cos^{n-2} x \cdot -\sin x, v = \sin x$$  which leads to  $$I_n = \sin x \ \cos^{n-1} x +\int\sin^2 x (n-1) \ \cos^{n-2} x \ dx \tag{2}$$  Since $(n-1)$ is a constant, we can throw it out front of the integral:  $$I_n = \sin x \ \cos^{n-1} x +(n-1)\int\sin^2 x \ \cos^{n-2} x \ dx\tag{3}$$  I can transform the integral a bit because $\sin^2 x + cos^2 x = 1 \implies \sin^2 x = 1-\cos^2 x$  $$I_n = \sin x \ \cos^{n-1} x + (n-1)\int(1-\cos^2 x) \ \cos^{n-2} x \ dx \tag{4}$$  According to Wikipedia as noted , this simplifies to:  $$I_n = \sin x \ \cos^{n-1} x + (n-1) \int \cos^{n-2} x \ dx - (n-1)\int(\cos^n x) \ dx \tag{5}$$  Question 2: How did they simplify the integral of $\int(1-\cos^2 x) \ dx$ to $\int(\cos^n x) \ dx$?  Assuming knowledge of equation 5, I see how to rewrite it as  $$I_n = \sin x \ \cos^{n-1} x + (n-1) I_{n-2} x  - (n-1) I_{n} \tag{6}$$  and solve for $I_n$. I had tried exploiting the fact that  $$\cos^2 x = \frac{1}{2} \cos(2x) + \frac{1}{2} $$  and trying to deal with $\int 1 \ dx - \int \frac{1}{2} \cos (2x) + \frac{1}{2} \ dx$  which left me with $\frac{x}{2} - \frac{1}{4} \sin(2x)$ after integrating those pieces. Putting it all together I have:  $$I_n = \sin x \ \cos^{n-1} x + (n-1) I_{n-2} x \left(-(n-1) (\frac{x}{2} - \frac{1}{4} \sin 2x) \right) \tag{7}$$  but I'm unsure how to write the last few terms as an expression of $I_{something}$ to get it to match the usual reduction formula of   $$\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$$


Alias of COUNT is not being "recognized" by SQL Server

I have restored the Northwind database() from a backup file using SQL Server.   Trying to execute the following query results in error "Invalid column name 'products'.", product is an alias.  SELECT OrderID, COUNT(ProductID) products FROM [NORTHWND].[dbo].[OrderDetails] GROUP BY OrderID HAVING products > 5;   What is the problem?


Alternate methods to prove that $n^{\frac{1}{n}} \rightarrow 1$ where $n \in \mathbb{N}$

So, I was trying to prove that $n^{\frac{1}{n}} \rightarrow 1$ where $n \in \mathbb{N}$. Here's what I did: Since $n^{1/n}>1$, let us suppose $n=(1+k)^n$ for $n>1$ and some $k>0$. Now, I used the binomial expansion and wrote: $$\begin{align} n&=1+nk+\frac{n(n-1)}{2}k^2+....+k^n \geq1+\frac{n(n-1)}{2}k \\ &\Rightarrow n-1 \geq \frac{n(n-1)}{2}k^2 \\ &\Rightarrow k^2 \leq \frac{2}{n} \end{align}$$ So now, we can always find an $n>0$ such that $\frac{2}{\epsilon^2}<n\Rightarrow \frac{2}{n}<\epsilon^2$. Now, as $|n^{\frac{1}{n}}-1|\geq0$, we have, $n^{\frac{1}{n}}-1=k\leq(\frac{2}{n})^{\frac{1}{2}}<\epsilon$ And in this way, I proved that $n^{\frac{1}{n}}\rightarrow1$. I wanted to know how can I prove this without using Binomial expansion. I tried to do this using the Bernoulli's Inequality,  but couldn't get too far. Any help/hint would be highly appreciable.


Is the sum of two independent geometric random variables with the same success probability a geometric random variable?

Is the sum of two independent geometric random variables with the same success probability parameter a geometric random variable? What is it's distribution?  My approach is as follows: $Z=X+Y$   $P(X+Y=z)=\sum\limits_{x} P(X=x)P(Y=z-x)$  $=\sum\limits_{x} p(1-p)^{(x-1)}p(1-p)^{(z-x-1)}$  $=\sum\limits_{x} p^{2}(1-p)^{z-2}$  $= p^{2}(1-p)^{z-2} \sum\limits_{x=0}^\infty 1$  I am not sure how to turn this into a distribution. It looks like binomial with n = z and x = 2, but I don't know how to get the coefficient from this.


"What does she look like?" vs. "How does she look like?"

I have heard "What does she look like" said a lot and sometimes "How does she look like?". Is there any difference between them, if yes What is the difference between them?


I have vector $x=[3, 5, 7, 8, 12, 13, 14, 18, 21]$ and  wanted to see summary   statistics.  if I use summary(x) function in R, My anwser     Min. 1st Qu.  Median    Mean 3rd Qu.    Max.     3.00    7.00   12.00   11.22   14.00   21.00   But actual anwser is Q1 = 6 and Q2=16   What is the difference ?


Does a multiclass character get to pick which hit dice they recover after a long rest?

This question came up in our last game.  In 5e, after a long rest you get to recover half your spent hit dice.  My assumption would be is that if you are multiclass you get to pick the hit dice you want to recover.  In theory you get to pick the hit dice you want to recover even if you are not multiclass - it just doesn't matter.  Any reason to think this is not the case?  Related to


How do I localize the jQuery UI Datepicker?

I really need a localized dropdown calendar. An English calendar doesn't exactly communicate excellence on a Norwegian website ;-)  I have experimented with the , their website says it can be localized, however that doesn't seem to work.  I am using ASPNET.MVC, and I really want to stick to one javascript library. In this case jQuery.  The ajax toolkit calendar would be acceptable, if only it too would display Norwegian names.  Update: Awesome! I see I am missing the language files, a not so minor detail :-)


Which is proper use of "me or I" at end of sentence?

Sample sentence:  There's not a dad in the world who compares to you, and there's not a daughter in the universe who's more grateful than (me or I).


CSS is not working after deployment in IIS

I have done some css changes in one already hosted website in IIS. but customers are not able to see updated changes unless i personally ask them to press ctrl + F5. Is there any way through which i can handle this issue.


I am not fully understanding the Towers of Hanoi. The recursion is very elegant and the answer has eluded me for a very long time. I am currently learning python, so lets use python.  def TowerOfHanoi(n,from_rod, to_rod, aux_rod):     if n==1:         print ("Move disk 1 from rod", from_rod, "to rod", to_rod)         return     TowerOfHanoi(n-1,from_rod, aux_rod, to_rod)     print ("Move disk", n, "from rod", from_rod, "to rod", to_rod)     TowerOfHanoi(n-1,aux_rod, to_rod, from_rod)  n=4 TowerOfHanoi(n,'A', 'C', 'B')]   This is the correct code for the Tower of Hanoi.  I understand the two calls within the function. I have drawn a picture that shows the disk moving from from_rod to aux_rod, then the next call moves it from aux_rod to to_rod. That makes sense now.   I do not understand how the function is calling the disks in that order and how the program continues for so long. If you understand the TowersOfHanoi in C, Java, pseudocode, python, or Matlab then your help is greatly appreciated.


Substitution for marjoram in beef birria

What can you use in place of marjoram when cooking beef birria?


Questions with many upvotes should not be closable

I see a lot of good, well-writen and constructive questions (that are probably not only good for me) closed, by various reasons which I fail to digest, so I propose the idea that questions with n upvotes should not be closable.  This would be in my opinion very much in the spirit of "", and unless I'm wrong, it would be beneficial for the users to choose by themselves whether the site should have or not x question. The ones which are low quality never get many upvotes anyway.  The only cons I can think of are... DB space? And at a minimum there's the pro of more popular pages with more ads (for the admins), and questions people like (for the users).  I'm also counting for , in the lines of Google's "", but questions  are more like what I'm aiming at (probably that question has not many upvotes for this though).


Centered background extending to the edge of the screen

I don't how to do background which extend and will be centered  now I have something like this:  body {     background: url(tlo.jpg) no-repeat;     background-attachment: fixed;     background-position: center; }   It is centered and it have constant size....  I want that it will be just proportionally expanded......  I need to keep the proportions  thanks!  OK i have solution! :)  body {     background-image: url(tlo.jpg);     background-repeat: no-repeat;     background-size: 100% auto;     background-position: center center; }


Complement of $c_{0}$ in $\ell^{\infty}$

How can I show that $c_{0}$ cannot be complemented in $\ell^{\infty}$? Complement in the following sense  $$c_{0}+V = \ell^{\infty}$$  And the projections are continuous.


Are there any benefits in using function expression in JavaScript?

I recently joined a large software developing project which uses mainly JavaScript and a particular question has been on my mind since day one. I know this issue has been here on SO before, but I have never seen the core question being properly answered. So here I ask it again:  Are there any benefits in JavaScript in using function expressions rather than function declarations?  In other words, is this:  var myFunction = function () {   // Nice code. }   in any way better than this:  function myFunction () {   // Nice code. }   As I see it, function expressions only introduce negative aspects on several levels to the code base. Here I list a few.   Function expression as the one above, suddenly forces you to be careful with forward references, as the anonymous function object that the myFunction variable refers to, does not exist until the variable expression actually executes. This is never a problem if you use function declarations. Apart from generating twice as many objects as in the case with function declarations, this usage introduces a very bad programming habit, which is that developers tend to declare their functions only when they feel they need them. The result is code that mixes object declarations, function expressions and logic in something that obscures the core logic of a piece of code. As a side effect of 2), code becomes much harder to read. If you would use proper function declarations and only var declarations for objects that actually will be variable in the code, it becomes far easier to scan the indentation line of code segment and quickly find the objects and the functions. When everything is declared as "var", you are suddenly forced to read much more carefully to find this piece of information. As yet another nasty side effect of 2), as users get into the bad habit of only declaring their functions when they feel they need them, function expressions start showing up inside event handlers and loops, effectively creating a new copy of the function object either each time an event handler is called or for each turn in the loop. Needless to say, this is bad! Here is an example to show what I mean:  var myList = ['A', 'B', 'C'];  myList.forEach(function (element) {  // This is the problem I see. var myInnerFunction = function () {     // Code that does something with element. };   };   So to sum up, at least in my view, the only situation in which it is fair to use something like:  var myFunction = function () {   // Nice code. }   is when your logic intends to change the myFunction reference to point at different functions during execution. In that situation myFunction (the variable) is something that is variable in the code, hence you are properly informing a different programmer of your intents, rather than confusing him/her.  With this background in mind, I ask my question again. Have I missed something central about function expressions (in the context described above) in which they provide any benefit over function declarations?


Can a character drop a weapon in order to cast a spell that is a reaction?

Suppose a Fighter/Wizard without the War Caster feat is wielding a sword and shield.  If she is hit and wants to cast the Shield spell as a reaction (it has a somatic component), can she drop her sword and cast the spell all as part of the same reaction?  The rules don't seem to specify anything about object interactions other than as part of your main turn's move or action.    As a DM, I think I would rule that she could, since opening her hand seems like a reasonable start to whatever gestures she might need to make to cast the spell.  But I wanted to check, is this just a DM discretion thing, or are there explicit rules/examples somewhere that help clarify how this should be ruled?


cannot make inheritance work with super in module

I have read about new way to call ancestor's constructor via super(..).__init__() and wanted to use it. I have a directory dataset with three files: __init__.py  from .Dataset import Dataset from .CSVDataset import CSVDataset   CSVDataset.py  import csv import numpy as np from dataset import Dataset   class CSVDataset(Dataset):     """     reads dataset from csv file     """     def __init__(self, file):         Dataset.__init__(self)         #super(CSVDataset, self).__init__()         reader = csv.reader(open(file, 'r'), delimiter=',')         x = list(reader)         self.container = np.array(x).astype('double')   and Dataset.py. When I use it from ../dataset like this  from dataset import CSVDataset data = CSVDataset('test/data1')   it works only with Dataset.__init__(self). It should work with super(CSVDataset, self).__init__() but it does not. Why is that?  update: I get error  >>> data = CSVDataset('test/data1') Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "dataset/CSVDataset.py", line 13, in __init__     super(CSVDataset, self).__init__() TypeError: must be type, not classobj   Dataset draft:  class Dataset(Iterable):     """     base class representing dataset API.     Remember, dataset is used for learning.     """     def __init__(self):         self.container = None         self.counter = None     ....  class Iterable:     def __iter__(self):         self.counter = 0         return self      def __next__(self):         try:             label = self[self.counter]             self.counter += 1             return label         except:             raise StopIteration


Prove that $e$ is irrational using this result

I have to prove that $e$ is irrational using this result  $1/e = \sum_{k=0}^{\infty} \frac{(-1)^k}{k!}$   and getting the estimation for the partial sums $0 < 1/e - s_{2k-1} < \frac{1}{(2k)!}$  I tried, but I obtain $0 < 1/e + \frac{1}{(2k-1)!} = \frac{1}{(2k)!} < 1$, and I don't think it's good


For which values $\alpha, \ \beta \in \mathbb R $ does the series $\sum_{n=2}^{\infty} \frac{1}{n^\alpha \ln^{\beta}(n)}$ converges?

How can I determine for which values $\alpha, \ \beta \in \mathbb R $ does the series $\sum_{n=2}^{\infty} \frac{1}{n^\alpha ln^{\beta}(n)}$ converges?   I want to use the integral test to show it, so I proved that $f(x)=\frac{1}{x^\alpha ln^{\beta}(x)} \geq 0$ and that $f(x)$ is monotonically decreasing. but How do I continue from here? I assume that are a lot of cases but is there an easy way to see it directly?


I've recently been trying to install and connect to xrdp in Ubuntu 13.10, and authentication seems to be going properly, but when the screen transitions to the OS, the only thing I can see is a checkerboard. There's no menus or other indicators that Ubuntu even boots(though I know it does, I can ssh to it). When I run xrdp -nodaemon I get these errors:  xrdp_mm_process_login_response: connect failed trying again... xrdp_mm_process_login_response: connect failed trying again... xrdp_mm_process_login_response: connect failed trying again... xrdp_mm_process_login_response: connect failed trying again... xrdp_mm_process_login_response: error in trans_connect chan   It may also be useful to know that I'm not currently using a monitor in this system.


Why did Littlefinger not ask for evidence in trial?

We know Littlefinger as one of the wisest and wickedest characters in Game of Thrones, but in "The Dragon and the Wolf" (Game of Thrones. S07E07),       Littlefinger dies at the hands of Arya, following Sansa's sentence.    But why did Littlefinger not demand any evidence to prove the Starks' accusations? Is it enough that Bran said the exact words Littlefinger said to Ned, back in season 1, which eventually lead to Ned's death? Is there any other event in that scene that I missed that means Littlefinger doesn't need any hard evidence to be found guilty of his crimes?


How to disable middle click paste Mavericks Terminal?

I have looked all over the Net and can't find a way to disable middle-click paste in the Terminal application in Mavericks? I want it scroll but not paste.   Anybody know how to fix this? I'd sure appreciate the tip.


Malicious DH parameters without using composite numbers

I know that it's possible to generate DH parameters that lead to it being easy to attack (e.g. trivial composite numbers), but is it possible to create a malicious parameter that is not a composite number (and thus passes an arbitrary number of Miller-Rabin tests) but still makes attacking the DH group easy? It should be trivial to detect if the parameters have been generated to intentionally fall victim to the small subgroup attack, and the SNFV becomes impractical with realistic key sizes.  Questions similar to this have been , but they seem to focus on composite numbers.


If $x+y+z=xyz$, prove $\frac{2x}{1-x^2}+\frac{2y}{1-y^2}+\frac{2z}{1-z^2}=\frac{2x}{1-x^2}\times\frac{2y}{1-y^2}\times\frac{2z}{1-z^2}$ given that $x^2~,~y^2~,~z^2\ne1$  I came across this question in an ancient ($19$th century) Trigonometry book, and this is the method they use to prove the result (please note: I understand this method fully): Let $x=\tan A$ ,$~y=\tan B$ and $z=\tan C$ which is acceptable without any loss of generality. This means that we are saying that $$\tan A+\tan B+\tan C=\tan A\tan B\tan C$$ Consider $\tan (A+B+C)$: $$\tan (A+B+C)=\frac{\tan A+\tan B+\tan C-\tan A\tan B\tan C}{1- \tan A \tan B- \tan C \tan A - \tan B \tan C}$$ So if $~\tan A+\tan B+\tan C=\tan A\tan B\tan C~~$ then $~~\tan (A+B+C)=0$. Hence, let $~A+B+C=\pi$. Now consider $\tan (2A+2B+2C)$: $$\tan (2A+2B+2C)=\frac{\tan 2A+\tan 2B+\tan 2C-\tan 2A\tan 2B\tan 2C}{1- \tan 2A \tan 2B- \tan 2C \tan 2A - \tan 2B \tan 2C}=0$$ $$\implies \tan 2A+\tan 2B+\tan 2C=\tan 2A\tan 2B\tan 2C$$ $$\implies \frac{2\tan A}{1-\tan^2 A}+\frac{2\tan B}{1-\tan^2 B}+\frac{2\tan C}{1-\tan^2 C}=\frac{2\tan A}{1-\tan^2 A}\times\frac{2\tan B}{1-\tan^2 B}\times\frac{2\tan C}{1-\tan^2 C}$$ $$\therefore\frac{2x}{1-x^2}+\frac{2y}{1-y^2}+\frac{2z}{1-z^2}=\frac{2x}{1-x^2}\times\frac{2y}{1-y^2}\times\frac{2z}{1-z^2}$$ as required.  My question is, is there any other way of proving this without this rather heavy use of trigonometry? I also would prefer not to work through heaps of algabraic manipulation and expansion to obtain the required result, although if that's necessary I will put up with it ;) Thank you for your help.


switch phone to data when wifi signal is weak

I am using Tasker.  How do i get my phone to turn wifi off when signal is low and turn data back on.  I also want it to check occasionally for a stronger signal.


I've been active at Math.SE for over a year and suddenly I can't upload images. When I click the Image icon (when I'm writing an answer) I get a new version of the "Drag and drop or click here" window where the "Drag and drop" picture is divided in 2, with the normal picture on top and an empty white rectangle at the bottom. And if I try and drag a file there (to the normal top part or the new empty bottom part), a new window (message box) appears asking if I want to leave this site. And if I try to click a "cancel" or click the "x" at the top right corner, nothing happens. What's going on?


changing font size in textmaker editor doesn't change font in the pdf

I've changed the font size to 14 in Times New Roman.It only changes font on the file on the left,but pdflatex file on the right remains same whatever the fontsize is.How do i fix this?


I am traveling from Boston to Canada by cruise ship. The first port of arrival is on July 30 and the last port in Canada is on August 4. Then I'm flying on August 5 from Montreal to California. My passport is valid until August 20th. Will I have a problem?


Use Windows API from C# to set primary monitor

I'm trying to use the Windows API to set the primary monitor. It doesn't seem to work - my screen just flicks and nothing happens.      public const int DM_ORIENTATION = 0x00000001; public const int DM_PAPERSIZE = 0x00000002; public const int DM_PAPERLENGTH = 0x00000004; public const int DM_PAPERWIDTH = 0x00000008; public const int DM_SCALE = 0x00000010; public const int DM_POSITION = 0x00000020; public const int DM_NUP = 0x00000040; public const int DM_DISPLAYORIENTATION = 0x00000080; public const int DM_COPIES = 0x00000100; public const int DM_DEFAULTSOURCE = 0x00000200; public const int DM_PRINTQUALITY = 0x00000400; public const int DM_COLOR = 0x00000800; public const int DM_DUPLEX = 0x00001000; public const int DM_YRESOLUTION = 0x00002000; public const int DM_TTOPTION = 0x00004000; public const int DM_COLLATE = 0x00008000; public const int DM_FORMNAME = 0x00010000; public const int DM_LOGPIXELS = 0x00020000; public const int DM_BITSPERPEL = 0x00040000; public const int DM_PELSWIDTH = 0x00080000; public const int DM_PELSHEIGHT = 0x00100000; public const int DM_DISPLAYFLAGS = 0x00200000; public const int DM_DISPLAYFREQUENCY = 0x00400000; public const int DM_ICMMETHOD = 0x00800000; public const int DM_ICMINTENT = 0x01000000; public const int DM_MEDIATYPE = 0x02000000; public const int DM_DITHERTYPE = 0x04000000; public const int DM_PANNINGWIDTH = 0x08000000; public const int DM_PANNINGHEIGHT = 0x10000000; public const int DM_DISPLAYFIXEDOUTPUT = 0x20000000;  public const int ENUM_CURRENT_SETTINGS = -1; public const int CDS_UPDATEREGISTRY = 0x01; public const int CDS_TEST = 0x02; public const int CDS_SET_PRIMARY = 0x00000010;  public const long DISP_CHANGE_SUCCESSFUL = 0; public const long DISP_CHANGE_RESTART = 1; public const long DISP_CHANGE_FAILED = -1; public const long DISP_CHANGE_BADMODE = -2; public const long DISP_CHANGE_NOTUPDATED = -3; public const long DISP_CHANGE_BADFLAGS = -4; public const long DISP_CHANGE_BADPARAM = -5; public const long DISP_CHANGE_BADDUALVIEW = -6;      public static void SetPrimary(Screen screen) {   DISPLAY_DEVICE d = new DISPLAY_DEVICE();   DEVMODE dm = new DEVMODE();   d.cb = Marshal.SizeOf(d);   uint deviceID = 1;   User_32.EnumDisplayDevices(null, deviceID, ref  d, 0); //    User_32.EnumDisplaySettings(d.DeviceName, 0, ref dm);   dm.dmPelsWidth = 2560;   dm.dmPelsHeight = 1600;   dm.dmPositionX = screen.Bounds.Right;   dm.dmFields = DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT;   User_32.ChangeDisplaySettingsEx(d.DeviceName, ref dm, IntPtr.Zero, CDS_SET_PRIMARY, IntPtr.Zero); }   I call the method like this:  SetPrimary(Screen.AllScreens[1])   Any ideas?


I just learned about the yield keyword in python - very impressive and useful indeed.   is there any equivalent in C and C++ languages?


I’m 18 years old and want to finance a £30,000 car

I'm 18 years old and I've always wanted an Audi Q5. Currently, I'm working full-time. I earn £28,800 annually and that will be due to go up soon. The car I've had eyes on costs £31,789. The monthly costs will be £632.02. It will be a hire purchase finance type with a contract length of 4 years. I have the deposit ready to go at the time of this post, 20% which is £6,400, and I am contributing more as I won't be buying the car until February. I've checked the insurance and it costs £2,500. With that I will be going halves with my brother as he will be using the car.  At the moment, I live with my brother and work for him. I am currently paying no bills but my phone. My role at work is stable and is unlikely to change any time soon.  Edit: I've asked around and a lot of people are telling me to get a cheaper car as I could crash it or could use the money elsewhere.  Should I buy a second-hand cheap car or go ahead with the deal?


A story about a man whose wife recently passed, living into a least plausible reality

I remember reading the entire story online.   The man ends up at an old bookstore that sells pulp scifi that his wife liked, realizes some of the titles are fake. The owner gives him a cryptic book and disappears (dies?). The book is (potentially portrayed as pseudoscience) about how we don't die, simply continue jumping into the least plausible reality.   He gets into an accident shortly after, and the story culminates decades (much longer?) later, with an alien species finding/using him as a repository of information about our species?


It is often critical to see the question when answering, particularly in math-related sites. Would it be possible to make the question itself visible in the Android App while answering a question?


I have a hair particle group, that takes buildings from a building group, and places them on a grid. This works perfectly fine. I recently added an emitter system to each of the buildings in the building group to show random lit windows. It shows perfectly fine in the preview when looking at the group of buildings, but when looking at the hair particle system, the buildings show as usual, but the emitter doesn't work. There are a few other buildings using the same emitter system in the scene that are not in the building group, which the emitter system is working fine.   It works fine if I convert the emitter system, but is not ideal. Is there a way to get this nested particle system to work, without converting?  Thanks in advance.


If $n\geq 2$ is prime and $a\geq 1$ is an integer, then $(a+1)^n-a^n$ leaves a remainder of $1$ modulo $p$. If $n$ is even or a multiple of $3$, then it follows ad-hoc that again $(a+1)^n-a^n$ is never divisible by $n$. By simulations, the same should be true for all $n$. How would one prove this?  Prove that $(a+1)^n-a^n$ is never divisible by $n$.


How to accurately time methods in C# .NET?

I'm in the middle of writing my dissertation. I have created a search application using .net c#.  I need a way to accurately time the search.  I have heard of System.Diagnostics.Stopwatch but I have read that it wasn't accurate.  So my question is what is the most accurate way to time methods and how would you implement it?


Get the index of an element in a List that satisfies a condition

Say I have a Point:  public class Point {     double X, Y; }   I want to get the index of the element inside List<Point> that satisfy a condition, for example, with the maximum Point.X value inside List<Point>.  How would I do that with a LINQ expression?


Where is the return value of int main() is stored?

In the program below, where is the value of return 0 stored and what does it actually mean?  #include <iostream.h>  int main() {   cout<<"Hello World";   return 0; }


Unable to Telnet into port 25 on CentOS PostFix Server

I'm trying to telnet into port 25 on a CentOS server that runs PostFix to test sending email messages from the server.  When I try to telnet in from another CentOS box on the same network I get the message below:   Unable to connect to remote host: Connection refused   SELinux is disabled and I've opened port 25 in iptables...what else should I be looking at?


Do Indian movies screened outside India, have intervals as well?

Do American movie theaters really have the intermission for Indian movies or do they skip it?   Like: Indian movie theater do have an intermission for . But do US theaters have an interval for the same movie as well?  My Question is different from this . I am not asking whether film industries outside India use intermissions. My question is about intermission taken for Indian movies by US theaters.


Check the differentiability of the given function.

Let $M_n(\mathbb{R})$ denote the space  of  all  $n\times n $ real   matrices  identified  with  Euclidean space $\mathbb{R^{n^2}}$. Fixed   a column vector   $x \neq 0$ in $\mathbb{ R^n}$. Define  $f :  M_n(\mathbb{R})  \rightarrow \mathbb{R}$ by $f(A) = \langle A^2x,x  \rangle$. Check whether given function is differntiable or not?   When I took $    A=   \left[ {\begin{array}{cc}    x_1 & x_2 \\    x_3 & x_4\\   \end{array} } \right]  $ and $x=\left[ {\begin{array}{cc}    a \\    b\\   \end{array} } \right]$. I got $f(A)$ as a polynomial of four variables. I know that the polynomial function is always differentiable. How do I prove it for $n\times n$ matrix case?Without expanding the inner product How do I prove the given function is differentiable?


Code snippets are not latin characters-using babel for greek

I am having an issue with code snippets. I am using babel as I am writing in Greek and when I want to use latin characters I type  \textlatin{} . Now I need to insert code in my document and latex prints the code with Greek characters. The problem is not solved using the above command outside of the;       \begin{lstlisting}             $ sudo apt-get install qemu-kvm     \end{lstlisting} which I want to print.  What I get is this:   I am using Miktex and TeXstudio on Win7. My preamble is this    \documentclass[12pt]{article} \usepackage{mathptmx} \usepackage{fullpage} \usepackage[titletoc,toc,page]{appendix} \usepackage{setspace} \usepackage{titlesec} \usepackage{blindtext} \usepackage{graphicx} \usepackage[english,greek]{babel} \usepackage[utf8]{inputenc} \usepackage[labelfont=bf]{caption} \usepackage{kerkis} \usepackage{url} \usepackage[titles]{tocloft} \usepackage[top=2.5cm, bottom=2.5cm, left=2.8cm, right=3cm]{geometry}  %-------------code snippets \usepackage{listings} %-------------hyperlinks \usepackage{hyperref} \hypersetup{     colorlinks=true,     linkcolor=black,      filecolor=blue,      urlcolor=blue,      citecolor=black} \urlstyle{same}  %------graphics------- \usepackage{float} \usepackage{wrapfig} \usepackage[export]{adjustbox}  \usepackage{enumerate,enumitem} \usepackage[autostyle=true,italian=guillemets]{csquotes} \MakeOuterQuote{"} \usepackage[style=numeric,sorting=none,url=false,isbn=false,doi=false,backend=bibtex,bibencoding=auto,autolang=other]{biblatex} \addbibresource{scholar} \renewcommand\cftsecfont{\normalfont} \renewcommand\cftsecpagefont{\normalfont}  \titlespacing*{\subsection} {0pt}{2.5ex plus 1ex minus .2ex}{0.3ex plus .2ex} \titlespacing*{\subsubsection} {0pt}{2.5ex plus 1ex minus .2ex}{0.3ex plus .2ex} \pagenumbering{gobble} \begin{document} ..... \end{document}   How can I solve this so code appears normally in latin characters? Thank you in advance.


How do I make the terminal always open in the same place?

When I open a terminal, it appears at a seemingly random spot on my desktop. I then move it to where I want it.  How can I either make the terminal appear at the place I last left it, or make it always open at a specific place?   More generally, can this be applied to all applications?


Can a Kazakh national transit in Dubai without a visa?

I am a Kazakh passport holder.   I'm travelling from Delhi via SpiceJet to Dubai, landing at Terminal 1 in the early morning. On the same day in the late evening I have a flight to Astana via flydubai from Terminal 2. I do not have a Dubai visa.  Can I transit from Terminal 1 to Terminal 2 without a visa?   I am asking because of many variations to this question. Some say a visa is necessary, others write its an internal transfer by bus not requiring visa. So, I am confused.


How to prove this with induction $1 + m + m^2 + m^3 +\dots+ m^{n−1} = \frac{m^{n }− 1}{ m − 1}$ , where $|m| \lt 1$

I am very confuse where to start and how to do it, I am very new to this kind of problems, would someone be able to guide me ?


I've had a memory leak issue with Windows 10 for about a year now, but I really want to fix this now as it is having a sizable impact on my work.  As you can see from the picture below, I have 8GB of RAM. 92% of it is in use, even though the applications don't exceed 1GB.  I upgraded from Windows 7 Pro 64-bit to Windows 10 last year.  Ask for more details, I don't know what else to provide. I'm at a loss as to what could be causing this.