This is very strange. I have this snippet of code that is being executed in android:  private int doStuff(String assignment, List<String> assignments) {     int iterations = 0;     for (int i = 0; i < assignments.size(); i++) {         iterations++;         if (assignments.get(i) != assignment) {             return i;         }     }     Log.d(TAG,String.valueOf("Iterated "+ iterations +" over list with size "+assignments.size()));     return 0; }   Nothing comes out from the logging. I have here a link to a video where I am debugging though the steps. The size of the list is 3 but it stops after 1 iteration. I have run clean. I have run adb uninstall. I have restarted the computer. I don't get it, why does this stop looping in the first iteration?  Note: I reach the last line of the method. I never reach "return i;". Even if string comparison is bad then it shouldn't reach the last row of the method in the way it does on the video.


Biggest champion possible in league of legends?

Who can become the largest champion in league of legends when affected by abilities or other effects?  Examples of Large Champions:   Chow-gath with mulitple stacks Zac with high health Hecarim   I know that Lulu's Ult  makes a champion even bigger, are there any other effects that can cause champion model growth?


From :  Leicester City Football Club, whose entire squad cost less than a single player at some of its better-known rivals, have won the English Premier League. Leicester were 5000-1 outsiders to win at the start of the season, meaning bookmakers considered it more likely that Elvis Presley would be found alive.  Don't understand why "5000-1 outsiders" instead of "5000-1 outsider".


Can I charge USB devices from a powered hub that isn't connected to a PC?

This will probably sound familiar to most of you... In my home, we have a whole bunch of devices that can be charged via USB (two iPhones, a BlackBerry, an iPod Touch, etc ad nauseam). We also have a bunch of USB chargers, each of which has a single USB port on it. I'd like to have something permanently connected to AC power with at least 4 USB ports on it, so we can just plug devices in and don't need to go looking for a free outlet.  So here's the question: if I buy a powered USB hub, will that do the job even if I don't connect it to a PC? Ideally if you have a hub that you can personally verify will be suitable, let me know the manufacturer and model :-)  Thanks in advance!  EDIT: The solution I eventually went for was this:    There's also a US version here:    It arrived yesterday, so I used it to charge the following devices, all at the same time, overnight last night:   32GB iPhone 3GS 16GB iPhone 3G First-generation iPod Touch    I can't say anything about the charging speed (as I left it overnight) but all devices were fully charged this morning.


Saving hyperref when inserting pdf in LaTeX

I am trying to insert a pdf document in LaTeX using \includepdf[pages={1}]{myfile.pdf}  But the inserted .pdf loses all its hyperreferences. Is there a way to retain hyperrefs while doing so?  myfile.tex  \begin{document} \tableofcontents \chapter{a} \section{a} \chapter{b} \section{b} \end{document}   Now when generated, myfile.pdf has clickable links to chapters and sections  maindoc.tex  \begin{document} \tableofcontents  \chapter{abc} \includepdf[pages={-}]{myfile.pdf}  \end{document}   But when included as .pdf, the links are lost.


I have visible layers and hidden layers; I am looking for a way "shortcut" that will make the hide the visible layers and reveal the hidden ones. Anybody know how?


How can I get extra subtitles for chapter titles that also appear in the ToC?

