I've recently came across an image similar to this: (Source: )    And was really impressed, the picture I found before that one (sadly can't find it again) looking even better, with a really beautiful linear motion blurred background and a crystal clear subject on a bike in the foreground.  Having no idea at all how this could've been produced I looked around and found the site linked in the image source above, however it doesn't say much other than that one has to pan the camera.  Looking a bit around on this site revealed that "second-rear curtain flash" is also used a lot for these kind of images, as per  Q&A. However, in bright daylight I don't think the flash method will have much effect, but panning the camera seems like a really hard task to me.  I have yet to try it out but given the picture above, wouldn't one have to move the camera at the exact same speed as the bike is going? Or is there post-editing in play too? What I specifically don't understand is how there can be no blur on the biker at all, not even the tiniest bit.  If someone could enlighten me on how to do shots like this and what tips and tricks there are to make it easier and better that'd be amazing.

How do you go about getting great panning shots of things like cars and bicycles so that the background is nice and blurred but the target is sharp as can be. I have tried on many occasion to do panning shots and I just can't get the setup right.  What lens setup, shutter speed would be a good place to start?


I have a list of wrapper class list tempList  public class employeeBookedClass{     public string locationName;     public string locationDate;     public string trainerName;     public string uniqueId;      public employeeBookedClass(string locationName, string locationDate,                                 string trainerName){         this.locationName = locationName;         this.locationDate = locationDate;         this.trainerName = trainerName;         this.uniqueId = locationDate + '~' + locationName;      } }   Now I want to loop over the list in javascript.  for(var ids in listEmplyee){ console.log(ids + '>>>' + listEmplyee[ids]); }   This is what I get in javascript and want to loop over that.  [employeeBookedClass:[locationDate=19/02/2018, locationName=London, trainerName=Nayank, uniqueId=19/02/2018~London], employeeBookedClass:[locationDate=12/03/2018, locationName=Rajasthan, trainerName=Chris, uniqueId=12/03/2018~Rajasthan]]

I am currently trying to add some customer markers to a map. I can add a single marker to the map but when I move that same logic inside of an Apex:repeat I no longer have access to the map variable.  My Javascript:  <script type="text/javascript">      function initialize() {       var mapProp = {         center:new google.maps.LatLng(52.634092,-0.148315),         zoom:10,         mapTypeId:google.maps.MapTypeId.ROADMAP       };                  var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);            }     google.maps.event.addDomListener(window, 'load', initialize); </script>   My VP page:     <apex:repeat value="{!Locations}" var="local" id="mapMarkers" >     <script type="text/javascript">          var lat = '{!Locations[0].Geolocation__Latitude__s}';         var lng = '{!Locations[0].Geolocation__Longitude__s}';         var marker=new google.maps.Marker({             position: new google.maps.LatLng(lat, lng)             });                   marker.setMap(map);      </script> </apex:repeat>   The !Locations list is in my controller and just pulls the latitude and longitude from my Tree__c object:     public List<Tree__c> getLocations() {     List<Tree__c> locations = Database.query('SELECT Geolocation__Latitude__s, Geolocation__Longitude__s FROM Tree__c WHERE Geolocation__Latitude__s !=null AND Geolocation__Longitude__s !=null ');     return locations; }


String keys = "3|PNSN--G";        System.out.println(keys);     System.out.println(test.get(keys));     if ("c"==test.get(keys))         System.out.println("Sucess");     else         System.out.println("Failed");        3|PNSN--G     c     Failed   Why i cant compare it? If "c" is a String and value is a String "c" why it fails?

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


Excluding situations where you die from accidents, the main reason for death is -generaly- .  And usually it is about an organ which becomes "tired" after many years. These results are all from experience and statistics:    But I've never heard of any study that said: "people can't live longer than x age because the heart can't live longer than that".  From my point of view, I think it's us who control the way we live and consequently someone can live longer than the other. For example,   But even the , lived for 122 years and 164 days. For me this isn't enough. It seems that someone can't control his age after all.  Basically my question is: Does science provide any limit that a person isn't able to live more than it? For instance can someone live more than 1000 years?    Note: I don't think someone is able to do this because simply even our healthiest habits are not "so" healthy. But imagine someone who doesn't live like any of us as humans, i.e. Can have a very healthy and natural life

There seem to be a number of ideas about why we age. Hypotheses include the gradual accumulation of cell metabolic products affecting organism function and the reduction of  during cell division. My hand-wavey idea would be "wear and tear".  Are we anywhere near a consensus theory of senescence?


If I take one brand new laptop and a brand new ipad to India, will I be subject to any duties?

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


I reached a satisfying goal on a certain project and decided to stretch the main objects to a realistic size (in metric). Finaly it was so big, that it disappeared when i set the camera in an appropriate position. I tried and it wasn´t visible in the render too. Is it possible to change the limitations?    The project is some kind of temple shaped like a giant head with the mouth as an entrance which would be at least 10 meters tall. This is how it looks before i size it up.

Zooming in to inspect texture details in 3D view clips some closer faces like shown in the image. It's not the camera view so changing camera settings doesn't help.   Where can the distance to the clipping plane be adjusted?


Let $X=(0,1)$ be a metric space with metric defined as $d(x,y):= \vert \tan x-\tan y \vert$ for all $x,y \in (0,1)$. The question is whether $X$ is complete with respect to the given metric or not. The answer is given to be "Yes", but I think the sequence $x_{n}=\frac{1}{n}$ serves as a counterexample. Can anyone tell me whether I am correct or not?

Possible Duplicate:          I have doubt to this problem., $X=(0,\pi/2)$ and the metric is $d(x,y)=|\tan x-\tan y|$ is it complete metric space?  I took one example $x_n=\frac{1}{2^n}$ is a cauchy sequence in $X$, $d(x_n,x_m)=|\tan\frac{1}{2^n}-\tan\frac{1}{2^m}|\rightarrow 0\notin X$, so it is not complete?


What is the best way to call a base function on all the implementations of an interface with reflection and fewer lines possible?  public interface BaseClass { public void doSomething();}  public class A implements BaseClass {       @Override      public void doSomething () {          System.out.println("doing Something in A");       } }  public class B implements BaseClass {       @Override      public void doSomething () {          System.out.println("doing Something in B");       } }  public class anotherClass {     public static void main(final String[] args) {        // get all the implementations of BaseClass;        // for each implementation call doSomething();     } }

Some time ago, I came across a piece of code, that used some piece of standard Java functionality to locate the classes that implemented a given interface. I know the functions were hidden in some non-logical place, but they could be used for other classes as the package name implied. Back then I did not need it, so I forgot about it, but now I do, and I can't seem to find the functions again. Where can these functions be found?  Edit: I'm not looking for any IDE functions or anything, but rather something that can be executed within the Java application.


I browsed the activities of last year and found that 'April of 2013' is described as 'earlier this month' in the header. This month is 'April,2014'.  Here is screenshot.    'Recent Activity' list can be found below the profile.

I was checking a user profile (not mine) on the Android app v1.0.51, and noticed that posts from a year ago were tagged as "Earlier this month". When I checked such a post, I saw they were from December 2013.  It doesn't really matter which users feed I was checking in the app, any profile which goes 1 year back and has an activity in the Profile will show Earlier this month for last year February for example (I take February because it is February at the moment)    This bug still remains in the current version of the android app, as can be seen from the screenshot below (having post from June 2016 and earlier this month from may 2016 (with version 1.0.89)


Let $(X,\tau)$ be a topological linear space. Is it true that the following equivalence hold?  $(X,\tau)$ is a locally convex space $\Longleftrightarrow$ There is a familly of seminorms $\mathcal{P}=(p_i)_{i\in I}$ such that $\tau$ is exactly the initial topology generated on $X$ by the familly $p_i:X\to (\mathbb{R},\tau_0),\ i\in I$.   By initial topology I mean the coarsest topology on $X$ for which the maps $p_i:X\to \mathbb{R}$ are continuous.    In all text that I've found there is an ambiguity about that, because the local convex spaces are introduced via a given local base of the origin wrt a family of seminorms.   P.S. By $\tau_0$ I mean the usual topology on $\mathbb{R}$.

Let's say we have a family of seminorms $(\rho_\alpha)_{\alpha \in A}$ on a vector space $V$.  There are two ways to topologize $V$ using those seminorms:   We define topology $\mathcal S$ by a subbasis consisting of sets of the form $$ B_{x, \alpha, \epsilon} =\{v \in V : \rho_\alpha(v - x) < \epsilon \} $$ for some $\epsilon > 0, x \in V, \alpha \in A$. We define topology $\mathcal I$ as the smallest topology in which the seminorms are continuous.   I've showed that the seminorms are continuous in $\mathcal S$, and that  implies $\mathcal I \subseteq \mathcal S$. I'm having trouble with the other direction. It is clear to me that $B_{0, \alpha, \epsilon} = \rho_\alpha^{-1}  ((-\epsilon, \epsilon ))$, so it's enough to show that vector addition is continuous in respect to $\mathcal I$, but I don't know how to do that.


In the Buffy Season 7 episode First Date, Principle Wood is driving Buffy (passenger seat) and Spike (rear seat) in his car. He asks Buffy how she knows Spike and looks at him in his rear-view mirror. At this point he doesn't know that Spike is a vampire (he finds out 10 minutes later).   If he did see Spike, how? since vampires can't be seen in mirrors      even vampires with souls, such as Angel  If he didn't see Spike, why didn't he react?

I watched the episode  of Buffy the Vampire Slayer.  How come it takes Principle Robin Wood seeing Spike fighting to know he was a vampire?   Only a scene earlier Robin Wood is driving a car with Spike on the back seat, he seems to directly look in the mirror but surely if Spike has no reflection he’d have worked out right away he’s not human.


I wrote the following into the Python interpreter today:  >>> def test(): ...     for c in ['a', 'b', 'c', 'd']: yield c ... >>> a = test() >>> a <generator object test at 0x2556a00> >>> a.next() 'a' >>> a.next() 'b'   This was surprising to me. Shouldn't test return (or yield) one of the elements in my list, not a generator which yields them?  A second function which uses "return" behaves as expected:  >>> def test2(): ...     for i in ['a', 'b', 'c', 'd']: return i ... >>> b = test2() >>> b 'a' >>> b 'a'   Why is this so? Where in the documentation describes this behaviour?

What is the use of the yield keyword in Python? What does it do? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist):     if self._leftchild and distance - max_dist < self._median:         yield self._leftchild     if self._rightchild and distance + max_dist >= self._median:         yield self._rightchild    And this is the caller: result, candidates = [], [self] while candidates:     node = candidates.pop()     distance = node._get_dist(obj)     if distance <= max_dist and distance >= min_dist:         result.extend(node._values)     candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result  What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop?   1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: [Module mspace][1].


am using intel(R) celeron(R) CPU N2840 @2.16Hz 2.16Hz  WITH 4.00GB RAM hw can i partiton it and be using it with ubuntu without crashing my system on windows 10

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Why I am not awarded Reversal badge for answering   Question?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I am looking at the sequence $x_{n+1}=r\, x_n(1-x_n)$ where $r=1$. Let's choose $x_1=1/2$ so as to make the sequence convergent to 0. My question is: precisely how quickly does this sequence approach zero?  From my numerical experiments $\lim_{n\to\infty}n\,x_n=1$ seems likely. (That is $\mathrm O(1/n)$ convergence rate.) Do you have more precise result or some mathematical proof?

The question is in the title; I'm looking for the exact decay rate. Naturally, assume the starting point $y_0$ belongs to $(0,1)$.   This is motivated by one of the answers to .


People typically prefer the Lasso or other methods to stepwise regression.  What are the main problems in stepwise regression which makes it unreliable specifically the problems with forward selection , backward elimination and Bidirectional elimination?

I would like to implement an algorithm for automatic model selection.  I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though).   My problem is that I am unable to find a methodology, or an open source implementation (I am woking in java). The methodology I have in mind would be something like:   calculate the correlation matrix of all the factors pick the factors that have a low correlation to each other remove the factors that have a low t-stat add other factors (still based on the low correlation factor found in 2.). reiterate several times until some criterion (e.g AIC) is over a certain threshold or cannot or we can't find a larger value.   I realize there is an R implementation for this (stepAIC), but I find the code quite hard to understand. Also I have not been able to find articles describing the stepwise regression.


