TikZ-picture: remove arrows at starting point of edge

I'm a litte confused, because I drew a TikZ-picture and didn't get what I expected. Have look at the following:  \documentclass[12pt,a4paper]{article} \usepackage{amsmath, amssymb, ngerman} \usepackage[latin1]{inputenc}  \begin{document} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.8cm,y=0.8cm] \draw[->,color=black] (-3.17,0) -- (5.5,0); \foreach \x in {-3,-2,-1,1,2,3,4,5} \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$}; \draw[->,color=black] (0,-3.22) -- (0,7.5); \foreach \y in {-3,-2,-1,1,2,3,4,5,6,7} \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$}; \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$}; \clip(-3.17,-3.22) rectangle (5.35,7.26); \draw (0,0) rectangle (1,1); \draw (-1,0) rectangle (0,1); \draw (0,-1) rectangle (1,-2); \draw (3,0) rectangle (4,1); \draw (0,4) rectangle (1,5); \draw[->] (1,1) edge [bend right] node[above right] {$d_{A,P_1}$} (-1,1); \draw[->] (-1,0) edge [bend right] node[left] {$d_{A,P_2}$} (0,-2); \draw[->] (1,-2) edge [bend right] node[below right] {$d_{A,P_3}$} (4,0); \draw[->] (4,1) edge [bend right] node[above right] {$d_{A,P_4}$} (1,5); \end{tikzpicture}  \end{document}   I drew some bended edges, but the little arrows showing up at the starting point of my edge are not intended. I have no idea how to fix it but it has something to do with "edge".  Perhaps someone can help me out? Thanks in advance.


The question is in the title "Is there an algebraic $a$ such that $\ln(a)$ is algebraic other than 1?" It was inspired by .   I don't see an easy answer, but might be missing something.


Duplicate input same amount of times in new lines

I'm in my first coding class and still getting the hang of it.  I need to write a code that will print a line of '+' a certain amount of times in the same line but also new lines at the same time depending on the number entered.  So far I only have the code to print '+' once each time in a new line:  def draw_a_line_of_plus(length):   for i in range (length):     print ('+', end='')


SEO: example.com/keyword1/keyword2 or example.com/keyword1-keyword2

For search engines, mostly Google, which is better:  example.com/keyword1/keyword2   or:  example.com/keyword1-keyword2   This specific page has to rank high for keyword 2, and possibly keyword 1 too.


"Do the needful" -- Why is it used instead of asking a question?

Update: (Originally this was a comment, but I thought it was worth sharing here at the top.)   In the original question, I asked if there was a polite, socially-acceptable way to ask an Indian co-worker not to use the phrase "do the needful", as I didn't care for it.   In the years since I asked this question I've asked many people about the phrase. To the Indians I've asked in-person, it's not rude in any way. To Americans I've asked it varies anywhere from "I don't like it, but I don't mind it" to "It's very rude and makes me angry when I see it".   Through a long series of edits the question morphed and I wasn’t able to delete it because it had upvoted answers. The question, as it stands now, has no other answer.  I guess, though, if you're non-Indian and you find it rude, or if you're Indian and you've never realized someone might find it rude, this post may still have merit. Hopefully it does. It certainly has gotten a lot of views. Best wishes, folks.  End Update. See below for what's left of the actual question.    "Do the needful."   It's a phrase that I've only seen used in email, and I find it . . . presumptuous (maybe even rude). Regardless of prefacing with "please", one is commanding rather than asking for assistance.  I've only seen it used by those of Indian origin, so I've simply not mentioned it at all rather than worry about any cross-cultural offense that may come of bringing it up.  But still, I don't understand why it's used. Why not request rather than make two statements, one factual, one imperative?  For example, why would one use:        I'm told you have Jane's email address. Please do the needful.      instead of,        Would you send me Jane's email address?


Why didn't James' love and sacrifice for Lily protect her?

We know that Harry survived Voldemort's killing curse because Lily loved him so much that she sacrificed herself in an attempt to protect him. This resulted in a very powerful charm that pretty much rendered Harry immune to Voldemort (until Voldemort figured out the work-around). Then there's this passage describing that night:  [Voldemort] was over the threshold as James came sprinting down the hall. It was easy, too easy, he had not even picked up his wand ... "Lily, take Harry and go! It's him! Go! Run! I'll hold him off -" Hold him off, without a wand in his hand! ... He laughed before casting the curse ... "Avada Kedavra!" Harry Potter and the Deathly Hallows Chapter 17: Bathilda's Secret  So James Potter, fully aware that he was sacrificing himself (he said "I'll hold him off," not "I'll get rid of him") ran to face Voldemort because of his love for Lily and Harry. This seems to be very similar to how Lily tried to protect Harry from Voldemort even though she knew she would die. It seems to me that the same charm should have been cast upon Lily when James died, but just moments later Voldemort killed her too. Apparently James' sacrifice did not result in a charm that protected Lily, even though he did it from love for her and Harry. Why is this? Was something different in the circumstances?


How to show that the Coriolis effect is irrelevant for the whirl/vortex in the sink/bathtub?

There is a common myth that water flowing out from a sink should rotate in direction governed by on which hemisphere we are; this is shown false in many household experiments, but how to show it theoretically?


Achivement item behavior for topbar on stackexchange.com

Visiting the achivements popup in topbar on stackechange.com doesn't clear the green rep-increment icon:        Also I noticed that both achivements items are lighted on stackexchange.com, i.e. +rep and a "cup", but the light of cup is cleared after visiting the popup. May be I will add screenshot (or gif) later for this case, after earning more reputation.


Python, nested loops to iterate through a list of lists, giving unexpected results

I'm trying to iterate through a list of lists, in order to rearrange it in a new list of lists:  lt = [["a","b","c"],["A","B","C"],["1","2","3"],["4","5","6"]]  lt2 = [[]]*len(lt[0])  for i in range(len(lt[0])):     for v in range (len(lt)):         lt2[i].append(lt[v][i])  print(lt2)   I'm expecting the following to happen: 1- i = 0, the nested loop iterates v 4 times, from 0-3 2- i = 1, the nested loop iterates v 4 times again. 3- i = 2, the nested loop iterates v 4 times for the last time. What I'm planning to achieve is to get the following:  lt2 = [['a','A','1','4'], ['b','B','2','5'],['c','C','3','6']]
   So it's a rearranged list of lists  Unexpectedly, I'm getting:  lt2 = [['a', 'A', '1', '4', 'b', 'B', '2', '5', 'c', 'C', '3', '6'], ['a', 'A', '1', '4', 'b', 'B', '2', '5', 'c', 'C', '3', '6'], ['a', 'A', '1', '4', 'b', 'B', '2', '5', 'c', 'C', '3', '6']]


I was thinking whether it is possible to have some animation on Stack Overflow.  For instance, if a message comes then there should be a beep sound so that users can be alerted. I know that presently notifications are shown in red on the global inbox to mark its presence, but, if user is on some other tab or browser, then it is quite possible that he/she may not reply for quite a bit of time.   I thought by this way the comments can easily seek some attention quickly!


Custom TListView or similar with multi-line text items that expands the selected item height to show action buttons

I'm trying to find an existing component or code snippet that allows to create a ListView like component similar to the following one:    Basically it would expand the selected item to show action buttons while also allowing mutli-line text for each item.


Why find -name DIR -exec rm -rf {} + does not remove directories

I want to cleanup my cmake project and run this command  find -name CMakeFiles -o -name CMakeCache.txt -exec rm -rf "{}" +   It deletes files CMakeCache.txt but refuses to remove directories. So I have to workaround it with this hack  find -name CMakeFiles | while read line; do rm -rf $line; done   Does anybody know what might be the reason why find/rm behaves this way and how to make it work properly?  Update:  I found out. The problem is in operator precedence. Operator -o makes -exec work only for the second operand CMakeCache.txt . So the correct syntax needs parens ()  find \( -name CMakeFiles -o -name CMakeCache.txt \) -exec rm -rf "{}" +   Thanks for posting the related question.


Illustrator - my rectangles are all sheared skewed?

When I try to create a rectangle in a certain .ai file they all come out sheared:    but this isn't the case in other projects.  Is there any way to fix


what is the way to reach apropriate answer about my question about group in algebra

Assume there exist $2$ natural numbers that are coprime ($m$ and $n$ such that $(m,n)=1$) such that for each $g$, $h \in G$ we have $g^m h^m = h^m g^m$ and $g^n h^n = h^n g^n$. Then $G$ is abelian group. (That means $ab=ba$.) Hint: $(m,n)=1$ then there exist $c,d\in\mathbb{Z}$ s.t. $cm+dn=1$. thus $$gh = g^{cm+dn}  h^{cm+dn} = g^{cm}  g^{dn}  h^{cm}  h^{dn} = (g^m)^c  (g^n)^d  (h^m)^c  (h^n)^d = (g^n)^d  (g^m)^c  (h^m)^c  (h^n)^d$$ Use property in hypothesis to reach $gh=hg$.  Please help me to continue.


Story in which a man gets executed because of a bureaucratic mix-up

Trying to identify a story: I once read an anthologized short story in which a man is scheduled to be executed for a minor offence. I believe the narrative was conducted entirely in letters back and forth between people like his lawyer, relevant authorities, and other such figures. As the situation progresses his fate remains unavoidable for one absurd reason or other (holidays, rules, automatic mechanisms.) Does this ring a bell for anyone? Thanks!


I'm having issues with my hair emitter to show / render as cones. I'm using cycles and during "solid" mode in the viewport the hair looks like normal hair. but as soon as I switch to rendered view or even render the still, the hair turns into cones. Ive reset all options to default, reloaded the same .blend file and ive created new ones. Still does the same thing.


Convention Badge - Should all ten posts have score of 2 or more?

For Convention badge, should all posts have score of 2 or more, or should have 10 posts and one of them could have score of 2?


Will very uneven sample sizes within a factor variable cause problems when running a binomial glm?

I'm running a binomial GLM in R. The data for the model comes from survey responses. The response variable is 'change in wellbeing' and the predictor variables are derived from several other questions from the survey. Many of the predictor variables are categorical, with several levels. The number of responses in each level can be very different, e.g., we have a variable 'employment status' with the following levels and numbers of respondents in each level: Retired              - 650 Employed (full time) - 150 Employed (part time) - 200 Student              -   3 Unemployed           -  10  There are similar patterns for predictor variables such as 'ethnicity' and 'disability', with one or two of the levels containing most of the respondents, and a few other factor levels with very low numbers of respondents in them. As far as I'm aware, it's still okay to run models when some of the predictor variables look like this. The problem being that the statistical power for those levels with very low sample sizes will be very poor (e.g., from the above example, it's unlikely we'd be able to tell if being unemployed is a strong predictor of wellbeing). However, I'm wondering if there may be other problems or consideration to make when data looks like this. My questions are:  Is it still okay to run models when the data look like this? Or may some factor levels need grouping? Will data like this cause any computational problems when running a model? Are there any other considerations to make when data looks like this?


