\documentclass[a4paper]{article}  \title{Hello}  \begin{document}  \maketitle \tableofcontents % I want to make the title and the TOC on the same page  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \section{Section} \subsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection} \subsubsection{SubSection}  \end{document}   I want to make the title and the TOC on the same page, but there are two problems:  The first problem is the page numbers are wrong.  The second problem is the wrong page layout showed in the following screenshot:      What's the root cause?

I have a long and complex document that I want to render as a minimal outline only, without the body of the text. What is the best way to do this?  What I have tried so far is to save a version with titles only, and no other text. This does not work though. The outline gets caught off.  To try and solve the problem, I made a test file like this:  \documentclass{article}  \begin{document} \section{Foo} \subsection{bar} \subsection{bar} \subsection{bar} \section{Foo} \subsection{bar} \subsection{bar} \subsection{bar} [... eight more sections ... ] \end{document}   The output from this is a two page document, the first page of which is blank. On the second page, the outline appears, but it runs right to the margin until it gets cut off.  Adding a little bit of filler text to each section solves the problem. But without doing that, how can I get the output I would expect?  EDIT: I've edited this to emphasize the specific practical objective I am trying to accomplish, rather than the technical issue of empty sections which is covered .


I want to check, if a string exists in another string, but when I search for the string, I can only get a confirmation, when the string is exactly the same. How can I bypass that?

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


How can I prove $\lim_{x\to \infty} f(x) = L$ ? I tried to prove by L'Hospital's Rule, but I only proved when the limit exists... How can I prove when I am not provided that the limit exists?