If an OP answer is own question, does we do something ?   At first I suggested if we allow moderators to mark that answer as accepted.  Does we let the system automatically show that answer first in the question windows in case other answer are provided by other user, like if it was accepted.  We warn the OP that it can accept its own answer at no drawback after he post the answer to is question. We change nothing.   Some example:           An image to show an example too. As I mean a question answered by the one asking it      NB: As the question will stay, I did that major edit to explain my idea, as with my poor English I'am not sure I explained my question correctly at first.

I think it would be cool if a question would eventually open up to moderators to accept answers on the user's behalf, once a time period has passed. The asking user would get the rep score for the accept.  I know I've seen questions successfully answered with lots of upvotes and no accepted answer that sit there for months unaccepted. This would give superusers a little more functionality and would tie up a lot of loose ends.  What do you think?


I tried to search for this online but couldn't find anything that works  i want that after i press  then class where id = 1 is changed to cls-checked      after pressing vote it goes to php and like is pressed i want to make users already see like without reloading  function vote(vote, val)         {             var params = {"vote": vote, "id": val.id};             $.ajax({                 data:  params,                 url:   'vote.php',                 type:  'post',                 success:  function (response) {                  }             });         }   problem is i always have 2 elements with same id if each element had different id i could use this code  var x = document.getElementById("1"); x.className = "cls-2";

How can I change the class of an HTML element in response to an onclick or any other events using JavaScript?


suppose g is a deterministic function, and X a rv. Then we define Y=g(X) and  $f_Y(y) = f_X(g^{-1}(y))/|g'(g^{-1}(y))|$  But I don't understand at all why the $/|g'(g^{-1}(y))|$ is there. Seems like it would make perfect sense without it.

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


The equation:  def defensefunction(attack, defense, damage):       dmg_def = (damage/attack)*(attack - (defense - (attack * 0.5)))      print(dmg_def)   The code above is written in python and works properly but in C# it's another story:  In C#:  public static double DefenseFunction(int attacker_damage, int attacker_attack, int defender_defense)           double var1 = (attacker_damage/attacker_attack);          double var2 = (attacker_attack- (defender_defense - (attacker_attack * 0.5)));          double dmg_def = var1 * var2;          return dmg_def;   There is a var1 and var2 because I tried to debug the code by splitting the equation.  What I found so far:   The equation in var 2 works properly (the value is equal to what i get on a Hand-Calculator). var 1 could either be working right or not (most of the number should be from 0.1 to 0.9, To.String() rounded the number so just show a 0 on the form). dmg_def gets printed as a 0 (It shouldn't be, for example: 0.8 * 173 != 0).   Things that maybe are relevant:  How the function gets called:  double dmg_from = Actor.DefenseFunction(_attacker.Damage, _attacker.Attack, _defender.Defense);   How i print the number on the form:  rtbMessages.Text += dmg_from.ToString() + Enviroment.NewLine;

How do I divide two integers to get a double?


I accidentally removed Lubuntu in tasksel. How do I recover it through login shell?  My problem is I can't connect to a network to be able to download the Ubuntu desktop.

I tried to remove samba-server with this command (sudo tasksel remove samba-server) and every app even the system apps are deleted and now xubuntu is stuck at boot, just showing loading. What should I do?  Did tasksel deleted my files too?


I'm fairly new to websites, earlier this year I started with a static website just submitting .html files to learn seo well. Eventually, I decided to get into wordpress and start fresh with the same domain.  I removed all my URLs from google search console but forgot to change the robots.txt and the sitemap. So basically the google crawler kept checking for URLs that doesn't exist. This went along for about 2 or 3 weeks till the wordpress site was ready and I found out about it and saw many 404 errors. I marked all as fixed and  -----I changed the robots.txt to this.-----  User-agent: * Disallow:  Sitemap: http://www.exampleDomain.com/post-sitemap.xml Sitemap: http://www.exampleDomain.com/page-sitemap.xml Sitemap: http://www.exampleDomain.com/category-sitemap.xml   -----and my sitemap to this.-----  <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.exampleDomain.com/main-sitemap.xsl"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">     <sitemap>         <loc>http://exampleDomain.com/post-sitemap.xml</loc>         <lastmod>2017-11-24T02:25:35+02:00</lastmod>     </sitemap>     <sitemap>         <loc>http://exampleDomain.com/page-sitemap.xml</loc>         <lastmod>2017-11-22T02:42:54+02:00</lastmod>     </sitemap>     <sitemap>         <loc>http://exampleDomain.com/category-sitemap.xml</loc>         <lastmod>2017-11-24T02:25:35+02:00</lastmod>     </sitemap> </sitemapindex>   I thought it could be the .htaccess but when I took a look at it. It was populated already by W3 Cache plugin. So it can't be that.  Just to note the new sitemap is reading properly as well as the robots.txt on Google console.  There hasn't been any virus attacks plus the domain is mine from the beginning.  This all happened when I removed all URLs and tried to resubmit the fresh website with the same domain. I don't understand why am I not being indexed already? It been about two days.  Could it be that I need to wait a while like at the beginning when I first submitted to Google search? It takes a good few days, if I'm not mistaken or is it something else.

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I am not sure how I countersign after correcting the date I previously wrote in error.   I wrote the date as 7-1-2015 (DAY/MONTH/YEAR) which led to the bank telling me that they can't receive the depositing checks. So I have to correct and now countersign it. Where, which part on check should I countersign? Honestly, I am not also sure how to countersign it. Does it have procedure or do I have to write a countersigning letter?

I think I know the answer to this, but I'm not sure, and it's a good question, so I'll ask:  What is the accepted/proper way to correct a mistake made on a check?  For instance, I imagine that in any given January, some people accidentally date a check in the previous year.  Is there a way to correct such a mistake, or must a check be voided (and wasted)?  Pointers to definitive information (U.S., Canada, and elsewhere) are helpful.


Wanting to validate phone numbers with the following criteria.  -Minimum of 6 digits.  -Can only have the following symbols "+", "(", ")", "-".  -Contain no more than n consecutive symbols, but numbers are OK.  Here are some examples of what i consider valid:  07519767576 +447519767576 (02380) 346450 (+44) 7519767576   I have been trying to do this myself for quite a while but hitting a brick wall. Here is what i have tried so far  ^(?=.{9,}$)(?=[^0-9]*[0-9])(?:([\d\s\+\(\)\-])\1?(?!\1{5}))+?$   This kinda works but its a bit of a hack because it also limits amount of consecutive numbers.  I am not able to do this check in PHP, it has to be done in JS sadly. Is this even possible without needing a degree in regex?

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


Today I got an E-Mail from  about their new site. They claim to get my E-Mail ID from github. Then, I visited the site and found it a copy of stackoverflow.  So my question is: Is this site is a part of stackexchange or who owns it?

Since the source code for this site isn't available for purchase or external use, I'm looking for software that can run a Q&A environment similar to Stack Exchange. Are there any such pieces of software available?


