How do I find images based on their numbers in the Excel file?

I have 1,015 images in a folder and this image is classified into seven types and these types are categories of medical diagnoses of skin cancer, and the same images are classified in the Excel file by number (the number of each picture corresponds to the type of diagnosis of this image). Clearly, each image has a specific number corresponding to the diagnostic type, my question is how to sort these images in the folder in groups so that each group of images have the same diagnosis.


JQuery when some go true then do something

I'm with a issue, the element $("#el") doesn't exist when I running my JS. The element has on different HTML but is on the same page.  I'm already try   $("#el").ready(addClickEv());  $(document).ready(addClickEv);  $.when($("#el").length > 0).then(addClickEv());  function addClickEv() {     $("#el").on("click", function() {         console.log("click");     }); }   But any of this works. How can I do this?


in stream(>>) and out stream(<<) object overloading

Why we always need a friend function to overload (>>) in stream or (<<) out stream operator.


Let $a,b,c$ be positive, not equal. Prove that $3(a^3+b^3+c^3) > (a+b+c)(a^2+b^2+c^2)$.  I know the proof by subtracting LHS by RHS and then doing some arrangement.  But isn't there any inequality which can be used in $(1+1+1)(a^3+b^3+c^3) >(a+b+c)(a^2+b^2+c^2)$, or an easy proof?


In align environment, how can you label some (but not all) of the equations?

I know that the align environment labels all the lines, while the align* environment labels none of the lines. Is there a way to have the align environment label only some of the lines?  For example, suppose I have something like this:  \begin{align} x+y  \\ x-y  \\ xy \end{align}   This labels all three lines. Is there a way to only label, say, the second line (x-y)?


Is the following series converging $\sum_{n=2}\dfrac{1}{(\ln n)^{\ln n}}$  I am not able to compare this with anything, can some show the way


Let $a>0$ and $b>0$. Prove that $\sqrt{ab} \le (a+b)/2$.  Here is what I have tried: Let $a \le b$. Multiplying both sides of this inequality by $a$ results in $a^2 \le ab$. It follows that $a \le \sqrt{ab}$. We can do the same process with $b$ to find that $a \le \sqrt{ab} \le b$.  Similarly we can add $a$ to both sides, then divide by 2 to give this inequality: $a \le (a+b)/2 \le b$.  However, I have no way to compare $\sqrt{ab}$ and $(a+b)/2$.


Extended permutations, what if you keep adding categories?

'm a little bit unsure how to approach this problem of permutations when you add categories:  Each object can contain 3 attributes out of the 10 possible available.  Because order doesn't matter, there would be 10 x 9 x 8 = 720 possible choices. If duplications of attributes don't matter (eg. you can have 3 of the same attribute), then there will be 10 x 10 x 10 possible choices. This part is easy.  But what I don't understand, is what happens if this object can randomly come from any of 30 countries? And what if this object can be of any 5 sizes? (These are not attributes mentioned before)  How many possibilities are there?


Maximum and minimum value of Determinant of $3 \times 3$ Matrix with entries $\pm 1$

Find Maximum value of Determinant of $3 \times 3$ Matrix  with  entries $\pm 1$  My try:  I considered a matrix as :  $$A=\begin{bmatrix} 1 &-1  &-1 \\  -1 &1  &-1 \\   -1&-1  &1  \end{bmatrix}$$  we have $$Det(A)=-4$$ and maximum is $4$, but how can we show that these are max and min values?   I also tried as follows:  By definition Determinant of a matrix is dot product of elements of any row with corresponding Cofactors  hence  $$Det(A)=a_{11}C_{11}+a_{12}C_{12}+a_{13}C_{13}$$  By cauchy Scwartz Inequality we have  $$a_{11}C_{11}+a_{12}C_{12}+a_{13}C_{13} \le \left(\sqrt{a_{11}^2+a_{12}^2+a_{13}^2}\right)\left(\sqrt{C_{11}^2+C_{12}^2+C_{13}^2}\right)$$  any way to proceed here?


The General Relativity from String Theory Point of View

I have a hard time understand  that      When you only look at the classical limit or classical physics, string   theory exactly agrees with general relativity   Because from what I know, String Theory assumes a fixed space time background (ie, all the strings and membranes interact in a fix background, and their interaction gives rise to fundamental particles that we observe), but General Relativity assumes that the space time background is influenced by what is in it and the interaction between them.   Given that both have very different assumptions, what do string theorists mean when they say string theory agrees with general relativity in a classical limit? Or more specifically, how does string theory--a fix spacetime background theory--  reconciles with the general relativity on dynamic spacetime background part? I can understand a fix, static spacetime in the context of changing, dynamic spacetime background, but I cannot understand a chanding, dynamic spacetime in the context of a fix, static spacetime background.


If I download viruses on a virtual machine, can they infect the host?

I have a Windows 10 computer and am running Windows 10 in the virtual machine (Virtual box). If i wanted to download lots of viruses to screw with the virtual machine, could they infect the host? I know about turning shared folders off. If they can infect the host, is there any way to make it so they can't, but i still want to be able to browse the internet in the vm. Thanks!


c++ template method definition does not recognise using alias

I am declaring a template class and defining the methods on an inline file (foo.hpp) template<typename T> class Foo { public:   using Result = T::Result;    Foo();   ~Foo();    Result Bar(); };  (foo-inl.hpp) template<typename T> Result Foo<T>::Bar() {   ... }  But I get an error error: 'Result' does not name a type; I thought, since i declare Bar as part of Foo<T> the method definition should know about Result Any suggestons on how to fix it?


How to install Microsoft Visual Studio 2017 on Ubuntu 19.04?

I am using Ubuntu 19.04. How do I install Microsoft Visual Studio 2017 on it?


I asked this question on EL&U Meta and it was suggested I post it here.  Does anybody know if there is a way that I could print out all of my answers and or questions on E&U or another SE site without going to each individual page and printing it off?  Also, do we want there to be a print button on pages? I quite often want to print out other peoples answers. It's a bind having to select them etc.


I would like to replace a value in a specific index with specific value retrieved from excel. I'm getting my whole array being replace with the last value retrieved.  details= [[""] * 2 ] * 2 details_index=3 for count1 in range(len(details)-1):     details[count1][0] = sheet.cell(row=count1+2, column=details_index).value   the output always return  [['0009', ''], ['0009', ''], ['0009', ''], ['0009', ''], ['0009', ''], ['0009', ''], ['0009', ''], ['0009', ''], ['0009', ''], ['0009', '']]   any idea what did the loop did wrong?


Is there a way to make some features more important than others in a SVM classifier?

I am using sklearn library to train the default SVM classifier on a bunch of data. My data has roughly 30 features. But I realize some of these features are "more important" than others. For example, I want the change in features 1, 2, and 3 to greatly impact the learning process, whereas, features 4 through 25 are useful information, but not as critical.   If I just multiply the numbers in features 1 to 3 by say, 100, it won't make much difference because I believe the algorithm normalizes the features anyway. So my question is, how can I give a weight to the features in an SVM classifier, so that some of them influence the learning and prediction more than others?  Here's the very crude version of the code I'm using:  clf = SVC(probability=True, gamma=0.1, C=1)) data = np.array([1, 4, 1, 6, 2, 5, 7, 2, ... ]) target = np.array([0, 1, 0, 0, 1, ... ]) clf.fit(data, target)


Python os.path.realpath() for symlink in Windows

It seems like realpath() does not resolve symlink (not shortcut - *.lnk) in Windows. I found an open bug for python3 here:   Is there any workaround? I'm mostly interested in Python 2.


Race is to Racist as Religion is to what?

Please have a one word answer; and it is not zealot. Zealots are idealists. Being a racist has a very negative connotation. Also maintain the same part of speech. I would like a noun.


A proof for the inequality $\sum_{i=0}^{t-2}{\frac{1}{t+3i}} \leq \frac{1}{2} $ for all $t \geq 2$

I'm struggling with proving the following inequality: $$\sum_{i=0}^{t-2}{\frac{1}{t+3i}} \leq \frac{1}{2}$$  for all $t \geq 2$. I think it is monotonic non-increasing in $t$, which would suffice.  Thanks in advance!


Can externally hosted sitemaps work with Google and Bing?

I am using a "cloud" hosting provider (Heroku) to host my webapp. Since I don't have access to a permanent file system, I am storing my sitemap.xml in Amazon S3.  I wanted to know the SEO implications of the following 2 options for submitting the sitemap to search engines (Google & Bing) via their webmaster tools:  1) Create on endpoint on my domain:  that performs a 301 redirect to the S3 hosted sitemap.  Provide the url hosted on my domain to the search engines. This is the option I am currently using. It seems to work fine with Google, but I noticed a "sitemap error" with Bing - I am monitoring this as I am not yet sure what the cause is.  2) Apparently, there is a way to do "cross domain" sitemap submission whereby I get the S3 URL approved by the search engine, then I can directly submit the S3 url as my sitemap.  Also I am currently pointing the sitemap entry in robots.txt to the sitemap url hosted on my domain (not to S3).  Is one of these methods preferred from an SEO perspective? Like I said, I am using option (1) but I want to be somewhat confident that the crawlers will be OK with the HTTP 301 that I'm using.


Prove that $\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$


We are blocking bots, crawlers, spiders and scan tools in our servers. Can this affect DA (domain authority)?

I didn't know the concept of domain/page authority in SEO until 1 hour ago. We have been blocking bots, crawlers, spiders and scanners in general directly from Apache through ModSecurity rules (custom rules).  We are only allowing bots from Google, Bing, Yahoo and other third party tools, but we block automated tools, risky countries (like Rusia, China, Ukraine, etc.), risky IPs and others since we've had negative traffic experiences and attacks in the past. Everything works fine now, but I'm afraid this can affect how some tools measures DA to all the domains we are hosting.  So, blocking bots affects DA results, like the ones in this page?   Thank you.


Using differentiation for computing $\int_{0}^{1}\frac{\arctan(ax)}{x\sqrt{1-x^2}}\,dx$

How can I prove that I can differentiate the integral:  $$ \int_{0}^{1} \frac{\arctan(ax)}{x\sqrt{1-x^2}}\,dx $$  First I have to prove this integral converges. Next I have to prove the integral $$ \int_{0}^{1} f_{a}'(x, a)\,dx $$ converges uniformly.  Then I can differentiate integral with Leibniz's rule.  I tried Weierstrass and Dirichlet's tests. Nothing succeeded.   Thank you for help in advance.


How could I figure out the shortest way to turn, and whats the angle?

I'm creating some robots for my tank game. I want them to find each other and shoot each other down, so I'm trying to implement a way for them to turn towards each other, and turn the shortest way. For instance, if we where T1 (tank 1), how could I figure out if I where to turn right of left, and at what angle to turn if   Tank1 (us) position is (8906,76), facing is 23 degrees. Tank2 (enemy) position is (888,61)   0/360 is straight up.  The way I've tried to do is to decide what quadrant the enemy is of myself. But that leaves out a 45 degree angle to fail. I know there is some archtan but I cant simply get a grip on them...


