Window 7 High Contrast = Invisible Text/Graphics - Desktop & Websites

When any High Contrast Theme is used in Windows 7 there are items both on the desktop, various programs, and especially on websites - (using Chrome, Firefox or Explorer browsers). I have altered colors in the Personalization settings and have not found any way to make these invisible graphics and text show up. The only solution I have found is to turn off the high contrast, which makes it nearly impossible for me to see the screen, especially difficult when filling out forms.


Are there disadvantages to iterating over a JavaScript array with a for in loop when I don't care about order?

I have this array declared. While you can possible tell that I'm playing with Google Maps, the contents of this array are not really important, it's just an array.  var mapData =[{"id":1,"name":"Love.Fish","address":"580 Darling Street, Rozelle, NSW","lat":-33.861034,"lng":151.171936,"type":"restaurant"},{"id":2,"name":"Young Henrys","address":"76 Wilford Street, Newtown, NSW","lat":-33.898113,"lng":151.174469,"type":"bar"},{"id":3,"name":"Hunter Gatherer","address":"Greenwood Plaza, 36 Blue St, North Sydney NSW","lat":-33.840282,"lng":151.207474,"type":"bar"},{"id":4,"name":"The Potting Shed","address":"7A, 2 Huntley Street, Alexandria, NSW","lat":-33.910751,"lng":151.194168,"type":"bar"},{"id":5,"name":"Nomad","address":"16 Foster Street, Surry Hills, NSW","lat":-33.879917,"lng":151.210449,"type":"bar"},{"id":6,"name":"Three Blue Ducks","address":"43 Macpherson Street, Bronte, NSW","lat":-33.906357,"lng":151.263763,"type":"restaurant"},{"id":7,"name":"Single Origin Roasters","address":"60-64 Reservoir Street, Surry Hills, NSW","lat":-33.881123,"lng":151.209656,"type":"restaurant"},{"id":8,"name":"Red Lantern","address":"60 Riley Street, Darlinghurst, NSW","lat":-33.874737,"lng":151.21553,"type":"restaurant"}];   Now later on, I want to get some information out of each of the objects in that array and I do so with a for in loop like so:  for(marker in mapData){     console.log(mapData[marker]); }   I understand that according to ,     for..in should not be used to iterate over an Array where index order is important.   But I don't really care about the order, so that being the case, are there any disadvantages to iterating over my array with a for in loop?


Feature selection before DNN classification

I have a dataset with 600 variables and 5000 observations which I want to use for a classification problem (sick/not sick) but I'm worried about multicollinearity so Im trying to figure out a good way to do some feature selection before running my neural network. Things I've considered are PCA and stacked auto-encoders. I'm kind of a n00b when it comes to ML and Deep learning though so I would love some advice on what methods I could/should apply?


I know that David Lynch's movies are all very deep and hard to grasp and that probably there is no simple answer to this question, as there are different ways to interpret the movie.   Still I would like to know, what is the main story behind Mulholland Drive and what is the most common interpretation of what it is about?  I watched it several times and read the 10 clues that Lynch gave to unlock the riddle, but I still don't think I understand the movie. Is it all a dream? A metaphor? Whats with the character switch? Does the appearance of the strange old couple has something to do with sexual abuse? What about the monster in the alley?  What the hell is going on in Mulholland Drive?


Pictures appear blank across Stack Exchange networks and dropdown

