states that:     Reads and writes are atomic for reference variables and for most primitive variables (all types except long and double).   Now I wonder why the volatile keyword is necessary in the following example to prevent an endless loop - the change of the int variable should be atomic and therefore instantly visible to everyone, shouldn't it?  public class HelloWorld {      // This doesn't work as expected      private static int x = 0;      //Following would work: private volatile static int x = 0;       public static void main(String []args) throws Exception      {          Thread t1 = new Thread(() -> {             try             {                 Thread.sleep(1000);                 x = 1; //Should be atomic, right?              } catch (InterruptedException e) {}         });           System.out.println("Begin");          t1.start();           //The evaluation of the condition should also be atomic, right?          while(x == 0)          {          }           t1.join();          System.out.println("End");      } }

At work today, I came across the volatile keyword in Java. Not being very familiar with it, I found . Given the detail in which that article explains the keyword in question, do you ever use it or could you ever see a case in which you could use this keyword in the correct manner?


I have been reviewing number theory questions and there is one problem I am stuck on.  Find $x$ such that $x^{677} ≡ 3 \mod 2020$.  My approach was to start by applying Euler’s Theorem. I know that $\phi(2020) = 800$, but I don’t know if this is very useful... How should I proceed?

We know that $221 = 17*13$. So we can check if the system has roots to both of those equations separately, which it does:  $x^{5} \equiv 2$ mod $13$ has the solution $6 + 13n$ and $x^{5} \equiv 2$ mod $17$ has the solution $15 + 17n$.   I got these numbers from wolfram, I have no idea how to solve this problem WITHOUT a calculator. And even after finding these numbers. How would one obtain a solution modulo $221$? I was thinking the Chinese Remainder Theorem but I am under the assumption that CRT only applies to problems with powers of $x$ which are $1$.  Thanks.


Essentially, for several months now I seem to have the infamous quote atop the questions writing page that says if I don't pull my act together, I won't be able to ask questions, possibly permanently (depending on how I influence the community). I have read the help page and still cannot work out why, after all this time, I still have this warning.  I have   Gone over my old questions, and accepted answers where they work Provided my own answers where I can Voted where necessary   I have no questions with negative scores, and I fail to see why I still have the warning. Any help or detailed explanation please.   EDIT screenshot, just to provide evidence.

Another "miséricorde":  Consider  (emphasis added):  I think its okay, please dont take any efforts for me. I personally do not feel the system helps ask good questions. I dont know why asking for a software in this case is bad. Basically I needed a command that would give me this data. There is no other way I could have asked the question. I could have changed the question just for the sake of changing. I feel I am better off elsewhere. Thanks for your very very prompt responses. Regards. Bye. – user1744649  We just lost another user due to inadequate guidance on what questions are allowed.  The  by the time they are banned has been proven incorrect. Given that , we need a better way to make sure that users can understand how to ask good questions and what types of questions are allowed. I suggest that we warn newcomers, in a clear but positive tone, when one of their questions has been closed, downvoted (to a score of -2 or lower), or deleted, so that they don't repeat the same mistake.  This is probably best done the next time the user asks a question, and should appear as an "interstitial" page prior to reaching the actual Ask Question form.  The page should not appear to users:  with at least 50 (or perhaps 75 or 100) reputation that have asked a good question since the last downvoted/closed/deleted question that have fixed a bad question and had it reopened/undeleted/upvoted.  The content of the page should be adapted based on the specific problem with the previous question.  I would imagine something similar to the following (example for a question closed as off topic on Super User):  Before you ask another question... One or more of your previous questions have been closed as off topic. The scope of on-topic questions is defined in the , as follows:  What kind of questions can I ask here? Super User is for computer enthusiasts and power users. If you have a question about …  computer hardware, computer software, or personal and home computer networking  and it is not about …  programming and software development, video games or consoles, websites or web services like Facebook, Twitter, and WordPress, electronic devices, media players, cell phones or smart phones, except insofar as they interface with your computer, issues specific to corporate IT support and networks, asking for a shopping or product recommendation,  … then you’re in the right place to ask your question!  Please make sure that the question you are about to ask is on topic as described above. If you need help determining whether your question can be asked on this site, you can ask for advice on  or . You may also want to edit your previous question to address any problems associated with it. To ensure a high standard of content quality and prevent disruption to the community, users who repeatedly post low-quality questions  Continue  The  doesn't address this issue as it is shown only to users with 10 reputation or less (rather than up to 50 and possibly higher) and does not address the specific problem with previous low-quality questions.  The point of this feature request is to provide a easily understood targeted message that actually teaches the user about what happened with the previous question he or she asked.  The EULA is generic and may not have conveyed the intended message clearly if the user still asked a low-quality or off-topic question. For reference,  currently has 143 reputation and the proposed message would probably have been shown after the first closed or deleted question. I know this can be a complex feature to implement, since it needs to be adaptive, but this should help eliminate confusion on what the rules are and minimize the incidence of good-faith users getting post-banned.


I know that accelerating charges produce electromagnetic waves. I do not however understand the main reasoning behind this. Most of my knowledge of this topic is from internet sources and stack exchange answers. Based on my limited exposure to the theory and knowledge of Maxwell equations, I have a doubt.  If electromagnetic waves are produced by accelerating charges, then will I observe EM waves if I accelerate with respect to stationary charge? For eg.- if I am doing SHM at a distance from a charged particle in a direction perpendicular to the distance vector or something like that.  P.S.- I am a Grade 12 student and do not know much about Relativity or Quantum theory.

For ex. if my frame of reference is oscillating then will i see E.M waves produced from a charge which is not oscillating with any other or ground frame of reference?  Can i get a really clear answer ...like yes or no and why ?


We have a (non-jailbroken) test iPad 2 with iOS 6. Following the recent SSL vulnerability patch, we'd like to update it. However, the update I see in iTunes/Settings is to 7.0.6. We'd really like to keep it at 6 (=update to 6.1.6). Is this possible?