Replace trilogy raw links with the current question title?

It often happens that people will refer to other questions by simply pasting the full link to this question, especially on Meta.  Would it be a good idea to detect such links, and replace them directly by a formatted link on their current title?  Example:    You can try formatting at this  question:  https://meta.stackexchange.com/questions/49424/stack-exchange-sandbox   Would be automatically changed in:      You can try formatting at this   question:    It would make links given by new users (unaware of the full syntax) more elegant, and it would also be faster when more regular (and lazy) users want to point to another question without making the usual "see it "    Edit: Note that this behaviour is implemented already for the "possible duplicate" auto comments, so the question here is not about "how to do this technically".


"More linked questions" view does not show all linked questions

I have a favourite canonical question for PDO problems,   It's been used many dozens of times, as the "linked" column on that question shows. In fact, there are so many entries that a "see more linked questions..." link appears.  However, the  page shows only three links, because the url: search pattern is ignoring links in comments.  This doesn't make sense. Can this be fixed?  Also, I notice the links in the comments are all in the   https://stackoverflow.com/q/3726505/   format, while the URL search filter on the "see more..." page, by default, looks for  https://stackoverflow.com/questions/3726505/*   if comments were included here, they would be ignored anyway. Shouldn't the pattern rather be  https://stackoverflow.com/q*/3726505/*    ?


Sci-fi novel - apprentice navigator on a winter planet

I started a book many years ago (probably about 30!) and I have never been able to remember the title.  All I do remember is a student navigator on a winter (icy) planet who climbs into his spaceship which I seem to remember is called Tycho Brahe - or not, but the name stayed in my head as being connected to the novel.  This young student is at a college for spacefarers or similar . I remember him going into a cafe and getting hot chocolate after ice skating. He was prematurely asked to pilot a ship (the Tycho Brahe, I believe) which involved a very cramped compartment and some sort of symbiosis with the ship itself - and then its a blank. Sorry its not much to go on. I will look at the suggestions made.


Created Hotspot not found using other devices

I have Ubuntu 12.10 on my desktop machine and have a wireless capability on it using D-Link DWA-121 . The Desktop machine have Ethernet connection. When creating a wireless hotspot by doing the following:  Open All Settings --> Network --> Wireless --> Use as Hotspot    I can't see the network from other machines or phones. any hints?


How do I accept an answer when I have no expertise to know which is correct?

There's been a couple of times where non-expert me has asked a question on a SE site, received great well-written answers, but couldn't decide which answer to accept due to my lack of my expertise on the topic (I guess that's why I'm asking).  Examples of such questions include:  and   The saturated fats question in particular provides two well constructed by diametrically opposed answers. I accepted one that seemed the best researched, but I can't really tell which on is really correct.  It seems that for technical/solve-the-problem-now kind of sites (ie stackoverflow or DIY) I can provide immediate feedback as to whether something worked or not. However on purely knowledge/informational type questions there's no immediate feedback I can provide to the other SE users as to whether something worked or is correct. I can't go run studies on whether saturated fats are good or not without dedicating a career to the topic for example.  Anyway, in these kinds of situations. when I can't really know which is correct or I can't give immediate feedback about what worked, how should I accept answers? Should I maybe just NOT accept an answer and let my accept rate lag (making me appear like a poor user)?


Changing one list happen to changed back up list

Here is my code: x,y= int(input()),list(map(int, input().split(" "))) ; y_2=y for i in range(int(x/2)):      print(y_2.index(min(y)),y_2.index(max(y)))     del y[y.index(min(y))]     del y[y.index(max(y))]  When I checked y, it changed, which is what I want. But then, my backup list y_2 also changed. why is that?


Different modes of stating probability law

I met two versions of expressing induced probability measure on $\mathbb{R}^n$ of n-dimensional random vector $\mathbf{X} = (X_1, \ldots, X_n)$ (probability law, probability distribution) defined on probability space $(\Omega, \mathcal{F}, \mathbb{P})$:  $$ \mathbf{P}_{\mathbf{X}}(B)=\mathbb{P}\circ\mathbf{X}^{-1}[B]=\mathbb{P}(\{\omega\in\Omega\mid\mathbf{X}(\omega)\in B\}), \quad\forall B\in\mathcal{B}(\mathbb{R}^n)\\or\\\mathbf{P}_{\mathbf{X}}(B_1 \times\ldots\times B_n)=\mathbb{P}(\{\omega\in\Omega\mid X_1\in B_1,\ldots,X_n\in B_n\})=\mathbb{P}(\bigcap_{i=1}^{n}\{\omega\in\Omega\mid  X_i\in B_i\}),\quad\forall B_1,\ldots,B_n\in\mathcal{B}(\mathbb{R}) $$ My question is: are they equivalent? If yes, why it is enough to determine the measure $\mathbf{P}_{\mathbf{X}}$ only on the class $\{B_1\times\ldots\times B_n\mid B_i\in\mathcal{B}(\mathbb{R})\forall i\in\{1,\ldots,n\}\}$?


network manager - run script when connect failed

