I have added bibliography in my latex file like so :  ...to the literature \cite{ahu61} \bibliography{bibliography}   and my bibliography.bib looks like this :   @article{ahu61,        author={Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa},        title={Constraint qualifications in maximization problems},        journal={Naval Research Logistics Quarterly},        volume={8},        year = 1961,        pages = {175-191}      }   If i keep the citation I get   Texification succeeded: no errors!  However, there were warnings in your LaTeX source  ./main.tex:231: LaTeX Warning: Citation `ahu61' on page 4 undefined on input line 231. ./main.tex: LaTeX Warning: There were undefined references.   and no bibliography.  If I remove it I get no warnings but no bibliography either.

I an new to Latex, and I am trying to use 'bibtex' to create a reference, I was working in pdfLaTeX+MakeIndex+BibTex.  Here is my sample code:  \documentclass[12pt]{article}  \usepackage{cite}  \begin {document} $$ x_i$$  \section{Introduction}  According to \cite{2006}   \bibliographystyle{IEEEtran}  \bibliography{my_bibtex}  \end{document}   Edit:  Here is the .bib file that I am using.  @article{2006,      jstor_articletype = {research-article},      title = {The Cross-Section of Volatility and Expected Returns},      author = {Ang, Andrew and Hodrick, Robert J. and Xing, Yuhang and Zhang, Xiaoyan},      journal = {The Journal of Finance},      jstor_issuetitle = {},      volume = {61},      number = {1},      jstor_formatteddate = {Feb., 2006},      pages = {pp. 259-299},      url = {http://www.jstor.org/stable/3699341},      ISSN = {00221082},      abstract = {We examine the pricing of aggregate volatility risk in the cross-section of stock returns. Consistent with theory, we find that stocks with high sensitivities to innovations in aggregate volatility have low average returns. Stocks with high idiosyncratic volatility relative to the Fama and French (1993, Journal of Financial Economics 25, 2349) model have abysmally low average returns. This phenomenon cannot be explained by exposure to aggregate volatility risk. Size, book-to-market, momentum, and liquidity effects cannot account for either the low average returns earned by stocks with high exposure to systematic volatility risk or for the low average returns of stocks with high idiosyncratic volatility.},      language = {English},      year = {2006},      publisher = {Blackwell Publishing for the American Finance Association},      copyright = {Copyright © 2006 American Finance Association},     }   However, instead of expected [1] for reference, I am getting [?], an nothing is listed under references, though the word "References" does show up.  In the youtube  that I was following this case is described. The tutorial did say that sometimes there might this be an issue with creating a reference. To which the author suggest to work in BibTeX only, then move to pdfLaTeX and then click run a couple of times, and things should work. I did the above, but nothing works for me.   Any ideas how to get my code to work?  Edit:  Here are the contents of my .bbl file:  % Generated by IEEEtran.bst, version: 1.13 (2008/09/30) \begin{thebibliography}{} \providecommand{\url}[1]{#1} \csname url@samestyle\endcsname \providecommand{\newblock}{\relax} \providecommand{\bibinfo}[2]{#2} \providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax} \providecommand{\BIBentryALTinterwordstretchfactor}{4} \providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus \BIBentryALTinterwordstretchfactor\fontdimen3\font minus   \fontdimen4\font\relax} \providecommand{\BIBforeignlanguage}[2]{{% \expandafter\ifx\csname l@#1\endcsname\relax \typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}% \typeout{** loaded for the language `#1'. Using the pattern for}% \typeout{** the default language instead.}% \else \language=\csname l@#1\endcsname \fi #2}} \providecommand{\BIBdecl}{\relax} \BIBdecl   Edit:  Here are contents of my .blg file.  This is BibTeX, Version 0.99dThe top-level auxiliary file: newfile.aux The style file: IEEEtran.bst I couldn't open database file my_bibtex.bib ---line 4 of file newfile.aux  : \bibdata{my_bibtex  :                   } I'm skipping whatever remains of this command I found no database files---while reading file newfile.aux Warning--I didn't find a database entry for "2006" -- IEEEtran.bst version 1.13 (2008/09/30) by Michael Shell. -- http://www.michaelshell.org/tex/ieeetran/bibtex/ -- See the "IEEEtran_bst_HOWTO.pdf" manual for usage information.   Done. (There were 2 error messages)  Thank You in Advance


I am an international student at a US university with a major in Physics. I am applying for PhD in astrophysics/gravitational physics fields. Until my sophomore year I was a Computer Science major with a Physics minor, but starting my junior year, I changed my major to Physics. During my sophomore year, I was suffering through home-sickness/depression and failed two of my Computer Science classes. (Later I did a computational project and won a prize at a hackathon). But I have A's in all my Physics classes (including the upper level courses), and did a summer internship at a reputed institute in Germany. I am a senior with a 3.8 GPA in Physics and 3.5 overall GPA. I am not aiming for any top universities, but mostly to lower ranked schools with good Physics programs (that are within my GPA and GRE scores). Should I still consider applying to grad schools or change my career plans? How does this affect my application?

So here's a funny thing: I have 3 Fs and 1 D on my transcript, but my GPA is ~3.8, which is "high" because I double majored in math and computer science. The reason for those 4 bad grades is that I had 2 bad semesters where I suffered from depression; I didn't drop the classes before the deadline so I ended up failing the classes. However I retook the classes and got As in them (hence my GPA), and in fact got A/A-s in all subsequent classes (quite an improvement). I plan to apply to a master's for computer science, and eventually a phd. However I know the admission officers eyes will bleed when they see my transcript, despite my GPA, because my school keeps ALL grades on transcripts, even if the grades were replaced by retaking classes. Do I still have a chance at top-10 graduate school for computer science even with these grades (which were retaken and then aced)?


I'm working on a sharepoint webpart which has a button pull elements from different text boxes on the same page and collates them together in a single string to then copy to the user's clipboard so they can quickly put together a communication for an issue.  So far I have the below code, but it's not actually copying anything.  I've run it through JSHint and that's not turned up any issues, but I picked up the code at the bottom of the function for copying the text from a tutorial about interacting with the clipboard API for how to copy from a text box, hence why I add everything to the smsToSend text area.  A note for people is that if there's an issue that's brand new and hasn't been sent out before, then the incident update is always 'we are investigating the issue' as this is automatically placed into the field, which is why I testing against it, as both new and update communications would have 'Open' as the incident status.  function generateSMS(){  var issueTitle = document.getElementById("incidentTitle");  var advisorImpact = document.getElementById("advisorImpact");  var incidentUpdate = document.getElementById("incidentUpdate");  var incidentStatus = document.getElementById("incidentState");  var startTime = document.getElementById("startTime");  var endTime = document.getElementById("endTime");  var smsToSend = document.createElement('textarea');  var incidentPriority = document.getElementById("incidentPriority");  var incidentBrand = "TechTeams";  var systemImpacted = document.getElementById("systemImpacted");  var incidentReference = document.getElementById("incidentReference");   if (incidentStatus != "Closed"){      if (incidentUpdate == "We are investigating this issue"){          smsToSend = "P" + incidentPriority + " " + incidentBrand + "IT ISSUE: " + systemImpacted + ": " + issueTitle + ". " + advisorImpact + ": " + incidentReference;      }      else {          smsToSend = "P" + incidentPriority + " " + incidentBrand + "IT UPDATE: " + systemImpacted + ": " + incidentUpdate + ": " + incidentReference;      }  }  else{      smsToSend = "P" + incidentPriority + " " + incidentBrand + "IT RESOLVED: " + systemImpacted + ": " + incidentUpdate + ": Start: " + startTime + " End: " + endTime + " Reference: " + incidentReference;  }   smsToSend.setAttribute('readonly','');   smsToSend.style = {position: 'absolute', left: '-9999px'};   document.body.appendChild(smsToSend);   smsToSend.select();   document.execCommand('copy');   document.body.removeChild(smsToSend); }

What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData("Text", text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");         const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using :


I would've seen this in the early nineties. I think it was a movie, and only saw the end of it on TV (which probably means it wasn't new at the time).  There was a boy and a girl, and they were trying to escape a city that had been overtaken by androids. At the end, they were talking with what seemed to be the android in charge, won some kind of moral victory in their speech to it, and the androids all shut down and/or the walls keeping them in the city crumbled or exploded and they were able to escape.  The end titles had a sweet but sad song with female vocals, showing a montage of scenes from the movie.  As far as I can work out, it was not any Studio Ghibli production, and is definitely not Laputa. Though I'm pretty sure it was anime it may have been western style animation.  Update: I've just remembered an important detail! It turned out at the end that all these robots/androids were being controlled by a spoiled boy. It's possible I've actually made a dupe of this question, as the 'bubble' sounds familiar too:

During the 90's I saw parts of a science-fiction cartoon on TV. I don't remember for sure, but the graphics resembled , and I think it was American, but again, I'm not sure.  What I do remember is that the main character had a robot arm that looked just like a regular one. I think the humans were at war with robots controlled by an evil overlord, and someone believed the main character was also a robot because of his arm.  Another relevant memory was related to the bad guy (or one of the bad guys): in the end, it turns out it was a bratty teen who thought it was a game or who didn't realize exactly what he did.    [edit] Based on the feedback received so far, I need to add that:   this was a cartoon, not anime / japanese animation.  It was a movie, not a cartoon series. The robots were more like androids / humanoid robots, not mecha.   I also remembered a female protagonist. She's the one who notices the main character had a robotic arm after he has some sort of accident and robotic parts become visible beneath his arm skin.   Do these details sound familiar to anyone?