I created a custom lookup field, but when I add the visualforce page (the lookup) to my object page, he stays editable in the details page. I want he stays read only at details page and editable on new/edit object page. I already googled it but cant find anything similiar. Here is how he is now:    Any ideia how I can put this read only (like the date, for example)?

On my opportunity page layout, I want to embed a related record from another object  with VF. Can they edit that VF page within the parent Std page?  So more specifically  Std page = view mode, VF  = edit?  std page = edit mode, VF = edit?


There are six periods in each working day of a school.  Find the number of ways in which $5$ subjects can be arranged if each subject is allotted at least one period and no period remains vacant.    Let $P_1,P_2,....,P_6$ be the periods and $S_1,S_2,....,S_5$ be the subjects. $5$ subjects can be arranged in $5!$ ways.  Out of $S_1,S_2,....,S_5$,one can be chosen in $5$ ways and out of $P_1,P_2,....,P_6$,one can be chosen in $6$ ways,so the remaining can be arranged in $5\times 6=30 $ ways.So total$=30\times 5!=3600$ ways. But my answer is not matching book answer.

There are 6 periods in each working day of a school. In how many ways can one organize 5 subjects such that each subject is allowed at least one period? Is the answer 1800 or 3600 ?  I have asked this question before () in this site itself to understand the right answer - 3600 or 1800? @Ross Millikan has given me a convincing answer and explained idea of overcounting and why 3600 is wrong. Posting it again here to assert the answer is 1800 and not 3600, mainly because almost all websites give 3600 as answer and only one website gives answer as 1800. Listing the websites for reference  (1) Ans is 3600 see() (2) Ans is 3600 see question 15 in () (3) Ans is 3600 - see 8th question in () (4) Ans is 3600 - see example 5 in () These sites as well as almost all reputed sites give the answer as 3600. But answer is 1800 according to   Sorry for asking the question again. Please tell me which is the right answer. 1800 or 3600. Since I am preparing for my exams, I don't want to be in the wrong path and hence clarifying.


I know you can change the uuid if you choose, but if left alone does it remain the same.  Specifically I'm upgrading my motherboard but am unsure if I'll need to alter my fstab with new uuids or if all that information will remain the same.

What scenarios causes a hard drive UUID to change? Are there any manufacturer assigned unique ids for hard drives that is less likely to change?


When a post is in two or most custom categories, how can I specify the parent category name that I want to show up?  An example is the custom post type "tour".  It is in the following categories:   Alaska sailing Alaska Best selling tours   I want only "Alaska" category name to display and not others.

I have a custom taxonomy (hierarchical) for which I'm outputting the results. For example's purpose:  --Drinks  ----Tequila  ------Reposado  ------Blanco  ----Beer & Wine  ------Beer  ------Wine  --------Red  --------White  --------Rose  ----Whisky  ------Lowlands  ------Highlands  ------Islay   I have a loop that goes through and outputs the hierarchy--the problem is that I have ONE term  that goes a level deeper than the rest (the different types of wine: red, white, rose). Currently, my loop outputs  headings for each term, so the loop puts Red, White, Rose at the same level as the rest of the terms. What I need it to do is realize when a term is 3-levels deep, and instead output an  so that I can maintain the correct hierarchy.  All that to say: is there a way to determine a term's depth? if $term_depth = 4, then do this. If $term_depth = 4, then do this?  My loop:  $theCatId = get_term_by( 'slug', $currentslug, 'drink_cats' ); $termID = $theCatId->term_id; $taxonomyName = 'drink_cats'; $termchildren = get_term_children( $termID, $taxonomyName ); $termhier = _get_term_hierarchy($taxonomyName);  if (isset($termhier[$termID])) {                     foreach ($termchildren as $child) {         $term = get_term_by( 'id', $child, $taxonomyName );         $termname = $term->name;         // loop here to get $term depth?         // level 3         echo '
'. $termname . '
';         // level 4
greatgrandchild
         $args = array(             'post_type' => 'menu_drinks',             'orderby' => 'menu_order',             'order' => 'ASC',             'posts_per_page' => -1,             'taxonomy'  => 'drink_cats',             'term'      => $term->slug         );         $drink_query = get_posts( $args );         if ($drink_query) {             echo '
';             foreach( $drink_query as $post ) {                    setup_postdata($post);                  $drinkdesc = get_field('drink_description');                 $drinkprice = get_field('drink_price');                 $drinkphoto = get_field('drink_photo');                 //output specific drink, description, price                 ?>

<?php the_title(); if ($drinkprice) { echo " - $" . $drinkprice; } ?>
                     <?php if ($drinkdesc) { ?>
<?php echo $drinkdesc; ?>
                     <?php }?>
                  <?php }         echo '
';         }     } }  else {      $args = array(         'post_type' => 'menu_drinks',         'orderby' => 'menu_order',         'order' => 'ASC',         'posts_per_page' => -1,         'taxonomy'  => 'drink_cats',             'term' => $currentpage     );      $drink_query = get_posts( $args );     echo '
';         foreach( $drink_query as $post ) :                setup_postdata($post);              $drinkdesc = get_field('drink_description');             $drinkprice = get_field('drink_price');             $drinkphoto = get_field('drink_photo');         ?>

<?php the_title(); if ($drinkprice) { echo " - $" . $drinkprice; } ?>
                             <?php if ($drinkdesc) { ?>
<?php echo $drinkdesc; ?>
             <?php } ?>
          <?php endforeach;      echo '
';        }   Thanks for you time--if anyone is interested, I can send a link to the dev server so you can see how the Beer & Wine page outputs now, if this is unclear.


I have tried fiddling with echo command to to add $_GET to a text file but looks like it does not work but escaping it with \ works may be because $ is special character in bash.   For example, echo "\$_GET" >> newfile.txt works.    What I wanted to ask is how does echo work in each of the following two cases in the given screenshot. The second functionality of echo is what I am not able to grasp.

The question is pretty straight forward. I can get the exit code of the previous command by using $?. But what exactly is it?  I don't think it is a variable, because you can't have any special characters in the name of variable other than _.  foo?foo=10   will result in the error: foo?foo=10: command not found  So if it is not a variable, what is it? Are there others like it?


I am new to Latex and I am trying to write in an Elsevier template, following the instructions though placed on the template does not give me the desired outcome.  I am using a .bib (name of file is george.bib) library with my references which was produced by mendeley (give a BiBtex file), and placed the file in the folder i have the latex components.  %% If you have bibdatabase file and want bibtex to generate the %% bibitems, please use %% \bibliographystyle{elsarticle-harv}  %%  \bibliography{<your bibdatabase>}  \bibliographystyle{elsarticle-harv}  \bibliography{george}  %% else use the following coding to input the bibitems directly in the %% TeX file.  \begin{thebibliography}{00} %% \bibitem[Author(year)]{label} %% Text of bibliographic item  %\bibitem[ ()]{} \bibitem[ ()]{}  \end{thebibliography}   I also did a small test with the \bibitem command and it was giving me the in text citation although I would like to use my .bib saved library instead of having to insert all citation manually. So far when i use \citet{} and the citation's name i get a ? when i compile the document.  How can i insert the .bib and then use the key words with \citet to create citation within text and a bibliography at the end?  thank you

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


I just saw this question:  that had been posted by the same user one hour ago.  I marked as duplicate, but then the OP deleted the original, so now this is what shows off when I click the "close" button:        Without any way to "Retract close vote". Is this the expected behaviour or should my vote to close be reverted?

