This is a follow up to a previous post. I am sorry of this is considered spamming but I have made significant progress of the question since then. Hopefully I'm on the right track, an tips or advice on my methods would be much appreciated!  I have been asked to prove the limit of $\frac{x^2 -4}{x-4} \rightarrow -5$ as $x \rightarrow 3$. First I fix $\epsilon >0$ and find $\delta>0$ such that.  $$0<|x-3| <\delta \implies \bigg|\frac{x^2 -4}{x-4} + 5\bigg| < \epsilon$$  $$\impliedby \bigg|\frac{x^2+5x -24}{x-4}\bigg| < \epsilon$$  $$\impliedby \bigg|\frac{(x+8)(x-3)}{x-4}\bigg| < \epsilon$$  $$\impliedby \bigg|(x-3)\frac{x+8}{x-4}\bigg| < \epsilon$$  If $|x-3| \leq \frac{1}{2}$, then $[2\frac{1}{2},3\frac{1}{2}]$. Then $\frac{x+8}{x+4} \geq \frac{1}{2}$. Therefore $\frac{|x-3|}{2} < \epsilon \iff |x-3|<2\epsilon $.  Thus any $\delta \leq$ min$(\frac{1}{2}, 2\epsilon)$ has the required property.  Thanks for your time!

I am a university student taking a real analysis course and I'm having trouble solving this problem from my question sheet. I'm fairly accustomed to proving sequences from first principles when $n \rightarrow \infty$ but in this question $n \rightarrow 3$.  I've only got so far as my rudimentary...  $$n \geq N \implies \Big|\frac{x^2-4}{x-4} +5\Big| < \epsilon.$$  Which is also confusing as the question was delivered in terms of $x$ instead of the customary $n$. I'm quite confused.  Any tips or a prod in the right direction would be much appreciated, I've spent the whole night pouring through my notes but nothing seems to fit together.


$\newcommand{\man}{\text{man}}$ $\newcommand{\tiger}{\text{tiger}}$  Consider the following situation:  A man is standing in the center of a circle of radius $r$. On the circle there is a tiger. The man move in arbitrary piecewise smooth paths with a fixed speed, and the tiger can move only along the circle, where $V_{\tiger}=cV_{\man}  $, $c>1$. I model the man and the tiger as "points" - they have no actual volume.     Question: For which values of $c$ can the man escape from the enclosing circle without meeting the tiger? (assuming the tiger does its best to catch him).   If $c < \pi$ then its trivial. The man just goes in a straight line in the opposite direction from the tiger: The man reaches the circle after a time of $\frac{r}{V_{\man}}$ and the tiger reaches that same point after  $\frac{\pi r}{V_{\tiger}}$.  In fact, there is a more sophisticated idea, which works for any $c < \pi +1$, as I explain below.  Is $\pi+1$ the highest speeds ration when the game is solvable?  The man starts by going to an intermediate circle with sufficiently small radius $r_1$, in the sense that $$ \frac{r_1}{V_{\man}} <  \frac{r}{V_{\tiger}}= \frac{r}{cV_{\man}}  \Rightarrow r_1 < \frac{r}{c}. \tag{1}$$  The man than starts circling the small circle until it lies on the "opposite" point of the tiger, so the distance between them is $r+r_1$.  If $r_1$ satisfies $$ \frac{r-r_1}{V_{\man}} < \frac{\pi r}{V_{\tiger}}=\frac{\pi r}{cV_{\man}}, \tag{2}$$  then the man can win.  Combining $(1),(2)$ we see that $r_1$ must satisfy  $$ r(1-\frac{\pi}{c}) < r_1 < \frac{r}{c},$$ so this technique can work if and only if $ 1-\frac{\pi}{c} < \frac{1}{c} $, i.e. $c < \pi +1$.  I am also not entirely sure how to formalize this question mathematically. We are looking for a winning "strategy"-but what is a strategy? In my solution with the intermediate circle, what the man does (e.g. direction of movement) is affected by the tiger's moves. In that case one could say that there is a periodic path of the man such that no matter what the tiger does, there exist a "breaking point" where the man can run free.  But is this really the shape of the best solution?

A famous problem:  A lady is in the center of the circular lake and a monster is on the boundary of the lake. The speed of the monster is $v_m$, and the speed of the swimming lady is $v_l$. The goal of the lady is to come to the ground without meeting the monster, and the goal of the monster is to meet the lady.  Under some conditions on $v_m,v_l$ the lady can always win. What if these conditions are not satisfied?  Edited: the monster cannot swim. If the conditions are not satisfied, then monster can always perform a strategy such that the lady will not escape the lake. On the other hand this strategy is not desirable for both of them because they do not reach their goals. As there was mentioned, this deals with undecidability of the problem. On the other hand, if you imagine yourself to be this lady/monster, you can be interested in the strategy which is not optimal. What is it? If there are such strategies in the game theory?  Edited2: My question is more general in fact. If we have a game with one parameter $v$ when two players $P_1, P_2$ are enemies and if $v>0$ then for any strategy of $P_2$ the player $P_1$ wins. If $v\leq 0$ then for any strategy of $P_2$ there is a strategy of $P_1$ such that $P_2$ does not win and vice versa. I am interested in this case. From the mathematical point of view as I have understood the problem is undecidable since there is no an ultimate strategy neither for $P_1$ nor for $P_2$. But we are solving somehow these problem IRL. Imagine that you are a lady in this game - then you would like to win anyway even while knowing that your strategy can be covered by the strategy of the monster. On the other hand, the monster knows that if he will cover all strategies of the lady she will never reach the shore and he will never catch her. I mean they have to develop some non-optimal strategies. I hope now it's more clear.


From what I remember, the astronaut made first contact with a race of felines that live on the other side of the Galaxy.  They had always been able to see Earth, but Earth couldn't see them because they were blocked by the Sun.  There are various corporations that do drilling on various asteroids and the feline race helps in saving someone, or stopping an explosion at one of these complexes.  After this (possibly in a second book) she comes back to Earth and is the ambassador to the feline race because they know her.  This is upsetting for her because she had worked so hard to become an astronaut, but had a very short career because of this incident.  She ends up getting some sort of connection with them, and takes on some of their characteristics.  I think this connection followed some sort of either transformation or psychic episode they were able to induce in her on their ship, where she was able to see what it was like to be one of them.  The alien technology is way more advanced than the human, and they are stronger and faster as well.  A final note, I recall the female astronaut having red hair.

All I remember about the book is that the protagonist was a human female fighter pilot, she has short hair, not sure if it was blond or auburn and she was involved in making peace with the alien race.  The alien race was invading Earth, but because of her they stopped, surrendered and because of her helped Earth improve its technology. I remember that she melded with something and was starting to sort of think like them and lose a bit of her humanity.  It was set in the not too distant future. I believe I read it in the 90s.


I would like to have a chapter design like    So in the Box of the title, should be an image in the background and above the number of the chapter.   The packages I'm using so far, are:  \documentclass[a4paper,11pt,twoside]{scrbook} %{book} \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} \usepackage{fancybox} \usepackage{tikz} \usepackage{cleveref} \usetikzlibrary{arrows,automata} \usepackage[latin1]{inputenc} \usepackage{amssymb,amsmath,amsthm} \usepackage{needspace} \usepackage{mathabx} \usepackage{enumerate} \usepackage{makeidx}   \usepackage[ruled]{algorithm2e} \usepackage{mathrsfs} \usepackage[many]{tcolorbox}   Update: by substituting the ducks through:   \chapternumberbackground{\begin{tikzpicture}\includegraphics[width=.2\linewidth]{logo.pdf}\end{tikzpicture}}   I get an division by 0 error ... why? and how can I fix it?

I'm searching for nice predefined chapter headings. I've found the fncychap package, and seen that memoir has quite a few, too.  Do you know other packages that provide predefined fancy chapter styles?


Is there a way to use XPath in Ruby without specifying the tag?  For example, I want to get all elements whose class contains 'trow1'. Not just tr, as the code below is doing:  doc.xpath("//tr[contains(@class,'trow1')]")

Given this XML, what XPath returns all elements whose prop attribute contains Foo (the first three nodes):  <bla>         </bla>


I want to change the PASS_MIN_DAYS = (whatever value is set) to PASS_MIN_DAYS = 15 using a script.The file it's in is /etc/login.defs.

How can I find and replace specific words in a text file using command line?


So I'm trying to run a while loop, which should ideally stop when winner is either True or False. The table.isWinner() method returns either one of these values. But the loop for some reason is not getting stopped, until outerCount is bigger than tableColNum*tableRowNum (the other condition).             tableRowNum = table.getNumRows()             tableColNum = table.getNumColumns()             stackNum = table.getNumStacks()             winner = None             outerCount = 0             while winner == None and outerCount < tableColNum*tableRowNum:                 for i in range(tableRowNum):                     for j in range(tableColNum):                         domino = table.select(i, j)                         played = None                         count = 0                         while count < stackNum and not played:                             played = table.playDomino(domino, count)                             count += 1                         print(table)                         winner = table.isWinner()                         print(winner)                         outerCount += 1