Let $f:(0,\infty) \to R$ be differentiable. Suppose that $\lim_{x\to\infty}(f(x)+f'(x))=L$. Show that $\lim_{x\to\infty} f(x) = L$ and $\lim_{x\to\infty} f'(x) = 0$. (Hint: Write $f(x) = e^xf(x)/e^x$ and use l’Hopital’s Rule.)    My working for $\lim_{x\to\infty}f'(x)=0$:  For $\lim_{x\to\infty}f'(x) = 0$, I let $f(x) = e^xf(x)/e^x$ and applied quotient rule which then cancels off $e^{2x}$ and I'm left with $\lim_{x\to\infty}(f(x)+f'(x)-f(x))$. Can I then equate this with $\lim_{x\to\infty} \left(f(x)+f'(x)\right) - \lim_{x\to\infty}f(x)$ which then gives $L-L=0$? Is this step correct?


I'm setting up up a new MySQL server and I'd like to give it the same set of usernames, allowed hosts, and passwords as an existing server (which is going away).  Would it work to just do a dump of the users table and then load it on the new server?  Is there a better way than that?

I know how to export/import the databases using mysqldump & that's fine but how do I get the privileges into the new server.   For extra points, there are a couple of existing databases on the new one already, how do I import the old servers privileges without nuking the couple existing of ones.  Old server: 5.0.67-community  New server: 5.0.51a-24+lenny1  EDIT: I've got a dump of the db 'mysql' from the Old Server & now want to know the proper way to merge with the 'mysql' db on the New Server.  I tried a straight 'Import' using phpMyAdmin and ended up with an error regarding a duplicate (one that I've already migrated manually).  Anyone got an elegant way of merging the two 'mysql' databases?


If one were to take a message, say "Hello world!", and compute the MD5 hash: 86fb269d190d2c85f6e0468ceca42a20 Then, taking the MD5 hash of this, and repeating that procedure: d522231cf8bd5bd3bceb31c640bcab9a  64bb07c8a424dbb918495fa428702998  ed64b3e94672013dd88c415b8575dede  95119774bf93c232892b4f3071348abd  0d1fff8e1426591625a888451ed893c2  3e858eba431292825240db61628a817a  055609b11d0a06b46eff40bcb52eca09  8860c0fbffff97c16f1aa617e3b243e5  518ca0b27a1990b5bac51799c2c1b636  b62fd7e949b2995312b9fbddccd6b19f  b1d831a1d1c6ed8a81e4cb908f5aa36e  dd4e0883a48b1fd3a3a08e26cbc6adc4  3f4a12f0cdc506141badd00bf498dbad  be536872dde5b558975fd3a7dfec4884  402b32bb6839f17028deb13e60dd32ad  ... Given an infinite number of repetitions of the above, is it possible that all possible hashes will be computed an infinite number of times? Is it possible that given some initial message, there may be a revisiting of the initial hash just shortly after the start of the procedure, ie. if the MD5 of 402b32bb6839f17028deb13e60dd32ad was 86fb269d190d2c85f6e0468ceca42a20 again.

I have a double-SHA-256 of some text $$ h_2 = \operatorname{SHA256}(\operatorname{SHA256}(m)).$$ I don't need the plain text ($m$), but somehow I need to get first $$h_1 = \operatorname{SHA256}(m).$$  Can I have it ($h_1$) by keep hashing the second one ($h_2$)? $$ h_1 = \operatorname{SHA256}(\operatorname{SHA256}(...\operatorname{SHA256}(h_2)...)).$$


When applying regex to a multiline string, I realize the regex may be correct according to rubular.com. The problem is that somehow it is not working against multiline text.  Question is, I attempted to do "item.strip()" and no change in behavior.  s = """ #if route rate 230.207.200.1', '', '    (50.50.50.11,230.207.200.1)', """ for item in s:      match = re.findall(r'([0-9].[0-9].[0-9].[0-9],.........)', s)  if match:     print('match')

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


I want to be able to see a frame and 'calculate' (either mathematically or intuitively) the DoF of the picture to be taken.   The most basic variable would be the aperture; my question is do other variables also have effect on DoF? Especially the distance from sensor to object.   Suppose I want to photograph an object with dimensions X and my camera with aperture set on f/1.4 only focuses on half of the object. Can I change something other than the aperture to ensure the whole object is in focus?

There are several questions here about , about , and about . And of course there's the basic . And plenty of  questions. There's related questions like . But there's no be-all-end-all question asking:  What exactly determines depth of field in a photograph?   Is it just a property of the lens? Can lenses be designed to give more depth of field for the same aperture and focal length? Does it change with camera sensor size? Does it change with print size? How do those last two relate?


Thanks for taking your time.  I've been given the following problem:  Determine and plot set of points in the complex plane that satisfies the following equation  $ |z-2| + |z+2|=5 $  where $ z = x+iy$.  My first approach was to square both sides, but what I ultimately get is the square of a binomial, which when expanded gives me the product of square roots:  $ 2\sqrt{((x+2)^2+y^2)((x-2)^2+y^2)}$  which I don't know what to do with.   Can anyone provide some insight? Tanks!

Plot $|z - i| + |z + i| = 16$ on the complex plane   Conceptually I can see what is going on. I am going to be drawing the set of points who's combine distance between $i$ and $-i = 16$, which will form an ellipse. I was having trouble getting the equation of the ellipse algebraically.  I get to the point:  $x^2 + (y - 1) ^2 + 2\sqrt{x^2 + (y - 1)^2}\sqrt{x^2 + (y + 1)^2} + x^2 + (y+ 1)^2 = 256$  $2x^2 + 2y^2 + 2\sqrt{x^2 + (y - 1)^2}\sqrt{x^2 + (y + 1)^2} = 254$  It seems like I'm and doing something the hard way.


As I know java has method overloading feature, so I am interesting why method annotated as B produce java.lang.StackOverflowError. I think this might be connected to some recursive call, but I did not have any compiler warnings. Can someone explain why I got exception.      public static void main(String[] args) {         Set<Integer> set = getSet(1);     }      //A     private static Set<Integer> getSet(List<Integer> numbers) {         return new HashSet<>(numbers);     }      //B throwing exception     private static Set<Integer> getSet(Integer number) {         return getSet(number);     }

What is a StackOverflowError, what causes it, and how should I deal with them?


My goal, in Java, is to return true of the number of occurrences of "cat" in a string is equal to the number of occurrences of "dog".  public boolean catDog(String str) {    int matches = 0, matches2 = 0;    for(int i = 0; i < str.length()-2; ++i)    {      if(str.substring(i,i+3)=="cat")++matches;      if(str.substring(i,i+3)=="dog")++matches2;    }   if(matches==matches2)return true;   return false; }   It always returns true(probably not incrementing counters) unless str is exactly "dog" or "cat". Why?

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?


I have a Toshiba Satellite C-55 and recently changed to Ubuntu 19.10, I'm completely new to Ubuntu, so there's nothing much I know what to do, except googling before asking, but I'm stuck. My internet connection got really slow like a day or so after installation, and IDK why, but I found out that is a common issue with Atheros devices, which my computer has, so I tried to enter the following command:   sudo su echo "options ath9k nohwcrypt=1" >> /etc/modprobe.d/ath9k.conf   As seen here:  But... it got stuck there, it's doing nothing (I think, but whenever I try to close the terminal, it's saying that there's still a process running, but it has been like that for an hour, what do I do?

I know there is ctrl+c, but sometimes that doesn't work. In Ubuntu desktop I can just close the terminal window and open a new one when this happens, but how would this be solved using the CLI in Ubuntu server (without restarting the box)?


I am arriving in Dubai XNB at 6am from an Etihad flight. Then on 5pm, I am leaving Dubai on a Flydubai flight. Do I need a transit visa? (I'm Filipino so visa is always a constraint whenever we fly outside of Southeast Asia.)  I am asking because i have read conflicting accounts that I can ask for transit visa via Etihad since I am arriving from an Etihad flight.

My uncle is traveling from Dubai to Amsterdam and then to Quito. He is citizen of Ecuador and Pakistan, currently in Pakistan. He will arrive at 5 AM in Dubai from Lahore and leave Dubai at 11:55 PM on the same day.  I want to know how long he can stay in Dubai airport without visa. He will travel by KLM airlines from Dubai to Amsterdam and then from Amsterdam to Quito. Does he need a visa in Dubai?


If I'm preparing a project, what amount of time is reasonable to reserve for research? in terms of hours/days?   Yes, it varies, but what are some examples/situations that you can think of where user experience took a short time? or a particular case where research/tests took a long time?

This question will likely have no single correct answer, but I'm looking for personal estimates on how long it takes you to complete a usability study from start to finish, including research, writing the plan, recruiting users, conducting the tests, and analyzing/reporting the data.  I've read a number of articles on the web (this one seems to have the most science behind it: , but I'm looking for your input based on your own experience with usability testing.


My question is very simular to this one:    In my .jsp page I have a form in which I would like to preset a text field to the current date. My only issue is that "value" does not support runtime expressions when using Struts - which makes sense I want to keep as much Java out of the JSP as possible. But this leaves me struggling to get the variable out of an action.  I am currently running on Tomcat v7.0 and Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 2.  in my .jsp page I have:     <s:set var="currentDate" value="currentDate"/>    <s:property value="currentDate"/>     <s:form action= "updateAction">   <s:textfield name="dateUpdated" key="label.dateUpdated" size="20" value="%{currentDate}" />    <s:submit method="execute" key="submit"/>    </s:form>   Now I have three actions - one to get to this page(ToPageAction), one for when the form is submitted(UpdateAction), one that gets the currentDate variable(GetCurrentDateAction).  I think I am going crazy >.<   anyways, the action to get the currentDate variable is called GetCurrentDateAction and looks like:    public class GetCurrentDateAction extends ActionSupport {  SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public String currentDate = date.toString();  public String getCurrentDate(){     return currentDate; } public void setVariable(String currentDate){     this.currentDate=currentDate; } public String execute() throws Exception{     return SUCCESS;  } }   additionally in struts.xml I have:   <action name="getCurrentDateAction" class="net.upsmon.struts2.action.GetCurrentDateAction"> <result name="success">AlertPersistencyView.jsp</result> </action>   I have read through the question I linked to many, many times and tried to format my own struts correctly but find myself getting lost. I am not sure if the answers are just misleading or I am just not understanding something I feel like this issue cannot be too difficult to solve. in my .jsp page I have a property tag to prove to myself that I got the variable into the .jsp but it has not yet worked. And additionally my textfield is blank. Any advice out there for me to get this variable into my .jsp? Is there any additional information I can provide for a solution? I unerstand the basics of Struts and any advice is welcome.  An additional piece of information: I have been also looking at  blog in order to figure out my issue,  but have still not come up with a solution.

I am trying to show the current date in my JSP page using JSTL. below is the code I am using.  <jsp:useBean id="now" class="java.util.Date" scope="request" /> <fmt:formatDate value="${now}" pattern="MM.dd.yyyy" />   But the above code is not producing any results? Am I missing anything here or is there any better approach for this? I am using JSTL 1.1.


If $E = mc^2$ describes the energy-mass relationship of matter, does that mean that if we rearrange to form $m=E/c^2+pc$, does that mean that photons have no energy thus mass = $0$? Or does this mean that photons cannot have both energy and momentum?  This is just a question from a high school partner so no very big words.

Photons are massless, but if $m = 0$ and , then $E = 0c^2 = 0$. This would say that photons have no energy, which is not true.  However, given the formula $E = ℎf$, a photon does have energy as $ℎ$ is a non-zero constant and photons with a zero frequency do not exist.  What am I missing here, or does the famous formula not apply to photons?


I have this problem where I am supposed to write this program where using a Point class to create points, then create a Rectangle class with methods like area,perimeter, and pointInside... My code is always resulting in a Null Pointer Exception and I don't know why. class Point {    int x, y;     Point() {       x = y = 0;    }     Point(int x0, int y0) {       x = x0;       y = y0;    }     public String toString() {       return "(" + x + "," + y + ")";    } } class Rectangle {    Point p1,p2;      Rectangle(int x1,int y1,int x2,int y2)    {      x1 = p1.x;      y1 = p1.y;      x2 = p2.x;      y2 = p2.y;    }    Rectangle(Point p1,Point p2)    {       this.p1 = p1;       this.p2 = p2;    }      public int area ()    {      int width = p2.x - p1.x;      int height = p2.y - p1.y;      int area = width * height;      return area;    }    public int perimeter()    {      int side1 = p2.x - p1.x;      int side2 = p2.y - p1.y;      int perimeter = side1 + side2 + side1 + side2;      return perimeter;    }    public boolean pointInside(Point p)    {      if ((p.x >= p1.x && p.x <= p2.x) && (p.y >= p1.y && p.y <= p2.y))      {        return true;      } else {        return false;      }    }  }  class TestRectangle {    public static void main(String[] args) {       Point a = new Point(1,1);       Point b = new Point(2,2);       Point c = new Point(3,4);       Point d = new Point(8,2);        Rectangle yellow  = new Rectangle(a, c);       Rectangle orange  = new Rectangle(2, 3, 9, 6);       Rectangle green    = new Rectangle(3, 4, 4, 5);       Rectangle blue    = new Rectangle(5, 1, 6, 5);       Rectangle red = new Rectangle(7, 3, 9, 5);        System.out.println("Perimeter of the yellow rectangle = " + yellow.perimeter()); // 10       System.out.println("Perimeter of the orange rectangle= " + orange.perimeter()); // 20        System.out.println("Area of the yellow rectangle = " + yellow.area()); // 6       System.out.println("Area of the orange rectangle = " + orange.area()); // 21        System.out.println("Point B inside yellow? " + yellow.pointInside(b)); // true       System.out.println("Point D inside yello? " + yellow.pointInside(d)); // false      }  }

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


Data is persisting in table but after that page is not redirected to the specified destination.  Is redirection through ajax possible?  Please check the code and help me out  function foodLog(){     var getDate = $('#ddBox').val();     var stringDate = getDate;     var newdate = stringDate.split("/").reverse().join("-");     var data={          servings : $('#demo_vertical').val(),         calories : "12",         carbs : $('#carbs').text(),         carter : $('#carter').text(),         cholestral : $('#cholestral').text(),         date: newdate,           fiber : $('#fiber').text(),         foodItem: $('#foodItem').text(),         foodtype:$('#foodtype').text(),         totalFat : $('#totalFat').text(),         saturatedFat : $('#satFat').text(),         sugar : $('#sugar').text(),         protein: $('#protein').text(),         size :$('#size').text(),     };      $.ajax({           type : "POST",            contentType: "application/json; charset=utf-8",         url : "/fitbase/foodlog/create",         dataType: "text",         data : JSON.stringify(data),         success : function(response) {              if (response.redirect){                 console.log("Redirecting to page")                  window.location.href = '/';              }         },         error : function(e) {               alert("Object" +e);         }       });   };

I'm using $.post() to call a servlet using Ajax and then using the resulting HTML fragment to replace a div element in the user's current page. However, if the session times out, the server sends a redirect directive to send the user to the login page. In this case, jQuery is replacing the div element with the contents of the login page, forcing the user's eyes to witness a rare scene indeed.   How can I manage a redirect directive from an Ajax call with jQuery 1.2.6?


I managed to use the 'fuzzy' tool to remove the slightly off white background. However, I want the shape itself to change. For instance, when I drop shadow on the image the shadow is rectangular on the previous outline, of the jpg, not the new rectangular shape. Also, Layers underneath are not visible where I just used the fuzzy tool to remove the background.   I guess using the fuzzy tool and pressing delete just gives a white background on the selected region? I want it to completely remove the background and make it transparent, how do I do that?

How can I remove the background and replace with transparency (as represented by checkered background in PS)? And are there any limitations in the file type I can then export the image to?


1) A group of boys is playing football.   or     2) A group of boys are playing football.   My teacher told me the first sentence is correct since of boys can be ignored to make:      A group is playing football.   It feels very awkward in my mouth to say boys is.

Isn't the following sentence grammatically correct?     The group of fifty people are going to arrive Thursday.   What's wrong with it? Someone said it should be      The group of fifty people is going to arrive Thursday.   Why? People is plural so why is people is better than people are?


Many online posts( and ) say label encoding would make NN/DL models think there is an ordering among categories, so it should not be used for categorical encoding for NN/DL models. But wouldn't NN/DL models be capable of modeling any non-linear relationship like XGboost? If this is the case, why NN/DL can't figure out whether or not an ordering is actually present among categories when label encoding is used?

Some material I've seen on machine learning said that it's a bad idea to approach a classification problem through regression. But I think it's always possible to do a continuous regression to fit the data and truncate the continuous prediction to yield discrete classifications. So why is it a bad idea?


When I asked why did light follow the law of reflection, I was answered that it obeys the principle of least time. So my question is, why does it even obey the principle of least time?

How is  proven? Or it is what usually is observed and is basis for the theories?


I have recently had to rebuild my iptables configuration and when I run service iptables restart  I now receive the following error line: iptables: Loading additional modules: nf_conntrack_ftp   [FAILED]  My iptables-config file includes the following line: IPTABLES_MODULES="nf_conntrack_ftp"  When I run modprobe nf_conntrack_ftp the response is: FATAL: Module nf_conntrack_ftp not found.  Here's my iptables file:  Table: mangle Chain PREROUTING (policy ACCEPT) num  target     prot opt source               destination Chain INPUT (policy ACCEPT) num  target     prot opt source destination 1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 state NEW tcp dpt:8447 2    ACCEPT     tcp  --  0.0.0.0/0 0.0.0.0/0           state NEW tcp dpt:8443 Chain FORWARD (policy ACCEPT) num  target     prot opt source destination Chain OUTPUT (policy ACCEPT) num  target     prot opt source destination Chain POSTROUTING (policy ACCEPT) num  target     prot opt source destination Table: filter Chain INPUT (policy DROP) num  target     prot opt source               destination 1    ACCEPT     all  --  0.0.0.0/0 0.0.0.0/0           state RELATED,ESTABLISHED 2    DROP       tcp  --  0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x00 3    DROP       tcp  --  0.0.0.0/0            0.0.0.0/0           tcp flags:!0x17/0x02 state NEW 4    DROP       tcp  --  0.0.0.0/0            0.0.0.0/0 tcp flags:0x3F/0x3F 5    ACCEPT     all  --  0.0.0.0/0 0.0.0.0/0 6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:443 8    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:25 9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:995 10   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:143 11   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:993 12   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:22 13   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:110 14   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:465 15   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:8181 16   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 tcp dpt:8443 17   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0 Chain FORWARD (policy ACCEPT) num  target     prot opt source destination Chain OUTPUT (policy ACCEPT) num  target     prot opt source destination  It seems nf_conntrack_ftp isn't loading -- how do I load this?

So I am trying to setup shorewall firewall on my linux vps. The vps is running ubuntu 12.10. When I type $ shorewall check I get this error.  iptables: No chain/target/match by that name.    ERROR: Log level INFO requires LOG Target in your kernel and iptables   So I run iptables -L and I get  Chain INPUT (policy ACCEPT) target     prot opt source               destination  Chain FORWARD (policy ACCEPT) target     prot opt source               destination  Chain OUTPUT (policy ACCEPT) target     prot opt source               destination   I tried looking at other posts and there is one similar, but it did not help me. The kernel I am using is 2.6.32-042stab079.5  Does anyone know what I need to do to fix this? I've seen a few things about changing the kernel config, but I have no idea how to do that or what to change.


Let's I have 2 arrays string[] A = { "a", "b", "c" } and string[] B = { "a", "b", "c", "d", "e" }.  Is there any method that can tell directly that A is a subset of B? Except will just remove distinct elements of B, but won't tell whether it's completely a subset of B.   Thank you for helping.

Any idea on how to check whether that list is a subset of another?  Specifically, I have  List<double> t1 = new List<double> { 1, 3, 5 }; List<double> t2 = new List<double> { 1, 5 };   How to check that t2 is a subset of t1, using LINQ?


I am working as a software developer from last 2 years but I am still very slow at programming. My concepts and logical skills are good but I get stressed while completing complex tasks. I am comfortable while completing less complex tasks at good speed.  When I review my team members work I easily find bugs in it and enjoy reviewing and testing their work. Should I change my profile to software testing.

I have 4 years of experience in software development. But I did software manual testing more than software development. I am good in finding tough functionality related bugs.  I have passion for software testing rather than software development.  Please suggest me is it possible to switch in testing domain.


I'm using Ubuntu 12.04 64 bit. I'm going to start programming for android devices.  I know that I will need to install a JDK, but I don't have access to oracle.com.  How do I get it?

How do I install Java, including in my browser, so websites with Java work?


There are ways to configure dead keys in Linux to mimic the behavior they have in Windows ?  This document describe how it works in Windows:  The difference between Linux and Windows dead keys is highlighted in bold:      When you press the APOSTROPHE (') key, QUOTATION MARK (") key, ACCENT GRAVE (`) key, TILDE (~) key, ACCENT CIRCUMFLEX key, or CARET (^) key, nothing appears on the screen until you press the a second key. If you press one of the letters designated as eligible to receive an accent mark, the accented version of the letter appears. If you press an ineligible key, two separate characters appear.   In Linux when you press a second key not eligible to receive a accent, the first key pressed is lost. This reduce the typing productivity, a lot.

When I use any variation of English, US international (with dead keys,altGr dead keys or alternative) on my Linux Mint machine I always encounter this behaviour. When I press one of these keys: ' " and then follow them with a 'non-accentable' character like a [ or a b no output comes out at all.    Whereas in Windows US-International it would print [ or b. If I wanted to type this I would have to escape each dead key with a space instead of with any 'non-accentable' character. This is annoying when programming (not really, but I trained with the Windows 'Qwerty International' on typing.io and switching back and forth between the systems is irritating).    Is there any way to change that so it works like in Windows?


I know the derivation of Hubble time goes something like this (I am an a-level student so this may not be the actual derivation): Two galaxy that is moving away from each other at speed v are now D distance apart assuming the time when they where together is t=0 i.e. at the Big Bang the time since the Big Bang is given by  $$T= \frac{D}{V}$$ $$V=\frac{D}{T}$$ Hubble's law is given by $$V=HD$$ therefore subbing the first expression into the latter gives $$\frac{1}{T}=H$$ and therefore $$T=\frac{1}{H}$$ The thing I do not understand is if we are assuming the rate of expansion is constant (as is required for this) why does that mean we can use $$t=\frac{d}{v}$$ Because as the galaxies get further apart together the space between them gets more and more hence they will move away from each other faster the further the are apart. This equation needs v to be constant which is not the case. Please can someone explain?  In the linked qestion they use the formula t=d/v just saying it is a linear extrapolation. This does not help me with my qestion as i can still not understand why this can be used as it assumes v is constant (i think) which it would not be. I am looking for this to be explained in more detail then the linked question.

Why we call "constant" to the Hubble constant?,  if the universe were really expanding then the Hubble "constant" should change, being variable, smaller and smaller..with "time".  Other example/view of this question: if Hubble constant were constant then the universe "age" would be constant too,  so let's say 13.7 billion years, and stop growing. That's not an expanding universe.  On the other hand:  If the Hubble constant and universe age were not so constant then:  There is some property that is changing like a "time" that -everyone in universe- could get same number, so there would be an absolute time..   I see the Hubble Constant, and even the age of the universe, a really too speculative theory (perhaps it is as speculative as the posibility of measuring), having more accuracy will lead to better theories...  Is it because some theoric impossibility in measuring that kind of variation?   I see a lot of inconsistency. Any light at this respect is welcome, thanks


For any odd prime $p≥5$, $(-3/p) = 1$ if $p ≡ 1,-5\pmod{12}$ and $(-3/p) = -1$ if $p ≡ -1,5 \pmod{12}$. My solution so far: if $p ≡ 1\pmod{4}$ then $(-3/p) = 1$ exactly when $p ≡ ±1\pmod{12}$ when $p ≡ 1\pmod{12}$. And if $p ≡ -1\pmod{4}$ then $(-3/p) = 1$ exactly when $p ≡ ±5\pmod{12}$ whence $p ≡ -5\pmod{12}$. So $(-3/p) = 1$ exactly when $p ≡ 1\pmod{12}$ or $p ≡ -5\pmod{12}$. I'm not very confident in my work. Is this correct and if it's not, how do you solve this problem?

Going over a past exam in my elementary number theory course, I noticed this question that caught my attention. The question asked for the conditions that allowed $-3$ to be a quadratic residue mod $p$. Doing some experimentation, I found that this was possible when $p \equiv 1 \pmod 3$. So I guess I have answered part of the question. But the proof is obviously nagging me: Prove $-3$ is a quadratic residue in $\Bbb Z_p$ if and only if $p \equiv 1\pmod 3$. I've done a bit of work on this, but haven't been able to come up with anything close to elegant nor conclusive. Any help would be appreciated.


I'm trying to get some source code into my tex-document but only get the error message mentioned in the thread title. I disabled nearly all of the other packages I use but it did not work.  \documentclass[a4paper, 13pt, twosides, openany, liststotoc]{scrbook}  \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage[footnote, nohyperlinks, printonlyused, withpage, smaller]{acronym} \usepackage[top=30mm, left=25mm, right=25mm, bottom=30mm, headsep=10mm, footskip=12mm]{geometry} \usepackage{amsmath, graphicx, lmodern, fancyhdr, listings, xcolor, acronym, etoolbox, calc, setspace, tabto, enumitem, microtype, chngcntr, xcolor, pdfpages, minted}  \begin{document}  \begin{minted}{csharp}  public static void Main (string[] args) {     Console.WriteLine ("Hello World!"); }  \end{minted}  \end{document}   I'm actually using all of these packages so I'd really want to find a posibility to include my code in addition to all the other packages. It don't really need to be coloured like what the minted package does but I'd prefer so.  Thanks for every help or useful thougth.  Greetings

I receive the following errors:  ! Package minted Error: You must invoke LaTeX with the -shell-escape flag. ! Package minted Error: You must have `pygmentize' installed to use this packag   in TexMaker Settings i wrote:     LaTeX : "/usr/texbin/latex" -interaction=nonstopmode %.tex -shell-escape      PdfLaTex: "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode   %.tex -shell-escape   But the error still doesn't vanish ...


I have AirPods that I often need to switch using between my Mac and my iPhone. I never do this during a conversation, but often I'll have used them on my phone for a phone call, and then need to use them on my Mac; or vice versa. Doing this involves multiple steps on both ends (whatever is required for an explicit BT connect) and even then, doesn't seem to "stick" until the APs disconnect and reconnect to the switched-to end several times (often interrupting whatever I've started doing there).  How is this supposed to work?    Note that I'm aware of  that this should be a seamless process. But it doesn't work that way for me, or any of the dozen or so other people I know in similar situations.

Apple AirPods are supposed to work for iOS devices, Apple Watches and Macs. Apple states that the OS requirements are:     Requires iCloud account and macOS Sierra, iOS 10, or watchOS 3 ().   I am a prospective buyer of AirPods. My question is what the experience is like, when using the same pair of AirPods to switch between an iOS device and  a Mac.   How is pairing/switching done? Can the experience be called “seamless”? Are there any caveats that should be known from a user-perspective?     Note: This is not a buying recommendation question, the goal is to produce an objective description of the pairing/switching process between iOS/macOS devices.


I am a new user to Ubuntu 16.04 and used winetricks to install the Kindle app and it starts up just fine, Amazon makes it a little hard to register by generating a random one time new password, which I did and it seemed to be successful and Amazon verifies the existence of this new Kindle for PC app but when I try to sync the library it gives me an unable to connect message.  If I close the app and restart, it goes to the registration process again, creates yet another Kindle for PC version and repeats the entire frustrating process.  I'm hoping someone has already solved these problems and can tell me what I need to do to make it work.

I really want to get the Kindle PC program running on my computer so I can download, read, and manage my e-books. I realize that Calibre can be used to manage e-books and I do have that downloaded. However, Amazon won't let me download ebooks unless my PC is registered in their Kindle program and I'd like to just keep things streamlined.  I've viewed many tutorials and advice for setting it up. I have Wine, I have Kindle for PC, I set it to Win98, all of that. However, when I try to open KindlePC from the Wine menu or from the desktop icon, nothing happens. No error messages, nothing. I don't know what might be wrong. How can I make it work?


I am setting up my install of texlive2014 and working on my first document.  I want to insert a small graphic on a page, and have the following:  \documentclass[a4paper,12pt]{letter} \usepackage{graphicx} \begin{document} \newcommand{\collegename}{TK}   \begin{figure} \includegraphics[width=10mm] {/home/steven/doc/app/assets/image/s-stamp.tif} \centering \end{figure}   When I run latex I get this error:  ERROR: LaTeX Error: Environment figure undefined.   My first suspicion was that I've made a mistake with my markup. My second suspicion is that maybe Texlive2014 doesn't come with Graphicx installed? I am not sure how to check whether I have it, but trying  tlmgr install graphicx   results in  package graphicx not present in package repository.   I'd appreciate any advice, framed at an introductory level.

I'm increasingly fed up with the arbitrary restrictions that the standard LaTeX letter class has. Today I discovered that the table environment is not defined in the standard letter class, which means one can't use labels or captions.  CTAN has a . Can anyone suggest a good LaTeX letter class to work with for general use? I'd like something as flexible and with as few restrictions as possible, well maintained, not excessively complicated to use, and not buggy. I was earlier recommended newlfm (on comp.text.tex).  was about the fact that the letter class does not allow the addition of a subject.  A similar question has been asked already, , where scrlttr2 is recommended.


Let {$a_n$} be a sequence of non-negative real numbers such that the series $$\sum_{n=1}^\infty a_n$$ is convergent.  If p is a real number such that the series $$\sum_{n=1}^\infty \frac{\sqrt a_n}{n^p}$$ diverges, then what can be said about the value of p?

For $a_n \geq 0$, and $\sum a_n$ convergent, show that  $\sum \frac{\sqrt{a_n}}{n^p}$ is also convergent for $p > 1/2$?  What bugs me more is why isn't $\sum \sqrt{\frac{a_n}{n}}$ convergent??  Clearly it converges for $p > 1$, and $a_n$ somehow helps out in $p \in (1/2,1)$.  Only hints are welcomed  Thanks in advance..


Recently I have switched my OS from Windows to Ubuntu 14.04, but I need Adobe Photoshop to run for my project.  So how can I run Adobe Photoshop on Ubuntu, or are there any Ubuntu plugin like photo editor software?

I was using Windows XP, I like Ubuntu, but I'm wondering,because as  I'm a professional photographer & photo editor.  I do my work with Photoshop, so will photoshop work in ubuntu?


Can someone please explain to me what the formal definition of  is?  Neither my textbook, nor my professor, nor any of the online sources I've checked are able to give me a proper definition of temperature. Even Feynman doesn't define temperature. Honestly the amount of circular definitions and ambiguities I've encountered in trying to understand the precise definitions of thermodynamic concepts is astounding.  The best thing I got was the temperature of a system of particle is a measure of its average kinetic energy.  In deriving the ideal gas law for monoatomic gases, the derivation of the internal energy formula $U=3/2PV$ is clear to me. However then it is used that the average kinetic energy of a system is given in terms of its temperature as $3/2kT$. For a monoatomic gas, the total energy is simply the number of molecules $N$ multiplied by the average kinetic energy (since the molecules are assumed to have no rotational energy), and thus $U=3/2NkT$, which gives $PV=NkT$ which is the ideal gas law.  So am I to take the statement that the average kinetic energy of a system is equal to a constant multiplied by its temperature $T$ as a definition for temperature? I don't think so because this is in fact the equipartition theorem, which means temperature must be defined independently elsewhere.  So what is the proper definition of temperature in thermodynamics and kinetic theory, and furthermore, why is it that when we place a thermometer in a bath of water we can say the reading we get is a measure of the average kinetic energy of the molecules in the bath?

In , temperatures of millions of degrees (Celsius, Kelvin, it doesn't really matter at that point) are mentioned. But, what does it mean exactly? What is measured, and how? As I more or less expected,  the  mentions that the official definition  (the one I was told in elementary school, either between freezing and boiling points of water for Celsius, or between absolute zero and triple point of water for Kelvin) doesn't really work above 1300K. So, questions:   For "earthly temperatures", how is temperature measured consistently? Why would linearity of the measuring device be assumed, in particular to extrapolate beyond the initial (0-100, or 0-273.16) range? What guarantees that two thermometers, working under different principles (say, mercury and electricity), that agree at 0C and 100C, will agree at 50C?  What do statements like "the temperature in the Sun's core is $1.5\times10^7K$ mean? Or, even, what do the "7000K" in the Earth's core mean?


$$\int_{-\infty}^{\infty} \frac{x \sin(x)}{x^2 +4} dx$$ I do not understand how to evaluate integrals  by using a closed contour and passing to a limit, can someone show me using this example

$$\int_{0}^{\infty}\frac{x\sin 2x}{9+x^{2}} \, dx$$   Some rearranging eventually gives $$\int_{0}^{\infty}\frac{x\sin 2x}{9+x^{2}} \, dx = \frac{-i}{2}\int_{-\infty}^{\infty} \frac{xe^{2ix}}{9+x^{2}}$$ Consider $f(z) = \frac{ze^{2iz}}{9+z^{2}}$ and the contour $\gamma$ of the semicircle laying in the upper half of the plane:   Let $\gamma_{R}$ denote the circular part with radius $R$ and $\gamma_{L}$ denote the part lying on the real axis with length $2R$.   Computing the residue at the only pole, $z = 3i$, we have that $$\oint_{\gamma}f(z) \, dz = \frac{i\pi}{e^{6}} $$ On the other hand, \begin{align*} \oint_{\gamma}f(z) \, dz &= \oint_{\gamma_{R}}f(z) \, dz + \oint_{\gamma_{L}} f(z) \, dz \\ &= \oint_{\gamma_{R}} f(z) \, dz + \int_{-R}^{R} \frac{xe^{2ix}}{9+x^{2}} \, dx \end{align*} We may evaluate the first integral in the usual way by parameterizing the contour and taking $z = Re^{i\theta}$. \begin{align*} \oint_{\gamma_{R}} f(z) \, dz = \int_{0}^{\pi} \, \frac{R^{2}e^{2i\theta}e^{2i\cos\theta}e^{-2R\sin\theta}}{(9+R^{2}e^{2i\theta})} d\theta \end{align*}  I'm aiming to show that this integral goes to $0$ as $R$ goes to infinity. This gives the desired result as the factor of $\frac{-i}{2}$ is all that is missing according to WolframAlpha. I'm not sure how to finish it though.


Palpatine was using Force concealment. I think somebody of his calibre of Force would require a substantial amount of Force just to use that.  Since Yoda is the oh-so-hallowed being of wisdom and Force skill they make him out to me, wouldn’t he detect this level of Force? Why didn’t he sense the Chancellor, at least in visions as he slept or in meditation if not consciously?

In Return of the Jedi, when trying to sneak into the base on a shuttle, Luke said he senses Darth Vader's presence and said he shouldn't have come lest he jeopardize the mission. Darth Vader also sensed Luke, but let him in anyways. Also, Yoda and Obi-Wan could detect the Force in young Anakin.  So if Jedi and Sith can detect each other, why couldn't they detect Senator Palpatine to begin with? It seems like a giant plot hole.


I have a basic knowledge about differential geometry, tensor calculus,.. but nothing about Thermodynamics. There are a lot of references of classical theormodynamics for physics.  There exists a formal book for mathematician of classical theormodynamics ?

Can you suggest some references for rigorous treatment of thermodynamics? I want things like reversibility, equilibrium to be clearly defined in terms of the basic assumptions of the framework.


I'm using fouriernc font package, I saw that it has two different phi's. ϕ which is just $\phi$, but how do I get φ?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


So ...I built my 12 year old a computer;  I loaded Ubuntu 12 on it.  This has been in use for the last few months.  However my Son now wants Windows and wants Ubuntu completely gone. With that in  mind, I pulled out my Windows 7 disc and inserted it.  The installation screen comes up and I click "install".  Temporary files screen comes up then it stopped with an error code saying there is no room in my boot partition to place the files and that 837 mb is needed.  So I go into the Ubuntu menu and open the partition manager.  The root partition shows that it is locked and cannot be changed or resized.  So that is my question:  How do I resize the root partition in Ubuntu?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Most NPCs use a flat-basic stat block in lieu of character classes. Please observe the , a 15th level caster, from Volo's Guide to Monsters. This Diviner wizard has (1) class feature, the daily use of one 'Portent' ability (similar to the Wizard class ability):  Portent (Recharges after the Diviner Casts a Divination Spell of 1st Level or Higher). When the diviner or a creature it can see makes an attack roll, a saving throw, or an ability check, the diviner can roll a d20 and choose to use this roll in place of the attack roll, saving throw, or ability check.  In contrast with the  sub-class, NPC wizards can 'recharge' this Portent-ability after the use of any spell from the Divination spell-list. Explanation on relevance: PCs tend to lack  and equivalents. Such a Diviner could modify any . Say this wizard observes a PC group against a ,  or , they need only cast a single  to change dice rolls accordingly. Less need for a . Logically, these wizards (of 18+ intelligence) would want as many (cheap) divination spell slots as possible. Thus, such a wizard would seek to restore spell slots via things like a  . As the magic item list in 5e is extensive, let us focus on . These magic items are relatively easy to make (1st level spell-scrolls are 'common' magic items) and seem to approximate a wizard casting their own spell.  If it is relevant, the answer below can include spell scrolls made specifically by this Diviner-wizard themselves &/or those made by other caster-enchanter-scribes. Does it make a difference if they are casting their 'own' spell or not?  If possible, I would be thankful if the answer could also include the infamous . Does it make a difference if the wizard is regaining their 'own' spell via some external source?    Question Specific & Detailed: Can the NPC 'Divination' wizard (from Volo's Guide) restore their daily Portent ability by casting a divination-type spell from a spell scroll magical item - or can this Portent-reuse only be gained via memory-slot spell casting?

This question is updated to request additional answers and details in light of information now available in the Dungeon Master's Guide. In the released DM basic rules, Lost Mine of Phandelver, Hoard of the Dragon Queen, and the DMG teaser there are wands, staves, and rings that you can use to cast spells.  Do abilities that trigger from casting a spell activate when casting a spell from an item?  Can the character modify the spell using class abilities when casting a spell from an item?   Examples include:  An abjurer Wizard's arcane ward recovering hit points from a Dispel Magic cast from a Ring of Spell Storing  A sorcerer using Twinned Spell on a ray of enfeeblement from a Staff of Power  An evocation wizard using Sculpt Spell on a fireball from a Wand of Fireballs.   Now that the DMG is out we have some clearer rules on casting spells from items (DMG p. 141):  Some magic items allow you to cast a spell from the item.  The spell is cast at the lowest possible spell level, doesn't expend any spell slots, and requires no components, unless the item's description says otherwise  The spell uses its normal casting time, range and duration, and the user of the item must concentrate if the spell requires concentration. A magic item, such as certain staffs, may require you to use your own spellcasting ability when you cast a spell from the item.  Does whether or not you can apply class abilities to the casting of the spell depend whether the item uses the user's own spellcasting ability (such as the Staff of Fire) versus an item that comes with a fixed spellcasting ability built-in (such as the Wand of Fireballs)? Does it matter if it's something that triggers more or less automatically like Arcane Ward, versus something you have to control, like Careful Spell?


Which is correct: "they agree to him answering questions" or "they agree to his answering questions" ?

I assume that the following sentences are grammatically correct:   He resents your being more popular than he is. Most of the members paid their dues without my asking them. They objected to the youngest girl's being given the command position. What do you think about his buying such an expensive car? We were all sorry about Jane's losing her parents like that.   I'm still getting used to this possessive gerund structure. It sounded so weird to me at first. Is the structure used in both formal and informal contexts? Are there any alternative structures that result in the same meaning and are more frequently used? (Examples taken from )


I have this in my code: const [dimensions, setDimensions] = useState(getDimensions())  const getDimensions = () => {    // stuff }  The function hasn't be declarated when I call it, so I get an error. But, if I declare it as a traditional function no error is going on. const [dimensions, setDimensions] = useState(getDimensions())  function getDimensions() {    // stuff }  Is there any way to do this with an arrow function?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I recently put the site for my web design business up on google. It's been online for about two weeks and according to Google Search Console, has been indexed several times. Despite this, I can only find it on google if I type the actual url into google. Typing the business name verbatim doesn't work, typing the contents of the meta description tag doesn't work. The things that do come up are a worse match. I can type my business name perfectly and things that are off by one or more characters will show up instead. I've gone to the 15th page of google search results and found nothing. The google search console is even claiming that my page has 7 total impressions, with an average position of 1. I can't tell if that's just because of me typing the url exactly or if it's actually organic. Important Note: My server automatically responds with a 301 redirect to the https url when someone goes to the http url. Does the Google indexing bot mishandle this somehow? Here is what the google search console looks like:  I have a sitemap.xml and a robots.txt. Google search console claims that it has discovered my URL, as a result of the sitemap.xml. I don't understand why it will only come up in google search when I type the exact url. The contents of the meta description and meta author tags have to be unique, and they still don't bring anything up. I should also note that I ran lighthouse on my site and got a 95/100 on the SEO portion.

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?


List of Tables can be obtained by using listoftables commands. I wonder how to skip listoftables output if the document doesn't contain any table. Thanks  \documentclass[11pt]{article}  \begin{document}  \tableofcontents \listoftables  \clearpage  \section{Dummy section 1}   \begin{table}[ht] \caption{Dummy table 1} \begin{center} \begin{tabular}{|c|c|}  \end{tabular} \end{center} \label{tab:dum1} \end{table}   \end{document}

I have a rather large project, from which I select portions based on needs. This selection is done using a complex system of \include and \input commands. I would like to generate a list of figures and a list of tables for the output, but in the case there are no figures the list of figures should not appear. The same should happen with tables.  Here is a MWE:   \documentclass[10pt,twocolumn]{article} \usepackage{lipsum} \usepackage[margin=0.75in]{geometry} \usepackage{float} \floatstyle{boxed}   \restylefloat{figure} \restylefloat{table}  \def\ignoreTable#1\end{table}{} \def\ignoreFigure#1\end{figure}{} \begin{document}  \tableofcontents \addcontentsline{toc}{section}{List of Figures} \listoffigures \addcontentsline{toc}{section}{List of Table} \listoftables  \section{First section} \lipsum[\inputlineno] \ignoreFigure \begin{figure}[H]\centering \LaTeX\LaTeX \caption{my figure} \end{figure} \lipsum[\inputlineno] \begin{figure}[H]\centering \LaTeX\TeX \caption{another figure} \end{figure} \section{Second section} \lipsum[\inputlineno] \ignoreTable \begin{table}[H]\centering \TeX\LaTeX \caption{my table} \end{table} \lipsum[\inputlineno] \ignoreTable \begin{table}[H]\centering \TeX\TeX \caption{another table} \end{table} \lipsum[\inputlineno] \end{document}     Where if I write   \def\ignoreTable{\relax} \def\ignoreFigure{\relax}   just after \begin{document} the output is:      Ideally, there would be an "elegant" macro or package, that would eliminate the list of tables, including its entry in the TOC, if there are not tables.


Some of my strings that I echo out from my database has seven \u7 (%07) attached to it, I have never seen that before, does anyone know what it is and how to remove it from the string?    I have tried:    $pat = array("\r\n", "\n\r", "\n", "\r", "\u7");   $val = str_replace($pat, '', $val);   and different php Sanitize filters  but nothing seems to remove it

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Possible Duplicate:          What's a good way to learn cooking and avoid the current trend of my life that is best summarized by this xkcd comic:  ?

Mouseover text: And yet I never stop thinking, 'sure, these ingredients cost more than a restaurant meal, but think how many meals I'll get out of them! Especially since each one will have leftovers!'    Randall Munroe really hit the nail on the head with this comic and especially the mouseover text. There's this sort of cycle that I seem to follow when I try cooking, and I need to get my way out of it. It goes like this:   Decide I should cook something. Thumb through my recipe books, find one or two recipes I like. Write down the ingredients for the recipes in a list. Go to the grocery store, stumble around for a while and eventually find exactly those ingredients. Go back home; at some point in time soon after, cook each recipe. Whew, that was a lot of work! Spend the next week or two eating junk again, until I decide I should cook something. (repeat)   Very similar to the comic; sometimes I too let the leftovers go bad (usually not). And every time I rack up a huge bill at the supermarket and think to myself it's justified because of the leftovers or the amount of food. Not to mention, that's a lot of work for just a couple of meals, and a long list of ingredients.  I love cooking fresh meals but that's just so much overhead and so time consuming! So I always resort back to Easy Mac, Ramen, frozen dinners and frozen pizza. Yuck.  How can I escape this cycle and cut down on the overhead? How can I focus on more than 2 recipes at a time without buying giant lists of ingredients and spending tons of money? Is it really worth the trouble or should I just chock it up to being a college student and wonder about the years ahead of me where I'll have much more time to spend cooking one meal at a time?


I' trying to upload my photo for the ds-160 transit visa but whenever I hit the upload photo button it gives me an error 403 or sometimes an connection error reset. Sometimes it let's me upload a photo(about once or 2x) but when I submit it, it gives me another error connection reset.   Any tips on what I should do about this?

I'm trying to apply for a B1/B2 US visa through the  but unfortunately can't get past the "Confirm photo" stage as I see the following error:    I've tried to re-upload the photo several times in both Chrome, Android Chrome and IE 11 to no avail. Is there something I can do so that I can complete my application?


There are some old questions surrounding this topic, but the landscape has changed a bit in the last couple of years. I'm looking for some fresh answers.  Why I'm looking Over the years iTunes has become increasingly bloated without adding much of anything I care about. It looks a little slicker in some ways. Less usable in others. Like the iPhone, it's just not that exciting any more.  Where I'm looking I'm considering two primary alternatives ( or ) and one outlier (, whose future seems shaky to me).  What I've got I have a large-ish library of mostly AAC files (around 65 gigs). I have one iOS device (iPad, which I hardly use) and two Androids (an Android 2.3 phone and 4.3 tablet). I listen to my library mostly on my MacBook Pros (10.6 and 10.7). I have extensively rated, categorized, and tagged (via comments) my entire catalog and I use this data to create detailed playlists.  What I expect I'm looking for something that is focused on an ordered library and listening experience; maximizing compatibility and sound quality; and killer application performance. Integration with services like Last.fm (personal fave), Pandora, and Spotify is a plus.  What have you found? Has anyone here successfully made the break? Can you help those of us who long to escape the Apple ecosystem, even if only for a minute?  Bottom line Have you made the switch successfully? If so, what app did it for you and why and can you share your tips with the rest of us? Moving a music library around is a big effort and I would love to learn from your experience before diving in.

With the recent features added to iTunes player I find it to be pretty heavy and resources consuming, just to do just what I would like it to do, which is play music. It is almost becoming a full OS which I do not like.  Therefore, I'd like to find something lightweight to build some playlists based on the music I have on my hard-drive, possibly free (but not a requisite). Do you have any alternatives which you would like to share?


I created a checkbox field on User Table named Can Unlock. I have a requirement based on this field I have to lock all opportunities for any particular user. can some help?

I have the following validation rule:  AND(  $Profile.Name <> 'System Administrator',  OR(  ISPICKVAL(PRIORVALUE(Level__c), "Archived"),  ISPICKVAL(PRIORVALUE(Level__c), "Closed")  )  )   This validation rule is on the opportunity object, and what I want to achieve is, if the picklist Level__c is either set to Archived or Closed, the opportunity record can only be edited by the System Administrator.  For some reason though, the validation rule also triggers, when I want to set the Level__c to Archived or Closed. But this is not what I want.   Any idea what's wrong with the validation rule?


I am currently using Ubuntu 20.04. My Laptop uses Intel Wireless-AC 9560 chipset.     I am getting the above comment in the Additional Drivers menu of "Software & Updates". As you can see I am able to connect to my WiFi perfectly without any problems still I see the "This device is not working" message in the Additional Drivers section.  Is this a bug of some kind? How do I solve it such that I am able to see something similar to what I see right now for my Nvidia Graphics.   I can also confirm that I see the required firmware installed in my Laptop (double checked from the Intel website).   Note : I have my exact question . I thought I'll edit it because the image was not in English and didn't state any information except that it wasn't working. But some people (not all :) ) just rejected my review without even giving any proper explanation. Actually, there was the automated reason that I should have written it as a comment or an answer (wow, do people just review edit suggestions for the sake of it?). I hope that at least you'll look at my profile and understand that I don't have commenting powers as of yet (ouch). I request you to not mark this question as duplicate as I need some solution (enter an innocent puppy face).

Recently I've installed Kubuntu in a newly bought laptop with an Intel WiFi 6 AX200 network card, I can connect to the wifi without apparent problems but when I open the driver manager in the settings I face this weird situation:  Intel Corporation: Wi-Fi 6 AX200 This device is not working.  [ ] Using iwlwifi driver backport in DKMS format from backport-iwlwifi-dkms (open source)  [ ] Continue using a manually installed driver  [x] Do not use the device   Note that "Continue using a manually installed driver" is the only voice selectable in the list.  Here is some additional information:  $ lspci -nnk | grep 0280 -A3 02:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)         Subsystem: Intel Corporation Wi-Fi 6 AX200 [8086:0084]         Kernel driver in use: iwlwifi         Kernel modules: iwlwifi  $ rfkill list all 0: hci0: Bluetooth         Soft blocked: yes         Hard blocked: no 1: phy0: Wireless LAN         Soft blocked: no         Hard blocked: no  $ dmesg | grep iwl [    2.888227] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002) [    2.945179] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-cc-a0-50.ucode failed with error -2 [    2.945217] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-cc-a0-49.ucode failed with error -2 [    2.947244] iwlwifi 0000:02:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 43.2.23.17 [    2.947250] iwlwifi 0000:02:00.0: Found debug destination: EXTERNAL_DRAM [    2.947252] iwlwifi 0000:02:00.0: Found debug configuration: 0 [    2.947697] iwlwifi 0000:02:00.0: loaded firmware version 48.4fa0041f.0 op_mode iwlmvm [    3.145585] iwlwifi 0000:02:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340 [    3.159226] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM [    3.160060] iwlwifi 0000:02:00.0: Allocated 0x00400000 bytes for firmware monitor. [    3.336456] iwlwifi 0000:02:00.0: base HW address: 50:eb:71:d7:0b:40 [    3.353553] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0 [    4.457920] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM [    4.621843] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring [    4.629999] iwlwifi 0000:02:00.0: BIOS contains WGDS but no WRDS   Someone have idea why this happened?


If work done by a conservative force in a closed loop is zero then why is the work done by a non conservative force not equal to zero. Since in both the cases the body moves in a closed path so the displacement must be equal to zero.

Work can be calculated by $W = Fd\cos\theta$ where $\theta$ is the angle between the force $F$ and the displacement $d$  Let's say there's a ball and a (physically ideal - no friction etc.) robotic arm situated in otherwise empty space. The arm takes the ball, moves it around in a circle, and then returns it exactly to where it started. The arm also returns to its starting position.  In this case, there is no displacement overall. The ball and the robot arm are in the exact same positions as when they began.  Thus, $W = F\cdot 0 \cdot \cos\theta = 0$ So no energy was required to move the ball in a circle.  However, this disagrees with my intuition, because if I were to make a robot arm that would do this, I feel like I would need to give it an energy source (for example, a battery), and that by the time the robot was done, I would have lost energy from that battery.  Does the movement require energy? If so, where did I mess up in my calculation? If not, why would my robot need a battery pack or some energy source in order to make this movement? (If it doesn't, please explain.)


Most people say $0 ^ 0$ is indeterminate, but that's in the context of limits. I mean $0 ^ 0$ when the zeros are absolute.   I've seen that one way to define exponentiation of natural numbers is saying that $a ^ 0 = 1$ for any natural $a$ (including zero), and $a^{1+n} = a * a ^ n$  Under this definition there is no problem, but my concern arises because in the construction of natural numbers, as in Von Neumann's using sets, natural are not the same non-negative integers. Integers are constructed as pairs of natural numbers.  So what would be the value of this expression $0 ^ 0 + (-4)$? You can not just replace $0 ^ 0$ by $1$ using definition above and say the result is $-3$, because you can not operate a natural with an integer. They are different structures. For this expression been properly defined it is needed to be a definition of exponentiation in integers where $0 ^ 0 = 1$  Or perhaps it is not correct to define exponentiation in integers, since it would not be closed. But it would be closed in the complex numbers. What is the definition of exponentiation in the complex, using set theory?  Is it possible that $0 ^ 0$ is equal to $1$ only with natural zeros but not with the zeros of other numerical sets?

I have been a witness to many a discussion about numbers to the power of zero, but I have never really been sold on any claims or explanations.  This is a three part question, the parts are as follows...    1) Why does $n^{0}=1$ when $n\neq 0$?  How does that get defined?  2) What is $0^{0}$?  Is it undefined?  If so, why does it not equal 1?  3) What is the equation that defines exponents?  I can easily write a small program to do it (see below), but what about in equation format?    I just want a little discussion about numbers to the power of zero, for some clarification.    Code for Exponents: (pseudo-code/Ruby)  def int find_exp (int x, int n){     int total = 1;     n.times{total*=x}     return total; }


There are many font websites, that are eager to sell you fonts, or let you download them for free. So many that there is no way to know which are legit, and give the money to the copyright/license holder for the font. Is there a good central location to search who owns the copyright/license for fonts that can be found online?  In my current specific case, I am trying to find out if I can use "A L Heavenly" for commercial purposes, but have not been able to track down who owns the license beyond the name "", and that it has been .  So is there a good way to track down authors when the licensing info on font websites is not completely trustworthy?  Note: yes, I realize the question is very similar to , but in my case, what I want to know is what options are available in terms of a reliable, trustworthy, website that has links to contact the font authors (something most sites I have run into do not seem to have) or which can be trusted when they state a font's license (as free, or licensed by paying through the site).

Is there a way to find out whether a font is authentic or fake? Font files both online and on my machine are often of unclear origin, yet I'd like to be sure that I paid for the fonts that are commercially available and that I have a genuine original.  Is there a way to check the authenticity of a font file?  I am interested mostly in Type 1 fonts (.pfm and .pfb files), but also an answer for Open Type (otf) and True Type (.ttf) would certainly be useful.


I submitted a manuscript to ScholarOne about 10 weeks ago. I'm aware of the typical workflow of a journal. There are two bullet points that have remained unchanged for about 8 weeks now - one saying 'awaiting reviewer scores' and the other saying 'awaiting recommendation'. From reading other posts, these don't seem to usually be said together - does it usually just say one or other? What does this mean?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


I have copied Ubuntu Desktop to a blank DVD. However, when I boot my PC with Windows Vista, it doesn't prompt me to install Ubuntu.  Where are my getting all wrong?

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


I just received an email from my website internet provider that my server has been "involved as open resolvers in DDoS attacks (DNS Reflection) over the past few weeks."  Here is the full email:     Subject: DNS amplification attack  Dear Sir or Madam,      We have received spam/abuse notification. Please take the necessary   steps to prevent this from happening again in future.      Furthermore, we would request that you provide both ourselves and the   person who has submitted this complaint with a short statement within   24 hours. This tatement should include details of the events leading   up to the incident and the steps you are taking to deal with it.      Next steps:   - Solve the problem   - Send your statement to us   - Send your statement to the person making the complaint per email      The details will then be checked by a colleague, who will coordinate   further proceedings. In the event of several complaints, this may lead   to the server being locked.   ----- attachment -----      Dear Sir or Madam,      We have been informed that IP addresses from your network range have   been involved as open resolvers in DDoS attacks (DNS Reflection) over   the past few weeks.      Please see the attachment to this message for the IP addresses of the   open DNS servers in your network range.      ----- log file -----      Affected IP: 176.9.1.67      Thank you,   What can I do to confirm this and to identify the origin of this attack?  Thanks Eco

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I have the problem, that my footnote number does not appear as superscript at the word. Instead it appears as normal number directly after the word. This is part of a template I should use. However, the problem seems to be with the macro.  If I uncomment the macro, the footnote appears in the superscript, but is than also smaller at the bottom of the page. I already searched for a solution, but did not find anything.  So, how do I keep the footnote big at the bottom and also appearing as superscript? Also this is similar to the other question (), I had the specific problem with a macro in my template, which was apparently not correct.   \documentclass[fontsize=12pt,BCOR=15mm,DIV=15,a4paper,headsepline,headings=small,twoside,openright,fleqn,appendixprefix]{scrbook}  \usepackage[utf8]{inputenc} % Zeichenkodierung \usepackage[T1]{fontenc} % Trennung von Wörtern mit Umlauten \usepackage{lmodern}  \usepackage[hang,stable]{footmisc} %Große Zahlen in Fußnoten \makeatletter \def\@makefnmark{\hbox{\normalfont\@thefnmark}} \makeatother \let\footnotesize\small \begin{document} \begin{enumerate} \item First item\footnote{adfasdf} \end{enumerate} \end{document}

I want the footnote mark to be superscripted in the text body (e.g. Footnote mark²), but normalsize in the foot, to be shown like:  ________________ 2. Some footnote text   Also, it would be nice if the mark appeared hanging in the left margin, like     ________________ 2. Some footnote text   (That is recommended by Bringhurst in his Elements of Typographic Style)


On page 140 of , author Bruno Bettelheim writes:     The verses Falada speaks three times—each time in response to the goose   girl’s lament on encountering its head: “Oh, Falada, thou who hangest   there”—do not so much bemoan the girl’s fate as express the helpless grief    of her mother.  Falada’s implied admonition is that not only for her sake,   but also for her mother’sd, the princess should stop accepting passively   whatever happens to her.  It is also a subtle accusation that, had the   princess not ated so immaturely in dropping and losing the handkerchief and   in letting herself be pushed around by her maid, Falada would not have been   killed.  All the bad things that happen are the girl’s own fault because she   fails to assert herself.  Not even the talking horse can help her out of her   predicament.   I really had difficulty in understanding what that paragraph's first sentence means, the one that without the part surrounded by dashes runs      The verses Falada speaks three times do not so much bemoan the girls fate as express the helpless grief of her mother.   Does it mean one of these three?   Falada doesn't bemoan the girl's fate as her (the girl's) mother does. As Falada expresses her (the girl's) mother's helpless grief, he doesn't bemoan the girl's fate that much/ Although Falada expresses her mother's grief, he doesn't bemoan the girl's fate that much/   I thought if express were expressing, it would make more sense. Whatever it is, I still don't understand what it means.

I am not sure of the meaning of this sentence:     The significance of culture and identity in development has to do not so much with the cultural factor in the process of development as with abandoning Eurocentric development thinking.   I'm not sure what the use of as is supposed to convey. Does it mean "development has to do not so much ... as with abandoning", i.e. not as much as abandoning? Does the abandoning have more to do with it?  And the second question: Why does it use "has to do not so much". Why not "has not so much to do"? Is "have to" a verb?


Question: What points in the complex plane satisfies $|z|=arg(z)$.  Work thus far: Let $z=a+bi$ and $arg(z)$ is the angle between the vector $z$ and the axis. So $|z|=\sqrt{a^2+b^2}$ and $a=|z|\cos(\theta),b=|z|\sin(\theta)$. I would expect from intuition that the shape traced out by the points is a spiral. From here I don't how to proceed. Any hints would be appreciated.

Im trying to find all set of points on the complex plane for which $|z|=\arg z$.  I rewrote $|z|= \sqrt{x^2 + y^2}$ and $\arg z$ as $\tan^{-1}(y/x)$.I set them equal But im not sure what to do next.


I have to show the following inequality: $$ \sum_{k=0}^{\infty} P[Y>k] \leq E[Y] \leq \sum_{k=1}^{\infty} P[Y>k]$$ under the condition that Y is a non negative continuous random Variable.  My first idea was to rewrite the inequality using integrals, but then i end up having to integrate over a sum, which is nothing im particulary excited about. Any Ideas on how i can do this?

I'm working through a problem regarding expected values in Markov chains, and at some point it says:     Recall from probability that if $X$ is a positive integer valued random variable, then $\mathbb{E}[X] = 1 + \sum^\infty_{k=1}\mathbb{P}(X > k)$.   I know that by definition $\mathbb{E}[X] = \sum_a a\mathbb{P}(X = a)$, but I can't see how the above equality follows from this, nor am I sure if this is how to approach the problem.


A dedicated ELL contributor has just brought a grammar issue in a review queue prompt to our attention (thank you Davo!).   Apparently the reason description under the "Not suitable for this site" close category contains an error: "a" precedes a word starting with a vowel where "an" should be used. I am not sure this is something that affects other sites whose names also start with vowels--it would appear so--but it has been spotted on ELL where I am a moderator. This issue doesn't seem fixable within the scope of tools made available to mods. How do we fix this? Possible solution: Shall we just change the description to "This question doesn't meet [site name] guidelines"?

I was reviewing close votes on Ask Ubuntu, and noticed a grammatical error in the reasoning message:  Currently, it says:  This question doesn't meet a Ask Ubuntu guideline  It should say:  This question doesn't meet an Ask Ubuntu guideline  I'm posting this here since there are other SE sites with names that begin with a vowel sound (e.g. Interpersonal Skills and Esperanto). I know this is probably a bit of a fiddly bug, and it's not really that major, but, if possible, it should probably be fixed. Alternatively, changing the sentence to avoid the problem completely could work:  This question doesn't meet a guideline on Ask Ubuntu


I am currently running Windows 7 as the only OS and I am wondering if it is possible to install Ubuntu as secondary OS, which would only be accessible via some explicitly called boot menu - by that I mean that after I am done with installing Ubuntu and setting this up, if I restart PC it would boot exactly like it does now, when only Windows 7 is installed. If I would want to access Ubuntu, I would have to press some key to bring up boot menu before Windows loads (or just go straight to Ubuntu without any menu actually).  Is this possible?

Which one to setup first and how to partition the disk to have Windows 7 and Ubuntu dual boot? Which one is better to boot load? Any guide in details?


Half of my custom skin doesn't change when I edit it and save and upload it and it's frustrating because I'm just trying to make that half black... Can anyone help me out?        [  I'm using 1.7.10, but it let me change my skin before but not now, so it's just weird.

Half of my custom skin doesn't change when I edit it and save and upload it and it's frustrating because I'm just trying to make that half black... Can anyone help me out? It's only the legs and arms that aren't turning black when I want them to...  I'm using 1.7.10, but it let me change my skin before but not now, so it's just weird.


If the only thing that ClassA does is to subscribe to events from ClassB -which is a long living class- like this  static void Main() {    new A(B); }  class ClassA {   public ClassA(ClassB b)   {      // subscribe to events of ClassB   } }   Does this make ClassA garbage collected?

If I have the following code:  MyClass pClass = new MyClass(); pClass.MyEvent += MyFunction; pClass = null;   Will pClass be garbage collected? Or will it hang around still firing its events whenever they occur? Will I need to do the following in order to allow garbage collection?  MyClass pClass = new MyClass(); pClass.MyEvent += MyFunction; pClass.MyEvent -= MyFunction; pClass = null;


When I right-click a table in Object Explorer and click "Script Table" I can get SSMS to script my table.  Can I do that with T-SQL code?  I'm after the "CREATE TABLE xx" code that SSMS generates, so that I can take the script and use on other projects. I need all the bits and pieces, including PRIMARY KEY, CONSTRAINTs, "WITH (PAD_INDEX = " and schema declaration.  I'm on SQL Server 2014

Is there a way to generate a create script from an existing table purely in T-SQL (that is without using SMO, since T-SQL does not have access to SMO). Let's say a stored procedure that receives a table name and returns a string that contains the create script for the given table?  Now let me describe the situation I'm facing, as there may be a different way to approach this. I have an instance with several dozen databases. These database all have the same schema, all the same tables, index and so on. They were created as a part of a third party software installation. I need to have a way to work with them so that I can aggregate data from them in ad-hoc manner. Nice people at dba.se have already helped me here   Currently I need to find a way to make a select from a table across all the databases. I have recorded all the database names into a table called Databasees and I wrote the following script to execute a select statement on all of them:  IF OBJECT_ID('tempdb..#tmp') IS NOT NULL DROP TABLE #tmp  select * into #tmp from Database1.dbo.Table1 where 1=0 DECLARE @statement nvarchar(max) =    N'insert into #tmp select * from Table1 where Column1=0 and Cloumn2 =1'  DECLARE @LastDatabaseID INT SET @LastDatabaseID = 0  DECLARE @DatabaseNameToHandle varchar(60) DECLARE @DatabaseIDToHandle int  SELECT TOP 1 @DatabaseNameToHandle = Name, @DatabaseIDToHandle = Database_Ref_No FROM Databasees WHERE Database_Ref_No > @LastDatabaseID ORDER BY Database_Ref_No  WHILE @DatabaseIDToHandle IS NOT NULL BEGIN    DECLARE @sql NVARCHAR(MAX) = QUOTENAME(@DatabaseNameToHandle) + '.dbo.sp_executesql'   EXEC @sql @statement    SET @LastDatabaseID = @DatabaseIDToHandle   SET @DatabaseIDToHandle = NULL    SELECT TOP 1 @DatabaseNameToHandle = Name,   @DatabaseIDToHandle = Database_Ref_No   FROM Databasees   WHERE Database_Ref_No > @LastDatabaseID   ORDER BY Database_Ref_No END  select * from #tmp DROP TABLE #tmp   However the script above fails with the following message:     An explicit value for the identity column in table '#tmp' can only be   specified when a column list is used and IDENTITY_INSERT is ON.   Adding this:  SET IDENTITY_INSERT #tmp ON   does not help, since, I can't specify the column list and keep it generic.  In SQL there is no way to switch the identity on a given table off. You can only drop a column and add a column, which, obviously changes the column order. And if the column order changes, you, again, need to specify the column list, that would be different depending on the table you query.  So I was thinking if I could get the create table scrip in my T-SQL code, I could manipulate it with string manipulation expressions to remove the identity column and also add a column for the Database name to the result set.  Can anyone think of a relatively easy way to achieve what I want?


So I have a layman question. If we look at the angle of the sun rays, doesn't sun seem much closer than it is [150 million kilometers]  cant we take those angles that the sun makes with the earth, take approximate distance from those points and use angle-side-angle to calculate the distance from sun to earth?  how can we even get these angles if the sun is so far away

Consider this picture of sun beams streaming onto the valley through the clouds.    Given that the valley is only (at a guess) 3km wide, with simple trigonometry and the angles of the beams, this gives the result that the position of the light source is being a few tens of km away at most.   What is wrong with the analysis?


Where and how do I request for a new category/Q&A site?  What are the qualifications/requirements (if any have been set)?

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


I am writing a script which loops into recent files in a folder and executes a command...   #!/bin/bash cd /home/Downloads recent_files = ($(ls -t | head -20)) for file in "${recent_files[@]}" do     ./cmd $file done   I get the following syntax error:  line 3: syntax error near unexpected token `(' line 3: `recent_files = ($(\ls -t | head -20))'

I want to assign the result of an expression (i.e., the output from a command) to a variable and then manipulate it – for example, concatenate it with a string, then echo it.  Here's what I've got: #!/bin/bash cd ~/Desktop; thefile= ls -t -U | grep -m 1 "Screen Shot"; echo "Most recent screenshot is: "$thefile;  But that outputs: Screen Shot 2011-07-03 at 1.55.43 PM.png Most recent screenshot is:   So, it looks like that isn't getting assigned to $thefile, and is being printed as it's executed. What am I missing?


I have an equation, such as:  \documentclass{report}  \begin{document}  \chapter{hello} \begin{equation} x=1 \end{equation}  \end{document}   And the equation appears as "x=1 (1.1)".    What I want is "x=1 (1)" ignoring the chapter number.  How do I get that?  Thank you.

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


I was wondering how I could get it so the window for tkinter would close when a button is clicked, any help is appreciated. Below is part of my code.  def ynumber_chosen():     class number:         def __init__ (self, root):             root.title('Picking a row')             root.minsize(width = 3, height = 225)             root.maxsize(width = 3, height = 225)              label = Label(root, text = "Pick a row")              self.button1 = Button(root, text = "1", height = 3, width = 7, command = ynumber1)             self.button1.grid(row = 0, column = 1)             self.button1 = Button(root, text = "2", height = 3, width = 7, command = ynumber2)             self.button1.grid(row = 0, column = 3)             self.button1 = Button(root, text = "3", height = 3, width = 7, command = ynumber3)             self.button1.grid(row = 2, column = 1)             self.button1 = Button(root, text = "4", height = 3, width = 7, command = ynumber4)             self.button1.grid(row = 2, column = 3)             self.button1 = Button(root, text = "5", height = 3, width = 7, command = ynumber5)             self.button1.grid(row = 3, column = 1)             self.button1 = Button(root, text = "6", height = 3, width = 7, command = ynumber6)             self.button1.grid(row = 3, column = 3)             self.button1 = Button(root, text = "7", height = 3, width = 7, command = ynumber7)             self.button1.grid(row = 4, column = 1)       root = Tk()     app1 = number(root)     mainloop()

How do I end a Tkinter program? Let's say I have this code:  from Tkinter import *  def quit():     # code to exit  root = Tk() Button(root, text="Quit", command=quit).pack() root.mainloop()   How should I define the quit function to exit my application?


Nowhere near as impressive as all the Greasemonkey scripts and custom parsings that are out there, I did take a few moments to follow The TXI's suggestion over in the blog and use Google Custom Search to create a quick search engine for the SO network. Afterall, I think Jeff himself has said that searching Google is a great way to get at some of the questions in there.  If anybody is interested in collaborating or anything to make the CSE work better, please let me know and I'll be happy to add you to the collaboration control panel.  The "hard" link is:   though I have a "friendlier" redirect setup for now by going to:   Hope this helps some folks out there!

There should be an easy way to search Server Fault from Stack Overflow (and the others)  The easiest thing would be to add a "Try searching Server Fault" link next to the "Alternately, try your search in Google:" on the no-results page, but this wouldn't help with overlapping searches..  For example, searching for [sql] error 1234 might have better results of ServerFault, but a programmer might only searching SO for such a problem (a reasonable thing to do)  Maybe there could be a SO/SF/SU/Meta buttons at the top of the search results, which jump you between sites?  Since the user may not be logged into ServerFault, I guess it'd be best to display the results on the current site (with the different colour scheme maybe?), obviously all the links would go to the correct site (http://serverfault.com/questions/... in the example image)  A good example of such a feature is Google.


It is pretty well common consensus on Stack Exchange that down-voting without commenting is not ideal, but shouldn't be stopped either.  This  for example, talks about the policy.  I would like to suggest a middle ground - a means of encouraging good commentary on why a down vote is being cast, but not hard-enforcing it either.  Whereas others have pointed to  or , I would suggest a simple incentive approach.  Currently, it costs a user 1 reputation to cast a downvote.  I would like to incentivize people with what they really care about - points.  The proposal is this:     Casting a downvote would cost 2 points, or only 1 point, if you leave a comment as to why.   Nothing changes for the would-be anonymous downvoter, except they get a little more expensive. The constructive comment leaver, however, is penalized less.

Possible Duplicate:          I know that this issue has been raised a number of times in the past, with some improvements being made to reduce the negative impacts it has on discussion, but the problem persists, and I would like to suggest a further change.  I am aware that the need to preserve anonymity when voting is an important aspect of the design of the community, and that making comments mandatory on downvotes would negate that.  What I am suggesting is that downvotes, without comments, should cost the voter the same number of Rep Points as the owner of the Answer. So that, if I were to downvote another user's Answer, I would lose 2 Rep Pts as would they.  I know there is a small notification bubble which pops up suggesting the voter add a comment to explain the vote, but it seems that is not encouraging alot of users to do so. If the same bubble basically illustrated a reward for the voter in adding a comment "If you add a comment, explaining your vote, you will gain 1 Rep Pt." there may be a greater engagement for people to do so.  (Yes, I am raising this as I have had 2 downvotes - and no other actions on my answers - in the last 48 hours with no comments, no explanations and no ideas why they did so. But I still think there is merit in this idea all the same.)


is making several poor quality wiki tag edits.   If you look at , they've acquired over 100 points making these edits over the last couple of days. Somehow their edits have slipped past the review stage: the ones I have inspected are of sufficiently poor quality to be rolled back.  How can I flag this for moderator attention? Is there a way to do this from the review queue screens?

This particular  seems to be on a tag wiki editing spree. I've noticed quite a few tag edits which are very trivial and offer very less information. And I happened to see quite a lot of the tag wiki edits in the reviews queue even today.  My question is, how do I flag such an user for moderator attention? Because there is no flag option in the review page of a tag wiki edit, nor does the tag page have an option to flag.


Was taught in grammar school that this was taboo (1950's, South Africa). Today the split infinitive seems to be the standard in the USA.  Changing standard? It's always even that way in the US?  What is the standard in England today?

Mark's generosity in this crisis seems to more than make up for his earlier stinginess.   Should those sentences always be avoided, or are there cases where they are valid?


Been trying to code a linear search algorithm in Java following some pseudocode that we've been given. (Sorry if this is a stupid question)  I'm fairly new to Java, there's probably an easier way of doing this, but I'm just unsure as the pseudocode doesn't seem to be working correctly. I tried fiddling around with the numbers - is there a quick fix?  I've used the following code, but keep getting a 'java.lang.ArrayIndexOutOfBoundsException'  // Linear Search Standard Algorithm private static void linearSearch() {      // Declare a new scanner object     Scanner in = new Scanner(System.in);      // Declare variables used in the program     String[] arr = new String[] {"Mick", "Jerry", "Bob", "Chris"};     String name = "";     boolean found = false;     int position = -1;     int counter = -1;      // Prompt User to enter a value to be searched for     System.out.print("Search For: ");     name = in.nextLine();      // Search for the requested item     while (found == false || counter < arr.length) {          counter += 1;          if (name == arr[counter]) {              found = true;             position = counter;          }      }      // Output whether the variable was found or not     if (found == true) {          System.out.println(name + " was found at position " + position + " of the array.");      } else {          System.out.println(name + " could not be found in the array.");      }  }

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?


I have a computer in my home LAN, and i have successfully set up my computer and router to use wol over Internet.  The problem is, after a period of time(say, a night), the next day i want to start my computer over Internet it failed, but it can be waken up from home LAN.  I have the correct public IP of my router. I use  for WOL over Internet  The answer for  seems good, but i don't think it explains why WOL over Internet fail but WOL success.

My problem has become pretty specific but probably pretty easy to solve. I've followed numerous guides on the internet to setup wake on lan and managed to get it working quite good although I still have one issue.  I can wake up my computer via LAN and even over 3G, but when I'm sending over 3G I can only send about a minute or two after I shut down the computer (might be longer), but if it takes much longer my computer won't boot.  The guides mentioned something about the router forgetting my MAC address after some time, but if that is the problem, should it work over a private network?, and how do I resolve this issue?  I've installed DD-WRT on my DIR-615 router. The computer I want to wake up  is running Windows 7 Ultimate.


I have recently booked an almost last minute flight within Europe.  I got prices, for the absolute same flight, that range from under 30€ to more than 200€. Variations of ~30€ are kind of normal but this is extreme.  Looking at the company website I got prices over 200€. When I looked in skyscanner I found a whole myriad of prices. Being cheap ones through online travel agencies where you book and wait for confirmation.  How is this possible? What mechanisms are in place for them to access these cheap tickets? Is the delivery delay related?

Based on the question , I got curious. Is there a guide or resource that describes how the price of a ticket is determined?  When you search you often see curious effects like cheaper tickets for a flight from A to B with a layover compared to a direct flight. This seems counter-intuitive from an outsider's perspective since you fly twice. Also one way tickets more expensive than 2 ways.  It can be a short set of rules. Something that helps someone to get started with finding good prices. I know these can be very complex and they probably change over time and over airline interests but there is probably a simplified set of rules that can be enunciated.


I would just like to test and try doorstop / see doorstop in action on my Ubuntu laptop.  In the instructions here  it says that if I pip3 install doorstop, doorstop should then be available on the command line. However, when I do this and then try to use doorstop on the command line I get doorstop: command not found. If I run Python3 and import doorstop (which seems to work), in Python3 I still haven't been able to use any of the commands on the doorstop website. I also haven't seen any information about this online.  Thanks, Milan  EDIT: Question solved in the comments by @steeldriver (use sudo or adjust PATH variable). You can also use doorstop in Python with the doorstop.___ syntax. :)

after installation with  pip3 install --user steem-piston you will get a new executable piston installed in ~/.local/bin   I installed the tool using pip install, but I cannot find the executable file.  I'm not quite sure I understand what this directory is: ~/.local/bin.  Is it just root/local/bin?