I am looking for a way to redefine the font that \mathcal uses in math mode. I would like any characters using the \mathcal{} function to be written in, for example, Asana Math font, and all other math text to be written in the default text. So far, I have:  \documentclass[11pt]{report}  %%%Packages%%%  \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{fontspec} \usepackage{unicode-math} %\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}  %\setmathfont{Asana Math} \let\mathcal=\mathscr  \begin{document}  \begin{equation} \mathcal{p} = U(x,t) \end{equation}  \end{document}   as my MWE.

In ordinary LaTeX, one can easily add new math alphabets by using \DeclareMathAlphabet. One is then able to use, say, cmsy, eus, and rsfs letters side-by-side. Unfortunately, there does not seem to be a similar mechanism in unicode-math, or at the very least \DeclareMathAlphabet doesn't do what it's supposed to do.  Question. How can I set up my own math alphabets in unicode-math?   Attempted workarounds  Since unicode-math has lots of math alphabets, one workaround might be to replace an unused alphabet with the desired one using \setmathfont[range=...->...]. This doesn't quite work right in my example:  \documentclass[12pt]{article} \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text}  \usepackage{unicode-math}  \scrollmode  \setmathfont{xits-math.otf} \setmathfont[range={\mathscr,\mathbfscr},StylisticSet=0]{xits-math.otf} \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{xits-math.otf} \setmathfont[range={\mathtt->\mathcal}]{latinmodern-math.otf}  \begin{document} \[ \begin{array}{c} \mathcal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathscr{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathtt{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \end{array} \]   I suspect the problem is that the codepoints of the calligraphic letters in Unicode are not contiguous.   Using \mathversion seems to work better:  \documentclass[12pt]{article} \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text}  \usepackage{unicode-math}  \setmathfont{xits-math.otf}  \setmathfont[version=eucal]{latinmodern-math.otf} \newcommand{\eucal}[1]{\mathchoice %   {\mbox{\mathversion{eucal}$\displaystyle\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\scriptstyle\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\scriptscriptstyle\mathscr{#1}$}}}  \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{xits-math.otf}  \begin{document} \[ \begin{array}{c} \mathcal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathscr{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \eucal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \end{array} \] \end{document}   But this feels very inefficient.


Let A be a ring and b be an ideal of A. The quotient ring of A by b, denoted A/b is the ring of all equivalence classes A + b.  Prove that the assignment $$c → c/b$$ induces a one-to-one correspondence between the ideals of A that contain b and the ideals of A/b.  I am completely at a loss. I understand one-to-one to mean bijective so I assume it is necessary to show the mapping is both injective and surjective? I also don't know what c is supposed to be - is it an element of A? Please help!

Let $A$ be a ring and $\mathfrak{b}$ be an ideal of $A$. Prove that the assignment   $$\mathfrak{c} \mapsto \mathfrak{c}/\mathfrak{b}$$   induces a one-to-one correspondence between the ideals of $A$ that contain $\mathfrak{b}$ and the ideals of $A/\mathfrak{b}$.   This is a problem I've been given, typed exactly as I received it. I find it a bit unclear, but I think $\mathfrak{c}$ is meant to be an ideal of $A$ which contains $\mathfrak{b}$. Then I must prove that the map given is bijective.  I've seen quotient rings, but not between ideals before. Should I treat it as I would any other quotient ring?  Assuming what I've said is correct, if the map above is $f$, then I must show that $f(\mathfrak{c})=\mathfrak{c}/\mathfrak{b}=\lbrace x+y : x \in \mathfrak{c}, y \in \mathfrak{b} \rbrace$ is a bijection?


I am trying to centre a DIV which contains a form.  I have managed to grey out the back ground and would like to centre the form within the window.  Below is what I have done so far, but I do not know how to progress it further to get the result that I need.  I am able to 'auto margin' horizontally, but I am not able to do this vertically (please see image).  If you stretch the browser window further vertically, the form stretches to occupy all of the vertically space.       #idOfForm{  margin: auto;  z-index: 10000;  position: absolute;  background-color: white;  top: 0;  bottom: 0;  left: 0;  right: 0;  padding: 10px;  width: 500px;  min-height: 250px;  border: 1px solid #ccc;  border-radius: 10px;  box-shadow: 3px 3px 3px #b8b8b8;  font-family: sans-serif;  color: #484848;  }

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?


Few months back,  changed to  and when I used to type kickass.to and enter, Firefox was redirecting me to kickass.so. Now kickass.to is back in action and kickass.so doesn't exist any more. Still, whenever I go to kickass.to, firefox redirects me to kickass.so. I deleted all the cookies, still the problem persists. Just to use kickass, I've to use chrome.  How to resolve this?  Firefox version: 33.1 OS: Fedora 21

Is it possible to clear only 301-redirects from Firefox's cache? CTRL+F5 doesn't do the job since you just reload the target without caching but do not clear the cached redirect.  An option to disable caching of those redirects completely would be fine, too - but some way (possibly through an extension) to remove those cached redirects would be better.  Note: I'm not looking for answers that disable all caching (including CSS, JS, etc.)


what is the basic difference between a mapping and a function? many say they are same but the opposite views are also seen. is mapping a restricted version of a function?

I wonder if there is any difference between mapping and a function. Somebody told me that the only difference is that mapping can be from any set to any set, but function must be from $\mathbb R$ to $\mathbb R$. But I am not ok with this answer. I need a simple way to explain the differences between mapping and function to a lay man together with some illustration (if possible).  Thanks for any help.


The case:   Launch Google Chrome. Open YouTube video using the 720p resolution with 60 fps. Make it full screen. Use the "system volume up" hotkey.   After step 3 the video is frozen, but sound continues to play. I can only open console using "CTRL+F1" hotkey and reboot the PC.  Another unstable case, that brings the same result:   Launch Google Chrome. Open YouTube video using the 720p resolution with 60 fps. Make it full screen. Exit full screen.   I'm using Intell HD Graphics with new drivers, but the same case was when I used default Ubuntu's driver.  The Google Chrome version: 49.0.2623.87 (64-bit)  The same situation repeats on three different PCs. These cases do not repeat on Firefox.  Can someone confirm the same bug on his PC? Is there some way to resolve (or temporarily resolve) this problem?

Any time I try to watch a flash (or maybe HTML5) video in chrome, when I fullscreen it, Ubuntu freezes, goes black, and then my monitor says "no signal." This only happens on the second or third time of using fullscreen, oddly enough. I can do it once with no issues. This has only been an issue since the update of Chrome 40 a few days ago. The problem does not exist in Chrome. I'm using Intel Haswell graphics, if that is important.


I'm trying to change a value user enters to a true number (ex. 15 or 144.38). If it has unapproved characters (ex. $,) then they should be stripped. Also if user enters value with multiple periods (ex. 43.14.14) then I want to clear entire value. I was able to do step 1 but can't figure step 2, please advise. Here's my code so far   function myFunction() {   var str = document.getElementById("number_field").value;   var res = str.replace(/[^0-9.}]/g,"");   document.getElementById("approved_number").innerHTML=res; }

What's the cleanest, most effective way to validate decimal numbers in JavaScript?  Bonus points for:   Clarity. Solution should be clean and simple. Cross-platform.   Test cases:  01. IsNumeric('-1')      => true 02. IsNumeric('-1.5')    => true 03. IsNumeric('0')       => true 04. IsNumeric('0.42')    => true 05. IsNumeric('.42')     => true 06. IsNumeric('99,999')  => false 07. IsNumeric('0x89f')   => false 08. IsNumeric('#abcdef') => false 09. IsNumeric('1.2.3')   => false 10. IsNumeric('')        => false 11. IsNumeric('blah')    => false


I have a doubt on why sum of squared errors is not used for Logistic regression and instead maximum likelihood estimation is used and also why not the vice versa.  Edited  Many were asking me to clarify the question, my intention was to know about using a squared error loss function to find β vs MLE

I am trying to use squared loss to do binary classification on a toy data set. I am using mtcars data set, use mile per gallon and weight to predict transmission type. The plot below shows the two types of transmission type data in different colors, and decision boundary generated by different loss function. The squared loss is $\sum_i (y_i-p_i)^2$ where $y_i$ is the ground truth label (0 or 1) and $p_i$ is the predicted probability $p_i=\text{Logit}^{-1}(\beta^Tx_i)$. In other words, I am replace logistic loss with squared loss in classification setting, other parts are the same. For a toy example with mtcars data, in many cases, I got a model "similar" to logistic regression (see following figure, with random seed 0).  But in somethings (if we do set.seed(1)), squared loss seems not working well.  What is happening here? The optimization does not converge? Logistic loss is easier to optimize comparing to squared loss? Any help would be appreciated.  Code d=mtcars[,c("am","mpg","wt")] plot(d$mpg,d$wt,col=factor(d$am)) lg_fit=glm(am~.,d, family = binomial()) abline(-lg_fit$coefficients[1]/lg_fit$coefficients[3],        -lg_fit$coefficients[2]/lg_fit$coefficients[3]) grid()  # sq loss lossSqOnBinary<-function(x,y,w){   p=plogis(x %*% w)   return(sum((y-p)^2)) }  # this random seed is important for reproducing the problem set.seed(0)  x0=runif(3) x=as.matrix(cbind(1,d[,2:3])) y=d$am opt=optim(x0, lossSqOnBinary, method="BFGS", x=x,y=y)  abline(-opt$par[1]/opt$par[3],        -opt$par[2]/opt$par[3], lty=2) legend(25,5,c("logisitc loss","squared loss"), lty=c(1,2))


On the web, is it wise to allow a modal popup (B) to be opened from another modal popup (A)?  If modal popup B were to be closed, the user would again be viewing modal popup A.  I am asking as I can envisage some issues e.g. with dismissing the second popup, if the overlay is clicked do both modals close or just the second one? Would the user think that the first modal has gone or would they know they can return to it by closing the second modal? etc.  Example mockup:   Modal A.  Modal B. Opens when 'button' is clicked in Modal A