I voted to close  as a duplicate of  (now deleted, after being closed as off-topic and voted down to -6), so did one other user. The author of both questions deleted the earlier one, and now the later question has gone from two close votes to zero. This makes a certain amount of sense (it's no longer a duplicate), but I can't cast another vote even though my original vote is gone. This is troubling for a few reasons:   The original post was closed as off-topic; I can no longer cast a close vote against the new post as off-topic, even though it's a duplicate of an off-topic question (my close vote is effectively lost) Users can abuse this to swallow a certain number of close votes while spamming the same question into the system (as has just unintentionally happened with the above two questions)   Is this a feature or a bug? Was my close vote supposed to vanish, and afterwards am I supposed to be unable to cast a second close vote for the next-best reason?


I'm on Ubuntu-gnome 15.04 Vivid which includs gnome-shell 3.14  Is there anyway to update shell to 3.16 or 3.18 ?

I am running Ubuntu 15.04. I installed GNOME on top of that. Now I am using GNOME Shell. I heard 3.16 has many improvement. I am thinking about upgrading. My question is that, if I upgrade to GNOME 3.16 will I be able to upgrade to the next version of Ubuntu (15.10) when it arrives?


When we experiment with General Relativity on Earth, a tissue bends according to the experiment due to the placement of a mass, but of course there is a gravitational pull that causes bending. If we did the experiment outside the Earth, the tissue would not bend and the masses would not attract.

I've seen many science popularisation documentaries and read few books (obviously not being scientist myself). I am able to process and understand basic ideas behind most of these. However for general relativity there is this one illustration, which is being used over and over (image from Wikipedia):    I always thought that general relativity gives another way how you can describe gravity. However for this illustration to work, there needs to be another force, pulling the object down (referring to a direction in the attached image). If I put two non-moving objects in the image, what force will pull them together?  So where is my understanding incorrect? Or is general relativity not about explaining gravity and just describes how heavy objects bends spacetime (in that case the analogy is being used not correctly in my opinion)?    UPDATE Thank you for the answers and comments. Namely the XKCD comics is a spot on. I understand that the analogy with bent sheet of fabric pretty bad, but it seems that it can be fixed if you don't bent the fabric, but just distort the drawn grid.   Would you be so kind and answer the second part of the question as well - whether general relativity is explaining gravitational force. To me it seems that it is not (bending of spacetime simply can not affect two non-moving objects). However most of the time it is being presented that it does.


As I say on title, when I move cursor over the vlc media player's bottom bar, my pc freezes ? Do you have any advice ?

2days ago I upgraded my Ubuntu from 17.04 to 17.10, all the process went fine and the upgrade was successful. But after some few hours I played a .mp4 video with vlc players the video plays on full screen for 3 to 4 seconds and freeze the screen, audio keep playing but the video stopped and the keyboard and mouse stops responding, the only way to get out of this is to force shutdown the computer and restart it. Happens every times with Ubuntu 17.10 never experience the problem with 17.04. How to get out of this am a vlc fan.


I have a notebook with an AMD Radeon 530 graphics card. I was trying to install a driver but I none of the drivers (amdgpu or AMD-GPU pro) seemed to support that graphics card. Anyhow on the AMD  it says it has Ubuntu support. Which driver should I install?

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


Marvin the Martian vs. the Death Star: how much energy will they actually need to disintegrate the Earth?  According to ,  will require $1.711 \cdot 10^{32}~\text{J}$ to shatter the Earth into a gravitationally unbound primordial dust cloud.  However, this energy is over 30% lower than the gravitational binding energy derived from the average density model .  Which seems irrational:  if the Earth were in a lower energy state at a uniform density distribution, how did its density gradient evolve in the first place – wouldn’t it be evolving to a homogenous density distribution in that case?  Curtis Sexton and  seem to agree with my reasoning on this point:   the ’s beam weapon output would have to exceed $2.4 \cdot 10^{32}~\text{J}$ to impart escape speed to all of the matter comprising an Earth-like planet.  They can’t both be right, so who wins?  My money’s on the Death Star, but I haven’t found the mistake in Dave’s calculations for Marvin yet.  Does anyone here have the analytical chops to see where he went wrong, or alternatively, where I’ve spaced out?  Here's Dave's mathematical estimate for Marvin:  First he offers an equation for compiling the layers of various densities from the  into a sum of     where $r$ is the radial distance from the Earth’s center and     the various constants are noted below:  $i$. Layer; Height $h_i$ (m); $a_i$ ($kg \cdot m^{-5}$); $b_i$ ($kg \cdot m^{-4}$); $c_i$ ($kg \cdot m^{-3}$)  1  Inner core; 1.2215×10$^{6}$; -2.1773×10$^{-10}$     1.9110×10$^{-8}$ 1.3088×10$^{4}$  2  Outer core; 3.4800×10$^{6}$; -2.4123×10$^{-10}$;    1.3976×10$^{-4}$;  1.2346×10$^{4}$  3  D'' layer; 3.6300×10$^{6}$; 0.00; -5.0007×10$^{-4}$; 7.3067×10$^{3}$  4  Lower Mantle; 5.7010×10$^{6}$; -3.0922×10$^{-11}$; -2.4441×10$^{-4}$; 6.7823×10$^{3}$  5  Inner transition zone 1; 5.7710×10$^{6}$; 0.00; -2.3286×10$^{-4}$; 5.3197×10$^{3}$  6  Inner transition zone 2; 5.9710×10$^{6}$; 0.00; -1.2603×10$^{-3}$; 1.1249×10$^{4}$  7  Outer transition zone; 6.1510×10$^{6}$; 0.00; -5.9706×10$^{-4}$; 7.1083×10$^{3}$  8  Low velocity zone & lid; 6.3466×10$^{6}$; 0.00; 1.0869×10$^{-4}$; 2.6910×10$^{3}$  9  Inner crust; 6.3560×10$^{6}$; 0.00; 0.00; 2.9000×10$^{3}$  10  Outer crust; 6.3680×10$^{6}$; 0.00; 0.00; 2.6000×10$^{3}$  11  Ocean; 6.3710×10$^{6}$; 0.00; 0.00; 1.0200×10$^{3}$  Using the real density distributions for each shell layer:    And calculating for each point $h$ at any given radial distance from the outside in, with the inner and upper bounds $h_1$ and $h_2$ respectively, gives:    So for each $i^{th}$ layer:   And for each point at a radial distance of $r$ we have:   where $ΔU_0$ = 0 and the indexed constants for each piece of the function are described in the table above.  This yields:  -1.711×10$^{32}~\text{J}$  Many thanks to anyone who can explain how this came out wrong!


I have set up the domain contoso.com. The domain controllers in the domain are also the DNS servers within the network.  When users try to resolve contoso.com, they receive the A/AAAA records of the domain controllers. However, we want contoso.com to resolve to a different address (the web server of the company).  We added the A/AAAA records for the web server to the domain root, but noticed that there were additional A/AAAA records, pointing to the domain controllers. We removed those, but they are being re-created.  How do I prevent this from happening? I did not notice any degraded performance or other issues while the records were not present.

Currently we have an Active Directory setup, and say the name is 'example.com'. The DNS entries for example.com has two A records pointing to the two domain controllers. I would like internal users to be able to access our website by using    but, we don't run the site off the domain controllers and I don't want to install IIS or some other service just todo a redirect to www.example.com.  If I understand correctly, I should be able to delete those entries, and add a new A record pointing to the IP of the web server and things will not break, as clients typically use the SRV records to locate domain controllers and whatnot.  Is this correct? I don't want to cause an outage is the reason I'm asking before just changing it. :)


If I do a search example.com/?s=london with no wp_query I get results and I can change pages. But if I add a wp_query and do the same search example.com/?s=london if I click to page 2 example.com/page/2/?s=london  I get a 404. Also with a wp_query added if I do a blank search and change pages example.com/page/2/?s= i dont get 404. Its seems that the searched word is doing it but I'm not sure why. Ive tried changing my permalinks so they update but still get the same. This is the wp_query I'm using so you can see.      <?php       $args_a = array(         'post_type'  => 'post',         'meta_query' => array(             array(                 'key'     => 'CurrentLocation',                 'value'   => $searchm,                 'compare' => '=',             ),             array(                 'key' => 'AreaLookingFor',                 'value'   => $areaihave,                 'type'    => '',                 'compare' => '=',                     ),                        ),     'paged' => get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1,     );      $query_a = new WP_Query( $args_a ); ?>      <?php if ( $query_a->have_posts() ) : ?>          <?php while ( $query_a->have_posts() ) : $query_a->the_post();      get_template_part( 'template-parts/post/content', 'excerpt' );            endwhile; ?>       next_posts_link( 'Next', $query_a->max_num_pages );      previous_posts_link( 'Previous' ); ?>          <?php wp_reset_postdata(); ?>      <?php else : ?>
<?php _e( 'No homes matched your criteria' ); ?>
     <?php endif; ?>

I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination?  Addendum  I have modified the main loop query via . Why isn't pagination working, and how do I fix it?


I'm calculating Pearson's r for a set of dichotomous values.   For one item in my data set, all values are identical. Since the variance in y will be 0, I will ultimately end up with a division by 0.  I guess I have two questions:   Is it fair to say that the correlation coefficient is 0, or is it more valid to say that it cannot be calculated for this item? Is manually checking for 0 variance and treating this as an exception the accepted best practice, or can the formula be modified to cater to this scenario?

I am having a problem computing the pearson correlation coefficient of data sets with possibly zero standard deviation (i.e. all data has the same value).  Suppose that I have the following two data sets:  float x[] = {2, 2, 2, 3, 2}; float y[] = {2, 2, 2, 2, 2};   The correlation coefficient "r", would be computed using the following equation:  float r = covariance(x, y) / (std_dev(x) * std_dev(y));   However, because all data in data set "y" has the same value, the standard deviation std_dev(y) would be zero and "r" would be undefined.  Is there any solution for this problem? Or should I use other methods to measure data relationship in this case?


I have Dual Boot. I am currently running out of space on my Windows partition (/dev/nvme0n1p3). However, there is plenty of space on my Ubuntu partition  (/dev/nvme0n1p6). Therefore, I would like to move 70 GB from Ubuntu to Windows.  How can I do this, in order to safely transfer free space to Windows? I already have Ubuntu on my USB, and I know that I should use GParted from it. But I do not know how to deal with GParted, moving to right/left the spaces and so on. I don't want to mesh it up. Thanks!

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


When you greet someone new for the first time, you can say:     Hello John, it's nice to meet you!   But what if you cannot greet somebody in person, when the first contact happens? For example, some other person introduces you via email and then you respond via email and want to say that you are pleased getting to know him. A formal greeting is required in this case. Is something like the following appropriate or are there better ways for saying that?     Dear John, I am pleased getting to know you!   Is this appropriate English anyway?    My question is different to , because I specifically ask whether a given sentence is ok. Additionally, the referenced question discusses more the case when saying goodbye, so when the conversation is finished, where there might have been time getting to know each other.

When one makes a new acquaintance with somebody in person, you may say “it was nice to meet you”, e.g. when you leave. What if you make a new acquaintance over the internet, what do you say when you finish the conversation, business transaction, etc.? You didn’t actually meet the person, you only exchanged some emails. One could say “it was nice to talk/do business/etc. with you” but that doesn’t confer the fact you made a new acquaintance and it was enjoyable experience for you. Does the word meet really work in this case or is something else better?


I need to set up two servers with failover capability (Active - Passive model) sharing a common DB (Postgres)running over NAS. Could you please suggest me some workaround for the same ?

Description of shared storage in Postgres:   Related question:   Both of these make it clear that it's not safe to have one write instance and many readers.  What about if all instances are read-only?


Is the concept of a field just a mathematical construct? Is there any way to realize its existence? For instance, the fact that moving a charge affects other charges in the surrounding not instantaneously is explained in terms of the existence of an electric field. Is there no other approach to this problem?

