I'm a newbie on Python programming, and I'm testing some features that I've learned so far. I wanted to create a program that helped me opening the cashier in the morning. I wrote a script that assings a string content to a n variable, so it tests first (with a while loop) if the user typed an alphabetic input. If so, it tells the user that one needs to type a numeric value and calls the input again, to be filled with a string value again. If it's not an alphabetic input, it exits this while loop. Now's the problem. I want it to ask for the user to keep typing numeric (float) values until one wants to exit this module, and then the sum is shown on screen. Inside this while loop, I put a conversion line from string to float, so it can sum the numbers and not only concatenate them together as a string. But I can't seem to make it work. This is the code so far   `n = input('n = ') na = 0.00 while n.isalpha():     print('Valor inválido. Insira um valor numérico.')     n = input('n = ') while n.isdecimal():         n = float(n)         na += n         print('Insira o próximo valor: ')         print('Digite qualquer letra para sair')         n = input('n = ') print('A soma é {:.2f}'.format(na))`   But then, if I type 5.22, for example, it exits the program without showing any errors:      n = 5.22 A soma é 0.00  Process finished with exit code 0   How can I make this while loop work the way I want?   Ah, it works perfectly when I enter integer values on the n variable.  n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = m A soma é 25.00   Thanks in advance!!

What is the best possible way to check if a string can be represented as a number in Python?   The function I currently have right now is:  def is_number(s):     try:         float(s)         return True     except ValueError:         return False   Which, not only is ugly and slow, seems clunky. However I haven't found a better method because calling float in the main function is even worse.


I have tried downloading Ubuntu desktop four times and it is downloading as a zip file instead of an iso file. When I open it it opens in my archive program. Hence I cannot mount it to disk and install it onto my computer. What can I do?

I've downloaded ubuntu-12.04.1-desktop-amd64.iso via Chrome. Once that was done, I wanted to burn it onto a CD but I can't find the .iso file.   When I opened the Downloads folder, the .iso extension is not there anymore, and it opens with WinRAR for unzipping. I tried unzipping and searching for any ISO files but no luck.   I'm trying to add Ubuntu onto VirtualBox on Windows 7 host OS. Please help.


Has anyone tried to modify Maxwell's electromagnetic field theory so that it is invariant under the Galilean transformation?

I read in  the statement that the subset of Maxwell equations comming from the Bianchi identity:  $$ \nabla \cdot {\bf B} = 0, \quad \nabla \times {\bf E} + \frac{1}{c}\frac{\partial {\bf B} }{\partial t} = 0 $$ is actually invariant under Galilean transformations. I came up with this reasoning, is it correct, or am I missing something?  First $c$ has to be assumed a constant, otherwise it will not work, I think the author assumes this, though he does not say it.  A Galilean transformation, say on the $x$ axis, transforms $x' = x -ut$, $z'=z$, $y'=y$, $t' =t$. It does not mix electric and magnetic fields, so they only mix components amongst themselves. The transformation matrix for the electric field say, will be   $$ E'_i (x') = \frac{\partial x^k}{\partial x'^i} E_k(x) = E_{i}(x) $$ and something identical for the magnetic field. Also derivatives will be trivially transformed $\nabla =\nabla', \quad \frac{\partial {\bf } }{\partial t} = \frac{\partial {\bf } }{\partial t'}$ so invariance follows readily.  Then the author says the whole set of Maxwell equations is not invariant due to the displacement current term. I do not understand this statement. Presumably he reffers to the existence of electromagnetic waves propagating with speed $c$ and this will not be constant under Galilean transformations, other than that the equations would retain their same form due to the argument I gave above.  But if we started assuming $c$ is not a constant, then we could not even prove the invariance of the first two equations (the point is perhaps that in such case we cannot interpret $c$ as the speed of anything?).


I read this story in the late 1970s, perhaps very early 1980s.  All life (with a brain I guess) on Earth suddenly develops increased intelligence. Scientists determine this is due to the normal 250-million-year rotation of the Milky Way. There is some large part of space ("dust cloud"?) that the solar system rotated through (and recently out of) that inhibited brain function in some kind of way. Now that this is no longer the case all higher lifeforms become smarter.  One example given that I have always remembered clearly is about a dog now being smart enough to open a freezer, take out some frozen meat, and then wait for it to thaw before eating it.  Seeing that I read it way back when, I will have read a translated version. So I cannot be certain that the original is in English.

The 'blurb' on the back of the book was that something had boosted the intelligence of every creature on earth, to the point that at least some animals were on par with humans. I'm not sure if humans were similarly enhanced or just animals. I'm not sure whether it was done by aliens, or a side effect of something humans did, or what.   This book was on the shelves in the mid/late 1980's, so it's nothing more recent than that.


On June 5, I arrived at the airport in Frankfurt and intended to fly to my final destination, with an intermediate connection in Vienna. Because of not having a Schengen visa, I wasn't permitted to continue my flights and my passport was stamped as you see below. Fortunately, I was allowed to buy tickets bypassing Schengen zone and reach home. If I had known about the visa requirement beforehand, I never would have bought the tickets that caused so many problems. What the codes "C" and "I" in the rights below corner of the stamp mean and what are the implications of these codes?

I was held at the Polish borders when I attempted to enter by train. They took my fingerprints and sent me back with a written document. I respected the decision and returned immediately.   The document is in Polish concerning the decision taken, and I don't understand it. I am from Cameroon. My limited understanding from what was explained in English at the time was that the asylum status I requested was denied me. I only realised later that I asked the wrong authorities (border guards instead of immigration officers).  This was exactly one year and three months ago now. Do I still have access to any Schengen country?


Sometimes a well-posed question appears and makes one really think. And while the original intention of bounties was encouraging others to post an answer that may require above average effort, the option "reward an existing answer" made me think - formulating the question itself may sometimes deserve a reward as well, and not just the "oh yeah, nice question"-upvote - in fact. And while an added bounty may yield additional upvotes by others, I'd still like to propose the implementation of one of the following:     a) The option to award a bounty to the question in addition to answers   b) Part of a bounty awarded to an answer is (optionally) awarded to the question as well   I think option a) is straightforward, although in that case an additional option "reward the question" that is either assigned immediately (so the question doesn't show up in the featured list) or automatically after its expiration (so the question is additionally rewarded by being featured) may be useful. But it should also be possible to award a usual bounty to the question in case no helpful answers appeared.  Option b) could be implement in various ways. One possibility could be that a non-OP bounty causes the question to automatically obtain part of the bounty, say 10%, additionally to the actual bounty, which is not deduced from the bountyee. But it would be better to set this percentage manually, since sometimes one wants to reward an clever answer to a question that doesn't really deserve a bounty as well.

Amongst the reasons for starting a bounty, one can select:     Reward existing answer      One or more of the answers is exemplary and worthy of an additional bounty.   Why not enable one to reward excellent questions in a similar manner?


Current Table:    txtFullName  | First Activity _____________________________  Joe Bloggs   | Football  Joe Bloggs   | Tennis      Katie Bloggs | Tennis    Where I'm trying to get it as...   txtFullName  | First Activity _____________________________ Joe Bloggs   | Football, Tennis  Katie Bloggs | Tennis    **I've tried using COALESCE AND FOR XML PATH('').. Which I can't seem to fit correctly in this statement.. is there another way to do the same thing?  Any help would be appreciated!!

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


Note: To explain this quickly I'm going to talk about this from the perspective of working in Spyder.  If the a function is called in my code, I can put a break point next to where it's called and then when my code gets to that point I can click the "Step into function.." button to see what happens inside this function.  Suppose I'm at some arbitrary breakpoint and want to see what happens inside a function that's not in my code.  Is there any way to call this function through the pdb console and "step into" said function call?

Python is quite cool, but unfortunately, its debugger is not as good as perl -d.    One thing that I do very commonly when experimenting with code is to call a function from within the debugger, and step into that function, like so:  # NOTE THAT THIS PROGRAM EXITS IMMEDIATELY WITHOUT CALLING FOO() ~> cat -n /tmp/show_perl.pl 1  #!/usr/local/bin/perl 2 3  sub foo { 4      print "hi\n"; 5      print "bye\n"; 6  } 7 8  exit 0;  ~> perl -d /tmp/show_perl.pl  Loading DB routines from perl5db.pl version 1.28 Editor support available.  Enter h or `h h' for help, or `man perldebug' for more help.  main::(/tmp/show_perl.pl:8):    exit 0;  # MAGIC HAPPENS HERE -- I AM STEPPING INTO A FUNCTION THAT I AM CALLING INTERACTIVELY   DB<1> s foo()  main::((eval 6)[/usr/local/lib/perl5/5.8.6/perl5db.pl:628]:3): 3:      foo();     DB<<2>> s main::foo(/tmp/show_perl.pl:4):     print "hi\n";     DB<<2>> n hi main::foo(/tmp/show_perl.pl:5):     print "bye\n";     DB<<2>> n bye     DB<2> n Debugged program terminated.  Use q to quit or R to restart,   use O inhibit_exit to avoid stopping after program termination,   h q, h R or h O to get additional info.      DB<2> q   This is incredibly useful when trying to step through a function's handling of various different inputs to figure out why it fails.  However, it does not seem to work in either pdb or pydb (I'd show an equivalent python example to the one above but it results in a large exception stack dump).  So my question is twofold:   Am I missing something? Is there a python debugger that would indeed let me do this?   Obviously I could put the calls in the code myself, but I love working interactively, eg. not having to start from scratch when I want to try calling with a slightly different set of arguments.


I want to add some space between text on the page and footnotes. I need to have "one missing line" above the black line of footnotes. Thank you for any help!

How can I edit the distance between footnote and the line above it?


Jquery on click event is not working on dynamically added Custom tags  My code is     $("[addtoShip='yes']").on('click', function() {          alert('Ship added')   });   Href for add more to Ship  I am trying using .on  But still it's not working

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.