Explaining the concept of underwear to our toddler

Our 21 month old toddler will use the potty when we leave her bottom bare - she has been successfully doing this for a month. Tired of cleaning stinky diapers, we leave her bottom bare when she is home.   She doesn't particularly enjoy wearing diapers, and when we put one on her, she doesn't take the initiative to tell us that she has to use the potty. However, when we have company over, we put a diaper on her.  We are trying to transition her into wearing panties; however, she is very opposed to them. She equates them with pants and doesn't want to wear them. While she is fully capable of dressing herself in pants, she hasn't mastered taking her pants off yet.   How do you introduce underwear to your child? When do people normally introduce underwear to their child? How do I explain the concept of having to take her panties off before using the potty?  We in no way want to discourage her use of the potty, as she seems to really enjoy pooing/peeing outside (she claps for herself whenever she uses the potty). But if she is interested in potty training herself, I do want to show her the concept of an underwear.


Question regarding default Salesforce client certificate being retired

I just received an email informing that the default Salesforce client certificate (proxy.salesforce.com) will retire on August 7, 2017 at 09:30 a.m. PDT (16:30 UTC).  They say customers using the following features may be impacted:   Single Sign-On using Service Provider (SP)-Initiated SAML Delegated authentication Workflow automated messaging AJAX proxy PageReference.getContent() Apex call PageReference.getContentAsPDF() Apex call   As an administrator and developer who has an app that uses getContentAsPDF calling a page within the organization (getting the pdf of a visualforce rendered as PDF), should I be concerned about the highlighted feature?


Invalid regex group (reverse lookahead) in Firefox

