Darth Vader is very well known for his force-choke. It's probably the most specific use of the force that I can remember seeing, in that otherwise you usually see force users pushing or pulling entire people or objects, rather than just part of them.  Why don't the Jedi, or even the Sith, also go for physical force techniques on other parts of the body to incapacitate targets either more quickly, or without killing them?  For instance, a Sith with no qualms about it could squeeze a Jedi's heart and he's dead without having to resort to light-saber fighting. Or force strike their nose up towards the brain. Or probably a lot of other easier and deadlier attacks that simply pull an important vein, causing very quick bleed-out.  A Jedi could do the equivalent of a hard strike to the spine, separating the spine and causing paralysis, but not death. He could disarm his opponents and restrain them.  Why don't force users engage in more varied force attacks, both against other force users and against individuals not fluent in the force?

I understand that the Jedi use the Force for self defence, but still, couldn't they just use the Force to snap their foes' necks and be done with it? Like when Jaina Solo was hunting down Darth Caedus. Or even when Caedus was duelling Grand Master Skywalker. If he just used the Force to snap Skywalker's neck (like he did to poor Lieutenant Tebut), it will all be over very fast.  Is there a canon reason why Jedi and Sith don't use their powers to directly harm their opponents?


We've got a range of laptops in our office all macbook pros some of which are 13" and some of which are 15".  The 15" laptops came with 85w chargers, and the 13" came with 60w chargers.   I want to buy some additiaonl chargers to leave plugged in around the office for anyone to use, but im unsure as to which type i should get.    Would charging a 13" laptop on a 85w power supply damage it ?  Would charging a 13" laptop on a 60w power supply damage it, or just make it slow at charging ?

I have a 13" Macbook Pro that came with a 60W power adapter and a 15" Macbook Pro that came with a 85W power adapter. There seems to be disagreement . Can I use either adapter with any portable Mac?