is it possible to tell network manager to run a script when network connection gets down (and it can't reconnect)?  e,g: I have A bug in my network card driver, and sometimes NM fails to connect,  a script can fix it` and I want it to be run each time network-manger can't connect, how do I do it?


How to maintain a file's 'last modified' date?

I'm copying files and folders over from one filesystem to another (both are ext3) via cp in the terminal. The 'date modified' on all of the files are being changed to the current time although I am not modifying the folder or the files. I'd like for them to keep their existing 'last modified date' which vary within the past 5 years.   I am not , but to maintain the existing 'last modified' date.  EDIT: This is still applicable for versions of ubuntu 12.04+ and newer


XML object throwing null pointer exception inside anonymous inner class for loop

I keep getting a null pointer exception for a linearlayout object that i defined on xml. The object was added to the layout that i set in the setcontentview() method. The linearlayout shows on the screen. I also apply an object animator to the linearlayout object and it moves as it should on the screen.  I get the null pointer exception when i try to compute a calculation in a for loop with the getX() and getY() values of this xml linearlayout. This for loop resides inside an anonymous thread which is initialized inside a method. Well, here's the code. If you see the error please let me know:  LinearLayout xml_linearlayout //inside onCreate xml_linearlayout = (LinearLayout)getLayoutInflater.inflate(R.layout.mm,null);//i think here's problem //here is my main layout called main. Its a relative layout //this main layout was created programmatically not by xml format main.addView(xml_linearlayout,parameters that have MATCH_PARENT= width and height); //onCreate has ended //method that attempts to use getX() and getY() of xml_linearlayout public void methodCal(final float x, final float y){ float newX = x; float newY = y; new Thread(new Runnable(){ public void run(){ for(int i=0; i<30 ; i++){ double e = Math.pow(newX-xml_linearlayout.getX(),2.0);// NPE thrown here } }  }).start(); }


Hide 'add to cart' button for some products

I'm trying to hide the 'add to cart' button for some products (based on the type of product and custom variable is_customized).  If the custom variable is_customized is true only then show the 'add to cart' button.  I cannot find a hook using which I can remove/hide the button and then add it again if the is_customized is true.


Which preposition is correct "On the airplane" or "In the airplane"?

Which preposition I have to use when talking about "airplane" or "aircraft"?   Should I use "in" like "in the car" or "on" like "on the bus?      "On the airplane / aircraft"   or      "In the airplane / aircraft"?


biblatex: parentheses around the volume number of an article

What do I have to write in the preamble to bring the bibliography to make parentheses around the volume number of an article? I'm using the authoryear style.  Here is an example:  \begin{filecontents}{filename.bib} @article{Billio.2012, author = {Billio, Monica and Getmansky, Mila and Lo, Andrew W. and Pelizzon, Loriana}, year = {2012}, title = {Econometric measures of connectedness and systemic risk in the finance and insurance sectors}, pages = {535--559}, volume = {104}, number = {3}, journal = {Journal of Financial Economics} } \end{filecontents}  \documentclass{article} \usepackage[hyperref=true,             maxcitenames=4,             isbn=false,             dashed=false,             style=authoryear,             backend=bibtex,             firstinits=true]{biblatex} \bibliography{filename.bib} \begin{document} \cite{Billio.2012} \newpage \renewcommand\refname{List of Literature} \printbibliography[heading=bibintoc] \end{document}   Any help is appreciated.


Is there a built-in method to compare collections?

I would like to compare the contents of a couple of collections in my Equals method.  I have a Dictionary and an IList.  Is there a built-in method to do this?  Edited: I want to compare two Dictionaries and two ILists, so I think what equality means is clear - if the two dictionaries contain the same keys mapped to the same values, then they're equal.


How do I install Windows XP from a USB pen drive?

Possible Duplicate:          Is possible to install Windows XP from a USB ? I found many articles after searching Google, but they all talk about different approaches to do the task.   Since I didn't install XP from a pen drive before, I don't know which of those approaches are right or not.  If you've ever installed Windows XP from a USB drive, how did you do it? I'm looking for a technique that really worked for you, not something that you've read and haven't tried before.


What swapfile size to make? I have 4GB RAM

Very often I am out of memory. I noticed that I don't have a swapfile. What size should I choose? I have 4GB RAM.  Programs I use are: Firefox, Thunderbird, Grive, Android Studio, that's it, still my laptop freezes pretty often.


Rollover into bond fund to do dollar cost averaging

I elected to accept my former employer's pension buyout offer of $15K and roll it into my 401(k) plan. If I had this in cash I would invest it over time to leverage the benefit of dollar cost averaging. But it's a rollover so I have to invest the whole lump at once.  I'd still like to leverage DCA, so I'm considering putting the entire sum into the 401(k)'s Short Term Bond Index fund, then periodically transfer smaller amounts into the 401(k)'s other funds; perhaps over a 3-5 year period. Is this a viable strategy to get the benefit of DCA? Are there reasons why I would want to do something else?


Display four or more authors instead of “et al.”

I'm trying to write a bibliography in which many authors of a book appears in this format:     Author1, Author2, Author3 and Author4   So, I'm using here biblatex this way:  \usepackage[backend=biber, style=alphabetic]{biblatex}   .bib file  @book{atl1,     label       = {Tavares et al.},     author      = {Cristopher Tavares and Kirk Fertitta and Brent Rector and Chris Sells},     title       = {ATL Internals},     subtitle    = {Working with ATL 8},     edition     = {2},     publisher   = {Addison-Wesley Professional},     date        = {2006-07-15},     totalpages  = {888}     }   But the output of this is      Cristopher Tavares and al.   .tex code:  \documentclass[12pt,english,french]{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{csquotes}% recommended in output (biblatex)  \usepackage[backend=biber, style=alphabetic]{biblatex}  \addbibresource{bibli.bib}  \usepackage{titletoc}  \begin{document} \nocite{*} \printbibliography \addcontentsline{toc}{chapter}{Bibliographie} \end{document}   How do I to deal with this, please?


What does the factorial of a negative number signify?

I understand that the factorial gives the number of arrangements. For example: the factorial of zero i.e. an empty set ( doesn't occur) is 1.   As the empty set can be arranged only in 1 way - i.e. by filling nothing. Now, let's take an example: 5 distinct seats. How many ways 5 distinct seats can be arranged? - 5! ways i.e. 120.  So, basically, factorial gives us the arrangements. Now, the question is why do we need to know the factorial of a negative number?, let's say -5. How can we imagine that there are -5 seats, and we need to arrange it? Something, which doesn't exist shouldn't have an arrangement right? Can someone please throw some light on it?. I saw some research done on the formula -


How can I make a disable field with modelform after django 1.9

I'd like to create disabled field with ModelForm on django 1.11.  I read django has "disabled field options" since 1.9. However, I can not understand how do I define disabled field with ModelForm.  Could you tell me how to create disabled field with ModelForm please ?  Here is my models.py, forms.py and views.py    class my_model(models.Model)      name = models.CharField(max_length=10,)     title = models.CharField(max_length=10,)     date = models.DateField(default=date.today,)      def __str__(self):         return u'%s' % (self.name)  class my_modelform(ModelForm):      class Meta:         model = my_model         fields = ['name', 'title', 'date']         widgets = {             'date': DateWidget(usel10n=True, bootstrap_version=3,),         }         disabled = [ 'name' ]  class my_UpdateView(UpdateView):     model = my_model     form_class = my_modelform     template_name = "update_form.html"     success_url = "success.html"         Although, I changed the "disabled = {'name' : True} instead of [ 'name' ], it doesn't work.


Move meshes of several objects without affecting relative position

I've got a problem. I imported the single parts of a model as about 80 separate .obj files. The thing is, that the location of the objects is at {0,0,0} but the meshes are at ca {32,-149,1252} which makes them very far from the origin. I need to keep the relative position between the meshes of the objects as they are part of a single model. Is it somehow possible to move all meshes without affecting their relative position? I need to get the model to the origin. Maybe there is a different approach? I'm glad for every tips. Note, I cannot combine the meshes into a single one because I need them separated. Edit: Minimal Example  Create a new file with the standard cube Create an additional torus and move it 1 along the z axis (g z 1) press Tab to get into Edit-Mode of the torus and then move the mesh 5 along the x-axis (g x 5) press Tab again to leave Edit-Mode and select the cube press Tab to get into Edit-Mode of the cube and then move the mesh 5 along the x-axis (g x 5)  After this, you should get something like shown in the following image:  Now, as you can see the location of the objects is {0,0,0} and {0,0,1}. This is similar to the situation I have with my imported *.obj files. It is vitally important the torus stays on top of the cube, but I want to move the meshes so that both objects are in the origin. When I select all objects and move them together to the origin, then I get the situation, where for instance the cube is at {-5,0,0} but the mesh of the cube is at {5,0,0}.  You see that although my objects are now at the origin, the little coordinate system indicator is far behind it. Therefore, is there a way to move all meshes (instead of the objects) while maintaining their relative position?


Issue with hover effect when append li element

I have problem when I try append li element to list using jQuery. When I create static li element in HTML mouseenter and mouseleave function work ok. But when I want to add li element using append function mouseenter does not work. Can you explain me, where I make the mistake?  $(document).ready(function() {   var input = $('.task-input');   var span = ''    $('.add-button').click(function() {     if(input.val() == '') {       var margin = 10;       for(var i = 0; i < 10 ; i++) {         $(this).animate( {             'margin-left': '+=' + (margin = -margin) + 'px'          }, 50);       }        }     else {       $('ul').append('

'+input.val()+'
'+ span +'
');       input.val('');     }    })    $('.list').find('li').mouseenter(function() {     $(this).css({       'background-color':'yellow'     })     $('.remove').css({       'display':'block'     })      $('.remove').click(function() {       $(this).parent().remove();     })   })    $('.list').find('li').mouseleave(function() {     $(this).css({       'background-color':'lightgray'     })      $('.remove').css({       'display':'none'     })   })    })


How to show if $A \subseteq B$, then $A \cap B = A$?

Hi I'm new to set theory. I need to prove that if $A \subseteq B$, then $A \cap B = A$. I would like to do this the formal way, without a Venn diagram. How should I proceed?


Show that the expected value of $X$ is equal to $E(x)$

Consider a random variable $X : Ω → \{1, . . . , 15\}$, that takes on integer values in the set $\{1, . . . , 15\}$. Show that the expected value of $X$ is equal to: $$E(X) = \sum_{i=1}^{15} P(X ≥ i)$$


If $a^{n}-1$ is prime then $a=2$ and $n$ is prime?

I was doing some basic Number Theory problems and came across this problem :     Show that if $a$ and $n$ are positive integers with $n\gt 1$ and $a^{n} - 1$ is prime, then $a = 2$ and $n$ is prime   My Solution : (Sloppy)        $a^{n}-1$ = $(a-1)$ . $(a^{n-1} + a^{n-2} + ... + a + 1)$   This means that $(a-1)$ | $(a^{n}-1)$    But $(a^{n}-1)$ is prime   So , $(a-1)$ = 1 $\Rightarrow$ $a = 2$   Now , let $n$ be composite   $n = kl$ , where $1 \lt k \lt n$ and $1 \lt l \lt n$   Now , $a^{kl}-1$ = $(a^{k}-1)$ . $(a^{k.{(l-1)}} + a^{k.{(l-2)}} + ... + a^k + 1)$   This means that $2^{n} -1$ is composite    Hence , we have achieved a contradiction      My Question : Am I correct ?


I am trying to learn memory allocation in c for union and having a problem trying to do so  #include <stdio.h> union abc {     int a;     char name[5]; };  int main() {     union abc hh;     printf("Enter two values\n");     scanf("%d%s",&hh.a,&hh.name);     printf("Values are\n");     printf("%d\n%s",hh.a,hh.name);      return 0; }   As seen in the above code i am trying to store two values in a union.But however the result i am getting after enter values as '23' and 'p' is  Enter two values                                                                                23                                                                                p                                                                                Values are                                                                                112                                                                                p      Can someone help me regarding above code


A software update is required to use this startup disk - does not update

I'm trying to do a clean install of macOS via USB on my MacBook Pro 2019 13". I have setup the boot security so that:  It has medium security (I also tried no security) on bootable devices Allows the Mac to boot from an external drive.  I formatted my USB to Mac OS Extended (Journaled) with GDUI partition map. The USB with the macOS installer successfully shows on the startup manager. When I try and boot from it, however, I get this message:  I click update and I then get this error after seeing an Apple Logo (yes I was connected to internet):  So in conclusion I cannot boot from this USB. The USB is of type USB-A that's connected through a USB-C hub, that could be the problem? Maybe a direct connection from a USB-C usb flash drive is better? Or the wrong formatting on the USB drive. That's the only two I suspect. But then again, why isn't it updating? Thanks.


Mac App Store shows update count but section is collapsed/empty

My updates badge shows 6 (also in the  menu), but the section in the updates tab seems to be collapsed (top separator line is thicker, like two lines) and not showing the available apps. I'm currently running macOS 10.12.1 (Mac App Store 2.2) and first noticed this problem today. The other tabs are behaving normally and this badge has changed from 5 to 6 updates today. I've tried restarting my computer, but the problem persists. Any ideas for fixing this?


Prove $\lim_{\epsilon \to 0^+}\frac{\mathbb{E}(X^\epsilon)-1}{\epsilon}=\mathbb{E}(\log X)$

Let $X$ be a non-negative random variable such that $\mathbb{E}(X^a)<+\infty$ for some $a>0.$ Prove that: $$\lim_{\epsilon \to 0^+}\frac{\mathbb{E}(X^\epsilon)-1}{\epsilon}=\mathbb{E}(\log X).$$   Also, construct an example such that both members of the equality are equal to $-\infty.$   Attempt. Since X is non-negative, sequence $(X_n),$ where $X_n:= n(\sqrt[n]{X}-1)$, converges pointwise to $\log X$ as $n\to +\infty.$ Then eventually:  $$X_n<\log X+1=\frac{1}{a}\,\log X^a+1<\frac{1}{a}\,X^a+1$$ where:  $$\mathbb{E}\left(\frac{1}{a}\,X^a+1\right) =\frac{1}{a}\,\mathbb{E}(X^a)+1<+\infty.$$ By dominating convergence theorem we get:  $$\lim_{n \to +\infty}\mathbb{E}\big(n(\sqrt[n]{X}-1)\big)=\mathbb{E}(\log X).$$ Since $$\epsilon \mapsto \frac{\mathbb{E}(X^\epsilon)-1}{\epsilon}= \mathbb{E}\left(\frac{X^\epsilon-1}{\epsilon}\right)$$ is increasing in terms of $\epsilon$, we get that: $$\lim_{\epsilon \to 0^+}\frac{\mathbb{E}(X^\epsilon)-1}{\epsilon}= \lim_{n \to +\infty}\mathbb{E}\big(n(\sqrt[n]{X}-1)\big)=\mathbb{E}(\log X).$$  1) Is the above procedure correct?  2)  "Since X is non-negative $\ldots$ converges pointwise to $\log X$" holds for $X>0$ (at least, almost surely).  How do we treat the case where $\mathbb{P}(X=0)>0$? In that case $\log X=-\infty?$  3) My  example cannot be a random variable uniformely distributed on $(0,1]$ (since in that case $\mathbb{E}(\log X)=\int_0^1\log x\mathrm{d}x=-1\neq -\infty.$   Thanks for the help.


Can/could vs. may/might (expressing typical occurrences)

The following parts are taken from PEU:1     122.2  common or typical      We often use can to say what is common or typical.            Scotland can be very warm in September.           Ann can really get on your nerves sometimes.          345.2 'general' possibility: can/could,  not may/might      We normally use can/could to say that things are possible in general:    people are able to do them, the situation makes them possible, or there is    nothing to stop them. May/might are not used in this way.            These roses can grow anywhere.  (NOT  ••• These roses may grow anywhere.)           Can gases freeze?  (NOT  ••• May gases freeze?)           In those days, everybody could find a job.  (NOT  ••• In those days, everybody might find a job.)          339.10  another use of may/might: typical occurrences      In scientific and academic language, may is  often used to talk about typical    occurrences - things that can happen in certain situations.            A female crocodile may lay 30-40 eggs.           The flowers may have five or six petals, pink or red in colour.           Children of divorced parents may have difficulty with relationships.          With this meaning, might can be used to talk about the past.            In those days, a man might be hanged for stealing a sheep.       These explanations made me puzzled. Since they can both relate to typical occurrences, is it possible to substitute can/could for may/might in PEU 339.10 if the context is not written in scientific and academic language?  1. PEU = Michael Swan's, Practical English Usage.


I really like how, in the winter bash, there are hats. They are pretty cool and actually encourage me to get badges, something I didn't care about before. I think there should be something like this, but all year round, to encourage people to get badges. Badges, to me, seem currently pretty useless and I never want to get any because...there is no good reason to. Hats: well, hats are just awesome


Why is the $Z$ resonance cross section so much larger for hadrons?

The image shows experimental data for the ratio of cross sections $$R=\frac{\sigma(e^+e^-\rightarrow\text{hadrons})}{\sigma(e^+e^-\rightarrow\mu^+\mu^-)}.$$ I am wondering why $R$ is so large for the $Z$ resonance. I thought that it would only depend on the branching ratios of the $Z$ decay into hadrons and muons, but this gives $R\approx 20$ which is much too small.


Does every holomorphic function $f$ defined on an open set $U$ have a primitive?

I have read that a holomorphic function in an open disc has a primitive in that disc. Does this mean that for any holomorphic function $f$ in any open set $U,$ that $f$ has a primitive? I say this because I can take a large enough open disc to cover the open set $U$ and find its primitive there. Is this a correct way of thinking?


Is the mean of equal length subsets always equal to the mean of the set?

I've been fooling around with some numbers while learning R and would like to know if the following is generalizable.  When I calculated the mean of numbers 1 through 100, I got this:  > mean(1:100) [1] 50.5   Then when I calculated the mean of equal length subsets, I got the same:  > mean25 <- mean(1:25) > mean50 <- mean(26:50) > mean75 <- mean(51:75) > mean100 <- mean(76:100) > mean(c(mean25, mean50, mean75, mean100)) [1] 50.5   As an aside, when calculating the mean of different length subsets, the mean is expectedly not the same:  > mean5 <- mean(1:5) > mean37 <- mean(6:37) > mean91 <- mean(38:91) > mean100 <- mean(92:100) > mean(c(mean5, mean37, mean91, mean100)) [1] 46.25   My question:  Would it be accurate to say the mean of equal length subsets is always equal to the mean of the set? Are there any counterexamples to this?  Thanks in advance.


I would like to simulate keyboard combinations.  I am able to do this on Windows with AutoHotKey.  Is there an equivalent app for Ubuntu?


What is the size of the set of all possible functions?

If I have a general function F(x) what is the size of the set containing all possible functions? Its obviously some infinity bigger than countable infinity but what size is it?


How can you keep the Rueful Axe and the Masque of Clavicus Vile?

I am at the end of the quest given by the Daedric Prince Clavicus Vile, and I have done this quest in another profile so I know about the option at the end where you can either keep The Rueful Axe or get the Masque of Clavicus Vile.   My question is: Can you keep both the axe and the mask somehow? I have tried to figure out how but I have had no luck - anybody got an idea how I could keep them both?


i have installed ns2 on ubuntu 12.04 and there never have been any problem. Now with 13.04, it gives this message "unable to locate the package: ns2" . Whether i try it through software centre or through terminal. same message.   Please help me in this.


Question regarding transit visa in Germany for an Indian citizen?

I am travelling from Toronto to new Delhi. I have a valid Indian passport and a valid Canada student visa. I have stops at Munich and Frankfurt for 1 hour and 1.5 hours respectively. Do I need any kind of transit or airport transit visa?


Einstein's theory proved that most properties of a body are relative to something and are not absolute. I am still wondering if physicists still think that there is a way that Newton's absolute space and time still exist? If they do, how are the ways that we prove their existence? and how do they exert their influence (effects)?


How do you apply multiple textures at a time (see inside for more details)

I have a collada (.dae) file and another folder full of textures for it.  How do I apply all of those textures to the object, or is there a way to import it with the textures on it?


Setting up environment variables with .sh file

I have created env.sh file the contents of which are below  #!/bin/sh  export M2_HOME=/vagrant/tools/maven export PATH=$PATH:$M2_HOME/bin export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_65 export ANT_HOME=/usr/local/apache-ant-1.9.7 export MAVEN_HOME=$M2_HOME   but executing this sh file does not result in env variables being exported. Have to manually execute each line to get them exported. Please help


Why there are two lists stacked onto each other when I'm using ALT + TAB?  This problem was on Ubuntu 16.04 and still persists after upgrade to 18.04?   Sorry for poor quality, had to take the photo with phone as you can't make a screenshot while ALT key is pressed.


Removing digits from beginning of filename

I was hoping this would work:  $ find . -type f -exec basename {} \; | while EFS= read -r f; do echo "${f##[0-9]}"; done    But, for example, for files named as:     1foo   11bar   it returns:     foo   1bar   when      foo   bar   is expected.  PS: ultimately, I want to mv "$f" to the modified name (and also do other modifications)  EDIT:  PS2: it's not a duplicate if you consider PS. Anyways, the answer marked check satisfies me.


Bash command to open a system's terminal

I'm making a Linux installer for Zero-K, an open source RTS game (zero-k.info). It will use zenity for dialogs but for that zenity must be installed. As plenty of people will not already have zenity it must be installed by the script.   I would not like to install something on a user's system without a terminal opening and giving some feedback. If there was no feedback it may look like nothing was happening when it is actually busy installing things. The problem is that the script would have to open xfce4-terminal or gnome-terminal or another DE specific terminal, meaning that there will have to be a different script per DE.   Is there a command to open whatever terminal is used by the OS/DE that the script is used on?


Is there a shape with infinite area but finite perimeter?

Is this really possible? Is there any other example of this other than the Koch Snowflake? If so can you prove that example to be true?


Somehow these pointer arithmetics are very confusing to me. An example:  uint16_t *a = (uint16_t *)0x200; a += 4 * sizeof(uint32_t);   When calculating the new value of a, what is your thought process?  This is how I am trying to figure it out:   The pointer (a) points to an address, which has a value of 0x200 of uint16_t type. The second operation moves the pointer a to a + 4 * 8 bytes to a location 32 bytes (20 in hex) further up, which is apparently 0x220. How come this is not &a + 32?  I think this is where I confuse things... Why is the pointer pointing to 0x200 and not &a?


Group permissions allow, but still get permission denied

I have a ext4 partition and I've set the group owner for all subdirectors to mygroup:  # chgrp -R mygroup /mount/abc # chmod -R g+swrx /mount/abc   My user is part of that group. Inside that partition is a folder who is owned by user 'nobody' and now by the group 'mygroup'. My user is part of 'mygroup'. Here's an ls -l:  myuser@host:/mount/abc/folder$ ls -l drwxr-sr-x 2 nobody      mygroup      4096 Apr 25 12:08 ./ drwxrwsrwx 6 nobody      mygroup      4096 Apr 24 07:57 ../ -rw-r-xr-- 1 otheruser   mygroup    159539 Apr 23 23:44 test.png*  myuser@host:/mount/abc/folder$ groups myuser myuser : mygroup {... a list of other groups also...}   myuser@host:/mount/abc/folder$ rm test.png  rm: remove write-protected regular file ‘test.png’? y rm: cannot remove ‘test.png’: Permission denied  myuser@host:/mount/abc/folder$ touch test.txt touch: cannot touch ‘test.txt’: Permission denied   Note that I cannot delete nor create a file that is owned by a group that my user is a part of.  I guess I don't fully understand how groups work. I thought if you were part of a group then you inherit the permissions of that group. Am I doing something wrong?  Thanks


Windows cygwin equivalent of Mac OS X open command

I realize this is almost identical to  and , but I'm asking specifically about a command I can run in the Cygwin shell to use the current Windows UI application bound for the argument's extension, that as on OS X opens that application if necessary, and opens the specified file in that application.  The cmd.exe start command isn't an option in the Cygwin shell, nor are xdg-open or gnome-open available through Cygwin.  Is there an equivalent?


Proof Review: Every compact set is complete

$X$ is a compact metric space. Let $A \subseteq X$ be a compact set. Let $\{C_n\} \in A$ be a Cauchy sequence. Because it is Cauchy, $\{C_n\}$ must converge somewhere (although it doesn't need to converge in $A$). Let the limit point for $\{C_n\}$ be denoted by $C$. We also have that $A$ is compact $\implies A$ is closed and bounded $\implies$ $C \in A$ (because closed sets include the limit points for all its convergent sequences) $\implies$ A is complete.


If I roll 2d8 and 1d6 for damage, how many "damage rolls" is that? 1, 2, or 3?

I'm playing a Shadow sorcerer/ and I am rather confused about the Hexblade's Curse feature (Xanathar's Guide to Everything, p. 55). It says, on the first bullet point of the curse details:     You gain a bonus to damage rolls against the cursed target. The bonus   equals your proficiency bonus.   What exactly is a damage roll? Is it the cumulative rolling of all dice, is it a roll of one or more of the same die type, or is it a single roll of a damage die?


Is it possible and how to recover deleted/erased and overwrited data from hdd?

Windows8, 2.5" hdd, d:\ ntfs partition, file in need 9GB archive.pst    Archive was deleted by mistake. Instead of recovering/undeleting that archive, we copied one from all mighty but very old and wrong backup. That process probably overwrite original archive.    Nothing was written on d:\ partition after wrong backup.    I have tried recuva, avira recovery, Active unerase/undelete, Get data back, and some more free and commercial apps. Used both simple and raw search mode. Wasted 4 days...  I have not recovered much needed archive.pst  My two questions: 1. Is it possible to recover overwritten data? 2. How? What should I use/buy from software and or hardware?


Should I encrypt the signature along with the message?

Given that A wants to send a message M to B, I have 2 scenarios as shown:  The difference between the 2 is that for case 1, the digital signature is appended to the message before being encrypted using the symmetric key. For case 2, the digital signature is not encrypted using the symmetric key. May I know which case is better? What are the security concerns of each of the case?


A polynomial $f(x)$ with real coefficients leaves the remainder $15$ when divided by $x-3$ and the remainder $2x+1$ when divided by $(x-1)^2$. The remainder when $f(x)$ is divided by $(x-3)(x-1)^2$ is?


Is there an application that can run commands as a batch list?

is there an application that can collect commands and run them successively? This can be helpful when I have several commands to run that shouldn't run at the same time. It would be interesting too, to have a little window where I can see the running and upcoming commands.  I have searching for “linux shell batch list”, but couldn't find anything.


Getting a Conserved Quantity from a Lagrangian

So I've been messing around with the implications of Noether's theorem, and though I conceptually get what it's saying, I'm having a hard time actually using it to retrieve a conserved quantity from a given Lagrangian. Procedurally if someone could show how to go about finding energy conservation from a generalized Lagrangian, and then using that procedure explain how I might derive the conservation of parity or charge from it, it'd do me a lot of help.


Is there a possibility that ZFC is inconsistent and, if it is, do we have to throw out our old proofs?

I have learned that ZFC has not been proven consistent, and that further more if one were to start from ZFC and prove ZFC consistent, this would imply that ZFC is not consistent, due to Gödel.  A few questions about what I just said: Does this mean there is a possibility that ZFC is inconsistent? Are there some really good (mathematical) arguments for why, even though ZFC might be inconsistent, it probably is consistent? (or at least that we should still use it even if we aren't sure it's consistent?) What would happen if somebody were to prove that ZFC were inconsistent? Would we have to throw out all of our old proofs? And lastly, does Gödel's work imply that, in order to prove ZFC consistent (without automatically proving ZFC inconsistent in the same stroke) we would need to make more assumptions outside of ZFC? In other words, is there hypothetically a way of proving ZFC consistent without making more assumptions?  I would appreciate answers to even one of these questions.


According to one , "to this day" means:     up to now : continuing until today     But according to some other , "to this day" means:       even now, after a very long time   The first definition suggests a period of time, but the second suggests a point in time.  Is one of them wrong?  Example Usage:      They started appearing even before his death on 17 August 1786, and they still crop up to this day.


If I have a sentence beginning with a number, should I use a capital letter? For example:  24 Other schools  or  24 other schools


Trigonometry and Complex Numbers with Series

The number   $$\text{cis}75^\circ + \text{cis}83^\circ + \text{cis}91^\circ + \dots + \text{cis}147^\circ$$ is expressed in the form $r \, \text{cis } \theta,$ where $0 \le \theta < 360^\circ$. Find a value of $\theta$ in degrees.   I have no idea on how to deal with sequences in any way shape or form, so I am totally lost on this problem! Please help!


Find solution to matrix sandwich product

For any two $n \times n$ real symmetric and positive definite matrices $B$ and $C$, is it always possible to find a third real symmetric and positive definite matrix $A$ such that $ABA=C$? If not, give a counter example in a $2 \times 2$ case?


"Neither" and "either" usage in negative sentence

I would like to make sure I understood the usage of these:  Do you want A or B?        I do not want either. [none of them]     I want neither. [Can I say that?]


Why is the one-variable ring of polynomials with real coefficients a principal ideal domain?

I'm new to Ring Theory and I'd like to check if I'm on the correct track with this.  Wolfram defines a PID as "an integral domain in which every proper ideal can be generated by a single element".  As I understand it, an ideal is something like a normal subgroup in group theory. So, if let's say I have a ring defined by all one-variable real coefficients of polynomials denoted $k[x]$ where $k \in \mathbb R$, an ideal $I$ would be addictive subset of $k[x]$ when $k.i \in I$, where $k \in K$ and $i \in I$. How can I go about thinking of such an ideal? Just off my mind, there seems to be no suitable candidates (other than the trivial ones, $0$ and $k[x]$) that can form an ideal.   Also, is my thinking correct on this? $k[x]$ is a PID because for $x \in k[x]$, I can generate all the possible polynomials in $k[x]$ by simply multiplying $x$ by itself to reach the degree of $k[x]$. As I can add $x$ of whichever power I like together, I can get any polynomial in $k[x]$. For instance, if you gave me something like $x^3+2x$, it can be generated by the polynomial $x$ by mutiplying $x$ by itself $3$ times and adding that to $2x$. Is my intuition correct for this? Otherwise, how can you prove that $k[x]$ is a PID?  Thanks for all the help.


Write bootable partition on USB flash disk

How can I easily copy partition of my disk into the USB flash drive? (Ubuntu 14.04)


Error saying "unable to update ICE authority" while booting

I often get an error saying      unable to update ICE authority.    Is there a way out of this?


Nikon D5100 struggling to autofocus on screen, but fine through viewfinder?

hope you can help me and my frustrating issue  I have a D5100 with a Sigma 18-250mm f/3.5-6.3 dc os lens which will AF no problem at all when I'm looking through the viewfinder but when I change to live view mode on the screen the lens adjusts only a fraction at a time, and sometimes not reaching focus at all. When it does focus it can be 10-20 seconds by which time my shot is gone! It's obviously not a lighting/exposure issue as I have no problem focussing through the viewfinder.  I hope someone can shed some light on this issue for me?


Simple way to understand what derivative is

I know how to count derivatives, but I actually don't understand what are those? What do they show?   Wikipedia explanation: Loosely speaking, a derivative can be thought of as how much one quantity is changing in response to changes in some other quantity. I understand nothing what is written here?  Please, if you can, explain me as simple as you can it. Thank you very much.


What's the best lubricant to use on mechanical keyboards?

I just purchased a  mechanical keyboard. Unfortunately, while the keyboard is nice to type on in general, something seems to be wrong with the backspace key -- namely, that it's relatively difficult to press and makes a high pitched squeaking noise when it does actually press down.  I suspect this not the actual Cherry MX keyswitch at fault though, because if I press down in the exact center of the key the squeaking does not occur. This leads me to suspect the stabilizer merely needs to be lubed.  What kind of lube would I need to use though?


Mock to HTTP connection gives null pointer exception

I am trying to mock HTTP method I created. For the get method, the test fail when trying to do POST\PUT, I am getting null exception.   I will put part of my code:  public HTTPResult httpPostPutGetRequest(String url, String jsonString, String requestMethod) throws Exception {     HttpURLConnection connection = connectionFactory.createURLConnection(url);     connection.setRequestMethod(requestMethod);     String result = null;     if (requestMethod == "PUT" || requestMethod == "POST") {          connection.setDoOutput(true);         connection.setRequestProperty("Content-Type", "application/json");         connection.setRequestProperty("Accept", "application/json");          OutputStreamWriter osw = new OutputStreamWriter(connection.getOutputStream());         osw.write(String.format(jsonString));         osw.close();   Then I am trying to mock it by the following:  public class StepdefsCommonTest {      private static final int PORT = 51234;     private static final String baseUrl = "http://localhost:" + PORT;     private HTTPResult result = null;      private String responseBody = "{blbl}";     private String responseMessage = "OK";     private int responseCode = 200;      public HTTPResult mockHttpRequest(String httpMethod) throws Exception {          HttpURLConnection mockHttpURLConnection = mock(HttpURLConnection.class);         URLConnectionFactory mockURLConnectionFactory = mock(URLConnectionFactory.class);          ByteArrayInputStream responseBodyInputStream = new ByteArrayInputStream(responseBody.getBytes());         when(mockHttpURLConnection.getResponseCode()).thenReturn(responseCode);         when(mockHttpURLConnection.getResponseMessage()).thenReturn(responseMessage);         when(mockHttpURLConnection.getInputStream()).thenReturn(responseBodyInputStream);         when(mockURLConnectionFactory.createURLConnection(baseUrl)).thenReturn(mockHttpURLConnection);          StepdefsCommon common = new StepdefsCommon(mockURLConnectionFactory);          HTTPResult res = null;          switch(httpMethod){             case "POST":case "PUT":                 try {                     res = common.httpPostPutGetRequest(baseUrl,responseBody,httpMethod);                 } catch (IOException e) {                     e.printStackTrace();                 }   I am getting null pointer exception for:  OutputStreamWriter osw = new OutputStreamWriter(connection.getOutputStream()); The exception I am getting:  java.lang.NullPointerException     at java.io.Writer.<init>(Writer.java:88)     at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:109)


Assigning a new coordinate system and projection to a shapefile in R

I have a shapefile with no spatial reference nor projection, and a GEOTIFF that has the spatial reference and projection data. The shapefile was created from a segmentation analysis of the GEOTIFF, therefore the extent of the shapefile matches that of the GEOTIFF, and should be overlayed on the GEOTIFF. The two files can be found .   I have tried the raster, sp and RGDAL packages, among others, to try to project/reproject the shapefile. Due to the size of the shapefile, it takes over 2 days to rasterize from the raster package. I have tried to convert a smaller shapefile (samp.shp) to a raster, then copy the projection of the GEOTIFF (geotiff) to the new sampled raster.  samp.shp.raster<-raster(samp.shp,res=r) shp.rasPRO = projectRaster(samp.shp.raster, geotiff)   This seems to work on the sample, but I cannot get to reproduce it for my data. I think if I can convert the shapefile to a grid, then I can copy the X,Y coordinates of the geotiff to that grid, but I am not sure if this would work. I have >200 individual GEOTIFFs and corresponding shapefiles and I need to batch process. I am searching for the most efficient method of assigning the spatial reference and projection data to the shapefiles.  Any suggestions would be welcomed.


I want to know whats the significance of the ID "0DFm00000007Om6" in the following SOAP WS Stub, I see this is only added for enterprise WSDL Stub endpoints not for partner WSDL Stub endpoints, is it something to differentiate this two?  public class Soap {                  public String endpoint_x = 'https://test.salesforce.com/services/Soap/c/33.0/0DFm00000007Om6';                  public Map<String,String> inputHttpHeaders_x;                  public Map<String,String> outputHttpHeaders_x;                  public String clientCertName_x;                  public String clientCert_x;                  public String clientCertPasswd_x;                  public Integer timeout_x;                  ..............  }


What is Stack Exchange's workflow for handling bugs and feature requests?

This is something I've been curious about since starting this whole 'meta' thing a couple years back.     Let's say a user posts a feature request.   Under what circumstances is the feature-request read by staff? If staff decline to do anything (I'd guess it's some sort of triage), under what circumstances is the feature-request reevaluated by staff?     Let's say a user posts a bug.    Under what circumstances is the bug tested? What generally determines whether a verified bug is actionable? (And/or what are the criterion for deciding what to do?)     For both of the above, would it be possible to see a general-but-relatively-detailed flow for what happens to these questions?


I'm using XeLaTeX to build my homework but the commas and the parentheses are all messed up. Could someone explain this?  Source code:  4). $(1,5,6,2,3,10,4,7,1)$ is a cycle of length 8.  5). Since $\{3,4\}$ is not an edge and $(3,10,4)$ is a path, the length of a shortest path from 3 to 4 is 2.  6). The vertices you can travel to from 8 within 2 edges are 2, 3, 9, 10. Since $(8,3,2,7)$ is a path, the length of a shortest path from 8 to 7 is 3.  7). $(4,7,1,5,2,6)$ is such a path.


Can't install wifi driver on Acer Nitro 5

I have an Acer Nitro 5. I tried installing Ubuntu 18.04, but when I installed it the wifi option was not there. I tried, but I couldn't install the wifi driver.  $ lspci -nnk | grep 0280 07:00.0 Network controller [0280]: Intel Corporation Device [8086:2723] (rev 1a)


Is there a way to get the administrator lock opened?

I know that when a package is being installed, the root directory [I think?] gets an administrator lock and can't make an other installation at the same time.   Is there a way to stop that installation? If it is so, is it good to do?  I heard that it is better to leave the package to get installed and then try removing it. Is that true?


What can be done about ambiguous tagging?

I propose that something be done on SO to prevent ambiguous tagging. (and maybe this is happening and I don't know it, if so, disregard.)  For instance, in my spare time I'm looking at posts tagged Unity.  Unity is the example I'm looking at because it covers Unity as a Library for IoC (among other things) and Unity (or Unity3d) which isn't always tagged properly.    As someone struggling to get reputation (It takes me longer to get a solution than the people who are just quicker on the draw than I am... but I digress.) I don't know if this is covered higher up in the hierarchy of ranking, or if there might be a way to address this at the user level (e.g. a metatagging system whereby users get interesting posts based on tag+search result score...)  Well, happy discussion, and I hope this leads to something.


how to copy url from address bar to clipboard using jquery

I have a requirement  to  copy url from address bar to clipboard using jquery when clciked on a link , but that should also work if opened in mobile iphone or android , as its a mobile site and developed using php . I really need help , please help me. I have tried zclip plugin but it is working only when its opened in desktop but not working in mobile. So I really need help to copy content to clipboard and use that data later on to paste on something else.


Add "Your Question has been posted" notification

Problem  In , the question asker brought up a good point:     There's no external notification that your question was successfully posted.   Feature Request: Add an orange bar to the top of the screen that 'pops up' when your question has been successfully posted.


Null Pointer Exception adding null check

Simple and best way to solve Null pointer exception at this line:  oS = ((SyIntBVO)syIntBVOList.get(0)).getSource().trim();     Exception on getSource variable. how to add null check?


I’m trying to create a material for a button on a music control panel. It looks like a plastic glossy button with some colourful light coming from behind.   I’m using EEVEE engine, so I tried bumping the transmission to 100% and also checking the refraction in the render settings, but it’s not the best looking button, it seems not transparent.    Q: How to create a realistic looking shader for that plastic knob using eevee?


What has more impact on performance: Readyboost or paging file on a system with 2GB RAM?

I have my paging file turned off in Vista as i have heard that it is not needed and in some cases may slow down a system that has >=2GB RAM. (no sure how true this is, but i notice that having it switched off doesn't really impact performance noticeably.  I have been reading about Readyboost and it sounds like caching with the benefits of flash memory (low latency etc.)  Which of these would i be better off using?  edit: i have 2gb, and have been using the machine without a pagefile today, and haven't noticed much obvious performance degradation, but will take your suggestions on board. would be good if any claims can be backed up please.


Are infinite reflections between two mirrors really infinite?

As written in the title it's a somewhat rhetoric question, so let me be more clear.  Let's say I have two mirrors facing each other. They are perfectly aligned and perfectly reflective. I'm looking through one of them (using the one-sided mirror effect) and see what seems to be infinite reflections.  If I look closely at the vanishing point, I obviously can't see very well what goes on there, because the reflections are too small. My question is, are there other limitations?  a) If I look close enough to the vanishing point, is there a point at which the light would have to travel too much distance to reach me that no photon would actually make it?  b) If I start looking immediately after turning on the light, it should take a tiny amount of time until all the reflections are created, i.e., it takes time for light to do all the back and forth trips it takes to create the very small images. How good a microscope (telescope?) would I need to be able to see the image being created? That is, to look at a spot and see nothing, and then some epsilon of time later see an image appear.


In my wpf application, I have a requirement to format the textblock to show code snippet. Is there anything out there that already does this?   So return VSConstants.S_OK; should in the textblock show up as,


How do I install a driver for an Atheros AR9285?

How to install the driver for Atheros AR9285 in Ubuntu 11.10.  Still no package for 11.10 according to this      Here is the output of the commands  marc@fer-VPCYA1V9E:~$ sudo lshw -class network   *-network DISABLED              description: Wireless interface        product: AR9285 Wireless Network Adapter (PCI-Express)        vendor: Atheros Communications Inc.        physical id: 0        bus info: pci@0000:02:00.0        logical name: wlan0        version: 01        serial: 4c:0f:6e:d6:65:cc        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=ath9k driverversion=3.0.0-12-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn        resources: irq:16 memory:d3400000-d340ffff   *-network        description: Ethernet interface        product: AR8131 Gigabit Ethernet        vendor: Atheros Communications        physical id: 0        bus info: pci@0000:03:00.0        logical name: eth0        version: c0        serial: 54:42:49:a2:1f:bc        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.0-NAPI firmware=N/A latency=0 link=no multicast=yes port=twisted pair        resources: irq:43 memory:d2400000-d243ffff ioport:1000(size=128)   And the second command  marc@fer-VPCYA1V9E:~$ rfkill list 0: sony-wifi: Wireless LAN     Soft blocked: no     Hard blocked: no 1: sony-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 2: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 3: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 4: acer-wireless: Wireless LAN     Soft blocked: yes     Hard blocked: no   Is there a way to make it work?


Is it correct to edit a question to remove a verbose introduction?

starts with      I know that this isn't the first post with this problem, but I am   stuck with this for a day (total, not 1 day in a row). Somehow I can't   get this to work, maybe it is just 1 little adjustment that I need to   make, but I can't seem to find it :(   I'm sure the question , both for immediate answering and for people later having the same kind of problem.  But I'm afraid removing it might be considered rude by the asker as he might see the question with the introduction both more humble and more accorded to his personal writing style (especially in a case where the code follows immediately after this introduction).  Should I proceed and remove this lengthy useless introduction or just not bother ?


Illustrator CS6: How to cut an area (shape without fill) out of another?

Here's example picture below. How to make all the white areas transparent? Triangles, line and text. I have tried Pathfinder but I can't get it work correctly. Thanks in advance :)


How to convert floats to human-readable fractions?

Let's say we have 0.33, we need to output 1/3.  If we have 0.4, we need to output 2/5.  The idea is to make it human-readable to make the user understand "x parts out of y" as a better way of understanding data.  I know that percentages is a good substitute but I was wondering if there was a simple way to do this?


What was JRR Tolkien's inspiration for the One Ring?

I was recently reading The Republic, by Plato, and when we came to the section about the ring of Gyges, my teacher claimed that this was the inspirition for the One Ring. I doubt he had any real evidence for this, but the story, or at least some aspects of it, are remarkably similar, so I get where he got the idea. Here's Plato's story:     According to the tradition, Gyges was a shepherd in the service of the king of Lydia; there was a great storm, and an earthquake made an opening in the earth at the place where he was feeding his flock. Amazed at the sight, he descended into the opening, where, among other marvels, he beheld a hollow brazen horse, having doors, at which he stooping and looking in saw a dead body of stature, as appeared to him, more than human, and having nothing on but a gold ring; this he took from the finger of the dead and reascended. Now the shepherds met together, according to custom, that they might send their monthly report about the flocks to the king; into their assembly he came having the ring on his finger, and as he was sitting among them he chanced to turn the collet of the ring inside his hand, when instantly he became invisible to the rest of the company and they began to speak of him as if he were no longer present. He was astonished at this, and again touching the ring he turned the collet outwards and reappeared; he made several trials of the ring, and always with the same result-when he turned the collet inwards he became invisible, when outwards he reappeared. Whereupon he contrived to be chosen one of the messengers who were sent to the court; where as soon as he arrived he seduced the queen, and with her help conspired against the king and slew him, and took the kingdom.   The story is being told by a character who is trying to prove that people are naturally evil, and given the opportunity (a magic ring that allows one to do whatever they like without being caught) people will act evil. To put that another way: power makes people evil.  We see that both rings are invisibility rings, seem to have evil origins, and both cause evil.  I wouldn't be the least bit surprised if Tolkien had read The Republic, probably in the original Greek, knowing him.  However, I also know that, at least, this wasn't Tolkien's origional inspiration. The ring wasn't even faintly evil in the first version of the Hobbit, published in 1937. In 1951 he changed it so that it worked better with The Lord of the Rings, which he was working on at the time.   So the question is: Was Tolkien inspired by the Ring of Gyges, or did he come up with a similar artifact on his own?  Disclaimer: I know that I'm generalizing a bit about the nature of the One Ring, and this is a loose analysis, so don't cite me as some sort of Plato expert. Also, please do not insult my teacher.


Is there a a word for "revealing himself to be foolish by attempting to appear intelligent"?

Is there a word for "when one reveals himself to be stupid, ignorant, foolish by attempting to appear intelligent, smart, witty"?


Unable to truly polygonize raster in QGIS

I've used QGIS's Polygonize to convert the following raster into outlines. The polygonize tool does produce a vector output, but it isn't in plain polygon form but some thousands of single pixel polygons.     I understand that this is the expected behavior of the Polygonize tool and one can now simplify these weird squares for it to just be two polygons - one for brown and one for purple. I tried setting a really low threshold of 0.000001 for v.generalize (in the Processing toolbox) for these shapes to be converted into a line and yet there seems to be no improvement. The documentation of v.generalize did not seem too useful.   How does one go about making this into two plain polygons?


How does Zemo know something happened in 1991?

Col Zemo is after Bucky's mission report from 1991, but how does he even know it exists?   After all,  it's Captain America he's been studying.


All the positive numbers can be expressed as a sum of one, two or more consecutive positive integers. For example $9$ can be expressed in three such ways, $2+3+4$, $4+5$ or simply  $9$. In how many ways can a number be expressed as a sum of consecutive numbers?  In how many ways can this work for $65$?  Here, for $9$ answer is $3$, for $10$ answer is $3$, for $11$ answer is $2$.


Complex Analysis : Prove f is constant if f is entire and $f(z)\notin \left[0,1 \right]$

We are currently studying Liouville's Theorem and had a few questions which weren't too hard, but I'm kinda struggling with this one. $f$ is entire but $f(z)\notin \left[0,1 \right]$. I tried to play around and prove f is bounded, but nothing seems to work. Would love even a hint :)


Show that if $p$ and $q$ are primes $\equiv 3$(mod $4$) then at least one of the equations $px^{2}-qy^{2} = \pm 1$ is soluble in integers $x, y$.

So far we have only talked about equations in the form $x^{2} - dy^{2} = \pm 1$ and I'm unsure how to handle the specific coefficients. We have normally found $\sqrt{d}$ and looked at the convergents of the continued fraction to find solutions. I was just wondering how to get started on this type of problem.


Why does the Euclidean algorithm work for polynomials? What is the proof?

Suppose I know that I can find the $\gcd$ of two integers with the Euclidean algorithm. What is the 'extension' so I can use this method also for polynomials?  Edit: I found an easy answer with less rigor which is approachable without knowledge of matrices:    also the first 3 subchapters of


Multiple references to the same footnote inside a table environment

I followed the steps in this  to get multiple references to the same footnotes working. As shown in this minimal example, the solution is working great for footnotes in the text, also getting the correct hyper references in the compiled pdf.  But when using multiple footnotes in a table environment the solution doesn't work, for the second reference in the table environment I get "a^0" instead of another "^a". I guess the problem is that numbering consist of (a,b,...) instead of numbers but I'd like to keep that behavior.   How should I adapt the solution to work inside the table environment ??  \documentclass{article} \usepackage{hyperref} \usepackage{cleveref} \crefformat{footnote}{#2\footnotemark[#1]#3}  \begin{document}  This is a paragraph\footnote{\label{first}some footnote}.  This is another paragraph\footnote{\label{second}another footnote}.  This is another paragraph using the first footnote\cref{first}.   \begin{table} \caption{A table} \begin{minipage}{\textwidth} \begin{tabular}{r r r} \hline   E\footnote{\label{1sttablefoot}Some table footnote} & F\cref{1sttablefoot} & G \footnote{Another table footnote}  \\  \hline     1 & 2 & 3  \\ \hline  \end{tabular} \end{minipage} \end{table}  \end{document}   Can't attach the image result because of being new user :S


How to style a vector layer in QGIS using hexadecimal color code stored in attribute?

I have a polygon shapefile storing hexadecimal color codes in a specific attribute.    gid    |   label   |   color ---------+-----------+------------ 1        | Crops     | #FF5F2C 2        | Forest    | #00FF00 3        | Pond      | #0000FF 4        | Forest    | #00FF00   I was looking for a way to say QGIS to read these values in order to style the polygons with them. I can't find anything about this.   I hoped it would be possible without deeping into the Python Console (which still frightens me...).


what are the advantages and disadvantages of embedding a script in the HTML of webpages?

I am trying to find out why people embed a script into the HTML of a webpage by using the advantages and disadvantages of doing so.


How to run executables directly from nautilus?

When I write C codes in geany and the build and then run the program from there using the buttons there, it works fine. Again I can run the compiled executables using ./file_name command from terminal emulator. But when I double click on the executable from nautilus, nothing happens. I have also checked "Allow executing the file as a program" from the properties menu. But the problem still exists.


I want to create some control groups using cgroup.  So far I have done the following:   I installed some packages:  sudo apt-get install cgroup-bin cgroup-lite cgroup-tools cgroupfs-mount libcgroup1  Then I created the /etc/cgconfig.conf file with the following content:  mount {   cpuset  = /cgroup/cpuset;   cpu     = /cgroup/cpu;   cpuacct = /cgroup/cpuacct;   memory  = /cgroup/memory;   devices = /cgroup/devices;   freezer = /cgroup/freezer;   net_cls = /cgroup/net_cls;   ns      = /cgroup/ns;   blkio   = /cgroup/blkio; }  group limitcpu{   cpu {     cpu.shares = 400;   } }  group limitmem{   memory {     memory.limit_in_bytes = 512m;   } }  group limitio{   blkio {     blkio.throttle.read_bps_device = "252:0         2097152";   } }  group browsers{   cpu {     cpu.shares = 200;   }   memory {     memory.limit_in_bytes = 128m;   } }   according to the guide , assuming, that the config file resides at the same location and uses the same syntax on Ubuntu, as it uses on CentOS. Then according to that guide I need to start the cgconfig service. I tried with:  sudo service cgconfig restart   But, oh no! A file is missing!:  Failed to restart cgconfig.service: Unit cgconfig.service not found.  After some wondering and searching around, I tried:  ● cgconfig.service    Loaded: not-found (Reason: No such file or directory)    Active: inactive (dead)    So it seems I am simply not having any cgconfig service on my system!  I searched for it using:  sudo aptitude search cgconfig   However, no cgconfig is to be found.  How can I install cgconfig on my Ubuntu 16.04?


I don't understand the error of Generic Array Creation. First I tried the following:    public PCB[] getAll() {        PCB[] res = new PCB[list.size()];            for (int i = 0; i < res.length; i++) {                res[i] = list.get(i);             }        list.clear();        return res; }    Then I tried doing this:  PCB[] res = new PCB[100];    I must be missing something cause that seems right. I tried looking it up I really did. And nothing is clicking.    My question is: What can I do to fix this?   the error is :   .\Queue.java:26: generic array creation PCB[] res = new PCB[200];             ^ Note: U:\Senior Year\CS451- file       uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error   Tool completed with exit code 1


I just got this PC fan and it has a 3 pin connector, I know the wire with the white stripe is positive but how can I find out which of the other two wires are negative?  If you can't see the photo, here is a link to it:


Getting null pointer exception in Singly linked list implemented class

I am trying to search for a customer by using these two methods below but i am getting this error while doing so The customer with id 20131111 is not in the list and I just want it to return null to the console public  Customer search(int id){         int year = idToYear(id);         SLLC listOfCustomers = (SLLC) tree.search(year);          Customer x = listOfCustomers.getCust(id);         //if (listOfCustomers == null) return null;          //for (int i=1; i<listOfCustomers.size()+1; i++){         //  Customer searchedCustomer = listOfCustomers.get(i);             //if (searchedCustomer.getId() == id){                 //return searchedCustomer;             //}         //}                   return x;     }  public Customer getCust(int id) {                  Node temp = head;          if(temp.equals(null) ) {             return null;          }         else         {             while(temp != null) {                 if(temp.data.getId() == id) {                      break;                  }                 else                  {                     temp = temp.next;                 }              }              return temp.data;          }     }  This is in the test class at line 71 I know error occurrig because the cutomer with this ID is not in the list but how to I make this just return null  System.out.println(gym.search(20131111));  the error Exception in thread "main" java.lang.NullPointerException     at GYM.search(GYM.java:30)     at TestClass.main(TestClass.java:71)


Is code posted on stack overflow open source?

I am an iOS Developer and I would like to know if I could use the code found here or the solutions to the problems that users had had in my COMMERCIAL applications freely. Could I do that?


Under current particle theory, the four fundamental forces use a force-carrying particle. The particle for electromagnetism is the photon.  By definition a black hole is a mass from which light can not escape, so how does the photon get out of the black hole to carry the charge force?


Example of a recursive set $S$ and a total recursive function $f$ such that $f(S)$ is not recursive?

Browsing wikipedia, I stumbled on the following: "The image of a computable set under a total computable bijection is computable." Given the form of the theorem, there must be some example of a example of a recursive set $S$ and a total recursive function $f$ such that $f(S)$ is not recursive (otherwise the statement would have presumably been stronger). But I'm having difficulty dreaming up a case where this happens.


Prove that $\alpha^n+\beta^n+\gamma^n \equiv 4^n+5^n+(-6)^n \pmod{17}$

Let $\alpha,\beta,\gamma$ be the roots of $x^3-3x^2+1 = 0$. Prove that $$\alpha^n+\beta^n+\gamma^n \equiv 4^n+5^n+(-6)^n \pmod{17}$$ where $n$ is an integer.   It sort of makes sense why they are congruent since we can say $x^3-3x^2+1 \equiv (x-4)(x-5)(x+6) \pmod{17}$, but since $\alpha,\beta,\gamma$ aren't integers, how do we prove this?


In Excel, what formula to use to group numbers and color code them by consecutive numbers?

I have a large list of numbers. I want to group them so that the cell color is the same if the number is a sequential number. If two groups of sequential numbers are beside each other in the list then the color would need to be different.  The list is very large and to color it in manually is taking a very very long time.  If anyone can help me out it would be very appreciated.    Below is an example of a section of Excel that has been manually completed.


Is it allowed to have an NS record be a CNAME? E.g.:  subdomain.example.com.       IN NS  ns1.example.com. ns1.example.com.             CNAME  foo.example.com. foo.example.com.             IN A   10.1.1.1   This doesn't seem to work in bind though this (of course) does:  subdomain.example.com.       IN NS  foo.example.com. foo.example.com.             IN A   10.1.1.1   Any pointers to RFCs prohibiting this setup would be appreciated.


Is the law of conservation of energy still valid?

Is the law of conservation of energy still valid or have there been experiments showing that energy could be created or lost?


I was on  and even though it showed some questions, the counter was in 0:


How to change background color of gedit embedded terminal

How can I change the background color of gedit embedded terminal?  I have tried changing my normal terminal (ctrl+alt+t) background and restarting gedit - but no luck.  Thanks


This morning I ran across the following 'question' on SO, where the user is asking for his VB.NET code to be converted to C# --    I don't feel like this is a real question, but what does everyone else think


Is there a simple way to monitor how many megabytes are written on my SSD per day?

Since I got a new ssd and the limit of TBW is 100, I just want to predict how long it will last considering my day by day usage. Each day I do the same staff with my pc, so I just need to monitor for let's assume one week how many gigabytes I write on my ssd. Is there a simple software that release kind of benchmark for each day or session? Thanks.


Accepted answers don't float "on top" when self-answered?

On , the accepted answer doesn't float on top. Apart from that, the display is correct (i.e. the V mark and the green border)  If I sort by "vote", I've got the following answer order:   Jezell Marc Gravell chilltemp (Accepted) Shaun Bowe   By "oldest":   Marc Gravell Jezell chilltemp (Accepted) Shaun Bowe   and by "newest":   Shaun Bowe chilltemp (Accepted) Jezell Marc Gravell     I'm using Firefox V.3.5 : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)  Feel free to ask for more debug information if needed.


detecting specific input from user using BufferedReader

i'm taking user input from  String riddle=b.readLine(); riddle1=Integer.parseInt(riddle);   and obviously, i'm trying to get the user to answer a riddle. I tried using the following  if(riddle1=="answer")   but that doesn't work


If I visit Iran, is there a risk of not being allowed to enter the USA anymore?

I would like to visit Iran as a tourist but I'd also like to visit the USA some time after. I know the relations between the two countries are bad.   Is it likely that I'm not allowed to enter the USA after having been to Iran?   If it matters, I've never been to either of those countries. I'm a Swiss citizen, an atheist from a Christian background.


I apologize in advance for asking such elementary question but I would like to show that  $$(i+k)! > i!k!$$ I believe induction can prove it but is there an algebraic proof on proving about it?


Probability of highest common factor in Williams

In , $\exists$ this exercise.  Let $s > 1$ and let $\zeta(s) = \sum_{n=1}^\infty n^{-s}$.  Let $X$ and $Y$ be independent $\mathbb{N}$-valued random variables with $P(X=n)=P(Y=n)=\dfrac{n^{-s}}{\zeta(s)}$.  Facts:  1 The events ($E_p$: $p$ prime) where $E_p =$ ($X$ is divisible by $p$) (This time $p$ may not be prime) are independent.  2 The events ($F_p$: $p$ prime) where $F_p =$ ($Y$ is divisible by $p$) (This time $p$ may not be prime) are independent.  3 $P(E_p) = p^{-s}$  4 This is Euler's formula $1/\zeta(s) = \prod_p (1-1/p^s)$ where $p$ is prime.  5 $P(X=1) = 1/\zeta(s) = \prod_p (1-1/p^s)$  6 $P(\text{no square other than 1 divides }X)= \dfrac{1}{\zeta(2s)}$  Here is the exercise:  Let $H$ be the highest common factor of $X$ and $Y$. Prove that $P(H=n) = \dfrac{n^{-2s}}{\zeta(2s)}$.  How do I go about doing this? I know $H$ divides both $X$ and $Y$ but that's just making use of the fact that $H$ is a common factor. Since it is the highest, all the natural numbers greater than $H$ do not divide $X$ and $Y$ or something like that?


After using other 3D Apps I have become used to Y being up, and Z being depth (Depth pass, Z pass etc).  Is there a way to make Blender a Y-up world, and if not, does anyone know why they chose to be different ?


How can I list only available security updates?

I am aware of the command   /usr/lib/update-notifier/apt-check --human-readable   which gives output like  7 packages can be updated. 0 updates are security updates.   but how can I list only the security patches I need to install on my current Ubuntu?  On CentOS we can use  yum check-update --security   Is there an equivalent command in APT?


If $y$ is continuously differentiable and $y' \leq 1-y^2$ then $|y| \leq 1$

If $y(t)$ is continuously differentiable for all $t\in\mathbb{R}$ and $y' \leq 1-y^2$ then $|y| \leq 1$.  I'm trying to prove this, and it feels like a question that can be proven with the comparison theorem for differential equations.  So taking $x' = 1-x^2$ we immediately get that the functions $x(t)=1$ and $x(t)=-1$ solve this equation, which seems indeed strongly related to what we need to prove.  Now, from Ricatti, we can take a general solution $x=1+u$, and solve it. I derived $$x=\frac{2ce^{2t}+1}{2ce^{2t}-1}$$ Not sure how to continue from here. Even if I get a solution this only compares one side of $y$, and I want to compare both of them. Also, there isn't any initial conditions which I understand is necessary for the comparison theorem.  I also believe that the solution uniqueness theorem can be applied here in some way but I'm not sure about it.  Thanks!


After import to Unity, all my normals are flipped

I found someone with , but their answer doesn't work for me. Other than that, the net is full of advice how to flip normals programmatically to create interiors on the fly, but other than "Your normals are wrong", no help.  All my normals point outwards. I exported the object to .obj, imported it into Unity, and got:  Did I apply the texture to the reverse side of the faces, or something like that? How do I fix it?


How do journal/conference reviewers make sure of the results' integrity for submitted research papers?

How do reviewers/referees make sure that the author has done the work as he described in his paper and the written results are achieved?  Do they ask for the code or the tools that you have used? Will they test the output to make sure that the results are not faked?   I know that reviewers with 20+ years experience in the specific field can figure out if the results are real or fake or if they are even accomplishable, but it is still easy for the writer to fake results without any monitors..   For example in CS machine learning, you can extract an extra feature from the texts and claim that you got better results in classification than others have done before, when in reality you did not. So how do reviewers make sure that your work is sincere?


Error encounterd while running Firefox in Xvfb: "Xlib: extension "RANDR" missing on display ":99"."

I'm trying to run Firefox in Headless mode in a CentOS Linux release 7.0.1406 (Core)  I have already have firefox-45.3.0-1.el7.centos.x86_64 installed.  I have run the following commands for the configurations:  // install Xvfb package yum install xorg-x11-server-Xvfb // add screen resolution Xvfb :99 -screen 0 1024x768x24 & // add Display export DISPLAY=:99 // run firefox firefox   After running the firefox,  have encountered this error: "Xlib: extension "RANDR" missing on display ":99"."  I have tried to add this extension using:  Xvfb :99 -screen 0 1024x768x24 +extension RANDR &    But stil, the same error persist when I attempt to run the firefox again.  How can I add RANDR in Xvfb when running in firefox?  Thanks for the response in advance.


How to recover files I deleted now by running rm *?

By mistake I ran rm * on the current directory where I created many c program files. I had been working on these since morning. Now I can't take out again the time that I spent since morning on creating the files. Please say how to recover. They aren't in recycle bin also!


Do Flask forms really better than HTML forms?

I am new to Flask and I found this Flask_WTF or Flask Forms. I just dont see the need for it. We can do similar things with HTML. I understand that Flask forms have internal validations but we can provide better javascript client side validations which can validate data without server trip. What is the real need of using Flask Forms? Would not HTML forms will be better so we can provide inline styling if required and will be easy to use with bootstrap.   Please suggest.


Can K-S goodness-of-fit be used on estimated models?

For example, for a dataset generated from lognormal distribution, I estimate a normal distribution from that data (using maximaum-likelyhood or whatever methods).   Then, can I perform K-S test to check the goodness-of-fit of data fit into  the estimated normal distribution?   I'm asking this, because from , it says:     Perhaps the most serious limitation is that the distribution must be   fully specified. That is, if location, scale, and shape parameters are   estimated from the data, the critical region of the K-S test is no   longer valid. It typically must be determined by simulation.   If this is true, then how can I test the goodness-of-fit with estimated model?


These are some weird graphics glitches I have on Chrome. I have Intel integrated graphics and my processor is Intel i5 8400.         Notice that the second "o" in the word "Google" has two weird green circles. And the Stack Overflow logo also looks green where it should normally be orange.


What is the remainder when $4^{96}$ is divided by 6 My approach : When 4 is divided by 6 gives 4 remainder, when $4^2$ is divided by 6 gives remainder 4 ,... is it for the complete series.. that means when $4^{96}$ is divided by 6 gives 4 as remainder or is there any short cut or other answer of this question. Please suggest if there is any sort of short cut to such problems. Thanks.


Find all $c \in \Bbb Z_5$ such that $\Bbb Z_5[X]/ \langle x^2+cx+1 \rangle$ be a field. Attempts: $\Bbb Z_5[X]/ \langle x^2+cx+1 \rangle$ be a field iff $p(x) = x^2 + cx +1$ is irreducible in $\Bbb Z_5$ iff $p(x)$ has no roots in $\Bbb Z_5$. I found that $2 \ne c \in \Bbb Z_5$ are the answer. Am I true?


Python 3 error when running the print command

All I wrote in the interpreter was as follows:  >>> print "Hello, World!"   File "<stdin>", line 1     print "Hello, World!"                         ^ SyntaxError: invalid syntax   How did I even get an error? All I tried to do was run a print command.


Should "Roosevelt was re-elected the President" have "the" and "as"?

"Roosevelt was re-elected the President of the United States for the fourth time."   I wonder why "the United States" should get rid of "the?"  And is it necessary to add "as" behind "re-elected"？


Prove that the set of palindromes are not regular languages

Let L = {w| w ∈ {a,b,c} * is palindrome} Could someone explain me how to prove that L is not regular, because all answers I've found are done with 2 symbols(a,b), and I'd need to prove it with 3.


Use sql-maven-plugin inside my own plugin implementation

I'm developing in Java a maven plugin which needs to run different SQL scripts, among other things. I don't know how to run existing SQL Scripts from Java so I started to wonder if I can use the sql-maven-plugin inside my own plugin implementation for executing SQL scripts. I found nothing close to this while googling so I guess it's not realistic, but want to be sure.  EDIT: I tried to use the mojo-executor, however I don't know how to add my executions to the structure proposed by the mojo executor.


How to make disappear some weird numbers in a pie chart with pgf-pie

I am trying to make a simple pie chart with pgf-pie, but for a reason unknown to me the labels I use don't display correctly.   Here is the chunk of code I've copied from the manual into my .tex file :  \begin{tikzpicture}     \pie[color ={ cyan!10 , cyan!40, cyan!70,  cyan!100}, explode=0.1] {10/A, 20/B, 30/C, 40/D} \end{tikzpicture}   Here is a screenshot of what I get :    And here is a picture of what I'd like to obtain :   Does anybody knows why I get these numbers and how to get rid of them ?  edit : Here is a minimal working example   \documentclass{article} \usepackage[frenchb]{babel} \usepackage{pgf-pie}  \begin{document} \begin{tikzpicture}     \pie[color ={ cyan!10 , cyan!40, cyan!70,  cyan!100}, explode=0.1]{10/A, 20/B, 30/C, 40/D} \end{tikzpicture} \end{document}


Help on Invokable Apex Test class and @Future callout Apex test Class

I am pretty new to Apex and trying to learn as much as possible. Any help would be really appreciated. I have two classes.    Invokeable Apex Class: This class is just getting called by a Process (Builder)      if lead object meets certain criteria and sending the lead record values like , ID, email, First Name, Last name to another class which is Future Callout class.  @future Apex class is calling a POST rest API (sending the lead data) to an external system and receiving an ID which updates the lead record.    Both the classes are working as expected. I am trying to create Apex Test Class for Both of them but facing issues as i never wrote apex Test class earlier.   Here are the classes   1- Invokable class  public class MakeCallout {      @InvocableMethod     public static void invokeleadcallout(list<Lead> Leads) {          //below is the Futurecallout Method         WS_Lead.Notification(Leads[0].id, Leads[0].Email, Leads[0].Firstname);     } }     2- WS callout class  global class WS_Lead {   @future (callout=true)    // Receiving the Lead details from Invokable class ApexCallout.   WebService static void Notification(id lid, String name)         {          HttpRequest req = new HttpRequest();         HttpResponse res = new HttpResponse();         Http http = new Http();          req.setEndpoint('https://google.com');          //Setting Method Content and Body         req.setMethod('POST');         req.setHeader('Content-Type','application/x-www-form-urlencoded');         req.setBody(         'name='+EncodingUtil.urlEncode(name, 'UTF-8')        );         req.setTimeout(120000);         try {          res = http.send(req);          System.debug(res.getbody());           Dom.Document docx = new Dom.Document();          docx.load(res.getbody());          dom.XmlNode xroot = docx.getrootelement();          String U_Id = xroot.getAttributeValue('U_Id', null);          system.debug(U_Id );          Lead le = new Lead(id=lid);          le.ID__c = U_Id;          update le;         }          catch(System.CalloutException e) {             System.debug('Callout error: '+ e);             System.debug(res.toString());             res.getbody();                }             }        }


Select max(date) does not work if the rows have different values, I only want to fetch the row with the highest date

This is the code: select security,max(dte),close,ask,bid,mid from k$prices where to_char(dte,'MON-YYYY') = 'JAN-2021' group by security,close,ask,bid,mid,dte order by security,dte desc  Below is the result: I only want to get 2 rows, which has the highest date for each security (436 January 5 and 448 January 29) but because the values of the fields are different, all rows are still being shown. Please help me. Thanks


Why does Planck's constant appear in classical statistical mechanics.  I gather a constant appears in because we would like to count classical states in phase space and so therefore we have to separate phase space into "boxes" such that $$\delta q_i\delta p_i=h_0$$  Is a good reason as to why this constant is equal to $\hbar$?