Using bootstrap modals, I keep running into the issue of having an info modal with content inside of it, but there's a need to have a "confirm your decision" modal/popup on top of the initial modal.   E.g. I have a page with a list of users. You can click on a user to open a modal with user info inside of it. Then there will be maybe a "remove user" button in the modal that requires a "confirm remove user" modal.  Is it ever a good idea to have a modal on top of another modal or am I using modals wrong? Should I use actual pages instead?


I seem to have lost my companion Lydia, i noticed she was gone after a big battle but i couldn't find her corpse anywhere, so i assume she fell of the bridges into the canyons at the sorcerer academy place.  Is there anyway to get her back? the save has already been overwritten

I had parked my follower at an inn with a bunch of valuable items that I didn't want to carry. I guess I have been out a bit too long as this message appears:      Your follower tires of waiting and leaves.    There have been other situations where my follower has mysteriously disappeared as well.  How can I find my follower when they get up and leave or disappear into thin air?


I have an installed Ubuntu version 16.04 running with Kernel version 4.4.0-64-generic  How can I upgrade the kernel to 4.10?

Currently I'm running Linux-3.0 and I want to update it to Linux-3.3.1 the latest stable kernel release as mentioned at . Can I update to 3.3.1 in Ubuntu without any risk of crashes? I'm updating my kernel regularly as provided by the Update Manager..Currently I have Linux-3.0.0.17..Can I update?  NOTE:  The latest kernel version any user is supposed to use in Ubuntu is updated automatically via the Update Manager, so no action is normally required by user regarding kernel upgrades. What the question author is referring to is mainline kernel, see:


I'm asked to write out the cycle decomposition of each element of order 2 in $S_4$. However, from my understanding, a cycle decomposition is the product of disjoint cycles. But the elements in $S_4$ of order 2 are already products of disjoint cycles. For example,  How do I simplify (1 2) or (1 2)(3 4)?  Isn't the only way to write (1 2) as a product (1 2)=(1 2)(1 2)? Which is not disjoint and hence not a cycle decomposition? And isn't (1 2)(3 4) already a cycle decomposition?

Find the number of elements of order two in the symmetric group $S_4$ of all permutations of the four symbols {$1,2,3,4$}.    the order two elements are two cycles.number of $2$ cycles are $6$.but the given answer is $9$.where I am wrong?can anybody help me.  more generally is there any formula for the problem "Find the number of elements of order $r$ in the symmetric group $S_n$"


The problem at hand:  Recall our recursive definition of the reversal of a string over $\Sigma$.   Base case: $\epsilon^R=\epsilon$ If $w \in \Sigma^*$ and $c \in \Sigma$, then $(wc)^R =cw^R$.   Use the definition above along with mathematical induction to prove the following: If $v,w$ are strings over $\Sigma$, then $(vw)^R= w^Rv^R$.  I'm honestly stumped and don't know where to begin. I've done mathematical induction on actual numbers but not on just variables like this problem. Any help is appreciated.

I am trying to prove that:  (uv)R = vRuR  where R is the reversal of a String defined recursively as:  aR = a   (wa)R = awR  I think I have the base case right, but I am having trouble with the inductive step and final proof.  here is what I have:  Base Step  prove for n = 1 where |uv| = 1  (uv)R = uReR = uR = u (where e is the empty string)  I dont really know where to go from here, any help would be great.  Thanks


I don't know much more about Ubuntu yet, I am looking for android emulator for my Ubuntu14. If any there could you please let me know (with download and installation instructions)

I will like to know some of the android emulators that work really well with Ubuntu 11.10 and above. I want to try 'whatsapp' on Ubuntu through an android emulator. Thanks in advance


I have a party with 2 Shadow Sorcerers. If one of them casts darkness with sorcery points, is there a way - RAI or RAW it doesn't matter- for the other sorcerer to see through it?  It seems stupid that a shadow sorcerer can't see through a spell cast with his own capacity.

get the Eyes of the Dark feature (XGtE, p. 51):     When you reach 3rd level in this class you learn the darkness spell [...] If you cast it with sorcery points, you can see through the darkness created by the spell.   Does this mean that if a Shadow Sorcerer casts darkness using sorcery points and then moves into a different area of magical darkness (not the one s/he created), the Sorcerer would not be able to see?  Or does the ability mean that the Sorcerer would possess the ability to see through the magical darkness created by the darkness spell in general (provided they were maintaining their own casting of the spell)?


I would've read this short-story either in 2019 or 2020, possibly in a sci-fi compilation. The Gist of the Story goes as follows: The Protagonist, A Human (possibly a diplomat of some kind), arrives on a plant (potentially Mars) to meet with members of the resident civilisation (Martians). This Species, who I think were humanoid, share similar senses to Humans, all but for a smaller range of experience for either sight (colour-blindness) or smell. However they also have a sense that Humans do not, which is the ability to "perceive sound/waves", and so have created instruments which produce "visual music" which they view. The Diplomat overhears of this experience, and presses the Alien Diplomat that he has been meeting with to witness the phenomenon. The Alien Diplomat warns him that, although humans can experience this phenomenon through (some means that I can't recall; possibly through injection of a drug), these means, in the process, degenerate the very part of the brain which allows Humans to experience it. They then go on to say that those Humans who had previously experienced the phenomenon, later took to drugs or committed suicide, as the disparity between this experience and their day-to-day experiences were too great. The Protagonist aware of the potential consequences undergoes the procedure and experiences the phenomenon, after which, and in conclusion of the story, he notes his newfound state of depression.

The human visitor can't appreciate their music and takes a drug which allows him to hear as the aliens can hear. The drug opens his appreciation to the beauty of the alien's music, but the drug wears off, having burned out the part of his brain that allowed the drug to work, leaving him crushed with the realization of what he is now missing.


I am doing async programming with C# and I pass the loop counter 'i' as a parameter inside the Run method of Task to run it it asynchronously. Everything works fine except that the loop counter 'i' inside each task is updated whenever it is incremented in the caller. In other words, the 'i' does not keep its value and I am not sure how to fix that.   //A queue for all the tasks var tasks = new BlockingCollection<Task<ResultWrapper>>(); for (int i = 1; i <= 10; i++) {        Console.WriteLine("frame: " + i);     //Grab a frame     Bitmap frame = reader.ReadVideoFrame(i);      //Add the frames to the queue and run them asynchronously     tasks.Add(Task.Run(() => RequestAnalysis(projectId, endpoint, frame, i)));  }   And here is the code for RequestAnalysis() function:  private static ResultWrapper RequestAnalysis(Guid projectId, PredictionEndpoint endpoint, Bitmap frame, int i) {     Console.WriteLine("Frame {0} task is running", i);     //some other stuff here... }   Here is a sample output:  frame: 1 frame: 2 frame: 3 frame: 4 frame: 5 Frame 3 task is running Frame 3 task is running frame: 6 Frame 4 task is running frame: 7 frame: 8 frame: 9 Frame 5 task is running frame: 10 Frame 11 task is running Frame 11 task is running Frame 11 task is running Frame 11 task is running Frame 11 task is running Frame 11 task is running   But I expect it to be something like this:  frame: 1 frame: 2 frame: 3 frame: 4 frame: 5 Frame 1 task is running Frame 2 task is running frame: 6 Frame 3 task is running frame: 7 frame: 8 frame: 9 Frame 4 task is running frame: 10 Frame 5 task is running Frame 6 task is running Frame 7 task is running Frame 8 task is running Frame 9 task is running Frame 10 task is running   I would appreciate any help. I am new to C# and I am not sure what I am missing.  Thanks.

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


Does ffmpeg have the inverse of the silencedetect filter? I'm recording audio, and I tap on the mic to mark the places to split the recording at.

Is there a plugin I'm missing that allows me to determine the volume samples over the length of an audio file?  For example, a sample of every second to gain the dB vs timestamp?


As an example, it is certainly trivial to verify that  is true for all numbers up to 10^10 using a reasonably powerful computer. We now have mathematical proof of that theorem for all numbers, but are there other examples showing the opposite? E.g. a certain theorem is known to be true for all numbers up to 10^20, but there is also a known counter example at a much larger value.   Obviously it's easy to make up such a theorem for the purpose of the question, so I would like to limit the scope to theorems that were actually researched by the mathematical community.

Often, when I try to describe mathematics to the layman, I find myself struggling to convince them of the importance and consequence of "proof". I receive responses like: "surely if Collatz is true up to $20×2^{58}$, then it must always be true?"; and "the sequence of number of edges on a complete graph starts $0,1,3,6,10$, so the next term must be 15 etc."  Granted, this second statement is less logically unsound than the first since it's not difficult to see the reason why the sequence must continue as such; nevertheless, the statement was made on a premise that boils down to "interesting patterns must always continue".  I try to counter this logic by creating a ridiculous argument like "the numbers $1,2,3,4,5$ are less than $100$, so surely all numbers are", but this usually fails to be convincing.  So, are there any examples of non-trivial patterns that appear to be true for a large number of small cases, but then fail for some larger case? A good answer to this question should:   be one which could be explained to the layman without having to subject them to a 24 lecture course of background material, and have as a minimal counterexample a case which cannot (feasibly) be checked without the use of a computer.   I believe conditions 1. and 2. make my question specific enough to have in some sense a "right" (or at least a "not wrong") answer; but I'd be happy to clarify if this is not the case. I suppose I'm expecting an answer to come from number theory, but can see that areas like graph theory, combinatorics more generally and set theory could potentially offer suitable answers.