I have a list with 2,500 items. I want to print the first 50 items in a line and the next 50 items in the next line. So there will be a total of 50 lines with 50 items in each line.  myList = ['item1', item2,..., 'item2500']   line1 = item1, item2, ..., item50 line2 = item51, item52,...., item100 . . line 50 = item2451, item2452,...., item 2500   Tried some while loops but it didn't quite work out. Is there a built-in functions or an easier way to do this? Thank you.

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:


Im using the AWS api in my groovy script:  new AmazonDynamoDBClientBuilder ()             .withRegion(Regions.SA_EAST_1)             .build()   I want to be able to pass in the region to the script as a user argument but Regions is an enum. How can I pass the region (like "SA_EAST_1" or "CN_NORTH_1") as a string? I could have my own map to convert the string values to the enum values but that seems really dumb.

Say I have an enum which is just public enum Blah {     A, B, C, D }  and I would like to find the enum value of a string, for example "A" which would be Blah.A. How would it be possible to do this? Is the  the method I need? If so, how would I use this?


Can someone explain me what is the difference between those two codes? When I have to use first and when second? It is clear that when method has parameter with the same name as data member in the class, I have to use "this". But here method dont have any parameters. When in this case I have to use "this"?  public float getPrice(){     return this.price; }        public float getPrice(){     return price; }

I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:  In a constructor:  public Light(Vector v) {     this.dir = new Vector(v); }   Elsewhere  public void SomeMethod() {     Vector vec = new Vector();     double d = (vec * vec) - (this.radius * this.radius); }


Is there an easy way to programmatically extract IP address, without tedious parsing of ifconfig?  I would not mind simple command output processing using sed to do it but not processing multiline files from /etc some place.  What I am trying to do is modify my .bashrc to display the IP address of the host in the greeting message.  I am using Ubuntu 12.04 but decided to post here instead of the Ubuntu forum because I consider this to be not distro-specific.

How can I get my own IP address and save it to a variable in a shell script?


I am using  in header.   The setup is Drupal 7.35 + Oracle + Apache2. Theses are all the items which takes more execution time.  How can I cache menu items path and all Js and CSS files.

Drupal is fast at develop, but the performance is so poor.  It is hard to reach 50 request per second.  And there are so many SQL queries in a simple web page.  If you test the request time of a form submit in Drupal.org it will always take seconds to finish.  How do you improve the speed of your web site?


Correct me if I am wrong: in the  mechanism, when a virtual particle-antiparticle pair gets created at the edge of the black hole, a black hole could sometimes eat up one of the particles before it could annihilate with the other particle, and this causes the other particle to radiate away, and this process causes a loss in the mass of the black hole.  What I don't understand is: if a black-hole also absorbs a particle from the pair, shouldn't the black hole actually be gaining mass? Since the black-hole hasn't lost anything but instead gains a particle?

My understanding is that  isn't really radiated from a black hole, but rather occurs when a particle anti-particle pair spontaneously pop into existence, and before they can annihilate each other, the antiparticle gets sucked into the black hole while the particle escapes. In this way it appears that matter has escaped the black hole because it has lost some mass and that amount of mass is now zipping away from it.  Is this correct? If so, wouldn't it be equally likely that the particle be trapped in the black hole and the antiparticle go zipping away, appearing as if the black hole is spontaneously growing and emitting antimatter?  How is it that this process can become unbalanced and cause a black hole to eventually emerge from its event horizon and evaporate into cosmic soup over eons?


I am trying to communicate with DAO class through getters/setters either providing or fetching data to DAO. I am beginner and here is what I did so far: public class Bean { private String[] categories;  public Bean(String[] categories) {     super();     this.categories = categories; }  protected String[] getCategories() {     return categories; }  protected void setCategories(String[] categories) {     this.categories = categories;     System.out.print(categories); } }  Here is DAO code: > // INSERT     protected boolean insert(Bean b) throws SQLException {         int[] result = null;         String[] categories = b.getCategories();                  try {             cnn = getConnection();             ps = cnn.prepareStatement(INSERT);             for (int i = 0; i < categories.length; i++) {                 System.out.print(categories[i]);                 if (categories[i] != null ) {                     ps.clearParameters();                     ps.setArray(1, cnn.createArrayOf("VARCHAR", categories));                     ps.addBatch();                 }                 result = ps.executeBatch();             }             ps.clearBatch();             cnn.commit();               I am getting parameter values in servlet get method as: String[] categories = request.getParameterValues("category");  In controller servlet I am writing code like this: Bean b = new Bean(categories);     b.setCategories(categories);     DAO db = new DAO();     try {         boolean inserted = db.insert(b);         if(inserted) {             out.print(inserted);         }         else {             out.print(inserted);         }     } catch (SQLException e) {         // TODO Auto-generated catch block         e.printStackTrace();     }  The above code is throwing the following error:  [Ljava.lang.String;@7c5da1becom.hello.user.categories.DAO java.lang.NullPointerException: Cannot invoke "com.hello.commons.DBController.getJdbcDriver()" because "dbc" is null Feb 11, 2021 10:02:31 AM org.apache.catalina.core.StandardWrapperValve invoke  I am sure there are many mistakes. Being a beginner and learner please correct my code and advise best standards Best regards

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


I've got a variety of frozen fruits in a freezer that I've been neglecting...For 12 months or so, at this point. At this point I'm wondering whether I should bother with the fruit at all or if there's a receipe that works better with aged produce? Part of my stock is fruit that was already frozen and part were cranberries that started fresh and then got the freeze. Any tips?

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


