I am working on a java swing application which currently allows a user to import one or more files to be processed.   This is done right now by executing the jar using   java -jar [jarname] [filename 1] [filename 2] ... [filename N].   I am tasked with to change the behaviour so as to keep it working in this current mode and add another mode of execution by adding an option parameter:   java -jar [jarname] [filename 1] -o [option].   In the second mode, I need to make sure that the arguments contain a single filename argument with a single option flag followed by a single option argument. The option will be used to process the file. Alternatively, if the jar is executed in the first mode using only one file, there is a menu option in the application that the user should be able to use to process the file with the required option.  I am looking for ideas/tips to accomplish this.  Thanks in advance.
What is a good way of parsing command line arguments in Java?
Have men and women in the Wizarding World always had relatively equal rights? There are racial struggles and examples of racism, (Muggle-borns, centaurs, hous-elves, goblins, etc.) but are there any examples in the Wizarding World of sexism?  Have witches and wizards always had equal rights? Find a recurrence relation for the number of $n$-digit binary sequences with no pair of consecutive $1$s Find a recurrence relation for the number of $n$-digit binary sequences with no pair of consecutive $1$s.  I know my base case:$$a_1 = 2$$ for either $1$ or $0$. Normally to construct the recurrent relation I would say fill in $n-1$ spaces then add a $1$ or $0$, which is simply:$$a_n = 2\cdot a_{n-1}$$However, I don't believe this is right, because this doesn't take into account that there can't be any consecutive $1$s.  Even when I use the base case of $2$ digits:$$a_2 = 3$$for either $01$, $10$, or $00$, I still get the recurrence relation of:$$a_n = 3\cdot a_{n-2}$$which also does not account for $01$ and $10$ occurring consecutively.   So how would I express this? Using cd command in Windows command line, can't navigate to D:\ This may be a silly question, and I think I have looked elsewhere to find the answer...  Might be a path issue, but when I open the command line and type from the C:\&gt;: cd D:\  I cannot get to the D drive.  Even if I type: cd D:\&lt;folder name&gt;  The command.exe will auto-complete the line with the tab key, so it knows where I'm at.  It just doesn't print to screen the result or actually get me there.  This problem exists for the network drives as well. Now, if I use the chdir (cd) command like this: chdir D: or cd d: I get the print out of the D:\ below the command but it still says I'm in the C:\. I feel like I'm missing something simple. Natural Sort Order in C# Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array?  I am implementing the IComparer interface in my sorts. Python and regular expression with Unicode How can I cancel an edit I made on another user's question or answer? Edits made by users who do not have edit privileges are placed in a queue until it is peer reviewed.  E.g., I edited someone else's answer. but changed my mind. If I'd edited my own question/answer, there would be a "Rollback" button, but there's no such button in the scenario I'm describing (at least none that I can see).  This is more relevant today because users can only have at most five edits waiting in the queue, and allowing one to cancel an edit would permit them to free up one of their five pending edits for something else.  Is there a way to remove one's edit from the peer review queue? Python 3 with QGIS on Mac? I need to start learning Python, and I want to learn with version 3.x. I understand that QGIS--at least some plug-ins--relies on Python and Tcl/Tk, and probably on specific versions. Assuming that QGIS is dependent on Python 2, can anyone tell me how to set up parallel installations of Python 3 and Tcl/Tk such that QGIS will have what it needs and I can use Python 3 for other purposes? There are some kind of door devices which push the door back after we open the door and come out.  My problem is that the door area is not constructed in a way that such a device can be installed.  There is no space adjacent to the door anywhere.  Automatic closure of door is extremely important to me.   Please see following pictures and tell what choices do I have. $11$ out of $36$? I got this by writing down the number of possible outcomes ($36$) and then counting how many of the pairs had a $6$ in them: $(1,6)$, $(2,6)$, $(3,6)$, $(4,6)$, $(5,6)$, $(6,6)$, $(6,5)$, $(6,4)$, $(6,3)$, $(6,2)$, $(6,1)$. Is this correct? Missing new file in Ubuntu 13.04 The New file operation is missing in Ubuntu 13.04. How can I fix it?  I have only &quot;New Folder&quot;. How can I add the New File option again? Clusering based on categorical variables? I am working on a project and currently experimenting cluster analysis. The dataset is mainly categorical variables and discrete numbers. Please pardon my poor programming skills as I am not very familiar with MathJax, but I will try to summarize the data set in words in the following three examples.   imagine column 1 is participants names of course, from column2 - 5, each column's value range from 1 (least important) - 5 (most important). so in this case, column 2-8 only have discrete data.  column 6 for example, since this is a multiple choice question. row 1 chose "nice" as an answer, however, row 2 chose "poor". In this case, we have one column that contains multiple categorical answers. for column 7-9, this is another type of multiple choice questions. However this time, each column represents only one answer. column 7 only allows string values "true", column 8 only allows string "somewhat". So in this case, we have multiple columns that represent multiple answers of the same question.    Any ideas how to solve this? Thankful to any input!   A2       A3       A4       A5       A6       A7         A8         A9 1        4        5        4        nice     true       somewhate  false 2        4        3        1        poor     true                  false 1        5        2        1        nice                somewhate     3        2        1        5        nice     true                  false Indent entire section using only preamble I heavily use org-mode in Emacs to create TODO lists with timekeeping, which has a handy export to LaTeX feature. The problem is that in order to get my exported LaTeX document to look right, I want to indent entire sections, essentially treating sections like lists. It's very easy to create a template to copy and paste into every new file, but not feasible to edit the text directly as this would interfere with org-modes ease of use. Thus:  Is there a way to indent an entire section, using only the preamble?  MWE  \documentclass{article} \usepackage[explicit]{titlesec} \setcounter{secnumdepth}{0} \newcommand{\clock}{CLOCK: number number number \\}  \titleformat{\section}{\bfseries{}}{\roman{section}}{3pt}{#1} \titlespacing*{\section}{0pt}{0pt}{0pt} \titleformat{\subsection}{\bfseries{}}{\roman{subsection}}{3pt}{$\rightarrow$#1} \titlespacing*{\subsection}{2em}{0pt}{0pt} \begin{document}   \section{First section} \clock  \section{Second section} \clock \clock \clock  \subsection{First subsection} \clock \clock  \subsection{Second subsection} \clock  \subsection{Third subsection} \clock  \end{document}   I want the text with the red arrow to be indented to the same level as the section. What SIM card would you recommend for a smartphone user for travel in Germany?  It would be probably the only or the most important connection to the Internet, so large amounts of data and relatively fast transfer is an issue.  I need to stay in touch with friends and family, so the calls to other EU countries should be as cheap as possible.   For to the first criteria, I found the T-Mobile offer interesting. The internet costs 10 Euros/month and after reaching the transfer limit it stays relatively fast. According to tests (Galileo from Pro7, AFAIR) it has also the best coverage. However, calls to other countries are very expensive.  For to second criteria, Lebara and Mobilka are interesting. The calls are very cheap, but there are problems with signal strength in many locations, where T-Mobile has no problem. The voice quality, at least in Lebara, is also limited. They both have mobile internet with unlimited transfer, but after reaching the high speed limit, the transfer is reduced to 64 kbps, which is too slow.  I've found out that O2 has foreign calls at moderate prices, but I haven't yet checked for details. There are so many other options, making it is hard to compare them all without spending the whole weekend on it. So, if someone has found a better option than having 2 SIM cards and constantly switching them, this answer would be greatly appreciated. Space between 2 paths in Illustrator Where should I start with Star Trek? (TV series only, not the movies) I haven't seen any of the stuff in the Star Trek franchise, except for one of the movies, and now I want to remedy the situation. I am not interested in the movies, just the TV series. However, since the show has many seasons, I am not interested in watching the show start to finish. So, where (i.e what series/season) should I start with? Do I really need to see the series in real-world chronological order?   Note: I am somewhat familiar with Star Trek, that is I know the basic premise - ships in space, with war between different space-faring sentient species. What does the above Error mean? What is an installation candidate?  I was trying to do  sudo apt-get install munin-memcached     and I get this message:  Reading package lists... Done Building dependency tree        Reading state information... Done Package munin-memcached 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 munin-memcached has no installation candidate   I googled for the problem and someone said to do a apt-get upgrade but it still did not solve my problem. Creating all possible line segments between all points using QGIS I want to connect all points in a point feature with every possible line segment using QGIS. For example, how a pentagon has five points with ten line segments connecting them all to form a pentagram inside. Alternatively phrased: How do I make spokes when all the points are hubs? I don't care about the order, I just want every connection between two points as one line each. Is there a tool or script that can do this in QGIS? This topic () is the closest to what I want but the plugins are no longer supported. The value of $\lim_{n \to \infty}\int_{0}^{1}nx^ne^{x^2}dx$ is _____ I tried by taking the odd $n$ values as in that case, the integral I suppose was easier to calculate. So, denote $I_n=n\int_{0}^{1}e^{x^2}x^ndx$, then we have : $I_1=\frac{e-1}{2},\\I_3=\frac{3}{2},\\I_5=5(\frac{e}{2}-1),\\I_7=7(3-e)$ Then I tried calculating (random) values using calculator as integration was getting cumbersome. $I_{31}=2.488$, $I_{51}=2.57$. I do not see any kind of recurrence so that I can find a general term for odd $n$. I also tried the method given . The idea was that since integral doesn't depend on $n$ considering $I(n)=\int_{0}^{1}e^{x^2}x^ndx$, then $I'(n)=\int_{0}^{1}x^n\ln(x)e^{x^2}dx$, but this also doesn't lead me to any conclusion as well. I believe I couldn't get to a proper approach to tackle this question. Can someone please help with the idea that involves in solving these type of questions? Parametric Interpolation of 2D data I am a Bangladeshi citizen. Back in 2013, I went to India with a tourist visa and overstayed for four days. It was due to a gout attack in my feet but I don't have my medical papers to prove that.  I applied again in 2015 for a visa, at Dhaka, and they refused my visa and blacklisted my passport, writing some numbers and date on it. Now I am not able to get an Indian visa.  How I can remove my passport from the blacklist and get a new Indian visa? Do I need a Indian immigration lawyer to do this?