Given the following code (that doesn't work):  while True:     #snip: print out current state     while True:         ok = get_input("Is this ok? (y/n)")         if ok.lower() == "y": break 2 #this doesn't work :(         if ok.lower() == "n": break     #do more processing with menus and stuff   Is there a way to make this work? Or do I have do one check to break out of the input loop, then another, more limited, check in the outside loop to break out all together if the user is satisfied?


Recently I refereed a paper in pure mathematics. Although I recommended a "major revision", I was quite impressed with the paper, and indeed I would like to: (1) describe his results in a grant proposal I am writing, and (2) eventually apply the author's techniques in my own work.  The author has not yet made his paper publicly available (e.g. on the arXiv or on his personal website). Ethically speaking, may I now freely refer to his paper in my proposal, and later in my work? Or am I bound to wait until the paper is published or until the author has otherwise made it available to the public?  I e-mailed him recently, let him know that I was a referee for his paper, and asked his permission to do this. If he writes back to offer (or deny) me permission, then that settles the issue. But what if I do not hear back?

I recently reviewed a paper (general applied mathematics context). During the review, I realized that the fairly general ideas introduced in the paper can potentially be applied to a specific problem in a similar context. The authors did not mention this application in their paper, so I suggested to add a short comment about it in my review.  I later started thinking about the application in more detail and tried out some things, which actually seem to work quite well for this application. Now, the paper is still in the review process and might take some time until it gets published. What is the proper way how to proceed here in order to use the ideas and results which I in my exclusive position as a reviewer saw? How can I refer to the paper that is still under review? How can I best discuss the ideas with my co-workers (and potential co-authors) without disclosing that I reviewed the paper?  The paper under review is not available online on any preprint servers such as arXiv etc


hello i want to know why when i go on any website and console.log(document.cookie) the console doesn't show all of cookies but when i use an extension called editThisCookie i can see all the cookies and i want to know how to do that in javascript, thank you.  editThisCookie:[    console.log(document.cookie);

JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site?   Edit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFox later adopted this. So my question is: If you are using AJAX on a site, like StackOverflow, are Http-Only cookies an option?  Edit 2: Question 2. If the purpose of HttpOnly is to prevent JavaScript access to cookies, and you can still retrieve the cookies via JavaScript through the XmlHttpRequest Object, what is the point of HttpOnly?  Edit 3: Here is a quote from Wikipedia:     When the browser receives such a cookie, it is supposed to use it as usual in the following HTTP exchanges, but not to make it visible to client-side scripts.[32] The HttpOnly flag is not part of any standard, and is not implemented in all browsers. Note that there is currently no prevention of reading or writing the session cookie via a XMLHTTPRequest. [33].   I understand that document.cookie is blocked when you use HttpOnly. But it seems that you can still read cookie values in the XMLHttpRequest object, allowing for XSS. How does HttpOnly make you any safer than? By making cookies essentially read only?   In your example, I cannot write to your document.cookie, but I can still steal your cookie and post it to my domain using the XMLHttpRequest object.  <script type="text/javascript">     var req = null;     try { req = new XMLHttpRequest(); } catch(e) {}     if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}     if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}     req.open('GET', 'http://stackoverflow.com/', false);     req.send(null);     alert(req.getAllResponseHeaders()); </script>   Edit 4: Sorry, I meant that you could send the XMLHttpRequest to the StackOverflow domain, and then save the result of getAllResponseHeaders() to a string, regex out the cookie, and then post that to an external domain. It appears that Wikipedia and ha.ckers concur with me on this one, but I would love be re-educated...  Final Edit: Ahh, apparently both sites are wrong, this is actually a . IE6 & 7 are actually the only browsers that currently fully support HttpOnly.  To reiterate everything I've learned:   HttpOnly restricts all access to document.cookie in IE7 & and FireFox (not sure about other browsers) HttpOnly removes cookie information from the response headers in XMLHttpObject.getAllResponseHeaders() in IE7. XMLHttpObjects may only be submitted to the domain they originated from, so there is no cross-domain posting of the cookies.   edit: This information is likely no longer up to date.


I want to compare the capacitance of two tiny capacitors at around 10^-15 F each. One will change compared to the other by at maximum factor 3. I need to measure the relative difference between them to an accuracy of around 1%. My idea is to connect them in series to form a ”voltage divider” and then connect the middle of them to a comparator which can then compare the voltage between the capacitors to some external reference voltage.  However, I have no experience with comparators or exactly how they work. Would the comparator try to draw a current from the capacitors it was comparing (and thus not work since there’s basically no charge to draw)? What should I look for when buying a comparator for this application?  If this is simply not possible, how else might I accuratley (and cheaply) compare the values of these two capacirors? Note, not looking for some expensive high tech solution here, looking for something which can be done at home by an amature.

I'd like to measure (to a few percent precision) the capacitance of a 0.8-0.06pf variable capacitor (eventually to be read by a 120mhz 32-bit microcontroller, if that's any help). I realize that one cannot just measure an arbirarily small capacitor to any accuracy, so I'm not sure if this is practically feasible. I've looked into making a regular RC time circuit and polling to measure the discharge time, but even with the highest value resistor I can easily source (100M) the capacitor is discharged within 1 microseconds, which (I believe) is a stretch for me to sense with the microcontroller.  If this is practically possible, how could I do this?  EDIT:  The capacitor I'm giving values for is just two 1cm^2 parallel plates with a 1-13cm gap between them. I'm ultimately trying to get the distance between the plates from this capacitance. This is probably just a shot in the dark, but I thought I'd entertain the possibility and see what one could hypothetically do; any information on why this wouldn't work would be appreciated. Once known from calibration, any added parasitic capacitance (from traces, etc) can probably just be removed from the final value, correct?


I think it is grammatically not correct to use the phrase 'I wish I was' in any sentence or, any situation. The correct phrase for its substitute will be 'I wish I were'. For instance, I wish I were on the first floor (I am actually staying on the ground floor).

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


200 people are waiting to board an airplane with 200 seats, one person at a time. The first person to get on the plane has lost his boarding pass, so he sits in a random seat. The second person does the following: Goes to his seat (the one it says to go to on the boarding pass). If unoccupied, sit in it. If occupied, find a random seat to sit in. Everyone else behind him does the same. You are the last person to board the plane.  What is the chance that you get to sit in your assigned seat?

This is a neat little problem that I was discussing today with my lab group out at lunch. Not particularly difficult but interesting implications nonetheless  Imagine there are a 100 people in line to board a plane that seats 100. The first person in line realizes he lost his boarding pass so when he boards he decides to take a random seat instead. Every person that boards the plane after him will either take their "proper" seat, or if that seat is taken, a random seat instead.  Question: What is the probability that the last person that boards will end up in his/her proper seat.  Moreover, and this is the part I'm still pondering about. Can you think of a physical system that would follow this combinatorial statistics? Maybe a spin wave function in a crystal etc...


I've got a few questions I've answered, and I've been the only one to answer.   The answer has been up voted but the question author has still not accepted, even though the answer is valid.  Would it be possible in this scenario to have a 'Nudge Author' button available, that asks them to review the question and accept an answer.

Sometimes you give an answer to a question where:   You know it is the right answer You know it resolves OP's problems There's no answer "better" than yours You have spent time and effort on it Other users like it with several upvotes   BUT  OP that asked the question does not accept it with the green checkmark.  What annoys me is not the mere -15 points on reputation because, as well said by Jeff, if the answer is a good answer, the community will upvote it. I would like to get the green checkmark on pending questions for two main reason:   Personal satisfaction (what I answered, helped and worked for real!) Curiosity (Did it work? Cool, I can "close the case" and remember this solution)   Bonus reason: 3.  Good breeding (why not?)  I know that the system warns a user to accept an answer when he/she leaves questions without accepted answers after X days but, from the answerer's point of view, there's no way to put some "pressure" on who asked the question. Ok, I could ping the user with "Did it worked?", "have you tried?", "What about my solution?", "Still alive?" but imho that is not a good, official, effective option.  This feature fits well in these scenarios (thanks ccornet):  - The OP is new, unaware that answers can be accepted.  - The OP forgot about the question, and due to sort order in their profile, never saw it again.  My proposal: Having received X upvotes and after Y days, is it possible to have a "WAKE UP" feature where you can send a private predefined message to the OP who asked the question?    You could realize it in different flavors: 1. A voice recorded "WAKE UP" screamed when user logs in. 2. A red bloody "WAKE UP" message on users activity. 3. A blinking horse head near username.    Obviously, this is just a provocation. This feature could be implemented with a SOFT PRIVATE and absolutely PREDEFINED alert message.


I have two questions here:   To which action we can use Stop + gerund? And to which action we can use Stop + to + infinitive?

In this exercise:  Ali stopped _____ to his friend. He talked to him then. a) talk b) talking (I chose this one) c) to talk (This one is marked as the correct answer) d) being talked  Why did they choose "to talk" as the right answer? And why not "talking"? I understand the meanings of talk and stop so I don't understand why one is wrong and the other correct.


I've never used bounty on one of my questions. I've read that I can set a bounty and they will appear prominent.   I should then award the best question.  So, will they (who awarded) get same reputation points as I've set bounty? Will the same reputation points of mine be cut from my account if I award another?

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


I'm doing a little report about the KNN complexity vs SVM.. I would like to know your opinions.. I built this text according to my perspective searching in papers, websites, ppts etc:      The reason why the KNN classification technique obtained less   execution time does not mean that it is computationally efficient,   investigations as in [91] indicate the large-scale KNN processing is   computationally costly, and requires a large amount of memory for an   efficient calculation of memory. However, in some cases KNN is   effective [92]. The asymptotic complexity of KNN according to [93] is   O(d) execution time to compute the distance of a point, is O(nd)   execution time and to compute the distance of all the points is   O(nk) extra time to find the k nearest examples, the computational   complexity of the KNN technique is O(nk + nd) [93]. According to   [92] the KNN technique is characterized as a non-parametric and lazy   classification method (lazy) and because of this according to [90] KNN   is very useful in practice where most real-world data sets do not they   follow mathematical theoretical assumptions. On the other hand, the   SVM classification technique according to [94] presents a   computational complexity of O(n^3) execution time. The core of SVM   is a quadratic programming problem (QP), which separates the support   vectors from the rest of the training data. In fact, the execution   time of SVM is of cubic order, which means that in most cases it will   require a high execution time, however SVM is a very efficient   technique in classifying data of very high dimensions [95].   The reason why I did this, is beacause I have trained (knn and svm) using sklearn library in python.. My dataset was about 750 features, 250 features per class (three classes), I trained only one feature dimension (1-D array). This were the results:   SVM   Between training process and testing process (0.20%) I got: 0.029801 sg   KNN   Between training process and testing process (0.20%) - 0.0074096 sg  As we can see K-NN got a shorter execution time ≈ 7 milliseconds and SVM 29.801 milliseconds. Is easy say this but to try to give a teoric justification to it, I did the text of above.  I hope your opinions, thanks so much. Probably I will need to add more information according your opinions :D      **Update I left the code, I'm working with real data this text is not a   assumption   (x_train, x_test, y_train, y_test) = train_test_split(data,                                                      labels,                                                      test_size=0.20,                                                      random_state=11) #get start time start = time.clock() #build the model svm = SVC(kernel='rbf', gamma=0.5)  #train the model svm.fit(x_train, y_train)  #make test with 20%  y_predicted = svm.predict(x_test)  #get end time end = time.clock()  runtime = end - start  #get confusión matrix using PyCM library  cm = ConfusionMatrix(actual_vector=y_test, predict_vector=y_predicted)    [90] A. Navlani, “KNN Classification using Scikit-learn (article) - DataCamp,” 2018. [Online]. Available: . [Accessed: 05-Jul-2019]. [91] N. Chiluka, A.-M. Kermarrec, and J. Olivares, “The Out-of-core KNN Awakens: The light side of computation force on large datasets.,” Int. Conf. Networked Syst. NETYS, p. 16, 2016. [92] G. Guo, H. Wang, D. Bell, Y. Bi, and K. Greer, “KNN Model-Based Approach in Classification,” pp. 986–996, 2010. [93] S. Sayad, “K Nearest Neighbors classification.” Department of Computer Science Middlesex College, Ontario, Canada., p. 20, 2010. [94] A. Abdiansah and R. Wardoyo, “Time Complexity Analysis of Support Vector Machines (SVM) in LibSVM,” Int. J. Comput. Appl., vol. 128, no. 3, pp. 28–34, 2015. [95] L. Argerich, “What makes SVM good method when dealing with high-dimensional data? - Quora,” 2014. [Online]. Available: . [Accessed: 12-Jul-2019]. [96] J. D. Keller, B. Mac Namee, and A. D’Arcy, Fundamentals of Machine Learning for Predictive Data Analytics. The Massachusetts Institute of Technology, 2015.