I have a rather confusing regex expression to :    var sentence = "Exclamation! Question? Full stop. Ellipsis..."; var words = sentence.toLowerCase().match(/\w+(?:'\w+)*|(?<![!?.])[!?.]/g); console.log(words);     In Chrome, this outputs:  [ "exclamation", "!", "question", "?", "full", "stop", ".", "ellipsis", "." ]  In Firefox, this expression causes an error which seems to be due to the reverse lookahead.  I was wondering if it would be possible to rewrite this expression in a way which will work in Firefox, or if there is any other way in which I could accomplish this?


entropy change during irreversible heat loss

When a thermodynamic system gains heat if the heat gain is irreversible then there is a entropy generation along with the entropy transfer..so is there a similar entropy generation associated with irreversie heat loss too? This is the second time i am askng this question so can somebody give me a good answer..?


Why does my admin menu link for my custom module not get created?

I am creating a module in Drupal 7. The module is working well now, but I doesn't create an admin menu link.  I used the following code:  <?php function question_mark_menu() {     $items = array();      $items['admin/question-mark'] = array(         'title' => 'Question mark',         'description' => 'Manage your question mark',         'page callback' => 'question_mark_page',         'access arguments' => array('administer question mark'),         'type' => MENU_NORMAL_ITEM,     );     return $items; } ?>   I tried to clear my cache but nothing works.  What is wrong in my code?


Please explain why $10$ raised to the power of $0$ ($10^0$) is equal to $1$

Please explain why $10$ raised to the power of $0$ i.e., $10^0$ is equal to $1$ and $10^1$ is simply equal to $10$, then the numbers between $1$ and $10$ can be written as $10$ raised to some power between $0$ and $1$.


xdvipdfmx parse error when using particular font with fontspec

I am using the font IM FELL English PRO () via the fontspec package, and when I tried typesetting the characters \"{a}, \'{n} or \"{o}, I got this error:  xdvipdfmx:fatal: Type2 Charstring Parser: Parsing charstring failed: (status=-1, stack=5) Output file removed.   Here is the MWE:  \documentclass{minimal} \usepackage{fontspec} \setmainfont{IM FELL English PRO} \begin{document} \'{n} \end{document}   I am using XeTeX version 3.14159265-2.6-0.99991 and fontspec version 2.4a. Another user also got the same error using LuaTeX with this MWE.  Those characters do exist in this font. There are other characters that give this error (e.g. ), but not all accented characters have the problem; e.g. \"{u} is ok. The error also goes away if I change to another font, such as Arial. There is another  where the OP there got the same error with some fonts but not others. It was suggested there for various reasons that I should start a new question.   The font developer Igino Marini told me the font had been generated in FontLab Studio and had passed the Microsoft Font Validator, and no problems have been reported to him outside of LaTeX.  Many thanks for looking into this.


Add dropdown list value(option) dynamically using jquery

I have a dropdown(Dataspy) , with a single options ,which is coming from the cloud environment, now i want to add an option to my DataSpy dropdown dynamically(since i donot have permissions to access the cloud DB), and below is the image i have attached , i receive during debugging in Chrome , which has values, coming from cloud (in below case value is 100116), how can i create one of that kind using jquery? i donot have any idea . Help me with this.  below is the code where i want to add a new option(WorkRequest) dynamically. function DropdownChange() {             //let workrequest = new Option('WorkRequest', '1');             var x = document.getElementById("ddlServices");             console.log(x);             var id = x.options[x.selectedIndex].value;             console.log(id);             $('#contenttable').empty();             $('#contenttable').append('

');             document.getElementById("lblHeading").innerText = "<%=Resources.Resource.msg_grid_loading %>"//"Loading...."             RenderData(id);         }


Help evaluating triple integral over tetrahedron

I have a triple integral of $\iiint xyz\,dx\,dy\,dz$  over the volume of a tetrahedron with vertices $(0,0,0)$, $(1,0,0)$, $(0,1,0)$, and $(0,0,1)$.   Normally I would just have limits 0 to 1 but that does not seem to work. How do I solve a problem like this?


Prove that for all $a, b > 0, a^b + b^a > 1$

This seems an innocent inequality. The trivial case when $a \ge 1$ or $b \ge 1$ is easy to prove: if $a \ge 1$, then $a^b \ge a^0 = 1$. So the hard part of the problem is when $a, b \in (0, 1)$ .


Random matrix theory impact on covariance matrix analysis

Framework: From RMT, eigenvalues have a semicircle distribution for symmetric matrices each with i.i.d normally distributed entries as the size of the matrix grows. The restrictions on i.i.d have recently been shown to not matter so we can proceed nevertheless. Example: If we take a covariance matrix of all stock tickers beginning in A comparing the average daily return over a period of time (or any process with no underlying relation), with each entry we can assume lognormal distribution forming a, lets say, 10000 by 10000 symmetric matrix. Over a duration of time we get a sequence of such matrices. Each of the entries we assume to be i.i.d since the stocks have 'nothing' to do with each other (although a weaker results holds for non-i.i.d entries). Now this series of matrices forms a chain of covariance matrices tending towards the underlying covariance matrix of the entire history of the stocks (if we sampled correctly). Random Matrix Theory implications: We known from RMT that once we decompose these matrices into their eigenvalues, the eigenvalues tend to the semicircle distribution. Since this distribution is continuous, there's a spread in results i.e. there is some underlying variance to the eigenvalue decomposition of covariance matrices. Conclusion: Thus when we use covariance matrices shouldn't there be some sort of hypothesis test that's able to filter out this underlying distribution, similar to comparing normal distributions where we need to account for variance when comparing two mean values. This would be dependent on how i.i.d the random variables are, the size of the matrix, the number of samples taken, and the mean/variance of the random variables themselves. What would be weird about this hypothesis test is that we'd expects as $n$ gets larger so does the error bound, captured by the asymptotic relationship between the size and convergence to the semicircle distribution. TLDR: Is there some sort of hypothesis testing for PCA, or any eigenvalue method, that filters out the underlying tendency of random matrices to share similar eigen-distributions? Similar to how when you compare the mean of two normal distributions you need to perform a hypothesis test to account for the variance. Edit - Solution: I found this paper  which seems quite promising although it'll take a few days for me to fully understand. It seems like this is an on-going area of research. Any further comments or recommendations are always appreciated.


Is System.getProperty("user.home") equivalent to Paths.get("~").absolutePath?

By equivalence, i mean logical equivalence, not the String comparison. E.g. if I do Files.newBufferedReader(Paths.get("file.txt", System.getProperty("user.home")) and Files.newBufferedReader(Paths.get("~").resolve(Paths.get("file.txt"))), will I get the same file on Windows and other systems?


Keeping cooked pasta, chicken, beef, shrimp, and rice edible for at least 5 days

I am trying to meal prep for the work week. I have come up with recipes that meet my calorie goals, and I am trying to make them in advance. I have tried this in the past, but what I noticed is that I got bored after about the 3rd day or the meat did not taste good after approximately 3 days (especially chicken and fish).   I tried making meals for only 3 days in advance vs 5 days, but the problem is that I have very little to no time to cook during the weekdays. I tried yesterday, and it took me over 2 hours and I still was not able to complete the meals.   My meals are as follows: brown rice with veggies and some meat, wholewheat pasta with some meat, wholewheat tortilla tacos with some meat, and a lean veggie soup base (veggies with broth). Each of the meals may be supplemented by some extra roasted potatoes. All of the meals also include some veggies (onion, bell pepper, spinach, etc)  I have time on sunday to cook but I want the meals that I am going to eat on Thursday/Friday to last if I cook them on Sunday. I am trying to figure out the best way of doing this.   I usually make the meals individually. So for example I'll make specifically 114g of pasta for a single meal and cook that separately from the rest of pasta meals I will cook, since I don't know how much 114g of raw pasta weighs when it is wet. The meats are usually done in batch. I'll cook the chicken around the same time as I cook my flank steak, shrimp, and chicken sausage. Here are my questions:  1) If I make the individual meals on Sunday, and the meals contain brown rice/wholewheat pasta with some meat like chicken/shrimp/flank steak and veggies, can i immediately freeze the meals in the tupperware? Will this taste good if I thaw them 4 days later and reheat them?  2) Let's say I don't freeze anything. Then can cooked pasta/brown rice last for 5-6 days? I read online that chicken/meats in general only last about 3 days before they spoil/taste bad. But it would save me a lot of time if I cooked the pasta/rice in advance and just cooked the meats/veggies on wednesdays.  3) how long can cooked veggies last in the fridge? I make veggie soup as part of my meals, so can that last for 5 days if needed?  Sorry for the long list of questions. Mainly I am trying to figure out what is the best way of prepping this stuff. An ideal solution for me would be cooking all 10 meals (5 days x 2 meals for lunch and dinner) in one day and then preserving the taste of the meals that will be eaten on thursday/friday.


I am trying to rotate an object using python, inline with a vector which gives me the direction I want (based on the difference between the last two coordinates of the curve I generated). I therefore have a vector which I'd like to align this object but not the XYZ angles. The options to specify rotation (XYZ Euler...) all seem to require some sort of angle definition. I've started playing with numpy with I'm not experienced enough to find the answer. Would you be able to advise what would be the best way to align an object to a vector and (if necessary) how I could convert the vector coordinates in XYZ_Euler angles I could apply to the object? for instance, Vector=[1,1,1] and I would like to rotate the object along this vector. Thanks for your help  update Thanks guys, DirectionVector.to_track_quat('X', 'Z') did the trick very nicely! #define direction Vector=(1,1,1) DirectionVector = mathutils.Vector(Vector)  #apply rotation bpy.context.object.rotation_mode = 'QUATERNION' bpy.context.object.rotation_quaternion = DirectionVector.to_track_quat('Z','Y')


Red color has largest wavelenght and violet minimum (in the range of visible light). then why does violet light appears reddish? RED + BLUE = VIOLET

My question is simple. Green light is more similar to red light than violet, then why is violet reddish and green not? in the language of frequencies and wavelengths, red and violet should contrast each other. Then why do they don't?


getDeltaTime() method giving me null Exception?

For some reason, when I try to pass through Gdx.graphics.getDeltaTime() into my player class, the float delta time is null giving a null pointer exception. I already tried to check if the getDeltaTime method worked, and its counting, but when i try to pass through the function it doesn't work.  My Main Code       public class MyGdxGame extends ApplicationAdapter implements InputProcessor {  SpriteBatch batch; private Player1 player1; private TiledMap iceLevel; private OrthogonalTiledMapRenderer renderer; private OrthographicCamera camera; float elaspedTime;  @Override public void create() {     batch = new SpriteBatch();     Gdx.input.setInputProcessor(this);      TmxMapLoader loader = new TmxMapLoader();     iceLevel = loader.load("IceLevel.tmx");     renderer = new OrthogonalTiledMapRenderer(iceLevel);     camera = new OrthographicCamera();     camera.setToOrtho(false);      player1 = new Player1(new Sprite(new Texture("player1Right.png")), (TiledMapTileLayer) iceLevel.getLayers().get("Land"));     player1.setPosition(player1.getCollisionLayer().getTileWidth(), 6 * player1.getCollisionLayer().getTileHeight()); }  @Override public void render() {     player1.update(Gdx.graphics.getDeltaTime());      Gdx.gl.glClearColor(1, 0, 0, 1);     Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);     batch.begin();      camera.update();     renderer.setView(camera);     renderer.render();      renderer.getBatch().begin();      player1.draw(renderer.getBatch());      renderer.getBatch().end();      batch.end(); }  @Override public void dispose() {     batch.dispose();     iceLevel.dispose();     renderer.dispose();     player1.getTexture().dispose();  }   A part of my player class  public class Player1 extends Sprite implements InputProcessor {  private Vector2 velocity;  private float speed = 60 * 2; private float gravity = 60 * 1.8f; private TiledMapTileLayer collisionLayer;  public Player1(Sprite sprite, TiledMapTileLayer collisionLayer) {     super(sprite);     this.collisionLayer = collisionLayer; }  public void draw(SpriteBatch spriteBatch) {     update(Gdx.graphics.getDeltaTime());     super.draw(spriteBatch); }  public void update(float delta) {      //gravity     velocity.y -= gravity * delta;      //set limit     if (velocity.y > speed) {         velocity.y = speed;      } else if (velocity.y < -speed) {         velocity.y = -speed;     }      // save old position     float oldX = getX();     float oldY = getY();     boolean collisionX = false;     boolean collisionY = false;      // move on x     setX(getX() + velocity.x * delta);      if (velocity.x < 0) { //going left         collisionX = collidesLeft();     } else if (velocity.x > 0) { //going right         collisionX = collidesRight();     }      // react to x collision     if (collisionX) {         setX(oldX);         velocity.x = 0;     }     // move on y     setY(getY() + velocity.y * delta * 5f);      if (velocity.y < 0) { // going down         collisionY = collidesBottom();     } else if (velocity.y > 0) { // going up          collisionY = collidesTop();     }     if (collisionY) {         setY(oldY);         velocity.y = 0;     } }


How can I automate gpg decryption which uses a passphrase while keeping it secret?

I am tasked with automating a gpg decryption using cron (or any Ubuntu Server compatible job scheduling tool). Since it has to be automated I used --passphrase but it ends up in the shell history so it is visible in the process list.  How can I go about automating decryption while maintaining good (preferably great) security standards?   An example will be highly appreciated.


Let $R$ be a ring with the property that whenever $a, b, c ∈ R$ with a $a\neq 0$ and $ab = ca$, it follows that $b = c$. Is $R$ a domain?

Let $R$ be a ring with the property that whenever $a, b, c ∈ R$ with $a \neq 0$ and $ab = ca$, it follows that $b = c$. Prove that $R$ is commutative.  Does the cancellation statement imply it's also an integral domain?


How was the formula for kinetic energy found, and who found it?

My questions mostly concern the history of physics. Who found the formula for kinetic energy $E_k =\frac{1}{2}mv^{2}$ and how was this formula actually discovered?  I've recently watched Leonard Susskind's lecture where he proves that if you define kinetic and potential energy in this way, then you can show that the total energy is conserved. But that makes me wonder how anyone came to define kinetic energy in that way.  My guess is that someone thought along the following lines:     Energy is conserved, in the sense that when you lift something up   you've done work, but when you let it go back down you're basically   back where you started. So it seems that my work and the work of   gravity just traded off.   But how do I make the concept mathematically rigorous?  I suppose I need functions $U$ and $V$, so that the total energy is their sum $E=U+V$, and the time derivative is always zero, $\frac{dE}{dt}=0$.   But where do I go from here? How do I leap to either   a) $U=\frac{1}{2}mv^{2}$ b) $F=-\frac{dV}{dt}$?    It seems to me that if you could get to either (a) or (b), then the rest is just algebra, but I do not see how to get to either of these without being told by a physics professor.


The query [SELECT Id FROM Contact]   is returning zero rows in a test class. I have tried everything I can think of. Why won't it return all records?  When I run the test I am seeing this line in the log. SOQL_EXECUTE_BEGIN [4]|Aggregations:0|SELECT Id FROM Contact SOQL_EXECUTE_END   [4]|Rows:0


Roll back from OS X Mavericks ( or any newer OS) to Mountain Lion

I installed the developer preview of OS X Mavericks, & too many things broke. I can't stay on it & need to roll back to Mountain Lion. Any ways of doing that? Please help!  I originally installed Mountain Lion & Mavericks through the Mac App Store.


Copy a portion of a Messages.app message on macOS

I am trying to select a portion of a message in Messages.app : however I get emojis when clicking inside of it:  This may be expected behavior on an iPhone but it certainly is not on macOS . Is there any way to select a portion of the message and copy it to the clipboard?


Arbitrary behaviour of community via upvoting low quality questions and downvoting better questions

A while back I saw a question (Q1) about why the unix command cat was called that and what was the use when you could simply use vim. Question was well received and upvoted, but the actual reaction should have been, Asking "What research did you do ?", which is a general site-requirement.  I also saw a question (Q2) about tee which (the OP claimed) did nothing and why it was so named. Again, Question was well received and upvoted, but the actual reaction should have been, Asking "What research did you do ?"    Now I see a question (Q3) in CSE titled "Control Flow Statements Explained" but the title is not accurate; It is about running an infinite loop with a finite number of transistors. Instead of upvoting or answering, the question should have been edited for clarity, which is a general site-requirement.    Again, in Puzzling SE, I sometimes see questions (Q4) which have so many "correct" answers that OP keeps saying "Oh, that is right but that is not what I was thinking" and finally accepts the nearest to what he was thinking. Here a site-requirement is that Puzzle questions should have only one correct answer. Hence question should be Put on hold (or even Closed or Deleted) until it is edited such that only one answer is possible.    I have seen many more such cases of low quality Posts getting upvoted and getting into HNQ.    All these questions are well received and upvoted, but the actual reaction should have been something else.    Meanwhile, I have see questions which follow the site-requirements, are clear and are well-researched, but get downvoted and deleted, or edited beyond recognition.    Why such arbitrary behaviour by community ?    Some thoughts on why this happens: (R1) a new question gets a view from a random newbie who may want rep Points, so he is ready to answer silly questions which can be answered elsewhere, and his initial upvote draws in more upvotes which may lead to HNQ selection. (R2) a new question gets a view from somebody who downvotes questions he does not like [I have seen such comments like "I downvoted because I feel others may not be interested in this"] and this downvote leads to more downvotes. (R3) Some readers think that answering is easier than editing questions ( Newbies may not even be aware of editing ) ; Now the answers bring in more viewership and more answers. (R4) Some times, I see the formation of cliques, who upvote answers by each others.    I may be partially right or even entirely wrong. Hence I am asking here.    I also suggest the following: (S1) Maybe remove downvoting. Upvote good questions. Flagging of Bad questions is enough. Ignore questions you are not interested in. (S2) Do not show downvotes or upvotes for X hours. (S3) Let the site community select questions for HQN. (S4) When a low quality Post is Deleted, inform (and may be Penalise) those who upvoted.    None of these suggestions will work, but maybe this Post will encourage thinking on this Issue (Provided, it does not get downvoted itself!)


I am a sponsor. Do I call the person I sponsor a "sponsee"?

What is the best word to use to describe the person who I am sponsoring? Or is there such a word?


Continuous function preserving rational difference.

Find all the continuous functions $f:\mathbb{R}\rightarrow \mathbb{R}$ such that if $x-y\in \mathbb{Q}$ then $f(x)-f(y)\in \mathbb{Q}$.   Can somebody give me some hint to solve this problem. I think that the functions are $f(x)=mx+b$ where $m\in\mathbb{Q}$.  Thanks!


Let $A$ be a complex matrix such that $A^n = I$, show that $A$ is diagonalisable.  How do I do this?    I would hazard a guess that since $A^n = I$ that means that $A^n$ is obvious diagonal, and I suppose that a diagonal matrix can only be formed by the square of another diagonal matrix, but I am not sure if that is the case. Also I think this neglects the complex cases.  Is there a Jordan block argument that I should use?


How to force the use of an ip of my server eth0:1, if my server interoge example google.com  when i use my php scripts, the ip that google must see is eth0:1  # The primary network interface auto eth0 iface eth0 inet static     address 173.249.3.15     netmask 255.255.255.0     gateway 173.249.3.1     dns-search invalid     dns-nameservers 213.136.95.10 213.136.95.11     up ip route replace 173.249.3.0/24 via 173.249.3.1 dev eth0  # new ip auto eth0:1 iface eth0:1 inet static     address 164.68.125.112     netmask 255.255.255.0     gateway 164.68.125.1


I have to write a Java program which has to parse an Apache log. As the Apache log grows continuously throughout the day, I would like that the Java program listens continuously for any new record in the log so I can parse it at real time. (I don't want to start to parse the log every time from the beginning). Any suggestions?


How do I define or deselect areas where the "Color to Alpha" effect should not be applied?

I have an image where the background is white and there are various important components that are also white. I want to just change the background to alpha, but "Colors to Alpha" - by default - changes all the white to alpha.  Please help and thank you!


Prove $a_n$ is a Cauchy-sequence, with $a_0 \in \Bbb R$ and $a_{n+1}=f(a_n)$

Let $f: \Bbb R \to \Bbb R$ be a differentiable function with $m=sup${$|f'(x)||x \in \Bbb R$} $<1$.  Let $a_0 \in \Bbb R$ and define $a_{n+1} =f(a_n)$ for $n=0,1,2...$. Prove the sequence $(a_n)_{n \geq 0}$ is a Cauchy sequence.  So we have to prove that $\forall \epsilon >0 ,\exists N \in \Bbb N$ such that when $n,m >N$ then $d(a_n,a_m) < \epsilon$, but I don't really know how to continue from here.


Is there any way to detected the user who is "Logged in as user" using Apex.  I want to be able to detected Mike Gill is Logging in as Asha Gill via Apex.


Indeed, on source forge, it is distributed with CVS and it is indicated this :     SourceForge only supports read-only access to CVS now. For more   information see our blog post about decommissioning CVS commit   support. If you are a project admin, you can convert your repository   to SVN or Git with these instructions.         Moreover, almost no improvement has had an owner since the end of 2016: , and no updates have been sent to CTAN since 2015.  So, what is the future of pgf/TikZ?


Why haven't clapperboards become obsolete?

(or slate) is used in movie primarily for two purposes:   To assist in synchronizing picture and sound (with the help of a ). It makes the editor's life easy. Cataloging of the recordings i.e. designate and mark particular scenes and takes recorded during a production.   I understand it is a crucial and an essential tool which is still used in the film-making process. It has evolved from traditional  slate to the modern  version.  Why hasn't anything better replaced the slate? By better I mean a tool or a technique (an automated one perhaps) which works by itself without an assistance of a human? Something which can fullfil the same purpose of the slate (Cataloging and synchronization while editing).  Or are we just using it for its legacy?


What is the difference between passing by reference the parameters in a function and passing pointer variables as a parameter in a function ?


Can somebody explain "leveraged debt investment positions" and "exposures" in this context for me, please?

"The strong bond performance has led to a surge in leveraged debt investment positions that are ultimately funded by the banks' interbank exposures and WMPs. But nobody really knows how levered these positions are, who has financed them, and by how much," S&P said. "The contagion risks for the financial sector could be high."  source:


Ubuntu 18.04 netplan.io how to prevent the creation of 2 default gateways

When I add 2 interfaces (eth0 LAN, eth1 WAN) with static IPs (or maybe also with DHCP), Ubuntu 18.04 Server is adding 2 default gateways. Thats not the goal.  How can I define only 1 default gateway?  File: /etc/netplan/01-netcfg.yaml  network:   version: 2   renderer: networkd   ethernets:     eth0:       addresses:         - 172.16.1.22/16       gateway4: 172.16.0.1       nameservers:         search: [mydomain.internal]         addresses: [172.16.1.2, 172.16.1.1]     eth1:       addresses:       - 172.19.3.235/24       gateway4: 172.19.3.1       nameservers:         addresses: [195.50.xxx.xxx,195.50.xxx.xxx]   ip route shows:   user@server:~$ ip route default via 172.19.3.1 dev eth1 proto static default via 172.16.0.1 dev eth0 proto static 172.16.0.0/16 dev eth0 proto kernel scope link src 172.16.1.22 172.19.3.0/24 dev eth1 proto kernel scope link src 172.19.3.134   2 default GWs......  In my case, the default GW from eth1 is the one and only I need.


How to force 'top' to show human readable values for %MEM RES and VIRT


Has George Lucas ever explained why Obi-Wan doesn't remember R2?

Probably at the time he didn't even have the backstory in his head, but did Lucas ever explain why Obi-Wan Kenobi didn't recognize R2-D2 in "A New Hope"?


No Windows 10 option in GRUB and Windows drive seems empty from Ubuntu

After installing Ubuntu in dual boot mode, I'm trying to switch back into Windows but when I boot up my computer and I'm in GRUB the only OS listed as an option to boot to is Ubuntu.   The SSD where Windows 10 was installed now seems to be completely empty when viewed in Ubuntu. I never formatted the drive so I have no idea why this is happening.


Overruling rel=follow value applied via Sterc SEO Tab

We are using MODX Revolution 2.7.1-pl and have installed Sterc SEO Tab to apply values for the robots meta tag at resource level. We also add the footer as a chunk to each page. We want to block search engines from crawling links in the footer even if this is added to a page we want search engines to index and follow every other link on the page. Has anybody come across this problem and if so how have you resolved?


Which jobs are dependent on seasons and how?

Seasons, especially winter, affect nature a lot and there are jobs, such as the farmer, whose jobs change or even become useless during certain seasons. This is basically as much as I could find in the wiki.  I would like to know which jobs seasons have an effect on, which seasons are the most effective for those professions and if there's a better alternative for those jobs during the weak seasons (swapping farmers to gatherers for the winter, for example)?


Choosing projected coordinate system for mapping all US states?

I'm on a project requires integrating data for all states in the US. It means I have two roadway datasets and I'm going to assign the attributes of roadways in one dataset to the same roadways in the other dataset (similar to spatial join). Each state is an independent shapefile and I need to merge them all at the end to generate the final product.     I'm wondering which projected coordinate system should I use in this case? Or it doesn't matter at all since it won't affect the result of geoprocessing? For my past work, I only mapped small area so I chose state plane NAD 83 of specific area as projected system.


I am given the following problem which I have problem to know where to even start:     The question: $\lim_{x\to 0} \frac{\int_0^x\frac{t^2}{\sqrt{a+2t^5}}dt} {bx-esinx}=\frac{1}{\pi}$ The part where I will like to know where to start:  $\int_0^x\frac{t^2}{\sqrt{a+2t^5}}dt$   I appreciate suggestions on how I may get about solving the integration part before I move on to solve the limit question as a whole.


I read these two threads:         And I got a little bit worried, is my Ubuntu machine safe? Or am I vulnerable to this vulnerability?  The second article mentioned that:     The flaw actually resided in the way Samba handled shared libraries.   The other thing that they say is all versions from versions 3.5.0 onwards since 2010 are vulnerable.     At that time, nearly 485,000 Samba-enabled computers were found to be exposed on the Internet, and researchers predicted that the SambaCry-based attacks also have potential to spread just like WannaCry ransomware widely.   .   I don't have a samba server however I've got samba-libs package installed.  What, if anything, should I do?  I'm running Ubuntu 16.04.


How do I efficiently sort objects by draw order when rendering a 2D game?

I need to render a "tile" game with objects that overlap, because they are taller than the tile they stand on, like the games in these screenshots:        I don't know how to render them in the correct order. I intend to perform a sorting operation before every rendering, depending on the object's Y position. However, I'm worried it'll be too expensive, especially since very few objects change their Y positions.   Is sorting the most performant way? Is there any other way? What algorithm or data structure should I use?


Trying to cut + copy + paste from the standard urxvt shell in Puppy Linux Wary 5.3.  If I follow  and I press:   in urxvt:  ctrl + insert = copy in abiword: shift + insert = paste   It doesn't work.  Please suggest, what's the shortcut?  Or the menu command?


What exactly is an environment variable?

I know that VARIABLE=value creates an environment variable, and export VARIABLE=value makes it available to processes created by the current shell. env shows the current environment variables, but where do they live? What comprises an environment variable (or an environment, for that matter)?


Can someone tell me why the first example in C gives a Segmentation fault (core dumped) and the second does not?

int main() {          char* string = "Hello world";         string[2] = 'd';          printf("%s\n", string);          return 0; }     int main() {          time_t now;         time(&now);                                                                                $                 char* time = ctime(&now) + 11;         time[8] = '\0';                                                                               printf("%s\n", time);          return 0; }  Like in the second example I am able to modify a particular index of the array for the pointer to terminate the string with the NULL character. However, with the first one I just try to change the character at index 2 to the letter 'd' but it refuses to print the output and I a Segmentation fault error! My guess is that in the second one there is some very slight difference where the ampersand is used to get the contents of the address in memory to where the pointer points to but that's just my guess. Would love if someone could give me a clear and not overly confusing explanation as to why this is... Thanks!


What is the preferred way to refer to la Wallonie in English -- Wallonia or Walloon Region?


In symmetric difference of three sets, is the Venn diagram for $(A \Delta B) \Delta C$  similar to $A \Delta B \Delta C$ ?  Thank you.


Using Favorites from Character Viewer on another Mac

I would like to use the list of customized Favorites in Character Viewer from my Macintosh on my co-worker's Mac.  Is there a way to do so?


Difference between forms of Internal energy equation

The first law of thermodynamics is formulated as: the change in internal energy of a system is equal to the heat added to the system minus the work done by the system:  $dU = Q - W$  Then for what reason do many people, like to use the alternative with a plus sign instead:  $dU = Q + W$


What am I missing in my Dijkstra’s shortest path algorithm?

I have to write a program that creates a graph of names and weights. I believe that I have got this part of the program to work but I also need to find the shortest path between the names depending on whats inputted via the command line. When I run my program though I get a "NullPointerException" and points to my "find shortest path method". I can't seem to figure out what I did wrong so any help will be appreciated. Below I will display my find shortest path code. public class Graph {      private String[] name;     private int[][] x;     private int[][] distance;     private int count;     private int z;     private static int lim = 9999;       public Graph(int n) {         name = new String[n];         x = new int[n][n];         count = 0;         z = n;         for(int i=0; i<n; i++) {             for(int j =0; j<n; j++) {                 x[i][j] = lim;             }         }     }      public void addPeep(String peep) {         name[count++] = peep;     }      public int getPeepNum(String peep) {         for(int i = 0; i<count; i++) {             if(name[i].equals(peep)) {                 return i;             }          }         return -1;     }      public String getPeepName(int num) {         if(num>= count || num<0) {             return null;         }         return name[num];     }      public void addEdge(String u, String v, int dis) {         int a = getPeepNum(u);         int b = getPeepNum(v);         if(a != -1 && b != -1) {             x[a][b] = dis;         }     }      public void findShortestPath() {         int q,r,t;         for(q=0; q<z; q++) {             for(r=0; r<z; r++) {                 distance[q][r] = x[q][r];             }         }         for(t =0; t<z; t++) {             for (q = 0; q < z; q++) {                 for (r = 0; r < z; r++) {                     if (distance[q][t] + distance[t][r] < distance[q][r]) {                         distance[q][r] = distance[q][t] + distance[t][r];                     }                 }             }         }     }       public int path(String u, String v) {         int m = getPeepNum(u);         int n = getPeepNum(v);         return distance[m][n];     }      public String lessThan(String u, int t) {         int a = getPeepNum(u);         String hold = "";         for(int i = 0; i<z; i++){             if(distance[a][i] < t && a != i) {                 hold += getPeepName(i) + "";             }         }         if(hold.equals("")) {             return "none";         }         return hold;     }      public String equal(String u, int t) {         int a = getPeepNum(u);         String hold = "";         for(int i = 0; i<z; i++) {             if (distance[a][i] == t) {                 hold += getPeepName(i) + "";               }         }         if(hold.equals("")) {             return "none";     }         return hold;     }      public String greaterThan(String u, int t) {         int a = getPeepNum(u);         String hold = "";         for(int i = 0; i<z; i++){             if(distance[a][i] ==t) {                 hold += getPeepName(i) + "";             }         }         if(hold.equals("")) {             return "none";         }         return hold;     } }


I've had the game for 10 days and I want to know if I can upgrade nookling junction.


How to I deal with unwrapped UVs orientation?   Delete the default Cube. Add a Cylinder Edit mode and edge select the Top and the Bottom and a single connecting edge. Make them into seams UV Unwrap (standard Unwrap mode)   The unwrapped UV now shows two circles above a row of quads. I can save this and open it in an image editor and paint over those areas and get the texture to align on the cylinder back in blender.  But, the pattern(just happens to be text) that was inserted in place of the row of quads is now upside down on the model. Any attempt to flip or align just makes things worse, from upside down to mirrored or the Top/Bottom not aligning.  So my real question is how could I have known that the quads represented an upside down view of the world?  Do other blender users export UVs and mark them with arrows and colours just to see how they align on a model before actually painting for real?  I tried selecting the edges in step 3 in different orders before making them into seams and it made no difference.  I also looked at the Normals but they appear to be only Inside/Outside not Up/Down.  Blender 2.70


Expected log value of noncentral exponential distribution

Suppose $X$ is non-central exponentially distributed with location $k$ and rate $\lambda$.  Then, what is $E(\log(X))$.  I know that for $k=0$, the answer is $-\log(\lambda) - \gamma$ where $\gamma$ is the Euler-Mascheroni constant.  What about when $k > 0$?


Java - How to get the mime type of a file from its stream?

Is it possible to get content type/mime type of a file from the file read as a stream from its stored location.  I am bit new to the file and stuffs, I was searching all day long but couldn't get what i have needed.  please help me out of this. thanks in advance  Edit:- Edit:  Guys thanks for your comments.  My java version is 6 and i can't trust the filename to get its mime type.


Who do Bash regular expressions seem to fail on simple matches?

My question is about the Bash binary  operator =~ about which the Bash manual page says the following:  When it is used, the string to the right of the operator is considered a POSIX extended regular expression and matched accordingly (as in regex(3)).   The  return value  is 0 if the string matches the pattern, and 1 otherwise.  Under the heading Compound Command the manual says of an expression in the form: [[ expression ]]   Return a status of 0 or 1 depending on the evaluation of the conditional expression expression.   Expressions  are  composed  of  the  primaries  described below under CONDITIONAL EXPRESSIONS...[and] An additional  binary  operator,  =~, is available...  Which seems to indicate that the =~ operator is available within a compound command of the form [[ <string> =~ <string> ]]  Indeed, the following expression invoked at the Bash command-line prompt: [[ 'x' =~ 'x' ]]  exits with a return value of 0 which, according to the manual page, indicates the pattern matched.  However: [[ 'x' =~ '.' ]]  returns 1 indicating the pattern does not match.  And [[ 'x' =~ '^' ]]  also returns 1.  I have tried this on GNU bash version 5.0.18(1)-release on Debian Linux, and 5.0.17(1)-release on Apple Darwin. The entry for "regex" in section 7 of the Debian manual (and "re_format" on the Apple machine) begins by indicating that it describes "Regular  expressions ("RE"s), as defined in POSIX.2" of which one form is "modern REs (roughly those of egrep; POSIX.2 calls these 'extended' REs)."  If the POSIX.2 mentioned in the regex page is the same as the POSIX mentioned in the bash page, then that would mean that the "modern REs" described in the regex page are the same as the "POSIX extended regular expressions" that Bash considers the string to the right of the =~ to be. The regex manual entry says further:  "A (modern) RE is one or more nonempty branches" "A branch is one or more pieces" "A piece is an atom" "An atom is [inter alia] '.' (matching any single character) [or] '^' (matching the null string at the beginning of a line..."  As noted above, this expression: [[ 'x' =~ '.' ]]  returns a value 1 indicating no match.  Yet if Bash considers the string to the right of the =~ operator to be a POSIX regular expression, and if the single character '.' can be a POSIX regular expression that matches any single character, and 'x' is a single character, then ought not the string '.' to the right of the =~ operator to match the single character 'x' that is to the left of the =~ operator in the above expression?  If so, then why is the return value 1? Similarly, if '^' matches the null string at the beginning of a line, then ought not the string '^" to the right of the =~ operator to match the string 'x' to the left of the =~ operator in the above expression?  If so then why does the expression [[ 'x' =~ '^' ]] return 1? Post-solution Update chepner's answer (and the comments) provide the working solution.  The following is the relevant excerpt from the bash manual page that I had overlooked:  Any  part  of the pattern may be quoted to force the quoted portion to be matched as a string.  Bracket expressions in regular expressions must be treated carefully, since normal quoting characters lose their meanings  between brackets.  If the pattern is stored in a shell variable, quoting the variable expansion forces the entire pattern to be matched as a string.


My computer boots to a black screen unless I run memtest

Whenever I switch my old Dell E520 on first thing in the morning it fails to boot into Ubuntu 16.04. It gets through bios to grub & beyond but will stop while trying to load the os. It finishes at a black screen. This seems a common problem & I've tried all the suggested solutions appropriate to my setup from the  thread, but none have worked for me.   What seems different from any other solution or discussion offered is that I have found a strange workaround: if I get to grub & run memtest for a minute then press esc to reboot, all is well! This works every time.  My questions are: Can anyone suggest why this works? Is there a solution that does not need my intervention at grub?


Is the book Courtship of Princess Leia the first time force healing was described in this way?

In The Rise of Skywalker we see the Force      healing various people/creatures. The explanation given is that the healthy person gives some of their life energy to heal the wound.    In the book The Courtship of Princess Leia, Luke is lying dying after fighting with Force-wielding witches who ride Rancors (yes that is really a thing in a book and is the one thing I hope is seen on screen one day).  As Luke dies a number of creatures initially, and then plants, the earth, and I am pretty sure the water, all give a bit of their own Force to help heal him.   So is this reference to Force Healing in the book The Courtship of Princess Leia the first instance in canon of Force Healing?


Following a blender tutorial and rendering is grainy

So I just recently started using blender as my friends started using it to make models for vrchat, so I decided to learn it as well, I was following the donut tutorial by blender guru but as I came to the rendering step I noticed that my render was much more grainy than his even though we had the same render numbers, any ideas? I tried increasing it further but noticed no difference at all. might the numbers have changed through the updates so they are not the same for the same quality or something? Specs GTX 2070 Super 16gb RAM AMD Radeon 3700x 750w power supply


What Amazon EC2 instance type should I use for my application built on Rails and Node.js, I need something that can handle many concurrent request, please adise.   Note:   I will use Passenger with Nginx.


Please read till the end, before you answer.  I'll start off with the examples to get to the point.   Drop a block from 1 meter and it will have speed v when it reaches the ground, with total work done on it w.   Drop it from 2 meters and it won't have twice the speed, since it has less time to gain speed. Surprisingly,  2w work is done to it.   Another example. I know it's weird but it's important  A 1 Ton block of lead in space is at rest. A human is standing beside the lead block. The human is going to use  chemical potential energy 2000 J to do work on the lead block and move it and displace it  2000 meters,  using a force of 1 N on the block,  Neglecting the force he uses to move himself to be able to push the block. How much time has he spent doing force?   Since force 1 N is done to on a 1 ton(1000 kg) block,  and acceleration is force over mass,  the acceleration is 1/1000. using the distance traveled by  acceleration formula,  the time needed is 2000 seconds. He has increased the momentum of the object from 0 to 2 thousand.   In another scenario,  A human used 2000 J chemical potential energy using force 1 N on a 1 ton block of lead, but this time it was moving with a speed 50 m/s. The amount of time he would need to move it would of be less than 20 seconds, because of the block's speed.  The increase in  momentum of the object must be less than 20. Surprisingly, In both scenarios  the human used chemical potential energy 2000 J, which is absurd, because the one in the first scenario must have used more energy.   Tl;Dr 2 humans consume the same amount of joules but the first uses so much "effort" and the second guy uses no effort but in the end,  same joules consumed.   This is what I'm trying to say. The amount of work you have done is affected significantly by the initial speed  of the object.   What consumes more food(energy) , adding 2, 000 momentum to an object or 20?  Physics tries to tell me they use the same energy?I don't understand how in each  of the scenarios the human  consumed the same amount of Joules  even though he clearly would be so much more tired after pushing the block at rest than the moving block . This absurdity is slowly driving me insane.  Where did I mess up?


Is absolute zero possible in a complete vacuum?

Thermal energy is the energy an object due to the motion of it's molecules. This means as long as an objects molecules have kinetic energy, it will not reach absolute zero. Does that mean if there was a complete vacuum(no molecules or waves inside the vacuum at all), it would be at absolute zero inside the vacuum because there is no molecules, meaning they can't have kinetic energy, and theirs no radiation to heat the space. So I was thinking it would be absolute zero in a complete vacuum.


For any uncountable set of formulas in propositional logic, is there is an equivalent and independent set of prositions?

Suppose I relax the restriction of propositional logic, allowing the primitive propositions to be uncountable. Does it follow that every set of propositions has an independent set equivalent to it? The countable case is covered here:    What happens in the general case?


Is it possible to completely opt of out the free Windows 10 upgrade? as it doesnt seem so

I am running Windows 8.1 Single Language for about a year now and although Windows 10 is due to release tomorrow, I've decided to put things on hold for a while and stick to Windows 8.1.  So I canceled my reservation for Windows 10 through the "Get Windows 10" app but something unusual happened today. I've noticed some network activity that consumed quite a bit of bandwidth. I narrowed it down to a Windows Update which has failed to install. Turns out it was named "Upgrade to Windows 10 Home Single Language". Here is a screenshot from the reliability monitor:    This download consumed almost 2.5GB before it failed to install. But now it has started downloading again. What do i do?


Why didn't Voldemort escape after the destruction of his last Horcrux?

I just re-watched the scene of Voldemort's death in the Deathly Hallows Part 2 movie. Voldemort and Harry's wands were locked with each other and then Neville killed Nagini. Suddenly, the green and red lights from Harry and Voldemort's spells disappeared. Both Voldemort and Harry noticed that the last Horcrux was no more.  Seeing that, why didn't Voldemort simply escape? He could have later returned with a new set of Horcruxes.


I would like to ask about upgrade of 13.10 to Ubuntu 14.04.  When I type in CL sudo update-manager after finding new version and beginning of an upgrade dialog appears saying:  Free translation:  Cannot calculate upgrade Unsolvable error  It could be  due: upgrading to devel release upgrading from devel release unofficial software packages   First one is not true, second neither, I am not using many unofficial packages.  What to do?


Why string getting from file is not equal to common string?

I am on python 3.5 and want to find the matched words from a file. The word I am giving is awesome and the very first word in the .txt file is also awesome. Then why addedWord is not equal to word? Can some one give me the reason?  myWords.txt  awesome shiny awesome clumsy   Code for matching  addedWord = "awesome"         with open("myWords.txt" , 'r') as openfile:                 for word in openfile:                     if addedWord is word:                         print ("Match")   I also tried as :   d = word.replace("\n", "").rstrip()  a = addedWord.replace("\n", "").rstrip()       if a is d:           print ("Matched :" +word)   I also tried to get the class of variables by typeOf(addedWord) and typeOf(word) Both are from 'str' class but are not equal. Is any wrong here?


Question about Stone-Čech compactification

Assume $R=(\mathcal{U}_n)_n$ is a sequence of distinct ultrafilters on some set $X$. Since every Hausdorff space has an infinite discrete subspace, there is a subsequence $R=(\mathcal{V}_n)_n$ of $R=(\mathcal{U}_n)_n$ such that $\{\mathcal{V}_n|n \in \mathbb{N} \}$ is a discrete subspace of $\beta X$. In particular, there is a sequence $(A_n)_n$ of sets with $A_n \in \mathcal{V}_m$ if and only if $m =n$. If we let $B_n=A_n - (A_0 \cup...\cup A_{n−1})$, then the sequence $(B_n)_n$ is pairwise disjoint and $B_n \in \mathcal{V}_m$  iff $m=n$. If we let $B =\cup_n B_{2n}$, then $B \in \mathcal{V}_m$ if and only if $m$ is even. In other words, if $B =\{ \mathcal{V} \in βX|B \in \mathcal{V}\}$, then $B$ is a clopen set with $\mathcal{V}_m \in B$ iff $m$ is even. Therefore, we conclude that the sequence $(\mathcal{V}_m)_m$ cannot converge to any point, so the sequence $(\mathcal{U}_n)_n$ cannot converge to any point either.     I would like to know that:      (1) Why "$B_n \in \mathcal{V}_m$  iff $m=n$"? And " $B =\cup_n B_{2n}$, then $B \in \mathcal{V}_m$ if and only if $m$ is even "?      (2)$B$ is a clopen set with $\mathcal{V}_m \in B$ iff $m$ is even


IOS 9.2: My "General> Profiles and Device management" is gone?

I have looked and looked and I can't find a solution. I need to get to the profiles and device management section on my ipad 3 but it is not under general. I tried searching for it in settings and it shows up as an option. I tap on it and it just opens General, where there is no option for profiles and device management. Please help, I already tried restarting the device.  How can I find it?


Smooth movement in point-to-move 2d game based on velocity

I have a real-time point-to-move 2D game with one playable character to control. I want to create smooth player movement using physics and appropriate velocity. Basic setup:  The player has a maximum speed The player has appropriate acceleration and deceleration parameters  How I achieving the required behavior right now: // float currentVelocity = 0 // const float acceleratePerSecond = 35 // const float deceleratePerSecond = 35  // ...  Vector2 positionToMoveTo = pointToMove.position; Vector2 playerPosition = playerRigidbody.position; Vector2 point = positionToMoveTo - playerPosition;  if (point.magnitude > 1) // If player is far enough {     if (point.magnitude >= currentVelocity) // Hack for smooth slow down     {         currentVelocity += acceleratePerSecond * Time.fixedDeltaTime; // Accelerate a little     }     else     {         currentVelocity -= deceleratePerSecond * Time.fixedDeltaTime; // Decelerate a little     } } else // If player is close enough - stop movement {     currentVelocity = 0;     pointToMove.isActive = false; }  currentVelocity = Mathf.Clamp(currentVelocity, 0, playerService.MaxSpeed); // Clamping to fix max speed playerRigidbody.velocity = currentVelocity * point.normalized;  This code is working but it is really hacked on the second if statement. Closer to end point player starts shaking, when the current velocity increasing in the first frame and decreasing in the next frame many times. So the question is: How can I achieve the required smooth point-to-move movement using velocity vector? Why I need to use velocity and can't use plain MovePosition of Rigidbody2D? That's because I rotate a player based on that velocity. It is bad to rotate a player based on pointToMove position because the real front of the player is the current velocity vector. Some test briefs:  If object is far enough:     acceleration        max speed        deceleration |-----------------o-----------------o-----------------|                  _____________________         ________/                     \________  ______/                                       \_______ /                                                      \   If object is closer:      acceleration      deceleration |-----------------o-----------------|                ______         ______/      \_______  ______/                     \______ /                                   \  Appreciate any help. Thank you.


What does "Package  has no installation candidate" mean?

What does the above Error mean? What is an installation candidate?  I was trying to do  sudo apt-get install munin-memcached     and I get this message:  Reading package lists... Done Building dependency tree        Reading state information... Done Package munin-memcached is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package munin-memcached has no installation candidate   I googled for the problem and someone said to do a apt-get upgrade but it still did not solve my problem.


The intersection of $k$ subtrees of a tree $T$ is nonempty.

Let $T_1$, $T_2$, . . . , $T_k$ be subtrees of a tree such that any two of them have a vertex in common. Prove that they all have a vertex in common.  Any hints/solutions are greatly appreciated. I am lost.


When the Battle of the Five Armies begins, and Dáin arrives with an army of dwarfs to do battle, we see Azog has been using giant wyrms, which he refers to as "earth eaters" earlier in the film, to come up behind/beside the battlefield to flank everyone.  My question is, why didn't Azog simply use the wyrms to battle the various military forces?, or of the objective was to obtain the gold, just go straight to it. Those things were positively huge, and could have simply devoured everyone on the field quite quickly. But no, he uses them to burrow through the side area of the mountain range to push his forces through in a flank position, and then does absolutely nothing else with the wyrms the entire battle.


I write application for studies, i am not experienced with c/c++. I have problem with call callback function, when I try call callback function i have an error  invalid use of non-static member function      if(pcap_loop(handle, 1, got_packet, NULL)<0){  Here is my callback function:  void got_packet(u_char *args, const struct pcap_pkthdr *header, const u_char *packet)     {         static int count = 1;             fprintf(stdout,"%d, ",count);             if(count == 4)                 fprintf(stdout,"Come on baby sayyy you love me!!! ");             if(count == 7)                 fprintf(stdout,"Tiiimmmeesss!! ");             fflush(stdout);             count++;     }   this is how I call this function      int CapThread::capture() {      char *dev, errbuf[PCAP_ERRBUF_SIZE];      dev = pcap_lookupdev(errbuf);      QString filter_expression = "udp and ip dst host "+ui->ip_addr->text();     QByteArray byte_array =filter_expression.toUtf8();      const char *filter_exp = byte_array.data();      struct bpf_program fp;       bpf_u_int32 mask;            bpf_u_int32 net;        /* The IP of our sniffing device */     struct pcap_pkthdr header;       struct ether_header *eptr;       struct udphdr *udp_header;       const u_char *packet;        struct ip *ip;     struct rtp_header *rtp_header;       u_char *ptr;      if (pcap_lookupnet(dev, &net, &mask, errbuf) == -1) {         fprintf(stderr, "Couldn't get netmask for device %s: %s\n", dev, errbuf);         net = 0;         mask = 0;         return(1);     }      pcap_t *handle;     handle = pcap_open_live(dev, BUFSIZ, 1, 1000, errbuf);     if (handle == NULL) {         fprintf(stderr, "Couldn't open device %s: %s\n", dev, errbuf);         return(2);     }      if (pcap_compile(handle, &fp, filter_exp, 0, net) == -1) {         fprintf(stderr, "Couldn't parse filter %s: %s\n", filter_exp, pcap_geterr(handle));         return(3);     }     if (pcap_setfilter(handle, &fp) == -1) {         fprintf(stderr, "Couldn't install filtecho deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.lister %s: %s\n", filter_exp, pcap_geterr(handle));         return(4);     } //    packet = pcap_next(handle, &header); //    pcap_loop(handle,5,got_packet,NULL);     if(pcap_loop(handle, 6, got_packet, NULL)<0){         qDebug()<<"got packet";     }      pcap_close(handle);     return 0; }   this is how my header file look like:      #ifndef CAPTHREAD_H #define CAPTHREAD_H #include <pcap.h> #include <netinet/ether.h>  //plik nagłówkowy umożliwiający przekonwertowanie danych z nagłówka na kod ASCII #include <netinet/ip.h>     //plik zawierający struktury nagłówka IP i umożliwiający przekonwertowanie danych z nagłówka na kod ASCII #include <net/ethernet.h> #include <netinet/udp.h> #include <arpa/inet.h> #include <QDebug> #include <iostream> #include <stdio.h> #include "ui_mainwindow.h"  class CapThread { public:     CapThread();     CapThread(Ui::MainWindow *ui);     ~CapThread();     void got_packet(u_char *args, const pcap_pkthdr *header, const u_char *packet);     int capture(); private:     struct rtp;     Ui::MainWindow *ui;     char *dev, errbuf;     pcap_t *handle;     char filter_exp[];     struct bpf_program fp;     struct ether_header *eptr;     bpf_u_int32 mask;     bpf_u_int32 net; };   #endif // CAPTHREAD_H   actually i am out of ideas, can someone help me?


Why have parasites not evolved to be harmless?

I have yet to understand why so many viruses or bacteria haven't evolved to be harmless (specifically, I don't know of any harmless virus). I think it would be greatly beneficial for a virus to control his population and use natural transfer channels that dont cause discomfort(like feces), since it would be allowed to stay in an organism indefinitely and would have a lifetime channel for transmission, hopefully getting to be the most common strain.  So, why have viruses not evolved to be harmless to their hosts?


The question I am working on is, "Consider the following. (a) Find the angular speed of Earth's rotation about its axis. rad/s (b) How does this rotation affect the shape of Earth?"  I am fully capable of solving part (a); however, I am not sure how to describe the effect earth's rotation on its shape. I tried to search my textbook for the answer, but could not find anything. Is there an actual effect on the shape?


Looking for Space Exploration Book which is collection of different sub-stories

The Book is about an earthship exploring the frontiers that I read as a kid (80's). All the stories are told by the same character but different encounters and events.    The first story is about the crew exploring the planet in a number of separate ships when one of them is taken over by a telepathic alien. As the ship returns however the surprise is sprung on the alien that the Mother ship is Computer controlled. Another is the ship shrinking and then finding after its shrunk beyond the atom that it comes back in as gigantic compared to the Universe in a closed loop.   Hopefully that's enough to trigger a memory.


Bipartite graph. average degree. Euler circuit.

This is such a hard question to get my head around. Can anyone help solve this?


How to make Dash recognise an AppImage as a runnable program?

I downloaded an AppImage and set it's permissions to execute. When I start typing it's name in Dash and click on it, the containing folder is opened rather than the AppImage is run.  How can I make it behave the same way it works for applications installed with snap? PS: I am not sure it is called Dash in the latest Ubuntu releases, what I mean is the global search menu which opens when pressing the Win key. Feel free to correct me and I will edit the question.


Rapid calculation for rolling two fair dice with different numbers of faces to get a sum over X

There are many variations of this problem but for concreteness I'll stick to one.  I roll a 6 sided die and a 4 sided die, what is the probability the sum is over six?  Very trivially I could make a table with all the outcomes and count 14 out of 24 cases.  However I may be asked this question during an interview, and constructing a table might take a while and is prone to errors. Is there a trick to this problem that I'm missing? Or in other words is there a way to solve this problem that's simpler than constructing a table of outcome?  ===Edit=== Distribution methods are nice, but for in an interview this solution might be too cumbersome


Can I render an Eevee scene like a classic Cycles scene (from the camera, without lamps and all that stuff) ?  If not, can I just hide lamps in the Eevee viewport ?  I'm asking this because I made a scene that my graphic card just can't handle, while it works really fine with Eeevee.  Thanks !


Why is the friction static while driving a car (at constant speed) on a horizontal circular road? Please explain in details.


Clarifying question on meaning of derivative of a linear transformation

In my analysis class, my professor (and the textbook) reference the fact that $\mathbf{D}T(\bar{x}) = T$ for any $\bar{x} \in \mathbb{R}^n$ where $T \in \mathcal{L}(\mathbb{R}^n,\mathbb{R}^n) $. I'm wondering about the precise meaning of this statement. Is it that the differential of any linear transformation is also linear? Or is that the differential of any linear transformation is itself (and therefore also linear)? The second seems confusing to me because the derivative of a function is often not itself. For example, $f(x) = 2x$ is a linear transformation but $f'(x) = 2 \ne 2x$ for all $x \in \mathbb{R}$.


Data file 'main.bib' cannot be read in encoding 'utf8': Wide character at C:\Users\...\inc\lib/Win32/Unicode/File.pm line 163

I am trying to write a PhD thesis in TexStudio backended with biber & biblatex. I've been using JabRef to handle the bib file until several days ago. However decided to switch to Mendeley, but parsing a lot of PDFs often with hopeless metadata entries (as Mendeley struggled to cross reference them online) seems to have created some non-UTF8 encoded strings in my new bib file and now upon passing through biber during TexStudio build I am getting the following error: INFO - This is Biber 2.15 (beta) INFO - Logfile is 'Thesis.blg' INFO - Reading 'Thesis.bcf' INFO - Found 26 citekeys in bib section 0 INFO - Processing section 0 INFO - Looking for bibtex format file 'Bib/Mendeley/libraryjab.bib' for section 0 ERROR - Data file 'Bib/Mendeley/libraryjab.bib' cannot be read in encoding 'utf8': Wide character at C:\Users\user\AppData\Local\Temp\par-776f6c6665\cache-b32225defac3568d1e921af5a7245ca571b236aa\inc\lib/Win32/Unicode/File.pm line 163.  INFO - ERRORS: 1  I have checked the file, it is almost definitely UTF8 encoded itself (exported file has a comment line at the top confirming it), I tried saving it again as suggested , which hasn't helped. I checked the preamble and the \usepackage[utf8]{inputenc}  \usepackage     [backend=biber,     bibencoding=utf8]{biblatex}  are definitely there. I ran the JabRef entry clean-up tool to convert all text fields to Unicode. No dice. I even tried to use the older version of the bib file pre-dating switch to Mendeley - which DOES work fine with my .tex file, so the problem is most certainly with one/some of the new entries. I also tried removing all of the files generated by the Build and Building again. Same problems persist. I have tried to manually prune whatever erroneous entries I could find, but I continue to get the error. Is there a way I could to find and remove the wide characters causing the problem in my .bib file? There are hundreds of references so I'd rather avoid continuing to investigate them manually.


Updating the value of null String in JAVA?

Hi Have a java class with two methods as below.  public class HelloWorld {     public static  void main(String[] args)     {         String a=null;         returnOriginalString(a);         System.out.println(a);         a="Hello";         System.out.println(a);     }      private static void returnOriginalString(String a)     {         a="Hello World";     }   }   when i print the above message i still get String a as null even after changing the string in second method.And one more thing if i update the string in same method it returns the correct value.How can i update the value of a without using any String methods.?


Restore permission default of /usr folder

I ran a stupid command: sudo chown -R ngoclb:ngoclb /usr. Then I couldn't use sudo command and login to Ubuntu. To fix this issue, I using recovery mode to chown /usr to root (sudo chown -R root:root /usr) and can logged in to Ubuntu, but now, the GUI of Ubuntu is not like default (it's same like Windows classic for some component: scrollbar, menu...) and I cannot access to System Settings/User Account. How can i fix this ?


What are the rules governing display names and avatars?

The discussion in  led me to think of a real question. What display names and avatars are off-limits on the Stack Exchange network?  I think I remember seeing a fake Jeff Atwood in the past on Meta, and a fake Jon Skeet on SO. If I recall correctly, the former had to change his name and the latter got banned.  Is a fake Barack Obama okay? What about Steve Jobs? James Gosling? What if a user's legal name is William Gates, but he's not "that" Bill Gates? Does the choice of avatar make a difference?  Tangentially related:


Output Output of command to command line directly, NOT variable

I am on the bash shell and I want the output of a command to appear directly in the command prompt that appears after the command has executed !  Example of what I envision it, to illustrate my idea:  locate create_tables.sql|MAGIC_command user@localhost:~# /usr/share/doc/phpmyadmin/create_tables.sql   Now, using comman dsubstitution like this  sudo $(locate create-tables.sql)   works but  immediately executes the output, I'd like to be able to edit it before. Is there a way?


Adding hyphen in ArcGIS Field Calculator to merge two columns?

I am trying to build a field calculator expression to merge two columns into one. I am looking for the word that makes it a range.   Example:  I have 2 columns in elevation, From and To. I want to make them like "4100 - 4200" where I add the hyphen. How do I do that ?


Package BibLaTeX error: incompatible package 'ucs' \begin{document}

I'm having the following code and I'm trying to compile my pdf. But I'm getting an error that says: Package biblatex Error: incompatible package 'ucs' \begin{document} .. my pdf compiles for some reason but the bibliography never appears...  why ?   \documentclass[a4paper,12pt]{book} \setcounter{tocdepth}{3} \setcounter{secnumdepth}{3} \usepackage[greek, english]{babel} \usepackage[utf8x]{inputenc} \usepackage{amsmath} \usepackage{graphicx} \usepackage{biblatex} \usepackage{tabularx} \usepackage[a4paper, inner=1.5cm, outer=3cm, top=2cm, bottom=3cm, bindingoffset=1cm]{geometry} \usepackage[onehalfspacing]{setspace} \bibliography{ref}   \begin{document}  \bibliographystyle{alpha} \bibliography{ref}  \printbibliography  \end{document}


Center of Lie algebra and Lie algebra of center

I am learning some Lie group and I met the following problem:  Let $G$ be a Lie group and $Z$ its center. Then $Z$ is also a Lie group. Let $\mathfrak{g}$ be the Lie algebra of $G$ and $\mathfrak{z}$ be the center of $\mathfrak{g}$. Is the Lie algebra of $Z$ equal to $\mathfrak{z}$?  It seems that this correspondence is natural, yet I cannot find any source containing this. Could anyone suggest a (sketch of) proof, or give a counter example?  Thank you very much!


How to get disk usage ,availability and total capacity?

How can I get hard disk capacity, usage, etc. using the /proc or /sys filesystems?


How can this sum $\sum_{k=0}^a \binom{n}{k}$ be simplified?

I failed to simplify this expression on my exams, not sure if it was even needed, but i wonder if it is possible to simplify $$\sum_{k=0}^{299} \binom{1000}{k}$$ by using $\binom{n}{k}=\binom{n}{n-k}$ and $\sum_{k=0}^n \binom{n}{k}=2^n$, etc.


What are the detailed steps involved in the emissions of a photon, for example, when an electron drops to a lower energy level?  How well do we understand the production of the photon in this example?  Any good reference material I can study?


Is the Higgs boson an elementary particle? If so, why does it decay?

The  is an excitation of the Higgs field and is very massive and short lived. It also interacts with the Higgs field and thus is able to experience mass.   Why does it decay if it is supposed to be an elementary particle according to the standard model?


Setting camera to position where it can render a seamless repetable orthographic scene

I'm using 3d to speed up production of 2d graphics of machines and structures (which have a lot of straight lines, objects and little details repeated all over the place).  The goal is to have an isometric background image that repeats seamless. I set the camera with orthographic projection and 45° of rotation.    And manually cut the vertical borders in an image editor in the position where it repeats. Then I can do something like this:    Instead of cutting it manually every time I do a test, I would like to set the camera view position and height from Blender. Then I can render an already seamless repeated image.  Those two Empty objects in the boundaries are where the camera borders should be. However I have no clue how to accurately set up the camera in this case. How can I do this?


this is my simplified code:  Text ... \ref{table:x} and \ref{table:y}.  \begin{table}[!h] \begin{tabular}{lcc}      \toprule     AAA & BBB & CCC\\     \midrule     DDD & \( 1 \) & \( A \) \\     EEE & \( 2 \) & \( B \) \\     FFF & \( 3 \) & \( C \) \\     HHH & \( 4 \) & \( D \) \\     \bottomrule \end{tabular} \label{table:x} \caption{something about table x} \end{table}  \begin{table}[!h] \begin{tabular}{lcc}      \toprule     AAA & BBB & CCC\\     \midrule     DDD & \( 1 \) & \( A \) \\     EEE & \( 2 \) & \( B \) \\     FFF & \( 3 \) & \( C \) \\     HHH & \( 4 \) & \( D \) \\     \bottomrule \end{tabular} \label{table:y} \caption{something about table y} \end{table}      My problem is related to the fact that when i compile on my .pdf i get this as result:  Text...?? and ??.  How can i solve this? It seems like \ref is not working. I think that i am doing something wrong with \label but i can't understand what. Thank you for your help


Subspace of topological space has lower dimension

The dimension of a topological space $X$ is defined to be the length of the maximal chain of closed irreducible subsets $\varnothing \neq X_0 \subsetneq X_1 \subsetneq ... \subsetneq X_n \subset X$.   Let $A$ be a subset of topological space $X$, how can I show that dim$A$ $\leq$ dim$X$?  I can show that given a chain of closed irreducible subsets of $A$, $A \cap X_0 \subsetneq ... \subsetneq A \cap X_n$, where $X_0,...,X_n$ are closed subsets of X, we can get a chain of closed subsets $X_0 \cap... \cap X_n \subsetneq ... \subsetneq X_{n-1} \cap X_n \subsetneq X_n$ of $X$ of the same length, but I am having trouble showing the subsets are irreducible. Any help is appreciated!


$x,y$ and $z$ are consecutive integers, $\frac {1}{x}+\frac {1}{y}+\frac {1}{z}$...

$x,y$ and $z$ are consecutive integers, such that $\frac {1}{x}+ \frac {1}{y}+ \frac {1}{z} \gt \frac {1}{45} $, what is the biggest value of $x+y+z$ ?.  I assumed that $x$ was the smallest number so that I could express the other numbers as $x+1$ and $x+2$ and in the end I got to a cubic function but I didn't know how to find its roots. I probably didn't do anything important so I'd appreciate if you give me any hints or help. Thanks in advance.  I have thought about using the AM-HM.


Can you please help me understand to which noun do it [pronoun] refers to in the below sentences?     He is the murderer. Later it was found he is not.   The it in the second sentence: " Later it...", what does it refers to?


Gmail mail is handled by 10 your-dns-needs-immediate-attention.gmail

I am running my own DNS server using bind, and I have only just noticed the output of host -t mx gmail on any system using my DNS server:  gmail mail is handled by 10 your-dns-needs-immediate-attention.gmail.   Looking at , it looks like this message means name collisions, however everything in my DNS server seems to be working fine. Also, my domain is home.lan so I don't see how there could be name collisions.  Is this something I should be concerned of?  Update: Note that my lookups do not resolve to 127.0.53.53 like in , so I am not sure whether this is really a duplicate. In my environment, resolutions work just fine.


I have to draw a table where I need to color the cells brown and the borders with red. After reading a few similar questions, I have figured out how to properly color the cells and have resolved some issued with my pdf viewer. But I have not found a way to change the borders from black to red. Please suggest a way to do this. Thank you. Edit: Adding the packages I have used. For writing my document I saw a YouTube video and just copied all the packages they had used: \usepackage[latin1]{inputenc}   \usepackage{amsmath}   \usepackage{amsfonts}    \usepackage{amssymb}   \usepackage{graphicx}   \usepackage[table]{xcolor}   \usepackage{array}   \usepackage{multirow}


What is the proper use of \@ (i.e., backslash-at)?

In , \@ is used after a period and before an \xspace, presumably to indicate that the preceding period (in "etc.") was not sentence-final.  In , \@ is used before a period and after capital letters, to indicate that the preceding capital letters are sentence final.  Since \@ is rather difficult to search for online, I thought I'd try to ask here: what exactly does \@ do, and how do you use it properly/consistently?  For instance, how should you input the following farcical sentence?     Languages like JS, HTML, etc. were not used by King Henry III.   EDIT: I'm accepting Barbara's answer below as it (and the comments on it) indicate the initial intent of \@: "the period which follows is sentence-final".  Its counterpart is \  (slash-space), which says "the period which precedes is sentence-medial".  Egreg's answer explains in far more detail exactly how \@ and \spacefactor work to cause the effects seen by \@ and \  after lower- and upper-case letters and punctuation.  Both are very helpful answers.  Two correct answers to my made-up sentence above is  Languages like JS, HTML, etc.\ were not used by King Henry III\@. Languages like JS, HTML, etc.\@ were not used by King Henry III\@.   The former is arguably "better style", while the latter demonstrably produces the correct result even if it seems less consistent about placement of \@ versus periods.  And a safe but slightly redundant answer blindly adds \@ before every comma:   Languages like JS\@, HTML\@, etc.\ were not used by King Henry III\@.   This last one is amenable to macro-izing: \def\acronym#1{\textbf{#1}\@\xspace} (or whatever style you'd prefer), where the \xspace disappears if the next character is punctuation, and the \@ ensures that subsequent punctuation thinks it follows a lowercase word and not an uppercase initial.


Cannot retrieve data from firebase using dataSnapshot

My Firebase database looks like above  I'm trying to retrieve the value of 'a' for 'alind' and similarly for another child node 'kartik' I'm using Android Studio. but i receive this error-  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference         at com.example.minorproject.facultyfreeslots.matchslots(facultyfreeslots.java:119)         at com.example.minorproject.facultyfreeslots$1.onClick(facultyfreeslots.java:48)         at android.view.View.performClick(View.java:6614)   I've tried setting different paths to access this using Datasnapshot.  protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_facultyfreeslots);         t1=findViewById(R.id.textView50);         name=findViewById(R.id.editText4);         name2=findViewById(R.id.editText5);         b1=findViewById(R.id.button9);         day=findViewById(R.id.spinner18);         time=findViewById(R.id.spinner19);         FirebaseApp.initializeApp(this);         d1= FirebaseDatabase.getInstance().getReference("teacher");         b1.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 matchslots();             }         });     }   void matchslots()     {  // getdata();         name11=name.getText().toString();         name12=name.getText().toString();         daystring=day.getSelectedItem().toString().trim();         timestring=time.getSelectedItem().toString().trim();         d1.addValueEventListener(new ValueEventListener() {             @Override             public void onDataChange(@NonNull DataSnapshot dataSnapshot) {                 dvalue1=dataSnapshot.child(name11).child(daystring).child(timestring1).getValue().toString().trim();                 dvalue2=dataSnapshot.child(name12).child(daystring).child(timestring1).getValue().toString().trim();             }             @Override             public void onCancelled(@NonNull DatabaseError databaseError) {                 Log.d(TAG, "Failed to read value.");             }         });  //line119-    if(dvalue1.equals("no class"))         {             a=0;         }          else {             a=1;         }         if(dvalue2.equals("no class"))         {             b=0;         }         else         {             b=1;  I want to get the value of a or b or c. nam11=alind or any othername, daystring="monday"/"tuesday" etc timestring="a"/"b"/"c" etc


Annoying JDBC - MySQL error " FATAL EXCEPTION in createStatment call", How to solve this?

When I run the emulator, it woks perfectly with no errors, but when I press the Login button, I get error "java.lang.NullPointerException: Attempt to invoke interface method".  This is my code:  public class MainActivity extends ActionBarActivity {      Button add;     TextView errorlbl;     EditText name, address, pincode;     Connection connect;     PreparedStatement preparedStatement;     Statement st;     String ipaddress, db, username, password;      @SuppressLint("NewApi")     private Connection ConnectionHelper(String user, String password,                                         String database, String server) {         StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()                 .permitAll().build();         StrictMode.setThreadPolicy(policy);         Connection connection = null;         String ConnectionURL = null;         try {             Class.forName("net.sourceforge.jtds.jdbc.Driver");             ConnectionURL = "jdbc:jtds:sqlserver://" + server + ";"                     + "databaseName=" + database + ";user=" + user                     + ";password=" + password + ";";             connection = DriverManager.getConnection(ConnectionURL);         } catch (SQLException se) {             Log.e("ERRO", se.getMessage());         } catch (ClassNotFoundException e) {             Log.e("ERRO", e.getMessage());         } catch (Exception e) {             Log.e("ERRO", e.getMessage());         }         return connection;     }      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          add = (Button) findViewById(R.id.btnadd);          errorlbl = (TextView) findViewById(R.id.lblerror);          name = (EditText) findViewById(R.id.txtname);         address = (EditText) findViewById(R.id.txtaddress);         pincode = (EditText) findViewById(R.id.txtpincode);          ipaddress = "92.244.93.250:3306";         db = "lokal";         username = "lokal";         password = "12lokal34";         connect = ConnectionHelper(username, password, db, ipaddress);         add.setOnClickListener(new View.OnClickListener() {              @Override             public void onClick(View v) {                 try {                     st = connect.createStatement();                      preparedStatement = connect                             .prepareStatement("insert into studentRecord(Name,Address,Pincode) values ('"                                     + name.getText().toString()                                     + "','"                                     + address.getText().toString()                                     + "','"                                     + pincode.getText().toString() + "')");                     preparedStatement.executeUpdate();                     errorlbl.setText("Data Added successfully");                 } catch (SQLException e) {                     errorlbl.setText(e.getMessage().toString());                 }              }         });      } }   Logcat error says:       2182-2182/app.mysqlapp E/AndroidRuntime﹕ FATAL EXCEPTION: main       Process: app.mysqlapp, PID: 2182       java.lang.NullPointerException: Attempt to invoke interface method 'java.sql.Statement java.sql.Connection.createStatement()' on a null object reference


In GR, why should the spacetime manifold be differentiable?

In general relativity (GR), spacetime is viewed as a differentiable manifold of dimension $D$ with a metric of Lorentzian signature $(-,+,+,...,+)$.  My question is why differentiable?


What is the difference between the results of the following two SQL queries?

SELECT r.region_name as Region,        COUNT(o.*) AS CanCount FROM region AS r INNER JOIN orders AS o ON o.region_id = r.region_id WHERE r.region_id = 1     SELECT [Region] = r.region_name      , [CanCount] = COUNT(o.*) FROM region AS r INNER JOIN orders AS o ON o.region_id = r.region_id                       AND r.region_id = 1


Use constructor overload from within class constructor

As the title hints at, I am wondering if I am able to use functionality in a class's constructor from another constructor (overload) of the same class in Java.  Hopefully this code demonstrates what I'm trying to achieve (ignore the fact that children gets overwritten, bad example in this case):  class Node {     int[] value;     ArrayList<Node> children;      Node ()     {         this.children = new ArrayList<>();     }      Node (int[] value)     {         this.value = value;         Node();     }      Node (int[] value, Node[] children)     {         this.children = new ArrayList<Node>(Arrays.asList(children));         Node(value);     } }


I've such a file:  name: xxx --- time: 5.4 seconds name: yyy --- time: 3.2 seconds name: zzz --- time: 6.4 seconds ...   Now I want to sort this file by these float numbers to generate a new file as below:  name: yyy --- time: 3.2 seconds name: xxx --- time: 5.4 seconds name: zzz --- time: 6.4 seconds ...   I've tried the command awk '{print $5}' myfile | sort -g but this will show me ONLY the float numbers.