I'm following my first course in field theory and the professor began, like many books do, by introducing the scalar field. However, I am a bit hesitant about the physical idea of fields. My question is: what is the physical meaning of the fields? Why they are introduced? I read the introduction of the books of Peskin and Weinberg but I'm not satisfied.


When I run apt-get update it gives following output:  root@V211:~# apt-get update Ign:1 http://archive.ubuntu.com/ubuntu artful InRelease Ign:2 http://archive.ubuntu.com/ubuntu artful-updates InRelease Ign:3 http://archive.ubuntu.com/ubuntu artful-security InRelease Err:4 http://archive.ubuntu.com/ubuntu artful Release 404  Not Found [IP: 91.189.88.31 80] Err:5 http://archive.ubuntu.com/ubuntu artful-updates Release 404  Not Found [IP: 91.189.88.31 80] Err:6 http://archive.ubuntu.com/ubuntu artful-security Release 404  Not Found [IP: 91.189.88.31 80] Reading package lists... Done E: The repository 'http://archive.ubuntu.com/ubuntu artful Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu artful-updates Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu artful-security Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   /etc/apt/sources.list contains following lines:  deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse   Please let me know how to fix this issue.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I'm using python's pxssh, which inherits from pexpect and specializes in ssh. my program writes commands to  a linux shell , and prints the output to a file.  Once in a while, I get a weird print: "TERM environment variable not set."  How can I cancel it, or what does it mean?  I'll attach code if needed.

I have a script which uses pexpect to start a CLI program. It works a bit like a shell where you get a prompt where you can enter some commands.  The problem I have, I think, is that this program uses a coloured prompt.  This is what I do   import pprint import pexpect  1 a = pexpect.spawn('program') 2 a.expect("prompt>") 3 print "---------start------------" 4 print(a.before) 5 a.sendline("command") 6 a.expect("prompt>") 7 print "---------before------------" 8 pprint.pprint(a.before) 9 print "---------after------------" 10 pprint.pprint(a.after)   This is the output:  > python borken.py ---------start------------ A lot of text here from the enjoying programs start-up, lorem ipsum ...   ---------before------------ ' \x1b[0m\x1b[8D\x1b[K\x1b[1m\x1b[34m' ---------after------------ 'prompt>'   For some reason the first prompt colour coding borkens up things and a.before at line 8 is garbled, normal print does not work,  even if I see that the command at line 5 actually produced a lot of output.  Does someone know what the problem could be, or is it possible to set the terminal type in pexpect to avoid the colours?  I am using tcsh shell


Question:    Does any of that mean anything to you? I ask this because without knowing why the reputation was gained or lost, it's mostly useless to me. Because when I click the link that is the question, I get taken to the question, but there's no information on that question as to what may have changed (obviously)   Now, I know all I have to do is run to ?tab=reputation to see the detailed breakdown, but I'm curious as to the reason why the one word breakdown can't exist here.   I had to remind myself that the -50 was a Bounty that got collected, and that my latest +5 was due to an upvote on an older question. Accept, Upvote, Bounty, I just wonder if we can't have that status in the Achievements drop down as well.  I may be crazy though

The achievements drop-down menu in the new top bar shows me when a question/answer earns me reputation and how much, and that's great, but I don't know what caused that to happen. I'd like to know why I received reputation: was it an upvote? An accepted answer? An accepted edit? If I have the list of reputation values in my head I can figure it out, but it would help me to see it somewhere in the drop-down, even as title text on hover.    Edit:  It sounds like the items in the menu can roll up multiple events, and that's why it doesn't show the event there. How about adding a link to my reputation tab to the menu so I can quickly get to a breakdown?


I am running a new site with Drupal 7.  I want the node ID to start with 100,000.   How do I set it? I don't want the node start with node 1.

I generated tons of dummy content for testing, and then deleted them all.  As nid is auto-increment, newly created node will have a nid of last created nid +1.  How can I make nid start from 1 again?


I want to show that if $f:\mathbb R\longrightarrow \mathbb R$ is $\alpha -$Holder continuous for $\alpha >1$, then $f$ is constant.   This is my proof:  Let $\alpha =1+\varepsilon$. Then, there is a $C$ s.t. $$|f(x)-f(y)|\leq C|x-y||x-y|^\varepsilon\implies \left|\frac{f(x)-f(y)}{x-y}\right|\leq C|x-y|^\varepsilon.$$  I want to says that it implies that $$|f'(y)|=\lim_{x\to y}\left|\frac{f(x)-f(y)}{x-y}\right|=0,$$ but since $f$ is not supposed differentiable, I'm not sure if I can.

I want to show that if a function $f:[a,b]\rightarrow \mathbb R$ satisfies a Hölder condition of order $\alpha > 1 $ then it is constant.  The way I think of it is as follows:  $$|f(x) - f(y)| < K|x-y|^\alpha$$  $$\frac{|f(x) - f(y)|} {|x-y]}  < K|x-y|^{\alpha -1}$$  $$\lim_{y\rightarrow x} \frac{|f(x) - f(y)|} {|x-y]} \le \lim_{y\rightarrow x}  K|x-y|^{\alpha -1} =0 $$ As the limit is $0$, we can remove the modulus, so we get:  $$\lim_{y\rightarrow x} \frac{f(x) - f(y)} {x-y} = 0$$ So $f$ is derivable and $f'(x) = 0$ for all $x$ in $[a,b]$. Note that the reason we can add the limit $y\rightarrow x$ is because $[a,b]$ is closed in $\mathbb R$.  However, the question gives as a hint using the mean value theorem. I am not sure why one should do that. You would first have to prove that $f$ is derivable in a similar manner to what I did, and then prove that $f$ is constant. Or is there a simpler way to do it and I am missing it?  Also please inform me of any mistakes I did in the proof (if any)/ Thank you!


I'm still a bit new to blender and I've just finished my very first Spaceship model. Once I finished my model, I started SELECTING CERTAIN FACES and assigning them to a CERTAIN MATERIALS that I created in blender. Now since I like the final look of my Materials added to certain faces of the model, how do I save them? I want to be able to save them as a texture (if possible), so when I send this model to someone or sell it, it'll have the diffuse, and AO textures with it. Also when I save these materials to be a texture, will they go to those assigned faces that I selected before?   Thanks

I created a interior scene and  i don't know how to bake a texture using cycles bake.


I have a table called user  I have some SQL that is select User.* from User  This fails because User is a reserved word however, I was under the impression that Postgresql didn't care about the case of the tables when executing the SQL so I assume there is a conflict because of the reserved word.  In the database the user table is lowercase so if I run this  select * from user  I get a result, although bizarrely I only get one column returned even though I said show all columns.  If I run select * from "user" I get all columns and also SELECT "user".* FROM "user" returns all columns.  Can someone explain what's going on please?  Thanks  (Using PostgreSQL 9.3)

I have a heroku postgres add-on database with a user table. However, when I attempt to select * from user, all I get is:    current_user   ----------------  rtsjlhdfptlaqd (1 row)   The table name is definitely user. There is no users table. There are definitely a bunch of users in my app, but I can't seem to list them.   Thoughts?


I have two S1200V3RPS motherboards, each having two Gigabyte Ethernet controller. One connector in each motherboard is used to connect directly to internet. Now, I want to use second controller in each motherboard to connect with each other. What special kind of crossover cable do I need?  From the manual of my motherboard (), I have Ethernet Controller I120. Now as per the manual of I120(), it does appear that it is new Ethernet controller which support automatic crossover which supports straight LAN wire to connect between two PCs. But what confuses me is the following article on Windows Help :    It mentions in the note :  For Gigabit Ethernet or token ring networks, you will need a slightly different kind of crossover cable. For more information, contact a cable manufacturer.   Since I have Gigabit Ethernet controller, what slightly different kind of crossover cable do I need?

I am using a crossover cable to connect two computers. Despite having Gigabit LAN, they only provide me with 100 Mbps networking.  My question is whether is it possible to get 1000 Mbps networking using a crossover cable? If so, how?


If I go at my users page at   the links to my userpages in each account are missing the https  please add the protocol to those links

So it looks like Stack Exchange now supports HTTPS (to some extent). Which is awesome! But there are a few problems, the main one being that some content is delivered over the CDN, which is plain HTTP. This causes browsers to complain about "unsecured content":


I originally tried to update the issue that is , which I'm also having. Unfortunately that edit got rejected, so I guess I have to write my own question.  When I try to log in to Stack Overflow on my newly installed Windows 8 machine, nothing happens. I can click on the OpenID provider buttons, but the page is not redirected. In the background, a JavaScript exception occurs.  The issue is being caused because a JavaScript tries to access window.localStorage, but this raises an exception:     openid-jquery.js, line 9 character 73   SCRIPT5: Access is denied.   Most likely, an exception when trying to access this property should be treated as if local storage is not supported by the browser at all.  What is causing the access to be denied, seems to be the Protected Mode option in the browser options. This is enabled by default on my system:    If this doesn't give a sufficient repro case, the problem might be reproduced , however this is not what is happening on my system. Process Monitor does not show any failing file access, and Enhanced Protected Mode is not enabled.  Obviously, I do not run my browser as Administrator by default (nor do I want to), but doing so would allow the login, regardless of this checkbox.  I also have another Windows 8 machine at home, for which it works out of the box. On my work Win8 Enterprise machine (on which I did not enable compatibility view), it does not.

Which browsers are officially supported by Stack Exchange?  Also, what else is needed in order to use every feature of the site?