I have several chapter titles that I would like to combine with subtitles, typeset in italics.  For example,      Chapter Title      A very fine chapter indeed …   Now, I found an approach on how to do this , introducing a new \Chapter command, which now looks like this:  \newcommand\Chapter[2]{   \chapter[#1: {\itshape#2}]{#1\\[2ex]\Large\itshape#2} }   This somewhat works (although it breaks TextMate's auto-recognition of chapters), but I would like these subtitles to also be visible in the Table of Contents.  Like so:     Chapter Title                                                                                1      A very fine chapter indeed …   Is there any way to achieve that? Note that my LaTeX fu is pretty limited, so I'm not sure where to even start.


The review section is awesome. People at all levels are participating and improving their sites. This I believe is because it's so easy to use. Please add a delete tab to the review system so that 10k/20k users can easily find and deal with posts that have delete votes on them in a similar manner to the close tab.


What speed does our cosmic system travel, relevant to a none moving system

assuming a none moving system exist, can a point of reference be made to determine the relevant momentum we share with our star and our galaxy.   like the ligo experiment that detected gravitational waves, using two laser spread 4 kilometers long. a point of reference was made to determine the difference between our cosmic system and a ripple in peacetime. so an advance form of my question is.  could ligo instruments be used to determine a none moving system to our cosmic speed?


Is it equally correct to state of square root of i is plus or minus -1 to the power 1/4?

I understand that the two square roots of $i$ are  $$\pm {1 \over \sqrt{2}} (1+i)$$  But when asked what is the square root of $i$, is it equally correct to give the answer as  $$\pm {(-1) ^ {1/4}}$$  ? And actually, since $\sqrt 2$ is defined to be only the positive root, so square root of $i$ can be just  $${(-1) ^ {1/4}}$$  ?


When using nodal analysis, my book says you will always end up with \$n-1\$ linearly independent equations, where \$n\$ is the number of nodes.  Can someone intuitively explain why this is true? If it's too hard too give intuition, I'll settle for a formal proof.


Can you merge different characters' world views?

I am running my own Terraria server (currently the included one, but also want to test TShock) in my network and play with a friend.  Is there a way to for our characters to see parts of the map that the other has uncovered?  Since we can not always play together, it would be great if the characters could exchange about the parts of the world they visited.  To do this seems quite logical to me. Especially since the member also sees the information provided by the equipment (Compass, Depth Gauge, Lifeform Analyzer...) of nearby team members.  I found map files in the characters sub folder. I guess these contain exactly this information.  As a last resort one could merge this files offline if the format is understood (I am not afraid of binary data and programming ;) but the optimal solution would be server side.


Proof of convergence of alternative minimization/maximization

Given a problem   \begin{equation} \max_{x\in X} \min_{y \in Y}  f(x,y) \end{equation}  where $f$ is strongly convex in $Y$ and strongly concave in $X$  How to show that the following iterative processes will finally converge and how is the speed?  \begin{equation} x_k=\arg\max_{x \in X} f(x,y_{k-1}) \end{equation}  \begin{equation} y_k=\arg\min_{y \in Y} f(x_{k-1},y) \end{equation}  UPDATE 1: The problem is being rewritten in order to distinguish from  which looks similar.  UPDATE 2: The function $f$ is now strongly convex in $Y$ and strongly concave in $X$


Use internal speakers with others plugged into headphones jack

I have a set of surround speakers, connected to my iMac through the headphone jack. I use a switch to control what goes to the speaker set (iMac, iPod, or MacBook/aux). So that I don't have to be constantly unplugging and replugging, I leave the audio cable in the iMac's audio port. This means that when I'm listening to something from another source, I can't hear anything from the iMac unless I unplug the cable.  Is there a way to force sound to come out of the internal speakers, even if there's something in the audio out port?


Do we want long comprehensive answers to questions on stackoverflow?  Is it better to spend 30 secs to write "look this up [insert link here]", or do we want people to take their time (maybe an hour! maybe more!) to write a more comprehensive and detailed answer?  I've seen people make comments like these on highly voted short answers:   "+1; this is why i love stackoverflow! answers are short and to the point!" "+1; beat me to it!" (because it's all about quickness?)   And some of my long answers have been:   Downvoted (Was it too long? All pole and no fish? Was there a minor technical mistake somewhere? Too many quotes from references and/or books and not enough original material? Was the answer not entertaining enough because it's all business and no personality, since I refrain from making jokes, using smilies, or injecting personal opinions/anecdotes?) Commented with "who has the time to read this???" etc Unrewarded with regards to votes   I've only been on stackoverflow for a few months, so I'm still trying to figure out what kind of answers the community wants (as evidenced by their votes), what kind of answers the owners want (as laid out in their vision), and what kind of answers I want (yes, I can have my own vision too!), and how best to reconcile the differences that may exist between them, so any guidance is appreciated.


Okay, so I'm trying to finish task from codewars which says exactly:   "You get an array of arrays. If you sort the arrays by their length, you will see, that their length-values are consecutive. But one array is missing!  You have to write a method, that return the length of the missing array.  Example: [[1, 2], [4, 5, 1, 1], [1], [5, 6, 7, 8, 9]] --> 3  If the array of arrays is null/nil or empty, the method should return 0.  When an array in the array is null or empty, the method should return 0 too! There will always be a missing element and its length will be always between the given arrays. "  I wrote the code like this:  package codewars;  import java.util.ArrayList; import java.util.Collections;  public class CodewarsMissingArrays {  static int wynik = 0;  public static int getLengthOfMissingArray(Object[][] arrayOfArrays)  {         if (arrayOfArrays.length == 0) {         return wynik = 0;     } else {      ArrayList<Integer> lista = new ArrayList<Integer>();      for (int y = 0; y < arrayOfArrays.length; y++) {         if (arrayOfArrays[y].length == 0){             return wynik = 0;         } else {         lista.add(arrayOfArrays[y].length);         }     }      Collections.sort(lista);      for ( int x = lista.size() - 1; x >= 0 ; x--) {         if ( lista.get(x) - lista.get(x - 1) != 1 ) {             wynik = lista.get(x) - 1;             return wynik;         }     }      }      return wynik; } }   And testing class:   package codewars;  public class CodewarsTest {  public static void main(String[] args) {     System.out.println(CodewarsMissingArrays.getLengthOfMissingArray(new Object[][] { new Object[] { 1, 2 }, new Object[] { 4, 5, 1, 1 }, new Object[] { 1 }, new Object[] { 5, 6, 7, 8, 9 }} )); }  }   And locally it works fine, but Kata returns NullPointerException:  java.lang.NullPointerException at Kata.getLengthOfMissingArray(Kata.java:13) at KataTests.BasicTests(KataTests.java:19)   And I have no idea what might be wrong, I assume that it might be something with the arrayOfArrays object, but I have no clue what exactly might be wrong.   Can you help me?


I installed jockey-gtk but how do I run it?

zuber@zuber-pc:~$ sudo apt-get install jockey-gtk   Reading package lists... Done Building dependency tree        Reading state information... Done The following packages were automatically installed and are no longer required:   nvidia-common python-xkit Use 'apt-get autoremove' to remove them. The following NEW packages will be installed:   jockey-gtk 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/3,158 B of archives. After this operation, 53.2 kB of additional disk space will be used. Selecting previously unselected package jockey-gtk. (Reading database ... 156414 files and directories currently installed.) Unpacking jockey-gtk (from .../jockey-gtk_0.9.7-0ubuntu11_all.deb) ... Setting up jockey-gtk (0.9.7-0ubuntu11) ... zuber@zuber-pc:~$ jockey-gtk The program 'jockey-gtk' is currently not installed. You can install it by typing: sudo apt-get install jockey-gtk   And this not only occur with jockey-gtk. I have same problem with synergy(I did not tried with other software). Is it known problem or am I only one? How do I fix it?


I would like some help or guidance to port/install Ubuntu Touch on my phone. So far I have my HW files and the original kernel from Sony for my phone.  I am aware that Ubuntu Touch is based on CM 10-1. Is it possible for me to modify my kernel and CM 9 for my Xperia P with the CM 10-1 files? if so how would I go about that?  Any suggestions?


What's the correct word to refer to a believer of scientism?

Scientism is, roughly speaking, the belief that the only legitimate knowledge is scientific knowledge and all other sources of knowledge - like religion - should be rejected.  If it is still unlcear, here is the relevant Wikipedia link:   Now in my language (Polish) there are two distinct terms: "naukowiec" - which means a scientist (the person who conducts scientific research and who can win a Nobel prize for discovering a vaccine against AIDS) and "scjentysta" - which means a person whose worldview is in accordance to scientism (so "scjentysta" will reject all arguments that are not scientific in nature and will condemn religion).  But, how to say "scjentysta" in English? Since what I want is a believer of scientism, I would say "scientist" BUT - this will cause confusion since not every practicioner of science believes in scientism and not every person whose worldview is in accordance with scientism will have PhD.  So, is my only option still "scientist" or is there any better word?  "A ___ believes that science is the only legitimate source of knowledge."  As opposed to:  "A scientist has won the Nobel prize for discovering a vaccine against AIDS."


Choice between Type-I, Type-II, or Type-III ANOVA

We have a dataset with three variables (dV: self-reported measure on scale 1-5, assumed to be metric; iV1: factor with 4 levels; iV2: factor with 8 levels). We are interested whether the dV differs in regard to both iVs and whether there is an interaction between the iVs.  Idea: Calculating an ANOVA with both main effects and the interaction between both iVs using R.  The question: What Type of Sum of Squares should be used for this research question?  Using aov() in R calculates Type-I Sum of Squares as standard. SPSS and SAS, on the other hand, calculate Type-III Sum of Squares by default. However, using Anova() {car} in combination with options(contrasts=c("contr.sum", "contr.poly")) in R gives the same Type-III ANOVA tables as calculated in SPSS.  I have already read the following discussions:       However, I am still confused which Type of Sums of Squares is the most adequate for our question. The results (F and p values) differ considerably.


Open and Closed Sets in the Euclidean Space R^n

Prove that if $F_1, F_2, ..., F_k$ are closed sets in $R^{n},$ then $\cup_{i = 1}^{k}F_i$ is also a closed set in $\mathbb{R}^{n}.$


I would like to borrow my friends PSP game cartridges but I have a PS Vita.  Are the PSP games compatible with the PS Vita? Will I have to do anything in order to get it to work?


My Area51 account crossed 200 rep today, but still other accounts don't reflect the change in reputation. When will the changes be applied? or is there no association bonus for Area51 account?


Basic question about standard error in predictive model

I am using a nonlinear model of the form y ~ p1 * exp(-p2*A), with the following coefficients:        estimate     se  zval    pval p1     5.5447 4.2592 1.302 0.19298 p2     0.3856 0.0835 4.616 0.00000 tau2   0.0000     NA    NA      NA   I want to use this model to predict the effect size (in %) of a treatment, influenced by the variable A. Let's assume, for example, this is the effectiveness of a cancer treatment at a certain age A. For example, when A= 9, effect size is ~19%:  make_pct <- function(x) (exp(x) - 1) * 100 > make_pct(5.5447 * exp (-0.3856 * 9)) [1] 18.82309   The problem is that now I don't know how to calculate the standard error at e.g. A=9 using this model. I am sure this is very basic but I don't have any experience in this particular matter. Thanks


terminal window disappears after I minimize it

I just installed Ubuntu 12.04. I create a terminal using Ctrl+Alt+T, then I minimize it, and then I cannot find it anymore - not in the launcher, not in Alt+Tab.   How can I return to my minimized terminal?


Show that $A$ is self-adjoint if and only if $(Ax,x)$ is real for all x

Let $A:X\rightarrow X$ be a linear transformation, where $X$ is a finite-dimensional complex inner product space. Show that $A$ is self-adjoint if and only if $(Ax,x)\in\mathbb{R}$ for all $x\in X$.


Why is there no "product()" aggregate function in SQL?

When there are Sum(), min(), max(), avg(), count() functions, can someone help understand why there is no product() built-in function. And what will be the most efficient user-implementation of this aggregate function ?  Thanks, Trinity


If websites store our passwords in md5 hashes, how can they be hacked?

I mean, they say md5 hashes are one-way. Once something is encrypted, it can't be decrypted. I read other questions and people say it is now easy to just match and decrypt using something they call 'rainbow tables'... okay, they can be decrypted, but, if yes, then is there any other way to make the website secure? If all md5s are decryptable, how does FAcebook and Twitter keep their data secure?


What’s a non-vulgar alternative for “covering one’s ***”?

Oxford Dictionaries Online writes in their U.S. section that the phase  is  an informal phrase meaning:     Foresee and avoid the possibility of attack or criticism.         ‘I like to cover my ass when I make big generalizations’      And if you , you’ll notice that they mention how cover one’s ass is specifically a North American expression.  The Wikipedia page for  says:     The phrase cover your ass is generally viewed as a vulgar term, often   replaced by the less-vulgar sounding initials CYA. Safire identified CYA as   a synecdoche, in the same sense that the word “ass” had come to reference   the whole person.   The  states begins:        (Canada, US, idiomatic) To make preparations or take precautions to    ensure that a person is not blamed or punished for his or her conduct.      Collins English Dictionary says in  that:     slang, mainly US and Canadian   to take such action as one considers necessary to avoid censure, ridicule,    etc at a later time   While dictionary-dot-com’s page for  mentions (but only in their example citations, not their definition section): that some call it risk management     To provide or arrange for exculpation; devise excuses and alibis:           Some call it “risk management,” others “covering your ass.”   The FBI may have to let you be destroyed to cover its own ass.   CYA, you know, that old French expression that means making sure    that when historians write about it all it won’t be seen as happening on   your shift.              credited to The Dictionary of American Slang, Fourth Edition      by Barbara Ann Kipfer, PhD. and Robert L. Chapman, Ph.D.;      Copyright (C) 2007 by HarperCollins Publishers.      Risk management is a nice little phrase, but  what other non-vulgar expressions are there that means the same thing as covering one’s ass means, but without being considered vulgar?


How to make my posts invisible to public searches or delete them?

I encountered a problem deleting my own post that contained answers on it. Is there any way I could make my posts with answers invisible to non stackoverflow members at least?


Running SSIS on SQL Server without SSIS installed

This is a follow-up to this question:    I have build an SSIS package on my local machine but when deploying to a server, I get the following error:  "To run SSIS package outside of SQL Server Data Tools you must install Derived Column of Integration Services or higher."    Can an SSIS 2012 package in fact be run on a server that doesn't have SSIS installed?


How To Switch From Ubuntu 16.04 To Lubuntu

Basically, not a techie at all, but trying to be. And I can follow directions well. Have a cheap old Lenovo laptop, and Ubuntu is too slow for me. I have 2GB of RAM and 1.6GHz.  Wanting to switch to Lubuntu, but have no idea how. I don't really know what it technically is called, but someone will ask...I don't insert a USB to boot, I just turn my computer on, and Ubuntu is first in the boot load.  I already installed lubuntu-desktop, but from what I understand, that just installs the desktop environment, but all of the Ubuntu processes that slow down older computers will still be running (and it certainly seems like it's still slow to me).  Are there any videos or step-by-step guides on how exactly to make the switch? I can re-install all of my apps, and re-login to all of my stuff, it's no problem. What might be the best way to do this? Factory reset, possibly? Not sure. Just trying to make the most out of my old laptop, so I can get rid of my MacBook finally.


How to connect capacitors to SIM800C gsm module

I am powering a SIM800C from a 3.7V Li-ion battery. If the battery charge drop below 85% (it still has 4.1V measured without load), the module keeps restarting during startup. This probably happens because of a high load (up to 2A) that causes a voltage drop. According to the SIM800C manual, this could be avoided by using capacitors. I have tried to interpret the reference circuit from Simcom and I use the recommended capacitors but this does not help. Am I connecting the capacitors the right way?  This is the reference circuit from the SIM800C manual:    And this is how I have made the connections:    CA is a 100uF tantalum capacitor and CB is a 10 uF ceramics capacitor.


$ find '/media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/'* -mtime +5 {} \; find: paths must precede expression: `{}'


I have reinstalled Windows 10 Pro 64-Bit with a Windows 10 Pro 64-Bit CD. After the installation, I realized, that there has been Windows 10 Home edition installed.  Since the installation never asked for a product key, I tried to enter it after the setup, updates and so on...   An error message says, that the key is invalid.  How did I installed a Home version with Pro CD? If I have the CD, can I upgrade my version to Pro?. (Reinstalling did not work either.)


Why can I see through a box in blender game engine?

I have a problem where I can see through a box in blender game, see picture. This effect changes so that the near side of the "chassis" of the truck is invisible when I rotate the model    What can I do to not make this happen?


How to customize the Do Not Disturb feature for weekends?

I have the Do Not Disturb feature scheduled to work from Midnight to 7 am.  This works great.    However, on the weekend I like to sleep in and would like the Do Not Disturb feature to go until 9 am.  But I do not see this feature.  It's like all or nothing.  Am I missing something simple?


Can't find a control for size under physics in the particles panel

I'm following Andrew's Blender Guru beginner tutorials, and I'm working on particles right now. The problem is I can't find "size" and "random size" options under physics in the particle panel. I can see it on Andrew's tutorial but I can't find it on my own software.


When approximating a posterior using MCMC, why don't we save the posterior probabilities but use the parameter value frequencies afterwards?

I'm currently estimating parameters of a model defined by several ordinary differential equations (ODEs). I try this with a bayesian approach by approximating the posterior distribution of the parameters given some data using Markov Chain Monte Carlo (MCMC).   A MCMC sampler generates a chain of parameter values where it uses the (unnormalized) posterior probability of a certain parameter value to decide (stochastically) whether it will add that value to the chain or add the previous value again. But, it seems to be the practice that the actual posterior probabilities do not need to be saved, rather is a n-dimensional histogram of the resulting parameter values generated and summary statistics like highest density regions (HDRs) of a parameter posterior ditribution is calculated from this histogram. At least that's what I think i learned from .  My Question: Wouldn't it be more straightforward to save the posterior probabilities of the sampled parameter values along with these and approximate the posterior distribution from these values and not from the frequencies of parameter values in the MCMC chain? The problem of the burn-in phase would not arise as the sampler would initially still sample low probability regions more often than they would "deserve" by their posterior probabilities but it would not be anymore the problem of giving unduly high probability values to these.


I started taking a CV Template which I need to edit. This one:   So It turns that my name is longer than "John Doe". If I go to the editor, main.txt, and find the line 26  % personal data \name{John}{Doe}   and change it to   % personal data \name{John}{Martinez Rodriguez}   You can see that now the name stays like this, in the document:  John Martinez Rodriguez   And I want it to appear like   John  Martinez Rodriguez   Could you help me with this, please?


c programming how to convert system output to char

I was wondering if anyone can help me:  I need to turn the output of the system command : whoami into a variable.  Example:   char *a; a = system("whoami"); printf("username = %s",a);   I have tried a few methods such as printing the commands output to a text file like: whoami >> output.txt and than making the program read from that file, however i am encountering errors through that method. I also consider that method to be a little messy and unnecessary as im positive that there must be a way within C to let me do this.  This question may be a duplicate so please label as necessary(but also answer if capable)  Thanks a lot :)


Will I be able to transform back from a werewolf to a human or do I have to wait?

In Skyrim will I be able to transform from a werewolf to a human whenever I want or do I have to wait a specific time? Please help me.


Among these two characters who has more of a right to the Iron Throne

Jon Snow,      grandson of Aerys Targaryen,   or Daenerys Targaryen, daughter of Aerys Targaryen?  After "The Dragon and the Wolf" (Game of Thrones, S07E07), we learn that      Jon is the legitimate son of Rhaegar Targaryen.    So, how do the factors like:   Sex One being first generation and other being second generation descendant of the their family's last king. Second one's previous marriage   affect these 2 characters' claim to the Iron Throne?


Show if $C$ is a subset of $\mathbb{R}$ which has a supremum $\alpha$, then there is a sequence $(c_n)$ from $C$ which converges to $\alpha$.  So far I have by definition of a supremum, for each $\epsilon$ > 0 there is a c $\in$ C such that $\alpha$ - $\epsilon$ < c. But how do I work this into a sequence?


Yes/No :Is $ \mathbb{Q}( \sqrt[3] 2)$ a normal extension of $\mathbb{Q}?$

Is  $ \mathbb{Q}( \sqrt[3] 2)$ is  a normal extension of $\mathbb{Q}?$ My attempt : I think yes By definition  of normal extension : $L/K$ is a normal extension if and only  if  for every irreducible  polynomial  $f \in K[x]$  with at least  one root in $L$ Now  i take $f(x)=x^3-2$ then $f(x)$ has one root i,e $x^3=2 \implies x=\sqrt[3] 2$ So here we have atleast one root in $\mathbb{Q}$


Cauchy's Principal Value of $\int_{-\infty}^{\infty} \sin(x)/(a-x)dx$

How do I go about finding the principal value of this integral? $$\int_{-\infty}^{\infty}\frac{\sin(x)}{a-x}dx$$  suggested that shifting the integrand by making the change $x \rightarrow x+a$ is one way to simplify to two easier integrals. Can someone help me solve this without changing the integrand like that with a more direct approach (a summary of it will suffice)? Thank you


are the uses of 'bare infinitive' & 'participle' same here?

I saw him sing     I saw him singing    In the first example, the verb sing is used as a bare infinitive and in the following one it is exemplified as a present participle. My question is  if both of them are expressing the same meaning?


I'm designing and printing an image with some text at 450cm x 250cm for a exhibition backdrop. What resolution is needed?

Will a shutterstock image work for this or do I need a better quality image?  This is shutterstock info: Large  |  10297 px x 3433 px  |  87.2cm x 29.1cm @ 300 dpi  Is my calculation correct: DPI will be 34? Is that too low if people will be standing 1m from artwork?


I tried updating my ubuntu today from 12.04 to 13.10 and am now unable to update anything and have what is basically a useless system. Whenever I try to launch update manager I get not all updates can be installed, run a partial upgrade  Cannot upgrade  An upgrade from 'raring' to 'precise' is not supported with this tool.  When I try things from terminal they're no better. When trying apt-get update I get an  W: Failed to fetch gzip:/var/lib/apt/lists/partial/au.archive.ubuntu.com_ubuntu_dists_saucy_multiverse_i18n_Translation-en  Encountered a section with no Package: header  E: Some index files failed to download. They have been ignored, or old ones used instead.  Trying to run apt-get upgrade gives me  You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  libdrm2 : Breaks: libdrm2:i386 (!= 2.4.43-0ubuntu0.2) but 2.4.43-0ubuntu0.0.3 is installed  libdrm2:i386 : Breaks: libdrm2 (!= 2.4.43-0ubuntu0.0.3) but 2.4.43-0ubuntu0.2 is installed E: Unmet dependencies. Try using -f.  and trying apt-get -f install   dpkg: error processing libdrm2:i386 (--configure):  libdrm2:i386 2.4.43-0ubuntu0.0.3 cannot be configured because libdrm2:amd64 is in a different version (2.4.43-0ubuntu0.2) dpkg: error processing libdrm2 (--configure):  libdrm2:amd64 2.4.43-0ubuntu0.2 cannot be configured because libdrm2:i386 is in a different version (2.4.43-0ubuntu0.0.3) No apport report written because MaxReports is reached already                                                               Errors were encountered while processing:  libdrm2:i386  libdrm2


What is the smallest particle? What is the building block of an electron?

I'm curious.   Why when I was 5 years old did I rip things apart in half... Always trying to get another half... is it endless?  I took a leaf and ripped it in half, and kept on going...  God?


What do you call words that are misspelled to add effect?

The most obvious example I can think of is the Mortal Kombat series. They replace almost all hard sounding C's with the letter 'K'. A couple other examples off the top of my head are 'Froot Loops', 'The Beatles', the Red Hot Chili Peppers album 'Blood Sugar Sex Magik'. There's a tonne more. I'm just wondering if there's a proper term for these types of words.


Better way to frame "which is better" and "which is the best" type questions?

Is there a way to frame "which is better" and "which is the best" type questions so that they are not tagged as non-constructive, overly broad, or inviting nothing but opinion?


Suppose $A,B$ abelian groups, such that $A\oplus B\approx A$, can I conclude that $B=0$?   If it's true, is there any hint how to prove it?


Tourist Visa After Student Visa in Schengen Zone

I am an Australian in Spain on a 8 month student visa. I'm wondering if I can apply for the 90 day tourist visa while I'm here. Another option may be to leave to a non-Schengen zone like UK and return to Spain to start the 90 day visa. Any tips would be greatly appreciated!


Below, in the image, there is a math formula which has a pink underline (namely Ann_{f(A)+J}(J)=0). As you see the alignment isn't acceptable (highlighted). Question.  What command can I use to break the formula to have the alignment acceptable? I don't want to use break commands such as \ \ (since the text or format will probably change).


Is the system of connectives $\{\lnot, \leftrightarrow\}$ complete?

If we consider the system$ \{\lnot, \leftrightarrow\}$ can we express all the connectives like $\wedge$, $\vee$ or $\rightarrow$ just by using $\lnot$ and $\leftrightarrow$ ?   Thanks in advance !


Possible Duplicate:             When talking about "one and a half" of any object, do we use the subsequent noun in plural or just singular? I'm aware that "A minute and a half" is also correct but I'm looking for the specific "One and a half"-construction here.   So for example, which of the below phrases is correct?     You're one and a half minutes late!   or     You're one and a half minute late!   Is there any difference when using the phrase as an adjective like so: "One-and-a-half-minute recipe"?


SQL Server - Display the first 12 records for each user


80s or earlier time travel novel: protagonist can time travel in spurts, decides to see the Crucifixion and is picked up by other time travellers

I've been searching for a novel I read about thirty years ago. The main character can time travel in spurts for as long as his breath lasts. He decides to see the Crucifixion but is picked up by a group of other time travellers who use this event as a way of finding others of their kind.  For some reason I've been convinced this book was by Michael Elder, but I've concluded that's not so.


Employing Cauchy-Schwartz inequality question

Let $d_i\ge 0$ and $$\sum_{i=1}^n d_i=c$$ and $$\sum_{i=1}^nd_i^2\le C$$ Show that $$\frac{c^2}{n}\le C$$ The text says     Using Cauchy-Schwartz inequality and the first equation, show the last equaliton.   I do not know how to apply C-S to this. The inequality roughly states $$(u,v)^2\le(u,u)(v,v)$$ which is a trivial equality when $u=v$....  We have  $$(\sum_{i=1}^n d_i)^2\ge\sum_{i=1}^n d_i^2$$ but I dont know what to do with it...


Finding war record of Karl Weber who was German WW2 POW based in England?

I'm looking for information on a German POW based taken to a camp in England during WW2. His name was Karl Weber I believe at some point he was based in Nuneaton. He could speak English and was the 'go between' at the camp. He was a talented artist and sculptor and there is still a sculpture of his in England. He had a very good friendship with my grandmother who was a WAAF nurse. And he drew an amazing portrait of her which I have hanging in my house. I would really like to know what happened to him after the war. I cannot find him on Ancestry or Findmypast.   Does anyone know where else I could look?


What is the meaning of the line int operator ()(int n) ?  It looks like a function but what is it?  class collatzer { private:     int counter = 0;  public:     int operator ()(int n)     {         if(n==1)             return counter;          else if(n%2==0) //if n is even         {             counter += 1;             return (*this)(n / 2);         }         else         {             counter += 1;             return (*this)(3 * n + 1);         }     }      int getCounter()     {         return counter;     } };


I have some objects that were made by joining two objects together. This results in a plane that cuts through the object (see below):    I already removed the doubles, but is there some way I can remove the plane itself, so the four vertices there go away?


Can a Filipino passport holder travel in transit through Narita Japan?

I’m trying to book an emergency flight for the weekend of May 11th-12th from San Jose Costa Rica to Manila Philippines. I’m unable to obtain an in transit visa through Canada on such short notice. Canada is the cheapest route by far, less than $1,000 1-way.  The alternative, next cheapest flight is SJO to Mexico City to Narita to Manila for $2,300 for a 1-way.  The layover at Narita is 2 hours and 45 minutes.   Can a Filipino passport holder pass through Narita Japan Airport in transit from SJO, Mexico, Narita, to Manila?  Or do you also have to file for an in transit visa just like Canada?  If I have to wait any longer I will not be able to see my friend before they pass away.


Edited answer converted to a comment produces "no edit history found for this comment" message

When an edited answer is converted into a comment, the comment will get the familiar pencil icon to indicate it has been edited, but if you click on it (an option only available to ♦ moderators), it says "no edit history found for this comment":    Either the pencil should not be shown, or the post edit history should be migrated to the comment as well.


My aim is to back up my laptop so it is restored just like it was before, with all the files, apps, app data, themes, and settings. I'm afraid that if I only backup home then my themes and settings will not backup, and only my personal files will, is that true? I'm not very familiar with the filesystems yet...


Can't ssh to my ubuntu machine using global ip address

I've gone to my router settings and added port forwarding for port 22 to my linux machine. However, when I now type         ssh @  from another computer (the terminal of my mac), it says operation timed out. I've used grep Port /etc/ssh/sshd_config to confirm that port 22 is infact the port ssh uses on my linux. Am I missing some thing?


How do you evaluate a summation with variables in the parameters?

my problem is $\sum_{i=n+1}^{3n} (2i-3)$ I have done a few summations in calc 2, but I do not remember what you are supposed to do when there are variables in both parameters. I remember the rules that $i = \frac{(n^2+n)}{2} $ but Im not sure if that applies here edit: adjusted the denominator which I had incorrect


5 divides every 5th Fibonacci number. When I did this, it resulted in Lucas number series.   EXAMPLES 3,5,8,13,21    21/5= 4.25 5,8,13,21,34   34/5= 6.85  8,13,21,34,55  55/5= 11     QUESTION  Does "5 divides every 5th Fibonacci number" the MOST accurate, precise combination (or whatever mathematical term applies)?


This is my first time using Ubuntu.  I would like to know how to create a shortcut to change the language that I use to write.   For example, in Windows you press Alt+Shift to cycle between languages.  How do I do that in Ubuntu 16.04 LTS?


Loading time of 3s for 'close'/'flag' link

How to reproduce (at least for me):   Open a question (it musn't be closed yet)   Clicking on 'close' shows me the loading animation (the rectangles) for about 3 - 4 seconds. Clicking on 'flag' also shows me the loading animation, but even longer: 4 seconds was the longest time period I could measure!    My system:   IE 10 and Chrome 30 (both show the same problem) If the OS matters, it's Windows 8 Pro 64-bit.   Is the loading time intended behaviour? Did anyone else notice that change?  Note that all other parts of the StackOverflow website show great performance!  Screenshot from Chrome network tab:


Did Tolkien ever describe in any detail, other than Gandalf's own words, what happened to him in the brief period when he was "dead"?  For that matter, can we truly say that Gandalf did in fact die? It is my understanding that Gandalf was a Maia. In Tolkien's universe, are Maiar capable of dying? Would he have gone to the Halls of Mandos? Was Eru responsible for bringing him back? These are the sorts of questions I'm trying to answer, as my understanding of the event is vague and mysterious.


Let $n=3^{100}+2$ and assume that $X^2-53$ does not have zeroes in $\mathbb{Z}/ n\mathbb{Z}$. Show that $n$ is not a prime.  I tried solving this problem by assuming that $n$ is a prime (in order to reach a contradiction). Then, using the law of quadratic reciprocity for Legendre symbols, we get $-1=\left(\frac{53}{3^{100}+2}\right)=\left(\frac{3^{100}+2}{53}\right)$. However, I do not know how to proceed from here.


How can I "normalize" the scale of what seems to be either an infinitely large or infinitely small object

I'm having issues with an obj file I've imported into Blender. At first I thought the import was broken in some way because the import would go smoothly, but there was no model to be seen. Eventually I figured out that I could snap my view to the object by pressing . on the numpad and it was in fact there, just extremely small or large (I can't tell). I've tried scaling, but the sizes are so extreme that it doesn't seem to be working. Also due to the extreme nature of the object I can only see certain parts of it at a time depending on the angle in which im viewing it at it starts to de-render the parts not directly in front of the camera.


When to use wrong or wrongly as adverbs?

It seems that wrong is not only an adjective, but is also a proper adverb ("You're doing it wrong!", right?). There's, however, an adverb wrongly, which probably means the same thing.  Talking about adverbs, when does one use wrong or wrongly?


Does cut return any fields if separator does not exist

I executed  cut -d '~' -f 2 on input  RSC AED FCB A~RS   and I obtained  RSC AED FCB RS   I realized that cut will return entire line if the delimiter does not exist. It is that true?


User input in Python without use of enter key?

How do I do user input in Python where I don't want the user to have to press enter in the console? In this case, it's opening a pdf. I want it to say something like      "PDF will automatically open. Press  to view in a file browser or q   to quit the program"   How can I make it so that the user doesn't have to hit enter, and the input won't show up onscreen? As soon as the user hits q, I want the program to exit.  As far as I know, both input() and raw_input require the user to hit enter.  Thanks!  evamvid


Installed Ubuntu on a machine with Windows 8.1. Failed to create dual-booting. Is my data on another partition permanently lost?

I installed Ubuntu on a machine with Windows 8.1. And I think I screwed up big time while trying to figure out how to make the system a dual-booting one (the Ubuntu installer didn't detect that a Windows operating system was present on the computer. I assume it had to do with the way my USB-bootable drive was originally configured, but I'm not sure though). So, I believe I have installed Ubuntu over the Windows and the Windows, I think, has pretty much been wiped out. There were two partitions there: C, with the Windows itself and another one, D, with all my data.  Here are my questions:   Do you think I have permanently lost all my data that was stored on disk D? If not, is there any possibility that the data could be recovered?


I was thinking about the following problem:  Let $f:\mathbb R\rightarrow \mathbb R$ be a continuous function such that $\int_{0}^{\infty}f(x)dx$ exists. Then which of the following statements are correct? (a) If $\lim_{x\to\infty}f(x)$ exists, then $\lim_{x\to\infty}f(x)=0,$ (b) The limit $\lim_{x\to\infty}f(x)$  must exist and is zero, (c) In case $f$ is a nonnegative function, the limit $\lim_{x\to\infty}f(x)$ must exist and is zero, (d) In case $f$ is a differentiable function, the limit $\lim_{x\to\infty}f'(x)$  must exist and is zero.  If I take  $f(x)=e^{-x}$, so that the given condition is satisfied then we see that options (a) and (c) are correct. But I am not sure about the choice given in (b) and (d). But If I have to prove it in general, then how can I prove it? I mean an alternative better approach. Please help. Thanks in advance for your time.


Let $R$ be a ring. Denote $M_{n,n}(R)$ as the matrix ring over $R$. I've already proven that $M_{n,n}(I)$ is an ideal of $M_{n,n}(R)$ $\Leftrightarrow$ $I$ is an ideal of $R$.   Is there a short way to prove that $M_{n,n}(I)$ is a prime ideal of $M_{n,n}(R)$ $\Leftrightarrow$ $I$ is a prime ideal of $R$?  note: every ideal is considered to be two-sided.


importance of Interfaces and Abstract Classes in PHP

I've seen some examples of Interfaces and Abstract Classes and how they can be connected to each other. I've been wondering how important are these two in object-oriented programming.   Why is it that some methods have to pass objects instantiating Interfaces and Abstract Classes first before adding it to a normal class when you can directly add it to a normal class? Is it for the security of your code?


How do I get rid of this annoying pop up on Windows 10 (Chrome browser)

Apologies if this is the wrong group.  I did look for a "Ask Differerent" group that is for Windows user rather than Mac users, to no avail.  If there's a better group, please point me that way.    How do I get rid of the annoying Chrome window that comes up periodically.  It might happen on Edge and Explorer too, but I use Chrome 95% of the time.  I did some research that suggested it was browser independent and to try Malware.  I did so, without luck.    A little research reveals that if you call the number, they will ask you for remote access to to your computer and "fix" the problem for a small fee.  Probably not the best solution :).  I'm using AVG virus protection (free version) if that is relevant.  I'm assumming there is some sort of program to look for in Add/Remove programs or a registry setting to modify, but I've had no luck so far. Thanks, Dave


What short movie was about humans having a 7-day lifespan?

I've seen this short movie when I was a kid, but I don't remember the title. The story is that humans live underground, and have a lifespan of seven days.    They train a newborn on his first day and send him on a quest to open some door that will lift the curse. On his way he battles with some monsters, plays some kind of chess with some other monster, and on the seventh day opens the door.  I remember that the short movie had animatronics, and even some CGI (this was around the late '80-ties, I think), but I can't find it anywhere.


How can I overwrite/print over the current line in Windows command line?

On Unix, I can either use \r (carriage return) or \b (backspace) to overwrite the current line (print over text already visible) in the shell.  Can I achieve the same effect in a Windows command line from a Python script?  I tried the curses module but it doesn't seem to be available on Windows.


Can't change resolv.conf (tried other answers)

Seems that I can't change resolv.conf: changes are reset after reboot or disabling/enabling Wi-Fi. It contains nameserver 127.0.0.1, and I can't connect to any site. When I manually change it to nameserver 8.8.8.8, everything works.  What I've tried:   Changing /etc/resolvconf/resolv.conf.d/base. Currently it contains  nameserver 8.8.8.8  nameserver 8.8.4.4  Editing /etc/dhcp/dhclient.conf  It had the lines  request subnet-mask, broadcast-address, time-offset, routers,         dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers, netbios-scope,         interface-mtu,rfc3442-classless-static-routes, ntp-servers,          domain-name-servers, dhcp6.name-servers, netbios-name-servers;   I removed the last three, added line   prepend domain-name-servers 8.8.8.8, 8.8.4.4;   and ran /etc/init.d/networking restart, but it didn't help either.


Why do this book telling a story in the past but they use present tense?

I was reading a book "Call me by your name" and I was so confused by the tense they use in the book. It is obviously the story they tell happens in the past but they use present tense. I am trying to understand but have not figured out yet. Someone please takes a look and help me:  "Later!" The word, the voice, the attitude. I'd never heard anyone use "later" to say goodbye before. It sounded harsh, curt, and  dismissive, spoken with the veiled in-difference of people who may not care to see or hear from you again.  It is the first thing I remember about him, and I can hear it still today. Later! I shut my eyes, say the word, and I'm back in Italy, so many years ago (IT IS OBVIOUSLY IN THE PAST BUT THEY USE PRESENT TENSE) , walking down the tree-lined driveway, watching him step out of the cab, billowy blue shirt, wide-open collar, sunglasses, straw hat, skin everywhere. Suddenly he's shaking my hand (WHY DO THEY USE PRESENT TENSE????) , handing me his backpack, removing his suitcase from the trunk of the cab, asking if my father is home. It might have started right there and then: the shirt, the rolled-up sleeves, the rounded balls of his heels slipping in and out of his frayed espadrilles, eager to test the hot gravel path that led (WHY IS THERE A PAST TENSE IN PRESENT TENSE???) to our house, every stride already asking, Which way to the beach? This summer's houseguest. Another bore. Then, almost without thinking, and with his back already turned to the car, he waves (WHY DO THEY USE PRESENT TENSE) the back of his free hand and utters a careless Later! to another passenger in the car who has probably split the fare from the station. No name added, no jest to smooth out the ruffled leave-taking, nothing."


The verb let means  “allow”, “permit”, “not prevent or forbid”, “pass, go or come”  and it's used with an object and the bare infinitive.         Are you going to let me drive or not?     Don't let him off the hook.     Before we let our children surf the Internet, they have to do their homework.     She lets the cats out before leaving.   He let us into the house.      The full form let us can be used similarly        Let us know as soon as possible.      Please, let us help you.   They will never let us forget.      None of the above can be contracted; however, when let us is used for making a suggestion; giving self-encouragement; expressing a consequence or plea,  it is often contracted to let's      Let's go out   Let's have a party   Let's see what happens   Let's stand together in this emergency   Let's not forget those who sacrificed their lives     Questions   I believe that let + us is the only instance where this type of contraction occurs. Is there an explanation as to why verbs such as (i) give + us, (ii) get + us or (iii) take + us were not similarly contracted? When was the apostrophe used to replace the omitted letter "u" in let us?  What is the origin of let's?


Can the E Adhaar card or the Nationalized Bank Passbook be used as identify proof?

Can the E Adhaar card or the Nationalized Bank Passbook be used as identify proof for traveling with Jet Airways within India?


I am using auctex (last version from repositories) with emacs in a ubuntu 18.04 machine. I would like to customize emacs with a dark theme to reduce eye strain. When I do that, latex previews are shown with white background and a very light grey font.  I would like to customize this and choose a dark background with white fonts. Does anyone know how to do that?


I'm trying to prove that (without using logical equivalencies):  $\overline{A\cap B} = \bar A \cup \bar B$  by proving both sides:  (1) $ x \in \overline{A\cap B} \to x \in \bar A\cup\bar B$  (2) $ x \in \bar A\cup\bar B \to x \in \overline{A\cap B}$  I figured out the 2nd part, but I'm struggling with the first. The only thing I'm confident about now is:  Let $x \in \overline{A\cap B}$. We prove that $x \in \bar A\cup \bar B$. By definition of complement, $x \not\in A\cap B$.  I'm not sure if I should use cases, or if I should prove by contradictions. With the other variation of DeMorgan's, I could assume $x \in A$ and $x \in B$ and they would lead to contradictions with the first assumption, but I can't do that here because it's a $\cap$ instead of a $\cup$.  For reference, here's the proof I was given for the other variation of DeMorgan's:  Prove: $\overline{A \cup B} = \bar A \cap \bar B$  (1) if $x \in \overline{A \cup B}$ then $x \in \bar A \cap \bar B$  (2) if $x \in \bar A \cap \bar B$ then $x \in \overline{A \cup B}$  Proof:  (1)Let $x \in \overline{A \cup B}$. We prove that $x \in \bar A \cap \bar B$. By definition of complement, $x \not\in A \cup B$. Suppose, for contradiction, $x \not\in \bar A$. By definition of complement, $x \in A$, and by definition of union, $x \in A\cup B$, a contradiction. Thus, $x \in \bar A$. Now, suppose for contradiction, $x \not\in \bar B$. By definition of complement, $x \in B$, and by definition of union, $x \in A \cup B$, a contradiction. So, $x \in \bar B$. Therefore, $x \in \bar A$ and $x \in \bar B$, so by definition of intersection, $x \in \bar A \cap \bar B$.  (I'm leaving out the 2nd part, as I've figured out the 2nd part in my problem above)  Any ideas? I'm assuming it has to be of similar complexity.


Regex Match Any Character Between (Inclusive) {}

In C#, how can I match any/every character (",[,],{,}, ,Az-Zz,0-9,-,+,*,\,\,/,//,...) between the first starting '{' and the last '}'?  Sample String: test{abc123-.//"\"\t+*(E  WB"T":) {@}[3]$#@}test  Result: {abc123-.//"\"\t+*(E  WB"T":) {@}[3]$#@}  all characters before the first and last {} is removed.


Why couldn't Bond have backup at the battle of Skyfall?

I think I am missing a key plot point here.   Bond had to fake-kidnap M and bring her to Skyfall in order to lure Silva there for one last stand. Why did this have to be a secret from his colleagues at MI6? Why couldn't there have been other agents there to help defend the house and take down Silva?  Also, why did he have to have Q lay a fake trail to get Silva to follow him to Skyfall when he was actually going there, and he wanted Silva to follow him?


I'm trying to link my JasperReport to my Application form but I got this error and I don't know ,how to fix it     Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory       at net.sf.jasperreports.engine.util.JRLoader.(JRLoader.java:68)       at net.sf.jasperreports.engine.JRPropertiesUtil.loadProperties(JRPropertiesUtil.java:99)       at net.sf.jasperreports.engine.DefaultJasperReportsContext.initProperties(DefaultJasperReportsContext.java:94)       at net.sf.jasperreports.engine.DefaultJasperReportsContext.(DefaultJasperReportsContext.java:71)       at net.sf.jasperreports.engine.DefaultJasperReportsContext.(DefaultJasperReportsContext.java:59)       at net.sf.jasperreports.engine.JasperCompileManager.getDefaultInstance(JasperCompileManager.java:84)       at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:459)       at treasury.treasIraqi2.jButton_printActionPerformed(treasIraqi2.java:981)   Specifically at this line:           jr = JasperCompileManager.compileReport(path);  And these are my codes:(at Print Button)  try{                  Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");         } catch (ClassNotFoundException ex) {             Logger.getLogger(treasIraqi2.class.getName()).log(Level.SEVERE, null, ex);         }          String url = "jdbc:sqlserver://localhost:1433;databaseName=treasurydb";         Connection conn = null;         try {             conn = DriverManager.getConnection(url, "sa", "oraclee");         } catch (SQLException ex) {             Logger.getLogger(treasIraqi2.class.getName()).log(Level.SEVERE, null, ex);         }          String path = "D:\\NetBeansProjects\\treasuryApplication\\src\\treasury\\newReport.jrxml";         JasperReport jr = null;         try {             jr = JasperCompileManager.compileReport(path);         } catch (JRException ex) {             Logger.getLogger(treasIraqi2.class.getName()).log(Level.SEVERE, null, ex);         }           JasperPrint jp = null;         try {             jp = JasperFillManager.fillReport(jr, null, conn);         } catch (JRException ex) {             Logger.getLogger(treasIraqi2.class.getName()).log(Level.SEVERE, null, ex);         }           JasperViewer.viewReport(jp);         conn.close();


How to use other key combination to replace ⌘W?

I am using a small mechanical keyboard on which if I press a special function key and key 'W', it means 'up'  I use  as my console app. From time to time I use 'up' to recall past commands.  Unfortunately this function key is next to the ⌘ key. So sometimes I miss the special function key, and pressed ⌘W accidentally. It closes an active tab of `iTerm2' instead of going back in command history.  Is there any way I can use some key combination to replace and disable ⌘W in order to close a tab?


Is there a way to have Cycles skip rendering alpha?

If I wanted to create an animation, each frame would have several seconds of rendering a completely transparent part, which adds up obviously. Is there a way to eliminate this waste of time?


I know where the ultraweave armor is, and I know that one of the power cores is in the beginning, but where is the other one?


Is there any change in temperature due to special relativity?

Say I am travelling in a spaceship very close to the speed of light. Would there be any change in temperature in the spaceship relative to outside the spaceship? Please explain in detail.


Use the formal definition of the limit of a sequence to prove the following limit.

How to use the formal definition of the limit of a sequence to prove the following limit?  $\lim_{x \to -2} {(x^3 + 4x^2+ 4x-1)} = -1,$  $\lim_{x\to 1}{(\frac{1}{x})} = 1.$


There is some support on SE for rewriting links to a question with the question title; for instance, if I add a bare link of the form https://meta.stackexchange.com/questions/49433/replace-trilogy-raw-links-with-the-current-question-title in the Markdown code it gets displayed as  (see the link in the example itself for more detail).  It would be useful, in my view, to do the same for Wikipedia links; for instance, https://en.wikipedia.org/wiki/Isserlis%27_theorem should be rendered as .  EDIT: since it has been asked in the comments, I'm pointing out explicitly some potential gains for the network: improved readability (for the links that the OP didn't bother to beautify by hand), less work to create posts (for the links that the OP did bother), and more helpful content (in those cases in which OP did not bother to add a Wikipedia link because they thought it was too much work to make it look good). There are examples in which it is not obvious to get to the correct Wikipedia page for a technical term (disambiguation), and even when it is, a well-place link makes life easier for the readers.


How to write cross-product of two vectors in latex?

I have been looking for the cross product symbol in latex, but haven't found any yet. Any help would be appreciated!


Longitude latitude for each pixel of Tiff Image

I have a project to do and at the moment i have 2 tif images and their geografic data(longitude latitude) of their upper left pixel.What i want to do is get the common geografic place of the 2 images...so i want to get lonitude,latitude so that i can only keep the parts of the images that show the same geografic place.  The 2 images show deferent information for that place...for example the first one i a simple image and the second one shows the humidity level. I want first to find the common place for each picture so that later i make the pictures to have the same width and length so that i can go back and forth on these 2 pictures looking at the same place but different information.  So, is my idea of finding the common place by each pixel'l geodata a good idea?   if yes...how would i do that?  if no...how should i do it?


Why is FIFA against adding instant replay to the game?

Is there any evidence or reason why FIFA is so against adding instant replay to soccer? I find myself seeing many unlucky or just plain wrong decisions made by refs that could be corrected with instant replay.


Why does `clear` create that much whitespace on top in the macOS Terminal.app?

I was wondering about the functionality of the clear () command, that I can evoke with CtrlL in my Terminal.app on macOS. When executed, it should move my cursor to the top of the screen - what it does. That's great. But it has a side effect as well: It creates a whole lot of white space (depending on the screen size) on top of the command. For example look at this command line history: ➜  ~ some command command output ➜  ~ clear      ➜  ~ # the input line is now on top; but there is a lot of whitespace in the history as well          This is kind of bloating my command line history, when I scroll back. So I'm wondering, why is this white-space on top created?


How did "When" become the customary answer to "say when"?

When a waiter at a restaurant comes by with pepper or Parmesan cheese, he says, "say when" and starts putting it on your food.  Many people will say "OK" or "that's enough," but it seems that the customary answer is "when".  How did this become the customary answer?  Did everyone decide to make the exact same joke, until it became commonplace.  I thought it was funny when I was a kid, but even now as an adult, I still say it.  For evidence that this is indeed commonplace, see .  The answer "when" is used and is external to the joke of the strip. But even so, I'm curious as to just how commonplace this really is.  I see it a lot in the US.  Is it used elsewhere in the world?  (by the way, I'm new to asking questions on this site, and I have no idea what tags to put on this question)


Let $A$ be a commutative ring with identity, $P$ a proper prime ideal in $A$, $I$ a primary ideal belonging to $P$ and $n$ a positive integer. The ideal $(I^{n})^{ec}$ (extension and contraction being made with respect to $A_P=S^{-1}A$, where  $S =A\setminus P$), denoted by $I^{(n)}$, is called the $n$-th symbolic power of $I$. Show that $I^{(n)}$ is a primary ideal belonging to $P$.  (I noticed that $A/P$ is a domain , so $S'^{-1}\frac{A}{P}$ is a field. I think that $\frac{S^{-1}A}{S^{-1}P}$ is isomorphic with $S'^{-1}\frac{A}{P}$,  where $S'$=$A$/$P$-{$0$},  so $P^e$ is a maximal ideal in $S^{-1}A$.)   I know just the basic theory about primary ideals, so I need a detailed proof.


How can I construct an array of a parameterized type?

I will get right into the problem here. This is the method that I have so far:  public T[] getAllValues() {     Serializable[] result = new Serializable[sets.size()];     for (int i = 0; i < sets.size(); i++) {         result[i] = sets.get(i).getValue();     }        return (T[]) result; }   'T' is a parameterized type that extends Serializable. 'sets' is an ArrayList holding a type that stores both a String (key) and a T (value), so getValue() returns a T. In this method, I want to return all Ts in an array, so what I would actually like to do looks more like this:  public T[] getAllValues() {     T[] result = new T[sets.size()];     for (int i = 0; i < sets.size(); i++) {         result[i] = sets.get(i).getValue();     }     return result; }   So the Serializable array, that is casted to a T array was just an idea as a work-around, but does not work unfortunately. But at the same time, I cannot use the second version, because  new T[int];   is obviously not possible to construct when the type is parameterized. Why is that? And more importantly: How can I work around it?  Thank you in advance  EDIT: I solved the problem, this is what I came up with:  public T[] getAllValues(T[] typearray) {     for (int i = 0; (i < typearray.length) && (i < sets.size()); i++) {         typearray[i] = sets.get(i).getValue();     }     return typearray; }


Which mathematical operation does the right hand rule for current come from?

I am currently wondering about the famous .  Where does it come from mathematically that when you point with your thumb in the direction of the current, your curved fingers will point in the direction of the $B$-field? In other words, which mathematical operation does it come from? Probably it has to do with some vector product or Stokes theorem application, but I am not quite sure about it.


I am confused about this question. It may have a simple answer of which I have overlooked.  Can something be nothing?  Because I believe nothing must be something, like a fact or idea of no thing existing. Yet even though nothing is something, something is something in itself, and therefore can not be nothing.  This could also apply to "Can something be anything (or everything)?".


Keyboard backlighting not working on a Vaio VPCSB11FX

I installed Ubuntu 12.04 on my Vaio laptop (model VPCSB11FX) last night and one of the issues I'm having is that the keyboard backlighting doesn't work.  I saw  solving a similar problem for 11.10, but the solution suggested there isn't available to me: /sys/devices/platform/sony-laptop/kbd_backlight doesn't exist on my machine.  Is there anything else I can do or try?


How to set a single modifier key as a shortcut in openbox?

I want to have my super key start dmenu. I have set it as a keyboard shortcut in my rc.xml as follows:  <keybind key="0xffeb">       <action name="Execute">         <command>dmenu_run</command>       </action> </keybind>   I tried specifying it in the key attribute as W, W-, and 0xffeb, but none of these worked. W responds to pressing the letter w, and the others appear to do nothing.  I want the shortcut to trigger when the super key is pressed and released on it's own. Is this possible?    This is  from super user as per the . I've read this question: , but I didn't see any useful information in it.


What is the equivalent of an "exe file"?

I don't know what the exact executable file extension is. Is it .deb or .tar.gz?


Nested 'while' loop - how to break out of one loop and then the other?

I've only been using Python for a few months and I'm a bit stuck. This is a chunk of a longer code:  while True:      method=input('''How would you like to analyse your data?     1 = mean     2 = quartile     3 = mode     4 = range     5 = variance     6 = standard deviation     ''')      if method == '1':          mean=sum(theList)/len(theList)         print('The mean of this data set is '+str(mean)+'.')          while True:             moveOn=input('Calculate another measure? Y/N ')             if moveOn == 'Y' or moveOn == 'y':                 print('Redirecting...')                 time.sleep(1)                 break             elif moveOn == 'N' or moveOn == 'n':                 print('Thank you for using the PDAP. ')                 break             else:                 print('Invalid response. ')   The problem is, I need the elif option to break out of the first while loop, but also out of the second. If someone types 'n', I need to program to just finish there and stop completely, but I can't seem to work out how to do that.


Are the words "I, we, us, his, her, he, she" all prohibited in thesis writing?

I am writing my masters thesis.  My instructor told me not to use "I, we, us, his, her, he, she" in the thesis anywhere.  Are all these words prohibited in thesis writing?       I am writing my thesis in cloud security (computer science), specifically homomorphic encryption in the cloud.


Non-zero matrices are left and right zero divisors

If we have a non-zero matrix $A\in\mathrm{Mat}_n(\mathbb{R})$ that is non-invertible. How do we prove that $A$ is both a left and right zero divisor?


Byte Size MisMatch: Writing Character Array in a struct to a binary file in C

I have following structure:   typedef struct{     int32_t loc;     char value[2];     int32_t left;     int32_t right; } Node;   Say my node has loc =0 : value= NW : left = 1 : right =2 I wrote the structure as the following :   //Writing Array of STruct to a Binary File FILE *fileptr; fileptr = fopen(filename, "wb"); if (fileptr != NULL) { fwrite(Node, sizeof(Node),noOfNodes , fileptr); fclose(fileptr);   Upon reading the file using UNIX od command ,  od -b xyz   I get the following output:  000 000 000 000 116 127 000 000 001 000 000 000 002 000 000 000   To my understanding, the number of bytes to store the structure should be 4+2+4+4=14 given character in C is 1 byte long . But the output has 16 bytes. Is my understanding incorrect.?


Name of a person that is intolerant of stupidity

What noun or adjective would one give to a person that is intolerant of stupidity? A person that becomes annoyed, angry, or of very short temper when conversing or interacting with people of a lower intelligence?  For example:       The man is very xyzxyz; his son can't do multiplication very well.     or     She is a(n) xyzxyz. She gets very frustrated when people forget things.   I'm looking almost for a scientific/medical/psychological term. One that would fall into the same kind of group as words like haemophiliac, masochist, nihilist, etc.


Let $a,b,c\in \mathbb{R}$. We want to find $x,y,z,w$ in the following equations(according to $a,b,c$):  $$\begin{align} x^{2}+y^{2}+z^{2}+w^{2}&=1 \tag{1}\\ x^{2}+y^{2}-z^{2}-w^{2}&=a \tag{2}\\ xw+yz&=2b \tag{3}\\ yw-xz&=2c.\tag{4} \end{align}$$  (In my other , that problem had a condition. But in this post, there is not.)


Code blocks do not show completely in Android 5 mobile app

Very long code blocks get truncated, this is a problem for CodeReview where long code blocks are common. The problem was not seen on Android 4.      Brand: Vodafone  Model: Smart Prime 6  Android Version: 5.0.2


Can you block with a creature then return it to your hand before it takes damage?

Someone said they can block with a  then return it to their hand with a  before the Arbor takes damage.  That sounds wrong to me.


I know that 0 is an even function and an odd function. How can I prove f is both even and odd if and only if it is the constant 0 function


How am I able to disable a tab from selecting?

I have a tab control with couple of tabs on it, I want to disable  one of the tabs while checking a radio button on the other tab page. I can disable the controls on it by using tab.Enabled = False; But I want to know how I am able to disable the whole page from even clicking on the tab. The way I did I can select the tab still, just the controls on it are disable.


Bash: how to delete the n-th oldest file in a folder?

I'm running a script on a group of mint/ubuntu VMs that every weeks downloads exactly 23 files, elaborates them one at time, and creates one big file (1..3 GB) for each downloaded file.  Downloaded files are in a folder, and elaborated files are in a different one folder.   Because the sript handle one downloaded file at time, creating one single new elaborated file, I'd like, at end of elaboration, to delete the oldest files automatically, in both folders.  My idea was to list folder content sorted by modified time descending, and to delete file starting from 24th.  Is it possibile to realize this using bash (so I can cron it) ?


What is the difference between "in time" and "on time"?

We reached the station on time.      We reached the station in time.   I think first one means we reached at particular point of time when we are required to reach.  And second means we reached before the required time.  Am I right? Or is there any other difference or meaning? If so, Please explain to me. And please explain me the points of grammer related to this.


You can see the output from lscpu command -  jack@042:~$ lscpu Architecture:          x86_64 CPU op-mode(s):        32-bit, 64-bit Byte Order:            Little Endian CPU(s):                56 On-line CPU(s) list:   0-55 Thread(s) per core:    2 Core(s) per socket:    14 Socket(s):             2 NUMA node(s):          2 Vendor ID:             GenuineIntel CPU family:            6 Model:                 79 Model name:            Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz Stepping:              1 CPU MHz:               2600.000 CPU max MHz:           2600.0000 CPU min MHz:           1200.0000 BogoMIPS:              5201.37 Virtualization:        VT-x Hypervisor vendor:     vertical Virtualization type:   full L1d cache:             32K L1i cache:             32K L2 cache:              256K L3 cache:              35840K NUMA node0 CPU(s):     0-13,28-41 NUMA node1 CPU(s):     14-27,42-55   I can see that there are 2 sockets (which is like a processor ??) and inside each of the socket we have 14 cores. So, in total 2x14=28 physical cores. Normally, a CPU can contain multiple cores, so number of CPUs can never be smaller than number of Cores. But, as shown in the output CPUs(s): 56 and this is what is confusing me.  I can see that Thread(s) per core:    2, so these 28 cores can behave like 2x28=56 logical cores.  Question 1: What does this CPUs(s): 56 denote? Does CPU(s) denote number of Virtual/Logical core, as it cannot be a Physical core core atleast?  Question 2: What does this NUMA node mean? Does it represent the socket?


this is a question that when programming I always wonder: What to use when we are writing code:   var myFiles = Directory.GetFiles(fullPath);   or  string[] myFiles = Directory.GetFiles(fullPath);   var is new and is a Implicitly Typed Local Variables, so we can only use locally and it has rules like can't be null, etc., but I wonder if we get any advantage of using it "normally".   The "normally" part says, not in Anonymous Types, Object and Collection Initializers and Query Expressions where that was the intent to use the var anonymous object, so what I mean is... just like the example above.  what are your thoughts?


How can I force resized mathmode symbols to respect fontsize changes?

I want to make a latex symbol that contains a resized math symbol using \scriptscriptsize. However, when the scope containing the symbol is subject to a font resize, the \scriptscriptsize-ed symbol is not resized appropriately.    Please see this image, and note that the rightarrow size doesn't change as much as the tilde:   Here is a snippet that demonstates the problem:  \documentclass{article} \newcommand{\isoeq}{  \kern-0em\mathrel{\raisebox{0.13em}{${\sim}$}} \kern-0.75em\mathrel{\raisebox{-0.13em}{${\scriptscriptstyle \to}$}}   }  \begin{document} {\normalsize $A \isoeq B$}, \quad {\Large $A \isoeq B$} \end{document}   Could you explain how this is done correctly such that the rightarrow $\to$ above respects resizing.


I want to write a gui to an application that is now CLI that needs to "look good" in both KDE and Gnome DE's, taking optimal advantage of a users settings for appearance.  If I select Qt or GTK+ will I be able to do this?   Do they integrate well with both DE's? Or does a KDE user need gnome libs and vice versa to run them?  My development language of choice will be C++


What makes the formula for fitting logistic regression models in Hastie et al "maximum likelihood"?

I am learning logistic regression from The elements of statistical learning: data mining, inference, and prediction, by Trevor Hastie, Robert Tibshirani, Jerome H. Friedman.  Suppose $G$ is a random variable representing response taking class label in $\{1,\ldots,K \}$, and $X$ is a random vector representing predictor taking values in $\mathbb{R}^n$.  After modeling $P(G = k|X = x; \theta), k=1,\ldots,K, x \in \mathbb{R}^n$ by logistic model in , the parameter $\theta$ is estimated from samples $\{(x_i,k_i), i=1,\ldots,N \}$ in section :     Logistic regression models are usually ﬁt by maximum likelihood, using   the conditional likelihood of $G$ given $X$. Since $P(G|X)$ completely   specifies the conditional distribution, the multinomial distribution   is appropriate. The log likelihood for $N$ observations is  $$ℓ(θ) = \sum_{i=1}^N \log P(G = k_i|X = x_i; \theta) $$   My question is how the estimation method is maximum likelihood.   Generally speaking, MLE is to estimate parameter $\theta$ of a single distribution $p(z;\theta)$ from its i.i.d. samples $\{z_i, i=1,\ldots,N \}$ by maximizing $\log p(x_1,\ldots, x_N; \theta) = \sum_{i=1}^N \log p(x_i; \theta) $, the log of joint distribution of the samples.  The estimation for logistic regression as in the quote seems not using MLE, because:   $P(G = k|X = x_i; \theta), i=1,\ldots,N $ are $N$ different distributions, instead of just one distribution as for MLE; in $ℓ(θ) = \sum_{i=1}^N \log P(G = k|X = x_i; \theta) = \log     \prod_{i=1}^N P(G = k|X = x_i; \theta)$, I wonder how to explain that "${ (k_i|x_i), i=1,\ldots,N }$" are independent and therefore $\prod_{i=1}^N P(G = k_i|X = x_i; \theta)$ is their joint distribution, as I don't know how to understand $(k_i|x_i)$ which seems not make sense.   My guess answer is that $\{(x_i,k_i), i=1,\ldots,N \}$ are assumed to be i.i.d. samples of the single distribution for $(X,G)$. So MLE for the distribution of $(X,G)$ is to maximize $$ \log P((x_1,k_1),\ldots,(x_N,k_N))  = \log \prod_{i=1}^N P(x_i,k_i)  $$ $$ = \log \prod_{i=1}^N P(k_i | x_i) P(x_i) = \log \prod_{i=1}^N P(k_i | x_i) + \log \prod_{i=1}^N P(x_i) $$ $P(k_i | x_i)$ is parameterized by $\theta$ as $P(k_i | x_i;\theta$, while $P(x_i)$ is assumed to be independent of $\theta$, so to solve for $\theta$ by MLE for the distribution of $(X,G)$ is equivalent to maximize $\log \prod_{i=1}^N P(k_i | x_i; \theta)$. I wonder if this is a reasonable explanation, and what yours are?  Thanks and regards!


Why do spacecrafts take off with rockets instead of just ascending like an aircraft until they reach space?

I guess it's not a very educated question, but I never quite understood why spacecrafts have to shoot up and can't just reach space by simply continuing an upwards ascent like an airplane.


Initialization of variable in python and C

I'm rewriting a C code to python but it seems I've stuck.  I have the function in C:    double GetArrival()   /* ---------------------------------------------   * generate the next arrival time, with rate 1/2   * ---------------------------------------------   */    {   static double arrival = START;    SelectStream(0);    arrival += Exponential(2.0);   return (arrival);   }   This function is called from a main() function. As you can see every time it is called, an exponential random rate of 2.0 is added to arrival. All you have to know is that it's a custom function that returns a random variable.  After consulting ddd on the C file which works as it should, I realized that in the following python "equivalent" the variable arrival gets initialized to START = 0 everytime the function GetArrival() is called. This for some reason doesn't happen in the C, except the first time the function is called.  def GetArrival():      arrival = START      SelectStream(0)      arrival += Exponential(2.0)      return arrival   So I thought I should omit this evil initialization and that should do it. Did not, because in that case I get the following error:  UnboundLocalError: local variable 'arrival' referenced before assignment   Which kinda makes sense.  So my question is how can I make the python code work like the one in C, without having the variable arrival initialize to zero every time?  Thanks.


Importing coordinate data from Excel into QGIS

I have an Excel file containing data collected over many years as latitude and longitude coordinates for archaeological sites. How can I import it into QGIS as a new layer?


I am trying to get MIME type of files in java. Using below code I am getting MIME Type: application/octet-stream  Code:   MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); String mimeType = mimeTypesMap.getContentType(filePath);   for PDF but I am expecting application/PDF.  Is there any way to get exact MIME type of file?


shading view is different than render view

hello community I am much worried while adding material to the objects in blender 2.8.  I am facing problem that the shading view show the accurate colors what I do made as shown in figure below.   as it shows a good metalic color but when I goes to the render view or render the image weather in cycle or in evee shows different results like the premade metal color in shading view looking like this in render view as shown below   please sort out the problem I shall be very thank full to you.    I am also attaching the .blend file


Baking more than 1 cut of meat at same time?

I am cooking 4 stuffed pork loins on the same rack in a 350 degree oven. Cooking time in recipe is 90 min. (Based on 1 meat portion) Does cooking time change for 4 ?


Consider we have a roll of paper with the size of 5 cm in diameter and 10 cm in width. If the thickness of the paper sheet is 0.05 cm, and the rolling has been started from the point zero (the internal reel is 0cm), how can we calculate the length or area of the whole paper sheet?


I need hint to find this sum $$\sum_{k=1}^{n}{3^kk}$$  $\sum_{k=1}^{n}{3^k}$ can be easily calculated as it is sum of geometric progression.


Problem:  Getting error messages when trying to cite a reference in the figure caption. Not sure what I am doing wrong. Can't seem to find that this has been up previously either.  Minimal Working Example:  \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[pdftex]{graphicx} \usepackage{epstopdf} \graphicspath{{figures/}}  \usepackage{apacite} \bibliographystyle{apacite}  \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{rub14,    author = {Rubin, Jared},    title = {Printing and {Protestants}: An empirical test of the role of printing in the {Reformation}},    journal = {Review of Economics and Statistics},    volume = {96},    number = {2},    pages = {270--286},    year = {2014}, } \end{filecontents}  \begin{document} \begin{figure}[htp] \centering \includegraphics[width=\textwidth]{conceptdriven.eps} \caption{\label{fig:researchscope}The process of concept-driven design approach in relation to theory and use situation, adopted from \citeA[p.~282]{rub14}}  \end{figure}  \bibliography{\jobname}  \end{document}   Desired outcome:  The reference to be directly after the words "adopted from".


My Ubuntu 18.04 LTS user Desktop is Corrupt and I cannot Change Any Icons from Generic Icons

I am running Ubuntu 18.04 LTS with kernel 4.15.0-48-generic. My desktop suddenly does not let me change icons to correct ones and it just shows the generic icon based on the file. It happened after I forced a couple of shutdowns when my system was locking up (probably doing something behind the scenes and it had the spinning circle.) I waited a long time before shutting down. Now, I also get a couple of errors at boot that sometimes pop up in an error reporting window. I was going to try to use sfck at boot but it doesn't let me. I also tried to uncheck "run as application" for each shortcut and recheck it to no avail. The shortcuts still open the app, but they ALWAYS prompt to trust them no matter how many times I do it.


Are "in" and "at" the same in some situations?

If someone calls me, and I say I can't talk to them at the moment, because I'm at school, is there any difference between the following two sentences?        I'm at school.   I'm in school.      Do they convey the same meaning or they are different?


Calendar month view is unresponsive on iOS 9

On two phones that I have tested the month view in the Calendar app in iOS 9 is unresponsive or ignore taps. It seems like most of the time double tapping a day will open that day but sometimes (rarely) only single tapping a day will open that day. Is anyone else seeing this. Is there a workaround I can try before restoring my device?


null pointer exception question related to stack and queue

I'm trying to make a infix to post fix converter but the problem is that I keep getting null pointer excpetion with input like 3+1 or just (3+1) but I dont really understand what is wrong with the code.  line 26 and 38 are causing the NPE I used the debugger and i know that at that point the stack and queue isnt fillled with anything so they are both null but can i not use =! if it's pointing to null Can you not use something like ops.top.data!="(" if theres a possibility that the top of the stack(ops) is null. heres the code below. I have a seperate stack class that has a top node and queue class with front and rear node.  import java.util.StringTokenizer; import acm.program.ConsoleProgram;  public class In2pJ extends ConsoleProgram{      public void run() {         //fields, 2 queue for input and output, 1 stack for operators, to keep find precedence, use index of strings and divide by 2         Queue input = new Queue();         Queue output = new Queue();         Stack ops = new Stack();         String oppre = "-+/*^"; //index divide by 2 create precedence of 0,0,1,1,2         String paren = "()";         println("Infix to Postfix Converter");         String str = readLine("Enter string(blank line to exit):");         StringTokenizer st = new StringTokenizer(str, "+-*/()", true);         while(st.hasMoreTokens()) {              input.enqueue(st.nextToken());//put tokens into input queue         }          while(true) {             String cur=input.dequeue(); //get a token from input             if(oppre.contains(cur)) {//if token is operator                 //if operator at top of stack has greater precedence or equal but the token is left associative, and the operator at top of stack is not a (                 //pop operators from stack to output queue                 while((oppre.indexOf(ops.top.data)>oppre.indexOf(cur)||(oppre.indexOf(ops.top.data)==oppre.indexOf(cur)&& cur!= "^"))&&ops.top.data!="("){                     output.enqueue(ops.pop());                  }                 ops.push(cur);               }else if(paren.contains(cur)) {//if token is  ()                 if (cur =="(") {//if ( push it onto stack                     ops.push(cur);                 }else {//if )                     //pop operator from the stack onto output if top of stack is not a left paren                     while(ops.top.data!="(") {                         output.enqueue(ops.pop());                     }                     ops.pop();//discard left paren when found                 }             }else if(input.front==null &&input.rear==null) { //if input is empty pop operator from stack to output queue                 while(ops.top != null) {                     output.enqueue(ops.pop());                 }                 break;             }else {//if its a number push it to output queue                 output.enqueue(cur);             }         }         print("Postfix:");         while(output.rear!=null) {              print(output.dequeue());         }     }   }


Strategy pattern using Enums. Need a simple example in Java

I'm trying to understand the strategy pattern and enums in java. I've googled this and have found a few articles on the subject, but most of them seemed too complex for my understanding. Could anyone provide a simple example or another link that demonstrates strategy pattern using enums in laymen terms using java?  Thanks you in advance.


out of memory exception when trying to crop,shift and pad an image

I'm working on a piece of code where I want to be able to crop or shift images. During this I have managed to bring down the problem to the following line of code:   Cropped = ScaledImage.Clone(new Rectangle(hscroll, vscroll,ScaledImage.Size.Width, ScaledImage.Size.Height), ScaledImage.PixelFormat);   The actual amount of used memory is not big enough to matter (there is no infinite loop and according to the profiler I have plent of memory left (only some 200mB in use troughout the application out of 4 gigs avaible)).   The line of code here is suposed to either pad in front of an image or crop out the left and top side depending on whatever hscroll and vscroll are positive. ScaledImage is a bitMap that is currently 512 by 512.


How Einstein thought experiment clock works in quantum world?

According to Einstein's thought experiment, imagine a clock but this time the distance  between  mirrors is one Planck length $\ell_p$. If we move the spaceship  (with clock on board) at velocity $v$. What is the distance that the photon wavefunction must go to reflect from the point of view of an external observer? Obviously it should be $n\ell_p,n\in\mathbb{N}$ and can't be a non-integral multiple.  By the way I'm not a physicist so I will be glad if you explain with less math.


Where can I get best resources to learn sql?

I am very new to the databases just have basic knowledge about it.  I want to learn sql language and dont know where to start. Please help me to start with it. And what is the difference between sql and PostgreSQL? What are the different languages to maintain databases.  Any help will be appreciated.


Substring won't output anything if length is less than 3

Why do x and y have no output in the code below? It only happens when the substring is less than 0: "3" textString = "You can milk a yak in London Zoo" print(textString) a = len(textString) #puts a = 32 b = textString.index('milk') #puts 8 in b c = textString[11:17] #puts "k a yak" in c # You could find the positions of the spaces in c # but this solution assumes they are known x = c[0:0] #puts “k” in x y = c[2:2] #puts “a” in y z = c[4:6] #puts “yak” in z  result = x+y+z print(x) print(y) print(z) print(result)


Other word for discrimination based on demographic categories?

I am looking for a stronger word than "discrimination", which somehow remains ambiguous because of its multiple meanings. I am especially interested in referring to discrimination in the sense of partiality and prejudice towards certain demographic categories. The word "discrimination" could be used in combination with an adjective such as "racial", but again that would be to specific, because it would omit discrimination based on other categories such as religion, gender or culture. What I would require is a word describing the thought process by which one purposely, unfairly and hatefully excludes an entire population from courtesy and tolerance one would apply to oneself.


I'd like to ask if some variation of spacing in between words is normal? In some cases it seems to me that after a full stop and the next words there is a larger space than usual.   The pictures hopefully shows what I mean. The space is before "Another finding..."  I'm seeing this in various locations throughout the document. Is there an explanation for this behaviour?


Purpose of universal property of a product.

I read the definition of a universal property of a product of topological spaces. Generally it says that for map $f$ from $\mathbb{X}$ to $\mathbb{Y}$ and map $g$ from $\mathbb{X}$ to $\mathbb{Z}$ there exist unique map $h$ from $\mathbb{X}$ to $\mathbb{Y}\times \mathbb{Z}$ such that projection of image of $h$ equals to image of $f$ and image of $g$. For what purpose we use this property and isn't it just $h(x)=(f(x),g(x))$ ?  Thanks.


I am running Xubuntu 13.10 i386 with the python (2.7) and python3 (3.3) packages installed. I have downloaded and compiled the source code for Python 3.4 but the binary file is named python. How can I install it as python34? Do I change the name of the binary file and do sudo make install?


Evaluating $\int_0^{2\pi} \frac {\cos(\theta)}{5-3\cos(\theta)} \, d\theta$ using residue theorem

I am to evaluate the following integral using residue theorem: $$\int_0^{2\pi} \frac {\cos(\theta)}{5-3\cos(\theta)} \, d\theta$$ I know that I need to perform substitution with the following: $$d\theta = \frac {dz}{iz}$$ $$\cos\theta = \frac 12(z+\frac1z)$$ which yields: $$\frac 1i=\int_{|z|=1} \frac{z+\frac1z}{-3z^2+10z-3}\, dz$$ Finding the roots for the denominator yields two roots at $1/3$ and $3.$ Only $1/3$ falls within our unit circle so we ignore the root at $3.$ This is where I am a little stuck. I was taught to use the shortcut here to calculate the residue where I would leave the numerator $p(z)$ as is and take the derivative of the denominator $q'(z)$ then plug in the value of the singularity $z=\frac13$ but this approach doesn't give me the correct answer which I know is $\frac\pi6$ Am I making a mistake in setting up the problem? Thanks!


How do I touch every file in a directory?

I'm using Amazon Linux with bash shell.  I'm trying to touch every file in a certain directory, but this command is failing:  [myuser@mymachine scripts]$ find /usr/java/jboss/standalone/deployments/myapp.war -type f -exec touch '{}' ; find: missing argument to `-exec'   How do I correct the above?


I would like to write an SQL query that searches for a keyword in a text field, but only if it is a "whole word match" (e.g. when I search for "rid", it should not match "arid", but it should match "a rid".  I am using MySQL.  Fortunately, performance is not critical in this application, and the database size and string size are both comfortably small, but I would prefer to do it in the SQL than in the PHP driving it.


What is the difference between modify and change in stat command context?

The stat command's manual page says:      %x     Time of last access    %y     Time of last modification    %z     Time of last change    I cannot understand the difference between modify and change. I understand the words are synonyms (English is not my native language), but their output is different.  I tried the following command  stat --printf="Change %z\nAccess %x\nModify %y\n" p.txt   Now when I open p.txt, access time is changed, I go into insert mode, edit the file, modify and change time remains same.   Change 2010-10-06 12:48:39.286252389 +0500 Access 2010-10-06 12:49:14.962243456 +0500 Modify 2010-10-06 12:48:39.234498878 +0500   When I write the changes to file :w, modify and change, both change but give different values.  Change 2010-10-06 12:51:21.949082169 +0500 Access 2010-10-06 12:51:21.908246082 +0500 Modify 2010-10-06 12:51:21.908246082 +0500   So what are the meanings of "modify" and "change" in this context? That is, time of modification and change give time of which events?  Thanks


I've been searching this site over and over to find a solution to my problem, but I can't find it and what I've found does not seem to work.  My problem is as follows: I'm trying to cite APA style in my ShareLaTeX file, but whenever I type \cite{} and select one of the proposed writers from my .bib file, an error occurs. The citation appears in bold, and the error is:   Citation 'Slagter2012' on page 1 undefined on input line 24.: You have cited something which is not included in your bibliography. Make sure that the citation (\cite{...}) has a corresponding key in your bibliography, and that both are spelled the same way.   Now I've checked this over and over and it seems all the same to me. Is here something wrong in my file?  \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[affil-it]{authblk}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa]{biblatex}     \DeclareLanguageMapping{american}{american-apa} \addbibresource{article.bib}     \title{MyArticle}     \author{MyName}     \date{Dated: \today}     \affil{University of Amsterdam}     \begin{document}     \maketitle     \section{Introduction}     This is the introduction.\cite{Slagter2012}     \printbibliography \end{document}   This is my .bib file  @article{Slagter2012, author = {Slagter, Heleen A. and Tomer, Rachel and Christian, Bradley T.      and Fox, Andrew S. and Colzato, Lorenza S. and King, Carlye R.      and Murali, Dhanabalan and Davidson, Richard J.}, isbn = {1530-8898 (Electronic)$\backslash$n0898-929X (Linking)}, issn = {0898-929X}, journal = {Journal of Cognitive Neuroscience}, number = {9}, pages = {1932--1940}, pmid = {22663253}, title = {{PET Evidence for a Role for Striatal Dopamine in the      Attentional Blink: Functional Implications}}, volume = {24}, year = {2012} }   And this is the output    What am I doing wrong?  NOTE I am completely new to this, be as clear as possible otherwise I will not understand ;)


If ${\lvert{E(G)}\rvert}>{\lvert{V(G)}\rvert}+3$, graph $G$ has at least two disjoint cycles.

Assume that $G$ is a graph which ${\lvert{E(G)}\rvert}>{\lvert{V(G)}\rvert}+3$. Prove $G$ has two disjoint cycles.  Answer: I tried to prove it when $G$ is connected. consider the smallest cycle of length $k$. It exists because ${\lvert{E(G)}\rvert}>{\lvert{V(G)}\rvert}-1$. Now, I divided vertices into $2$ groups. Group $A$ consists of $k$ vertices in the smallest cycle and group $B$ consists of the other $n-k$ vertices. Now, between  $n-k$ vertices are exactly $n-k-1$ edges. Because, If it is more then we have another cycle (the proof is done) and if it is less then $G$ is disconnected (contradiction). So there are at least $5$ edges between group $A$ and $B$. Now, what should I do? should I write every possibility to prove it? Are there any easy ways to continue the proof? What about if $G$ is disconnected? I think we should do it in each component. Am I right? Thank you so much for your answers.


Is there an easy way to remove some of the built-in apps on macOS Mojave?

In the past I was able to do sudo rm -rf /Applications/<app name>. The following resources indicate that this will no longer work without dealing with System Integration Protection (SIP):       The motivation is that I am not motivated to accept updates for apps that I do not expect to use within the foreseeable future.  Is there an easy way to remove some the built-in apps that I do not wish to update, such as GarageBand, Keynote, Pages, etc., without dealing with the SIP tool?  P.S. (edited): I completely understand that there may not be any easy or even difficult way to remove some built-in apps such as Safari, Siri, System Preferences, etc. This scope of this question is hereby limited to the some apps such as GarageBand, Keynote, Pages, etc.


How can I solve Python Unicode Encoding Error?

I was trying to load a .json file. This file is an English word dictionary that contained a lot of Unicode like \u266f. By using encoding = "utf8" can not solve the error. Then I replaced all of the Unicode with UTF-8; but still, it shows the same error.   My code:   import json data = json.load(open("data.json", encoding="utf8")) print(data)    Result:  Traceback (most recent call last):   File "E:\Python\Dictionary App\test.py", line 4, in <module>     print(data)   File "C:\Users\ahnaf\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1252.py", line 19, in encode     return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u266f' in position 657370: character maps to <undefined> [Finished in 0.32s]   The json file:


Why are keyboard rows staggered the way they are now?

This is a follow-up question based on . The accepted answer explained how this staggered design originates to earliest typewriter. My question is, why do they stagger in this way?  Take home row as the horizontal axis, then in the alphanum area you canʼt find two keys aligned horizontally. It might be explained by my observation that for old typewriters, each keyʼs lever must take a unique horizontal position. I'm just wondering whether itʼs that later industrial designers never changed this, or that there are other reasons beyond path dependence?