I'm an accidental DBA and need help determining a course of action regarding transaction log files on several databases. I ran Brent Ozar's sp_blitz to see what areas of concern there might be on an instance of SQL Server 2012 and one of the things I saw was transaction log files that are bigger than the data file.  On one database the data file is at 3.33 GB and the log is 5.19 GB. The others have a ratio that's about the same.  The instructions for this scenario indicates that the log file might need to be shrunk, but only if the database is in Full recovery mode. This database is set to Simple recovery.  Should I shrink the log files or just leave them alone?  Thanks for your time.

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


Ubuntu server 16.04 installed on a virtualbox vm - no Xorg. Trying to change resolution same way as with previous ubuntu versions. in /etc/default/grub:  GRUB_GFXMODE=1152x864 GRUB_GFXPAYLOAD=keep   ran  update-grub   as root and rebooted - resolution works during grub menu but as boot continues it reverts to 800x600.   I have tried manually setting the grub_gfxpayload value, using keep, using a different resolution, all do the same thing and ONLY on the 16.04 vm that i have. I have a 14.10 vm and these settings work fine (all of them, actually).  Also tried vga= (which is deprecated), tried using uvesafb which doesn't launch (modprobe doesn't start it correctly and thus the second step of the answer mentioning it doesn't work), and vesafb which gives me the following error:   modprobe FATAL: vesafb not found in /lib/modules/(kernel name)/   I'm wondering if this is an issue with VMs specifically, since I can do this part on my standard computer, which is also running 16.04. Perhaps the drivers for Virtualbox cause the framebuffer to not start properly? Not sure why it'd only be on 16.04 and not previous versions, though.

When my computer goes to console mode (booting up, shutting down or Ctrl + Alt + F1)), the text is super big. I can't take a screenshot of it, but it looks like a 640 x 480 resolution. My monitor normally works at 1440 x 900. I remember that the console text that appeared while installing from the CD was nice and small. How can I make the console text look like it looked while booting from the CD?


I had installed Photoshop under Playonlinux , but i got a problem with fonts in the dialog; for example when i want to create a new PSD document as shown:    I had searched in google for a solution , and i had seen many people said that they resolved the problem by installing Microsoft fonts but i din't find it.

When I install "Installer for Microsoft TrueType core fonts" (ttf-mscorefonts-installer) from the Software Center on 14.04, it gives a positive response--but after this I get a download error. It seems that the files actually providing the fonts are never retrieved. Is there any way to resolve this?


Hi I am looking to change individual end caps in Illustrator and don't seem to be able to find out how to do it or  is it not possible

How could I mix rounded and square caps in one single path in Illustrator? For example, I need to make a rounded cap on the starting point and a square one on  its end? See the screen capture underneath.


If light has mass, it must follow equation $m=\frac{m_0}{1-\frac{v^2}{c^2}}$. Hence must have infinite mass and must have infinite momentum. As we are not killed by the strike of light, so light must have zero mass. If so then light must not experience any force. But it doesn't escape from black hole, means experiencing force. Both the facts are contradictory so what about the mass of light.

I understand that a black hole bends the fabric of space time to a point that no object can escape.   I understand that light travels in a straight line along spacetime unless distorted by gravity. If spacetime is being curved by gravity then light should follow that bend in spacetime.  In Newton's Law of Universal Gravitation, the mass of both objects must be entered, but photon has no mass, why should a massless photon  be affected by gravity in by Newton's equations?  What am I missing?


I am novice, I saw several post saying that for merge you need to select all ( pressing A) and then Control+J  but in my case it doesnt work (I think that is because are separated objets) I added a screenshot with better explanation    I have downloaded learn to paint it,I need to merge both objects to UV unwrap

I'm creating side skirts for a truck and I am duplicating the frames I want. The problem is it's making the duplicated object into another object. How do I put it into the same one?


I am a newbie to Ubuntu OS, so don't really have much idea of how things work. Well, m trying to install Cisco Packet Tracer 7.1.1, Now i don't really know how to do that. I have already downloaded Packettracer from the netacad.com.  Please if anyone can help me out here.  Thanks in Advance.  Also need help for installing VMware.

I have downloaded and extracted the packet tracer file, then I used this command as root  chmod +x install   then I ran (as root)  ./install    Then I used this command   ./set_ptenv.sh   but whenever I run this command   packettracer    it just doesn't start


I got nothing on Ubuntu snap store by searching "Simple net speed".  So, suggest me a speed indicator for 20.04 and how to install it.

I use system monitor with 16.04 in Unity. Currently, I get all the graphs and text indicator for Disk on top panel. I want to have net speed displayed instead of Disk. How can I do that ?


The question is very basic. Which properties do we want to see in the residuals of a regression and why? To be more specific I mean the empirical residuals not the theoretical.

I had a question about interpreting the graphs generated by plot(lm) in R.  I was wondering if you guys could tell me how to interpret the scale-location and leverage-residual plots?  Any comments would be appreciated.  Assume basic knowledge of statistics, regression and econometrics.


I'm using 13.10. I want to remove LibreOffice Writer from my "open with..." menu for html, xml and tex documents, because I almost never use writer (except when someone sends my a word document) and I certainly never use it for html, xml or tex. I have found the following related posts:         (1) Suggests:     Enter the contextual menu of the file and go to the Properties of it. Then, go to Open with tab, right click on the application you want to remove and click on Forget association.   However there is no "Forget association option" in properties > Open With    (2) In re this solution here is the MimeTypes from /usr/share/applications/libreoffice-writer.desktop:  MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template; application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master; application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template; application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word; application/x-doc;application/x-hwp;application/rtf;text/rtf; application/vnd.wordperfect;application/wordperfect; application/vnd.lotus-wordpro; application/vnd.openxmlformats-officedocument.wordprocessingml.document; application/vnd.ms-word.document.macroenabled.12; application/vnd.openxmlformats-officedocument.wordprocessingml.template; application/vnd.ms-word.template.macroenabled.12; application/vnd.ms-works;application/vnd.stardivision.writer-global; application/x-extension-txt;application/x-t602;   (line breaks added for legibility). I do not know whether "I had to manually change all mentions of userapp-xnview.sh-C2F5D4.desktop to XnView.desktop" in (2) means change in .desktop files (i.e. in my case change contents libreoffice-writer.desktop) or change the name of of the desktop file userapp-xnview.sh-C2F5D4.desktop to XnView.desktop. But, there are no mentions of userapp-xnview.sh-C2F5D4.desktop in libreoffice-writer.desktop nor do I have any userapp-xnview.sh-C2F5D4.desktop in ~/.local/share/applications/mimapps.list or /usr/share/applications.  I have not ~/.local/share/applications/defaults.list (should I create one? In which case, what should be its contents; defaults work fine) and here is contents of ~/.local/share/applications/mimapps.list:  [Added Associations] application/xml=komodo-edit.desktop; text/html=komodo-edit.desktop;  [Default Applications] application/xml=komodo-edit.desktop text/html=komodo-edit.desktop   which makes no reference to Writer. I have no /.local/share/applications/libreoffice-writer.desktop file.  (3) Consult response to (2).  Any suggestions?

I have one problem. Just look at image:   So I want to remove one of Dev-C++ IDE and Microsoft Visual Studio Version Selector (I've tried to install Microsoft Visual Studio and it doesn't works,and one of the Dev-C++ IDE too). But I don't know how to change that list. I am using Ubuntu 11.10.


I have a table and a button that generates a new row for the table.     Qty Product name Price Subtotal     1 Product A $50 $50     Here's my jquery code for the add new row button $("#add").click(function() { $("#transactionData > tbody").append($('
   <input type="number" class="qty" id="qty" value="1" aria-label="Search" class="form-control" style="width: 100px">	' +   '<select class="form-control custom-select" id="productList" name="productList" aria-label="Default select example">' +       '<?php foreach ($productList as $prod) : ?>' +       '<option value="<?= $prod['productName'] ?>"><?= $prod['productName'] ?> </option>' +       '<?php endforeach; ?>' +       '</select>	   20000000	' +   '$64.50	' +   '' +     ''     )); });  The qty cell is an input that has jquery code that will set value of Subtotal $('.qty').on('input', function() {   var price = $(this).closest('tr').find('.price').text();   var subTotal = this.value * price;   $(this).closest('tr').find('.subTotal').html(subTotal); });  I already use class selector and $(this).closest('tr') but it wont work on rows that i generated with the button.

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.


I'm a complete newbie and was wondering if I had set up something wrong.  I used the 20th Century fox blend and successfully rendered 600 jpg images. Looking good, except that about 30% images have a corrupt T in "Century".  I've spent several hours going through about 200 frames trying to smooth the error out with Gimp. Just wondering what cause the fault and if there is any way to correct it a bit quicker..

I was following  on creating a watch and noticed that when I rendered the watch, some pieces were messed up.  I'm new to 3D modeling and I've just learned Blender, I can't explain it well, so here's a picture:    Other examples:     I don't know if it's a problem with my World texture, the object, or the object's texture/material, so I can't even guess how to fix it. What causes this? Is it possible to fix it?


I constantly hear that websites which are updated frequently do better in terms of SEO, so I was wondering: do blog comments count? I'm guessing they do, since they show that the website still has a 'lifeblood' to it - but I thought it'd be wise to check here first.

I've been trying to answer this question myself by researching and searching on google but I haven't been able to come with a final answer. I have some hypothesis I would like share anyway:   The average website intends to reach the higher audience possible. User generated content by comments is an efficient way of increasing the relevance and the valuable information of the average website. Indexing comments will make any site attractive to spammers. Indexing comments is more convenient for new/low-traffic websites than it is for old/high-traffic websites. The web in general is currently choosing not to index comments in the average website because of fear to the SPAMMERS. The average author of a content-valuable comment would like his comment to be indexed Not indexing comments discourages the creation of content-valuable comments.   So, what do you think finally? Is it positive or negative for the average website to allow search engines to index user comments? Why?


If temperature is just the average kinetic energy of particles, why would moving air feel colder rather than warmer?