I'm trying to read huge hive table with 13 million records using groovy where the data is in parquet format. I used following to code but I'm getting OOM java heap space error. I have given max 32 GB memory and setFetchsize(5000) still its getting error.  JAVA_OPTS="-Xms1024M" JAVA_OPTS="-Xmx32556M"   Any Help will be appreciated.  Code:    String contSql = "select * from staging.cont_staging";                 ResultSet resRateRecords = stmt.executeQuery(contSql);                 Map <String,Map<String,String>> masterRecords = new HashMap<String,Map<String,String>>();                 Map<String,String> existingRecords = null;                 int count = 0;                 resRateRecords.setFetchSize(5000);                 while(resRateRecords.next()) {                          try{existingRecords = new HashMap<String,String>();  masterRecords.put(resRateRecords.getString("contract_id")+"#"+count++,existingRecords);                         }catch(Exception e){                                 e.printStackTrace();                         }   Error  java.lang.OutOfMemoryError: Java heap space         at org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:355)         at org.apache.thrift.protocol.TBinaryProtocol.readString(TBinaryProtocol.java:347)         at org.apache.hive.service.cli.thrift.TStringColumn$TStringColumnStandardScheme.read(TStringColumn.java:453)         at org.apache.hive.service.cli.thrift.TStringColumn$TStringColumnStandardScheme.read(TStringColumn.java:433)         at org.apache.hive.service.cli.thrift.TStringColumn.read(TStringColumn.java:367)         at org.apache.hive.service.cli.thrift.TColumn.standardSchemeReadValue(TColumn.java:328)         at org.apache.thrift.TUnion$TUnionStandardScheme.read(TUnion.java:224)         at org.apache.thrift.TUnion$TUnionStandardScheme.read(TUnion.java:213)         at org.apache.thrift.TUnion.read(TUnion.java:138)         at org.apache.hive.service.cli.thrift.TRowSet$TRowSetStandardScheme.read(TRowSet.java:573)         at org.apache.hive.service.cli.thrift.TRowSet$TRowSetStandardScheme.read(TRowSet.java:525)         at org.apache.hive.service.cli.thrift.TRowSet.read(TRowSet.java:451)         at org.apache.hive.service.cli.thrift.TFetchResultsResp$TFetchResultsRespStandardScheme.read(TFetchResultsResp.java:518)         at org.apache.hive.service.cli.thrift.TFetchResultsResp$TFetchResultsRespStandardScheme.read(TFetchResultsResp.java:486)         at org.apache.hive.service.cli.thrift.TFetchResultsResp.read(TFetchResultsResp.java:408)         at org.apache.hive.service.cli.thrift.TCLIService$FetchResults_result$FetchResults_resultStandardScheme.read(TCLIService.java:13251)         at org.apache.hive.service.cli.thrift.TCLIService$FetchResults_result$FetchResults_resultStandardScheme.read(TCLIService.java:13236)         at org.apache.hive.service.cli.thrift.TCLIService$FetchResults_result.read(TCLIService.java:13183)         at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)         at org.apache.hive.service.cli.thrift.TCLIService$Client.recv_FetchResults(TCLIService.java:505)         at org.apache.hive.service.cli.thrift.TCLIService$Client.FetchResults(TCLIService.java:492)         at org.apache.hive.jdbc.HiveQueryResultSet.next(HiveQueryResultSet.java:335)         at java_sql_ResultSet$next.call(Unknown Source)         at BEContractRateLoad.fetchContractRateRecords(DestRateLoad.groovy:300)         at BEContractRateLoad.processContractRecords(DestRateLoad.groovy:397)         at BEContractRateLoad$processContractRecords$1.call(Unknown Source) Groovy has reported an error, terminating

I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into java.lang.OutOfMemoryError: Java heap space error because I am not being conservative on memory usage. The user can open unlimited number of files, and the program keeps the opened objects in the memory. After a quick research I found  and others saying on Windows machine the JVM defaults max heap size as 64MB.  Given this situation, how should I deal with this constraint?  I could increase the max heap size using command line option to java, but that would require figuring out available RAM and writing some launching program or script. Besides, increasing to some finite max does not ultimately get rid of the issue.  I could rewrite some of my code to persist objects to file system frequently (using database is the same thing) to free up the memory. It could work, but it's probably a lot work too.  If you could point me to details of above ideas or some alternatives like automatic virtual memory, extending heap size dynamically, that will be great.


I'm fairly new at C# but want to make a program which imports a background image then a partially transparent image and combines the two into a new image. Then the image is saved. How would I do this?

Simple idea: I have two images that I want to merge, one is 500x500 that is transparent in the middle the other one is 150x150.  Basic idea is this: Create an empty canvas that is 500x500, position the 150x150 image in the middle of the empty canvas and then copy the 500x500 image over so that the transparent middle of it allows the 150x150 to shine through.  I know how to do it in Java, PHP and Python... I just don't have any idea what objects/classes to use in C#, a quick example of copying an images into another would suffice.


Prove that $$ \lim_{x \to +\infty} \frac{x}{e^x} = 0$$ The highest degree is one so I divided both the numerator and denominator by $x$: $$= \lim_{x \to +\infty}\frac{\frac{x}{x}}{\frac{e^x}{x}} $$ $$= \lim_{x \to +\infty}\frac{1}{\frac{e^x}{x}} $$ And I argued that the denominator approaches a big value as x approaches $+\infty$, thus the limit approaches zero. If this is true, what is more mathematical way of doing this?

In other words, how to prove:  For all real constants $a$ and $b$ such that $a > 1$, $$\lim_{n\to\infty}\frac{n^b}{a^n} = 0$$  I know the definition of limit but I feel that it's not enough to prove this theorem.


If I have an inclined plane, which has acceleration $\alpha$, will a block placed on the inclined plane slip back with the same acceleration? (considering that the surface is frictionless)

Question: Find the mass M of the hanging block in the following figure which will prevent the smaller block from slipping over the triangular block. All the surfaces are frictionless and the strings and the pulleys are light.    What I did: Considering that M-mass block is moving downwards, I assumed that the string would transmit force $Mg$ to the inclined plane. Thus the inclined plane would move forward with acceleration $\frac{Mg}{M^-}$ towards the right, while the m-mass block would move backward, in a horizontal direction, with the same acceleration. Calculating components, the acceleration up the incline would be $\frac{Mg}{M^-}\cos \alpha$. The acceleration of the block on its own would be $g\sin \alpha$. Equating the two, I got $M = M^-\tan \alpha$  New approach (considering horizontal component of normal force exerted by small block) Considering the fact that the normal force exerted by the wedge on the block to be $mg\cos \alpha$, the block exerts an equal force on the wedge. The horizontal component of this normal force will be $mg\cos \alpha\sin \alpha$. Thus the acceleration of the wedge will be $$\frac{Mg - m\cos \alpha\sin \alpha}{M^-+m}$$ This should be equal to the downward acceleration of the small block: $g\sin \alpha$. Equation the two and solving for $M$, I got: $$M = \sin \alpha(M^- + m) + m\cos \alpha\sin \alpha$$ Still not the correct answer: $\frac{M^- + m}{\cot \alpha -1}$


I had stored locations in wp with defined taxonomy. I would like implement a search that can take in consideration the location, eg,     search for 'car rental, Maryland'   All car rental are stored as users and every users has a location number in wp_usermeta table that map into location name. This map is done by the theme whenever a user set the field location in is account.  In my taxonomy of locations I have specified all the cities located in Maryland.  So the car rental 'XYZ' in Annapolis must result in the output of the previous search.   How can I exploit the taxonomy structure in the search?

I have two custom taxonomies applied to two custom post types. the terms list on the sidebar just fine and will list all posts associated with it. However, if you search one of the terms in specific, it doesn't bring up a post with that term.  Example:  Search for term "PQRI"  I get nothing. Any ideas? I've tried using various search plugins but they either break my custom search parameters or just don't work.


So in order to have more control over CPU with  I need to disable pstates so it uses acpi. Now when I add "intel_pstate=disable" to grub and reboot it boot but stay on ~700MHz frequency when I try to change it via cpufreq gui of via terminal but it doesn't change. When pstates is not diabled I can use cpufreq but only to set to performance or ondemand with it disabled it offers more options but doesn't work. Note in install document it says I should disable pstates. Here is screenshot with pstates disabled.  My CPU is i5 2520m if that matters.

I have a Dell notebook with i7 processor and Ubuntu 14.10. When i disable SpeedStep in my BIOS my computer is very fast but the fan runs very often and the battery gets empty fast.  When I activate SpeedStep, then Ubuntu gets very slow. I have tried switching the governor to performance with no effect.  This is what cpufreq-info shows for all 7 CPUs:  analyzing CPU 7: driver: intel_pstate CPUs which run at the same hardware frequency: 7 CPUs which need to have their frequency coordinated by software: 7 maximum transition latency: 0.97 ms. hardware limits: 800 MHz - 3.70 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 3.70 GHz and 3.70 GHz.               The governor "performance" may decide which speed to use               within this range. current CPU frequency is 1.17 GHz.   Strange thing is the frequenccy never goes above 1.2 GHz. I have tried starting firefox or compiling a big project.  This is the CPU related output of lshw:   *-cpu       description: CPU       product: Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz       vendor: Intel Corp.       physical id: 43       bus info: cpu@0       version: Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz       slot: SOCKET 0       size: 3581MHz       capacity: 3581MHz       width: 64 bits       clock: 100MHz       capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cpufreq       configuration: cores=4 enabledcores=4 threads=8   I got this issue after upgrading from Ubuntu 14.04 to 14.10.  So how to get Ubuntu 14.10 to use my CPU on full speed when needed?  Update: After disabling intel_pstate all CPUs run at 800 MHz no matter what I do. Switching governor by applet or command line has no effect.  Update: After installing cpufreqd, /var/log/syslog gets these messages in a loop:  Mar  3 13:00:03 scala cpufreqd: cpufreqd_set_profile     : Couldn't set profile "Performance High" set for cpu0 (2700000-2700000-performance) Mar  3 13:00:03 scala cpufreqd: cpufreqd_loop            : Cannot set policy, Rule unchanged ("none").   Update: cat /sys/devices/system/cpu/cpu*/cpufreq/bios_limit prints 800000 (800 MHz) for all CPUs. Where does this limit come from? How to increase it?


Let $(A, \leq_A),(B,\leq_B)$ be well-ordered sets with order preserving injective functions $f:A \to B, g:B \to A$. Show that $(A, \leq_A),(B,\leq_B)$ are isomorphic (meaning there is an order preserving bijection).  Using Schröder–Bernstein we have the bijection $h:A \to B, h(a)= \begin{cases} f(a) & \text{ if } ...\\  g^{-1}(a) & \text{ if } ...  \end{cases}$ My best bet is that $h$ would also be order preserving but I'm not sure how to show it. The problem is for $x \leq y \in A$ s.t $h(x)=f(x), h(y)=g^{-1}(y)$, how do we show $f(x) \leq g^{-1}(y)$? Is my idea even correct? Hints appreciated...