I navigate through Edit Profile & Settings > Change picture > Upload a new picture > Drag and drop my image or imgur URL > select Add picture.  My image now appears on the top-right and under Public information.  However, clicking Change picture again, from the dropdown, I can see the image is displaying the broken icon, because it is trying to show "" (doesn't load), rather than "" (loads fine).    Further, when I hit either Save... buttons at the bottom, which display Your profile has been saved successfully, when I Ctrl+Shift+R, the images appear blank in all my Stack Exchange networks.    This happens in several browsers (Chrome, Canary, FirefoxDev - current versions), in which I presume more.  I get the same behaviour trying in Stack Exchange Meta, Cognitive Sciences beta,  so presume the same for more networks.  I note, viewing my EXIF data on verexif.com gives There is no thumbnail. I feel this could be a possible cause, but likely not. I even tried to  to see, but the suggestions didn't work for me.  I have never experienced this behaviour before until now.  I have read , but imgur doesn't appear to be blocked, plus this doesn't relate solely to Stack Overflow, but all Stack Exchange networks.  If you can see the above 2 screenshots, the it appears not to be an issue with the imgur uploader.


This question is very similar to a previous post:   I am using MiKTeX 2.9 and TeXnicCenter to compose and execute my LaTeX file(s) on Windows 7. I am using a template from Elsevier to submit a journal article, but I am getting the LaTeX Error that File 'numcompress.sty' not found. This file is currently located in the same directory as the other elsarticle files: C:\Program Files (x86)\MikTex 2.9\tex\latex\elsarticle. I have actually followed the directions posted to the above question exactly:  but still have had no change in outcome.


Intuitive Understanding About the Implicit Function Theorem

In multivariable calculus, given a function like $F(x,y,z) =0$, the implicit function $z=f(x,y)$ exists if and only if $\frac{\partial F}{\partial z} \not = 0$. And the implicit function is given by $\frac{dz}{dy}=-\frac{\frac{\partial F}{\partial y}}{\frac{\partial F}{\partial z}}$.   The theorem can be proved by mathematical reasoning. But I want to know whether there is some intuitive understanding of the theorem, say geometry intuition in the three dimensional space, etc.


I have studied English extensively, yet I haven't seen various forms of the subjunctive ever, for example the third person singular and the negative form. They sound so wrong in my ears. Are they (the two forms of the subjunctive mentioned above) even used that often, or is it just me? Examples are:   It is necessary that he see a doctor (contrasted with the indicative he sees).  I recommend that they not enter the competition   The only ones that make sense to me are these three forms:   I suggest that he be removed If he were rich.... If I were rich...   For anyone who is wondering, here is a description of the subjunctive-mood, given in :  "The subjunctive in English is used to form sentences that do not describe known objective facts. These include statements about one's state of mind, such as opinion, belief, purpose, intention, or desire"  [Though it must be added for balance that different grammarians use the term 'subjunctive' (as metalanguage in English) in conflicting ways, some grammarians rejecting the term as inapplicable when analysing English.]


I have heard rumors that you can compile documents online, and more specifically that Google has a free online compiler, but I have never been able to find any. Is there a way to compile documents online, so that I can write and compile documents even if I don't have a TeX distribution installed on my computer?


Good afternoon. I want to try Ubuntu Phone OS. Is it possible to put the emulator on Ubuntu or Windows? Something like vmware or virtualBox. Thank you.


How to turn off folder write protection? It turns on automatically after disabling

I have a huge problem! Last week, i performed the newest Windows 10 update. Since then, on each folder im creating or each folder already created, the checkbox on the folder properties "Write protected" is always enabled. When I'm unchecking it and im applying the new settings, the write protection turns automatically back. I asked google, tried a tool to unlock folder and file protection, tried this link:  , but nothing helped! I run chkdsk with admin permission, I checked if my filesystem is NTFS, yes it is, no problems on my hard disk found. I tried the same on other devices, two laptops, but the same problem. Now I'm really helpless, so I thought asking here could help me. I also checked the permissions, i have full access, write and read access. Why do I need the box unchecked? Im writing a file sync programm in c# and now I'm getting always an: Unauthorized Access Exception, because of the write protection. One week ago i didn't have the problem. After the update, the trouble started. Could someone help me? Thx!


$15$ lines are drawn in a plane such that $4$ of them are parallel.  What is the maximum number of regions into which the plane is divided?  How many of the regions have finite area (bounded)?    My Attempt  The total number of regions that $n$ lines divides the plane into, is given by $\dfrac{n(n+1)}{2} +1$. So I got $\dfrac{15\cdot16}{2} + 1 = 121$. But $4$ lines are parallel. So instead of getting $\dfrac{4\cdot5}{2} + 1 = 11$ regions, we only get $4 + 1 = 5$ regions. So the actual number of regions are $121 - 11 + 5 = 115$  A single line divides the plane in $2$ infinite (unbounded) regions. So $15$ lines can give $30$ infinite regions. But $4$ of them are parallel. So we get only $5$ infinite regions instead of $8$. So the actual number of infinite regions are $30 - 8 + 5 = 27$. Hence, the total finite (bounded) regions are $115-27 = 88$.   While i got the answer to the second question as $88$ the original answer is $85$. Can someone please tell me where I am going wrong? Also if there is any better approach please let me know.


Disallow global anonymous bind with cn=config

With slapd.conf you could globally disable anonymous binding and require authentication with the following static directives:  disallow bind_anon require authc   How can I achieve the same global settings, but using the new cn=config live configuration method?


When reviewing Suggested Edits the output is marked using red and green background colors on the text. Sometimes this makes it hard to see the actual changes.  It would be nice if there was a button that turns off the diff color highlighting as long as the mouse is pressed on it (or hovers it or whatever), so one can switch fast between the "natural" look and the diff view.  Just to avoid misunderstandings: The color diff should stay the default view as it does a great job in helping to locate the changes, but it does not help in evaluating them.


I am using Drupal 7 and drush 7.4.0. How do I handle array variables with drush?  For example, I have a variable, social_sharing, for which  drush vget social_sharing    Produces:  facebook: facebook google_plus: google_plus linkedin: linkedin twitter: twitter pininterest: pininterest   Using a drush command,   How can I get the value of only facebook using drush vget? How can I delete one specific variable? for example if I want to remove google_plus from the list using drush vdel?


Does My Readiness Rating Change the Ending if it Decreases While I'm in the Last Mission

I was able to push my effective rating over 4000 before I started the final assault on Earth and received the "Master and Commander" trophy.  I then got to just after you are beamed up to the Citadel and saved.  Due to some personal issues I didn't get back to the game and now my Readiness rating is down to 60% (which BTW is the worst "feature" of this game).  Does anyone know if my effective rating was "locked" in when I started the assault or do I need to grind it back up to 80%?  It's also annoying you can't find this data without being on Normandy.  :-(


Aliases execution by script fails while manual alias execution succeeds without problem

I have executed a remote Bash script bash <(curl -s URL/script.sh | tr -d '\r') that does the following 3 actions:   Downloads another script with a list of aliases (aliases.sh) to current dir. Executes a source ./aliases.sh command. Executes one of the aliases in the list after their script was sourced. This alias is rss, aimed to restart the webserver service.   For some reason, alias execution by the script always fails, and yet, manual execution always succeeds.   The current state is that the rss alias (and all other aliases in he list actually) would be ignored and considered "nonexistent" when being executed by the script.sh even though their file aliases.sh is sourced and execution of rss and all other aliases succeeds perfectly if I execute them manually (typing rss and hit Enter).  Why is this "execution discrimination", so that script alias execution fails but manual alias execution succeeds?  I've reproduced this in a few different Ubuntu environments. I can't explain this and would appreciate your take on this.


Was wondering why Area51 doesn't show rep change like the other sites? 'Tis rather annoying having to go to Area51 to see that you've got a change in rep.


Unable to understand why gcd(bt+r,b)=gcd(b,r)

I am trying to understand greatest common divisor so If a=bt+r for integers t & r then why gcd(a,b)=gcd(b,r).I am unable to understand it.


I have seen and read many posts in regards lightning component errors and realized there are no questions actually asking how to debug them. I recently stumbled upon:         and decided to post this question in order to get a detailed step by step guide on doing so for lightning components hoping this will help others in the community (and myself as well).  I am aware there is excellent documentation in the developer docs and blogs:     by Peter Knolle   Additionally, if you would like to include any tools you use for doing so, such as:      By all means do so


I want hostile mobs to attack each other using commands. I know something like entity.setTarget will work, but I don't know where to put it (Where in the summon command).


I once saw a place one interesting question, the question is:  proof that if $\displaystyle\sum_{n=1}^{+\infty}a_n$ diverges, then $\displaystyle\sum_{n=1}^{+\infty}\frac{a_n}{a_1+\cdots+a_n}$ diverges.  I have no idea what to do.


Why do old platformers typically scroll to the right?

Lots of old platformers are only left-to-right-ish and they don't allow you to move viewport left.  I'm interested was it just a game design choice or it's due to some limitations back then.  I have a lot of possible reasons in my head, but I'm interested in actual one, so please consider reply with citation.  Not sure I'm in correct community with this question, sorry in advance.


(C++) (Link Error) Unresolved externals on template member function

I have a class that reads a file and stores the values found in a map, in memory. I'v declared a member function using templates, so that I can extract any value from a string.   ConfigReader.h  class ConfigReader {     private:         More Code...     public:         ...         template<typename vType>         vType GetValue(const char * key); };   ConfigReader.cpp  ...  template<typename vType> vType ConfigReader::GetValue(const char * key) {     stringstream buffer(GetStringValue(key));      vType extrValue;     buffer >> extrValue;      if(!buffer)         throw invalid_argument("Failed to extract the value!");      return extrValue; }   Main.cpp  int main() {     ...      try{         cout << "Encryption: " << boolalpha << config.GetValue<bool>("use_enc") << endl;      }catch(invalid_argument err){         cerr << "Error: " << err.what() << endl;      } }   I get the following link error:  1>Main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall ConfigReader::GetValue<bool>(char const *)" (??$GetValue@_N@ConfigReader@@QAE_NPBD@Z) referenced in function _main  1>..\Visual Studio 2017\Projects\...\Debug\FilePhraser.exe : fatal error LNK1120: 1 unresolved externals  Wich means that the function GetValue<bool>() hasn't been found.   Could you please explain me why the linker can't find that function ?


k litres of Milk delivery with minimum cost

Note: This is the exact same as a question asked 12 days ago but I do not understand the answer to that and I could not comment on the question so here we are.  is the link to that question. I think the answer is checking all the routes and the costs and then choosing the best one. Is that the best algorithm?  Assume that you are the CEO of a milk delivery company and want to deliver $k$ litres of milk to one of your customers. You can buy milk from another company. Then you should use an arbitrary path to reach your customer. These paths are given to you as a graph $G=(V,E)$. At first, you are at vertex $p$. The objective is to reach vertex $q$. But there are some rules.    Assume that $u$ and $v$ are two arbitrarily chosen vertices. When you go from vertex $u$ to $v$, You should pay $C_{uv} \gt 0$ per litre of milk. Also, for example if before going from $u$ to $v$, the amount of milk was $m$ litres, after going from $u$ to $v$, this amount becomes $m \times Y_{uv}$ such that $0 \lt y_{uv} \le 1$.    Assume that the cost of buying $1$ litre of milk is $\alpha$.    Notice that at the end, there should be $k$ litres of milk left that can be delivered to the customer.    Question:       Find an algorithm to deliver $k$ litres of milk to the customer, with   the minimum cost.   Note1 (The meaning of cost):    Assume that you want to go from vertex $a$ to vertex $b$, $\alpha=2$ and the amount of milk you want to deliver is $1$ litre. There are $2$ paths from $a$ to $b$: 1. Going directly from $a$ to $b$:    You should buy $1$ litre of milk, which costs $2$ units. Then you should go from $a$ to $b$, which costs $C_{ab}=10$. Also, if $Y_{ab}=1$, the amount of milk doesn't change. So, the  total cost becomes $2+10=12$.  2. Going from $a$ to $c$, and then from $c$ to $b$:    You should buy $3$ litres of milk, which costs $6$ units. Then, you should go from $a$ to $c$. If we assume that $Y_{ac}=0.5$, then the amount of milk becomes $1.5$ litres. Also, if $C_{ac}=5$, then we should pay $5 \times 3 = 15$ units for going from $a$ to $c$. Then we go from $c$ to $b$. When we reach $c$, there are $1.5$ litres of milk left. Also, If $C_{cb}=6$, then the price of going from $c$ to $b$ will be $6 \times 1.5 = 9$ units. Also, $Y_{cb}= \frac{2}{3}$. Thus, $1$ litre of milk remains at the end. So, the total cost will be $6+15+9=30$ units.


Very bad questions with multiple answers

is very low-quality. As the comments state, the code provided does not compile. Furthermore, it fails to ask (in my opinion) a specific question, show any additional attempted code (though in this case that might be fuzzy), or even describe expected results.  Yet the question has 7 answers (0 votes each).  This question should not remain on SO: it can't help future visitors to the site, and might show up as a result for a casting search, leading to no real answers for the searcher.  For the purpose of my question, define "bad" as a combination of unsalvageable and not demonstrating minimal knowledge. Answers to these questions generally don't solve the intended problem (since the problem isn't clear), and are probably more useful when presented as a code review than actual solutions.  This question's quality deserves more than downvoting, in my opinion. Is it enough to merely flag it as low quality? Or should it go straight to moderator attention?


Submitting two related papers to two journals simultaneously

I have spent 2+ years working on a project in computational neuroscience that has interest for clinicians and now I am starting to write the paper text. I want to submit it to one of neurology-related journals (and clinicians who I work with, support this). However as far as I understand, it does not make sense to include too much technical info / too much extra statistics in the journal for neurologists. I have developed a pretty elaborate data analysis pipeline than can do many things, so I want also to publish other less-bold-sounding outcomes of my project in a journal for computational neuroscience or in a journal for biomed data analysis. I have seen many people doing something along these lines (though not among my immediate colleagues), but for me it is the first time. What worries is that I don't understand very well how to organize the second paper: should I include the main result, that I report in the neurological paper, in the second one, or just briefly mention it, citing the submitted paper / preprint? So to summarize, I have two somewhat related questions:  is there somewhere any informal guideline on how to organize the second paper in relation to the first one? I could either present the second part of the research as a "methods" paper (emphasizing the code I wrote, it can indeed be used by other people) or as a "new approach" paper (emphasizing the new approach that gives interesting results). I think both are important. How do I choose? Or should I write 3 papers instead of two?


Controlling messages that are pushed to QgsMessageBar()

I've got a QGIS processing script which displays progress in the message bar, using the code in the .   It displays properly at the beginning of processing, but my code calls some other processing algorithms from Grass, which also push messages to the message bar and override my progress bar. Is it possible to either set the default duration of these messages to something small like a second, or block the message entirely?   I tried an approach that connects the widgetAdded slot to a function to re-add the progress bar, but it's causing QGIS to crash. Here is the code:  def putBarBack():     iface.messageBar().widgetAdded.disconnect()     iface.messageBar().pushWidget(progressMessageBar, iface.messageBar().INFO)     iface.messageBar().widgetAdded.connect(putBarBack)  def run():        #set up progress bar     global progressMessageBar     progressMessageBar = iface.messageBar().createMessage("Processing...")     bar = QtGui.QProgressBar()     bar.setRange(0,100)     bar.setAlignment(Qt.AlignLeft|Qt.AlignVCenter)     progressMessageBar.layout().addWidget(bar)     iface.messageBar().pushWidget(progressMessageBar, iface.messageBar().INFO)      iface.messageBar().widgetAdded.connect(putBarBack)      # do some more processing here...      bar.setValue(25)      processing.runalg(grass7:r.watershed)      bar.setValue(75)      #do some more processing      bar.setValue(100)


How can i export Skype Chat history to a text file or other readable file in Ubuntu 13.04

I want to be able to export my chat history so I can read it outside of Skype and save it permanently somewhere else. I have seen many suggestion about main.db file in skype directory but unable to find that file in Ubuntu 13.04 or if however i found main.db file so how can i convert in text file.  Please let me know you suggestion.


Minecraft says "servers are down for maintenance"

When I try to join a server it says:     Failed to connect to server                Failed to login: The authentication servers are currently down for maintenance.   YES, I have checked if they were down but they are not! When I try to make my own lan server or singleplayer my skin is slim alex. But what is wierd is I can only join cracked servers. This is my account I got it in 2010. This only happens on this computer on any router.   What can I do about it?  EDIT:  I have reinstalled minecraft before and I had nothing no mods or optifine. my computer is an Alienware 13 R3 16GB of ram Windows 10 Home Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHZ.  my minecraft is vannila, and my java is up to date.  EDIT2: I have found out that I have a proxy called covernant eyes. And when I try to uninstall it the uninstaller crashes. Whelp.


If $a, b$ are in group and $ab$ has finite order $n$, why does $ba$ have order $n$ as well?   Since $(ab)^n=e$, I get $(b)(ab)^n(a)= ba$. This means that $(ba)^{n+1}=ba$, and $(ba)^n=e$.  But, I don't see how this follows if the group is not abelian.  How does the left side become $(ba)^{n+1}$ without being given that group is abelian?


How to show that $\{\sqrt m - \sqrt n : m,n \in \mathbb N\}$ is dense in $\mathbb R$?

Show that $S=\{\sqrt m - \sqrt n : m,n \in  \mathbb N\}$ is dense in $\mathbb R$.   I know the definition of dense as:     A set S is dense in $\mathbb R$ if there exists $a,b \in \mathbb R$ such that $S \cap(a,b) \neq \emptyset.$   I don't understand how to proceed. Please help.


In this question:  is used /proc/self/fd, which dereference to /proc/32157/fd. So it is pid? And why cannot I echo $self? I have never seen self before.


Who is allowed to invite people to a Minecraft Realm?

I'm considering buying a subscription to Minecraft Realms (on PC) as a gift for somebody I know. Mojang doesn't have a gift option, and I don't want to spoil the surprise, so I was thinking I'd just buy it myself and give them access.   If I do this, will the recipient be able to turn around and invite their own friends? Can I grant them "admin" access to the server?


I need to install Skype, how can I do it?

I use skype to teach on the weekends, because that is what my company requests as it offers screen sharing allowing my students to see their lessons. Has anyone had success installing and using skype on this os? If so, I need guidance.


$\text{p-adic numbers}:$  My questions are-  $(1)$ Is the set $  \ (\mathbb{Z}_p \setminus \mathbb{Z}) \cap \mathbb{Q}$ non-empty?  $(2)$ Is the set  $ \ (\mathbb{Z}_p \setminus \mathbb{Z}) \cap \mathbb{Q}_p $ non-empty?  $(3)$ If non-empty , then what are the intersection sets ?  I can not conclude the answer.  Please someone help me with details answer or at least hints.


How is Liouville's theorem compatible with the Second Law?

The second law says that entropy can only increase, and entropy is proportional to phase space volume. But Liouville's theorem says that phase space volume is constant.  Taken naively, this seems to imply that the entropy can never change. What's wrong with the reasoning here?


How I can customize the Ubuntu Live ISO installer using Cubic (add, remove, and upgrade packages and set language)?

I would like to modify the ubuntu 20.04 installation iso to include (vlc, audacious,mc,rar,unrar, spanish support,etc), remove (totem,rhythmbox,english support, etc)  and upgrade packages. Use Cubic but change the permissions of various system directories. Leading to a security risk. For example /etc and /usr have 777 I need customize installer becouse the computers I want installer don't have network acces I need customize installer because I live in Cuba and is very difficult access online repository from anywhere also the connections are too slow for example in this PC (256kbs).


How to trace system calls being invoked after typing command?

This question is relevant to  I posted earlier. (I thought it would be better to post it separately. But if not, please let me know.)  I learned from  that the shell built-in commands are treated specially and normal external commands are executed on child process.  This time, I would like to trace system calls such as fork, clone, or execve to monitor what really happened after typing command. But I can only trace an execve call execve("bin/ls",,,) = 0 when I execute strace like this way.  strace -etrace=execve,clone ls   That means, as I guess, I can only monitor system calls which are called after a child process is created.   To monitor all system calls related to creating new process, What I have to do? To invoke command with bash -c like strace -etrace=execve,clone bash -c '{ ls; }'  would be helpful in this case?


From Putnam and Beyond:    The Solution is:    The only part I do NOT understand is how: $a_k + b_k = 1$ for every $k$? The problem just specifies nonnegative numbers?


Speed of light on and through a hollow planet

First of all, this is a thought experiment regarding faster-than-light communication.  Say you had an immense hollow planet that was made of some heavy material such as neutron-star dust.   Due to the mass of the planet, the speed of light on the surface is slowed down by several percent due to gravitational time dilation.   But the planet is hollow. Since the gravitational force inside the planet is zero, the speed of light in the interior will be faster than that on the surface.  If we were to run a fiber-optic cable from the surface through the interior, would we be able to communicate faster than the speed of light, as far as the denizens on the surface were concerned?  If yes, would this cause a paradox of any sort?  References:   Gravitational time dilation:   Shapiro delay:   StackExchange:   StackExchange:   UPDATE:  This question seems to be answered here:


GRUB_TIMEOUT in /etc/default/grub not changing the wait time with LVM

First of all: Yes, I ran sudo update-grub after changing the value.  After a new install of Ubuntu 18.10 on an empty disk the wait time at the grub menu is of 30 seconds (half an eternity!).  The line GRUB_TIMEOUT in /etc/default/grub had a value of 0. Changing this to 10 did not change the wait time, it was still 30 seconds.  Any ideas?


null pointer exception to get object json node

I am getting on my back end a json this way   "pessoa": {         "nome": "asas",         "tipoPessoa": "F",         "dataNascimento": "15/06/1983",         "foto": ""     },     "cns": "ewe",     "pessoasFisicas": {         "sexo": {             "idSexo": "1"         },         "estadoCivil": {             "idEstadoCivil": "2"         },          "dataObito": "11/12/2017"     },     "pessoasEnderecos": {         "cep": "966",         "pais": {             "idPais": "5"         },         "municipio": {             "idMunicipio": "1"         }      },     "pessoasContatos": {         "tipoContato": {             "idTipoContato": "1"         }     },     "pessoasCaracteristicas": {         "cbors": {             "idCbor": "1"         }      }   and I got two problems in my method to save it on the database. I have a null pointer exception in   Entidades entidades = new Entidades(); entidades.setIdEntidade(json.get("pessoa").get("entidade").get("idEntidade") == null ? 0l: json.get("pessoa").get("entidade").get("idEntidade").asLong());   but sure that method will be null because  the business rule to entidade is not mandatory requirement but I need to know how I do not get a nullPontException in this case   look my method to save the data   @RequestMapping(method = RequestMethod.POST, value = "/pacientes")     public HttpStatus cadastrarPacientes(@RequestBody ObjectNode json) throws ParseException  {           SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yyyy");              Entidades entidades = new Entidades();             entidades.setIdEntidade(json.get("pessoa").get("entidade").get("idEntidade")== null ? 0l: json.get("pessoa").get("entidade").get("idEntidade").asLong());              Pessoas pessoas = new Pessoas();             pessoas.setNome(json.get("pessoa").get("nome").textValue());             pessoas.setNomeSocial(json.get("pessoa").get("nomeSocial")== null ? null : json.get("pessoa").get("nomeSocial").textValue());             pessoas.setFoto(json.get("pessoa").get("foto").textValue()  == null ? null : json.get("pessoa").get("foto").textValue());             pessoas.setNomePai(json.get("pessoa").get("nomePai") == null ? null : json.get("pessoa").get("nomePai").textValue());             pessoas.setNomeMae(json.get("pessoa").get("nomeMae") == null ? null : json.get("pessoa").get("nomeMae").textValue());             pessoas.setDataNascimento(formato.parse(json.get("pessoa").get("dataNascimento").textValue()));             pessoas.setEntidade(new Entidades());             pessoas.setEntidade(entidades);             pessoas.setTipoPessoa(json.get("pessoa").get("tipoPessoa")== null ? null : json.get("pessoa").get("tipoPessoa").textValue());              Paises pais = new Paises();             pais.setIdPais(Long.parseLong(json.get("pessoasEnderecos").get("pais").get("idPais").textValue()));     PessoasFisicas pFisicas = new PessoasFisicas();     pFisicas.setDataCadastroPisPasep(formato.parse(json.get("pessoasFisicas").get("dataCadastroPisPasep")== null ? "" : json.get("pessoasFisicas").get("dataCadastroPisPasep").textValue()));             Ufs uf = new Ufs();             uf.setIdUf(json.get("pessoasEnderecos").get("uf").get("idUf")== null ? 0L : json.get("pessoasEnderecos").get("uf").get("idUf").asLong());       pacientesService.cadastrarPacientes(pFisicas, pCarac,pessoasEnderecos, pac );        return HttpStatus.CREATED;     }   i have a similar error in other case.. whe i pass a empty date i got a null too.. `     pFisicas.setDataCadastroPisPasep(formato.parse(json.get("pessoasFisicas").get("dataCadastroPisPasep") == null ? "" : json.get("pessoasFisicas").get("dataCadastroPisPasep").textValue()));   so i asking..how can I handle this error, remembering that by my business rule it is possible to have the date null and entidade   im using api Spring boot


How to replace raster values in one Raster with another

I have two raster files in ArcGIS 10.1, raster 1 and raster 2 all with values and similar spatial resolutions, and overlay in some areas.   I want to replace values in raster 1 with those in raster 2 where there is an overlay.


In QGIS 2.18 I draw polygons on a certain grassland-type on aereal imagery. Sometimes, there are other landcover-types within the patches of interest, so I'd like to draw polygons with holes.  In the example, I want to exclude the small forest-patches within the grassland. Is there any procedure other than creating a new layer for everything I want to exclude and then clip my grassland-layer?


Find how many solutions of the equation $z^6+6z+10=0$ are in each quadrant.  This polynomial has six solutions by TFTA. I just don't know how to show what they are and where they lie. Any solutions or help is greatly appreciated.


Why is #include  not required to use printf()?

Session transcript: > type lookma.c int main() {   printf("%s", "no stdio.h"); }  > cl lookma.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation.  All rights reserved.  lookma.c Microsoft (R) Incremental Linker Version 8.00.50727.762 Copyright (C) Microsoft Corporation.  All rights reserved.  /out:lookma.exe lookma.obj  > lookma no stdio.h


How to release objects which are created for Excel (C#)

I use some objects like workbook, worksheet, app for Excel tasks. After I am done with Excel, I try releasing them by the code below. After all, I still see EXCEL.EXE at Task Manager. Why doesn't it release completely?  My class for Excel tasks:  Excel._Application app = new Excel.Application(); Excel._Workbook workbook = app.Workbooks.Add(Type.Missing); Excel._Worksheet worksheet = null; app.Visible = true;  worksheet.Cells[1, 1] = "test string";  workbook.SaveAs("C:\testfile.xlsx");  object misValue = System.Reflection.Missing.Value; workbook.Close(true, misValue, misValue); app.Quit();  releaseObject(worksheet2); releaseObject(workbook); releaseObject(app);   releaseObject class:      private void releaseObject(object obj)     {         try         {             System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);             obj = null;         }         catch (Exception ex)         {             obj = null;             MessageBox.Show("Unable to release the Object " + ex.ToString());         }         finally         {             GC.Collect();         }     }    EXCEL.EXE is still at Task Manager:


Remove Ubuntu 14.04 and install Windows 7 Ultimate

As the title says, i have Dell Inspiron 15 7559 pre-installed Ubuntu 14.04 LTS. I have no knowledge about Linux whatsoever because i've been using Windows for a long time. What i'm trying to say is, how do i remove Ubuntu 14.04 completely and install windows 7 Ultimate sp 1 version with USB? Please provide step by step from preparing the USB to Remove Ubuntu and Install windows 7. Thank you for helping!


I've earned a Tumbleweed badge — but that doesn't seem like a good thing.  Is it?  I initially thought "earning" a badge was positive, but it seems to me that the implication is that I asked a question that was too obscure.  So: is it a good or a bad thing?  Do I want to collect more?!  =:-)


How to prove that $|\cos x-\cos y|\leq |x-y| \ \forall x,y \in \mathbb{R}$?

As above, how would you go about proving this inequality?


How to assign dynamic Ids for ui:inputDate element inside aura:iteration?

As title says, How do I assign dynamic Ids for ui:inputDate elements inside aura:iteration?  Here is the reproducible version of the problem I am facing:  HelloWorldApp.app  <aura:application >     <c:inputDateExample /> </aura:application>   inputDateExample.cmp  <aura:component >     <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>     <aura:attribute name="datesList" type="List" />     <table>         <aura:iteration items="{!v.datesList}" var="dateItem">             <tr>                 <ui:inputDate aura:id="date-id"                                value="{!dateItem}"                                displayDatePicker="true"                               blur="{!c.fldChanged}"/>             </tr>         </aura:iteration>     </table> </aura:component>   inputDateExampleController.js  ({     fldChanged : function(component, event, helper) {         console.log('Value changed');         //How do I find from which date element, event is fired??         //The below method finds both date elements because the Id is not unique         var dateComponent = component.find('date-id');         console.log(dateComponent);         console.log(dateComponent[0].get("v.value"));     },     doInit : function(component,event,helper){         var datesArray = [];         datesArray.push("2017-01-01");         datesArray.push("2017-01-31");         component.set("v.datesList",datesArray);     } })   This produces the below output and I need to find which element user is clicking on??    Notes:   I can assign unique Id for tr element but not sure how to use that inside component.find() method. I can assign dynamic id for plain input tags but there is too much markup involved for making these similar to lightning date element. I tried giving html5 data attributes for ui:inputDate but it doesn' accept.   Any workarounds or anything I am missing here?


Short story from Aliens’ perspective that ‘cure human racism’ (cheeky)

Ok, so the details are vague but the ending gives a strong hint. What I remember is that humans are suffering and either: A) Send out humans out into space for help from other life to get help and they eventually find help but come back much later in the future to see humans barely alive. And they now have a ‘solution’ to most human problems. B) Aliens find humans in dire need of help and offer to solve most human problems. Anyway, at the end as the aliens/future humans are informing the Earth humans of all the marvelous advancements they can offer them, they mention that they: “Can also fix the humans being all white” or something along those lines. I think it’s meant to be a cheeky commentary on race but I can’t find it for the life of me.


is it possible to insert frametitles in toc

I want to insert frame titles in toc, I make subsection pages named as the following frametitle to make an entry in toc. Is there a way to include frame titles in toc without doing so?      \documentclass[t]{beamer} \setbeamertemplate{navigation symbols}{} \usepackage{verbatim} \begin{document} \begin{frame}[t,allowframebreaks] \frametitle{Table of Contents} \tableofcontents \end{frame} \section {Section 1} \frame{\sectionpage} \subsection {subsection 1 named as frame 1} \frame{\subsectionpage} \begin{frame} \frametitle{frame1} FRAME 1 \end{frame} \subsection {subsection 2 named as frame 2} \frame{\subsectionpage} \begin{frame} \frametitle{frame2} FRAME 2 \end{frame} \end{document}


Does energy produce a gravitational force

$E=mc^2$.  From this, I would assume that any form of energy (not just rest-mass energy, but kinetic energy as well) would produce a gravitational force.  Am I being too naive in my application of this equation, or is this a real thing?  I haven't made a formal study of General Relativity, but I do seem to recall from what I have learned about it that all forms of energy come in to the stress-energy tensor, which means that all forms of energy would also have an effect on the geometry of space, thus "energy would produce a gravitational force".


Multivariable calculus, using unit vector?

Suppose we want the derivative of $f(x,y)$ in the direction of $\langle 1,1\rangle$. We must convert this to a unit vector: $\langle 1/\sqrt2, 1/\sqrt2\rangle$ in order to use the formula. So I don’t find it intuitive that the partial $x$ must be multiplied by $1/\sqrt2$ and the partial $y$ must be multiplied by $1/\sqrt2$, take the sum, and that’s your derivative in the direction $\langle 1, 1\rangle$.


Can we prove that $K_n$ is Hamiltonian for all $n\geq3$?

Can we prove that $K_n$ is Hamiltonian for all $n\geq 3$ ? I was unable to prove it. Please help me with this.


Is there a way to recover formatted hard disk with Windows when using Ubuntu 17.04?

I installed Ubuntu on my PC and by accident it formatted my whole hard drive. I can pick the hard drive up with Windows and everything but its basically formatted. Is there a way I can restore it using Ubuntu?


Does $\int_{ - 1}^1 {\frac{1}{x}dx} = 0 \text { or } \infty $? Is that integral equal to $0$? I think it is because $\frac {1}{x}$ is an odd function. But it may as well be divergent or, equivalently, $\infty$, or it doesn't exist.


nameref (hyperref) evaluating counter instead of section name

What's the proper way to reference a section with a counter in the title? The TOC generates correctly, but the cross references aren't so lucky.  MWE:  \documentclass[letterpaper, 12pt, twoside]{exam}  \usepackage{hyperref}  \newcounter{KSRLessonNumberCounter} \setcounter{KSRLessonNumberCounter}{1} \newcommand{\KSRSection}[2][\value{KSRLessonNumberCounter}]{         \setcounter{KSRLessonNumberCounter}{#1}         \section*{Lesson \arabic{KSRLessonNumberCounter}: #2}         \addcontentsline{toc}{section}{Lesson \arabic{KSRLessonNumberCounter}: {#2}}         \stepcounter{KSRLessonNumberCounter} } \newcommand{\KSRSubsection}[1]{         \subsection*{#1}         \addcontentsline{toc}{subsection}{#1} } \newcommand{\KSRLessonNumber}{ }  \begin{document}  \KSRSection{Sample}  This is the first lesson. The second lesson is \nameref{sec:blah}.  \KSRSection{Blah} \label{sec:blah}  This is the second section  \KSRSection{Lorem Ipsum}  Dollars are Set in \nameref{sec:blah}.  \end{document}


Generate three correlated uniformly-distributed random variables

Suppose we have  $$X_1 \sim \textrm{unif}(n,0,1),$$ $$X_2 \sim \textrm{unif}(n,0,1),$$  where $\textrm{unif}(n,0,1)$ is uniform random sample of size n, and   $$Y=X_1,$$  $$Z = 0.4 X_1 + \sqrt{1 - 0.4}X_2.$$  Then the correlation between $Y$ and $Z$ is $0.4$.  How can I extend this to three variables: $X_1$, $X_2$, $X_3$?


\ifx comparing empty arguments not working?

I have a problem with testing whether an argument is empty or not. The following sample code should return "correct" but does not.  Example:  \documentclass{article}  \newcommand{\ifxnotworking}[1]{ \if #1{}     correct  \else     false \fi}  \begin{document} \ifxnotworking{} \end{document}   Comparing {}{} or with \empty has the same result. This only occurs with empty strings, as far as I know. Does anyone know why and what would be a proper Solution?


For multiple OTP keys, why not do this:  Key = Hash[(EC)DH Shared Secret + Counter]  The counter will increase per message, and the output of the hash will be random for each new unique input into it. What are the problems or weaknesses with this design??  EDIT: For clarification: both parties will have the shared secret from an ECDH exchange, random numbers from Pythons os.urandom for generating the ECC key


Displaying a wide figure in a two-column document

It's my first time working with a two-column document (declared as an argument to \documentclass) and I need to put in a very wide figure. The thing is, LaTeX puts it bounded by a column so it either (1) gets truncated, bleeding off the border or [right column] or (2) displays with an awkward text/line wrapping. Is there any way for me to get it to display the way \maketitle does, that is, at the top of the page (ideally) but at least spanning both columns and no awkward line wrapping? BTW, I use the following code to display my figure: \begin{figure}     \centering     \includegraphics[width=6in]{tictac.png}     \caption{\textsf{The structure of our tic-tac-toe implementation.}}     \label{fig:ds} \end{figure}


JQuery dynamically added row, click event not firing

I've read several stackoverflow answers related to my problem saying that when you dynamically add a row, the best way to make to new row respond to events is to have a $('.class_name').on('click',function(e) {  declaration instead of $('.class_name').click(function() {  That made sense to me so I tried it and it still doesn't work.  Nothing happens when I click the inserted link in the inserted row.  I've put the code in a JSFiddle here:   Or pasted below.  Here is my HTML

1	Harry

2	Sally

3	Wally

 <input type='button' id='add-row' value='Add Row'>

 <input type='text' id='write-rank' curcnt='0' style='width: 15px;'>   and here is my javascript:  $('.num-link').on('click',function(e) {      var cnt = $(this).attr('cnt');     $("#write-rank").attr('curcnt', cnt);     var x = $(this).position();     $("#write-rank").val('');     $("#write-rank").css({top: x.top - 4, left: x.left - 5, position:'absolute'});       $("#write-rank").show();     $("#write-rank").focus(); });  $('#add-row').on('click',function(e) {      add_row_for_new_user('Pablo'); });  function add_row_for_new_user(new_user_name) {       var dis = $(".num-link:first");       var $curRow = $(dis).closest('tr');       $newRow = get_blank_row(new_user_name);       $curRow.before($newRow);     }  function get_blank_row(new_user_name) {    var ret = '
0	'+new_user_name+'
';   return ret;      }   Any ideas?


Windows 10 build is about to expire on 7/31/2020 - Click more info on dialog, but page doesn't exist

I keep getting the windows 10 message that my build is about to expire. I click on the more info button but it hits to a page is not found on microsoft. What do I do now? It's a licensed windows on my laptop from thinkpad. I just opted in to try one of the newer builds awhile back. I'm not sure what to do now. Also do I need to login as administrator to deal with this?


Can I make a symlink (to a .app folder) in Applications directory show up in spotlight?

I used brew to install MacVim and it put it in /usr/local/Cellar/macvim/7.3-61/MacVim.app  I would like to be able to go to spotlight and type MacVim to launch the app. I tried creating a symlink in the Applications directory to /usr/local/Cellar/macvim/7.3-61/MacVim.app. But that doesn't seem to show up in Spotlight. I set the executable bits on the symlink. open MacVim.app from the command line works. How can I get MacVim to show up in Spotlight search?


pgfplots: how make axes go through origin?

For pgfplots, in all the 2D examples I've seen, and in the manual, the location of axes seems to be specified in terms of location within the plot box, i.e.,relative to top, bottom. How does one specify that x- and y-axes intersect at the origin? And how does that they go through some other user-specified coordinate pair?


Different functions having the same derivative

Let $g(x) = \frac{1}{1-x}$ and $h(x) = \frac{x}{1-x}$:  Their derivatives are:  $$\frac{d}{dx}g(x)=\frac{1}{\left(1-x\right)^2}$$  $$\frac{d}{dx}h(x)=\frac{1}{\left(1-x\right)^2}$$  Integrating the RHS I should get back the initial function(s):  $$\int \frac{1}{\left(1-x\right)^2}\;\mathrm dx=\frac{1}{1-x} + C$$  But I obviously get only one of the expressions, namely $g(x)$. So my question is how can both functions have the same derivative even though when integrating the derivative, I get back only one of the expressions?   What am I missing? Does it have something to do with the $C$ constant?


Dimension is well-defined on each connected component of a manifold

Let $M$ be a manifold with a $C^k$ atlas, $k\geq 1$. I was asked to show that the dimension $\dim M$ is well-defined on each connected component of $M$. I'm not sure if I misunderstood the meaning of being well-defined in question. To my knowledge, what I need to do is to prove any two coordinate domains must be homeomorphic to opens set in the same Euclidean space. And for connected components, it occurs to me that each point of $M$ belongs to a uniquely determined connected component of $M$, that is, $M$ is a disjoint union of connected components. Now I'm in trouble associating connectedness with homeomorphisms. Is there any useful topological property that I haven't considered, please? Thank you.


Install button in Software Center does nothing when I try to install Chrome & other apps

I just completed a new PC build, and installed Ubuntu 17.04.   The first thing I did was try to download Google Chrome, and lo and behold, the install button doesn't work.   I have seen this bug elsewhere, but I didn't really get the fix. (I have no idea how to work Ubuntu besides being spoon-fed tutorials.)   I also tried to download the Minecraft launcher, and there are many different solutions, most using a PPA. None of them worked. One of them had an install link in the software tab of Ubuntu, and I had the same glitch as with chrome. This is really troubling me and I need some help! Thanks!


What if I will combine triangles and squares together in one object, can that make my object more broken in some ways when rendering? Do I have to make my object only with triangles or only with squares?   For example here.


In my recent project work, I did something that resulted in the disappearance of the 3D axis in the viewport of the "Layout" workspace, not only that all that four buttons(including zoom thingy, move, camera and projection buttons). I am not sure what lead to this. Weirdly, both 3D axis and 4 buttons exist in all workspaces except in "Layout".(screenshot attached) I googled to check the problem and found a similar issue caused using transform hotkey(). Although I didn't do anything similar. Is this a bug? How can I resolve this? Specs: OS: Ubuntu 20.04.2 LTS Type: Blender LTS Blender Version: 2.83.14 Missing 3D axis in viewport of Layout workspace  3D axis i am talking about, as u can see this appears in all other blender workspaces


How to interpret the P-value and CI for confusionMatrix output in R caret?

A typical confusion matrix from R's caret package might look like this:    > confusionMatrix(pred_gbm, vowel.test$y)    Confusion Matrix and Statistics            Reference Prediction  1  2  3  4  5  6  7  8  9 10 11         1  33  1  0  0  0  0  0  0  0  4  0         2   8 23  3  0  0  0  2  0  1 16  1         3   1 14 31  3  0  0  0  0  0  0  0         4   0  0  2 31  3  1  0  0  0  0  2         5   0  0  0  0 17  7  9  0  0  0  0         6   0  0  6  8 16 23  3  0  0  0  4         7   0  0  0  0  3  0 27  7  5  0  3         8   0  0  0  0  0  0  0 29  5  0  0         9   0  4  0  0  0  0  1  6 24  2 13         10  0  0  0  0  0  0  0  0  2 20  0         11  0  0  0  0  3 11  0  0  5  0 19  Overall Statistics                 Accuracy : 0.5996                            95% CI : (0.5533, 0.6446)     No Information Rate : 0.0909               P-Value [Acc > NIR] : < 2.2e-16                           Kappa : 0.5595            Mcnemar's Test P-Value : NA                 In the above output, we have some statistics that explain the classification accuracy, like a 95% CI and a p-value, etc. How do I interpret the p-value and confidence interval to understand how good the classification is?


Multiplying values in Excel 2010 (Same cell)

Another excel question. I'm using Excel 2010.  If for example I have a value in cell A1, lets say 2.59  What I want to do is multiply that cell by 1.333 but in the same cell  I don't want to have to put a formula in B1 such as =(A1*1.333), because I already have a value in B1 and I don't want to have to insert a new column.  if I highlight cell A1 and put the formula =(A1*1.333) into it the value becomes 0.00  Can what I'm asking be done? or would I need to create a macro?  Any help would be appreciated.  Thanks


Consider a String variable pri with value 07:45:32PM , now in order to obtain the PM alone I applied,  pri = pri.replaceAll("[^A-Z]","");   So far things work fine, but trying to compare the value in the variable does not work, ie :     if(pri=="PM")    {         hh+=12;     }   The body of the loop does not get executed. My question is are the two values different, ie Pri=="PM" , Why is it so? And how do I get to check my if loop in a precise way? Thank you  EDIT1  So I tried if(pri.equals("PM")) instead of if(pri=="PM") , but still it did not solve the problem!


Bayesian estimation difference between inferences is conjugate prior and non informative prior

What are the differences in the inferences using non-informative (specifically Jeffrys) priors as compared to the conjugate prior?


Is the zero truncated Poisson Distribution part of the Exponential Family?

This is the density of a truncated Poisson:  $$P(X = x \mid X > 0) =   \frac{\lambda ^ x e^{- \lambda} }{x ! \left ( 1 - e^{- \lambda} \right )}$$  To show that it's member of the Exponential family I have to bring it in this form:   Exponential family:   $ f(x, \theta, \phi) = exp ( \frac{ x \theta - b(\theta}{ a(\phi)} + c(x, \phi ))  $  if I do this for the Poisson distribution I get: $$ \theta = log \lambda \\  \lambda = e^\theta \\ b(\theta)= e^\theta \\ a(\phi)=1 \\ c(x,\phi)= -log(x!)$$ I struggle now with this extra term $ \frac{1}{1-e^{-\lambda}}$ from the truncated Poisson. Where does it belong to?


`&` in badge name is displayed as `&` in the notification

Because a picture is worth a thousand words:    Should that not be You've earned the "Strunk & White" badge rather than the "Strunk &amp; White" badge?


If i have resistance against a damage type and if i get a success on that damage types saving throw, does the damage halved twice? I checked the players handbooks for this but i couldn't find any spesific explanation


I automatically get a question if I want to upgrade to 16.04 from 14.04. I answer "yes" and short after the process has start I get:  W:Failed to fetch http://ubuntu.mirror.neology.co.za/ubuntu/dists/xenial-updates/universe/binary-amd64/Packages  Hash Sum mismatch E:Some index files failed to download. They have been ignored, or old ones used instead.   When I close the display the system reverses what has been done to that point and later asks if I want to upgrade again.  Every time I get the same results. Is there some I should be doing to get the process to successfully upgrade ?


Android Compare epoch time and today date and output the difference

I need to calculate a expiry date difference.  I will get this epoch time:      1481410800  (06-Dec-2016 (14:42))   now I want to calculate the days until the expiry date (1481410800)  Calendar now = Calendar.getInstance();         SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy (HH:mm)", Locale.getDefault());   //Expiry Date         long unixSecondsExpiry = 1481410800; //unixSeconds         Date expiryDate = new Date(unixSecondsExpiry*1000L);            long currentDate = now.get(Calendar.SECOND);          long diff = unixSecondsExpiry - currentDate;         long days = diff / (24l * 60l * 60l * 1000l);             String formattedExpiryDate = sdf.format(expiryDate);         String formattedDateNow = sdf.format(new Date());          Log.w("RUNTEST", "formattedDateNow: " + formattedDateNow);         Log.w("RUNTEST", "formattedExpiryDate: " + formattedExpiryDate);         Log.w("RUNTEST", "days: " + days);   I keep getting 17 days but it should be 5 days till expiry.     RUNTEST: formattedDateNow: 06-Dec-2016 (14:42)      RUNTEST: formattedExpiryDate: 11-Dec-2016 (07:00)      RUNTEST: days: 17


How many laptops can I take from India to UK in flight?

I am travelling to UK on Business Visa with 2 laptops, 1 work laptop and other is my personal laptop from India. Is it allowed to take 2 laptops to UK and vice versa or do I need to pay any customs duty?


Trying to find myself on the  I run into weird results. My display name is "Erwin Brandstetter", obviously.  If I type Erwin, I find myself in the search results. If I type Branst, I find myself in the search results. If I type Erwin B or even Erwin Brandstetter, I am not found.  Tried the same with Jon Skeet or Brad Larson and others, no problem. Works either way. Tried the same on a couple of SE sites. Same effects everywhere. Here on meta, too.  Seems broken to me?


Undefined control sequence for inline math

I was wondering what is wrong with the following line:  \(\mathbf{W} \in \mathbb{R}^{\geq{0}, \mathit{R} \times \mathit{N}}\)   I am trying to reproduce this:    But get a:  Undefined control sequence. l.542 ...egative matrices \(\mathbf{W} \in \mathbb                                                   {R}^{\geq{0}, \mathit{R} \...


This is just a suggestion I have which I believe would improve the user experience. Currently the Badges tab has , all the badges listed and there is tick mark besides the ones the user has achieved.  e.g  Pundit Left 10 comments with score of 5 or more  But a user has no idea as to , how many comments does he currently have which has score of 5 or more. If while hovering over the Badge tag , the user could get the count of current count of his comments which satisfy the requirement of score 5 or more , this would encourage the user improve quality of the comment and provide him something to look forward to .   e.g  When hovering of Pundit , it should show 2/10 , which means user needs to get to 10 to achieve this Badge , but currently he has only 2 such comments.   I understand that this is not feasible for all the badges, but this can be implemented in badges it is feasible for.


Often questions from math.stackexchange.com get into MultiCollider's "hot questions".  Formuli is often main things in such questions, but they doesn't get rendered in the dropdown, instead I see something like this:    It's tricky to judge whether the question is interesting without viewing the formula.  Can formulas be displayed in MultiCollider?  P.S. I'm surprised that there seems to be no such question already asked on the Meta nor on meta.math.SE.


How can I do something only after an animation has finished?

I'm making this 2D platform based game. Basically what I want is when the player walks into spikes (which have a "deadly" tag") it displays the animation that has the parameter of animate with the value of 3 and after that the player gets destroyed. So my question is:   How do I build a timer or something so that the object only gets destroyed after the animation is played (with no looping)?   This is the code I'm using now:  void OnTriggerEnter2D(Collider2D target) {     if (target.gameObject.tag == "Deadly") {         Die();     } }  void Die() {     animator.SetInteger ("AnimState", 3);     Destroy (gameObject); }


I just reset my password and now trying to sign in w/ my email address, however can't pass "verification of your email address" step: After entering verification code (got it through email), I get following message:  This email address is not available. Choose a different address.  Please advise.


Is it possible to have 2 10000mAh power banks in a single carry on?

I am traveling abroad and I was wondering if I can take my 2 power banks with me in my carry on.  They are both identical power banks with 10000 mAh


Someone online is wiring me money and asking me to purchase bitcoin for him. Could this be a scam?

I have become "friends" with someone on-line and he keeps asking me to go pick up a money wire transfer and purchase bitcoin with it, then send him a picture of the bitcoin receipt.  I've done it once for $200, now he's asking me to do it again and this time it's supposedly for $1,000. Now I'm getting suspicious.  Could this be a scam?


Helpful members of the community just solved my problem with \newcommand:    But in trying to solve it, I got an error message referring to p. 192 of "the manual". I would like to look up the error myself.  I am compiling under Windows using the command:  latexmk -pdf file.tex   I cannot find a link to a manual on latex-project.org. There are links to books which are published commercially, but surely that is not what the error messages refer to?  The not-so-short guide has fewer than 192 pages, so that's obviously not it.


I have the following class structure:   public class TaskLog  {     public DateTime LogDate { get; set; }     public string Robot { get; set; }     public string Task { get; set; }     public Enums.ProbeDataState State { get; set; }      public TaskLog()     {     } }   I created a generic list as follows:  List<TaskLog> Logs;   My output:  Robot   Date                    State --------------------------------------------- aaa     8/5/2013 12:00:00 AM    Task:1=fileDeltaFailed aaa     8/5/2013 12:00:00 AM    Task:2=fileDeltaFailed aaa     8/5/2013 12:00:00 AM    Task:4=fileDeltaFailed bbb     8/5/2013 12:00:00 AM    Task:1=fileDeltaFailed bbb     8/5/2013 12:00:00 AM    Task:2=fileDeltaFailed bbb     8/5/2013 12:00:00 AM    Task:4=fileDeltaFailed   However I would like to group the tasks and state as follows:                                  Tasks Robot   Date                    1                 2                4 aaa     8/5/2013 12:00:00 AM    fileDeltaFailed   fileDeltaFailed  fileDeltaFailed  bbb     8/5/2013 12:00:00 AM    fileDeltaFailed   fileDeltaFailed  fileDeltaFailed   I tried using the groupby with no luck, and quite stuck.  e.g.   var dataQuery = Logs.Where(w => w.LogDate >= start && w.LogDate <= finish).GroupBy(g => g.LogDate).Select(t => new             {                 LogDate = t.Key,                 Details = t.OrderBy(o => o.Robot)             }).ToList();


What purpose does downvoting questions serve?

I understand the purpose of up/downvoting answers -- some answers are better than others, some answers may be wrong, .etc.  With regard to questions, though, there are other mechanisms to deal with "bad" questions:  comments, close, flag.  A poorly written question should be improved.  A bad question should be closed/deleted.  Often, though I see poorly written questions downvoted. I'm not sure what this accomplishes.  I get loss of rep for offensive or spam questions, but for an off-topic question?  or one that is just poorly written?   Why?  It seems to me that rep ought to be based more on answers on a site of this type.   Fundamentally, it seems that rep ought to be based on what you add to the site, not what you ask of it.  A particularly good question does add to the site, but a poor question doesn't really detract from it in the same way that a bad (wrong) answer does. Sure, go ahead and give people more rep for asking a particularly good question, but why punish people for asking bad questions when there are other ways of handling that.  Why not handle questions more like comments and allow upvotes, but not downvotes?  It seems to me that many, if not most, of the downvoted questions are first timers.  It's more likely that your first introduction to the site will be in asking a question, rather than answering. There is a significant risk to alienating new users when their questions are downvoted -- there's a visceral response to seeing that negative number next to your question.  Why not let the close/flag system weed out questions that don't belong and the comment system work to improve poorly worded questions.


Schengen Visa for both business and tourism

I am holding an Indian passport. I have a multi-entry Schengen visa which is valid for 6 months. I am planning to travel in mid Feb to Spain (on a business trip) via Netherlands for a week. On my way back I am planning to stay in the Netherlands for 4 days as a tourist. Do I need to apply for a tourist visa or can I use the Schengen visa which I applied for Spain?


In case of nested objects, how can I access a property of top level object from the nested object?

let x = {     name:"vin1",     oi:this,     ob:{         name:"vin2",         ob1:{             name:'vin3',             ob2:{                 name:"vin4",                 func:function(){                     console.log(name);  //  I want to access the name "vin1" here.                 }             }         }     } };   I found  answer which says it's not natively supported in JS. Any way to access the outer object property from the inner object?


Converting a string into an attribute in Python

Is it possible to do something like this in Python?  class MyClass():     def __init__(self):         someValue = 42          str = 'a'         # self.a = someValue         str = 'xyz'         # self.xyz = someValue          Essentially what I want to achieve is by reading the value of str (say the value of str resolves to 'myValue'), the code adds an additional attribute (self.myValue) into the class.


Multiple inheritance, 'need' to extend two classes

Assuming we have two classes, in the \Base\Form\ namespace:  class Field {     protected $name;     protected $value; }  class DropdownField extends Field {     protected $options = [];     // with functions like setOptions(), addOption(), removeOption() etc. }   Now, in another namespace, a class exists that extends on Field, that has an additional 'layout_position' property:  namespace Integrations; class IntegrationsField extends \Base\Form\Field {     const LAYOUT_POSITION_LEFT  = 'left';     const LAYOUT_POSITION_RIGHT = 'right';     protected $layoutPosition = self::LAYOUT_POSITION_LEFT; }   Now, you might see this one coming, but in the event of an IntegrationsField that can also be a dropdown:  namespace Integrations; class IntegrationsDropdownField extends \Base\Form\DropdownField {}   Of course, this one should also have the $layoutPosition, that should be inherited from IntegrationsField, but since we can't extend two classes, what is the best solution to go for here?


Does accidental homicide cause one's soul to split?

Killing is said to fracture one's soul and Voldemort uses this to create horcruxes.  I always assumed that it was because of the evil intention and the act of killing someone was what caused the soul to split.  Does killing by accident also cause one's soul to splinter?


For which integers is $i,j \geq 1$ exists an integer $k \geq 0$, such that $\frac{(i+j-1)!}{i!(j-1)!}=2^k$

Are there integers is $i,j \geq 1$ for which there is an integer $k \geq 0$, such that:  $$\frac{(i+j-1)!}{i!(j-1)!}=2^k ?$$  There are two trivial families of solutions: For $i=1$:  $$ \frac{j!}{(j-1)!}=j $$  and whenever $j$ is a power of 2 we have a solution $(1,j)$. And, for $j=2$:  $$ \frac{(i+1)!}{i!} = i+1$$  and whenever $i+1$ is a power of 2 we have the second family of solutions (i,2). Are there any other solutions? And if not, is there a proof?  EDIT: As was pointed out, one can write the equation as a binomial coefficient:  $$\binom{n}{m}:=\binom{i+j-1}{i}=2^k,$$  with $n=i+j-1$ and $m=i$. Since the product of $m$ consecutive integers greater than $m$ is divisible by a prime $p$ greater than $m$, we have that   $$\binom{n}{m}= \frac{n(n-1)\ldots (n-m+1)}{m!} $$  is divisible by a prime $p$ and can therefore not be a power of 2 (if $m,n-m\geq 2 \Leftrightarrow j,i-1 \geq 2$). The two families of solutions given above are therefore the only solutions to this equation.  See also:


Live USB with encrypted persistent store

Is it possible to boot Ubuntu from USB and have it store the changes to settings, created files and installed apps in an enrypted file located on the HDD that is mounted at boot? If so will the process impair bootup speed much? The goal would be maximum security if you make the USB read-only and the peristent store is encrypted.


I have a StressTester class like this:  public abstract class StressTest {   public static final int WARMUP_JIT_COMPILER = 10000;    public interface TimedAction {     void doAction();   }    public static long timeAction(int numberOfTimes, TimedAction action) {     ThreadMXBean bean = ManagementFactory.getThreadMXBean();     for (int i = 0; i < WARMUP_JIT_COMPILER; i++) {       action.doAction();     }     long currentTime = bean.getCurrentThreadCpuTime();     for (int i = 0; i < numberOfTimes; i++) {       action.doAction();     }     return (bean.getCurrentThreadCpuTime() - currentTime)/1000000;   } }   And a main method looks something like this:  private static boolean isPrime1(int n) { ... } private static boolean isPrime2(int n) { ... } private static boolean isPrime3(int n) { ... } private static boolean isPrime4(int n) { ... }  private static final int NUMBER_OF_RUNS = 1000000;  public static void main(String[] args) {   long primeNumberFinderTime1 = StressTest.timeAction(NUMBER_OF_RUNS, () -> {     for (int i = 0; i < 100; i++) {       isPrime1(i);     }   });   long primeNumberFinderTime2 = StressTest.timeAction(NUMBER_OF_RUNS, () -> {     for (int i = 0; i < 100; i++) {       isPrime2(i);     }   });   long primeNumberFinderTime3 = StressTest.timeAction(NUMBER_OF_RUNS, () -> {     for (int i = 0; i < 100; i++) {       isPrime3(i);     }   });   long primeNumberFinderTime4 = StressTest.timeAction(NUMBER_OF_RUNS, () -> {     for (int i = 0; i < 100; i++) {       isPrime4(i);     }   }); }   When I have it set up like that then the results are pretty much as expected, and I can swap the tests and the results swap as expected. isPrime3 is about 200 times faster than isPrime1.  My real code is a bit more complex. I have several classes that find prime numbers like this:  class PrimeNumberFinder1 {   @Override   bool isPrime(i) { /* same code as in static isPrime1() */ }; }  class PrimeNumberFinder2 extends PrimeNumberFinder1 {   @Override   bool isPrime(i) { /* same code as in static isPrime2() */ }; }  class PrimeNumberFinder3 extends PrimeNumberFinder1 {   @Override   bool isPrime(i) { /* same code as in static isPrime3() */ }; }  class PrimeNumberFinder4 extends PrimeNumberFinder1 {   @Override   bool isPrime(i) { /* same code as in static isPrime4() */ }; }   And I have a class like this:  class SomeClassWithPrimeNumberFinder {   PrimeNumberFinder1 _pnf;    void setPrimeNumberFinder(PrimeNumberFinder1 pnf) {     _pnf = pnf;   }    void stressTest() {     StressTest.doAction(10000000, () -> {       for (int i = 0; i < 100; i++) {         _pnf.isPrime(i);       }     });   } }   And my main method:  public static void main(String() args) {   SomeClassWithPrimeNumberFinder sc = new SomeClassWithPrimeNumberFinder();   sc.setPrimeNumberFinder(new PrimeNumberFinder1());   sc.stressTest();   sc.setPrimeNumberFinder(new PrimeNumberFinder2());   sc.stressTest();   sc.setPrimeNumberFinder(new PrimeNumberFinder3());   sc.stressTest();   sc.setPrimeNumberFinder(new PrimeNumberFinder4());   sc.stressTest(); }   With this setup PrimeNumberFind1 is about as fast as isPrime1() in the first test. But PrimeNumberFind3 is about 200 times slower than isPrime3() in the first test.  If I move PrimeNumberFind3 so it runs first, I get the same times as isPrime3() in the first test. The rest of the times are a bit slower too (5-10%), but nothing like PrimeNumberFind3.  The first 3 PrimeNumberFind's are just loops and ifs. No state involved. The last one has a constructor that creates a lookup list, but is just a simple loop as well. If I take the code out of the constructor and create the lookup list with an array literal, the timing is identical.  Any ideas why this is happening?


If $f:\mathbb{R}\to\mathbb{R}$ is continuous and is an additive homomorphism then $f(x)=f(1)x$

Here's the question:     Let $f\colon \mathbb{R} \to \mathbb{R}$ be continuous which is also an   additive homomorphism, that $f(x+y)=f(x)+f(y)$ for all $x.y  \in\mathbb{R}$. Then show that $f(x)=\lambda x $ where $ \lambda = f(1)$.   Truth to be told, I have no idea how to solve this problem. Here's what the authors have discussed before this Exercise.     Let $J\subset \mathbb{R}$. Let $f\colon J\to \mathbb{R}$ be a function and $a\in J$. We say that $f$ is continuous at $a$ if for every sequence $(x_n)$ in $J$ with $\lim x_n =a$, we have $\lim f(x_n) = f(a)$. We also say that $f$ is continuous  on $J$ if it is continuous at every point $a\in J$.   They discuss few examples before dropping this exercise. $\epsilon- \delta$ definition of continuity has not been defined yet and this is the first section of the chapter.  I'd appreciate it if you give me some hints instead of solving it entirely.


What's the difference between power meter and bike computer?

I am currently using a IpBike computer app (on Android) with DuoTrap Speed and Cadence sensors on my bike. I was reading about power meters and how they would help in training by assessing the power output. However, I have some questions as mentioned below.  Can somebody explain the differences between power meter and bike computer? Are there any overlapping features between the two? or are they totally different from each other?  Also - having a power meter but not a bike computer, will it serve any purpose?  Thanks.


result of convert string to double is inconsistent with strtod

I implemented a function StringToDouble for converting string to double，but when I test my function and standard strtod function with the same string,the result is different,I dont know why this happened,is it a problem with precision when doing arithmetic with double? and How can I fix my function so it will generate the same result as strtod? thanks. this is StringToDouble I implemented     bool StringToDouble(const char *p, double &num) {     int frac;     double sign, value, scale;     bool canConvert = false;     if (p == NULL || *p == 0) {         num = 0;         return false;     }     // Skip leading white space, if any.     while (white_space(*p)) {         p += 1;     }      // Get sign, if any.     sign = 1.0;     if (*p == '-') {         sign = -1.0;         p += 1;     } else if (*p == '+') {         p += 1;     }     if (valid_digit(*p)) canConvert = true;     // Get digits before decimal point or exponent, if any.     for (value = 0.0; valid_digit(*p); p += 1) {         value = value * 10.0 + (*p - '0');     }         // Get digits after decimal point, if any.     if (*p == '.') {         double pow10 = 10.0;         p += 1;         if (valid_digit(*p)) canConvert = true;         while (valid_digit(*p)) {             value += (*p - '0') / pow10;             pow10 *= 10.0;             p += 1;                    }     }      // Handle exponent, if any.     frac = 0;     scale = 1.0;     if ((*p == 'e') || (*p == 'E')) {         unsigned int expon;          // Get sign of exponent, if any.         p += 1;         if (*p == '-') {             frac = 1;             p += 1;         } else if (*p == '+') {             p += 1;         }          // Get digits of exponent, if any.         for (expon = 0; valid_digit(*p); p += 1) {             expon = expon * 10 + (*p - '0');         }         if (expon > 308) expon = 308;          // Calculate scaling factor.          while (expon >= 50) {             scale *= 1E50;             expon -= 50;         }         while (expon >= 8) {             scale *= 1E8;             expon -= 8;         }         while (expon > 0) {             scale *= 10.0;             expon -= 1;         }     }      // Return signed and scaled floating point result.     if (!canConvert) {         num = 0;         return false;     } else {         num = sign * (frac ? (value / scale) : (value * scale));         return true;     } }  this is the code I use for testing const char *p = "3e+100"; double d; StringToDouble(p, d); double dd = strtod(p, nullptr); if (d == dd) {     cout.precision(17);     cout << dd << endl          << d; } else {     cout.precision(17);     cout << "not equal\n";     cout << dd << endl          << d; }  the output is not equal 2.9999999999999999e+100 3.0000000000000006e+100  I also tested other strings,some get the same result with strtod,some not,all the cases with exponent get different result.


If $N(z)=a^2+b^2 =\text{ prime } \in \Bbb{Z}$ show $\Bbb{Z}[i]/(a+bi)$ is a field of prime order.

If $N(z)=a^2+b^2 =\text{ prime }\in \Bbb{Z}$  show $$\frac{\Bbb{Z}[i]}{(a+bi)}$$ is a field of prime order.    from   $a+bi$ is irreducible. $\Bbb{Z}[i]$ is an integral domain and $a+bi$ is irreducible in $\Bbb{Z}[i]$ so somehow its a field by a theorem (which theorem I am not  sure, need to fix this)  $$ \begin{aligned} a+bi &\equiv0 \mod(a+bi) \\ a & \equiv b *i \mod(a+bi) \\ [a] &= [bi] \end{aligned}$$   so $z\in \Bbb{Z}[i]$ $z=\alpha+\beta i$  $$\begin{aligned} z+(a+bi)\equiv [z] =[\alpha + \beta i]=\text{ stuff I need to think more} \end{aligned} $$  somehow that is $\Bbb{Z}_p$ so $\frac{\Bbb{Z}[i]}{a+bi} \cong \Bbb{Z}_p$ being a field.


How to "find" this Lie algebra: proof that $\mathfrak{sl}$ is trace zero matrices

I saw  and it states that the Lie algebra of the special linear group $SL_n(\mathbb C)$ is the group of traceless matrices $\mathfrak{sl}_n$.  I know the definition of a Lie algebra: given a matrix group $G \subseteq GL_n(\mathbb K)$ its Lie algebra is defined to be the tangent space at $I$.  From this definition it is immediately clear what dimension the Lie algebra has to have.  What is unclear to me is:      Assuming I don't already know the answer, how do I arrive at the insight that this tangent space is traceless matrices?   I skipped through Tapp's book in search of hints and found that the exponential map is a homomorphism from the Lie algebra into the Lie group. I also found a lemma that states that   $$ \det e^A = e^{\mathrm{trace}(A)}$$  That is unfortunately only half-useful: If I already know what the Lie algebra is then this lets me prove that the image of the Lie algebra under the homomorpism defined by the exponential map is indeed in $SL_n$.   So it's kind of not so useful. Surely there must be geometric insight?


Are a Civ's Unique Buildings transformed when conquered?

Assume for a moment that I am playing the Ethiopians, currently at war with the Egyptian empire.  Egypt has a unique building, the Burial Tomb, that replaces the Temple. My spies have already told me that the Egyptian city of "InvadeMe" contains one of these, as well as a generic Monument building.  If my forces conquer the city, what happens?   Does the Burial Tomb get converted into a Temple? (Since Ethiopians can only build Temples) Does the Monument get converted into a Stele? (Since Ethiopians can't build generic monuments)   (I just used Ethiopians off the top of my head, this question is not G&K specific)


IE10: How to open a new window without duplicating the current page using the keyboard?

I used to use CTRL+N in other browsers like Google Chrome or FireFox to open a new window. However, if I do this in IE10 in my Win7, a new window is opened but the current URL is reopened in this window too. This can take several seconds, but I just need to open a new blank window.  I know, I can do that using the mouse (see ), but is there a way to do it using the keyboard? Do not want to touch mouse every time when I'm working mainly with the keyboard.


PCA returns the same pair of principal axes for completely different 2D datasets

I noticed a (seemingly) weird behavior while using sklearn's  on 2D  datasets: I kept getting the same principal axes: $\pm\left(\begin{gathered}\sqrt{0.5}\\ \sqrt{0.5} \end{gathered} \right)$ and $\pm\left(\begin{gathered}\sqrt{0.5}\\ -\sqrt{0.5} \end{gathered} \right)$ (i.e. the lines $y = x$ and $y = -x$), even when I significantly changed the dataset.  Just to be sure, I wrote a short script that demonstrates this behavior: (The script creates nonsense datasets from different distributions, and standardizes and performs PCA on each dataset.)  import numpy as np from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA from sklearn.pipeline import make_pipeline  dists_funcs = [np.random.chisquare, np.random.exponential, np.random.power,                np.random.standard_gamma, np.random.weibull, np.random.rayleigh,                np.random.pareto, np.random.poisson, np.random.standard_t]  sqrt_of_half = 0.5 ** 0.5 n = 1000  for i, dist_func1 in enumerate(dists_funcs[:-1]):     dist_func2 = dists_funcs[i + 1]     X = np.array([(a, a * dist_func2(i + 2)) for a in dist_func1(i + 3, n)])     pipe = make_pipeline(StandardScaler(), PCA(n_components=2))     pipe.fit(X)     pca = pipe.named_steps['pca']     for principal_axe in pca.components_:         for z in principal_axe:             if abs(abs(z) - sqrt_of_half) > 1e-10:                 print(f'got {principal_axe} in {i}') print('done')    Is this behavior guaranteed? Is there an intuitive explanation for it?


Crontab not working with inner unix command

I have following crontab entry which does not work. Please can anybody help?  @midnight scp /home/xxx/file.txt xxx@yyy:~/zzz/file.txt_`date +"%m-%d-%y"`   This command works very well when run from command line. This is trying to backupo file to another machine every day with current date appended to it.


Showing that $\frac{\sqrt[n]{n!}}{n}$ $\rightarrow \frac{1}{e}$

Show:$$\lim_{n\to\infty}\frac{\sqrt[n]{n!}}{n}= \frac{1}{e}$$  So I can expand the numerator by geometric mean. Letting $C_{n}=\left(\ln(a_{1})+...+\ln(a_{n})\right)/n$. Let the numerator be called $a_{n}$ and the denominator be $b_{n}$ Is there a way to use this statement so that I could force the original sequence into the form of $1/\left(1+\frac{1}{n}\right)^n$


Clone external hard drive to laptop and then to ssd

I am trying to copy/clone a hard drive to my laptop and then burn it to a ssd. Is this possible? The end goal is to have the external hard drive cloned to ssd.


There seems to be a number of discrepancies in the power of Mjolnir in the MCU.  In Thor Odin places the power of Thor into his hammer Mjolnir proclaiming:     he who wields the hammer, if he be worthy will have the power of Thor.   At the climax of the film we see Thor regain his powers and armour when he sacrifices himself for the town.   In Avengers: Age of Ultron this is reaffirmed when the Avengers try to lift the hammer with only Cap getting close.   In Thor: Ragnarok Mjolnir is destroyed and Thor then discovers the powers where inside him all along.    But in Avengers: Endgame     Captain America wields Mjolnir gaining the power of Thor.   However, we saw in Thor: Ragnarok that the hammer has no real power of its own, the power was inside Thor all along. In addition Mjolnir being destroyed doesn't affect Thor's strength and when he gets Stormbreaker he becomes more powerful suggesting that Stormbreaker also gives the power of Thor to the wielder.   So does Mjolnir give additional powers and allow the bearer to have the powers of Thor, or is it just a magic hammer that has special powers all of its own?


What is the function for an arch given its height and base?

Given:   The arch is symmetrical about the y axis. The base of the arch is on the x axis. At the top of the arch: $$ x = 0; y = h$$ At the ends of the arch $$ y = 0; x = \pm \frac{b}{2} $$   An arch is an arc, the two base points and the top of the arch fit on a circle.   What is the function for the arch?


Why is the Principle of Superposition true in EM? Does it hold more generally?

In the theory of electromagnetism (EM), why is the principle of superposition true? Can we read it off from Maxwell's equations directly?  Does it have any limit of applicability or is it a fundamental property of nature?


Changing the verb for indirect quote/reported speech expressing habitual actions

The below-mentioned question is asked in my exam, I think my answer is correct, please tell if I am right, I have to challenge the question in 2 days if its answer given is wrong.  correct answer is given by examiner. candidate answer is the answer I ticked as correct.  In the following question, a sentence has been given in Direct/Indirect speech. Out of the four alternatives suggested, select the one which best expresses the same sentence in Indirect/Direct speech.     They said, “We pray everyday.”   Options:   1) They said that they have been praying every day.   2) They said that they pray every day.   3) They said that they prayed every day.   4) They said that we prayed every day.   Correct Answer: They said that they prayed every day.   Candidate Answer: They said that they pray every day.      as praying is a habitual action ,confirmed by everyday , so prayed is incorrect , i think.


Can I connect two MC business units to one Salesforce org?

Hope someone has an answer for my question. We have two business units in Marketing Cloud and one Salesforce Org. With the MC Connector, we push the SF data to MC.   At moment we use an SQL query to transfer the data of the synchronized objects from the parent business unit to the child business unit.The total sync time for the child BU is +/- 1,5 hour.  Cloud we use multi org to set up the MC connector for the child BU?   Thanks in advance,   Klaas


Black screen every time I start computer

I get this every time I turn on the computer, can someone help me please. Me sal estoy cada vez que enciendo el ordenador, alguien que me ayude porfavor.


Why is edit history being logged during the grace period?

The initial post occurred at 2018-03-19 15:37:03Z.    The first edit (second revision) occurred at 2018-03-19 15:38:52Z and the second edit (third revision) occurred at 2018-03-19 15:40:11Z.


Just downloaded Ubuntu 16.04. Where is the desktop?

I just downloaded Ubuntu 16.04. Where is the desktop. I have been having trouble with all these distros; they come with no  desktop and no terminal. How can you run the program??


Here is situation :   I have ViewController that have SideMenu that need to import   #import "SideMenu.h"   A I've to call the delegate method of ViewController from sidemenu so I've to import ViewController in sidemenu that lead me to error :  Cannot find protocol declaration for 'onClickCategory'   So I've to import both files to each other. How to handle this situation?  @class not work in both class.


unable to use static resource code in JS  StResource.js  function multiplyMe(a,b) {     return a*b; } function AddMe(a,b) {     return a+b; }   MyComp.cmp  <ltng:require scripts="{!$Resource.StResource}" afterScriptsLoaded="{!c.scriptLoad}" />   MyCompController.js  scriptLoad : function(cmp) {      multiplyMe(10,20); }   getting error      [multiplyMe is not defined]   after using given  it gives me lightning cli error


Equivalence of $a \rightarrow b$ and $\lnot a \vee b$

Is there a proof for the logical equivalence of $a \rightarrow b$ and $\lnot a \vee b$?


How do I re-enable Notification Center in Yosemite or El Capitan post-upgrade?

I believe I followed the advice here:   Post upgrade to Yosemite, the Notification Center icon shows up in the menu bar, but clicking on it does nothing, as noted by this individual:


How to retrieve the cell number from an iPhone through Xcode?

Is it possible for an iOS app to retrieve the cell number of an iPhone? It is possible on Android but I am not sure about iOS. Any help would be appreciated.


run a local script as root on remote server

I try to run a local script on multiple remote servers as root. I don't have su to root on those but just can run root commands using sudo. So far I tried:  for host in $(cat hosts_list); do ssh -tt $host "echo mypassword | sudo bash -s" < ./myscript.sh   And in myscript.sh there is something like:  echo "test test123" >> /etc/tests exit 0   But it looks like not working and won't change the file. What is the proper way to run this script as root and without typing password separately for each host?


"Needs closed", "needs resolved", "needs done"... I have never seen this before and it sounds totally incorrect, grammatically speaking. However, I have been hearing this so often, at work and even in written work documentation, that I am starting to doubt that I am right about this not being correct. Could anyone please help with that? Thank you.


Splitting up the nodes of a Graph such that all nodes in these graphs have even degree.

$G$ is a simple undirected graph. Show that 2 disjunctive sets $A$ and $B$ exist such that $A \cup B = V(G)$ and all nodes in $G[A]$ and $G[B]$ have even degree.  I have already proven that this is true for trees and cycles. Sadly I have to idea generalize that.  It would be really great if someone could give me a hint.


Trying to install tor but packages have unmet dependencies

I have tried uninstalling with purge and reinstalling with apt-get but it seems like I have something that wont let me install tor. Here is the message it gives ROOTUSER :~# apt-get install tor 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: libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.2.0-9 is to be installed libgirepository-1.0-1 : Breaks: libgjs0g (< 1.58.1-2~) but 1.52.4-1 is to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.  how do I locate  libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.2.0-9 is to be installed  libgirepository-1.0-1 : Breaks: libgjs0g (< 1.58.1-2~) but 1.52.4-1  and fix it so that installation goes smoothly? thanks!


GRUB doesn't show up on Windows 10 / Ubuntu 16.04 dual boot, although `update-grub` and `efibootmgr` seem to show both options

I have an HP Zbook with Windows 10 preinstalled. I have succesfully installed Ubuntu 16.04 in it, but when booting the computer, no GRUB menu shows up and it boots directly to Windows.  I have disabled the Fast Startup option and tried everyhting I was able to make it work, but with no success. I am able to boot Ubuntu by entering the boot menu at startup. I copy here the results of efibootmgr and update-grub for info.    Does anyone know how can I have GRUB to select an OS to boot?


I have Ubuntu 15.10 installed. I have also installed LAMP using the . I then proceeded to set up Moodle via the web page installation. I hit a road block when I got  Moodle requires the json PHP extension.  Please install or enable the json extension.   With the link above, I have tried installing, whilst LAMP was still installed, only PHP5 (libapache2-mod-php5) -- and of course restarting the apache2 service. The problem is in the the /etc/php5/mods-available folder, no json.ini file appears. When I type in terminal sudo php5 -m, json is not a module running. However if I attempt to remove PHP5, it shows before I confirm the removal that the package php5-json will go.   The question I have is how do I get the json extension if I don't have it already, or if I do have it (and it's placed somewhere else) how do I enable it?  EDIT: output of apt-cache policy php5-json  php5-json:   Installed: 1.3.7-1   Candidate: 1.3.7-1   Version table:  *** 1.3.7-1 0         500 http://nz.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages         100 /var/lib/dpkg/status   Tried sudo apt-get install --reinstall php5-json but still missing file.


I'm awfully paranoid about getting food poisoning after having it once before. I bought a pot of live yoghurt with mango and after eating a couple of spoonfuls remembered I didn't check use by date when I bought it a few minutes beforehand. It was a day past the use by date.   No visible mould and tasted fine to me.  Should I be worried?


$base_url set to an external domain causes problems when logging in

I am developing a conference site with Drupal 7. The site is hosted at domain1.com. The conference is covered by another organization, and they require the conference page to be accessible from their own domain, something like organization.com/conference2014. Fortunately, Drupal has the $base_url variable and the site is accessible from organization.com/conference2014.  My problem is when I want to access administration interface of Drupal from organization.com/conference2014?q=user/login. After I enter my credentials, Drupal redirects me to the organization.com site which is administrated by the organization administrator. When I access again organization.com/conference2014, it still asks me for the password.  What I need to achieve is, after entering the credentials, being redirected to organization.com/conference2014, and being to perform any administration task.  Do you have any idea on how to tackle this problem?


Show that $\sin x$ lies between $x-x^3/6$ and $x \;$ $\forall x \in R$   I am getting:  $$\sin(x) = x - \frac{x^3}{3!} + R_4(x)$$  where $R_4(x) = \frac{\cos(c)x^5}{5!}$ for some $c$ between $0$ and $x$   I want to prove $R_4(x)\geq 0$ to arrive at the result $x-x^3/3 \leq \sin(x)$.  for:$$0 \leq x \leq \pi/2 \Rightarrow 0<c<\pi/2 \Rightarrow R_4(x)\geq 0$$ but for: $$-\pi/2 \leq x < 0 \Rightarrow -\pi/2 < c < 0  \Rightarrow R_4(x) < 0$$  How can I proceed with this ? There are many cases that I need to check


Consider Diophantine equation $2x^3+1=y^3$  There are two solutions  $$x=(0,-1), \, y=(1,-1)  $$  Are there anymore integer solutions for $x$ and $y$?  I've tried the following argument but am not satisfied with it.  Identity:    $$[(B^3)(x^6)+3(B^2)(x^3)+3(B)]x^3+1=(Bx^3+1)^3$$  Looks like:  $$[        2                  ]x^3+1=(  y   )^3$$  Let  $[(B^3)(x^6)+3(B^2)(x^3)+3(B)]=2$ and $(Bx^3+1)=y$  Since $2$ divides $B$ we get possible values for $B$ are  $$B=\{-2,-1,1,2\}$$ Testing the $B$ set in equation $$[(B^3)(x^6)+3(B^2)(x^3)+3(B)]=2$$ we can see that the only possible integer solution is $B=2$ and $x=-1$ and so $y=-1$.  The other solution is trivial $x=0,\,y=1$. So from this argument there are no other integer solutions for $x$ and $y$.  My problem with the above argument is that by me saying:  "Let  $[(B^3)(x^6)+3(B^2)(x^3)+3(B)]=2$ and $(Bx^3+1)=y$"  I am indirectly saying from the start that there and no other solutions.  What I would have to do is prove that:   all possible solutions for $y$ are of the form $Bx^3+1$ and  equation $[(B^3)(x^6)+3(B^2)(x^3)+3(B)]=2$ is true for all possible solutions for $x$   But I cannot prove it.  thank you


Maximal ideals of the ring $R=C(\mathbb R)$ of continuous functions

Let $R=C(\mathbb R)$ be the ring of continuous functions $f:\mathbb R\to\mathbb C$ where the addition and the product is pointwise defined.  Let $$\mathbb m_a=\{f\in R\ |\ f(a)=0\}$$    be a maximal ideal. Show   when $\mathbb m_a=\mathbb m_b$ it implies that $a=b$.   Why is that true?


To solve the radius of convergence of a power series in complex analysis

Let $f(z)=z+\sum_{n=2}^\infty a_nz^n$ have a positive radius of convergence. Does there exist a series $g(z)=z+\sum_{n=2}^\infty b_nz^n$, satisfying   $$ f(g(z))=z\text{?}\tag{49} $$   Does this series have a positive radius of convergence? Are the coefficients $\left\{b_n\right\}$ uniquely determined?   I don't think completely expand all the terms of f (g(z)) is a good idea, can you give me some other methods to solve it? Thank you so much.  .


How to quotient $\mathbb Z [\sqrt{-11}] / (1+\sqrt{-11})$?

That's it. I want to do this quotient,  $\mathbb Z [\sqrt{-11}] / (1+\sqrt{-11})$. My first idea was to see which elements are in the ideal:  $(a+b\sqrt{-11})(1+\sqrt{-11}) = a+ a\sqrt{-11} + b\sqrt{-11} -11b$  So I want to make and application who send this elements to $0$, and then see the Kernel of the application and apply the Isomorphism Theorem.  Any ideas?


Which packages come standard with Ubuntu's `texlive` package?

Is a list published somewhere of which macro packages come standard with texlive? Specifically, I am considering installing the texlive package (not texlive-full) in Ubuntu. I'd like to know if certain tex packages that I need will come standard, or if they will need to be installed in addition. I realize that I could just see what I have and what I don't have after installing texlive, but    I worry that I will have somehow ended up with a package installed that I cannot rely on coming standard. For the future, if future releases of texlive have different packages that come standard, I'd like to know where to look for the list.     EDIT I don't think that suggested existing answer is answering my question. That is about having an existing texlive distribution and checking to see what was originally installed. I'm looking to know what to expect before the Ubuntu texlive package is installed. It's a subtle difference but important in my context. It might warrant a vote to close as it's more about Ubuntu than TeXLive, but I disagree that it has already been answered (at least not at ).    EDIT: I'm not interested in this for a personal installation of LaTeX. I need to know this for a separate piece of software that relies on LaTeX to produce pdfs. The installation process for this other software needs to understand what it should bring in when checking for a texlive distribution, without overdoing it or asking the person installing it to manually do anything with their texlive distribution.   I'd prefer to just have the list of these packages in a reference online somewhere and write the software to assume that no more than those standard packages are used in pdf production. I'd prefer this than to directly look at any one installation and see what it has/does not have.