So I asked my science teacher how wind could feel colder than normal air when the particles would be moving faster than normal air particles, meaning that they would have more kinetic energy and a higher temperature. My teacher told me that the faster rate of particles hitting your body would mean that the heat would leave faster than in normal air, but I was confused as to why they would take energy.   Eventually, I figured out that the air particles have kinetic energy separate from their velocity and my teacher confirmed this. He also confirmed that the particles would vibrate in place while they are moving.  How is this possible, and how does the vibration dictate the heat transferred, and not the velocity?


Making a RPS game for a school assignment import random #player score p1 = 0 p2 = 0 #add score def AddScore(a,c):     print(a + " +1")     if c == "hum":         p1+=1     else:         p2+=1      #gets player choices while p1 < 3 or p2 < 3:     print("Rock, Paper, Scissors, Shoot!")     a = int(input("Rock, Paper or Scissors? (1, 2, 3):"))     b = random.randint(1,3)     if a == b:         print("Draw!")     elif a > b and a != 1:         AddScore("Human", "hum")     elif a == 1 and b == 3:         AddScore("Human", "hum")     elif b > a and b != 1:         AddScore("Computer", "comp")     elif a == b and a == 3:         AddScore("Computer", "comp")     print(p1)     print(p2)  returns error on lines 9 and 21: UnboundLocalError: local variable 'p1' referenced before assignment

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


It surprises me when I hear someone using "do" in situations where I think it is unnecessary, as in these two examples.     I do need help.      I do have the strings.   Are these correct? Does this 'do' make any difference to the sentences I would expect to see here?     I need help.      I have the strings.

This morning I read this sentence (see ):     On July 24th and again on July 29th,   Egyptian police did shoot dead unarmed   African migrants attempting to cross   that border.   Why "did shoot" and not "shot"?


I have a flight with 3 stops, the last one in Atlanta, before I arrive at México.  I was planning to stay a couple days in Atlanta, so I won't use  the last connection.  Since the cost to change the ticket is expensive I would rather to buy a new ticket just from USA to Mexico.   My question is, should I notify to the airline about this? Immigration in USA could see this action like suspicious?

Say I want to book a flight from Fort Lauderdale to Chicago.  Say the airline also flies to St. Louis from Fort Launderdale but has a connecting flight through Chicago.  If I book that flights from FLL->ORD->STL and just get off in Chicago, what possible problems can I run into, assuming I didn't check any bags and only have carry on?  This scenario exist for Southwest, but I wanted this be more of a general question that would apply to all airlines.


I am upgrading my bike which is exciting but I can't spend too much. Do I sacrifice carbon for aluminum if that gives me the option to go full suspension. Do I go for a solid carbon hardtail that may sacrifice some of the trail comfort for the durability. How much of an advantage is the full suspension over hardtail if you can only buy one for $1500?

I'm considering buying a mountain bike and have narrowed it down to two models (make and model aren't important for this question).  One model is a full suspension bike (front and back), the other is front suspension only.    What are the advantages/disadvantages to going with a full suspension vs front suspension? (I'd prefer answers from people with experience riding both types of bikes.)  EDIT  To answer some of the questions looking for more detail...  The 2 bikes are roughly in the same price range, around $1000 USD (the full suspension is slightly more money), and my plans are to ride it primarily in some single track trails that are in the area.  There will be a lot of hills and rocks and such.  I doubt there will be any on-road riding involved.


I'm the developer for a small online webstore. We've just moved a subsection of products (the bodyboarding products), off surfhq.co.uk on to bodyboardhq.co.uk to sell them there instead.  We didn't want to sell on both stores as search engines don't like duplicate pages - and domain2.co.uk has much better seo for bodyboarding - the site has been run as an active blog for sometime - we've only just added the cart.  My question is, should I be using a 301 redirect on the old product pages (sending users to the new pages on domain2.co.uk), or should I just serve up a 404 not found? Google search currently lists a lot of broken links (I've gone down the 404 route for fear that permanent redirects will result in one of our sites being penalised).  EDIT  My question is not answered  where the 301 is to the home page and the products have been deleted. My products have been moved to another domain (the 301 would be to the product on the new domain). Also I'm concerned with the SEO effect on both domains.

I know this question is someway similar to  where they recommend using 404, but after reading  where they suggest to use 301 when changing site URLs (in the specific case was due to redesign/re factoring) I get a bit of confused and I hope someone could clarify for this specific example:   Let's say I have an eCommerce site, let's also say the final user inserted some interesting items in the site and the eCommerce webapp created the item pages at the URLs: http://...?id=20, http://...?id=30 etc. Now let's say some of these interesting items got many external links toward them from many other sites because some people found those items very interesting and linked to them. After some years the final user deletes those items, so obviously the pages and URLs http://...?id=20, http://...?id=30, etc. now do not exist anymore, but still many pages on the web are linking toward them.   What should the eCommerce site do now, just show a 404 page for those items?  But, I'm confused, wouldn't this lose all the Google PR passed by the external links to the items pages? So isn't it better to use 301 redirect to HOME PAGE that at least passes the PR to the HOME PAGE?    EDIT:  Well, according to answers the best thing to do so far is to do a 404/410.  In order to make this question more complete, I would like to talk about a special case, just to make sure I understood. properly.  Let's say the user creates those items again (the ones he previously deleted at point 4), maybe he changes a bit their names and description, but they are basically the same items. The webapp has no way to know these new added items were the old items so it obviously create them as new items with new URLs http://...?id=100, http://...?id=101, does it makes sense at this point to redirect 301 the old urls to the new ones?    ANOTHER EDIT (It would be VERY IMPORTANT TO UNDERSTAND):  Well according to the clever answers received so far it seems for the special case, explained in my last EDIT, I could use 301, since it's something of not deceptive cause basically the new pages is a replacement for the old page in term of contents. This is basically done to keep the PR passed from external link and also for better user experience.  But beside the user experience, that is debatable (*1), in order to preserve PR from external broken links why not just always use 301, In my understanding Google dislikes duplicated contents, but are we sure that 301 redirect to HOME PAGE is seen as duplicated contents for Google?!   Google itself  so if they consider 301 as duplicated contents wouldn't that be considered duplicated contents too? Why do they suggest it?  Let me provoke you: “why not just add a 301 to HOME PAGE for every not found page?”   (*1) as a user, when I follow a broken URL from some external link to some website's page I would stick more on this website if I get redirected to HOME PAGE rather than seeing a 404 page where I would think the website does not even exist anymore and maybe I don't even try to go to HOME PAGE of the website.


I get the above warning in Stata when I run a (clustered-panel pseudo-Poisson ML gravity-) regression.   Observations are pairs of countries and the regression includes dummies for each combination of country and year (2005-2012) as well as a lagged variable of one continuous independent variable.  If I drop either the set of dummies or the lagged variable, it works fine. But of course I'd like the dummies AND the lag to be in that regression...  Can anyone tell me what causes that warning and how I can work around it?  Results can be found here:  (note: I am aware that the dependent should not be logged)


Let $V$ be an infinite-dimensional $K$-Vector Space and $f_1, f_2, \dots, f_n, g \in V^*:=\operatorname{Hom}_K(V, K)$. Proof the following statement: (i) $g\in L(f_1, f_2, \dots, f_n) \Leftrightarrow \bigcap _{i=1}^{n}\ker(f_i) \subseteq \ker(g)$. The proof for a finite $V$ already exists. Now what if $dim(V)=∞$?

Here is the statement :  Let $E$ a finite $\mathbb{K}$-vectorial space and $\phi_1, \ldots, \phi_p, \psi$ a collection of linear forms on $E$ such that : $\bigcap \limits_{i=1}^p\ker(\phi_i)\subset \ker(\psi)$. Then $\psi \in \operatorname{span}\{\phi_1,\ldots, \phi_p\}$.  The suggestion is to make an induction on $p\ge 1$ (I already know that this method is not the fastest way) : For $p=1$ then $\ker(\phi_1)\subset \ker(\psi)$. If $\phi_1 \equiv 0$ then $\ker(\phi_1)=E$ so $\psi \equiv 0$ and the statement is true. If not, we have the fact that $\phi_1$ and $\psi$ are linearly dependent so $\psi \in \operatorname{span} \{\phi_1\}$ and the statement is also true. Now we want to check the statement for $p+1$. We suppose $\bigcap \limits_{i=1}^{p+1}\ker(\phi_i)\subset \ker(\psi)$ and we want to prove that  $\psi \in \operatorname{span}\{\phi_1,\ldots, \phi_{p+1}\}$. If all the linear forms are null then $\psi \equiv 0$ and the statement is true. If not, we have $\bigcap \limits_{i=1}^{p+1}\ker(\phi_i)\subset \bigcap \limits_{i=1}^p \ker(\phi_i) \subset \ker(\psi)$ so by the induction's hypothesis, $\psi \in \operatorname{span}\{\phi_1,\ldots, \phi_p\}$. Moreover (not sure) $\ker(\phi_{p+1})\subset \ker(\psi)$ so $\psi \in \operatorname{span} \{\phi_{p+1}\}$. Then I'm stuck... Thanks in advance


I read part of this when I was 12 or 13ish about the 1997 time frame and it was not new. I'm pretty sure it was pollen that caused the feral behavior (behavior returned to normal afterwards). Orgies were involved. If i remember correctly hard cover had a lunar eclipse on it.

I'm trying to figure out the title of a series I read when I was younger. As far as I can remember, it started with a spaceship crashing on a planet in book 1. Some plants on that planet had weird effects on the people of the ship, not sure what kind though.  All of the books afterwards are set centuries or even millennia later, about the rebuilt civilization where "magic" or some kind of powers were around.  I'll update if I remember anything more specific.


Let $I$ be an index set, $\{Y_i: i \in I\}$ a collection of random variables on $(\Omega, \mathcal{F}, \mathbb{P})$ and $\{X_n : n \in \mathbb{N} \}$ a countable collection of random variables on $(\Omega, \mathcal{F}, \mathbb{P})$.   In my understanding, given $Y_i: \Omega \to \mathbb{R}$, $\sigma(Y_i) = \{ Y^{-1}(B): B \in \mathcal{B}(\mathbb{R})\}$ is the smallest $\sigma$-algebra on $\Omega$ such that $Y_i$ is a random variable. However, an exercise asks me to prove that \begin{align} \sigma\{Y_i: i \in I\} = \sigma\{ Y_i^{-1}(B): i \in I, B \in \mathcal{B}(\mathbb{R})\}, \end{align} which is (according to me) trivial. Is this true?