Let $A, B$ be well ordered sets. If $A$ is order isomorphic to a subset of $B$, and $B$ is order isomorphic to a subset of $A$, prove that $A, B$ are order isomorphic.  I know that two well ordered set is order isomorphic iff there exists a increasing function(i.e. $x<_A y \Rightarrow f(x)<_B f(y)$) from $A$ to $B$ which is bijective. The first thing I thought was the well ordering isomorphic theorem(if $(A, \le_A), (B, \le_B )$ are well orderd, only one of $A \cong B, A \cong B[b] \ \exists!b \in B, \ A[a] \cong B \ \exists!a \in A$) must hold, and the isomorphism is unique.)  Where do I have to start the proof?


Just learning Blender this week and Immediately I'm stuck at some point. I cannot add COLOR because under MATERIAL, there is no choice for SURFACE > COLOR.    I'm so stuck. Help :)

Complete beginner here.  I'm trying to follow  tutorial on Anisotropic shaders, but my property panel looks nothing like the property panel in the tutorial.  For example, when creating a material, this is what his property panel looks like:    But this is what mine looks like, if I follow the same path:    I'm sure I'm missing something obvious.  How can I see the property panel shown in the tutorial?


Below is the screenshot of negative rep on a question I was never part of. It is now deleted. I have never seen this question before. Still the reputation is not restored. Is this a reputation system bug?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


There is nothing for Xenomorphs to eat in spaceships, but they grow up very fast after they burst out of their hosts. Don't they need any food to live?

In the movies  and , what do the aliens eat? You would think they first feed from the body host, but then when the human host awakens he doesn't have anything visibly wrong, so the human host was used only to incubate the young alien. When they get out of the body they keep growing but when they encounter humans, they don't eat them, they just kill them or use them as new hosts.  So, what do they eat? How can they grow that tall?


Today I tried to delete my account on AREA51 but was unable to do so because      this operation cannot be performed on a meta site; please continue on the main site.     I have tried   and  (the contact in the footer redirects to discuss... )   What is the main site for AREA51 where I can delete my profile?

I have accounts in Stack Overflow, Programmers, Unix & Linux and Area 51. I don't want to continue my Area 51 account, so I planned to delete my Area 51 account. I have performed the following steps to delete my account, but I couldn't!  Case 1     If your account has votes or posts do the following steps:         Edit the "About Me" section of your profile to say “please delete me”.   Contact the SE support to request deletion.      I edited my "About Me" section to "please delete me". When I contacted SE Support to delete my account, I couldn't make a request. I am getting the following error:  This operation is incomplete. please do it in main site.   For deleting Area 51 account, when I do it main site, in link for deletion column I gave the Area 51 link. It says that:  it is not valid link!   Case 2     If the account has not interacted with the site yet (votes or posts), click on the delete button on your user page next to the edit link.   I am not eligible for this case!  Then how to delete my Area 51 account? Any help is appreciated!


The storyline is a series of 6 or 7 books that I probably read in the late 70s (but never finished reading the series) In this post-apocalyptic world humanity (in the USA at least) is reduced to living in large underground silos that have a central, open airshaft, and are scattered around the country. The deeper your accommodations are in the silo, the more prestigious they are.  There is trade between each silo via an overland road train that is armored against the mutants who live on the surface, and has weapons such as a catapult launched, solar electric powered plane. One of first scenes in the first book is where the main protagonist, a young man, is flying one of the planes inside a silo and attempting to shoot at randomly generated targets in a flight test.  He completes this test perfectly due his preternaturally good reflexes that sets him above all other pilots.  As a result he is assigned to fly support for one of these road trains. As the books progress he becomes disillusioned with his "modern" society and starts to side with the mutants.  It may have been alluded that while he looked like a "normal" person, that he actually came from mutant heritage - which is the basis for his amazing reflexes.  And at one point he learnt/was taught how to apply makeup on his face so he could pass for a mutant. In later books he visits places like Detroit(?) where he encounters mutants wearing Japanese style masks.  But the city name used in the books was split into multiple words that related to the tribes that controlled the area.  There was also a scene where a group of operatives were sent to capture him (or infiltrate the mutants), and one of the operatives was a woman who had a radio concealed in a fake pregnancy bump. The protagonist ends up killing them. And from a quick google, it is definitely not Wool.

I read a series of books around 2005. I think it might have been a trilogy.  Basic story line is in a post apocalyptic world. The main character is a pilot for the Federation or something similar to that. He crash lands, is nursed back to health by the natives, comes to like and respect them, and does not want to fight against them.  Also in the later book I think it also involves another race who are very Japanese-ish. They drink sake and the "clan" names are things like Fu-Jitsu and Mitsu-Bishi.


