I've got a figure, which is displayed fine:      \begin{figure}[htbp]     \centering         \begin{subfigure}[b]{0.48\textwidth}                 \includegraphics[width=\textwidth]{xp_potato.eps}                 \caption{X and P in the complex plane}                 %\label{fig:xp_potato}         \end{subfigure}%         \begin{subfigure}[b]{0.48\textwidth}                 \includegraphics[width=\textwidth]{xp_amp.eps}                 \caption{Phase modulated amplitdue}                 %\label{fig:xp_amp}         \end{subfigure}      \label{fig:xp}   \caption{\textbf{Quadrature balancing problem.} ...} \end{figure}   and now I would like to reference it (after the figure):  \hyperref[fig:xp]{Figure ~\ref{fig:xp}}   But I get this result: "Figure ??"  However when I click on it, my viewer jumps to the right figure. This scheme works fine through out my whole thesis. How can I fix this reference?

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


HI. can you suggest me how to handle this popup as i have used almost every handler to handle it but still no result? please provide some solution. the highlight is shown which is to be handled. answer ASAP.

This is the code for an opening specific page and after that popup appear which I am unable to handle.  I have used alert, switchTo, etc..  //Open Browser   WebDriver driver = new ChromeDriver();  //Enter the URL   driver.get("https://www.mariatash.com/");    //I Agree PopUp   driver.findElement(By.xpath("//button[contains(text(),'I Agree')]")).click();    driver.findElement(By.xpath("//a[.='Appointments']")).click();    //after this, that popup appears and then its get stop.... u can find it in the image below   Suggest some way to close it.


Are both is equal to and equals similar in meaning? Which is the more natural?  For example, one plus one equals two or one plus one is equal to two.

Which is correct?  Given 240 kph (240 kilometres per hour) = 149 mph (149 miles per hour)  How does one say this?     -240 kph equal 149 mph.   -240 kph equals 149 mph.   -240 kph is equal to 149 mph.   -240 kph are equal to 149 mph.    Is 240 kph singular or plural (kilometre or kilometres)? Or 240 kph is a separate kind of thing?


On field detail page, there are two different buttons called Set Field-Level Security and View Field Accessibility. What is the exact difference in them.

There are two buttons that seem very similar when viewing the detial page for an object: Set Field Level Security and View Field Accessibility. They both seem to allow you to set the field level security.  Are these ("Field Level Security" and "Field Accessibility") basically the same thing?


I have an image inside a TikZ node. There should be a border around the image, with no gap. The border should have a specified line width. My problem is that the border seems to be drawn underneath the image. I use inner sep=0 to remove the gap between image and border. The effect is a border with half the intended line width, as demonstrated in the first example: \documentclass[tikz,margin=10pt]{standalone} \begin{document}      % Red border to distinguish from example image, which also has a border     \begin{tikzpicture}         \node[draw=red, inner sep=0mm, line width=10mm] {\includegraphics{example-image-a}};     \end{tikzpicture}      % Shows that part of the border was hiding behind the image     \begin{tikzpicture}         \node[draw=red, inner sep=10mm, line width=10mm] {\includegraphics{example-image-a}};     \end{tikzpicture}  \end{document}  I can think of two workarounds:  Set the inner sep to half the border width. That way the border should have exactly the space it needs. Keep inner sep=0 and set the line width to twice the intended value. Accept that the border is halved, therefore double it beforehand.  Is there a more elegant solution? Can we tell TikZ to draw the node border after the image? I could live with a small part of the image covered by the border.  Update after question was closed as duplicate: The linked question has significant overlap and helps me in my specific situation. Good! However, the question whether it's possible to draw the border above the node content is not answered by the other question and remains open. The answer to this question could prove useful to people who want the node border drawn last for other reasons. The linked question may not be useful for them.

How do I let circle borders only grow to the outside? If I write  \node[circle, draw, minimum size=2cm, line width=4mm] {};   Then the inside of the circle has a diameter of 16mm, since 2mm of the 4mm grow inside the 2cm and 2mm of the 4mm grow outside of the 2cm. How do I get the circle to only grow to the outside? The trivial answer would be  \node[circle, draw, minimum size=2cm+4mm, line width=4mm] {};   Is there a better way of doing it? (Meaning a command that is intended for this?)


I installed the latest version of Eclipse using the installer wizard. (I was following the instructions in the following .)  I can run eclipse from the command line as follows:  $ ~/eclipse/java-neon/eclipse/eclipse   I was wondering if I could set it up so that I can run Eclipse by just typing:  $ eclipse   However, I am not sure whether it is "better" to add the folder ~/eclipse/java-neon/eclipse/ to the PATH, or to add a symbolic link to the eclipse executable to one of the directories in the current PATH. (In case it is recommended to add a symbolic link, which of the directories is preferred?)

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