Can anonymized teaching evaluations be made (legally) publicly available by the teacher who received them in the United States? For example, I have seen a fair amount of teaching statement containing anonymized teaching evaluations in faculty applications, and some of these teaching statements are publicly available (e.g., placed on the applicant's website)

These days it is very common to have some course evaluation towards the end of a course, in which students respond to standardized questions on a numerical scale (e.g. between 1 and 5) and can additionally give free-form comments.  Sometimes individual lecturers make student comments (and their responses) available to the cohort in which the survey was taken and the next cohort, to show that they are open to critique and how they respond to it.  I am, however, more interested in cases where there is a departmental/faculty/university-wide policy to consistently publish evaluation results for all of their courses (averages of numerical data only, or perhaps the free-form comments as well) to the current and future cohorts.    Is it common for universities to have a policy of publishing student course evaluations?  What are advantages and disadvantages of doing this?  Has this been looked at in the educational literature?


What is a word for a person who is amazed at everything, no matter how big or small? (Either an adjective or a noun would be fine)

Is there a specific word that describes people who are easily impressed?


I have tried various indicators such as SMA's, EMA's, stochastics, Bollinger bands etc, while trying to analyze a stock, but they often are only as effective as making a wild guess on picking a stock. My question here is, how can you use the indicators to effective use and which one of these is the most reliable(if any)?

Do you find  to be an effective way of increasing the returns on your investments?  This can be either by itself, or in combination with other indicators.  If so, what techniques do you use?    What studies exist which show evidence for whether or not different techniques work?


I get an error by "btnCalculate.setOnClickListener(new View.OnClickListener()" saying      "Method invocation 'btnCalculate.setOnClickListener(new   View.OnClickListener() { @Override ...' may produce   'java.lang.NullPointerException"   What does this mean and how can I fix it?  import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView;  import org.w3c.dom.Text;  public class MainActivity extends AppCompatActivity {     TextView totalTextView;     EditText edtPercentage;     EditText edtNumber;      float percentage;     float number;     float total;      @Override     protected void onCreate(Bundle savedInstanceState)     {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);         setSupportActionBar(toolbar);          percentage = 0;         number = 0;         total = 0;          Button btnCalculate = (Button) findViewById(R.id.btnCalculate);         btnCalculate.setOnClickListener(new View.OnClickListener()         {             @Override             public void onClick(View view)             {                 percentage = Float.parseFloat(edtPercentage.getText().toString());                 number = Float.parseFloat(edtNumber.getText().toString());                 total = number * percentage/100;                 totalTextView.setText(String.valueOf(total));             }         });     }      @Override     public boolean onCreateOptionsMenu(Menu menu)     {         // Inflate the menu; this adds items to the action bar if it is present.         getMenuInflater().inflate(R.menu.menu_main, menu);         return true;     }      @Override     public boolean onOptionsItemSelected(MenuItem item)     {         // Handle action bar item clicks here. The action bar will         // automatically handle clicks on the Home/Up button, so long         // as you specify a parent activity in AndroidManifest.xml.         int id = item.getItemId();          //noinspection SimplifiableIfStatement         if (id == R.id.action_settings)         {             return true;         }          return super.onOptionsItemSelected(item);     } }


Consider the set $A=\{\sin k:k\in\mathbb Z  \}$. I want to know whether this set is dense in $[-1,1]$.  I have a hunch that this problem can somehow be reduced to the approximation of $\pi$ using rationals, although I don't know how to make a connection.

We know that the sine function takes it values between $[-1,1]$. So is the set $$A = \{ \sin{n} \ : \ n \in \mathbb{N}\}$$ dense in $[-1,1]$. Generally, for showing the set is dense, one proceeds, by finding out what is $\overline{A}$ of this given set. And if $\overline{A} = [-1,1]$, we are through with the proof, but i having trouble here!  Similarly can one do this with cosine function also, that is proving $B= \{ \cos{n} \ : \ n \in \mathbb{N}\}$ being dense in $[-1,1]$


How does one solve equations of the form $AX^2+BX+C=0$ where $A,B,C$ are square matrices and $X$ is a matrix to be solved for?  More generally how does one solve equations of the form $AX^2B+CXD+E=0$?  Even more generally how does one solve higher order equations of this form such as $AX^3B+CX^2D+EXF+G=0$  In all cases, I could simply express the entries of the matrix $X$ as variables $x_1,x_2,\dots$ and multiply out the matrices and derive equations corresponding to each entry of the matrices however this would result in (for the first and most simple case at least) a system of 4 quadratic equations in 4 variables which I have no experience with. Is this the best approach or can the fact that we are dealing with matrices help to simplify the problem?  Thanks

Here is the quadratic matrix equation I've been looking at lately:  $$ Q_{r,r}=A_{r,r}X_{r,r}^2+B_{r,r}X_{r,r}+C_{r,r}=0_{r,r} $$  Note that $A, B, C,$ and $X$ are $r \times r$ matrices. $A$ contains known elements, $B$ contains known elements, $C$ contains known elements, and $X$ contains the unknown elements that you are solving for. $ 0_{r,r} $ is just the $r \times r$ null matrix.  Is there any solution for $X$ in terms of $A, B,$ and $C$ (making no easy assumptions)? (e.g. $X$ is a diagonal matrix, $A=B=C$, or anything of that sort.)  I have tried to solve this and nothing has worked out. I attempted solving it generally by manipulating the matrices in variable form (i.e. actually writing out the matrices $A, B, C,$ and $X$ in variables) and finding a unique solution for all of the elements of $X$ in terms of the elements of $A, B,$ and $C$. That didn't work out beyond the case of $r=1$.  Trying to solve it by looking at $r$ at different values did not work out either; I ended up with very abysmal equations at just $r=2$. I don't know exactly how to make this appealing to the denizens of math.stackexchange, but it (as far as I know) isn't a heavily studied problem.  There is a very high possibility that I've just been doing elementary techniques and nothing of note, so I hope someone or a group of people could shed light on this.


I've got 2 PCs with Linux distributions installed (one has Ubuntu 17.04 the other Mint 17.3) and I'd like to know how to transfer files between one another over my WiFi-network.   I would like to do that without having to install programs or using GUIs;  I want to use the terminal.

I have a desktop (Ubuntu 13.04 & Win 7 Home Premium) and a Laptop (Ubuntu 12.04), both having WiFi adapters. I also have a WiFi router connected to internet which both my computers can access.  I want to share files between my desktop and my laptop using WiFi (similar to Homegroup on Windows 7 but without using Ethernet cables).  How do I set-up that?  I want to share files using both OSs, if anyone have have information about sharing files with any of the OS please answer!


I used the following link to implement code listing:    It works generally fine, but whenever I write math and do power of something for example it creates a white space between the lines just like in the picture:    This only happens in math mode when I do exponentiation.  Does anyone know how I can fix this? The code I'm using for the background is as follows:  \definecolor{codegreen}{rgb}{0,0.6,0}  \definecolor{codegray}{rgb}{0.5,0.5,0.5}  \definecolor{codepurple}{rgb}{0.58,0,0.82} \definecolor{codeorange}{rgb}{1,0.4,0} \definecolor{backcolour}{rgb}{0.95,0.95,0.92}     \lstdefinestyle{mystyle}{          backgroundcolor=\color{backcolour},             commentstyle=\color{codegreen},          keywordstyle=\color{codeorange},          numberstyle=\tiny\color{black},          stringstyle=\color{codepurple},          basicstyle=\footnotesize,          breakatwhitespace=false,                   breaklines=true,                           captionpos=b,                              keepspaces=true,                           numbers=left,                              numbersep=5pt,                            showspaces=false,                          showstringspaces=false,          showtabs=false,                           tabsize=2 }    \lstset{style=mystyle, language=Python}   And the packages I am using is listing and color.   I would really appreciate any help! Thanks!

\documentclass{article} \usepackage{listings} \usepackage{color} \begin{document} \definecolor{light-gray}{gray}{0.95} \lstset{basicstyle=\ttfamily\footnotesize,     backgroundcolor=\color{light-gray}, xleftmargin=0.7cm,     frame=tlbr, framesep=0.2cm, framerule=0pt,   } \begin{lstlisting}[mathescape] k = $\lfloor (10\log n \cdot \log\log n)^{1/3} \rfloor$; k = $\lfloor (4\log n \cdot \log n)^{1/3} \rfloor$; \end{lstlisting} \end{document}   produces    An answer to a similar question said that "this line is just an artifact of the viewer". But this line appears in two viewers and various zoom steps. On top of that, one can clearly see that the 1/3 overlaps with the white line. So I do not accept it as a mere artifact anymore.  How could this problem be approached? Is it possible to somehow put another grey layer underneath the lstlisting environment which would "eat up" any white lines?  edit: Is there a solution that would not involve editing every line of the code?


As a Linux user, I'd ask how to learn the Linux's directories and files, since everything in Linux is a file descriptor.  I've worked with some distribution of Linux so I think I did understand commands enough.I don't know this is true or not,but I believe the kinds of commands which configure the system work with files,so understanding Linux's files may be a good point to make a firm understanding of it.  By the way,Would you mind guiding me ?

In Windows there’re perhaps only a couple of important folders (by important I mean important in my logical picture of the Windows file system) in the installation drive (in my case C:\). Namely Program Files and Windows. I simply stay away from Windows folder and the “add remove program files” is good enough to handle the program files folder of Windows. Of course there’s a folder named Users where the users (who are not admins) can access only their folders.  Thus there’s a clear picture at some level in my mind of the Windows file system. In Ubuntu, when I reach the location /, there’s a huge list of folders, most of which I have no clue as to what they contain. The /bin folder seems to be the equivalent of the Windows folder in windows. The /usr folder seems like it’s the equivalent of the Users folder in Windows. But even the /home folder looks like it can fit the bill.  Please understand that I do understand, that Ubuntu (Linux) has a different character than that of Windows, i.e., there need not be exact equivalent of Windows functions, in Ubuntu. All I am looking for is a bit more clearer picture of the Ubuntu file system.   This question is a part of a bigger question which I am splitting up to make it more answerable. The original question can be found here:


I am travelling to Chicago from saudi via FRANKFURT AND PARIS. Do I need a schengen visa if I have a valid visa for USA? I am an Indian national.

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I am trying to parse a nested JSON  as shown below:   {     "a":{"aa":"11","bb":"232"},     "b":{"aa":"111","bb":"224"},     "c":{"aa":"121","bb":"232"} }   I am trying to get to the nested JSON part using loops:  JSONParser parser = new JSONParser(); JSONObject infoJSON = (JSONObject) parser.parse(new FileReader(new File("resources/abc.json")));                  for(int i=0 ;i< infoJSON.size(); i++){               JSONObject innerJSON = (JSONObject) infoJSON.get(i);                 System.out.println(innerJSON.keySet()); }   It throws me NullPointerException. I feel there is some issue with the iteration.

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


Consider a cube shaped container with one mole of gas inside.  Acceleration due to gravity would give the difference in force between the top of the container and the bottom to be mg, with net force mg on the bottom, where m is the mass of the molecule.  I think I understand this idea, but what I am confused about is that at any one time, only a subset of the molecules collide with the bottom of the container at any instance in time; therefore, only a subset of all the molecules are contributing to the net difference in force - some, for example are colliding with the sides, some occupy the space within the container. So is the mass of the gas, determined by weighing, less than the actual mass of the gas?  What if I changed the shape of the container, so that the surface area in contact with the balance is greater or smaller? The pressure per unit area is the same for all sides, but the overall force on that surface is different.   I hope that makes sense, I would appreciate any help with this.

I know that a gas is made of atoms or molecules moving freely in space.  When these particles hit the walls of where they're kept in they cause something called pressure.  But these particles never pile up on each other and push a surface down by their weight so that we can measure it as weight, not pressure.  So why do gases have weight?


Ohm's Law: I $=\frac{V}{R}$: Increasing voltage increases current.  Power Law: P $={V}*{I}$: Increasing voltage decreases current.  Am I missing something?

Ohm's law states that  electric current is directly proportional to voltage provided that physical conditions like temperature remain constant i.e. $$V = IR$$  On the other hand,  $$\text{Power = Voltage} \times \text{Current}$$  So here it seems that the higher the voltage, the lower the current, provided that the power remains constant (i.e. current is inversely proportional to the voltage here which is against Ohm's Law.).   Now my question is how do physicists explain this apparent contradiction? Or maybe this not a contradiction because I am analysing things incorrectly?   P.S.: I am a tenth grade student so please refrain from the usage of highly complicated terminologies in your answers.


I am purchasing MacBook Pro 2017 with Touch Bar and I was told by one customer representative of the shop that you need anti virus because old one use to come with build in anti virus but not the new one.   Is it true? If so why?

Is it worth to buy an anti-virus software for Mac OS X?  I heard both opinions like "it's not possible to get a virus on Mac OS X" and "Mac OS X is also vulnerable against virus... "  Which is true? What is the accepted practice, if any? Under what circumstances would anti-virus be advisable?


At the very final scene of the second season of Game of Thrones, something weird happens.      Sam notices a White Walker along with an army of wights, all heading his way. Since he can't run, he hides. But when we see the White Walker, it seems that he and Sam look at each other.    And for some reason, the White Walker doesn't kill Sam. And even if he didn't really see him. It was my impression that they could sense humans in their vicinity. Surely Sam would have set these internal alarms of the icy CGI warrior.   So how is Sam alive at all??

Why do White Walkers spare members of the Night's Watch such as Will from the pilot episode and Samwell Tarly, although they don't seem like a merciful species?


I'm working on a problem with celestial bodies and for my purpose days and AUs are more appropriate units than seconds and meters. So I tried to convert the constant of gravitation, $G$, like this:  $$ k= \frac{\frac{\text{AU}^3}{\text{kg}\times \text{D}^2}}{\frac{\text{m}^3}{\text{kg}\times \text{s}^2}}=(\frac{\text{AU}}{\text{m}})^3(\frac{s}{D})^2=\frac{(1.496\times 10^{-11})^3}{(24\times 60\times 60)^2}=4.485\times 10^{-43} $$ $$ G=6.673\times10^{-11}\times k = 6.673\times10^{-11}\times4.485\times 10^{-43}=2.993\times 10^{-53} $$  Now I want to do some calculations with this value. First of all, what is the orbital period of a circular orbit around the sun?  $$ v_0=\sqrt{\frac{G M_\odot}{r}} $$ $$ t = \frac{2\pi r}{v_0} $$  The initial velocity has been adapted so that the centripetal force equals the force of gravitation, so the orbit will be circular.  For $r=1$ I expected that the orbital period would be a couple of hundred days, since it takes about 365 days for the earth to circle the sun and one AU is the distance between the sun and the earth. However, when I do the calculation I get that $t=8.14462\times 10^{11}$. What did I do wrong?

I am trying to write a code in Python to simulate $N$ bodies interacting through gravity. In particular I am trying to see whether a system of particles with random initial positions and zero velocity will fall into a viral equilibrium.  I understand that in $N$ body simulations, it is advisable to set $G=1$ and $M=1$. However, having done this what then are my units of time or length or energy?


I'm designing an app that will be deployed/installed to a linux machine (perhaps Archlinux, but could be any distro and in fact I would actually prefer something lightweight and inside the Debian family if at all possible). This machine will not be a "general purpose" or multiple application machine: it's sole purpose is to run my app at startup and close my app at shutdown. No other end-user apps would be installed on this machine.  I'm looking for a way to:   When the user powers on the machine, instead of the normal Ubuntu/OS startup --> BIOS --> splash screen --> login process, they just see a splash screen for my app (while the system and app boots up) and then my app loads with its own look and feel While using the machine, they cannot access any other apps, shells or other part of the operating system; all they have access to is my app When running, the app takes up the entire screen and its window cannot be minimized or resized The app (as software) cannot be turned off or killed while running, except... Turning off the machine (physically powering it down) shuts down the app gracefully and shuts down the underlying OS as well   Hence, the end user never knows that the machine is running on top of linux; to them, the app is the only thing "living" on the machine.  This has to be possible seeing that Android is just a wrapper around Linux, and there are thousands of other devices that just run a single app and nothing more.  This will likely be a C binary that launches a Java desktop application as the actual app.  Any ideas as to how I can accomplish the items mentioned above?

How I could go about creating my own "custom" Linux distro that will run just one program, pretty much exactly the same way as .


NOTE:  is a request for total rep to unlock synonym suggesting.    This is not the same feature request.  This is a request to have Question Votes count toward the synonym suggestion total (rather than just answer votes).   I ask a lot of questions.  Like any good question asker, I research my question before asking it.  (However, I don't so so much research that I am ready to jump in and start answering questions.)    When I finally get around to asking my question, I frequently note that the phrase that is most commonly used to refer to a topic is not a tag.  After some searching, I find the right tag and I think "I would like to help out the next asker by putting a synonym on this tag".    But even if my questions get some up-votes, I can't help out like this.  It seems a bit backwards to me to have the answerers being the only ones who can suggest synonyms.  The anwerers KNOW their tag(s).  They don't need any synonyms (so they are less likely to suggest them).  It is the question asker that needs the synonym (so that they can get their question on the right tag).  Because the asker needs the synonym, they are the most likely to identify a missing one.  So, I would like to suggest this feature request:   Allow askers with X number of question up-votes in a tag (or just # of questions asked) to SUGGEST synonyms.   Don't allow them to vote on synonyms, because they are not the authority (like the answerers are).

On the , in order to be able to propose a tag synonym you need:     more than 2500 reputation and a total answer score of 5 or more on the tag   What about people with a high question score on a tag, shouldn't we be able to suggest them to? For the tag I was planning to suggest a synonym for, I currently have a total question score of 17, but I'm not allowed to suggest them as I've not got the answer score. Would it not make sense to say require an answer score of 5, or a question score of perhaps 10? (Or maybe even 5, but given that question score doesn't currently count perhaps the bar needs to be set higher)


$f(x)=x^n−nx$ where $x \ge 0x \ge 0$ and $n \ge 2n \ge 2$.    Determine the coloured area on the graph when $n = 2$, greater than 2 and when it goes towards infinity.  When I put $n=2$, the area should therefore be $−1,057$  When I put it for instance $n=10$ I get answer $−5.85$  are my calculations correct?  Also, what happens when $n$ goes towards infinity, how can we make a mathematical conclusion, and how can I prove it?

$f(x)=x^n - nx$ where $x \geq 0$ and $n \geq 2$.    Count the coloured area on the graph of the function, when n is 2, greater than 2 and goes towards infinity.  How can we mathematically prove that when n = infinity the area is equal to -infinity?


How many physical processors does ubuntu support?  I have a 4 socket server mainboard with 4 dual core AMD Opterons.  Will Ubuntu support all 8 processors.  I also have plans to upgrade to 6 core Opterons making this a 24 processor machine.  Any problem supporting this many processors?  Thank you.

I think this is kernel dependent and probably will change over time depending on the kernel a release uses, correct me if wrong  I'd like to know two things for all the currently supported Ubuntu releases:  How many maximum CPUs can Ubuntu handle (by default) at the same time with a standard desktop kernel? Is that count different from a server kernel and 32bit/64bit systems?  Where can I find that information on my system?


I am flying on September 2 from Rome, Italy to Orlando, Florida through Frankfurt, Germany. Both flights are on Lufthansa. How much transfer time do I need?

I have bought a ticket to travel from Bangalore (India) to Dublin (Ireland) via Frankfurt (Germany). Both of the flights is of Lufthansa and as a part of the same ticket. The transit time I will have in Frankfurt is 1 hour. Last time when I travelled in the same route, there was 1 hour and 20 minutes of time available between changing aircraft, but the connecting flight was late and I was able to board comfortably. Therefore I am not able to estimate this time how long it may take. I was wondering if this is too little time.   Also, I would like to know what the possibilities are in the case of missing the connecting flight?


Here is the problem I am working on: "Write a method that returns a new array by eliminating the duplicate values in the array using the following method header:  public static int[] eliminateDuplicates(int[] list)  Write a test program that read in ten integers, invokes the method and displays the result."  Here is the code I have:   public static void main(String[] args) {       Scanner input = new Scanner(System.in);       int[] list = new int[10];        System.out.print("Enter ten numbers:");        for (int i = 0; i < list.length; i++) {        list[i] = input.nextInt();       }        System.out.print("The distinct numbers are: ");       for(int i = 0; i < 10; i++){           if( list[i] != -1){       System.out.print(eliminateDuplicates(list));            }       }   }      public static int[] eliminateDuplicates(int[] list) {          for(int i = 0; i < 10; i++){              for(int j = i + 1; j < 10; j++){                 if (list[i] == list[j]){                     list[i]= -1;                      }              }            }          return list;           } }  My issue is my output is really strange, this is what I'm getting "[I@55f96302[I@55f96302[I@55f96302[I@55f96302[I@55f96302[I@55f96302[I@55f96302"  Can anyone tell me where I'm going wrong? Or a suggestion of where to start fixing it? I'm still a beginner, so I haven't learned a whole lot (like hashsets or anything).  You have my many thanks

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