Hello I could help several days ago I am trying to make this code work. I am trying to remove from an html the <video> tag that is inside a <nonscript>.  Example  <noscript>         <video style="width:100%; height:100%;"                controls="controls"                autobuffer="autobuffer"                class="player-html5"                preload="metadata"                poster="15.jpg">             <source src="hello.mp4" type="video/mp4">         </video>     </noscript>   The code that I have is like this but does not return anything.  function vide($source){      preg_match("'<noscript>(.*?)</noscript>'", $source, $match);     if($match){          return $match[1];     } }   Could you use the the dom document?  I just need everything found in the html video tag.  Sorry for my bad english and thanks

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


Sorry for the inspecific subject - it is hard to boil down to one line. I have several Linux servers, running Ubuntu. svrA: rgs-pa-bastion-1 root = cat /etc/*release* DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS" ... rgs-pa-bastion-1 root = bash --version GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> ... rgs-pa-bastion-1 root = sudo -V Sudo version 1.8.31 Configure options: --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking -v --with-all-insults --with-pam --with-fqdn --with-logging=syslog --with-logfac=authpriv --with-env-editor --with-editor=/usr/bin/editor --with-exampledir=/usr/share/doc/sudo/examples --with-timeout=15 --with-password-timeout=0 --with-passprompt=[sudo] password for %p:  --without-lecture --with-tty-tickets --disable-root-mailer --enable-admin-flag --with-sendmail=/usr/sbin/sendmail --with-rundir=/run/sudo --libexecdir=/usr/lib --with-sssd --with-sssd-lib=/usr/lib/x86_64-linux-gnu --with-selinux --with-linux-audit --enable-tmpfiles.d=yes Sudoers policy plugin version 1.8.31 Sudoers file grammar version 46 ...  svrB: rgs-pa-db-2 root = cat /etc/*release* DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS" ... rgs-pa-db-2 root = bash --version GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> ... rgs-pa-db-2 root = sudo -V Sudo version 1.8.21p2 Configure options: --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking -v --with-all-insults --with-pam --with-fqdn --with-logging=syslog --with-logfac=authpriv --with-env-editor --with-editor=/usr/bin/editor --with-exampledir=/usr/share/doc/sudo/examples --with-timeout=15 --with-password-timeout=0 --with-passprompt=[sudo] password for %p:  --without-lecture --with-tty-tickets --disable-root-mailer --enable-admin-flag --with-sendmail=/usr/sbin/sendmail --with-rundir=/run/sudo --libexecdir=/usr/lib/sudo --with-sssd --with-sssd-lib=/usr/lib/x86_64-linux-gnu --with-selinux --with-linux-audit --enable-tmpfiles.d=yes Sudoers policy plugin version 1.8.21p2 Sudoers file grammar version 46 ...  On all my servers I have defined a bash function, which I've called , (comma) because it seemed cool at the time: rgs-pa-db-2 root = typeset -f , , () {     sudo bash --init-file ~/.bashrc }  On svrA (and every else except svrB), I end up in the home-directory of root: rgs-pa-bastion-1 jan.andersen = , [sudo] password for jan.andersen: rgs-pa-bastion-1 root = pwd /root  However, on svrB: rgs-pa-db-2 jan.andersen = , [sudo] password for jan.andersen: rgs-pa-db-2 root = pwd /home/jan.andersen  Can anybody figure out what is going on here?

I have a bash script myhome.sh containing only one line:  echo $HOME   The script's owner is a user:  $ ls -l myhome.sh -rw-rw-r-- 1 user user <date> <time> myhome.sh   In Ubuntu 16.04 and 17.10 I get:  $ echo $HOME /home/user  $ sudo echo $HOME /home/user  $ bash myhome.sh /home/user  $ sudo bash myhome.sh /home/user   In Debian Buster/Testing I get:  $ echo $HOME /home/user  $ sudo echo $HOME /home/user  $ bash myhome.sh /home/user  # WHY ? $ sudo bash myhome.sh /root   I don't understand why inside the script in Debian, if it's executed with sudo, I always get $HOME=/root while in Ubuntu I get $HOME=/home/user. Does anyone know what have the Ubuntu developers changed?


I have a domain and I want that if one mx record fails then 2nd mx should takeover for sending and receiving mails.

Is it possible to have multiple MX records pointing to multiple mail servers for a single domain? Must all mail accounts be identical on each of those servers, or is it possible to have email1@mydomain.com set up only on one mail server, and email2@mydomain.com set up only on the other mail server?  The reason for this is the need to use two different email service providers but still keep everything at a common domain.  My understanding of MX record functionality tells me this scenario won't work, that each server will respond with "mailbox not found" errors for the accounts not on that particular server. Help?


I have my chocolate chip cookie recipe which uses a 1 to 1 sugar to flour ratio. The texture is chewy because I under-cook them on purpose. When cooked golden brown they are snappy like the supermarket chocolate chip cookies. (like pepperidge farm)  I'm trying to reduce the sugar in this recipe for taste and health reason. (I know that chocolate chip cookies are not celery and carrots :D )  I reduced the sugar to reach a ratio of 75% sugar to flour ratio. The cookies need more cooking time, and come out bready/cakey.  Here is the final low-sugar recipe for reference (my original recipe is based on the one on the back of the Tollhouse chocolate chip packages):   250g butter 110g granulated sugar 100g brown sugar 1 pack vanilla sugar 2 eggs 1 pack of baking soda 1 pinch of salt 270g flour 300g chocolate chips Bake 12 minutes at 190°C   My understanding is that the sugar contributes to some kind of caramelization of the cookie, making it chewy/snappy.  Is there a way to substitute the sugar? Change the ingredients ratio so that we still have a not-too-sweet and not-too-unhealthy cookie?

I just baked a batch of chocolate chip cookies (). I felt like they were just a tad bit on the sweet side, so wanted to know if there would be any negative consequences from reducing the sugar? (like 1/2-3/4 of the sugar in the recipe) Would the cookie not bake as desired or something like that?


I left milk out in a jug, bought brand new, for twelve hours.  Is it still safe to drink?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


Here are two definitions of a primary ideal.   An ideal $I\subset A$ is primary if $I\ne A$ and $xy\in I\implies$ either $x\in I$ or $y^n\in I$ for some $n> 0$. An ideal $I\subset A$ is primary if $Ass(A/I)$ consists of a single element.   Are they equivalent?  $2.\implies1.$ Suppose $Ass(A/I)$ consists of a single element $P$. If $I=A$, then I believe $Ass(A/I)=Ass(\{0\})$. The zero ring has no prime ideals, so there are no associated primes of the element $0$ in the zero ring. This contradiction shows that $I\ne A$. But I don't know how to deduce the other condition.  I don't have ideas for the other implication either.

For an $R$-module $M$ I have the following definition for a submodule $N\subset M$ to be $\mathfrak{p}$-primary: this is the case when $\text{Ass}(M/N) = \{\mathfrak{p}\}$, that is, $M/N$ is coprimary or $(0)$ is a primary submodule.  Now for an ideal $\mathfrak{q} \subset R$ this definition gives that $\mathfrak{q}$ is $\mathfrak{p}$-primary iff $\text{Ass}(R/\mathfrak{q}) = \{\mathfrak{p}\}$. It can be shown that this is equivalent with $\mathfrak{p}^n \subset \mathfrak{q}$ for some $n\in \mathbb{N}$ and the condition \begin{align*} \forall r,s \in R: rs \in \mathfrak{q}, r\not\in \mathfrak{p}\Rightarrow s \in \mathfrak{q}. \end{align*}     Now I suspect that if $R$ is Noetherian, and if $\mathfrak{q}$ is $\mathfrak{p}$-primary, then we have $\sqrt{\mathfrak{q}} = \mathfrak{p}$. I have shown this for PID's, but does this generaly hold?    And if so, is every ideal $\mathfrak{q}\subset R$ then $\sqrt{\mathfrak{q}}$-primary?   Many thanks.


I have a VPS LAMP server using Ubuntu with linode.com.  I'm using postfix as the MTA to do mailout.  All my emails, when sent to Yahoo, are flagged as spam.  I want to implement reverse dns to see if it will resolve this issue.   Can someone recommend me a guide for this purpose?

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


It may be something that will happen to the person who is having the feeling but it may also be to several persons, as might occur with a highly destructive earthquake, for instance.   The word or phrase would be used in the following sentence:      “I’m no spiritualist but I have a feeling of ___. I hope it’s just a feeling."   EDIT - The phrase I'm looking for conveys a much stronger feeling than "I have a bad hunch". It is about something catastrophic which the person feels is "going to happen in a few minutes".

I'm looking for ways to say "I'm having a bad hunch", or more like a bad feeling about something upcoming. The gut-wrenching feeling that something bad will happen.


I am posting a question that a friend of mine has asked.  My friend wrongly assumes that SARS-CoV-2 virus can be transmitted through blood, although there is no such evidence.  However, his question remains a valid one.       With so much news about COVID-19 all around us, I have been doing some        study on viruses.  I do understand that viruses are not really living        creatures.  They just have some genetic information, which they can        pass on to the host cell, causing the virus to proliferate, and in some        cases interfere with the normal functioning of the cell.  Outside of a        host cell they are completely inert.  In fact they show all the traits        of a non-living entity.  I get that.       My question is based on the following scenario.  Imagine there are two        doors, next to each other.  Let’s call them A and B.  There is a door        knob on each.  A COVID-19 patient sneezes near the doors, and some SARS-       CoV-2 viruses land on each door knob (i.e. door A and door B).       Unfortunately within a few hours someone with a cut finger touches the        knob of door A and gets infected.  So far no dispute.       Fast forward 5 years.  In the meantime the knob on door B never got        cleaned/wiped.  In other words, the inert viruses are still on the door        knob.  Again someone with a cut finger touches the knob of door B but        in this case the person does not get infected.  Why?       Obviously something happened to the virus during these 5 years that        caused it to lose the ability to pass on its genetic information to the        host cell and replicate.  What exactly happened?     Addendum:   We received a response for the query that seemed reasonable to us but was voted down, and presumably deleted by the author.  Fortunately I was able to recover a screen capture.  To keep the discussion going, I would like to temporarily include the response here till a better response is posted.  Here it goes:     This isn't very professional, but there are the basics. Viruses are obligate parasites, which means they can't live outside a host (in this case, a cell) for long. Viruses get damaged as everything else, the damage taking many forms, such as hydrolysis, photolysis, free radical damage, reaction with other molecules (like detergent), conformation changes, dehydration, maillard reactions, and changes induced by heat of labile molecules (like decomposition). All types of damaging processes happen at an increased reaction rate with increasing light and heat. Viruses have rudimentary repair mechanisms if any, so it's a matter of time before they become inactivated. A damaged virus entering the body wouldn't be able to do much harm if any, as their genetic information would be damaged beyond repair, and so, not able to be replicated to make more viruses. Their proteins and genetic bits would still trigger an immune reaction and immunize against intact and not very damaged viruses (which is why damaged viruses are used in vaccines). Those damaged viruses that remained outside just become microbe food.

I'm not a biology student at all, but I'm trying to get a clearer picture on what is meant by "virus cannot survive after a certain period".  To my understanding, a virus cannot be killed it can only be inactivated (for example, by means of heat and lowered pH).   So I really don't understand how can virus get inactivated by just being on a certain surface for an extended period.  I've come across numerous articles which told me virus won't survive on a surface. They usually focus on comparing the survival time between different types of surfaces but never touch on how the virus gets inactivated.  Can someone help me understand the "how"?


Hi there, I am a complete Blender noob and still don't quite understand how the clipping start and end points work. More specifically, I don't know what, say this Shift X value 0.01m, implies. Is the camera moving 0.01m away from its origin in the +x direction? It seems part of my purple sphere is getting clipped off when I rotated the view to the front. From the side though, I can see the whole object. Would appreciate any feedback. Thanks!  @ETHAN DAY, thanks for the response! I  tested out what you said and found that was my camera was a dot relative to all my other objects. How is it then that the camera could have captured all the objects from its perspective? Does the render mode show the view from the camera's perspective or the view it's locked to? Thanks again!

Zooming in to inspect texture details in 3D view clips some closer faces like shown in the image. It's not the camera view so changing camera settings doesn't help.   Where can the distance to the clipping plane be adjusted?


I am attempting to set the default value of a datetime field to NOW() in MySQL but the MySQL error says it is invalid?   /* create the invoice table */ CREATE TABLE IF NOT EXISTS INVOICE (     LINE_ID INT(9) NOT NULL AUTO_INCREMENT,     INVOICE_ID INT(9) NOT NULL,     QUANTITY INT(9) NOT NULL DEFAULT '1',     INVOICE_DATE DATETIME NOT NULL DEFAULT NOW(),     TO_DELIVER BOOLEAN NOT NULL DEFAULT 0,     CUSTOMER_ID INT(9) NOT NULL,     PRODUCT_ID INT(9) NOT NULL,     PRIMARY KEY (LINE_ID, INVOICE_ID)  );   What is the correct way to set a default value for a datetime field?