iTunes use to allow me to see the apps installed on my connected iPhone. I could see the screens and rearrange them. But its missing now. Where did that section go?  I am using iTunes 12.7.0.166 on my Mac running High Sierra with my iPhone running iOS 11.0.1

Today, Apple released iTunes 12.7. Surprisingly for a point-release this version removes the iOS App Store and iOS app management features:      Apps can now only be downloaded on an iOS device using an iOS device, and the same goes for ringtones.    I have diligently saved IPA backups of apps I have purchased from the iTunes / iOS App Store for the eventuality of when an app publisher removes an app from the App  Store - or if the developer of an app changes a feature in a way that I don't like. This happens regularly:   Electronic Arts has a poor reputation for removing its games from the App Store when they stop being notable, including apps that you needed to pay for to download. And many non-game apps often add new features that users don't like, or remove features that are useful to many users (either for making things simpler for other users, or for a copyright or patent infringement reason).   Unfortunately, with iTunes 12.7 removing the ability to backup and restore IPA files I seem to be now SOL. Fortunately I still have iTunes 12.6 installed on my computer, but here's my question:  "If I have saved an IPA backup of an app that has since been removed from the iOS App Store, or if I have saved an older version of an app that has been upgraded such that I want to continue using the older version, how can I install that on my new iPhone 8?"


I am having problem with comparing two double numbers up to 3 decimal places. When I try to round 3.1756, I always get 3.176 the last number changes due to 6 last number. Please, help me to get exact number (3.175) from whole decimal numbers.

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I have a data set of features in a historic landscape. So if I make a map of it at a certain scale, I then need to move the feature labels around a bit—tweak them—to make it look nice.  But then if I do another  project to make another map of a smaller portion of the area—an enlargement at a larger scale—the labels again need adjusting—they need to be moved a bit to make it look good in that view.   However, if I then go back to my first project to revise that, all my label positions are messed up. Apparently the label location data goes with the original data. Seems like it would be better if label location adjustments like this were stored in a file with the project, so you could use the data for various projects at different scales.  Am I missing something? Is there a different way I should be doing this? The only resolution I can think of would be to make duplicate data sets for various projects using different scales.

I'm looking for a better labeling-solution for my projects. It seems to be difficult - but maybe I'm just blind?   My projects: I build  printed bike-hike-books. The main scale is 1:75k and there are a city scale of 10k and a overview scale of 200k. Because I like to have a "cartographic" quality of labels placements, I touch every single label and move it to it's best position. I have to do this for every single scale so my labeling columns for 3 scales look like this ('scale 1' stands for 10k 'scale 2' for 75k  and 'scale 3' for 200k):    But before I try to explain in detail, I build this simple Example-Project where you can see and test my (old) labeling solution for 3 scales:   Well, it is working but:    You need labeling columns for every scale  You need a layer for every scale   I'm looking for a much better solution without duplicate layers and tons of columns. I count on your creative minds!  EDIT: I added this two very dense map as examples:    There is only one single possible position for "St. Paulus Dom" and it's not any quadrant:   Every label has to be moved manually. Some of the labels are not in a quadrant.


I copied and pasted the url, but the downloded file is in html , not in video format.

What are instructions on how to download videos from YouTube?    Notice: Terms of Service Violation  Please be aware that by following any of the answers below, you will be violating YouTube's . In particular, from Section 5.B.:     Content is provided to you AS IS. You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content.


I have tried to subscribe to my required tags for every 3 hours. But it just doesn't work. I have also tried "resend confirmation mail"; the page says confirmation mail sent. But I have not received any mail since I have been trying. There are many new questions and updates for these tags since 2-3 days. But I do not get any update mails either. My subscription email id is gmail id. I have not blocked any mails in my settings. Please note, in past I have received updates for my own questions. So getting mails inside my gmail inbox cannot be an issue.  Why I am not getting the confirmation mail from stackexchange??  Here is snapshot of how I am trying to subscribe:-

I have created a custom filter in  and specified that I would like to get email updates:  However, I never got a confirmation mail nor any notifications based on my filter. I tried the "resent confirmation mail" button on the right hand sidebar:  But again nothing happens. The mail address should be fine  I used it for all kinds of notifications from Stack Exchange. For example the rep recalculation email arrived just fine on this address.  I retyped it several times to make sure there really isn't any typo  I double checked that it did not end up in the spam filter  I don't think it is a problem with my particular email provider, users with other mail providers seem to have the same problem, see     This is possibly related to , but this claims to be "status complete".   EDIT: Although the "status-completed" tag was added, the problem still persists  EDIT 2: As of Feb 2020, it finally works


This is a quick question, and perhaps a quick answer.  What keeps us from defining the derivative, formally, as:  $$f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x-h)}{2h}$$?  Graphically this would mean that we could calculate the tangent to a graph by approaching the desired point from both sides at equal rates, rather than from one side.  As a side effect, functions could be differentiated at removable discontinuities, as well as "sharp ends". For example, the derivative of $|x|$ at $0$ would unambiguously be $0$. Or, the derivative of $\frac{x^2-3x+2}{x-1}$ at $1$ would be defined unambiguously as $-1$.  I didn't ever think about this until today. And since I thought about this, I can't let this go. And it bothers me: why do we define derivative as a tangent approaching from one side, while the point of interest is fixed? It seems more natural to approach from both sides at once, now that I played with this idea in my head.  So, why isn't the derivative defined like this? As a bonus question, if this definition was widely used, what would be the effects on other aspects of calculus? Or would there be none, besides the absorption of local discontinuities?

The symmetric derivative is always equal to the regular derivative when it exists, and still isn't defined for jump discontinuities. From what I can tell the only differences are that a symmetric derivative will give the 'expected slope' for removable discontinuities, and the average slope at cusps. These seem like extremely reasonable quantities to work with (especially the former), so I'm wondering why the 'typical' derivative isn't taken to be this one. What advantage is there to taking $\lim\limits_{h\to0}\frac{f(x+h)-f(x)} h$ as the main quantity of interest instead? Why would we want to use the one that's defined less often?


I am trying to find all the files in my directory that does not contain the letters a,b or c; why does this command not work?  ls *[!abc]*   example:     eg: MATCH: xyz, dkh, file, foo; NOT MATCH: bar, bxc, azi,csk

ls -d *e* prints out all files containing an "e" somewhere in it. But the opposite, ls -d *[!e]* does not seem to work. Why exactly is that?  is it because ls takes * as its own argument and expands all the files?  I understand I can do: ls -d !(*e*) (in Bash with extglob set, or in ksh).


I was wondering how I can center inline-blocks. Any help? I tried doing margin-top: x em; but all it did was have the image go down. This inline-block is deliberately inside an image block. If you have links that show me how to position inline-blocks, I will gladly take them into consideration, as I am still learning how to do CSS and HTML.    #img-banner article {   border: solid thick white;   box-sizing: border-box;   display: inline-block;   width: 14em;   position: static; }  #img-banner h1 {   font-family: 'Lobster', cursive;   text-align: center;   color: white;   font-size: 27px; }

Introduction

How can I horizontally center a
 within another
 using CSS?

Foo foo


With SystemD, how can I make certain services dependent on certain network interfaces being up?  For example, let's say I have an 802.1ad bond interface I need to wait on for access to my SAN/NAS before I bring up libvirtd, even though I may have network access available via a different interface. Or let's say I have an sshfs mount I want to come up automatically (and be torn down automatically) dependent on a VPN connection?  What's the idiomatic way to handle fine-grained dependencies on network interfaces?  At present, I'm using NetworkManager on Ubuntu and CentOS7, but I'm open to other platform-appropriate mechanisms for managing network state.

I am trying to write a unit file for hostapd on Debian.   The hostapd daemon seems to need the interface for the associated Wifi interface to be up before it is run or else it SEGV's.   I've tried network-online.target, but still get the SEGV. I think this is because network-online.target only needs to see ANY interface up, and other interfaces comes up before the Wifi interface is ready enough for hostapd to work.    What is the best way to have a service wait for a specific interface to be up before starting?


I have to show that the domain defined by the half unit circle: $\left \{ \left ( x,y \right )\in \mathbb{R}^2: x^2+y^2\leq 1, x\geq 0 \right \}$ for the function $f:D\rightarrow \mathbb{R}$ is closed (the function is $f(x,y)=2xy^2-2x^2$), so that I can argue the function has a min/max value. I have shown it is bounded and continuous. I just can not seem to find a method or way to “formally” show it is closed? I get the intersection of 2 closed sets is closed but how would one ACTUALLY show these sets are closed?


I am plotting a graph using plt.plot using information found online.  However, I do not know what the y[:,0] means:      plt.plot(t, y[:,0], label= 'active Mos')    Similarly, I see y[:,1] a lot too...  plt.plot is to plot a line to the graph, right?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I want to create a file which will execute a code, for example:    sleep 60s; dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend   -so that double-clicking on it will be equal to open the terminal and write it in there.    How do I do it? (In windows, I think, it is a .bat file)

How can I make a bash script executable by double clicking just like .exe files in Windows? I tried , but there are two consequences:   the terminal twinkles, disappears, and nothing is done. you must specify to run in terminal in order to work.   I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.  Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?