I want to erase all pdf files that do not contain text. I tried to use a PdfBox. Method pdftoText converts pdf to String.   public static void main(String[] args) throws FileNotFoundException, InterruptedException {               String pdfText = PDFTextParser.pdftoText("xxx.pdf");                                        //files[i]);             if (pdfText == "") {                 File toBeDeletedFile = new File(location+"xxx.pdf");                 if (toBeDeletedFile.delete()) {                     System.out.println("success");                 }                 else {                     System.out.println("still there");                 }             }           }   }   This did not bring any results

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


the problem is that the console.log('res', res) shows that res.message is a valid string (IMO) but when shown in an alert, it shows undefined. I also tried using typeof res.message and it also returns undefined.. why is that?  this is my code:  var myData = $('#myform').serializeArray();  $.ajax({   url: '/test/test1',   type: 'POST',   data: myData,   success: function(res) {     if (res.status) {       window.location.reload();     } else {       console.log('failed', res);       // the content of res is like so:       // {"status":"1", "message":"approval for \"Nominations\" was successful."}       alert(res.message);     }   },   error: function(err) {     console.log('error', err.responseText);   } });

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


I'm drawing a simple scatter plot with pgfplots, which also includes a legend as shown in the upper part of the picture next.    However, I find the horizontal spacing odd because the distance between the symbol and the corresponding description is the same as to the next description. I would like to have it like "faked" in the lower part of the picture.  A simple example is produced by the following code. Here, the descriptions are a,b,c,d.  \documentclass{scrartcl} \usepackage{pgfplots} \begin{document}  \begin{tikzpicture}     \begin{axis}[legend columns=-1, legend pos=outer north east]         \addplot+ coordinates {(0,0) (0,1)};         \addplot+ coordinates {(1,0) (0,0)};         \addplot+ coordinates {(0,0) (1,1)};         \addplot+ coordinates {(1,1) (0,0)};         \legend{a,b,c,d};     \end{axis} \end{tikzpicture}  \end{document}   If I understand the manual correctly, the legend is composed of a matrix. However, I could not figure out how to change the spacing accordingly. Your help is much appreciated ;)

I am using legend columns=-1 to make a horizontal legend. However, the distance between the individual legend entries is too small for my taste. Is there a straightforward way to increase the horizontal spacing between individual legend entries?


How to calculate largest integer that cannot be represented by a linear combination $6a+7b=x$ if $x$ is the integer?

I came across a math-related brain teaser recently that offered no solution, I present the gist of it and my reasoning so far.  Suppose I had an unlimited amount of two coin types that were worth $\$0.25$ and $\$0.29$ each. The question is: What is the maximum possible denomination that cannot be formed?  Now my reasoning: Let z, a total producible denomination, be written as .25x + .29y = z. Where x is the number of .25 coins, and y is the number of .29 coins and since we are counting the number of coins this limits x and y to the set of all positive integers. By solving for y:  y = (4z-x)/1.16  I was able to come up with a "procedure" to determine if a particular denomination can be produced from a combination of the two coins. It is as follows for a denomination d under consideration:  Set a to 4d  Divide a by 1.16, if fully divisible then the result is the number of .29 coins, and we are done if not go to step 3  Subtract 1 from a, the number of .25 coins is 1 more than before -- if a becomes < 0 then the amount is not producible from these coin combinations otherwise repeat step 2   Does this reasoning seem sound?  What I'm trying to do here is extrapolate out this process to prove that the maximum possible non-producible denomination is infinite.  (Such as a base case of 1.99 cannot work based on procedure above, and if you continued to add .25 coins to this amount to infinity there would never be a maximum possible non-producible denomination). I'd appreciate any mathematical insight to approaching this kind of problem.  Brian's answer was helpful, now I know the name of the problem.  I see that $t = ma+nb$ can be the linear integral combination (from that PDF link) and t is representable only for solutions that have $m$ and $n$ with nonnegative integers, and that if you accept the inequality $0\le m \le (b-1)$  then the solution is $t = (b-1)a+(-1)b = (ab-a)-b = aa-a-b$. Though, I have no idea where that inequality $0\le m \le (b-1)$ comes from, it seems to just be hand waved at. So instead, I made a chart where (for my example problem) there's 29 rows and the chart is composed of all the counting numbers (one after the other).  This makes each column 29 apart.  Then it's elimination of all representable by finding the first number in each row divisible by 25 (in green).  It can then be seen each number to infinity for that row thereafter can be created by adding more 29's (so all green numbers and those crossed off are representable).  So in this chart, the red numbers are not representable, and the highest is 671 (which correlates to $ab-a-b = 25*29-25-29 = 671$).  Also, from this chart I can conceptually see that all numbers can be created after a certain number of unrepresentable, which was something I was originally having hard time seeing. (They are represented by the ... for infinity). Anyways, back to the above: where does that inequality $0\le m \le (b-1)$ come from for the $ab-a-b$ solution?


During the demonstration of the theorem of the convergence of the series of fourier, my teacher wrote :$$  \frac{1}{2}+ \sum_{k=1}^{n} \cos(ky)=\frac{\sin((n+\frac{1}{2})y)}{2\sin(\frac{y}{2})} $$  he doesn't explain how to get this for the lack of time, I'm curious so I tried alone, without success. How I can get this equality?

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


Humans (homo sapiens) have been on the earth for thousands of generations, and we have kept evolving throughout that time. Why don't we just keep evolving so that, let's say, we live for an average of 300 years? Or why don't we evolve so that we don't need to sleep?  This could also apply to many other species.

Why does evolution not make life longer for humans or any other species?  Wouldn't evolution favour a long life?


I posted this question. Dhawal found another question that basically asked the same thing, so I tried to close my question as a duplicate.  I had to suggest a close, wait for other people to review the close reason (my vote seems to have counted in this vote), and then I got the standard "this question has been marked as duplicate".  It seems like this is a good place to allow a fast-track. Marking your own question as a duplicate, if you have "enough" reputation, could skip the review queue.  Thoughts?

Someone voted to close my question as a duplicate. I agreed, so I cast my close vote (I have enough reputation to vote to close).  . So I expected this to happen.  But it didn't. This confused me — is this not a question I asked after all? No, it is. Maybe I need to reload the page? Nope, the question still isn't closed. Is the asker confirmation feature broken? Well, there's the “This question may already have an answer here” banner at the top. What if I click “That solved my problem!”? Ah, that does close the question.  It turns out that only clicking “That solved my problem!” instantly closes the question. Casting a close vote has a different effect, it's just an ordinary close vote.  Please make casting a close vote equivalent to clicking “That solved my problem!”.


I believe I read a short story in the 50's about the beginning of telepathy in humans. The enemies were breaking into the location as the couple telepathically married themselves just before being killed.  Anyone have a clue to this written missive?

A man is running from some people who have him under surveillance, and when he wants to send a letter he thinks they can see the address he wrote on the letter, so he writes a fake address and prints a differing postal code surreptitiously, by hand. This was many years before the invention of the Postal Bar Code, and it used dots instead of bars.  But the UPS MaxiCode uses a two-dimensional square of dots, very similar to what was used in the story.  Thus I think of this as a Heinlein story, one more "invention" ahead of his time.


Prove that $x^2 + y^2 = z^n$ has a solution in $\mathbb{N}$, where $n$ belongs to $\mathbb{N}$, the set of all natural numbers.   My Attempt: Without loss of generality we can assign $z$ a perfect square value.  For $n=1 , x^2 + y^2 = z = k^2$ clearly has many solutions in natural number( since x,z,k are Pythagorean triplets).  Let the expression have a solution for $n = m$. Let it be $( x_1, y_1, z_1 = k_1^2 )$. Therefore, $   x_1^2 + y_1^2 = z_1^m = k_1^{2m} $    For $n = m+1$, \begin{align*}   x^2 + y^2 &= z^{m+1}\\ \Rightarrow x^2 + y^2 &= z^mz \end{align*} clearly $(k_1.x_1, k_1.y_1, k_1.z_1 = k_1^2 )$ is a sol. of the equation, i.e., $(k_1.x_1)^2 + (k_1.y_1)^2 =  z_1^m k_1^2$ $=>(k_1.x_1)^2 + (k_1.y_1)^2 =  z1^2$ Thus, it is proved by induction.   Can You please tell me if my method is right. Is it justifiable to take z a perfect square?    Also, can you provide a non-induction proof? ( but before you do please tell me if my method is correct or not)

I was presented with the following problem:      Prove that there exist solutions to $x^2+y^2=z^n$ for all $n$, with $x,y,z, n \in \mathbb{N}$   I showed that by taking any Pythagorean triple $x^2+y^2=z^2$ and multiplying by $z^{2(n-1)}$ we get $(z^{n-1}x)^2+(z^{n-1}y)^2=(z^2)^n$, which allows me to generate solutions easily for any value of $n$. I managed to find several similar questions on this site, such as  concerning the specific case $n=3$. I notice that all of these questions take a similar approach and start with a Pythagorean triple and use it to generate general solutions.  Is there a way to prove the statement (or better yet provide solutions to the equation) without first relying on Pythagoras?


I want to do some data-analysis, so I need at compile time unknown sized (large) arrays (of double or complex double). The number of dimensions is know at compile-time. What is the "right" way to do this in modern c++.

I've been reading up on STL containers in my book on C++, specifically the section on the STL and its containers. Now I do understand each and every one of them have their own specific properties, and I'm close to memorizing all of them... But what I do not yet grasp is in which scenario each of them is used.  What is the explanation? Example code is much prefered.


I understand what it is, like an item proc that delivers an effect on hit for example. But what does PROC actually mean? Does it stand for something or is it short for another word?

I'm quite new to League of Legends (LoL) but try to improve through reading guides. All too often I stumble upon abbreviations I am not sure what they mean.  Some of those are:   AD AP ArPen AS bot blue carry CC CDR CS Drag Dive mia mid MM Mp5 MP5pL MPen Proc pull (red/blue/drake) red SR ss top TT IMO


I have written simple Python code  #For String Types d_new = dict(a_str="captainmarvel", b_str="captainmarvel", c_str="captainmarvel", d_str="captainmarvel") print(id(d_new['a_str'])) p_str = "captainmarvel" print(id(p_str))  #For int types d = dict(a=4, b=4, c=4, d=4) print(id(d['a'])) p = 4 print(id(p))    it returns output as   270985349584 270985349584 1559653536 1559653536   which are same object ids for integer value 4 and string value "captainmarvel". So does python reuses/pools its basic data types e.g. int, string

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


I have recently installed Ubuntu 13.04 in my PC. Everything works fine except my Airtel 4G LTE dongle (Model MF825A). Ubuntu does not give any option to select 4G LTE when setting up a mobile broadband connection.  How can Airtel 4G LTE (Model MF825A) dongle be used with Ubuntu? Are there any patches or other updates available for getting this problem solved?


Just upgraded to 18.04, and only have 3x1 workspaces. I'd like to configure it to 3x3 which is my usual setup, but couldn't find anywhere how to do so.   Any ideas? Thanks in advance!

I have just upgraded to Ubuntu 17.10 and found out there is no option to have 2 by 2 workspaces. I was able to configure 4 "static" workspaces using , but I would like to have them in 2 rows by 2. Any ideas?


so I'm making a drink scene, but it looks like there are very weird dots around, near the glass. It seems I need to do something to get rid of the white dots.

I often use Cycles' built in Glass BSDF shader to achieve realistic refraction effects, but in many cases, it seems that Cycles' glass caustics creates an unfortunately large number of fireflies (pixels that are abnormally bright relative to their surroundings). In some models of mine, even when I render for 3000 or more samples/pixel, my final image is still covered in fireflies. While I can improve this in many cases by increasing the total amount of light available in the scene, this loses a lot of the potency of the refractive effects I'm looking for, especially in scenes with low light levels.  So my question is, how can I reduce the amount of fireflies while using Cycles' caustics without sacrificing the quality of the refractive effects?  Note: I am aware that Cycles' caustics will perform much better once Cycles has full support for bidirectional path-tracing, but it looks unlikely that that will become , unfortunately.


I want to sum the ObjectProperty<BigDecimal> values of a JavaFX TableColumn. I've used  as a reference. The problem is my implementation of it as shown here:   private void doSalesTotals() { olSales.addListener(new ListChangeListener<Sales>() {   @Override   public void onChanged(Change<? extends Sales> change) {     while (change.next()){       if (change.wasAdded()){         for (Sales s : change.getAddedSubList()){           totalWithDiscount.set(totalWithoutDiscount.get().add(s.getAmount()));           System.out.print(totalWithDiscount);          }       } else if (change.wasRemoved()){        } else if (change.wasReplaced()){        } else if (change.wasUpdated()){        }     }   } });   keeps giving me a nullpointer exception and no currency addition takes place.  Some context: The table is part of a POS module I'm doing for my 4th year Undergraduate project.  What exactly am I doing wrong and how do I solve it?

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


I have electric machine, which parameters I measure by 10 sensors. 8 of them measures "input" values and 2 of them result (output). I've got tons of historical data of all of these sensors. I built a Neural Network and train it to aproximate 2 outputs given these 8 inputs (simple multilayer perceptron). It works very well (Error is very small). But the question is: I have got trained model of my process. Can I now somehow train this model to give it 2 outputs as inputs and train it to give me the best combination of input values? I thought about autoencoders. I built some of them to recognize anomallies in this system, but I don't actually see how I can implement them to optimize my input values.  Has anybody done something before?  Maybe I should build some kind of generative model, like GAN? to learn network the distribution of particular input values?  Thanks,

Bayesian optimization is used to optimize costly black-box functions. The idea is to use a surrogate model to model the black-box function and then an acquisition function is used to find the next point of evaluation. The goal is to get very close to the optimum values with very few evaluations of the black-box functions.  Generally, Gaussian process or random forest is used as a surrogate model. Since we have very few values/data points of the black-box function, why don't the surrogate models in Bayesian optimization overfit?   Would it make sense to use a deep neural network as a surrogate model? I think no because a deep neural network would probably overfit with so few data points.


For example: when using inheritance with classes in Java, I have a parent and two classes which inherit from that parent. Do I refer to these as 'children' or as 'childs'? In other words, what is the plural of 'child' in terms of class?

Is the word childs ever used instead of children for the plural of child? And was it ever a part of standard English vocabulary but later neglected?


I wanted to convert an array[] to an ArrayList. In java it is simpler to use  new ArrayList<Element>(Arrays.asList(array))   But what If I wanted to do some sanity check over elements in array before putting them in ArrayList. for e.g.  new ArrayList<Element>(Arrays.asList(array,Sanity.isNotNull))   i.e. Something similar to Comparator, add an element in ArrayList only when the function in second argument is true for that element.  I could always do a for and add elements myself, but is there anything inbuilt in Java? Second Question: is there a way to overload addAll function to achieve the above mentioned goal?

I want to filter a java.util.Collection based on a predicate.


I had a question put on hold. When I tried to comment it, it was not possible since the comment button was covered by the hold notification panel.  I could solve it by logging in through a Web browser.  Stack Exchange App, Android Kit-Kat, Galaxy Note 3  Suggestion: Rewrite the app so questions on hold can be commented using the app.

In the Android App, if a question is closed, I won't be able to leave comments on either the question or any of its answers. There are simply no "Add Comment" buttons available anywhere if the question is closed.  See the screenshot below. The comment adding interface is simply removed on closed questions and their answers — no Reply button in the toolbar, and no Add Comment button under the question.        Occurs on Android app v1.0.50 and v1.0.51, on a HTC One running Android 4.4.3.


I know that:  1) Change in $x$ ie., $Δx$, when $\lim Δx→0$, then $Δx$ is replaced by $dx$.   2) I also know that $∂x$ is used in partial derivative.  Then what is $δx$? Is $dx$ and $δx$ is just the same or something different. I want some mathematical explanation.

I have read the thread regarding , but it does not answer my question.  I am confused about the notation for change in Physics. In Mathematics, $\delta$ and $\Delta$ essentially refer to the same thing, i.e., change. This means that $\Delta x = x_1 - x_2 = \delta x$. The difference between $\delta$ and $d$ is also clear and distinct in differential calculus. We know that $\frac{dy}{dx}$ is always an operator and not a fraction, whereas $\frac{\delta y}{\delta x}$ is an infinitesimal change.   In Physics, however, the distinction is not as clear. Can anyone offer a clearer picture?


I have tried to figure out the difference between the two views of looking at the world: Bayesian and frequentist.  Can someone please let me know if I have it right? (Please do not refer me to some old thread or article that is pages long. Simply just confirm if the statement below is correct, and if not, what is wrong with it.)  I have got he impression that the frequentist conducts a measurement and believes the world to be exactly what his results state. Bayesian, on the other hand, has a prior/neutral view of the world, and he only uses the measurement data to update his views. I.e. he finds a balance between his prior view, and the view of the frequentist. Correct?

How would you describe in plain English the characteristics that distinguish Bayesian from Frequentist reasoning?


GOAL  Install Android Developer Studio  ERROR MESSAGE  sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 lib32bz2-1.0   Error Message:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package lib32bz2-1.0 E: Couldn't find any package by glob 'lib32bz2-1.0' E: Couldn't find any package by regex 'lib32bz2-1.0'   QUESTIONS  Is the package unavailable (deprecated) or is the command incorrect?  Perhaps there is another explanation which I have not considered.

I have tried installing this package (needed for android studio).  This is the error i'm getting  E: Unable to locate package lib32bz2-1.0 E: Couldn't find any package by glob 'lib32bz2-1.0' E: Couldn't find any package by regex 'lib32bz2-1.0'   I have already tried:  sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install lib32bz2-1.0   &  sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install lib32bz2-1.0:i386   I also searched on  and did not find lib32bz2-1.0 for Ubuntu 16.04. So how do i get this package which is available for trusty and precise?


I overheard someone at work describing a task as "quite critical", and then describe another task as (direct quote) "über critical". Forgetting for a minute the colloquial nature of the conversation, is it acceptable in English to use the word critical with a magnitude or degree?  In short, can something be more critical than something else? Or are things simply critical, or not critical?

A common grammar lesson that was taught to me in the US and that I've had to teach abroad in EFL classrooms is that we're not to use adverbs of emphasis with absolute modifiers, just as we're not supposed to use them as comparatives or superlatives.  Classic egregious examples of this mistake include very unique and more perfect, which seem obviously flawed to me. Other instances of further modified absolute modifiers are similarly meaningless or contradictory in nature.  I wonder, though, if the rule that I learned isn't overly broad, and whether it's taught similarly in the UK and elsewhere. I find myself modifying absolute modifiers quite regularly, and in some circumstances I think it's not only logical and correct, but quite meaningful. Phrases like almost exactly or virtually all or practically infinite possess a specific meaning that can't really be replicated using nonabsolutes like very nearly or most or quite long.  In my own speech and writing, I use such phrases exactly as I see fit, so this isn't a request for permission, per se. I'm more curious about whether there's a more appropriate rule regarding absolutes that you rely on (and might be used in a classroom).


Prove that in a full oriented connected graph there is a cycle passing through all the vertices. I tried to find contradictory example.But there are not any contridictions. I tried also to put vertexes side by side, doesn't help.

Assume $G$ is a , i.e. a (finite) directed graph such that between any two vertices, $a$ and $b$, there is at least one edge in one of the two directions, $a\rightarrow b$ or $b\rightarrow a$.   Show that there is at least one , i.e. a path, following the direction of the edges and visiting all vertices exactly once. (This part is a classical exercise and it is here to prepare for the second part of the problem). Consider all possible losers, i.e. the set of all vertices that can be end-points of Hamiltonian paths of the tournament, see Part (1). Show that the subgraph of all losers has a , i.e. a cycle that follows the direction of the edges and passes through every vertex exactly once and returns to the initial vertex.   For example     these are all tournaments and the $\color{red}{\text{red}}$ dots are the losers. Notice how there is always a cycle joining them.


I have two questions on the Gaussian integers.   Is any element in $\mathbb{Z}[i]$ the root of a monic polynomial with coefficients in $\mathbb{Z}$? Conversely, does any element in $\mathbb{Q}(i)$ that is the root of a monic polynomial with coefficients in $\mathbb{Z}$ lie in $\mathbb{Z}[i]$?

Is there a relatively "simple" (in the sense that it does not require knowledge of algebraic number theory) proof that the ring of integers of the algebraic number field $\mathbf{Q}[i]$ is $\mathbf{Z}[i]$? One can assume a one year course in algebra, covering the usual topics on ring and field theory, e.g. Gauss's lemma etc


I have been offered admission in a top-25 university, and a RA position in a lab that works on my area of interest. I am pretty happy with this offer and I would feel comfortable accepting it. However, I still have not heard back from some top-10 institutions.  I am concerned that the professor might feel upset if I take too long to answer the offer. What should I do?  I should mention that I am an international student applying to Engineering PhD's.

I have received an admission offer for a PhD at a prestigious US university. However I am also currently working in another lab outside the US with a potential to also receive PhD admission there.  I think the deadline to respond to the US school is April 15 but the professor asked me politely to give an answer within a reasonable amount of time, also my former supervisor (which has no interest in the matter) suggest not to string along the US school and try to make a decision well before the deadline.  I feel it might be unethical to wait the last minute because I respect the professor and he might lose good potential candidates. On the other hand I want to wait and see if there is a concrete possibility of pursuing a PhD at this other place.


I have a map of   Map<String,Decimal> test = new Map<String,Decimal>();   In this map i am adding values like classname and codepercentagecovered and iterating over the map and creating dynamic table and adding them.        test.put('testclass',0);          test.put('zclass2',30);         test.put('aclass1',0);       If(test!=null && !test.isEmpty()){                 for(String s : test.keySet()){                     strText += '
' + s + '	';                     strText += '' + test.get(s) + '%'+'	';                  }               }   The table looks like this   testclass            0 zclass1              30 aclass1              0   How i can sort the map values so that it starts from 0 and then 30 at last.

I need to loop through Accounts and then on all of the Contacts for those Accounts. I need to find what is the address with the most occurrences in Contacts for each Account and update the Account with that address. I can loop through Accounts and Contacts just fine but getting the address and finding the one that most Contacts have is getting tricky. This is my code so far:  public static void completeaddresses(){     List<Account> acctList = new List<Account>();     acctList = [SELECT Id, BillingState, BillingPostalCode, BillingCity,BillingStreet, BillingCountry, BillingAddress, (SELECT Id, contact.MailingAddress, contact.MailingStreet, contact.MailingCity, contact.MailingState, contact.MailingPostalCode, contact.MailingCountry FROM account.contacts WHERE contact.MailingStreet!='' OR contact.MailingCity!='' OR contact.MailingPostalCode!='' OR contact.MailingCountry!='' OR contact.MailingState!='') FROM Account WHERE BillingState ='' AND BillingPostalCode ='' AND BillingCity = '' AND BillingStreet = ''];      Map<Address, Integer> addresses = new Map<Address, Integer>();     List<Address> addressList = new List<Address>();      for (Account acct:acctList) {         for (Contact cont:acct.contacts) {             if (!addresses.containsKey(cont.MailingAddress)) {                 addresses.put(cont.MailingAddress,0);             }             Integer currentCount = addresses.get(cont.MailingAddress) + 1;             addresses.put(cont.MailingAddress, currentCount);         }         addressList.addAll(addresses.keySet());         addressList.sort();     } }   The issue is, it sorts by key not by value, if I could sort by value, then I can update the account and I'd be done. I'd appreciate if someone can let me know if I can sort by value and how. Thanks.


I have a friend who used to have an iphone but has since gotten another phone. When I go to text him it automatically does an imessage which fails. I've deleted him and re-added him. I've turned imessage off and it will work for a bit but eventually reverts back to imessage. What do I do to fix this?

I used to have an iPhone, but I changed to an android (shock, horror!). Unfortunately Apple refuses to let me go and whenever friends message me the messages get sent as iMessages (unless they remember to specifically chnge the format). I never get these messages. They never get resent as SMSs automatically as is supposed to happen. How can I get my phone number deleted from the iMessage list. I've turned off iMessage on the old iPhone.


The highest common factor and lowest common multiple of two numbers $A$ and $B$ are $12$ and $168$ respectively. Find the possible values of $A$ and $B$ with the exception of $12$ and $168$.  I know this question involves the concept of  $ A \times B =  \text{lcm}\,(A,B)\times\text{hcf}\,(A,B)$   But I'm not sure how to apply it. Can someone guide me? Thanks!

The highest common factor and the lowest common multiple of two numbers $A$ and $B$ are $12$ and $168$ respectively. Find the possible values of $A$ and $B$ with the exception of $12$ and $168$.   Help me with this equation please. I kind of get it but I don't understand the concept behind it... I do not want to memorize.


I'm making a view and in one column I will have some names concatenated together.  Ideally in this one column I want the result to look something like the below:  ResultA, ResultB, ResultC and ResultD   ResultB, ResultC and ResultD   ResultA and ResultD   So I want it to keep putting commas between results until it reaches the last result where it places an AND in front of it instead of a comma.  I can do the query to grab what columns I need but can't figure out how to do the above...   select      isnull(replace(isnull(givenname, '') + ' ' +        (isnull(middlename, '') + ' ' + (isnull(lastname, ''), ' ', ' '), '') +         isnull(companyname, '') as Name from     table1 with (nolock)  left outer join     table2 on t1key = t2key      left outer join     table3 ON t1key = t3key   I found this query somewhere else that will put everything with a comma for me, but I still need the 'and' for before the last result.  SELECT      ID, Name,     STUFF((SELECT ',' + CAST(T2.SomeColumn AS VARCHAR(MAX))            FROM @T T2             WHERE T1.id = T2.id AND T1.name = T2.name            FOR XML PATH('')), 1, 1, '') SOMECOLUMN FROM      @T T1 GROUP BY      id, Name

I've got two tables:  TableA ------ ID, Name  TableB ------ ID, SomeColumn, TableA_ID (FK for TableA)   The relationship is one row of TableA - many of TableB.  Now, I want to see a result like this:  ID     Name      SomeColumn  1.     ABC       X, Y, Z (these are three different rows) 2.     MNO       R, S   This won't work (multiple results in a subquery):  SELECT ID,        Name,         (SELECT SomeColumn FROM TableB WHERE F_ID=TableA.ID) FROM TableA   This is a trivial problem if I do the processing on the client side. But this will mean I will have to run X queries on every page, where X is the number of results of TableA.   Note that I can't simply do a GROUP BY or something similar, as it will return multiple results for rows of TableA.   I'm not sure if a UDF, utilizing COALESCE or something similar might work?


# whoami root  # chown username /usr/local chown: /usr/local: Operation not permitted  How would I get out of this predicament? This is an icing on the cake: # mv local local_ mv: rename local to local_: Operation not permitted

I am trying to do the following on my Mac (10.6.7):  sudo chown myusername:wheel ./entries   but Unix/Mac is returning "Operation not permitted". When I ls -lash the culprit file, it looks as follows:  8 -rwxrwxrwx   1 myusername  staff   394B Apr 26 23:26 entries   I've tried sudo and sudo su; nothing works. Any ideas what's up?  I'm trying to chmod files I've copied from my old Ubuntu box. Most of the files have successfully chmod'ed recursively; just this one is stuck and I don't understand why.


Find smallest natural numbers $x,y$ such that  $$ 49x = 125y.$$  Will this require some special modular arithmetic property or am I missing something?

If $\gcd(a,b) = 1$ and $a,b\mid x$ then $ab\mid x$.  My attempt at answering the question:  \begin{align*} x &\equiv 0 \pmod{a}\\\ &\Longrightarrow x\text{ is divisible by $a$}\\\ &\Longrightarrow x = ma\text{ for some integer $m$}\\\ \ \\\ x &\equiv 0 \pmod{b}\\\ &\Longrightarrow  x\text{ is divisible by $b$}\\\ &\Longrightarrow x = mb\text{ for some integer $m$}\\\ \ \\\ x^2 &= (ma)(mb)\\\ x^2 &= (m^2)(ab)\\\ x &= \sqrt{m^2ab}\\\ x &= m\sqrt{a}\sqrt{b} \end{align*} Let $m$ be $k\sqrt{a}\sqrt{b}$. Then \begin{align*} x &= kab\\\ &\Longrightarrow x \equiv 0 \pmod{ab} \end{align*}  Is this correct, if not can someone point me in the right direction?


I applied for standard visitor Visa with a sponsor from my fiance, but my Visa was refused with this reason below: You have applied for leave to enter to visit the UK for 21 days for tourism. You state that your partner is paying for all the costs in relation to your visit and I am satisfied that he is willing and able to do so. However, I must also assess your personal circumstances. You state that you are employed as a contact center team leader with PT VADS Indonesia earning 5000000.00 IDR (£256.68 ) per month. In support of your application, you have submitted your bank statement. I note that there are deposits in this account that correlate with your stated monthly income however I also note that there are other deposits that are unrelated to the amount you state you earn. For example, there is a deposit of 4,750,000IDR (£243.84) made on the 11 May and then another deposit of 6,185.766IDR (£317.55) made on the 20 May. The documents you have provided do not demonstrate the origin of these funds and therefore I am not satisfied that the funds in your account are genuinely available to you for your exclusive use or that they accurately reflect your financial position. I am not satisfied as to your intentions for visiting the UK, that you are a genuine visitor or that you will leave at the end of the period specified by you. I, therefore, refuse your application under paragraph 4.2 (a) and (c) of Appendix V of the United Kingdom Immigration Rules. I wanna reapply but I have a doubt to put my bank statement again and history of my bank account, besides that I actually work in shifting schedule, so every month I Will receive a different number of my salary, how I explain them? If I reapply what exact salary I have to put there? Can I put the basic salary only?

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


Is there a non-idiomatic word or phrase for ?  (meaning a quick test of some system to see whether it is functioning properly)

The phrase "sanity check" is  as it implies that there is something wrong with people who have mental illnesses and the word "sanity" has been used to discriminate against such people.  Therefore, it should should be avoided.  What is a better alternative in the context of software?  Example usage:     _: if this is not what it should be, we have memory corruption (a fatal   error) and should terminate the program.


%> bash git_ignore.sh | cat -e  .DS_Store$  mywork.c~$  %>

I am getting my feet wet with Git and have the following issue:  My project source tree:  / | +--src/ +----refs/ +----... | +--vendor/ +----...   I have code (currently MEF) in my vendor branch that I will compile there and then move the references into /src/refs which is where the project picks them up from.  My issue is that I have my .gitignore set to ignore *.dll and *.pdb.  I can do a git add -f bar.dll to force the addition of the ignored file which is ok, the problem is I can not figure out to list what files exist that are ignored.  I want to list the ignored files to make sure that I don't forget to add them.  I have read the man page on git ls-files and can not make it work. It seems to me that git ls-files --exclude-standard -i should do what I want.  What am I missing?


I want to count trees in SAGA GIS and I am trying to follow the steps described in  from dominoc925.blogspot.com (05th, March, 2012).  The problem is while I was able to convert the las file into an .asc DEM, I could not retrieve the .asc DSM from the las file. Hence, I can't accomplish step 1 in the workflow above, because I need to import the DSM in SAGA.  How can I convert a las file into DSM?

I was wondering if there is an option to convert LiDAR data (.las) to a  (DEM/DSM) format that ArcGIS 10.0 can read?


I need to validate this email using JS, I need to check for the @sign and a period. This is what I have now, but if I run all my code it doesn't not validate the @ sign.  if(email.value == "" || !isNaN(email.value) ) { var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;         //something is wrong.        isValid = false;        txtFeedback.innerHTML += "
Please enter a valid email address.
";         email.nextElementSibling.innerHTML = "Please enter a email address.";    }

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


The prequel  I am a Stack Exchange user mainly interested in sciences. However, I sometimes notice something an interesting question on the Hot questions block and open it.  In some rare cases I feel that I can contribute to this question by providing a new perspective or additional information. For example, my only post on Workplace SE turned out to be number 3 answer on that question with 80 upvotes.  The problem is that in most of those cases even though I have something to add, I can not add it because the question is protected. Here is a recent (and still hot) .  I was going to address a point in question that no one else had touched and also provide some additional information/examples regarding other points. But I could not post an answer. Instead, I provided the information in comment form. But all of the comments on that question got removed by a moderator (I guess it's because the total amount was too large).  I am not going to become an active user of Workplace SE or UX SE. But is there no worth in single answers? How could adding information harm anyone? What is the point of questions being protected?  I know the answer (it's written by the "protected" stuff) - it protects the question from low-quality answers. Guess what - it also protects the question from medium quality and high quality answers. The Hot questions are the cases where an expert that is not an active user might come and contribute. Why are we protecting a question from such people?  A protection mechanism against low quality answers is already there - it is the downvote. Those low quality answers and questions should not be seen as strain by moderators. They should just get downvoted to hell (just as this post probably will).  The point  I beckon you to embrace the downvote and stop fearing it. Stop crying "please explain the downvote" and fearing to hurt someone by downvoting a post. If you think a post is crap - downvote it. Let the community moderate the content quality. There is no need for some elitist protections, content removals and other demonstrations of moderator power that hurts far more than downvotes would. Leave moderation for actual problems of illegal content and let the simple folk vote on quality. They are sometimes more competent than the moderators are.  Why this is not a duplicate of   The initial problem was that I (and others) can't answer where something useful might be provided. However the solution I ask for is different. Just check . Stop calling out explain your downvote? There is too much sympathy for the poor downvoted fellows here. Let the people downvote without punishment. This is a system that works great elsewhere ( is the best example I know). I am sure that bad answers would receive enough downvotes if downvoting wouldn't be seen as a bad thing.  So what is someone answers "thanks, I had the same problem"? Let him get five downvotes, a single toxic comment of "this is useless, you don't understand what an answer is" and fade out so no one else sees the "answer". Protection guaranteed.

The purpose of protected questions is, according to the message presented on such a question, "to prevent 'thanks!', 'me too!', or spam answers by new users." The more verbose  agrees on the purpose. And the  says this is why protected questions exist:     Some questions are protected because they are expected to attract   either spam or users -- often new users -- who may mistake the site as   a traditional forum, posting "noisy" answers such as "Thank you" or   "This worked for me" or "I'm also having this problem".   Considering this, shouldn't a user be able to answer protected questions if they have gained at least 10 rep on any stack exchange site? If they've already demonstrated one site that they are familiar enough with the SE Q/A format to not be a drive-by useless answerer, shouldn't that confidence in them carry over to other SE sites?  Or maybe at some level of combined SE rep this restriction should be waived. I find it silly that at 15k+ combined network rep, I'm unable to answer a protected question on a SE site I've just started using.


I know that there are scads of articles on the web regarding remotely accessing phpMyAdmin, but none of the articles I see have worked (not even ).  I would like to configure Apache to allow access to phpMyAdmin when it comes from certain IP addresses. I know that I can set it up to allow worldwide access, but that is just asking for problems.  Here is my phpmyadmin.conf file located in /alias/:  Alias /phpmyadmin "<wamp_installation_root>/apps/phpmyadmin3.3.9/"   # to give access to phpmyadmin from outside  # replace the lines # #        Order Deny,Allow #   Deny from all #   Allow from 127.0.0.1     <-- Good idea # # by # #        Order Allow,Deny  #   Allow from all           <-- IMO, really bad idea #  <Directory "C:/Web Development/wamp/apps/phpmyadmin3.3.9/">     Options Indexes FollowSymLinks MultiViews     AllowOverride all     Order Deny,Allow     Allow from 127.0.0.1     Allow from <my_public_static_IP_address_also_address_of_server>     Deny from all </Directory>   I try to access phpMyAdmin from a domain that I set up from No-Ip.com. The domain is configured to route to my development machine like so:   Make the request: example.no-ip.org:256/phpmyadmin Forwarded to: <my_public_static_IP_address>:256/phpmyadmin Router receives the request public request and forwards it to: <internal_IP_address>:80/phpmyadmin   In the end, I get a 403 Forbidden error. My server is configured for access online, as going to example.no-ip.org:256 will take you to my homepage (well, if that were actually my domain :D).  Again, just to be clear, the computer I am making the request from is also the Apache server.  Any ideas on what may be causing this?

This is a  about  the use of a *AMPP's stack.    I recently had a talk with some experienced people and they suggested to me not to use a WAMP stack, and instead install apache, mysql and php separately.  I don't understand why they have suggested this, though, so can anyone tell me?  Is there a particular disadvantage of WAMP, or a particular advantage to installing all of them separately?  Since a WAMP stack itself is composed of apache, mysql and php, then what's the difference between using the WAMP stack and installing them all separately?


$W_{t}$ is a Wiener process. I mean, it seems that it is a Markov process, though I don't see an easy way to prove it. Because, I mean, I don't see how it can be proved that it is a Markov process using definition or the fact that for Markov processes $P(X_{s}|X_{t_{n}}, ... , X_{t_{1}}) = P(X_{s}|X_{t_{n}})$. Any thoughts?

I am pretty sure $(B_{t}^{2})$ not Markov because the squared random walk is not.    I guess I can repeat the method since to be Markov it must satisfy the discrete.  Thanks


I found  on github occasionally.  md5(text).equals(text)   Could this happen in common use?

Is there a fixed point in the MD5 transformation, i.e. does there exist x such that md5(x) == x?


I am testing the backpropagation algorithm for a multilayer perceptron. My net architecture have 3 neurons with sigmoid as activation function. My data is came from a linear regression problem, but I'm just trying to implement the regression with neural networks. The problem is, my net is not predicting the values. As far as I know, a neural network can approximate a huge number of functions beacuse of its non-linearity, but in this case, is a linear problem. Should it be easier to it to predict the results? Below I write the code: I'm using Python 3 with Anaconda 3.6 environment.  import matplotlib.pyplot as plt import numpy as np from scipy import stats import random  random.seed(1)  def sigmoid(x):     return 1./(1 + np.exp(-x))  def sigmoid_(x):     return sigmoid(x)*(1-sigmoid(x))  income = np.array([685, 683, 526, 662, 536, 627, 520, 423,           343, 513, 462, 383, 460, 517, 454, 448,           1076, 970, 722, 681, 814, 800, 782, 775,           689, 731, 1499])  income_ = income/np.max(income)  scholarship = np.array([5.7, 6, 4.5, 4.9, 4.7, 5.5, 4.5, 3.9,                3.6, 4.5, 4.3, 3.5, 4.1, 4.6, 3.7, 4,                6.8, 7.1, 5.7, 5.4, 6.3, 6.4, 6, 5.4,                5.5, 5.7, 8.2])  scholarship_ = scholarship/np.max(scholarship)  w1 = np.random.uniform(0.5, 1.5, size = (3, 1)) w2 = np.random.uniform(0.5, 1.5, size = (1, 3)) b1 = np.random.uniform(0.5, 1.5, size = (3, 1)) b2 = np.random.uniform(0.5, 1.5, size = (1, 1))  eta = 0.05 emax = 1e-7  epoch = 30 E = 0  for i in range(epoch):       E_ = E      for j in range(len(income)):         i1 = np.dot(w1, np.array([[scholarship_[j]]])) + b1         y1 = sigmoid(i1)         i2 = np.dot(w2, y1) + b2          dW2 = np.dot((income_[j] - i2), sigmoid_(i2))         w2 += eta*dW2*y1.T         b2 += eta*dW2          dW1 = np.dot(dW2, w2).T * sigmoid_(i1)         w1 += eta*dW1*np.array([scholarship_[j]])         b1 += eta*dW1      E = []      for k in range(len(income)):         i1 = np.dot(w1, np.array([[scholarship_[k]]])) + b1         y1 = sigmoid(i1)         i2 = np.dot(w2, y1) + b2         E.append((income_[k] - i2[0][0])**2)      E = sum(E)/(2*len(E))      if abs(E_ - E) <= emax:         break      print('Error: ', E, ' at epoch: ', i)  nn = []  for l in range(len(income)):         i1 = np.dot(w1, np.array([[scholarship_[l]]])) + b1         y1 = sigmoid(i1)         i2 = np.dot(w2, y1) + b2         nn.append(i2[0][0])  plt.plot(scholarship_, income_, 'ro', scholarship_, nn, 'bo') plt.show() plt.plot(income_, nn, 'yo') plt.show()   And the resulting graphs are:    The red points are the x data with y data, the blue one are the x data with the net predicts

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


Let $0 \rightarrow E' \rightarrow E \rightarrow E''$ be a short exact sequence of quasi coherent sheaves on a scheme X. Show that the sequence $0 \rightarrow E'(X) \rightarrow E(X) \rightarrow E''(X)$ of global sections is left exact.   Considering the sequence as first a short exact sequence of abelian groups, I have managed to show that the sequence of sections must  be left exact as a sequence of abelian groups. I thought of using this and then showing that the maps are then naturally maps of $O_X$ modules. (I might be completely misunderstanding how this is supposed to work. It's the best guess I have).  I know that there is a natural functor from the category of $O_X$ -modules to the category of abelian groups. And since the sequence $0 \rightarrow E' \rightarrow E \rightarrow E''$ is a sequence of quasi coherent sheaves, we have that given an affine open $U = Spec A \subseteq X$, the sequence $0 \rightarrow E'|_U \rightarrow E|_U \rightarrow E''|_U \rightarrow 0$ is of the form $0 \rightarrow \tilde {M'} \rightarrow \tilde {M} \rightarrow \tilde {M''} \rightarrow 0$ for some short exact sequence of A-modules $0 \rightarrow M' \rightarrow M \rightarrow M'' \rightarrow 0$. But I'm not sure how to proceed.   I understand that the case for abelian groups is stronger in that it applies to a more general case. But from what I understand, it's also weaker as there is additional structure (Here, of an $O_X$ module) that it does not account for.  Any help would be appreciated.

Suppose we have an exact sequence of sheaves of abelian groups,  $$ 0 \longrightarrow \mathcal{F}' \stackrel{\phi'}{\longrightarrow} \mathcal{F} \stackrel{\phi}{\longrightarrow} \mathcal{F}''. $$  I want to show that the sequence of abelian groups $$0 \longrightarrow \mathcal{F}'(U) \stackrel{\phi'_{U}}{\longrightarrow} \mathcal{F}(U) \stackrel{\phi_{U}}{\longrightarrow} \mathcal{F}''(U) $$ is exact for all open sets $U$. So far I have that exactness at $\mathcal{F}'(U)$ is immediate since injectivity for morphisms of sheaves can be checked on injectivity of morphisms of sections. However I am stuck at exactness at $\mathcal{F}(U)$. I feel as though I am very close. I have determined that exactness at $\mathcal{F}(U)$ is equivalent to the presheaf image of $\phi '$ being equal to the kernel sheaf of $\phi$.   From exactness of the original sequence, I have that $\text{im} \phi ' = \ker \phi  $, but how do I then show that this is equal to the image presheaf of $\phi '$? In other words, the image presheaf of $\phi'$ was already a sheaf?  This is related to another question asked here , where user Future suggests that we can use the fact that the image sheaf can be identified with a subsheaf of the target sheaf, but I am still not sure how to do it.  I realize there are other ways to prove left exactness of the section functor, but I am very curious how to make this particular approach work.   Any help is appreciated.


I want to use Set in NodeJs. And I found that  shows what I want.  But I have problem about,  let collectionSet = new Set();   and this set has N-Dimention items like [1, 2], [2, 3], [1, 3, 5], [1, 2, 5] ....  and I added to collectionSet with  collectionSet.add([1, 2]) collectionSet.add([2, 3]) ... collectionSet --> Set { [1, 2], [2, 3], [1, 3, 5], [1, 2, 5] .. }   What I want is   If my collectionSet already has [1, 2] or [2, 3] ..  I used   collectionSet.has([1, 2])    or   .has([2, 3])    or   .contains([1, 2]) ..     but I didn't work. (When I print my console, it says false(not exist).)  Is there any method I can fix?

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


I am using the example from here:  What I would like to know, is how can I add jquery function on the new buttons that are created after I clicked on insert after? Let's say I have clicked twice the button, insert after and so I have these new two buttons. How can I add functions on the buttons? What I would like to recreate is: ` <!DOCTYPE html>          <link rel="stylesheet" href="style.css">              <button id = "btn_add> Add </button>

     `  JS $(document).ready(function () {  $("#btn_add").click(() => {         $('#container').append(`
\
\           Trial
 \         <button id="btn_addOther"> Add Other </button>
`);      })    $("#btn_addOther").click(() => {  $('#under_container').append(`
 \         <textarea placeholder="Title" type="text" >Title</textarea> \
`         );     }); });  So, I would like to create a button that adds other buttons and when the new buttons are created, they should be able to create other things on the page.

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.