Im doing a course on measure theory and I'm stuck on one of the exercises.  Take $\{Y_{\gamma}:\gamma \in C\}$ as an arbitrary collection of random variables and $\{X_{n}: n \in N\}$ to be a countable collection of random variables  I now want to show that $$\sigma \{Y_{\gamma} : \gamma \in C\}=\sigma\{Y^{-1}_{\gamma}(B): \gamma \in C, B \in Borel\}$$  So i need to show that both $\sigma \{Y_{\gamma} : \gamma \in C\}\subset\sigma\{Y^{-1}_{\gamma}(B): \gamma \in C, B \in Borel\}$ and $\sigma\{Y^{-1}_{\gamma}(B): \gamma \in C, B \in Borel\}\subset\sigma \{Y_{\gamma} : \gamma \in C\}$ hold.  I know that for a single random variable X you have $\sigma(X)=\{X^{-1}(B): B \in Borel\}$. How do I expand this for the collection of random variables?  I then also have to show that if $Fn=\sigma\{X_{1},...,X_{n}\}$ and $A=\cup_{n=1}^{\infty}F_{n}$ then $$\sigma(A)=\sigma\{X_{n}: n \in N\}$$  Can anyone help me with this?


Let $(G,*)$ be a finite semigroup with identity. Prove that $G$ is a group iff $G$ has only one element $a$ such that $a^2=a$. For the right direction, since $G$ is a group with identity, then there exists $a=e_G$ i.e. $a^2 = a$. Isn't it? For the left direction, what should I do?

Let $G$ be a finite semi-group with identity such that it has only one idempotent.Is $G$ a group?  It only remains to show that for any $a\in G$ $\exists b\in G$ such that $ab=ba=e$ where $e$ is the identity of $G$  Also $e$ is the only idempotent of $G$ .How to proceed next?


I am using Quickblox sdk to integrate chat into my app.  I have created the Quickblox Session and also logged in user into "Chat Service".  But, when I try to send a message to the "Recipent" the application crashes, throwing following exception:     Attempt to invoke virtual method 'void   com.quickblox.chat.QBAbstractChat.sendMessage(com.quickblox.chat.model.QBChatMessage)'   on a null object reference    Given below is my code:      QBChatMessage chatMessage = new QBChatMessage();     chatMessage.setBody(strMsg);     chatMessage.setProperty(PROPERTY_SAVE_TO_HISTORY, "1");     chatMessage.setDateSent(System.currentTimeMillis() / 1000);     chatMessage.setMarkable(true);       try {         qbChatDialog.sendMessage(chatMessage);     } catch (Exception e) {         e.printStackTrace();       }

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


I cannot seem to get this proof right, which is to show that roots common to $z^{m}-1=0$ and $z^{n}-1=0$ where $\gcd(m,n)=d$ is given only by all the roots of the equation $z^{d}-1=0$. For starters, if we let $m=d\lambda_{1}$ and $n=d\lambda_{2}$, where $\lambda_{1}, \lambda_{2}\in\mathbb{Z}^{+}$, then $z^{d\lambda_{1}}=1$ holds, and so does $z^{d\lambda_{2}}=1$. I do not know how to formalize this. Any hints are appreciated. Thanks.


Show that for every prime number $p$:  $$|\{1\leq x \leq p^2 : p^2 | (x^{p-1}-1) \}|=p-1$$  I'm not really sure how to approach this, any ideas?

Let $p$ be a prime number. Show that the congruence $x^{p-1} \equiv 1 \pmod {p^2}$ has precisely $p-1$ solutions modulo $p^2$  I know the statment above is true for modulo $p$, but how is this imply to modulo $p^2$


I am working on some review problems right now and am extremely stuck on how to solve problem - any help would be so appreciated. We are told to consider the following combinatorial problem:     Unit Intersection: Let X = {1, 2,...,n}. Given a family of subsets $S_1,...,S_m$ of X, determine whether there is a subset T of X such that for all i,|T ∩ $S_i$| = 1 ?   I am then trying to prove that Unit Intersection is NP-complete using a reduction from Exactly-One-3SAT. In the Exactly-One-3SAT problem, we are given a 3CNF formula, and need to decide whether there is an assignment to the variables such that every clause contains exactly one true literal. In a 3CNF formula, every clause has at most three literals. A clause in a 3CNF formula may contain repeated literals.  I've been working for hours trying to find a way to solve this problem, but am so stuck right now. Thank you in advance for any help.

I am extremely stuck on how to go about this problem and any help would be so appreciated. We are told to consider the following combinatorial problem:     Unit Intersection: Let X = {1, 2,...,n}. Given a family of subsets $S_1,...,S_m$ of X,   determine whether there is a subset T of X such that for all i,|T ∩ $S_i$| = 1 ?   I am then trying to prove that Unit Intersection is NP-complete using a reduction from Exactly-One-3SAT. In the Exactly-One-3SAT problem, we are given a 3CNF formula, and need to decide whether there is an assignment to the variables such that every clause contains exactly one true literal. In a 3CNF formula, every clause has at most three literals. A clause in a 3CNF formula may contain repeated literals.  I've been working for hours trying to find a way to even start this problem, but am so stuck right now. Thank you in advance for any help.


I have the following code:  import bge from bge import logic  def property(cont):         own = cont.owner      if 'Recoil_Level' in own and 'Section' in own:          level = own['Recoil_Level']         sec = own['Recoil_Section']      else:         print('Missing properties in object')         return      if (level >= 0) and (level <= 0.5):         own['Recoil_Section'] = 1      if (level > 0.5) and (level <= 2.9):         own['Recoil_Section'] = 2      if (level > 2.9) and (level <= 4.9):         own['Recoil_Section'] = 3      if (level > 4.9) and (level <= 9.9):         own['Recoil_Section'] = 4      if (level > 9.9) and (level <= 19.9):         own['Recoil_Section'] = 5      if (level > 19.9):         own['Recoil_Section'] = 6  cont = logic.getCurrentController()       property(cont)   Everytime I run this script, the console says the following "No module named 'bge'," why is this happening and how can I fix it? Any help is appreciated. Thanks!