I'm struggling to have text vertically centred within a background image which has a scroll effect. I have Top: 34%; at the moment to centre the text on my screen however, that is 34% from the top of the navigation menu. Is there a way for me to set it to 50% from the image that is showing? I'm fine with centring text on a normal image with no scroll effect, however, I feel having background-image (css) with scroll effect rather than a normal img tag on the html page is effecting the result. HTML:   .home-section-image {   /* The image used */   background-image: linear-gradient(     rgba(8, 8, 8, 0.05),      rgba(8, 8, 8, 0.25)   ),url("../images/pexels-photo-258109.jpg");   opacity: .80;   border-top: 1px solid #000;      /* Set a specific height */   min-height: 505px;    max-height: 505px;   margin: auto;      /* Create the image scrolling effect */   background-attachment: fixed;   background-position: center;   background-repeat: no-repeat;   background-size: cover; }  .home-section-image h2 {   position: absolute;   top: 34%;   left: 50%;   transform: translate(-50%, -50%);   color: #fff;   -webkit-text-stroke: black 2px;   text-align: center;    font-size: 5vw; } /* Edits text overlaying image positioning, colour of text and adds stroke */

Kay Park Memorials

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I have a problem with my tplink tl-wn823n v2 usb wifi adapter. I can not make it work on ubuntu 16.04. How can I fix this?

Recently I installed Ubuntu 16.04 but cant get the usb wifi adapter to work properly , can anyone help me?  When wifi adpater is plugged , the lsusb output:  Bus 001 Device 003: ID 2357:0109 Bus 001 Device 002: ID 0e0f:000b VMware, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.  Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   When wifi adapter is unplugged , the lsusb output:  Bus 001 Device 002: ID 0e0f:000b VMware, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.  Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


Because of the Higgs mechanism, one must replace the Higgs field $\phi$ with $\phi_0 + \phi_1$ where $\phi_0$ is the vacuum expectation value. As far as I understand, the $\phi_0$ gives the mass term to bosons after developping the product $D_{\mu}\phi D^\mu \phi$. But I don't understand why these mass terms should disappear above the electroweak scale where it is said that the gauge bosons are massless.

Spontaneous electroweak symmetry breaking (i.e. $SU(2)\times U(1)\to U(1)_{em}$ ) is at scale about 100 Gev. So, for , gauge bosons $Z$ & $W$ have masses about 100 GeV. But before this spontaneous symmetry breaking ( i.e. Energy > 100 GeV) the symmetry $SU(2)\times U(1)$ is not broken, and therefore gauge bosons are massless.  The same thing happens when we go around energy about $10^{16}$ GeV, where we have the Grand Unification between electroweak and strong interactions, in some bigger group ($SU(5)$, $SO(10)$ or others). So theoretically we should find gauge bosons $X$ and $Y$ with masses about $10^{16}$ GeV after GUT symmetry breaks into the Standard Model gauge group $SU(3)\times SU(2)\times U(1)$, and we should find massless X and Y bosons at bigger energies (where GUT isn't broken).  So this is what happened in the early universe: when temperature decreased, spontaneous symmetry breaking happened and firstly $X$ & $Y$ gauge bosons obtained mass and finally $Z$ & $W$ bosons obtained mass.   Now, I ask: have I understood this correctly? In other words, if we make experiments at energy above the electroweak scale (100 GeV) we are where $SU(2)\times U(1)$ isn't broken and then we should (experimentally) find $SU(2)$ and $U(1)$ massless gauge bosons, i.e. $W^1$, $W^2$, $W^3$ and $B$ with zero mass? But this is strange, because if I remember well in LHC we have just make experiments at energy about 1 TeV, but we haven't discovered any massless gauge bosons.


I'm reading about group theory and with all new definitions and theorems. I'd like the purposes of these conjugation classes.  What is the big motivation to consider/make conjugation classes in a group?

I am learning group theory, and while learning automorphisms, I came across conjugation as an example in many textbooks. Though the definition itself, (and when considering the case of abelian groups), it seems pretty innocent, I have to admit that I have no intuition about whats happening, or why even such a map is important. Did anyone feel this way when you learnt it? Any examples/references that you have found useful when you learnt it?


As I was told to ask a new question, I better do. :)  On the Internet I read the folowing conversation: Question: Do people say No to mean they are in agreement with negative statements? Answer: We aren't using "no" to agree, we are using "no" to CONFIRM a negative statement.   So my question is does that mean: Mother: We are not buying a new car. Father: No. (he confirms) / Father: Yes. (he agrees)  But somehow I would think if the father agrees or confirms he would buy the new car? So why does he say yes if he agrees? I always thought the father would say yes if he would like to buy the car.  Somehow even in the threads that have been marked as duplicates I couldn't find an answer.

on the internet I read the following explanation: "we aren't using "no" to agree, we are using "no" to CONFIRM the negative statement."  Does that mean you confirm a negative question with no and agree with yes? That somehow seems strange to me?


I've got an Excel file with text in Hindi which I'm trying to read via PHP but I only get gibberish out of it. When I open the .xls File with Numbers, the text looks like this:  But when I copy and paste this exact text here it looks like this: ß[+kq'kh ge ij fuHkZj djrh gSAÞ  When I read it via PHP I get exactly the same gibberish text. Is this an encoding problem in the .xls file and is it somehow possible to extract a UTF-8 encoded version from it?

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.


We've had  by the nature of Meta voting. This guy proposed a pretty good idea, though... change the voting button alt text on Meta from the standard "shows research effort/clear & useful" to something that explains how voting works on Meta. My personal suggestion is "I (dis)agree with this concept/policy change", but I'm sure we can think of something better than that. Thoughts?

Since voting on meta sites mean something different on the main sites, can you change the tooltip as well:   This question is useful and clear --> I agree This question is unclear or not useful --> I disagree This answer is useful --> I agree This answer is not useful --> I disagree   ...or something along those lines.


I previously had Sublime 1 installed on my system. I subsequently installed Sublime 2. I unpinned Sublime 1 from the launcher, opened Sublime 2, and pinned it to the launcher. However, when I run Sublime 2 from the launcher, Sublime 1 runs instead. How can I fix this issue? Thanks.

I installed Sublime Text 2 on 12.04 as per this .  However I don't have adequate permissions when launching the program from the Unity launcher. For example I cannot install packages, or if I add a folder to the sidebar when I close Sublime and reopen, the folder is no longer listed. If I run sudo sublime in the terminal all changes remain after closing.  I've tried chown-ing the Sublime Text 2 folder in usr/lib sudo chown -R mylogin:mylogin /usr/lib/"Sublime Text 2" but this seemed to have no effect.


This picture is given in my textbook regarding an n-p-n transistor circuit:    Why is the emitter grounded? Why can't it be directly and only connected to the negative terminal of Vcc?

For the sake of not incorrectly connecting my power supply and damaging my board I'm going to ask a relatively dumb question. Is ground on my board the negative terminal on my battery? Explicitly should I connect the ground to the negative terminal of the battery?


IMHO asking a good question is far more difficult than giving a good answer, especially because SO is so big and full of possible duplicates.  On the other hand, I think a Q&A site probably should incentivate answering more than asking (just check how many questions remain unanswered).  So, should the question upvotes gain the same rep as the answers?  I don't really have a fixed opinion about this.

After thinking about    which I declined for the reasons , and    I have a proposal.  How about if question upvotes were only worth +5 rep instead of +10? And this was applied retroactively? (answer upvotes would be unchanged from the current behavior, so this would be question specific.)  This seems to be a better solution to the particular  problem  without all the rather serious negative repercussions of increasing the punitive value and/or cost of downvotes across the board.


The one thing that LINQ seems to be missing for me is a way to reference columns by text string. For example, I have a typical GridView set up with sorting like this (the DataSource is bound to a LINQ query in the code-behind):  <asp:GridView ID="MyGridView" runat="server" AllowSorting="True">     <Columns>         <asp:BoundField DataField="field1" SortExpression="field1" HeaderText="Field 1" />         <asp:BoundField DataField="field2" SortExpression="field2" HeaderText="Field 2" />         <%-- etc. --%>     </Columns> </asp:GridView>   To get the sorting to work, I have to use two giant Select statements in the MyGridView_Sorting event handler (to handle ascending and descending):  Dim query = From t In context.MyTables  If e.SortDirection = SortDirection.Ascending Then     Select Case e.SortExpression         Case "field1"             query = query.OrderBy(Function(x) x.field1)         Case "field2"             query = query.OrderBy(Function(x) x.field2)         'etc.'     End Select Else     Select Case e.SortExpression         Case "field1"             query = query.OrderByDescending(Function(x) x.field1)         Case "field2"             query = query.OrderByDescending(Function(x) x.field2)         'etc.'     End Select End If   There has got to be a better way to do this, doesn't there? I'm getting the field name and sort direction from the grid - you'd think there would be a way to easily feed that to the LINQ query without having to translate it field by field. Anyone have a better way?

Is there a pattern using Linq to dynamically create a filter?  I have the need to create custom filtering on a list, in the past I would just dynamically create the SQL...it doesn't seem like this is possible with Linq.


$9^{123456789} \pmod{100}$  I tried to do this in a simpler way:  $$9 \equiv 9 \pmod{100}$$  $$9^1 \equiv 09 \\ 9^2 \equiv 81 \\ 9^3 \equiv 29 \\ 9^4 \equiv 61 \\ 9^5 \equiv 49 \\ 9^6 \equiv 41 \\ 9^7 \equiv 69 \\ 9^8 \equiv 21 \\ 9^9 \equiv 89 \\ 9^{10} \equiv 01$$  I noticed that the odd powers always end in 9 and the even ones in $1$. The leftmost digit follows the sequence $0,2,4,6,8,$... in this order for odd numbers and the other way around for even ones. The sequence has $5$ numbers.  $123456789$ is an odd number. $123456789 \equiv 4 \pmod 5$ so the answer should be $69,$ which is the $4$th of the sequence... but it's $89.$ Close enough, but not quite. What did I do wrong and how can I solve this in this way?

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


Is there a way to make the equation numbers with an over line or over hat?  Can this be done for just a couple equations?

I am writing two equations in an align environment:  \begin{align} x^2+y^2=z^2, \\ x^2=7, \end{align}   I would like the first equation to be labelled with e.g. (1.1) and the second equation to be labelled (1.1'), rather than (1.2).  Is this possible to automate? Do I need to use a hack to manually place the equation number after my second equation? e.g.  \newcommand{\hack}{\hfill({\eqnum}')} % Sketch - I don't know what command to use. \begin{align} x^2+y^2=z^2, \\\nonumber x^2=7,\hack \end{align}   If so, what command can I use to get the equation number? i.e. what should my command \hack be?


If I had 2 circles placed on top of each other, like the cap and bottom of a cylinder, how would I fill in those walls without filling in the circles themselves?  (Basically, a cylinder without its top and bottom).  I'm not looking for a "just use a cylinder" in this case.  Thanks!

There's a way to fill with faces only the area between the larger circle and the the smaller one? I mean.. It's a wheel and I'm trying to fill the rubber part of it.  Using the fill function F it fills everything inside the bigger circle.


In a question  is showed an example of reflection in which Fermat principle involve a maximum, and in comments is said that it could be interesting an example involving refraction but question is left pending. I can think examples in which Fermat principle with refraction involve minima (Snell's law) or stationary optical path length (lenses converging light from a point source to another point), but I can't find a refraction example that involve a maximum.

I posted a similar  about geodesics on Math.SE. Many sources ( for instance) claim that the light could maximize the optical path length in some cases. But I don't think it's actually true since between two points I can always imagine a path with arbitrary length. Therefore, or the light minimizes the optical length or it's stationary (neither maximum nor minimum). My question is: is the trajectory in red in the figure below a local minimum or a stationary curve?   If I'm wrong, please provide some examples which the light propagates in trajectory of maximum length.


I am doing multiple regression analysis, in which i want to eliminate some of the insignificant features.  In most of the machine learning books subset selection, shrinkage methods or PCA is used for reducing number of feature.  Why p-values are not commonly used for feature selection?

I would like to implement an algorithm for automatic model selection.  I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though).   My problem is that I am unable to find a methodology, or an open source implementation (I am woking in java). The methodology I have in mind would be something like:   calculate the correlation matrix of all the factors pick the factors that have a low correlation to each other remove the factors that have a low t-stat add other factors (still based on the low correlation factor found in 2.). reiterate several times until some criterion (e.g AIC) is over a certain threshold or cannot or we can't find a larger value.   I realize there is an R implementation for this (stepAIC), but I find the code quite hard to understand. Also I have not been able to find articles describing the stepwise regression.


I'm trying to use the mirror mod to place hands on a character.  The origin is the direct centre of the scene and the mirror is placed on the Z axis, and yet I get this result:    The viewport is in direct front orthographic mode. Why is my mirror messed up?

I have 2 objects a face and an ear. Mirror modifier works fine for the face. But when I use mirror modifier to duplicate the ear on X axis, it duplicates on Z axis. And when I use mirror modifier on Z axis it mirrors on X axis. How to correct the axis orientation?


I am using Linux mint 16 cinnamon. After my last upgrade free disk space dropped from 4.2GB to around 344MB. Don't know what happened. This is the output of df -h  Filesystem      Size  Used Avail Use% Mounted on /dev/sda10       10G  9.1G  329M  97% / none            4.0K     0  4.0K   0% /sys/fs/cgroup udev            1.7G  4.0K  1.7G   1% /dev tmpfs           345M  1.4M  344M   1% /run none            5.0M     0  5.0M   0% /run/lock none            1.7G  1.3M  1.7G   1% /run/shm none            100M   28K  100M   1% /run/user   How can I clear all the temporary files and folders.  Contents of var/log/dpkg.log for last upgrade are here:

I am using Linux. And within an uncontrolled event, my 4GB system disk is full.  When I try to uninstall some program by sudo apt-get purge program-name, it gives me this error:  /usr/bin/mandb: can't write to /var/cache/man/25843: No space left on device   Is there any system file that can be deleted in this situation?


I want to use routing for all incomming calls to my server and then only use the routing on some of these (depending on values in my database).  I know how routing is done, what I don't know is how to abort routing inside my IRouteHandler.  ex  if (routing)  {   // do routing      var page = BuildManager.CreateInstanceFromVirtualPath(VirtualPath, typeof(IHttpHandler)) as IHttpHandler;     return page; } else  {   // proceed as if no routing has been made }

Is it possible to have an ASP.NET MVC route that uses subdomain information to determine its route?  For example:   user1.domain.com goes to one place user2.domain.com goes to another?   Or, can I make it so both of these go to the same controller/action with a username parameter?


How do I ensure two different instances of a class have the same hash code? So when one of them is in a HashSet, the Contains function returns true.  Here is my code:  public class Position  {      public int row, col;      public override bool Equals(object obj)      {          return ((Position)obj).row == row && ((Position)obj).col == col;      }  }   And here is how I use it:  HashSet<Position> hash = new HashSet<Position>(); Position position = new Position(3, 1); Position position2 = new Position(3, 1); hash.Add(position); Console.WriteLine(hash.Contains(position2));

Given the following class  public class Foo {     public int FooId { get; set; }     public string FooName { get; set; }      public override bool Equals(object obj)     {         Foo fooItem = obj as Foo;          if (fooItem == null)          {            return false;         }          return fooItem.FooId == this.FooId;     }      public override int GetHashCode()     {         // Which is preferred?          return base.GetHashCode();          //return this.FooId.GetHashCode();     } }   I have overridden the Equals method because Foo represent a row for the Foos table.  Which is the preferred method for overriding the GetHashCode?  Why is it important to override GetHashCode?


I am trying to prove that a $n \times n$ matrix $A$ and $A^T$ have the same eigenvalues.  I can prove that $A$ and $A^T$ have the same entries on the diagonal, but I am not sure where to go from there.

Let $ \sigma(A)$ be the set of all eigenvalues of $A$. Show that $ \sigma(A) = \sigma\left(A^T\right)$ where $A^T$ is the transpose matrix of $A$.


I want to write a code for the following diagram in TeX, may you please help me how I can write that:

Can anyone help me in giving commands for commutative diagrams in LaTeX ? It doesn't seem to appear properly in the LaTeX guides that I have. A command for a simple triangular diagram with arrows associated to maps would be good enough, or maybe some appropriate reference.


I would like to write something in a file (let's call it foo.cpp) and include it as a string into my program at compile time, similar to the way #include does it.  Right now I'm using this C preprocessor #define:  #define toString(src) #src   to convert a bunch of code to a string, used as in this example:  const char* str = toString(   int x;   void main(){} );   You can read about macro stringification  if you want.  I would like to move that code to an external file, which would be "linked" at compile-time. I don't want the file to have to be distributed with the program, which would be the case if I were to read it a run-time.  I tried to use an #include directive as shown below, but the compiler refused it:  const char* str = toString( #include "foo.cpp" );   g++ seems to be completely confused, but clang++ gave me this error:  error: embedding a #include directive within macro arguments is not supported   Does anyone know if/how this can be done?  Note: I'm using this to write my GLSL shaders, although I doubt this information is of any use.  PS: Before you tell me this is a duplicate of , putting my code in a giant string in its own file or using an external tool (eg. xxd) to dump its hex representation are not "solutions" for me, as they are not better (ie. easier/cleaner) than my current method.    Update, a few years later: I just realized I never got to answer this question as it was closed as duplicate. I found the answer I was looking for when I saw , itself based on , and have been using it ever since.  In a nutshell, a small assembly file includes the files you want and exposes them under a given NAME, with the three variables NAME_begin, NAME_end and NAME_len allowing you to access their contents from your C code.  This way, you have a normal file containing nothing but the code you want, and it gets read automatically at compile time, instead of having to read it at runtime or having to jump through xxd hoops.

Is there a way to include an entire text file as a string in a C program at compile-time?  something like:   file.txt:  This is a little text file  main.c:  #include <stdio.h> int main(void) {    #blackmagicinclude("file.txt", content)    /*    equiv: char[] content = "This is\na little\ntext file";    */    printf("%s", content); }    obtaining a little program that prints on stdout "This is a little text file"  At the moment I used an hackish python script, but it's butt-ugly and limited to only one variable name, can you tell me another way to do it?


I have a blank screen problem on ubuntu 16.04 start up screen. Initially I was repairing my hard disk with fsck /dev/sda1 from this .   In trying solve the black/blank screen problem on startup, I am following instructions from:    ...to use:  chmod 777 / shutdown -r   etc.  in the 'root terminal' of recovery mode, but it only allows 'read only'. How  can I get it into the 'write mode' for this?  Following the method from:    It allowed chmod 777 / but would not accept shutdown -r

I have messed up my sudoers file and I want to change the permission on it.   When I login in recovery mode, I cannot run the command chmod as it is read-only option.  I tried mount -o remount,rw / in recovery mode. Didn't work for me:  Err : Ext4-fs remount. Opts errors=remount-ro    How can I boot into recovery mode and with read-write option?


Not very good with photography terminology so please bear with me.  I've been looking at replacing my aging point and shoot (a Lumix FX500) and one specific characteristic I am looking for at the new camera is a wide angle lens -- not super wide to a point the image is distorted on the edges but wider than a standard lens (since I view most of the photos on the screen and not on print, I want to capture more of the scene).  I get the sense that 'pocketable' and wide-angle don't really go well together and I've read mixed reviews of several options out there on the market so I was wondering what sort of characteristics I should be looking at?   Should I perhaps be looking at something a little bit more advanced than a basic point and shoot?  (The secondary characteristics I am looking at are: size (i.e: pocketable) and GPS)  Thanks for the suggestions.

I'm looking to buy a compact camera, and having a very wide angle is important to me. I know that review sites often list the real focal length of the lens, but what I'm looking for is something that will show me current models with actually wide field of view. Is there such a resource?


So I'm rendering an animation of 420 frames and each frame is taking more than one hour. I have two render layers, both with the same settings. One is the background and the other the principal object of my scene. I don't have many meshes. Here are my render settings am I doing something wrong?    Here  is what I'm rendering  My computer specifications are:  Intel Core i7-2600 CPU 3.40 ghz Ram 8GB Nvdia Geforce Gtx 555

I am currently using Sheep It! to render my blend (built on v2.68c) on multiple computers, and I noticed something rather strange. According to the log on-site, the frames rendered from other people's blends were completing in 3 to 4 minutes. This was on an 4 core i5. My main rig (with an 8 core i7) was completing frames in no less than half an hour. How is this possible?  To clarify, these people's frames are very complex, often with very detailed textures. I have 2 objects in my blend. Below are the options I changed for my blend:   Aspect Ratio: 1000px x 1000px Output: PNG Clamp Indirect: 0.98 Render Sampling: 128 Min Light Bounces: 0 Max Light Bounces: 4 Cycles Render   Is there something in there that I should change to make it go faster? I can't really comprehend how it's going to quickly.  EDIT: To answer what @Duarte asked...   System Specs: i7-920, 3GB DDR3, GT 630, Windows 10 I have two circles, extended to form a sort of coin with a star on it. It is not complex at all. I have Firefox and Steam running in the background, but not actively. I've been away from the computer for 8 hours and noticed this behavior. (I am running Blender from Steam.) I made sure when I began rendering that the blend was set for CPU rendering.          And to answer what @pycoder asked, yes, I am using Cycles Render.


$f: X \longrightarrow Y$ and $B \subseteq Y$ I am currentry trying to give an example where $f(f^{-1}(B)) \neq B$. I know, that for a function to have an inverse, it must be bijective. My thought process is, that the answer can only be equal to $B$ if the function $f$ is bijective, because only then can every element in $f^{-1}(B)$ be directly traced back to B. Here's where I struggle: How can $f(f^{-1}(B)) \neq B$ if the function needs to be bijective in the first place? Wouldn't this be a contradiction? Or is that exactly what I need to disprove here?

I haven't been able to do this exercise:     Let $f: A \rightarrow B$ be any function. $f^{-1}(X)$ is the inverse   image of $X$. Demonstrate that if $f$ is surjective then $X = f(f^{-1}(X))$ where $X \subseteq B$.   Since $X \subseteq B$, all the elements in $X$ belong to the codomain of $f$.  Since $f$ is surjective, it means that all elements in the codomain $B$ have some preimage in $A$. Given that $X \subseteq B$, all elements in $X$ must also have a preimage in $A$.  Have $\triangle = f^{-1}(X)$, $\triangle$ is now a set containing the preimages of the elements in $X$. Because of this, $\triangle \subseteq A$.  If we evaluate $f(\triangle)$, we...... nope, I don't know what I'm doing now.    What do you think?


How can a (with very simple instruction) make a .deb file continent some .desktop files and shell bash files

I searched for a simple way to create .deb Packages for things which have no source code to compile (configs, shellscripts, proprietary software). This was quite a problem because most of the package tutorials are assuming you have a source tarball you want to compile. Then I've found  short tutorial (german).  Afterwards, I created a small script to create a simple repository. Like this:  rm /export/my-repository/repository/* cd /home/tdeutsch/deb-pkg for i in $(ls | grep my); do dpkg -b ./$i /export/my-repository/repository/$i.deb; done cd /export/avanon-repository/repository gpg --armor --export "My Package Signing Key" > PublicKey apt-ftparchive packages ./ | gzip > Packages.gz apt-ftparchive packages ./ > Packages apt-ftparchive release ./ > /tmp/Release.tmp; mv /tmp/Release.tmp Release gpg --output Release.gpg -ba Release   I added the key to the apt keyring and included the source like this:  deb http://my.default.com/my-repository/ ./   It looks like the repo itself is working well (I ran into some problems, to fix them I needed to add the Packages twice and make the temp-file workaround for the Release file). I also put some downloaded .deb into the repo, it looks like they are also working without problems. But my self created packages didn't... Wenn i do sudo apt-get update, they are causing errors like this:  E: Problem parsing dependency Depends E: Error occurred while processing my-printerconf (NewVersion2) E: Problem with MergeList /var/lib/apt/lists/my.default.com_my-repository_._Packages E: The package lists or status file could not be parsed or opened.   Has anyone an idea what I did wrong?  UPDATE 2012-03-06: Just a a hint for another person who is searching for a easy way to create DEBs: Take a look at .


Hi I am new to blender and am trying my hands on creating a house from different 3d models imported from freely available websites.  So I downloaded a few study rooms and bedrooms from . However now when I try to apply texture specifically to (say) a bedsheet, it is commonly applied to all the walls and the floors and a lot of furniture around.  How do I unlink all these objects and apply materials specifically to individual components of the house?

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


I am able to style the colors of a geology polygon shapefile according to the Red, Green and Blue fields of the attribute table using data defined override with the expression: "color_rgb("RED" , "GREEN" , "BLUE")", which works great and the colors on the map canvas render properly. However the colors in the legend symbols are totally random and don't correspond to the colors on the map. I see a similar issue used to arise where the legend symbols were all black in older versions of QGIS...

I have a large geology data set that I need to display using an industry standard set of symbols and colours. The symbols and colours are attributes of the data. I have been using the data defined symbols capability of the dev build of QGIS (code revision b805894) to display the data according to its attributes. This works perfectly in terms of displaying the data correctly in the map window.  The problem arises when I try to create a legend in the composer. The data-defined colours displayed on the map don't pull through to the legend.  Here are some screens shots. The first shows the map window. You can see the problem manifesting in the Layers box on the left. The symbols are all coloured black.  The second screen shot shows the composer window with a legend.


At the end of Fantastic Beasts and Where to Find Them (first movie from the series)      All city including Jacob is obliviated by the rain.    The main characters are sad about it, so it seems they believe it really worked. But at the beginning of the Fantastic Beasts: The Crimes of Grindelwald (second movie) we find out that      the spell didn't work on Jacob and he still remembers what happened and he still is in love with Queenie   How is that possible? Is it possible that more people would also not be enchanted?  My thought:       Did Queenie managed that? She would be willing to probably.

At the end of Fantastic Beasts and Where to Find Them,      Newt send up the  with the short-term memory eraser.   After they do that,      Jacob Kowalski goes out into the rain to forget what happened.   But then      Queenie goes out and conjures up an umbrella, in addition to the fact that he was under cover for most of the time.   Then Jacob goes and wanders off, bumping into Newt along the way.  But when     Queenie goes into his new bakery, he appears to recognize her.   This is in addition to that     His confections are magical-beasts shaped.   This would imply that he still remembers things.  So, the question is:  Did Jacob not lose all of his memories? If he did, what happened at the end with Queenie?


My netbook's xp os doesn't work so i want to install lubuntu but what i have to do? Download the llubuntus latest version and then my netbook's drivers and that's it? Help   Netbook (Acer a0531h)  Thanks 😟

I would like to see a full how-to guide on how to install Ubuntu.


My friend wrote a status like this  Working on read-only environment makes you couldn't do anything. You can only get notice and warning. We are required to obey and submit to the circumstances   should i comment ," If it is writeable environment ... " or "If it were writeable environment..." ?  Thanks.

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


I am trying to solve this using a geometric series. Pretty much the question goes like this: We roll a pair of fair dice repeatedly and independently and stop as soon as the sum of the dice is equal to 7.   My random variable is: $X =$ the number of times we roll.  To calculate the expected value of time we will roll I do somehting like this:  $$E(X) = X_1P_1+X_2P_2+X_3P_3+...+X_nP_n$$  The probability or rolling a 7 using 2 dice is $\frac 6 {36}=\frac1 6$ so then,  $$E(X)=1*\frac 1 6+2*\frac 1 6+3*\frac 1 6+...+n*\frac 1 6$$  Not to sure about this:  $$E(X)=\frac 1 6 \sum_{n=1}^{\infty} n*\frac 1 6$$  And if this is the correct sequence what can I do with it next?

I am having trouble figuring out the expected value in situations were the examples are going to infinity.  Example:  I have a fair dice with 8 sides. I keep a counter ($k$) of the rounds I play. Each round I increase the counter by 1 and I roll the die. I keep doing this until I roll a 1 or an 8.  So I'll define a random variable $X$ to be the amount of rounds played. I know that the odds of rolling a 1 or a 8 on a 8 sided die is $\frac1 4$ otherwise it is $\frac3 4$. The way I am trying to solve the expected value is by using a geometric series. This is where I am getting stuck I think it should look like this:  $E(X)=X_1P_1+X_2P_2+X_3P_3+...+X_nP_n$  $E(X)=1*\frac1 4+2*\frac1 4+3*\frac1 4+...+n*\frac1 4$  I am unsure how to turn this into a sum.


Say a program receives an input string "8*10+6/2" and should output 83, in this case. how to handle the operator?   I can chop the string into individual strings, then detect whether it is a number or operator. If it is an operator I can convert it to int. But I have no idea how to handle the operator so that the calculation works.

If I have a string with a valid math expression such as:  String s = "1 + 2 * 7";   Is there a built in library/function in .NET that will parse and evaluate that expression for me and return the result? In this case 15.


On my laptop the eject button for the CD/DVD drive is placed in a very unfortunate position and I hit it a dozen times per day and the tray pops out. I found many solutions which seemed to work for other people:  From man eject:     -i on | 1 | off | 0        This option controls locking of the hardware  eject  button.  When      enabled, the drive will not be ejected when the button is pressed.      This is useful when you are carrying a laptop in a bag or case and      don't want it to eject if the button is inadvertently pressed.   This seems to be exactly what I need. eject -i on successfully returns:  CD-Drive may NOT be ejected with device button   However, hitting the device button still ejects the drive. As suggested in  invoking  echo 1 > /proc/sys/dev/cdrom/lock   did not help either, lock already contains 1. The information from /proc/sys/dev/cdrom/info suggests that locking is possible:  drive name:            sr0 drive speed:           24 drive # of slots:      1 Can close tray:        1 Can open tray:         1 Can lock tray:         1 Can change speed:      1 Can select disk:       0 Can read multisession: 1 Can read MCN:          1 Reports media changed: 1   The  is not in the Debian repository and it does not build on my system.  How do I lock my drive so that hitting the hardware switch on the drive would no pop out the drive?

Up until Fedora 14 I was successfully using  to enable/disable the CD/DVD eject button on my laptop (Thinkpad T410). Sadly it has stopped working now.  I've consulted the methods discussed in these 2 questions:       None of which have worked for me. So I turn back to cdctl to see if we can't fix what's broken with it, since it's worked for so long.  Debugging the issue  So starting with cdctl switches I notice that most things seem to work just fine.  Examples  These things work.  ejects the drive  $ cdctl -e   list capabilities  $ cdctl -k Tray close             : 1 Tray open              : 1 Can disable eject      : 1 Selectable spin speed  : 1 Is a jukebox           : 0 Is multisession capable: 1 Can read the MCN (UPC) : 1 Can report media change: 1 Can play audio discs   : 1 Can do a hard reset    : 1 Can report drive status: 1   According to that list cdctl even thinks that it can enable/disable the eject button.   Can disable eject      : 1    So I continue on with debugging the issue.  Debugging cdctl  So I figure lets do an strace on cdctl to see if it can shed some light on what's going on.  $ strace cdctl -o1 ... brk(0)                                  = 0x1371000 open("/dev/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory) open("/dev/cd", O_RDONLY|O_NONBLOCK)    = -1 ENOENT (No such file or directory) open("/dev/scd0", O_RDONLY|O_NONBLOCK)  = -1 ENOENT (No such file or directory) open("/dev/sr0", O_RDONLY|O_NONBLOCK)   = 3 ioctl(3, CDROM_LOCKDOOR, 0x1)           = 0 close(3)                                = 0 exit_group(0)                           = ? +++ exited with 0 +++   Curiously it seems like cdctl thinks it's disabling the button.   $ strace cdctl -o1 ioctl(3, CDROM_LOCKDOOR, 0x1)           = 0  $ strace cdctl -o0 ioctl(3, CDROM_LOCKDOOR, 0)             = 0   NOTE: If I understand this right, the return of a 0 means it was successful.  One thing that caught my eye here was the list of devices that cdctl is attempting to interact with. So I thought "what if I try these devices with eject"?  eject command  One of the other commands I used to use years ago was the eject command to interact with the CD/DVD device. I noticed that this command also now has a similar named switch:  $ eject --help  -i, --manualeject <on|off>  toggle manual eject protection on/off   Example  $ eject -i 1 /dev/sr0 eject: CD-Drive may NOT be ejected with device button  $ eject -i 0 /dev/sr0 eject: CD-Drive may be ejected with device button   So eject too thinks that it's disabling the button, yet it isn't either. Using strace here I see the same system calls:  $ strace eject -i 1 /dev/sr0 |& grep ioctl ioctl(3, CDROM_LOCKDOOR, 0x1)           = 0  $ strace eject -i 0 /dev/sr0 |& grep ioctl ioctl(3, CDROM_LOCKDOOR, 0)             = 0   So now I'm wondering if UDEV or something else is potentially blocking or taking ownership of device?  Thoughts?


Let $A$ be a $227 \times 227$ matrix with entries from $\mathbb{Z}_{227}$. If A has distinct eigenvalues what is the trace of $A$?  I am guessing the answer is zero. Since the eigenvalues of $A$ need not be in $\mathbb{Z}_{227}$, I dont know how to prove this.  Give me some hint to prove this. Thanks in advance.

Let $A$ be a $227\times227$ matrix with entries in $\mathbb{Z}_{227}$, such that all the eigenvalues are distinct. What is the trace of $A$?


I want to develop ios apps but I don't have Mac system, I heard that we can develop without using Mac. Is that true? If so please tell me how to do that as I want to become iOS developer

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?  The only other way I can think of doing this is to run a Mac VM image on a VMWare server running on Windows, although I'm not too sure how legal this is.


Is there a way through which I can see the number of times an application or package from the Ubuntu Software Center has been downloaded?  If not, is there some sort of way in which I can view the number of times a package has been downloaded on the Ubuntu distro?  NOTE I want to know the universal downloads, not just the downloads that I've made of a particular application.

Is there any way to see how many times a package in the repos (say, firefox) has been installed?


Are there any technical or others reasons why Android is still a firmware and not an OS which can be just installed without a lot of hassle?  Why there is no universal image which could detect appropriate drivers (kernel modules), partition NAND in some standard way and configure boot loader to boot updated OS version?  What stops Google from making a real (less firmware-like) OS (an OS for small ARM, x86 etc. devices)?

I am used to install and remove various operating systems in my PCs, even having several at a time.  Usually, to install a new OS means:   Burn the ISO to a CD/DVD/USB. Insert it. Boot. (Maybe you have to tweak a bit the BIOS first).   The only difference between PCs is its CPU architecture: x86, x86_64, arm, etc. Depending on that, you have to download one ISO or another. But I never have to worry about which graphic card, mouse, keyboard, screen, network card, etc. it has. The install wizard automatically detects that and installs the corresponding drivers. Sometimes, if they are not bundled, the installer also downloads them. Anyway, the key point here is that the ISO is always the same.  Now, many mobile OS come out: Ubuntu, Tizen, Firefox OS, the omnipresent Android, and why not any Linux ARM distro out there!. Sadly I have a random chinese mobile, that surely will never get official support in any platform, and I will never be able to test them.  But... Are not today's phones just tiny ARM PCs? Why is installation that different? Why do I always need to have a precompiled monolithic ROM specific for my phone model? Why not just a single "ISO" per OS for any phone that detects and installs automatically the needed drivers, just like always has been in the PC market?  Note: I understand the problem with privative drivers, but I remember Debian asking me for those when there were no libre alternatives at installation, and I could install them then or later. I suppose that workaround could be used in those cases too. Correct me if I'm wrong.


Problem   Find generalitazion for matrix A exponents, when $n\in\{1,2,3,\dots\},n \in \mathbb{N}$    $$A^n=\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}^n , \text{ when } n \in \mathbb{N}$$  Proof generalization by induction.   Attempt to solve   By computing a set of $A$ exponent's $n\in \{\ 1,2,3,4 \}$. It is possible  to form generalization that is applicable for set $n\in \{1,2,3,4 \}$  $$ A^1=\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix},A^2=\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix},A^3=\begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix},A^4=\begin{bmatrix} 1 & 4 \\ 0 & 1 \end{bmatrix} \dots A^n =\begin{bmatrix} 1 & n \\ 0 & 1 \end{bmatrix} $$   Induction proof   Induction hypothesis  Assume expression is valid when $n=k$  $$ A^k = \begin{bmatrix} 1 & k \\ 0 & 1\end{bmatrix} $$  Base case  When $n=1$ $$ A^1=\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} $$ which is valid by definition.   Induction step  When $n=k+1$  $$ A^{k+1} = \begin{bmatrix} 1 & k+1 \\ 0 & 1\end{bmatrix}$$  $$ A^{k+1}=A^kA^1 $$  By utilizing induction hypothesis we have  $$ \implies A^{k+1}=\begin{bmatrix} 1 & k \\ 0 & 1\end{bmatrix}\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} $$ By utilizing matrix multiplication we have $$ \implies A^{k+1} \begin{bmatrix} 1\cdot 1 + k\cdot 0 & 1 \cdot 1 + 1 \cdot k \\ 0 \cdot 1 + 1 \cdot 0 & 0 \cdot 1 + 1 \cdot 1 \end{bmatrix} $$ $$ \implies A^{k+1}=\begin{bmatrix} 1 & k+1 \\ 0 & 1 \end{bmatrix} $$  $$ \tag*{$\square$} $$     EDIT   The point of posting this was to have comment on if my solution seems correct or not. If you can notice something that doesn't look right, let me know !

Well, the original task was to figure out what the following expression evaluates to for any $n$.  $$\begin{pmatrix} 1 & 1 \\ 0 & 1\end{pmatrix}^{\large n}$$  By trying out different values of $n$, I found the pattern: $$\begin{pmatrix} 1 & 1 \\ 0 & 1\end{pmatrix}^{\large n} = \begin{pmatrix} 1 & n \\ 0 & 1\end{pmatrix}$$  But I have yet to figure out how to prove it algebraically.   Suggestions?


How do I move the task bar back to the bottom of the screen where it belongs from it's stupid placement on the left.  I won't use Ubuntu as long as it has to be in the way where it is now.

I can’t get used to the new Unity system. I’d like to move the left Unity panel to the bottom of screen (like Windows 7 – more similar is better).  But I can't find a way. Is it possible?


Let $(X,d_{X})$ be a metric space, and let $(Y,d_{Y})$ be a complete metric space. The subspace $(C(X\to Y),d_{\infty})$ is a complete subspace of $(B(X\to Y),d_{\infty})$. In other words, every Cauchy sequence of functions in $C(X\to Y)$ converges to a function in $C(X\to Y)$.  MY ATTEMPT  Here, $B(X\to Y)$ represents the set of bounded functions from $X$ to $Y$, $C(X\to Y)$ is the set of bounded and continuous functions from $X$ to $Y$ and $d_{\infty}$ is the sup norm distance.  I was thinking about proving that $B(X\to Y)$ is complete, whence we conclude that $C(X\to Y)$ is complete, since it is already closed.  However I am not able to do so. Could someone provide a proof based on such line of reasoning? Any other approach is welcome as well.

I am reading the proof for this theorem and it goes as follows:  To see that $B(X,Y)$ is complete when $Y$ is complete, let $\left\{ T_n \right\}$ be a Cauchy sequence (of operators) in $B(X,Y)$, that is, $$\|\ T_n - T_m \|\ \to 0 \hspace{.5cm} \text{as} \hspace{.5cm} n,m \to \infty.$$ Then, for each $x \in X$, $$\|\ T_n x - T_m x \|\ = \|\ (T_n - T_m)x \|\ \leq \|\ T_n - T_m \|\ \|\ x \|\ \to 0 \hspace{.5cm} \text{as} \space\ n,m \to \infty$$ which imples that $\left\{ T_n x \right\} $ is a Cauchy sequence in $Y$. As $Y$ is complete, $\left\{ T_n x \right\}$ converges to some vector, denoted by $Tx$ in $Y$. We have just defined a transformation $T: X \to Y$ by $x \mapsto Tx = \displaystyle\lim_{n\to\infty} T_n x$. Linearity of $T$ is clear. Next, we show that $T \in B(X,Y)$ and $T_n \to T$ with respect to the operator norm. For any $\epsilon > 0$ and any $x \in X$: \begin{align*} \|\ (T_n - T)x \|\ &= \|\ (T_n - T_m)x + (T_m - T)x \|\ \\ &\leq \|\ (T_n - T_m)x \|\ + \|\ (T_m - T)x \|\ \\ &\leq \|\ T_n - T_m \|\ \|\ x \|\ + \|\ T_m x - Tx \|\ \\ &< \dfrac{\epsilon}{2} \|\ x \|\ + \dfrac{\epsilon}{2} \|\ x \|\ \hspace{1cm} \exists N \in \mathbb{N} \space\ \text{when} \space\ m,n > N \\ &= \epsilon \|\ x \|\ \\ \end{align*} Therefore, $\|\ T_n - T \|\ < \epsilon$ whenever $n \geq N$. This shows that $T_n \to T$ in operator norm, and that $\|\ T_n - T \|\ \to 0$ as $n \to \infty$, and so $T$ is continuous.   My question: Why is $\|\ T_m x - Tx \|\ < \dfrac{\epsilon}{2} \|\ x \|\ $ ? That is the only part of this proof that baffles me.


Error mounting /dev/sda4 at /media/danny/70D49480D4944A6C: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda4" "/media/danny/70D49480D4944A6C"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   thats what it said, can someone help me?

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


I guess I screwed up with a screw's head. This is not unusual and the question answered all over the place, but all existing answers I found were for wood screws.  Mine's a small (diam ~1/12th inch, length ~1/6th inch?) brazen round-headed slot screw that holds the name tag of a brazen bell system, similar to . The screw was turned in with too much force. When trying too loosen it, the head lost some brass around the slot, so I can't get any force into the screw with my screwdrivers any more.  What can I try, before changing the whole bell system?

I have wood screws whose heads are stripped from trying to remove them with a drill. The drill (or screwdrivers) can't grip the heads anymore. What can i use to remove these screws easily?


Sorry for what I'm sure had have been asked in the past, but it's very hard to search for a question like this. "!=" and "!==" are not exactly search friendly. If anyone knows a duplicate question you can point me to it.  What is the difference between doing myVar != null and myVar !== null? I know that != is not equal and !== is not equal value or not equal type, but when comparing to null is there ever a case where they would return different results? Is one better to use than the other?

What is the difference between == and === in JavaScript?  I have also seen != and !== operators.  Are there more such operators?


I have a tar that was generated on a linux machine. I need to upload part of that tar to another linux machine. The full tar is huge and will take hours to upload. I am now on a Mac OSX machine and this is my problem:   I extract the tar to a folder and locate what I need to upload to the new server I create a smaller tar containing just what I want to upload. I upload and extract that to the new linux machine When I look the server it is full of ._ files. For every file uploaded there is a ._ file, like text1.txt, ._text1.txt, text2.txt, ._text2.txt...   OSX is including these files on the tar.  I have tried to do this  tar --exclude='._*' -cvf newTar  .    without difference.   I do not have ssh access to the new server now.  What can I do to solve that? How do I generate a clean tar.

I'm wanting to create a tar archive of a specific directory (with its subdirectories of course). But when I do it, using the tar command, I get a list of files that were included, for example:     a calendar_final/._style.css      a calendar_final/style.css   As you can see, there are two versions of the same file. This goes for every file, and there are many. How do I exclude the temporary files, with the ._ prefix, from the tar archive?


Show that $\sqrt n$ is irrational if $n$ is not a perfect square, using the method of infinite descent. I know how to prove this by doing a contradiction proof and using The Fundamental Theorem of Arithmetic, but now I'm asked to use infinite descent to prove it. Then the very next problem says "Why does the method of the text fail to show that $\sqrt n$ is irrational if $n$ is a perfect square?" I'm confused by this. Any hints or solutions are greatly appreciated. I was thinking of the standard argument, let $\sqrt n = {a\over b}$ where $gcd(a,b)=1$ and then through some algebra arrive at a common factor for both $a$ and $b$ which contradicts the fact that $gcd(a,b)=1$ and so we can apply this over and over again, but then I don't understand how the next problem says to explain why this method fails.

I found the following proof arguing for the irrationality of $\sqrt{2}$.     Suppose for the sake of contradiction that $\sqrt{2}$ is rational, and choose the least integer $q > 0$ such that $(\sqrt{2} - 1)q$ is a nonnegative integer. Let $q'::= (\sqrt{2} - 1)q$. Clearly $0 < q' < q$. But an easy computation shows that $(\sqrt{2} - 1)q'$ is a nonnegative integer, contradicting the minimality of $q$.   Clearly, this is a vague proof in that it expects the reader to work out the math involved on his own. I took that as an exercise and worked out the following:  Assuming $\sqrt{2}$ to be rational, let $$\sqrt{2} = \frac{p}{q}$$ where $p$ and $q$ are least possible integers.  Clearly then, $\sqrt{2} - 1$ would also be rational, $$\sqrt{2} - 1 = \frac{p-q}{q}$$ where both $(p-q)$ and $q$ are also integers.  Multiplying both sides by $q$, we get $$(\sqrt{2} - 1)q = (p-q) = q'$$ where $q'$ is an integer. Using, $2>\sqrt{2} > 1$ , we get $$1>\sqrt{2}-1>0$$ proving that $q'$ is a non-negative integer.  As stated in the proof, computing $(\sqrt{2}-1)q'$ we get, $$(\sqrt{2}-1)q' = \frac{(p-q)^2}{q}$$which is not necessarily an integer (in fact necessarily not an integer). However, the proof claims it to be.  Am I missing something or something is wrong with how I proceeded?  Here is a link to the textbook where I found this proof: , (p 32, problem 1.14).  P.S. This is my first post here and my first time with TeX. I'd also like to know if there is anything wrong with the way my question is presented.


An example problem. The actual problem uses datetimes but this simplifies it for this example unordered_list = [Class(letter='A', value=5),                    Class(letter='B', value=3),                    Class(letter='C', value=2),                    Class(letter='D', value=8),                    Class(letter='E', value=5),                    Class(letter='F', value=8)]  sorted_list = fun(unordered_list)  expected_result = [Class(letter='C', value=2),                    Class(letter='B', value=3),                    (Class(letter='A', value=5), Class(letter='E', value=5)),                    (Class(letter='D', value=8), Class(letter='F', value=8))] # or expected_result = [(Class(letter='C', value=2)),                    (Class(letter='B', value=3)),                    (Class(letter='A', value=5), Class(letter='E', value=5)),                    (Class(letter='D', value=8), Class(letter='F', value=8))]  I don't really mind what format they're in; list, set, tuple I'm not picky. I've had a go at answering the question myself below. However I think there is a faster or more pythonic method. Bit of extra code if you want to run the example problem class Class:     def __init__(self, letter, value):         self.letter = letter         self.value = value      def __str__(self):         return self.letter+'->'+str(self.value)  The python sort method (sorted(unordered_list, key=lambda x: x.value)) does not solve this problem by itself because items of the same value aren't grouped

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves.  The list looks like:  >>> ut [<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>,  <Tag: aes>, <Tag: ajax> ...]   Each object has a count:  >>> ut[1].count 1L   I need to sort the list by number of counts descending.  I've seen several methods for this, but I'm looking for best practice in Python.


I'm trying to run a script that:  1. parses an xml file, that contains an arbitary id (say xml001)  2. generates a new module (say xml001.py)  3. imports the generated module and evaluate a function contained within it.  As I don't know the generated module name in advance, I'm not sure how I can import it!  This code does not work....  modulefile = something + ruleid + '.py' writer = open(modulefile,'wb') writer.write(code and sh1t) .... ....  modulename = replace(modulefile,'.py','')  eval('import %s as gc'%modulename) # import ruleid as gc  result = gc.evaluateRule(thing)   Gets an error message of  Traceback (most recent call last):   File "C:\Stuff\roughwork4.py", line 152, in <module>     eval('import %s as gc'%modulename)   File "<string>", line 1     import booleanExpressionA12345 as gc          ^ SyntaxError: invalid syntax   Nor this where I've replaced the eval() bit (taken from )...  modulename = open(modulefile) gc = importCode(modulename,'gc')   Error message:  Traceback (most recent call last):   File "C:\Stuff\roughwork4.py", line 161, in <module>     result = gc.evaluateRule(rowvalueslist) AttributeError: 'module' object has no attribute 'evaluateRule'   I appreciate any help!  ps running on windows7, using eclipse ide....

I'm writing a Python application that takes as a command as an argument, for example:  $ python myapp.py command1   I want the application to be extensible, that is, to be able to add new modules that implement new commands without having to change the main application source. The tree looks something like:  myapp/     __init__.py     commands/         __init__.py         command1.py         command2.py     foo.py     bar.py   So I want the application to find the available command modules at runtime and execute the appropriate one.  Python defines an __import__ function, which takes a string for a module name:     __import__(name, globals=None, locals=None, fromlist=(), level=0)      The function imports the module name, potentially using the given globals and locals to determine how to interpret the name in a package context. The fromlist gives the names of objects or submodules that should be imported from the module given by name.       Source:    So currently I have something like:  command = sys.argv[1] try:     command_module = __import__("myapp.commands.%s" % command, fromlist=["myapp.commands"]) except ImportError:     # Display error message  command_module.run()   This works just fine, I'm just wondering if there is possibly a more idiomatic way to accomplish what we are doing with this code.  Note that I specifically don't want to get in to using eggs or extension points. This is not an open-source project and I don't expect there to be "plugins". The point is to simplify the main application code and remove the need to modify it each time a new command module is added.


If $f: [1, \infty ) \rightarrow \mathbb{R}$ is uniformly continuous, prove that there exists a finite positive number M such that $|f(x)| \leq Mx$ for all $ x\geq 1$.  In my mind, I must prove that $M$ is positive, and then prove that $M$ is finite.  Proving that M is nonnegative is obvious due to the definition of absolute value.  I'm having a hard time proving that $M \neq 0$ though.  If $M = 0$, then $|f(x)| \leq 0 \ \Rightarrow f(x) =0$ for all $ x\geq 1$.  But the problem states nothing about $f$ being onto, so $f(x) = 0$ seems to be a legitimate function.  I'm clueless as to how to prove $M$ is finite.  It seems to me that if $|f(x)| \leq Mx$, then $|f(x)| \leq \infty \times x = \infty$. So why can't $M$ be infinite?

$f$ defined on $[1,\infty )$ is uniformly continuous. Then $\exists M>0$ s.t. $\frac{|f(x)|}{x}\le M$ for $x\ge 1$.  I know f uniformly continuous $\implies \forall\varepsilon > 0s.t.\forall x,y\in [1,\infty)$, $$|f(x)-f(y)|<\varepsilon \space\space\forall |x-y|<\delta$$  By Mean value theorem, $\exists c\in (x,y)\forall x,y\in [1,\infty)$ such that   $$\frac{f(x)-f(y)}{x-y}=f'(c)$$  $$\frac{|f(x)-f(y)|}{|x-y|}=|f'(c)|<M$$ for some $M>0$  $$|f(x)-f(y)|<M|x-y|<M\delta $$  How can I get an expression for $|f(x)|/x$?


I have a 10GB Ubuntu partition and I am starting to run out of hard disk space.    What are some large things I can remove to free up space and where are they located?

Every time I install a new Linux kernel, it gets left in the grub_config, making the boot menu longer each time.    I know I can manually search through the installed packages and remove them.  Does Ubuntu provide any easier way to clean them up or keep them from showing in the boot list?


I work for a nonprofit organization that contracts with a local IT outfit. We are currently using three enterprise SSD drives in our Dell PowerEdge R820 rig, set up in a RAID 5 configuration. We have been having discussions about upping our capacity to at least 1 TB (possibly 2 TB), because we always seem to be up against our capacity limit as things stand now.  The contracted IT outfit has recommended three Samsung SM863 SATA 1.92TB (Enterprise) drives to replace the current drives. Their cost on the drives was going to bring our total to around $6,000 (not including labor). Of course, you can buy these drives direct from Samsung for $1,260. This is where my mistrust of this recommendation began to grow, as a $1,000 price difference from OEM versus the IT outfit is very odd to say the least.     I've done a bit of research and found that when it comes to solid state, the enterprise drives have about the same median lifespan as the consumer level drives, like the Samsung EVO 850 1TB, which sell for considerably less money (around $300 each) or Samsung PRO 850 1TB ($400). The median lifespan on the 850 EVO 1.5 million hours versus the enterprise level, which are 2 million hours. The 850 PRO has 2 million hours.   These are a few of the articles I found about Enterprise versus Consumer:      The guy we contract with for IT is totally against using anything less than Enterprise-level drives in our server. We currently have about 30 computers in our facility that are connected to the server at any given time.   My question is, what should we as a non-profit do in this situation? We have the ultimate authority over what hardware we use because we own the server. Should we go against the advice of our contracted tech and go with EVO or PRO drives or will we regret it down the line?   Given the price differences, we CAN afford to keep a couple of EVO or PRO drives as backup in case the drives fail. We could NOT do that with the Enterprise drives (if we can afford them at all), since they are $1,200 each.   We can buy any of the drives direct from Samsung and get the OEM warranty of three years for EVO or 10 years for PRO that come with them, too.

I am in need of a terabyte or so of storage space for Lucene indices on a testing server.  I'm having a hard time differentiating between disks like the  for about $450 vs  of dollars.  What concerns should I have regarding the 840 evo, and what should I be looking for?  This server will be used strictly for in-house testing purposes by our development team and will have to put up with periodic load testing.


I'm very new to this so bear with me. I have a NameCheap account for DNS, an Amazon AWS Elastic Beanstalk account for hosting, and a Google GSuite account for email.  I want to set up my DNS so traffic from both mydomain.com and www.mydomain.com goes to my AWS site. At first, only www traffic was getting through. Then I added the "@" record below and it started working, but I think it might have broken my email because now I'm not receiving anything. It used to work and I didn't modify any of the MX records.  Type            Host   Value CNAME Record    @      mydomain-prod.us-east-2.elasticbeanstalk.com. CNAME Record    www    mydomain-prod.us-east-2.elasticbeanstalk.com.   How do I configure my DNS so traffic from both mydomain.com and www.mydomain.com goes to my AWS site and my email still works?  Edit - I don't think that this question is a duplicate. I'm asking how to make my email work with forwarding my bare domain to www. The linked question doesn't mention email and doesn't answer my question.

This is a  about CNAMEs at the apices (or roots) of zones   It's relatively common knowledge that CNAME records at the apex of a domain are a taboo practice.  Example: example.com. IN CNAME ithurts.example.net.  In a best case scenario nameserver software might refuse to load the configuration, and in the worst case it might accept this configuration and invalidate the configuration for example.com.  Recently I had a webhosting company pass instructions to a business unit that we needed to CNAME the apex of our domain to a new record. Knowing that this would be a suicide config when fed to BIND, I advised them that we would not be able to comply and that this was bunk advice in general. The webhosting company took the stance that it is not outright forbidden by standard defining RFCs and that their software supports it. If we could not CNAME the apex, their advice was to have no apex record at all and they would not provide a redirecting webserver. ...What?  Most of us know that  insists that A CNAME record is not allowed to coexist with any other data., but let's be honest with ourselves here, that RFC is only Informational. The closest I know to verbiage that forbids the practice is from :     If a CNAME RR is present at a node, no other data should be   present; this ensures that the data for a canonical name and its aliases   cannot be different.   Unfortunately I've been in the industry long enough to know that "should not" is not the same as "must not", and that's enough rope for most software designers to hang themselves with. Knowing that anything short of a concise link to a slam dunk would be a waste of my time, I ended up letting the company get away with a scolding for recommending configurations that could break commonly used software without proper disclosure.  This brings us to the Q&A. For once I'd like us to get really technical about the insanity of apex CNAMEs, and not skirt around the issue like we usually do when someone posts on the subject.  is off limits, as are any other Informational RFC applicable here that I didn't think of. Let's shut this baby down.


I live in France and would like to make a steak and kidney pie.  I use chuck in the UK which cut should I ask for here in France?

What is the difference between French and British cuts of beef?   I am told they just butcher the animals dfferently. Certainly the cuts don't seem the same. For example is faux fillet really exactly the same as British sirloin and is entrecôte really the same as rib steak?  Here is a picture of British beef cuts.


Can somebody explain the difference between unit, component, and system testing with a real example. What I understand is unit testing is about testing individual functions with mock services if the functions use any, and component and system is about testing whole classes and their interaction, but really don't actually get the difference between them. Any detailed explanation with a real example would be great.

I  have read similar questions here but it did not help. My understanding is as follows:  Integration testing - done by developers, integrating low-level components together System testing - testing of a single system, as a whole System integration testing - testing systems together (e.g. front-end with database and external provider).  In practice, often there is no system testing of individual subsystems (we do not test separately the UI or the database layer, usually), we test it together in SIT. Can I even consider the UI or the DB layer be a separate system? But when then testing the whole thing, isn't it again System testing?


How do I get Windows back? I don't know how, I know Ubuntu is good and all, I really want to get Windows back?  Like I want to delete the Ubuntu partition okay?

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


Let $X$ be a normed space and $F$ a closed subspace. On $X/F$ let us take the quotient norm $||[x]|| = \inf_{y \in F} ||x - y||$. Consider the quotient $q : X \rightarrow X/F$. I can see that, if $||x|| = 1$, then $||q(x)|| = \inf_{y \in F} ||x - y|| \leq ||x - 0|| = 1$ since $0 \in F$. This proves that $q$ is bounded and $||q|| \leq 1$. How may I show that $||q|| = 1$?

How do I show that given $M$ a closed subspace of a normed space $X$, and let $\pi$ be the canonical projection of X onto $X/M$. Prove that $\|\pi\| = 1$.  I figure I could use Riesz' lemma and set $\|\pi\| = 1$, that's as far as I got.  I could also use the fact that the canonical map is a contraction so I would have $\|\pi(x)\| \leq \|x\| \Rightarrow \frac{\|\pi(x)\|}{\|x\|} \leq 1$ and taking a supremum then we get the desired result. This doesn't seem as rigorous.


As the pic above , in the tile there us small squares , each square have its own drawnings , how can make the same tile in blender ?

I am creating a model of a glass and I would like to put a drawing on it (a png picture).  I know how to do it using Blender Render, but not with Cycles Render. Help :)


I'm using gdal2tiles to tile huge geoTIFF image, but it takes a long time. I tried using the nb_processes param but only one core is working hard.  My command line:  gdal2tiles.py -e -p geodetic -nb_processes=4 -k -v -w google image.tif TILES/   How can I achieve multicore tiling?

I know that question is rather vague but please bear w/me.  I'm trying to get an idea of what sort of product performance - specifically timing - people have seen for various methodologies they have used to create google/bing map tiles.  There are a slew of methods for how to do this (e.g. gdal2tiles, FME, maptiler, etc).  An initial attempt at simply taking a large PNG and creating tiles using imagemagick, on a pretty decent linux server, yielded some pretty long processing times and so I wanted to see what other people are using in production.  New tiles would need to be generated at least daily and so turnaround time on this is pretty critical.  The only real requirement is that it can run on a linux server.  Obviously, free is better but I don't want to restrict myself to that.  The input can be raw gridded/raster data or a large image.  The output needs to be image tiles capable of being used as-is in google or bing maps.  Just for the sake of comparison, I'll say that the timings should be for google map's zoom level 7.    I appreciate everyone's help and again I want to apologize for how vague this question probably seems.  UPDATE: As far as the inputs, I currently have multiple (raw) data sources in various formats: netCDF, GRIB, GRIB2.  In addition to the raw data itself, I also have the ability to generate really large images of that data which could then be sliced/tiled.  Ideally, I would just be chopping the image up but I am willing to try whatever will get me the fastest results.