Apple have just released software updates to fix  where a valid SSL response wasn't checked properly to ensure it matches the site actually being browsed. I have an iPhone 5, but unfortunately I have a strong personal aversion to the iOS 7 look and feel, so this far I've kept it on iOS 6.1.3.  Other users have better reasons than I to stay on iOS 6. For example, some people might be reliant on an app that has no iOS 7 version (as per bmike's comment), or the device might not have enough memory for the upgrade (as in this ).  Apple have released  ("Available for: iPhone 3GS, iPod touch (4th generation)"), but my iPhone 5 gives me no option to upgrade to any iOS other than 7.0.6. Similarly, iPhone 4 and iPhone 4S, iPad 2, [new] iPad (3rd gen), iPad Mini and iPod Touch (5th Gen)  but do not have builds of iOS 6.1.6 to install.   My iPhone is not currently jailbroken, but I would consider doing so in order to avoid having to use the iOS 7 interface. I'd rather not have to choose between the iOS version I prefer and this security patch for SSL. What options are feasible?


When I run my program and ask if you want to play chance or guess my if statements for it are skipped over and it goes straight to the end of the program. I'm not sure what the problem is, I have tested it without the if statements and it works fine. Here's my code:  import java.util.Scanner;  public class coinflip23   {     public static void main (String args[])      {        System.out.println ("Welcome to coin flip game");        Scanner s = new Scanner(System.in);        System.out.print("Please enter the number of rounds you want to play");  int numofgames = Integer.parseInt(s.nextLine());  //numofgames  Scanner t = new Scanner(System.in);  System.out.print("Please enter the amount of money you want to play");  int moneyent = Integer.parseInt(t.nextLine());  //moneyent  Scanner f = new Scanner (System.in);  System.out.print("do wnat to play a game of chance or guess?");  String play = (f.nextLine());  //choice  int lose=moneyent;  int gain=0;  int result;  int totalmoney = moneyent;   /////////////////////////////////space break//////////////////////////////////////   if (play == "chance")  {    System.out.println(" a coin is fliped for everytime the coin lands on heads i'll double your profit");    System.out.println("but if the coin lands on tails you lose.");    for(int i=0; i<numofgames; i++)    {      if (Math.random()<0.5)      {        System.out.println("");        System.out.println ("Heads");        gain = totalmoney;        totalmoney = totalmoney*2;        System.out.println("");        System.out.println("you won $" +gain);        System.out.println("");      }      else if (Math.random()<1.0)      {        System.out.println("");        System.out.println ("Tails");        System.out.println("");        System.out.println("You lose $" +lose);        lose = totalmoney;        //System.exit(0);      }    }//forloop   }//end of if statment   /////////////////////////////////space break//////////////////////////////////////   else if (play == "guess")  {   System.out.println("To win the games guess if the coin will land on tails or heads");  System.out.println("If you guess correctly you win but if you guess wrong you lose");  //System.out.println("you will get three lives. If you lose all three lives you lose the game");  for(int i=0; i<numofgames; i++)  {    Scanner w = new Scanner (System.in);    System.out.print("What is your guess? Heads or Tails");    String ht = (w.nextLine());    String coin = "Tails";    if (Math.random()<0.5)    {      System.out.println("");      System.out.println ("Heads");      coin = "Heads";    }    else if (Math.random()<1.0)    {      coin = "Tails";    }    if (ht.equalsIgnoreCase(coin))    {      System.out.println("you are correct");      System.out.println("");      gain = totalmoney;      totalmoney = totalmoney*2;      System.out.println("you won $" +gain);      System.out.println("");    }    else    {      System.out.println("you are wrong");      System.out.println("");      System.out.println ("Tails");      lose = totalmoney;       System.out.println("");      System.out.println("You lose $" +lose);    }  }//forloop  }// end of if statment    /////////////////////////////////space break//////////////////////////////////////   result = gain-lose;  System.out.println("The game is done you won $"+gain + " you lost $"+lose);  System.out.println("");  System.out.println("You now have $" +result);   System.exit(0);   } }

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


Answer links have become broken for multi-page questions.   or   should go to peterh's answer. However, it's on the second page (in the "votes" view), but only the first page is rendered, so I just see the question.  This used to work.  Reproduced in Chrome Stable 67, logged in or logged out.

As I pointed out in , the URL scheme for full-form links to answers has changed from:  https://site/questions/question-id/question-title/answer-id#answer-id   to:  https://site/questions/question-id/question-title#answer-id   Pretty much every link that redirects to an answer, including short-form links to answers (i.e. https://site/a/answer-id) and ?lastactivity links to questions, for example, now redirect to the latter form of URL, instead of the former one. (Interestingly, the responses tab in one's own user profile still consists of hard links to the old form.)  Why was this change made? It seems to have , as those are still looking for the old form of URL. Additionally, as per Tim Stone's comment, it also seems to have .  As a test for the above, I tried manually changing the URL to the old form, and it properly oneboxed in chat and properly changed the page and scrolled down.  It also briefly affected SmokeDetector (a community project that widely affects SE sites), until I filed an issue with them and had it fixed.  Was it done because search engines were showing multiple results, since it wasn't clear to them that they were looking at the same page since the URLs to answers were technically different?


because we have a lot of query on created date field on our custom Entity, we looking for a solution to index 'created' field index in Mysql.  this is our baseFieldDefinition :   public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {     $fields = parent::baseFieldDefinitions($entity_type);  $fields['product_id'] = BaseFieldDefinition::create('entity_reference')   ->setLabel(t('Product Category'))   ->setDescription(t('Product Category ref'))   ->setRevisionable(FALSE)   ->setSetting('target_type', 'taxonomy_term');  $fields['site_id'] = BaseFieldDefinition::create('entity_reference')   ->setLabel(t('Site ID Ref'))   ->setDescription(t('Site Category ref'))   ->setRevisionable(FALSE)   ->setSetting('target_type', 'taxonomy_term');   $fields['price'] = BaseFieldDefinition::create('integer')   ->setLabel(t('Price'))   ->setDescription(t('The Price of the Crawl entity entity.'))   ->setDefaultValue(0);  $fields['created'] = BaseFieldDefinition::create('created')   ->setLabel(t('Created'))   ->setDescription(t('The time that the entity was created.'));  return $fields;   }    is there any setting or method in ContentEntityBase to set a field indexable in Mysql?    NOTE: we can index it with a simple migration in our module installer but first of it I'm curious about it, is there any solution to achieve it in BaseFieldDefinition?

Goal:  Add a database index to a 'created' field.  Given:  There is a custom entity with a base field created. The field is stored the entity table.  Field source code of the created field:  $fields['created'] = BaseFieldDefinition::create('created')   ->setLabel(t('Created'))   ->setDescription(t('The time that the entity was created.'))   ->setDisplayOptions('view', [     'label' => 'hidden',     'type' => 'timestamp',     'weight' => 3,     'settings' => [       'date_format' => 'medium',       'custom_date_format' => '',       'timezone' => '',     ],   ])   ->setDisplayConfigurable('view', TRUE);   What I researched:  I have not found a way to add index using the \Drupal\Core\Field\BaseFieldDefinition().  As I understand indexes are defined in a @FieldType plugin. The created field is implemented via the \Drupal\Core\Field\Plugin\Field\FieldType\TimestampItem() plugin and obviously does not have have indexes there.  P.S. I know, that I can write an updatescript to add an index to the table manually.


Mathematicians have developed different definitions for how "smooth" a function might be. A function (e.g. from or to $\mathbb{R}^n$ or $\mathbb{C}^n$) might be continuous, or once-differentiable, or twice-differentiable, or infinitely differentiable (smooth), or analytic. I am interested in the question of how smooth the evolution of the universe is. More precisely, for any physical theory, we can look at those trajectories in the relevant phase space (or configuration space) of that theory which conform to the laws of physics. For example, in classical mechanics, we can look at those trajectories in phase space that conform to Newton's laws. My question is the following: Can it be shown that every trajectory in phase space/configuration space that conforms to Newton's Laws (or Maxwell's Laws, or the Schrodinger equation) is continuous/differentiable/smooth/analytic? I realize this is a fairly open-ended question (because it asks about different laws of physics), but any partial answer would be appreciated.

While it is quite common to use piecewise constant functions to describe reality, e.g. the optical properties of a layered system, or the  at (the impossible to reach exactly) $T=0$, I wonder if in a fundamental theory such as QFT some statement on the analyticity of the fields can be made/assumed/proven/refuted?  Take for example the Klein-Gordon equation. Even if you start with the non-analytical Delta distribution, after infinitesimal time the field will smooth out to an analytical function. (Yeah I know, that is one of the problems of relativistic quantum mechanics and why QFT is "truer", but intuitively I don't assume path integrals to behave otherwise but smoothing, too).


In C I have this enum:  enum {     STAR_NONE =     1 << 0, // 1     STAR_ONE =      1 << 1, // 2     STAR_TWO =      1 << 2, // 4     STAR_THREE =    1 << 3  // 8 };   Why is 1 << 3 equal to 8 and not 6?

I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ...   What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness.


EDIT: Thanks for the link to the previous StackExchange question, the answer is that a[b] is defined as  *(a+b), such that "a"[0] = 0["a"] = *("a"+0). I guess this works because "a" is a pointer? So I can't say:  int i; i[0];   But I can say:  int i; i["a"];   I'm trying to understand how in the heck this code compiles and what is happening. Any hints would be greatly appreciated. Also, if you know of a good reference for understanding what's really going on in the C language feel free to drop it on me.  Code is here:  int i; main() { int j; int k; j=i["a"];  //printf says j is 97! k=i["b"];  //printf says k is 98! }   So... what the heck is going on?! I declared "i" as an integer and then I treat it as an array with no compilation error/warning and I enter a string as the argument to the array and still no problems? Anyone have any ideas? Thanks in advance.

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


Actually there are two questions. I'm nicaraguan but live in Japan. I will go to Zambia, with a transit via Dubai. I will stay two days in Dubai before continuing my trip to Zambia.  What kind of visa do I need? Can I apply for the 96-hour transit visa? Or a single-entry tourist visa?  When I return to Japan, I will transit in Dubai, but just stay in the airport. Do I need a transit visa?

Do I need a transit visa for a layover via airports in the UAE, such as Dubai International Airport or Abu Dhabi International Airport? If so, what are the requirements for such a visa? Can I get the transit visa on arrival?


Is there a formula to calculate both the translational and rotational velocity? Does the bar always bend, and if so is there a formula on how it bends (maybe related to the velocity/force of the bullet)? What if the bar is very long, to the point where if the bar rotate it'd be at relativistic velocity?  What if I shoot at a string of cloth instead? Would the behavior of the bar/string be different if there's air drag?   Sorry for asking too many questions, but if you can answer any of them I'd be grateful.

If I push or hit an object in space (vacuum and no gravitation) in direction what is not going trough its centroid, will it rotate or move along in straight line?   I expect that on earth it will depend on what is less difficult for the object (rotation or linear movement). So the object will do some kind of combination of both movements (rotating and also moving along the direction of impulse or force).  But how could an object "decide" what to do in space, where is not resistance?


For an initial state $|\Psi\rangle_0$ as the ground state of a Hamiltonian $H(0)$, if it undergoes an adiabatic evolution $H(t)$ to reach the ground state $|\Psi\rangle_1$ of $H(1)$.   Then what's the evolution from the state $|\Psi\rangle_0$ and $|\Psi\rangle_1$?   Can the evolution be written in a form given by $H(t)$ something as $exp(-i\int H(t))dt$? If this is the case, then what's the difference between an adiabatic evolution and a non-adiabatic evolution?

When I studied QM I'm only working with time independent Hamiltonians. In this case the unitary evolution operator has the form $$\hat{U}=e^{-\frac{i}{\hbar}Ht}$$ that follows from this equation  $$ i\hbar\frac{d}{dt}\hat{U}=H\hat{U}. $$ And in this case, Hamiltonian in Heisenberg picture ($H_{H}$) is just the same as the Hamiltonian in Schrödinger picture ($H_{S}$), i.e. it commutes with $\hat{U}$. Now I have a Hamiltonian that depends explicitly on time. Specifically, $$H_{S}=\frac{\hat{p}^2}{2m}+\frac{1}{2}m\omega \hat{q}^2-F_0 \sin(\omega_0t)\hat{q}.$$  And in my problem I need to calculate $H_H$ (Hamiltonian in Heisenberg picture).  I've found that differential equation for $\hat{U}$ (I've mentioned about it above.) has generally solution in the form (with $U(0)=1$) $$U(t)=1+\xi\int\limits_0^t H(t')\,dt'+ \xi^2\int\limits_0^t H(t')\,dt'\int\limits_0^t' H(t'')\,dt''+\xi^3\int\limits_0^t H(t')\,dt'\int\limits_0^t' H(t'')\,dt''\int\limits_0^t'' H(t''')\,dt'''+...$$  So my questions are:   Is there other ways to calculate $\hat{U}$, could give a link or tell me about them? If you know form of the solution for my case, please tell me. If you know any articles or papers articles on this topice, please link them to me, too.


I have a Lenovo Ideapad with Intel i7-4700MQ processor. Which Ubuntu iso should I download for installation?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I have following associative array I wanna remove those ones that which have same value and keep one of theme(for example there is tow 124 value one of theme should be removed):  Array         (             [0] => 124             [1] => 124             [2] => 35         )

How can I remove duplicate values from an array in PHP?


I've got a website which has a iFrame in it. The iFrame is linked to an external page. I want to remove some elements in the external website (the website has HTML coding) using Javascript (other methods OK too) WITHOUT anyone clicking on any "remove" buttons or do anything, so it should AUTOMATICALLY remove that element when my webpage and the iframe loads, no one can see it. For example, I want to remove a website's logo and some contents. I've tried lots of methods but they don't work in iFrame.

I would like to manipulate the HTML inside an iframe using jQuery.  I thought I'd be able to do this by setting the context of the jQuery function to be the document of the iframe, something like:  $(function(){ //document ready     $('some selector', frames['nameOfMyIframe'].document).doStuff() });   However this doesn't seem to work. A bit of inspection shows me that the variables in frames['nameOfMyIframe'] are undefined unless I wait a while for the iframe to load. However, when the iframe loads the variables are not accessible (I get permission denied-type errors).  Does anyone know of a work-around to this?


I have an USB of 8 GB, it is somehow set to read only, previously it was working fine, but I think there is some virus or something that has turned it into a readonly system. I just want to remove everything from it and add other things. How can i do it? I do not have much knowledge, so you can tell me and I will put the output of commands that will help you diagnose the problem. I have tried a lot of solutions on stack overflow and ask ubuntu but no use

I recently made my pen-drive bootable with Ubuntu 14.04. But I need to unboot my pen-drive now. I formatted my pen-drive once,But the size of the pen-drive still shows 2.25 MB. Whereas,this is an 8GB pen-drive. How can I get rid of this problem. I'm still using Windows 7.


I want to write a small application to help me write modifications for a game I enjoy. I'm thinking of asking the community for recommendations of a good language to use, or which of a few options I'm toying with would be good. Benefits/disadvantages for packages from those who know a bit more.  My instinct would be to ask on Stack Overflow, but it's a question fishing for information about the benefits and disadvantages of different coding platforms rather than a question about solving a specific coding problem. I don't want to fall foul of site rules. Which Stack Exchange site is it best placed on?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I have a chunck of code where methods are created like that:  class myClass{     myClass(type arg){         method1 =() => {do something with arg}         method2 =() => {do something else with arg}     }     public readonly Action method1;     public readonly Action method2; }   If I understand how c# works, there 2 references of arg that are created in method1 and method2 instead of one in the object and lambda are slower. (I have heard)  What is the interest of doing that instead of that:  class myClass{     myClass(type arg){         this.arg=arg     }     private arg;     public void method1() {do something with arg};     public void method2(){ {do something else with arg}; }

What are some real world places that call for delegates?  I'm curious what situations or patterns are present where this method is the best solution.  No code required.


Let $f:[0,\infty )\rightarrow \mathbb{R}$ be an increasing function, such that $\lim_{x\rightarrow \infty }\frac{1}{x^{2}}\cdot \int_{0}^{x}f(t)dt=1$.  Prove that exists $\lim_{x\rightarrow \infty }\frac{f(x)}{x}$ and calculate this limit.    If $f$ would be continuous, we'd have $1=\lim_{x\rightarrow \infty }\frac{1}{x^{2}}\cdot \int_{0}^{x}f(t)dt=\lim_{x\rightarrow \infty }\frac{f(x)}{2x}$, therefore $\lim_{x\rightarrow \infty }\frac{f(x)}{x}=2.$ But we don't know if $f$ is continuous or not, and I wasn't able to find any other idea.

Let $f$ be a real, continuous function defined on $[0,\infty)$ such that $xf(x)$ is increasing for all sufficiently large values of $x$. Show that if   $$\int_0^x f(y)\,dy \sim Ax^\alpha \quad \left(\,x\to \infty\right)$$  for some positive constants $A$ and $\alpha$, then  $$f(x)\sim \alpha Ax^{\alpha -1} \quad \left(\,x\to \infty\right).$$  Clearly, I have to use differentiation somewhere, but I don't know how to manipulate $\lim_{x\to \infty}\frac{\int_0^x f(y)\,dy}{Ax^\alpha}=1$ to get the desired result.  From suggestions given, I know that by L'hospital's rule, it's enough to show that the limit $\lim \frac{f(x)}{\alpha Ax^{\alpha -1}}$ exists, and this limit equals $ \lim \frac{xf(x)}{\alpha Ax^{\alpha}}$. From here, I'll need to use the given assumption that $xf(x)$ is eventually increasing. But how can I show the existence of the limit based on these facts?  I would greatly appreciate any solutions, hints or suggestions.


When Bran got his Three Eyed Raven Powers, it is reasonable to see Bran's company (Meera, Hodor, etc.) believe that he has these visions because they can actually see even the Children of the Forest.  But how did Tyrion and many others easily believe to what Bran says? Personally, I think it should take time to believe how someone with visions can see the past and present. Especially that Tyrion didn't even believe there were White Walkers until he saw one.

Bran has become the three-eyed raven, and can see anything that has happened in history using his mind's eye. This is an incredible gift that takes place in a world in which people doubt the existence of dragons, giants, and white walkers.  People are a bit confused when they learn about Bran's gift, or seem a bit annoyed by his oddness, but are otherwise not too bothered. They react to Bran's gift as if they had just seen an unusually large goat.  This really came to the forefront in season 8. Bran claims in front of a large audience including Daenerys that the night king has breached the wall and has one of her dragons. He later speaks in front of the war council in Episode 2, during which many people are present, some who barely know Bran. He speaks of the night king and being the three-eyed raven and the end of the world etc., and no one seems especially concerned.   We have no indication that these individuals are even aware of Bran's gift, let alone why they're so comfortable with it. They also acknowledge his visions and use them to dictate their plans. If I was in the room I would be saying: WAIT, what is he talking about, how does he know these things, how can we believe him, and why aren't we more curious about this super wizard?   Why isn't everyone flabbergasted about Bran's "gift"? This is unlike anything anyone has ever encountered and is beyond comprehension, yet no one seems particularly perturbed.  I'm using the word "flabbergasted", but I'm also curious why people aren't more interested, questioning, curious, surprised, affected, etc.


Considering the following verbatim: \begin{verbatim} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \end{verbatim}  How to make sure that the verbatim text is not going out of the page, but going on the following line as soon as the width of the page has been passed? Please note that I am looking for a solution without the  package.  EDIT (to describe my problem a bit more) I am having a long report in which I use a lot verbatim. From time to time, the text of the verbatim is going out of the page. Furthermore, I do use the listing package with box for some special programming code. I would like to keep the same verbatim format, but with auto "end of line" for the verbatim code. Is there a simple way for doing it?  EDIT 2 if you take the following verbatim with a very long string : \begin{verbatim} $ mylinuxcommand  !+.++++.....+++-+++-!^!^+............................................;+++-^^!--.........+++--!^!^+.++++.....+++-+++-^!^+............................................;+++-^^!--.........+++--!^!^+.++++.....+++-+++-!^!^+............................................;+++-^^!--.........+++--!^!^ $ myotherlinuxcommand true $ mylastcommand "Thank you for your help" \end{verbatim}  On your pdf, only a part of this string is displayed (It stays on the same line, it's "continuing" out of the page). As on below (pdf dislay) :  $ mylinuxcommand !+.++++.....+++-+++-!^!^+............................................;+++-^^!- $ myotherlinuxcommand true $ mylastcommand "Thank you for your help"  I wish it could go on the next line automatically, so that all the content of this long string is displayed. The displayed result would give, on the pdf (pdf display):  $ mylinuxcommand !+.++++.....+++-+++-!^!^+........................................ ....;+++-^^!--.........+++--!^!^+.++++.....+++-+++-^!^+...... .....................................;+++-^^!--.........+++-- !^!^+.++++.....+++-+++-!^!^+................................. ...........;+++-^^!--.........+++--!^!^ $ myotherlinuxcommand true $ mylastcommand "Thank you for your help"  So that the entire long string from the verbatim is displayed on the pdf. A long string should be automatically cut when it reaches the width of the page, and the rest recursivally displayed on the other line.  Please note that this long string can change, but globally the structure and chars used remain the same.

How can I format a verbatim paragraph? I.e. break, fill and join input lines to produce globally balanced output with the lengths of each line approaching the target \textwidth as closely as possible.   Using the listings package I can break lines, but I cannot join short lines.. That is, the following   \documentclass{article} \usepackage{listings}  \lstnewenvironment{exampleA}{\lstset{%    language=,   basicstyle=\ttfamily,    breaklines=true,   prebreak=+,   postbreak=->,   columns=fullflexible,   breakindent=5pt} }{}  \begin{document} \begin{exampleA} Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line  Short Line  Short Line  Short Line  \end{exampleA} \end{document}   produces    What I would like to achieve is similar to what LaTeX does by default with paragraphs.. That is, e.g.  \documentclass{article} \newenvironment{exampleB}{\tt}{} \begin{document} \begin{exampleB} Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line Long line  Short Line  Short Line  Short Line  \end{exampleB} \end{document}   will produce:   The problem with using the latter approach is that I cannot use special symbols like # or % in the verbatim text.. So I need to use a verbatim environment like lstlisting or fancyvrb's Verbatim environment. (As mentioned: in the lstlisting environment, automatic line breaking is possible, however for the Verbatim environment this feature seems also to be missing)    EDIT: (This a comment to Frank's answer below)   Now there seems to be a problem with lines becoming too short.. The following input  \noindent\hrulefill  \begin{myverbatim}   xxxxxxx xxxx xxxxx: 1234567890123456789012345,   123, 1234567890, \end{myverbatim} \noindent\hrulefill\   now produces    (I would now like to have the word "123" at the end of the first line, as there are certainly plenty of space for it there :))  Update   The above problem has now been solved, see comments in Frank's answer below..


I have many shapefiles in QGIS. How can I paste the style of one layer to all the other ones? So a "batch" copy and paste solution.  If I make a multiple selection the the paste style option is not available anymore.

I'm working on bulk data. I have a few hundred GeoTIFF images imported into a QGIS project, and I'd like to modify their layer properties - things like the no-data-value, transparency of certain pixel values, colour map assignments...  But I can't seem to find a way to apply these changes to several layers at once, short of editing the XML file with a global search-and-replace. Is there a way to do this using the GUI?


Let $A$ be a $n\times n$ real matrix. such that $A^{2n}=I$ but $A^{n}\neq I, -I$, $n\geq 2?$ I have a example for $A^2=I$ but $A\neq I, -I$ but could not find a similar example for this question. I tried permuting basis vectors but could not an example. Any help is appreciated

Let $A\in M_n(\mathbb{R})$be a matrix. Then, if we have $A^{2n}=I$, can we say that $A^n=\pm I$?  I think yes, because the annihilating polynomial is $x^{2n}-1$. Therefore the characteristic polynomial should be one of $x^n-1$ or $x^n+1$. Thus, since the matrix consists of real numbers, therefore, the matrix $A^n=\pm I$. Am I wrong?Thanks beforehand.


I'm having problem getting any output from this universal adapter for my older laptop, so I opened it up to see this rubber-like white substance inside, on top of the big 68uF 400V capacitor.  A closeup:   If it is glue, why would they use it? It fits well without it, with the leads of that capacitor bent as they are.

I'm not an engineer, but my monitor stopped working yesterday (it just wouldn't display anything but still gets power) so I figured I'd like to take it apart and see what went wrong.  At the very least I'd get to see what the inside of a monitor looks like :).  Anyway, I took it apart, and also read around about my issue and it seems the capacitors have gone bad, at least some of them.  However, I also noticed some white elastic stuff all over the board.  Some of them are sticking two capacitors together and to the board, but I also see some from where power socket connects to the board.  My question is, what is the white stuff?  Should I replace all capacitors that have white stuff around it, and should I also replace the power socket part?  Or should I just replace the bulging capacitors and leave it at that?  UPDATE:


We're encountering scrolling issues with Excel 2013 (and 2016).  What we mean by that is graphic distortions (blocks of black) appearing on the worksheet during the scroll action.  It happens almost exclusively on the externally attached monitor.  Even after the scrolling action is finished the blocks of blacks will persist and will obscure the data in the cells. Generally only opening the worksheet anew will correct the issue (until scrolling is once again initiated)  This is on a new Dell XPS 15 (9550) running Windows 10. The monitor is a Dell U2717D connected via the HDMI.  We've done quite a bit of troubleshooting but before describing in detail we wanted to know if anybody had seen something similar?

My secondary screen doesn't display Excel properly: it has gray, black and white boxes and lines everywhere. As I scroll up and down, or zoom in and out, the boxes disappear and and then reappear in different places. I have tried upgrading from Excel 2013 to Excel 2016, but the issue is the same.    (Click image to enlarge)  Laptop: Dell XPS 13, Intel HD 520 Monitor: Dell U27"


This one has always bothered me.  Is this sentence correct?     He shivered, thinking about his and Anya’s first time in the hospital.   It feels awkward, but there's a need to refer to their shared experience.  This would also apply to something like:     I shivered, thinking about mine and Anya's first time in the hospital.   Again, it clunks, but I can't see an alternative.

I just stumbled upon a :     My wife and I's seafood collaboration dinner. How does it look?   Sure enough, the top comment immediately points out that it should be "my wife's and my". However, a cross-post to the Grammar subreddit produced :     It's fine as it is written. "my wife and I" is a noun phrase, functioning as a subjective pronoun in the singular and made possessive with the apostrophe. It is exactly the same as "our".      It seems weird because you would never use "I's" on its own but it is not on its own here - it is part of a noun phrase.   That's a rather intriguing argument. Does it hold any water?


Here, I ask how to geometrically prove the limit  \begin{equation}\lim_{x \to 0}\frac{1-\cos{x}}{x}\end{equation}  using squeeze theorem. I see so many proofs for the other important limit \begin{equation}\lim_{x \to 0} \frac{\sin{x}}{x}\end{equation} But it seems that no one discussed the first one yet.

How do I find:  $$ \lim_{x\to0}\frac{1-\cos(x)}{x} $$  Using the squeeze theorem.  Particularly, how would I arrive at its bounding functions?   If possible, please try not to use derivatives.


I am attempting to install handbrake by using the below commands:  sudo add-apt-repository ppa:stebbins/handbrake-releases  sudo apt-get update sudo apt-get install handbrake-gtk   Which throws an error of:     Reading package lists... Done   Building dependency tree   Reading state information... Done   Some packages could not be installed. This may mean that you have   requested an impossible situation or if you are using the unstable   distribution that some required packages have not yet been created   or been moved out of Incoming.   The following information may help to resolve the situation:      The following packages have unmet dependencies:    handbrake-gtk : Depends: libmp3lame0 (>= 1:3.99.0) but 3.99.5+repack1-7+deb8u1 is to be installed                    Recommends: gstreamer1.0-x but it is not going to be installed   E: Unable to correct problems, you have held broken packages.   So I ran thebelow to see what was held broken packages:  sudo apt-mark showhold   Which returned nothing.  So I then decided to check on both gstreamer and libmp3lame0 and ran  sudo apt-get install libmp3lame0 sudo apt-get install gstreamer0.10-ffmpeg   Which presented a message of * program is already installed.  Then again I tried   sudo apt-get update --fix-missing   And the errors I got were:     Reading package lists... Done   Building dependency tree   Reading state information... Done   Some packages could not be installed. This may mean that you have   requested an impossible situation or if you are using the unstable   distribution that some required packages have not yet been created   or been moved out of Incoming.   The following information may help to resolve the situation:      The following packages have unmet dependencies:    handbrake-gtk : Depends: libmp3lame0 (>= 1:3.99.0) but 3.99.5+repack1-7+deb8u1 is to be installed                    Recommends: gstreamer1.0-x but it is not going to be installed   E: Unable to correct problems, you have held broken packages.   Lastly, I tried using sudo apt-get install -f handbrake-gtk which threw the same error as installing with no -f parameter.  With all that being said, what do I need to do in order to install handbrake?  And my system details are:     DistributerID: BunsenLabs   Description: BunsenLabs GNU/Linux 8.5 (Hydrogen)   Release: 8.5   Codename: Bunsen-Hydrogen   EDIT I am looking for a video convertor (i.e. re-encoder to resize and change the container on some cell phone videos)

I've added the ppa here  When I run sudo apt-get update, the software sources aren't found. I figured maybe they hadn't updated their repos to the newest version, so I changed the distro in Software Center to natty. Now when I try to install handbrake-gtk I get the message  handbrake-gtk : Depends: libnotify1 (>= 0.5.0) but it is not installable Depends: libnotify1-gtk2.10 but it is not installable  It looks like the only packages starting with libnotify are libnotify0.4-cil libnotify-bin libnotify-dev libnotify4 libnotify-cil-dev libnotify-doc  The only relevant one seemed like libnotify4, which is already installed. The CLI version installs fine. How can I install Handbrake?


I have created an assembly sequence and the viewport visibility of the components have been restricted along the animation. BUT I forgot to retrict the viewport visibility as well :(  Now I would like to link the viewport visibility with the viewport rendering only without affecting the rest of my animation. Is there any way to do this?   This script in the console doesn't create link:  "for ob in bpy.context.scene.objects: ob.hide_render = ob.hide" ; is there a script that would enable this?

I am working with a blender3d animation where I need some objects appear/hide at specific frames. I made all the work using the eye icon (visibility view-port) instead of camera icon (render-visibility) before discovering that they are not the same :(  Aside from animating everything again and hitting my head on the wall for not reading the whole manual, is there some python script or something to move the existing animation keyframes from one channel to the other?


Can you explain why we say AN NHS provision but A National Health provision. Or A UFO but An UNIDENTIFIED Fly Object. Are there any rules regarding the use of A or An when using initials such as ! In business FME ? Thanks

On a Physics specification, it says:     6.7 Know how to use two permanent magnets to produce a uniform magnetic field pattern.   Isn't it "produce an uniform magnetic field", or is the existing "produce a uniform magnetic field pattern" correct?


I have a scalar UDF that I know to be deterministic, however SQL doesn't.  Is there a way to declare it as deterministic so that I can then use it in a persisted computed column definition?  further clarification: The purpose of this exercise is that I need to harvest out specific values from an XML column on the row.  I can't use the value method of the xml column in my computed column definition, but I can use it in a UDF.  I know the xpath query in the value method will produce the same output give the same input so while I certainly understand that not all calls to value will be deterministic I want to assert that mine is.

I have an XML column in a table; I want to "promote" a certain value in that XML as a computed column and index it for faster searching. I have a function that takes in the XML information and outputs the element of interest, like this:  CREATE FUNCTION [dbo].[fComputeValue] (@data XML) RETURNS datetime WITH SCHEMABINDING AS BEGIN   RETURN @data.value('(/Metadata/Value[@Key="StartDate"])[1]', 'datetime') END    However when I try to create the computed column:  ALTER TABLE dbo.CustomMetadataTable ADD [StartDate] AS ([dbo].[fComputeValue]([CustomMetadataColumn])) PERSISTED   I get the following error:     Msg 4936, Level 16, State 1, Line 2   Computed column   'StartDate'   in table 'CustomMetadataTable' cannot be   persisted because the column is   non-deterministic.   It works if I:   work with varchar, int, double (i.e. other than datetime) values remove the PERSISTED keyword (but then I can't create an index on the column)   I should also mention that datetime values are in XSD datetime format. Any ideas? Thanks.


I am getting errors on the date command if I use the timezone designation stored in the system: $ date -d "2019-12-10 23:26:30 EDT +4 hours" date: invalid date ‘2019-12-10 23:26:30 EDT +4 hours’  $ date -d "2019-12-10 23:26:30 EST +4 hours" Wed Dec 11 03:26:30 EST 2019  Here's what I get when I ask to display the time zone information: $ date +"%Z %z" EDT -0400  Is this an error on my part or has something changed in the system? I am running Ubuntu 18.04.4 LTS x86_64 with kernel 5.7.1-050701-generic.

I want to check the time      Eastern Daylight Time   Time zone in Washington, DC, USA (GMT-4)   Thursday, May 9, 2019, 8:11 PM   However,   $ TZ="EDT" date Fri May 10 00:12:25 EDT 2019   "EST" works properly  $ TZ="EST" date Thu May  9 19:13:11 EST 2019   What's the problem?


My wife is a (Mexican national) her visa expires on June 3rd, can she cross into the US from Mexico on that day?  Or does her Visa expire at midnight on the 2nd or midnight on the 3rd? We will be driving across and returning same day.

I'm a bit surprised from my US Visa. I plan to go to a conference on 3rd of April. Amazingly though, the visa expiration date is written as April 3rd.  So what does that mean. Can I enter the US on April 3rd? or should I enter one day earlier?


I'm studying Tu's proof (p. 123) of theorem 11.13, but I just have a question about one detail.  He has that $f\colon N\to M$ is an embedding of a manifold of dimension $n$ in a manifold of dimension $m$, and he shows that given $p\in N$, there are local coordinates $(U, x^1, \dots, x^n)$ near $p$ and $(V, y^1, \dots, y^m)$ near $f(p)$ such that $f\colon U\to V$ has the form $$ (x^1, \dots, x^n) \mapsto (x^1, \dots, x^n, 0, \dots, 0). $$ He then says     Thus, $f(U)$ is defined in $V$ by the vanishing of the coordinates $y^{n+1}, \dots, y^m$.   I understand this statement to mean that $$ f(U) \cap V = \{ q\in V \mid y^{n+1}(q) = \dots = y^m(q) = 0\}. $$ However, I don't understand why this should be the case. Couldn't there be other points of $V$ at which the coordinates $y^{n+1}, \dots, y^m$ vanish?

I'm reading An Introduction to Manifolds (Tu) and got confused on p.123 Theorem 11.13. Let me briefly explain what was done before that.  The author defines an embedding between two manifolds $f: N\rightarrow M$ as an injective immersion (differential is injective everywhere) with the additional property that $f(N)$ as a subspace of $M$ is homeomorphic via $f$ to $N$. Then a canonical form theorem is proven, namely, that for any point $p \in N$, there are charts $(U,\phi = x^1, \ldots, x^n) \ni p$ and $(V,\psi = y^1, \ldots, y^m) \ni f(p)$, such that the transition map takes the following form:  $$\psi \circ f \circ \phi^{-1} : (r^1,\ldots,r^n) \mapsto (r^1,\ldots,r^n,0,\ldots,0).$$  (I guess it is implicitly assumed that $f(U) \subset V$).  Now in the process of proving that $f(N) \subset M$ is an , he states that $f(U) \subset V$ is defined by the vanishing of the coordinates $y^{n+1},\ldots,y^m$. I can prove that $$ f(U) \subset \{q \in V: y^{n+1}(q) = \cdots = y^m(q)\} $$ but not the reverse inclusion. Can anyone explain why this should be true?


I'm trying to do a two-lines-script to temporary set a specific nameserver. Therefore I just output 'nameserver XXX.XXX.XXX.XXX' to the /etc/resolv.conf file, because it gets overwritten next time anyways. The thing is, when I try to ask for the password via gksudo, I get an error because it tries to output the gksudo result to the file.  UPDATE:  My current file is now:  #!/bin/sh gksudo "bash -c \"echo 'nameserver XXX.XXX.XXX.XXX' >> /etc/resolv.conf\""   The command with sudo instead of gksudo and without the "" and \\ works as it should. Remains how to get it into the GUI prompt.

When using sudo to allow edits to files, I regularly get 'permission denied'.  For example, my mouse is jittery and sluggish, so I want to disable polling:  sudo echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf   I'm prompted for a password, and then get:  bash: /etc/modprobe.d/local.conf: Permission denied   So I tried to do a temporary change to disable polling by using:  sudo echo N> /sys/module/drm_kms_helper/parameters/poll   Yet again the system responded with:  bash: /sys/module/drm_kms_helper/parameters/poll: Permission denied   Any ideas?


I have been trying to center my flexbox by adding the code into my parent element but it does not work. What I have now is this  and I would like it to be at the center of my page. I would appreciate some guidance!   .content {   display: flex;   justify-content: center;   align-items: center;   width: 60%;   height: 70%;   box-shadow: 0px 0px 20px 10px rgba(112, 144, 176, 0.2);   margin: 0; }  .content1 {   height: 100%;   min-width: 0;   flex-grow: 2;   /*fills up the space */   flex-basis: 0; }  .content-2 {   height: 100%;   background-color: #7D8FA1;   flex-grow: 1;   flex-basis: 0; }  .photo1 {   width: 100%;   height: 100%; }

Book a consultation

Our team will bring your dream to life.

How can I horizontally center a
 within another
 using CSS?

Foo foo


When I try to download a free app it keeps sending me to the settings info about my card number. Then it says that there was a billing problem with a previous purchase. And to update my payment methods . I no longer have a credit card so how do I download free apps???

I just recently got an iPod Touch and wanted to download some free apps. The App Store wanted me to get an Apple ID, no problem. But now it's telling me to input a credit card. I don't have one, and anyway shouldn't need one to download free apps.   I did some searching here and on Google and found out that there should be a "None" option when selecting credit cards, but it was not there. I then read that it's disabled in some countried, so I tried telling iTunes that I'm in the US (I'm in Argentina), but still no "None" option. Later, I read that apparently this feature was disabled in iTunes 10, so I installed iTunes 9, but I still don't get the option.  How can I get the No Credit Card option to appear when downloading an app for the first time? It doesn't make sense that you should need a credit card for free stuff.  EDIT: To clarify, I already made an account in Apple's website, I'm looking for a way to be able to select "None" when buying an app through iTunes.


Is the reason that I cannot see that functionality that I have too low reputation?

Can someone please create the tag  on our site? We need to have it because        Foo is a recent/upcoming release / edition / model / episode of a popular, established OS / board game / bike brand / TV show   Foo is a hot new language / ingredient / game   we're currently using some other tag for questions about Foo, but it's causing ambiguity with a separate thing that's also named Foo      This is not a joke post. We get a lot of feature requests that ask for this or that tag to be created, and every time, a discussion ensues wherein people explain that there is no "tag creation department" and that community members create tags just by using them. I'm posting this "question" so that future requests of that type can be closed as a duplicate of this, saving time and eliminating redundant conversations for everyone involved.     See also:


The image from the wiki article on the stress energy tensor gives $T_{00}$ as $1/c^2$ times the energy density.  I believe this is incorrect and that the $1/c^2$ factor should be dropped.  Am I missing something?

I'm trying to understand the energy-momentum tensor $T^{\mu\nu}$ but I'm confused about the units. My textbook says the components of $T^{\mu\nu}$ are $\mathrm{Jm^{-3}}$. Four-momentum is is given by$$P^{\mu}=\left(E/c,\mathbf{p}\right)=\left(E/c,p_{x},p_{y},p_{z}\right)$$  The $E/c$ component of $P^{\mu}$ has units $\mathrm{Jsm^{-1}}$. The definition of $T^{\mu\nu}$ is “the rate of flow of the $\mu$ component of four-momentum across a surface of constant $\nu$.” Using this definition, how do you get the rate of flow of the $E/c$ component of four-momentum across a surface of constant time (ie the $T^{00}$ component) to have the correct units of $\mathrm{Jm^{-3}}$? Surely you need to multiply $E/c$ by something with $\mathrm{s^{-1}m^{-2}}$ units, but what exactly?  Thank you


I made a light beam, very similar to this: , but for some reason I can't render it. If I switch to rendered view mode, I see everything in place, but when I render it, there's nothing in place of the beam, except for some lighter and yellower rain drops. on the top half, you can see 3d rendered view mode, on the bottom half, you can see actual rendered image. I have checked in outliner, that everything should render (which is also visible from the image). Here is my nodesetup:  I am using cycles render.

Bit of an issue here, trying to render this glass scene    Looks fine in the viewport, but when I hit render    Does anyone know the cause of different view port and final render, and how to fix it?  Here's my


I have a unix string. And want to display that in tableau date format which expects 5 arguments   import dataextract as tde from datetime import datetime  tdefile=tde.Extract('USCSVExtract.tde') tableDef.addColumn('CreationDate', tde.Type.DATE)  date_object = datetime.strptime(story.CreationDate, '%Y-%m-%d-%H:%M:%S.Z') newrow.setDate(3,date_object) table.insert(newrow) tdefile.close()   value of story.CreationDate is 2014-10-31T20:02:36.622Z  I am unable to figure out T20:02:36.622Z this part

I need to parse  strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type.  I have found  in the Python standard library, but it is not very convenient.  What is the best way to do this?


Where can you post questions about optimizing code?  Like I want to post a question about a piece of C code I have written and then solicit input for how to make it execute faster on various platforms. Is there such a Stack Exchange site?

Possible Duplicate:          Which Stack Exchange site is best for code review?  Suppose I have a question like:     Is the following code a proper solution to <my problem>?   <Code>  On which (if any) Stack Exchange site would this question be most appropriately asked? Is it wrong to ask code-review type questions like this?


I have question regarding work arrangement for remote work from India for US company.   My scenario. I am currently employed on H1B with a Healthcare organization based out of Indiana, US. My work visa expires in June 2018 following which I will move back to India. My employer is wanting to secure my project consulting services as independent contractor. I am setting up a retainer agreement with monthly payment paid directly to my savings account. Given all this,    I am not forming a LLC or corporation. I will be the sole proprietor and no other legality. Any issues with that approach?  Other form aside from W8BEN do I need to submit to my HR such as W9? I know I need to submit W8BEN so they don't withhold any federal/state/local taxes and such, but what about Medicare and Social security taxes? What forms are required to stop withholding from that aspect or am I liable to pay those? Will I get 1099 from them towards end of year? For employers convenience, I would leave my US bank account running and request payments routed to it just as it does today and transfer to Indian bank account? Or should I apply for NRE/NRO? Which is the best option and any legal issues?   Any guidance will be much appreciated. Thank you in advance!

I am working from India for a US company and as per my knowledge I am not liable to pay any tax to US govt.  My first question is can I have them deposit my pay check in US account without any deduction of taxes. I think I need to fill W8-BEN form for this. Please advise.  My second question is what kind of taxes I need to pay in India as I am working as a independent contractor ? DO i need to fill any paperwork and how these taxes will be calculated ?  Please advise.


In the following sentence, are the words that and which interchangeable?  In general, where to put that and where to put which? The sentence: At the end of this course, students will be able to   Analyze circuits that function as filters.  Analyze circuits which function as filters.

When is it appropriate to use that as opposed to which with relative clauses?


I occasionally see the Windows command line window open and close quickly after. I recently formatted, and I'm seeing the issue again.  It's irrationally annoying me, and I was wondering if there's a way to find out what's causing it.

I keep seeing a console window pop up for a fraction of a second every couple of hours. Seems random, I can't pin it to any one particular event. Is there any way I can trap the window and see what it's doing?  I'm on Win 10, latest updates, Norton.


I have an issue in my project, where I get use of undefined type AssetManager. I have been stuck with this error for 3 days now.      #pragma once #include "Components.h" #include "SDL.h" #include "Animation.h" #include "TextureManager.h" #include "AssetManager.h" #include"Game.h" #include <map> class SpriteComponent :public Component { private:     TransformComponent *transform;     SDL_Rect srcRect, destRect;     SDL_Texture *texture;     bool animated = false;     int frames = 0;     int speed = 100;      int animIndex = 0; public:     SpriteComponent() = default;     std::map<const char*, Animation>animations;     SDL_RendererFlip spriteFlip = SDL_FLIP_NONE;     SpriteComponent(std::string id, bool animate) {         setTexture(id);         Animation idle = Animation(100, 3, 0),             walk = Animation(100, 8, 1);         animations["idle"] = idle;         animations["walk"] = walk;         play("idle");         animated = animate;     }     void setTexture(std::string id) {         texture = Game::assets->getTexture(id);     } };   Here is the code of the Game.h, knowing I included AssetManager.h inside Game.cpp:   #include<SDL.h> #include<iostream> #include<SDL_image.h> #include<vector> class AssetManager; class Game {...}

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


I'm trying to put two images with the subcaption package side by side in an enumerate environement. This works fine, however the indent is not correct. Here is my code:  \documentclass[10pt,a5paper]{book} \usepackage[demo]{graphicx} \usepackage{epstopdf} \usepackage{subcaption} \usepackage{enumitem}  \begin{document}  \begin{enumerate}[label=\alph*)] \item first item \item second item \item     \begin{figure}[htb!]     \centering     \begin{subfigure}[b]{0.40\linewidth}         \includegraphics[width=\linewidth]{figures/fig1.eps}         \caption{}         \label{fig1}     \end{subfigure}     \hspace{0.05\textwidth}     \begin{subfigure}[b]{0.40\linewidth}         \includegraphics[width=\linewidth]{figures/fig2.eps}         \caption{}         \label{fig2}     \end{subfigure}     \caption{(a) fig1 (b) fig2}     \label{fig1and2}     \end{figure} \end{enumerate}  \end{document}   Similar problems were discussed here:   (I do not want to use the subfig package as it stands in conflict with subcaption package)   (only one image is subject to the procedure)  Thank you for your help!

How can I insert a figure within an itemize environment so that it's centered within the item, not the entire text width? I tried it with the figure environment first, but that gave me the figure too far on the left. Then I tried it with the center environment, but then I get the same problem with the caption (instead of the figure).  \documentclass[12pt]{article} \usepackage{caption} \usepackage{tikz} \usepackage{blindtext}  \begin{document} \begin{itemize}     \item \blindtext     \begin{center}         \captionsetup{type=figure}         \begin{tikzpicture}         \clip(-5.686675053232457,-3.16893917565149) rectangle (5.579414724686105,0.6921754200738994);         \draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105]plot(\x,{(--4.514220105043796-1.8219356725415592*\x)/1.894960446786564});         \draw [line width=1.2pt,dash pattern=on 4pt off 4pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--1.6188066144426525-1.0979714604086213*\x)/-0.3751399196759637});         \draw [line width=1.2pt,dash pattern=on 4pt off 4pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--11.463481791986391--1.2426776436313691*\x)/-5.670646727250561});         \draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--0.4039090361160175--0.6586822831185679*\x)/-0.27723191082856635});         \draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(-2.9955647165449215--0.8716146065783191*\x)/4.89799733746727});             \end{tikzpicture}         \caption{blablablablablablablablablablablablablablablablablablabla}     \end{center} \end{itemize} \end{document}   Update: I think this could be a solution:  \begin{itemize}     \item \blindtext     \bigbreak     \begin{minipage}{\linewidth}         \centering         \begin{tikzpicture}         \clip(-5.686675053232457,-3.16893917565149) rectangle (5.579414724686105,0.6921754200738994);         \draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105]plot(\x,{(--4.514220105043796-1.8219356725415592*\x)/1.894960446786564});         \draw [line width=1.2pt,dash pattern=on 4pt off 4pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--1.6188066144426525-1.0979714604086213*\x)/-0.3751399196759637});         \draw [line width=1.2pt,dash pattern=on 4pt off 4pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--11.463481791986391--1.2426776436313691*\x)/-5.670646727250561});         \draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(--0.4039090361160175--0.6586822831185679*\x)/-0.27723191082856635});         \draw [line width=1.2pt,domain=-5.686675053232457:9.579414724686105] plot(\x,{(-2.9955647165449215--0.8716146065783191*\x)/4.89799733746727});             \end{tikzpicture}         \captionsetup{type=figure}         \caption{blablablablablablablablablablablablablablablabla}     \end{minipage}     \bigbreak \end{itemize}


Why was there a "beam war" between Harry and Voldemort in their final battle?  The only canon explanation we have for that phenomenon in-universe is Priori Incantatem, which can only happen if the combatants are using wands whose cores came from the same source, and in this battle, Voldy is not using his wand, he's using the Elder Wand.  For that matter, how did a disarming spell rebound the Avada Kadavra back at Voldemort? I get that the Elder Wand wouldn't kill its real master, but as Moody states in the 4th book: the Killing Curse is unblockable.

As wielder of an elder wand that belonged to Harry, during Voldemort’s Last Stand, there are two instances of Priori Incantatem occurring, back to back.  Basically, the current order of events makes total sense. Since Nagini was the last horcrux, when the body died, the fragment of Voldemort’s soul locked in it was released. This disrupted the first instance of Priori Incantatem, and Voldemort was now significantly weaker than Harry – so Harry won. Naturally, the Elder Wand’s killing spell was reflected back on Voldemort because of Priori Incantatem outcome.   But, if Voldemort was just told by Harry that the Elder Wand wouldn’t work against Harry because it belonged to Harry, and was a wand that would win any duel for its master, why would Voldemort willingly try and continue to use it? This is doubly so, since after he had cast the killing spell on Harry once it had only torn Voldemort’s soul from Harry’s body – wouldn’t that even imply that the Elder Wand would realistically refuse almost any attempted direct harm against its owner?  Also, wouldn’t a first refusal of the Elder Wand to kill it’s own master also imply an additional refusal even if Voldemort had won either of the Priori Incantatem matches (in which case, the worst that could happen in this line of thinking is, Voldemort has Harry’s wand since Harry’s spell is Expelliarmus)?


How can I calculate this limit? $$\lim_{n\rightarrow\infty} \frac{7^{\sqrt{n}}\cdot(n/2)!\cdot(n/2)!}{n!} $$    I thought to try the ratio test, but I don't know how to do it because that I get $(\frac{n+1}{2})!$ and $(\frac{n}{2})!$ such that it's not define.

How can I calculate this limit? $$\lim_{n\rightarrow\infty} \frac{7^{\sqrt{n+1}-\sqrt{n}}\cdot(\frac{n+1}{2})!\cdot(\frac{n+1}{2})!}{(n+1)\cdot(\frac{n}{2})!\cdot(\frac{n}{2})!}$$ I don't have idea and I will be happy for help.


It happened many times that while I was submitting an edit to a question, someone else edited the same question (to improve code formatting, to correct a typo in the title, etc.) and got his edit approved. So, my edit became irrelevant and useless.   In this case, I think it could be useful to be able to cancel my own edits while it's still pending review.

Edits made by users who do not have edit privileges are placed in a queue until it is peer reviewed.  E.g., I edited someone else's answer. but changed my mind. If I'd edited my own question/answer, there would be a "Rollback" button, but there's no such button in the scenario I'm describing (at least none that I can see).  This is more relevant today because users can only have at most five edits waiting in the queue, and allowing one to cancel an edit would permit them to free up one of their five pending edits for something else.  Is there a way to remove one's edit from the peer review queue?


Why aren't there moderator elections here on Meta.SE? It seems to be moderated only by employees. I know that there aren't elections because  it shows no election history. Is there a reason for this? Should there be elections here?

I  am able to view the Stack Overflow site moderators by clicking on this    But when I search the same in meta.stackexchange, it does not display the site moderators.    The below message is displayed      We believe moderation starts with the community itself, so in addition   to privileges earned through reputation, we periodically hold   democratic moderator elections.      Please see A Theory of Moderation for information on our moderation   philosophy   My Questions:   Are there restrictions to view the site moderators in meta.Stackexchange? How does the above message make sense when viewing the moderators? Can someone explain this to me?


I'm  importing a string from a file and the string is "Computer_Made". If I execute this code, though, it does not print "The computer is already made!" Any ideas?  if (data=="Computer_Made")     {     computer=true;     System.out.println("The computer is already made!");     }

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


Let $\omega \in \Omega^k(M)$ and $X_i \in \Gamma(TM)$. In Spivak Volume I page 213 the exterior derivative is given invariantly by the formula \begin{align*}d \omega(X_0, \ldots, X_k) = & \sum_i (-1)^i X_i . (\omega(X_0, \ldots, \hat{X_i}, \ldots, X_k)) \\ &+ \sum_{i<j} (-1)^{i+j} \omega([X_i, X_j], X_0, \ldots, \hat{X_i}, \ldots, \hat{X_j}, \ldots, X_k) \\ \end{align*} whereas in Kobayashi and Nomizu Volume I page 26 the exterior derivative is given by almost the same formula, but with a factor of $\frac{1}{k+1}$ in front of the sums: \begin{align*}d \omega(X_0, \ldots, X_k) = & \frac{1}{k+1}\sum_i (-1)^i X_i . (\omega(X_0, \ldots, \hat{X_i}, \ldots, X_k)) \\ & + \frac{1}{k+1} \sum_{i<j} (-1)^{i+j} \omega([X_i, X_j], X_0, \ldots, \hat{X_i}, \ldots, \hat{X_j}, \ldots, X_k) \\ \end{align*} I'm confused about where this extra factor is coming from. Even if Spivak and Kobayashi and Nomizu use different conventions for the wedge product, shouldn't the invariant formula for the wedge product be the same?

In Helgason, "Differential Geometry, Lie Groups and Symmetric Spaces"  we have the formula for the exterior derivative  $(p+1)d\omega(X_{1}, \ldots X_{p+1})=\Sigma_{i=1}^{p+1} (-1)^{i+1} X_{i} \cdot \omega(X_{1}, \ldots , \hat{X_{i}}, \ldots X_{p+1})+\Sigma_{i<j} (-1)^{i+j}\omega([X_{i}, X_{j}], X_{1}, \ldots , \hat{X_{i}}, \ldots \hat{X_{j}}, \ldots , X_{p+1})$  but in other sources on-line they have the same formula without the factor of $p+1$ on the left-hand side.  Are there two different definitions of the exterior derivative, or is there an error in Helgason?


I am working with a time-series dataset that is based on demand-supply dynamics with variables: Production, Ending Stocks, Exports, Imports etc. I was working on a regression with this data and wanted to find the relative importance of regressors using relaimpo package in R. However, I soon realized I can't use regression setting because of near to perfect collinearity in my dataset - the standard errors will be inflated and hence will be the relative importance of each regressor. Is there a way to go around this? Or, can I use any other method (instead of regression)? Any suggestions will be useful.


I have a problem that makes me very confused...  I have two tensors that must be multiply. A is second order tensor and B is fourth order tensor. I know when multiplying two tensor with double dot product (:) that means inner product, the order of result will be decrease two times. So now we must have a second order tensor for result. but when I write this code in Matlab it has an error: Matrix dimensions must agree. So how can I solve this problem? Please Help me if you know anything about this. Thanks for your attention.

I have two tensors that i must calculate double dot product. matrix A is rank 2  and matrix B is rank 4. I want to multiply them with Matlab and I know in Matlab it becomes: A : B = trace (A*B) but it has one error and it says: Inner matrix dimensions must agree So how can I solve this problem? anybody help me? Thanks


Chrome is fast and all, but seriously?    I only have 3 regular tabs open and the settings tab. I'd trade a little speed for some RAM. How can I make Chrome use less memory?  Update  The about memory page:

Google Chrome is the only program on my computer that can freeze my mouse.  When loading multiple tabs at once, the mouse pointer will become unresponsive, and nothing is moving on my screen.  I've never seen any other program do this.  My PC usually emits a little beep when it's done thinking.  This happens on Windows 7 on every single computer that I own.  I don't own expensive hardware, but I have Core i3's and i5's with plentiful RAM.  I know that Chrome runs as multiple processes (one for each tab I believe.)  Could this cause the issue?  Are the processes running at a higher priority than, say, the mouse drivers?  This isn't a huge problem, but I am curious about the technical reasons that cause this phenomenon.  Thanks!


I had a nice footer that I used for a letter, and wanted to reuse it in an article in which I want to include title, author and date as well...  Now I find that if I include the title, author and date, my footer disappears... Why is this happening? How do I get it back?  MWE:  \documentclass[10pt,twocolumn]{article} \usepackage{lipsum} % Footer \usepackage{fancyhdr,lastpage} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \setlength{\footskip}{1cm} \fancyfoot[L]{\textbf{Lorem ipsum footer}} \fancyfoot[R]{\thepage\ of \pageref{LastPage}}   %\author{John Doe} %\date{\today} %\title{Lorem ipsum text}   \begin{document} %\maketitle \begin{abstract} \lipsum[1] \end{abstract} \section{Introduction} \lipsum[1-7] \end{document}   See the footer disappear if you uncomment title, author, date, and maketitle

In the LaTeX document pasted below, I still see page numbers upon compiling, even though I've included a \pagestyle{empty} command below the \maketitle command. Any ideas what I'm doing wrong? Thanks in advance.  \title{Thesis Abstracts} \author{         Kurt Han Peek } \date{\today}  \documentclass[a4paper,11pt]{article} \usepackage{graphicx} \usepackage[margin=2cm]{geometry}  \begin{document} \maketitle \pagestyle{empty}  \section*{An Analysis of the Effects of Digital Phase Errors on the Performance of a FMCW-Doppler Radar} In modern frequency-modulated continuous-wave (FMCW) radars, the transmitter is increasingly being implemented using direct digital chirp synthesis (DDCS), which provides improvements in sweep linearity, stability, precision, agility, and versatility over analog techniques. Its main limitations are errors due to sampling of the modulating signal, phase truncation, and digital-to-analog converter (DAC) quantization, which produce spurious signals due to their deterministic nature. This thesis presents an analysis and simulation of the effect of two sources of digital phase errors -- namely, sampling of the modulating signal and phase truncation -- on the performance of a FMCW-Doppler transceiver employing a DDCS in its transmitter. An upper bound for the amplitude of spurious targets resulting from these digital phase errors is established. Further, it is shown that provided the phase errors are periodic with the sweep period, the spurious targets are not offset from the target in Doppler. An algorithm for selecting the digital chirp parameters of a DDCS so as to ensure periodic and phase-continuous sweep transitions, which guarantee periodic phase errors and reduce `spectral splatter', is devised. Finally, we investigate parallels of FMCW radar in the optical domain, and consider the fundamental question whether range resolution is fundamentally limited by the bandwidth of a transmitted signal, or its carrier frequency.  \section*{Estimation and Compensation of Frequency Sweep Nonlinearity in FMCW radar} One of the main issues limiting the range resolution of linear frequency-modulated continuous-wave (FMCW) radars is nonlinearity of frequency sweep, which results in degradation of contrast and range resolution, especially at long ranges. Two novel, slightly different, methods to correct for frequency sweep nonlinearity by digital post-processing of the deramped signal were introduced independently by Burgos-Garcia et al. (Burgos-Garcia, Castillo et al. 2003) and Meta et al. (Meta, Hoogeboom et al. 2006). In these publications, however, no formal proof of the techniques was given, and no limitations were described. In this thesis, we prove that the algorithm of Meta is exact for temporally infinite chirps, and remains valid for finite chirps with time-bandwidth products which are large compared to unity, provided the maximum frequency component of the phase error function is small compared to the square root of the nominal chirp rate. It is also shown that the algorithm of Meta reduces to that of Burgos-Garcia in this limit. A digital implementation of both methods described. Finally, we propose a novel method to measure the systematic phase errors which are required as input to the compensation algorithm.  \end{document}


How do I evaluate the integral:  $$ \int_0^1 \frac{\ln(1+x)}{x} dx $$  in a simple way, without using complex methods?

There is supposed to be a clean solution to the integral below, maybe involving some symmetry $$ \int^1_0 \frac{\ln(1+x)}{x}dx$$ I have tried integration by parts as followed: $\ln(x+1)=u$ ,$\frac{1}{x+1} dx = du$ and also $\frac{1}{x}dx=dv$, $\ln(x)=v$. Then, the integral becomes $$\int^1_0 \frac{\ln(1+x)}{x}dx=- \int^1_0 \frac{\ln x}{1+x}dx$$ which does not make this easier. I have also tried using the identity $\int_a^bf(x)~dx=\int_a^bf(a+b-x)~dx$. So let $I = \int^1_0 \frac{\ln(1+x)}{x}dx$ and also $I = \int^1_0 \frac{\ln(2-x)}{1-x}  $. Then $$2I= \int^1_0 \ln(1+x)+\ln(2-x)$$ which is not any easier, either. Any ideas? :)


Prove or disprove  that the ring $\mathbb{Z}[x]/(x^2-1)$ is an   integral domain.   It is easy to see that $\mathbb{Z}[x]/(f)=\{P+(f): \deg(P)<\deg(f)\}$. If $\deg(P) \geq \deg(f)$, there exists $q,r \in \mathbb{Z}[x]$ such that $P=qf+r$ with $r=0$ or $\deg(r)< \deg(f) \implies P+(f)=qf+r+(f)=r+(f)$. So $\mathbb{Z}[x]/(f) = \{0,1, x, (x-1), (x+1)\}$. But $(x-1)(x+1)= x^2-1 \equiv 0 \mod (x^2-1)$.  Conclusion : Our ring is not an integral domain.  Question : Am I right? Otherwise, is anyone could help me on the ambiguity of this problem?

I have a doubt on something. I have a theorem that says that if $R$ is a ring, then $R/I$ is a domain iff $I$ is prime. Since $X^2-1$ is note prime, $\mathbb Z[X]/(X^2-1)$ is not a domain. But, $X^2-1=(X-1)(X+1)$, and since $X-1$ and $X+1$ are prime in $\mathbb Z[X]$, there are coprime, and thus, by the chinese remainder $$\mathbb Z[X]/(X^2-1)\cong \mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1),$$ since $\mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1)$ is a domain, then so is $\mathbb Z[X/(X^2-1)$. What is the mistakes here ?


How does one design an op amp circuit which calculates the logarithm of the incoming voltage? I.E. if \$V_{in}\$ is the voltage at the input of the circuit and \$V_{out}\$ is the voltage at the output of the circuit, then the relationship between the two should be $$ V_{out}=\log_{10}\left(\frac{V_{in}}{V_{ref}}\right), $$ where \$V_{ref}\$ is some reference voltage such as 1 V.

i mean, it is possible to generate with Op amps, or diodes, etc, to generate complex exponential and logarithmic functions, like one can create sinusoidal signals using a Wien bridge oscillator.  Thank you very much, if it does what devices can help me on that?


The first law of thermodynamics states that energy cannot be created. If that's the case, how did the universe come into existence? I mean, doesn't that require energy to be created?   Excuse my ignorance if this question seems a bit idiotic. I haven't read much in thermodynamics, hence my lack of understanding.

Did the law of conservation of energy apply to the earliest moments of the Big Bang? If so, what theoretical physics supports this?   I hear that Einstein's theory of relativity disputes the law of conservation of energy- so does that mean the law is false, or only some aspect of it?


I just saw this, I have two Stackoverflow profiles, one tied to Facebook & one tied to Gmail. Is there a way to merge?

I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit "" in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms)


I just realized a few days ago that Sauron's One Ring is kind-of like a horcrux, in that Sauron can't ever be totally destroyed as long as the One Ring exists.  That set me to wondering: did Tolkien invent that idea, or did he take it from some other legend?  How far back does the "horcrux" idea go?  (Not taking away from JKR the originality of murdering someone as the way to make a horcrux.)  [edit: For purposes of discussion, I am asking about a device/means to allow one to survive death, which requires one to put a large part of one's power/soul into the device, but which does not change one's mode of existence.]  [edit: The interesting  is different.  First, it is asking if there is a logical line of reasoning or literary transition for phylacteries (boxes of scripture worn on the forehead and arm) morphing into soul jars (containers for souls).  It isn't asking for the origin of the "horcrux" (soul jar) idea.  Second, the phylacteries in the question are used by liches (sorcerers who have turned themselves into undead) in D&D, so the other question isn't even asking about soul jars in general.  Third, Sauron's Ring and Voldemort's horcruxes did not change them into undead creatures, but rather allowed them to survive having their bodies killed.  So the phylacteries of the other question are very different sorts of soul jars.  Hope this edit clarifies.]

The original use of  is from      Ancient Greek φυλακτήριον phylacterion, form of phylássein, φυλάσσειν meaning “to guard, protect”   —    and was originally meant to refer to ‘Tefillin’, boxes that contain script from the Torah.   The first time I heard of it, though, it was as the ‘soul jar’ of a . I can’t find a reference for this being the first time it was used to mean ‘Soul Jar’. None of the examples of  on Wikipedia reference a phylactery at all.  Box of Scripture to Soul Jar seems like a bit of a leap, though not an unimaginable one.  Were there any intervening steps? If not, can it be pinned down to a design choice of a D&D rules writer?  What is its first use in fiction?


By the Riesz representation theorem, we know that the Hilbert space $\mathcal{H}$ is isomorphic to his dual. Is the converse true ? Does the fact that a Banach space $E$ is isomorphic to his dual implies that $E$ is an Hilbert space ? If it is not the case, does anyone have an example ?

Let $X$ be a Banach space and suppose that $X$ is isometric to its continuous dual space $X^*$. Must $X$ be hilbertable in the sense that there exists an inner product which induces the norm on $X$? The converse of this statement is the Riesz representation theorem for hilbert spaces; I am wondering if the theorem can be stengthened to "if and only if".


What is the difference between using to ~ and verbing after "it's like". For example,   What it's like to leave a company you started What it's like leaving a company you started

Which is more grammatically correct:  "I like to speak Japanese."   or   "I like speaking Japanese."   Also, do they mean the same thing? Why is one better than the other, if they differ?


Let's say I'm . The CloseAsOffTopicReasonTypes table has a nice 'show contents' icon, which saves me from having to execute SELECT * FROM CloseAsOffTopicReasonTypes:    but when you click it, you always see the contents of the table on .    I'd like for it to show the contents from the database of the currently selected site.  Another table which has this problem is PostNoticeTypes, though it's less severe here; there are a few sites like ,  and  which have their own custom post notices.

I was looking at some of the *-Types tables in the Stack Exchange Data Explorer. specially CloseAsOffTopicReasonTypes.  As I'm lazy I clicked the (i) that is found in the right hand side of the SEDE query editor and to my surprise it listed values up to id = 13 where a select * from CloseAsOffTopicReasonTypes returned values with id = 16.     On closer inspection I believe the current values shown in the meta data are from Software Engineering.SE. I think that is because in the [Data.StackExchange] database 1 returns programmers as the first row. It populates the TablesCache with the values found in that database.  It looks like the Application setting for PerSite is false as I also maintain that same value here:   While it was reasonable to have that value set to false when all Types tables were the same across all databases, with the addition of a Types table that does have per site content, the PerSite setting has to be reconsidered.   I propose the PerSite  setting is switched to true. This can be done in the appsettings.config or in the AppSettings table but requires a restart as the value is never rechecked at runtime. Setting the value to true will incur a higher memory load as now the values of the  %Types tables of each of the 350 databases has to be kept in memory.  It is a minor issue as only two tables are affected at the moment, CloseAsOffTopicReasonTypes and PostNoticeTypes. None of the other *Types tables seem to have per site specific content. If the setting is left as is, consider this report to be the sign-post for future confused users.     1.  that select top  isn't stable due to a lacking order by clause, that is maybe another issue that needs fixing


Background  On a large app, that is very popular, I've noticed that when we close a foreground service, on a very specific group of devices (OnePlus devices: 6, 6T,A6000 and a few others) and Android versions  (Android 9) , we got NPE:  Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference        at android.os.Parcel.createException + 1956(Parcel.java:1956)        at android.os.Parcel.readException + 1918(Parcel.java:1918)        at android.os.Parcel.readException + 1868(Parcel.java:1868)        at android.app.IActivityManager$Stub$Proxy.setServiceForeground + 5111(IActivityManager.java:5111)        at android.app.Service.stopForeground + 724(Service.java:724)        at android.app.Service.stopForeground + 710(Service.java:710)        ...   And the code that calls it is:      stopForeground(true) //crash here     stopSelf()   The problem  Since I don't have any of those devices, let alone Android 9 for them, I can't find the reason for this.  Since the app is so popular, and I see this issue exists only on those devices and Android versions, I suspect that indeed something is wrong only for them.  What I've found  Only thing I could do is to search for this issue over the Internet, but I couldn't find it.  The only similar thing is , but it talks about Android O, and we didn't get even a single crash event there.  I know that sadly various manufacturers have applied a bad behavior that kills apps even if they are in the foreground (written about ), but I didn't think that this could cause a crash...  The questions   Is there anything I can do to prevent it? The other place mentioned to use a wakeLock. Would that help? Maybe would using try-catch avoid this crash? But then what could happen? Would stopSelf alone make the service stop as usual? Or maybe I need to use try-catch on it as well? What is this exception anyway? I thought it would tell me about some invalid state, but instead I see NPE...

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


Write the equation of the circle with center at (-1,3) and passes through the point (2,-4).

No idea how to do this, I used to have these conic shapes committed to memory but I forget them already.   I am supposed to find an equation for the circle that has center $(-1, 4)$ and passes through $(3, -2)$.  I tried graphing it, but it didn't help since the point was not in a straight line with the center and I have no idea what the diameter is.


Suppose that you are ticket collector in Cinema office. It cost 50 dollars to watch a movie. There are 20 people in line. 10 people in that line have exactly 100 dollar bills and 10 people have exactly 50 dollar bill. Now, since it is early in morning,you do not have any change. So,the people should be arranged in such a way that the line goes on without any interruption. What are total number of ways to arrange people in such a way that line proceeds smoothly?  One valid combination:  50,100,50,100,50,100,50,100,50,100,50,100,50,100,50,100,50,100,50,100  An invalid one:  100,50,....,50  My take: I tried to do this problem for small number like 3,4,5. However,I see no pattern to generalize the result to more people.

There are $2 \cdot n$ people in the queue to the theater office; n people on only banknotes worth $20$ zlotys, and the remaining n people only have banknotes worth $10$ zlotys . At the beginning of the sale at the box office there is no money. Each person buys one ticket worth 10 zlotys.   If one with only $20$-zlotys banknotes is in the first of the queue, then he/she needs to wait for another guy with only 10-zlotys banknote to complete his/her transaction, because the ticket office does not have any change to offer at that time.  What is the probability that no one will wait for the change?  $A$ = no one will wait for the rest. $P (A) = 1-P (A ')$, that is, it subtracts the waiting persons from the whole and will leave me without waiting, but I do not know how to calculate it.


I'm trying to get access to root I use the command sudo su-  and others  for my user and it asks for the passowrd. Then when I type, nothing appears on screen. Then if I press enter, it accepts the empty space as password.

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


I was reading about complexities where n is the number of elements. I do some operation different ways and which results in these two different complexity. And have a doubt that which complexity is less with bit explanation.

I'd prefer as little formal definition as possible and simple mathematics.


I have text file that has got datas in "%02x " format. For example my text's content like "AA 00 11 CC...". I want to have bitmap from this text file.  I have tried many solutions about this. Firstly I have converted this datas to byte array like that;      Inputstream is = getResources().openRawResource(R.raw.ep2data);     InputStreamReader inputStreamReader = new InputStreamReader(is);     BufferedReader bufferedReader = new BufferedReader(inputStreamReader);      String line;     StringBuilder text = new StringBuilder();      try {          while ((line = bufferedReader.readLine()) != null) {              text.append(line);             text.append('\n');         }      } catch (IOException e) {          e.printStackTrace();     }      String s = text.toString();      //convert string to byte array     String[] tokens = s.split(" ");     Log.d("string array length", "" +tokens.length);     byte[] data = new byte[tokens.length];      for (int i = 0; i < tokens.length - 1; i++) {          data[i] = (byte) ((Character.digit(tokens[i].charAt(0), 16) << 4)                 + Character.digit(tokens[i].charAt(1), 16));      }      Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length, options);   As a result, I'm getting bitmap as null. So I can not create bitmap from this text. How can I create bitmap from text string. I have tried many solution but I couldn't get solution about this subject.


$$\int ydx + xdy=\int d(xy)$$   This is a common equality used for solving various questions, but many solutions just write this without any explanations. How do we derive that equation? (Limits aren’t really necessary, they can be added depending on the question. I just want a sort of general proof for this)

I've seen $d(xy) = y(dx) + x(dy)$, but I don't understand the principle behind it and memorizing it is lame.  Can anyone explain what is going on here?  For example from physics, $$F = {{dP} \over {dt}}$$ $$F = {{d(mv)} \over {dt}}$$ $$F = {{v(dm) + m(dv)} \over {dt}}$$ Since $$dm = 0$$  $$F = {{m(dv)} \over {dt}}$$ Since $$a = {{dv} \over {dt}}$$ $$F = ma$$


So I've done a two courses in undergrad quantum mechanics, the first began with wave mechanics and then went on to bras and kets, the second course went more into detail regarding bras, kets, hilbert spaces and so on (they retouched on wave mechanics towards the end). But near the end of the second course, they also went into density operators/matrices.  They were presented as another layer of abstraction on top of the more fundamental hilbert space, a convenient tool when dealing with classical statistic ensembles of pure states.  However, reading the textbook and other sources, I've seen it described as more fundamental than pure states, a natural description of subsystems of larger entangled systems, and having the very suggestive and appealing property that there is a one-to-one correspondence between states and operators, unlike in the hilbert space formalism where the correspondence is only up to a phase factor.  So, is there a description of quantum mechanics which takes density operators as the foundational objects, in the same way that the bra-ket formalism begins with rays of a complex space? If so, what does it look like, why isn't QM taught in terms of density operators, and where can I find resources to study it? Also, I have generally heard it is more awkward to work with than bras and kets, why is it?  Finally, if we are representing states by operators, and treating pure states as special cases of density operators, what are they operations on? Or is this just another case of representing abstract mathematical objects as operators for convenience, and there is no meaning to asking what they operate on?

In quantum mechanics, one makes the distinction between mixed states and pure states.  A classic example of a mixed state is a beam of photons in which 50% have spin in the positive $z$-direction and 50% have spin in the positive $x$-direction.  Note that this is not the same as a beam of photons, 100% of which are in the state $$ \frac{1}{\sqrt{2}}[\lvert z,+\rangle + \lvert x,+\rangle]. $$ It seems, however, that at least in principle, we could describe this beam of particles as a single pure state in a 'very large' Hilbert space, namely the Hilbert space that is the tensor product of all the $\sim 10^{23}$ particles (I think that's the proper order of magnitude at least).  So then, is the density operator a mathematical convenience, or are there other aspects of quantum mechanics that truly require the density operator to be a 'fundamental' object of the theory?  (If what I mean by this is at all unclear, please let me know in the comments, and I will do my best to clarify.)