I just came across the fact that templates can not conform to the separate compilation model (as in they cannot be separated into .h and .cpp files). The two solutions I can find on the internet are as follows:   Either add the implementation inside the .h file or (forgive me for saying this!) including the .cpp file. Include multiple implementation versions for the same function with different data types. For example in the header file:template<class T> void function(T val);   and in the implementation file:  void function<int>(int val){ //do stuff for int input } void function<char>(char val){ //do stuff for char input }   for as many types as you can name.  But these solutions have the following disadvantages:   The first is that the source code is view-able for any one using your library. The second is that you can not anticipate user defined types    I am trying to figure out how do library creators go about handling these issues? How do can they create generic data types, and hide their implementations?

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


Suppose n is a product of distinct odd primes. Show $a^{\phi(n)+1}\equiv a $ (mod $n$). Let $\phi(n)$ be the Euler Totient function.   I let $n = p_1p_2\cdot\cdot\cdot p_k$ for $p_i > 2$ and each of the $p_i$ are distinct.   I let $a = q_1^{r_1}q_2^{r_2}\cdot\cdot\cdot q_m^{r_m}$ for primes $q_i$.   There are two cases: either gcd(a, n) = 1 or gcd(a, n) is a product of some of the primes.   I can easily figure Case 1 by using Euler's Theorem and the Chinese Remainder Theorem.  I'm having problems figuring out the second case. Any suggestions of where I might start?

I want to know a proof of an alternative form of Fermat-Euler's theorem   $$a^{\phi (n) +1} \equiv a \pmod n$$   when $a$ and $n$ are not relatively prime.   I searched some number theory books and a cryptography book and internet, but there were only proofs of the original theorem  $a^{\phi (n)} \equiv 1 \pmod n$ or in case n=pq which is used for RSA. So I would be very thankful if someone show me a proof or book I should read.


I am not a physicist, but I know the first law of thermodynamic (conversation of energy), and I have connected this with an idea that came to my mind some time ago to create perpetual motion machine which impossible according to the first law of thermodynamic.  This spinning wheel is made of ferromagnetic material ,So a force will be applied on the wheel causing a torque ,If we put this in place with no air ,and these are permanent magnets so they are going to apply a force permanently,and the atoms in the ferromagnetic material will not be aligned because the permanent are in opposite directions so how would this wheel stop acceleration ?

There are many videos on youtube in which people arranged magnets in circle and rotated one placing in middle of that circle on a shaft, and the magnet (magnet motor) starts madly and continues its movement. Do they really rotate infinitely? If so, do they from where they get that extra energy to move so fast and infinitely?    EDIT: This question is about real world scenario  UPDATE: I am unable to find that particular video about which i talked about -- I added them to my favourites, but they are all now deleted :( -- there are hundreds of that that kind of videos. Some example videos links


I'm try to track a video with a garage.  I tracked the garage and the solve error is 0.11 because there is no movement, and now I want to model a sci-fi door that will be placed instead of the garage door.  The problem is when I set origin, the wall and floor and the other things like X and Y axis the placed content that will be made when I click on setup tracking scene is not in the right place.  When I click setup tracking scene a floor for the shadows and a cube will generated, and this floor should be on the ground of the garage video to catch shadows from the later modeled things, but I can't align it right.  How can I make it? I know I can rotate the camera self but I can't get it good.  And the second thing is  I want to make a sci-fi door and normally the set origin should be for the this. I tried it with tripod and then solve, then without it and set other scale but nothing helps.  Here is the file with the tracking, you only need to solve it:     Here is the file of the door:

I've found a number of how-tos for solving video but I'm just looking to put an element in a photo and can't seem to find a how-to for that.  Is it possible in blender to do a camera solve with a still image?  Thanks.


I would like to know if there is any proof without using the fact that:  $$\lambda_1\cdot\lambda_2\cdot\ldots\cdot\lambda_{n-1}\cdot\lambda_n = det(A)$$  I managed to prove that if $\lambda = 0$ then, A is singular, by:  $$ det(A-\lambda\cdot I)=0 \Rightarrow det(A-0\cdot I)=0 \Leftrightarrow det(A)=0 $$  However I can't prove that if A is singular then, $\lambda = 0 $.  I talked to my teacher and he told me that maybe I could prove by induction that:  $$ p(\lambda)=a_n\lambda^n+\ldots+a_1\lambda+a_0 $$  where,  $$a_0=det(A)$$  Then:  $$ p(\lambda)=a_n\lambda^n+\ldots+a_1\lambda\Rightarrow p(\lambda)=\lambda(a_n\lambda^{n-1}+\ldots+a_1) $$  which guarantees that $\lambda=0$ is an eigenvalue.  If anyone could help, I would greatly appreciate it.

I'm trying to prove that statement: Prove that $\lambda = 0$ is an eigenvalue if and only if $A$ is singular.  I'm not sure if my proof is totally correct:  Suppose that $\lambda = 0$ if det(A) = $\lambda_1 \cdot \lambda_2 . . .\lambda_n = 0$ then A is singular.  If anyone could show me a better proof that would help.


Hi I'm new in Linux and I need your help :)  Every time when i type sudo apt-get update it shows:  alphaog@alphaog-HP-Pavilion-DV7:~$ sudo apt-get update E: Type 'ain' is not known on line 3 in source list /etc/apt/sources.list.d/ricotz-testing-precise.list E: The list of sources could not be read.   I tried   gksu gedit /etc/apt/sources.list   and put # in front third line but it still doesn't work.  Please Help! :)

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


could someone please help me out, why these guys get edits for  that was done by me:   where nothing was changed? (mhitza) where only my changes were accepted? (psxls)   Please don't get me wrong - i'm not interested in the reputation, but just curious why edits with no changes are even allowed.

When clicking "edit" I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking "improve this question" or "improve this answer" shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the "Improve Edit" and "Reject and Edit" buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see "" in the .


I upgraded to 21.04, then a message appear to set shortcut for changing languages (RO - EN). For some reason I set Left Shift + Left Ctrl. Now I realized I can't open a new tab in terminal anymore (with Ctrl + Shift + T) because the language is changing instead. I opened the Region & Language settings, then Input Sources: Keyboard Shortcuts. Here the message is: These keyboard shortcuts can be changed in the keyboard settings. Ok, I opened the Keyboard Shortcuts and I have Typing: Switch to next input source: Super + Space. But I can't see the Ctrl + Shift shortcut I want to remove. So, where can I fix this?

Can I use Ctrl+Shift for changing languages? I can't set this hotkey for changing keyboard languages.  At this moment Alt+Shift switch languages, but I can't see this hotkey in keyboard hotkeys list or in   gsettings list-recursively  org.gnome.desktop.wm.keybindings | sort | more   output.


How do I find the oldest questions (such as the first asked question by anyone) on a stack exchange site.  Was having a look through a users profile on Ask Different and had the idea to see who asked the first question there.  Is there a hack?  Edit: Fair point directing me to the last page on the questions page. Many questions are added per second on SO so getting the last one on the last page is fiddly and I figured there might be another way. The best I can get with my access on SO, telling by a pretty URL, is question 4 for C#on setting form opacity:   As the answers pointed out I don't have the points to see all answers such as Joel Spolsky's .

Can someone send me a link to the first question on SO?


What are the (ring) automorphisms of $\mathbb{Z}[x]$?  The constant polynomials must be carried to themselves by any automorphism $\varphi$. The action of $\varphi$ is then determined by $\varphi(x)$.  For $\varphi(x)$ to be surjective, $x \mapsto \pm x + b$, with $b\in\mathbb{Z}$.  So, $c \mapsto c$ and $x \mapsto \pm x + b$ is a necessary condition for $\varphi$ to be an automorphism of $\mathbb{Z}[x]$, but is it sufficient?

I am trying to find the automorphisms of the polynomial ring $\mathbb{Z}[x]$.  So far, I have shown that if $\varphi$ is an automorphism, then $\varphi(n)=n$ for $n \in \mathbb{Z}$, and $\varphi(x)$ is a polynomial of degree one, say $mx+n$. If we consider what gets sent to $x$ by $\varphi$, we see that $m$ must be a unit of $\mathbb{Z}$, so $m=\pm 1$. So I think the automorphisms fix $\mathbb{Z}$ and send the indeterminate variable $x \mapsto x+n$ or $x \mapsto -x+n$ for $n \in \mathbb{Z}$. Is this correct?


I've noticed that all the close flags were moved to the close queue. Well done! It's a huge step forward!  But now I've noticed something weird. The flag count at the top toolbar is inconsistent with the number of flags I can actually see (significantly).  For example,  But   Does this qualify as a bug? I mean, I bet some of those attributes to comment flags, but a full 200 flags? Which I can't even handle? I don't think that's right.

It looks as if the 10k-tools flagged post list is b0rken.  Next to the review link in the toolbar there is a flag counter showing there are 10 flags to be reviewed:    Clicking on that flag counter leads to an empty page:        The moment I visit that page (through clicking on the flags counter, or by going to the review queue first then clicking on Tools, selecting the flags tab if not already selected), the flags counter disappears from the toolbar:    but after a while (half an hour, an hour?) the flag count re-appears in the toolbar.  Either the counter is wrong (presumably taken from a Redis cache somewhere) or the 10k flag review page is falling over every time someone tries to load it.  This at first appeared to happen only on Meta, on Stack Overflow the flags page has plenty to review. However, there are now  on Stack Overflow.


I am trying to make a homemade Neapolitan pizza in a regular home gas oven. I preheat the oven for 1 hours to max oven temperature 240 C. Place the pizza dough on a parchment paper add the tomato sauce and mozarella. Place the pizza in the oven for 15 minutes in the top tray of the oven. The tomato sauce dries out and the pizza is hard and not chewable at all. How can I resolve this problem?

I am trying to master the homemade Neapolitan pizza, from dough preparation to cooking it.  After following the recommendations at Seriouseats.com for the dough preparation, I came across some doubts regarding the oven use.  I understand that ideally I would make it in a 900F wood oven, but at home we don't have such equipment!  What is the best practice to make the Neapolitan Pizza in a regular gas oven that heats up to 530F? (i.e. temperature, time, tray positioning...) Are there changes in the way the dough has to be prepared?


i am newbie in mvc area. so i am learning still and trying to learn lots of advance area in MVC. so i was reading a post about custom controller factory ASP.Net MVC.  a guy explain so less so i just do not understand how to implement. here is the post url   he said  You would like /Product/Index to trigger MyController<Product>.Index()  This can be accomplished by writing your own IControllerFactory and implementing the CreateController method like this:  public IController CreateController(RequestContext requestContext, string controllerName) {     Type controllerType = Type.GetType("MyController").MakeGenericType(Type.GetType(controllerName));     return Activator.CreateInstance(controllerType) as IController; }   need a bit more sample code. just do not understand where to define CreateController function. do i need to write this function in base controller ?  when request comes like /Product/Index or /Customer/Index then how index method can be invoke in base controller?  so looking for guidance for a newbie like me in MVC advance area. thanks

I have a design idea for a large project at work and I think I have it figured out but would really love to get some feedback on a) the idea in general, and b) my proposed implementation.  The basic idea is simple: I want to create an ASP MVC application that can be extended in the future with additional controllers and views without having to recompile the code. The idea is to have one MVC application with a very basic set of features and then extend the functionality by adding another 'Application.dll" that contains controllers, data, and business logic that are specific to that application. The views will simply be copied into the same directory as the main MVC application during install.  The problem is that MVC does its routing on types within the same assembly so even if I move the routing definitions to the database, the MvcHttpHandler would not be able to route anything to the new Dll since it doesn't "know" the controller types in it. Looking at the MVC code, I found that to load the controllers they are simply calling Activator.CreateInstance which looks only in the current assembly.   My solution is simple but maybe I'm missing something: I will override the MvcHttpHandler by either replacing the ControllerFactory directly (not sure how to do that) or by duplicating that functionality in a derived class. The new code will read the request and try to load the controller first from the current assembly and then from the extended ones. Once the proper assembly is found, I will use CreateInstance and pass that assembly to it to get the controller I want.


In the Oxford dictionary, begin has the explanation: to start or to make something start for the first time. An example:   on post-war architecture.  In the , however, it says  Start, but not begin, is used to talk about creating a new business.  She started a new restaurant and it’s been going really well.   So how should I choose the right word?

Today, when looking up the definitions of the phrasal verb "take sth up", I noticed that one of them was written like this: "to start or begin something such as a job." For the first time I realised that probably "start" and "begin" don't exactly mean the same thing.So the question is what the difference is between the two, and if there are cases when they mean exactly the same thing.


How could I visit StackExchange when I am on StackOverflow? Now, I input the address of StackExchange to visit it when I am on StackOverflow. Is there another way?

One thing I've noticed about the relatively new sitewide layout is that I can't find a quick way to get back to www.stackexchange.com without finding StackExchange in the sites list. As a result, I am typing stackexchange in my toolbar a whole lot more often now. In particular, I tend to enjoy browsing the hot questions list and my own personal feed quite often so visit these pages on a daily basis. Is there an easy link to them that I'm missing?  (On the android app, there is a feed in the menu that I really appreciate, something like that on the desktop would be ideal!)


Why click event is not working here? What is my mistake?    $(document).ready(function() {   $('.dashboardList').click(function() {     alert("hello");   }); });

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Is there a comand or way to get list of all available predefined (named) colors on my actual system?  Not a question regarding xcolor or any other color enhancement. Just minimalistic setup.