How do you set a default value for a MySQL Datetime column?  In SQL Server it's getdate(). What is the equivalant for MySQL? I'm using MySQL 5.x if that is a factor.


I am working on the "Jakarta Bay", Indonesia. I have a shapefile for the Indonesian coastline and I clipped my region of interest using an appropriate polygon. I also have points that are located within the bay.  When I want to represent both layers together, I realize it is not possible because they have different coordinates format (see images). I don't understand it as I chose manually to set the SCR to EPSG:4326 (OTF). The project SCR is the same.  If I make a zoom to layer I can see each layers individually, but it looks like they are not in the same location.  Looking to the coordinates show different results (see images).      I would like to have coordinates as for the points for both layers (East, North) because I can show them in the OpenLayers plugin.  I have the feeling my scale is a bit strange for the coastline layer...

How do I change the projection of my shapefile using QGIS? The default projection is set to EPSG:3003, I want to change it to WGS84 EPSG:32632. When I do a reprojection or I change projection in the properties mask I don't have the correct result. On the left, I have the plan coordinates but they are not correct for the EPSG shown on the right:


Normal   In game engine  What is wrong and how can I fix this ?

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


When I burned Ubuntu to a disc and tried it without installing it prompts me for a username and password when I didn't make one for Ubuntu. Do I keep them blank or do I use my Windows username and password?

When I boot Ubuntu 10.04.3 from a live CD, it asks me to enter a username and password. I have not booted before, and I haven't created an account.


How do you add a user in ubuntu using the terminal

I need a command to list all users as well as commands to add, delete and modify users from terminal - any commands that could help in administrating user accounts easily by terminal.


My favorite language is C++ and I feel most comfortable to stick to it.  I made a game in C++ primarily using the console output as a graphical interface: somewhat like that of dwarf fortress.   However I wish to connect my game to either Unity or Unreal so that I can take advantage of their graphic rendering.  Is it possible? Running a game on other program while separately running an application on Unreal or Unity for rendering purpose? Or should I just make a game from ground up on Unreal or Unity?

The title kind of says it all. Is it possible to replace C# with C++ on a game using Unity?


I'm studing a bit of probability and I  have a simple question about biased coins.    Is it possible, with an adequate numebr of tosses, to say that a coin is biased witha given probability?  In other words: how many toss are needed to say that the probability that a  coin is unbiased is less that a given value?    I think that my question is different from   because I have only one coin and I don't know what is the probability of a face of my biased coin. I can suppose that the answer to my question is linked to this probability, but how?

If coin $X$ and coin $Y$ are biased, and have the probability of turning up heads at $p$ and $q$ respectively, then given one of these coins at random, how many times must coin A be flipped in order to identify whether we're dealing with coin $X$ or $Y$? We assume a 0.5 chance that we can get either coin.


Problem. Show that $$\sum_{n=1}^\infty\frac{n}{3\cdot5\cdot\cdots\cdot(2n+1)}={1\over2}$$   The given series can be re-expressed as: $$\sum_{n=1}^\infty\frac{n}{3\cdot5\cdot\cdots\cdot(2n+1)}=\sum_{n=1}^\infty\frac{2^nn!n}{(2n+1)!}$$  I first attempted with binomial series but it was difficult to change the form of binomial. Could you please give me some ideas? Thanks.

$$\sum_{n=1}^{\infty} \frac{n}{3\cdot 5\cdot 7 \dots (2n+1)}$$  Can someone please help me in solving this problem, I tried to take the summation of the numerator and denominator individually but my teacher said that it is wrong to do the summation individually, can somebody please explain why is it wrong to take individual summation and please recommend the correct way of solving this problem


I found the following equality. But I forgot the source as well as the solution.  If you give the proof, I appreciate it.  $$\sum_{k=1}^\infty \frac{1}{k^2}\left( 1 + \frac12 + \dots + \frac1k \right)^2 = \frac{17\pi^4}{360} = \frac{17}{4} \sum_{k=1}^\infty \frac{1}{k^4}$$

How can I find a closed form for the following sum? $$\sum_{n=1}^{\infty}\left(\frac{H_n}{n}\right)^2$$ ($H_n=\sum_{k=1}^n\frac{1}{k}$).


Is there a function in QGIS similar to the '' in MapInfo that allows me to save a project and all the applicable layers together in a folder. I need to send a QGIS project to a client and I'm wondering if there's an automated way of gathering all the necessary files together.

In my project, I use a lot of geodata from different directories. Now I want to give the QGIS project to a colleague (eg on a CD).  Is it possible to copy the shapes from different directories automatically to one directory?


I am providing users with a textarea into which to input descriptions of their products. I am also allowing people to comment on the products like on Facebook.  Sometimes these posts include a URL to further information and I would like to be able to detect that part of the text as a URL and wrap it in an anchor <a> element once it is published to the page.  The text is being submitted by a form and goes to the server as plain text. I use a REReplace() regex replace function on the server-side to convert carriage returns into <br> tags so that it looks correct on the page.  However I don't know how to parse out the URL parts and wrap them in an anchor tag. Should it be done on the server-side or should I use jQuery on the client-side to wrap URLs on the fly? If I do it on the fly and there's hundreds of comments on the page with URLs - wouldn't this affect the page's performance?  If its on the server-side whats the best way to do it? I have jSoup on the server but couldn't work this one out because no HTML gets submitted from the textarea - only plain text e.g.     This new TV features 4K HDR technology. Read more at    UPDATE: This is not a duplicate question of others. I am not asking how to convert plain links on a webpage into working ones (I can use linkify for that).   I am asking how to linkify on the server-side using jSoup or something similar. The textarea does not pass any HTML code to the server and neither can I wrap the text in anchor element because its a textarea and the inserted text doesn't appear in the DOM from what I can tell using Firebug.

I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;     return text.replace(exp,"$1");  }