I was recently making a standard deviation calculator for schoolwork in java, but I found a few problems with double. Because I wanted the answer as precise as possible, I used double instead of int or float, but the response was weird on few occasions. This is an example:  public class tryTest {     public static void main(String[] args)     {        double a = 0.1;        double b = 0.01;        double c = a-b;        System.out.println(c);      } }   The response should be .09, but it returns  0.09000000000000001   Why, and how should I fix this? Am I the only one with this problem?  Edit: I do realize Math.floor(c*100)/100 would work, but I'm just confused on why double does this.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I'm new to Blender and purchased a course on Udemy--"Complete Blender Creator: Learn 3D modelling for Beginners". I'm having a hard time wrapping my head around "Rotate & Scale" "Apply an objects transformation to it's data". I know how to do it, but the instructor doesn't go into much detail. What is it's purpose? Would someone mind explaining it to me like I'm five? Thanks

I've watched several tutorials and very often they applied the location, rotation or scale to the object when they transformed it in Object Mode. They always said it is important, but why?


How can I print the inside of a lambda function?  For example, from the following lambda expression:  lambda a, b: a / b   I want to receive:  a / b   Or from this expression:  lambda a, b: math.pow(a, b)   To receive:  pow(a, b)

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


That might be a easy problem but I'm still stacked on it.  I have string variable number = 11111111111111111111111111111110 and in decimal is 4294967294.  I couldn't use atoi because its value bypass int value. I tried also istringstream and strtoul and both of them gave inaccurate results.  What am I missing here?

I'm trying to convert an incoming sting of 1s and 0s from stdin into their respective binary values (where a string such as "11110111" would be converted to 0xF7). This seems pretty trivial but I don't want to reinvent the wheel so I'm wondering if there's anything in the C/C++ standard libs that can already perform such an operation?


I downloaded a latex template for a CV, and in it I tried to apply the usual `` '' syntax for opening and closing quotes. However, they turn out to be one sided ('' is treated as open quote, while it should be closing). Any idea why this might be happening? I also tried csquotes but that did not solve it.  The template I am using can be found .

I've just started using font Palatino for my documents, and I've realized the opening quotes are all rendered as closing quotes. As per the question  I use ``hello'' to quote, but somehow Palatino is always showing both as closed. If I uncomment \usepackage[sc]{mathpazo} then they are rendered correctly. How can I fix this?