I need to get the list of predefined colors in xcolor. Hard-coding as follows is not a good coding practice.  \documentclass[dvipsnames,cmyk]{minimal} \parindent=0pt \usepackage{pstricks}   \begin{document}     \psforeach{\nA}     {         Tan,          RedOrange,          Magenta,         Yellow,         Green,         Red,         Blue,         BrickRed,         DarkOrchid,         Rhodamine,         OliveGreen,         Mahogany,         Goldenrod%           }{{\color{\nA}\nA} \endgraf} \end{document}       My real scenario is to create an animation as follows.  \documentclass[pstricks,dvipsnames,cmyk]{standalone}  \usepackage{etoolbox}  \def\temp{}  \begingroup \renewcommand\DefineNamedColor[4]{\listgadd{\temp}{#2}} \input{dvipsnam.def} \endgroup \def\do#1{#1,} \edef\MyNames{\dolistloop{\temp}end}  \begin{document} \psforeach{\x}{\MyNames} {    \expandafter\ifstrequal\expandafter{\x}{end}{}    {         \pspicture(\LL,\BB)(\RR,\TT)         \pscircle*[linecolor=\x](0,0){\RR}         \rput(0,0){\tiny\x}         \endpspicture         \newpage    } } \end{document}


I have a program (which communicates with a WiMax modem). The program runs fine with administrator account, but requires admin password to launch from standard user account. I'm using Windows 8 Pro.  I want standard users to run the program without requiring any password. From the properties of the executable file I've checked the box which states that "Run this program as administrator" for all users. But the program still asks for password if started from standard user account.  How can I do that?

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


Is there a possibility to tag each equation of a single line in an align environment of the amsmath package?  Like so (this code leads to the error Package amsmath Error: Multiple \tag.):  \begin{align}   a &= b \tag{A} & c &= d \tag{B} \\   e &= f \tag{C} & g &= h \tag{D} \end{align}   Or is there any other environment or package that can be used to achieve the same effect?

I am trying to create a table with two columns of independently labelled equations (1-6). Unfortunately, everything I have found so far either has not worked or would number them as sub-equations (1a, 1b, etc).  My current attempt is:  \documentclass{article} \usepackage{graphicx, verbatim, tabularx} \usepackage{amsfonts} \usepackage{amsmath, amssymb}  \newcommand{\grad}{\vec{\nabla}}       \newcommand{\prtl}[2]{\frac{\partial #1}{\partial #2}}  \newcommand{\curl}{\grad\times} \begin{document}  \begin{tabular}{p{5cm}p{5cm}}  $\curl\vec{E} = -i\omega\mu\vec{H}$ &   $\curl\vec{H} = i\omega\mu\vec{E}$ \\  \begin{equation}  \label{eq:curlHx}   \prtl{E_z}{y} +\gamma E_y= -i\omega\mu H_x  \end{equation}  &  \begin{equation}  \label{eq:curlEx}    \prtl{H_z}{y} +\gamma H_y= i\omega\mu E_x  \end{equation}\\  \begin{equation}  \label{eq:curlHy}    -\prtl{E_z}{x} -\gamma E_x= -i\omega\mu H_y  \end{equation}  &  \begin{equation}  \label{eq:curlEy}    -\prtl{H_z}{x} -\gamma H_x= -i\omega\mu E_y  \end{equation}  \\  \begin{equation}  \label{eq:curlHz}   \prtl{E_y}{x}-\prtl{E_x}{y} = -i\omega\mu H_z  \end{equation}  &  \begin{equation}  \label{eq:curlEz}    \prtl{H_y}{x}-\prtl{H_x}{y} = -i\omega\mu E_z  \end{equation}  \end{tabular}  \end{document}   Is there an environment other than tabular that would make this work? Tabularx came close (got the numbering correct), but the formatting/spacing was horrific.


I have a controller inside my module as follows.  <?php  /**  * @file  * Contains \Drupal\module_name\Controller\ControllerName.  */ namespace Drupal\module_name\Controller; use Drupal\Core\Controller\ControllerBase;  /**  * NuSoap is required, and included here.  */     include 'nusoap/nusoap.php';     class ControllerName extends ControllerBase {         private static $instance = NULL;       private $session_result, $myconnection, $namespace;       private $debug = 0;       private $servicestatus = false;       private $logedin = false;          private $appliances = array();        /* process() retries, on error 503, $max_retries times         * every $recursion_timeout seconds         */       private $max_retries = 15;       private $recursion_timeout = 1;       private $logfile = '';        //constructor       public function __construct ($ip, $user, $password) {         $this->myconnection = new nusoap_client("https://" . $ip ."/sdk/");         $this->myconnection->timeout = 10;         $this->myconnection->useHTTPPersistentConnection();         $this->myconnection->soap_defencoding = "UTF-8";         $this->namespace = "urn:vim25";         $status = $this->_Login($user, $password);         if (!$status) {           drupal_set_message(             t(               'Unable to connect to vCenter "@ip", check connection!',               array('@ip' => $ip)             ),             'error'           );         }       }     }   and i have a folder structure inside module as nusoap/nusoap.php as follows   class nusoap_client extends nusoap_base  {   var $username = '';                // Username for HTTP authentication var $password = '';             // Password for HTTP authentication var $authtype = '';             // Type of HTTP authentication var $certRequest = array();     // Certificate for HTTP SSL authentication var $requestHeaders = false;    // SOAP headers in request (text) var $responseHeaders = '';      // SOAP headers from response (incomplete namespace resolution) (text) var $responseHeader = NULL;     // SOAP Header from response (parsed) var $document = '';             // SOAP body response portion (incomplete namespace resolution) (text) var $endpoint; var $forceEndpoint = ''; stuff ...   }   As you can see it is extending the base class, but whenever I run this using the router I am getting the following error:     Class 'Drupal\module_name\Controller\nusoap_client' not found   Is it because the wrong usage of the include files in Drupal 8? How can I include files in a controller?  As a note there are more dependent files calling the nusoap inside the nusoap folder.

I am calling the method defined in a class implemented from another module using the following code.  use Drupal\module_name\MyClassName;  $instance = Drupal\module_name\MyClassName::getinstance($host, $user, $pass);   My code doesn't work, as I get an error about a class not found. What am I doing wrong?  The class is contained in module/src/controiller/controller_name.php.


I have a problem in the interpretation of the following sentences in the present perfect tense.     1) I have worked for them since 2006.   Does it mean I am still working for them or I don't work for them any more?     2) I have lived in this house since 2006.   Does it mean I am still living in the mentioned house or I don't live in this house anymore?  EDIT: Please note that there is time expressions in both sentences.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I have created index.php file and give header i.e  <?php  header('location:/cicareer/members');  ?>   url is:  careermate.in/cicareer/members   I want to remove  /cicareer/members   So, how could I do this using .htaccess file ?

I need to build a function which parses the domain from a URL.  So, with   http://google.com/dhasjkdas/sadsdds/sdda/sdads.html   or  http://www.google.com/dhasjkdas/sadsdds/sdda/sdads.html  it should return google.com  with   http://google.co.uk/dhasjkdas/sadsdds/sdda/sdads.html  it should return google.co.uk.


I have a list like this list=['a, b, c, d', 'e, f, g, h','i, j, k, l']  But i want to have a list like below way target_list=[               ['a','b','c','d']               ['e','f','g','h']               ['i','j','k','l']            ]  Please help me to solve this. I am new into python.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Today I was using the graph located in the  for my own profile in Stack Overflow:        As you can see it says select an area by dragging across the lower chart  But nothing happens if try to drag or click anywhere in the lower chart. I didn't know if this was something I was not understanding and so I tried the same in my profile at  as follows:        As you can see, there I can click and drag to select and area and it works just fine.  Is this a javascript bug maybe? Am I the only one for whom this happens?   EDIT:  Just tried with Firefox and it works fine. I use google chrome and it does not work even if I try with a new incognito window. I have Ubuntu 12.10 if it matters. Chrome version: Version 40.0.2214.93 (64-bit)

The "select an area by dragging across the lower chart" thing is not working on Chrome.  Tested with Chrome 13.0.782.220 m, works with Firefox 6.0.1 and IE 8  Quirk: For some reason, if I open an incognito window, it works. Tried clearing the cache and cookies, still not working.


I have received approval for my child’s nadra card. It has gone for printing however if I do not receive it back by the time we fly out can my child still go with me with proof he has been approved. My child is dependent on me he is 18 months

My NICOP is expired and I have already booked a flight to Pakistan via Qatar Airways. My wife has a valid NICOP card but my 5 years old child  has never had a NICOP or any other Pakistani ID card other than the British passport. I have made an appointment for next Monday to renew my NICOP and apply for my child's new NICOP card. My question is, what if the cards of my child and mine don't arrive in time, can we still travel to Pakistan, given that we have the receipts as a proof of application?


I have used changes package in my latex source code. To accept changes I can use final in tex file in order to remove tags in the output (PDF). If I need to remove markup in latex source,  script is avaliable but the output is alike input, It doesn't remove markup in the latex.  I tried, sudo sh delcmdchanges.bash input.tex output.tex  Example:  \documentclass{article} \usepackage{changes} \begin{document} \centerline{\sc \large A Simple Sample \LaTeX\ File} \vspace{.5pc} \centerline{\sc Stupid Stuff I Wish Someone Had Told Me Four Years Ago} \centerline{\it (Read the .tex file along with this or it won't              make much sense)} \vspace{2pc} The first thing to realize about \LaTeX\ is that it is not ``WYSIWYG''.  In other words, it isn't a \added{some text} word processor;  \end{document}

I have looked around and found no answer to this question.  I am using the changes package, and I need to remove all markup from the source file. There's  about using the , but sadly it goes unanswered.   My questions are these: why is the script not working, and is there a way to make it work ? Is there another script ? (hopefully one that can be used on a windows machine as well)   Some background - I am using a lubuntu 16.04 machine.   I am trying to remove the markup from the following file to no avail:  \documentclass{article}  \usepackage{changes} %I could use [final] to hide the markup from the PDF, but I need the ``evidence'' removed from the source  \begin{document}  Some text \added{some added text}, and some \replaced{replaced}{replactd} text. \deleted{also, some deleted.} \end{document}   I placed the script in the same folder as input.tex, made the script executable and used  sh ./delcmdchanges.bash -i input.tex output.tex   I get no error, no query as to found markup, and the output file contents is identical to the input.


Would using one of the newer gTLDs have any adverse effect on SEO?

New domain names like .photos .gallery .repair etc are being released every month. I tried running a generic search for some things, and I could not find any of those in the results.   Any idea if they will ever integrate them into the search results? Will they be ranked higher than the .com domains? For example, if someone had stackphotos.com and now they got stack.photos - will the second domain be ranked higher than the first?


I don't know if I miss something here but don't understand why does the below list changes after using append() function. First I send a list(which contains lists) to 2 different functions.   First function just returns a random list in all non-empty lists. Second function returns a random list that if the current list(which is the one returned from the first function)'s last element lower than the other list in state or if the list is empty.  import random def fooOne(state):     lst = [x for x in state if len(x) > 0]     return random.choice(lst)  def fooTwo(state,current):     lst2 = [x for x in state if len(x) == 0 or x[-1] > current[-1]]     return random.choice(lst2)  state = [[3, 2, 1],          [],          []]  cur = fooOne(state) temp = fooTwo(state,cur)  print("State before append(): {}".format(state)) temp.append(cur.pop()) print("State after append(): {}".format(state))   Both functions returns different lists. I assign these lists to two different variables called cur and temp. So both cur and temp are also lists.  After temp.append(cur.pop()) line, original state list changes. It'll changes like I used that line on the original list. But I'm making this operation on two different lists.  Output:  State before append(): [[3, 2, 1], [], []] State after append(): [[3, 2], [], [1]]   Why does the original list changes while I'm using append() on another list? These lists are just some parts of the original list, why modifying them(while assigning them to new variables) affects the original list?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


So years ago I read a story that was more or less this: a man driving with his family gets cut off and gets into it with the driver of the other car, they battle aggressively, he ends up besting the other guy. He thinks this is just a normal occurrence but when it ends he gets a message saying congratulations, you are the new champion, challenger number 1 is so and so... I read this in a collection probably in the early 70s. Anybody know it? Thanks!

question reminded me of a similar short story that I believe I read in one of the various SciFi magazines, IASFM possibly, since I had a large collection of those, most from the 80's.  It is definitely not "Why Johnny Can't Speed" although it is very similar.  It's set marginally in the future, or a semi-dystopian "future now" relative to when it was written.  A man and his family are driving along the highway in a very standard family car hovercraft when someone in an obviously high-powered vehicle becomes aggressive towards him.  (He is cut off, tailgated, something, I forget exactly what.)  There is a sequence of detailed road combat - with the man and his family increasingly terrified at the situation - until the man finally manages to take the punk and his hovercraft out by throwing his and his wife's safety helmets out of the vehicle so that they get sucked under his adversary's hover skirt.  He is then horrified to realize that he is now on the top-10 list of road warriors, having just picked off one of the highest-ranked members and thus earning his position.  His car console lights up with messages of challenges from many other lower-tier warriors as the map shows them starting to converge on his location.  It differs from "Why Johnny Can't Speed" in that it's accidental (well, it's his fault, but he didn't realize what he was doing) that the man gets involved in the car wars situation, he distinctly does not have a combat vehicle, and there was no family death involved.  edited to change some details as indicated by comments


Is it possible to use a template on a constructor, for example:  class Class {     public:         template<typename T>         Class(T arg); };   And the cpp file:  #include "class.h"  template<typename T> Class::Class (T arg) {     // do something }   The constructor is called with:  int a = 0; Class c {a};     When compiling this code, I get the following error:  /usr/bin/ld: /tmp/ccNzp4z7.o: in function `main': main.cpp:(.text+0x1c): undefined reference to `Class::Class<int>(int)' collect2: error: ld returned 1 exit status     The use for this would be a constructor like:  Class(std::unordered_set<T> choices, std::unordered_map<Direction, std::function<std::string(T)>> mapping);   Where each object in choices would be iterated over for each Direction in the map and passed to the corresponding function, in order to generate the object. In this case, the type used has no bearing on the class after the constructor finished executing, so I don't think that it makes sense to use a template on the entire class.

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


In the early 1980s, I remember seeing a western-style cartoon that featured a scientist who had created a kind of gas that damaged robot's machinery.  I can't recall whether the scientist was evil or not.  However, the bad guys (whoever they were) got wind of this invention, and there was a race between to recover the gas cylinder from where the scientist had hidden it.  A robot with the good guys' mission to retrieve it was accidentally exposed to the gas and damaged, and in the confusion, the bad guys got away with the cylinder.  The villains then modified the gas, so that instead of just damaging robots, it "mutated" them and turned them evil.  Then they released the gas in domed city, and all the worker robots started attacking the population.  They people were evacuated and the dome sealed, but I remember the good guys watching video footage of overgrown construction robots trying to break out of the dome.  That's all I remember.  Does anybody know what this show was?

Does anyone remember a cartoon with 4-5 humanoid robots on Saturday morning in the mid-80s?  As far as I can remember, they had "powers" to zap things and maybe fly but I don't remember much of the story/plot/enemies/powers.  I don't remember humans in the show.  One scene I remember was the were on some ice world and were being chased by this huge polar kraken type monster.  They got cornered at the edge of this ice sheet and some water.  One of the robots (the leader I guess) asked if someone had any power to do anything.  They all looked at each other and one of the female robots said she did and zapped the ice sheet so they floated away from the kraken.  However, since all of them ran out of power, they couldn't do anything except stand on the ice sheet and float in the water.  I don't remember anything after this scene, probably because my parents shut off the TV, or I'm just that old.  It's also possible I caught the re-runs of it, so it's possible it's late 70s or early 80s.


I have hit 2,000 reps on Stack Overflow today (hooray!) and started reviewing suggested edits. After I reached the limit of 20 reviews, "review suggested edits" button is still showing in top bar, despite it is useless until tomorrow. Maybe to hide it when you hit the limit?

Now that I've reached 2k on Stack Overflow, I get access to the "Suggested Edits" review queue.  Although I only have 20 edits per day, the "suggested edit awaiting" icon in the top bar is always there and it bothers me a lot!  My suggestion is to apply one of three solutions:   Remove the suggested edits icon when we reach the maximum (50) edits Remove the Highlight (orange) on the suggested edits Remove the suggested edits part when we click on it   What do you think?


My join returns null because I am not able to remove the leading zeros. Basically, I am trying to replace the pol.Policy_Number with src.Policy_Number for a large number of policies. Is there a way I can remove the leading 0s in the ON statement for src.Policy_Number? I think Padding is needed, but I am new to SQL so any help would be much appreciated. That pol policy numbers always equal src policy numbers if it was not for the leading 0s in pol This is not a duplicate. I am not looking for a select. I need to put padding next to the ON statement so any leading 0s from src.Policy_Number will be removed so the JOIN can return rows. Please don't close the question a duplicate  UPDATE pol SET pol.Policy_Number = src.Policy_Number FROM Policy_Table pol INNER JOIN SourceTable src  on  pol.Policy_Number =src.Policy_Number--00000000000000ABCD200,0000000000000EFT200  Where src.Policy_Number IN('ABCD200','EFT200')

I am working on a SQL query that reads from a SQLServer database to produce an extract file. One of the  requirements to remove the leading zeroes from a particular field, which is a simple VARCHAR(10) field. So, for example, if the field contains '00001A', the SELECT statement needs to return the data as '1A'.  Is there a way in SQL to easily remove the leading zeroes in this way? I know there is an RTRIM function, but this seems only to remove spaces.


Why is the voltage across a PN junction 0 v when it is in open circuit conditions ?

I know this question sounds silly, as if there was a potential difference a current would be created when the terminals are connected together and this would mean energy has come from somewhere.  The reason I ask this though is that from my understanding of the depletion region and built in potential of a diode it seems like if you connected a voltmeter across the whole diode it would show the value of the built in potential.  This is explained in the image below:    At first, electrons flow from the n type to the p type because there are a higher concentration in the n type, and holes do vise versa. This is called the diffusion current. The first electrons and holes to cross the pn boundary are the ones which are closest to it; these carriers recombine when they meet each other and are then no longer a carrier. This means there is a depletion region of no carriers near the pn boundary. because electrons have left the n type material, and holes have left the p type material, there is a surplus of positive and negative charge on the n and p side of the pn boundary respectively. This causes an electric field that opposes the diffusion current, and so no more electrons or holes cross the boundary and combine. In short, only the electrons and holes near the boundary combine, because after they have done that an electric field is formed that prevents any more carriers from crossing. The current due to this electric field is called drift current, and when in equilibrium this will equal the diffusion current. Because there is an electric field at the boundary (pointing from the positive charge to the negative charge) there is an associated voltage. This is called the built in potential.  If you sample the electric field at each point along the diode from left to right, you would start with 0 in the p region because there are an equal number of protons and electrons. As you approach the depletion region you would see a small electric field pointing back towards the p region, caused by acceptor impurities which now have an extra electron (due to recombination) and therefore now have a net negative charge. This electric field would increase in strength as you get closer to the boundary, and then die away as you get further away.  This electric field means there is a voltage, as shown in graph (d). The p side is at an arbitrary potential, and the n side is at a potential higher than this because there is an electric field between them. This means there is a potential difference across the depletion region; this is known as the built-in potential.  But why when I connect a volt-meter across the whole diode will I not see this built in potential?


I have some data in input that I'll have to use to set all properties of a POJO. The POJO might be partially set. My problem is to set the property only if related input data is not null. I know I can do this in two ways:  if (input != null) {     obj.setData(input); }   or   obj.setData(input != null ? input : obj.getData());   I'm looking for a solution less ugly and better for objects with a big number of properties to set.

I use object != null a lot to avoid . What is an alternative to: if (someobject != null) {     someobject.doCalc(); }


Find the number of zeros of $f(z)=z^6-5z^4+3z^2-1$ in $|z|\leq1$.   My attempts have not gotten far.   I know we can examine the related equation $f(w)=w^3-5w^2+3w-1$ in $|w|\leq1$, letting $w=z^2$.  It is clear that $f(w)=0$ for $|w|=1$ if and only if $w=-1$.   My main problem is that this seems obviously like an application of Rouché's theorem, where we let $g(w)=5w^2$, whereupon we have the relation $|f(w)|< |g(w)|$ for all $|w|=1$, with the sole exception that equality holds when $w=-1$.   I would like to use Rouché to equate the number of zeros of $f$ and $g$, but my understanding of Rouché is that the inequality should be strict with no exceptions.

Let $h(z)=z^6-5z^4+3z^2-1$.  Using Rouche's theorem, with $f(z)=-5z^4$ and $g(z)=z^6+3z^2-1$.   On the unit disc $\lvert f(z) \rvert =5 > \lvert 1+3-1 \rvert=\lvert g(z)\rvert $  And the number of zeros is 4 for $f(z)$ in the unit disc, so it is also five for $h(z)=f(z)+g(z)$.  Is this correct? Thanks.  Found an old answer of mine, I chose $g(z)=z^6-1$ and $f(z)=-5z^4+3z^2$, and got the answer $4$ roots again.


(I'm sorry about my english, I'm from Chile)  Hi! I'm making a game based on Alone In The Dark, and the history would happen before the events on the game of PS1. However, I would like to make a game with the character Aline, but with 10 years old. The game mechanism would be the same, and the name of a lot of characters and places. I don't really want to make any money, I just want to make a good game, I love the AiTD game. Can I do that or I can be on jail because of that? Thanks!

I've played around in the past of the 2D Flash fan-made version of the popular Valve game Portal.  It has basically the exact same mechanics, but as a 2D side-view flash game.  Lately I've toyed around with creating a simplified flash version of some of my favorite franchises (such as Zelda, Mario, Splinter Cell, etc.).  Of course, nothing is "stopping" me from just using the same mechanics and just changing the name to something not copyrighted.  I have witnessed projects that have tried to directly port a 3D game into a 2D simplified version, with the exact same plot and puzzles (Ocarina of Time in 2D comes to mind), and I have seen them being shut down.  But I am not likely going to exactly duplicate any game...just borrow some of the source material and basic underlying mechanics.  For example, if I were to make a Zelda-influenced fan game, I would have items such as the Hookshot, Boomerang, and all other sorts of ones from the Gameboy Zeldas; just with a custom plot and dungeons.  With likely the same mechanics.  What are the legal issues involved in this?  I used to think it was a "Don't do this ever; it's a bad idea."  But then I've seen the Portal clone, and now I'm curious.


I have the /usr/lib/systemd and /etc/systemd directories, and systemd is running.  But I also have the /etc/init/ directory, with several .conf configuration files, I thought this was a sign of Upstart.   And I also thought Debian had moved to System V starting release 7. But that would imply having a /etc/inittab (that I don't have) directory, wouldn't it?

I'm looking for the full contents of the default /etc/inittab file on a fresh install of Debian 8.7 before any system-specific modifications are made.    I searched for this on the Debian website and other forums, but could not find it.


I am attempting to iterate through 1-30, say hello #number for each except for number 10. This is what I have which is not working   for i in {1..30}; do if [i != 10]; then echo "hello $i"; fi; done   my output from this is  bash [i: command not found  -- thirty times

I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month="01"] && [$day="01"]; then         date="$last_month/$yes_day/$last_year"         fulldate="$last_month/$yes_day/$last_year" else         if [$month="01"] && [$day="02"]; then                 date="$last_month/$yes_day/$last_year"                 fulldate="$last_month/$yes_day/$last_year"         else                 if [ $day = "01" ]; then                         date="$last_month/$yes_day/$year"                         fulldate="$year$last_month$yes_day"                 else                         if [ $day = "02" ]; then                                 date="$last_month/$yes_day/$year"                                 fulldate="$year$last_month$yes_day"                         else                                 date="$month/$yes_day/$year"                                 fulldate="$year$month$yes_day"                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found


If the localization $R_p$ of a ring $R$ at each prime ideal $p$ in A is Noetherian, does this imply that $A$ is Noetherian?  What we call such rings which is not Noetherian but localization at each prime ideal is Noetherian ? Can somebody provide me any counterexample of (1) and also a good reference?

If for a ring $A$ every localization $A_\mathfrak{p}$ by a prime $\mathfrak{p}\subseteq A$ is noetherian, is it true that $A$ is noetherian?   I believe not but I can't find a good counterexample.


Can someone please elaborate how from $(N+1)+N+(N-1)+(N-2)$ one can get $=  1/2(N+1)(N+2)$?  also how to prove that: $(N-1)+(N-2)+...+3+2+1+0 = \frac{N(N-1)}{2} = {N \choose 2}$ ?  Thank you!

Apparently $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$.  How? What's the proof? Or maybe it is self apparent just looking at the above?   PS: This problem is known as "The sum of the first $n$ positive integers".


I teach a course in C++ and want my students to post questions about the course material in a professional forum, and have other students answer them. They do not use Stack Overflow directly due to several reasons:    Their questions are often specific to the course, e.g. "what did you mean in slide 39?" or "why doesn't my code compile in the automatic homework grader?". On Stack Overflow they will probably be closed. Many of them are not good at writing in English. If they post in Stack Overflow, their post will have to be massively edited for grammar errors.   Is there a way to open a new Stack Overflow-like forum that will be specific to a class? It does not have to be secret - I don't mind if outside developers will also post questions or answers. All I need is to moderate the forum myself, so that I can allow questions specific to the course and in the students' native tongue (Hebrew).

Is the Stack Exchange engine that powers Stack Overflow available to download or install internally for an enterprise or company?  I think Stack Exchange's engine is very great and could be very cool to use for internal enterprise patterns and practices, like the engine of Wikipedia.


how can I align the list of figure when goes beyond 100.  Thanks   This is my MWE  \documentclass[a4paper,12pt]{report}  \usepackage{graphicx,rotating} \usepackage{multirow} \usepackage{siunitx,booktabs}%for table decimals number \sisetup{separate-uncertainty}% \usepackage[export]{adjustbox} \usepackage[sectionbib]{chapterbib} \usepackage{setspace} \onehalfspacing \usepackage{amssymb}%checkmark on table  \usepackage{fancyhdr} \fancyfoot{} \fancyhead{} \pagestyle{fancy}  \fancyhead[R]{\textbf{\cfoot{\thepage}}}{\slshape \rightmark}   \renewcommand{\headrulewidth}{0pt} %lets the head rule disappear. \lhead{\textbf{\nouppercase{\rightmark}}}   \usepackage[left=3.5cm,right=3.0cm,top=3.0cm,bottom=4cm,headheight=1cm]{geometry} \usepackage{wrapfig}  \usepackage{nccmath} \usepackage{tabularx,ragged2e,booktabs,caption} \usepackage[section]{placeins} \usepackage[textfont=normalfont]{subcaption} \usepackage{url} \urlstyle{same} \newcommand\apj{1925ApJ....61...38R}  % Journal abbreviations  \addtolength{\topmargin}{.25in}  %topmargin control %%%to use parenthesis in subfigure 1(a) %\usepackage[caption=false,labelformat=simple]{subfig} %\renewcommand{\thesubfigure}{(\alph{subfigure})}  \setlength{\parindent}{0pt} %\captionsetup [subfigure]{font=scriptsize}  \setcounter{secnumdepth}{3}  %to include subsection in table of cont. \setcounter{tocdepth}{3} \pagenumbering{roman}       %change page number style    \begin{document} %\include{frontpage}\newpage %\include{abstract}\newpage %\include{authorshipstatement}\newpage   %\include{dedication}\newpage  %\include{acknowledgement}\newpage  \tableofcontents\newpage \listoffigures \newpage \listoftables \newpage \pagenumbering{arabic}  \chapter{Foo} \bgroup \newcount\manyfigures \loop\ifnum\manyfigures<150 \advance\manyfigures by 1 \captionof{figure}{foo \the\manyfigures} \repeat \egroup   \cleardoublepage \end{document}

I use Lyx 2.1, document class : Report. My problem is that the titles of figures are written on the numbers at List of Figures.


Which sentence is correct:   Can you afford not to have this solution? Can you afford to not have this solution?

This is one thing that keeps bugging me, and maybe there's a direct answer. Grammatically, which one is more correct of these two?  Does it make a difference?  I tried not to do that. I tried to not do that.


When I was learning implicit differentiation in my class I was told to not think of $dy/dx$ as a fraction. Now I am doing integration by $u$-substitution and we treat $du/dx$ as a fraction and solve for $dx$. Why is this?

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


I am building a model in which my data set has a high percentage of repeated values.  I am concerned that if I do traditional hold-out or k-fold cross-validaton, that I will get unreliable results as the test sets will have many examples that are basically the same as those included in the train sets.  Is there an approach I can use so that my test sets do not include examples that are basically the same as the examples I have in my training set?

Let's say you have a dataset generated from real world sampling which has lots of duplicates (the dependent and independent variables are identical) and you want to train a classifier to predict the dependent variable in future samples from the real world. If you were to take a train test split from this dataset you'd inevitably have records which appear in both the train and the test dataset, so to avoid this you would deduplicate the original before doing a train test split.   My question is - is it the right thing to deduplicate and train on deduplicated data and test on totally unseen data, or is it the right thing to train and test from the original distribution coming from the real world, and accept that we would do well on previously seen examples anyway?


Hi all i am getting following email every 10 min. as I own the VPS. I am not expert in linux and am learning to manage linux servers. Please help me why am i getting these emails and how to stop them or how to fix the issue i am running CentOS 6 on 123-reg VPS  Subject: Cron <root@vpsXXXXXXXX> /usr/lib64/sa/sa1 1 1 /usr/lib64/sa/sa1: line 11: /bin/date: cannot execute binary file /usr/lib64/sa/sa1: line 13: /bin/date: cannot execute binary file   and below email every 1 hour  Subject: Cron <root@vpsXXXXXXXX> run-parts /etc/cron.hourly /etc/cron.hourly/0anacron:  /etc/cron.hourly/0anacron: line 6: /bin/date: cannot execute binary file /etc/cron.hourly/0anacron: line 6: [: =: unary operator expected

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


EDIT: I don't need the regex for the phone number, I have that already. What I need is help understanding how to insert that into my existing code, which I linked above. If you actually read my question, you'd see that I'm trying to learn what I need to modify in my original piece of code, not just copy and paste someone else's regex without knowing what to do with it.  Thanks! EDIT x2: I figured it out.. Thanks anyway. (See answer below)  I have a piece of code that works to make sure something is in the phone field:  if (!empty($_POST['hphone'])) {$hphone = $_POST['hphone'];} else {$hphone = NULL; echo 'Please enter a home phone number.
';}   In order to be more precise, I figured I'd try and make it check that it's a valid phone number. I found an example and tried to combine them:  if (!empty($_POST['hphone']) && !preg_match("/^([1]-)?[0-9]{3}-[0-9]{3}-[0-9]{4}$/i", $phone)) {$hphone = $_POST['hphone'];} else {$hphone = NULL; echo 'Please enter a home phone number.
';}   This works in that the form still submits but it doesn't catch that there's a letter in the field. It just submits.  I modified it some more to where it says there's not a valid number even though it is. I'm not a PHP guru so I'm just trying to do what makes sense to me with what I've got to work and other people's examples. Sorry for yet another post about this but I couldn't find exactly what I was after. Thanks!  ANSWER: I ended up figuring it out a different way. Below is the code that worked for me:  if (preg_match("/^([1]-)?[0-9]{3}-[0-9]{3}-[0-9]{4}$/i", $_POST['hphone'])) { $hphone = $_POST['hphone']; } else { $hphone = NULL; echo 'invalid'; }

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


I ran the command sudo apt-get install ubuntu-desktop to see if the UI would work within Bash for Windows (which was just released in the Windows 10 Anniversary Update).  Now that I know it doesn't work, I want to uninstall everything it installed (a little over 1,000 packages).  Is there an easy way to do that?  Or is there a way to for me to just start over cleanly with Bash for Windows?

How do you completely remove ubuntu-desktop along with all installed packages with it? I'm using Ubuntu 14.04 server on vps and used sudo apt-get install ubuntu-desktop to install.


I created a cron job by invoking:  # crontab -e   but I can't find the file with my edits.    Here's the /etc/crontab file:  # m h dom mon dow user  command  117 *    * * *   root    cd / && run-parts --report /etc/cron.hourly1  25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$ 47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$  52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$   crontab -e shows   */2 * * * * /home/avery/Dropbox/Scripts/lftp_download.sh   Anybody know which file my edits might be? I've looked at most the cron-related files in /etc but I can't find the one that's loaded when I type crontab -e.  Also, is there a log file in Ubuntu for cron?  Thanks in advance, Avery

Since upgrading my user's crontab has been wiped out. This is not the first time this has happened this year and it's a pain restoring it each time.  I'd like to be able to back up the crontab for my user but for that I need to know where it's stored.


It's not a question, just a suggestion: moderators, can you put the contents of  into stackoverflow and introduce them as law such as how to ask questions?

Note: the eventual outcome of this discussion involved dropping this particular off-topic reason, along with other changes. See:    —Shog     I was using the reason "demonstrate a minimal understanding" myself quite frequently, but the more I review, the more I have doubts about it and I think this reason can either be dropped entirely or at least rephrased, so I started to use "problems with code you've written must describe the specific problem" instead:     Questions asking for code must demonstrate a minimal understanding of the problem being solved.   So the poster has posted some description, maybe even a snippet of code and in his mind that already proves that he has that minimal understanding required. After all he described the problem and what he tried to solve. So telling him that he lacks that understanding is rather rude, and from the posters point of view doesn't even apply. What both version of the reason not emphasize is that a description of a problem is not various versions of     it doesn't work   but that we rather mean really specific details (see below). I can often see in the reopen review queue that the "improved" version just includes a more verbatim description, while what usually would be expected is some specific error message, a trace or a log, or whatever applies.  Then it continues with:     Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist   comparing it to:     problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.   Which says essentially the same, only in more detail.   So the "minimum understanding" reason is IMO a more rude version of the reason telling the user that an SSCCE is missing.  The intent of giving this reason is to tell the user that he needs to give exact details to be able to help him, so IMO a checklist would be much better. Something like:     Your question was closed because it may not provide enough details. Things you can do to improve your question to get an answer include:         Format the code in a way that makes it readable and easily understandable.   Provide the smallest working sample of code demonstrating the problem (link to SSCCE)   Include your input and output.   If applicable provide logs (i.e. Android debugging log, stack trace, etc.).   If applicable provide the exact error messages (compiler, etc.).      And something like this should be best included already in the banner that appears when a question is closed instead of being hidden in some pages you often enough have to actively looking for.  It might be helpful to adjust this, based on the tags or close reason, as I realize that I'm more focused on the programming area, and the above list may not apply to other areas of SO.  Update  Another thing I forgot to mention (but wanted to) is this:     Questions asking for code   Is IMO essentially an invitation of the type of questions     I have a problem, can you provide the solution? (with an optional please)   while     Questions concerning problems with code you've written   puts at least some emphasis on the fact that the poster has to put some effort himself in trying to solve the problem by providing the code which he used to attempt the solution.


Given the Mean and Variance of $n$ samples $x_i$:  $$M_n=\frac {1}{n}\sum_{1}^{n}  x_i$$   $$V_n=\frac {1}{n}\sum_{1}^{n}(x_i-μ_n)^2$$  How do Mean and Variance change, when we take into account one more sample?   In other words, what are the function $f(x_n,\space...)$ and $g(x_n,\space...)$ such that:  $$M_n = f(x_n,\space n, \space M_{n-1})$$  $$V_n = g(x_n, \space n, \space M_{n-1}, \space V_{n-1})$$  Thank you!

I am creating a component that aims to calculate the average and variance of a metric associated with events happening during time but with a limited internal memory.  Imagine that the events are visitors entering in a shop and the metric is their age.  During time, my component receives events with the age of each visitor. I don't want my component to memorize the history of each ages. Ideally, I would like a light component storing only: the average A, the variance V and the number of events N.  After each event with age E, I want to update those three values :  N<=N+1 A<=(A*N+E)/(N+1) V<=???   What for V? I am thinking of something like :  V<=(V*N+(E-A)^2)/(N+1)   I know it is not exact as my previous V is using the old A which is no more the average.   Q1 - Is there an exact formula? Q2 - If not, is my proposal a good estimate? Is it biased? Will it converge correctly when N increases? Q3 - Is there a better formula?


I have this  that works nicely. So when I click on one of the list items in the menu I get an alert telling me which item was clicked.  However, in my actual application nothing happens when I click on a list item and to me, it looks exactly the same?      // get list of strategies var $regions = $('#regionList');  $.ajax({   type: 'GET',   url: 'api/Region',   dataType: 'json',   success: function(codes) {     $.each(codes, function(i, code) {       $regions.append('
' + code + '
');     });   },   error: function() {     alert("Error loading data! Please try again");   } });  $("#regionList li").click(function() {   alert('Clicked ' + this.id); });
     <button class="dropbtn">Strategy</button>

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


is there a possibility to remove old files and folders from the complete GIT repository (also in all commits)? I´m using GIT 1.9 and Gitlab 6.8.

Our team accidentally pushed some personal information onto Github in the form of a H2 database file. Is there any way to remove a file cleanly and completely from the server?  Simply doing git rm xxx.db does not seem to be the answer because one can easily git reset --hard to the head which contains the user data.  On the other hand,  git reset --hard [the head before the db file was committed]   is also not our preference because there have been more than 10 commits since the database was committed.  What should we do to remove that database file?


I am on Linux OS 2.1. Options like mailx or uuencode are not configured on these servers. My objective is to email the list of files (with date and time) from a directory which were updated within one day. I have managed to make a script which let's me do that but when I recieve the email, all the lines appear as one continuous output. There are no breaks in the output. Outlook ignores the line breaks. Now this list has to go to some big users and I can't ask them to fix the setting in outlook to ignore the line breaks. Can this be achieved from the script which I am using  This is the script that I am using.   !/bin/bash dir=/path-to-dir cd $dir find . -maxdepth 1 -type f -mtime -1 -exec ls -lrth {} \;> /tmp/filelist cat /tmp/filelist | awk -F/ '{print $1,$2}' |awk '{print $6,$7,$8,$10}' | mail -s "Today's Directory List" email@address.com   I am to send this directory list once a day, hence will set a cronjob task to execute the script. I even tried sending the file as attachment but uuencode is not confiugred on the server. Hence I am looking for help with this.   Thanks

I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file.  The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping.  I've been able to send the raw script in the body an email by piping the backup text file to mailx like so:  $ cat mysqldbbackup.sql | mailx backup@email.com   cat echoes the backup file's text which is piped into the mailx program with the recipient's email address passed as an argument.  While this accomplishes what I need, I think it could be one step better, Is there any way, using shell scripts or otherwise, to send the compressed .tar file to an outgoing email message as an attachment?  This would beat having to deal with very long email messages which contain header data and often have word-wrapping issues etc.


$a,b,c$ are distinct real numbers that $$(a^2)(1-b+c)+(b^2)(1-c+a)+(c^2)(1-a+b)=ab+bc+ca.$$ Prove $$\frac{1}{(a-b)^2}+\frac{1}{(b-c)^2}+\frac{1}{(c-a)^2}=1.$$ I have tried two different approaches to this problem but am stuck.  First I started by expanding the bottom of each fraction. $\frac{1}{(a^2)-2ab+(b^2)}+\frac{1}{(b^2)-2bc+(c^2)}+\frac{1}{(c^2)-2ac+(a^2)}=1$  I also tried to expand $(a^2)(1-b+c)+(b^2)(1-c-a)+(c^2)(1-a+b)=ab+bc+ca$   $(a^2)-(a^2)b+(a^2)c+(b^2)-(b^2)c-(b^2)a+(c^2)-(c^2)a+(c^2)b=ab+bc+ca$ $(a^2)-(a^2)b+(a^2)c+(b^2)-(b^2)c-(b^2)a+(c^2)-(c^2)a+(c^2)b-ab-bc-ca=0$ Then I added one to both sides $(a^2)-(a^2)b+(a^2)c+(b^2)-(b^2)c-(b^2)a+(c^2)-(c^2)a+(c^2)b-ab-bc-ca+1=0+1$ Help will be appreciated.


How do you interpret this equation? I've seen far simpler equations for solving the magnitude, like the square root of all of the elements of a vector squared added to one another. What exactly is going on with the Greek symbol in that equation? Is there something I'm missing? [vector magnitude calculation][1]  2.6 The lenght (norm) of a vector The lenght ( or norm ) of a vector a is: $$\left\|{a}\right\|=\sqrt{aa}=\sqrt{\sum_{i=1}^n a_i^2}$$

I have come across this symbol a few times, and I am not sure what it "does" or what it means: $\Large\sum$


I need to compare $\log_4 5$ and $\log_5 6$.  I can estimate both numbers like $1.16$ and $1.11$. Then I took smallest fraction $\frac{8}{7}$ which is greater than $1.11$ and smaller than $1.16$ and proove two inequalities: $$\log_4 5 > \frac{8}{7}$$ $$\frac{7}{8}\log_4 5 > 1$$ $$\log_{4^8} 5^7 > 1$$ $$\log_{65536} 78125 > 1$$ and $$\log_5 6 < \frac{8}{7}$$ $$\frac{7}{8}\log_5 6 < 1$$ $$\log_{5^8} 6^7 < 1$$ $$\log_{390625} 279936 < 1$$ thats why I have $\log_5 6 < \frac{8}{7} < \log_4 5$.  But for proving I need estimation both logarithms (without this estimation I cannot find the fraction for comparing). Can you help me to find more clear solution (without graphs)

I realize that I lack any numerical intuition for logarithms. For example, when comparing two logarithms like $\log_78$ and $\log_89$, I have to use the change-of-base formula and calculate the values with a calculator in order to determine which of the two is larger.  Can anyone demonstrate an algebraic/analytic method to find out which of the two is larger without using a calculator?


If I touch the anode of a battery or connect the anode the the cathode of an other battery, none (or rather: a very small current) flows between those two. If I instead connect the connect the anode and cathode of the same battery, a current flows between those two points. Why is this? After all, there's a voltage between me and the anode.

This is a question regarding the physics behind the observation.  I have guessed the answer to the question, but I may be wrong, so I want to wait for the responses before posting it.  Some major considerations:   A battery's positive terminal does have a positive potential. ie, a test positive charge will repel it and a test negative charge will attract it. Vice versa for negative terminal. From the paper below (Section 1.2.1), it seems abundantly clear that the battery will have positive and negative potential on respective terminals. Given 'point 1', above, connecting the positive terminal of battery A to negative terminal of battery B will lead to current flow in the conductor. If the potential difference only comes into effect when the circuit is closed using the terminals of the same battery (due to cell chemistry), then does that mean that 'point 1' will not be valid after this experiment (connecting positive terminal of A to negative terminal of B)? If it is only a tiny quantity of current that flows, then will it ever stop? And what determines this quantity? (Equation would be nice)   Related paper:


Unable to append string arrays with SQL in operator dynamically. If more values are passed to the array dynamically, how to append it within operator in Oracle SQL query?       String[] rsIdArr = dObj.getRsId().split(",");     int length = rsIdArr.length;      for(int k=0; k<length; k++){         String appendArr[] = new String[k];          appendArr[k] =  "'"+rsIdArr[k]+"'" ;          if(ValidationUtil.isValid(dObj.getRsId())){              strQuery  = strQuery.append("AND TAppr.RS_ID IN " + appendArr[k] );          }      }   Expected result:        AND tappr.rs_id IN ('W0079', 'F002', 'P002159', 'D0701', ........)

What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? placeholder represents one value, rather than a list of values.  Consider the following SQL statement:  SELECT my_column FROM my_table where search_column IN (?)   Using preparedStatement.setString( 1, "'A', 'B', 'C'" ); is essentially a non-working attempt at a workaround of the reasons for using ? in the first place.    What workarounds are available?


I have a situation where I am having difficulties with setting up an extension for a website on my local development version of a projects. I have reached out to the support and we could not troubleshoot the problem over the email and they asked to put the dev version online and provide them ftp and admin user details.   I created a subdomain on my hosting with a ftp account, changed the admin username and password for security reasons and have everything ready to make the development version to go live, but I don't want a search engine to find the development version and start linking people to it. I know that I can disable the google analytics extension, but I think I also should change the contents of robots.txt file.   Perhaps there is something that I have not thought about or an easier way to achieve what I want. If anyone has experience with this I would be glad to read your suggestions.  PS the dev version is powered by magento 1.7.2, I thought that this question is not about magento, but I thought I should mention this.

I will be building a (wordpress) web site. While I am developing, other team members will be pushing content.  I'd like to have it hidden from google while under development.  It will be hosted on godaddy.   I have thought of not pointing the domain name to it until live and using "",   or buying a  during development.    Or hosting dev site in a sub-directory ("/dev/") until ready and then moving it up a level.  If in the dev directory I'd add htaccess or robots.txt to not crawl.   Is any of this a bad idea?  Will google penalize for any of this - like search by IP and then associate that with the domain later on?  Any better ideas?


If a website's hosting is being transferred and is not online in between for approx. 14 days - would this affect the organic search positions when it's finally transferred? When they've since disappeared entirely from the search results?

What happens to my Google rankings when my site goes down for a short or long period of time?


This is in java. I tried looking for / googling for an answer to this question here and couldn't find a sufficient answer, so I apologize if this is a duplicate. I am confused as to the rules behind methods changing the parameter that you input. For example, consider the following example  public static void messWithArray(int[] array) {      array[0] = 100;      array[0] += 5;       // make new array      int[] array2 = new int[10];      for(int i = 0; i < 10; i++)      {          array2[i] = 5+i;      }      array = array2  }  public static void main(String[] args)  {      int[] a = new int[10]      for(int i=0; i < 10; i++)      {          a[i] = i*10      }      messWithArray(a);      System.out.println(a[0]);      System.out.println(a[1]);   This prints that a[0] is 105 and a[1] is 10, so making array[0] equal to 100 and adding 5 to it in the messWithArray method had an effect. However, assigning array = array2 didn't do anything (since a[1] is 10). I also tried messing with an int but couldn't get it to work.  I would like to know more specifically/clearly the logic behind whether or not a method will change attributes of an array.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I wonder if anyone would be able to help by giving me a few scenarios/tasks to complete on SQL Server 2012/16 please?  I am learning SQL Server to move from a desktop role to a junior DBA. I have my own lab at home, but only has adventureworks running on a single SQL instance. I can write basic/intermediate queries with inner joins, aggregates etc. What I'm looking for is some basic DBA tasks to practice with. Unfortunately, the interwebs is full of tutorials on how to write SQL, but I can't find much on then putting it into real life use.   Any help would be GREATLY appreciated!   Happy New Year!!

Following up from my other , I would like to start thinking about what I should take a look at on daily/weekly/monthly bases in terms of alerts. I am hoping to be able to see problems coming before they happen (that is the plan)...  So far, I have made a start collecting scripts for the following (no order):  Daily   Check system uptime (just in case I need to check anything as a DBA) Check the last backup  Check the transaction log backups Check the status of SQL Jobs Check the average CPU usage for the last 24 hours (or 1140 mins)   Weekly   Check MSDB backup history Check to see when the last time CheckDB was run Check index fragmentation Check index stats (reads vs writes etc) Check for IO bottlenecks   Monthly   Check missing indexes Check indexes that are no longer used   Any other suggestions? (I am new to DBA so any help/advice is always welcome)


Is there a way to create a secure hidden watermark. The watermark packages do not seem secure, anyone can edit the pdf and change the text.  I guess it would convert the text in to an image and include that.

I'd like to add an invisible watermark to each PDF document that I produce so that in case it leaks, I know where it leaked from. Anyone knows what would a good way for an invisible watermark be in a PDF document and how to add one?


Is there a userscript/browser plugin to add/create a hotkey/link to navigate to the next question in the current context?  Every time I search stackoverflow site or scan through a tag / list of newest questions I have to go to search results or index to open next question.  RSS reader allows quick browsing browsing through questions with hotkeys but lacks functionality of full-blown site. Moreover its inconvenient to subscribe to a tag you are not going to visit tomorrow.  There are , but they lack this functionality.  for this functionality to be implemented on the site and I'm looking for any kind of solution.

In order to get to a new question when reading a question, currently you need to go back to the list of questions.  It would be nice to have next/previous buttons on the current question page that take you to the next/previous question based on the "list" of questions you are currently viewing.  By list, I mean either the set produced by a search or by clicking on one of the various tabs to select an ordering.


Which one is correct?   'many thousands of animals ' or 'much thousands of animals'

Difference between "much, many, a lot of and lots of"  What is the difference between them?  Are they synonyms or not?


How can I sub 1 from each element from my txt file. I had actually tried similar to  question but was not successes full.   Suppose I have file in the following format  2,4,5 1,2,3 14,12,1   Now I want the file to be  // basically subtract 1 from all  1,3,4 0,1,2   13,11,0   What I have tried so far is   $awk '{if(getline != 0){           for(i = 0; i <=NF; i++){               $(i)=$(i)-1;           }        } print;}}'   I was trying to read till end of file and sub 1 from each element, but when I do this I just -1


here is my function  private static List<Types> getShiftTypes() {      List<Types> types = new ArrayList<>();      for (String shift : shifts_arr_t) {          if (!types.contains(shift)) {              types.add(new Types(shift));         }      }      return types; }   Types:  public class Types  { String type; int count;  public Types(String type) {          this.type = type;  }  @Override public boolean equals(Object object) {     boolean sameSame = false;      if (object != null && object instanceof Types)     {         sameSame = this.type == ((Types) object).type;     }      return sameSame; } }   But the compare override is not working. Can you please help me with that?

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 C# we do it through reflection. In Javascript it is simple as:  for(var propertyName in objectName)     var currentPropertyValue = objectName[propertyName];   How to do it in Python?

So what I'm looking for here is something like PHP's  function.  This is so I can debug my scripts by seeing what's the state of the object in question.


I have developed a JavaFX project on Windows and now I want to convert jar file to Dmg file to run on mac. Please recommend a tool that runs on Windows and can create a DMG file for a Mac.

Is it possible to build a .dmg file (for distributing apps) from a non-Mac platform? And if yes, how?


So I've always thought that "$\Delta$" when applied to an n-tuple or scalar was the change of that n-tuple or scalar relative to a previous state in time and proportional to the amount of time or $\Delta \bf{x}=\frac{\bf{x_u}-\bf{x_i}}{t_u-t_i}$ so I always wrote the acceleration of a mass as $\Delta^2 M_p$ but now I am unsure whether this is in fact correct. My question is: What are all of the different ways Delta can be used as well as am I using it correctly?

I have read the thread regarding , but it does not answer my question.  I am confused about the notation for change in Physics. In Mathematics, $\delta$ and $\Delta$ essentially refer to the same thing, i.e., change. This means that $\Delta x = x_1 - x_2 = \delta x$. The difference between $\delta$ and $d$ is also clear and distinct in differential calculus. We know that $\frac{dy}{dx}$ is always an operator and not a fraction, whereas $\frac{\delta y}{\delta x}$ is an infinitesimal change.   In Physics, however, the distinction is not as clear. Can anyone offer a clearer picture?


How do we turn on root desktop login? I set the root password then modified /etc/gdm3/custom.conf  [Security] AllowRoot=true   This is not giving me the option of the root at login screen, neither it accepts my root credentials. Credentials are correct.

I would like to enable the root account on my Ubuntu installation.  I realize the security implications of this.


So I am wondering how do I triple boot Windows 10, Windows 10 Insider Preview, and Ubuntu. Is this even possible?  *Note that I already have Windows 10 and Ubuntu installed. I will be installing Windows 10 Insider Preview

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


Famously, if not accurately, Winston Churchill is supposed to have responding to an editor who had "fixed" a sentence ending with a preposition by writing, "This is the sort of thing up with which I will not put."  The terminal preposition/adverb construction is often required in German grammar and I am asking if the English "rule" that proscribes the usage arose as an expression of anti-German sentiment around about the time either the two world wars started up.  What is the history of this "rule?"

Like many others, I commonly find myself ending a sentence with a preposition.  Yes, it makes me cringe.  I usually rewrite the sentence, but sometimes (in emails) I just live with it.  To, with... you know who you are.  Should I keep fighting myself on this one, or is it okay in some circumstances?


My first day with Tex and my first stumble ...   How do I code x subscripted with i subscripted with n? x_i_n gets rejected:   ! Double subscript   That is exactly what I am trying to say ;-) A ref to a good tutorial that would answer this kind of questions would be much appreciated. I saw a dozen but all do not go beyond general article structure and a few examples.

What's the best way to write subsequences?  $x_n_i$ gives an error, while $x_{n_{i}}$ works, but it just looks like $x_{ni}$ (the i isn't lowered enough below the n)...


I cannot edit vertices, edges or faces because of the 3d cursor. When in edit mode with the appropriate vertex, edge or face icon selected I try to click to select, say a vertex which I want to drag to resize and all I get is the 3D cursor which cancels the drag edit action.

My Apple mouse has only one button (a Left button). Normally I use                   ctrl + left mouse as a way to use the left mouse button but it doesn't work with blender. what do I have to do. Because I can't select anything.


I had a Facebook account, but I forgot my password. When I created a new account using the same mobile number, I could no longer recover my old Facebook account.   I don't have an email account. I created my account by mobile number, so how can I recover my old Facebook account at this point?

I haven't been to my Facebook account in a while and I can't remember my password. When I try to have it reset, it goes to a security question, but I can't remember that either.    Is there anything I can do?


So me and my friends downloaded pokemon go yesterday.  We got drunk, walked 3km and found 0 pokemon, not even one pokemon showed up in the 'pokemon near you' thing.   Is this normal for remote areas?(nearest pokestop is ~15km away)  Thanks.

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


Over a year ago, I first started out on Stack Overflow thinking I was just going to use it once, and then leave, so I created an account using one of those temporary email addresses. Yesterday, my hard drive started dying, forcing a reformat, etc, and long story short, I don't remember the email address I used for signing up, even though I know the password. Is there any way for me to find the email address?  I'm not overly miffed about the whole situation, but I was in the middle of a question, and now, even with a new account, I can't make a comment to say that I won't be able to continue with my question for the time being, because I need a minimum of 50 reputation.  If it is possible to find the email address, would it also be possible to change the email address to the account I'm currently using?

I forgot what email I used for my other ploxtic id: how do you find out what my email was?   The account is user:2078229.


Given matrix $A$  \begin{bmatrix}  a_1b_1+1 &a_1b_2 + 1&...&a_1b_n + 1\\ a_2b_1+1 &a_2b_2 + 1&...&a_2b_n + 1\\ ...&...&...&...\\ a_nb_1+1 &a_nb_2 + 1&...&a_nb_n + 1 \end{bmatrix} Find its determinant.  I was using some properties of $\det$ here.  Suppose we have an arbitrary quadratic $n \times n$ matrix $A$.  Let's denote $A + \alpha$ matrix, where we added $\alpha$ to all elements of matrix $A$. Then $\det(A + \alpha) = \det(A) + \alpha \cdot\sum \limits_{i = 1}^n \sum \limits_{j = 1}^n A_{ij}$, where $A_{ij} = (-1)^{i + j}M_{ij}$.  So I got:  \begin{align} & \det \begin{bmatrix}  a_1b_1+1 &a_1b_2 + 1&...&a_1b_n + 1\\ a_2b_1+1 &a_2b_2 + 1&...&a_2b_n + 1\\ ...&...&...&...\\ a_nb_1 +1 &a_nb_2 + 1&...&a_nb_n + 1 \end{bmatrix} \\ & =  \det \begin{bmatrix}  a_1b_1 &a_1b_2 &...&a_1b_n\\ a_2b_1 &a_2b_2 &...&a_2b_n \\ ...&...&...&...\\ a_nb_1 &a_nb_2 &...&a_nb_n \end{bmatrix} + 1\cdot \sum \limits_{i = 1}^n \sum \limits_{j = 1}^n A_{ij}\ \ \ \ (*), \end{align} where $A$ is matrix without $+ 1$'s.  Then $(*) =  \det \begin{bmatrix}  b_1 &b_2 &...&b_n\\ b_1 &b_2 &...&b_n \\ ...&...&...&...\\ b_1 &b_2 &...&b_n \end{bmatrix} \cdot \prod \limits_{i = 1}^n a_i +  \sum \limits_{i = 1}^n \sum \limits_{j = 1}^n A_{ij} = 0 \cdot  \prod \limits_{i = 1}^n a_i + 0 = 0$, because we have equal strings everywhere.  So, $\det$ of initial matrix is equal to $0$.  Can you please check my result?

How to evaluate  $$\det\begin{bmatrix}1+x_1y_1&\cdots & 1+x_1y_n\\ \vdots & \ddots & \vdots \\ 1+x_ny_1 & \cdots & 1+x_ny_n\end{bmatrix}$$?  I tried factorisation but I have no idea. I could not factor anything out... I need a hint to kick off.   Edit: A conjecture due to multilinearity: if we let $v_j=(x_1y_j,\cdots,x_ny_j)^T$, then my guess would be $$\det\begin{bmatrix}1+x_1y_1&\cdots & 1+x_1y_n\\ \vdots & \ddots & \vdots \\ 1+x_ny_1 & \cdots & 1+x_ny_n\end{bmatrix}=\det(1,v_2,\cdots,v_n)+\det(v_1,1,\cdots,v_n)+\cdots+\det(v_1,v_2,\cdots,1)=\color{red}{0}$$ where $1$ denote $(1,\cdots,1)^T\in \Bbb K^n$,$\Bbb K$ the underlying number field.


I’m new to Linux and Ubuntu. I’m running Ubuntu 13.10 on a mac OS 10.9 machine using Oracle’s VBBox VM software. How do I set up the LAMP suite of software—Linux, Apache, MySQL, and PHP? Can you direct me to any online documentation?

I set up a new VPS instance of Ubuntu and am wondering what the easiest way is to get up and running with a basic LAMP stack (i.e. which packages are required, which configuration options need to be tweaked, if any, etc.).