I would like to understand the specific differences in power adapters that have similar input/output spec's but have different described purposes. In other words, can I use any power supply/adapter as long as the spec's are the same?  In this case, I have a hard disk system that has a supplied adapter that I suspect is bad.  I have measured the voltage and it is within spec at 12.6Vdc.  I do not know how to measure the amperage output without taking it apart, but I assume it is not outputting the needed amps because the hard disk enclosure does not start.  So I want to first replace the power supply. Power supply is: Input: 100-240Vac Output: 12Vdc up to 6.67A  If I order one from the manufacturer, it is $70.  But there are many LED and general system power adapters on Amazon that have specs like: Input: 100-240Vac Output: 12Vdc up to 8A  for about $20.  So what am I purchasing for $70 versus $20?  I understand the mfr would be more for their own costs, but they're OEMing the product as well.  So am I safe in getting a 12Vdc 8A output power adapter, like LED purposed or other, or is there some specific reasons I cannot do this?
Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.
Update to latest version of java after ppa is discontinued I have been trying to install the latest version of java-8. However, I found out that the  due to changes in the java licence.  How should I update my java to 8.0_201 or 8.0_211 now?  Thanks! Java Object Reuse Should Java Objects be reused as often as it can be reused ? Or should we reuse it only when they are "heavyweight", ie have OS resources associated with it ?  All old articles on the internet talk about object reuse and object pooling as much as possible, but I have read recent articles that say new Object() is highly optimized now ( 10 instructions ) and Object reuse is not as big a deal as it used to be.  What is the current best practice and how are you people doing it ? Alternatives to "and/or"? What's the starting wealth for higher levels? The PHB only gives starting wealth for Level 1 PCs. Based on my experience in other games, specifically Pathfinder, I would expect to get more at higher levels. Where can I find an appropriate table or calculation? How to find all the subclasses of a class given its name? Let $G$, $H$, and $K$ be abelian groups. Assume $G \oplus H \cong G \oplus K$. If each are finitely generated, then the structure theorem easily gives us that $H \cong K$. However, there are counterexamples in the general case, namely $H=\mathbb{Z}$, $K=\mathbb{Z} \oplus \mathbb{Z}$, and $G=\bigoplus_{i=1}^\infty\mathbb{Z}$.   I am wondering what goes wrong with the following argument:   Form the split short exact sequence  $$0 \to G \xrightarrow{i} G \oplus H \xrightarrow{\pi} H \to 0$$  where $i$ and $\pi$ are the inclusion and projection, respectively. Then don't we immediately get from the first isomorphism theorem that $H \cong (G \oplus H)/G$, which would contradict the counterexample above?   If we run this for the counterexample given, we get the sequence   $$0 \to \bigoplus_{i=1}^\infty\mathbb{Z} \to \bigoplus_{i=1}^\infty\mathbb{Z} \to \mathbb{Z} \to 0$$  which seems to still be short exact, even though here $G \cong G \oplus H$. But of course here we can see directly that $(G \oplus H)/G \cong G/G$, which is trivial. So what went wrong?   It seems to me to be something along these lines: In this case, the kernel of the projection is not the same as the original group, it is just, say, $0 \oplus \mathbb{Z} \oplus \mathbb{Z} \oplus \dots$, i.e. nontrivial from the second coordinate on, which just happens to be isomorphic to the original group. So if we form the other short exact sequence with $K$ in place of $H$, then the difference seems to be that we have two different projection maps with different (but isomorphic) kernels.   But I'm not really sure how to explain this in the general case, if my reasoning is correct to begin with.   Thanks in advance for any help! I'm a bit of a force.com IDE newbie - still learning. I'm trying to migrate a simple custom object (no fields) from one sandbox to another and I'm running into this error:  # Deploy Results:    File Name:    package.xml    Full Name:  package.xml    Action:  NO ACTION    Result:  FAILED    Problem: Cannot deploy InstalledPackage in Package Manifest with any other types!   Any help would be greatly appreciated.  Thanks! Why is this trigger finding a null value despite the field being populated? what is the general definition for some partial differential equation being called elliptic, parabolic or hyperbolic - in particular, if the PDE is nonlinear and above second-order.  So far, I have not found any precise definition in literature. Keeping an updated balance (Accounting) I have been struggling trying to find a way to properly and reliably maintain a balance for accounts in an order/payment system.  Currently, the process consists of three tables. Below example is very simplified but gets the point across.  Table one contains the account ID, name, total paid, total orders, balance etc.  Table two contains payments, date, the account ID (FK) and amount.  Table three contains orders, date, the account ID (FK) and amount.  Calculating the balance is of course as easy as  SELECT SUM(payments.AMOUNT) FROM payments WHERE ID = [account] SELECT SUM(orders.AMOUNT) FROM orders WHERE ID = [account]   Followed by some simple addition/subtraction math:  UPDATE accounts SET BALANCE = [balance] WHERE ID = [account]   All good - the problem is - how do I maintain this over let's assume years of activity and many, many transactions?  Currently the accounts table is updated every single time a transaction is made, meaning the above three statements run every time. There is of course an index on the ID column in all three tables, and everything is fast and neat for now, but I work with less than 100,000 transactions, meaning everything fits into the RAM and basically all I throw at the database gets executed immediately. Over time this will change, of course - so how do I handle this?  Is it better to mark the accounts as "dirty" and process balancing in a batch job later, or can I keep updating the balance real-time even when I reach the point where the orders and payments tables will not fit into the RAM?  Do I need to segment the orders and payments and "lock" everything before a given time, such as before last calculation? (I would rather not). I ask because then I could do a SUM WHERE DATE > [last lock timestamp] and update with UPDATE BALANCE = [balance] + [value for last lock] and prevent the problem from outgrowing resources.  I don't need a running balance for each transaction. That's all I can find results for when I try to research this problem. I just care about the total amount paid, the total amount ordered and the balance of accounts.  Why don't I calculate on the fly when I need the balance, you ask? Because one must be able to query the system and ask "Which of my (let's say) 50.000 accounts have a balance below 0?" - something we cannot do easily if we do not store the balance with every account. Expected Value of Local Maxima and Local Minima Recently I came across this question:  Given a random permutation of integers 1, 2, 3, …, n with a discrete, uniform distribution, find the expected number of local maxima. (A number is a local maxima if it is greater than the number before and after it.) For example, if n=4 and our permutation was 1, 4, 2, 3, then the # of local maxima would be 2 (both 4 and 3 are maxima). I know the answer will be (n+1)/3 .I wanted to know what will be the answer when we have to consider the local maxima as well as the local minima i.e Finding out the expected number of local maxima and local minima. Annotation Scaling I made a map with annotations in QGIS 3.0.  This is how it looks like in the layout view:    If I print the map as PDF, one would expect to get the PDF to be WYSIWYG, right? However, it looks like this (it's about half the size):    Is there a way to influence the the scaling of the Annoations? I already tried to play with the Scale and Magnifier in the map view. I also tried to change the Scale in the map item.   The strange thing is, I believe it worked a few days ago. But today I installed QGIS 3.0 on a new PC and it showed the same behaviour... Please add close flags, duplicate links and review data to the public data dump How can I obfuscate (protect) JavaScript? Uniform Continuity implies Continuity Let $f$ be a function from a metric space $X$ to a metric space $Y$. Show that if $f$ is uniformly continuous on $X$ then $f$ is continuous on $X$. Show that the converse is not true.  Uniform continuity definition:  $∀ε&gt;0:∃δ&gt;0:∀p,q∈X:d_{X}(p,q)&lt;δ⟹d_{Y}(f(p),f(q))&lt;ε$  Continuity definition:  $∀ε&gt;0:∀p∈X:∃δ&gt;0:∀q∈X:d_{X}(p,q)&lt;δ⟹d_{Y}(f(p),f(q))&lt;ε$  I wonder if these proofs are correct and if they are formal enough?    Uniform continuity ⟹ Continuity   Let $f$ be uniformly continuous. Fix $ε_{0}$, obtain $δ_{0}(ε_{0})$ (as a function of $ε_{0}$), fix any $p_{0}$ and $q_{0}$ and we know that:   $d_{X}(p_{0},q_{0})&lt;δ_{0}⟹d_{Y}(f(p_{0}),f(q_{0}))&lt;ε_{0}$   If we want to prove that $f$ is continuous at $p_{0}$, we fix $ε_{0}$ and we pick the same $δ_{0}$ as above and fix any $q_{0}$ and we are assured by 1. that   $d_{X}(p_{0},q_{0})&lt;δ_{0}⟹d_{Y}(f(p_{0}),f(q_{0}))&lt;ε_{0}$   Since $p_{0}$ was arbitrary, $f$ is continuous at $X$.     Continuity $\color{red}{\implies}$ Uniform continuity   Let $f$ be continuous. Fix $ε_{0}$, fix any obtain $p_{0}$ and $p_{1}$, obtain both $δ_{0}(ε_{0},p_{0})$ and $δ_{1}(ε_{0},p_{1})$ (not necessarily equal), fix any $q_{0}$ and $q_{1}$ and we know that:   $d_{X}(p_{0},q_{0})&lt;δ_{0}⟹d_{Y}(f(p_{0}),f(q_{0}))&lt;ε_{0}$  $d_{X}(p_{1},q_{1})&lt;δ_{1}⟹d_{Y}(f(p_{1}),f(q_{1}))&lt;ε_{0}$   For $f$ to be uniformly continuous, if we fix $ε_{0}$, obtain $δ$, fix any $p_{0}$, $p_{1}$, $q_{0}$ and $q_{0}$ we must have that:   $d_{X}(p_{0},q_{0})&lt;δ⟹d_{Y}(f(p_{0}),f(q_{0}))&lt;ε_{0}$  $d_{X}(p_{1},q_{1})&lt;δ⟹d_{Y}(f(p_{1}),f(q_{1}))&lt;ε_{0}$   But those two implications need not hold for the same $δ$ as shown above. Suppose we pick $δ_{0}$ and w.l.o.g. we suppose $δ_{0}&gt;δ_{1}$. Then it could be the case that   $δ_{1}&lt;d_{X}(p_{1},q_{1})&lt;δ_{0}$  but we cannot conclude ⟹$d_{Y}(f(p_{1}),f(q_{1}))&lt;ε_{0}$.  Therefore, continuity does not imply uniform continuity. When to use an object pronoun or a possessive adjective before a gerund How to get a file's Media Type (MIME type)? How do you get a Media Type (MIME type) from a file using Java?  So far I've tried JMimeMagic &amp; Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type (not merely based on the extension)? While attempting to delete a question which was answered by myself, and with no other answers, I got the following warning:     Delete this answered question?      We do not recommend deleting questions with answers because doing so   deprives future readers of this knowledge.      Repeated deletion of answered questions can result in your account   being blocked from asking. Are you sure you wish to delete?   I understand that deleting your question when someone else has answered it is effectively nullifying the effort that person put into that answer, which is bad. But is it bad if the only answer that's deleted along with your question is your own? Applying graduated renderer in PyQGIS? Just trying to run the following code already given in the pyqgis cookbook to create graduated colors symbology (as in example with 2 classes)  I define the source info for the shapefile but when I run execute the code within my test-plugin, it just adds the layer without classifiying. Just adds as usual, all polylines appear same.  Any solution or working code/method?  link to code in cookbook   from qgis.core import  (QgsVectorLayer, QgsMapLayerRegistry, QgsGraduatedSymbolRendererV2, QgsSymbolV2,QgsRendererRangeV2)  myVectorLayer = QgsVectorLayer('C:/my_test_shape_file.shp', 'test_shp_file', 'ogr')  myTargetField = 'target_field' myRangeList = [] myOpacity = 1  # Make our first symbol and range... myMin = 0.0 myMax = 50.0 myLabel = 'Group 1' myColour = QtGui.QColor('#ffee00') mySymbol1 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType()) mySymbol1.setColor(myColour) mySymbol1.setAlpha(myOpacity) myRange1 = QgsRendererRangeV2(myMin, myMax, mySymbol1, myLabel) myRangeList.append(myRange1)  #now make another symbol and range... myMin = 50.1 myMax = 100 myLabel = 'Group 2' myColour = QtGui.QColor('#00eeff') mySymbol2 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType()) mySymbol2.setColor(myColour) mySymbol2.setAlpha(myOpacity) myRange2 = QgsRendererRangeV2( myMin, myMax, mySymbol2, myLabel) myRangeList.append(myRange2)  myRenderer = QgsGraduatedSymbolRendererV2('', myRangeList) myRenderer.setMode(QgsGraduatedSymbolRendererV2.EqualInterval) myRenderer.setClassAttribute(myTargetField) myVectorLayer.setRendererV2(myRenderer) QgsMapLayerRegistry.instance().addMapLayer(myVectorLayer)      @Kelly's code works perfectly.   However I noticed that both the code (one I have typed in my first message and yours in the 2nd message) DO NOT work in QGIS v1.7.3 but WORKS in QGIS v1.8.0. I think this was a bug(?) that already resolved in v1.8.0  And one more question;  Do you have any sample code for (natural breaks, Jenks) classification of the "numeric_attribute_field" based on given number of classes (i.e. no of classes will be a variable in the code, say "n", and I will pass that from the plugin GUI i.e. n = spinBox.value() ) I launch a batch which call a lot of scheduled job. But I reach the governor limit :     Maximum number of Apex classes scheduled concurrently : 100   I'm wondering what happens when this limit is reached. The next scheduled jobs are waiting the number of scheduled jobs is lower than 100 for being executed or are they all cancelled ?  And is there to way to manage the number of scheduled jobs to avoir reaching this limit ? For example wait before schedule a new job if we are near the limit.