I have the following table. It contains multi-column headings.   I want the multi-column headings to be equally distributed in the available space. There is asymmetry now. The first two headings are too close and there is a space then the third one.   How can I adjust them to make equal width of the columns?  \documentclass{article}  \newcommand*{\zerobox}[2][l]{% \raisebox{0pt}[0pt][0pt]{\makebox[0pt][#1]{#2}} } \newcommand*{\anglelabel}[1]{% \multicolumn{1}{c}{\rotatebox{45}{\zerobox{#1}}}% } \newcommand*{\rotLabel}[1]{% \anglelabel{\zerobox{#1}} }  \usepackage{tikz} \usepackage{mathtools} \newcommand{\filledcirc}{${\color{black}\bullet}\mathllap{\circ}$} \newcommand{\normalcirc}{${\color{white}\bullet}\mathllap{\circ}$} \begin{document}   \begin{tabular}{ccc}  \rotLabel{Xxxxxxx} & \rotLabel{Ccccccccccccc} & \rotLabel{Rrrrrrrr Rrrrr}   \\ \hline \multicolumn{3}{|c|}{\textit{Ddddddddd Dddd}}\\ \hline \end{tabular}  \end{document}

I'd like to create a chart where the column titles are rotated, as per this toy example:    I used the rotating package to generate the above. It has certain shortcomings: the rotate command doesn't leave space for the titles, so I have to manually space things to prevent overlaps. The turn command, by contrast, creates too much space, where each column is the width of the entire rotated column title.  There is also no easy way to have long titles be split into multiple lines.  Is there a package for creating tables of this sort, or at least one that would relieve some of the manual placing and spacing that goes into creating such a table?    This question is more to make sure I don't miss any easy way of doing what I want than seeking help on manually doing it, but the code for above is included anyways:  \begin{tabular}{r|ccc} & \begin{rotate}{60} Property 1 \end{rotate} & \begin{rotate}{60} Property 2 \end{rotate} & \begin{rotate}{60} Property 3 \end{rotate} \\ \hline System 1        &       &       &  X    \\  System 2        & X     & X     &  X    \\ System 3        & X &   &  X    \\ \hline \end{tabular}


So the updater told me my /boot partition is out of space.  I came here from , which recommended (if you can't expand it directly) to just move the contents of the boot partition to the primary partition and installing grub on it.  This was for 10.10, and it sounds rather risky to me. So is that still safe to do on 14.04 LTS?  This is not the same as , whose hard drive is about to die. The answer does not mention moving contents of /boot.

I have two drives on my computer that have the following configuration:  Drive 1: 160GB, /home Drive 2: 40GB, /boot and /   Unfortunately, drive 2 seems to be dying, because trying to write to it is giving me errors, and checking out the SMART settings shows a sad state of affairs.  I have plenty of space on Drive 1, so what I'd like to do is move the / and /boot partitions to it, remove Drive 2 from the system, replace Drive 2 with a new drive, then reverse the process.  I imagine I need to do some updating to grub, and I need to move some things around, but I'm pretty baffled how to exactly go about this. Since this is my main computer, I want to be careful not to mess things up so I can't boot.


I have two identical strings, one in an array and one in a String variable. When I compare these IDENTICAL strings I get false every time. I have debugged and debugged, but I get the same result every time. Here is the code in question  String temp = ""+(num1*num2); Boolean equal = temp == answers[i];  if(equal) {     correct[i] = true;     num_correct ++; }else{     correct[i] = false; }   Again, I have debugged every minor detail of this program and I am 101% sure that the strings are IDENTICAL. Why is Java returning false on comparison?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Moderators: THIS IS NOT A DUPLICATE!!!! Please remove the duplicate mark.  The answers linked to do not, actually, answer my question, the way the accepted answer does. Google only points at the other answers, which are not actually answer to this particular question.  When following a symbolic link to a directory, the bash shell kind-of tries to make the illusion that the symbolic link is a real directory. However, there are many cases where this breaks down. For example, consider that I might have:  /usr/local/src/project-a-1.0/ /usr/local/src/project-b-2.2/   then, I have a symlink in my home directory:  ln -s /usr/local/src/project-a-1.0 ~/project   Now, I want to short-cut to work with project-a:  cd ~/project   So far, so good -- but bash pretend that I'm actually in ~/project, not in the actual working directory. It even pretend when using the pwd built-in, but of course not when using the /bin/pwd executable.  Now, if I want to check out a file in project-b, I might want to try vim ../project-b<TAB> to try to make command completion work. However, bash refuses to complete this, because it thinks that .. is the directory containing user homes.  However, if I type in vim ../project-b-2.2/somefile.txt then that works fine, which is what I expected.  Symlinks are not directories, and all kinds of inconveniences and even errors happen because of this mis-feature in bash. I've tried to search for an option to turn this off, but all the google and superuser hits are just about "how to I manually resolve a link path" -- that's not what I want here; I want bash to stop trying to emulate a file system on top of my file system, poorly. Surely, there exists some option that will put correctness in front of illusion?  The "similar questions" popup pointed at two other questions that Google already sent me to; both of them require me to pass the "-P" option to pwd or cd or even recommend using readlink to figure out the symbolic link target. That's not at all what I'm interested in. I want the built-in pwd and the shell prompt $PWD to match the physical output of the getcwd() system call; those questions don't talk about that at all.

I'm currently in a symbolic link directory and I want to go up one level in the absolute path, but I cant as it will hit me back up to my home directory (~). I can do pwd -P to get the absolute path, but how do I pipe that result into the cd command? I always thought it was this: {}   Sample:  10:21:55 {master *} ~/ch$ pwd -P  /home/drupal/sites/all/themes/house  10:22:16 {master *} ~/ch$ pwd -P | cd {} bash: cd: {}: No such file or directory  10:22:20 {master *} ~/ch$


Let $f:(a,b)\to\mathbb{R}$ and assume that there is $C>0$ and $\alpha>1$ such that $|f(x)-f(y)|\leqslant C|x-y|^{\alpha},\forall x,y\in(a,b)$ Prove that $f$ is constant in $(a,b)$. Prove that $\underset{x\to y}{\lim}\frac{f(x)-f(y)}{x-y}=0$ Ie $(\forall\epsilon>0)(\exists\delta>0):|x-y|<\delta\implies|\frac{f(x)-f(y)}{x-y}|<\epsilon$ Suppose that $|x-y|<1$. Then by the stated inequality, $\frac{|f(x)-f(y)|}{|x-y|}\leqslant\frac{|f(x)-f(y)|}{|x-y|^{\alpha}}\leqslant C\iff\frac{|f(x)-f(y)|}{|x-y|}\leqslant C$. I need to show that this is smaller than $\epsilon$ but I'm not too sure where to go from here.

I want to show that if a function $f:[a,b]\rightarrow \mathbb R$ satisfies a Hölder condition of order $\alpha > 1 $ then it is constant.  The way I think of it is as follows:  $$|f(x) - f(y)| < K|x-y|^\alpha$$  $$\frac{|f(x) - f(y)|} {|x-y]}  < K|x-y|^{\alpha -1}$$  $$\lim_{y\rightarrow x} \frac{|f(x) - f(y)|} {|x-y]} \le \lim_{y\rightarrow x}  K|x-y|^{\alpha -1} =0 $$ As the limit is $0$, we can remove the modulus, so we get:  $$\lim_{y\rightarrow x} \frac{f(x) - f(y)} {x-y} = 0$$ So $f$ is derivable and $f'(x) = 0$ for all $x$ in $[a,b]$. Note that the reason we can add the limit $y\rightarrow x$ is because $[a,b]$ is closed in $\mathbb R$.  However, the question gives as a hint using the mean value theorem. I am not sure why one should do that. You would first have to prove that $f$ is derivable in a similar manner to what I did, and then prove that $f$ is constant. Or is there a simpler way to do it and I am missing it?  Also please inform me of any mistakes I did in the proof (if any)/ Thank you!


I have a new website that offers a collection of free sheet music. It currently has 300 pages of individual pieces of music. I am having difficulty getting the index page to rank competitively in google search results. I wonder if anyone can see something I am obviously missing? Here is the link to the index page:

What are the best ways to improve a site's position in the Google search results?


To search a file in a directory, I found two commands as below:   ls -ltr initialfilename*  find ./ -name initialfilename*   Sometime, first command gives me the search result but sometime I used to execute second command. What is the difference between these two set of Linux command? Please specify your answer around the major difference only.

What is the difference between find . and /home/user/* as an input to for command.? For example:  for var in $(find .) do echo "$var" done   or  for var in /home/user/* do echo "$var" done   In the first case for command breaks up the file with names containing spaces. While in the second case it does not. Why?


I am planning on using the MODIS burned area products which were produced by Maryland University. These come as either polygons or rasters. In the user guide it says  A shapefile version of the MCD45 product is derived from the monthly Geotiff version by the University of Maryland. The shapefiles are available with the same projection (Plate-Carrée) and geographic extent as the Geotiff sub-continental windows  I used the following code in R to convert the projection from sphere-based datum to WGS 1984 UTM ZONE 38N (into the same projection as the rest of my data, including the dem data).  Is the code below correct for converting these projections?  library(raster) projection(fire) <- projection(dem)   How would I do this for polygon data?

i have to turn it into a  UTM in order to make the buffer functional.  wets<-readOGR(dsn=".",layer="shapefile") r.raster <- raster() extent(r.raster) <- extent(wets) res(r.raster) <- 100   wets.r <- rasterize(wet,r.raster) plot(wets.r) wetsbuf<-buffer(wets.r,width=500)   During the buffer creation which is the last line of code, it gives this warning:  Warning message:   In couldBeLonLat(x) :   raster has a longitude/latitude CRS, but coordinates do not match that   here's the info    summary(wets.r)           layer  Min.        1  1st Qu.     1  Median      2  3rd Qu.     9  Max.       11  NA's    52629  summary(wets)    Object of class SpatialPolygonsDataFrame Coordinates:       min       max  x  683705  714088.8  y 4326266 4343768.0  Is projected: TRUE   proj4string :  [+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +datum=GGRS87  +units=m +no_defs +ellps=GRS80 +towgs84=-199.87,74.79,246.62]  Data attributes:    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.      0.0     2.5     5.0     5.0     7.5    10.0         wets.r  class       : RasterLayer  dimensions  : 175, 304, 53200  (nrow, ncol, ncell) resolution  : 100, 100  (x, y) extent      : 683705, 714105, 4326268, 4343768  (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0  data source : in memory names       : layer  values      : 1, 11  (min, max) attributes  :    ID FID  from:  1   0  to  : 11  10   I have to change the prjection in order to be possible to do the buffer.


This is the first year I've done the whole "winter bash" thing, and I was interested; how did this tradition start? Mainly, who (and why, and how) invented the idea of hats on avatars (on SE and subdomains)?? It seems like a cool idea, but it seems like the weirdest thing ever. Any clarification is appreciated!

Winter Bash is always a lot of fun and makes people trek across sites and participate in communities they are not usually a part of, but how did they originate? What was the thought process behind introducing this tradition?


I want to listen to streaming audio from Ubuntu using headset (). Although Bluetooth connection is established, I haven't been able to hear anything via the headset. How can I work this around in general (I know this might sound brutal but I don't have much knowledge in audio setting on linux) ?  When I use my other Bluetooth headset BlueAnt Q2 () streaming is going. In "Hardware" tab on sound setting panel (not sure how it's officially called but see the image below) shows my headset.    However, Bose one never appears on the same window while it's connected via Bluetooth, except for a few seconds after I manually disconnect the headset (this moment is snapshotted as the image below. When it's connected the Bose BT2 thing is never shown. Btw, with Android phone this headset works just fine).     indicates that   Make sure the device supports A2DP audio streaming.   So I tried to figure out if A2DP is enabled on my Ubuntu (referring to ), finding that it's probably available as the result below shows:  $ sdptool search --bdaddr local a2snk Searching for a2snk on FF:FF:FF:00:00:00 ... Service Name: Audio Sink Service RecHandle: 0x10005 Service Class ID List:   "Audio Sink" (0x110b) Protocol Descriptor List:   "L2CAP" (0x0100)     PSM: 25   "AVDTP" (0x0019)     uint16: 0x102 Profile Descriptor List:   "Advanced Audio" (0x110d)     Version: 0x0102

I have a  bluetooth stereo headset (using A2DP) I'd like to use on my Lubuntu machine. The headset works fine with my phone.  Please note that unlike all other Ubuntu flavours, Lubuntu does not come with Pulseaudio.  It is detected by Lubuntu's Blueman Bluetooth configuration application and I can establish a connection successfully. It also appears to actually communicate as it shows data being sent back and forth. However, Sound keeps coming out of the loudspeakers only, while the headset remains silent. I would have expected the sound to come from my headset at this point.  Where do I start troubleshooting here?


I know it's possible to tether iphones to use their internet connection on the computer, but can it be used the other way? I want to use the computer's network connection on my Ipod Touch through the usb cable. Is it possible? Thank you!

If I have no wireless connection, can I connect to the internet using the usb on the computer, or some other way?


I extracted a jar file and opened the source code in intelliJ. The directories are filled with .class files. The problem is that there is no run button. How can I run the project in intelliJ? I tried going straight to the directory with the class file containing the main method and running it from the command line but I get a main class not found error.

What program can I use to decompile a class file? Will I actually get Java code, or is it just JVM assembly code?  On Java performance questions on this site I often see responses from people who have "decompiled" the Java class file to see how the compiler optimizes certain things.


Greeting to all in this room,  Please help with this statement.  "Replace John with Andrew" which one becomes trashed among John and Andrew?

I often see "replace with" and "replace by" used interchangeably, but this doesn't sound right to me:     I replaced that component by this one.   I would use "with" in such a sentence. "By" only seems reasonable in passive, although "with" sounds like it would there work too:     That component was replaced by this one.   That component was replaced with this one.   In my native language, the equivalent of "replace by" can only be used in passive, and even then it's a bit weird unless a person is the object replacing something – perhaps this affects my judgment?  Web searches haven't come up with anything conclusive; the results are contradictory and speculative at best.  Are "replace with" and "replace by" interchangeable in active context? What about passive? Are there stylistic reasons to prefer one over the other?


I've taken multiple gps waypoints and I'm hoping to put them into some sort of GIS program (atm I have GQIS as that was recommended to me) to look at them in map form, but how do I get them there?   I am using GDA94 points and a Garmin GPSMAP 64s.  I have no clue what I'm doing.

I want to read GPX track points with their time stamps into QGIS. I try GPS Tools, GPX Conversions, Waypoints from a track.  This fails on my PC at office (QGIS code revision d94c044). Sometimes QGIS stalls with high CPU usage, but most times I get an error "The layer C:/Daten/CurrT.gpx?type=waypoint is not a valid layer and can not be added to the map".  It works on my Laptop at home (QGIS code revision ebebdf3), but the created features don't contain timestamps. Fields are name, elevation, comment, description, source, url, url name.  How should I proceed?  BTW both versions of QGIS insist "You are running the current version of QGIS" and don't offer updates. Is it reasonable to re-install the (apparently) same version of QGIS from time to time?


How to mark question as answered (solved) if my question does not have any answer? I know that I can answer my question and then accept it. But I am interesting if there is any other way to mark my question answered (solved)?

For the second time (IIRC) since I have joined SO, I have found the answer on my own, immediately (within minutes) after posting the question. I answered my own question the first time, but seeing that there are some "scandals" where people ask and answer, just to get reputation, I am not so sure anymore. Sure I can select my own answer after 2 days, but I am confused.


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


Often you'll see someone write a "" online.  I'd really like to have a word on hand that has the meaning "A word you don't know so you have to look it up", or something to that effect.  So when someone else reads it and googles it, they hopefully have a little smack of self-awareness.  Example uses would be some sort of parody of their writing, or something like "Must you use a [...] just to sound smart?"

To illustrate the question, badroit used the word "meretricious" meretriciously.   Is there an English word that describes highfalutin words like "meretricious" that are (gratuitously) used in place of better-understood words like "garish"?  The word may or may not be self-describing.


I have a JavaScript array like below:  [     {type: 'text', name: 'title', id: 'title', placeholder: 'Type here'},     {type: 'textarea', name: 'description', id: 'description', placeholder: 'Type here'} ]   Now I want to inset {type: 'text', name: 'age', id: 'age', placeholder: 'Type here'} after first object. So my final result set will be looks like:  [     {type: 'text', name: 'title', id: 'title', placeholder: 'Type here'},     {type: 'text', name: 'age', id: 'age', placeholder: 'Type here'}     {type: 'textarea', name: 'description', id: 'description', placeholder: 'Type here'} ]   I want in plain JavaScript or jQuery!

I am looking for a JavaScript array insert method, in the style of:  arr.insert(index, item)   Preferably in jQuery, but any JavaScript implementation will do at this point.


I´m having some trouble understanding this code. I know I need to create a method to compare non built-ins, but could someone please explain to me, in detail what the boolean equals() is actually doing?  public class Book {       private String title;      private Author author;      private int year;      public boolean equals(Object o) {          if (o == this) { return true; }          if (o == null) { return false;}          if (!o.getClass().equals(Book.class)) {return false; }          Book aBook = (Book) o;          return aBook.year == year && aBook.title.equals(title) && aBook.author.equals(author);      } }   It was given to me by a friend, if you have any suggestions for improvements please tell me.

What issues / pitfalls must be considered when overriding equals and hashCode?


What is the meaning of the below command? I am new in shell scripting. set -e -o pipefail

The main way I know to debug scripts is adding -x to the shabang (#!/bin/bash -x).  I recently came across a new way, adding set -euxo pipefail right under the shabang, as in:  #!/bin/bash set -euxo pipefail   What is the main difference between the two ways of debugging? Are there times you would prefer one above the other?  As a freshman, , I couldn't extract such conclusion.


If $a$ ($a\ne 1$) has order $t\mod p$, show that $a^{t-1}+a^{t-2}+\cdots+1\equiv 0\pmod{p}$. Since $a$ has order $t$ we have that $a^t\equiv1\pmod{p}$ or $a^t-1 \equiv 0\pmod{p}$. We also know that $a^t-1=(a-1)(a^{t-1}+a^{t-2}+\cdots+1)$. So $0=a^t-1=(a-1)(a^{t-1}+a^{t-2}+\cdots+1)\pmod{p}$. How do I get rid of the $(a-1)$ term on the left ? Can I simply say that since $(a-1)\ne0$ and divide both sides by it and get the desired result ? Any solutions/hints are greatly appreciated.

I suppose $(a,m)=(a-1,m)=1$, show that $$1+a+a^2+\ldots+a^{\phi(m)-1}\equiv0\pmod m$$   I tried $$1+a+a^2+a^{\phi(m)-1}=\frac{a^{\phi(m)}-1}{a-1}$$  I believe that this equality that put up help, is it?


I am very new to mac. I want to upgrade to the latest version of mac but there is not enough space in my mac. After some digging, I found there is a folder called private that is taking more than 38GB of storage. I have given the screenshot below. But some forums on the internet say, I should not delete the private/var/folders. I am not sure what to do. I have no important data to lose. Now should i delete this folder? If yes what is the correct way to delete these huge files?

I have this folder /private/var/folders/bf/ with 3GB of what seems temporary files. Can I delete this folder?


Is there a verb describing the way paint mingles with water and forms those amazing shapes, almost smoke-like.

The German word for these patterns is "Schliere, pl. Schlieren", and apparently this word has entered the English language as a loanword (cf. article  in Wikipedia or entry  in OED). But the German loanword is probably not something most native speakers of English understand without the help of a dictionary, so what would you call, or how would you describe, the following patterns?  Concrete:    Air:    Oil on water:    Coffee and milk:    Paint:    Smoke:    Rock:    Marbled paper:    And so on.    "Waves" is not applicable, because waves are vertical undulations of the surface, while these are a pattern on, or inside, the surface level, with no amplitude.  "Striæ" does not really fit either, because those refer more to the parallel layers, than to the curly forms.


We are using an application with about 300 concurrent users. Now everything is virtualized: 1 VM as a load balancer, 2 VMs as web-server, (on this ESXi host there are additional +25 other VMs) and 1 server (bare metal) as SQL Server. We have some issues with the performance and decided to buy physical hardware to boost it up.  I'm not sure, how we can get better performance?:   we buy 1 rack Server hardware and run ESXi with just all 3 VMs above, we buy 1-1 rack Server hardware for the web servers and install the Windows server just with the application. (and leave the load balancer as before - VM) we buy 3 rack servers for the load balancer and for the 2 web servers.   Users are connected with web interface / desktop app to the server.   Thank you for your help, drewo

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I am using Ubuntu 20.04.1. The output of apt-cache policy gcc: gcc:   Installed: (none)   Candidate: 4:9.2.1-3.1ubuntu1   Version table:      4:9.2.1-3.1ubuntu1 500         500 http://repos.del.extreme-ix.org/ubuntu focal/main amd64 Packages  I have installed Codeblocks just before this and now it shows this message: The following packages have unmet dependencies:  gcc : Depends: cpp (= 4:9.2.1-3.1ubuntu1) but 4:9.3.0-1ubuntu2 is to be installed        Depends: gcc-9 (>= 9.2.1-1~) but it is not going to be installed        Recommends: libc6-dev but it is not going to be installed or                    libc-dev E: Unable to correct problems, you have held broken packages.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Let $G$ be a group and suppose $G/Z(G)$ is cyclic. Prove that G is abelian. where $Z(G)$ is the center of the group. That is,   $$ G(Z) = \{a \in G \ | \ \forall x \in G: ax = xa\} $$  Any ideas?  So far what I have. Consider two arbitrary elements $a,b \in G$, and consider their left cosets $aG(Z)$ and $bG(Z)$. Suppose that $G/Z(G)$ is generated by $yZ(G)$, then $aG(Z) = (yZ(G))^n = y^nZ(G)$ for some $n$ and $bG(Z) = (yZ(G))^m = y^mZ(G)$ for some $m$. Hence $abZ(G) = aZ(G) \cdot bZ(G) = y^nZ(G) \cdot y^m Z(G) = y^ny^mZ(G) = y^{n+m}Z(G) = y^{m+n}Z(G) = y^my^nZ(G) = y^mZ(G) \cdot y^n Z(G) = bZ(G) \cdot aZ(G) = baZ(G)$.  So $abG(Z) = baG(Z)$.  Now consider $e = b^{-1}b$. Clearly $e \in Z(G)$. So we have  $ab = ab(b^{-1}b) = bax$ for some $x \in Z(G)$.   But how to proceed from here? And this the idea so far correct?

Continuing my work through Dummit & Foote's "Abstract Algebra", 3.1.36 asks the following (which is exactly the same as exercise 5 in ):     Prove that if $G/Z(G)$ is cyclic, then $G$ is abelian. [If $G/Z(G)$ is cyclic with generator $xZ(G)$, show that every element of $G$ can be written in the form $x^az$ for some $a \in \mathbb{Z}$ and some element $z \in Z(G)$]      The hint is actually the hardest part for me, as the quotient groups are somewhat abstract. But once I have the hint, I can write:  $g, h \in G$ implies that $g = x^{a_1}z_1$ and $h = x^{a_2}z_2$, so \begin{align*}gh &= (x^{a_1}z_1)(x^{a_2}z_2)\\\  &= x^{a_1}x^{a_2}z_1z_2\\\ & = x^{a_1 + a_2}z_2z_1\\\ &= \ldots = (x^{a_2}z_2)(x^{a_1}z_1) = hg. \end{align*} Therefore, $G$ is abelian.  1) Is this right so far?  2) How can I prove the "hint"?


I wonder which verb form, singular or plural, is grammatically correct in the following sentence: "Education and welfare is/are a matter of concern to us."

Bread and butter (is or are) my breakfast?  And what's the difference between the above sentence and saying "My breakfast is bread and butter"?  Thanks.


There are a number of spells with a range of "Self", and a number of spells with a range of "Self (XYZ)" where XYZ is some modifier. Is the range of Self consistent between these two? Are the targeting rules different in each case? What is the difference between these two ranges?

New to D&D, and thought about creating a Beast Master. I was wondering if spells with a range of "Self" would count you as the "target" of the spell. There's some debate in my group, as unlike something such as Cure Wounds, which specifies "A creature you touch," there's technically no mention of a target in a Self range spell within the description. A fair amount of people in my playgroup come from a TCG background, where the presence (or lack thereof) of keywords like "target" are essential for determining interaction.  tl;dr Would Paladin Smites or Thunderwave count as "targeting" yourself, and therefore be affected by Beast Master's Share Spell?


I need a plugin or script that helps me find broken embedded YouTube videos on my website.  Which is the correct section on Stack Exchange to ask this?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


When flagging a comment on an answer scored -3 or lower (so it's grayed out), if you move your mouse off of the answer/flag dialog the flag dialog grays out as well and hides under things.    In this example on Puzzling.SE, the bottom of the flag dialog snuck under the spoiler on the answer below. It's a little more drastic when the answer is at the bottom, though, such as in this example on Scifi.SE:    In this case, the flag dialog hides under the place where you write your own answer.  I assume this is not intended behavior.

The flag window on (a comment to) the last question is hidden beneath the answer box, as shown in the following screenshot:    Linked: , which is currently  - this is not fixed for flags on comments!


I am using this script to show all images in a directory and to display image size, etc. I've been trying different ways (and yes, I also used Google) to sort them by date but none worked for me.  <?php     $dir = 'uploads/';     $files = glob("$dir*.*");     for($i=count($files)-1; $i >= 0; $i--):         $image = $files[$i];         $size = getimagesize($image);         $image_height = $size[0];         $file_size_byte = filesize($image);         $file_size_kilobyte = ($file_size_byte/1024);         $file_size_kilobyte_rounded = round($file_size_kilobyte,1);      ?>          <div class="fileDiv" onclick="showImage('<?php echo $image; ?>','<?php echo $image_height; ?>');">
<img class="fileImg lazy" data-original="<?php echo $image; ?>">

<?php echo $image; ?>

<?php echo date ("F d Y H:i", filemtime($image)); ?>

<?php echo $file_size_kilobyte_rounded; ?> KB

      <?php endfor;   ?>   How do I have to modify this script to sort the files by date and the last modified image to be displayed on top? Could someone please help me how to do this? Thanks so much!

I'm trying to display an array of files in order of date (last modified).  I have done this buy looping through the array and sorting it into another array, but is there an easier (more efficient) way to do this?


package com.example.teopeishen.test2;  import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText;  public class First extends AppCompatActivity {      public Button but;     public void change(){         but = (Button) findViewById(R.id.buttonGenerate);         View.OnClickListener click = new View.OnClickListener(){           @Override             public void onClick (View v){               Intent calc = new Intent (First.this,Second.class);               startActivity(calc);                Bundle bundle = new Bundle();               bundle.putString("testName",testName.getText().toString());               bundle.putDouble("writeMark3",writeMark3);               bundle.putDouble("speakMark3",speakMark3);               bundle.putDouble("listenMark3",listenMark3);               bundle.putDouble("finalMark3",finalMark3);                Intent intent = new Intent(First.this,Second.class);               intent.putExtras(bundle);               startActivity(intent);           }         };         but.setOnClickListener(click);     }       private EditText testName;     private EditText writeMark;     private EditText speakMark;     private EditText listenMark;      private Double writeMark2;     private Double speakMark2;     private Double listenMark2;      private Double writeMark3;     private Double speakMark3;     private Double listenMark3;     private Double finalMark3;       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_first);         testName = (EditText) findViewById(R.id.editTextName);         writeMark = (EditText) findViewById(R.id.editTextWrite);         speakMark = (EditText) findViewById(R.id.editTextSpeak);         listenMark = (EditText) findViewById(R.id.editTextListen);            try {             writeMark2 = Double.valueOf(writeMark.getText().toString());             speakMark2 = Double.valueOf(speakMark.getText().toString());             listenMark2 = Double.valueOf(listenMark.getText().toString());              writeMark3 = writeMark2 / 100 * 50;             speakMark3 = speakMark2 / 100 * 30;             listenMark3 = listenMark2 / 100 * 20;             finalMark3 = writeMark3 + speakMark3 + listenMark3;             } catch (Exception e) {             finalMark3 = 0.0;          }         change();      } }   I try to addextra bundle and but get and error of      java.lang.NullPointerException: Attempt to invoke virtual method   'double java.lang.Double.doubleValue()' on a null object reference                                                                                at com.example.teopeishen.test2.First$1.onClick(First.java:23). What   it means? Anyone know about it. It say the problem is within line 23   which is bundle.putDouble("writeMark3",writeMark3);

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


I have to prove or disprove that $$    \left\{x \in \Bbb R^n : \sum_{i=1}^n x_i^2 = 1\right\}\text{ is convex.} $$ I already know that it is not convex, so a disprove is the right way.  I know that I gotta use the following for a prove: $$ \text{A set }\Omega\subset\Bbb R^n\text{ is convex if }\alpha x+(1−\alpha)y\in\Omega,\forall x,y\in\Omega\text{ and }\forall\alpha\in[0,1]. $$ For a disprove I could take two points and show that the above condition is not met. But what confuses me is that the statement also depends on the value of $n$. If I choose e.g. the two points $\sqrt{\frac{7}{10}}$ and $\sqrt{\frac{3}{10}}$, how do I could use them to disprove it?

I have to prove or disprove that    {x ∈ $\mathbb{R}^n$: $\sum_{i=1}^n x_i^2 = 1$} is convex.  I don't even understand what kind of set this is, i.e. which values of $x$ are in this set.  I know that I gotta use the following for a prove:  A set $\Omega \subset \mathbb{R}^n$ is convex if $ \alpha x+(1−\alpha)y \in\Omega,∀x,y \in\Omega$ and $∀ \alpha ∈[0,1]$.  But maybe a disprove would be easier?


I have built a binomial regression model using the equation: logit_1 <- glm(past_adl_binary~., family = binomial(link = "cloglog"),                 data = newdata)  The AIC value for this model is approximately 15000.  This is the lowest AIC that I have found for all of the models that I have run, but I am worried that it is too large! Does anyone know if this is a problem? The outcome of the model is as follows:  Can anyone help me interpret the outcome of this model?  I understand that all of the coefficients are significant apart from sunangle.  Can I interpret the outcome in the same way that you would interpret a logistic regression, even though I have used a cloglog link function? Apologies if this is a simple question, I am new to statistics! Thanks.

I have built a binomial regression model using the equation: logit_1 <- glm(past_adl_binary~., family = binomial(link = "cloglog"),                 data = newdata)  The outcome of the model is as follows:  Can anyone help me interpret the outcome of this model? I understand that all of the coefficients are significant apart from sunangle. Can I use this equation (100*exp(parameter estimate)-1) to calculate the increase/ decrease in percent probability of my y-variable (1 or 0) changing based on my predictor variables?  For example, for habitat_categoryONDEEP: 100*(exp(-0.173)-1) = -15.886.  Would this suggest that a habitat category of ONDEEP decreases the probability of my y-variable being 1 by 15.9%, compared to the reference category?


I have this persistent and annoying issue. When I first boot up, my desktop can't resolve any DNS names unless I edit the /etc/resolv.conf file and remove the entry for name-server 127.0.0.1 and change it to 8.8.8.8  This is only a temporary fix because this file is reset after each reboot.  I googled this for hours and tried multiple solutions but can't find a solution. I think there also might be a bug associated with this issue? Not sure though.  Can someone help?

I have some issue with my dns configuration, so I googled and picked up a solution by 1) editing /run/resolvconf/interface/NetworkManager and 2)  running sudo resolvconf -u.   This helped a little bit, but the change of dns is not permanent, because I noticed that the dns I added to /run/resolvconf/interface/NetworkManager always get lost in it after a reboot, and my dns would be reversed as before, which is simply 127.0.0.1, the original one.   So why the content of /run/resolvconf/interface/NetworkManager is changed? Or what's the mechanism behind its change?


I have read the , and know that the unbiased weighted sample covariance matrix for the row vector $\mathbf{x}_i$ is $$\Sigma=\frac{1}{\sum_{i=1}^{N}w_i - 1}\sum_{i=1}^N w_i \left(\mathbf{x}_i - \mu^*\right)^T\left(\mathbf{x}_i - \mu^*\right),$$ in which $\mu^*$ is the weighted sample mean. I would like to figure out how to derive this, but I did not find the derivation from .  The above equation applies when the weight is constant across variables. I also want to know how to calculate the weighted covariance of variables X and Y when they have different weights. For instance, the weight of X is w and that of Y is 1. Can someone help me? Thanks!  I have read , but I don't think the answer is correct. In that answer, $$\frac{\sum_{i=1}^k  \sum_{j=1}^l (x_i-\bar{x}) (y_j-\bar{y}) a_i b_j} {\sum_{i=1}^k\sum_{j=1}^l a_i b_j}$$ (where $\bar{x}$ and $\bar{y}$ are respectively the weighted means of $x$ and $y$) is namely $$\frac{\sum_{i=1}^k  (x_i-\bar{x})a_i\sum_{j=1}^l  (y_j-\bar{y}) b_j} {\sum_{i=1}^ka_i\sum_{j=1}^l b_j},$$ in which $\sum_{i=1}^k  (x_i-\bar{x})a_i=\sum_{j=1}^l  (y_j-\bar{y}) b_j=0$, and thus the covariance calculated through this equation is 0. Also, they did not discuss how to derive the covariance matrix.

I have two variables X and Y with weights a and b respectively.  Pl. see the link for sample data.    I know how to calculate weighted mean and weighted variance for the variables X and Y.  How to calculate weighted covariance values? What is the formula?  I have gone through the following website:    but my problem is I Have different weights for each observations under each variable.


i am developing a code in which a have to read the data form list box and upload an external file, press a button named Start and with this listbox i am getting an error as shown below.     An unhandled exception of type 'System.InvalidOperationException'   occurred in System.Windows.Forms.dll      Additional information: Cross-thread operation not valid: Control   'listBox1' accessed from a thread other than the thread it was created   on.   my code is as follows  private void Start_Click(object sender, EventArgs e) {  Thread ss = new Thread(Automode);    ss.Start();  }    private void Automode()     {         ....        for (int i = 0; i < listBox1.Items.Count; i++)         {             listBox1.SetSelected(i, true);              string pattern = "[gxyzbcmij][-+]?[0-9]*\\.?[0-9]*";             string text = listBox1.Text;             Regex gcode = new Regex(pattern, RegexOptions.IgnoreCase);             MatchCollection code = gcode.Matches(text);         }         .....         }   here at listbox.SetSelected command it is giving an exception as shown above. please suggest the alternate ways to write it.

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


Prove that: $$\sum\limits_{n=1}^\infty \dfrac{n^2}{2^n}=6.$$ I am trying to find the sum of this infinite series. Got stuck. Any help will be highly appreciated.

Show that for $k$ running over positive integers  $$ \sum_{k=1}^\infty \frac{k^2}{2^k}=6 .$$ We can use finite calculus.


I have a 6 V 4.5 Ah lead acid battery which I did not charge for the last 6 months. Now the battery voltage fell to 3 volts and then I charged it for 24 hours at 50 mA. Now when I measure the voltage it is shown as 6.37V which is the nominal voltage which then decreased to 6.1 volts in half an hour. Another thing is that it started gassing above a charging voltage of 6.7 volts.  My question is does these symptoms mean the battery is not recoverable? Or does it take a few more charge discharge cycles to attain normal capacity?

Are there any special requirements for charging lead-acid batteries?


I am new to python. I am making a bot to play Realm Grinder. Right now I am using PyAutoGui to control the mouse to click on certain options. I want my looping code to stop every hour and execute a different line of code. Then I need it to return to the main code and branch off again in half an hour.  I know I can't use sleep to do it and I have considered using a variable, but I don't know how to set up numeric variables yet. The python documentation I have found is very confusing.  Right now I have:  def realmGrinder():\      (code here) while True:      (code here)  realmGrinder

I want to repeatedly execute a function in Python every 60 seconds forever (just like an  in Objective C). This code will run as a daemon and is effectively like calling the python script every minute using a cron, but without requiring that to be set up by the user.  In , the solution appears to effectively just  for x seconds. I don't need such advanced functionality so perhaps something like this would work  while True:     # Code executed here     time.sleep(60)   Are there any foreseeable problems with this code?


I have a problem with PHP. I have a form with input named text. If I send a word with accenture letters like "coupè", the $_POST['text'] return me "coupÃƒÂ¨" also utf8_encode($text).  How is possible? The Db is utf-8 bin.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I've got Windows 10 previously, then simultaneously installed Ubuntu 16.04 with dual boot (Grub). I've been trying to get to my windows partition (100GB Linux-50GB) with no results, tried to ntfsfix, every one recommended this, but my Windows was hibernated which made things worse. Next I tried to reinstall Grub, which led to disappearing windows from boot options in Grub before that windows was able as option in boot menu, but wasn't launching. Afterwards I burned windows 10 on usb and booted it form bios. I tried every recovery option, with no results, so I was instructed to go to the cmd and use bootrec and do it manually. I used bootrec /FixMbr and now there is no boot menu, I can't get to any partition or OS. I can go only to BIOS and boot something from external drives. What do I do? Work calls, not much time. PS:I've got 2 big projects on Windows partition I can not afford to lose. Edit: I restored GRUB by rescatux, and now I am on my Ubuntu 16.04. I've typed "sudo mount /dev/sda1 /mnt" into terminal and this is what I got.  Failed to open ntfs attribute: Not such file or directory Failed to load $MFT: Not such file or directory Failed to mount '/dev/sda1': Not such file or directory

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I just found my SO question published under different user name on different site:    Is there chance to stop such content thieves? They do not have my allowance to publish SO question.

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I have hundreds of stored procedures in my SQL Server 2012 database.  From my c# code, I am calling one of the stored procedures which in turn calls another stored procedure and so on.  There is a failure in stored procedure execution. I need to debug it. For that I need to know what are the values which are sent as parameter when calling stored procedure inside another stored procedure .  I cannot alter the stored procedure, is there any way to Watch and StackTrace stored procedures?  Yes, I am using Visual Studio 2010

What are good methodologies for creating sprocs that reduce the pain of debugging? And what tools are out there for debugging stored procedures?  Perhaps most importantly, what are indications to look out for that errors are happening in a sproc and not in the code? I hope I'm not all over the board too terribly bad here. Votes for answers to any of the above. Thanks.  For what it's worth, I work in a .NET environment, SQL servers.


Having three containers, how can I make two containers floating while the third container should occupy the rest of the height, and the second one has the height of the contents?

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


Is there any justification for degree of freedom of diatomic molecules to be two? I believe that degree of freedom are the number of coordinates needed to specify the position of a molecule so how this value is same for diatomic as well as tri atomic linear gas molecules

I was reading about the equipartition theorem and I got the following quotations from my books:  A diatomic molecule like oxygen can rotate about two different axes. But rotation about the axis down the length of the molecule doesn't count. - Daniel V. Schröder's Thermal Physics. A diatomic molecule can rotate like a top only about axes perpendicular to the line connecting the atoms but not about that line itself. - Resnick, Halliday, Walker s' Fundamentals of Physics.  Why is it so? Doesn't the rotation take place that way?


If you are reading this, you are probably twitching already, but I think it qualifies as a fair question because there is a lot of uncertainty about what the Disney Story Group will keep from earlier Star Wars material.  Despite how bad it is, the Holiday Special was accepted as canon (I do not know what level). So... Is there any official information on whetherany parts of it may be reincorporated in the new canon?

In the Avatar universe, what is it that stops other people physically or spiritually, besides the Avatar, from mastering the four elements?


M: The truth table of p→q says that if p is false and then p→q is true. The author of the books goes on to clarify the doubt people have about the above statement, he uses the following scenario to explain why M is true,   "Perhaps you are bothered by the fact that P ⇒ Q is true in the last two lines of this table. Here’s an example that should convince you that the table is correct. Suppose you have just taken a test, and you ask your professor if it will be graded by the next class. Your professor makes the following promise: If you come to class, then you will get your test. Your professor is making the promise (You come to class) ⇒ (You get your test)."  He goes on to say that if you don't come to class and (get your paper)/(do not get your paper), then he din't lie, if you don't lie you say the truth, therefore he din't lie. But how can we be sure he dint lie?, the promise wasn't broken, sure, but we are not sure that it wouldn't have been broken if we had previously decided to go to class instead of not going.  ps; I haven't taken any logic courses.

Provided we have this truth table where "$p\implies q$" means "if $p$ then $q$":  $$\begin{array}{|c|c|c|} \hline p&q&p\implies q\\ \hline T&T&T\\ T&F&F\\ F&T&T\\ F&F&T\\\hline \end{array}$$  My understanding is that "$p\implies q$" means "when there is $p$, there is q". The second row in the truth table where $p$ is true and $q$ is false would then contradict "$p\implies q$" because there is no $q$ when $p$ is present.  Why then, does the third row of the truth table not contradict "$p\implies q$"? If $q$ is true when $p$ is false, then $p$ is not a condition of $q$.  I have not taken any logic class so please explain it in layman's terms.       Administrative note. You may experience being directed here even though your question was actually about line 4 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 3, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines.


I want to install Xcode SDK for iPhone app development on my Windows 7 PC, does any one know is this is possible?

I would like to develop iPhone apps without using Mac OS X. Is it possible to do this on Windows OS?


How can I call use a variable in bash and use the same variable in python. There are two separate file .bash and .py  .bash file  while read -r x do printf  "%s\n" ${x} "Found" done < path/to/file.txt   .py file  print(${x}+"something here")   I want to establish some connection between the two file so the variable the bash holds can be used in the .py file

I have a Python script that I want to pass a bash variable to.   bash.sh  while read -r db do Printf  "%s\n" ${db} "Found" done < path/to/file.txt   output: db1         db2         db3  file.txt  db1 db2 db3   python.py  print(${db},+"_tables.replicate.fix")   I need an output of  : db1                       db2                       db3    How can the python file know what the db variable holds in the bash file?


I've been trying to add timestamps to my bash history on Mac, but it isn't really working. I put the following in both ~/.bash_profile and ~/.bashrc and neither seem to work:  export HISTTIMEFORMAT="%m/%d/%y %T"   I then ran source ~/.bash_profile or source ~/.bashrc, but only the number of the command seems to get printed. Am I missing something?

I would like to keep timestamps on the commands logged in my Bash $HISTFILE, is it possible?  I did not manage to set it up using man bash as an information source.   My other options are as follows:  function thebanana() {   local -r -a bash_commands=(     "ls"     # ... more coconut commands   )   for bash_command in "${bash_commands[@]}"; do     printf "${bash_command}"     printf ":"   done } export HISTFILE=banana export HISTIGNORE="$(thebanana)" export HISTSIZE=999999 export HISTFILESIZE=999999999 export HISTCONTROL=ignoredups:erasedups   I should have mentioned I am on OS X Mountain Lion (sigh). uname -a gives me:  Darwin CoconutMac.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64   and echo $BASH_VERSION gives me:  3.2.48(1)-release   Tried adding this:  export HISTTIMEFORMAT='%b %d %I:%M:%S %p '   and it only prefixes this kind of timestamps to commands:  #1349057791   I try echoing back the variable (echo $HISTTIMEFORMAT), it has the right value.  Interesting!  I even removed .profile completely to debug this. Still only funny timestamps:  #1349058320   I don't know how to further troubleshoot this... :(  Solution: I was using a script that reads the $HISTFILE directly, not the history built-in so the epoch-based timestamp (secs since Coordinated Universal Time (UTC) of January 1, 1970) was not being translated using the date formatting string. Plain-old history works fine, I'll use that instead.


We know that in QFT, all particles are being created and annihilated, and because of the conservation laws, on average the number of particles remains constant.  Suppose we have an electron in an atom. Is it possible that this electron gets annihilated with a created positron, and the created electron paired with the positron takes its place? In other words, is it possible that the electron inside an atom gets destroyed and supplemented by another electron? In this case, does this mean that the position of the electron in the atom suddenly changes?

According to QFT, virtual electron-positron pairs are created everywhere in the space, and more frequently near electric charges. Suppose that one such a pair is created in the proximity of an electron. Is it possible for the initial electron to annihilate with the created positron, leaving behind the created electron?  If so, the position of the created electron would not be the same as the initial electron, so this effect would change the position of the electron we observe in that region of the space, creating some kind of uncertainty in position. Is there any quantitative measure of such an uncertainty in position due to vacuum fluctuations?


TL;DR If it takes 90 minutes to roast a leg of lamb at some temperature (perhaps somewhere from 350 to 450 °F?), and it takes 840 minutes to slow-roast a leg of lamb of the same exact weight at some other temperature (possibly 175 to 275 °F?), what is the temperature setting that one should use if one wants the leg of lamb to spend 420 minutes in the oven? Is it suitable to calculate the temperature using linear interpolation? The mid-length story: The purpose of the question is to avoid the tyranny of recipes, where I have to go to my tablet, computer, or book shelves to do anything. I'd like to understand the ideas (in this case, for roasting lamb or beef) well enough to be able to cook without the handholding of recipe authors. In this era of internet-sourced recipes, recipes seem to be, by and large, copied, or inspired (possibly even sometimes plain plagiarized). For example, search online for "roast leg of lamb" and you will find a hundred pundits claiming to provide a recipe. Search for "slow roast leg of lamb" and you will find more results. But these recipes are not gospel. We should be able to do anything we want, so long as it's flavorful and healthy. Is there such a thing as semi-slow, average-slow, and rather-fast-than-slow roasting, or are we stuck with just "roasting" and "slow roasting"? The long story: Cooking a whole lamb, starting by  it, will have to remain a 5- or 10-year project, when I will know that I can nail every detail right, and when I will know that a 40-or-so-large family reunion will happen, if they're ever in the same place at the same time. At this time I have the much more modest objective of properly cooking a leg of lamb, defrosted for 36 hours in the fridge  and smeared with mustard, rosemary, and garlic  My intention was to leave it in the oven overnight at 275 °F / 135 °C. Slow roasting is much more of a foolproof method, because I don't have to calculate precise minutes-per-weight numbers. If it's in the oven two hours more or an hour less, it's still perfectly alright. (Yes, yes, no need to lecture me about food safety; I do make sure that the internal thermometer reading reaches whatever the thermometer says.) Here is the problem: I really don't want the flavor, the texture, or, as mentioned above, the time sensitivity of roasting at 375 °F / 190 °C. I would like the fall-off-the-bone tenderness of 275 °F / 135 °C, but. I was much too tired (tennis for just one hour did it) to think about standing on my feet for the 5-10 minutes that it takes to prepare the roast before going to bed. I'm starting to roast early in the morning instead, for guests who will arrive 420 minutes after the roast went to the oven. If I need 90 minutes at 375 °F / 190 °C and 840 minutes (14 hours) at 275 °F / 135 °C, I am speculating that there is a precise temperature that I can use for 420 minutes, and the roast will be just perfect when the guests arrive. (Then the roast will rest outside during chatting and appetizers.) How do I determine roasting temperature as a function of time? Would, for example, linear interpolation 375 + (420-90) * (275-375) / (840-90) = 331 °F  make sense? N.B.: This might be a difficult question, in the sense that cookbooks do not discuss it. Feel free to "throw me a bone", figuratively speaking, and make a suggestion that I can try. If the roast is under-cooked, I can always use one of various remedies and apologize that I didn't get it quite right. The guests will be gracious. But if a better answer comes along later, it's fairer, and better fitting for a reference site, that I update the "correct" answer. Cooking is an art form anyway. There isn't just "right" and "wrong".

Often, when you buy meat from the store, it comes with guidance on how long the meat needs to be roasted, presumably calculated as a function of its weight. Is there some well known general algorithm for calculating how long to roast various types of meat (e.g. for display on packaging). Perhaps something like:  roasting time = c * weight of meat  Assuming the algorithm is this simple, is there some reference of ideal oven temperatures and scaling constant c for each type of meat (chicken, beef, pork etc)? Relatedly, is there a well known set of algorithms for converting between say, fan oven, AGA, and/or gas mark standards for oven temperature? I'm assuming these facts must be well known in meat supplier's product development departments, due to the labeling I see on meat that I buy. However, having Googled it a fair bit, I can't find these details summarized anywhere.


I have and object1 with a unknown key name and i need to merge with other object2. The secure point is that unknown key is not present in the object2 so, never gonna be key names conflicts.  var object1 = {  id: 1,  name: "myname",  boleanSample : true }   var object2 = {  unknownKeyName : "UnknownValue" }   I want to merge object2 into object1 and get this  var object1 = {  id: 1,  name: "myname",  boleanSample : true,  unknownKeyName = "UnknownValue" }   Please, vanilla Javascript only. If the response require the creation of an new object3 is totally fine :)  PD: I checked these links before post the question:      ( uses arrays... )   ( Just for known keys, not useful for this case )  ( Bad post, no sense )   No duplication at all for those :)

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


I want to use text under an equation. I am using the \underbrace_{text{}}. My point is that the text is quite long and I want to make it into two lines. For example:  \begin{document} \begin{equation} \underbrace{1+2+3+4+5+6+7+8+9}_{\text{Aggregate \\ factor payments}}  \end{equation} \end{document}   So in my example ideally I want the "factor payments" terms to appear below the term "Aggregate". I tried in the way I have in the code, but it did not worked.   Any suggestions much appreciated

Is there a way to force a line break inside a math mode text?  My example:  \[   \underbrace{....}_\text{Some long text that should be multiline} \]   Trying  \text{Some long text that\\ should be multiline}   Didn't do the trick.


I'd like to have a faster way of changing audio out device (between internal notebook's [or a headphones] and HDMI external monitor's) instead of opening sound settings, which has to load and requires too much clicking for an action so simple and repeatable.  Preferably a change from the device being used to a next (not used) sound device, but static change (to A or to B) would be nice as well!  I can imagine keyboard hotkey binding or making a command shortcut, eventually installing additional software.

To switch to HDMI audio output (of monitor) and back to normal audio output from system audio jack (for headphones, as my monitor doesn't have audio out), I find myself opening up sound preferences and selecting the right channel everytime. Is there any way I can create a toggle button in the panel or assign some shortcut key to toggle since I do the switching so often.   :aplay -l  **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]   Subdevices: 1/1   Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]   Subdevices: 0/1   Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 7: STAC92xx Digital [STAC92xx Digital]   Subdevices: 1/1   Subdevice #0: subdevice #0


My luggage is set to automatically transfer from:  -Rio - Sao Paulo (LAN) -Sao Paulo - Bogota (LAN) -Bogota - Caracas (COPA)  I'd like to get it out at Bogota, as I have left some non-vital mediciation in the bag.   Is it possible to get it and how do I get it?

I have a flight from Madrid to Aalborg with a stop in Amsterdam. The connection time betweeen the flight from Amsterdam and Aalborg it´s 1 hour and a half. The thing is that I want to stay in Amsterdam for a week and I want to pick up my checked in luggage at the Amsterdam airport. Can I do that if the flight it´s with the same company (KLM for instance) ?  I mean I can tell them that I want to pick up my luggage in Amsterdam right?


Cryptographic applications use deterministic algorithm for random number generation that are not statistically random but they appears to be random.  Why do cryptographic applications use PRNGa instead of TRNGa?

I understand the use of pseudo-random number generators. I am not getting mixed up between these and "real" random number generators.  However, I don't understand for what a real random number generator is used. If it is not deterministic, how can it be used in an algorithm?


Why is the "r" doubled in "arrhythmia" relative to "rhythmia"? I'm guessing it's because English resists hyphenation of prefixes and suffixes ("a-rhythmia"), while direct prefixation by "a" would imply the wrong pronunciation: "arhythmia" looks like it should be pronounced "ah-rhythmia". However, "arrhythmia" also looks like it should be pronounced "ah-rhythmia", so that doesn't explain things... I can't think of other cases that double the initial consonant when preceded with "a": the antonym of "tonia" is not "attonia" but "atonia", for example. The antonym of "regular" is "irregular", but the prefix is, I think, considered to be "ir", not "i". Maybe that simply means that the antonym prefix of "arrhythmia" is "ar", not "a", even though the word is pronounced "'A'-rhythmia", not "arr-rhythmia"?

It seems to me combining "a-"and "rhythmic" would intuitively be spelled "arhythmic".  Is there a rule or some other practical reason that it's spelled arrhythmic?


I know that this question has been asked so many times but there are a lot of different answers that's confusing me. I have just one parameter that's passing through url and it is in a sql query, so a GET request and i really don't know how to protect myself from SQL injection. How can I do?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Let $x_1,x_2,\ldots,x_n > 0$ such that $\dfrac{1}{1+x_1}+\dfrac{1}{1+x_2}+\cdots+\dfrac{1}{1+x_n} = 1$. Prove that $x_1x_2\cdots x_n \geq (n-1)^n$.   It seems like we should be able to use AM-GM here since the expression we want to prove has $x_1x_2\cdots x_n$ in it. But I don't know how to deal with this $\dfrac{1}{1+x_1}+\dfrac{1}{1+x_2}+\cdots+\dfrac{1}{1+x_n} = 1$ expression.  Edit: the solution in the link you provided was not very clear. I am wondering if someone can provide a more clear solution.


The task is to evaluate, using the specific given hint, and only real-analysis methods, no complex analysis is allowed in the problem. $$\int_0^1 \log^2(x)\log^2(1-x)\, dx$$ The hint given is: $$ \sum_{k=1}^{\infty} (H_k)(x^k) = (-)\frac{\log(1-x)}{1-x},$$ where $H_k$ is the harmonic number.  If we integrate both sides we get.  $$ (2)\cdot\sum_{k=1}^{\infty} \frac{(H_k)(x^{k+1})}{(k+1)} = \log^2(1-x)$$ Recalling the hint: $$\sum_{k=1}^{\infty} (H_k)(x^k) = (-)\frac{\log(1-x)}{1-x}$$ Substitute $x \to 1-x$ $$\sum_{k=1}^{\infty} (H_k)((1-x)^k) = \frac{-\log(x)}{x}$$ Integrate both sides to get: $$(2)\cdot\sum_{k=1}^{\infty} (H_k)\frac{((1-x)^{k+1})}{k+1} = \log^2(x)$$  I think it is a good idea to evaluate the sums differently.  Or simply, $$\log^2(x)\log^2(1-x) = \left[(2)\cdot\sum_{k=1}^{\infty} (H_k)\frac{((1-x)^{k+1})}{k+1}\right]\left[(2)\cdot\sum_{k=1}^{\infty} \frac{(H_k)(x^{k+1})}{(k+1)}\right]$$  But that would result in quadruple sums... Any ideas?

I have no idea where to even start. WolframAlpha cant compute it either.  $$\int^1_0 \log^2(1-x) \log^2(x) \, dx$$  I think it can be done with series, but I am not sure, can someone help a little so I can get a start??  Thanks!


Found  link to a c script that claims to take a screenshot of the running machine, so I copied it and installed all that libraries needed for compiling this file you can find info on how to to install the cairo lib I am using gcc to compile the script and I tried compiling using the following commands gcc -I/usr/include/cairo -lcairo -lX11 pic.c gcc -I/usr/include/cairo -lX11 pic.c gcc -Wall -I/usr/include/cairo -lm -lX11 pic.c  This is what i get when compiling /usr/bin/ld: /tmp/ccOh9u2g.o: in function `main': pic.c:(.text+0x91): undefined reference to `XOpenDisplay' /usr/bin/ld: pic.c:(.text+0x15e): undefined reference to `cairo_xlib_surface_create' /usr/bin/ld: pic.c:(.text+0x175): undefined reference to `cairo_surface_write_to_png' /usr/bin/ld: pic.c:(.text+0x181): undefined reference to `cairo_surface_destroy' collect2: error: ld returned 1 exit status   this is what i am using Target: x86_64-linux-gnu gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

Why does the order in which libraries are linked sometimes cause errors in GCC?


How can i break out this while loop?  i want it to break it out when i type "finish." But it dose not seems to work.  public class Main {      public static void main(String[] args) throws IOException {          PlayerReader r = new PlayerReader();         PlayerWrite w = new PlayerWrite();         r.Check();          System.out.println("Welcome, Please type enter or type finish to store information");          Scanner sc = new Scanner(System.in);          String str = sc.nextLine();         String cond = "finish";          while(str != cond)         {              w.writeName();             w.writeScore();             if(str == cond)             {                 System.out.println("Information stored");                 sc.close();                 break;             }          }       }   }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I have a .gpkg GeoPackage from  unzpped and stored on a cloud server. I want to make it possible to use as one of the URL based geo-services listed in QGIS (WMS, GeoNode etc) : So people can zoom in to their area of interest and selectively pull down just the data they need without having to download all 8 GBs of it. And it has to be in vector form with the metadata intact - can't be as raster tiles. What would be a good way of going about making such a deployment? I don't have prior experience in deploying geo-servers etc, sorry if this is sounding very naive.  Additional: I want to do this with docker and persistent volumes so that if there is any conversion/indexing to do, I can do it once and after that the whole thing can be shifted and redeployed anywhere else without having to repeat work.  Sharing bits and pieces I'm finding; would be great to cobble together a flow that starts with a .gpkg and ends with a QGIS-ready URL.     (video)   Note for mods: this is not the same as a  which is asking how to edit a .gpkg in the cloud. Another  as the answers giving broken links.

I am interested in publishing a GML file as a WFS. I don't want to use a database like PostgreSQL. What would be the rough steps I need to do for that? I like to use open source software (geoserver). I don't have much experience. I am just looking for a rough guide what kind of software I should look into and which step follows which step..


I have copied some data into Excel 2010. I have found that some of the cells need to be widened to allow the data to fit. How do I automatically adjust the height of the cells to fit the content?

For every generation of Excel I can remember (including 2010, which I'm using now), Excel's "Auto Size Row" features sometimes fails to actually auto size a row when the cell contains wrapped text. When it works properly, all the text is revealed and there is no additional space below the last line of text. When it fails, it adds extra space below the text. To make matters worse, what you see is not always what you get, i.e., text that appeared okay on screen gets cut off when it's printed. You also get different sizing depending on whether you are zoomed in/out or at actual size.  Simple test case:  Why is there a one-line gap after the text in cell A1 but not in A2?  (To reproduce: set width of column A to 17.14 (125 pixels), text wrap on, and cell alignment top.)  (I double-checked that I applied Auto Fit Row Height to both rows. Zoom level is 100%.)    Is there any known remedy for this without resorting to manually adjusting the row heights (which is not practical for more than a handful of rows)?


The definition of the module is given in Hungerford's Algebra by:    And I can not understand the following paragraph, could anyone explain this for me please especially why commutativity is needed for (iii)? Thanks!!

I'm trying to get my head around modules, and there's a problem that's bothering me regarding scalar multiplication from the left vs from the right.  In many books/articles I've read, the author may refer to a left $R$-module $M$, and then continue to talk of terms such as $xr$, where $x\in M$, $r\in R$. What is right scalar multiplication in a left module? Does it even make sense to talk about it?  I've been trying to show that over a commutative ring, right scalar multiplication and left scalar multiplication are the same thing, but I've not managed it so far. I've googled it to no avail, and I can't see why the distinction between left and right modules disappears when the base ring is commutative.  Thanks for any replies!


If $f\in H^2(\mathbb R^2)$, I want to show that   $||f||_{L^\infty}\le c||f||_{H^1} [1+\ln(1+||f||_{H^2})]$  How can I get the "ln"? and how can I make it into a product of $H^1$ and $H^2$ norm?  It is actually one of my Real variables's project. So how can I do this inequality in an relativly "elementary" way?

If $f\in H^2(\mathbb R^2)$, I want to show that    $||f||_{L^\infty}\le c||f||_{H^2}$ $||f||_{L^\infty}\le c||f||_{H^1} [1+\ln(1+||f||_{H^2})]$   For 1, I use $||f||_{L^\infty}\le \sup_{x\in \mathbb R^2} |f|\le\int_{\mathbb R^2} |\hat f(\xi)|d\xi = \int(1+|\xi|^2)^{-1}(1+|\xi|^2)|\hat f(\xi)|d\xi \le (\int (1+|\xi|^2)^{-2}d\xi)^2(\text {which is integrable in this case})||f||_{H^2}\to \text{is this correct?}$   But for 2, I am stucked. How can I get the "ln"? and how can I make it into a product of $H^1$ and $H^2$ norm?


Do not be tired I have a language and keyboard problem I wanted to tell you how I can change win + space to shift + ctrl? My Ubuntu is 20.04

Can I use Ctrl+Shift for changing languages? I can't set this hotkey for changing keyboard languages.  At this moment Alt+Shift switch languages, but I can't see this hotkey in keyboard hotkeys list or in   gsettings list-recursively  org.gnome.desktop.wm.keybindings | sort | more   output.


So, I'm working on a webpage that has a small "notepad" widget, and I've updated the interface to work as follows:   The notepad is actually just a styled <ul> with each line on the notepad page as its own  <li>. The user can simply click and type to add a new <li> because it is contenteditable: true. Each newly added line is placed in a <p> element, and styled with jQuery.   Now here's my jQuery issue... The code below successfully adds the "strikethrough" class to the <p> element when double-clicked, and then removes it when double-clicked again. HOWEVER, if I click the "notepad" to add a new <p> element, the jQuery script below doesn't work. It only applies to <p> elements that were already on the page when the document loaded the first time.   // NOTEPAD INTERFACE $(".paper p").dblclick( function() {   $(this).toggleClass("strikethrough"); });   Does anybody know how to make the same jQuery apply to every <p> element equally, regardless of when it was added to the DOM?

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


How can I bring python to only output directories via os.listdir, while specifying which directory to list via raw_input?  What I have:  file_to_search = raw_input("which file to search?\n>")  dirlist=[]  for filename in os.listdir(file_to_search):     if os.path.isdir(filename) == True:         dirlist.append(filename)  print dirlist   Now this actually works if I input (via raw_input) the current working directory. However, if I put in anything else, the list returns empty. I tried to divide and conquer this problem but individually every code piece works as intended.

I want to be able to list only the directories inside some folder. This means I don't want filenames listed, nor do I want additional sub-folders.  Let's see if an example helps. In the current directory we have:  >>> os.listdir(os.getcwd()) ['cx_Oracle-doc', 'DLLs', 'Doc', 'include', 'Lib', 'libs', 'LICENSE.txt', 'mod_p ython-wininst.log', 'NEWS.txt', 'pymssql-wininst.log', 'python.exe', 'pythonw.ex e', 'README.txt', 'Removemod_python.exe', 'Removepymssql.exe', 'Scripts', 'tcl',  'Tools', 'w9xpopen.exe']   However, I don't want filenames listed. Nor do I want sub-folders such as \Lib\curses. Essentially what I want works with the following:  >>> for root, dirnames, filenames in os.walk('.'): ...     print dirnames ...     break ... ['cx_Oracle-doc', 'DLLs', 'Doc', 'include', 'Lib', 'libs', 'Scripts', 'tcl', 'Tools']   However, I'm wondering if there's a simpler way of achieving the same results. I get the impression that using os.walk only to return the top level is inefficient/too much.


Can anyone provide some pseudo code for a roulette selection function? How would I implement this: I don't really understand how to read this math notation.I want General algorithm to this.

Can anyone provide some pseudo code for a roulette selection function? How would I implement this:    I don't really understand how to read this math notation. I never took any probability or statistics.


Hermione takes twelve classes with a time-turner, and she drops two to get ten O.W.L.'s. You can even take more because Percy (and others) ended up with twelve O.W.L.'s. possibly without a time-turner.  Is twelve the most classes a Hogwarts student can take in their O.W.L. years?

In Prisoner of Azkaban, Hermione took 12 subjects, and needed a Time-Turner to do so. However, it is mentioned in the series that both Bill and Percy Weasley got 12 OWLs, so would have taken 12 subjects as well, so both would have needed Time-Turners for three years to do this. Doesn't this seem a little unusual, given how strict the Ministry is over the use of Time-Turners,  that they would give them to several Hogwarts students?


When installing many different distributions of Linux, there is usually an option to set the domain name, as well as the hostname. Often the domain name can be left blank. What does this options actually do? What is its purpose? If I own a domain name, and I enter it at this point during the installation (or even change it after installation) what would be the difference compared to leaving it blank? Additionally, what happens if I set it incorrectly? For example, I used a domain name which exists, but I do not own, or I used one that doesn't exist. For example I could enter google.com as my domain name, but clearly I do not own this domain, so what would happen in this instance?

I have several machines running Debian, and during install, I left the domain name field blank. This hasn't affected anything so far, but I'm curious what the correct thing to set that field to is if you don't have a registered web domain and your IP is dynamically set ( gives a different IP every few months). Apologies if this is a newb question, but I can't find any results via Google.  What is the proper domain name for a home desktop with a dynamic IP address?


My 5 year old son has recently got into the habit of getting into these incredibly annoying tantrums. They start when he doesn't get his way and can often rumble on over a couple of hours. They usually peak at bedtime.  When it occurs he doesn't do anything. He lays on the floor and says "nothing" when you ask him to do something. After a while mixes this up with raspberry-blowing spitting and saying the word "poo".  I start off being over nice, attempting to coax him out of his tantrum. I make some jokes to try to get him to smile. I offer to help him do things. Ask if he wants to pick a bedtime story etc.  This practically never works.  I then get frustrated and shout. This usually lasts about 10 seconds. He cries and says he doesn't like me.  I become calm again but I have a child who won't go to bed. At this point I put him to bed. I pull him up. I then hold his hand and steer (encouragingly pull) him towards the bathroom, I ask him to do everything that is expected off him. He doesn't. I sit him on the toilet. I wash his hands. I gently edge him towards his bedroom and get him into his pyjamas while he continues to say "nothing".  During this process he protests a little bit but I am not aggressive. He isn't being dragged along the floor. He doesn't like it but does reluctantly comply. He does edge a foot up about 3cm from the floor so I can slide on his pj's etc.  I hate doing this final step. It isn't right but if I don't, if I leave him outside his room he will sit there and start saying words he knows he is not allowed to say. We once left him for 45 minutes and he laid there contently running through the list of things he is not allowed to do.  What am I supposed to do? We have taken away his treats the next day but doesn't seem to do anything.  Has anyone else dealt with this behaviour? Does anyone have any advice? Just want to add. 70% of the time he is well behaved. 25% of the time he is a bit silly. This is like 5% of the time where he seems to get into the mindset where he doesn't want to comply with anything and wants to try to press to buttons.

We have three boys aged 4, 8 and 10. The youngest and eldest seem to be fine and no issues, but the middle child is quite willful and having tantrums. It's like he never quite grew out of the terrible twos. Small things the other two have no issue with can upset him and set off a terrible tantrum. He seems to have trouble co-operating with others and getting into rows with other children and teachers.  How should we deal with tantrums at this age? How do we help him improve his "emotional regulation"?


I've been reading quite a few posts/questions about the micro-optimization of ++i and i++ in C++. And from what I've learnt is that ++i "can", not always, but can be faster than i++.  So this makes me ask this question, whats the point of i++ then? I thought that ++i is that you increment the value first then return it. Where as i++ you return the value then increment it. But I have made a very simple test on this:  for(int i = 0; i < 10; ++i) {     std::cout << i << std::endl; }   is the same as:  for(int i = 0; i < 10; i++) {     std::cout << i << std::endl; }   Both prints out the same results. So my real question is that is there a situation where you MUST use i++ rather than ++i? If there is, please explain. Thanks

Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing?


I have a large 50mb KML file and we would like the file to be broken into smaller KML files so they can be placed on ArcMap.   How do I do that?

I have a shapefile of size 224 MB. I am using ArcGIS to convert it to a KML file. The process involves converting the shapefile to a feature layer and then converting the layer to KML.   An alternative method that I have tried is using ogr2ogr.  In both the cases, the KML file produced is around 500 MBs. I need it to be less than 250 MBs, so I can import it as a Google Fusion table.  I was informed that one of the best ways to cut size is to reduce precision of the coordinates to 5 decimal places (from its current 10 or so).  How do I go about changing the decimal places using either ogr2ogr or ArcGIS? Is there some other software that may help in this and also, are there any other strategies I may use to reduce the size of the KML file?  I tried using Notepad++ to open the KML file and then use regular expressions to change coordinate precision but for some reason this method is not working. If I make the change and try and save the file, all the data gets deleted and the KML file size changes to 0 bytes.  An alternative strategy that I was thinking of was to split my shapefiles into two or three files and convert them to KML separately, upload them to Google fusion tables and then append those. However, I am not sure of two things.   How to split shapefiles into two or three smaller shapefiles? Whether I can easily append fusion tables together to create a larger fusion table?


I am currently doing Hatcher's problem 2.1.13:  Verify that $f \simeq g$ implies $f_* = g_*$ for induced homomorphisms of reduced homology groups.  By inspected of the regular and reduced chains, it is evident that $H_n(X) = \tilde{H}_n(X)$ for $n > 0$, so all that is left to prove is the case $n = 0$. Since $H_0(X) = \frac{\ker \partial_0}{\text{im } \partial _1}$ and $\tilde{H}_0(X) = \frac{\ker \epsilon}{\text{im } \partial_1}$, is it enough to show that $\ker\epsilon \cong \ker \partial_0$ to prove the statement? If so, how would you go about starting it?

I have tried to read Hatcher's  book. He proved  Theorem 2.10: If two maps $f,g :X \to Y$ are homotopic, then they induce the same homomorphism $f_* = g_*:H_n(X) \to H_n(Y)$.  One can immediately obtain following corollaries using the dual version of prism operator described in Theorem 2.10 and some facts:  Corollary 1: If $f,g :X \to Y$ are homotopic, then $f_* = g_*:\tilde H_n(X) \to \tilde H_n(Y)$ for $n>0$.  Corollary 2: If $f,g :(X,A) \to (Y,B)$ are homotopic, then $f_* = g_*:H_n(X,A) \to H_n(Y,B)$.  Corollary 3: If $f,g :X \to Y$ are homotopic, then $f^* = g^*: H^n(X) \to H^n(Y)$.  Corollary 4: If $f,g :X \to Y$ are homotopic, then $f^* = g^*:\tilde H^n(X) \to \tilde H^n(Y)$ for $n>0$.  Corollary 5: If $f,g :(X,A) \to (Y,B)$ are homotopic, then $f^* = g^*:H^n(X,A) \to H^n(Y,B)$.  I wonder that how can we prove the following statements:  Corollary 6: If $f,g :X \to Y$ are homotopic, then $f_* = g_*:\tilde H_0(X) \to \tilde H_0(Y)$.  Corollary 7: If $f,g :X \to Y$ are homotopic, then $f_* = g_*:\tilde H^0(X) \to \tilde H^0(Y)$.  An attempt for Corollary 7 is  Proof of Corollary 7: By Universal Coefficient Theorem, we have $$\tilde H^0(X;G) \approx Hom(\tilde H_0(X),G).$$  Hence the result follows from the dualization of the proof Corollary 6.  Any help will be appreciated.


I have done a research paper with someone in industry, while doing a Phd. Is it important to include my supervisor name also in research paper. Will three names be a good thing or should i go with 2 names.

I understand that in a lot of big-lab fields it is common for the principal investigator to append their name to a paper even if they did not write the paper, design the experiment, or collect data since they spend energy securing funding, and managing the whole lab. What about for small labs?  What are the requirements for a supervisor to be included as an author on a paper, as opposed to just appearing in the acknowledgements? If you are working on your own projects independently of your supervisor, but using funding provided by your supervisor (how does this change when the funding provides resources versus just your salary), are you suppose to add them as authors or just acknowledge the source of funding?


I was given by my work an old Dell Optiplex. I did ask the administrator what the password was but he can't remember. when you turn the machine on you eventually arrive at a screen which asks you to give ctrl-alt-delete which then results in the log on screen. The details (user/department name) are now irrelevant and the network on which it would log on are changed too/no longer in existance. I would like to use this old machine as a standalone for simple tasks, but can't get in. I've tried to find administrator password via ophcrack but couldn't see anything. I can boot up the machine with something other than windows (linux via cd). where would I be able to change settings, which file, or even ditch it and then boot into xp again with the possibility to set up user accounts etc from windows. your help would be very much appreciated

Long story short, someone repaired my brother's computer and set a password on his account, now we can't get in and can't contact the person who set the password.  Is it possible to create a Windows XP user if I have access to the windows partition, from a linux partition or pendrive, for example TinyCore?  Thanks for any pointers!


For $c > 1$, define sequence $\{a_n\}$ with $a_1 = \sqrt{c(c-1)}$ and $a_{n+1} = \sqrt{c(c-1) + a_n}$, $n > 1$. Prove that $\{a_n\}$ is a monotonically increasing   sequence and it's bounded by $c$.   My attempt:  Obviously $a_1 < a_2$, by induction, suppose $a_n > a_{n-1}$, i.e. $a_n - a_{n-1} > 0$. We have $a_{n+1}^2 - a_n^2 = c(c-1) + a_n - c(c-1) - a_{n-1} = a_n - a_{n-1} > 0$. Hence, $\{a_n\}$ is a monotonically increasing sequence. Otherwise, $a_1 = \sqrt{c(c-1)} \leq c$ because $c^2 - a_1^2 = c^2 - c(c-1) = c \geq 0$, by induction, suppose $a_n \leq c$, we prove that $a_{n+1} \leq c$. $a_{n+1} = \sqrt{c(c-1) + a_n} < \sqrt{c(c-1) + c}$, but $c^2 - \left(\sqrt{c(c-1) + c}\right)^2 \geq 0$, then $a_{n+1} \leq c$.  Is this solution true? Thank all!

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


I have a black keyboard with characters which are completely invisible until the keyboard light comes on... Which it doesn't. I've made a script to toggle the light:  #!/bin/bash FLAGS=$(xset -q | awk 'NR==2' | awk '{ print $10 }') if [ "$FLAGS" = 00000000 ] || [ "$FLAGS" = 00000002 ]; then     xset led 3 else     xset -led 3 fi   My problem is that I can't find where to put it to make it work at the login prompt (I think I am using GDM.) So every time I boot, I log in blind and I can only turn the lights on once logged in :(  So, questions!  xset is an X11 command?   Will it even run at the login prompt?  I'm guessing it has to wait until X11 starts?  Where do I put it?  I've tried putting it in: /etc/X11/Xsession.d /etc/init.d  Neither seem to work.  Thanks!  Beth

I recently got a backlit keyboard, and I LOVE to write late at night.  But I cannot for the life of me figure out how to light it up...It lights up when first plugged in, but nothing happens after that....  It is an 'XtremeIT' keyboard.  on Ubuntu who managed to activate it...