I have trained two models using sklearn library in python.. My dataset was about 750 features, 250 features per class (three classes), I trained only one feature dimension (1-D array). This are the results:   SVM   Between training process and testing process (0.20%) I got: 0.029801 sg    KNN   Between training process and testing process (0.20%) - 0.0074096 sg  As we can see K-NN got a shorter execution time ≈ 7 milliseconds and SVM 29.801 milliseconds.  I'm interested in knowing what of this two models are more complex computationally. According to [1] the complexity of SVM (LibSVM) is O(n^3) Sklearn is using libsvm like backend or like solver for svm problems (linear and non-linear)  According to [2] the complexity of K-NN is O(nd)  "Since the large O notation only gives a higher asymptotic dimension, and not an asymptotically adjusted upper bound, we can make statements that at first glance seem incorrect, but that are technically correct. For example, it is absolutely correct to say that the binary search is executed at a time O (n),  That's because the execution time grows no faster than a constant multiplied by n. In fact, it grows slower." [3]  What is more complex?  O(n^3) or O(nd) and Why?  Since my point of view KNN is more less complex in time execution that SVM model. thanks so much.  [1]  [2]  [3]


I have this code that acts as a recursive function which just prints out all the possible combinations of a string: def permut(head, tail = ''):      if len(head) == 0:         print(tail)     else:                 for i in range(len(head)):              # Need help explaning this part             permut(head[0:i] + head[i+1:], tail + head[i])   # Print the string permut('xy')  This will print out:  xy yx  I just need help explaining what is going on, on this part:  permutations(head[0:i] + head[i+1:], tail + head[i])

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I am writing a plugin in which I have to start by setting it up before using it. This means I may need to update wp-config.php  I know how to edit wp-config.php directly. However the requirement is to also be able to modify it via the plugin settings page. Once the user chooses the correct settings and saves, those settings are updated (added or modified) in wp-config.php  So is there a WordPress method that allows me to find the wp-config file? Is there a WordPress method or API that allows me to update the wp-config.php file? Is there a method that allows me to find and read then edit the wp-config.php entries?  Thanks.

is there a way to hook / filter or add action that would be printed in the wp-config file? lets say i want to add some simple command like "empty the trash" aka  define('EMPTY_TRASH_DAYS', 1 );    This should be changes in the wp-config but i want it to go with theme..  Any way to do that?