I am trying to do a list with itemize but in beamer, the bullets are not shown and I cannot find the reason why.  \RequirePackage{flashmovie} \documentclass[12pt]{beamer} \setbeamertemplate{footline} {   \leavevmode%   \hbox{%       \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}     }   \vskip0pt% } \usepackage[backend=biber]{biblatex} \addbibresource{Presentacion.bib} \usepackage{tikz} \usepackage{ragged2e}  \usepackage{animate} \usepackage{gensymb} \usepackage{tabularx} \usepackage{amsmath,amsfonts, amssymb} \usepackage{cancel} \usepackage{mathtools} \usepackage[version=4]{mhchem} \usepackage{rotating} \usepackage[all]{xy} \usepackage{pdflscape} \usepackage{multirow} \usepackage{gensymb} \usepackage{chemfig} \usepackage{multicol} \usepackage[spanish]{babel} \usepackage{expl3} \usepackage{l3regex} \usepackage{enumitem} \usepackage{stackengine} \usecolortheme{seahorse} \usetheme{Goettingen} \title{Titulo} \subtitle{III-2018} \institute[Universities of Somewhere and Elsewhere] % (optional, but mostly needed) { \begin{center}   \normalsize{Universidad} \end{center} } \date{Bogot\'a} \AtBeginSubsection[] {   \begin{frame}<beamer>{Tabla de contenidos}     \tableofcontents[currentsection,currentsubsection]   \end{frame} } % Let's get started     \begin{document}     \begin{frame}       \titlepage     \end{frame}     \begin{frame}       \begin{itemize}       \item prueba       \end{itemize}     \end{frame} \end{document}   The file that I am working on is shown below:

this is my first time using beamer.  I copied a template from the sharelatex page on Beamer  Which works, and \begin{itemize} shows bullets     But after adding a few more packages that I need, all the bullets are gone!    What is going on and how can I fix this?  \documentclass{beamer}  \usepackage[utf8]{inputenc}    \usepackage{amsmath}  \usepackage{amsthm}     %Theorem Environment  \usepackage{amssymb}  \usepackage{multirow}  \usepackage{cancel}  \usepackage{amsfonts}  \usepackage{graphicx}  \usepackage{subfigure}  \usepackage{upgreek}     \usepackage{mathtools}  \usepackage{thmtools}  \usepackage{enumitem}       %Information to be included in the title page: \title{Sample title} \author{Anonymous} \institute{ShareLaTeX} \date{2014}  \begin{document}    \frame{\titlepage}    \begin{frame}  \frametitle{Sample frame title}  \begin{itemize} \item  This is a text in first frame.  \item This is a text in first frame. \item This is a text in first frame.  \end{itemize}  \end{frame}  \end{document}


What are the criteria that makes metaphysics metaphysics? In my understanding, metaphysics literally means beyond philosophy, but what are the criteria that makes something be metaphysical? Is the only criteria the fact that it has to be beyond what philosophy can uncover?

As I understand it, most or all of philosophy can be put into the three main branches of philosophy: Epistemology, Metaphysics, and Axiology.  A devotee of reason, I have great affinity for, and believe that I get the core nature of, Epistemlogy: the study of how claims of knowledge are justified, or of how we know things.  I also think I get the basic idea of Axiology: the study of values, from ethics/morals to art and beyond.  After looking up (or asking people) what the core of the study of Metaphysics is, and while the words I read or hear have meaning, some kind of "blind spot" has heretofore obstructed me from understanding basically Metaphysics's purpose. In black and white, pragmatic, and discrete terms: of what is Metaphysics the study?   I appreciate answers not to add another layer of vague and undefined confusion on top; for every explanation to this question simply makes me ask what the explanation even means! (Metaphysics asks "what is the nature of reality?", but the question makes absolutely no sense to me! I do not understand the meaning of: "The nature of reality is what it is." So what else can you say without mystifying?)  Can anyone explain the purpose of the study of Metaphysics to someone like me with a pragmatic, rational personality and approach? Every time I think I have found an answer, it turns out to be more Epistemology, to the point that I am starting to wonder if fully embracing reason results in the elimination of Metaphysics! Thanks.


General question that even a godaddy tech couldn't really answer for me. Im making a website with lots of video on it, most are embedded from youtube. I know, to stream videos, I should upgrade to a faster / better server. I just don't know why, or what that means. Will the videos actually load faster for the user? If I upgrade to a dedicated server should I host the videos on my server or will they still run faster being embedded from youtube(since youtube probably spends lots of money on its servers and streaming quality).   I know, on the users end, it really depends on how fast their internet connection is, but will upgrading my server allow the users computer to receive the files from the server at a higher rate therefor making the videos actually load quicker, or something... lol?   Also, if upgrading a server helps with streaming video, my jpg's / png's should download to a users computer quicker as well right? So a full page image might not flash, as it loads, as it would with a default / starter godaddy server (just as an example)...?

This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.


I would like to insert text from a cell into a formula.  For example, using the formula:   =LOOKUP(A1,'Sheet2'!B2:B10, 'Sheet2'!D2:D10)   I would like to change 'Sheet2' to some other reference (i.e. Sheet3) - this reference label is contained within another cell within the main spreadsheet.  Is there a way to do this?

Consider the following scenario illustrating the data I have vs. the data I want. Very simply, I have a single column that represents Field 1, Contents of Field 1,...etc. and is more appropriately formatted as pairs of rows across columns.          I've been experimenting with the TRANSPOSE function, but that one's new to me and I'm not sure it's the right direction. At first glance, it doesn't seem to accomodate my needs. But I could be wrong...  While it would be relatively simple to set up an 'every other row' formula, I also have to account for situations where I may have a foo repeating with a single bar or vice versa, and that's where I'm stuck. What I need is a "next unused cell" function, or something that can add X rows or Y columns to a particular cell.     I can envision a formula that can manipulate the cell label and solve my problem:  =($A1+2rows) or some kind of =$(A+3)$(4+2) that would return cell D6.   Is something like that possible?


My first impression is that Wine is a simulated Windows environment which uses free (and presumably open source) libraries as an alternative to Microsoft's proprietary libraries. Those libraries produce the same input and output, yet use alternative means to process the data. This would explain why there is very little performance hit.  Is my impression of WHAT exactly Wine is correct?  Has anyone noticed a performance loss from Wine (relative to actual Windows)?

I want to run MS Office on Ubuntu and have found messages saying you can do it with Wine, but I don't know what Wine is.


Can anyone prove/disprove the following statement?  Given a square matrix of size $n\ge2$, if all of its $(n-1)$-rowed minors are zero, then $\operatorname{rank}(A)\leq n-2$.  I'm having trouble connecting the information on the minors to what I have to prove.  Thank you in advance.


The git log command can specify a custom format, ie, git log --pretty=format:'%cD %<(20)%cn %f'  Will format the log files into columns. But I can't get this to work in a two line bash script: #!/bin/bash set -x CMD="git log --pretty=format:'%cD %<(20)%cn %f'" $CMD  It looks like bash is adding backslashes in front of '--' and single quotes... + CMD='git log --pretty=format:'\''%cD %<(20)%cn %f'\''' + git log '--pretty=format:'\''%cD' '%<(20)%cn' '%f'\''' fatal: ambiguous argument '%<(20)%cn': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'  I've tried escaping different parts of the command but can't git it to work. Any ideas?

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I'm looking for a word to describe someone who likes to try new things. Any suggestions?

Example:  A: Hey, do you like to do bungee jumping? B: Um, OK. Haven't done it before, but let's try it.  I'm not looking for adventurous or something similar. That word should also fit in less action-packed activities:  A: I have a new board game. Do you like to play? B: I don't know this game and, actually, I don't like these varieties of games but I'll play. Maybe it's fun.  First I thought about open-minded but I think this means more willing to listen to people, think about their ideas, arguments, ... and accept them (not necessarily agree). What word describes person who is willing to try activities he doesn't know or hasn't experienced before?


What does this mean, and how can I fix it?     Disk Management:    The operation you selected will convert the selected basic disk(s) to    dynamic disk(s). If you convert the disk(s) dynamic, you will not be    able to start installed operating systems from any volume on the disk(s)    (except the current boot volume)are you sure you want to continue? (Yes) (No)   What does this mean? Is it okay to go ahead and say Yes, or will something break if I do?  My computer is a Dell and the hard disk is an SSD Fix.

I have bought a removable hard drive enclosure and a 1TB hard drive to fit in it.  Its pretty cool; it has a little handle at the front of the caddy that allows you to take out the hard drive and stick into another caddy - or swap it for another hard drive, whatever you choose.  The manual talks about converting your dynamic disk to a basic disk if you want the ability to be able to use the "Swap Manager" software (some 3rd party software to allow swapping out of hard drives).  Can anyone explain to what the pros and cons are of having a basic vs dynamic HD?


I've been trying to remember the name of this novel I read many years ago and it's driving me crazy. It's possible that I'm mixing two different novels together in my head but I don't think so. The story followed several plot lines but they all revolved around the Earth's sun dying- one followed the construction of a ship that was being sent into the sun to try and find out what was happening. I remember there was a lot of description of the heat shielding they were using and talking about how it would take the ship many, many years to reach the center. The other plot line I remember was on a generation ship where things had gone wrong somehow. One member of the original crew(I think he was augmented in some way) was leading a group of second or third generation decendants who had forgotten all about earth and technology. The novel spanned thousands of years. If this sounds familiar to anyone please let me know. Thank you so much!

I'm having a hard time finding the name of a science fiction saga (I think the work spanned several books) that I read about a year ago on Wikipedia. Despite furious googling I have not been able to hit the correct story. I remember some plot points from a synopsis, and they are listed below. The following may contain spoilers.   There are several intelligent civilizations, one of them human. There are at least two civilizations scoring really high on the Kardashev scale. Both of these species inhabit stars and are at war because one species needs red dwarfs and the other black holes or something similar. One of these mega-species is also at war with the humans, and their battles and tactics include time travel. The economy of the human civilization relies largely on the war effort, and at some point the ending of the war bankrupts Earth. EDIT: Additional fact came to mind: One of the mega-species might have evolved only moments after the big bang, making it ancient.   Do any of these plot points ring a bell?


I created a very simple chair mesh and I would like to unwrap it so that I can map a texture. I would like to have Smart UV Project unwrap it automatically, but whether I do it that way or try manually, I am unable to unwrap the model.   Is there something I'm missing?    I tried a few guides, but I'm not sure where I'm going wrong.  My File:

I'm trying to unwrap a cube (I know, super complicated). I've got the seams marked, the UV editor open in a 2nd window, and all the geo highlighted. When I tell the cube to unwrap nothing happens. That's pretty much the long and short of the problem. Now I've been working off this one file for a couple weeks now, saving it off the original file and continuously cloning geometry. It's entirely possible I did something, pressed a button, something.   Any thoughts.


I have got a Deutchesland visa for Germany in India. I want to go Paris too. Do I need different Visa for that?it's written Valid for.  Deutchesland Type D

I am a non-EU citizen and am a PhD student in the Czech Republic. When I had my visa of type D, it says valid for CZ not Schengen States.  That being stated, I can understand that I can only enter EU from the Czech Republic. However, will I be able to travel across Schengen States using my student visa? I know that there is no passport control while visiting an EU country, but if the police of that country requires an ID:   Is my student ID card OK? Or should I show my passport? Can the visa in the passport cause trouble like I visited the country illegally?


I feel like I should use "focuses" as using "focus" sounds weird in the following sentence.  Risks are not identified prospectively, i.e. this is a case of “Fighting the Last Battle” syndrome, whereby management focus most on risks that have occurred recently.   Are they both acceptable? I'm not big on the rules of the English language, I tend to just go by what sounds right in my head and here "focus" seems out of place.   I appreciate any feedback.

Possible Duplicate:          Which one of the following is correct?     Management gets its ideas from its employees.   Management gets their ideas from their employees.


I have a function in python. Is there a way to get the number of lines of code that the function has in the original source file?  e.g.  # main.py  import f1 from mylib  print(loc(f1)) # 3  # mylib  def f1():   pass   return

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


I'm trying to increase the open files limit for Ubuntu 16.04 version by using vi /etc/security/limits.conf Then I add two lines like:  #* soft nofile 4096 #* hard nofile 4096   But when I use :x to save and exit I get E45: 'readonly' option is set (add ! to override) and it doesn't exit.  When I use nano etc/security/limits.conf to modify it I get:  Error writing /etc/security/limits.conf: Permission denied

I'm a beginner to Ubuntu. Can anyone tell me how to edit a configuration file?  This is on Ubuntu 18.04 LTS. Thanks in advance.


Found this by accident where a function declaration and definition may not agree on the constness of parameters.  I've found some information (links following), but my question is why is const matching optional for by-value parameters, but const matching is required for reference parameters?  Consider the following code available .  class MyClass {   int X;   int Y;   int Z;  public:   void DoSomething(int z, int y, const int& x);   int  SomethingElse(const int x);   void Another(int& x);   void YetAnother(const int& z); };  void MyClass::DoSomething(int z, const int y, const int& x) // const added on 2nd param {   Z = z;   Y = y;   X = x; }  int MyClass::SomethingElse(int x) // const removed from param {   X = x;   x = 3;   return x; }  void MyClass::Another(int& x) // const not allowed on param {   X = x; }  void MyClass::YetAnother(const int& z) // const required on param {   Z = z; }   I've found , but it is looking for explanation for name mangling.  I've also found  and , but they don't go into detail on why const matching is required for reference parameters.

How far do you go with const?  Do you just make functions const when necessary or do you go the whole hog and use it everywhere?  For example, imagine a simple mutator that takes a single boolean parameter:  void SetValue(const bool b) { my_val_ = b; }   Is that const actually useful?  Personally I opt to use it extensively, including parameters, but in this case I wonder if it's worthwhile?  I was also surprised to learn that you can omit const from parameters in a function declaration but can include it in the function definition, e.g.:  .h file  void func(int n, long l);   .cpp file  void func(const int n, const long l)   Is there a reason for this? It seems a little unusual to me.


The "Unlocking the Sharpshooter" "ACE" improves all rifles, so does that means also the assault rifles?

In Payday 2 there is a set of weapons and skills that you can get to improve certain aspects of their usage. What I can not find however is which weapons the skills affect and if there is any overlap. Some of the weapons are easy to tell, like the SMGs. But the rest seem like they could fall into two groups.  The skills break down as such:   Equilibrium - Pistol Gunslinger - Pistol Kilmer - Assault Rifles Leadership - Pistols and All Weapons when Aced Shotgun Impact - Shotgun Shotgun CQB - Shotgun Hard Boiled - Shotgun and All Weapons when Aced Overkill - Shotgun, Saw and All Weapons when Aced Rifleman - Assault Rifles Sharpshooter - Single Shot Weapons and All Rifles when Aced Mag Plus - All Weapons Silent Killer - All Silenced Weapons The Professional - All Silenced Weapons   There are some of these that are obvious. What I am wondering though is about cross over. Are the single shot shotguns considered Single Shot weapons for the 'Unlocking the Sharpshooter' skill? Do pistols that are single shot count as single shot weapons? Is the M308 a single shot weapon only or will it gain the benefits of skills like Kilmer and Rifleman that affect assault rifles?


I have specific string like this   372591089, jni, oduction, to, A, hnr, android, -"The, mAt,352, 268, 638, 257, 65, JI, 0, 00, 0, 0, al, 31/07/2015, oHa, Jile, 786118029,   I want to extract specific sequence of numbers in this string 352, 268, 638, 257, 65, I only know this sequence of digits can be 14 digit like example or 16 digit, this numbers changes every time not static numbers.  What is best way to extract it? any regex or specific way ? I can solve it by split - match than join but my string can be more than 1000 letter. So can anyone suggest better way? Thanks

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


We know a positive rational number can be uniquely written as $m/n$ where $m$ and $n$ are coprime positive integers. Particularly, we can pick out those numbers with $m$ and $n$ both prime.  The question is, is the collection of all such numbers dense on the positive half of the real line?

So the question is in the title. And I mean dense in positive real numbers ofcourse. Somehow I cannot grasp if this is very trivial or not. The prime numbers aren't that dense, but are there enough of primes to make the fractions constructed from them dense?


How do I add stuff? It doesn't work sorry I'm new to GitHub. I did git commit -m "HERE" but it still says the same?

How can I add an empty directory (that contains no files) to a Git repository?


I want to get a list of modifiers that r in the modifier stack of an object i have no idea how this is done , so I haven't tried anything yet. if i have a subdivision surface modifier applied on the object then i want a list that says ["Subdivision"]

How can I check if the Active Object has a specific modifier so that when I run my code, it doesn't add the modifier again to the object? It should add the modifier only to the object which does not use that modifier.


I am going back to India soon from the US. Can I take a laptop in my carry-on luggage and another laptop in my checked baggage, so that I don't have to pay customs duty for either of the laptops? Will they ever figure out that I have two laptops? Does Indian Customs check the combined luggage of every person to see how much electronic goods they are carrying?  In case, a laptop is not allowed can I carry 2 NVMe SSDs and a RAM module in my checked baggage, without them complaining?

I will be landing at New Delhi airport. The worth of new laptop  (Lenovo Yoga Idea Pad 13) is about $1000 and old one (Macbook Pro) is > 1 lakh INR. I want to leave the new laptop in India. I have a copy of bill with me but not the original bill. I want to know if I have risk of being charged with custom duty.


If a perfect vacuum was created within the earths atmosphere, what would it’s temperature be?

From      The temperature of an ideal monatomic gas is a measure of the average kinetic energy of its atoms.    Now if I remove all the particles from the box shown below will the temperature be zero?


I know there are lots of documents on span and div but I really understood how it happens with styling part. Unless styling do we have anything change with span and div tags in HTML where the behaviour of the application changes a lot?

I would like to ask for some simple examples showing the uses of <div> and <span>.   I've seen them both used to mark a section of a page with an id or class, but I'm interested in knowing if there are times when one is preferred over the other.


I am using FOREIGN KEY with dbDelta when activating the plugin (register_activation_hook()). It works great when creating the table for the first time, but outputs an error when updating the table (the table is already present but an alteration has to be done on the table). Any suggestions?      if(GLOBAL_PLUGIN_VERION != get_option("GLOBAL_PLUGIN_VERSION")){       $sql = "CREATE TABLE `".TEST_TABLE."` (      `id` INT( 11 ) NOT NULL AUTO_INCREMENT,      `title` VARCHAR( 100 ) NOT NULL,      `description` TEXT DEFAULT NULL,      `location_id` INT( 11 ) NOT NULL,      PRIMARY KEY  (`id`),      FOREIGN KEY  (`location_id`) REFERENCES `".TEST2_TABLE."` (`id`)     );";    }   Error:     PHP Notice:  Undefined offset: 1 in wp-admin/upgrade.php on line 1568      WordPress database error You have an error in your SQL syntax; check   the manual that corresponds to your MySQL server version for the right   syntax to use near 'FOREIGN KEY  (location_id) REFERENCES   test2 (id)' at line 1 for query ALTER TABLE   test ADD COLUMN FOREIGN KEY  (location_id) REFERENCES   test2 (id) made by ...      WordPress database error Multiple primary key defined   for query ALTER TABLE TEST ADD PRIMARY KEY  (id) made by...

On PHP 5.3.13/MySQL 5.5.21 the following code doesn't work:  if($check_custom_fields_form!=1){     $sql = "CREATE TABLE IF NOT EXISTS ". $table_custom_fields_form ." (                 `form_name` longtext NOT NULL,                 `field_id` bigint(20) NOT NULL,                 FOREIGN KEY (`field_id`) REFERENCES $table_custom_fields (`ID`) ON DELETE CASCADE ON UPDATE CASCADE     ) CHARACTER SET utf8 COLLATE utf8_general_ci";     dbDelta($sql); } if($check_subscribe_cat!=1){     $sql = "CREATE TABLE IF NOT EXISTS ". $table_subscribe_cat ." (                 `subscribe_id` bigint(20) NOT NULL,                 `cat_id` bigint(20) NOT NULL,                 FOREIGN KEY (`subscribe_id`) REFERENCES ".$wpdb->prefix."tgt_subscription (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,                 FOREIGN KEY (`cat_id`) REFERENCES ".$wpdb->prefix."terms (`term_id`) ON DELETE CASCADE ON UPDATE CASCADE     ) CHARACTER SET utf8 COLLATE utf8_general_ci";     dbDelta($sql);  }   The  suggested a downgrade to MySQL 5.1.37 (no, thanks) or the following update:  if($check_custom_fields_form!=1){         $sql = "CREATE TABLE IF NOT EXISTS ". $table_custom_fields_form ." (                     `form_name` longtext NOT NULL,                     `field_id` bigint(20) NOT NULL,                     KEY(field_id)         ) CHARACTER SET utf8 COLLATE utf8_general_ci";         dbDelta($sql);     } if($check_subscribe_cat!=1){       $sql = "CREATE TABLE IF NOT EXISTS ". $table_subscribe_cat ." (                   `subscribe_id` bigint(20) NOT NULL,                   `cat_id` bigint(20) NOT NULL,                   KEY(subscribe_id),                   KEY(cat_id)       ) CHARACTER SET utf8 COLLATE utf8_general_ci";       dbDelta($sql);    }   Which seems like a rather dirty way to work around the problem (no cascading deletes/updates). Therefore:   Do I really have to live with that ? Is it true that dbDelta only works with foreign key in a 3 year old MySQL version?


How do i give the user 'testuser' write privileges on the folder: /var/www/test/public_html

I would like the user to have full rights on this folder (as well as all sub-directories and files in it):  ~/.blabla   currently owned by root.  I have found numerous posts (in this forum and elsewhere) on how to do this for files but I can't find a way to do it for whole folders.


Find the values of $x$ where $x \in R $ which satisfy the equation: $2^x+5^x=3^x+4^x$ other than $x=0, 1.$   I got the answer using Mean Value Theorem that there is no other solution but is there any other method to do it? (Is this a one-way math?)  I thought of proving that $5^x> 3^x+4^x$ $\forall$ $x>2$ but we have $x \in R $ and hence it is incomplete. The last digit calculation also doesn't work out since $x \in R $.  Would be glad if someone could suggest some other method to do it.

This equation  $$3^x+4^x=2^x+5^x$$ has two obvious real roots. The question is if it has more real roots than two. A proof is required in any case.


I am system admin,  Setup -> Quick Search -> Question is not visible in my setup.   Actually their was a trigger written on it before an year.  Now while compiling my test cases I am not able to deploy the change set as it is running into compilation error.  How come I am not able to access standard Question object. Are we missing something?

I have been getting below error when trying to deploy new changes from sandbox to production.  chatter_answers_question_escalation_to_case_trigger: trigger body is invalid and failed recompilation: Entity is not org-accessible  Stack Trace: null  This is a trigger on Question (chatter Question) object which I can't find it after summer 16 release. Last successful deployment was on 06/09 and only change we did since yesterday was recompiled all classes and ran All tests.   Any help is greatly appreciated.


I have to run a command every morning after I log on to the server to enable certain company specific functionalities.  The command looks like this: source /data/dev/int/default/somethingsomething.env  Is there a way to automate this so I don't have to copy/paste it?

How can I automatically source a particular shell script when I open a terminal window by right clicking somewhere and choosing "open in terminal"?  For example, every time I open a terminal I need to run the following command line:  source myscript   How can I make it so that I don't have to type this automatically?  My script is written in tsch:  #!/bin/tcsh setenv DISPLAY 127.0.0.1:10.0 cd /ast/dcm/data   I'm using CentOS 7.


Working with texturing/shading a spaceship in Cycles when I noticed that the transparent shader isn't being transparent.  Ship with plain diffuse:   And then ship with transparent shader applied:   Different angles shows more/less of the spaceship being in that weird blackness.

Using v2.73, cycles and a very simple scene: an array of cubes, no big deal.   If I set the shader's material to transparent, the cubes in the foreground do become transparent but those far away in the back do not disappear completely and this strange dark things appear (visible in rendered mode and in final renders)    I've played with the clipping distance on the viewport and camera, but I can't figure out how to make those ghosts go away...


$ sudo apt-get install cryptkeeper Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_i18n_Translation-en E: The package lists or status file could not be parsed or opened.

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


I'm trying to get n lines of input (Strings) from the user   The n is set first I initialize an array of Strings to save the input and for loop to save them.   The problem is that it always falls short meaning   if n=1 the program is terminated  if n=2 it takes only 1 input  if n=3 it takes only 2 inputs and so on ......   What is wrong ?  Scanner sc = new Scanner(System.in); //how many lines should be taken int lines = sc.nextInt();  // initialize input array String[] longWords = new String[lines] ;  //set the input from the user into the array for (int i = 0; i < longWords.length; i++) {     longWords[i] = sc.nextLine() ; }

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?


Hello World, I have been wondering why in c++ we use the this->ObjectName instead of this.ObjectName when referring to an object in c++. This is a simple syntax using the this->ObjectName :        int x = 34;      void take(int x) {       this->x = x;      }   But in other programming languages like java, we use :        int x = 34;      void take(int x) {       this.x = x;      }   So what am asking is why does the this statement in c++ differ from the this statement in java

I was reading the answers to this question  and got this doubt while reading the comments.  programmers frequently find it confusing that "this" is a pointer but not a reference. another confusion is why "hello" is not of type std::string but evaluates to a char const* (pointer) (after array to pointer conversion) – Johannes Schaub - litb Dec 22 '08 at 1:56 That only shows that it doesn't use the same conventions as other (later) languages. – le dorfier Dec 22 '08 at 3:35 I'd call the "this" thing a pretty trivial issue though. And oops, thanks for catching a few errors in my examples of undefined behavior. :) Although I don't understand what info about size has to do with anything in the first one. A pointer is simply not allowed to point outside allocated memory – jalf Dec 22 '08 at 4:18 Is this a constant poiner? – yesraaj Dec 22 '08 at 6:35 this can be constant if the method is const int getFoo() const; <- in the scope of getFoo, "this" is constant, and is therefore readonly. This prevents bugs and provides some level of guarantee to the caller that the object won't change. – Doug T. Dec 22 '08 at 16:42 you can't reassign "this". i.e you cannot do "this = &other;", because this is an rvalue. but this is of type T*, not of type T const . i.e it's a non-constant pointer. if you are in a const method, then it's a pointer to const. T const . but the pointer itself is nonconst – Johannes Schaub - litb Dec 22 '08 at 17:53 think of "this" like this: #define this (this_ + 0) where the compiler creates "this_" as a pointer to the object and makes "this" a keyword. you can't assign "this" because (this_ + 0) is an rvalue. of course that's not how it is (there is no such macro), but it can help understand it – Johannes Schaub - litb Dec 22 '08 at 17:55  My question is, why is this a pointer a not a reference? Any particular reason for making it a pointer?  Some further arguments why this being a reference would make sense:  Consider Item 1 from More Effective C++ : use references when it is guaranteed that we have a valid object i.e. not a NULL (my interpretation). Furthermore, references are considered safer than pointers (because we can't screw the memory up with a stray pointer). Thirdly, the syntax for accessing references (.) is a little bit nicer and shorter than accessing pointers (-> or (*)).


I have just bought a new digital ocean Ubuntu droplet and configured it as an Apache server but when I was installing phpmyadmin package my ssh session suddenly shut down and so the download and install was interrupted. Since then whenever I try to download anything using apt i get this error  The following packages have unmet dependencies:  sendmail : Depends: sendmail-base but it is not going to be installed             Depends: sendmail-bin but it is not going to be installed             Depends: sendmail-cf but it is not going to be installed             Depends: sensible-mda but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I tried to install aptitude to fix this problem but then i received this error   Package aptitude is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'aptitude' has no installation candidate   I tried all the commands of  apt-get update , apt-get upgrade  I would be glad to know how to solve this as I really need to install send mail  My question isn't like the others as it is asking about the version 16.04 of Ubuntu and i tried all the possible answers

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I am learning C programming language and I stumbled on something while playing with some code. I was led to believe that an int has 4 bytes, and therefore has a maximum value of +2147483647(The problem was the long int). But when I tested that in my computer with GCC compiler, the result is different. I tried the same with long int, It gave the same maximum size. Can you please expain this behavior to me ? Other questions didn't help me understand the underlying reason. Let me add some examples I tried to find out what is happening.    Code sample:  #include <stdio.h> #include <limits.h> int main(void){      int a = 1, i;      printf("int limit: %d\n", INT_MAX);     printf("long int limit: %li\n", LONG_MAX);     for (i = 0; i < 10; i++){         a *= 10;         printf("A: %d\n", a); // To see when a is corrupted.     }         return 0; }

Correct me if I am wrong,  int is 4 bytes, with a range of values from -2,147,483,648 to 2,147,483,647 (2^31) long is 4 bytes, with a range of values from -2,147,483,648 to 2,147,483,647 (2^31)  What is the difference in C++?  Can they be used interchangeably?


I've tried to install Octave using homebrew by using this command: brew install octave. But after make sign, I got stuck and nothing happened more than a half hour.  ➜  ~ brew install octave ==> Installing dependencies for octave: gcc, veclibfort, arpack, jpeg, libtiff, little-cms2, ghostscript, epstool, fftw, cmake, jasper, netpbm, fig2dev, fltk, freetype, fontconfig, gl2ps, glpk, webp, gd, lua, gnuplot, graphicsmagick, szip, hdf5, flac, libogg, libvorbis, libsndfile, pcre, portaudio, plotutils, xz, imagemagick, pstoedit, qhull, qrupdate, metis, suite-sparse ==> Installing octave dependency: gcc ==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-8.1.0/gcc-8 Already downloaded: /Users/asrulsibaoel/Library/Caches/Homebrew/gcc-8.1.0.tar.xz ==> ../configure --build=x86_64-apple-darwin17.4.0 --prefix ==> make   How can I solve this?

The new GNU Octave 4.0.1 was released March 23, 2016.  I would like to find some standard way to install it in El Capitan (mine OS X 10.11.3) because it has significantly better support in some functions than Matlab, discussed in the thread .  I do brew search octave and get  homebrew/science/octave    Caskroom/cask/octave       Caskroom/cask/xoctave       where one of the first two should be a correct one. The project's homepage  for OS X is down  about installing Octave on OS X systems.  There is also ruby's way of installing Octave described in the thread  but for Yosemite.  I would like to find some standard way of getting Octave for OS X.   I do successfully brew update and brew upgrade before the commands. My Homebrew is 0.9.5 (git revision 80d1; last commit 2016-03-24).  . I run brew info octave but I get  Error: No available formula with the name "octave"     How can you install Octave in some standard way for El Capitan?


I have the follow scenario:     Emp e1 = new Emp("key x", "modelCode x", "modelYear x1");     Emp e2 = new Emp("key x", "modelCode x", "modelYear x2");     Emp e3 = new Emp("key x", "modelCode y", "modelYear y1");     Emp e4 = new Emp("key z", "modelCode z", "modelYear z1");     Emp e5 = new Emp("key z", "modelCode z", "modelYear z1");      Map<AnyEnum, List<Emp>> empsMap = new HashMap<AnyEnum, List<Emp>>();     empsMap.put(AnyEnum.FOO_ONE, Arrays.asList(e1,e2,e3));      empsMap.put(AnyEnum.FOO_TWO, Arrays.asList(e4,e5));   And now I'd like to separete it in another map, getting the total value for each yearCode as follows: public static Map<String,Map<String, Map<String, Integer>>> getTotal(Map<AnyEnum, List<Emp>> empMap){     Map<String,Map<String, Map<String, Integer>>> mapKey = new HashMap<String,Map<String, Map<String, Integer>>>();          Map<String, Map<String, Integer>> mapModelCode = null;     Map<String, Integer> mapModelYear = null;          String key;     String modelCode;     String modelYear;          int total= 0;     List<Emp> empList;          for (Map.Entry<AnyEnum, List<Emp>> entry : empMap.entrySet()) {         empList = entry.getValue();                  for(Emp emp: empList) {             key = emp.getKey();             modelCode = emp.getModelCode();             modelYear = emp.getModelYear();                          if(!mapKey.containsKey(key) ||                 mapKey.get(key).get(modelCode)== null) {                                  mapModelCode = new HashMap<String, Map<String, Integer>>();                 mapKey.put(key, mapaModelCode);                              }else {                 mapModelCode = mapKey.get(modelCode);             }                          mapModelYear = mapModelCode.get(modelYear); //null pointer exception here                          if(mapModelYear == null) {                 mapModelYear = new HashMap<String, Integer>();                 mapModelYear.put(modelYear, 0);             }                      total= mapaModelYear.get(modelYear) +1;             mapModelYear.put(modelYear, total);             mapModelCode.put(modelCode, mapaModelYear);             mapKey.put(key, mapaModelCode);          }     }     return mapKey; }  I'd like the follow result: {key x={modelCode x={modelYear x1=1}}},  {key x={modelCode x={modelYear x2=1}}}, {key x={modelCode y={modelYear y1=1}}}, {key z={modelCode z={modelYear z1=2}}}  But in the seccond interation, on the line appointed I get null pointer exception.

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


Whilst doing some internet research for a question, I stumbled upon .  It seems that all the questions asked in all StackExchange sites are mirrored onto the site.  Interestingly, looking at the site list, they don't have CognitiveSciences updated to Psychology&Neuroscience (the current name) and so I was wondering if this is part of StackExchange or is ResolveAsk stealing our work?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


If $f$ is a measurable function on $[0,1]$, then there exists a measurable set $D\subset [0,1]$ such that $mD>0.9$, and a continuous function $g:[0,1]\to R$ such that $f=g$ on $D$.  My question is that how can we approximate a measurable function by continuous function and how good could it be? Is there any theorem for it?

I found the following problem in the book of kolmogorov fomin Introductory real analysis (p.293 problem 10) which I have no idea how to show. Prove that a function $f$ defined on a closed interval $[a,b]$ is $m$ measurable if and only if given any $\epsilon>0$ there is a continuous function $g$ on $[a,b]$ such that $m${$x:f(x)\neq g(x)$}$<\epsilon$ Hint use Egorov's theorem    Does anyone have any idea how to prove this Thanks in advance


We have implemented Least Privilege in our production org, and have managed to lock down an administrator account that can do everything BUT modify metadata.  We also need login as any user to be activated so that these users can support our end users and assist in trouble shooting, however there is nothing stopping them from using Login as Any User to login as a System Administrator, temporarily upgrade their profile and then change it back once they have modified whatever they want to modify.  How do I permit them to login as anyone beneath them in the role hierarchy, but not above?

If a user is setup as System Administrator profile, the user can login as other user. However, is there any option that I can enable this function for other profile except System Administrator because I don't want to give them other System Administrator permission access?  In the past as I remember in summer 12, there's an option called "managing user permission" which allow me to disable or enable the profile to login as other user. But I don't see this anymore.


Is there a short key to move a window between the different connected monitors?  In my setup I have 2 monitors in use. Usually I am on Unity, but I also use Cinnamon. Is there a way to move a window from say the left monitor to the right monitor?

I know that using Alt+F7, I can use the keyboard to move the window around. I can also use the "Grid" plugin of Compiz to position quickly the window around my current monitor. The grid plugin doesn't seem work across monitor however.  What I need is a quicker way to move the current window to the other screen. In my current dual-monitor setup, I find myself needing to move the focus window to the other monitor as I focus on working on something else (and move it back afterward).  If I use XMonad (or other tiling managers), this would be rather easy. However, many applications that I use (Gnome Do, MATLAB, image viewers, custom apps that I write, ...) do not work well with a tiling manager.   So my question is: is there a shortcut key combination that moves the currently focused window to the other monitor (and back)?


When and why did the word "like" come to be used to introduce an action, or even as a meaningless filler word, e.g. "He was like, [action or quote]."

So like, I had this teacher? And he's like, "You're late?" And I'm like, "There's like other people late too?"  I've always cringed at the word "like" strewn about in a spoken sentence. Well now I've seen it in print, right in the middle of an otherwise articulate National Geographic article. Not once, but twice. As far as I could tell it was not being used tongue in cheek. In the Feb '10 issue, in the article about the Congo Chimps. See last two paragraphs here:   "Sure enough, they built their nests directly over our tents," says Morgan. "I was like, This is great! But our trackers were like, No way, man, this is very bad news." "People were like, Curiosity: Hmmm, how do you define that?" says Sanz, 34, now a professor at Washington University in St. Louis."  When I read that I had to shake my head and go back to re-read those sentences. I'm just curious what people think of this, and if you have seen any other examples in like a literate context?


I want to statically initialize a map<string, pair<some_enum, string> >. Let's say a map from employee id to job title (enum) + name.  I would love for it to look like this:  map<string, pair<some_enum, string> > = {   { "1234a", { BOSS, "Alice" }},   { "5678b", { SLAVE, "Bob" }},   { "1111b", { IT_GUY, "Cathy" }}, };   What is the best way to do this in C++?

What is the right way of initializing a static map? Do we need a static function that will initialize it?


I have Ubuntu 18.04 LTS 64bit running on a Toshiba laptop.    About a week ago, some applications, e.g. Firefox, Aisle Riot Solitaire, KPatience, XTide tide predictor etc. when launched have the top left corner of the window too far up and left, partly hiding them under the quick launch icons on the left of the screen (i.e. under the Ubuntu Dock).    This makes them difficult to use and the window can only be closed by using the 'Quit' option from the quick launch icon on the left of the screen.  Other applications such as Libre Office, OpenCPN, GNU Image Manipulation Program etc behave normally.   What is happening here and how to fix it?

I'm wondering is there any way to achieve the affect of the Ctrl-Alt-Keypad shortcuts in Unity using terminal commands instead? I want a command that sets a gui window to half the size of the screen, either left or right aligned.  By way of background, I'm writing a script that runs after log in. It uses Zenity to ask whether or not I want to open my development environment (GVim and IPython side-by-side). I have been trying to achieve two equal-sized windows for these programmes by using set lines= columns= in my .gvimrc and c.IPythonWidget.width = and c.IPythonWidget.height = in my ipython_qtconsole_config.py. However, there are problems associated with this approach.