I'm on the process of building my eshop platform and encountered a SEO issue.  My next step is to develop a searching box, where user searches the products of a specific category (say, desktops). This box will contain characteristics of the category desktops, for example, it will contain RAM and CPU for sure. Notice that in my searching box one will be able to select more than one categories.  My url (after rewrite) for showing products of a specific category is as this:  http://localhost/products/desktops   I know how to add another rewrite rule in .htaccess but i won't until i find out..  what is the best practice of adding multiple categories/tags in url without inflate it and cause damage (etc. page ranking) rather gain something.  For example, let's say someone wants to search through desktops and by (CPU and RAM)  Of course, the following patterns is non-acceptable, regarding variable size of input and known google dislike of many folders:  http://localhost/products/desktops/CPU/RAM/..   What about the following?  1. http://localhost/products/desktops/CPU-RAM 2. http://localhost/products/desktops/CPU|RAM   The 1 may seems nice but i learnt google is handling the hyphen (-) as words connector and these words are not connected?  The 2 is using the (|) pipe symbol since i learnt also google is using it to sort words of equal importance. I don't really if any of the above apply only to HTML content and/or not to URLs.  How can i feed my URL so to include a number of categories, say about 5 max. and if anyone knows how google handle such issue, etc. penalty or how searches/archive that stuff. I don't really want to apply any &filter_CPU=1&filter_RAM=1 thingy in the end and defeating the whole purpose.  UPDATE: Since my time was in essence i already went for the following approach/URL rewrite:  http://localhost/products/desktops/search-for/Celeron|Pentium|4gb-ram...   , where .. are a collection of category's attributes (etc. type of CPUs, size of memories etc. whatever characterizes them)  I thought a lot about the delimiter to use. I can't use hyphens (-) since category attributes may already contain one and it's a rather typical character for such cases. I cant't use commas (,) or underscores (_) either for about the same reason and i don't like them (especially commas) on URL in general.  I prefer something like a pipe but was wondering how bad this is for SEO? How google will index my information passed as ..Celeron|4GB-RAM.. Will it sort it out as 2 words (as they are?) or i should do something else?

I'm working for a website to convert the website URL to an SEO friendly URL. I plan to use this:  example.com/category-name/pageid-123-page-name  I looked at some similarly categorized, highly ranked websites. They have the same structure, except for one thing. In one case, the URL format was  example.com/category-name/pageid-123-page-name.html  Another was   example.com/category-name/pageid-123-page-name.php  Now I know the text in URLs help with SEO. Is it more helpful to have a file extension? If yes, which one is better?  Or if my current plan is okay, will it be better with a / at the end?


I am playing on an iPhone 6s and recently I was in a highly populated area with lots of people playing. I had Wi-Fi on and GPS was working, but my phone was not showing that I had any nearby.  I talked with some young men who told me there were at least 9 nearby.  Why wasn't my phone showing them?

I see pictures online of everyone having all these Pokémon to catch being everywhere around them, but it seems like I can only ever see one or two. I live in a rural area, but even walking miles through the farmland, it's rare to find any Pokémon.  Why is this? How can I find more Pokémon?


In my university, the department for  and  are distinct. I want to know what's basically the difference between the two fields?

What is the main difference between , , and ?   I have the impression that astronomy is a subject that runs parallel to physics but it is outside the physics field. This is based on the division of departments present in many universities: the department of physics being separated from the department of astronomy. The difference between cosmology and astrophysics is more obscure to me. I have the impression, though, that cosmology is more concerned with the structure of spacetime and universe models while astrophysics is more concerned with stellar life cycles, physical properties of stars, galaxies etc.  Which is the field that had more activity/ scientific breakthroughs recently?  In real life, are those classifications even important? Are there many differences between the education process of a future astronomer, astrophysicist or cosmologist?  Somebody, please, give examples of famous astrophysicists, cosmologists and astronomers at the present time.


In the  we can obtain a snapshot of the number of views over time. In particular, it is in the Posts table. I am looking for data on the evolution of views over time.  My question is whether there is a database or tool, available for the public, that gives the evolution of views over time. That is, optimally, a timestamp for each view. Alternatively, it may be grouped in some time interval (e.g. monthly increment in views for every given question). Any directions on obtaining even partial data on this would be helpful. Thank you.

How can i see a statistics about when the number of views increased over time?  I would like to find out if at a certain date there were a significant increase of views to one of my "famous" questions.


The title pretty much states my question here. I've held a T6i (very smooth feeling, good autofocus) and a 5D2 (definitely higher build quality, a full-frame which I would prefer). Never held a 1Ds3 but I did get an opportunity to play with a 1D2 and it felt old and clunky, although well built.  I'm not too concerned about video quality, or even whether video is possible - I don't shoot video seriously whatsoever. I do enjoy good resolution (20MP or above seems to be comfortable) and subject tracking/AF during continuous fire. I'm also definitely going for a Canon since I can adapt my dad's professional M42 lenses - no AE/AF but buying new lenses that cover the same breadth of focal lengths would cost thousands.  I was leaning towards the 5D2 for it's full-frame sensor and high ISO capability and current price point. However, a recent trip to a camera shop where I got to play with a T6i and a 1D2 made me reconsider - the T6i focused much faster, and the 1D2 definitely felt like I would damage the floor more than the camera if dropped. I don't have a particular area of photography I'm interested in, but I'd like the camera to last and take high quality images. What's a good choice here?

What are the pros and cons of buying an older higher-level camera if the price is about the same as a new entry-level one?


Installed fresh 18.04 LTS. Everything works fine except the touchpad. Thinkpad has toucpad buttons above it and they work fine, but the buttons under touchpad at the bottom only work as one left click. There is no option in settings to change that, it did work on Fedora 27 though. Is there anything I can change to add this funcionality?

I'm experiencing a serious problem with the new Ubuntu 18.04:  System Dell XPS 13 with a freshly installed Ubuntu 18.04 LTS.  Problem description The touchpad provides only primary button (single click and double click), but no secondary button. In particular, when using the "test Your Settings" option in Settings -> Devices -> Mouse & Touchpad, any click on the touchpad is signaled as primary button, no matter where I click (left or right side of the touchpad). This remains the case even after I change the Primary Button from Left to Right (in Settings -> Devices -> Mouse & Touchpad -> General).  In comparison, an external mouse connected to my laptop (via usb) works fine: it provides both primary and secondary buttons with sides corresponding to the choice of Primary Button (in Settings -> Devices -> Mouse & Touchpad -> General).  This may be related to   Any ideas?  Update: Meanwhile, I found out that in addition to the solution proposed by EntropyWins, one can also control this touchpad behavior via the Tweaks tool (a.k.a. gnome-tweaks) under Keyboard & Mouse -> Touchpad -> Mouse Click Emulation. In any case, as EntropyWins explains in his answer, this is not a bug.


What can I remove from os 10.7.5 but still keep it running? I'd like to use the iMac as an extra peripheral hard drive, and want to make as much space as possible available for files instead of applications.

I am trying to downsize my iMac 640Gb disk to make it fit onto a 120Gb (113Gb usable) SSD.  The total size of use files is currently approximately 340Gb, of which my home folder accounts for 265Gb (which I intend to not put on the SSD, or at least not all of it).  Very rough calculations suggest that my OS and application files are taking up roughly 75Gb, which puts me approximately 2/3rds full - not bad.  But, I would like to reduce this a little further if possible, to ensure that as and when I continue to use the computer (and I have a number of large apps that do not currently have installed including music production apps with a lot of data) I am not worried about running out of space on the boot drive.  To this end I already own XSlimmer which I will use periodically to remove PowerPC and language variants from my apps, but I was wondering if there are any areas of the Base OS that I can safely remove to save further space?  I am thinking about things like OS localisation, the location of the included screensavers and wallpapers, the voice files that are used for text-to-speech etc.  Is there a significant amount of such data that can be easily removed to save a few extra Gb on the boot disk?


I am using MySQLi to prevent any further attacks to my website. I am using PHP 5.6.16, MySQL version of: 5.7.9, and using WAMP  I'm encountering the following error when searching for the user with some weird characters, like adding a ') character in the search box.     MySQL error # 1064 and SQLi vulnerability   How can I sanitize the text box input and prevent any weird or unrecognized characters to be searched?  Screenshot:    Codes:  <?php # Essential files, please don't erase it! require_once("../functions.php"); require_once("../db-const.php"); session_start(); ?>
 View Profile

 <?php if (logged_in() == false) { echo "";     redirect_to("login.php"); } else {     if (isset($_GET['username']) && $_GET['username'] != "") {         $username = $_GET['username'];     } else {         $username = $_SESSION['username'];     }      ## connect mysql server         $mysqli = new mysqli(localhost, root, "", loginsecure);         # check connection         if ($mysqli->connect_errno) {             echo "
MySQL error no {$mysqli->connect_errno} : {$mysqli->connect_error}
";             exit();         }     ## query database         # fetch data from mysql database         $sql = "SELECT * FROM users WHERE username ='".$username."' LIMIT 1";          if ($result = $mysqli->query($sql)) {             $user = $result->fetch_array();         } else {             echo "
MySQL error no {$mysqli->errno} : {$mysqli->error}
";             exit();         }          if ($result->num_rows == 1) {             # calculating online status             if (time() - $user['status'] <= (5*200)) { // 300 seconds = 5 minutes timeout                 $status = "Yes";             } else {                 $status = "No";             }              # echo the user profile data             echo "<title> View Profile of: {$user['username']} </title>";             echo " Account Searcher:
             <form action=\"?username=\" method=\"get\">             Unique ID: <input type=\"text\" name=\"username\" placeholder=\"Searching for user: {$_GET['username']}\">             <input type=\"submit\" value=\"Search\">             </form>
             ";             echo "Unique ID: {$user['id']}\n
Username: {$user['username']}\n
First Name: {$user['first_name']}\n
Last Name: {$user['last_name']}\n
Email: {$user['email']}\n
Online? $status\n
";         } else { // If user doesn't exists - trigger this event             echo " Account Searcher:
             <form action=\"\" method=\"get\">             Username: <input type=\"text\" name=\"username\" placeholder=\"User not found!\">             <input type=\"submit\" value=\"Search\">             </form>
             ";             echo "<title> User doesn't exists! | Prospekt </title>
Error: User doesn't exist! Please register first!
";         } }  // showing the login & register or logout link if (logged_in() == true) {     echo 'Log Out |  Go to Home '; } else {     echo 'Login | Register'; } ?>

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?