Is there a way to quickly write and run Java code from the command line on Mac? I know that you are able to do this in the command line with python. By simply entering &quot;python3&quot; in the terminal you can write and run python code on the spot. Is there a way to do this with java in the command line as well without having to first create a file and then changing directory to it, and then using vim/nano to edit the file, and then typing javac and java to run the file?
Is there something like python's interactive REPL mode, but for Java? Is there something like python's interactive REPL mode, but for Java? So that I can, for example, type InetAddress.getAllByName( localHostName ) in a window, and immediately get results, without all this public static void nightmare() thing?
I have to use a particular web site for work, but this web site checks to see whether I'm using Internet Explorer and, if not, won't allow me to log in.  I can switch my User-Agent header using the  Firefox plugin and the web site works fine, but I really don't want to switch the header every time I go to the site and also don't want my User-Agent header to perpetually say I'm using IE.  I'm on Linux, so actually switching to IE unfortunately isn't an option.  Is there any way to define a particular User-Agent for a particular web site in either Firefox or Chrome? Evaluate $\lim_{x \to 0} (x\lfloor\frac{1}{x}\rfloor)$  I'm trying to solve it by using the squeeze theorem but I'm stuck.  I'm looking for a function $g(x)$ such that $g(x) \leq x\lfloor\frac{1}{x}\rfloor \leq x(\frac{1}{x}) = 1$  Can anybody give me a hint? Is there a difference between DR/evil and DR/unholy? What is the list of keys and their corresponding wins?  I have it listing that the highest number of wins I've had in arena is a Champion key, but it doesn't say how many wins it was. When to use virtual destructors? Show that  $$t(n) = 1 + \sum_{ j=0}^{n-1} t(j)$$  is the same as  $$t(n) = 2^n$$  Initial condition $t(0) = 1$ Skype doesn't work in Ubuntu 14.04 I started reading "The Mathematics of nonlinear Programming - AL peressini" recently.  Theorem : Suppose that $f(x) , f'(x) ,f''(x)$ exist on the closed interval $[a,b]$. If $x^* ,x $ are two different points of $[a,b]$ , then there exists a point $z$ strictly between $x^*$ and $x$ such that   $$f(x)=f(x^*)+f'(x^*)(x-x^*)+\frac{f''(z)}{2}(x-x^*)^2$$  I tried to prove this theorem using The Fundamental theorem of calculus. But I can not stop it at the second derivative . Do I have to use mean value theorem ? or is there a simple proof for this ? Order of operations using Object Initializer Syntax Does the order in which I set properties using the object initializer syntax get executed in the exact same order?  For instance if I do this:  var s = new Person { FirstName = "Micah",                      LastName = "Martin",                      IsLoaded = true                    }   will each property get set in the same order? In my custom Drupal 8 plug-in I perform such query:  $select = db_select('my_table', 'e'); $select-&gt;addField('e', 'field1');  $select-&gt;condition('field3', 'NULL', '!='); $select-&gt;condition('field4', array(11, 12, 31, 32, 33), 'IN');  $select-&gt;groupBy("e.field1"); $select-&gt;orderBy("e.field1"); $select-&gt;orderBy("e.field5"); $entries = $select-&gt;execute()-&gt;fetchAll(\PDO::FETCH_ASSOC);    And it works fine. It returns me all records grouped by field1 that meets the condition, orderered. But it returns only field1 column.  I wanted to get more columns, so I have added another $select-&gt;addField('e', 'field2'); just after first one:  $select = db_select('my_table', 'e'); $select-&gt;addField('e', 'field1'); $select-&gt;addField('e', 'field2');  $select-&gt;condition('field3', 'NULL', '!='); $select-&gt;condition('field4', array(11, 12, 31, 32, 33), 'IN');  $select-&gt;groupBy("e.field1"); $select-&gt;orderBy("e.field1"); $select-&gt;orderBy("e.field5"); $entries = $select-&gt;execute()-&gt;fetchAll(\PDO::FETCH_ASSOC);    This time I get error:     Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1055 Użyto 'my_database.e.field2' bez umieszczenia w group by:   Which means "my_database.e.field2 has been used without putting in into group by". But I don't want to group by every column I select.  Unfortunatelly Drupal 8 added ONLY_FULL_GROUP_BY :( Then, how can I use groupBy and select more then one column at the same time? Enter from password field doesn't submit SE login form On  page for a site where I don't yet have an account, if I select the "Log in using Stack Exchange" box, when I hit enter from the password form, nothing happens.  Minor, but... Is it possible to delete multiple elements from a list at the same time? If I want to delete elements at index 0 and 2, and try something like del somelist[0], followed by del somelist[2], the second statement will actually delete somelist[3].  I suppose I could always delete the higher numbered elements first but I'm hoping there is a better way. I have scene that looks like this:   And I want to add volumetric lighting to it so that light forms a rays of light when it go through the trees like on this example that I found in youtube:   But the problem is that all of these tutorials show how to make this lighting coming from windows, but when I try to replicate it in my forest scene it looks like big ugly fog with cubical shape. Also the light is coming from the back of the camera (as you can see) and there are some spots that needs this special lighting (like places where light goes through trees) and some that don't (like big bright are on the bottom left corner) so I can't just add a giant cube to all of the scene. When we want to open an application or file from the terminal, we type, say,  okular file.dvi   This opens the application, but also shows the status of the application. We cannot close the terminal, because it kills the process. Unfortunately, if you're trying to, for example, create a LaTeX file, you will need one tab for the text editor, one for the dvi file, and so on. And if you're trying to open all windows from the terminal, you can forget it. I'm trying use the terminal as much as possible, and while I have Yakuake, it is still a bother having so many tabs and seeing which of those have an application I've killed and so on.  So, is there a way to open an application/file from the terminal so that the status doesn't show and immediately gives the prompt so that we can use it to open more applications? What information does the trace of a matrix give? Handle either a list or single integer as an argument How to use "fit" to frame the nodes and labels I'm using the fit TikZ library to fit a rectangle around two nodes which include labels. However, the rectangle is only fit around the actual nodes, not about their labels:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{fit}  \begin{document} \begin{tikzpicture}   \node [label=label1,draw] (node1) {Node1}; \node [label=label2,draw] (node2) at (4,2){Node2};  \node[fit=(node1)(node2), draw] {}; \end{tikzpicture} \end{document}     How to fit the rectangle also around the node labels? When clicking help, you get this:    First, it shouldn't have a button to return to the main site, as this site isn't attached to any other site. Second, What's Meta's wording should be changed, because again, there is no main site. Apex:OutputText to Currency Format from String Wrapper is there a way to pass a string to the &lt;apex:outputText&gt; so that it can be formatted as a currency or percent value?  Here's what I have inside a column of my visual force table:  &lt;apex:outputText value="{0, number, currecny}"&gt; &lt;apex:param value="{!row.values[1]}" /&gt; &lt;/apex:outputText   this gives me an error at runtime (when the visual force page loads), which I think may be some kind of type mismatch, where &lt;apex:outputText&gt; is expecting a Decimal or number but I am passing a string.  This is the error at runtime:     The value attribute on  is not in a valid format. It must be a positive number, and of type Number, Date, Time, or Choice.   Thanks Configure tab-switch hotkey in gnome-terminal I used to use Alt+number to switch between gnome-terminal tabs. In my recent 19.10 installation, this does not work. When I press Alt+1, instead of switching tab, the command line shows this: (arg: 1)   and if I press Alt+2, it becomes: (arg: 12)   I checked the options in gnome-terminal, it is set to use Alt+number to switch between tabs. I would like to know which application is hijacking the hotkey, and how to fix it. PS. I do NOT want to use Ctrl+PgUp/PgDn for this. Thanks.