I have a ten spot array in my code, which is user inputted.  for (int i = 0; i < arraya.length; i++){      arraya[i] = scan.nextInt(); }     After entering   2, 4, 53, 2, 3, 46, 45, 5, 4, 3   the array that was printed read  [I@86b012   How do I fix this?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I have a Zyxel P-870H VDSL modem, I"M trying to diagnose internet problems.   I have my computer computer plugged into it via ethernet. I'm able to access the internet, and ipconfig tells me that the default gateway is 192.168.1.1, and I'm able to ping that address,  but when I enter that into the browser, I'm not able to access the modem.   Any ideas?

I'm having trouble with my home network, since I've started using a new wireless router.  The setup is a Zyxel VDSL Modem pluged into the wall, and connected to a TP-LINK modem via the ethernet ports.   When I enter 192.168.1.1 - it will either access the modem, or the router, and it seems to switch randomly within seconds.   If I can access the modem, I can access the internet.   If I'm accessing the router, there's no internet available.  Any idea what's causing this?


Previously I could that in specials menu, but it seems that there is no such option in 2.8 version.

In Blender 2.8 i have been unable to find the location of the subdivide button in any menu in edit mode and have only been able to get it using the search key. The lack of any keybind is also making it quite difficult. I am using beta 2.80.41


One might want to use a generic pronoun, that doesn't specify the gender of the person. Although "he" can be used in such case, they decide that "he" still reflect the history time when male was dominant. After searching in the internet, they find the .  The problem is, what they learnt in school is they only use for a group of people. Someone may not know the existence of the singular "they", so it can lead to misunderstanding. Especially when after the singular they, the verb doesn't change to reflect the singular form:     When I tell someone a joke they laughts laugh.   So they want to know how popular the singular they get known in modern English. Is it safe to use it without any note?   Ok, I am them

Is it good English to say "They have just left", when talking about a single person (perhaps someone you don't know the gender of)?  (I am a native English speaker, I'm looking for the view held by lexicographers).


Let $A[x_1, \ldots, x_n]$ be a polynomial ring over an integral domain, $A$. Let $s = a\prod_{1\leq i \leq n}{x_i}^{\alpha_i}$, $a \in A$. What is the Krull dimension of $A[x_1, \ldots, x_n]_s$?

Given $A$ an integral domain and $A[x_1, \ldots, x_n]$ a polynomial ring over $A$. Let $s = \prod_{1\leq i \leq n}{x_i}^{\alpha_i}$. What is the Krull dimension of $A[x_1, \ldots, x_n]_s$? Will it be equal to Krull dimension of $A[x_1, \ldots, x_n]$?


How do these 3 sniping rifles compare in accuracy, damage, reloading speed, bulletdrop, rounds per magazine,...?

My problem is that I keep unlocking new weapons and I really don't understand a great way to compare the guns.  I understand that if I start with a new weapon I need to spend a lot of time to unlock the good unlocks for that weapon, but there must be some general consensus as to some top guns and attachments.


I finished the game and I have downloaded all of the bat suits. But it doesn’t give me the option to change suits.

I've finished Batman Arkham City (now with 63% complete yet), and I still don't have any option to change the skin.  How can I change my default Batman skin to Batman Beyond (or other skins) ?


Prove by induction for each integer  $n$ greater or equal to $1$, we have $$7 + 7^2 + 7^3 +···+ 7^n = \frac{7^{n+1}-7}{6}.$$

$$\sum_{k=0}^nq^k = \frac{1-q^{n+1}}{1-q}$$  I want to prove this by induction. Here's what I have.  $$\frac{1-q^{n+1}}{1-q} + q^{n+1} = \frac{1-q^{n+1}+q^{n+1}(1-q)}{1-q}$$  I wanted to factor a $q^{n+1}$ out of the second expression but that 1- is screwing it up...


I have a class with a template method that is declared in a header and defined in a cpp file, so  // A.h - declaration struct A {     template<typename T = int> void fun(); };   and then  // A.cpp - definition #include <iostream> #include "A.h"  template<typename T> void A::fun() {     std::cout << "Hello world template" << std::endl; }  // Explicit instantiation template void A::fun<int>();   Now, somewhere else, in a test, I have  #include "A.h"  int main () {     A a;     a.fun(); }   and since I explicitly instantiated the function for int template parameter, all is well. Or should be!  My code links fine with GCC 7.3.0 but fails to link with clang 6, which reports an undefined reference to function fun.  What's going on here? Is there anything else that I should take care of? Perhaps something that GCC takes for granted while clang doesn't?  Thanks!  Edit  @WhozCraig, @Neil Butterworth here are the linking commands for the two toolchains.  GCC:  /usr/bin/g++  -g   CMakeFiles/test_generator.dir/generator/generator.cpp.o CMakeFiles/test_generator.dir/test_utils.cpp.o  -o test_generator -Wl,-rpath,/home/mleoni/PhD/ABI/libcellml/build/src:/home/mleoni/PhD/ABI/libcellml/build/tests/gtest ../src/libcellmld.so.0.1.0 gtest/libgtest_main.so /usr/lib/x86_64-linux-gnu/libxml2.so gtest/libgtest.so -lpthread   clang:   /usr/bin/clang++  -g   CMakeFiles/test_generator.dir/generator/generator.cpp.o CMakeFiles/test_generator.dir/test_utils.cpp.o  -o test_generator -Wl,-rpath,/home/mleoni/PhD/ABI/libcellml/build/src:/home/mleoni/PhD/ABI/libcellml/build/tests/gtest ../src/libcellmld.so.0.1.0 gtest/libgtest_main.so /usr/lib/x86_64-linux-gnu/libxml2.so gtest/libgtest.so -lpthread   @IdeaHat: that didn't resolve the issue unfortunately, I am still getting the same error  Edit 2 Since the code I am actually trying to compile is [obviously] not that one, I tried to compile this MWE and both GCC and clang link it fine with just cc A.cpp main.cpp.  I am now trying to understand what's the difference between this minimal case and the code that I actually have.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I have this stored procedure:  CREATE PROCEDURE `test`(OUT `vote_value` INT, OUT `score` INT, IN `user_id` INT, IN `time_range` INT)     NO SQL BEGIN     SELECT coalesce(sum(vote_value), 0), coalesce(sum(score), 0)       INTO vote_value, score     FROM reputations     WHERE owner_id = user_id       AND date_time > CASE time_range           WHEN 'WEEK'            THEN  unix_timestamp(DATE_SUB(now(), INTERVAL 1 WEEK))           WHEN 'MONTH'            THEN  unix_timestamp(DATE_SUB(now(), INTERVAL 1 MONTH))           WHEN 'YEAR'            THEN  unix_timestamp(DATE_SUB(now(), INTERVAL 1 YEAR))           ELSE 1 END; END   As you see my procedure has 4 parameters. Both vote_value and score have OUT direction (as result), And both user_id and time_range have IN Direction. So I have to pass those two which have IN direction when I call the procedure.  Ok, I can call procedure about like this:  CALL test(@vote_value, @score, 10, 'WEEK'); SELECT @vote_value, @score;   It would work as well. But please focus on the third parameter which is 10. I don't want to pass it manually by hand. I want it be a value from a query. Something like this:  CALL test(@vote_value, @score, u.id, 'WEEK'); SELECT id, @vote_value, @score FROM Users u;   But it throws syntax error. Does anybody know how can I do such a thing? The expected result is .

I have a function like this:  DROP FUNCTION IF EXISTS user_repo // CREATE FUNCTION user_repo(user_id INT) RETURNS VARCHAR(20) BEGIN     DECLARE vote_value mediumint;     DECLARE score mediumint;      SELECT coalesce(sum(r.vote_value), 0), coalesce(sum(r.score), 0)       INTO vote_value, score     FROM reputations     WHERE owner_id = user_id       AND date_time > unix_timestamp(DATE_SUB(now(), INTERVAL 1 WEEK));      RETURN CONCAT_WS(',', vote_value, score); END;//   It works as well. Now I want to also pass another parameter to the function to determine the time range. I mean I want to pass a string instead of  WEEK. Here is my new function:  DROP FUNCTION IF EXISTS user_repo // CREATE FUNCTION user_repo(user_id INT, range VARCHAR(10)) RETURNS VARCHAR(20) BEGIN     DECLARE vote_value mediumint;     DECLARE score mediumint;      SELECT coalesce(sum(r.vote_value), 0), coalesce(sum(r.score), 0)       INTO vote_value, score     FROM reputations     WHERE owner_id = user_id       AND date_time > unix_timestamp(DATE_SUB(now(), INTERVAL 1 range));      RETURN CONCAT_WS(',', vote_value, score); END;//   But it throws this error:     The following query has failed:   CREATE  DEFINER=`root`@`localhost` FUNCTION `user_repo`(`user_id` INT,                 `range` VARCHAR(10) CHARSET utf8)        RETURNS VARCHAR(20) CHARSET utf8mb4        NOT DETERMINISTIC        CONTAINS SQL SQL        SECURITY DEFINER BEGIN DECLARE vote_value mediumint; DECLARE score mediumint; SELECT  coalesce(sum(r.vote_value), 0), coalesce(sum(r.score), 0)     INTO  vote_value, score     FROM  reputations     WHERE  owner_id = user_id       AND  date_time > unix_timestamp(DATE_SUB(now(), INTERVAL 1 range)); RETURN CONCAT_WS(', ', vote_value, score); END      MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'range)); RETURN CONCAT_WS(',', vote_value, score); END' at line 9   Does anybody what's wrong?


I mistakenly thought that RSA keys could only be powers of two(1024, 2048, 4096 etc.) but a few days ago read about a 1536-bit and 1160-bit RSA key. I am wondering is it possible to have an RSA key of any bit length?(e.g 1025-bit RSA key, 1234-bit RSA key etc.) thank you.

I know that other bit sizes are possible, e.g. this HTTPS server seems to have a 9000 bit key , but it's very rare that one sees a key not of size 1024, 2048, 4096, etc. bits in common usage - what is the reason for this? Is it just customary, or is there a cryptographic advantage?


So how would you go about making a long piece of pipe and use different meshes along the way.  For example I have one perfect straight piece, one with a dent and another just like the first but with different UV map.   I know you can have caps but can you in some way build it from different pieces?  Ideally I'd like to have a bezier curve to control the placement and then Array+Curve modifier on the mesh to extrude it along the Bezier. But how do you add variation to that other than do it manually? Is there a way to add and align multiple bezier curves one after another?  I thought about vertex groups but bezier curves don't support them?

Is possible to place/spawn objects along curve with randomized scale and rotation? I'm looking for lazy way to create flowers and randomized procedural patterns. Thanks


The camera fell on the floor and now I can't turn it to 18mm, its stuck on 55mm and only moves 1/2 inch when I try to turn it. Anyway I can fix it?

I dropped my camera while on holiday last summer. Thankfully, my camera wasn't damaged but the kit lens has lost the ability to autofocus and the UV filter and 58mm to 52mm filter step-down (I use it to attach a fisheye filter to the lens) I had on its end are stuck and won't come off.  I've replaced the lens with an 18-200 zoom lens so I don't especially need it. I was wondering if it was worth getting the lens looked at and possibly repaired?  I've heard many places will charge you £50 or so just to look at the lens and given the cost of the kit lens I'm not sure it's worth it.


Which is the correct usage from the following two sentences?  Birth of a universe  Birth of an universe

In the following example, is it appropriate to use a or an as the indefinite article, and why?     He ate __ green apple.   I know that in the case of just "apple", it would be "an apple," but I've heard conflicting answers for "green apple," where the noun is separated from the article by an adjective.  Also, which is more appropriate in this case:     He ate  __ enormous Pop-Tart.


As I can understand about the question, it is required to prove,  $$\operatorname{Corr}( X, Y ) + \operatorname{Corr}( X, Z ) + \operatorname{Corr}( Y, Z ) \geq -3/2 \tag i$$  But for any two variables $X,Y$;  $$-1\leq \operatorname{Corr}( X, Y )\leq 1$$  Then how can I obtain the above result (i).?

There are three random variables, $x,y,z$. The three correlations between the three variables are the same. That is,  $$\rho=\textrm{cor}(x,y)=\textrm{cor}(x,z)=\textrm{cor}(y,z)$$  What is the tightest bound you can give for $\rho$?


So I want to change one of the columns in my table from string to real. How am I supposed to do that?

I work on QGIS 2.2, and I am unable to edit my attribute table to change the field type from string to double.  I have gone through several tutorials. - I can not run the table manager plugin, probably because its latest version is for qgis 2.0, (well it appears broken on my plugin manager UI).   I am unable to edit my layer so that I can use the field calculator (as several tutorials stipulated). I am not versed with python to use the python console


I need to write JS function which returns true if string contains - depreciated in its last otherwise false.  For example:  var somestring = "string value - depreciated";   function should return true in above example.  function isDepreciated(var S) {     //Need to check for substring in last     //return true or false }   One possible solution is to use search function but that means that if - depreciated comes within string then it will also return true. I really need to find weather substring is in last or not.  Please help.

How can I check if a string ends with a particular character in JavaScript?  Example: I have a string   var str = "mystring#";   I want to know if that string is ending with #. How can I check it?   Is there a endsWith() method in JavaScript? One solution I have is take the length of the string and get the last character and check it.   Is this the best way or there is any other way?


I was once told of a word describing how utterly overwhelmed you feel when looking at mountains. Not sure if the word describes the actual mountains, or how you feel

I was on a mountain the other day and had a moment where I just had to stop and take it all in. I felt insignificant (in the best way) and just stopped to admire where I was. The closest words I could find was something along the lines of biophilia, or the German word Waldeinsamkeit.


When you scale objects in Inkscape, it either scales the stroke with the object, or it leaves the stroke width alone.  I think I've seen a button for it on another post next to "Affect:" but can't find it.  Where is this option actually located?

I want the borders to stay fixed in Inkscape when I'm resizing an object. I found these buttons in Inkscape v0.48.3.1, but they don't seem to work. Is there any other settings that I should turn on?  These are the buttons that should control that:    EDIT The answer below should be valid, but for some reason this doesn't work for me as I mentioned in the question already. It's probably a bug or there's some additional settings which prevent the normal behavior.


This question may seem to be off-topic, So before flagging or reporting as off topic, feel free to comment and I will delete this question.  I have recently studied high school calculus and I am still wondering that how are integrals and derivatives related to each other?  Is this just a coincidence?  Or there is a logic that I am still not aware of.  Out of my curiosity I asked this question to my teacher but I didn't get any satisfactory answer.   And one more question,  How definite integrals calculate area of the given function.I asked this too, then my teacher replied that when we integrate $y(x).dx$ ; $dx$ is a small strip of width $dx$, parallel to $y$-axis and $y$ is it's height, so together multiplied it gives area in that rectangular region and the integral sums it up.  But then I found a question on this website asking : Is $\frac {dy}{dx}$ not a fraction? and it turned out that it isn't.Therefore we can't consider $dx$ as width, after all, it's a operator.  So what is going on?

I understand how derivatives work based on the definition, and the fact that my professor explained it step by step until the point where I can derive it myself.  However when it comes to the area under a curve for some reason when you break it up into an infinite amount of rectangles, magically it turns into the anti-derivative. Can someone explain why that is the definition of the integral and how Newton figured this out?


ciao come faccio a fare un cd di ubuntu auto istallante con Brasero poi devo istallarlo in un pc con XP DOVE VORREI ISTALLARE UBUNTU E CANCELLARE TUTTO (XP COMPRESO) GRAZIE  Translation(using Google translate):  hello how do I make a CD of ubuntu istallante car with Brasero then I have to install it in a PC with XP where I want to install Ubuntu and delete all (including XP). Thanks!

I would like to see a full how-to guide on how to install Ubuntu.


I just re-installed Windows 8.1 Pro and I noticed something strange about my home directory folder C:\Users\Username. The name of the folder instead of being Username is Usernam_000 C:\Users\Usernam_000. Why is that? Is this normal behavior? If not how can I change its name?  Edit 1:  As I have said in a comment all of these answers in the questions you provided as duplicates just say ways of changing the name. My principal question is why this happened. I want a way to change the name only if it is a normal situation and not a problem.  Edit 2:  As I am really curious about this "problem" I did another installation of Windows 8.1. The same thing happened again, although I deleted the partition and formatted it again.

When I log in on a Windows 8 machine for the first time with my Microsoft Account (by providing an e-mail address), a new user folder is created:  C:\Users\dzinx_000   In previous versions of Windows, I could choose the name of this folder (it was equal to my username). As I use the commandline often, it is quite annoying to me.    Can I somehow rename it to dzinx?  Does simply renaming the folder break everything?


I would need that (on a WinForm) if the key A is pressed, an event is triggered. I got this code from the MSDN site:  private void Form1_KeyDown(object sender, KeyEventArgs e) {      if (e.KeyCode != Keys.A)      {           MessageBox.Show("Key 'a' was pressed.");      } }   The problem is that this code doesn't work for me, there is no error message, but if I am on the form and press the key A there is no event triggered. I tried to use breakpoints, but it never enters the if.  What is the problem here?

I'm looking for a best way to implement common Windows keyboard shortcuts (for example Ctrl+F, Ctrl+N) in my  application in C#.  The application has a main form which hosts many child forms (one at a time). When a user hits Ctrl+F, I'd like to show a custom search form. The search form would depend on the current open child form in the application.  I was thinking of using something like this in the ChildForm_KeyDown event:     if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control)         // Show search form   But this doesn't work. The event doesn't even fire when you press a key. What is the solution?


Back in October  about turning off the mobile chat interface on my iPad. At that time, it was sufficient to choose "full site" from the menu to turn it off.  Sometime over the past few days, something has changed - choosing that menu point no longer has any effect. Everything remains in mobile, which is not useful for me, as a Room Owner.  Can we get this changed so that we can still choose whether to use a mobile interface or not?

When logging into chat-stackexange I am presented with this message:  The new mobile version of chat is now the default mobile version on devices that support it. Unlike the classic (okay, ancient) version, it allows you to perform actions like editing, starring, and direct replies to particular messages. The classic version is still available and will be used in browsers that lack support for some necessary features of the new version. Logged in users can also choose to continue using the old version on the preferences page of their user profile. Please report bugs and other issues on Meta Stack Exchange. Thank you!  I choose to continue using the old version but cannot find the option to do so on my chat user profile page?


This is my error:  java.lang.NullPointerException: Attempt to invoke virtual method 'void   android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference   This is part of my code:  public static final String PLACEHOLDER_LIST_FILE = "placeholder_file"; public static final String STORY_NUMBER_FILE = "story_number_file";   Button button3; Story story; EditText placeholderField; TextView wordsLeftText; Set<String> placeholderList; int storyIndex; int placeholderCount;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.display);      // Restore preferences     SharedPreferences placeholderSettings = getSharedPreferences(PLACEHOLDER_LIST_FILE, 0);     placeholderList = placeholderSettings.getStringSet("placeholders", null);     if (placeholderList == null) {         placeholderList = new HashSet<>();     }      SharedPreferences storyNumberSettings = getSharedPreferences(STORY_NUMBER_FILE, 0);     storyIndex = storyNumberSettings.getInt("story_number", 404);     storyIndex = 404; // Used to test spinner      if (storyIndex == 404) {         storyIndex = getIntent().getIntExtra("selected_story", 404);     }      InputStream is;     is = this.getResources().openRawResource(getStoryNumber(storyIndex));     story = new Story(is);      for (String currentPlaceholder : placeholderList) {         story.fillInPlaceholder(currentPlaceholder);     }      @Override protected void onStop() {     super.onStop();      SharedPreferences placeholderSettings = getSharedPreferences(PLACEHOLDER_LIST_FILE, 0);     SharedPreferences.Editor editor1 = placeholderSettings.edit();     editor1.putStringSet("placeholders", placeholderList);     editor1.apply();      SharedPreferences storyNumberSettings = getSharedPreferences(STORY_NUMBER_FILE, 0);     SharedPreferences.Editor editor2 = storyNumberSettings.edit();     editor2.putInt("story_number", storyIndex);     editor2.apply(); }   What I want to fix:  When I press the button in the second activity to continue to the 'input'activity. Without getting a crash and the nullpointer error.   What have I done to try and fix it:  Look at people who also had the problem, but their fixes don't apply to my code.  I have also no idea why I can't declare it to null.   Any help would be appreciated.  p.s. If you guys see any error in my code please tell me

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


Show that $$\int_{\ln\frac{3}{2}}^{\ln2}\frac{e^{x}+e^{-x}}{e^{x}-e^{-x}}\,\mathrm dx=\ln\frac{9}{5}$$  How would you integrate this logarithmic function in order to obtain $\ln(\frac{9}{5})$.


I have an account in Stack Overflow and several other Stack Exchange sites. Originally, my account was tied to my Facebook account but not anymore.   I am trying to log in/sign up to , but both log in/sign up pages only offer the option to use an existing Google+/Facebook account, or alternatively Wordpress, openID, etc.  Usually, when I sign up to a new Stack Exchange site, I am given the option to use my existing Stack Exchange account, but not with Super User.    I tried accessing the Stack Exchange site, and in my profile page, under "accounts" I can see Super User. However, when I click to go to that site, the top bar shows the "log in" button instead of my name/avatar.  What is going on?  EDIT: Of course, there is also the option to enter my e-mail address and password, which I ended up doing, and I could finally log into my (existing) Super User account.

I have an account on Stack Exchange but when I try to login to  I do not see the option Login with Stack Exchange.       Why is this option now not available?


Are there general rule of thumbs for acceptable accuracy, precision, sensitivity, and specificity values/thresholds in classification? I would imagine that this depends on different applications. I would appreciate it if someone can give me a general guideline.

Imagine a standard machine-learning scenario:     You are confronted with a large multivariate dataset and you have a   pretty blurry understanding of it. What you need to do is to make   predictions about some variable based on what you have. As usual, you   clean the data, look at descriptive statistics, run some models,   cross-validate them etc., but after several attempts, going back and   forth and trying multiple models nothing seems to work and your   results are miserable. You can spend hours, days, or weeks on such a   problem...   The question is: when to stop? How do you know that your data actually is hopeless and all the fancy models wouldn't do you any more good than predicting the average outcome for all cases or some other trivial solution?  Of course, this is a forecastability issue, but as far as I know, it is hard to assess forecastability for multivariate data before trying something on it. Or am I wrong?   Disclaimer: this question was inspired by this one  that did not attract much attention. It would be nice to have detailed answer to such question for reference.


function in .h file: static Matrix<T> fromArray(std::vector<T>);  function in .cpp file: template<class T> static Matrix<T> fromArray(std::vector<T> arr) {     Matrix<T> result(arr.size(), 1);      for(int i = 0; i<result.Rows; i++)         result.setValue(i,0,arr[i]);      return result; }  when I call the method like: std::vector<double> training_inputs {1,1}; auto input = Matrix<double>::fromArray(training_inputs);  I get this error: undefined reference to `Matrix::fromArray(std::vector<double, std::allocator >)' what is your problem with me c++ ?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I was reading  and it it's always refered as female. Is it unique to ships?  I've learn in school that words in english does not have a sex, you can call a cats and dogs as "it".

While talking about ships and countries, is it a good practice to use the feminine form?  For example:  "Her economy" - while referring to a country's economy "Her flag (or deck etc)" - while referring to a ship  Is this practice common? Is it used today?


I have seen many questions here and there about programmers, coders and developers. Like "programmer vs coder vs developer" etc. All these words are having slightly different meanings. Can we describe them together using single word?  If yes what would that word be?  References:

What should I call a person who write software, computer programs ? I know he/she is a software engineer, can I call him/her as "Coder"?


I did search for answers before this but what I found was slightly different so; Can I upgrade from 16.04 to 20.04 while retaining existing files etc? I have everything backed up but if able to do the above it would obviously be a lot quicker and easier.

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


Is it allowed to delete an old post and reopen a same one but with updated information?  I posted a question around 6 months ago, but until this moment there is still no valid answer to it. I figured out a method to bypass the issue later, but the root cause to the problem in my post has not been found yet.  Recently I have more information about the problem and want to update the post, but I am worried that this post is so old that its updates won't get noticed.

I asked a question almost as soon as I got my account. I got a few decent answers, but none of them helped solve my problem. The question has long since become buried by newer questions, and there's still no accepted answer. Unfortunately, because there are quite a few answers with votes, to a casual observer it probably looks like the question was answered and I just neglected to mark an answer as accepted, and the system does not consider it "unanswered".  Or, I asked a question that was a bit more difficult to answer. After waiting for some time, I received no answers, little or no comments, and only a few views. The question does show up in the "unanswered" list, but no one has answered my question.  In either case, what's the protocol for me to try to get this question answered?  I see several options:   Post the question a second time, possibly linking to the original, to get attention for the original question. This is encouraged on sites like Reddit.  However, it's probably not appropriate here, since we're encouraged to check for duplicates and not submit a question that's already been asked by someone else, so this probably falls under that heading. Wait for some kind of wiki-like talk page to be implemented, then post a plea on the talk page for input and hope that activity on the talk page bumps up the question. Edit the question, but do nothing further on the Stack Exchange site. If I edit my post to say that I haven't accepted any of the current answers but am looking for more, then the question might get answered eventually by people browsing through old questions to find something they can answer. Post the question on other sites, but link to my original question on Stack Exchange. People will either answer here, or they'll answer on the other site and I can post the accepted answer here myself.  This might be considered spamming, so it might be better to do this without the link.      For more information, see the "" page in the .


I have a <textarea> which I want to use as a editing panel similar to the ones found in most bulletin boards and forums (even like the one in here). There has to be a 'bold text' button which should bold the currently selected/highlighted text in the <textarea>.  How do I do so using javascript.  For example if the following belongs in the <body>-  <textarea id="txtArea">Some text here.</textarea> <input type="button" id="btnCmd" onclick="boldthis('txtArea');" value="Bold">   How do I complete the javascript code function boldthis(elementid){} so I can do at least collect the selected text in <textarea id="txtArea">?  You may or may not use the example I used to describe your explaination, as long as I understand the logic. Thanks for reading.

I have a textbox and a link button.  When I write some text, then select some of them and then click the link button, selected text from textbox must be show with a messagebox.   How can I do it?    When I click the submit button for textbox below, message box must show Lorem ipsum. Because "Lorem ipsum" is selected in the area.    If I select any text from the page and click the submit button it is working, but if I write a text to textbox and make it, it's not. Because when i click to another space, selection of textbox is canceled.   Now problem is that, when i select a text from textbox and click any other control or space, text which is selected is must be still selected.   How it is be done?


I am trying to get the record type name of the related/linked entity id in the trigger of the Content Document Link like below trigger setVisibilityOnNotesinCase on ContentDocumentLink (before insert) {     for(ContentDocumentLink related_rec :Trigger.new) {         if((related_rec.LinkedEntityId.getSObjectType() == Case.sObjectType) && (related_rec.LinkedEntityId.recordType.Name == 'Support' )) {             related_rec.Visibility  = 'SharedUsers';         }     }}  But I get error Variable recordType doesnot exist I tried to change like Id caseRecordType = Schema.SObjectType.Case.getRecordTypeInfosByName().get('Support').getRecordTypeId(); if((related_rec.LinkedEntityId.getSObjectType() == Case.sObjectType) && (related_rec.LinkedEntityId.RecordTypeId  == caseRecordType ))   I get A non foreign key field cannot be referenced in a path expression: LinkedEntityId is there any way get the recod type name/id of the linked/related record in the trigger without writing the query/apex I tried changing the for loop to query the LinkedEntityId like for(ContentDocumentLink c : [SELECT Id, LinkedEntityId FROM ContentDocumentLink WHERE Id IN :Trigger.new])   This throws error like Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator.

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag. This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it. I am building a trigger, a unit test, or other Apex code. I'm working with sObject records, and trying to access related record information. For example, I might have a structure like this: Account a = new Account(Name = 'Test'); insert a;  Opportunity o = new Opportunity(Name = 'Donation', AccountId = a.Id); insert o;  System.assertEquals(o.Account.Name, 'Test', 'Correct Account associated'); // Assertion fails!  Or, in a trigger, I might be aiming for something like this: trigger ContactTrigger on Contact (after insert) {     for (Contact c : Trigger.new) {         if (c.Account.Name == 'Test') {             // Take some action here         }      } }  Why doesn't this work? Why am I getting null values, or NullPointerExceptions?


Why doesn't it called like that? It seems fair, $1$ called $1$ while $0.999$... being the largest number before $1$, and not called $1$ while not look like it is. Let's say it isn't, how would that number look like?

I'm told by smart people that $$0.999999999\ldots=1$$ and I believe them, but is there a proof that explains why this is?


Are Santa cruz domestic airport T1 and Sahar T1 airport same ? I am travelling from Goa to Mumbai with Jet Airways, it will be arrived on 5:40 am at Mumbai Airport Terminal 2 and then from Mumbai Airport Terminal 1 I have to take another flight (Indigo) to Nagpur on 8:20 am (departure time). Could anyone let me know it is enough time to reach from terminal 2 to terminal 1 with all baggage. What is best way to reach from terminal 2 to terminal 1.

I will be arriving in Mumbai Terminal T2 on a Turkish Airlines international flight. I have a separately-purchased IndiGo ticket 5 hours later from Terminal 1B (Domestic). In the past I heard of a free bus to transfer.    Is that still the case and if not how do I get to Terminal 1B from Terminal 2?


I want to extract the second matcher in a regex pattern between - and _ in this string:  VA-123456-124_VRG.tif   I tried this:  Pattern mpattern = Pattern.compile("-.*?_");   But I get 123456-124 for the above regex in Java.  I need only 124.  How can I achieve this?

Is there a way to specify a regular expression to match every 2nd occurrence of a pattern in a string?  Examples   searching for a against string abcdabcd should find one occurrence at position 5 searching for ab  against string abcdabcd should find one occurrence at position 5 searching for dab  against string abcdabcd should find no occurrences searching for a against string aaaa should find two occurrences at positions 2 and 4


Bonjour.  Show that  $$\sum{\frac{1}{n^{2+\cos{n}}}}$$ is a divergent serie. $$\\$$  My main problem is: If $\epsilon$ is “infinitely small positive real number” define $A_{\epsilon}$ as the set of all $n, |2+\cos n|\leq 1+\epsilon$ $(n \in A_{\epsilon}\iff-1\leq \cos n \leq -1+\epsilon)$. The divergence should come from the sum over $A_{\epsilon}$ but I have no idea to how to handle this. $$\\$$

$$ \sum_{n=1}^{\infty} \frac{(\sin n+2)^n}{n3^n}$$  Does it converge or diverge?   Can we have a rigorous proof that is not probabilistic?   For reference, this question is supposedly a mix of real analysis and calculus.


So I'm trying to prove that the set of integers has the same cardinality as the set of naturals just using the definition, that is, I'm trying to find a bijective function between the two sets. I found this  but I couldn't quite find the answer.  Thanks for any help.

I have alot of questions.   Do Infinite sets have the same cardinality when there is a bijection between them? Are $\mathbb{N}$ and $\mathbb{Z}$ infinite sets? I assume they are, but why? Why does there not exist a bijection between them? Why do $\mathbb{N}, \mathbb{Z}, \mathbb{Q}$ have the same cardinality? I assume there exists a bijection between them, but how can I find this function?


Assume$${ x }_{ 1 }=\sqrt { 3 } ,{ x }_{ 2 }=\sqrt { 3+\sqrt { 3 }  } ,..,{ x }_{ n }=\sqrt { 3+\sqrt { 3+..+\sqrt { 3 }  }  } $$this sequence has a limit and find the limit.  I know I need to show that is is bounded and then show $x_{ n }<{ x }_{ n+1 }$ before finding the limit but have no idea how to go about it. Please help!

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


Obviously, em dash can be used like a colon and commas. Could you please tell me if em dash is used correctly in the following sentences or not? Which one do you prefer? I want to say: John and I traveled to the place of John's birth.  1- In high summer two years ago, my foster brother (John) and I made a sentimental journey to the place of his birth—Armenia.  2- In high summer two years ago, John—my foster brother—and I made a sentimental journey to the place of his birth—Armenia.  3- In high summer two years ago, John—my foster brother—and I made a sentimental journey to the place of his birth, Armenia.

When do you use commas and when do you use parentheses to provide more detail about something?  For example:   The suspect, Tom Wilson, is now being charged with murder. The suspect (Tom Wilson) is now being charged with murder. John Smith, a member of the jury, agreed with the verdict. John Smith (a member of the jury) agreed with the verdict. The first example, the one about the fox, is the more valid one. The first example (the one about the fox) is the more valid one.   I realize that the first example, the one that uses parentheses, is probably more valid in this case (if anyone has a better example, please include it), but when, if ever, would you favor parentheses?  Update: I realize that dashes are sometimes used for similar situations, so I'd appreciate information on these as well.  For example:   The children—who are wearing shoes—will go on the trip The children, who are wearing shoes, will go on the trip The children (who are wearing shoes) will go on the trip


Without measuring throughput (it's at the top of the list; this is just theoretical), I want to know the most standard method for trunking VLANs on multiple Gigabit (GbE) switches to a core Layer 3 GbE switch.  EDIT: Say you have three VLANs, two are on their own 24x10/100/1000 L2 managed switch; the other VLAN is on the core L3 switch doing inter-VLAN routing:  VLAN10 (10.0.0.0/24) Servers: your typical Windows DC/file server, Exchange, and an Accounting/SQL server.  VLAN20: (10.0.1.0/24) Sales: needs access to everything on VLAN10; doesn't need access to VLAN30 and vice-versa.  VLAN30: (10.0.2.0/24) Support: needs access to everything on VLAN10; doesn't need access to VLAN20 and vice-versa.  Here's how I think this should work in my head:  Switch #1: Ports 2-20 are assigned to VLAN20; all the Sales workstations and printers are connected here.  Optional 10GbE combo port #1 is trunked to L3 switch's 10 GbE combo port #1.  Switch #2: Ports 2-20 are assigned to VLAN30; all the Support workstations and printers are connected here.  Optional 10GbE combo port #1 is trunked to L3 switch's 10 GbE combo port #2.  Core L3 switch: Ports 2-10 are assigned to VLAN10; all three servers are connected here.  With a standard 10/100 x 24 switch, it'll usually come with one or two 1 GbE uplink ports; carrying over this logic to a 10/100/1000 x 24, the "optional" 10 GbE combo ports that most higher-end switches can get shouldn't really be an option.    Keep in mind I haven't tested anything yet, I'm primarily moving in this direction for growth (don't want to buy 10/100 switches and have to replace those within a couple of years) and security (being able to control access between VLANs with L3 routing/packet filtering ACLs).    Does this sound right?  Do I really need the 10 GbE ports? It seems very non-standard and expensive, but it "feels" right when you think about 40 or 50 workstations trunking up to the L3 switch over 1 GbE standard ports.  If say 20 workstations want to download a 10 GB image from the servers concurrently, wouldn't the trunk be the bottleneck?  At least if the trunk was 10 GbE, you'd have 10x1GbE nodes being able to reach their theoretical max.  What about switch stacking?  Some of the D-Links I've been looking at have HDMI interfaces for stacking.  As far as I know, stacking two switches creates one logical switch, but is this just for management I/O or does the switches use the (assuming it's HDMI 1.3) 10.2 Gbps for carrying data back and forth?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


Is there an easy and fast way to prove that a convex function $f : I \to \mathbb{R}, \, I \subset \mathbb{R}$ an interval, is continuous? All the proofs that I know are very long and technical. Thanks in advance for any answer!

A real valued function $f$ defined in $(a,b)$ is said to be convex if    $$f(\lambda x+(1-\lambda)y)\le \lambda f(x)+(1-\lambda)f(y)$$    whenever $a < x < b,\; a < y < b,\; 0< \lambda <1$.   Prove that every convex function is continuous.     Usually it uses the fact: If $a < s < t < u < b$ then $$\frac{f(t)-f(s)}{t-s}\le \frac{f(u)-f(s)}{u-s}\le\frac{f(u)-f(t)}{u-t}.$$    I wonder whether any other version of this proof exists or not?


I am trying to implement given DSA signature generation instructions in python, there are few instructions that I couldn't understand in step 3 and 4.  Let m be an arbitrary length message. The signature is computed as follows:   generate k (i.e., k is a random integer in [0, q − 1]) r = g^^k(mod p) h = SHA3 256(m||r)  What does m||r mean? m is a message length r is also a number so what should be the input of hashlib.sha3_256(input) function? As I see in Python it says input must be a string (converted to byte). s = α · h + k (mod q)    h is a string returned by sha3_256 so how do I multiply it with α? The signature for m is the tuple (s, h)

I am studying elliptic curves problems, which also includes study of related protocols such as ECIES. The problem is that I don't understand the notation $\|$. What does this operation mean?   Some stuff is mentioned on , but this algorithm is better explained in the book Guide to Elliptic Curves. This operation is mentioned in Alice's 3rd step:  $$ k_E \| k_M = \operatorname{KDF}(S \| S_1) $$


I have the next sequence where the row is exact, A, B, C and D are $R$-Modules and $ h \circ f =0$.  I need to prove that exists a homomorphism $k: C \to D$ uniquely determined such that $ k \circ g = h$

Let $M', M'', M, N$ be $A$-modules. If $$M' \stackrel{u}{\to} M \stackrel{v}{\to} M'' \to 0$$ is exact, then $$0\to \text{Hom}(M'',N) \stackrel{\bar{v}}{\to} \text{Hom}(M,N) \stackrel{\bar{u}}{\to} \text{Hom}(M',N)$$ is exact, where $\bar{u} (f) =  f \circ u$ and similarly for $v$.  I've shown that $\ker (\bar{u}) \supseteq \text{im} (\bar{v})$ by starting with $v\circ u = 0$.  How do I show the opposite inclusion?


I tried like: here slant height $l={h\over\sin 60}$ and radius of the base of the cone $R=h\tan 60$ but I am not able to find the radius of the sphere.

A conical vessel with semi-vertical angle 30 degrees and height 10.5 cm has a thin lid. A sphere kept in the vessel touches the lid. The radius of the sphere in cm is ...


As I know, users here have links to their deleted posts only for a short time, under "recently deleted posts" on their page. That pages are still accessible by URL after that links are removed. I think that there aren't any cons in keeping those URLs, for authors. Additional explanations for an automatic quality check: that links would make it comfortable for authors to see their old content, for some reason. Authors may have lots of posts and may not even notice that their post is removed, so, this would help them to control their content.

I would really like to see all of my questions and answers on the profile page, even if some of them were deleted, and I don't have enough rep to see them on the site. (Note that some questions are  after 30 days or 1 year, and the author might be oblivious about what happened.)   , the "deleted recent [questions/answers]" links in one's own user profile now list all respective posts that were deleted in the past 60 days, rather than just those that were originally posted in the last 60 days. , users with the "access to moderator tools" privilege (10k+ on designed sites, 2k+ on beta and non-designed sites) can use the search operator deleted:1 to see all their own deleted posts. , deleted questions and answers that were posted in the past 60 days, can be seen using the "deleted recent questions" and "deleted recent answers" links on the questions and answers tabs (at the bottom of the tab) in your user profile. For older posts: as of 2013-04-23 you can  if you already have a link to them, but they still aren't linked from the user profiles (not even just for you). Nor do you see inbox notifications for comments on them if you come back a few hours later. You have to have thought to bookmark your question, or you have to go digging for it in your browser history.


I don't know whether its normal or not but when I mount a filesystem(ext4 partition, USB, SD card etc) via command line, I can't unmount it because it says  target is busy  It is the bash process which is using/accessing it. So I have to kill it first and then only can unmount the drive. As you have guessed, when I kill the bash process the terminal shuts down.and I have to reopen the terminal  and unmount the drive. Is it normal ? I don't remember it happening the last time I unmounted something.

I often experience a problem to umount a directory:  umount /mnt/dir umount: /mnt/dir: device is busy   There are many reasons why the device is busy. Sometimes there are processes running which have open locks on it, sometimes there are other directories mounted on top of /mnt/dir.  My question:  What are the steps to check why a directory couldn't be unmounted.  I know there are many reasons, but it's ok if you explain a specific solution.  [EDIT]  [X]  running processes on mounted volumes.   [X] another volume is mounted on top of a volume we want to unmount   [_] NFS locks the volume we want to unmount


I am trying to include an image (institurtional logo) from direct web address, using \hyperref and pdftex.  I am trying a command of the form (many other variants tried, with varios error messages ...):  \href{http://www.hbv.no/getfile.php/1-hbv.no/bilder/Logo%20og%20grafiske%20elementer/}{\includegraphics[]{hbv}}     The image filetype is .png.  A complicating problem might be the presence of percent % signs in the url ...  The actual error message produced is   "file `hbv' not found"    ?ideas? (In trying to research this, I found a lot of material about \hyperref on the web, but mostly without image examples ...)  Adding a minimal example, as asked for (the included packages  are there because they are needed in the full file, and there might be interferences ...)  \documentclass[norsk,a4paper,pdftex]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc}  \usepackage{babel} \usepackage{graphicx}   \usepackage{xcolor}  \usepackage{amsmath} \usepackage{hyperref} \begin{document}    \href{http://www.hbv.no/getfile.php/1-hbv.no/bilder/Logo%20og%20grafiske%20elementer/}{\includegraphics[]{hbv}}   \end{document}   pdftexing this produces a onepage pdf with an emptybox-symbol followed by the letters hbv, all inside a small (blue-green) box.

I have tried  \includegraphics{http://www.site.com/path/to/figure.png}   But this returns the error   ERROR: Package pdftex.def Error: File `http://www.website.com/path/to/figure.png' not found.    Are there other options?


I need some help on my terraria world...   So basically I'm trying to contain the corruption and hallow but underground they've spread. I tried to do the three block gap however underground the hallow and corruption merge so there's no where to dig.  I don't particularly want my whole world to be one biome so if anyone has any recommendations could you please comment bellow and tell me what you think. :/

After the Wall of Flesh, the Hallow appears and Corruption/Crimson spreads even faster.   Corruption/Crimson spreads through everything   Except Hallow  Hallow spreads through everything   Except mud (jungle) Except synthetic blocks like gray-brick  The results of Hallow and Corruption meeting are unpredictable   How can I stop them both permanently and effectively from taking over the world, considering both the top layer and underground?  (Eg, simply placing gray brick on top of the surface won't stop the underground spread?)  And, is it worth the effort?


I am working on an android project but i got this kind of conflict. I never met this before any clue which one should i keep?  <<< .merge_file_a36756     @Inject     TPOmnitureReporter reporter;      private TPCardAdapter adapter; =======     private TPAdapter adapter; >>>>>>> .merge_file_a32544   EDIT  My question is i am not quite sure which part of code is mine. Usually it should be <<< HEAD is my code. But it is .merge_file_a now.

I want to resolve merge conflicts in my Git repository. How to do that ?


I am differential geometry beginner. I have one question.  Following statement is well known. If $F$  : $\Bbb R^m\rightarrow\Bbb R^n$ is a map & diffeomorphism. And if $F_*$(tangent map of $F$) preserves inner product, then $F$ is an isometry.  But In $m=n=3$, $F$ is still Isometry even if we subtract the condition of '$F$ is a diffeomorphism'  I tried several ways to prove this, but it was useless. I really want to know this elementary proof. Thanks.

I'm having trouble solving the following problem.  If $F:\mathbb{R^3} \to \mathbb{R^3}$ is a diffeomorphism such that $F\ast$(the tangent map of $F$) preserves dot products, show that $F$ is an isometry. (Hint: Show that $F$ preserves lengths of curve segments and deduce that $F^{-1}$ does also.)  I'm trying to proceed as in the hint, but I'm stuck on the first step, showing the $F$ preserves lengths of curve segments. Moreover, how does showing that both $F$ and its inverse preserves length of curve segments show that it is an isometry. And how do I characterize the curve segments. I would appreciate any solutions, hints or suggestions.


I install hplip however at startinn hp-scan, I get: HP Linux Imaging and Printing System (ver. 3.20.9) Scan Utility ver. 2.2 Copyright (c) 2001-18 HP Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details. error: No device selected/specified or that supports this functionality. When I do hp-check I get. Missing Required Dependencies error: 'libcups2' package is missing/incompatible error: 'python3-pyqt4' package is missing/incompatible error: 'gtk2-engines-pixbuf' package is missing/incompatible Missing Optional Dependencies error: 'python3-dbus.mainloop.qt' package is missing/incompatible But I have the following: gtk2-engines-pixbuf is already the newest version (2.24.32-4ubuntu4). 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. libcups2 is already the newest version (2.3.1-9ubuntu1.1). libcups2 set to manually installed. and Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python3-pyqt4 E: Unable to locate package python3-dbus.mainloop.qt What should I do here? Thanks!

Let's assume that one has some modern HP printer and/or scanner which is  supported by HPLIP package from official repository. Or supported by newer version of HPLIP package (see  about installation).  From official documentation () it is known that device needs proprietary/binary driver or plugin.  How should one install such plugin?


How many elements do you want in the array? 3 Enter an integer to store in the array 66 enter an integer to store in the array 33 enter an integer to store in the array 99 Here are the sorted values: [33,66,99]   This should be the result.  This is what I made:  import java.util.Scanner;   public class PracTe3Te {      /**      * @param args      */     public static void main(String[] args) {         int [] a;         int size;         int value;           Scanner sc;         sc = new Scanner(System.in);         System.out.println("How many elements do you want in the array? ");         size = sc.nextInt();          a = new int [size];          System.out.println("the size of array is " + a.length);                for (int i = 0; i < a.length; i++)              {                 System.out.println("Enter an integer to store in the array");                 value = sc.nextInt();                 a[i] = value;                    int newNum = value;                   if (value < a.length - 1) { //otherwise array is already full                      a[value] = value;                      newNum = newNum + 1;                    }              }              System.out.print(a);          }      }   and get this result:   How many elements do you want in the array?  3 the size of array is 3 Enter an integer to store in the array 4 Enter an integer to store in the array 3 Enter an integer to store in the array 5 [I@60072ffb   How can I print the array list of entered items not like [I@60072ffb?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


While using PostGis, we can query using EWKT format like:  SRID=4326;POINT(lon lat)   or use the functions defined by PostGis itself. For example:  ST_SetSRID( ST_MakePoint( lon , lat ) , 4326 )   I'm concerned if there are any kind of differences/preferences.  p.s. I'm sorry if it's a duplicate. I was unable to find any related threads.

When defining a Point in PostGIS, when do you decide to use which of the following?   ST_SetSRID(ST_MakePoint(lon,lat),4326) ST_SetSRID(ST_Point(long,lat),4326) ST_SetSRID(ST_GeomFromText('POINT(lon lat)',4326) ST_GeomFromEWKT('SRID=4326;POINT(lon lat)')   If its essentially a difference in performance, which will be the fastest?


I have installed a program on Windows 7 that needs Admin rights to run properly. When running on Windows XP; I used the runas command with the savecred switch to create a shortcut that opened the application and run as Administrator without prompting for a password.  I have tried the most options found on the internet with the properties dialogue of the shortcut and messed around with the Scheduled Tasks option, but to no avail.I am running Windows 7 Home Premium, 32-bit.   I have programs installed on my computer that have a Administrator Icon Overlay and seam to run as Admin without prompting for credentials. How can I achieve the same manually?

At my workplace, Windows 7 machines are being rolled out, and users are not being granted administrative privileges.  My department creates applications that run locally on the user's machine, and those are working normally (as far as we've seen).  One application, on the other hand, does not.  It's the application that updates the others (our 'Update Agent').  So, when the user runs the Update Agent, they're immediately stopped with an error, since that application was not able to write to C:\Program Files\our app\  We need a way for these Windows 7 machines to allow this application to be run as administrator or with admin rights when the user executes them.  Since these users will never be given the administrator password, 'Run As Administrator' is not an option.  The user will need to click on shortcut, and it run with enough permissions to modify that folder, write to the registry, etc.  What I'm hoping for is some kind of GPO or policy or something that can be configured on the domain level that will allow this to occur; or, something configured on the client machines once.  Our applications are .net Framework 1.1 and 2.0, and signed with a key.    Any insight would be appreciated.


I recently upgraded to 14.04. I just recently had an issue where my wifi wouldn't connect. I restarted the computer and it connected fine but now my wifi speeds are extremely slow. I saw a similar issue posted that said to use a script to provide info, which I've provided below. Where should I go from here?    Thanks for any help!

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I have Created visualforce page and using pageblocktable shown contact list of record and every row we have a Edit link and want to redirect to their Standard edit page(contact).   <apex:outputLink value="/?id={!con.id}" target="_blank">                        Edit  </apex:outputLink>   if I'm using above code it will redirect to Home page (Salesforce home tab).   <apex:outputLink value="/e?id={!con.id}" target="_blank">                        Edit  </apex:outputLink>   it shows message url no longer available.

I have a visualforce page displaying a list of Event objects that need users to update. I have an 'Update link' that takes them to the edit screen for the Event, but upon Save, it brings up the list page. I want to take them to their home page, where this list VF page is nested.  <apex:page sidebar="false" showHeader="fale" standardController="User" extensions="UsersEventsExt2">    <apex:pageBlock title="Meetings to Update">     <apex:pageBlockTable value="{!Events}" var="c">        <apex:column headerValue="Click to Update"><apex:outputLink value="{!URLFOR($Action.Event.Edit,c.id)}" target="_blank">Update Meeting</apex:outputLink></apex:column>         <apex:column headerValue="Subject"><apex:outputLink value="{!URLFOR($Action.Event.View,c.id)}" target="_blank">{!c.subject}</apex:outputLink></apex:column>         <     </apex:pageBlockTable>   </apex:pageBlock> </apex:page>   Thanks!


So, I am doing the "blender guru" tutorial, and when it's time to sculpt, my "icing" object creates this holes, anyone knows how to solve it?

I tried to follow the new Blender 2.8 tutorial from Blender Guru.   When entering "Sculpting" with the icing there were suddenly alot of holes in it. Why is this?


We have two circle C(O,OC) and C(Q,QA). We know that AO and BO are tangent for C(Q,QA) and QC and QD are tangent for C(O,OC). We want to prove that LJ = KT.         Is it possible to help me?

Let $\Gamma_1$ and $\Gamma_2$ be two non overlapping circles with centers $O_1$ and $O_2$ respectively. From $O_1$, draw the two tangents to $\Gamma_2$ and let them intersect $\Gamma_1$ at points $A$ and $B$. Similarly, from $O_2$, draw the two tangents to $\Gamma_1$ and let them intersect $\Gamma_2$ at points $C$ and $D$.  Prove that $AB=CD$.  I've done some extensive angle chasing on this but have been unable to make any real progress. Can't decide whether $ABCD$ is supposed to be rectangle (as in my diagrams), a parallelogram or even a trapezium. There is a homothety taking one circle to the other but as far as I can see this doesn't help as we don't have a clearly defined center to this.  Any help/hints would be greatly appreciated.


I am adding a user named 'test' in my Ubuntu 18.04 server. When I add the user using adduser, like this:  sudo adduser --system --group test --shell /bin/bash   all goes well, I can login fine, but .bashrc, .bash_logout and .bash_profile are not made by default in the home dir. Whereas when I added the user using useradd like this:  sudo useradd -m test -s /bin/bash   the user is added in the same way as adduser and I have a preconfigured .bash_profile, .bashrc and .bash_logout in the home dir.  Can someone explain why is there a difference ? Am I missing any flag in adduser usage ?

For instance, if I were to run the command adduser test, is the .bashrc created automatically upon creation of the home directory for the user test? If it's not created upon user creation, under what conditions is it created?  Also, if I add a .bashrc file to the home directory of a user, will it be overwritten by the OS?  Thanks in advance.


I am writing a research paper. There are a few known results for which I want to add citation in my paper. However, all those results have already been cited in a well-reputed book. Can I cite the book directly? For example: Result 1 [book citation], Result 2 [book citation],...,etc. or should I add the proper citation of each of the results? like this: Result 1 [this journal], Result 2 [that journal],...,etc. Note that the results in the book are not explicitly explained in any section. They are just briefly stated in the chapter notes. And, if I cite the book directly, I am feeling like I am not adding to the citation count of the original authors who deserve it.

Suppose I have a paper with the following text:     Roses are red, violets are blue, sugar is sweet, and so are you [3],[4].   As one can see, the author got the information from two other references. If I want to add this information in my thesis, do I also have to reference [3] and [4] or can I just reference this particular paper, I got the information from?


I know that QFT contains quantum mechanics, but the fields do not have a similar probabilistic interpretation as the wavefunction in Quantum mechanics. From my not-so-deep knowledge of QFT, I expext a general state to collapse to an eigenstate of some operator once a measurement of the appropriate quantity is made, but I cannot clearly see this analogy to wavefunction collapse. The wavefunction collapse is an axiom of quantum mechanics as far as I know, but when building up the formalism for QFT, no such thing was mentioned in my course. So, the question is: what is a way to showcase this analogy to wavefunction collapse in QFT? I don't need a way to show that wavefunction collapse is contained in QFT, but I want an explanation of how to see the fact that when we make a measurement of some quantity in QFT (say the angular momentum of the bound state of some elementary particles that cannot be described by quantum mechanics), then the quantum state that lives in the corresponding Fock space collapses to an appropriate state.

I followed a basic course on QFT and know some basic concepts but I focussed mainly on calculations and understanding the Feynman rules e.g.. However, sometimes I have the idea that there a quite some fundamental concepts I might be missing, especially regarding the interpretation of QFT and "what's happening". One of the things I wonder is how does wave collapsing of QM fit into QFT? In QM there was a lot of focus on measurements, probabilities, and (the collapsing) of the wave function. Of course, particles in QM and QFT are fundamentally different. In QM they are probability waves and in QFT they are (excitations of) fields. And if I'm not mistaken I would say that for the field of a particle, the excitations of the field are governed by the rules of Quantum Mechanics. However, is the wave function really completely gone, or is there some way to link fields to wave functions again and effects of measurements etc.


I have a simple join query :  select s.id, s.account_id, s.startdate, ss.skill_id, sk.skill_name  from shyfts s     join shyfts_skills ss on ss.shyft_id = s.id     join skills sk on sk.id=ss.skill_id   This give me the results I expected  id      account_id  startdate   skill_id    skill_name 19783   35          2018-10-10  68          Delivery 19783   35          2018-10-10  67          Cooking 28766   76          2018-10-18  68          Delivery   The problem I have is I need to do a loop (foreach in php) but I only need to show unique shift so by ID. As you can see the shift id 19783 is a duplicate. Of course, I can do a GROUP BY but there will be one skill missing (Cooking).  I can do it by adding another select within the foreach-loop but it take too much performance on 200+ rows.  Or, maybe something like "if current $row['id'] is different than the previous $row['id'] but this is bad coding I think.  How can I do that ??

Using MySQL, I can do something like:  SELECT hobbies FROM peoples_hobbies WHERE person_id = 5;   My Output:  shopping fishing coding   but instead I just want 1 row, 1 col:  Expected Output:  shopping, fishing, coding   The reason is that I'm selecting multiple values from multiple tables, and after all the joins I've got a lot more rows than I'd like.  I've looked for a function on  and it doesn't look like the CONCAT or CONCAT_WS functions accept result sets.  So does anyone here know how to do this?