I am trying to go trough a simple Blender tutorial in which I need to use module Rasterizer. Unfortunately my Blender has no such module. As far as I know Blender has its own Python so there should be no collision with other  EDIT: Yes, question concerns BGE. As fas as I saw I have none of the modules that should be in Blender: no bge for example. I dont think there is need to get the link to the tutorial, as Blender Python console simply states that script failed, and the script is:  import Rasterizer   or  import bge   both fail.  EDIT2: I have downloaded a new version of Blender 2.68a. When it starts writes: found bundled python. I have for example bpy module but no bge module. It seems I have absolutely no Game Engine module. What a pity! :(


What I want to do is to access a web page that has some elements displayed in a grid and some buttons that implement the filtering functionality. The problem is that when I get the list of elements and try to inspect their properties, the error "The Element is not Attached to the DOM" is thrown every time. Nothing that I have tried seems to work. What I noticed though was that after applying a filter, the grid with objects reloads with the filtered results and this may cause the error. How I can get rid of this error? This is the code that I have (I am using Page Objects): // field container containing all the elements     @FindBy(id = "MainContent_dtUnitsRepeaterDesktop")         private WebElement gridContent;         @FindBy(css = "div.sizes")         private List<WebElement> unitSizes;  //method returning the list of web elements that hold the text I need public List<WebElement> getUnitSizes() {         List<WebElement> units = gridContent.findElements(By.cssSelector("div.sizes"));         driverWaitObject.until(ExpectedConditions.visibilityOfAllElements(units));         return units;     } //method that is extracting the text from each web element public List<String> checkElementResults(List<WebElement> elemList) {         for (WebElement elem: elemList) {             unitType.add(elem.getText());         } return unitType; }  // method to check and return     public List<String> checkElementSizeResults() {         return facilityPageObject.checkElementResults(facilityPageObject.getUnitSizes());     }  As far as I have noticed the call that generated this error is at line "unitType.add(elem.getText());"  Any suggestions would be welcome (I am a beginner of Selenium WebDriver automation).

I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I get the "org.openqa.selenium.StaleElementReferenceException: Element is no longer attached to the DOM" error and the test fails.  The code is the following:  @Test public void rowSelection() throws Exception {     SeleniumHelper helper = new SeleniumHelper();     action = new SeleniumActionHelper(driver);      helper.login();      String testUrl = navigateToUrl("option/listOptions.xhtml");     driver.get(testUrl);      WebElement table = findElementById("tableSection:dataTableWrapped_data");     List<WebElement> allRows = table.findElements(By.tagName("tr"));     for (WebElement row : allRows)         {             List<WebElement> cells = row.findElements(By.tagName("td"));             for (WebElement cell : cells)             {                 WebElement listName = cell.findElement(By.xpath("./* [text()='body_build']"));                 listName.click();             }         } }   I have put a Thread.sleep(2000) in front and after the listName.click() action, but neither has helped. Any help would be greatly appreciated.


Is there any way to alterate weak interaction and thus the rate of beta decay by making it slower or faster? If yes, how? Would radiating some extra bosons or neutrinos, perhaps in a focused beam, change the rate somehow?

Is there a way to extend or reduce the half-life of a radioactive object? Perhaps by subjecting it to more radiation or some other method.


Can anyone please tell me How can I show the icon in the middle of the image left and right side?   I tried many solutions but they not worked.    .slide {   display: inline-block;   font-size: 16px;   line-height: 20px;   padding: 7px 4px;   margin: 5px;   cursor: pointer;   height: 32px;   width: 32px;   background-color: #2874f0;   border-radius: 50%;   color: #fff;   text-align: center; }  .image {   height: auto;   width: auto;   max-height: 350px;   max-width: 100%;   display: block;   margin: 0 auto; }
   >      <

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


Is it possible to boot Ubuntu from USB and have it store the changes to settings, created files and installed apps in an enrypted file located on the HDD that is mounted at boot? If so will the process impair bootup speed much? The goal would be maximum security if you make the USB read-only and the peristent store is encrypted.

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


Let $f:[a,b]\to \mathbb{R}$ be twice-differentiable (i.e. $f'$ and $f''$ exist) on $[a,b]$ and $f'(a)=f'(b)=0$. Prove that there exists $c \in (a,b)$ such that $4\cdot|f(b)-f(a)|/(b-a)^2 \leq |f''(c)|$.  I guess the prove uses the mean value theorem but I cannot figure out how.

Let ${\rm f}:\left[a, b\right]\to\mathbb{R}$ be twice differentiable, and suppose   $$\lim_{x\to a^{+}} \frac{{\rm f}\left(x\right) - {\rm f}\left(a\right)}{x - a} = \lim_{x\to b^{-}}\frac{{\rm f}\left(x\right) - {\rm f}\left(b\right)}{x - b} =0 $$  Show that there exists $\xi \in \left(a, b\right)$ such that $\displaystyle{% \left\vert\vphantom{\Large A}\,{\rm f}''\left(\xi\right)\right\vert \geq \frac{4\left\vert\vphantom{\Large A}% \,{\rm f}\left(a\right) - {\rm f}\left(b\right)\right\vert} {\left(b - a\right)^{2}}}$.  I don't know how to start. Any hints ?.


After turning my laptop on, this message appeared and I tried all the ways that are told on the internet but didn’t worked:( My laptop has AMD Vega graphics. Please tell me the solution step by step as simple as possible, thanks in advance!

dev/sda1: clean, 552599/6111232 files, 7119295/24414464 blocks   After I turn on my laptop this message appears. The system never boots, the message just stays there.


I received a email saying that I would need to check again within 12 hours. However when I check my ETA status at   I got this:     You have a current ETA to travel to Australia.      The Australian Electronic Travel Authority System has reported the   following data and conditions apply to your ETA:  Expiry Date    05 JUN 2013 Period of Stay     3 Months Number of Entries  Multiple Employment Conditions  Employment Prohibited       The Expiry Date of the ETA is the latest date on which you may enter   Australia with this ETA. The Period of Stay is the longest time you   may spend in Australia on any one visit. The Number of Entries is the   number of times you may enter Australia with this ETA.   Am I approved or not?

I would like to know is my visa application being approved or not   I receive an email saying I need to check on eta.immi.gov.au after 12 hours but after I check in I just received this only :      Reference number   expire date 5 April 2017   period stay 3 months   entries multiple visa   condition NO WORK- business visitor activity only   that's all so how do I know if this application is approved or not?  Can someone assist me?


I've seen a few cases of processes that don't respond to kill -9.  Most recently, I've seen both lsusb and reaper get stuck and be unresponsive to kill -9. (After trying all the usual signals first) How do I tell Linux to kill the process no matter what?

I have a process I can't kill with kill -9 <pid>. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option.


Search for tag doesn't work in mobile web. I.e. entering tag  name and then Enter on on-screen keyboard does nothing:

I want to filter questions based on some tag that I enter in the search bar in the  Tag section of the mobile version of Stack Overflow. But when I write my tag name inside the search bar & hit enter, it does nothing. I tried entering the tag names inside square brackets as well but still nothing happens. At first I thought the problem would be with my browser so I switched to Google Chrome mobile version and guess what? It doesn't work there either. Why doesn't it work? is this some kind of known bug?  Browsers tested on:   Uc & Chrome  My Phone:   Lenovo p2  Os: Android   7


I am finding difficulty in constructing a proof as requested in the following:  Let $F$ be a subfield of the complex numbers and let $T$, $D$ be the transformations on $F[x]$ defined by  $$ T \left( \sum_{i=0}^n c_i x^i \right) = \sum_{i=0}^n \frac{c_i}{1+i} x^{i+1}$$  and  $$ D \left( \sum_{i=0}^n c_i x^i \right) = \sum_{i=1}^n i c_i x^{i-1}.$$  I am asked to show that $DT = I$, where $I$ is the identity. (Please note the indices on the above sums.)  Clearly, $T$ and $D$ correspond to integration and differentiation, respectively. I felt that this proof should be straightforward, but I'm not able to get it quite right. Here is what I have:  $$ \begin{align} (DT)\left(\sum_{i=0}^n c_i x^i \right) &= D \left(\sum_{i=0}^n \frac{c_i}{1+i} x^{i+1} \right) \\ &= \sum_{i=1}^n c_i x^i \end{align} $$  This uses the definitions of the operators, as given. However, the lower index in the last sum is $i= 1$, which is one higher than the $i=0$ in the original sum that $DT$ was applied to; in loose wording, the constants are gone (i.e., we integrated and then differentiated but the constants in the original expression are now gone). The value of this lower bound makes sense because of the $c^{i-1}$ term; if $i$ can be zero, we would have $x^{-1}$, which is not defined in this contact. To me, resolving this seems impossible, based on the definition of the operator $D$ as given in the text; no matter what the train of logic is, I do not see a way for the lower bound of the final index to be zero, which seems to me to be necessary in order to conclude that $DT =I$.  I do not see how to get around this in order to complete this proof. Where is my error?    A comment on my question suggests that we can simply index the aforementioned sum from $i=0$ since $ic_ix^{i-1}$ can be taken to have value zero for $i = 0$. However, the second part of this exercise asks to show that $TD \neq I$, which does seem to rely on the indices of the sums in the given definitions. Where is the subtlety here?    This is Exercise 9 in Section 3.7 of Linear Algebra by Hoffman and Kunze.

I have a homework problem from Hoffman and Kunze's Linear Algebra.  Let F be a subfield of $\mathbb{C}$ and let $T$, $D$ be the transformations of $F[x]$ defined by $$\begin{align} T\left(\sum_{i=0}^n{c_ix^i}\right) &=\sum_{i=0}^n\frac{c_i}{i+1}x^{i+1} \\ D\left(\sum_{i=0}^n{c_ix^i}\right) &=\sum_{i=1}^nic_ix^{i-1} \end{align}$$ These look like the anti-derivative and derivative operators.  I am to show that $DT=I$ but $TD\neq I$.  So, $$DT\left(\sum_{i=0}^n{c_ix^i}\right)=D\left(\sum_{i=0}^n\frac{c_i}{i+1}x^{i+1}\right)=\sum_{i=1}^n{(i+1)}\frac{c_i}{i+1}x^{i+1-1}=\sum_{i=1}^n{c_ix^i}.$$ It is close, but my index is off by 1, and so they can't be equal since I am missing my constant term.  What am I missing? Do I need to rewrite the argument in the derivative operator before I operate?


I am new to blender and am trying to make a gemstone. I already have it modeled and am on to texturing but the tutorial I found uses a glass bsdf but I don't have one in my add node selection. I tried googleing it but all I found were more tutorials. Do I need to turn something on or download it? Thanks in advance.

I have been following  tutorial until I started adding nodes. The problem is that he has completely different nodes than I have. Even nodes that are created at start are different (I have Material and Output and he has Render Layers and Composite). Have I missed something or should I use different nodes than he?


My applications requires to iterate over a vector and delete certain elements which doesnt satisfy the requirements. Which is the most correct way? I believe the following way is incorrect.Reason: I am getting segmentation fault.   std::vector<ObjectX> vec1; //Fill in vec1 std::vector<ObjectX>::iterator itVec1 = vec1.begin();  for(;itVec1 != vec1.end(); ++itVec1) {    if (Oracle(*itVec1)) vec1.erase(itVec1); }

I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I need to clear all of them. My code is something like this:  void erase(std::vector<int>& myNumbers_in, int number_in) {     std::vector<int>::iterator iter = myNumbers_in.begin();     std::vector<int>::iterator endIter = myNumbers_in.end();     for(; iter != endIter; ++iter)     {         if(*iter == number_in)         {             myNumbers_in.erase(iter);         }     } }  int main(int argc, char* argv[]) {     std::vector<int> myNmbers;     for(int i = 0; i < 2; ++i)     {         myNmbers.push_back(i);         myNmbers.push_back(i);     }      erase(myNmbers, 1);      return 0; }   This code obviously crashes because I am changing the end of the vector while iterating through it. What is the best way to achieve this? I.e. is there any way to do this without iterating through the vector multiple times or creating one more copy of the vector?


I'm new to programming and so I bought a book to help me learn C++, in the book it asks me to do a practice assignment where I must create a program that allows me to take input of multiple usernames and passwords, match them, and also allow someone who incorrectly enters information to try entering it again. I've wrote the following program in order to do so. If anyone can also shed any light on how to make the program allow for retry of username/password entry without ending the program that would also be greatly appreciated. Thank you!  #include <iostream> #include <string> using namespace std;  int main() { string username1="Varun"; string username2="Agne"; string username3="Geetha";              string username4="Mohan"; //Usernames for accounts string pass1="PassworD"; string pass2="PASSWORD"; //Passwords for accounts string pass3="password"; string pass4="Password"; string Uattempt; //User input for username string Pattempt; //User input for password   cout << "Please enter your username.\n"; cin >> Uattempt; cout << "Please enter your password \n";   //Asks for username and password entry by user cin >> Pattempt;  if(Uattempt!=username1 || username2 || username3 || username4) {     cout << "Access Denied. Incorrect username or password. Please retry.\n";  //If username does not match possible entries, program will ask to retry } if(Pattempt !=(pass1||pass2)&&(pass3||pass4) {     cout << "Access Denied. Incorrect username or password. Please retry.\n";  //If password does not match possible entries, program will ask to retry } if (Uattempt&&Pattempt==username1&&pass1||username2&&pass2||username3&&pass3||username4&&pass4) {     cout << "Access Granted. Welcome " + <<Uattempt<< + ".\n"; } else {     return 0; } }

This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles. Please edit the accepted answer to provide quality books and an approximate skill level — preferably after discussing your addition in . (The regulars might mercilessly undo your work if they disagree with a recommendation.) Add a short blurb/description about each book that you have personally read/benefited from. Feel free to debate quality, headings, etc. Books that meet the criteria will be added to the list.  Books that have reviews by the Association of C and C++ Users (ACCU) have links to the review. *Note: FAQs and other resources can be found in the  and under .


I have currently installed Ubuntu to my laptop as a partition since I will start using it for work. I actually prefer Ubuntu as my main OS, so I will just keep Windows for irrelevant things as games and programs as Office packages and Photoshop. This is the distribution I currently have for my partitions:   Windows OS (195GB) - ntfs Ubuntu OS (180GB) - ext4 /home directory for Ubuntu (25GB) - ext4 Shared data partition for both OS (75GB) - ntfs   In a first instance I tried to keep the /home directory partition as the one which will be used as the shared data, but I found out that Windows does not allow to write on ext4 partitions on a native way and some problematics programs or not immediate solutions had to be used.  For these reason, I created another partition with ntfs extension in order to share my programming projects and other stuff between both operative systems. This is later mounted on Ubuntu on /media/data/ on start and accessed by symbolic links I created on my /home directory.  As far as I have been testing, the implementation works fine and I have not experience any problem opening files in both OS, but I am not sure if this solution is an advisable one or if it may lead to possible future problems or losses of information. Is there any risk on this implementation greater than the one I would have on a default one?   Otherwise, do you recommend me to perform any changes or to implement the partitions in any other way?

I have a 500GB SSD in which i would like to have both Windows and Ubuntu. My plan is to have something similar to this: Windows 8.1 and ubuntu 14.04 Uefi boot   an efi partition (created by windows installer) which will have Grub as bootloader 150GB ntfs for Windows 15GB ext4 for Ubuntu (root) 35GB ext4 for Ubuntu (home) ~8-16GB swap for Ubuntu (I have 16GB RAM) ~284-292GB ntfs for Data shared for both Windows and Ubuntu   My current setup is   200GB ntfs Windows 300GB ntfs for Data   I plan to shrink both the Windows and the data partiton in order to achieve my desired plan.  My questions:   Does the order of partitions matter? Does it matter if the ubuntu partitions are not at the end/beggining of the drive? Does the swap partition behaves better if its the last/first partition? Can I use the shared NTFS Data partition between windows and ubuntu without encountering problems? Do I have enough space for my ubuntu /home partition (thinking that I'll have access to the ntfs shared partition)?   Edit: Laptop, Asus N56jr, i7, 16Gb Ram, SSD samsung 850 evo 500gb  Windows 8.1 and Ubuntu 14.04


I do want to order CTP by year. I have a taxonomy called 'annee' (year), and a CTP called 'moto' (motorbike). Issue is, when im trying to order by the taxonomy, it's ordering only by taxonomy ID, and not by Taxonomy Value. Do you have any solution ?   if ( is_post_type_archive( 'motos' ) ) {      $query->set( 'posts_per_archive_page', 24 );     $query->set( 'order', 'DESC' );     $query->set( 'orderby', 'meta_value_num' );     $query->set( 'meta_key', 'annee' );     return; }      Thank you.

My question is simple, I'm using WP_Query to retrieve some custom type posts filtering by a taxonomy using tax_query.  Now my problem is I would like to orderby the taxonomy, but from documentation and searching on the web I can't find a solution.  The orderby in WP_Query lets you order by a bunch of fields even custom meta fields but it doesn't seem to support taxonomy.  Any pointers in the right direction?  Thank you all.


For my thesis I'm doing a factorial Mixed ANOVA in which I look at gender differences. As it's a mixed ANOVA, everyone goes through the same conditions. The problem however is that I have 10 men and 26 women in my sample. Therefore the groups that I compare when looking at gender, aren't equal. I was wondering if there was a specific test I could do to calculate how problematic this difference in gender ratio is and if there is a test I could do to make up for this discrepancy?

If you have unequal sample sizes in cells, then the order in which you enter model terms  changes your results for sequential or Type I SS. The first variable to enter the model is allocated its unique variance plus the variance shared by the second variable, then the second variable gets only its unique variance.  If you have two predictor variables, say whether you get a drug or placebo and whether you think you get a drug or placebo, and you want to look at their relationship to some symptom, and you want to ignore the effect of knowing whether you got the drug, because all you are really interested in is the relationship between getting the drug and the symptom, then which predictor variable would enter into the model first?  I have been reading answers to questions on this site, and sometimes people are told to enter what is thought to be the most important variable first, but then in ANCOVA situations they are told to enter the covariate first. Is this contradictory advice, or is the covariate really the most important variable?  Additionally, would an ANCOVA always use Type I SS?  Thanks for your help.


I noticed today (and either did not notice yesterday or it was not happening yesterday) that when I'm reviewing close votes on StackOverflow and I toggle open the section to see more information about what people have voted for this question previously, I see:  off-topic: Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.).AsHtml()    Where I expect this text to be unescaped so that it renders as HTML. The .AsHtml() at the end makes it look like something isn't being closed somewhere.

I was reviewing in the close votes  when I clicked the "more" link for the specific close reason. I saw the following:    As you can see, the markup is not rendering. There's also a call to .AsHtml() in there which is obviously not markup.  Browser is chrome 31.0.1650.63


I have a problems with wp_editor() . Somewhere in my plugin, i want to dynamically add fields some are basic input, and there is also an editor. I use ajax to add these fields, and all is going as planned except for the editor fields throwing the error :   "Uncaught TypeError: Cannot read property 'canvas' of undefined"  Is there any specific way dealing with wp_editor in ajax request or am i missing something ?  php side :  add_action( 'wp_ajax_add_new_proposition_callback', array(&$this, 'add_new_proposition_callback') );  public function poll_manage() {     $nb_prop = 0;     <form method="post">

     <input type="button" value="Ajouter une proposition" class="button" id="addnewprop" />     <input type="hidden" name="nbprop" id="nbprop" value="<?php echo ($nb_prop+1) ?>" />     </form> }  public function add_new_proposition_callback() {     $prop_id = isset($_POST['prop_id']) ? (int)$_POST['prop_id'] : 1;     echo '

'.$prop_id.' : New proposition

Proposition     <input type="text" id="propo'.$prop_id.'" name="propo'.$prop_id.'" class="thepropo" size="60" value="" />

Description';     wp_editor( '', 'descrq'.$prop_id, array('teeny'=>true, 'editor_class'=>'thepropoc') );     echo $content.'

Answer

<input type="radio" class="open" name="open'.$prop_id.'" value="1"  /> yes

<input type="radio" class="open" name="open'.$prop_id.'" value="0"  /> no

     ';     die(); }   js side :   ...     $('#addnewprop').click(function(){         var params = {             "action": "add_new_proposition_callback",//callback function             "prop_id": $('#nbprop').val()         };         $.ajax({             data: params,             type: 'POST',             url: php_data.ajax_url,             success: function(data, status) {                 onSuccessAddNewProposition(data);             }         });     });     function onSuccessAddNewProposition(data){         $('#propositionlist').append(data);//append proposition         $('#nbprop').val(parseInt($('#nbprop').val())+1);//update proposition count     }   Thanks in advance PS: I'm using WP 3.8.2

Does anyone know how o load wp_editor via AJAX in WordPress?  My markup and editor is getting loaded properly but editor controls are not getting loaded properly, it may be because Javascript is not running in AJAX call.  Any help would be appreciated.


I have a strange problem. Today I moved a site from staging to production and the site work fine but I cannot se the images.   I can see in ftp the picture but drupal do not serve it in the page. I already tryed to clear cache.  In the reports log I there is a lot of   Unable to generate the derived image located at public://styles/ensemble-small/public/anne ristorcelli s.png.   errors but I do not understand what I can do.  The GD tookit works fine.. I checked it.  I tryed to re-upload some images but do not work and I can't see they in the editing page too.  Can someone help me to solve this?  UPDATE:  I tryed to delete the images generaten in the staging server to verify the correct working of the images modules. The images was ok. So the problem is in server request?  If I try to see the image directly I have this error:        Internal Server Error  The server encountered an internal error or misconfiguration and was unable to complete your request.  Please contact the server administrator, postmaster@ensemble05.it and inform them of the time the error occurred, and anything you might have done that may have caused the error.  More information about this error may be available in the server error log.

Today I uploaded my site to the server, and I get errors like the following:     Unable to generate the derived image located at public://styles/sponsor_image/public/TerraThermaSponsorLogo.png.   Image styles cannot generate images. I have tried to set permissions on styles/* folders with chmod -R 775 styles/, and even tried chmod -R 777 styles/. The folder's owner is OK. I don't get what can be wrong.  The directory associated with public:// is sites/default/files, and it is OK.


I was watching some videos on algebra and found someone said that   $$ \frac{1}{\sqrt 2} $$  $$= \frac {\sqrt 2}{2} $$  Can someone explain this to me please?

How $\frac{1}{\sqrt{2}}$ can be equal to $\frac{\sqrt{2}}{2}$?  I got answer $\frac{1}{\sqrt{2}}$, but the real answer is $\frac{\sqrt{2}}{2}$. Anyway, calculator for both answers return same numbers.


Let's say I have a character who has Booming Blade and is a level 3 Sorcerer, and level 2 Fighter, would that still count as having levelled Booming Blade? Or do I need the Sorcerer class to reach level 5?

Cantrips seem to be the only type of spell that cares only about your class level. However, in the multiclassing section they are not mentioned, does this mean that cantrips use your character level, instead of your class level?  Does this mean a Warlock 2 / Fighter 15 can cast an Eldritch Blast with 4 beams just like a level 17 Warlock?


What are the differences between morals and ethics? Are morals standards of behaviour that everybody in a certain group can agree on or is that an ethical code of behaviour? To the Vikings doing the 'right' thing might have been participating in the tradition of finding other villages and ransacking and stealing. This was part of their ethical code of behaviour. Could it be said to be immoral or amoral?

I am currently writing an essay on artificial moral agents, and I need to explain the difference between ethics and morals. However, I am finding it really hard to find a good book or research paper which contains a citable definition.   Could someone point me in the right direction?


I'm looking to raise my blinds every morning  using an rpi/Arduino and a motor. The blinds are lifted by a cord that loops near the bottom. I've checked that the cord requires about 20N force to pull down, and the gear turning the cord loop at bottom will have a diameter of 6 cm.  Which motor should I buy?  Min torque needed ~ 20*3 = 60 Ncm. Min speed ~  20 rpm

So I'm trying to do some insane home DIY with my room blinds. I'm trying to make them adjust (go up and down) automatically.  Now for this, obviously, I will need a motor.   The blinds I'm working with don't require much strength to pull down, but a fair bit to pull them up (using the little string/cord), So I'll need something fairly powerful, but slow.  I'm taking a look at a few gear motors on  site, but I have no idea which one would be right to use for this kind of task.  Could anyone help me out?


I am looking to create terrain hillshading for my maps that contain a small region of the US. I intend to show about eight to ten states at a time (at about ~1:5,000,000 scale).   It has been some time since I created a map, but if I recall correctly, I believe the options are to either use imagery or a DEM.  Either way I still face a problem:    The raster data I have found (Natural Earth) is not of sufficient quality. I cannot find a bulk download option anywhere for open source DEM data or imagery such as the SRTM.    An example of the what I am trying to accomplish is below   (source: )

USGS has been moving towards serving data through .  They have several WMServices through their website that serve elevation data to the public (hillshade & DEM).  The problem is that geoprocessing tools in ArcToolbox won't accept these layers as inputs.  Where can I download (free) DEM gis data that I can use in analysis?  I'm specifically interested in the 1/3 arc second (~10m) or the 1 arc second (~30m) data.  Currently I'm going through the USGS NED Tile download tool, which has ~4 files per county.  My areas of interest cover about 50 counties -- I don't see myself manually downloading these files one by one.


When I run my latex the document is set, but it takes a long time and I have lots of warnings like this:     Overfull \hbox (4.0pt too wide) has occurred while \output is active   What does this mean?

I often see output from TeX with the warning overfull hbox, badness 10000. What does this message mean?


I have two div that each of them has an image and a caption.  I want image center vertically or fill div element without stretching or Any unusual resizing.  I searched and use any suggestion Like -  and answers of some questions in stackoverflow, but none worked.  I want use and display this elements responsive  I use this pictures for test:       .border_slide {   overflow: hidden; } .other_titles {   margin-top: 5px;   height: 120px; } .other_titles div {   width:49.5%;   margin-bottom: 5px;  } .other_titles_cap {   position: absolute;   z-index: 100;   width:100%;   background-color: rgba(69,69,69,0.4);   height: 70px;   margin-top: 80px;   transition: all 0.3s ease 0s; } /*.other_titles_cap:hover {   margin-top: 0;   height: 150px; }*/ .title2 {   height: 150px;   background-color: #9bfff0;   /*margin-left: 15px;*/   float: right; } .title2 img {   margin-top: 0;   transition: all 0.4s ease 0s; } .title2:hover .other_titles_cap {   margin-top: 0;   height: 150px; } .title2:hover img {   width: 115% !important;   opacity: 0.8;   transform:translate(7%,-10%);   -ms-transform:translate(7%,-10%); }  .title3 {   height: 150px;   background-color: #ffd5c4;   float: left; } .title3 img {   /* transform: translate(7%,-10%); */   -ms-transform:translate(7%,-10%);   margin-top: 0;   transition: all 0.4s ease 0s; }  .title3:hover .other_titles_cap {   margin-top: 0;   height: 150px;  } .title3:hover img {   width: 115% !important;   opacity: 0.8;   transform:translate(7%,-10%);   -ms-transform:translate(7%,-10%); }

title of Post2

title of Post3

     I Mostly need this for responsive mode in width size below 520px.  You can test this here:

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?


While trying to install Netbeans 8.0 in my Ubuntu 14.04 I get the following error:   Can`t initialize UI Running in headless mode Exception: java.awt.HeadlessException thrown from the UncaughtExceptionHandler in thread "main"   I have previously installed openjdk 7 and yet it's not working for some reason.

I used NetBeans for Java development on Windows and remember finding it in the Ubuntu Software Center on Natty, but now it's gone. Is there a PPA I can use or will it be re-added to the official repos?


I remember a short I saw on TV many years ago about time as a continuum, I think a train?  there were men who fixed things that were out of place.  It was an explanation of why you would think your glasses were on the table.  They would not be there but when you went back, they were there.  The invisible workers were supposed to always be ready to have everything in place.  A woman was planning to dust a high bookcase, so they sprinkled dust on it right before she dusted.  I think she ends up accidentally seeing one of the time fixers.  I always think of this story when I am missing something and then it shows up. Can anyone help?

I'm trying to find an episode from what I think is a sci-fi TV series produced sometime in the 80s or 90s.  In the episode, a man and another character(s) finds himself stuck in the interval between two seconds.  In that interval, he witnesses a crew of workers whose job it is to destroy the "old" second (everything in it; house, yard, the rest of the world) and build a near duplicate of the upcoming second.  The man is discovered by this "time construction crew" and is told that since he's seen the truth about this in-between time world, he can never return to his time.  He will simply disappear.  He manages to hide at the last minute and the time crew has run out of time to catch him.  The "real" world catches up as the next "second" ticks into place.  I thought this might have been an Amazing Stories episode but upon reviewing summaries of those two seasons, I don't think I saw it there.  Does anyone know this episode and series? There were other good episodes in this Twilight Zone-like series.


[![enter image description here][2]][2]  How I do I fix those strange patches? I tried hours of subdividing areas and such but to no luck.. Is there a simple fix? Could someone people help, I'd be glad to share the Blender file I just really need to get this finished as soon as possible.   Blender file, would be amazing if you could help :)

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


That is $$ f(f(z)) = \sin z $$ where $$ z \in \mathbb{Z} $$

Find all (if that's possible) functions $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $$f(f(x))=\sin x.$$  This is a problem a friend gave me. He said he saw it on a book a long time ago, but he couldn't remember what book. I literally have no idea how to solve this so I can't post my attempt here.


I have found some cheap flights from London to Tokyo on Google Flights which I plan to purchase.  However, the flight has a layover - the legs are London to Moscow, then Moscow to Tokyo.  I thought that, rather than spend 4 hours in a Moscow airport, perhaps I could try purchasing my flights separately to allow a whole day in Moscow, and I'll spend a night exploring the city.  However, when I search on the same dates for Moscow to Tokyo, I find that that leg of the flight by itself is far more expensive than buying the combined flight to from London to Tokyo.  Is there a reason for this?  Is there a convenient way to find flights which purposefully extend layovers for a day or so?

Based on the question , I got curious. Is there a guide or resource that describes how the price of a ticket is determined?  When you search you often see curious effects like cheaper tickets for a flight from A to B with a layover compared to a direct flight. This seems counter-intuitive from an outsider's perspective since you fly twice. Also one way tickets more expensive than 2 ways.  It can be a short set of rules. Something that helps someone to get started with finding good prices. I know these can be very complex and they probably change over time and over airline interests but there is probably a simplified set of rules that can be enunciated.


I can't make a screencast.  The options in my login screen didn't work so I edited  /etc/gdm3/custom.conf    by deleting the # before WaylandEnable=false using terminal, and saved the file.  The error remains, even after restarting my laptop.  When I press Ctrl+Alt+Shift+R to start recording what is on my screen it just open this link and NO recording.  When I use the VLC App to record my screen it gives me this error     Your input can't be opened:   VLC is unable to open the MRL 'screen://'. Check the log for details.

After upgrading to Ubuntu 17.10 I noticed some of my screencasting applications are not working, for example screencasting tools like SimpleScreenRecorder and vokoscreen. ()  Also I noticed features like screenshot from GIMP is not working properly, producing blank screenshots (). Shutter too is producing glitchy screenshots ().  Screen-sharing option on Skype is also not working ().  The issue occurs sometimes on later Ubuntu releases too.  Why is this happening and how do I fix this?


How would you unit test the nested function f1() in the following example?  def f():     def f1():        return 1     return 2   Or should functions that need testing not be nested?

I come from the Java world, where you can hide variables and functions and then run unit tests against them using reflection.  I have used nested functions to hide implementation details of my classes so that only the public API is visible.  I am trying to write unit tests against these nested functions to make sure that I don't break them as I develop.  I have tried calling one of the nested functions like:  def outer():     def inner():         pass  outer.inner()   which results in the error message:     AttributeError: 'function' object has no attribute 'inner'   Is there a way for me to write unit tests against these nested functions?  If not, is there a way to trigger the name munging for function names like you can for class variables by prefixing them with __?


For a foreigner, the usage of 'In + time' and 'after + time' are kind of confusing..   The system will be turned off in 5 minutes.  The system will be turned off after 5 minutes.   I'm confused because many translations in my language are just the same.  Based on my research and study, 1) is right. But I want to make sure.   In a dictionary, IN means after a particular length of time.   (F.Y.I) I want to mean that... like... the system will be turned off when 1min, 2min, 3min, 4min...has elapsed and (finally) 5min ! = the system shutdowns.   And if possible, could you explain what the difference is between them?

The class will be over in 10 minutes. The class will be over after 10 minutes.  I know the first is correct but why?


I have an old U.S. passport in my maiden name and valid Indian tourist visa.  I have now new U.S. passport with my new name.  Can I travel with both passports and name change certificate and be okay? or do I have to obtain a transfer of visa?

I have an Indian visa valid till 2013 in my old passport. But since I just got married I'm changing my surname and hence changing my passport.  Will my Indian visa in my now old passport be valid, provided I have all Marriage documents?


I use maven to create war files for my app. The war file in turn uses some 3rd party libraries. The app is run on Jboss 4.x. Now we are moving over to Jboss 7.   Some of the 3rd party libraries are provided by default in Jboss 6, hence I would not like to include them when I build my war file for it.   The problem I have is I need to support the build of war files for both versions of Jboss without doing too many changes. I need to include the 3rd party lib's in the war file if I want it to be deployed for 4.x but do not want it to be included when i do the build for Jboss7.  I looked at maven dependency but I think that is not the way. Is there any way for me to achieve it.

Is it possible to have a different set of dependencies in a maven pom.xml file for different profiles?  e.g.  mvn -P debug mvn -P release   I'd like to pick up a different dependency jar file in one profile that has the same class names and different implementations of the same interfaces.


I am currently trying to create a ResourceDictionary. I have 2 projects (The main project with App.xaml & MainPage.xaml and another project which contains only subpages) and want to define a ResourceDictionary with different styles for specific elements in my subpages. E.g. I have a ListView with some TextBlocks and Images and want every TextBlock to have the same style. How do I achieve that? Is it correct to save the ResourceDictionary in the main project and implement it in the App.xaml? If so, how can my subproject use these Resources?   Some more information on how my project looks like:  MainProject  MyResourceDictionary.XAML  <ResourceDictionary     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:local="using:MainProject">      <Style x:Key="ListViewTextBlock" TargetType="TextBlock">         <Setter Property="FontSize" Value="24"/>         <Setter Property="Foreground" Value="White"/>     </Style>     </ResourceDictionary>   App.xaml  <Application.Resources>     <ResourceDictionary Source="ResourceDictionary/MyResourceDictionary.xaml"/> </Application.Resources>   SubProject  MySubPage.xaml  <ListViewItem ...>     <Grid...>         <Grid.ColumnDefinitions.../>             <TextBlock Grid.Column="0" Style={?} Text="Give me style!"/>             <Image...>     </Grid> </ListViewItem>

I have resource dictionary files (MenuTemplate.xaml, ButtonTemplate.xaml, etc) that I want to use in multiple separate applications. I could add them to the applications' assemblies, but it's better if I compile these resources in one single assembly and have my applications reference it, right?   After the resource assembly is built, how can I reference it in the App.xaml of my applications? Currently I use ResourceDictionary.MergedDictionaries to merge the individual dictionary files. If I have them in an assembly, how can I reference them in xaml?


Is there a way to convert from Uri to URL? I need this for a library I'm using, it only accepts an URL but I need to use an image on my device.

I am trying to get a FileInputStream object on an image that the user selects from the picture gallery. This is the android URI returned by android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI  content://media/external/images/media/3   When I try to construct a java URI object from this object, I get an IllegalArgumentException with the exception description Expected file scheme in URI: content://media/external/images/media/3 whereas the android URI shows the scheme as content  Update: Never found a solution for the original question. But if you want the byte stream of an image in the pictures gallery, this piece of code will do that.  Bitmap bitmap = Media.getBitmap(getContentResolver(), imageUri); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 40, bytes); ByteArrayInputStream fileInputStream = new ByteArrayInputStream(bytes.toByteArray());


My phd advisor send me a tex version of his slides, I try to update it, but when I run it, the result is totally ruined (for example, all the graphs do not download at the right place, the slides are totally "deconstructed", the first page is totally blank, I also see that bullets are not installing correctly, I do not know where it come from). My knowledge about latex is quite narrowed.   Would you know where would it come from?   Thank you very much in advance.  Images of the result (on the left) with the original (on the right).     Edit:  It seems that the problem would come from the use of theme... When I do not use any theme, things appear better.

I'm trying to include graphics in my Latex-file, which I compiled with latex+dvipdf on OS X. Latex however returns this error: "Cannot determine size of graphic"  My graphic is exported from PowerPoint, so I have tried both .pdf and .png. I get the same errors for both.  Sample code that doesn't work:  \begin{figure}[htb] \begin{center} \leavevmode \includegraphics[width=0.8\textwidth]{graph.png} \end{center} \end{figure}   If I have to manually set some measurements of the image, please tell me how I can find out those measurements. I need the image to take up about 80% of text width and be centered. Thanks.


Many says that the level 70 hell fire ring is easier to get. Other said it's much harder than the level 60 hell fire ring.  Well, I have a hard time finding people wanting to do keywarden.  So, how do I get huge xp reward?

Is there a limit for the bonus experience % that you can get?  Say you equip   Cain's Laurel, socketed with a Star ruby +25% 2 other Cain's set items                 +30% hellfire ring                            +35%   This will give you 90% bonus experience, is there a limit?


I am trying to install Ubuntu 16.04 on a new Dell XPS 15, 16gb Ram, i7 7700 CPU, 512gb SSD.  Windows is already preinstalled which I want to keep for the odd admin task so I added a partition of 220gb for my main Ubuntu machine. I have tried installing using the same boot drive I used on my new PC about 2 weeks ago which worked fine on there but I am just getting numerous errors when trying to install on this new machine.     I also tried installing the latest elementary OS with similar issues.  As the console was mentioning CPU I downloaded and ran the intel processor test and everything came out fine. Windows is also running well, or as well as it does so hardware seems fine.  Any ideas on how to resolve this?  I have tried three different usb drives all with the same result and also multiple ports on the machine itself.

I get this error message   NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [plymouthd:305]    on the startup of my system (even with live-cd).  My PC is a dell inspiron 7559 with intel graphic and nvidia.  UPDATE - this issue also happens when attempting to install ubuntu 18.10 using LiveUSB


I have received the following error after rebooting my virtual machine:   Error: Invalid magic number. alloc magic is broken as 0x7e92a4a0: 7e845c0 Aborted. Press any key to exit.   I have scoured the internet to no avail.

I cannot boot into GRUB. I see this:  Alloc magic is broken at XXXXXX Press any key   but when I do nothing happens. Holding shift doesn't do anything either.  The last time I could use my machine I changed stuff in /etc/grub.d, but I chrooted into the system, reverted everything and successfully ran update-grub.  What can I try?  If anyone wondering: Ubuntu 12.04.1, Installation media was (I guess) 11.10, it's an i5-first generation kernel, 4GB RAM, memtest was okay.


I'm working on a question below:     Let $H(n,k)$ denote the number of ways to partition a set with $n$ elements into $k$ subsets of the same size. Derive a formula for $H(n,k)$.   Thanks in advance for any hints! :D

Let's have 2 numbers, N and K, where K divides N. The number of K-combinations from a given set S of N elements is a well known formula. Let's concatenate N/K groups (resulting in N elements) such as the resulting set is N. How many possibilities are there, i.e. what's the formula?  For instance:    N=4, K=2, C(4, 2) = 6 {1,2},{1,3},{1,4},{2,3},{2,4},{3,4}   The 3 possibilities are:     {1,2},{3,4}   {1,3},{2,4}   {1,4},{2,3}   I generated these combinations and I think the number goes like this:  (4, 2): 3 (6, 3): 10 (6, 2): 15 (10, 5): 126 (9, 3): 280 (10, 2): 945 (14, 7): 1716 (12, 4): 5775 (15, 5): 126126 (15, 3): 1401400   Apparently, the result always divides with (N-1).


I can't believe I have to ask this, but where do I find an actual API reference for Blender scripting? I just can't seem to find one. I see  but no proper reference documentation.  For instance,  feels like it should be giving me a list of all the members of bpy.data but I don't see any way to get that information. The "next" button just takes me to the next section, and "modules" takes me somewhere else entirely.  What am I missing?  EDIT: The linked dupe DOES NOT answer the question. Clearly you did not read my question. I can't find the ACTUAL API REFERENCE. I don't understand why this is so complex to answer.  How do I know what each "class" (or whatever the python equivalent is) member variable and function is?

Some of my scripts scripts are broken e.g.  bpy.ops.pose.armature_layers(layers=sel_layers) # 2.6 api   has been (unnecessarily) renamed to  bpy.ops.pose.bone_layers(layers=sel_layers) # 2.7   In the 2.71 RC1  bpy.ops.anim.keyframe_insert(type='BUILTIN_KSI_LocRot')   leads to an error:  TypeError: Converting py args to operator properties:  enum "BUILTIN_KSI_LocRot"  not found in ('Available', 'WholeCharacter')   And seems no longer to respect the bone/armature layers.  The latest documentation I found is:    which is not accessible from the navigation pages from blender.org, manipulating the version part of the URL neither works (tried 2_71, 2_71RC1, 2_71_RC1).   Where can the 2.71 API be found?


I have this simple script on crontab (root): (centos 6.5)  if ! ping -c 1 172.20.1.1; then echo "NOT OK" >> /root/log ifconfig eth3 down sleep 5 ifconfig eth3 up else echo OK >> /root/log fi   The script works fine if I run it from directly from terminal and restarts the interfaces but not when run through crontab. I wanted to see if the crontab is actually running as expected and put the echo lines and I'm 100% sure the script is running because I see the OK and NOT OK lines on the log.   What do you think is wrong with this?

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I ask myself what is the more performance method when you join table and use JOIN in clause FROM and when you need to use BETWEEN :   Use Between in the FROM   or   Use between in the WHERE   Exemple :  SELECT * FROM Tab1 a inner join Tab2 b  on (a.pk=b.fk_1 AND a.date between b.date1 and b.date2)    Versus  SELECT * FROM Tab1 a inner join Tab2 b  on a.pk=b.fk_1   WHERE a.date between b.date1 and b.date2   Which one is the best?  Thank  P.S : sorry for my bad english

After reading it, this is not a duplicate of . The answer may be related (or even the same) but the question is different.    What is the difference and what should go in each?  If I understand the theory correctly, the query optimizer should be able to use both interchangeably.


My code is      A = \left[\begin{matrix}         1&\underbrace{\begin{matrix}             1&\dotsb&1         \end{matrix}}_N     \end{matrix}\right]   and the outcome is   but I want the following outcome    How can I get this?

I would like to put an underbrace below the matrix like this:  $$\left(\underbrace{ \left[\begin{array}{ccc}     a&b&c\\     d&e&f\\     g&h&i \end{array}\right]}_{A} \left[\begin{array}{c}     x_1\\     x_2\\     x_3 \end{array}\right]\right)$$     But I don't want the outer brackets \left( and \right) to stretch vertically. I want them to remain as if there was no underbrace. How to achieve that behaviour?


Greeting fellas.  I was performing the algorithm intended to obtain the number of partitions of a integer. When I tested my program, margin errors started to occur when n > 257. I actually had the same problem on another matter while working with factorials, but my thoughts were on the algorithm itself having some flaws. I know that python 3.5.x doesn't really have limits on number size.   I even tried to do the sum the old fashioned way with every sum being from:  from decimal import Decimal   but it didn't change the result (only added a longer computational time).  #! /usr/bin/python3.5  from unittest import TestCase as Test  def number_partition(n):     """      Building the 'Euler' triangle such as                 n     p(n,j) =    sum p(n-j,i)                 i=j     """     if n <  0: return 0     if n is 0: return 1     p = []     for i in range(n):         p.append([])         for j in range(i+1):             if j is i: p[i].append(1) ; break             p[i].append(sum(p[i-j-1][j:]))      return sum(p[n-1])   if __name__ == '__main__': #    number_partition(257) Test.assertEqual(Test(), number_partition(257), 394723676655357) # Pass Test.assertEqual(Test(), number_partition(258), 425933084409356) # returns 425933084409355 Test.assertEqual(Test(), number_partition(259), 459545750448675) # returns 459545750448673   So is the algorithm flawed, or is there a Python functionnality I didn't get ?  Thank you in advance for your time.

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


I think he's a human astronaut.  His boots have germs he is not aware of, which prove fatal to the aliens.  It might be by Arthur C. Clarke.

In the 70's or 80's I read a short story in which 2 astronauts looking for a nice place to eat lunch choose a spot at the pole of a small desolate planet, overlooking the world's only pool of surface water.  Due to the harsh extremes of heat, and lack of water, this is the home of the planet's single living organism, which has grown slowly over eons,  surviving the daily extremes, moving slowly over the bare rock, dissolving it with acidic digestive juices to get the nutrients it needs for survival. The men watch the organism while eating their lunch, then depart, unknowingly leaving death behind them in their garbage - cigarette butts, tin cans, wrappings - a bonanza that the creature moves over to dissolve and ingest, along with the human-based microscopic organisms that will destroy the alien being. The theme of the story is that although we reach out to the stars to seek life, we are much more connected to the lowest forms of life on Earth, than to any life we may find on other planets. I don't remember the author and title.  Can someone identify the story?


There is a menu on bottom left corner of my screen which shows a chrome icon in it. How do I disable it? I am running gnome shell 3.18.5 on ubuntu 16.04LTS.

The legacy tray (see the screenshot below) will be removed in GNOME 3.26. I want to wean myself off it before the change arrives in Ubuntu (17.10 or 18.04).    Can I disable the legacy tray in Ubuntu GNOME 17.04?


Let's say I have a keycode doorlock which accepts 4 digit passcodes. In order to enter, you must type the 4 digits of the passcode in a row, but there is no "Enter", and it doesn't reset after 4 digits. Thus, if you entered "11112222", the lock wouldn't just unlock if the passcode was "1111" or "2222", but also if it was "1112", "1122", and "1222". Given this, what is the most efficient series of digits to enter to go through all possible passcodes?

Suppose you have a computer with a password of length $k$ in an alphabet of $n$ letters.  You can write an arbitrarly long word and the computer will try all the subwords of $k$ consecutive letters. What is the smallest word that contains all combinations of $k$ letters as subword? (i.e. the fastest way to hack the computer :) )  The smallest word that contains $n^k$ subwords of size $k$ has length $k-1+n^k$ and based on some easy cases, we would like to prove that it is in fact possible to find a word of such length that contains all possible passwords. The problem can be translated into a problem in graph theory, by taking as vertices all words of length $k$.  We tried $k=2$, where you can prove the conjecture by induction. For $n=2$ and small $k$ it also works.


new to LaTeX and BibDesk. Hoping to somehow figure out how to get it to work!   I've entered all the required information into a bib file called Chapterbib.bib and saved it in the same folder as my file. In order to cite a source in my document, I copy the citation key into my document where I'd like to cite a source - however, rather than putting a citation in I simply get [?] after my sentence. I'm not sure what sort of packages or commands I should be using so any advice as to how to get moving from here would be much appreciated. Thank you for your help!

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


How I can prove that if $A$ is a ring and $f\in A$ is not nilpotent then $A_f\cong A[T]/(Tf-1)$?   My attempt is the following.  I define the homomorphism $\phi : A[T]\longrightarrow A_f$ in this way: $\phi(a):=a/1$ and $\phi(T^n)=1/f^n$. Now, of course $(Tf-1)\subseteq \ker \phi$, but I'm not able to prove the reverse inclusion.

I am having trouble with the following problem.      Let $R$ be an integral domain, and let $a \in R$ be a non-zero element. Let $D = \{1, a, a^2, ...\}$. I need to show that $R_D \cong R[x]/(ax-1)$.    I just want a hint.  Basically, I've been looking for a surjective homomorphism from $R[x]$ to $R_D$, but everything I've tried has failed. I think the fact that $f(a)$ is a unit, where $f$ is our mapping, is relevant, but I'm not sure. Thanks


I'm bit of noob when it comes to blender so I was wondering why when I import .fbx models into blender the textures do not appear even when I select the texture option?

I'm a new blender user, but have used other modelling programs before.   I've downloaded a  and unzipped it.   When I import the obj into blender, it is my understanding (from here: ) that the mtl should just import itself with it. However, when I import the obj, I just get a grey model with no texture. Is it actually importing the mtl but I'm not seeing it? Also for the record, I have changed no settings in blender.  Picture for reference:


i was upgrading to 15.10 with these two commands that i found on ubuntu forums:  sudo sed -i 's/vivid/wily/g' /etc/apt/sources.list  sudo apt-get update && sudo apt-get dist-upgrade   but at some point it showed network failure and it stopped so i tried this command:  apt-get update   but the problem i encountered is that even on rebooting on screen it flashes 15.04 now if i redo the upper two commands will it create duplicate repositories that i will have to take care of? because i dont have enough space on my laptop to waste. and any other detail for my upgrade to 15.10 would be highly appreciated!

How do I upgrade to the unreleased version of Ubuntu for testing?


I have a dictionary: D = {'N':5, 'S':0, 'W':6, 'E':1}  and I want to get key with maximum value among D['N']  and  D['S'].  For example I tried code  print(lambda k: max(k['N'], k['S'])(k=D.keys())) but it returns lambda object like this <function <lambda> at 0x000002C7B060C1E0>. Although I wanna get N in output.  Need help. Thanks!

I have a dictionary: keys are strings, values are integers.  Example:   stats = {'a':1000, 'b':3000, 'c': 100}   I'd like to get 'b' as an answer, since it's the key with a higher value.  I did the following, using an intermediate list with reversed key-value tuples:  inverse = [(value, key) for key, value in stats.items()] print max(inverse)[1]   Is that one the better (or even more elegant) approach?


On the website, the top tags number only shows your answer score, whereas on the apps it shows the combined score of questions+answers. This is pretty confusing.

I checked yesterday and today the new homepage in the Android app. Very surprised I saw that I would almost reach a silver tag badge, that confused be because I always take a look on possible badges I can get. However I compared the score with the website and I got a total different results. See this two screenshots:


Using ArcGIS Desktop 10.7 I want to substring numbers as text out of a string field into a new string field with field calculator so that I can use them for layer symbology. The field contains highway names such as 'I- 280' and 'State Rte 25' and I want only the '280' and '25' for a new field. Is there a Python conditional statement I can use that will substring the number regardless of digit length, placement (end or between text, eg, "State Rte 25 Bus")?

I am trying to calculate field test2 with only the numeric values from a string field test. The entire script is like:    def makestr(test)      list=[]      for s in test:          if s.isdigit():              list.append(s)      for a in list:          str=''.join(list)     But I keep getting an error:    Any ideas?


I am using USB cable to charge my phone, however, ubuntu auto mount my phone and show the files in it. How could I stop this?

I am using Ubuntu 11.10 (64 bits) and I do not want to mount automatically USB thumb drives in my system. I tried the command dconf-editor and gconf-editor but there isn't the icon to disable it in nautilus preferences (apps|nautilus|preferences|media_automount).  Thanks.


I have setup a machine for a relative that have children, I made myself an account on the computer which is the only administrator account.  I have forgotten the password that I had setup the administrator account on the machine. I did not create a recovery disk on setup nor did I associate any MS account with my user account.  Is there any way to reset the password on this account? Or make another administrator account?

I installed Windows 8 on my mother's notebook, she typed a new password for her and she lost it, she can't remember what she typed and no notes about it were made(my fault), now her Windows 8 installation just keep locked on logon/password screen.   How can I change the Windows 8 password for her account, reset the password or recovery the password without needing to reinstall entire Windows 8?   Could I just create another new account on the same computer from the safe mode or something like this?  PS: No live account was related to her Windows 8 account as far no account was registered on Windows 8 Store.


I am creating a simple static application in android studio. When I tried to run the application using USB debugging option, It crashed and showed two errors in logcat:   I am new to android studio and it is my first project, please help me in debugging this error.  Here is the screenshot for the MainActivity Java code where the error is supposed to be:

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


I'd like to create compact itemized lists within a column of a table that are vertically alligned with non-itemized text from the same column. I'm using enumitem to get more control over these environments, but I can't figure out how to completely remove the vertical spacing above and below the itemize environment.  Consider this simple example:  \documentclass[12pt]{report} \usepackage{enumitem} \usepackage{booktabs}  \begin{document}  \begin{tabular}{p{3cm}p{3cm}} \toprule Column one & Column two \\ \midrule First group & \begin{itemize}[noitemsep,topsep=0ex,partopsep=0ex,leftmargin=2ex] \item First item \item Second item \end{itemize} \\ Second group & \begin{itemize}[noitemsep,topsep=0ex,partopsep=0ex,leftmargin=2ex] \item First item \item Second item \end{itemize} \\ \bottomrule \end{tabular}  \end{document}     I have set topsep and partopsep to zero to try and remove the vertical spacing, but this does not seem to work as expected. Is there additional spacing outside the itemize environment that I'm overlooking?

If I create a table with several (short) lists, currently I'm using a table construction with enumitem to (almost) remove the left margin. Now I still have a rather large margin at the top and the bottom (above and below) of the itemize lists.   Is there any way I can instruct either the itemize list or the table to remove this margin as well?  Code example:  \begin{tabular}{|m{3cm}|p{5.5cm}|p{5.5cm}|}    \hline     Category 2 &     \begin{itemize}[leftmargin=*]         \item A         \item B     \end{itemize} &     \begin{itemize}[leftmargin=*]         \item C         \item F     \end{itemize} \\    \hline \end{tabular}